@powerhousedao/connect 1.0.0-dev.224 → 1.0.0-dev.226
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/.env +1 -1
- package/dist/assets/Compass-C76eC2wG.js +7 -0
- package/dist/assets/DescendenceModified-342EmN5F.js +7 -0
- package/dist/assets/DownloadFile-CG56Of8p.js +7 -0
- package/dist/assets/ExportCsv-C7-cdsgH.js +7 -0
- package/dist/assets/ExportJson-dmS3d6_7.js +7 -0
- package/dist/assets/ExportPdf-DwZayNuB.js +7 -0
- package/dist/assets/ExportUbl-DwfYquKC.js +7 -0
- package/dist/assets/ExportZip-v1bseKb6.js +7 -0
- package/dist/assets/Tube-CxlaYTDX.js +7 -0
- package/dist/assets/app-CSi6MS9b.css +5589 -0
- package/dist/assets/{app-CH-KhVaM.js → app-Dx9RAGb2.js} +2435 -4502
- package/dist/assets/{app-loader-BY0bGSIq.css → app-loader-9W65A3zy.css} +398 -357
- package/dist/assets/{app-loader-Ca6u8xsq.js → app-loader-UmUil9Cq.js} +37 -236
- package/dist/assets/{ccip-aMuO0u6_.js → ccip-DuKCFXTI.js} +3 -3
- package/dist/assets/{content-BUG93V5L.js → content-BNeFZhJK.js} +63 -65
- package/dist/assets/{index-DVpn6_8o.js → index-BPM49za2.js} +3 -3
- package/dist/assets/{index-CWLJWRjB.js → index-BVHPSgKi.js} +34 -80
- package/dist/assets/{index-CMO0jmij.js → index-CUuLJlow.js} +4 -4
- package/dist/assets/{main.BenWGw4J.js → main.BCAScifZ.js} +1 -1
- package/dist/assets/{style-CQ-MDl3w.css → style-ICX7vBg_.css} +2 -2
- package/dist/assets/{types-b4BfZ8ti.js → types-DJg5CO3J.js} +9 -0
- package/dist/index.html +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-2ZNMEO7F.js → chunk-56M56AY3.js} +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-OS3WZ4EZ.js → chunk-6VFLMUEK.js} +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-MHTRZST7.js → chunk-AVKPBC5Q.js} +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-KDBDV2ML.js → chunk-C3OQGBKD.js} +14 -206
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-2457SE2E.js → chunk-D2ZLIUVV.js} +301 -352
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-AF3TNTAG.js → chunk-IIX6OOYS.js} +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-R3DNAUCO.js → chunk-NNVEKADD.js} +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/chunk-QXHTR6KF.js +0 -0
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-IFKFX4E7.js → chunk-X7WYJJFB.js} +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-YBWJLG4N.js → chunk-Y2S6GVIW.js} +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-DZDC5PJZ.js → chunk-YIBO3HUQ.js} +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/context/index.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/context/read-mode.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/hooks/index.js +8 -8
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useAddDebouncedOperations.js +3 -3
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useConnectCrypto.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentDrives.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentEditor.js +5 -5
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActions.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes.js +3 -3
- package/dist/modules/@powerhousedao/reactor-browser/index.js +12 -11
- package/dist/modules/@powerhousedao/reactor-browser/reactor.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/renown/types.js +1 -0
- package/dist/swEnv.js +1 -1
- package/dist/vite-envs.sh +10 -10
- package/package.json +11 -14
- package/dist/assets/app-Cln9uYMI.css +0 -1242
- package/scripts/install-packages.js +0 -9
- /package/dist/modules/@powerhousedao/reactor-browser/{chunk-DI2LBUDE.js → chunk-LH2T6NLN.js} +0 -0
|
@@ -1,25 +1,43 @@
|
|
|
1
|
-
// ../../node_modules/.pnpm/jotai@2.
|
|
1
|
+
// ../../node_modules/.pnpm/jotai@2.11.1_@types+react@18.3.18_react@18.3.1/node_modules/jotai/esm/vanilla.mjs
|
|
2
|
+
var keyCount = 0;
|
|
3
|
+
function atom(read, write) {
|
|
4
|
+
const key = `atom${++keyCount}`;
|
|
5
|
+
const config = {
|
|
6
|
+
toString() {
|
|
7
|
+
return (import.meta.env ? import.meta.env.MODE : void 0) !== "production" && this.debugLabel ? key + ":" + this.debugLabel : key;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
if (typeof read === "function") {
|
|
11
|
+
config.read = read;
|
|
12
|
+
} else {
|
|
13
|
+
config.init = read;
|
|
14
|
+
config.read = defaultRead;
|
|
15
|
+
config.write = defaultWrite;
|
|
16
|
+
}
|
|
17
|
+
if (write) {
|
|
18
|
+
config.write = write;
|
|
19
|
+
}
|
|
20
|
+
return config;
|
|
21
|
+
}
|
|
22
|
+
function defaultRead(get) {
|
|
23
|
+
return get(this);
|
|
24
|
+
}
|
|
25
|
+
function defaultWrite(get, set, arg) {
|
|
26
|
+
return set(
|
|
27
|
+
this,
|
|
28
|
+
typeof arg === "function" ? arg(get(this)) : arg
|
|
29
|
+
);
|
|
30
|
+
}
|
|
2
31
|
var isSelfAtom = (atom2, a) => atom2.unstable_is ? atom2.unstable_is(a) : a === atom2;
|
|
3
32
|
var hasInitialValue = (atom2) => "init" in atom2;
|
|
4
33
|
var isActuallyWritableAtom = (atom2) => !!atom2.write;
|
|
5
|
-
var
|
|
6
|
-
var returnAtomValue = (atomState) => {
|
|
7
|
-
if ("e" in atomState) {
|
|
8
|
-
throw atomState.e;
|
|
9
|
-
}
|
|
10
|
-
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && !("v" in atomState)) {
|
|
11
|
-
throw new Error("[Bug] atom state is not initialized");
|
|
12
|
-
}
|
|
13
|
-
return atomState.v;
|
|
14
|
-
};
|
|
15
|
-
var PROMISE_STATE = Symbol();
|
|
16
|
-
var getPromiseState = (promise) => promise[PROMISE_STATE];
|
|
34
|
+
var cancelablePromiseMap = /* @__PURE__ */ new WeakMap();
|
|
17
35
|
var isPendingPromise = (value) => {
|
|
18
36
|
var _a;
|
|
19
|
-
return isPromiseLike(value) && !((_a =
|
|
37
|
+
return isPromiseLike(value) && !((_a = cancelablePromiseMap.get(value)) == null ? void 0 : _a[1]);
|
|
20
38
|
};
|
|
21
39
|
var cancelPromise = (promise, nextValue) => {
|
|
22
|
-
const promiseState =
|
|
40
|
+
const promiseState = cancelablePromiseMap.get(promise);
|
|
23
41
|
if (promiseState) {
|
|
24
42
|
promiseState[1] = true;
|
|
25
43
|
promiseState[0].forEach((fn) => fn(nextValue));
|
|
@@ -28,11 +46,11 @@ var cancelPromise = (promise, nextValue) => {
|
|
|
28
46
|
}
|
|
29
47
|
};
|
|
30
48
|
var patchPromiseForCancelability = (promise) => {
|
|
31
|
-
if (
|
|
49
|
+
if (cancelablePromiseMap.has(promise)) {
|
|
32
50
|
return;
|
|
33
51
|
}
|
|
34
52
|
const promiseState = [/* @__PURE__ */ new Set(), false];
|
|
35
|
-
promise
|
|
53
|
+
cancelablePromiseMap.set(promise, promiseState);
|
|
36
54
|
const settle = () => {
|
|
37
55
|
promiseState[1] = true;
|
|
38
56
|
};
|
|
@@ -42,6 +60,16 @@ var patchPromiseForCancelability = (promise) => {
|
|
|
42
60
|
};
|
|
43
61
|
};
|
|
44
62
|
var isPromiseLike = (p) => typeof (p == null ? void 0 : p.then) === "function";
|
|
63
|
+
var isAtomStateInitialized = (atomState) => "v" in atomState || "e" in atomState;
|
|
64
|
+
var returnAtomValue = (atomState) => {
|
|
65
|
+
if ("e" in atomState) {
|
|
66
|
+
throw atomState.e;
|
|
67
|
+
}
|
|
68
|
+
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && !("v" in atomState)) {
|
|
69
|
+
throw new Error("[Bug] atom state is not initialized");
|
|
70
|
+
}
|
|
71
|
+
return atomState.v;
|
|
72
|
+
};
|
|
45
73
|
var addPendingPromiseToDependency = (atom2, promise, dependencyAtomState) => {
|
|
46
74
|
if (!dependencyAtomState.p.has(atom2)) {
|
|
47
75
|
dependencyAtomState.p.add(atom2);
|
|
@@ -55,122 +83,60 @@ var addPendingPromiseToDependency = (atom2, promise, dependencyAtomState) => {
|
|
|
55
83
|
);
|
|
56
84
|
}
|
|
57
85
|
};
|
|
58
|
-
var
|
|
59
|
-
const atomState = ensureAtomState(atom2);
|
|
60
|
-
const hasPrevValue = "v" in atomState;
|
|
61
|
-
const prevValue = atomState.v;
|
|
62
|
-
const pendingPromise = isPendingPromise(atomState.v) ? atomState.v : null;
|
|
63
|
-
if (isPromiseLike(valueOrPromise)) {
|
|
64
|
-
patchPromiseForCancelability(valueOrPromise);
|
|
65
|
-
for (const a of atomState.d.keys()) {
|
|
66
|
-
addPendingPromiseToDependency(atom2, valueOrPromise, ensureAtomState(a));
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
atomState.v = valueOrPromise;
|
|
70
|
-
delete atomState.e;
|
|
71
|
-
if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {
|
|
72
|
-
++atomState.n;
|
|
73
|
-
if (pendingPromise) {
|
|
74
|
-
cancelPromise(pendingPromise, valueOrPromise);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
var getMountedOrPendingDependents = (atom2, atomState, mountedMap) => {
|
|
86
|
+
var addDependency = (atom2, atomState, a, aState) => {
|
|
79
87
|
var _a;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (mountedMap.has(a)) {
|
|
83
|
-
dependents.add(a);
|
|
84
|
-
}
|
|
88
|
+
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && a === atom2) {
|
|
89
|
+
throw new Error("[Bug] atom cannot depend on itself");
|
|
85
90
|
}
|
|
86
|
-
|
|
87
|
-
|
|
91
|
+
atomState.d.set(a, aState.n);
|
|
92
|
+
if (isPendingPromise(atomState.v)) {
|
|
93
|
+
addPendingPromiseToDependency(atom2, atomState.v, aState);
|
|
88
94
|
}
|
|
89
|
-
|
|
90
|
-
};
|
|
91
|
-
var createStoreHook = () => {
|
|
92
|
-
const callbacks = /* @__PURE__ */ new Set();
|
|
93
|
-
const notify = () => {
|
|
94
|
-
callbacks.forEach((fn) => fn());
|
|
95
|
-
};
|
|
96
|
-
notify.add = (fn) => {
|
|
97
|
-
callbacks.add(fn);
|
|
98
|
-
return () => {
|
|
99
|
-
callbacks.delete(fn);
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
return notify;
|
|
103
|
-
};
|
|
104
|
-
var createStoreHookForAtoms = () => {
|
|
105
|
-
const all = {};
|
|
106
|
-
const callbacks = /* @__PURE__ */ new WeakMap();
|
|
107
|
-
const notify = (atom2) => {
|
|
108
|
-
var _a, _b;
|
|
109
|
-
(_a = callbacks.get(all)) == null ? void 0 : _a.forEach((fn) => fn(atom2));
|
|
110
|
-
(_b = callbacks.get(atom2)) == null ? void 0 : _b.forEach((fn) => fn());
|
|
111
|
-
};
|
|
112
|
-
notify.add = (atom2, fn) => {
|
|
113
|
-
const key = atom2 || all;
|
|
114
|
-
const fns = (callbacks.has(key) ? callbacks : callbacks.set(key, /* @__PURE__ */ new Set())).get(key);
|
|
115
|
-
fns.add(fn);
|
|
116
|
-
return () => {
|
|
117
|
-
fns == null ? void 0 : fns.delete(fn);
|
|
118
|
-
if (!fns.size) {
|
|
119
|
-
callbacks.delete(key);
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
return notify;
|
|
95
|
+
(_a = aState.m) == null ? void 0 : _a.t.add(atom2);
|
|
124
96
|
};
|
|
125
|
-
var
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}, atomOnMount = (atom2, setAtom) => {
|
|
137
|
-
var _a;
|
|
138
|
-
return (_a = atom2.onMount) == null ? void 0 : _a.call(atom2, setAtom);
|
|
139
|
-
}, ...buildingBlockFunctions) => {
|
|
140
|
-
const ensureAtomState = buildingBlockFunctions[0] || ((atom2) => {
|
|
97
|
+
var INTERNAL_flushStoreHook = Symbol.for("JOTAI.EXPERIMENTAL.FLUSHSTOREHOOK");
|
|
98
|
+
var buildStore = (...storeArgs) => {
|
|
99
|
+
const [
|
|
100
|
+
getAtomState,
|
|
101
|
+
setAtomState,
|
|
102
|
+
atomRead,
|
|
103
|
+
atomWrite,
|
|
104
|
+
atomOnInit,
|
|
105
|
+
atomOnMount
|
|
106
|
+
] = storeArgs;
|
|
107
|
+
const ensureAtomState = (atom2) => {
|
|
141
108
|
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && !atom2) {
|
|
142
109
|
throw new Error("Atom is undefined or null");
|
|
143
110
|
}
|
|
144
|
-
let atomState =
|
|
111
|
+
let atomState = getAtomState(atom2);
|
|
145
112
|
if (!atomState) {
|
|
146
113
|
atomState = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 };
|
|
147
|
-
|
|
114
|
+
setAtomState(atom2, atomState);
|
|
148
115
|
atomOnInit == null ? void 0 : atomOnInit(atom2, store);
|
|
149
116
|
}
|
|
150
117
|
return atomState;
|
|
151
|
-
}
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
118
|
+
};
|
|
119
|
+
const invalidatedAtoms = /* @__PURE__ */ new WeakMap();
|
|
120
|
+
const changedAtoms = /* @__PURE__ */ new Map();
|
|
121
|
+
const unmountCallbacks = /* @__PURE__ */ new Set();
|
|
122
|
+
const mountCallbacks = /* @__PURE__ */ new Set();
|
|
123
|
+
const flushCallbacks = () => {
|
|
124
|
+
var _a;
|
|
125
|
+
const errors = [];
|
|
155
126
|
const call = (fn) => {
|
|
156
127
|
try {
|
|
157
128
|
fn();
|
|
158
129
|
} catch (e) {
|
|
159
|
-
|
|
160
|
-
hasError = true;
|
|
161
|
-
error = e;
|
|
162
|
-
}
|
|
130
|
+
errors.push(e);
|
|
163
131
|
}
|
|
164
132
|
};
|
|
165
133
|
do {
|
|
166
|
-
|
|
167
|
-
call(storeHooks.f);
|
|
168
|
-
}
|
|
134
|
+
(_a = store[INTERNAL_flushStoreHook]) == null ? void 0 : _a.call(store);
|
|
169
135
|
const callbacks = /* @__PURE__ */ new Set();
|
|
170
136
|
const add = callbacks.add.bind(callbacks);
|
|
171
|
-
changedAtoms.forEach((
|
|
172
|
-
var
|
|
173
|
-
return (
|
|
137
|
+
changedAtoms.forEach((atomState) => {
|
|
138
|
+
var _a2;
|
|
139
|
+
return (_a2 = atomState.m) == null ? void 0 : _a2.l.forEach(add);
|
|
174
140
|
});
|
|
175
141
|
changedAtoms.clear();
|
|
176
142
|
unmountCallbacks.forEach(add);
|
|
@@ -182,60 +148,36 @@ var buildStore = (atomStateMap = /* @__PURE__ */ new WeakMap(), mountedMap = /*
|
|
|
182
148
|
recomputeInvalidatedAtoms();
|
|
183
149
|
}
|
|
184
150
|
} while (changedAtoms.size || unmountCallbacks.size || mountCallbacks.size);
|
|
185
|
-
if (
|
|
186
|
-
throw
|
|
151
|
+
if (errors.length) {
|
|
152
|
+
throw errors[0];
|
|
187
153
|
}
|
|
188
|
-
}
|
|
189
|
-
const
|
|
190
|
-
const
|
|
191
|
-
const
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
const a
|
|
196
|
-
|
|
197
|
-
if (visited.has(a)) {
|
|
198
|
-
stack.pop();
|
|
199
|
-
continue;
|
|
200
|
-
}
|
|
201
|
-
if (visiting.has(a)) {
|
|
202
|
-
if (invalidatedAtoms.get(a) === aState.n) {
|
|
203
|
-
topSortedReversed.push([a, aState]);
|
|
204
|
-
} else if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && invalidatedAtoms.has(a)) {
|
|
205
|
-
throw new Error("[Bug] invalidated atom exists");
|
|
206
|
-
}
|
|
207
|
-
visited.add(a);
|
|
208
|
-
stack.pop();
|
|
209
|
-
continue;
|
|
210
|
-
}
|
|
211
|
-
visiting.add(a);
|
|
212
|
-
for (const d of getMountedOrPendingDependents(a, aState, mountedMap)) {
|
|
213
|
-
if (!visiting.has(d)) {
|
|
214
|
-
stack.push(d);
|
|
215
|
-
}
|
|
154
|
+
};
|
|
155
|
+
const setAtomStateValueOrPromise = (atom2, atomState, valueOrPromise) => {
|
|
156
|
+
const hasPrevValue = "v" in atomState;
|
|
157
|
+
const prevValue = atomState.v;
|
|
158
|
+
const pendingPromise = isPendingPromise(atomState.v) ? atomState.v : null;
|
|
159
|
+
if (isPromiseLike(valueOrPromise)) {
|
|
160
|
+
patchPromiseForCancelability(valueOrPromise);
|
|
161
|
+
for (const a of atomState.d.keys()) {
|
|
162
|
+
addPendingPromiseToDependency(atom2, valueOrPromise, ensureAtomState(a));
|
|
216
163
|
}
|
|
164
|
+
atomState.v = valueOrPromise;
|
|
165
|
+
} else {
|
|
166
|
+
atomState.v = valueOrPromise;
|
|
217
167
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
hasChangedDeps = true;
|
|
224
|
-
break;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
if (hasChangedDeps) {
|
|
228
|
-
readAtomState(a);
|
|
229
|
-
mountDependencies(a);
|
|
168
|
+
delete atomState.e;
|
|
169
|
+
if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {
|
|
170
|
+
++atomState.n;
|
|
171
|
+
if (pendingPromise) {
|
|
172
|
+
cancelPromise(pendingPromise, valueOrPromise);
|
|
230
173
|
}
|
|
231
|
-
invalidatedAtoms.delete(a);
|
|
232
174
|
}
|
|
233
|
-
}
|
|
234
|
-
const readAtomState =
|
|
235
|
-
var _a
|
|
175
|
+
};
|
|
176
|
+
const readAtomState = (atom2) => {
|
|
177
|
+
var _a;
|
|
236
178
|
const atomState = ensureAtomState(atom2);
|
|
237
179
|
if (isAtomStateInitialized(atomState)) {
|
|
238
|
-
if (
|
|
180
|
+
if (atomState.m && invalidatedAtoms.get(atom2) !== atomState.n) {
|
|
239
181
|
return atomState;
|
|
240
182
|
}
|
|
241
183
|
if (Array.from(atomState.d).every(
|
|
@@ -251,19 +193,18 @@ var buildStore = (atomStateMap = /* @__PURE__ */ new WeakMap(), mountedMap = /*
|
|
|
251
193
|
atomState.d.clear();
|
|
252
194
|
let isSync = true;
|
|
253
195
|
const mountDependenciesIfAsync = () => {
|
|
254
|
-
if (
|
|
255
|
-
mountDependencies(atom2);
|
|
196
|
+
if (atomState.m) {
|
|
197
|
+
mountDependencies(atom2, atomState);
|
|
256
198
|
recomputeInvalidatedAtoms();
|
|
257
199
|
flushCallbacks();
|
|
258
200
|
}
|
|
259
201
|
};
|
|
260
202
|
const getter = (a) => {
|
|
261
|
-
var _a2;
|
|
262
203
|
if (isSelfAtom(atom2, a)) {
|
|
263
204
|
const aState2 = ensureAtomState(a);
|
|
264
205
|
if (!isAtomStateInitialized(aState2)) {
|
|
265
206
|
if (hasInitialValue(a)) {
|
|
266
|
-
setAtomStateValueOrPromise(a, a.init
|
|
207
|
+
setAtomStateValueOrPromise(a, aState2, a.init);
|
|
267
208
|
} else {
|
|
268
209
|
throw new Error("no atom init");
|
|
269
210
|
}
|
|
@@ -274,11 +215,7 @@ var buildStore = (atomStateMap = /* @__PURE__ */ new WeakMap(), mountedMap = /*
|
|
|
274
215
|
try {
|
|
275
216
|
return returnAtomValue(aState);
|
|
276
217
|
} finally {
|
|
277
|
-
atomState
|
|
278
|
-
if (isPendingPromise(atomState.v)) {
|
|
279
|
-
addPendingPromiseToDependency(atom2, atomState.v, aState);
|
|
280
|
-
}
|
|
281
|
-
(_a2 = mountedMap.get(a)) == null ? void 0 : _a2.t.add(atom2);
|
|
218
|
+
addDependency(atom2, atomState, a, aState);
|
|
282
219
|
if (!isSync) {
|
|
283
220
|
mountDependenciesIfAsync();
|
|
284
221
|
}
|
|
@@ -303,28 +240,19 @@ var buildStore = (atomStateMap = /* @__PURE__ */ new WeakMap(), mountedMap = /*
|
|
|
303
240
|
console.warn("setSelf function cannot be called in sync");
|
|
304
241
|
}
|
|
305
242
|
if (!isSync) {
|
|
306
|
-
|
|
307
|
-
return writeAtomState(atom2, ...args);
|
|
308
|
-
} finally {
|
|
309
|
-
recomputeInvalidatedAtoms();
|
|
310
|
-
flushCallbacks();
|
|
311
|
-
}
|
|
243
|
+
return writeAtom(atom2, ...args);
|
|
312
244
|
}
|
|
313
245
|
};
|
|
314
246
|
}
|
|
315
247
|
return setSelf;
|
|
316
248
|
}
|
|
317
249
|
};
|
|
318
|
-
const prevEpochNumber = atomState.n;
|
|
319
250
|
try {
|
|
320
251
|
const valueOrPromise = atomRead(atom2, getter, options);
|
|
321
|
-
setAtomStateValueOrPromise(atom2,
|
|
252
|
+
setAtomStateValueOrPromise(atom2, atomState, valueOrPromise);
|
|
322
253
|
if (isPromiseLike(valueOrPromise)) {
|
|
323
254
|
(_a = valueOrPromise.onCancel) == null ? void 0 : _a.call(valueOrPromise, () => controller == null ? void 0 : controller.abort());
|
|
324
|
-
valueOrPromise.then(
|
|
325
|
-
mountDependenciesIfAsync,
|
|
326
|
-
mountDependenciesIfAsync
|
|
327
|
-
);
|
|
255
|
+
valueOrPromise.then(mountDependenciesIfAsync, mountDependenciesIfAsync);
|
|
328
256
|
}
|
|
329
257
|
return atomState;
|
|
330
258
|
} catch (error) {
|
|
@@ -334,26 +262,89 @@ var buildStore = (atomStateMap = /* @__PURE__ */ new WeakMap(), mountedMap = /*
|
|
|
334
262
|
return atomState;
|
|
335
263
|
} finally {
|
|
336
264
|
isSync = false;
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
const readAtom = (atom2) => returnAtomValue(readAtomState(atom2));
|
|
268
|
+
const getMountedOrPendingDependents = (atomState) => {
|
|
269
|
+
var _a;
|
|
270
|
+
const dependents = /* @__PURE__ */ new Map();
|
|
271
|
+
for (const a of ((_a = atomState.m) == null ? void 0 : _a.t) || []) {
|
|
272
|
+
const aState = ensureAtomState(a);
|
|
273
|
+
if (aState.m) {
|
|
274
|
+
dependents.set(a, aState);
|
|
341
275
|
}
|
|
342
276
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
277
|
+
for (const atomWithPendingPromise of atomState.p) {
|
|
278
|
+
dependents.set(
|
|
279
|
+
atomWithPendingPromise,
|
|
280
|
+
ensureAtomState(atomWithPendingPromise)
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
return dependents;
|
|
284
|
+
};
|
|
285
|
+
const invalidateDependents = (atomState) => {
|
|
286
|
+
const stack = [atomState];
|
|
346
287
|
while (stack.length) {
|
|
347
|
-
const
|
|
348
|
-
const
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
288
|
+
const aState = stack.pop();
|
|
289
|
+
for (const [d, s] of getMountedOrPendingDependents(aState)) {
|
|
290
|
+
if (!invalidatedAtoms.has(d)) {
|
|
291
|
+
invalidatedAtoms.set(d, s.n);
|
|
292
|
+
stack.push(s);
|
|
293
|
+
}
|
|
353
294
|
}
|
|
354
295
|
}
|
|
355
|
-
}
|
|
356
|
-
const
|
|
296
|
+
};
|
|
297
|
+
const recomputeInvalidatedAtoms = () => {
|
|
298
|
+
var _a;
|
|
299
|
+
const topSortedReversed = [];
|
|
300
|
+
const visiting = /* @__PURE__ */ new WeakSet();
|
|
301
|
+
const visited = /* @__PURE__ */ new WeakSet();
|
|
302
|
+
const stack = Array.from(changedAtoms);
|
|
303
|
+
while (stack.length) {
|
|
304
|
+
const [a, aState] = stack[stack.length - 1];
|
|
305
|
+
if (visited.has(a)) {
|
|
306
|
+
stack.pop();
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
if (visiting.has(a)) {
|
|
310
|
+
if (invalidatedAtoms.get(a) === aState.n) {
|
|
311
|
+
topSortedReversed.push([a, aState, aState.n]);
|
|
312
|
+
} else {
|
|
313
|
+
invalidatedAtoms.delete(a);
|
|
314
|
+
changedAtoms.set(a, aState);
|
|
315
|
+
}
|
|
316
|
+
visited.add(a);
|
|
317
|
+
stack.pop();
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
320
|
+
visiting.add(a);
|
|
321
|
+
for (const [d, s] of getMountedOrPendingDependents(aState)) {
|
|
322
|
+
if (!visiting.has(d)) {
|
|
323
|
+
stack.push([d, s]);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
for (let i = topSortedReversed.length - 1; i >= 0; --i) {
|
|
328
|
+
const [a, aState, prevEpochNumber] = topSortedReversed[i];
|
|
329
|
+
let hasChangedDeps = false;
|
|
330
|
+
for (const dep of aState.d.keys()) {
|
|
331
|
+
if (dep !== a && changedAtoms.has(dep)) {
|
|
332
|
+
hasChangedDeps = true;
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
if (hasChangedDeps) {
|
|
337
|
+
readAtomState(a);
|
|
338
|
+
mountDependencies(a, aState);
|
|
339
|
+
if (prevEpochNumber !== aState.n) {
|
|
340
|
+
changedAtoms.set(a, aState);
|
|
341
|
+
(_a = aState.u) == null ? void 0 : _a.call(aState);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
invalidatedAtoms.delete(a);
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
const writeAtomState = (atom2, ...args) => {
|
|
357
348
|
let isSync = true;
|
|
358
349
|
const getter = (a) => returnAtomValue(readAtomState(a));
|
|
359
350
|
const setter = (a, ...args2) => {
|
|
@@ -366,12 +357,12 @@ var buildStore = (atomStateMap = /* @__PURE__ */ new WeakMap(), mountedMap = /*
|
|
|
366
357
|
}
|
|
367
358
|
const prevEpochNumber = aState.n;
|
|
368
359
|
const v = args2[0];
|
|
369
|
-
setAtomStateValueOrPromise(a,
|
|
370
|
-
mountDependencies(a);
|
|
360
|
+
setAtomStateValueOrPromise(a, aState, v);
|
|
361
|
+
mountDependencies(a, aState);
|
|
371
362
|
if (prevEpochNumber !== aState.n) {
|
|
372
|
-
changedAtoms.
|
|
373
|
-
(_a =
|
|
374
|
-
invalidateDependents(
|
|
363
|
+
changedAtoms.set(a, aState);
|
|
364
|
+
(_a = aState.u) == null ? void 0 : _a.call(aState);
|
|
365
|
+
invalidateDependents(aState);
|
|
375
366
|
}
|
|
376
367
|
return void 0;
|
|
377
368
|
} else {
|
|
@@ -389,52 +380,56 @@ var buildStore = (atomStateMap = /* @__PURE__ */ new WeakMap(), mountedMap = /*
|
|
|
389
380
|
} finally {
|
|
390
381
|
isSync = false;
|
|
391
382
|
}
|
|
392
|
-
}
|
|
393
|
-
const
|
|
383
|
+
};
|
|
384
|
+
const writeAtom = (atom2, ...args) => {
|
|
385
|
+
try {
|
|
386
|
+
return writeAtomState(atom2, ...args);
|
|
387
|
+
} finally {
|
|
388
|
+
recomputeInvalidatedAtoms();
|
|
389
|
+
flushCallbacks();
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
const mountDependencies = (atom2, atomState) => {
|
|
394
393
|
var _a;
|
|
395
|
-
|
|
396
|
-
const mounted = mountedMap.get(atom2);
|
|
397
|
-
if (mounted && !isPendingPromise(atomState.v)) {
|
|
394
|
+
if (atomState.m && !isPendingPromise(atomState.v)) {
|
|
398
395
|
for (const [a, n] of atomState.d) {
|
|
399
|
-
if (!
|
|
396
|
+
if (!atomState.m.d.has(a)) {
|
|
400
397
|
const aState = ensureAtomState(a);
|
|
401
|
-
const aMounted = mountAtom(a);
|
|
398
|
+
const aMounted = mountAtom(a, aState);
|
|
402
399
|
aMounted.t.add(atom2);
|
|
403
|
-
|
|
400
|
+
atomState.m.d.add(a);
|
|
404
401
|
if (n !== aState.n) {
|
|
405
|
-
changedAtoms.
|
|
406
|
-
(_a =
|
|
407
|
-
invalidateDependents(
|
|
402
|
+
changedAtoms.set(a, aState);
|
|
403
|
+
(_a = aState.u) == null ? void 0 : _a.call(aState);
|
|
404
|
+
invalidateDependents(aState);
|
|
408
405
|
}
|
|
409
406
|
}
|
|
410
407
|
}
|
|
411
|
-
for (const a of
|
|
408
|
+
for (const a of atomState.m.d || []) {
|
|
412
409
|
if (!atomState.d.has(a)) {
|
|
413
|
-
|
|
414
|
-
const aMounted = unmountAtom(a);
|
|
410
|
+
atomState.m.d.delete(a);
|
|
411
|
+
const aMounted = unmountAtom(a, ensureAtomState(a));
|
|
415
412
|
aMounted == null ? void 0 : aMounted.t.delete(atom2);
|
|
416
413
|
}
|
|
417
414
|
}
|
|
418
415
|
}
|
|
419
|
-
}
|
|
420
|
-
const mountAtom =
|
|
416
|
+
};
|
|
417
|
+
const mountAtom = (atom2, atomState) => {
|
|
421
418
|
var _a;
|
|
422
|
-
|
|
423
|
-
let mounted = mountedMap.get(atom2);
|
|
424
|
-
if (!mounted) {
|
|
419
|
+
if (!atomState.m) {
|
|
425
420
|
readAtomState(atom2);
|
|
426
421
|
for (const a of atomState.d.keys()) {
|
|
427
|
-
const aMounted = mountAtom(a);
|
|
422
|
+
const aMounted = mountAtom(a, ensureAtomState(a));
|
|
428
423
|
aMounted.t.add(atom2);
|
|
429
424
|
}
|
|
430
|
-
|
|
425
|
+
atomState.m = {
|
|
431
426
|
l: /* @__PURE__ */ new Set(),
|
|
432
427
|
d: new Set(atomState.d.keys()),
|
|
433
428
|
t: /* @__PURE__ */ new Set()
|
|
434
429
|
};
|
|
435
|
-
|
|
436
|
-
(_a = storeHooks.m) == null ? void 0 : _a.call(storeHooks, atom2);
|
|
430
|
+
(_a = atomState.h) == null ? void 0 : _a.call(atomState);
|
|
437
431
|
if (isActuallyWritableAtom(atom2)) {
|
|
432
|
+
const mounted = atomState.m;
|
|
438
433
|
const processOnMount = () => {
|
|
439
434
|
let isSync = true;
|
|
440
435
|
const setAtom = (...args) => {
|
|
@@ -466,148 +461,88 @@ var buildStore = (atomStateMap = /* @__PURE__ */ new WeakMap(), mountedMap = /*
|
|
|
466
461
|
mountCallbacks.add(processOnMount);
|
|
467
462
|
}
|
|
468
463
|
}
|
|
469
|
-
return
|
|
470
|
-
}
|
|
471
|
-
const unmountAtom =
|
|
464
|
+
return atomState.m;
|
|
465
|
+
};
|
|
466
|
+
const unmountAtom = (atom2, atomState) => {
|
|
472
467
|
var _a;
|
|
473
|
-
|
|
474
|
-
let mounted = mountedMap.get(atom2);
|
|
475
|
-
if (mounted && !mounted.l.size && !Array.from(mounted.t).some((a) => {
|
|
468
|
+
if (atomState.m && !atomState.m.l.size && !Array.from(atomState.m.t).some((a) => {
|
|
476
469
|
var _a2;
|
|
477
|
-
return (_a2 =
|
|
470
|
+
return (_a2 = ensureAtomState(a).m) == null ? void 0 : _a2.d.has(atom2);
|
|
478
471
|
})) {
|
|
479
|
-
|
|
480
|
-
|
|
472
|
+
const onUnmount = atomState.m.u;
|
|
473
|
+
if (onUnmount) {
|
|
474
|
+
unmountCallbacks.add(onUnmount);
|
|
481
475
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
(_a = storeHooks.u) == null ? void 0 : _a.call(storeHooks, atom2);
|
|
476
|
+
delete atomState.m;
|
|
477
|
+
(_a = atomState.h) == null ? void 0 : _a.call(atomState);
|
|
485
478
|
for (const a of atomState.d.keys()) {
|
|
486
|
-
const aMounted = unmountAtom(a);
|
|
479
|
+
const aMounted = unmountAtom(a, ensureAtomState(a));
|
|
487
480
|
aMounted == null ? void 0 : aMounted.t.delete(atom2);
|
|
488
481
|
}
|
|
489
482
|
return void 0;
|
|
490
483
|
}
|
|
491
|
-
return
|
|
492
|
-
}
|
|
493
|
-
const
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
// atom intercepters
|
|
503
|
-
atomRead,
|
|
504
|
-
atomWrite,
|
|
505
|
-
atomOnInit,
|
|
506
|
-
atomOnMount,
|
|
507
|
-
// building-block functions
|
|
508
|
-
ensureAtomState,
|
|
509
|
-
flushCallbacks,
|
|
510
|
-
recomputeInvalidatedAtoms,
|
|
511
|
-
readAtomState,
|
|
512
|
-
invalidateDependents,
|
|
513
|
-
writeAtomState,
|
|
514
|
-
mountDependencies,
|
|
515
|
-
mountAtom,
|
|
516
|
-
unmountAtom
|
|
517
|
-
];
|
|
518
|
-
const store = {
|
|
519
|
-
get: (atom2) => returnAtomValue(readAtomState(atom2)),
|
|
520
|
-
set: (atom2, ...args) => {
|
|
521
|
-
try {
|
|
522
|
-
return writeAtomState(atom2, ...args);
|
|
523
|
-
} finally {
|
|
524
|
-
recomputeInvalidatedAtoms();
|
|
525
|
-
flushCallbacks();
|
|
526
|
-
}
|
|
527
|
-
},
|
|
528
|
-
sub: (atom2, listener) => {
|
|
529
|
-
const mounted = mountAtom(atom2);
|
|
530
|
-
const listeners = mounted.l;
|
|
531
|
-
listeners.add(listener);
|
|
484
|
+
return atomState.m;
|
|
485
|
+
};
|
|
486
|
+
const subscribeAtom = (atom2, listener) => {
|
|
487
|
+
const atomState = ensureAtomState(atom2);
|
|
488
|
+
const mounted = mountAtom(atom2, atomState);
|
|
489
|
+
const listeners = mounted.l;
|
|
490
|
+
listeners.add(listener);
|
|
491
|
+
flushCallbacks();
|
|
492
|
+
return () => {
|
|
493
|
+
listeners.delete(listener);
|
|
494
|
+
unmountAtom(atom2, atomState);
|
|
532
495
|
flushCallbacks();
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
const unstable_derive = (fn) => buildStore(...fn(...storeArgs));
|
|
499
|
+
const store = {
|
|
500
|
+
get: readAtom,
|
|
501
|
+
set: writeAtom,
|
|
502
|
+
sub: subscribeAtom,
|
|
503
|
+
unstable_derive
|
|
539
504
|
};
|
|
540
|
-
Object.defineProperty(store, BUILDING_BLOCKS, { value: buildingBlocks });
|
|
541
505
|
return store;
|
|
542
506
|
};
|
|
543
|
-
var
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
// ../../node_modules/.pnpm/jotai@2.12.1_@types+react@18.3.18_react@18.3.1/node_modules/jotai/esm/vanilla.mjs
|
|
547
|
-
var keyCount = 0;
|
|
548
|
-
function atom(read, write) {
|
|
549
|
-
const key = `atom${++keyCount}`;
|
|
550
|
-
const config = {
|
|
551
|
-
toString() {
|
|
552
|
-
return (import.meta.env ? import.meta.env.MODE : void 0) !== "production" && this.debugLabel ? key + ":" + this.debugLabel : key;
|
|
553
|
-
}
|
|
554
|
-
};
|
|
555
|
-
if (typeof read === "function") {
|
|
556
|
-
config.read = read;
|
|
557
|
-
} else {
|
|
558
|
-
config.init = read;
|
|
559
|
-
config.read = defaultRead;
|
|
560
|
-
config.write = defaultWrite;
|
|
561
|
-
}
|
|
562
|
-
if (write) {
|
|
563
|
-
config.write = write;
|
|
564
|
-
}
|
|
565
|
-
return config;
|
|
566
|
-
}
|
|
567
|
-
function defaultRead(get) {
|
|
568
|
-
return get(this);
|
|
569
|
-
}
|
|
570
|
-
function defaultWrite(get, set, arg) {
|
|
571
|
-
return set(
|
|
572
|
-
this,
|
|
573
|
-
typeof arg === "function" ? arg(get(this)) : arg
|
|
574
|
-
);
|
|
575
|
-
}
|
|
576
|
-
var createDevStoreRev4 = () => {
|
|
507
|
+
var deriveDevStoreRev4 = (store) => {
|
|
508
|
+
const debugMountedAtoms = /* @__PURE__ */ new Set();
|
|
509
|
+
let savedGetAtomState;
|
|
577
510
|
let inRestoreAtom = 0;
|
|
578
|
-
const
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
511
|
+
const derivedStore = store.unstable_derive((...storeArgs) => {
|
|
512
|
+
const [getAtomState, setAtomState, , atomWrite] = storeArgs;
|
|
513
|
+
savedGetAtomState = getAtomState;
|
|
514
|
+
storeArgs[1] = function devSetAtomState(atom2, atomState) {
|
|
515
|
+
setAtomState(atom2, atomState);
|
|
516
|
+
const originalMounted = atomState.h;
|
|
517
|
+
atomState.h = () => {
|
|
518
|
+
originalMounted == null ? void 0 : originalMounted();
|
|
519
|
+
if (atomState.m) {
|
|
520
|
+
debugMountedAtoms.add(atom2);
|
|
521
|
+
} else {
|
|
522
|
+
debugMountedAtoms.delete(atom2);
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
storeArgs[3] = function devAtomWrite(atom2, getter, setter, ...args) {
|
|
591
527
|
if (inRestoreAtom) {
|
|
592
|
-
return
|
|
528
|
+
return setter(atom2, ...args);
|
|
593
529
|
}
|
|
594
|
-
return atom2
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
const debugMountedAtoms = /* @__PURE__ */ new Set();
|
|
598
|
-
storeHooks.m.add(void 0, (atom2) => {
|
|
599
|
-
debugMountedAtoms.add(atom2);
|
|
600
|
-
const atomState = atomStateMap.get(atom2);
|
|
601
|
-
atomState.m = mountedAtoms.get(atom2);
|
|
602
|
-
});
|
|
603
|
-
storeHooks.u.add(void 0, (atom2) => {
|
|
604
|
-
debugMountedAtoms.delete(atom2);
|
|
605
|
-
const atomState = atomStateMap.get(atom2);
|
|
606
|
-
delete atomState.m;
|
|
530
|
+
return atomWrite(atom2, getter, setter, ...args);
|
|
531
|
+
};
|
|
532
|
+
return storeArgs;
|
|
607
533
|
});
|
|
534
|
+
const savedStoreSet = derivedStore.set;
|
|
608
535
|
const devStore = {
|
|
609
536
|
// store dev methods (these are tentative and subject to change without notice)
|
|
610
|
-
dev4_get_internal_weak_map: () =>
|
|
537
|
+
dev4_get_internal_weak_map: () => ({
|
|
538
|
+
get: (atom2) => {
|
|
539
|
+
const atomState = savedGetAtomState(atom2);
|
|
540
|
+
if (!atomState || atomState.n === 0) {
|
|
541
|
+
return void 0;
|
|
542
|
+
}
|
|
543
|
+
return atomState;
|
|
544
|
+
}
|
|
545
|
+
}),
|
|
611
546
|
dev4_get_mounted_atoms: () => debugMountedAtoms,
|
|
612
547
|
dev4_restore_atoms: (values) => {
|
|
613
548
|
const restoreAtom = {
|
|
@@ -616,7 +551,7 @@ var createDevStoreRev4 = () => {
|
|
|
616
551
|
++inRestoreAtom;
|
|
617
552
|
try {
|
|
618
553
|
for (const [atom2, value] of values) {
|
|
619
|
-
if (
|
|
554
|
+
if (hasInitialValue(atom2)) {
|
|
620
555
|
set(atom2, value);
|
|
621
556
|
}
|
|
622
557
|
}
|
|
@@ -625,16 +560,30 @@ var createDevStoreRev4 = () => {
|
|
|
625
560
|
}
|
|
626
561
|
}
|
|
627
562
|
};
|
|
628
|
-
|
|
563
|
+
savedStoreSet(restoreAtom);
|
|
629
564
|
}
|
|
630
565
|
};
|
|
631
|
-
return Object.assign(
|
|
566
|
+
return Object.assign(derivedStore, devStore);
|
|
632
567
|
};
|
|
633
568
|
var createStore = () => {
|
|
569
|
+
const atomStateMap = /* @__PURE__ */ new WeakMap();
|
|
570
|
+
const store = buildStore(
|
|
571
|
+
(atom2) => atomStateMap.get(atom2),
|
|
572
|
+
(atom2, atomState) => atomStateMap.set(atom2, atomState).get(atom2),
|
|
573
|
+
(atom2, ...params) => atom2.read(...params),
|
|
574
|
+
(atom2, ...params) => atom2.write(...params),
|
|
575
|
+
(atom2, ...params) => {
|
|
576
|
+
var _a;
|
|
577
|
+
return (_a = atom2.unstable_onInit) == null ? void 0 : _a.call(atom2, ...params);
|
|
578
|
+
},
|
|
579
|
+
(atom2, ...params) => {
|
|
580
|
+
var _a;
|
|
581
|
+
return (_a = atom2.onMount) == null ? void 0 : _a.call(atom2, ...params);
|
|
582
|
+
}
|
|
583
|
+
);
|
|
634
584
|
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production") {
|
|
635
|
-
return
|
|
585
|
+
return deriveDevStoreRev4(store);
|
|
636
586
|
}
|
|
637
|
-
const store = INTERNAL_buildStoreRev1();
|
|
638
587
|
return store;
|
|
639
588
|
};
|
|
640
589
|
var defaultStore;
|
|
@@ -653,7 +602,7 @@ var getDefaultStore = () => {
|
|
|
653
602
|
return defaultStore;
|
|
654
603
|
};
|
|
655
604
|
|
|
656
|
-
// ../../node_modules/.pnpm/jotai@2.
|
|
605
|
+
// ../../node_modules/.pnpm/jotai@2.11.1_@types+react@18.3.18_react@18.3.1/node_modules/jotai/esm/react.mjs
|
|
657
606
|
import ReactExports, { createContext, useContext, useRef, createElement, useReducer, useEffect, useDebugValue, useCallback } from "react";
|
|
658
607
|
var StoreContext = createContext(
|
|
659
608
|
void 0
|