@types/react 19.0.11 → 19.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- react/README.md +1 -1
- react/experimental.d.ts +24 -26
- react/index.d.ts +10 -0
- react/package.json +3 -3
- react/ts5.0/experimental.d.ts +24 -26
- react/ts5.0/index.d.ts +10 -0
react/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for react (https://react.dev/).
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated:
|
11
|
+
* Last updated: Wed, 02 Apr 2025 06:39:08 GMT
|
12
12
|
* Dependencies: [csstype](https://npmjs.com/package/csstype)
|
13
13
|
|
14
14
|
# Credits
|
react/experimental.d.ts
CHANGED
@@ -125,27 +125,25 @@ declare module "." {
|
|
125
125
|
name: string;
|
126
126
|
}
|
127
127
|
|
128
|
+
export type ViewTransitionClassPerType = Record<"default" | (string & {}), "none" | "auto" | (string & {})>;
|
129
|
+
export type ViewTransitionClass = ViewTransitionClassPerType | ViewTransitionClassPerType[string];
|
130
|
+
|
128
131
|
export interface ViewTransitionProps {
|
129
132
|
children?: ReactNode | undefined;
|
130
133
|
/**
|
131
134
|
* Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node.
|
132
135
|
*/
|
133
|
-
|
136
|
+
default?: ViewTransitionClass | undefined;
|
134
137
|
/**
|
135
138
|
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is mounted and there's no other with the same name being deleted.
|
136
139
|
* `"none"` is a special value that deactivates the view transition name under that condition.
|
137
140
|
*/
|
138
|
-
enter?:
|
141
|
+
enter?: ViewTransitionClass | undefined;
|
139
142
|
/**
|
140
143
|
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is unmounted and there's no other with the same name being deleted.
|
141
144
|
* `"none"` is a special value that deactivates the view transition name under that condition.
|
142
145
|
*/
|
143
|
-
exit?:
|
144
|
-
/**
|
145
|
-
* Combined with {@link className} there are no updates to the content inside this boundary itself but the boundary has resized or moved due to other changes to siblings.
|
146
|
-
* `"none"` is a special value that deactivates the view transition name under that condition.
|
147
|
-
*/
|
148
|
-
layout?: "none" | (string & {}) | undefined;
|
146
|
+
exit?: ViewTransitionClass | undefined;
|
149
147
|
/**
|
150
148
|
* "auto" will automatically assign a view-transition-name to the inner DOM node.
|
151
149
|
* That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
|
@@ -157,34 +155,30 @@ declare module "." {
|
|
157
155
|
/**
|
158
156
|
* The `<ViewTransition>` or its parent Component is mounted and there's no other `<ViewTransition>` with the same name being deleted.
|
159
157
|
*/
|
160
|
-
onEnter?: (instance: ViewTransitionInstance) => void;
|
158
|
+
onEnter?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
161
159
|
/**
|
162
160
|
* The `<ViewTransition>` or its parent Component is unmounted and there's no other `<ViewTransition>` with the same name being deleted.
|
163
161
|
*/
|
164
|
-
onExit?: (instance: ViewTransitionInstance) => void;
|
165
|
-
/**
|
166
|
-
* There are no updates to the content inside this `<ViewTransition>` boundary itself but the boundary has resized or moved due to other changes to siblings.
|
167
|
-
*/
|
168
|
-
onLayout?: (instance: ViewTransitionInstance) => void;
|
162
|
+
onExit?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
169
163
|
/**
|
170
164
|
* This `<ViewTransition>` is being mounted and another `<ViewTransition>` instance with the same name is being unmounted elsewhere.
|
171
165
|
*/
|
172
|
-
onShare?: (instance: ViewTransitionInstance) => void;
|
166
|
+
onShare?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
173
167
|
/**
|
174
168
|
* The content of `<ViewTransition>` has changed either due to DOM mutations or because an inner child `<ViewTransition>` has resized.
|
175
169
|
*/
|
176
|
-
onUpdate?: (instance: ViewTransitionInstance) => void;
|
170
|
+
onUpdate?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
177
171
|
ref?: Ref<ViewTransitionInstance> | undefined;
|
178
172
|
/**
|
179
173
|
* Combined with {@link className} if this `<ViewTransition>` is being mounted and another instance with the same name is being unmounted elsewhere.
|
180
174
|
* `"none"` is a special value that deactivates the view transition name under that condition.
|
181
175
|
*/
|
182
|
-
share?:
|
176
|
+
share?: ViewTransitionClass | undefined;
|
183
177
|
/**
|
184
178
|
* Combined with {@link className} if the content of this `<ViewTransition>` has changed either due to DOM mutations or because an inner child has resized.
|
185
179
|
* `"none"` is a special value that deactivates the view transition name under that condition.
|
186
180
|
*/
|
187
|
-
update?:
|
181
|
+
update?: ViewTransitionClass | undefined;
|
188
182
|
}
|
189
183
|
|
190
184
|
/**
|
@@ -196,17 +190,21 @@ declare module "." {
|
|
196
190
|
*/
|
197
191
|
export const unstable_ViewTransition: ExoticComponent<ViewTransitionProps>;
|
198
192
|
|
193
|
+
export function unstable_addTransitionType(type: string): void;
|
194
|
+
|
195
|
+
// @enableGestureTransition
|
199
196
|
// Implemented by the specific renderer e.g. `react-dom`.
|
200
197
|
// Keep in mind that augmented interfaces merge their JSDoc so if you put
|
201
198
|
// JSDoc here and in the renderer, the IDE will display both.
|
202
199
|
export interface GestureProvider {}
|
203
|
-
|
204
|
-
|
205
|
-
|
200
|
+
export interface GestureOptions {
|
201
|
+
rangeStart?: number | undefined;
|
202
|
+
rangeEnd?: number | undefined;
|
203
|
+
}
|
206
204
|
/** */
|
207
|
-
export function
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
):
|
205
|
+
export function unstable_startGestureTransition(
|
206
|
+
provider: GestureProvider,
|
207
|
+
scope: () => void,
|
208
|
+
options?: GestureOptions,
|
209
|
+
): () => void;
|
212
210
|
}
|
react/index.d.ts
CHANGED
@@ -2334,6 +2334,8 @@ declare namespace React {
|
|
2334
2334
|
// UI Events
|
2335
2335
|
onScroll?: UIEventHandler<T> | undefined;
|
2336
2336
|
onScrollCapture?: UIEventHandler<T> | undefined;
|
2337
|
+
onScrollEnd?: UIEventHandler<T> | undefined;
|
2338
|
+
onScrollEndCapture?: UIEventHandler<T> | undefined;
|
2337
2339
|
|
2338
2340
|
// Wheel Events
|
2339
2341
|
onWheel?: WheelEventHandler<T> | undefined;
|
@@ -2750,6 +2752,14 @@ declare namespace React {
|
|
2750
2752
|
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is}
|
2751
2753
|
*/
|
2752
2754
|
is?: string | undefined;
|
2755
|
+
/**
|
2756
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts}
|
2757
|
+
*/
|
2758
|
+
exportparts?: string | undefined;
|
2759
|
+
/**
|
2760
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part}
|
2761
|
+
*/
|
2762
|
+
part?: string | undefined;
|
2753
2763
|
}
|
2754
2764
|
|
2755
2765
|
/**
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "19.0.
|
3
|
+
"version": "19.0.13",
|
4
4
|
"description": "TypeScript definitions for react",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
6
6
|
"license": "MIT",
|
@@ -205,6 +205,6 @@
|
|
205
205
|
"csstype": "^3.0.2"
|
206
206
|
},
|
207
207
|
"peerDependencies": {},
|
208
|
-
"typesPublisherContentHash": "
|
209
|
-
"typeScriptVersion": "5.
|
208
|
+
"typesPublisherContentHash": "38786eb73152e3fd0ce837f2250de108f3c57ca200e55b366f844b148d56ada2",
|
209
|
+
"typeScriptVersion": "5.1"
|
210
210
|
}
|
react/ts5.0/experimental.d.ts
CHANGED
@@ -125,27 +125,25 @@ declare module "." {
|
|
125
125
|
name: string;
|
126
126
|
}
|
127
127
|
|
128
|
+
export type ViewTransitionClassPerType = Record<"default" | (string & {}), "none" | "auto" | (string & {})>;
|
129
|
+
export type ViewTransitionClass = ViewTransitionClassPerType | ViewTransitionClassPerType[string];
|
130
|
+
|
128
131
|
export interface ViewTransitionProps {
|
129
132
|
children?: ReactNode | undefined;
|
130
133
|
/**
|
131
134
|
* Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node.
|
132
135
|
*/
|
133
|
-
|
136
|
+
default?: ViewTransitionClass | undefined;
|
134
137
|
/**
|
135
138
|
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is mounted and there's no other with the same name being deleted.
|
136
139
|
* `"none"` is a special value that deactivates the view transition name under that condition.
|
137
140
|
*/
|
138
|
-
enter?:
|
141
|
+
enter?: ViewTransitionClass | undefined;
|
139
142
|
/**
|
140
143
|
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is unmounted and there's no other with the same name being deleted.
|
141
144
|
* `"none"` is a special value that deactivates the view transition name under that condition.
|
142
145
|
*/
|
143
|
-
exit?:
|
144
|
-
/**
|
145
|
-
* Combined with {@link className} there are no updates to the content inside this boundary itself but the boundary has resized or moved due to other changes to siblings.
|
146
|
-
* `"none"` is a special value that deactivates the view transition name under that condition.
|
147
|
-
*/
|
148
|
-
layout?: "none" | (string & {}) | undefined;
|
146
|
+
exit?: ViewTransitionClass | undefined;
|
149
147
|
/**
|
150
148
|
* "auto" will automatically assign a view-transition-name to the inner DOM node.
|
151
149
|
* That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
|
@@ -157,34 +155,30 @@ declare module "." {
|
|
157
155
|
/**
|
158
156
|
* The `<ViewTransition>` or its parent Component is mounted and there's no other `<ViewTransition>` with the same name being deleted.
|
159
157
|
*/
|
160
|
-
onEnter?: (instance: ViewTransitionInstance) => void;
|
158
|
+
onEnter?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
161
159
|
/**
|
162
160
|
* The `<ViewTransition>` or its parent Component is unmounted and there's no other `<ViewTransition>` with the same name being deleted.
|
163
161
|
*/
|
164
|
-
onExit?: (instance: ViewTransitionInstance) => void;
|
165
|
-
/**
|
166
|
-
* There are no updates to the content inside this `<ViewTransition>` boundary itself but the boundary has resized or moved due to other changes to siblings.
|
167
|
-
*/
|
168
|
-
onLayout?: (instance: ViewTransitionInstance) => void;
|
162
|
+
onExit?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
169
163
|
/**
|
170
164
|
* This `<ViewTransition>` is being mounted and another `<ViewTransition>` instance with the same name is being unmounted elsewhere.
|
171
165
|
*/
|
172
|
-
onShare?: (instance: ViewTransitionInstance) => void;
|
166
|
+
onShare?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
173
167
|
/**
|
174
168
|
* The content of `<ViewTransition>` has changed either due to DOM mutations or because an inner child `<ViewTransition>` has resized.
|
175
169
|
*/
|
176
|
-
onUpdate?: (instance: ViewTransitionInstance) => void;
|
170
|
+
onUpdate?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
177
171
|
ref?: Ref<ViewTransitionInstance> | undefined;
|
178
172
|
/**
|
179
173
|
* Combined with {@link className} if this `<ViewTransition>` is being mounted and another instance with the same name is being unmounted elsewhere.
|
180
174
|
* `"none"` is a special value that deactivates the view transition name under that condition.
|
181
175
|
*/
|
182
|
-
share?:
|
176
|
+
share?: ViewTransitionClass | undefined;
|
183
177
|
/**
|
184
178
|
* Combined with {@link className} if the content of this `<ViewTransition>` has changed either due to DOM mutations or because an inner child has resized.
|
185
179
|
* `"none"` is a special value that deactivates the view transition name under that condition.
|
186
180
|
*/
|
187
|
-
update?:
|
181
|
+
update?: ViewTransitionClass | undefined;
|
188
182
|
}
|
189
183
|
|
190
184
|
/**
|
@@ -196,17 +190,21 @@ declare module "." {
|
|
196
190
|
*/
|
197
191
|
export const unstable_ViewTransition: ExoticComponent<ViewTransitionProps>;
|
198
192
|
|
193
|
+
export function unstable_addTransitionType(type: string): void;
|
194
|
+
|
195
|
+
// @enableGestureTransition
|
199
196
|
// Implemented by the specific renderer e.g. `react-dom`.
|
200
197
|
// Keep in mind that augmented interfaces merge their JSDoc so if you put
|
201
198
|
// JSDoc here and in the renderer, the IDE will display both.
|
202
199
|
export interface GestureProvider {}
|
203
|
-
|
204
|
-
|
205
|
-
|
200
|
+
export interface GestureOptions {
|
201
|
+
rangeStart?: number | undefined;
|
202
|
+
rangeEnd?: number | undefined;
|
203
|
+
}
|
206
204
|
/** */
|
207
|
-
export function
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
):
|
205
|
+
export function unstable_startGestureTransition(
|
206
|
+
provider: GestureProvider,
|
207
|
+
scope: () => void,
|
208
|
+
options?: GestureOptions,
|
209
|
+
): () => void;
|
212
210
|
}
|
react/ts5.0/index.d.ts
CHANGED
@@ -2333,6 +2333,8 @@ declare namespace React {
|
|
2333
2333
|
// UI Events
|
2334
2334
|
onScroll?: UIEventHandler<T> | undefined;
|
2335
2335
|
onScrollCapture?: UIEventHandler<T> | undefined;
|
2336
|
+
onScrollEnd?: UIEventHandler<T> | undefined;
|
2337
|
+
onScrollEndCapture?: UIEventHandler<T> | undefined;
|
2336
2338
|
|
2337
2339
|
// Wheel Events
|
2338
2340
|
onWheel?: WheelEventHandler<T> | undefined;
|
@@ -2749,6 +2751,14 @@ declare namespace React {
|
|
2749
2751
|
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is}
|
2750
2752
|
*/
|
2751
2753
|
is?: string | undefined;
|
2754
|
+
/**
|
2755
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts}
|
2756
|
+
*/
|
2757
|
+
exportparts?: string | undefined;
|
2758
|
+
/**
|
2759
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part}
|
2760
|
+
*/
|
2761
|
+
part?: string | undefined;
|
2752
2762
|
}
|
2753
2763
|
|
2754
2764
|
/**
|