Skip to content

Commit ee381bb

Browse files
authored
feat!: Remove deprecations (#2060)
1 parent 6b62788 commit ee381bb

42 files changed

Lines changed: 368 additions & 533 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/little-schools-grow.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@rocket.chat/fuselage-forms': minor
3+
'@rocket.chat/fuselage-hooks': minor
4+
'@rocket.chat/fuselage': minor
5+
'@rocket.chat/layout': minor
6+
'@rocket.chat/storybook-dark-mode': patch
7+
'@rocket.chat/fuselage-toastbar': patch
8+
'@rocket.chat/onboarding-ui': patch
9+
'@rocket.chat/css-in-js': patch
10+
'@rocket.chat/emitter': patch
11+
'@rocket.chat/styled': patch
12+
'@rocket.chat/logo': patch
13+
---
14+
15+
feat: Remove deprecations and keep documentation comments

packages/css-in-js/css-in-js.api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import { cssSupports } from '@rocket.chat/css-supports';
88
import type { Middleware } from 'stylis';
99

10-
// @public (undocumented)
10+
// @public
1111
export const attachRules: RuleAttacher;
1212

1313
// @public (undocumented)
@@ -16,7 +16,7 @@ export const createAnimationName: (content: string) => string;
1616
// @public (undocumented)
1717
export const createClassName: (content: string) => string;
1818

19-
// @public (undocumented)
19+
// @public
2020
export const css: (slices: TemplateStringsArray, ...values: readonly unknown[]) => cssFn;
2121

2222
// @public (undocumented)
@@ -27,10 +27,10 @@ export { cssSupports }
2727
// @public (undocumented)
2828
export const escapeName: (animationOrClassName: string) => string;
2929

30-
// @public (undocumented)
30+
// @public
3131
export type Evaluable = <T extends readonly unknown[]>(...args: T) => string;
3232

33-
// @public (undocumented)
33+
// @public
3434
export const keyframes: (slices: TemplateStringsArray, ...values: unknown[]) => keyframesFn;
3535

3636
// @public (undocumented)
@@ -41,7 +41,7 @@ export type RuleAttacher = (rules: string, options?: {
4141
document?: Document;
4242
}) => () => void;
4343

44-
// @public (undocumented)
44+
// @public
4545
export const transpile: (selector: string, content: string, middleware?: Middleware) => string;
4646

4747
// (No @packageDocumentation comment for this package)

packages/emitter/emitter.api.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,13 @@ export type AnyEventTypeOf<EventMap extends DefaultEventMap> = keyof EventMap;
1818
// @public (undocumented)
1919
export type DefaultEventMap = Record<string | symbol, any>;
2020

21-
// @public (undocumented)
21+
// @public
2222
export class Emitter<EventMap extends DefaultEventMap = DefaultEventMap> implements IEmitter<EventMap> {
23-
// (undocumented)
2423
emit<T extends AnyEventOf<EventMap>, EventType extends AnyEventTypeOf<EventMap> = EventTypeOf<EventMap, T>>(type: EventType, ...input: EventOf<EventMap, EventType> extends void ? [undefined?] : [EventOf<EventMap, EventType>]): void;
25-
// (undocumented)
2624
events(): AnyEventTypeOf<EventMap>[];
27-
// (undocumented)
2825
has(key: AnyEventTypeOf<EventMap>): boolean;
29-
// (undocumented)
3026
off<T extends AnyEventOf<EventMap>, EventType extends AnyEventTypeOf<EventMap> = EventTypeOf<EventMap, T>>(type: EventType, handler: EventHandlerOf<EventMap, EventType>): void;
31-
// (undocumented)
3227
on<T extends AnyEventOf<EventMap>, TType extends AnyEventTypeOf<EventMap> = EventTypeOf<EventMap, T>>(type: TType, handler: EventHandlerOf<EventMap, TType>): OffCallbackHandler;
33-
// (undocumented)
3428
once<T extends AnyEventOf<EventMap>, EventType extends AnyEventTypeOf<EventMap> = EventTypeOf<EventMap, T>>(type: EventType, handler: EventHandlerOf<EventMap, EventType>): OffCallbackHandler;
3529
}
3630

packages/fuselage-forms/fuselage-forms.api.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import { FieldLabelInfo } from '@rocket.chat/fuselage';
2424
import { FieldLink } from '@rocket.chat/fuselage';
2525
import { FieldRow } from '@rocket.chat/fuselage';
2626
import { IconProps } from '@rocket.chat/fuselage';
27-
import { InputBoxProps } from '@rocket.chat/fuselage';
2827
import { JSX } from 'react';
2928
import { Key } from 'react';
3029
import { MouseEventHandler } from 'react';
@@ -40,6 +39,7 @@ import { SetStateAction } from 'react';
4039
import { Slider as Slider_2 } from '@rocket.chat/fuselage';
4140
import { TelephoneInputProps } from '@rocket.chat/fuselage';
4241
import { TextAreaInputProps } from '@rocket.chat/fuselage';
42+
import { TextInputProps } from '@rocket.chat/fuselage';
4343
import { UrlInputProps } from '@rocket.chat/fuselage';
4444

4545
// @public (undocumented)
@@ -264,10 +264,7 @@ export const TextAreaInput: {
264264

265265
// @public (undocumented)
266266
export const TextInput: {
267-
(props: Omit<InputBoxProps, "ref" | "type"> & RefAttributes<HTMLInputElement> & {
268-
addon?: ReactNode;
269-
error?: string;
270-
}): JSX.Element;
267+
(props: TextInputProps & RefAttributes<any>): JSX.Element;
271268
displayName: string;
272269
};
273270

packages/fuselage-hooks/fuselage-hooks.api.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,6 @@ Dispatch<A> & {
163163
// @public
164164
export const useDebouncedValue: <V>(value: V, delay: number) => V;
165165

166-
// @public @deprecated
167-
export const useEffectEvent: <TFunction extends (...args: any[]) => any>(fn: TFunction) => (...args: TFunction extends (...args: infer P) => any ? P : never) => TFunction extends (...args: any) => infer T ? T : never;
168-
169166
// @public (undocumented)
170167
export const useElementIsVisible: <T extends Element>() => [ref: RefObject<T | null>, isVisible: boolean];
171168

@@ -187,9 +184,6 @@ export const useMediaQuery: (query?: string) => boolean;
187184
// @public
188185
export const useMergedRefs: <T>(...refs: (Ref<T> | null | undefined)[]) => RefCallback<T>;
189186

190-
// @public @deprecated
191-
export const useMutableCallback: <TFunction extends (...args: any[]) => any>(fn: TFunction) => (...args: TFunction extends (...args: infer P) => any ? P : never) => TFunction extends (...args: any) => infer T ? T : never;
192-
193187
// @public
194188
export function useOutsideClick<T extends Element>(elements: RefObject<T | null>[], cb: (e: MouseEvent) => void): void;
195189

packages/fuselage-hooks/src/useStableCallback.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,3 @@ export const useStableCallback = <TFunction extends (...args: any[]) => any>(
3030

3131
return stableFnRef.current;
3232
};
33-
34-
/**
35-
* Hook to create a stable callback from a mutable one.
36-
*
37-
* @deprecated use {@link useStableCallback} instead
38-
* @param fn - the mutable callback
39-
* @returns a stable callback
40-
* @public
41-
*/
42-
export const useMutableCallback = useStableCallback;
43-
44-
/**
45-
* Hook to create a stable callback from a mutable one.
46-
*
47-
* @deprecated use {@link useStableCallback} instead
48-
* @param fn - the mutable callback
49-
* @returns a stable callback
50-
* @public
51-
*/
52-
export const useEffectEvent = useStableCallback;
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4-
"rootDir": "./src",
5-
"removeComments": false
4+
"rootDir": "./src"
65
},
76
"exclude": ["**/*.spec.*", "jest.config.*"]
87
}

0 commit comments

Comments
 (0)