cross-state 0.6.6 → 0.6.7
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/cjs/_virtual/use-sync-external-store-with-selector.development.cjs +103 -0
- package/dist/cjs/_virtual/use-sync-external-store-with-selector.development.cjs.map +1 -0
- package/dist/cjs/_virtual/use-sync-external-store-with-selector.development2.cjs +5 -0
- package/dist/cjs/_virtual/use-sync-external-store-with-selector.development2.cjs.map +1 -0
- package/dist/cjs/_virtual/use-sync-external-store-with-selector.production.min.cjs +71 -0
- package/dist/cjs/_virtual/use-sync-external-store-with-selector.production.min.cjs.map +1 -0
- package/dist/cjs/_virtual/use-sync-external-store-with-selector.production.min2.cjs +5 -0
- package/dist/cjs/_virtual/use-sync-external-store-with-selector.production.min2.cjs.map +1 -0
- package/dist/cjs/_virtual/with-selector.cjs +12 -0
- package/dist/cjs/_virtual/with-selector.cjs.map +1 -0
- package/dist/cjs/_virtual/with-selector2.cjs +13 -0
- package/dist/cjs/_virtual/with-selector2.cjs.map +1 -0
- package/dist/cjs/core/cache.cjs +227 -0
- package/dist/cjs/core/cache.cjs.map +1 -0
- package/dist/cjs/core/resourceGroup.cjs +53 -0
- package/dist/cjs/core/resourceGroup.cjs.map +1 -0
- package/dist/cjs/core/store.cjs +259 -0
- package/dist/cjs/core/store.cjs.map +1 -0
- package/dist/cjs/immer/immerActions.cjs +10 -0
- package/dist/cjs/immer/immerActions.cjs.map +1 -0
- package/dist/cjs/immer.cjs +2 -7
- package/dist/cjs/immer.cjs.map +1 -1
- package/dist/cjs/index.cjs +19 -299
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/lib/calcDuration.cjs +9 -0
- package/dist/cjs/lib/calcDuration.cjs.map +1 -0
- package/dist/cjs/lib/calculationHelper.cjs +140 -0
- package/dist/cjs/lib/calculationHelper.cjs.map +1 -0
- package/dist/cjs/lib/callable.cjs +11 -0
- package/dist/cjs/lib/callable.cjs.map +1 -0
- package/dist/cjs/lib/clone.cjs +19 -0
- package/dist/cjs/lib/clone.cjs.map +1 -0
- package/dist/cjs/lib/debounce.cjs +28 -0
- package/dist/cjs/lib/debounce.cjs.map +1 -0
- package/dist/cjs/lib/equals.cjs +5 -0
- package/dist/cjs/lib/equals.cjs.map +1 -0
- package/dist/cjs/lib/forwardError.cjs +9 -0
- package/dist/cjs/lib/forwardError.cjs.map +1 -0
- package/dist/cjs/lib/hash.cjs +19 -0
- package/dist/cjs/lib/hash.cjs.map +1 -0
- package/dist/cjs/lib/instanceCache.cjs +68 -0
- package/dist/cjs/lib/instanceCache.cjs.map +1 -0
- package/dist/cjs/lib/makeSelector.cjs +14 -0
- package/dist/cjs/lib/makeSelector.cjs.map +1 -0
- package/dist/cjs/lib/propAccess.cjs +66 -0
- package/dist/cjs/lib/propAccess.cjs.map +1 -0
- package/dist/cjs/lib/queue.cjs +61 -0
- package/dist/cjs/lib/queue.cjs.map +1 -0
- package/dist/cjs/lib/standardMethods.cjs +78 -0
- package/dist/cjs/lib/standardMethods.cjs.map +1 -0
- package/dist/cjs/lib/throttle.cjs +25 -0
- package/dist/cjs/lib/throttle.cjs.map +1 -0
- package/dist/cjs/lib/trackingProxy.cjs +39 -0
- package/dist/cjs/lib/trackingProxy.cjs.map +1 -0
- package/dist/cjs/react/read.cjs +15 -0
- package/dist/cjs/react/read.cjs.map +1 -0
- package/dist/cjs/react/storeScope.cjs +31 -0
- package/dist/cjs/react/storeScope.cjs.map +1 -0
- package/dist/cjs/react/useCache.cjs +31 -0
- package/dist/cjs/react/useCache.cjs.map +1 -0
- package/dist/cjs/react/useProp.cjs +9 -0
- package/dist/cjs/react/useProp.cjs.map +1 -0
- package/dist/cjs/react/useStore.cjs +51 -0
- package/dist/cjs/react/useStore.cjs.map +1 -0
- package/dist/cjs/react.cjs +11 -289
- package/dist/cjs/react.cjs.map +1 -1
- package/dist/es/_virtual/use-sync-external-store-with-selector.development.js +103 -0
- package/dist/es/_virtual/use-sync-external-store-with-selector.development.js.map +1 -0
- package/dist/es/_virtual/use-sync-external-store-with-selector.development2.js +5 -0
- package/dist/es/_virtual/use-sync-external-store-with-selector.development2.js.map +1 -0
- package/dist/es/_virtual/use-sync-external-store-with-selector.production.min.js +71 -0
- package/dist/es/_virtual/use-sync-external-store-with-selector.production.min.js.map +1 -0
- package/dist/es/_virtual/use-sync-external-store-with-selector.production.min2.js +5 -0
- package/dist/es/_virtual/use-sync-external-store-with-selector.production.min2.js.map +1 -0
- package/dist/es/_virtual/with-selector.js +11 -0
- package/dist/es/_virtual/with-selector.js.map +1 -0
- package/dist/es/_virtual/with-selector2.js +14 -0
- package/dist/es/_virtual/with-selector2.js.map +1 -0
- package/dist/es/core/cache.js +227 -0
- package/dist/es/core/cache.js.map +1 -0
- package/dist/es/core/resourceGroup.js +53 -0
- package/dist/es/core/resourceGroup.js.map +1 -0
- package/dist/es/core/store.js +259 -0
- package/dist/es/core/store.js.map +1 -0
- package/dist/es/{immer.mjs → immer/immerActions.js} +1 -1
- package/dist/es/immer/immerActions.js.map +1 -0
- package/dist/es/immer.js +5 -0
- package/dist/es/immer.js.map +1 -0
- package/dist/es/index.js +22 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/lib/calcDuration.js +9 -0
- package/dist/es/lib/calcDuration.js.map +1 -0
- package/dist/es/lib/calculationHelper.js +140 -0
- package/dist/es/lib/calculationHelper.js.map +1 -0
- package/dist/es/lib/callable.js +11 -0
- package/dist/es/lib/callable.js.map +1 -0
- package/dist/es/lib/clone.js +19 -0
- package/dist/es/lib/clone.js.map +1 -0
- package/dist/es/lib/debounce.js +28 -0
- package/dist/es/lib/debounce.js.map +1 -0
- package/dist/es/lib/equals.js +5 -0
- package/dist/es/lib/equals.js.map +1 -0
- package/dist/es/lib/forwardError.js +9 -0
- package/dist/es/lib/forwardError.js.map +1 -0
- package/dist/es/lib/hash.js +19 -0
- package/dist/es/lib/hash.js.map +1 -0
- package/dist/es/lib/instanceCache.js +68 -0
- package/dist/es/lib/instanceCache.js.map +1 -0
- package/dist/es/lib/makeSelector.js +14 -0
- package/dist/es/lib/makeSelector.js.map +1 -0
- package/dist/es/lib/propAccess.js +66 -0
- package/dist/es/lib/propAccess.js.map +1 -0
- package/dist/es/lib/queue.js +61 -0
- package/dist/es/lib/queue.js.map +1 -0
- package/dist/es/lib/standardMethods.js +78 -0
- package/dist/es/lib/standardMethods.js.map +1 -0
- package/dist/es/lib/throttle.js +25 -0
- package/dist/es/lib/throttle.js.map +1 -0
- package/dist/es/lib/trackingProxy.js +39 -0
- package/dist/es/lib/trackingProxy.js.map +1 -0
- package/dist/es/react/read.js +15 -0
- package/dist/es/react/read.js.map +1 -0
- package/dist/es/react/storeScope.js +31 -0
- package/dist/es/react/storeScope.js.map +1 -0
- package/dist/es/react/useCache.js +31 -0
- package/dist/es/react/useCache.js.map +1 -0
- package/dist/es/react/useProp.js +9 -0
- package/dist/es/react/useProp.js.map +1 -0
- package/dist/es/react/useStore.js +51 -0
- package/dist/es/react/useStore.js.map +1 -0
- package/dist/es/react.js +14 -0
- package/dist/es/react.js.map +1 -0
- package/dist/types/core/cache.d.ts +13 -11
- package/dist/types/core/store.d.ts +5 -3
- package/dist/types/lib/callable.d.ts +4 -0
- package/dist/types/lib/instanceCache.d.ts +2 -2
- package/package.json +8 -8
- package/dist/cjs/hash.cjs +0 -718
- package/dist/cjs/hash.cjs.map +0 -1
- package/dist/es/hash.mjs +0 -719
- package/dist/es/hash.mjs.map +0 -1
- package/dist/es/immer.mjs.map +0 -1
- package/dist/es/index.mjs +0 -303
- package/dist/es/index.mjs.map +0 -1
- package/dist/es/react.mjs +0 -292
- package/dist/es/react.mjs.map +0 -1
- package/dist/types/lib/bind.d.ts +0 -1
package/dist/es/react.mjs
DELETED
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
import require$$0, { useRef, useMemo, useCallback, useLayoutEffect, useDebugValue, useEffect, useContext, createContext } from "react";
|
|
2
|
-
import { h as hash, t as trackingProxy, m as makeSelector, c as createStore } from "./hash.mjs";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
var withSelectorExports = {};
|
|
5
|
-
var withSelector = {
|
|
6
|
-
get exports() {
|
|
7
|
-
return withSelectorExports;
|
|
8
|
-
},
|
|
9
|
-
set exports(v) {
|
|
10
|
-
withSelectorExports = v;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
var useSyncExternalStoreWithSelector_production_min = {};
|
|
14
|
-
/**
|
|
15
|
-
* @license React
|
|
16
|
-
* use-sync-external-store-with-selector.production.min.js
|
|
17
|
-
*
|
|
18
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the MIT license found in the
|
|
21
|
-
* LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/
|
|
23
|
-
var hasRequiredUseSyncExternalStoreWithSelector_production_min;
|
|
24
|
-
function requireUseSyncExternalStoreWithSelector_production_min() {
|
|
25
|
-
if (hasRequiredUseSyncExternalStoreWithSelector_production_min)
|
|
26
|
-
return useSyncExternalStoreWithSelector_production_min;
|
|
27
|
-
hasRequiredUseSyncExternalStoreWithSelector_production_min = 1;
|
|
28
|
-
var g = require$$0;
|
|
29
|
-
function n(a, b) {
|
|
30
|
-
return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;
|
|
31
|
-
}
|
|
32
|
-
var p = "function" === typeof Object.is ? Object.is : n, q = g.useSyncExternalStore, r = g.useRef, t = g.useEffect, u = g.useMemo, v = g.useDebugValue;
|
|
33
|
-
useSyncExternalStoreWithSelector_production_min.useSyncExternalStoreWithSelector = function(a, b, e, l, h) {
|
|
34
|
-
var c = r(null);
|
|
35
|
-
if (null === c.current) {
|
|
36
|
-
var f = { hasValue: false, value: null };
|
|
37
|
-
c.current = f;
|
|
38
|
-
} else
|
|
39
|
-
f = c.current;
|
|
40
|
-
c = u(function() {
|
|
41
|
-
function a2(a3) {
|
|
42
|
-
if (!c2) {
|
|
43
|
-
c2 = true;
|
|
44
|
-
d2 = a3;
|
|
45
|
-
a3 = l(a3);
|
|
46
|
-
if (void 0 !== h && f.hasValue) {
|
|
47
|
-
var b2 = f.value;
|
|
48
|
-
if (h(b2, a3))
|
|
49
|
-
return k = b2;
|
|
50
|
-
}
|
|
51
|
-
return k = a3;
|
|
52
|
-
}
|
|
53
|
-
b2 = k;
|
|
54
|
-
if (p(d2, a3))
|
|
55
|
-
return b2;
|
|
56
|
-
var e2 = l(a3);
|
|
57
|
-
if (void 0 !== h && h(b2, e2))
|
|
58
|
-
return b2;
|
|
59
|
-
d2 = a3;
|
|
60
|
-
return k = e2;
|
|
61
|
-
}
|
|
62
|
-
var c2 = false, d2, k, m = void 0 === e ? null : e;
|
|
63
|
-
return [function() {
|
|
64
|
-
return a2(b());
|
|
65
|
-
}, null === m ? void 0 : function() {
|
|
66
|
-
return a2(m());
|
|
67
|
-
}];
|
|
68
|
-
}, [b, e, l, h]);
|
|
69
|
-
var d = q(a, c[0], c[1]);
|
|
70
|
-
t(function() {
|
|
71
|
-
f.hasValue = true;
|
|
72
|
-
f.value = d;
|
|
73
|
-
}, [d]);
|
|
74
|
-
v(d);
|
|
75
|
-
return d;
|
|
76
|
-
};
|
|
77
|
-
return useSyncExternalStoreWithSelector_production_min;
|
|
78
|
-
}
|
|
79
|
-
var useSyncExternalStoreWithSelector_development = {};
|
|
80
|
-
/**
|
|
81
|
-
* @license React
|
|
82
|
-
* use-sync-external-store-with-selector.development.js
|
|
83
|
-
*
|
|
84
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
85
|
-
*
|
|
86
|
-
* This source code is licensed under the MIT license found in the
|
|
87
|
-
* LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/
|
|
89
|
-
var hasRequiredUseSyncExternalStoreWithSelector_development;
|
|
90
|
-
function requireUseSyncExternalStoreWithSelector_development() {
|
|
91
|
-
if (hasRequiredUseSyncExternalStoreWithSelector_development)
|
|
92
|
-
return useSyncExternalStoreWithSelector_development;
|
|
93
|
-
hasRequiredUseSyncExternalStoreWithSelector_development = 1;
|
|
94
|
-
if (process.env.NODE_ENV !== "production") {
|
|
95
|
-
(function() {
|
|
96
|
-
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
97
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
98
|
-
}
|
|
99
|
-
var React = require$$0;
|
|
100
|
-
function is(x, y) {
|
|
101
|
-
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
102
|
-
}
|
|
103
|
-
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
104
|
-
var useSyncExternalStore = React.useSyncExternalStore;
|
|
105
|
-
var useRef2 = React.useRef, useEffect2 = React.useEffect, useMemo2 = React.useMemo, useDebugValue2 = React.useDebugValue;
|
|
106
|
-
function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
107
|
-
var instRef = useRef2(null);
|
|
108
|
-
var inst;
|
|
109
|
-
if (instRef.current === null) {
|
|
110
|
-
inst = {
|
|
111
|
-
hasValue: false,
|
|
112
|
-
value: null
|
|
113
|
-
};
|
|
114
|
-
instRef.current = inst;
|
|
115
|
-
} else {
|
|
116
|
-
inst = instRef.current;
|
|
117
|
-
}
|
|
118
|
-
var _useMemo = useMemo2(function() {
|
|
119
|
-
var hasMemo = false;
|
|
120
|
-
var memoizedSnapshot;
|
|
121
|
-
var memoizedSelection;
|
|
122
|
-
var memoizedSelector = function(nextSnapshot) {
|
|
123
|
-
if (!hasMemo) {
|
|
124
|
-
hasMemo = true;
|
|
125
|
-
memoizedSnapshot = nextSnapshot;
|
|
126
|
-
var _nextSelection = selector(nextSnapshot);
|
|
127
|
-
if (isEqual !== void 0) {
|
|
128
|
-
if (inst.hasValue) {
|
|
129
|
-
var currentSelection = inst.value;
|
|
130
|
-
if (isEqual(currentSelection, _nextSelection)) {
|
|
131
|
-
memoizedSelection = currentSelection;
|
|
132
|
-
return currentSelection;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
memoizedSelection = _nextSelection;
|
|
137
|
-
return _nextSelection;
|
|
138
|
-
}
|
|
139
|
-
var prevSnapshot = memoizedSnapshot;
|
|
140
|
-
var prevSelection = memoizedSelection;
|
|
141
|
-
if (objectIs(prevSnapshot, nextSnapshot)) {
|
|
142
|
-
return prevSelection;
|
|
143
|
-
}
|
|
144
|
-
var nextSelection = selector(nextSnapshot);
|
|
145
|
-
if (isEqual !== void 0 && isEqual(prevSelection, nextSelection)) {
|
|
146
|
-
return prevSelection;
|
|
147
|
-
}
|
|
148
|
-
memoizedSnapshot = nextSnapshot;
|
|
149
|
-
memoizedSelection = nextSelection;
|
|
150
|
-
return nextSelection;
|
|
151
|
-
};
|
|
152
|
-
var maybeGetServerSnapshot = getServerSnapshot === void 0 ? null : getServerSnapshot;
|
|
153
|
-
var getSnapshotWithSelector = function() {
|
|
154
|
-
return memoizedSelector(getSnapshot());
|
|
155
|
-
};
|
|
156
|
-
var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? void 0 : function() {
|
|
157
|
-
return memoizedSelector(maybeGetServerSnapshot());
|
|
158
|
-
};
|
|
159
|
-
return [getSnapshotWithSelector, getServerSnapshotWithSelector];
|
|
160
|
-
}, [getSnapshot, getServerSnapshot, selector, isEqual]), getSelection = _useMemo[0], getServerSelection = _useMemo[1];
|
|
161
|
-
var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);
|
|
162
|
-
useEffect2(function() {
|
|
163
|
-
inst.hasValue = true;
|
|
164
|
-
inst.value = value;
|
|
165
|
-
}, [value]);
|
|
166
|
-
useDebugValue2(value);
|
|
167
|
-
return value;
|
|
168
|
-
}
|
|
169
|
-
useSyncExternalStoreWithSelector_development.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;
|
|
170
|
-
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
|
|
171
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
172
|
-
}
|
|
173
|
-
})();
|
|
174
|
-
}
|
|
175
|
-
return useSyncExternalStoreWithSelector_development;
|
|
176
|
-
}
|
|
177
|
-
(function(module) {
|
|
178
|
-
if (process.env.NODE_ENV === "production") {
|
|
179
|
-
module.exports = requireUseSyncExternalStoreWithSelector_production_min();
|
|
180
|
-
} else {
|
|
181
|
-
module.exports = requireUseSyncExternalStoreWithSelector_development();
|
|
182
|
-
}
|
|
183
|
-
})(withSelector);
|
|
184
|
-
function useStore(store, options) {
|
|
185
|
-
const lastEqualsRef = useRef();
|
|
186
|
-
const { rootStore, selector } = useMemo(() => {
|
|
187
|
-
var _a;
|
|
188
|
-
const rootStore2 = ((_a = store.derivedFrom) == null ? void 0 : _a.store) ?? store;
|
|
189
|
-
let selector2 = (x) => x;
|
|
190
|
-
if (store.derivedFrom) {
|
|
191
|
-
selector2 = (value2) => {
|
|
192
|
-
for (const s of store.derivedFrom.selectors) {
|
|
193
|
-
value2 = makeSelector(s)(value2);
|
|
194
|
-
}
|
|
195
|
-
return value2;
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
return { rootStore: rootStore2, selector: selector2 };
|
|
199
|
-
}, [store]);
|
|
200
|
-
const subOptions = { ...options, runNow: false, equals: void 0, passive: false };
|
|
201
|
-
const subscribe = useCallback(
|
|
202
|
-
(listener) => {
|
|
203
|
-
return rootStore.sub(listener, subOptions);
|
|
204
|
-
},
|
|
205
|
-
[rootStore, hash(subOptions)]
|
|
206
|
-
);
|
|
207
|
-
const value = withSelectorExports.useSyncExternalStoreWithSelector(
|
|
208
|
-
//
|
|
209
|
-
subscribe,
|
|
210
|
-
rootStore.get,
|
|
211
|
-
void 0,
|
|
212
|
-
selector,
|
|
213
|
-
(options == null ? void 0 : options.equals) ?? ((_v, newValue) => {
|
|
214
|
-
var _a;
|
|
215
|
-
return ((_a = lastEqualsRef.current) == null ? void 0 : _a.call(lastEqualsRef, newValue)) ?? false;
|
|
216
|
-
})
|
|
217
|
-
);
|
|
218
|
-
const [proxiedValue, equals] = trackingProxy(value);
|
|
219
|
-
useLayoutEffect(() => {
|
|
220
|
-
lastEqualsRef.current = equals;
|
|
221
|
-
});
|
|
222
|
-
useDebugValue(value);
|
|
223
|
-
return proxiedValue;
|
|
224
|
-
}
|
|
225
|
-
function useCache(cache, { passive, ...options } = {}) {
|
|
226
|
-
const mappedState = useMemo(() => {
|
|
227
|
-
var _a;
|
|
228
|
-
const rootCache = ((_a = cache.derivedFromCache) == null ? void 0 : _a.cache) ?? cache;
|
|
229
|
-
let selector = (x) => x;
|
|
230
|
-
if (cache.derivedFromCache) {
|
|
231
|
-
selector = (value) => {
|
|
232
|
-
for (const s of cache.derivedFromCache.selectors) {
|
|
233
|
-
value = makeSelector(s)(value);
|
|
234
|
-
}
|
|
235
|
-
return value;
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
return rootCache.state.map((state) => {
|
|
239
|
-
const value = state.status === "value" ? selector(state.value) : void 0;
|
|
240
|
-
return Object.assign(
|
|
241
|
-
[value, state.error, state.isUpdating, state.isStale],
|
|
242
|
-
{ ...state, value }
|
|
243
|
-
);
|
|
244
|
-
});
|
|
245
|
-
}, [cache]);
|
|
246
|
-
useEffect(() => !passive ? cache.sub(() => void 0) : void 0, [cache, passive]);
|
|
247
|
-
return useStore(mappedState, options);
|
|
248
|
-
}
|
|
249
|
-
function read(cache, options) {
|
|
250
|
-
const { status, value, error } = useCache(cache, options);
|
|
251
|
-
if (status === "value") {
|
|
252
|
-
return value;
|
|
253
|
-
}
|
|
254
|
-
if (status === "error") {
|
|
255
|
-
throw error;
|
|
256
|
-
}
|
|
257
|
-
throw cache.state.once((state) => state.status !== "pending");
|
|
258
|
-
}
|
|
259
|
-
const contextMap = /* @__PURE__ */ new WeakMap();
|
|
260
|
-
function getStoreScopeContext(scope) {
|
|
261
|
-
let context = contextMap.get(scope);
|
|
262
|
-
if (!context) {
|
|
263
|
-
context = createContext(createStore(scope.defaultValue));
|
|
264
|
-
contextMap.set(scope, context);
|
|
265
|
-
}
|
|
266
|
-
return context;
|
|
267
|
-
}
|
|
268
|
-
function StoreScopeProvider({ scope, store: inputStore, children }) {
|
|
269
|
-
const context = getStoreScopeContext(scope);
|
|
270
|
-
const currentStore = useMemo(
|
|
271
|
-
() => inputStore ?? createStore(scope.defaultValue),
|
|
272
|
-
[scope, inputStore]
|
|
273
|
-
);
|
|
274
|
-
return /* @__PURE__ */ jsx(context.Provider, { value: currentStore, children });
|
|
275
|
-
}
|
|
276
|
-
function useStoreScope(scope) {
|
|
277
|
-
const context = getStoreScopeContext(scope);
|
|
278
|
-
return useContext(context);
|
|
279
|
-
}
|
|
280
|
-
function useProp(store, options) {
|
|
281
|
-
const value = useStore(store, options);
|
|
282
|
-
return [value, store.set];
|
|
283
|
-
}
|
|
284
|
-
export {
|
|
285
|
-
StoreScopeProvider,
|
|
286
|
-
read,
|
|
287
|
-
useCache,
|
|
288
|
-
useProp,
|
|
289
|
-
useStore,
|
|
290
|
-
useStoreScope
|
|
291
|
-
};
|
|
292
|
-
//# sourceMappingURL=react.mjs.map
|
package/dist/es/react.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react.mjs","sources":["../../node_modules/.pnpm/use-sync-external-store@1.2.0_react@18.2.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.min.js","../../node_modules/.pnpm/use-sync-external-store@1.2.0_react@18.2.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js","../../node_modules/.pnpm/use-sync-external-store@1.2.0_react@18.2.0/node_modules/use-sync-external-store/with-selector.js","../../src/react/useStore.ts","../../src/react/useCache.ts","../../src/react/read.ts","../../src/react/storeScope.tsx","../../src/react/useProp.ts"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-with-selector.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var g=require(\"react\");function n(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var p=\"function\"===typeof Object.is?Object.is:n,q=g.useSyncExternalStore,r=g.useRef,t=g.useEffect,u=g.useMemo,v=g.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,h){var c=r(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=u(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==h&&f.hasValue){var b=f.value;if(h(b,a))return k=b}return k=a}b=k;if(p(d,a))return b;var e=l(a);if(void 0!==h&&h(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,h]);var d=q(a,c[0],c[1]);\nt(function(){f.hasValue=!0;f.value=d},[d]);v(d);return d};\n","/**\n * @license React\n * use-sync-external-store-with-selector.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar useSyncExternalStore = React.useSyncExternalStore;\n\n// for CommonJS interop.\n\nvar useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.\n\nfunction useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {\n // Use this to track the rendered snapshot.\n var instRef = useRef(null);\n var inst;\n\n if (instRef.current === null) {\n inst = {\n hasValue: false,\n value: null\n };\n instRef.current = inst;\n } else {\n inst = instRef.current;\n }\n\n var _useMemo = useMemo(function () {\n // Track the memoized state using closure variables that are local to this\n // memoized instance of a getSnapshot function. Intentionally not using a\n // useRef hook, because that state would be shared across all concurrent\n // copies of the hook/component.\n var hasMemo = false;\n var memoizedSnapshot;\n var memoizedSelection;\n\n var memoizedSelector = function (nextSnapshot) {\n if (!hasMemo) {\n // The first time the hook is called, there is no memoized result.\n hasMemo = true;\n memoizedSnapshot = nextSnapshot;\n\n var _nextSelection = selector(nextSnapshot);\n\n if (isEqual !== undefined) {\n // Even if the selector has changed, the currently rendered selection\n // may be equal to the new selection. We should attempt to reuse the\n // current value if possible, to preserve downstream memoizations.\n if (inst.hasValue) {\n var currentSelection = inst.value;\n\n if (isEqual(currentSelection, _nextSelection)) {\n memoizedSelection = currentSelection;\n return currentSelection;\n }\n }\n }\n\n memoizedSelection = _nextSelection;\n return _nextSelection;\n } // We may be able to reuse the previous invocation's result.\n\n\n // We may be able to reuse the previous invocation's result.\n var prevSnapshot = memoizedSnapshot;\n var prevSelection = memoizedSelection;\n\n if (objectIs(prevSnapshot, nextSnapshot)) {\n // The snapshot is the same as last time. Reuse the previous selection.\n return prevSelection;\n } // The snapshot has changed, so we need to compute a new selection.\n\n\n // The snapshot has changed, so we need to compute a new selection.\n var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n\n // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {\n return prevSelection;\n }\n\n memoizedSnapshot = nextSnapshot;\n memoizedSelection = nextSelection;\n return nextSelection;\n }; // Assigning this to a constant so that Flow knows it can't change.\n\n\n // Assigning this to a constant so that Flow knows it can't change.\n var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;\n\n var getSnapshotWithSelector = function () {\n return memoizedSelector(getSnapshot());\n };\n\n var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n };\n return [getSnapshotWithSelector, getServerSnapshotWithSelector];\n }, [getSnapshot, getServerSnapshot, selector, isEqual]),\n getSelection = _useMemo[0],\n getServerSelection = _useMemo[1];\n\n var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);\n useEffect(function () {\n inst.hasValue = true;\n inst.value = value;\n }, [value]);\n useDebugValue(value);\n return value;\n}\n\nexports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/use-sync-external-store-with-selector.production.min.js');\n} else {\n module.exports = require('./cjs/use-sync-external-store-with-selector.development.js');\n}\n","import { useCallback, useDebugValue, useLayoutEffect, useMemo, useRef } from 'react';\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/with-selector.js';\nimport type { SubscribeOptions } from '@core/commonTypes';\nimport type { Store } from '@core/store';\nimport { hash } from '@lib/hash';\nimport { makeSelector } from '@lib/makeSelector';\nimport { trackingProxy } from '@lib/trackingProxy';\n\nexport type UseStoreOptions = Omit<SubscribeOptions, 'runNow' | 'passive'>;\n\nexport function useStore<T>(store: Store<T>, options?: UseStoreOptions): T {\n const lastEqualsRef = useRef<(newValue: T) => boolean>();\n\n const { rootStore, selector } = useMemo(() => {\n const rootStore = store.derivedFrom?.store ?? store;\n let selector = (x: any) => x;\n\n if (store.derivedFrom) {\n selector = (value: any) => {\n for (const s of store.derivedFrom!.selectors) {\n value = makeSelector(s)(value);\n }\n return value;\n };\n }\n\n return { rootStore, selector };\n }, [store]);\n\n const subOptions = { ...options, runNow: false, equals: undefined, passive: false };\n const subscribe = useCallback(\n (listener: () => void) => {\n return rootStore.sub(listener, subOptions);\n },\n [rootStore, hash(subOptions)],\n );\n\n const value = useSyncExternalStoreWithSelector<unknown, T>(\n //\n subscribe,\n rootStore.get,\n undefined,\n selector,\n options?.equals ?? ((_v, newValue) => lastEqualsRef.current?.(newValue) ?? false),\n );\n const [proxiedValue, equals] = trackingProxy(value);\n\n useLayoutEffect(() => {\n lastEqualsRef.current = equals;\n });\n\n useDebugValue(value);\n return proxiedValue;\n}\n","import { useEffect, useMemo } from 'react';\nimport type { UseStoreOptions } from './useStore';\nimport { useStore } from './useStore';\nimport type { Cache } from '@core';\nimport type { CacheState } from '@lib/cacheState';\nimport { makeSelector } from '@lib/makeSelector';\n\nexport type UseCacheArray<T> = [\n value: T | undefined,\n error: unknown | undefined,\n isUpdating: boolean,\n isStale: boolean,\n];\n\nexport type UseCacheValue<T> = UseCacheArray<T> & CacheState<T>;\n\nexport interface UseCacheOptions extends UseStoreOptions {\n passive?: boolean;\n}\n\nexport function useCache<T>(\n cache: Cache<T>,\n { passive, ...options }: UseCacheOptions = {},\n): UseCacheValue<T> {\n const mappedState = useMemo(() => {\n const rootCache: Cache<any> = cache.derivedFromCache?.cache ?? cache;\n let selector = (x: any) => x;\n\n if (cache.derivedFromCache) {\n selector = (value: any) => {\n for (const s of cache.derivedFromCache!.selectors) {\n value = makeSelector(s)(value);\n }\n return value;\n };\n }\n\n return rootCache.state.map((state) => {\n const value = state.status === 'value' ? selector(state.value) : undefined;\n\n return Object.assign<UseCacheArray<T>, CacheState<T>>(\n [value, state.error, state.isUpdating, state.isStale],\n { ...state, value },\n );\n });\n }, [cache]);\n\n useEffect(() => (!passive ? cache.sub(() => undefined) : undefined), [cache, passive]);\n\n return useStore(mappedState, options);\n}\n","import { useCache } from './useCache';\nimport type { UseStoreOptions } from './useStore';\nimport type { Cache } from '@core';\n\nexport function read<T>(cache: Cache<T>, options?: UseStoreOptions): T {\n const { status, value, error } = useCache(cache, options);\n\n if (status === 'value') {\n return value;\n }\n\n if (status === 'error') {\n throw error;\n }\n\n throw cache.state.once((state) => state.status !== 'pending');\n}\n","import type { Context, ReactNode } from 'react';\nimport { createContext, useContext, useMemo } from 'react';\nimport type { Store } from '@core/store';\nimport { createStore } from '@core/store';\nimport type { StoreScope } from '@core/storeScope';\n\nexport type StoreScopeProps<T> = { scope: StoreScope<T>; store?: Store<T>; children?: ReactNode };\n\nexport const contextMap = new WeakMap<StoreScope<any>, Context<Store<any>>>();\n\nexport function getStoreScopeContext<T>(scope: StoreScope<T>): Context<Store<T>> {\n let context = contextMap.get(scope);\n\n if (!context) {\n context = createContext<Store<T>>(createStore(scope.defaultValue));\n contextMap.set(scope, context);\n }\n\n return context;\n}\n\nexport function StoreScopeProvider<T>({ scope, store: inputStore, children }: StoreScopeProps<T>) {\n const context = getStoreScopeContext(scope);\n const currentStore = useMemo(\n () => inputStore ?? createStore(scope.defaultValue),\n [scope, inputStore],\n );\n\n return <context.Provider value={currentStore}>{children}</context.Provider>;\n}\n\nexport function useStoreScope<T>(scope: StoreScope<T>): Store<T> {\n const context = getStoreScopeContext(scope);\n return useContext(context);\n}\n","import type { UseStoreOptions } from './useStore';\nimport { useStore } from './useStore';\nimport type { Store } from '@core/store';\nimport type { UpdateFunction } from '@core/commonTypes';\n\nexport function useProp<T>(\n store: Store<T>,\n options?: UseStoreOptions,\n): [value: T, setValue: UpdateFunction<T>] {\n const value = useStore(store, options);\n\n return [value, store.set];\n}\n"],"names":["a","c","d","b","e","useRef","useEffect","useMemo","useDebugValue","require$$0","require$$1","rootStore","selector","value","useSyncExternalStoreWithSelector"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AASa,MAAI,IAAE;AAAiB,WAAS,EAAE,GAAE,GAAE;AAAC,WAAO,MAAI,MAAI,MAAI,KAAG,IAAE,MAAI,IAAE,MAAI,MAAI,KAAG,MAAI;AAAA,EAAC;AAAC,MAAI,IAAE,eAAa,OAAO,OAAO,KAAG,OAAO,KAAG,GAAE,IAAE,EAAE,sBAAqB,IAAE,EAAE,QAAO,IAAE,EAAE,WAAU,IAAE,EAAE,SAAQ,IAAE,EAAE;AACrN,kDAAA,mCAAyC,SAAS,GAAE,GAAE,GAAE,GAAE,GAAE;AAAC,QAAI,IAAE,EAAE,IAAI;AAAE,QAAG,SAAO,EAAE,SAAQ;AAAC,UAAI,IAAE,EAAC,UAAS,OAAG,OAAM,KAAI;AAAE,QAAE,UAAQ;AAAA,IAAC;AAAM,UAAE,EAAE;AAAQ,QAAE,EAAE,WAAU;AAAC,eAASA,GAAEA,IAAE;AAAC,YAAG,CAACC,IAAE;AAAC,UAAAA,KAAE;AAAG,UAAAC,KAAEF;AAAE,UAAAA,KAAE,EAAEA,EAAC;AAAE,cAAG,WAAS,KAAG,EAAE,UAAS;AAAC,gBAAIG,KAAE,EAAE;AAAM,gBAAG,EAAEA,IAAEH,EAAC;AAAE,qBAAO,IAAEG;AAAA,UAAC;AAAC,iBAAO,IAAEH;AAAA,QAAC;AAAC,QAAAG,KAAE;AAAE,YAAG,EAAED,IAAEF,EAAC;AAAE,iBAAOG;AAAE,YAAIC,KAAE,EAAEJ,EAAC;AAAE,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