@wordpress/element 4.20.0 → 5.1.0

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 5.1.0 (2023-01-02)
6
+
7
+ ## 5.0.0 (2022-12-14)
8
+
9
+ ### Breaking Changes
10
+
11
+ - Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235))
12
+
13
+ ### New Features
14
+
15
+ - Started exporting new React 18 APIs ([46610](https://github.com/WordPress/gutenberg/pull/46610))
16
+
5
17
  ## 4.20.0 (2022-11-16)
6
18
 
7
19
  ## 4.19.0 (2022-11-02)
package/README.md CHANGED
@@ -198,6 +198,14 @@ _Returns_
198
198
 
199
199
  - `Object`: Ref object.
200
200
 
201
+ ### createRoot
202
+
203
+ Creates a new React root for the target DOM node.
204
+
205
+ _Related_
206
+
207
+ - <https://reactjs.org/docs/react-dom-client.html#createroot>
208
+
201
209
  ### findDOMNode
202
210
 
203
211
  Finds the dom node of a React component.
@@ -234,6 +242,14 @@ _Parameters_
234
242
  - _element_ `import('./react').WPElement`: Element to hydrate.
235
243
  - _target_ `HTMLElement`: DOM node into which element should be hydrated.
236
244
 
245
+ ### hydrateRoot
246
+
247
+ Creates a new React root for the target DOM node and hydrates it with a pre-generated markup.
248
+
249
+ _Related_
250
+
251
+ - <https://reactjs.org/docs/react-dom-client.html#hydrateroot>
252
+
237
253
  ### isEmptyElement
238
254
 
239
255
  Checks if the provided WP element is empty.
@@ -332,6 +348,12 @@ _Returns_
332
348
 
333
349
  - `string`: Serialized element.
334
350
 
351
+ ### startTransition
352
+
353
+ _Related_
354
+
355
+ - <https://reactjs.org/docs/react-api.html#starttransition>
356
+
335
357
  ### StrictMode
336
358
 
337
359
  Component that activates additional checks and warnings for its descendants.
@@ -381,18 +403,36 @@ _Related_
381
403
 
382
404
  - <https://reactjs.org/docs/hooks-reference.html#usedebugvalue>
383
405
 
406
+ ### useDeferredValue
407
+
408
+ _Related_
409
+
410
+ - <https://reactjs.org/docs/hooks-reference.html#usedeferredvalue>
411
+
384
412
  ### useEffect
385
413
 
386
414
  _Related_
387
415
 
388
416
  - <https://reactjs.org/docs/hooks-reference.html#useeffect>
389
417
 
418
+ ### useId
419
+
420
+ _Related_
421
+
422
+ - <https://reactjs.org/docs/hooks-reference.html#useid>
423
+
390
424
  ### useImperativeHandle
391
425
 
392
426
  _Related_
393
427
 
394
428
  - <https://reactjs.org/docs/hooks-reference.html#useimperativehandle>
395
429
 
430
+ ### useInsertionEffect
431
+
432
+ _Related_
433
+
434
+ - <https://reactjs.org/docs/hooks-reference.html#useinsertioneffect>
435
+
396
436
  ### useLayoutEffect
397
437
 
398
438
  _Related_
@@ -423,6 +463,18 @@ _Related_
423
463
 
424
464
  - <https://reactjs.org/docs/hooks-reference.html#usestate>
425
465
 
466
+ ### useSyncExternalStore
467
+
468
+ _Related_
469
+
470
+ - <https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore>
471
+
472
+ ### useTransition
473
+
474
+ _Related_
475
+
476
+ - <https://reactjs.org/docs/hooks-reference.html#usetransition>
477
+
426
478
  <!-- END TOKEN(Autogenerated API docs) -->
427
479
 
428
480
  ## Contributing to this package
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "createPortal", {
9
9
  return _reactDom.createPortal;
10
10
  }
11
11
  });
12
+ Object.defineProperty(exports, "createRoot", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _client.createRoot;
16
+ }
17
+ });
12
18
  Object.defineProperty(exports, "findDOMNode", {
13
19
  enumerable: true,
14
20
  get: function () {
@@ -21,6 +27,12 @@ Object.defineProperty(exports, "hydrate", {
21
27
  return _reactDom.hydrate;
22
28
  }
23
29
  });
30
+ Object.defineProperty(exports, "hydrateRoot", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _client.hydrateRoot;
34
+ }
35
+ });
24
36
  Object.defineProperty(exports, "render", {
25
37
  enumerable: true,
26
38
  get: function () {
@@ -35,4 +47,6 @@ Object.defineProperty(exports, "unmountComponentAtNode", {
35
47
  });
36
48
 
37
49
  var _reactDom = require("react-dom");
50
+
51
+ var _client = require("react-dom/client");
38
52
  //# sourceMappingURL=react-platform.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/element/src/react-platform.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tcreatePortal,\n\tfindDOMNode,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n} from 'react-dom';\n\n/**\n * Creates a portal into which a component can be rendered.\n *\n * @see https://github.com/facebook/react/issues/10309#issuecomment-318433235\n *\n * @param {import('./react').WPElement} child Any renderable child, such as an element,\n * string, or fragment.\n * @param {HTMLElement} container DOM node into which element should be rendered.\n */\nexport { createPortal };\n\n/**\n * Finds the dom node of a React component.\n *\n * @param {import('./react').WPComponent} component Component's instance.\n */\nexport { findDOMNode };\n\n/**\n * Renders a given element into the target DOM node.\n *\n * @param {import('./react').WPElement} element Element to render.\n * @param {HTMLElement} target DOM node into which element should be rendered.\n */\nexport { render };\n\n/**\n * Hydrates a given element into the target DOM node.\n *\n * @param {import('./react').WPElement} element Element to hydrate.\n * @param {HTMLElement} target DOM node into which element should be hydrated.\n */\nexport { hydrate };\n\n/**\n * Removes any mounted element from the target DOM node.\n *\n * @param {Element} target DOM node in which element is to be removed\n */\nexport { unmountComponentAtNode };\n"]}
1
+ {"version":3,"sources":["@wordpress/element/src/react-platform.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AAOA","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tcreatePortal,\n\tfindDOMNode,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n} from 'react-dom';\nimport { createRoot, hydrateRoot } from 'react-dom/client';\n\n/**\n * Creates a portal into which a component can be rendered.\n *\n * @see https://github.com/facebook/react/issues/10309#issuecomment-318433235\n *\n * @param {import('./react').WPElement} child Any renderable child, such as an element,\n * string, or fragment.\n * @param {HTMLElement} container DOM node into which element should be rendered.\n */\nexport { createPortal };\n\n/**\n * Finds the dom node of a React component.\n *\n * @param {import('./react').WPComponent} component Component's instance.\n */\nexport { findDOMNode };\n\n/**\n * Renders a given element into the target DOM node.\n *\n * @param {import('./react').WPElement} element Element to render.\n * @param {HTMLElement} target DOM node into which element should be rendered.\n */\nexport { render };\n\n/**\n * Hydrates a given element into the target DOM node.\n *\n * @param {import('./react').WPElement} element Element to hydrate.\n * @param {HTMLElement} target DOM node into which element should be hydrated.\n */\nexport { hydrate };\n\n/**\n * Creates a new React root for the target DOM node.\n *\n * @see https://reactjs.org/docs/react-dom-client.html#createroot\n */\nexport { createRoot };\n\n/**\n * Creates a new React root for the target DOM node and hydrates it with a pre-generated markup.\n *\n * @see https://reactjs.org/docs/react-dom-client.html#hydrateroot\n */\nexport { hydrateRoot };\n\n/**\n * Removes any mounted element from the target DOM node.\n *\n * @param {Element} target DOM node in which element is to be removed\n */\nexport { unmountComponentAtNode };\n"]}
package/build/react.js CHANGED
@@ -82,6 +82,12 @@ Object.defineProperty(exports, "memo", {
82
82
  return _react.memo;
83
83
  }
84
84
  });
85
+ Object.defineProperty(exports, "startTransition", {
86
+ enumerable: true,
87
+ get: function () {
88
+ return _react.startTransition;
89
+ }
90
+ });
85
91
  exports.switchChildrenNodeName = switchChildrenNodeName;
86
92
  Object.defineProperty(exports, "useCallback", {
87
93
  enumerable: true,
@@ -101,18 +107,36 @@ Object.defineProperty(exports, "useDebugValue", {
101
107
  return _react.useDebugValue;
102
108
  }
103
109
  });
110
+ Object.defineProperty(exports, "useDeferredValue", {
111
+ enumerable: true,
112
+ get: function () {
113
+ return _react.useDeferredValue;
114
+ }
115
+ });
104
116
  Object.defineProperty(exports, "useEffect", {
105
117
  enumerable: true,
106
118
  get: function () {
107
119
  return _react.useEffect;
108
120
  }
109
121
  });
122
+ Object.defineProperty(exports, "useId", {
123
+ enumerable: true,
124
+ get: function () {
125
+ return _react.useId;
126
+ }
127
+ });
110
128
  Object.defineProperty(exports, "useImperativeHandle", {
111
129
  enumerable: true,
112
130
  get: function () {
113
131
  return _react.useImperativeHandle;
114
132
  }
115
133
  });
134
+ Object.defineProperty(exports, "useInsertionEffect", {
135
+ enumerable: true,
136
+ get: function () {
137
+ return _react.useInsertionEffect;
138
+ }
139
+ });
116
140
  Object.defineProperty(exports, "useLayoutEffect", {
117
141
  enumerable: true,
118
142
  get: function () {
@@ -143,6 +167,18 @@ Object.defineProperty(exports, "useState", {
143
167
  return _react.useState;
144
168
  }
145
169
  });
170
+ Object.defineProperty(exports, "useSyncExternalStore", {
171
+ enumerable: true,
172
+ get: function () {
173
+ return _react.useSyncExternalStore;
174
+ }
175
+ });
176
+ Object.defineProperty(exports, "useTransition", {
177
+ enumerable: true,
178
+ get: function () {
179
+ return _react.useTransition;
180
+ }
181
+ });
146
182
 
147
183
  var _react = require("react");
148
184
 
@@ -259,14 +295,26 @@ var _react = require("react");
259
295
  * @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue
260
296
  */
261
297
 
298
+ /**
299
+ * @see https://reactjs.org/docs/hooks-reference.html#usedeferredvalue
300
+ */
301
+
262
302
  /**
263
303
  * @see https://reactjs.org/docs/hooks-reference.html#useeffect
264
304
  */
265
305
 
306
+ /**
307
+ * @see https://reactjs.org/docs/hooks-reference.html#useid
308
+ */
309
+
266
310
  /**
267
311
  * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle
268
312
  */
269
313
 
314
+ /**
315
+ * @see https://reactjs.org/docs/hooks-reference.html#useinsertioneffect
316
+ */
317
+
270
318
  /**
271
319
  * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect
272
320
  */
@@ -287,6 +335,18 @@ var _react = require("react");
287
335
  * @see https://reactjs.org/docs/hooks-reference.html#usestate
288
336
  */
289
337
 
338
+ /**
339
+ * @see https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore
340
+ */
341
+
342
+ /**
343
+ * @see https://reactjs.org/docs/hooks-reference.html#usetransition
344
+ */
345
+
346
+ /**
347
+ * @see https://reactjs.org/docs/react-api.html#starttransition
348
+ */
349
+
290
350
  /**
291
351
  * @see https://reactjs.org/docs/react-api.html#reactlazy
292
352
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/element/src/react.js"],"names":["concatChildren","childrenArguments","reduce","accumulator","children","i","Children","forEach","child","j","key","join","push","switchChildrenNodeName","nodeName","map","elt","index","valueOf","childrenProp","props"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AAJA;AACA;AACA;AACA;;AA2BA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,cAAT,GAAgD;AAAA,oCAApBC,iBAAoB;AAApBA,IAAAA,iBAAoB;AAAA;;AACtD,SAAOA,iBAAiB,CAACC,MAAlB,CAA0B,CAAEC,WAAF,EAAeC,QAAf,EAAyBC,CAAzB,KAAgC;AAChEC,oBAASC,OAAT,CAAkBH,QAAlB,EAA4B,CAAEI,KAAF,EAASC,CAAT,KAAgB;AAC3C,UAAKD,KAAK,IAAI,aAAa,OAAOA,KAAlC,EAA0C;AACzCA,QAAAA,KAAK,GAAG,yBAAcA,KAAd,EAAqB;AAC5BE,UAAAA,GAAG,EAAE,CAAEL,CAAF,EAAKI,CAAL,EAASE,IAAT;AADuB,SAArB,CAAR;AAGA;;AAEDR,MAAAA,WAAW,CAACS,IAAZ,CAAkBJ,KAAlB;AACA,KARD;;AAUA,WAAOL,WAAP;AACA,GAZM,EAYJ,EAZI,CAAP;AAaA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASU,sBAAT,CAAiCT,QAAjC,EAA2CU,QAA3C,EAAsD;AAC5D,SACCV,QAAQ,IACRE,gBAASS,GAAT,CAAcX,QAAd,EAAwB,CAAEY,GAAF,EAAOC,KAAP,KAAkB;AACzC,QAAK,QAAOD,GAAP,aAAOA,GAAP,uBAAOA,GAAG,CAAEE,OAAL,EAAP,MAA0B,QAA/B,EAA0C;AACzC,aAAO,0BAAeJ,QAAf,EAAyB;AAAEJ,QAAAA,GAAG,EAAEO;AAAP,OAAzB,EAAyCD,GAAzC,CAAP;AACA;;AACD,UAAM;AAAEZ,MAAAA,QAAQ,EAAEe,YAAZ;AAA0B,SAAGC;AAA7B,QAAuCJ,GAAG,CAACI,KAAjD;AACA,WAAO,0BACNN,QADM,EAEN;AAAEJ,MAAAA,GAAG,EAAEO,KAAP;AAAc,SAAGG;AAAjB,KAFM,EAGND,YAHM,CAAP;AAKA,GAVD,CAFD;AAcA","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line @typescript-eslint/no-restricted-imports\nimport {\n\tChildren,\n\tcloneElement,\n\tComponent,\n\tcreateContext,\n\tcreateElement,\n\tcreateRef,\n\tforwardRef,\n\tFragment,\n\tisValidElement,\n\tmemo,\n\tStrictMode,\n\tuseState,\n\tuseEffect,\n\tuseContext,\n\tuseReducer,\n\tuseCallback,\n\tuseMemo,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseLayoutEffect,\n\tuseDebugValue,\n\tlazy,\n\tSuspense,\n} from 'react';\n\n/**\n * Object containing a React element.\n *\n * @typedef {import('react').ReactElement} WPElement\n */\n\n/**\n * Object containing a React component.\n *\n * @typedef {import('react').ComponentType} WPComponent\n */\n\n/**\n * Object containing a React synthetic event.\n *\n * @typedef {import('react').SyntheticEvent} WPSyntheticEvent\n */\n\n/**\n * Object that provides utilities for dealing with React children.\n */\nexport { Children };\n\n/**\n * Creates a copy of an element with extended props.\n *\n * @param {WPElement} element Element\n * @param {?Object} props Props to apply to cloned element\n *\n * @return {WPElement} Cloned element.\n */\nexport { cloneElement };\n\n/**\n * A base class to create WordPress Components (Refs, state and lifecycle hooks)\n */\nexport { Component };\n\n/**\n * Creates a context object containing two components: a provider and consumer.\n *\n * @param {Object} defaultValue A default data stored in the context.\n *\n * @return {Object} Context object.\n */\nexport { createContext };\n\n/**\n * Returns a new element of given type. Type can be either a string tag name or\n * another function which itself returns an element.\n *\n * @param {?(string|Function)} type Tag name or element creator\n * @param {Object} props Element properties, either attribute\n * set to apply to DOM node or values to\n * pass through to element creator\n * @param {...WPElement} children Descendant elements\n *\n * @return {WPElement} Element.\n */\nexport { createElement };\n\n/**\n * Returns an object tracking a reference to a rendered element via its\n * `current` property as either a DOMElement or Element, dependent upon the\n * type of element rendered with the ref attribute.\n *\n * @return {Object} Ref object.\n */\nexport { createRef };\n\n/**\n * Component enhancer used to enable passing a ref to its wrapped component.\n * Pass a function argument which receives `props` and `ref` as its arguments,\n * returning an element using the forwarded ref. The return value is a new\n * component which forwards its ref.\n *\n * @param {Function} forwarder Function passed `props` and `ref`, expected to\n * return an element.\n *\n * @return {WPComponent} Enhanced component.\n */\nexport { forwardRef };\n\n/**\n * A component which renders its children without any wrapping element.\n */\nexport { Fragment };\n\n/**\n * Checks if an object is a valid WPElement.\n *\n * @param {Object} objectToCheck The object to be checked.\n *\n * @return {boolean} true if objectToTest is a valid WPElement and false otherwise.\n */\nexport { isValidElement };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#reactmemo\n */\nexport { memo };\n\n/**\n * Component that activates additional checks and warnings for its descendants.\n */\nexport { StrictMode };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usecallback\n */\nexport { useCallback };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usecontext\n */\nexport { useContext };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue\n */\nexport { useDebugValue };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useeffect\n */\nexport { useEffect };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle\n */\nexport { useImperativeHandle };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */\nexport { useLayoutEffect };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usememo\n */\nexport { useMemo };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usereducer\n */\nexport { useReducer };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n */\nexport { useRef };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usestate\n */\nexport { useState };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#reactlazy\n */\nexport { lazy };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#reactsuspense\n */\nexport { Suspense };\n\n/**\n * Concatenate two or more React children objects.\n *\n * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate.\n *\n * @return {Array} The concatenated value.\n */\nexport function concatChildren( ...childrenArguments ) {\n\treturn childrenArguments.reduce( ( accumulator, children, i ) => {\n\t\tChildren.forEach( children, ( child, j ) => {\n\t\t\tif ( child && 'string' !== typeof child ) {\n\t\t\t\tchild = cloneElement( child, {\n\t\t\t\t\tkey: [ i, j ].join(),\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\taccumulator.push( child );\n\t\t} );\n\n\t\treturn accumulator;\n\t}, [] );\n}\n\n/**\n * Switches the nodeName of all the elements in the children object.\n *\n * @param {?Object} children Children object.\n * @param {string} nodeName Node name.\n *\n * @return {?Object} The updated children object.\n */\nexport function switchChildrenNodeName( children, nodeName ) {\n\treturn (\n\t\tchildren &&\n\t\tChildren.map( children, ( elt, index ) => {\n\t\t\tif ( typeof elt?.valueOf() === 'string' ) {\n\t\t\t\treturn createElement( nodeName, { key: index }, elt );\n\t\t\t}\n\t\t\tconst { children: childrenProp, ...props } = elt.props;\n\t\t\treturn createElement(\n\t\t\t\tnodeName,\n\t\t\t\t{ key: index, ...props },\n\t\t\t\tchildrenProp\n\t\t\t);\n\t\t} )\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/element/src/react.js"],"names":["concatChildren","childrenArguments","reduce","accumulator","children","i","Children","forEach","child","j","key","join","push","switchChildrenNodeName","nodeName","map","elt","index","valueOf","childrenProp","props"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AAJA;AACA;AACA;AACA;;AAiCA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,cAAT,GAAgD;AAAA,oCAApBC,iBAAoB;AAApBA,IAAAA,iBAAoB;AAAA;;AACtD,SAAOA,iBAAiB,CAACC,MAAlB,CAA0B,CAAEC,WAAF,EAAeC,QAAf,EAAyBC,CAAzB,KAAgC;AAChEC,oBAASC,OAAT,CAAkBH,QAAlB,EAA4B,CAAEI,KAAF,EAASC,CAAT,KAAgB;AAC3C,UAAKD,KAAK,IAAI,aAAa,OAAOA,KAAlC,EAA0C;AACzCA,QAAAA,KAAK,GAAG,yBAAcA,KAAd,EAAqB;AAC5BE,UAAAA,GAAG,EAAE,CAAEL,CAAF,EAAKI,CAAL,EAASE,IAAT;AADuB,SAArB,CAAR;AAGA;;AAEDR,MAAAA,WAAW,CAACS,IAAZ,CAAkBJ,KAAlB;AACA,KARD;;AAUA,WAAOL,WAAP;AACA,GAZM,EAYJ,EAZI,CAAP;AAaA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASU,sBAAT,CAAiCT,QAAjC,EAA2CU,QAA3C,EAAsD;AAC5D,SACCV,QAAQ,IACRE,gBAASS,GAAT,CAAcX,QAAd,EAAwB,CAAEY,GAAF,EAAOC,KAAP,KAAkB;AACzC,QAAK,QAAOD,GAAP,aAAOA,GAAP,uBAAOA,GAAG,CAAEE,OAAL,EAAP,MAA0B,QAA/B,EAA0C;AACzC,aAAO,0BAAeJ,QAAf,EAAyB;AAAEJ,QAAAA,GAAG,EAAEO;AAAP,OAAzB,EAAyCD,GAAzC,CAAP;AACA;;AACD,UAAM;AAAEZ,MAAAA,QAAQ,EAAEe,YAAZ;AAA0B,SAAGC;AAA7B,QAAuCJ,GAAG,CAACI,KAAjD;AACA,WAAO,0BACNN,QADM,EAEN;AAAEJ,MAAAA,GAAG,EAAEO,KAAP;AAAc,SAAGG;AAAjB,KAFM,EAGND,YAHM,CAAP;AAKA,GAVD,CAFD;AAcA","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line @typescript-eslint/no-restricted-imports\nimport {\n\tChildren,\n\tcloneElement,\n\tComponent,\n\tcreateContext,\n\tcreateElement,\n\tcreateRef,\n\tforwardRef,\n\tFragment,\n\tisValidElement,\n\tmemo,\n\tStrictMode,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tuseDeferredValue,\n\tuseEffect,\n\tuseId,\n\tuseMemo,\n\tuseImperativeHandle,\n\tuseInsertionEffect,\n\tuseLayoutEffect,\n\tuseReducer,\n\tuseRef,\n\tuseState,\n\tuseSyncExternalStore,\n\tuseTransition,\n\tstartTransition,\n\tlazy,\n\tSuspense,\n} from 'react';\n\n/**\n * Object containing a React element.\n *\n * @typedef {import('react').ReactElement} WPElement\n */\n\n/**\n * Object containing a React component.\n *\n * @typedef {import('react').ComponentType} WPComponent\n */\n\n/**\n * Object containing a React synthetic event.\n *\n * @typedef {import('react').SyntheticEvent} WPSyntheticEvent\n */\n\n/**\n * Object that provides utilities for dealing with React children.\n */\nexport { Children };\n\n/**\n * Creates a copy of an element with extended props.\n *\n * @param {WPElement} element Element\n * @param {?Object} props Props to apply to cloned element\n *\n * @return {WPElement} Cloned element.\n */\nexport { cloneElement };\n\n/**\n * A base class to create WordPress Components (Refs, state and lifecycle hooks)\n */\nexport { Component };\n\n/**\n * Creates a context object containing two components: a provider and consumer.\n *\n * @param {Object} defaultValue A default data stored in the context.\n *\n * @return {Object} Context object.\n */\nexport { createContext };\n\n/**\n * Returns a new element of given type. Type can be either a string tag name or\n * another function which itself returns an element.\n *\n * @param {?(string|Function)} type Tag name or element creator\n * @param {Object} props Element properties, either attribute\n * set to apply to DOM node or values to\n * pass through to element creator\n * @param {...WPElement} children Descendant elements\n *\n * @return {WPElement} Element.\n */\nexport { createElement };\n\n/**\n * Returns an object tracking a reference to a rendered element via its\n * `current` property as either a DOMElement or Element, dependent upon the\n * type of element rendered with the ref attribute.\n *\n * @return {Object} Ref object.\n */\nexport { createRef };\n\n/**\n * Component enhancer used to enable passing a ref to its wrapped component.\n * Pass a function argument which receives `props` and `ref` as its arguments,\n * returning an element using the forwarded ref. The return value is a new\n * component which forwards its ref.\n *\n * @param {Function} forwarder Function passed `props` and `ref`, expected to\n * return an element.\n *\n * @return {WPComponent} Enhanced component.\n */\nexport { forwardRef };\n\n/**\n * A component which renders its children without any wrapping element.\n */\nexport { Fragment };\n\n/**\n * Checks if an object is a valid WPElement.\n *\n * @param {Object} objectToCheck The object to be checked.\n *\n * @return {boolean} true if objectToTest is a valid WPElement and false otherwise.\n */\nexport { isValidElement };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#reactmemo\n */\nexport { memo };\n\n/**\n * Component that activates additional checks and warnings for its descendants.\n */\nexport { StrictMode };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usecallback\n */\nexport { useCallback };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usecontext\n */\nexport { useContext };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue\n */\nexport { useDebugValue };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usedeferredvalue\n */\nexport { useDeferredValue };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useeffect\n */\nexport { useEffect };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useid\n */\nexport { useId };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle\n */\nexport { useImperativeHandle };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useinsertioneffect\n */\nexport { useInsertionEffect };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */\nexport { useLayoutEffect };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usememo\n */\nexport { useMemo };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usereducer\n */\nexport { useReducer };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n */\nexport { useRef };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usestate\n */\nexport { useState };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore\n */\nexport { useSyncExternalStore };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usetransition\n */\nexport { useTransition };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#starttransition\n */\nexport { startTransition };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#reactlazy\n */\nexport { lazy };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#reactsuspense\n */\nexport { Suspense };\n\n/**\n * Concatenate two or more React children objects.\n *\n * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate.\n *\n * @return {Array} The concatenated value.\n */\nexport function concatChildren( ...childrenArguments ) {\n\treturn childrenArguments.reduce( ( accumulator, children, i ) => {\n\t\tChildren.forEach( children, ( child, j ) => {\n\t\t\tif ( child && 'string' !== typeof child ) {\n\t\t\t\tchild = cloneElement( child, {\n\t\t\t\t\tkey: [ i, j ].join(),\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\taccumulator.push( child );\n\t\t} );\n\n\t\treturn accumulator;\n\t}, [] );\n}\n\n/**\n * Switches the nodeName of all the elements in the children object.\n *\n * @param {?Object} children Children object.\n * @param {string} nodeName Node name.\n *\n * @return {?Object} The updated children object.\n */\nexport function switchChildrenNodeName( children, nodeName ) {\n\treturn (\n\t\tchildren &&\n\t\tChildren.map( children, ( elt, index ) => {\n\t\t\tif ( typeof elt?.valueOf() === 'string' ) {\n\t\t\t\treturn createElement( nodeName, { key: index }, elt );\n\t\t\t}\n\t\t\tconst { children: childrenProp, ...props } = elt.props;\n\t\t\treturn createElement(\n\t\t\t\tnodeName,\n\t\t\t\t{ key: index, ...props },\n\t\t\t\tchildrenProp\n\t\t\t);\n\t\t} )\n\t);\n}\n"]}
@@ -2,6 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import { createPortal, findDOMNode, render, hydrate, unmountComponentAtNode } from 'react-dom';
5
+ import { createRoot, hydrateRoot } from 'react-dom/client';
5
6
  /**
6
7
  * Creates a portal into which a component can be rendered.
7
8
  *
@@ -36,6 +37,20 @@ export { render };
36
37
  */
37
38
 
38
39
  export { hydrate };
40
+ /**
41
+ * Creates a new React root for the target DOM node.
42
+ *
43
+ * @see https://reactjs.org/docs/react-dom-client.html#createroot
44
+ */
45
+
46
+ export { createRoot };
47
+ /**
48
+ * Creates a new React root for the target DOM node and hydrates it with a pre-generated markup.
49
+ *
50
+ * @see https://reactjs.org/docs/react-dom-client.html#hydrateroot
51
+ */
52
+
53
+ export { hydrateRoot };
39
54
  /**
40
55
  * Removes any mounted element from the target DOM node.
41
56
  *
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/element/src/react-platform.js"],"names":["createPortal","findDOMNode","render","hydrate","unmountComponentAtNode"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,YADD,EAECC,WAFD,EAGCC,MAHD,EAICC,OAJD,EAKCC,sBALD,QAMO,WANP;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASJ,YAAT;AAEA;AACA;AACA;AACA;AACA;;AACA,SAASC,WAAT;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,MAAT;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,OAAT;AAEA;AACA;AACA;AACA;AACA;;AACA,SAASC,sBAAT","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tcreatePortal,\n\tfindDOMNode,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n} from 'react-dom';\n\n/**\n * Creates a portal into which a component can be rendered.\n *\n * @see https://github.com/facebook/react/issues/10309#issuecomment-318433235\n *\n * @param {import('./react').WPElement} child Any renderable child, such as an element,\n * string, or fragment.\n * @param {HTMLElement} container DOM node into which element should be rendered.\n */\nexport { createPortal };\n\n/**\n * Finds the dom node of a React component.\n *\n * @param {import('./react').WPComponent} component Component's instance.\n */\nexport { findDOMNode };\n\n/**\n * Renders a given element into the target DOM node.\n *\n * @param {import('./react').WPElement} element Element to render.\n * @param {HTMLElement} target DOM node into which element should be rendered.\n */\nexport { render };\n\n/**\n * Hydrates a given element into the target DOM node.\n *\n * @param {import('./react').WPElement} element Element to hydrate.\n * @param {HTMLElement} target DOM node into which element should be hydrated.\n */\nexport { hydrate };\n\n/**\n * Removes any mounted element from the target DOM node.\n *\n * @param {Element} target DOM node in which element is to be removed\n */\nexport { unmountComponentAtNode };\n"]}
1
+ {"version":3,"sources":["@wordpress/element/src/react-platform.js"],"names":["createPortal","findDOMNode","render","hydrate","unmountComponentAtNode","createRoot","hydrateRoot"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,YADD,EAECC,WAFD,EAGCC,MAHD,EAICC,OAJD,EAKCC,sBALD,QAMO,WANP;AAOA,SAASC,UAAT,EAAqBC,WAArB,QAAwC,kBAAxC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASN,YAAT;AAEA;AACA;AACA;AACA;AACA;;AACA,SAASC,WAAT;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,MAAT;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,OAAT;AAEA;AACA;AACA;AACA;AACA;;AACA,SAASE,UAAT;AAEA;AACA;AACA;AACA;AACA;;AACA,SAASC,WAAT;AAEA;AACA;AACA;AACA;AACA;;AACA,SAASF,sBAAT","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tcreatePortal,\n\tfindDOMNode,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n} from 'react-dom';\nimport { createRoot, hydrateRoot } from 'react-dom/client';\n\n/**\n * Creates a portal into which a component can be rendered.\n *\n * @see https://github.com/facebook/react/issues/10309#issuecomment-318433235\n *\n * @param {import('./react').WPElement} child Any renderable child, such as an element,\n * string, or fragment.\n * @param {HTMLElement} container DOM node into which element should be rendered.\n */\nexport { createPortal };\n\n/**\n * Finds the dom node of a React component.\n *\n * @param {import('./react').WPComponent} component Component's instance.\n */\nexport { findDOMNode };\n\n/**\n * Renders a given element into the target DOM node.\n *\n * @param {import('./react').WPElement} element Element to render.\n * @param {HTMLElement} target DOM node into which element should be rendered.\n */\nexport { render };\n\n/**\n * Hydrates a given element into the target DOM node.\n *\n * @param {import('./react').WPElement} element Element to hydrate.\n * @param {HTMLElement} target DOM node into which element should be hydrated.\n */\nexport { hydrate };\n\n/**\n * Creates a new React root for the target DOM node.\n *\n * @see https://reactjs.org/docs/react-dom-client.html#createroot\n */\nexport { createRoot };\n\n/**\n * Creates a new React root for the target DOM node and hydrates it with a pre-generated markup.\n *\n * @see https://reactjs.org/docs/react-dom-client.html#hydrateroot\n */\nexport { hydrateRoot };\n\n/**\n * Removes any mounted element from the target DOM node.\n *\n * @param {Element} target DOM node in which element is to be removed\n */\nexport { unmountComponentAtNode };\n"]}
@@ -2,7 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  // eslint-disable-next-line @typescript-eslint/no-restricted-imports
5
- import { Children, cloneElement, Component, createContext, createElement, createRef, forwardRef, Fragment, isValidElement, memo, StrictMode, useState, useEffect, useContext, useReducer, useCallback, useMemo, useRef, useImperativeHandle, useLayoutEffect, useDebugValue, lazy, Suspense } from 'react';
5
+ import { Children, cloneElement, Component, createContext, createElement, createRef, forwardRef, Fragment, isValidElement, memo, StrictMode, useCallback, useContext, useDebugValue, useDeferredValue, useEffect, useId, useMemo, useImperativeHandle, useInsertionEffect, useLayoutEffect, useReducer, useRef, useState, useSyncExternalStore, useTransition, startTransition, lazy, Suspense } from 'react';
6
6
  /**
7
7
  * Object containing a React element.
8
8
  *
@@ -125,16 +125,31 @@ export { useContext };
125
125
  */
126
126
 
127
127
  export { useDebugValue };
128
+ /**
129
+ * @see https://reactjs.org/docs/hooks-reference.html#usedeferredvalue
130
+ */
131
+
132
+ export { useDeferredValue };
128
133
  /**
129
134
  * @see https://reactjs.org/docs/hooks-reference.html#useeffect
130
135
  */
131
136
 
132
137
  export { useEffect };
138
+ /**
139
+ * @see https://reactjs.org/docs/hooks-reference.html#useid
140
+ */
141
+
142
+ export { useId };
133
143
  /**
134
144
  * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle
135
145
  */
136
146
 
137
147
  export { useImperativeHandle };
148
+ /**
149
+ * @see https://reactjs.org/docs/hooks-reference.html#useinsertioneffect
150
+ */
151
+
152
+ export { useInsertionEffect };
138
153
  /**
139
154
  * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect
140
155
  */
@@ -160,6 +175,21 @@ export { useRef };
160
175
  */
161
176
 
162
177
  export { useState };
178
+ /**
179
+ * @see https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore
180
+ */
181
+
182
+ export { useSyncExternalStore };
183
+ /**
184
+ * @see https://reactjs.org/docs/hooks-reference.html#usetransition
185
+ */
186
+
187
+ export { useTransition };
188
+ /**
189
+ * @see https://reactjs.org/docs/react-api.html#starttransition
190
+ */
191
+
192
+ export { startTransition };
163
193
  /**
164
194
  * @see https://reactjs.org/docs/react-api.html#reactlazy
165
195
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/element/src/react.js"],"names":["Children","cloneElement","Component","createContext","createElement","createRef","forwardRef","Fragment","isValidElement","memo","StrictMode","useState","useEffect","useContext","useReducer","useCallback","useMemo","useRef","useImperativeHandle","useLayoutEffect","useDebugValue","lazy","Suspense","concatChildren","childrenArguments","reduce","accumulator","children","i","forEach","child","j","key","join","push","switchChildrenNodeName","nodeName","map","elt","index","valueOf","childrenProp","props"],"mappings":"AAAA;AACA;AACA;AACA;AACA,SACCA,QADD,EAECC,YAFD,EAGCC,SAHD,EAICC,aAJD,EAKCC,aALD,EAMCC,SAND,EAOCC,UAPD,EAQCC,QARD,EASCC,cATD,EAUCC,IAVD,EAWCC,UAXD,EAYCC,QAZD,EAaCC,SAbD,EAcCC,UAdD,EAeCC,UAfD,EAgBCC,WAhBD,EAiBCC,OAjBD,EAkBCC,MAlBD,EAmBCC,mBAnBD,EAoBCC,eApBD,EAqBCC,aArBD,EAsBCC,IAtBD,EAuBCC,QAvBD,QAwBO,OAxBP;AA0BA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AACA,SAAStB,QAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,YAAT;AAEA;AACA;AACA;;AACA,SAASC,SAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,aAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,aAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,SAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,UAAT;AAEA;AACA;AACA;;AACA,SAASC,QAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,cAAT;AAEA;AACA;AACA;;AACA,SAASC,IAAT;AAEA;AACA;AACA;;AACA,SAASC,UAAT;AAEA;AACA;AACA;;AACA,SAASK,WAAT;AAEA;AACA;AACA;;AACA,SAASF,UAAT;AAEA;AACA;AACA;;AACA,SAASO,aAAT;AAEA;AACA;AACA;;AACA,SAASR,SAAT;AAEA;AACA;AACA;;AACA,SAASM,mBAAT;AAEA;AACA;AACA;;AACA,SAASC,eAAT;AAEA;AACA;AACA;;AACA,SAASH,OAAT;AAEA;AACA;AACA;;AACA,SAASF,UAAT;AAEA;AACA;AACA;;AACA,SAASG,MAAT;AAEA;AACA;AACA;;AACA,SAASN,QAAT;AAEA;AACA;AACA;;AACA,SAASU,IAAT;AAEA;AACA;AACA;;AACA,SAASC,QAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,cAAT,GAAgD;AAAA,oCAApBC,iBAAoB;AAApBA,IAAAA,iBAAoB;AAAA;;AACtD,SAAOA,iBAAiB,CAACC,MAAlB,CAA0B,CAAEC,WAAF,EAAeC,QAAf,EAAyBC,CAAzB,KAAgC;AAChE5B,IAAAA,QAAQ,CAAC6B,OAAT,CAAkBF,QAAlB,EAA4B,CAAEG,KAAF,EAASC,CAAT,KAAgB;AAC3C,UAAKD,KAAK,IAAI,aAAa,OAAOA,KAAlC,EAA0C;AACzCA,QAAAA,KAAK,GAAG7B,YAAY,CAAE6B,KAAF,EAAS;AAC5BE,UAAAA,GAAG,EAAE,CAAEJ,CAAF,EAAKG,CAAL,EAASE,IAAT;AADuB,SAAT,CAApB;AAGA;;AAEDP,MAAAA,WAAW,CAACQ,IAAZ,CAAkBJ,KAAlB;AACA,KARD;AAUA,WAAOJ,WAAP;AACA,GAZM,EAYJ,EAZI,CAAP;AAaA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASS,sBAAT,CAAiCR,QAAjC,EAA2CS,QAA3C,EAAsD;AAC5D,SACCT,QAAQ,IACR3B,QAAQ,CAACqC,GAAT,CAAcV,QAAd,EAAwB,CAAEW,GAAF,EAAOC,KAAP,KAAkB;AACzC,QAAK,QAAOD,GAAP,aAAOA,GAAP,uBAAOA,GAAG,CAAEE,OAAL,EAAP,MAA0B,QAA/B,EAA0C;AACzC,aAAOpC,aAAa,CAAEgC,QAAF,EAAY;AAAEJ,QAAAA,GAAG,EAAEO;AAAP,OAAZ,EAA4BD,GAA5B,CAApB;AACA;;AACD,UAAM;AAAEX,MAAAA,QAAQ,EAAEc,YAAZ;AAA0B,SAAGC;AAA7B,QAAuCJ,GAAG,CAACI,KAAjD;AACA,WAAOtC,aAAa,CACnBgC,QADmB,EAEnB;AAAEJ,MAAAA,GAAG,EAAEO,KAAP;AAAc,SAAGG;AAAjB,KAFmB,EAGnBD,YAHmB,CAApB;AAKA,GAVD,CAFD;AAcA","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line @typescript-eslint/no-restricted-imports\nimport {\n\tChildren,\n\tcloneElement,\n\tComponent,\n\tcreateContext,\n\tcreateElement,\n\tcreateRef,\n\tforwardRef,\n\tFragment,\n\tisValidElement,\n\tmemo,\n\tStrictMode,\n\tuseState,\n\tuseEffect,\n\tuseContext,\n\tuseReducer,\n\tuseCallback,\n\tuseMemo,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseLayoutEffect,\n\tuseDebugValue,\n\tlazy,\n\tSuspense,\n} from 'react';\n\n/**\n * Object containing a React element.\n *\n * @typedef {import('react').ReactElement} WPElement\n */\n\n/**\n * Object containing a React component.\n *\n * @typedef {import('react').ComponentType} WPComponent\n */\n\n/**\n * Object containing a React synthetic event.\n *\n * @typedef {import('react').SyntheticEvent} WPSyntheticEvent\n */\n\n/**\n * Object that provides utilities for dealing with React children.\n */\nexport { Children };\n\n/**\n * Creates a copy of an element with extended props.\n *\n * @param {WPElement} element Element\n * @param {?Object} props Props to apply to cloned element\n *\n * @return {WPElement} Cloned element.\n */\nexport { cloneElement };\n\n/**\n * A base class to create WordPress Components (Refs, state and lifecycle hooks)\n */\nexport { Component };\n\n/**\n * Creates a context object containing two components: a provider and consumer.\n *\n * @param {Object} defaultValue A default data stored in the context.\n *\n * @return {Object} Context object.\n */\nexport { createContext };\n\n/**\n * Returns a new element of given type. Type can be either a string tag name or\n * another function which itself returns an element.\n *\n * @param {?(string|Function)} type Tag name or element creator\n * @param {Object} props Element properties, either attribute\n * set to apply to DOM node or values to\n * pass through to element creator\n * @param {...WPElement} children Descendant elements\n *\n * @return {WPElement} Element.\n */\nexport { createElement };\n\n/**\n * Returns an object tracking a reference to a rendered element via its\n * `current` property as either a DOMElement or Element, dependent upon the\n * type of element rendered with the ref attribute.\n *\n * @return {Object} Ref object.\n */\nexport { createRef };\n\n/**\n * Component enhancer used to enable passing a ref to its wrapped component.\n * Pass a function argument which receives `props` and `ref` as its arguments,\n * returning an element using the forwarded ref. The return value is a new\n * component which forwards its ref.\n *\n * @param {Function} forwarder Function passed `props` and `ref`, expected to\n * return an element.\n *\n * @return {WPComponent} Enhanced component.\n */\nexport { forwardRef };\n\n/**\n * A component which renders its children without any wrapping element.\n */\nexport { Fragment };\n\n/**\n * Checks if an object is a valid WPElement.\n *\n * @param {Object} objectToCheck The object to be checked.\n *\n * @return {boolean} true if objectToTest is a valid WPElement and false otherwise.\n */\nexport { isValidElement };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#reactmemo\n */\nexport { memo };\n\n/**\n * Component that activates additional checks and warnings for its descendants.\n */\nexport { StrictMode };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usecallback\n */\nexport { useCallback };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usecontext\n */\nexport { useContext };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue\n */\nexport { useDebugValue };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useeffect\n */\nexport { useEffect };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle\n */\nexport { useImperativeHandle };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */\nexport { useLayoutEffect };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usememo\n */\nexport { useMemo };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usereducer\n */\nexport { useReducer };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n */\nexport { useRef };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usestate\n */\nexport { useState };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#reactlazy\n */\nexport { lazy };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#reactsuspense\n */\nexport { Suspense };\n\n/**\n * Concatenate two or more React children objects.\n *\n * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate.\n *\n * @return {Array} The concatenated value.\n */\nexport function concatChildren( ...childrenArguments ) {\n\treturn childrenArguments.reduce( ( accumulator, children, i ) => {\n\t\tChildren.forEach( children, ( child, j ) => {\n\t\t\tif ( child && 'string' !== typeof child ) {\n\t\t\t\tchild = cloneElement( child, {\n\t\t\t\t\tkey: [ i, j ].join(),\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\taccumulator.push( child );\n\t\t} );\n\n\t\treturn accumulator;\n\t}, [] );\n}\n\n/**\n * Switches the nodeName of all the elements in the children object.\n *\n * @param {?Object} children Children object.\n * @param {string} nodeName Node name.\n *\n * @return {?Object} The updated children object.\n */\nexport function switchChildrenNodeName( children, nodeName ) {\n\treturn (\n\t\tchildren &&\n\t\tChildren.map( children, ( elt, index ) => {\n\t\t\tif ( typeof elt?.valueOf() === 'string' ) {\n\t\t\t\treturn createElement( nodeName, { key: index }, elt );\n\t\t\t}\n\t\t\tconst { children: childrenProp, ...props } = elt.props;\n\t\t\treturn createElement(\n\t\t\t\tnodeName,\n\t\t\t\t{ key: index, ...props },\n\t\t\t\tchildrenProp\n\t\t\t);\n\t\t} )\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/element/src/react.js"],"names":["Children","cloneElement","Component","createContext","createElement","createRef","forwardRef","Fragment","isValidElement","memo","StrictMode","useCallback","useContext","useDebugValue","useDeferredValue","useEffect","useId","useMemo","useImperativeHandle","useInsertionEffect","useLayoutEffect","useReducer","useRef","useState","useSyncExternalStore","useTransition","startTransition","lazy","Suspense","concatChildren","childrenArguments","reduce","accumulator","children","i","forEach","child","j","key","join","push","switchChildrenNodeName","nodeName","map","elt","index","valueOf","childrenProp","props"],"mappings":"AAAA;AACA;AACA;AACA;AACA,SACCA,QADD,EAECC,YAFD,EAGCC,SAHD,EAICC,aAJD,EAKCC,aALD,EAMCC,SAND,EAOCC,UAPD,EAQCC,QARD,EASCC,cATD,EAUCC,IAVD,EAWCC,UAXD,EAYCC,WAZD,EAaCC,UAbD,EAcCC,aAdD,EAeCC,gBAfD,EAgBCC,SAhBD,EAiBCC,KAjBD,EAkBCC,OAlBD,EAmBCC,mBAnBD,EAoBCC,kBApBD,EAqBCC,eArBD,EAsBCC,UAtBD,EAuBCC,MAvBD,EAwBCC,QAxBD,EAyBCC,oBAzBD,EA0BCC,aA1BD,EA2BCC,eA3BD,EA4BCC,IA5BD,EA6BCC,QA7BD,QA8BO,OA9BP;AAgCA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AACA,SAAS5B,QAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,YAAT;AAEA;AACA;AACA;;AACA,SAASC,SAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,aAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,aAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,SAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,UAAT;AAEA;AACA;AACA;;AACA,SAASC,QAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,cAAT;AAEA;AACA;AACA;;AACA,SAASC,IAAT;AAEA;AACA;AACA;;AACA,SAASC,UAAT;AAEA;AACA;AACA;;AACA,SAASC,WAAT;AAEA;AACA;AACA;;AACA,SAASC,UAAT;AAEA;AACA;AACA;;AACA,SAASC,aAAT;AAEA;AACA;AACA;;AACA,SAASC,gBAAT;AAEA;AACA;AACA;;AACA,SAASC,SAAT;AAEA;AACA;AACA;;AACA,SAASC,KAAT;AAEA;AACA;AACA;;AACA,SAASE,mBAAT;AAEA;AACA;AACA;;AACA,SAASC,kBAAT;AAEA;AACA;AACA;;AACA,SAASC,eAAT;AAEA;AACA;AACA;;AACA,SAASH,OAAT;AAEA;AACA;AACA;;AACA,SAASI,UAAT;AAEA;AACA;AACA;;AACA,SAASC,MAAT;AAEA;AACA;AACA;;AACA,SAASC,QAAT;AAEA;AACA;AACA;;AACA,SAASC,oBAAT;AAEA;AACA;AACA;;AACA,SAASC,aAAT;AAEA;AACA;AACA;;AACA,SAASC,eAAT;AAEA;AACA;AACA;;AACA,SAASC,IAAT;AAEA;AACA;AACA;;AACA,SAASC,QAAT;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,cAAT,GAAgD;AAAA,oCAApBC,iBAAoB;AAApBA,IAAAA,iBAAoB;AAAA;;AACtD,SAAOA,iBAAiB,CAACC,MAAlB,CAA0B,CAAEC,WAAF,EAAeC,QAAf,EAAyBC,CAAzB,KAAgC;AAChElC,IAAAA,QAAQ,CAACmC,OAAT,CAAkBF,QAAlB,EAA4B,CAAEG,KAAF,EAASC,CAAT,KAAgB;AAC3C,UAAKD,KAAK,IAAI,aAAa,OAAOA,KAAlC,EAA0C;AACzCA,QAAAA,KAAK,GAAGnC,YAAY,CAAEmC,KAAF,EAAS;AAC5BE,UAAAA,GAAG,EAAE,CAAEJ,CAAF,EAAKG,CAAL,EAASE,IAAT;AADuB,SAAT,CAApB;AAGA;;AAEDP,MAAAA,WAAW,CAACQ,IAAZ,CAAkBJ,KAAlB;AACA,KARD;AAUA,WAAOJ,WAAP;AACA,GAZM,EAYJ,EAZI,CAAP;AAaA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASS,sBAAT,CAAiCR,QAAjC,EAA2CS,QAA3C,EAAsD;AAC5D,SACCT,QAAQ,IACRjC,QAAQ,CAAC2C,GAAT,CAAcV,QAAd,EAAwB,CAAEW,GAAF,EAAOC,KAAP,KAAkB;AACzC,QAAK,QAAOD,GAAP,aAAOA,GAAP,uBAAOA,GAAG,CAAEE,OAAL,EAAP,MAA0B,QAA/B,EAA0C;AACzC,aAAO1C,aAAa,CAAEsC,QAAF,EAAY;AAAEJ,QAAAA,GAAG,EAAEO;AAAP,OAAZ,EAA4BD,GAA5B,CAApB;AACA;;AACD,UAAM;AAAEX,MAAAA,QAAQ,EAAEc,YAAZ;AAA0B,SAAGC;AAA7B,QAAuCJ,GAAG,CAACI,KAAjD;AACA,WAAO5C,aAAa,CACnBsC,QADmB,EAEnB;AAAEJ,MAAAA,GAAG,EAAEO,KAAP;AAAc,SAAGG;AAAjB,KAFmB,EAGnBD,YAHmB,CAApB;AAKA,GAVD,CAFD;AAcA","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line @typescript-eslint/no-restricted-imports\nimport {\n\tChildren,\n\tcloneElement,\n\tComponent,\n\tcreateContext,\n\tcreateElement,\n\tcreateRef,\n\tforwardRef,\n\tFragment,\n\tisValidElement,\n\tmemo,\n\tStrictMode,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tuseDeferredValue,\n\tuseEffect,\n\tuseId,\n\tuseMemo,\n\tuseImperativeHandle,\n\tuseInsertionEffect,\n\tuseLayoutEffect,\n\tuseReducer,\n\tuseRef,\n\tuseState,\n\tuseSyncExternalStore,\n\tuseTransition,\n\tstartTransition,\n\tlazy,\n\tSuspense,\n} from 'react';\n\n/**\n * Object containing a React element.\n *\n * @typedef {import('react').ReactElement} WPElement\n */\n\n/**\n * Object containing a React component.\n *\n * @typedef {import('react').ComponentType} WPComponent\n */\n\n/**\n * Object containing a React synthetic event.\n *\n * @typedef {import('react').SyntheticEvent} WPSyntheticEvent\n */\n\n/**\n * Object that provides utilities for dealing with React children.\n */\nexport { Children };\n\n/**\n * Creates a copy of an element with extended props.\n *\n * @param {WPElement} element Element\n * @param {?Object} props Props to apply to cloned element\n *\n * @return {WPElement} Cloned element.\n */\nexport { cloneElement };\n\n/**\n * A base class to create WordPress Components (Refs, state and lifecycle hooks)\n */\nexport { Component };\n\n/**\n * Creates a context object containing two components: a provider and consumer.\n *\n * @param {Object} defaultValue A default data stored in the context.\n *\n * @return {Object} Context object.\n */\nexport { createContext };\n\n/**\n * Returns a new element of given type. Type can be either a string tag name or\n * another function which itself returns an element.\n *\n * @param {?(string|Function)} type Tag name or element creator\n * @param {Object} props Element properties, either attribute\n * set to apply to DOM node or values to\n * pass through to element creator\n * @param {...WPElement} children Descendant elements\n *\n * @return {WPElement} Element.\n */\nexport { createElement };\n\n/**\n * Returns an object tracking a reference to a rendered element via its\n * `current` property as either a DOMElement or Element, dependent upon the\n * type of element rendered with the ref attribute.\n *\n * @return {Object} Ref object.\n */\nexport { createRef };\n\n/**\n * Component enhancer used to enable passing a ref to its wrapped component.\n * Pass a function argument which receives `props` and `ref` as its arguments,\n * returning an element using the forwarded ref. The return value is a new\n * component which forwards its ref.\n *\n * @param {Function} forwarder Function passed `props` and `ref`, expected to\n * return an element.\n *\n * @return {WPComponent} Enhanced component.\n */\nexport { forwardRef };\n\n/**\n * A component which renders its children without any wrapping element.\n */\nexport { Fragment };\n\n/**\n * Checks if an object is a valid WPElement.\n *\n * @param {Object} objectToCheck The object to be checked.\n *\n * @return {boolean} true if objectToTest is a valid WPElement and false otherwise.\n */\nexport { isValidElement };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#reactmemo\n */\nexport { memo };\n\n/**\n * Component that activates additional checks and warnings for its descendants.\n */\nexport { StrictMode };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usecallback\n */\nexport { useCallback };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usecontext\n */\nexport { useContext };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue\n */\nexport { useDebugValue };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usedeferredvalue\n */\nexport { useDeferredValue };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useeffect\n */\nexport { useEffect };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useid\n */\nexport { useId };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle\n */\nexport { useImperativeHandle };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useinsertioneffect\n */\nexport { useInsertionEffect };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */\nexport { useLayoutEffect };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usememo\n */\nexport { useMemo };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usereducer\n */\nexport { useReducer };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n */\nexport { useRef };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usestate\n */\nexport { useState };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore\n */\nexport { useSyncExternalStore };\n\n/**\n * @see https://reactjs.org/docs/hooks-reference.html#usetransition\n */\nexport { useTransition };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#starttransition\n */\nexport { startTransition };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#reactlazy\n */\nexport { lazy };\n\n/**\n * @see https://reactjs.org/docs/react-api.html#reactsuspense\n */\nexport { Suspense };\n\n/**\n * Concatenate two or more React children objects.\n *\n * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate.\n *\n * @return {Array} The concatenated value.\n */\nexport function concatChildren( ...childrenArguments ) {\n\treturn childrenArguments.reduce( ( accumulator, children, i ) => {\n\t\tChildren.forEach( children, ( child, j ) => {\n\t\t\tif ( child && 'string' !== typeof child ) {\n\t\t\t\tchild = cloneElement( child, {\n\t\t\t\t\tkey: [ i, j ].join(),\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\taccumulator.push( child );\n\t\t} );\n\n\t\treturn accumulator;\n\t}, [] );\n}\n\n/**\n * Switches the nodeName of all the elements in the children object.\n *\n * @param {?Object} children Children object.\n * @param {string} nodeName Node name.\n *\n * @return {?Object} The updated children object.\n */\nexport function switchChildrenNodeName( children, nodeName ) {\n\treturn (\n\t\tchildren &&\n\t\tChildren.map( children, ( elt, index ) => {\n\t\t\tif ( typeof elt?.valueOf() === 'string' ) {\n\t\t\t\treturn createElement( nodeName, { key: index }, elt );\n\t\t\t}\n\t\t\tconst { children: childrenProp, ...props } = elt.props;\n\t\t\treturn createElement(\n\t\t\t\tnodeName,\n\t\t\t\t{ key: index, ...props },\n\t\t\t\tchildrenProp\n\t\t\t);\n\t\t} )\n\t);\n}\n"]}
@@ -2,6 +2,8 @@ import { createPortal } from "react-dom";
2
2
  import { findDOMNode } from "react-dom";
3
3
  import { render } from "react-dom";
4
4
  import { hydrate } from "react-dom";
5
+ import { createRoot } from "react-dom/client";
6
+ import { hydrateRoot } from "react-dom/client";
5
7
  import { unmountComponentAtNode } from "react-dom";
6
- export { createPortal, findDOMNode, render, hydrate, unmountComponentAtNode };
8
+ export { createPortal, findDOMNode, render, hydrate, createRoot, hydrateRoot, unmountComponentAtNode };
7
9
  //# sourceMappingURL=react-platform.d.ts.map
@@ -41,14 +41,20 @@ import { StrictMode } from "react";
41
41
  import { useCallback } from "react";
42
42
  import { useContext } from "react";
43
43
  import { useDebugValue } from "react";
44
+ import { useDeferredValue } from "react";
44
45
  import { useEffect } from "react";
46
+ import { useId } from "react";
45
47
  import { useImperativeHandle } from "react";
48
+ import { useInsertionEffect } from "react";
46
49
  import { useLayoutEffect } from "react";
47
50
  import { useMemo } from "react";
48
51
  import { useReducer } from "react";
49
52
  import { useRef } from "react";
50
53
  import { useState } from "react";
54
+ import { useSyncExternalStore } from "react";
55
+ import { useTransition } from "react";
56
+ import { startTransition } from "react";
51
57
  import { lazy } from "react";
52
58
  import { Suspense } from "react";
53
- export { Children, cloneElement, Component, createContext, createElement, createRef, forwardRef, Fragment, isValidElement, memo, StrictMode, useCallback, useContext, useDebugValue, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, lazy, Suspense };
59
+ export { Children, cloneElement, Component, createContext, createElement, createRef, forwardRef, Fragment, isValidElement, memo, StrictMode, useCallback, useContext, useDebugValue, useDeferredValue, useEffect, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore, useTransition, startTransition, lazy, Suspense };
54
60
  //# sourceMappingURL=react.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.js"],"names":[],"mappings":"AAqMA;;;;;;GAMG;AACH,4EAcC;AAED;;;;;;;GAOG;AACH,uEAJW,MAAM,cAmBhB;;;;wBAlNY,OAAO,OAAO,EAAE,YAAY;;;;0BAM5B,OAAO,OAAO,EAAE,aAAa;;;;+BAM7B,OAAO,OAAO,EAAE,cAAc"}
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.js"],"names":[],"mappings":"AAyOA;;;;;;GAMG;AACH,4EAcC;AAED;;;;;;;GAOG;AACH,uEAJW,MAAM,cAmBhB;;;;wBAhPY,OAAO,OAAO,EAAE,YAAY;;;;0BAM5B,OAAO,OAAO,EAAE,aAAa;;;;+BAM7B,OAAO,OAAO,EAAE,cAAc"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/element",
3
- "version": "4.20.0",
3
+ "version": "5.1.0",
4
4
  "description": "Element React module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -29,16 +29,16 @@
29
29
  "sideEffects": false,
30
30
  "dependencies": {
31
31
  "@babel/runtime": "^7.16.0",
32
- "@types/react": "^17.0.37",
33
- "@types/react-dom": "^17.0.11",
34
- "@wordpress/escape-html": "^2.22.0",
32
+ "@types/react": "^18.0.21",
33
+ "@types/react-dom": "^18.0.6",
34
+ "@wordpress/escape-html": "^2.24.0",
35
35
  "change-case": "^4.1.2",
36
36
  "is-plain-object": "^5.0.0",
37
- "react": "^17.0.2",
38
- "react-dom": "^17.0.2"
37
+ "react": "^18.2.0",
38
+ "react-dom": "^18.2.0"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "7ac04f446242452d3cb24372f9ca58f0cae97715"
43
+ "gitHead": "200bee7b06b15f6fa655e25b6ab69cbd6b49a357"
44
44
  }
@@ -8,6 +8,7 @@ import {
8
8
  hydrate,
9
9
  unmountComponentAtNode,
10
10
  } from 'react-dom';
11
+ import { createRoot, hydrateRoot } from 'react-dom/client';
11
12
 
12
13
  /**
13
14
  * Creates a portal into which a component can be rendered.
@@ -43,6 +44,20 @@ export { render };
43
44
  */
44
45
  export { hydrate };
45
46
 
47
+ /**
48
+ * Creates a new React root for the target DOM node.
49
+ *
50
+ * @see https://reactjs.org/docs/react-dom-client.html#createroot
51
+ */
52
+ export { createRoot };
53
+
54
+ /**
55
+ * Creates a new React root for the target DOM node and hydrates it with a pre-generated markup.
56
+ *
57
+ * @see https://reactjs.org/docs/react-dom-client.html#hydrateroot
58
+ */
59
+ export { hydrateRoot };
60
+
46
61
  /**
47
62
  * Removes any mounted element from the target DOM node.
48
63
  *
package/src/react.js CHANGED
@@ -14,16 +14,22 @@ import {
14
14
  isValidElement,
15
15
  memo,
16
16
  StrictMode,
17
- useState,
18
- useEffect,
19
- useContext,
20
- useReducer,
21
17
  useCallback,
18
+ useContext,
19
+ useDebugValue,
20
+ useDeferredValue,
21
+ useEffect,
22
+ useId,
22
23
  useMemo,
23
- useRef,
24
24
  useImperativeHandle,
25
+ useInsertionEffect,
25
26
  useLayoutEffect,
26
- useDebugValue,
27
+ useReducer,
28
+ useRef,
29
+ useState,
30
+ useSyncExternalStore,
31
+ useTransition,
32
+ startTransition,
27
33
  lazy,
28
34
  Suspense,
29
35
  } from 'react';
@@ -150,16 +156,31 @@ export { useContext };
150
156
  */
151
157
  export { useDebugValue };
152
158
 
159
+ /**
160
+ * @see https://reactjs.org/docs/hooks-reference.html#usedeferredvalue
161
+ */
162
+ export { useDeferredValue };
163
+
153
164
  /**
154
165
  * @see https://reactjs.org/docs/hooks-reference.html#useeffect
155
166
  */
156
167
  export { useEffect };
157
168
 
169
+ /**
170
+ * @see https://reactjs.org/docs/hooks-reference.html#useid
171
+ */
172
+ export { useId };
173
+
158
174
  /**
159
175
  * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle
160
176
  */
161
177
  export { useImperativeHandle };
162
178
 
179
+ /**
180
+ * @see https://reactjs.org/docs/hooks-reference.html#useinsertioneffect
181
+ */
182
+ export { useInsertionEffect };
183
+
163
184
  /**
164
185
  * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect
165
186
  */
@@ -185,6 +206,21 @@ export { useRef };
185
206
  */
186
207
  export { useState };
187
208
 
209
+ /**
210
+ * @see https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore
211
+ */
212
+ export { useSyncExternalStore };
213
+
214
+ /**
215
+ * @see https://reactjs.org/docs/hooks-reference.html#usetransition
216
+ */
217
+ export { useTransition };
218
+
219
+ /**
220
+ * @see https://reactjs.org/docs/react-api.html#starttransition
221
+ */
222
+ export { startTransition };
223
+
188
224
  /**
189
225
  * @see https://reactjs.org/docs/react-api.html#reactlazy
190
226
  */
@@ -209,15 +209,13 @@ describe( 'createInterpolateElement', () => {
209
209
  };
210
210
  const { container, rerender } = render( <TestComponent switchKey /> );
211
211
 
212
- expect( container.firstChild ).toContainHTML( '<em>string!</em>' );
213
- expect( container.firstChild ).not.toContainHTML( '<strong>' );
212
+ expect( container ).toContainHTML( '<em>string!</em>' );
213
+ expect( container ).not.toContainHTML( '<strong>' );
214
214
 
215
215
  rerender( <TestComponent switchKey={ false } /> );
216
216
 
217
- expect( container.firstChild ).toContainHTML(
218
- '<strong>string!</strong>'
219
- );
220
- expect( container.firstChild ).not.toContainHTML( '<em>' );
217
+ expect( container ).toContainHTML( '<strong>string!</strong>' );
218
+ expect( container ).not.toContainHTML( '<em>' );
221
219
  } );
222
220
  it( 'handles parsing emojii correctly', () => {
223
221
  const testString = '👳‍♀️<icon>🚨🤷‍♂️⛈️fully</icon> here';
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","./src/react.js","./src/create-interpolate-element.js","../../node_modules/@types/react-dom/index.d.ts","./src/react-platform.js","./src/utils.js","./src/platform.js","../../node_modules/is-plain-object/is-plain-object.d.ts","../../node_modules/no-case/dist/index.d.ts","../../node_modules/pascal-case/dist/index.d.ts","../../node_modules/camel-case/dist/index.d.ts","../../node_modules/capital-case/dist/index.d.ts","../../node_modules/constant-case/dist/index.d.ts","../../node_modules/dot-case/dist/index.d.ts","../../node_modules/header-case/dist/index.d.ts","../../node_modules/param-case/dist/index.d.ts","../../node_modules/path-case/dist/index.d.ts","../../node_modules/sentence-case/dist/index.d.ts","../../node_modules/snake-case/dist/index.d.ts","../../node_modules/change-case/dist/index.d.ts","../escape-html/build-types/index.d.ts","./src/raw-html.js","./src/serialize.js","./src/index.js"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},{"version":"ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"1bc82f5b3bb93df76d19730c84467b0b346187198537135d63a672956f323720","affectsGlobalScope":true},"7e6c5e2d56408e1c9013f28751c1a61f7130034ae015866ef3c9323eadfbe825","7872dacc152b788c27e87def0abb73dffe7c1ab30b34dd131f5e7a24b925cc00","45a63e17814c570ea59407f231ef9c561510bd6edb36f17479b09b44619496c6","26aa810dd3129b56eb7ef1655811c1ac04b9e0fbee1b3b156658cf629c6a3eb1","2a99fa3c0f4461420236f7e60b5e61091abef2f2ab686c1eb21c82039542f77c","36af408a1aedb7ef10cb8d8c8a1474883330805d09c17f080887143602cf9f77","9a4c49a0b2bf8536b1f4a72f162f807d7a23aa27a816e9cd24cc965540ba4b35","b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37","f86c04a744ebcede96bac376f9a2c90f2bd3c422740d91dda4ca6233199d4977","6ae1bddee5c790439bd992abd063b9b46e0cadd676c2a8562268d1869213ff60","606244fc97a6a74b877f2e924ba7e55b233bc6acb57d7bf40ba84a5be2d9adb0","4a1cabac71036b8a14f5db1b753b579f0c901c7d7b9227e6872dadf6efb104e8","062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c","4c3672dc8f4e4fdd3d18525b22b31f1b5481f5a415db96550d3ac5163a6c3dd3","f9a69ca445010b91fe08f08c06e0f86d79c0d776905f9bdb828477cb2a1eb7fc","ad7fd0e7ee457d4884b3aaecbcbd2a80b6803407c4ce2540c296170d4c7918ef","a50ef21605f41c6acad6c3ef0307e5311b94963c846ca093c764b80cdb5318d6","74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17","918f86ee2b19cc38cb8b1a4cf8f223eb228aaa39df3604c42f700fac2f0b3ea1","50df563ad5ecc74b720c28955b5df707fda64ea42d123d55ced52657bf4e9b6c","f3053e00b1c9034866070bfc7af4030ab60947997ce959bb20cd8f3b99ad556e","485fd86507321b06a1d3f025712687860b422054fc16d29ffcdd8b8bc16968db","e2877cc0e5f7bb33c7751b0e66c102d26cb2423e65908fde2ed3093d571ee264"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":false,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"strictNullChecks":false,"target":99},"fileIdsList":[[49],[45,46,47,48],[58],[57],[57,58,59,60,61,62,63,64,65,66,67],[60],[62],[50],[50,51,53,54,55,70,71],[49,50],[50,52],[49,50,56,68,69,70]],"referencedMap":[[52,1],[49,2],[59,3],[60,4],[68,5],[61,4],[62,4],[63,6],[64,7],[58,4],[65,7],[66,4],[67,7],[51,8],[72,9],[70,10],[53,11],[50,1],[71,12]],"exportedModulesMap":[[52,1],[49,2],[59,3],[60,4],[68,5],[61,4],[62,4],[63,6],[64,7],[58,4],[65,7],[66,4],[67,7],[51,8],[72,9],[70,10],[53,11],[50,1],[71,12]],"semanticDiagnosticsPerFile":[47,52,45,49,46,48,59,60,68,61,62,63,56,57,64,58,65,66,67,10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,51,72,55,70,53,50,71,54,69]},"version":"4.4.2"}
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","./node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","./node_modules/@types/react/index.d.ts","./src/react.js","./src/create-interpolate-element.js","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","./src/react-platform.js","./src/utils.js","./src/platform.js","../../node_modules/is-plain-object/is-plain-object.d.ts","../../node_modules/no-case/dist/index.d.ts","../../node_modules/pascal-case/dist/index.d.ts","../../node_modules/camel-case/dist/index.d.ts","../../node_modules/capital-case/dist/index.d.ts","../../node_modules/constant-case/dist/index.d.ts","../../node_modules/dot-case/dist/index.d.ts","../../node_modules/header-case/dist/index.d.ts","../../node_modules/param-case/dist/index.d.ts","../../node_modules/path-case/dist/index.d.ts","../../node_modules/sentence-case/dist/index.d.ts","../../node_modules/snake-case/dist/index.d.ts","../../node_modules/change-case/dist/index.d.ts","../escape-html/build-types/index.d.ts","./src/raw-html.js","./src/serialize.js","./src/index.js","../../node_modules/@types/react/global.d.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"7a58f31fde65860374f0316b1c33d36e6989fb760ae6c37899650d094d4818bf","7872dacc152b788c27e87def0abb73dffe7c1ab30b34dd131f5e7a24b925cc00",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"e4dd91dd4789a109aab51d8a0569a282369fcda9ba6f2b2297bc61bacfb1a042","83e27bbd7304ea67f9afa1535f1d4fdb15866089f0d893c784cbb5b1c6fb3386","1ad8d04f4680d97b579ce480a89eccb85f8188c00f12947e7cf07ff0d36397fb","2a99fa3c0f4461420236f7e60b5e61091abef2f2ab686c1eb21c82039542f77c","36af408a1aedb7ef10cb8d8c8a1474883330805d09c17f080887143602cf9f77","9a4c49a0b2bf8536b1f4a72f162f807d7a23aa27a816e9cd24cc965540ba4b35","b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37","f86c04a744ebcede96bac376f9a2c90f2bd3c422740d91dda4ca6233199d4977","6ae1bddee5c790439bd992abd063b9b46e0cadd676c2a8562268d1869213ff60","606244fc97a6a74b877f2e924ba7e55b233bc6acb57d7bf40ba84a5be2d9adb0","4a1cabac71036b8a14f5db1b753b579f0c901c7d7b9227e6872dadf6efb104e8","062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c","4c3672dc8f4e4fdd3d18525b22b31f1b5481f5a415db96550d3ac5163a6c3dd3","f9a69ca445010b91fe08f08c06e0f86d79c0d776905f9bdb828477cb2a1eb7fc","ad7fd0e7ee457d4884b3aaecbcbd2a80b6803407c4ce2540c296170d4c7918ef","a50ef21605f41c6acad6c3ef0307e5311b94963c846ca093c764b80cdb5318d6","74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17","918f86ee2b19cc38cb8b1a4cf8f223eb228aaa39df3604c42f700fac2f0b3ea1","50df563ad5ecc74b720c28955b5df707fda64ea42d123d55ced52657bf4e9b6c","f3053e00b1c9034866070bfc7af4030ab60947997ce959bb20cd8f3b99ad556e","485fd86507321b06a1d3f025712687860b422054fc16d29ffcdd8b8bc16968db","e2877cc0e5f7bb33c7751b0e66c102d26cb2423e65908fde2ed3093d571ee264"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":false,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"strictNullChecks":false,"target":99},"fileIdsList":[[49],[46,47,48,75],[60],[59],[59,60,61,62,63,64,65,66,67,68,69],[62],[64],[45,46,47,48],[50],[50,51,55,56,57,72,73],[49,50],[50,53,54],[49,50,58,70,71,72]],"referencedMap":[[54,1],[53,1],[52,2],[61,3],[62,4],[70,5],[63,4],[64,4],[65,6],[66,7],[60,4],[67,7],[68,4],[69,7],[49,8],[51,9],[74,10],[72,11],[55,12],[50,1],[73,13]],"exportedModulesMap":[[54,1],[53,1],[52,2],[61,3],[62,4],[70,5],[63,4],[64,4],[65,6],[66,7],[60,4],[67,7],[68,4],[69,7],[49,8],[51,9],[74,10],[72,11],[55,12],[50,1],[73,13]],"semanticDiagnosticsPerFile":[47,54,53,52,48,61,62,70,63,46,64,65,58,59,66,60,67,68,69,10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,45,49,51,74,57,72,55,50,73,56,71]},"version":"4.4.2"}