react 19.0.0-rc.0 → 19.0.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.
@@ -45,13 +45,13 @@ function getIteratorFn(maybeIterable) {
45
45
  }
46
46
  var hasOwnProperty = Object.prototype.hasOwnProperty,
47
47
  assign = Object.assign;
48
- function ReactElement(type, key, _ref, self, source, owner, props) {
49
- _ref = props.ref;
48
+ function ReactElement(type, key, self, source, owner, props) {
49
+ self = props.ref;
50
50
  return {
51
51
  $$typeof: REACT_ELEMENT_TYPE,
52
52
  type: type,
53
53
  key: key,
54
- ref: void 0 !== _ref ? _ref : null,
54
+ ref: void 0 !== self ? self : null,
55
55
  props: props
56
56
  };
57
57
  }
@@ -59,7 +59,6 @@ function cloneAndReplaceKey(oldElement, newKey) {
59
59
  return ReactElement(
60
60
  oldElement.type,
61
61
  newKey,
62
- null,
63
62
  void 0,
64
63
  void 0,
65
64
  void 0,
@@ -88,7 +87,7 @@ function getElementKey(element, index) {
88
87
  ? escape("" + element.key)
89
88
  : index.toString(36);
90
89
  }
91
- function noop$1() {}
90
+ function noop() {}
92
91
  function resolveThenable(thenable) {
93
92
  switch (thenable.status) {
94
93
  case "fulfilled":
@@ -98,7 +97,7 @@ function resolveThenable(thenable) {
98
97
  default:
99
98
  switch (
100
99
  ("string" === typeof thenable.status
101
- ? thenable.then(noop$1, noop$1)
100
+ ? thenable.then(noop, noop)
102
101
  : ((thenable.status = "pending"),
103
102
  thenable.then(
104
103
  function (fulfilledValue) {
@@ -265,36 +264,6 @@ function createCacheRoot() {
265
264
  function createCacheNode() {
266
265
  return { s: 0, v: void 0, o: null, p: null };
267
266
  }
268
- var reportGlobalError =
269
- "function" === typeof reportError
270
- ? reportError
271
- : function (error) {
272
- if (
273
- "object" === typeof window &&
274
- "function" === typeof window.ErrorEvent
275
- ) {
276
- var event = new window.ErrorEvent("error", {
277
- bubbles: !0,
278
- cancelable: !0,
279
- message:
280
- "object" === typeof error &&
281
- null !== error &&
282
- "string" === typeof error.message
283
- ? String(error.message)
284
- : String(error),
285
- error: error
286
- });
287
- if (!window.dispatchEvent(event)) return;
288
- } else if (
289
- "object" === typeof process &&
290
- "function" === typeof process.emit
291
- ) {
292
- process.emit("uncaughtException", error);
293
- return;
294
- }
295
- console.error(error);
296
- };
297
- function noop() {}
298
267
  exports.Children = {
299
268
  map: mapChildren,
300
269
  forEach: function (children, forEachFunc, forEachContext) {
@@ -394,7 +363,7 @@ exports.cloneElement = function (element, config, children) {
394
363
  childArray[i] = arguments[i + 2];
395
364
  props.children = childArray;
396
365
  }
397
- return ReactElement(element.type, key, null, void 0, void 0, owner, props);
366
+ return ReactElement(element.type, key, void 0, void 0, owner, props);
398
367
  };
399
368
  exports.createElement = function (type, config, children) {
400
369
  var propName,
@@ -418,7 +387,7 @@ exports.createElement = function (type, config, children) {
418
387
  for (propName in ((childrenLength = type.defaultProps), childrenLength))
419
388
  void 0 === props[propName] &&
420
389
  (props[propName] = childrenLength[propName]);
421
- return ReactElement(type, key, null, void 0, void 0, null, props);
390
+ return ReactElement(type, key, void 0, void 0, null, props);
422
391
  };
423
392
  exports.createRef = function () {
424
393
  return { current: null };
@@ -441,31 +410,9 @@ exports.memo = function (type, compare) {
441
410
  compare: void 0 === compare ? null : compare
442
411
  };
443
412
  };
444
- exports.startTransition = function (scope) {
445
- var prevTransition = ReactSharedInternals.T,
446
- transition = {};
447
- ReactSharedInternals.T = transition;
448
- try {
449
- var returnValue = scope(),
450
- onStartTransitionFinish = ReactSharedInternals.S;
451
- null !== onStartTransitionFinish &&
452
- onStartTransitionFinish(transition, returnValue);
453
- "object" === typeof returnValue &&
454
- null !== returnValue &&
455
- "function" === typeof returnValue.then &&
456
- returnValue.then(noop, reportGlobalError);
457
- } catch (error) {
458
- reportGlobalError(error);
459
- } finally {
460
- ReactSharedInternals.T = prevTransition;
461
- }
462
- };
463
413
  exports.use = function (usable) {
464
414
  return ReactSharedInternals.H.use(usable);
465
415
  };
466
- exports.useActionState = function (action, initialState, permalink) {
467
- return ReactSharedInternals.H.useActionState(action, initialState, permalink);
468
- };
469
416
  exports.useCallback = function (callback, deps) {
470
417
  return ReactSharedInternals.H.useCallback(callback, deps);
471
418
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [
5
5
  "react"
6
6
  ],
7
- "version": "19.0.0-rc.0",
7
+ "version": "19.0.0",
8
8
  "homepage": "https://react.dev/",
9
9
  "bugs": "https://github.com/facebook/react/issues",
10
10
  "license": "MIT",