@types/react 19.0.4 → 19.0.6
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 +30 -2
- react/package.json +2 -2
- react/ts5.0/experimental.d.ts +30 -2
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: Mon, 13 Jan 2025 00:46:54 GMT
|
12
12
|
* Dependencies: [csstype](https://npmjs.com/package/csstype)
|
13
13
|
|
14
14
|
# Credits
|
react/experimental.d.ts
CHANGED
@@ -123,7 +123,15 @@ declare module "." {
|
|
123
123
|
): void;
|
124
124
|
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
|
125
125
|
|
126
|
+
export interface ViewTransitionInstance {
|
127
|
+
/**
|
128
|
+
* The {@link ViewTransitionProps name} that was used in the corresponding {@link ViewTransition} component or `"auto"` if the `name` prop was omitted.
|
129
|
+
*/
|
130
|
+
name: string;
|
131
|
+
}
|
132
|
+
|
126
133
|
export interface ViewTransitionProps {
|
134
|
+
children?: ReactNode | undefined;
|
127
135
|
/**
|
128
136
|
* Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node.
|
129
137
|
*/
|
@@ -132,11 +140,31 @@ declare module "." {
|
|
132
140
|
* "auto" will automatically assign a view-transition-name to the inner DOM node.
|
133
141
|
* That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
|
134
142
|
*
|
135
|
-
* A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the
|
143
|
+
* A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the `<ViewTransition>` component preserves the same name so this example cross-fades between the DOM nodes instead of causing an exit and enter.
|
136
144
|
* @default "auto"
|
137
145
|
*/
|
138
146
|
name?: "auto" | (string & {}) | undefined;
|
139
|
-
|
147
|
+
/**
|
148
|
+
* The `<ViewTransition>` or its parent Component is mounted and there's no other `<ViewTransition>` with the same name being deleted.
|
149
|
+
*/
|
150
|
+
onEnter?: (instance: ViewTransitionInstance) => void;
|
151
|
+
/**
|
152
|
+
* The `<ViewTransition>` or its parent Component is unmounted and there's no other `<ViewTransition>` with the same name being deleted.
|
153
|
+
*/
|
154
|
+
onExit?: (instance: ViewTransitionInstance) => void;
|
155
|
+
/**
|
156
|
+
* 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.
|
157
|
+
*/
|
158
|
+
onLayout?: (instance: ViewTransitionInstance) => void;
|
159
|
+
/**
|
160
|
+
* This `<ViewTransition>` is being mounted and another `<ViewTransition>` instance with the same name is being unmounted elsewhere.
|
161
|
+
*/
|
162
|
+
onShare?: (instance: ViewTransitionInstance) => void;
|
163
|
+
/**
|
164
|
+
* The content of `<ViewTransition>` has changed either due to DOM mutations or because an inner child `<ViewTransition>` has resized.
|
165
|
+
*/
|
166
|
+
onUpdate?: (instance: ViewTransitionInstance) => void;
|
167
|
+
ref?: Ref<ViewTransitionInstance> | undefined;
|
140
168
|
}
|
141
169
|
|
142
170
|
/**
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "19.0.
|
3
|
+
"version": "19.0.6",
|
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": "
|
208
|
+
"typesPublisherContentHash": "de021ec0ddd21a2b5a23d934185fcf50733494bac9151ebc487baf0d7eab515c",
|
209
209
|
"typeScriptVersion": "5.0"
|
210
210
|
}
|
react/ts5.0/experimental.d.ts
CHANGED
@@ -123,7 +123,15 @@ declare module "." {
|
|
123
123
|
): void;
|
124
124
|
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
|
125
125
|
|
126
|
+
export interface ViewTransitionInstance {
|
127
|
+
/**
|
128
|
+
* The {@link ViewTransitionProps name} that was used in the corresponding {@link ViewTransition} component or `"auto"` if the `name` prop was omitted.
|
129
|
+
*/
|
130
|
+
name: string;
|
131
|
+
}
|
132
|
+
|
126
133
|
export interface ViewTransitionProps {
|
134
|
+
children?: ReactNode | undefined;
|
127
135
|
/**
|
128
136
|
* Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node.
|
129
137
|
*/
|
@@ -132,11 +140,31 @@ declare module "." {
|
|
132
140
|
* "auto" will automatically assign a view-transition-name to the inner DOM node.
|
133
141
|
* That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
|
134
142
|
*
|
135
|
-
* A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the
|
143
|
+
* A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the `<ViewTransition>` component preserves the same name so this example cross-fades between the DOM nodes instead of causing an exit and enter.
|
136
144
|
* @default "auto"
|
137
145
|
*/
|
138
146
|
name?: "auto" | (string & {}) | undefined;
|
139
|
-
|
147
|
+
/**
|
148
|
+
* The `<ViewTransition>` or its parent Component is mounted and there's no other `<ViewTransition>` with the same name being deleted.
|
149
|
+
*/
|
150
|
+
onEnter?: (instance: ViewTransitionInstance) => void;
|
151
|
+
/**
|
152
|
+
* The `<ViewTransition>` or its parent Component is unmounted and there's no other `<ViewTransition>` with the same name being deleted.
|
153
|
+
*/
|
154
|
+
onExit?: (instance: ViewTransitionInstance) => void;
|
155
|
+
/**
|
156
|
+
* 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.
|
157
|
+
*/
|
158
|
+
onLayout?: (instance: ViewTransitionInstance) => void;
|
159
|
+
/**
|
160
|
+
* This `<ViewTransition>` is being mounted and another `<ViewTransition>` instance with the same name is being unmounted elsewhere.
|
161
|
+
*/
|
162
|
+
onShare?: (instance: ViewTransitionInstance) => void;
|
163
|
+
/**
|
164
|
+
* The content of `<ViewTransition>` has changed either due to DOM mutations or because an inner child `<ViewTransition>` has resized.
|
165
|
+
*/
|
166
|
+
onUpdate?: (instance: ViewTransitionInstance) => void;
|
167
|
+
ref?: Ref<ViewTransitionInstance> | undefined;
|
140
168
|
}
|
141
169
|
|
142
170
|
/**
|