@@ -66,7 +66,7 @@ if (__DEV__) {
66
66
return self;
67
67
}
68
68
69
- var ReactVersion = "19.0.0-www-classic-6d726b4b ";
69
+ var ReactVersion = "19.0.0-www-classic-52633ec3 ";
70
70
71
71
var LegacyRoot = 0;
72
72
var ConcurrentRoot = 1;
@@ -25563,17 +25563,14 @@ if (__DEV__) {
25563
25563
}
25564
25564
25565
25565
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
25566
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
25567
- ReactCurrentCache = ReactSharedInternals.ReactCurrentCache,
25568
- ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
25569
- ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,
25570
- ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;
25566
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
25567
+ var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache;
25568
+ var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
25569
+ var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
25570
+ var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;
25571
25571
var NoContext =
25572
25572
/* */
25573
25573
0;
25574
- var BatchedContext =
25575
- /* */
25576
- 1;
25577
25574
var RenderContext =
25578
25575
/* */
25579
25576
2;
@@ -25869,13 +25866,11 @@ if (__DEV__) {
25869
25866
25870
25867
if (transition !== null) {
25871
25868
{
25872
- var batchConfigTransition = ReactCurrentBatchConfig.transition;
25873
-
25874
- if (!batchConfigTransition._updatedFibers) {
25875
- batchConfigTransition._updatedFibers = new Set();
25869
+ if (!transition._updatedFibers) {
25870
+ transition._updatedFibers = new Set();
25876
25871
}
25877
25872
25878
- batchConfigTransition ._updatedFibers.add(fiber);
25873
+ transition ._updatedFibers.add(fiber);
25879
25874
}
25880
25875
25881
25876
var actionScopeLane = peekEntangledActionLane();
@@ -26002,7 +25997,8 @@ if (__DEV__) {
26002
25997
if (transition !== null && transition.name != null) {
26003
25998
if (transition.startTime === -1) {
26004
25999
transition.startTime = now$1();
26005
- }
26000
+ } // $FlowFixMe[prop-missing]: The BatchConfigTransition and Transition types are incompatible but was previously untyped and thus uncaught
26001
+ // $FlowFixMe[incompatible-call]: "
26006
26002
26007
26003
addTransitionToLanesMap(root, transition, lane);
26008
26004
}
@@ -26597,51 +26593,15 @@ if (__DEV__) {
26597
26593
function getExecutionContext() {
26598
26594
return executionContext;
26599
26595
}
26600
- // Warning, this opts-out of checking the function body.
26601
- // eslint-disable-next-line no-unused-vars
26602
- // eslint-disable-next-line no-redeclare
26603
- // eslint-disable-next-line no-redeclare
26596
+ // Returns whether the the call was during a render or not
26604
26597
26605
- function flushSync(fn) {
26606
- // In legacy mode, we flush pending passive effects at the beginning of the
26607
- // next event, not at the end of the previous one.
26608
- if (
26609
- rootWithPendingPassiveEffects !== null &&
26610
- !disableLegacyMode &&
26611
- rootWithPendingPassiveEffects.tag === LegacyRoot &&
26612
- (executionContext & (RenderContext | CommitContext)) === NoContext
26613
- ) {
26614
- flushPassiveEffects();
26598
+ function flushSyncWork() {
26599
+ if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
26600
+ flushSyncWorkOnAllRoots();
26601
+ return false;
26615
26602
}
26616
26603
26617
- var prevExecutionContext = executionContext;
26618
- executionContext |= BatchedContext;
26619
- var prevTransition = ReactCurrentBatchConfig.transition;
26620
- var previousPriority = getCurrentUpdatePriority();
26621
-
26622
- try {
26623
- setCurrentUpdatePriority(DiscreteEventPriority);
26624
- ReactCurrentBatchConfig.transition = null;
26625
-
26626
- if (fn) {
26627
- return fn();
26628
- } else {
26629
- return undefined;
26630
- }
26631
- } finally {
26632
- setCurrentUpdatePriority(previousPriority);
26633
- ReactCurrentBatchConfig.transition = prevTransition;
26634
- executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
26635
- // Note that this will happen even if batchedUpdates is higher up
26636
- // the stack.
26637
-
26638
- if (
26639
- (executionContext & (RenderContext | CommitContext)) ===
26640
- NoContext
26641
- ) {
26642
- flushSyncWorkOnAllRoots();
26643
- }
26644
- }
26604
+ return true;
26645
26605
}
26646
26606
function isInvalidExecutionContextForEventFunction() {
26647
26607
// Used to throw if certain APIs are called from the wrong context.
@@ -29250,13 +29210,12 @@ if (__DEV__) {
29250
29210
var staleFamilies = update.staleFamilies,
29251
29211
updatedFamilies = update.updatedFamilies;
29252
29212
flushPassiveEffects();
29253
- flushSync(function () {
29254
- scheduleFibersWithFamiliesRecursively(
29255
- root.current,
29256
- updatedFamilies,
29257
- staleFamilies
29258
- );
29259
- });
29213
+ scheduleFibersWithFamiliesRecursively(
29214
+ root.current,
29215
+ updatedFamilies,
29216
+ staleFamilies
29217
+ );
29218
+ flushSyncWork();
29260
29219
}
29261
29220
};
29262
29221
var scheduleRoot = function (root, element) {
@@ -29268,10 +29227,8 @@ if (__DEV__) {
29268
29227
return;
29269
29228
}
29270
29229
29271
- flushPassiveEffects();
29272
- flushSync(function () {
29273
- updateContainer(element, root, null, null);
29274
- });
29230
+ updateContainerSync(element, root, null, null);
29231
+ flushSyncWork();
29275
29232
}
29276
29233
};
29277
29234
@@ -30397,14 +30354,40 @@ if (__DEV__) {
30397
30354
null
30398
30355
);
30399
30356
}
30400
- function updateContainer(element, container, parentComponent, callback) {
30357
+ function updateContainerSync(
30358
+ element,
30359
+ container,
30360
+ parentComponent,
30361
+ callback
30362
+ ) {
30363
+ if (container.tag === LegacyRoot) {
30364
+ flushPassiveEffects();
30365
+ }
30366
+
30367
+ var current = container.current;
30368
+ updateContainerImpl(
30369
+ current,
30370
+ SyncLane,
30371
+ element,
30372
+ container,
30373
+ parentComponent,
30374
+ callback
30375
+ );
30376
+ return SyncLane;
30377
+ }
30378
+
30379
+ function updateContainerImpl(
30380
+ rootFiber,
30381
+ lane,
30382
+ element,
30383
+ container,
30384
+ parentComponent,
30385
+ callback
30386
+ ) {
30401
30387
{
30402
30388
onScheduleRoot(container, element);
30403
30389
}
30404
30390
30405
- var current$1 = container.current;
30406
- var lane = requestUpdateLane(current$1);
30407
-
30408
30391
if (enableSchedulingProfiler) {
30409
30392
markRenderScheduled(lane);
30410
30393
}
@@ -30453,14 +30436,12 @@ if (__DEV__) {
30453
30436
update.callback = callback;
30454
30437
}
30455
30438
30456
- var root = enqueueUpdate(current$1 , update, lane);
30439
+ var root = enqueueUpdate(rootFiber , update, lane);
30457
30440
30458
30441
if (root !== null) {
30459
- scheduleUpdateOnFiber(root, current$1 , lane);
30460
- entangleTransitions(root, current$1 , lane);
30442
+ scheduleUpdateOnFiber(root, rootFiber , lane);
30443
+ entangleTransitions(root, rootFiber , lane);
30461
30444
}
30462
-
30463
- return lane;
30464
30445
}
30465
30446
30466
30447
var shouldErrorImpl = function (fiber) {
@@ -30827,8 +30808,6 @@ if (__DEV__) {
30827
30808
var _proto4 = Surface.prototype;
30828
30809
30829
30810
_proto4.componentDidMount = function componentDidMount() {
30830
- var _this = this;
30831
-
30832
30811
var _this$props = this.props,
30833
30812
height = _this$props.height,
30834
30813
width = _this$props.width;
@@ -30843,17 +30822,14 @@ if (__DEV__) {
30843
30822
); // We synchronously flush updates coming from above so that they commit together
30844
30823
// and so that refs resolve before the parent life cycles.
30845
30824
30846
- flushSync(function () {
30847
- updateContainer(_this.props.children, _this._mountNode, _this);
30848
- });
30825
+ updateContainerSync(this.props.children, this._mountNode, this);
30826
+ flushSyncWork();
30849
30827
};
30850
30828
30851
30829
_proto4.componentDidUpdate = function componentDidUpdate(
30852
30830
prevProps,
30853
30831
prevState
30854
30832
) {
30855
- var _this2 = this;
30856
-
30857
30833
var props = this.props;
30858
30834
30859
30835
if (
@@ -30864,27 +30840,23 @@ if (__DEV__) {
30864
30840
} // We synchronously flush updates coming from above so that they commit together
30865
30841
// and so that refs resolve before the parent life cycles.
30866
30842
30867
- flushSync(function () {
30868
- updateContainer(_this2.props.children, _this2._mountNode, _this2);
30869
- });
30843
+ updateContainerSync(this.props.children, this._mountNode, this);
30844
+ flushSyncWork();
30870
30845
30871
30846
if (this._surface.render) {
30872
30847
this._surface.render();
30873
30848
}
30874
30849
};
30875
30850
30876
30851
_proto4.componentWillUnmount = function componentWillUnmount() {
30877
- var _this3 = this;
30878
-
30879
30852
// We synchronously flush updates coming from above so that they commit together
30880
30853
// and so that refs resolve before the parent life cycles.
30881
- flushSync(function () {
30882
- updateContainer(null, _this3._mountNode, _this3);
30883
- });
30854
+ updateContainerSync(null, this._mountNode, this);
30855
+ flushSyncWork();
30884
30856
};
30885
30857
30886
30858
_proto4.render = function render() {
30887
- var _this4 = this;
30859
+ var _this = this;
30888
30860
30889
30861
// This is going to be a placeholder because we don't know what it will
30890
30862
// actually resolve to because ART may render canvas, vml or svg tags here.
@@ -30895,7 +30867,7 @@ if (__DEV__) {
30895
30867
var Tag = Mode$1.Surface.tagName;
30896
30868
return /*#__PURE__*/ React.createElement(Tag, {
30897
30869
ref: function (ref) {
30898
- return (_this4 ._tagRef = ref);
30870
+ return (_this ._tagRef = ref);
30899
30871
},
30900
30872
accessKey: props.accessKey,
30901
30873
className: props.className,
@@ -30914,33 +30886,33 @@ if (__DEV__) {
30914
30886
_inheritsLoose(Text, _React$Component2);
30915
30887
30916
30888
function Text(props) {
30917
- var _this5 ;
30889
+ var _this2 ;
30918
30890
30919
- _this5 = _React$Component2.call(this, props) || this; // We allow reading these props. Ideally we could expose the Text node as
30891
+ _this2 = _React$Component2.call(this, props) || this; // We allow reading these props. Ideally we could expose the Text node as
30920
30892
// ref directly.
30921
30893
30922
30894
["height", "width", "x", "y"].forEach(function (key) {
30923
- Object.defineProperty(_assertThisInitialized(_this5 ), key, {
30895
+ Object.defineProperty(_assertThisInitialized(_this2 ), key, {
30924
30896
get: function () {
30925
30897
return this._text ? this._text[key] : undefined;
30926
30898
}
30927
30899
});
30928
30900
});
30929
- return _this5 ;
30901
+ return _this2 ;
30930
30902
}
30931
30903
30932
30904
var _proto5 = Text.prototype;
30933
30905
30934
30906
_proto5.render = function render() {
30935
- var _this6 = this;
30907
+ var _this3 = this;
30936
30908
30937
30909
// This means you can't have children that render into strings...
30938
30910
var T = TYPES.TEXT;
30939
30911
return /*#__PURE__*/ React.createElement(
30940
30912
T,
30941
30913
_extends({}, this.props, {
30942
30914
ref: function (t) {
30943
- return (_this6 ._text = t);
30915
+ return (_this3 ._text = t);
30944
30916
}
30945
30917
}),
30946
30918
childrenAsString(this.props.children)
0 commit comments