@tscircuit/common 0.0.3 → 0.0.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/index.js +126 -107
- package/package.json +11 -2
package/dist/index.js
CHANGED
|
@@ -96,6 +96,7 @@ var require_react_production = __commonJS({
|
|
|
96
96
|
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
97
97
|
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
|
98
98
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
99
|
+
var REACT_ACTIVITY_TYPE = Symbol.for("react.activity");
|
|
99
100
|
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
100
101
|
function getIteratorFn(maybeIterable) {
|
|
101
102
|
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
|
|
@@ -146,27 +147,22 @@ var require_react_production = __commonJS({
|
|
|
146
147
|
assign(pureComponentPrototype, Component.prototype);
|
|
147
148
|
pureComponentPrototype.isPureReactComponent = true;
|
|
148
149
|
var isArrayImpl = Array.isArray;
|
|
149
|
-
|
|
150
|
+
function noop() {
|
|
151
|
+
}
|
|
152
|
+
var ReactSharedInternals = { H: null, A: null, T: null, S: null };
|
|
150
153
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
151
|
-
function ReactElement3(type, key,
|
|
152
|
-
|
|
154
|
+
function ReactElement3(type, key, props) {
|
|
155
|
+
var refProp = props.ref;
|
|
153
156
|
return {
|
|
154
157
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
155
158
|
type,
|
|
156
159
|
key,
|
|
157
|
-
ref: void 0 !==
|
|
160
|
+
ref: void 0 !== refProp ? refProp : null,
|
|
158
161
|
props
|
|
159
162
|
};
|
|
160
163
|
}
|
|
161
164
|
function cloneAndReplaceKey(oldElement, newKey) {
|
|
162
|
-
return ReactElement3(
|
|
163
|
-
oldElement.type,
|
|
164
|
-
newKey,
|
|
165
|
-
void 0,
|
|
166
|
-
void 0,
|
|
167
|
-
void 0,
|
|
168
|
-
oldElement.props
|
|
169
|
-
);
|
|
165
|
+
return ReactElement3(oldElement.type, newKey, oldElement.props);
|
|
170
166
|
}
|
|
171
167
|
function isValidElement(object) {
|
|
172
168
|
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
@@ -181,8 +177,6 @@ var require_react_production = __commonJS({
|
|
|
181
177
|
function getElementKey(element, index) {
|
|
182
178
|
return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
|
|
183
179
|
}
|
|
184
|
-
function noop$1() {
|
|
185
|
-
}
|
|
186
180
|
function resolveThenable(thenable) {
|
|
187
181
|
switch (thenable.status) {
|
|
188
182
|
case "fulfilled":
|
|
@@ -190,7 +184,7 @@ var require_react_production = __commonJS({
|
|
|
190
184
|
case "rejected":
|
|
191
185
|
throw thenable.reason;
|
|
192
186
|
default:
|
|
193
|
-
switch ("string" === typeof thenable.status ? thenable.then(noop
|
|
187
|
+
switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
|
|
194
188
|
function(fulfilledValue) {
|
|
195
189
|
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
196
190
|
},
|
|
@@ -322,9 +316,7 @@ var require_react_production = __commonJS({
|
|
|
322
316
|
}
|
|
323
317
|
console.error(error);
|
|
324
318
|
};
|
|
325
|
-
|
|
326
|
-
}
|
|
327
|
-
exports.Children = {
|
|
319
|
+
var Children = {
|
|
328
320
|
map: mapChildren,
|
|
329
321
|
forEach: function(children, forEachFunc, forEachContext) {
|
|
330
322
|
mapChildren(
|
|
@@ -355,6 +347,8 @@ var require_react_production = __commonJS({
|
|
|
355
347
|
return children;
|
|
356
348
|
}
|
|
357
349
|
};
|
|
350
|
+
exports.Activity = REACT_ACTIVITY_TYPE;
|
|
351
|
+
exports.Children = Children;
|
|
358
352
|
exports.Component = Component;
|
|
359
353
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
360
354
|
exports.Profiler = REACT_PROFILER_TYPE;
|
|
@@ -373,14 +367,17 @@ var require_react_production = __commonJS({
|
|
|
373
367
|
return fn.apply(null, arguments);
|
|
374
368
|
};
|
|
375
369
|
};
|
|
370
|
+
exports.cacheSignal = function() {
|
|
371
|
+
return null;
|
|
372
|
+
};
|
|
376
373
|
exports.cloneElement = function(element, config, children) {
|
|
377
374
|
if (null === element || void 0 === element)
|
|
378
375
|
throw Error(
|
|
379
376
|
"The argument must be a React element, but you passed " + element + "."
|
|
380
377
|
);
|
|
381
|
-
var props = assign({}, element.props), key = element.key
|
|
378
|
+
var props = assign({}, element.props), key = element.key;
|
|
382
379
|
if (null != config)
|
|
383
|
-
for (propName in void 0 !== config.
|
|
380
|
+
for (propName in void 0 !== config.key && (key = "" + config.key), config)
|
|
384
381
|
!hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
|
|
385
382
|
var propName = arguments.length - 2;
|
|
386
383
|
if (1 === propName) props.children = children;
|
|
@@ -389,7 +386,7 @@ var require_react_production = __commonJS({
|
|
|
389
386
|
childArray[i] = arguments[i + 2];
|
|
390
387
|
props.children = childArray;
|
|
391
388
|
}
|
|
392
|
-
return ReactElement3(element.type, key,
|
|
389
|
+
return ReactElement3(element.type, key, props);
|
|
393
390
|
};
|
|
394
391
|
exports.createContext = function(defaultValue) {
|
|
395
392
|
defaultValue = {
|
|
@@ -422,7 +419,7 @@ var require_react_production = __commonJS({
|
|
|
422
419
|
if (type && type.defaultProps)
|
|
423
420
|
for (propName in childrenLength = type.defaultProps, childrenLength)
|
|
424
421
|
void 0 === props[propName] && (props[propName] = childrenLength[propName]);
|
|
425
|
-
return ReactElement3(type, key,
|
|
422
|
+
return ReactElement3(type, key, props);
|
|
426
423
|
};
|
|
427
424
|
exports.createRef = function() {
|
|
428
425
|
return { current: null };
|
|
@@ -455,7 +452,7 @@ var require_react_production = __commonJS({
|
|
|
455
452
|
} catch (error) {
|
|
456
453
|
reportGlobalError(error);
|
|
457
454
|
} finally {
|
|
458
|
-
ReactSharedInternals.T = prevTransition;
|
|
455
|
+
null !== prevTransition && null !== currentTransition.types && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
|
|
459
456
|
}
|
|
460
457
|
};
|
|
461
458
|
exports.unstable_useCacheRefresh = function() {
|
|
@@ -478,13 +475,11 @@ var require_react_production = __commonJS({
|
|
|
478
475
|
exports.useDeferredValue = function(value, initialValue) {
|
|
479
476
|
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
|
|
480
477
|
};
|
|
481
|
-
exports.useEffect = function(create,
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
);
|
|
487
|
-
return dispatcher.useEffect(create, createDeps);
|
|
478
|
+
exports.useEffect = function(create, deps) {
|
|
479
|
+
return ReactSharedInternals.H.useEffect(create, deps);
|
|
480
|
+
};
|
|
481
|
+
exports.useEffectEvent = function(callback) {
|
|
482
|
+
return ReactSharedInternals.H.useEffectEvent(callback);
|
|
488
483
|
};
|
|
489
484
|
exports.useId = function() {
|
|
490
485
|
return ReactSharedInternals.H.useId();
|
|
@@ -523,7 +518,7 @@ var require_react_production = __commonJS({
|
|
|
523
518
|
exports.useTransition = function() {
|
|
524
519
|
return ReactSharedInternals.H.useTransition();
|
|
525
520
|
};
|
|
526
|
-
exports.version = "19.
|
|
521
|
+
exports.version = "19.2.0";
|
|
527
522
|
}
|
|
528
523
|
});
|
|
529
524
|
|
|
@@ -572,6 +567,8 @@ var require_react_development = __commonJS({
|
|
|
572
567
|
this.refs = emptyObject;
|
|
573
568
|
this.updater = updater || ReactNoopUpdateQueue;
|
|
574
569
|
}
|
|
570
|
+
function noop() {
|
|
571
|
+
}
|
|
575
572
|
function testStringCoercion(value) {
|
|
576
573
|
return "" + value;
|
|
577
574
|
}
|
|
@@ -620,7 +617,7 @@ var require_react_development = __commonJS({
|
|
|
620
617
|
case REACT_PORTAL_TYPE:
|
|
621
618
|
return "Portal";
|
|
622
619
|
case REACT_CONTEXT_TYPE:
|
|
623
|
-
return
|
|
620
|
+
return type.displayName || "Context";
|
|
624
621
|
case REACT_CONSUMER_TYPE:
|
|
625
622
|
return (type._context.displayName || "Context") + ".Consumer";
|
|
626
623
|
case REACT_FORWARD_REF_TYPE:
|
|
@@ -686,8 +683,8 @@ var require_react_development = __commonJS({
|
|
|
686
683
|
componentName = this.props.ref;
|
|
687
684
|
return void 0 !== componentName ? componentName : null;
|
|
688
685
|
}
|
|
689
|
-
function ReactElement3(type, key,
|
|
690
|
-
|
|
686
|
+
function ReactElement3(type, key, props, owner, debugStack, debugTask) {
|
|
687
|
+
var refProp = props.ref;
|
|
691
688
|
type = {
|
|
692
689
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
693
690
|
type,
|
|
@@ -695,7 +692,7 @@ var require_react_development = __commonJS({
|
|
|
695
692
|
props,
|
|
696
693
|
_owner: owner
|
|
697
694
|
};
|
|
698
|
-
null !== (void 0 !==
|
|
695
|
+
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
699
696
|
enumerable: false,
|
|
700
697
|
get: elementRefGetterWithDeprecationWarning
|
|
701
698
|
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
@@ -731,16 +728,17 @@ var require_react_development = __commonJS({
|
|
|
731
728
|
newKey = ReactElement3(
|
|
732
729
|
oldElement.type,
|
|
733
730
|
newKey,
|
|
734
|
-
void 0,
|
|
735
|
-
void 0,
|
|
736
|
-
oldElement._owner,
|
|
737
731
|
oldElement.props,
|
|
732
|
+
oldElement._owner,
|
|
738
733
|
oldElement._debugStack,
|
|
739
734
|
oldElement._debugTask
|
|
740
735
|
);
|
|
741
736
|
oldElement._store && (newKey._store.validated = oldElement._store.validated);
|
|
742
737
|
return newKey;
|
|
743
738
|
}
|
|
739
|
+
function validateChildKeys(node) {
|
|
740
|
+
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
741
|
+
}
|
|
744
742
|
function isValidElement(object) {
|
|
745
743
|
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
746
744
|
}
|
|
@@ -753,8 +751,6 @@ var require_react_development = __commonJS({
|
|
|
753
751
|
function getElementKey(element, index) {
|
|
754
752
|
return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
|
|
755
753
|
}
|
|
756
|
-
function noop$1() {
|
|
757
|
-
}
|
|
758
754
|
function resolveThenable(thenable) {
|
|
759
755
|
switch (thenable.status) {
|
|
760
756
|
case "fulfilled":
|
|
@@ -762,7 +758,7 @@ var require_react_development = __commonJS({
|
|
|
762
758
|
case "rejected":
|
|
763
759
|
throw thenable.reason;
|
|
764
760
|
default:
|
|
765
|
-
switch ("string" === typeof thenable.status ? thenable.then(noop
|
|
761
|
+
switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
|
|
766
762
|
function(fulfilledValue) {
|
|
767
763
|
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
768
764
|
},
|
|
@@ -869,28 +865,46 @@ var require_react_development = __commonJS({
|
|
|
869
865
|
}
|
|
870
866
|
function lazyInitializer(payload) {
|
|
871
867
|
if (-1 === payload._status) {
|
|
872
|
-
var
|
|
873
|
-
|
|
874
|
-
|
|
868
|
+
var ioInfo = payload._ioInfo;
|
|
869
|
+
null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
|
|
870
|
+
ioInfo = payload._result;
|
|
871
|
+
var thenable = ioInfo();
|
|
872
|
+
thenable.then(
|
|
875
873
|
function(moduleObject) {
|
|
876
|
-
if (0 === payload._status || -1 === payload._status)
|
|
877
|
-
payload._status = 1
|
|
874
|
+
if (0 === payload._status || -1 === payload._status) {
|
|
875
|
+
payload._status = 1;
|
|
876
|
+
payload._result = moduleObject;
|
|
877
|
+
var _ioInfo = payload._ioInfo;
|
|
878
|
+
null != _ioInfo && (_ioInfo.end = performance.now());
|
|
879
|
+
void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
|
|
880
|
+
}
|
|
878
881
|
},
|
|
879
882
|
function(error) {
|
|
880
|
-
if (0 === payload._status || -1 === payload._status)
|
|
881
|
-
payload._status = 2
|
|
883
|
+
if (0 === payload._status || -1 === payload._status) {
|
|
884
|
+
payload._status = 2;
|
|
885
|
+
payload._result = error;
|
|
886
|
+
var _ioInfo2 = payload._ioInfo;
|
|
887
|
+
null != _ioInfo2 && (_ioInfo2.end = performance.now());
|
|
888
|
+
void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
|
889
|
+
}
|
|
882
890
|
}
|
|
883
891
|
);
|
|
884
|
-
|
|
892
|
+
ioInfo = payload._ioInfo;
|
|
893
|
+
if (null != ioInfo) {
|
|
894
|
+
ioInfo.value = thenable;
|
|
895
|
+
var displayName = thenable.displayName;
|
|
896
|
+
"string" === typeof displayName && (ioInfo.name = displayName);
|
|
897
|
+
}
|
|
898
|
+
-1 === payload._status && (payload._status = 0, payload._result = thenable);
|
|
885
899
|
}
|
|
886
900
|
if (1 === payload._status)
|
|
887
|
-
return
|
|
901
|
+
return ioInfo = payload._result, void 0 === ioInfo && console.error(
|
|
888
902
|
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
|
|
889
|
-
|
|
890
|
-
), "default" in
|
|
903
|
+
ioInfo
|
|
904
|
+
), "default" in ioInfo || console.error(
|
|
891
905
|
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
|
|
892
|
-
|
|
893
|
-
),
|
|
906
|
+
ioInfo
|
|
907
|
+
), ioInfo.default;
|
|
894
908
|
throw payload._result;
|
|
895
909
|
}
|
|
896
910
|
function resolveDispatcher() {
|
|
@@ -900,7 +914,8 @@ var require_react_development = __commonJS({
|
|
|
900
914
|
);
|
|
901
915
|
return dispatcher;
|
|
902
916
|
}
|
|
903
|
-
function
|
|
917
|
+
function releaseAsyncTransition() {
|
|
918
|
+
ReactSharedInternals.asyncTransitions--;
|
|
904
919
|
}
|
|
905
920
|
function enqueueTask(task) {
|
|
906
921
|
if (null === enqueueTaskImpl)
|
|
@@ -976,9 +991,7 @@ var require_react_development = __commonJS({
|
|
|
976
991
|
}
|
|
977
992
|
}
|
|
978
993
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
979
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler")
|
|
980
|
-
Symbol.for("react.provider");
|
|
981
|
-
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
|
|
994
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
|
|
982
995
|
isMounted: function() {
|
|
983
996
|
return false;
|
|
984
997
|
},
|
|
@@ -1013,7 +1026,7 @@ var require_react_development = __commonJS({
|
|
|
1013
1026
|
"replaceState",
|
|
1014
1027
|
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
|
|
1015
1028
|
]
|
|
1016
|
-
}
|
|
1029
|
+
};
|
|
1017
1030
|
for (fnName in deprecatedAPIs)
|
|
1018
1031
|
deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
1019
1032
|
ComponentDummy.prototype = Component.prototype;
|
|
@@ -1026,8 +1039,8 @@ var require_react_development = __commonJS({
|
|
|
1026
1039
|
A: null,
|
|
1027
1040
|
T: null,
|
|
1028
1041
|
S: null,
|
|
1029
|
-
V: null,
|
|
1030
1042
|
actQueue: null,
|
|
1043
|
+
asyncTransitions: 0,
|
|
1031
1044
|
isBatchingLegacy: false,
|
|
1032
1045
|
didScheduleLegacyUpdate: false,
|
|
1033
1046
|
didUsePromise: false,
|
|
@@ -1074,7 +1087,7 @@ var require_react_development = __commonJS({
|
|
|
1074
1087
|
return resolveDispatcher().useMemoCache(size);
|
|
1075
1088
|
}
|
|
1076
1089
|
});
|
|
1077
|
-
|
|
1090
|
+
var fnName = {
|
|
1078
1091
|
map: mapChildren,
|
|
1079
1092
|
forEach: function(children, forEachFunc, forEachContext) {
|
|
1080
1093
|
mapChildren(
|
|
@@ -1105,6 +1118,8 @@ var require_react_development = __commonJS({
|
|
|
1105
1118
|
return children;
|
|
1106
1119
|
}
|
|
1107
1120
|
};
|
|
1121
|
+
exports.Activity = REACT_ACTIVITY_TYPE;
|
|
1122
|
+
exports.Children = fnName;
|
|
1108
1123
|
exports.Component = Component;
|
|
1109
1124
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
1110
1125
|
exports.Profiler = REACT_PROFILER_TYPE;
|
|
@@ -1195,6 +1210,9 @@ var require_react_development = __commonJS({
|
|
|
1195
1210
|
return fn.apply(null, arguments);
|
|
1196
1211
|
};
|
|
1197
1212
|
};
|
|
1213
|
+
exports.cacheSignal = function() {
|
|
1214
|
+
return null;
|
|
1215
|
+
};
|
|
1198
1216
|
exports.captureOwnerStack = function() {
|
|
1199
1217
|
var getCurrentStack = ReactSharedInternals.getCurrentStack;
|
|
1200
1218
|
return null === getCurrentStack ? null : getCurrentStack();
|
|
@@ -1233,15 +1251,13 @@ var require_react_development = __commonJS({
|
|
|
1233
1251
|
props = ReactElement3(
|
|
1234
1252
|
element.type,
|
|
1235
1253
|
key,
|
|
1236
|
-
void 0,
|
|
1237
|
-
void 0,
|
|
1238
|
-
owner,
|
|
1239
1254
|
props,
|
|
1255
|
+
owner,
|
|
1240
1256
|
element._debugStack,
|
|
1241
1257
|
element._debugTask
|
|
1242
1258
|
);
|
|
1243
1259
|
for (key = 2; key < arguments.length; key++)
|
|
1244
|
-
|
|
1260
|
+
validateChildKeys(arguments[key]);
|
|
1245
1261
|
return props;
|
|
1246
1262
|
};
|
|
1247
1263
|
exports.createContext = function(defaultValue) {
|
|
@@ -1263,16 +1279,14 @@ var require_react_development = __commonJS({
|
|
|
1263
1279
|
return defaultValue;
|
|
1264
1280
|
};
|
|
1265
1281
|
exports.createElement = function(type, config, children) {
|
|
1266
|
-
for (var i = 2; i < arguments.length; i++)
|
|
1267
|
-
|
|
1268
|
-
isValidElement(node) && node._store && (node._store.validated = 1);
|
|
1269
|
-
}
|
|
1282
|
+
for (var i = 2; i < arguments.length; i++)
|
|
1283
|
+
validateChildKeys(arguments[i]);
|
|
1270
1284
|
i = {};
|
|
1271
|
-
|
|
1285
|
+
var key = null;
|
|
1272
1286
|
if (null != config)
|
|
1273
1287
|
for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
|
|
1274
1288
|
"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
|
|
1275
|
-
)), hasValidKey(config) && (checkKeyStringCoercion(config.key),
|
|
1289
|
+
)), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config)
|
|
1276
1290
|
hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
|
|
1277
1291
|
var childrenLength = arguments.length - 2;
|
|
1278
1292
|
if (1 === childrenLength) i.children = children;
|
|
@@ -1285,18 +1299,16 @@ var require_react_development = __commonJS({
|
|
|
1285
1299
|
if (type && type.defaultProps)
|
|
1286
1300
|
for (propName in childrenLength = type.defaultProps, childrenLength)
|
|
1287
1301
|
void 0 === i[propName] && (i[propName] = childrenLength[propName]);
|
|
1288
|
-
|
|
1302
|
+
key && defineKeyPropWarningGetter(
|
|
1289
1303
|
i,
|
|
1290
1304
|
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
|
|
1291
1305
|
);
|
|
1292
1306
|
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
1293
1307
|
return ReactElement3(
|
|
1294
1308
|
type,
|
|
1295
|
-
|
|
1296
|
-
void 0,
|
|
1297
|
-
void 0,
|
|
1298
|
-
getOwner(),
|
|
1309
|
+
key,
|
|
1299
1310
|
i,
|
|
1311
|
+
getOwner(),
|
|
1300
1312
|
propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
1301
1313
|
propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
1302
1314
|
);
|
|
@@ -1335,11 +1347,23 @@ var require_react_development = __commonJS({
|
|
|
1335
1347
|
};
|
|
1336
1348
|
exports.isValidElement = isValidElement;
|
|
1337
1349
|
exports.lazy = function(ctor) {
|
|
1338
|
-
|
|
1350
|
+
ctor = { _status: -1, _result: ctor };
|
|
1351
|
+
var lazyType = {
|
|
1339
1352
|
$$typeof: REACT_LAZY_TYPE,
|
|
1340
|
-
_payload:
|
|
1353
|
+
_payload: ctor,
|
|
1341
1354
|
_init: lazyInitializer
|
|
1355
|
+
}, ioInfo = {
|
|
1356
|
+
name: "lazy",
|
|
1357
|
+
start: -1,
|
|
1358
|
+
end: -1,
|
|
1359
|
+
value: null,
|
|
1360
|
+
owner: null,
|
|
1361
|
+
debugStack: Error("react-stack-top-frame"),
|
|
1362
|
+
debugTask: console.createTask ? console.createTask("lazy()") : null
|
|
1342
1363
|
};
|
|
1364
|
+
ctor._ioInfo = ioInfo;
|
|
1365
|
+
lazyType._debugInfo = [{ awaited: ioInfo }];
|
|
1366
|
+
return lazyType;
|
|
1343
1367
|
};
|
|
1344
1368
|
exports.memo = function(type, compare) {
|
|
1345
1369
|
null == type && console.error(
|
|
@@ -1367,18 +1391,20 @@ var require_react_development = __commonJS({
|
|
|
1367
1391
|
};
|
|
1368
1392
|
exports.startTransition = function(scope) {
|
|
1369
1393
|
var prevTransition = ReactSharedInternals.T, currentTransition = {};
|
|
1370
|
-
ReactSharedInternals.T = currentTransition;
|
|
1371
1394
|
currentTransition._updatedFibers = /* @__PURE__ */ new Set();
|
|
1395
|
+
ReactSharedInternals.T = currentTransition;
|
|
1372
1396
|
try {
|
|
1373
1397
|
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
|
1374
1398
|
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
|
|
1375
|
-
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
|
|
1399
|
+
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
|
|
1376
1400
|
} catch (error) {
|
|
1377
1401
|
reportGlobalError(error);
|
|
1378
1402
|
} finally {
|
|
1379
1403
|
null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
|
|
1380
1404
|
"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
|
|
1381
|
-
)),
|
|
1405
|
+
)), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
|
|
1406
|
+
"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
|
|
1407
|
+
), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
|
|
1382
1408
|
}
|
|
1383
1409
|
};
|
|
1384
1410
|
exports.unstable_useCacheRefresh = function() {
|
|
@@ -1410,16 +1436,14 @@ var require_react_development = __commonJS({
|
|
|
1410
1436
|
exports.useDeferredValue = function(value, initialValue) {
|
|
1411
1437
|
return resolveDispatcher().useDeferredValue(value, initialValue);
|
|
1412
1438
|
};
|
|
1413
|
-
exports.useEffect = function(create,
|
|
1439
|
+
exports.useEffect = function(create, deps) {
|
|
1414
1440
|
null == create && console.warn(
|
|
1415
1441
|
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1416
1442
|
);
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
);
|
|
1422
|
-
return dispatcher.useEffect(create, createDeps);
|
|
1443
|
+
return resolveDispatcher().useEffect(create, deps);
|
|
1444
|
+
};
|
|
1445
|
+
exports.useEffectEvent = function(callback) {
|
|
1446
|
+
return resolveDispatcher().useEffectEvent(callback);
|
|
1423
1447
|
};
|
|
1424
1448
|
exports.useId = function() {
|
|
1425
1449
|
return resolveDispatcher().useId();
|
|
@@ -1464,7 +1488,7 @@ var require_react_development = __commonJS({
|
|
|
1464
1488
|
exports.useTransition = function() {
|
|
1465
1489
|
return resolveDispatcher().useTransition();
|
|
1466
1490
|
};
|
|
1467
|
-
exports.version = "19.
|
|
1491
|
+
exports.version = "19.2.0";
|
|
1468
1492
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1469
1493
|
})();
|
|
1470
1494
|
}
|
|
@@ -1513,7 +1537,7 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
1513
1537
|
case REACT_PORTAL_TYPE:
|
|
1514
1538
|
return "Portal";
|
|
1515
1539
|
case REACT_CONTEXT_TYPE:
|
|
1516
|
-
return
|
|
1540
|
+
return type.displayName || "Context";
|
|
1517
1541
|
case REACT_CONSUMER_TYPE:
|
|
1518
1542
|
return (type._context.displayName || "Context") + ".Consumer";
|
|
1519
1543
|
case REACT_FORWARD_REF_TYPE:
|
|
@@ -1601,8 +1625,8 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
1601
1625
|
componentName = this.props.ref;
|
|
1602
1626
|
return void 0 !== componentName ? componentName : null;
|
|
1603
1627
|
}
|
|
1604
|
-
function ReactElement3(type, key,
|
|
1605
|
-
|
|
1628
|
+
function ReactElement3(type, key, props, owner, debugStack, debugTask) {
|
|
1629
|
+
var refProp = props.ref;
|
|
1606
1630
|
type = {
|
|
1607
1631
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
1608
1632
|
type,
|
|
@@ -1610,7 +1634,7 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
1610
1634
|
props,
|
|
1611
1635
|
_owner: owner
|
|
1612
1636
|
};
|
|
1613
|
-
null !== (void 0 !==
|
|
1637
|
+
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
1614
1638
|
enumerable: false,
|
|
1615
1639
|
get: elementRefGetterWithDeprecationWarning
|
|
1616
1640
|
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
@@ -1642,7 +1666,7 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
1642
1666
|
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
1643
1667
|
return type;
|
|
1644
1668
|
}
|
|
1645
|
-
function jsxDEVImpl(type, config, maybeKey, isStaticChildren,
|
|
1669
|
+
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
|
|
1646
1670
|
var children = config.children;
|
|
1647
1671
|
if (void 0 !== children)
|
|
1648
1672
|
if (isStaticChildren)
|
|
@@ -1684,20 +1708,19 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
1684
1708
|
return ReactElement3(
|
|
1685
1709
|
type,
|
|
1686
1710
|
children,
|
|
1687
|
-
self,
|
|
1688
|
-
source,
|
|
1689
|
-
getOwner(),
|
|
1690
1711
|
maybeKey,
|
|
1712
|
+
getOwner(),
|
|
1691
1713
|
debugStack,
|
|
1692
1714
|
debugTask
|
|
1693
1715
|
);
|
|
1694
1716
|
}
|
|
1695
1717
|
function validateChildKeys(node) {
|
|
1696
|
-
"object" === typeof node && null !== node && node.$$typeof ===
|
|
1718
|
+
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
1719
|
+
}
|
|
1720
|
+
function isValidElement(object) {
|
|
1721
|
+
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1697
1722
|
}
|
|
1698
|
-
var React3 = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler")
|
|
1699
|
-
Symbol.for("react.provider");
|
|
1700
|
-
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
1723
|
+
var React3 = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
1701
1724
|
return null;
|
|
1702
1725
|
};
|
|
1703
1726
|
React3 = {
|
|
@@ -1714,28 +1737,24 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
1714
1737
|
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
1715
1738
|
var didWarnAboutKeySpread = {};
|
|
1716
1739
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
1717
|
-
exports.jsx = function(type, config, maybeKey
|
|
1740
|
+
exports.jsx = function(type, config, maybeKey) {
|
|
1718
1741
|
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
1719
1742
|
return jsxDEVImpl(
|
|
1720
1743
|
type,
|
|
1721
1744
|
config,
|
|
1722
1745
|
maybeKey,
|
|
1723
1746
|
false,
|
|
1724
|
-
source,
|
|
1725
|
-
self,
|
|
1726
1747
|
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
1727
1748
|
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
1728
1749
|
);
|
|
1729
1750
|
};
|
|
1730
|
-
exports.jsxs = function(type, config, maybeKey
|
|
1751
|
+
exports.jsxs = function(type, config, maybeKey) {
|
|
1731
1752
|
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
1732
1753
|
return jsxDEVImpl(
|
|
1733
1754
|
type,
|
|
1734
1755
|
config,
|
|
1735
1756
|
maybeKey,
|
|
1736
1757
|
true,
|
|
1737
|
-
source,
|
|
1738
|
-
self,
|
|
1739
1758
|
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
1740
1759
|
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
1741
1760
|
);
|
package/package.json
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/common",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
5
14
|
"files": [
|
|
6
15
|
"dist"
|
|
7
16
|
],
|
|
@@ -22,7 +31,7 @@
|
|
|
22
31
|
"devDependencies": {
|
|
23
32
|
"@biomejs/biome": "^2.2.4",
|
|
24
33
|
"@types/react": "^19.1.12",
|
|
25
|
-
"tscircuit": "^0.0.
|
|
34
|
+
"tscircuit": "^0.0.701",
|
|
26
35
|
"tsup": "^8.5.0"
|
|
27
36
|
}
|
|
28
37
|
}
|