@kubb/react-fabric 0.11.3 → 0.11.5
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/dist/{Fabric-DbJhvsCq.d.ts → Fabric-8pppnIg0.d.ts} +1 -1
- package/dist/Renderer-7rMwyODQ.cjs +4 -0
- package/dist/{reactPlugin-B8F6jVb5.cjs → Renderer-CRT9gs-h.cjs} +131 -604
- package/dist/Renderer-CRT9gs-h.cjs.map +1 -0
- package/dist/{reactPlugin-CAtVV84d.js → Renderer-CgXqdVqV.js} +124 -590
- package/dist/Renderer-CgXqdVqV.js.map +1 -0
- package/dist/Renderer-D_r5OSso.js +4 -0
- package/dist/{TreeNode-tc-jO4rk.d.ts → TreeNode-B5YhdIi1.d.ts} +2 -2
- package/dist/devtools-Cz49mTX5.js +102 -0
- package/dist/devtools-Cz49mTX5.js.map +1 -0
- package/dist/devtools-msRXXQfJ.cjs +109 -0
- package/dist/devtools-msRXXQfJ.cjs.map +1 -0
- package/dist/devtools.cjs +1 -1
- package/dist/devtools.js +1 -1
- package/dist/globals.d.ts +2 -2
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.d.cts +2 -2
- package/dist/jsx-dev-runtime.d.ts +5 -5
- package/dist/{jsx-namespace-bLrscF7g.d.ts → jsx-namespace-CfIw-cgT.d.ts} +2 -2
- package/dist/jsx-runtime.d.cts +2 -2
- package/dist/jsx-runtime.d.ts +5 -5
- package/dist/parsers.d.ts +1 -1
- package/dist/plugins.cjs +2 -1
- package/dist/plugins.d.ts +2 -2
- package/dist/plugins.js +2 -1
- package/dist/{reactPlugin-BHE3X6-B.d.ts → reactPlugin-0E3yLJvd.d.ts} +2 -2
- package/dist/reactPlugin-BJ_35CCS.cjs +499 -0
- package/dist/reactPlugin-BJ_35CCS.cjs.map +1 -0
- package/dist/reactPlugin-E8nSWNDp.js +469 -0
- package/dist/reactPlugin-E8nSWNDp.js.map +1 -0
- package/dist/{types-BKXB0ewg.d.ts → types-BKiEQWrZ.d.ts} +3 -3
- package/dist/types.d.ts +2 -2
- package/package.json +2 -2
- package/src/Runtime.tsx +0 -6
- package/src/devtools.ts +91 -69
- package/dist/devtools-8_UKWDTl.js +0 -93
- package/dist/devtools-8_UKWDTl.js.map +0 -1
- package/dist/devtools-BOpUJhc_.cjs +0 -100
- package/dist/devtools-BOpUJhc_.cjs.map +0 -1
- package/dist/reactPlugin-B8F6jVb5.cjs.map +0 -1
- package/dist/reactPlugin-CAtVV84d.js.map +0 -1
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-BrXtsOCC.cjs');
|
|
2
2
|
const require_react$1 = require('./react-CWV4qQg2.cjs');
|
|
3
|
-
const require_jsx_runtime = require('./jsx-runtime-Cq39dA50.cjs');
|
|
4
|
-
let _kubb_fabric_core = require("@kubb/fabric-core");
|
|
5
|
-
let signal_exit = require("signal-exit");
|
|
6
|
-
let _kubb_fabric_core_plugins = require("@kubb/fabric-core/plugins");
|
|
7
|
-
let node_process = require("node:process");
|
|
8
|
-
node_process = require_chunk.__toESM(node_process);
|
|
9
|
-
let _kubb_fabric_core_parsers_typescript = require("@kubb/fabric-core/parsers/typescript");
|
|
10
3
|
|
|
11
4
|
//#region ../../node_modules/.pnpm/react-reconciler@0.32.0_react@19.2.1/node_modules/react-reconciler/cjs/react-reconciler-constants.production.js
|
|
12
5
|
/**
|
|
@@ -46,87 +39,6 @@ var require_constants = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
46
39
|
else module.exports = require_react_reconciler_constants_development();
|
|
47
40
|
}));
|
|
48
41
|
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region \0@oxc-project+runtime@0.103.0/helpers/typeof.js
|
|
51
|
-
function _typeof(o) {
|
|
52
|
-
"@babel/helpers - typeof";
|
|
53
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
|
54
|
-
return typeof o$1;
|
|
55
|
-
} : function(o$1) {
|
|
56
|
-
return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1;
|
|
57
|
-
}, _typeof(o);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region \0@oxc-project+runtime@0.103.0/helpers/toPrimitive.js
|
|
62
|
-
function toPrimitive(t, r) {
|
|
63
|
-
if ("object" != _typeof(t) || !t) return t;
|
|
64
|
-
var e = t[Symbol.toPrimitive];
|
|
65
|
-
if (void 0 !== e) {
|
|
66
|
-
var i = e.call(t, r || "default");
|
|
67
|
-
if ("object" != _typeof(i)) return i;
|
|
68
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
69
|
-
}
|
|
70
|
-
return ("string" === r ? String : Number)(t);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region \0@oxc-project+runtime@0.103.0/helpers/toPropertyKey.js
|
|
75
|
-
function toPropertyKey(t) {
|
|
76
|
-
var i = toPrimitive(t, "string");
|
|
77
|
-
return "symbol" == _typeof(i) ? i : i + "";
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
//#endregion
|
|
81
|
-
//#region \0@oxc-project+runtime@0.103.0/helpers/defineProperty.js
|
|
82
|
-
function _defineProperty(e, r, t) {
|
|
83
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
84
|
-
value: t,
|
|
85
|
-
enumerable: !0,
|
|
86
|
-
configurable: !0,
|
|
87
|
-
writable: !0
|
|
88
|
-
}) : e[r] = t, e;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
//#endregion
|
|
92
|
-
//#region src/components/Root.tsx
|
|
93
|
-
var import_react = /* @__PURE__ */ require_chunk.__toESM(require_react$1.require_react());
|
|
94
|
-
var ErrorBoundary = class extends import_react.Component {
|
|
95
|
-
constructor(..._args) {
|
|
96
|
-
super(..._args);
|
|
97
|
-
_defineProperty(this, "state", { hasError: false });
|
|
98
|
-
}
|
|
99
|
-
static getDerivedStateFromError(_error) {
|
|
100
|
-
return { hasError: true };
|
|
101
|
-
}
|
|
102
|
-
componentDidCatch(error) {
|
|
103
|
-
if (error) this.props.onError(error);
|
|
104
|
-
}
|
|
105
|
-
render() {
|
|
106
|
-
if (this.state.hasError) return null;
|
|
107
|
-
return this.props.children;
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
_defineProperty(ErrorBoundary, "displayName", "KubbErrorBoundary");
|
|
111
|
-
/**
|
|
112
|
-
* This component provides the root behavior for the Fabric runtime.
|
|
113
|
-
*/
|
|
114
|
-
function Root({ onError, onExit: onExit$1, treeNode, fileManager, children }) {
|
|
115
|
-
(0, _kubb_fabric_core.provide)(_kubb_fabric_core.RootContext, {
|
|
116
|
-
exit: onExit$1,
|
|
117
|
-
treeNode,
|
|
118
|
-
fileManager
|
|
119
|
-
});
|
|
120
|
-
(0, _kubb_fabric_core.provide)(_kubb_fabric_core.NodeTreeContext, treeNode);
|
|
121
|
-
return /* @__PURE__ */ require_jsx_runtime.jsx(ErrorBoundary, {
|
|
122
|
-
onError: (error) => {
|
|
123
|
-
onError(error);
|
|
124
|
-
},
|
|
125
|
-
children
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
Root.displayName = "KubbRoot";
|
|
129
|
-
|
|
130
42
|
//#endregion
|
|
131
43
|
//#region src/dom.ts
|
|
132
44
|
const createNode = (nodeName) => {
|
|
@@ -1898,7 +1810,7 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
1898
1810
|
for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) if (!objectIs(nextDeps[i], prevDeps[i])) return !1;
|
|
1899
1811
|
return !0;
|
|
1900
1812
|
}
|
|
1901
|
-
function renderWithHooks(current, workInProgress$1, Component
|
|
1813
|
+
function renderWithHooks(current, workInProgress$1, Component, props, secondArg, nextRenderLanes) {
|
|
1902
1814
|
renderLanes = nextRenderLanes;
|
|
1903
1815
|
currentlyRenderingFiber = workInProgress$1;
|
|
1904
1816
|
workInProgress$1.memoizedState = null;
|
|
@@ -1906,9 +1818,9 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
1906
1818
|
workInProgress$1.lanes = 0;
|
|
1907
1819
|
ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate;
|
|
1908
1820
|
shouldDoubleInvokeUserFnsInHooksDEV = !1;
|
|
1909
|
-
nextRenderLanes = Component
|
|
1821
|
+
nextRenderLanes = Component(props, secondArg);
|
|
1910
1822
|
shouldDoubleInvokeUserFnsInHooksDEV = !1;
|
|
1911
|
-
didScheduleRenderPhaseUpdateDuringThisPass && (nextRenderLanes = renderWithHooksAgain(workInProgress$1, Component
|
|
1823
|
+
didScheduleRenderPhaseUpdateDuringThisPass && (nextRenderLanes = renderWithHooksAgain(workInProgress$1, Component, props, secondArg));
|
|
1912
1824
|
finishRenderingHooks(current);
|
|
1913
1825
|
return nextRenderLanes;
|
|
1914
1826
|
}
|
|
@@ -1923,7 +1835,7 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
1923
1835
|
if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300));
|
|
1924
1836
|
null === current || didReceiveUpdate || (current = current.dependencies, null !== current && checkIfContextChanged(current) && (didReceiveUpdate = !0));
|
|
1925
1837
|
}
|
|
1926
|
-
function renderWithHooksAgain(workInProgress$1, Component
|
|
1838
|
+
function renderWithHooksAgain(workInProgress$1, Component, props, secondArg) {
|
|
1927
1839
|
currentlyRenderingFiber = workInProgress$1;
|
|
1928
1840
|
var numberOfReRenders = 0;
|
|
1929
1841
|
do {
|
|
@@ -1941,7 +1853,7 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
1941
1853
|
null != children.memoCache && (children.memoCache.index = 0);
|
|
1942
1854
|
}
|
|
1943
1855
|
ReactSharedInternals.H = HooksDispatcherOnRerender;
|
|
1944
|
-
children = Component
|
|
1856
|
+
children = Component(props, secondArg);
|
|
1945
1857
|
} while (didScheduleRenderPhaseUpdateDuringThisPass);
|
|
1946
1858
|
return children;
|
|
1947
1859
|
}
|
|
@@ -2986,15 +2898,15 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
2986
2898
|
"function" === typeof instance.UNSAFE_componentWillReceiveProps && instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
|
|
2987
2899
|
instance.state !== workInProgress$1 && classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
|
|
2988
2900
|
}
|
|
2989
|
-
function resolveClassComponentProps(Component
|
|
2901
|
+
function resolveClassComponentProps(Component, baseProps) {
|
|
2990
2902
|
var newProps = baseProps;
|
|
2991
2903
|
if ("ref" in baseProps) {
|
|
2992
2904
|
newProps = {};
|
|
2993
2905
|
for (var propName in baseProps) "ref" !== propName && (newProps[propName] = baseProps[propName]);
|
|
2994
2906
|
}
|
|
2995
|
-
if (Component
|
|
2907
|
+
if (Component = Component.defaultProps) {
|
|
2996
2908
|
newProps === baseProps && (newProps = assign({}, newProps));
|
|
2997
|
-
for (var propName$57 in Component
|
|
2909
|
+
for (var propName$57 in Component) void 0 === newProps[propName$57] && (newProps[propName$57] = Component[propName$57]);
|
|
2998
2910
|
}
|
|
2999
2911
|
return newProps;
|
|
3000
2912
|
}
|
|
@@ -3095,15 +3007,15 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
3095
3007
|
function reconcileChildren(current, workInProgress$1, nextChildren, renderLanes$1) {
|
|
3096
3008
|
workInProgress$1.child = null === current ? mountChildFibers(workInProgress$1, null, nextChildren, renderLanes$1) : reconcileChildFibers(workInProgress$1, current.child, nextChildren, renderLanes$1);
|
|
3097
3009
|
}
|
|
3098
|
-
function updateForwardRef(current, workInProgress$1, Component
|
|
3099
|
-
Component
|
|
3010
|
+
function updateForwardRef(current, workInProgress$1, Component, nextProps, renderLanes$1) {
|
|
3011
|
+
Component = Component.render;
|
|
3100
3012
|
var ref = workInProgress$1.ref;
|
|
3101
3013
|
if ("ref" in nextProps) {
|
|
3102
3014
|
var propsWithoutRef = {};
|
|
3103
3015
|
for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]);
|
|
3104
3016
|
} else propsWithoutRef = nextProps;
|
|
3105
3017
|
prepareToReadContext(workInProgress$1);
|
|
3106
|
-
nextProps = renderWithHooks(current, workInProgress$1, Component
|
|
3018
|
+
nextProps = renderWithHooks(current, workInProgress$1, Component, propsWithoutRef, ref, renderLanes$1);
|
|
3107
3019
|
key = checkDidRenderIdHook();
|
|
3108
3020
|
if (null !== current && !didReceiveUpdate) return bailoutHooks(current, workInProgress$1, renderLanes$1), bailoutOnAlreadyFinishedWork(current, workInProgress$1, renderLanes$1);
|
|
3109
3021
|
isHydrating && key && pushMaterializedTreeId(workInProgress$1);
|
|
@@ -3111,11 +3023,11 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
3111
3023
|
reconcileChildren(current, workInProgress$1, nextProps, renderLanes$1);
|
|
3112
3024
|
return workInProgress$1.child;
|
|
3113
3025
|
}
|
|
3114
|
-
function updateMemoComponent(current, workInProgress$1, Component
|
|
3026
|
+
function updateMemoComponent(current, workInProgress$1, Component, nextProps, renderLanes$1) {
|
|
3115
3027
|
if (null === current) {
|
|
3116
|
-
var type = Component
|
|
3117
|
-
if ("function" === typeof type && !shouldConstruct(type) && void 0 === type.defaultProps && null === Component
|
|
3118
|
-
current = createFiberFromTypeAndProps(Component
|
|
3028
|
+
var type = Component.type;
|
|
3029
|
+
if ("function" === typeof type && !shouldConstruct(type) && void 0 === type.defaultProps && null === Component.compare) return workInProgress$1.tag = 15, workInProgress$1.type = type, updateSimpleMemoComponent(current, workInProgress$1, type, nextProps, renderLanes$1);
|
|
3030
|
+
current = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress$1, workInProgress$1.mode, renderLanes$1);
|
|
3119
3031
|
current.ref = workInProgress$1.ref;
|
|
3120
3032
|
current.return = workInProgress$1;
|
|
3121
3033
|
return workInProgress$1.child = current;
|
|
@@ -3123,9 +3035,9 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
3123
3035
|
type = current.child;
|
|
3124
3036
|
if (!checkScheduledUpdateOrContext(current, renderLanes$1)) {
|
|
3125
3037
|
var prevProps = type.memoizedProps;
|
|
3126
|
-
Component
|
|
3127
|
-
Component
|
|
3128
|
-
if (Component
|
|
3038
|
+
Component = Component.compare;
|
|
3039
|
+
Component = null !== Component ? Component : shallowEqual;
|
|
3040
|
+
if (Component(prevProps, nextProps) && current.ref === workInProgress$1.ref) return bailoutOnAlreadyFinishedWork(current, workInProgress$1, renderLanes$1);
|
|
3129
3041
|
}
|
|
3130
3042
|
workInProgress$1.flags |= 1;
|
|
3131
3043
|
current = createWorkInProgress(type, nextProps);
|
|
@@ -3133,13 +3045,13 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
3133
3045
|
current.return = workInProgress$1;
|
|
3134
3046
|
return workInProgress$1.child = current;
|
|
3135
3047
|
}
|
|
3136
|
-
function updateSimpleMemoComponent(current, workInProgress$1, Component
|
|
3048
|
+
function updateSimpleMemoComponent(current, workInProgress$1, Component, nextProps, renderLanes$1) {
|
|
3137
3049
|
if (null !== current) {
|
|
3138
3050
|
var prevProps = current.memoizedProps;
|
|
3139
3051
|
if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress$1.ref) if (didReceiveUpdate = !1, workInProgress$1.pendingProps = nextProps = prevProps, checkScheduledUpdateOrContext(current, renderLanes$1)) 0 !== (current.flags & 131072) && (didReceiveUpdate = !0);
|
|
3140
3052
|
else return workInProgress$1.lanes = current.lanes, bailoutOnAlreadyFinishedWork(current, workInProgress$1, renderLanes$1);
|
|
3141
3053
|
}
|
|
3142
|
-
return updateFunctionComponent(current, workInProgress$1, Component
|
|
3054
|
+
return updateFunctionComponent(current, workInProgress$1, Component, nextProps, renderLanes$1);
|
|
3143
3055
|
}
|
|
3144
3056
|
function updateOffscreenComponent(current, workInProgress$1, renderLanes$1) {
|
|
3145
3057
|
var nextProps = workInProgress$1.pendingProps, nextChildren = nextProps.children, prevState = null !== current ? current.memoizedState : null;
|
|
@@ -3186,34 +3098,34 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
3186
3098
|
if (null === current || current.ref !== ref) workInProgress$1.flags |= 4194816;
|
|
3187
3099
|
}
|
|
3188
3100
|
}
|
|
3189
|
-
function updateFunctionComponent(current, workInProgress$1, Component
|
|
3101
|
+
function updateFunctionComponent(current, workInProgress$1, Component, nextProps, renderLanes$1) {
|
|
3190
3102
|
prepareToReadContext(workInProgress$1);
|
|
3191
|
-
Component
|
|
3103
|
+
Component = renderWithHooks(current, workInProgress$1, Component, nextProps, void 0, renderLanes$1);
|
|
3192
3104
|
nextProps = checkDidRenderIdHook();
|
|
3193
3105
|
if (null !== current && !didReceiveUpdate) return bailoutHooks(current, workInProgress$1, renderLanes$1), bailoutOnAlreadyFinishedWork(current, workInProgress$1, renderLanes$1);
|
|
3194
3106
|
isHydrating && nextProps && pushMaterializedTreeId(workInProgress$1);
|
|
3195
3107
|
workInProgress$1.flags |= 1;
|
|
3196
|
-
reconcileChildren(current, workInProgress$1, Component
|
|
3108
|
+
reconcileChildren(current, workInProgress$1, Component, renderLanes$1);
|
|
3197
3109
|
return workInProgress$1.child;
|
|
3198
3110
|
}
|
|
3199
|
-
function replayFunctionComponent(current, workInProgress$1, nextProps, Component
|
|
3111
|
+
function replayFunctionComponent(current, workInProgress$1, nextProps, Component, secondArg, renderLanes$1) {
|
|
3200
3112
|
prepareToReadContext(workInProgress$1);
|
|
3201
3113
|
workInProgress$1.updateQueue = null;
|
|
3202
|
-
nextProps = renderWithHooksAgain(workInProgress$1, Component
|
|
3114
|
+
nextProps = renderWithHooksAgain(workInProgress$1, Component, nextProps, secondArg);
|
|
3203
3115
|
finishRenderingHooks(current);
|
|
3204
|
-
Component
|
|
3116
|
+
Component = checkDidRenderIdHook();
|
|
3205
3117
|
if (null !== current && !didReceiveUpdate) return bailoutHooks(current, workInProgress$1, renderLanes$1), bailoutOnAlreadyFinishedWork(current, workInProgress$1, renderLanes$1);
|
|
3206
|
-
isHydrating && Component
|
|
3118
|
+
isHydrating && Component && pushMaterializedTreeId(workInProgress$1);
|
|
3207
3119
|
workInProgress$1.flags |= 1;
|
|
3208
3120
|
reconcileChildren(current, workInProgress$1, nextProps, renderLanes$1);
|
|
3209
3121
|
return workInProgress$1.child;
|
|
3210
3122
|
}
|
|
3211
|
-
function updateClassComponent(current, workInProgress$1, Component
|
|
3123
|
+
function updateClassComponent(current, workInProgress$1, Component, nextProps, renderLanes$1) {
|
|
3212
3124
|
prepareToReadContext(workInProgress$1);
|
|
3213
3125
|
if (null === workInProgress$1.stateNode) {
|
|
3214
|
-
var context = emptyContextObject, contextType = Component
|
|
3126
|
+
var context = emptyContextObject, contextType = Component.contextType;
|
|
3215
3127
|
"object" === typeof contextType && null !== contextType && (context = readContext(contextType));
|
|
3216
|
-
context = new Component
|
|
3128
|
+
context = new Component(nextProps, context);
|
|
3217
3129
|
workInProgress$1.memoizedState = null !== context.state && void 0 !== context.state ? context.state : null;
|
|
3218
3130
|
context.updater = classComponentUpdater;
|
|
3219
3131
|
workInProgress$1.stateNode = context;
|
|
@@ -3223,22 +3135,22 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
3223
3135
|
context.state = workInProgress$1.memoizedState;
|
|
3224
3136
|
context.refs = {};
|
|
3225
3137
|
initializeUpdateQueue(workInProgress$1);
|
|
3226
|
-
contextType = Component
|
|
3138
|
+
contextType = Component.contextType;
|
|
3227
3139
|
context.context = "object" === typeof contextType && null !== contextType ? readContext(contextType) : emptyContextObject;
|
|
3228
3140
|
context.state = workInProgress$1.memoizedState;
|
|
3229
|
-
contextType = Component
|
|
3230
|
-
"function" === typeof contextType && (applyDerivedStateFromProps(workInProgress$1, Component
|
|
3231
|
-
"function" === typeof Component
|
|
3141
|
+
contextType = Component.getDerivedStateFromProps;
|
|
3142
|
+
"function" === typeof contextType && (applyDerivedStateFromProps(workInProgress$1, Component, contextType, nextProps), context.state = workInProgress$1.memoizedState);
|
|
3143
|
+
"function" === typeof Component.getDerivedStateFromProps || "function" === typeof context.getSnapshotBeforeUpdate || "function" !== typeof context.UNSAFE_componentWillMount && "function" !== typeof context.componentWillMount || (contextType = context.state, "function" === typeof context.componentWillMount && context.componentWillMount(), "function" === typeof context.UNSAFE_componentWillMount && context.UNSAFE_componentWillMount(), contextType !== context.state && classComponentUpdater.enqueueReplaceState(context, context.state, null), processUpdateQueue(workInProgress$1, nextProps, context, renderLanes$1), suspendIfUpdateReadFromEntangledAsyncAction(), context.state = workInProgress$1.memoizedState);
|
|
3232
3144
|
"function" === typeof context.componentDidMount && (workInProgress$1.flags |= 4194308);
|
|
3233
3145
|
nextProps = !0;
|
|
3234
3146
|
} else if (null === current) {
|
|
3235
3147
|
context = workInProgress$1.stateNode;
|
|
3236
|
-
var unresolvedOldProps = workInProgress$1.memoizedProps, oldProps = resolveClassComponentProps(Component
|
|
3148
|
+
var unresolvedOldProps = workInProgress$1.memoizedProps, oldProps = resolveClassComponentProps(Component, unresolvedOldProps);
|
|
3237
3149
|
context.props = oldProps;
|
|
3238
|
-
var oldContext = context.context, contextType$jscomp$0 = Component
|
|
3150
|
+
var oldContext = context.context, contextType$jscomp$0 = Component.contextType;
|
|
3239
3151
|
contextType = emptyContextObject;
|
|
3240
3152
|
"object" === typeof contextType$jscomp$0 && null !== contextType$jscomp$0 && (contextType = readContext(contextType$jscomp$0));
|
|
3241
|
-
var getDerivedStateFromProps = Component
|
|
3153
|
+
var getDerivedStateFromProps = Component.getDerivedStateFromProps;
|
|
3242
3154
|
contextType$jscomp$0 = "function" === typeof getDerivedStateFromProps || "function" === typeof context.getSnapshotBeforeUpdate;
|
|
3243
3155
|
unresolvedOldProps = workInProgress$1.pendingProps !== unresolvedOldProps;
|
|
3244
3156
|
contextType$jscomp$0 || "function" !== typeof context.UNSAFE_componentWillReceiveProps && "function" !== typeof context.componentWillReceiveProps || (unresolvedOldProps || oldContext !== contextType) && callComponentWillReceiveProps(workInProgress$1, context, nextProps, contextType);
|
|
@@ -3248,19 +3160,19 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
3248
3160
|
processUpdateQueue(workInProgress$1, nextProps, context, renderLanes$1);
|
|
3249
3161
|
suspendIfUpdateReadFromEntangledAsyncAction();
|
|
3250
3162
|
oldContext = workInProgress$1.memoizedState;
|
|
3251
|
-
unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? ("function" === typeof getDerivedStateFromProps && (applyDerivedStateFromProps(workInProgress$1, Component
|
|
3163
|
+
unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? ("function" === typeof getDerivedStateFromProps && (applyDerivedStateFromProps(workInProgress$1, Component, getDerivedStateFromProps, nextProps), oldContext = workInProgress$1.memoizedState), (oldProps = hasForceUpdate || checkShouldComponentUpdate(workInProgress$1, Component, oldProps, nextProps, oldState, oldContext, contextType)) ? (contextType$jscomp$0 || "function" !== typeof context.UNSAFE_componentWillMount && "function" !== typeof context.componentWillMount || ("function" === typeof context.componentWillMount && context.componentWillMount(), "function" === typeof context.UNSAFE_componentWillMount && context.UNSAFE_componentWillMount()), "function" === typeof context.componentDidMount && (workInProgress$1.flags |= 4194308)) : ("function" === typeof context.componentDidMount && (workInProgress$1.flags |= 4194308), workInProgress$1.memoizedProps = nextProps, workInProgress$1.memoizedState = oldContext), context.props = nextProps, context.state = oldContext, context.context = contextType, nextProps = oldProps) : ("function" === typeof context.componentDidMount && (workInProgress$1.flags |= 4194308), nextProps = !1);
|
|
3252
3164
|
} else {
|
|
3253
3165
|
context = workInProgress$1.stateNode;
|
|
3254
3166
|
cloneUpdateQueue(current, workInProgress$1);
|
|
3255
3167
|
contextType = workInProgress$1.memoizedProps;
|
|
3256
|
-
contextType$jscomp$0 = resolveClassComponentProps(Component
|
|
3168
|
+
contextType$jscomp$0 = resolveClassComponentProps(Component, contextType);
|
|
3257
3169
|
context.props = contextType$jscomp$0;
|
|
3258
3170
|
getDerivedStateFromProps = workInProgress$1.pendingProps;
|
|
3259
3171
|
oldState = context.context;
|
|
3260
|
-
oldContext = Component
|
|
3172
|
+
oldContext = Component.contextType;
|
|
3261
3173
|
oldProps = emptyContextObject;
|
|
3262
3174
|
"object" === typeof oldContext && null !== oldContext && (oldProps = readContext(oldContext));
|
|
3263
|
-
unresolvedOldProps = Component
|
|
3175
|
+
unresolvedOldProps = Component.getDerivedStateFromProps;
|
|
3264
3176
|
(oldContext = "function" === typeof unresolvedOldProps || "function" === typeof context.getSnapshotBeforeUpdate) || "function" !== typeof context.UNSAFE_componentWillReceiveProps && "function" !== typeof context.componentWillReceiveProps || (contextType !== getDerivedStateFromProps || oldState !== oldProps) && callComponentWillReceiveProps(workInProgress$1, context, nextProps, oldProps);
|
|
3265
3177
|
hasForceUpdate = !1;
|
|
3266
3178
|
oldState = workInProgress$1.memoizedState;
|
|
@@ -3268,12 +3180,12 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
3268
3180
|
processUpdateQueue(workInProgress$1, nextProps, context, renderLanes$1);
|
|
3269
3181
|
suspendIfUpdateReadFromEntangledAsyncAction();
|
|
3270
3182
|
var newState = workInProgress$1.memoizedState;
|
|
3271
|
-
contextType !== getDerivedStateFromProps || oldState !== newState || hasForceUpdate || null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies) ? ("function" === typeof unresolvedOldProps && (applyDerivedStateFromProps(workInProgress$1, Component
|
|
3183
|
+
contextType !== getDerivedStateFromProps || oldState !== newState || hasForceUpdate || null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies) ? ("function" === typeof unresolvedOldProps && (applyDerivedStateFromProps(workInProgress$1, Component, unresolvedOldProps, nextProps), newState = workInProgress$1.memoizedState), (contextType$jscomp$0 = hasForceUpdate || checkShouldComponentUpdate(workInProgress$1, Component, contextType$jscomp$0, nextProps, oldState, newState, oldProps) || null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? (oldContext || "function" !== typeof context.UNSAFE_componentWillUpdate && "function" !== typeof context.componentWillUpdate || ("function" === typeof context.componentWillUpdate && context.componentWillUpdate(nextProps, newState, oldProps), "function" === typeof context.UNSAFE_componentWillUpdate && context.UNSAFE_componentWillUpdate(nextProps, newState, oldProps)), "function" === typeof context.componentDidUpdate && (workInProgress$1.flags |= 4), "function" === typeof context.getSnapshotBeforeUpdate && (workInProgress$1.flags |= 1024)) : ("function" !== typeof context.componentDidUpdate || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress$1.flags |= 4), "function" !== typeof context.getSnapshotBeforeUpdate || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress$1.flags |= 1024), workInProgress$1.memoizedProps = nextProps, workInProgress$1.memoizedState = newState), context.props = nextProps, context.state = newState, context.context = oldProps, nextProps = contextType$jscomp$0) : ("function" !== typeof context.componentDidUpdate || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress$1.flags |= 4), "function" !== typeof context.getSnapshotBeforeUpdate || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress$1.flags |= 1024), nextProps = !1);
|
|
3272
3184
|
}
|
|
3273
3185
|
context = nextProps;
|
|
3274
3186
|
markRef(current, workInProgress$1);
|
|
3275
3187
|
nextProps = 0 !== (workInProgress$1.flags & 128);
|
|
3276
|
-
context || nextProps ? (context = workInProgress$1.stateNode, Component
|
|
3188
|
+
context || nextProps ? (context = workInProgress$1.stateNode, Component = nextProps && "function" !== typeof Component.getDerivedStateFromError ? null : context.render(), workInProgress$1.flags |= 1, null !== current && nextProps ? (workInProgress$1.child = reconcileChildFibers(workInProgress$1, current.child, null, renderLanes$1), workInProgress$1.child = reconcileChildFibers(workInProgress$1, null, Component, renderLanes$1)) : reconcileChildren(current, workInProgress$1, Component, renderLanes$1), workInProgress$1.memoizedState = context.state, current = workInProgress$1.child) : current = bailoutOnAlreadyFinishedWork(current, workInProgress$1, renderLanes$1);
|
|
3277
3189
|
return current;
|
|
3278
3190
|
}
|
|
3279
3191
|
function mountHostRootWithoutHydrating(current, workInProgress$1, nextChildren, renderLanes$1) {
|
|
@@ -5785,9 +5697,9 @@ var require_react_reconciler_production = /* @__PURE__ */ require_chunk.__common
|
|
|
5785
5697
|
this.childLanes = this.lanes = 0;
|
|
5786
5698
|
this.alternate = null;
|
|
5787
5699
|
}
|
|
5788
|
-
function shouldConstruct(Component
|
|
5789
|
-
Component
|
|
5790
|
-
return !(!Component
|
|
5700
|
+
function shouldConstruct(Component) {
|
|
5701
|
+
Component = Component.prototype;
|
|
5702
|
+
return !(!Component || !Component.isReactComponent);
|
|
5791
5703
|
}
|
|
5792
5704
|
function createWorkInProgress(current, pendingProps) {
|
|
5793
5705
|
var workInProgress$1 = current.alternate;
|
|
@@ -8511,25 +8423,25 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
8511
8423
|
for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) if (!objectIs(nextDeps[i], prevDeps[i])) return !1;
|
|
8512
8424
|
return !0;
|
|
8513
8425
|
}
|
|
8514
|
-
function renderWithHooks(current$1, workInProgress$1, Component
|
|
8426
|
+
function renderWithHooks(current$1, workInProgress$1, Component, props, secondArg, nextRenderLanes) {
|
|
8515
8427
|
renderLanes = nextRenderLanes;
|
|
8516
8428
|
currentlyRenderingFiber = workInProgress$1;
|
|
8517
8429
|
hookTypesDev = null !== current$1 ? current$1._debugHookTypes : null;
|
|
8518
8430
|
hookTypesUpdateIndexDev = -1;
|
|
8519
8431
|
ignorePreviousDependencies = null !== current$1 && current$1.type !== workInProgress$1.type;
|
|
8520
|
-
if ("[object AsyncFunction]" === Object.prototype.toString.call(Component
|
|
8432
|
+
if ("[object AsyncFunction]" === Object.prototype.toString.call(Component) || "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component)) nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.", null === nextRenderLanes ? "An unknown Component" : "<" + nextRenderLanes + ">"));
|
|
8521
8433
|
workInProgress$1.memoizedState = null;
|
|
8522
8434
|
workInProgress$1.updateQueue = null;
|
|
8523
8435
|
workInProgress$1.lanes = 0;
|
|
8524
8436
|
ReactSharedInternals.H = null !== current$1 && null !== current$1.memoizedState ? HooksDispatcherOnUpdateInDEV : null !== hookTypesDev ? HooksDispatcherOnMountWithHookTypesInDEV : HooksDispatcherOnMountInDEV;
|
|
8525
8437
|
shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = (workInProgress$1.mode & 8) !== NoMode;
|
|
8526
|
-
var children = callComponentInDEV(Component
|
|
8438
|
+
var children = callComponentInDEV(Component, props, secondArg);
|
|
8527
8439
|
shouldDoubleInvokeUserFnsInHooksDEV = !1;
|
|
8528
|
-
didScheduleRenderPhaseUpdateDuringThisPass && (children = renderWithHooksAgain(workInProgress$1, Component
|
|
8440
|
+
didScheduleRenderPhaseUpdateDuringThisPass && (children = renderWithHooksAgain(workInProgress$1, Component, props, secondArg));
|
|
8529
8441
|
if (nextRenderLanes) {
|
|
8530
8442
|
setIsStrictModeForDevtools(!0);
|
|
8531
8443
|
try {
|
|
8532
|
-
children = renderWithHooksAgain(workInProgress$1, Component
|
|
8444
|
+
children = renderWithHooksAgain(workInProgress$1, Component, props, secondArg);
|
|
8533
8445
|
} finally {
|
|
8534
8446
|
setIsStrictModeForDevtools(!1);
|
|
8535
8447
|
}
|
|
@@ -8558,7 +8470,7 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
8558
8470
|
needsToResetSuspendedThenableDEV ? (needsToResetSuspendedThenableDEV = !1, current$1 = !0) : current$1 = !1;
|
|
8559
8471
|
current$1 && (workInProgress$1 = getComponentNameFromFiber(workInProgress$1) || "Unknown", didWarnAboutUseWrappedInTryCatch.has(workInProgress$1) || didWarnAboutAsyncClientComponent.has(workInProgress$1) || (didWarnAboutUseWrappedInTryCatch.add(workInProgress$1), console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")));
|
|
8560
8472
|
}
|
|
8561
|
-
function renderWithHooksAgain(workInProgress$1, Component
|
|
8473
|
+
function renderWithHooksAgain(workInProgress$1, Component, props, secondArg) {
|
|
8562
8474
|
currentlyRenderingFiber = workInProgress$1;
|
|
8563
8475
|
var numberOfReRenders = 0;
|
|
8564
8476
|
do {
|
|
@@ -8578,7 +8490,7 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
8578
8490
|
}
|
|
8579
8491
|
hookTypesUpdateIndexDev = -1;
|
|
8580
8492
|
ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV;
|
|
8581
|
-
children = callComponentInDEV(Component
|
|
8493
|
+
children = callComponentInDEV(Component, props, secondArg);
|
|
8582
8494
|
} while (didScheduleRenderPhaseUpdateDuringThisPass);
|
|
8583
8495
|
return children;
|
|
8584
8496
|
}
|
|
@@ -9913,15 +9825,15 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
9913
9825
|
"function" === typeof instance.UNSAFE_componentWillReceiveProps && instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
|
|
9914
9826
|
instance.state !== oldState && (workInProgress$1 = getComponentNameFromFiber(workInProgress$1) || "Component", didWarnAboutStateAssignmentForComponent.has(workInProgress$1) || (didWarnAboutStateAssignmentForComponent.add(workInProgress$1), console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", workInProgress$1)), classComponentUpdater.enqueueReplaceState(instance, instance.state, null));
|
|
9915
9827
|
}
|
|
9916
|
-
function resolveClassComponentProps(Component
|
|
9828
|
+
function resolveClassComponentProps(Component, baseProps) {
|
|
9917
9829
|
var newProps = baseProps;
|
|
9918
9830
|
if ("ref" in baseProps) {
|
|
9919
9831
|
newProps = {};
|
|
9920
9832
|
for (var propName in baseProps) "ref" !== propName && (newProps[propName] = baseProps[propName]);
|
|
9921
9833
|
}
|
|
9922
|
-
if (Component
|
|
9834
|
+
if (Component = Component.defaultProps) {
|
|
9923
9835
|
newProps === baseProps && (newProps = assign({}, newProps));
|
|
9924
|
-
for (var _propName in Component
|
|
9836
|
+
for (var _propName in Component) void 0 === newProps[_propName] && (newProps[_propName] = Component[_propName]);
|
|
9925
9837
|
}
|
|
9926
9838
|
return newProps;
|
|
9927
9839
|
}
|
|
@@ -10033,8 +9945,8 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10033
9945
|
function reconcileChildren(current$1, workInProgress$1, nextChildren, renderLanes$1) {
|
|
10034
9946
|
workInProgress$1.child = null === current$1 ? mountChildFibers(workInProgress$1, null, nextChildren, renderLanes$1) : reconcileChildFibers(workInProgress$1, current$1.child, nextChildren, renderLanes$1);
|
|
10035
9947
|
}
|
|
10036
|
-
function updateForwardRef(current$1, workInProgress$1, Component
|
|
10037
|
-
Component
|
|
9948
|
+
function updateForwardRef(current$1, workInProgress$1, Component, nextProps, renderLanes$1) {
|
|
9949
|
+
Component = Component.render;
|
|
10038
9950
|
var ref = workInProgress$1.ref;
|
|
10039
9951
|
if ("ref" in nextProps) {
|
|
10040
9952
|
var propsWithoutRef = {};
|
|
@@ -10042,7 +9954,7 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10042
9954
|
} else propsWithoutRef = nextProps;
|
|
10043
9955
|
prepareToReadContext(workInProgress$1);
|
|
10044
9956
|
markComponentRenderStarted(workInProgress$1);
|
|
10045
|
-
nextProps = renderWithHooks(current$1, workInProgress$1, Component
|
|
9957
|
+
nextProps = renderWithHooks(current$1, workInProgress$1, Component, propsWithoutRef, ref, renderLanes$1);
|
|
10046
9958
|
key = checkDidRenderIdHook();
|
|
10047
9959
|
markComponentRenderStopped();
|
|
10048
9960
|
if (null !== current$1 && !didReceiveUpdate) return bailoutHooks(current$1, workInProgress$1, renderLanes$1), bailoutOnAlreadyFinishedWork(current$1, workInProgress$1, renderLanes$1);
|
|
@@ -10051,11 +9963,11 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10051
9963
|
reconcileChildren(current$1, workInProgress$1, nextProps, renderLanes$1);
|
|
10052
9964
|
return workInProgress$1.child;
|
|
10053
9965
|
}
|
|
10054
|
-
function updateMemoComponent(current$1, workInProgress$1, Component
|
|
9966
|
+
function updateMemoComponent(current$1, workInProgress$1, Component, nextProps, renderLanes$1) {
|
|
10055
9967
|
if (null === current$1) {
|
|
10056
|
-
var type = Component
|
|
10057
|
-
if ("function" === typeof type && !shouldConstruct(type) && void 0 === type.defaultProps && null === Component
|
|
10058
|
-
current$1 = createFiberFromTypeAndProps(Component
|
|
9968
|
+
var type = Component.type;
|
|
9969
|
+
if ("function" === typeof type && !shouldConstruct(type) && void 0 === type.defaultProps && null === Component.compare) return Component = resolveFunctionForHotReloading(type), workInProgress$1.tag = 15, workInProgress$1.type = Component, validateFunctionComponentInDev(workInProgress$1, type), updateSimpleMemoComponent(current$1, workInProgress$1, Component, nextProps, renderLanes$1);
|
|
9970
|
+
current$1 = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress$1, workInProgress$1.mode, renderLanes$1);
|
|
10059
9971
|
current$1.ref = workInProgress$1.ref;
|
|
10060
9972
|
current$1.return = workInProgress$1;
|
|
10061
9973
|
return workInProgress$1.child = current$1;
|
|
@@ -10063,9 +9975,9 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10063
9975
|
type = current$1.child;
|
|
10064
9976
|
if (!checkScheduledUpdateOrContext(current$1, renderLanes$1)) {
|
|
10065
9977
|
var prevProps = type.memoizedProps;
|
|
10066
|
-
Component
|
|
10067
|
-
Component
|
|
10068
|
-
if (Component
|
|
9978
|
+
Component = Component.compare;
|
|
9979
|
+
Component = null !== Component ? Component : shallowEqual;
|
|
9980
|
+
if (Component(prevProps, nextProps) && current$1.ref === workInProgress$1.ref) return bailoutOnAlreadyFinishedWork(current$1, workInProgress$1, renderLanes$1);
|
|
10069
9981
|
}
|
|
10070
9982
|
workInProgress$1.flags |= 1;
|
|
10071
9983
|
current$1 = createWorkInProgress(type, nextProps);
|
|
@@ -10073,13 +9985,13 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10073
9985
|
current$1.return = workInProgress$1;
|
|
10074
9986
|
return workInProgress$1.child = current$1;
|
|
10075
9987
|
}
|
|
10076
|
-
function updateSimpleMemoComponent(current$1, workInProgress$1, Component
|
|
9988
|
+
function updateSimpleMemoComponent(current$1, workInProgress$1, Component, nextProps, renderLanes$1) {
|
|
10077
9989
|
if (null !== current$1) {
|
|
10078
9990
|
var prevProps = current$1.memoizedProps;
|
|
10079
9991
|
if (shallowEqual(prevProps, nextProps) && current$1.ref === workInProgress$1.ref && workInProgress$1.type === current$1.type) if (didReceiveUpdate = !1, workInProgress$1.pendingProps = nextProps = prevProps, checkScheduledUpdateOrContext(current$1, renderLanes$1)) 0 !== (current$1.flags & 131072) && (didReceiveUpdate = !0);
|
|
10080
9992
|
else return workInProgress$1.lanes = current$1.lanes, bailoutOnAlreadyFinishedWork(current$1, workInProgress$1, renderLanes$1);
|
|
10081
9993
|
}
|
|
10082
|
-
return updateFunctionComponent(current$1, workInProgress$1, Component
|
|
9994
|
+
return updateFunctionComponent(current$1, workInProgress$1, Component, nextProps, renderLanes$1);
|
|
10083
9995
|
}
|
|
10084
9996
|
function updateOffscreenComponent(current$1, workInProgress$1, renderLanes$1) {
|
|
10085
9997
|
var nextProps = workInProgress$1.pendingProps, nextChildren = nextProps.children, prevState = null !== current$1 ? current$1.memoizedState : null;
|
|
@@ -10126,41 +10038,41 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10126
10038
|
if (null === current$1 || current$1.ref !== ref) workInProgress$1.flags |= 4194816;
|
|
10127
10039
|
}
|
|
10128
10040
|
}
|
|
10129
|
-
function updateFunctionComponent(current$1, workInProgress$1, Component
|
|
10130
|
-
if (Component
|
|
10131
|
-
var componentName$1 = getComponentNameFromType(Component
|
|
10041
|
+
function updateFunctionComponent(current$1, workInProgress$1, Component, nextProps, renderLanes$1) {
|
|
10042
|
+
if (Component.prototype && "function" === typeof Component.prototype.render) {
|
|
10043
|
+
var componentName$1 = getComponentNameFromType(Component) || "Unknown";
|
|
10132
10044
|
didWarnAboutBadClass[componentName$1] || (console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.", componentName$1, componentName$1), didWarnAboutBadClass[componentName$1] = !0);
|
|
10133
10045
|
}
|
|
10134
10046
|
workInProgress$1.mode & 8 && ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress$1, null);
|
|
10135
|
-
null === current$1 && (validateFunctionComponentInDev(workInProgress$1, workInProgress$1.type), Component
|
|
10047
|
+
null === current$1 && (validateFunctionComponentInDev(workInProgress$1, workInProgress$1.type), Component.contextTypes && (componentName$1 = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypes[componentName$1] || (didWarnAboutContextTypes[componentName$1] = !0, console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)", componentName$1))));
|
|
10136
10048
|
prepareToReadContext(workInProgress$1);
|
|
10137
10049
|
markComponentRenderStarted(workInProgress$1);
|
|
10138
|
-
Component
|
|
10050
|
+
Component = renderWithHooks(current$1, workInProgress$1, Component, nextProps, void 0, renderLanes$1);
|
|
10139
10051
|
nextProps = checkDidRenderIdHook();
|
|
10140
10052
|
markComponentRenderStopped();
|
|
10141
10053
|
if (null !== current$1 && !didReceiveUpdate) return bailoutHooks(current$1, workInProgress$1, renderLanes$1), bailoutOnAlreadyFinishedWork(current$1, workInProgress$1, renderLanes$1);
|
|
10142
10054
|
isHydrating && nextProps && pushMaterializedTreeId(workInProgress$1);
|
|
10143
10055
|
workInProgress$1.flags |= 1;
|
|
10144
|
-
reconcileChildren(current$1, workInProgress$1, Component
|
|
10056
|
+
reconcileChildren(current$1, workInProgress$1, Component, renderLanes$1);
|
|
10145
10057
|
return workInProgress$1.child;
|
|
10146
10058
|
}
|
|
10147
|
-
function replayFunctionComponent(current$1, workInProgress$1, nextProps, Component
|
|
10059
|
+
function replayFunctionComponent(current$1, workInProgress$1, nextProps, Component, secondArg, renderLanes$1) {
|
|
10148
10060
|
prepareToReadContext(workInProgress$1);
|
|
10149
10061
|
markComponentRenderStarted(workInProgress$1);
|
|
10150
10062
|
hookTypesUpdateIndexDev = -1;
|
|
10151
10063
|
ignorePreviousDependencies = null !== current$1 && current$1.type !== workInProgress$1.type;
|
|
10152
10064
|
workInProgress$1.updateQueue = null;
|
|
10153
|
-
nextProps = renderWithHooksAgain(workInProgress$1, Component
|
|
10065
|
+
nextProps = renderWithHooksAgain(workInProgress$1, Component, nextProps, secondArg);
|
|
10154
10066
|
finishRenderingHooks(current$1, workInProgress$1);
|
|
10155
|
-
Component
|
|
10067
|
+
Component = checkDidRenderIdHook();
|
|
10156
10068
|
markComponentRenderStopped();
|
|
10157
10069
|
if (null !== current$1 && !didReceiveUpdate) return bailoutHooks(current$1, workInProgress$1, renderLanes$1), bailoutOnAlreadyFinishedWork(current$1, workInProgress$1, renderLanes$1);
|
|
10158
|
-
isHydrating && Component
|
|
10070
|
+
isHydrating && Component && pushMaterializedTreeId(workInProgress$1);
|
|
10159
10071
|
workInProgress$1.flags |= 1;
|
|
10160
10072
|
reconcileChildren(current$1, workInProgress$1, nextProps, renderLanes$1);
|
|
10161
10073
|
return workInProgress$1.child;
|
|
10162
10074
|
}
|
|
10163
|
-
function updateClassComponent(current$1, workInProgress$1, Component
|
|
10075
|
+
function updateClassComponent(current$1, workInProgress$1, Component, nextProps, renderLanes$1) {
|
|
10164
10076
|
switch (shouldErrorImpl(workInProgress$1)) {
|
|
10165
10077
|
case !1:
|
|
10166
10078
|
var _instance = workInProgress$1.stateNode, state = new workInProgress$1.type(workInProgress$1.memoizedProps, _instance.context).state;
|
|
@@ -10181,14 +10093,14 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10181
10093
|
prepareToReadContext(workInProgress$1);
|
|
10182
10094
|
if (null === workInProgress$1.stateNode) {
|
|
10183
10095
|
state = emptyContextObject;
|
|
10184
|
-
_instance = Component
|
|
10185
|
-
"contextType" in Component
|
|
10096
|
+
_instance = Component.contextType;
|
|
10097
|
+
"contextType" in Component && null !== _instance && (void 0 === _instance || _instance.$$typeof !== REACT_CONTEXT_TYPE) && !didWarnAboutInvalidateContextType.has(Component) && (didWarnAboutInvalidateContextType.add(Component), lane = void 0 === _instance ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." : "object" !== typeof _instance ? " However, it is set to a " + typeof _instance + "." : _instance.$$typeof === REACT_CONSUMER_TYPE ? " Did you accidentally pass the Context.Consumer instead?" : " However, it is set to an object with keys {" + Object.keys(_instance).join(", ") + "}.", console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", getComponentNameFromType(Component) || "Component", lane));
|
|
10186
10098
|
"object" === typeof _instance && null !== _instance && (state = readContext(_instance));
|
|
10187
|
-
_instance = new Component
|
|
10099
|
+
_instance = new Component(nextProps, state);
|
|
10188
10100
|
if (workInProgress$1.mode & 8) {
|
|
10189
10101
|
setIsStrictModeForDevtools(!0);
|
|
10190
10102
|
try {
|
|
10191
|
-
_instance = new Component
|
|
10103
|
+
_instance = new Component(nextProps, state);
|
|
10192
10104
|
} finally {
|
|
10193
10105
|
setIsStrictModeForDevtools(!1);
|
|
10194
10106
|
}
|
|
@@ -10198,28 +10110,28 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10198
10110
|
workInProgress$1.stateNode = _instance;
|
|
10199
10111
|
_instance._reactInternals = workInProgress$1;
|
|
10200
10112
|
_instance._reactInternalInstance = fakeInternalInstance;
|
|
10201
|
-
"function" === typeof Component
|
|
10202
|
-
if ("function" === typeof Component
|
|
10113
|
+
"function" === typeof Component.getDerivedStateFromProps && null === state && (state = getComponentNameFromType(Component) || "Component", didWarnAboutUninitializedState.has(state) || (didWarnAboutUninitializedState.add(state), console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", state, null === _instance.state ? "null" : "undefined", state)));
|
|
10114
|
+
if ("function" === typeof Component.getDerivedStateFromProps || "function" === typeof _instance.getSnapshotBeforeUpdate) {
|
|
10203
10115
|
var foundWillUpdateName = lane = state = null;
|
|
10204
10116
|
"function" === typeof _instance.componentWillMount && !0 !== _instance.componentWillMount.__suppressDeprecationWarning ? state = "componentWillMount" : "function" === typeof _instance.UNSAFE_componentWillMount && (state = "UNSAFE_componentWillMount");
|
|
10205
10117
|
"function" === typeof _instance.componentWillReceiveProps && !0 !== _instance.componentWillReceiveProps.__suppressDeprecationWarning ? lane = "componentWillReceiveProps" : "function" === typeof _instance.UNSAFE_componentWillReceiveProps && (lane = "UNSAFE_componentWillReceiveProps");
|
|
10206
10118
|
"function" === typeof _instance.componentWillUpdate && !0 !== _instance.componentWillUpdate.__suppressDeprecationWarning ? foundWillUpdateName = "componentWillUpdate" : "function" === typeof _instance.UNSAFE_componentWillUpdate && (foundWillUpdateName = "UNSAFE_componentWillUpdate");
|
|
10207
10119
|
if (null !== state || null !== lane || null !== foundWillUpdateName) {
|
|
10208
|
-
_instance = getComponentNameFromType(Component
|
|
10209
|
-
var newApiName = "function" === typeof Component
|
|
10120
|
+
_instance = getComponentNameFromType(Component) || "Component";
|
|
10121
|
+
var newApiName = "function" === typeof Component.getDerivedStateFromProps ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
|
|
10210
10122
|
didWarnAboutLegacyLifecyclesAndDerivedState.has(_instance) || (didWarnAboutLegacyLifecyclesAndDerivedState.add(_instance), console.error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles", _instance, newApiName, null !== state ? "\n " + state : "", null !== lane ? "\n " + lane : "", null !== foundWillUpdateName ? "\n " + foundWillUpdateName : ""));
|
|
10211
10123
|
}
|
|
10212
10124
|
}
|
|
10213
10125
|
_instance = workInProgress$1.stateNode;
|
|
10214
|
-
state = getComponentNameFromType(Component
|
|
10215
|
-
_instance.render || (Component
|
|
10126
|
+
state = getComponentNameFromType(Component) || "Component";
|
|
10127
|
+
_instance.render || (Component.prototype && "function" === typeof Component.prototype.render ? console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?", state) : console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.", state));
|
|
10216
10128
|
!_instance.getInitialState || _instance.getInitialState.isReactClassApproved || _instance.state || console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", state);
|
|
10217
10129
|
_instance.getDefaultProps && !_instance.getDefaultProps.isReactClassApproved && console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", state);
|
|
10218
10130
|
_instance.contextType && console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.", state);
|
|
10219
|
-
Component
|
|
10220
|
-
Component
|
|
10131
|
+
Component.childContextTypes && !didWarnAboutChildContextTypes.has(Component) && (didWarnAboutChildContextTypes.add(Component), console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)", state));
|
|
10132
|
+
Component.contextTypes && !didWarnAboutContextTypes$1.has(Component) && (didWarnAboutContextTypes$1.add(Component), console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", state));
|
|
10221
10133
|
"function" === typeof _instance.componentShouldUpdate && console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", state);
|
|
10222
|
-
Component
|
|
10134
|
+
Component.prototype && Component.prototype.isPureReactComponent && "undefined" !== typeof _instance.shouldComponentUpdate && console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", getComponentNameFromType(Component) || "A pure component");
|
|
10223
10135
|
"function" === typeof _instance.componentDidUnmount && console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", state);
|
|
10224
10136
|
"function" === typeof _instance.componentDidReceiveProps && console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", state);
|
|
10225
10137
|
"function" === typeof _instance.componentWillRecieveProps && console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", state);
|
|
@@ -10227,39 +10139,39 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10227
10139
|
lane = _instance.props !== nextProps;
|
|
10228
10140
|
void 0 !== _instance.props && lane && console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", state);
|
|
10229
10141
|
_instance.defaultProps && console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", state, state);
|
|
10230
|
-
"function" !== typeof _instance.getSnapshotBeforeUpdate || "function" === typeof _instance.componentDidUpdate || didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component
|
|
10142
|
+
"function" !== typeof _instance.getSnapshotBeforeUpdate || "function" === typeof _instance.componentDidUpdate || didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", getComponentNameFromType(Component)));
|
|
10231
10143
|
"function" === typeof _instance.getDerivedStateFromProps && console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", state);
|
|
10232
10144
|
"function" === typeof _instance.getDerivedStateFromError && console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", state);
|
|
10233
|
-
"function" === typeof Component
|
|
10145
|
+
"function" === typeof Component.getSnapshotBeforeUpdate && console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", state);
|
|
10234
10146
|
(lane = _instance.state) && ("object" !== typeof lane || isArrayImpl(lane)) && console.error("%s.state: must be set to an object or null", state);
|
|
10235
|
-
"function" === typeof _instance.getChildContext && "object" !== typeof Component
|
|
10147
|
+
"function" === typeof _instance.getChildContext && "object" !== typeof Component.childContextTypes && console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", state);
|
|
10236
10148
|
_instance = workInProgress$1.stateNode;
|
|
10237
10149
|
_instance.props = nextProps;
|
|
10238
10150
|
_instance.state = workInProgress$1.memoizedState;
|
|
10239
10151
|
_instance.refs = {};
|
|
10240
10152
|
initializeUpdateQueue(workInProgress$1);
|
|
10241
|
-
state = Component
|
|
10153
|
+
state = Component.contextType;
|
|
10242
10154
|
_instance.context = "object" === typeof state && null !== state ? readContext(state) : emptyContextObject;
|
|
10243
|
-
_instance.state === nextProps && (state = getComponentNameFromType(Component
|
|
10155
|
+
_instance.state === nextProps && (state = getComponentNameFromType(Component) || "Component", didWarnAboutDirectlyAssigningPropsToState.has(state) || (didWarnAboutDirectlyAssigningPropsToState.add(state), console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", state)));
|
|
10244
10156
|
workInProgress$1.mode & 8 && ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress$1, _instance);
|
|
10245
10157
|
ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress$1, _instance);
|
|
10246
10158
|
_instance.state = workInProgress$1.memoizedState;
|
|
10247
|
-
state = Component
|
|
10248
|
-
"function" === typeof state && (applyDerivedStateFromProps(workInProgress$1, Component
|
|
10249
|
-
"function" === typeof Component
|
|
10159
|
+
state = Component.getDerivedStateFromProps;
|
|
10160
|
+
"function" === typeof state && (applyDerivedStateFromProps(workInProgress$1, Component, state, nextProps), _instance.state = workInProgress$1.memoizedState);
|
|
10161
|
+
"function" === typeof Component.getDerivedStateFromProps || "function" === typeof _instance.getSnapshotBeforeUpdate || "function" !== typeof _instance.UNSAFE_componentWillMount && "function" !== typeof _instance.componentWillMount || (state = _instance.state, "function" === typeof _instance.componentWillMount && _instance.componentWillMount(), "function" === typeof _instance.UNSAFE_componentWillMount && _instance.UNSAFE_componentWillMount(), state !== _instance.state && (console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", getComponentNameFromFiber(workInProgress$1) || "Component"), classComponentUpdater.enqueueReplaceState(_instance, _instance.state, null)), processUpdateQueue(workInProgress$1, nextProps, _instance, renderLanes$1), suspendIfUpdateReadFromEntangledAsyncAction(), _instance.state = workInProgress$1.memoizedState);
|
|
10250
10162
|
"function" === typeof _instance.componentDidMount && (workInProgress$1.flags |= 4194308);
|
|
10251
10163
|
(workInProgress$1.mode & 16) !== NoMode && (workInProgress$1.flags |= 134217728);
|
|
10252
10164
|
_instance = !0;
|
|
10253
10165
|
} else if (null === current$1) {
|
|
10254
10166
|
_instance = workInProgress$1.stateNode;
|
|
10255
10167
|
var unresolvedOldProps = workInProgress$1.memoizedProps;
|
|
10256
|
-
lane = resolveClassComponentProps(Component
|
|
10168
|
+
lane = resolveClassComponentProps(Component, unresolvedOldProps);
|
|
10257
10169
|
_instance.props = lane;
|
|
10258
10170
|
var oldContext = _instance.context;
|
|
10259
|
-
foundWillUpdateName = Component
|
|
10171
|
+
foundWillUpdateName = Component.contextType;
|
|
10260
10172
|
state = emptyContextObject;
|
|
10261
10173
|
"object" === typeof foundWillUpdateName && null !== foundWillUpdateName && (state = readContext(foundWillUpdateName));
|
|
10262
|
-
newApiName = Component
|
|
10174
|
+
newApiName = Component.getDerivedStateFromProps;
|
|
10263
10175
|
foundWillUpdateName = "function" === typeof newApiName || "function" === typeof _instance.getSnapshotBeforeUpdate;
|
|
10264
10176
|
unresolvedOldProps = workInProgress$1.pendingProps !== unresolvedOldProps;
|
|
10265
10177
|
foundWillUpdateName || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (unresolvedOldProps || oldContext !== state) && callComponentWillReceiveProps(workInProgress$1, _instance, nextProps, state);
|
|
@@ -10269,19 +10181,19 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10269
10181
|
processUpdateQueue(workInProgress$1, nextProps, _instance, renderLanes$1);
|
|
10270
10182
|
suspendIfUpdateReadFromEntangledAsyncAction();
|
|
10271
10183
|
oldContext = workInProgress$1.memoizedState;
|
|
10272
|
-
unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? ("function" === typeof newApiName && (applyDerivedStateFromProps(workInProgress$1, Component
|
|
10184
|
+
unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? ("function" === typeof newApiName && (applyDerivedStateFromProps(workInProgress$1, Component, newApiName, nextProps), oldContext = workInProgress$1.memoizedState), (lane = hasForceUpdate || checkShouldComponentUpdate(workInProgress$1, Component, lane, nextProps, oldState, oldContext, state)) ? (foundWillUpdateName || "function" !== typeof _instance.UNSAFE_componentWillMount && "function" !== typeof _instance.componentWillMount || ("function" === typeof _instance.componentWillMount && _instance.componentWillMount(), "function" === typeof _instance.UNSAFE_componentWillMount && _instance.UNSAFE_componentWillMount()), "function" === typeof _instance.componentDidMount && (workInProgress$1.flags |= 4194308), (workInProgress$1.mode & 16) !== NoMode && (workInProgress$1.flags |= 134217728)) : ("function" === typeof _instance.componentDidMount && (workInProgress$1.flags |= 4194308), (workInProgress$1.mode & 16) !== NoMode && (workInProgress$1.flags |= 134217728), workInProgress$1.memoizedProps = nextProps, workInProgress$1.memoizedState = oldContext), _instance.props = nextProps, _instance.state = oldContext, _instance.context = state, _instance = lane) : ("function" === typeof _instance.componentDidMount && (workInProgress$1.flags |= 4194308), (workInProgress$1.mode & 16) !== NoMode && (workInProgress$1.flags |= 134217728), _instance = !1);
|
|
10273
10185
|
} else {
|
|
10274
10186
|
_instance = workInProgress$1.stateNode;
|
|
10275
10187
|
cloneUpdateQueue(current$1, workInProgress$1);
|
|
10276
10188
|
state = workInProgress$1.memoizedProps;
|
|
10277
|
-
foundWillUpdateName = resolveClassComponentProps(Component
|
|
10189
|
+
foundWillUpdateName = resolveClassComponentProps(Component, state);
|
|
10278
10190
|
_instance.props = foundWillUpdateName;
|
|
10279
10191
|
newApiName = workInProgress$1.pendingProps;
|
|
10280
10192
|
oldState = _instance.context;
|
|
10281
|
-
oldContext = Component
|
|
10193
|
+
oldContext = Component.contextType;
|
|
10282
10194
|
lane = emptyContextObject;
|
|
10283
10195
|
"object" === typeof oldContext && null !== oldContext && (lane = readContext(oldContext));
|
|
10284
|
-
unresolvedOldProps = Component
|
|
10196
|
+
unresolvedOldProps = Component.getDerivedStateFromProps;
|
|
10285
10197
|
(oldContext = "function" === typeof unresolvedOldProps || "function" === typeof _instance.getSnapshotBeforeUpdate) || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (state !== newApiName || oldState !== lane) && callComponentWillReceiveProps(workInProgress$1, _instance, nextProps, lane);
|
|
10286
10198
|
hasForceUpdate = !1;
|
|
10287
10199
|
oldState = workInProgress$1.memoizedState;
|
|
@@ -10289,7 +10201,7 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10289
10201
|
processUpdateQueue(workInProgress$1, nextProps, _instance, renderLanes$1);
|
|
10290
10202
|
suspendIfUpdateReadFromEntangledAsyncAction();
|
|
10291
10203
|
var newState = workInProgress$1.memoizedState;
|
|
10292
|
-
state !== newApiName || oldState !== newState || hasForceUpdate || null !== current$1 && null !== current$1.dependencies && checkIfContextChanged(current$1.dependencies) ? ("function" === typeof unresolvedOldProps && (applyDerivedStateFromProps(workInProgress$1, Component
|
|
10204
|
+
state !== newApiName || oldState !== newState || hasForceUpdate || null !== current$1 && null !== current$1.dependencies && checkIfContextChanged(current$1.dependencies) ? ("function" === typeof unresolvedOldProps && (applyDerivedStateFromProps(workInProgress$1, Component, unresolvedOldProps, nextProps), newState = workInProgress$1.memoizedState), (foundWillUpdateName = hasForceUpdate || checkShouldComponentUpdate(workInProgress$1, Component, foundWillUpdateName, nextProps, oldState, newState, lane) || null !== current$1 && null !== current$1.dependencies && checkIfContextChanged(current$1.dependencies)) ? (oldContext || "function" !== typeof _instance.UNSAFE_componentWillUpdate && "function" !== typeof _instance.componentWillUpdate || ("function" === typeof _instance.componentWillUpdate && _instance.componentWillUpdate(nextProps, newState, lane), "function" === typeof _instance.UNSAFE_componentWillUpdate && _instance.UNSAFE_componentWillUpdate(nextProps, newState, lane)), "function" === typeof _instance.componentDidUpdate && (workInProgress$1.flags |= 4), "function" === typeof _instance.getSnapshotBeforeUpdate && (workInProgress$1.flags |= 1024)) : ("function" !== typeof _instance.componentDidUpdate || state === current$1.memoizedProps && oldState === current$1.memoizedState || (workInProgress$1.flags |= 4), "function" !== typeof _instance.getSnapshotBeforeUpdate || state === current$1.memoizedProps && oldState === current$1.memoizedState || (workInProgress$1.flags |= 1024), workInProgress$1.memoizedProps = nextProps, workInProgress$1.memoizedState = newState), _instance.props = nextProps, _instance.state = newState, _instance.context = lane, _instance = foundWillUpdateName) : ("function" !== typeof _instance.componentDidUpdate || state === current$1.memoizedProps && oldState === current$1.memoizedState || (workInProgress$1.flags |= 4), "function" !== typeof _instance.getSnapshotBeforeUpdate || state === current$1.memoizedProps && oldState === current$1.memoizedState || (workInProgress$1.flags |= 1024), _instance = !1);
|
|
10293
10205
|
}
|
|
10294
10206
|
lane = _instance;
|
|
10295
10207
|
markRef(current$1, workInProgress$1);
|
|
@@ -10297,10 +10209,10 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10297
10209
|
if (lane || state) {
|
|
10298
10210
|
lane = workInProgress$1.stateNode;
|
|
10299
10211
|
setCurrentFiber(workInProgress$1);
|
|
10300
|
-
if (state && "function" !== typeof Component
|
|
10212
|
+
if (state && "function" !== typeof Component.getDerivedStateFromError) Component = null, profilerStartTime = -1;
|
|
10301
10213
|
else {
|
|
10302
10214
|
markComponentRenderStarted(workInProgress$1);
|
|
10303
|
-
Component
|
|
10215
|
+
Component = callRenderInDEV(lane);
|
|
10304
10216
|
if (workInProgress$1.mode & 8) {
|
|
10305
10217
|
setIsStrictModeForDevtools(!0);
|
|
10306
10218
|
try {
|
|
@@ -10312,7 +10224,7 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10312
10224
|
markComponentRenderStopped();
|
|
10313
10225
|
}
|
|
10314
10226
|
workInProgress$1.flags |= 1;
|
|
10315
|
-
null !== current$1 && state ? (workInProgress$1.child = reconcileChildFibers(workInProgress$1, current$1.child, null, renderLanes$1), workInProgress$1.child = reconcileChildFibers(workInProgress$1, null, Component
|
|
10227
|
+
null !== current$1 && state ? (workInProgress$1.child = reconcileChildFibers(workInProgress$1, current$1.child, null, renderLanes$1), workInProgress$1.child = reconcileChildFibers(workInProgress$1, null, Component, renderLanes$1)) : reconcileChildren(current$1, workInProgress$1, Component, renderLanes$1);
|
|
10316
10228
|
workInProgress$1.memoizedState = lane.state;
|
|
10317
10229
|
current$1 = workInProgress$1.child;
|
|
10318
10230
|
} else current$1 = bailoutOnAlreadyFinishedWork(current$1, workInProgress$1, renderLanes$1);
|
|
@@ -10326,10 +10238,10 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
10326
10238
|
reconcileChildren(current$1, workInProgress$1, nextChildren, renderLanes$1);
|
|
10327
10239
|
return workInProgress$1.child;
|
|
10328
10240
|
}
|
|
10329
|
-
function validateFunctionComponentInDev(workInProgress$1, Component
|
|
10330
|
-
Component
|
|
10331
|
-
"function" === typeof Component
|
|
10332
|
-
"object" === typeof Component
|
|
10241
|
+
function validateFunctionComponentInDev(workInProgress$1, Component) {
|
|
10242
|
+
Component && Component.childContextTypes && console.error("childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...", Component.displayName || Component.name || "Component");
|
|
10243
|
+
"function" === typeof Component.getDerivedStateFromProps && (workInProgress$1 = getComponentNameFromType(Component) || "Unknown", didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress$1] || (console.error("%s: Function components do not support getDerivedStateFromProps.", workInProgress$1), didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress$1] = !0));
|
|
10244
|
+
"object" === typeof Component.contextType && null !== Component.contextType && (Component = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypeOnFunctionComponent[Component] || (console.error("%s: Function components do not support contextType.", Component), didWarnAboutContextTypeOnFunctionComponent[Component] = !0));
|
|
10333
10245
|
}
|
|
10334
10246
|
function mountSuspenseOffscreenState(renderLanes$1) {
|
|
10335
10247
|
return {
|
|
@@ -13205,9 +13117,9 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
13205
13117
|
this._debugHookTypes = null;
|
|
13206
13118
|
hasBadMapPolyfill || "function" !== typeof Object.preventExtensions || Object.preventExtensions(this);
|
|
13207
13119
|
}
|
|
13208
|
-
function shouldConstruct(Component
|
|
13209
|
-
Component
|
|
13210
|
-
return !(!Component
|
|
13120
|
+
function shouldConstruct(Component) {
|
|
13121
|
+
Component = Component.prototype;
|
|
13122
|
+
return !(!Component || !Component.isReactComponent);
|
|
13211
13123
|
}
|
|
13212
13124
|
function createWorkInProgress(current$1, pendingProps) {
|
|
13213
13125
|
var workInProgress$1 = current$1.alternate;
|
|
@@ -14567,11 +14479,11 @@ var require_react_reconciler_development = /* @__PURE__ */ require_chunk.__commo
|
|
|
14567
14479
|
return updateWorkInProgressHook().memoizedState;
|
|
14568
14480
|
}
|
|
14569
14481
|
};
|
|
14570
|
-
var callComponent = { "react-stack-bottom-frame": function(Component
|
|
14482
|
+
var callComponent = { "react-stack-bottom-frame": function(Component, props, secondArg) {
|
|
14571
14483
|
var wasRendering = isRendering;
|
|
14572
14484
|
isRendering = !0;
|
|
14573
14485
|
try {
|
|
14574
|
-
return Component
|
|
14486
|
+
return Component(props, secondArg);
|
|
14575
14487
|
} finally {
|
|
14576
14488
|
isRendering = wasRendering;
|
|
14577
14489
|
}
|
|
@@ -15119,6 +15031,7 @@ var require_react_reconciler = /* @__PURE__ */ require_chunk.__commonJSMin(((exp
|
|
|
15119
15031
|
|
|
15120
15032
|
//#endregion
|
|
15121
15033
|
//#region src/Renderer.ts
|
|
15034
|
+
var import_react = /* @__PURE__ */ require_chunk.__toESM(require_react$1.require_react(), 1);
|
|
15122
15035
|
var import_react_reconciler = /* @__PURE__ */ require_chunk.__toESM(require_react_reconciler(), 1);
|
|
15123
15036
|
var import_constants = require_constants();
|
|
15124
15037
|
let currentUpdatePriority = import_constants.NoEventPriority;
|
|
@@ -15176,7 +15089,7 @@ const Renderer = (0, import_react_reconciler.default)({
|
|
|
15176
15089
|
appendInitialChild: appendChildNode,
|
|
15177
15090
|
appendChild: appendChildNode,
|
|
15178
15091
|
insertBefore: insertBeforeNode,
|
|
15179
|
-
finalizeInitialChildren(_node, _type, _props, _rootNode
|
|
15092
|
+
finalizeInitialChildren(_node, _type, _props, _rootNode) {
|
|
15180
15093
|
return false;
|
|
15181
15094
|
},
|
|
15182
15095
|
supportsMutation: true,
|
|
@@ -15244,414 +15157,28 @@ const Renderer = (0, import_react_reconciler.default)({
|
|
|
15244
15157
|
});
|
|
15245
15158
|
|
|
15246
15159
|
//#endregion
|
|
15247
|
-
|
|
15248
|
-
function squashExportNodes(node) {
|
|
15249
|
-
const exports$1 = /* @__PURE__ */ new Set();
|
|
15250
|
-
const walk = (current) => {
|
|
15251
|
-
for (const child of current.childNodes) {
|
|
15252
|
-
if (!child) continue;
|
|
15253
|
-
if (child.nodeName !== "#text" && nodeNames.has(child.nodeName)) walk(child);
|
|
15254
|
-
if (child.nodeName === "kubb-export") {
|
|
15255
|
-
var _child$attributes$get, _child$attributes$get2;
|
|
15256
|
-
exports$1.add({
|
|
15257
|
-
name: child.attributes.get("name"),
|
|
15258
|
-
path: child.attributes.get("path"),
|
|
15259
|
-
isTypeOnly: (_child$attributes$get = child.attributes.get("isTypeOnly")) !== null && _child$attributes$get !== void 0 ? _child$attributes$get : false,
|
|
15260
|
-
asAlias: (_child$attributes$get2 = child.attributes.get("asAlias")) !== null && _child$attributes$get2 !== void 0 ? _child$attributes$get2 : false
|
|
15261
|
-
});
|
|
15262
|
-
}
|
|
15263
|
-
}
|
|
15264
|
-
};
|
|
15265
|
-
walk(node);
|
|
15266
|
-
return exports$1;
|
|
15267
|
-
}
|
|
15268
|
-
|
|
15269
|
-
//#endregion
|
|
15270
|
-
//#region src/utils/squashImportNodes.ts
|
|
15271
|
-
function squashImportNodes(node) {
|
|
15272
|
-
const imports = /* @__PURE__ */ new Set();
|
|
15273
|
-
const walk = (current) => {
|
|
15274
|
-
for (const child of current.childNodes) {
|
|
15275
|
-
if (!child) continue;
|
|
15276
|
-
if (child.nodeName !== "#text" && nodeNames.has(child.nodeName)) walk(child);
|
|
15277
|
-
if (child.nodeName === "kubb-import") {
|
|
15278
|
-
var _child$attributes$get, _child$attributes$get2;
|
|
15279
|
-
imports.add({
|
|
15280
|
-
name: child.attributes.get("name"),
|
|
15281
|
-
path: child.attributes.get("path"),
|
|
15282
|
-
root: child.attributes.get("root"),
|
|
15283
|
-
isTypeOnly: (_child$attributes$get = child.attributes.get("isTypeOnly")) !== null && _child$attributes$get !== void 0 ? _child$attributes$get : false,
|
|
15284
|
-
isNameSpace: (_child$attributes$get2 = child.attributes.get("isNameSpace")) !== null && _child$attributes$get2 !== void 0 ? _child$attributes$get2 : false
|
|
15285
|
-
});
|
|
15286
|
-
}
|
|
15287
|
-
}
|
|
15288
|
-
};
|
|
15289
|
-
walk(node);
|
|
15290
|
-
return imports;
|
|
15291
|
-
}
|
|
15292
|
-
|
|
15293
|
-
//#endregion
|
|
15294
|
-
//#region src/utils/squashTextNodes.ts
|
|
15295
|
-
function squashTextNodes(node) {
|
|
15296
|
-
let text = "";
|
|
15297
|
-
const walk = (current) => {
|
|
15298
|
-
let content = "";
|
|
15299
|
-
for (const child of current.childNodes) {
|
|
15300
|
-
if (!child) continue;
|
|
15301
|
-
let nodeText = "";
|
|
15302
|
-
const getPrintText = (text$1) => {
|
|
15303
|
-
switch (child.nodeName) {
|
|
15304
|
-
case "kubb-import": return (0, _kubb_fabric_core_parsers_typescript.print)((0, _kubb_fabric_core_parsers_typescript.createImport)({
|
|
15305
|
-
name: child.attributes.get("name"),
|
|
15306
|
-
path: child.attributes.get("path"),
|
|
15307
|
-
root: child.attributes.get("root"),
|
|
15308
|
-
isTypeOnly: child.attributes.get("isTypeOnly"),
|
|
15309
|
-
isNameSpace: child.attributes.get("isNameSpace")
|
|
15310
|
-
}));
|
|
15311
|
-
case "kubb-export":
|
|
15312
|
-
if (child.attributes.has("path")) return (0, _kubb_fabric_core_parsers_typescript.print)((0, _kubb_fabric_core_parsers_typescript.createExport)({
|
|
15313
|
-
name: child.attributes.get("name"),
|
|
15314
|
-
path: child.attributes.get("path"),
|
|
15315
|
-
isTypeOnly: child.attributes.get("isTypeOnly"),
|
|
15316
|
-
asAlias: child.attributes.get("asAlias")
|
|
15317
|
-
}));
|
|
15318
|
-
return "";
|
|
15319
|
-
case "kubb-source": return text$1;
|
|
15320
|
-
default: return text$1;
|
|
15321
|
-
}
|
|
15322
|
-
};
|
|
15323
|
-
if (child.nodeName === "#text") nodeText = child.nodeValue;
|
|
15324
|
-
else {
|
|
15325
|
-
if (child.nodeName === "kubb-text" || child.nodeName === "kubb-file" || child.nodeName === "kubb-source") nodeText = walk(child);
|
|
15326
|
-
nodeText = getPrintText(nodeText);
|
|
15327
|
-
if (child.nodeName === "br") nodeText = "\n";
|
|
15328
|
-
if (!nodeNames.has(child.nodeName)) {
|
|
15329
|
-
const attributes = child.attributes;
|
|
15330
|
-
let attrString = "";
|
|
15331
|
-
const hasAttributes = attributes.size > 0;
|
|
15332
|
-
for (const [key, value] of attributes) attrString += typeof value === "string" ? ` ${key}="${value}"` : ` ${key}={${String(value)}}`;
|
|
15333
|
-
if (hasAttributes) nodeText = `<${child.nodeName}${attrString}>${walk(child)}</${child.nodeName}>`;
|
|
15334
|
-
else nodeText = `<${child.nodeName}>${walk(child)}</${child.nodeName}>`;
|
|
15335
|
-
}
|
|
15336
|
-
}
|
|
15337
|
-
content += nodeText;
|
|
15338
|
-
}
|
|
15339
|
-
return content;
|
|
15340
|
-
};
|
|
15341
|
-
text = walk(node);
|
|
15342
|
-
return text;
|
|
15343
|
-
}
|
|
15344
|
-
|
|
15345
|
-
//#endregion
|
|
15346
|
-
//#region src/utils/squashSourceNodes.ts
|
|
15347
|
-
function squashSourceNodes(node, ignores) {
|
|
15348
|
-
const ignoreSet = new Set(ignores);
|
|
15349
|
-
const sources = /* @__PURE__ */ new Set();
|
|
15350
|
-
const walk = (current) => {
|
|
15351
|
-
for (const child of current.childNodes) {
|
|
15352
|
-
if (!child) continue;
|
|
15353
|
-
if (child.nodeName !== "#text" && ignoreSet.has(child.nodeName)) continue;
|
|
15354
|
-
if (child.nodeName === "kubb-source") {
|
|
15355
|
-
var _child$attributes$get, _child$attributes$get2, _child$attributes$get3;
|
|
15356
|
-
const value = squashTextNodes(child);
|
|
15357
|
-
sources.add({
|
|
15358
|
-
name: child.attributes.get("name"),
|
|
15359
|
-
isTypeOnly: (_child$attributes$get = child.attributes.get("isTypeOnly")) !== null && _child$attributes$get !== void 0 ? _child$attributes$get : false,
|
|
15360
|
-
isExportable: (_child$attributes$get2 = child.attributes.get("isExportable")) !== null && _child$attributes$get2 !== void 0 ? _child$attributes$get2 : false,
|
|
15361
|
-
isIndexable: (_child$attributes$get3 = child.attributes.get("isIndexable")) !== null && _child$attributes$get3 !== void 0 ? _child$attributes$get3 : false,
|
|
15362
|
-
value: value.trim().replace(/^\s+|\s+$/g, "")
|
|
15363
|
-
});
|
|
15364
|
-
continue;
|
|
15365
|
-
}
|
|
15366
|
-
if (child.nodeName !== "#text" && nodeNames.has(child.nodeName)) walk(child);
|
|
15367
|
-
}
|
|
15368
|
-
};
|
|
15369
|
-
walk(node);
|
|
15370
|
-
return sources;
|
|
15371
|
-
}
|
|
15372
|
-
|
|
15373
|
-
//#endregion
|
|
15374
|
-
//#region src/utils/processFiles.ts
|
|
15375
|
-
async function processFiles(node) {
|
|
15376
|
-
const collected = [];
|
|
15377
|
-
async function walk(current) {
|
|
15378
|
-
for (const child of current.childNodes) {
|
|
15379
|
-
if (!child) continue;
|
|
15380
|
-
if (child.nodeName !== "#text" && child.nodeName !== "kubb-file" && nodeNames.has(child.nodeName)) await walk(child);
|
|
15381
|
-
if (child.nodeName === "kubb-file") {
|
|
15382
|
-
if (child.attributes.has("baseName") && child.attributes.has("path")) {
|
|
15383
|
-
const sources = squashSourceNodes(child, ["kubb-export", "kubb-import"]);
|
|
15384
|
-
collected.push({
|
|
15385
|
-
baseName: child.attributes.get("baseName"),
|
|
15386
|
-
path: child.attributes.get("path"),
|
|
15387
|
-
meta: child.attributes.get("meta") || {},
|
|
15388
|
-
footer: child.attributes.get("footer"),
|
|
15389
|
-
banner: child.attributes.get("banner"),
|
|
15390
|
-
sources: [...sources],
|
|
15391
|
-
exports: [...squashExportNodes(child)],
|
|
15392
|
-
imports: [...squashImportNodes(child)]
|
|
15393
|
-
});
|
|
15394
|
-
}
|
|
15395
|
-
}
|
|
15396
|
-
}
|
|
15397
|
-
}
|
|
15398
|
-
await walk(node);
|
|
15399
|
-
return collected;
|
|
15400
|
-
}
|
|
15401
|
-
|
|
15402
|
-
//#endregion
|
|
15403
|
-
//#region \0@oxc-project+runtime@0.103.0/helpers/checkPrivateRedeclaration.js
|
|
15404
|
-
function _checkPrivateRedeclaration(e, t) {
|
|
15405
|
-
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
15406
|
-
}
|
|
15407
|
-
|
|
15408
|
-
//#endregion
|
|
15409
|
-
//#region \0@oxc-project+runtime@0.103.0/helpers/classPrivateMethodInitSpec.js
|
|
15410
|
-
function _classPrivateMethodInitSpec(e, a) {
|
|
15411
|
-
_checkPrivateRedeclaration(e, a), a.add(e);
|
|
15412
|
-
}
|
|
15413
|
-
|
|
15414
|
-
//#endregion
|
|
15415
|
-
//#region \0@oxc-project+runtime@0.103.0/helpers/classPrivateFieldInitSpec.js
|
|
15416
|
-
function _classPrivateFieldInitSpec(e, t, a) {
|
|
15417
|
-
_checkPrivateRedeclaration(e, t), t.set(e, a);
|
|
15418
|
-
}
|
|
15419
|
-
|
|
15420
|
-
//#endregion
|
|
15421
|
-
//#region \0@oxc-project+runtime@0.103.0/helpers/assertClassBrand.js
|
|
15422
|
-
function _assertClassBrand(e, t, n) {
|
|
15423
|
-
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
15424
|
-
throw new TypeError("Private element is not present on this object");
|
|
15425
|
-
}
|
|
15426
|
-
|
|
15427
|
-
//#endregion
|
|
15428
|
-
//#region \0@oxc-project+runtime@0.103.0/helpers/classPrivateFieldGet2.js
|
|
15429
|
-
function _classPrivateFieldGet2(s, a) {
|
|
15430
|
-
return s.get(_assertClassBrand(s, a));
|
|
15431
|
-
}
|
|
15432
|
-
|
|
15433
|
-
//#endregion
|
|
15434
|
-
//#region \0@oxc-project+runtime@0.103.0/helpers/classPrivateFieldSet2.js
|
|
15435
|
-
function _classPrivateFieldSet2(s, a, r) {
|
|
15436
|
-
return s.set(_assertClassBrand(s, a), r), r;
|
|
15437
|
-
}
|
|
15438
|
-
|
|
15439
|
-
//#endregion
|
|
15440
|
-
//#region src/Runtime.tsx
|
|
15441
|
-
var _options = /* @__PURE__ */ new WeakMap();
|
|
15442
|
-
var _isUnmounted = /* @__PURE__ */ new WeakMap();
|
|
15443
|
-
var _renderError = /* @__PURE__ */ new WeakMap();
|
|
15444
|
-
var _container = /* @__PURE__ */ new WeakMap();
|
|
15445
|
-
var _rootNode = /* @__PURE__ */ new WeakMap();
|
|
15446
|
-
var _renderPromise = /* @__PURE__ */ new WeakMap();
|
|
15447
|
-
var _Runtime_brand = /* @__PURE__ */ new WeakSet();
|
|
15448
|
-
var Runtime = class {
|
|
15449
|
-
constructor(options) {
|
|
15450
|
-
_classPrivateMethodInitSpec(this, _Runtime_brand);
|
|
15451
|
-
_classPrivateFieldInitSpec(this, _options, void 0);
|
|
15452
|
-
_classPrivateFieldInitSpec(this, _isUnmounted, void 0);
|
|
15453
|
-
_classPrivateFieldInitSpec(this, _renderError, void 0);
|
|
15454
|
-
_defineProperty(this, "exitPromise", void 0);
|
|
15455
|
-
_classPrivateFieldInitSpec(this, _container, void 0);
|
|
15456
|
-
_classPrivateFieldInitSpec(this, _rootNode, void 0);
|
|
15457
|
-
_classPrivateFieldInitSpec(this, _renderPromise, Promise.resolve());
|
|
15458
|
-
_defineProperty(this, "resolveExitPromise", () => {});
|
|
15459
|
-
_defineProperty(this, "rejectExitPromise", () => {});
|
|
15460
|
-
_defineProperty(this, "unsubscribeExit", () => {});
|
|
15461
|
-
_defineProperty(this, "onRender", () => {
|
|
15462
|
-
const task = _classPrivateFieldGet2(_renderPromise, this).catch(() => {}).then(async () => {
|
|
15463
|
-
var _classPrivateFieldGet2$1, _classPrivateFieldGet3, _classPrivateFieldGet4, _classPrivateFieldGet5;
|
|
15464
|
-
if (_classPrivateFieldGet2(_isUnmounted, this)) return;
|
|
15465
|
-
const files = await processFiles(_classPrivateFieldGet2(_rootNode, this));
|
|
15466
|
-
await this.fileManager.add(...files);
|
|
15467
|
-
if (!((_classPrivateFieldGet2$1 = _classPrivateFieldGet2(_options, this)) === null || _classPrivateFieldGet2$1 === void 0 ? void 0 : _classPrivateFieldGet2$1.debug) && !((_classPrivateFieldGet3 = _classPrivateFieldGet2(_options, this)) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3.stdout)) return;
|
|
15468
|
-
const output = await _assertClassBrand(_Runtime_brand, this, _getOutput).call(this, _classPrivateFieldGet2(_rootNode, this));
|
|
15469
|
-
if ((_classPrivateFieldGet4 = _classPrivateFieldGet2(_options, this)) === null || _classPrivateFieldGet4 === void 0 ? void 0 : _classPrivateFieldGet4.debug) {
|
|
15470
|
-
console.log("Rendering:\n");
|
|
15471
|
-
console.log(output);
|
|
15472
|
-
}
|
|
15473
|
-
if (((_classPrivateFieldGet5 = _classPrivateFieldGet2(_options, this)) === null || _classPrivateFieldGet5 === void 0 ? void 0 : _classPrivateFieldGet5.stdout) && node_process.default.env.NODE_ENV !== "test") {
|
|
15474
|
-
_classPrivateFieldGet2(_options, this).stdout.clearLine(0);
|
|
15475
|
-
_classPrivateFieldGet2(_options, this).stdout.cursorTo(0);
|
|
15476
|
-
_classPrivateFieldGet2(_options, this).stdout.write(output);
|
|
15477
|
-
}
|
|
15478
|
-
});
|
|
15479
|
-
_classPrivateFieldSet2(_renderPromise, this, task.catch((error) => {
|
|
15480
|
-
this.onError(error);
|
|
15481
|
-
}));
|
|
15482
|
-
return _classPrivateFieldGet2(_renderPromise, this);
|
|
15483
|
-
});
|
|
15484
|
-
_classPrivateFieldSet2(_options, this, options);
|
|
15485
|
-
_classPrivateFieldSet2(_rootNode, this, createNode("kubb-root"));
|
|
15486
|
-
_classPrivateFieldGet2(_rootNode, this).onRender = this.onRender;
|
|
15487
|
-
_classPrivateFieldGet2(_rootNode, this).onImmediateRender = this.onRender;
|
|
15488
|
-
_classPrivateFieldSet2(_isUnmounted, this, false);
|
|
15489
|
-
this.unmount.bind(this);
|
|
15490
|
-
console.error = (data) => {
|
|
15491
|
-
const message = typeof data === "string" ? data : data === null || data === void 0 ? void 0 : data.message;
|
|
15492
|
-
if ((message === null || message === void 0 ? void 0 : message.match(/Encountered two children with the same key/gi)) || (message === null || message === void 0 ? void 0 : message.match(/React will try to recreat/gi)) || (message === null || message === void 0 ? void 0 : message.match(/Each child in a list should have a unique/gi)) || (message === null || message === void 0 ? void 0 : message.match(/The above error occurred in the <KubbErrorBoundary/gi)) || (message === null || message === void 0 ? void 0 : message.match(/A React Element from an older version of React was render/gi))) return;
|
|
15493
|
-
console.log(data);
|
|
15494
|
-
};
|
|
15495
|
-
const logRecoverableError = typeof reportError === "function" ? reportError : console.error;
|
|
15496
|
-
const rootTag = import_constants.ConcurrentRoot;
|
|
15497
|
-
_classPrivateFieldSet2(_container, this, Renderer.createContainer(_classPrivateFieldGet2(_rootNode, this), rootTag, null, false, false, "id", logRecoverableError, logRecoverableError, logRecoverableError, null));
|
|
15498
|
-
this.unsubscribeExit = (0, signal_exit.onExit)((code) => {
|
|
15499
|
-
this.unmount(code);
|
|
15500
|
-
}, { alwaysLast: false }).bind(this);
|
|
15501
|
-
Renderer.injectIntoDevTools({
|
|
15502
|
-
bundleType: 1,
|
|
15503
|
-
version: "19.1.0",
|
|
15504
|
-
rendererPackageName: "kubb"
|
|
15505
|
-
});
|
|
15506
|
-
}
|
|
15507
|
-
get fileManager() {
|
|
15508
|
-
return _classPrivateFieldGet2(_options, this).fileManager;
|
|
15509
|
-
}
|
|
15510
|
-
onError(error) {
|
|
15511
|
-
if (node_process.default.env.NODE_ENV === "test") console.warn(error);
|
|
15512
|
-
_classPrivateFieldSet2(_renderError, this, error);
|
|
15513
|
-
}
|
|
15514
|
-
onExit(error) {
|
|
15515
|
-
this.unmount(error);
|
|
15516
|
-
}
|
|
15517
|
-
async render(node) {
|
|
15518
|
-
const treeNode = new _kubb_fabric_core.TreeNode({
|
|
15519
|
-
type: "Root",
|
|
15520
|
-
props: {}
|
|
15521
|
-
});
|
|
15522
|
-
const props = {
|
|
15523
|
-
fileManager: this.fileManager,
|
|
15524
|
-
treeNode,
|
|
15525
|
-
onExit: this.onExit.bind(this),
|
|
15526
|
-
onError: this.onError.bind(this)
|
|
15527
|
-
};
|
|
15528
|
-
treeNode.data.props = props;
|
|
15529
|
-
const element = /* @__PURE__ */ require_jsx_runtime.jsx(Root, {
|
|
15530
|
-
...props,
|
|
15531
|
-
children: node
|
|
15532
|
-
});
|
|
15533
|
-
Renderer.updateContainerSync(element, _classPrivateFieldGet2(_container, this), null, null);
|
|
15534
|
-
Renderer.flushSyncWork();
|
|
15535
|
-
await _classPrivateFieldGet2(_renderPromise, this);
|
|
15536
|
-
if (_classPrivateFieldGet2(_renderError, this)) {
|
|
15537
|
-
const error = _classPrivateFieldGet2(_renderError, this);
|
|
15538
|
-
_classPrivateFieldSet2(_renderError, this, void 0);
|
|
15539
|
-
throw error;
|
|
15540
|
-
}
|
|
15541
|
-
}
|
|
15542
|
-
async renderToString(node) {
|
|
15543
|
-
const treeNode = new _kubb_fabric_core.TreeNode({
|
|
15544
|
-
type: "Root",
|
|
15545
|
-
props: {}
|
|
15546
|
-
});
|
|
15547
|
-
const props = {
|
|
15548
|
-
fileManager: this.fileManager,
|
|
15549
|
-
treeNode,
|
|
15550
|
-
onExit: this.onExit.bind(this),
|
|
15551
|
-
onError: this.onError.bind(this)
|
|
15552
|
-
};
|
|
15553
|
-
treeNode.data.props = props;
|
|
15554
|
-
const element = /* @__PURE__ */ require_jsx_runtime.jsx(Root, {
|
|
15555
|
-
...props,
|
|
15556
|
-
children: node
|
|
15557
|
-
});
|
|
15558
|
-
Renderer.updateContainerSync(element, _classPrivateFieldGet2(_container, this), null, null);
|
|
15559
|
-
Renderer.flushSyncWork();
|
|
15560
|
-
await _classPrivateFieldGet2(_renderPromise, this);
|
|
15561
|
-
this.fileManager.clear();
|
|
15562
|
-
if (_classPrivateFieldGet2(_renderError, this)) {
|
|
15563
|
-
const error = _classPrivateFieldGet2(_renderError, this);
|
|
15564
|
-
_classPrivateFieldSet2(_renderError, this, void 0);
|
|
15565
|
-
throw error;
|
|
15566
|
-
}
|
|
15567
|
-
return _assertClassBrand(_Runtime_brand, this, _getOutput).call(this, _classPrivateFieldGet2(_rootNode, this));
|
|
15568
|
-
}
|
|
15569
|
-
unmount(error) {
|
|
15570
|
-
var _classPrivateFieldGet6;
|
|
15571
|
-
if (_classPrivateFieldGet2(_isUnmounted, this)) return;
|
|
15572
|
-
if ((_classPrivateFieldGet6 = _classPrivateFieldGet2(_options, this)) === null || _classPrivateFieldGet6 === void 0 ? void 0 : _classPrivateFieldGet6.debug) console.log("Unmount", error);
|
|
15573
|
-
this.onRender();
|
|
15574
|
-
this.unsubscribeExit();
|
|
15575
|
-
_classPrivateFieldSet2(_isUnmounted, this, true);
|
|
15576
|
-
Renderer.updateContainerSync(null, _classPrivateFieldGet2(_container, this), null, null);
|
|
15577
|
-
if (error instanceof Error) {
|
|
15578
|
-
this.rejectExitPromise(error);
|
|
15579
|
-
return;
|
|
15580
|
-
}
|
|
15581
|
-
this.resolveExitPromise();
|
|
15582
|
-
}
|
|
15583
|
-
async waitUntilExit() {
|
|
15584
|
-
if (!this.exitPromise) this.exitPromise = new Promise((resolve, reject) => {
|
|
15585
|
-
this.resolveExitPromise = resolve;
|
|
15586
|
-
this.rejectExitPromise = reject;
|
|
15587
|
-
});
|
|
15588
|
-
return this.exitPromise;
|
|
15589
|
-
}
|
|
15590
|
-
};
|
|
15591
|
-
async function _getOutput(node) {
|
|
15592
|
-
const text = squashTextNodes(node);
|
|
15593
|
-
const files = this.fileManager.files;
|
|
15594
|
-
if (!files.length) return text;
|
|
15595
|
-
const values = /* @__PURE__ */ new Set();
|
|
15596
|
-
for (const file of files) for (const source of file.sources) if (source === null || source === void 0 ? void 0 : source.value) values.add(source.value);
|
|
15597
|
-
return [...values].join("\n\n");
|
|
15598
|
-
}
|
|
15599
|
-
|
|
15600
|
-
//#endregion
|
|
15601
|
-
//#region src/plugins/reactPlugin.ts
|
|
15602
|
-
const reactPlugin = (0, _kubb_fabric_core_plugins.definePlugin)({
|
|
15603
|
-
name: "react",
|
|
15604
|
-
install() {},
|
|
15605
|
-
inject(ctx, options = {}) {
|
|
15606
|
-
const runtime = new Runtime({
|
|
15607
|
-
fileManager: ctx.fileManager,
|
|
15608
|
-
...options
|
|
15609
|
-
});
|
|
15610
|
-
return {
|
|
15611
|
-
async render(App) {
|
|
15612
|
-
await ctx.emit("lifecycle:start");
|
|
15613
|
-
await runtime.render((0, import_react.createElement)(App));
|
|
15614
|
-
},
|
|
15615
|
-
async renderToString(App) {
|
|
15616
|
-
await ctx.emit("lifecycle:start");
|
|
15617
|
-
return runtime.renderToString((0, import_react.createElement)(App));
|
|
15618
|
-
},
|
|
15619
|
-
async waitUntilExit() {
|
|
15620
|
-
await runtime.waitUntilExit();
|
|
15621
|
-
}
|
|
15622
|
-
};
|
|
15623
|
-
}
|
|
15624
|
-
});
|
|
15625
|
-
|
|
15626
|
-
//#endregion
|
|
15627
|
-
Object.defineProperty(exports, 'Runtime', {
|
|
15628
|
-
enumerable: true,
|
|
15629
|
-
get: function () {
|
|
15630
|
-
return Runtime;
|
|
15631
|
-
}
|
|
15632
|
-
});
|
|
15633
|
-
Object.defineProperty(exports, '_classPrivateFieldGet2', {
|
|
15160
|
+
Object.defineProperty(exports, 'Renderer', {
|
|
15634
15161
|
enumerable: true,
|
|
15635
15162
|
get: function () {
|
|
15636
|
-
return
|
|
15163
|
+
return Renderer;
|
|
15637
15164
|
}
|
|
15638
15165
|
});
|
|
15639
|
-
Object.defineProperty(exports, '
|
|
15166
|
+
Object.defineProperty(exports, 'createNode', {
|
|
15640
15167
|
enumerable: true,
|
|
15641
15168
|
get: function () {
|
|
15642
|
-
return
|
|
15169
|
+
return createNode;
|
|
15643
15170
|
}
|
|
15644
15171
|
});
|
|
15645
|
-
Object.defineProperty(exports, '
|
|
15172
|
+
Object.defineProperty(exports, 'nodeNames', {
|
|
15646
15173
|
enumerable: true,
|
|
15647
15174
|
get: function () {
|
|
15648
|
-
return
|
|
15175
|
+
return nodeNames;
|
|
15649
15176
|
}
|
|
15650
15177
|
});
|
|
15651
|
-
Object.defineProperty(exports, '
|
|
15178
|
+
Object.defineProperty(exports, 'require_constants', {
|
|
15652
15179
|
enumerable: true,
|
|
15653
15180
|
get: function () {
|
|
15654
|
-
return
|
|
15181
|
+
return require_constants;
|
|
15655
15182
|
}
|
|
15656
15183
|
});
|
|
15657
|
-
//# sourceMappingURL=
|
|
15184
|
+
//# sourceMappingURL=Renderer-CRT9gs-h.cjs.map
|