@types/react 19.0.3 → 19.0.4

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 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: Mon, 06 Jan 2025 11:32:24 GMT
11
+ * Last updated: Wed, 08 Jan 2025 20:02:26 GMT
12
12
  * Dependencies: [csstype](https://npmjs.com/package/csstype)
13
13
 
14
14
  # Credits
react/experimental.d.ts CHANGED
@@ -122,4 +122,29 @@ declare module "." {
122
122
  value: TaintableUniqueValue,
123
123
  ): void;
124
124
  function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
125
+
126
+ export interface ViewTransitionProps {
127
+ /**
128
+ * 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
+ */
130
+ className?: string | undefined;
131
+ /**
132
+ * "auto" will automatically assign a view-transition-name to the inner DOM node.
133
+ * That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
134
+ *
135
+ * 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
+ * @default "auto"
137
+ */
138
+ name?: "auto" | (string & {}) | undefined;
139
+ children?: ReactNode | undefined;
140
+ }
141
+
142
+ /**
143
+ * Opt-in for using {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API View Transitions} in React.
144
+ * View Transitions only trigger for async updates like {@link startTransition}, {@link useDeferredValue}, Actions or <{@link Suspense}> revealing from fallback to content.
145
+ * Synchronous updates provide an opt-out but also guarantee that they commit immediately which View Transitions can't.
146
+ *
147
+ * @see {@link https://github.com/facebook/react/pull/31975}
148
+ */
149
+ export const unstable_ViewTransition: ExoticComponent<ViewTransitionProps>;
125
150
  }
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "19.0.3",
3
+ "version": "19.0.4",
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": "2f0601d95c44f743c82ca0f3e00e2e2127fc9780ed01373fbe3ae6d149a9fa91",
208
+ "typesPublisherContentHash": "1faca4a7f97d59261f420b0b437332c7e5513b5febbebb40d1599180f6e27b64",
209
209
  "typeScriptVersion": "5.0"
210
210
  }
@@ -122,4 +122,29 @@ declare module "." {
122
122
  value: TaintableUniqueValue,
123
123
  ): void;
124
124
  function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
125
+
126
+ export interface ViewTransitionProps {
127
+ /**
128
+ * 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
+ */
130
+ className?: string | undefined;
131
+ /**
132
+ * "auto" will automatically assign a view-transition-name to the inner DOM node.
133
+ * That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
134
+ *
135
+ * 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
+ * @default "auto"
137
+ */
138
+ name?: "auto" | (string & {}) | undefined;
139
+ children?: ReactNode | undefined;
140
+ }
141
+
142
+ /**
143
+ * Opt-in for using {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API View Transitions} in React.
144
+ * View Transitions only trigger for async updates like {@link startTransition}, {@link useDeferredValue}, Actions or <{@link Suspense}> revealing from fallback to content.
145
+ * Synchronous updates provide an opt-out but also guarantee that they commit immediately which View Transitions can't.
146
+ *
147
+ * @see {@link https://github.com/facebook/react/pull/31975}
148
+ */
149
+ export const unstable_ViewTransition: ExoticComponent<ViewTransitionProps>;
125
150
  }