@pismo/marola 2.1.69 → 2.1.70
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.
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* This file is automatically generated. Any changes will be lost.
|
|
3
3
|
* run "yarn generate-icon-types" or "yarn build" to regenerate it.
|
|
4
4
|
*/
|
|
5
|
-
export type IconName = 'alien-8bit' | 'arrow-down-arrow-up' | 'arrow-down-z-a' | 'arrow-left' | 'arrow-right' | 'arrow-right-to-arc' | 'arrow-rotate-left' | 'arrow-up-right-from-square' | 'arrows-rotate' | 'badge-check' | 'bell' | 'building-columns' | 'calendar-days' | 'check' | 'check-double' | 'chevron-down' | 'chevron-right' | 'chevron-up' | 'chevrons-right' | 'circle' | 'circle-arrow-right' | 'circle-check' | 'circle-check-outline' | 'circle-exclamation' | 'circle-exclamation-outline' | 'circle-info' | 'circle-minus' | 'circle-plus' | 'circle-x' | 'circle-xmark' | 'circle-xmark-outline' | 'clock' | 'clock-rotate-left' | 'coin' | 'coins' | 'computer-classic' | 'copy' | 'credit-card' | 'credit-card-blank' | 'credit-card-front' | 'download' | 'ellipsis-vertical' | 'empty-img' | 'empty-set' | 'eye' | 'eye-slash' | 'filter-list' | 'fingerprint' | 'folder-magnifying-glass' | 'folder-open' | 'gift-card' | 'graduation-cap' | 'grid-2' | 'grid-horizontal' | 'grip-dots-vertical' | 'headphones-simple' | 'house-blank' | 'id-badge' | 'inbox-full' | 'laptop' | 'light/star' | 'list' | 'loader' | 'lock-keyhole' | 'lock-keyhole-open' | 'logo' | 'magnifying-glass' | 'map-location-dot' | 'map-pin' | 'messages-question' | 'mobile-screen-button' | 'money-bill-transfer' | 'money-bill-trend-up' | 'money-bills' | 'notes-medical' | 'paste' | 'pen' | 'pen-to-square' | 'people-arrows-left-right' | 'percent' | 'piggy-bank' | 'plus' | 'rectangle-history' | 'rectangle-history-circle-user' | 'rectangle-terminal' | 'rotate' | 'scale-balanced' | 'sd-card' | 'sd-cards' | 'server' | 'sheet-plastic' | 'shield-xmark' | 'sidebar' | 'sitemap' | 'solid/star' | 'squirrel' | 'stethoscope' | 'store' | 'timer' | 'trash' | 'trash-can' | 'upload' | 'user' | 'user-gear' | 'user-group' | 'user-group-crown' | 'user-tie' | 'user-tie-hair' | 'user-vneck' | 'users' | 'wallet' | 'warehouse-full' | 'xmark';
|
|
5
|
+
export type IconName = 'alien-8bit' | 'arrow-down-arrow-up' | 'arrow-down-z-a' | 'arrow-left' | 'arrow-right' | 'arrow-right-to-arc' | 'arrow-rotate-left' | 'arrow-up-right-from-square' | 'arrows-rotate' | 'badge-check' | 'bell' | 'building-columns' | 'calendar-days' | 'check' | 'check-double' | 'chevron-down' | 'chevron-right' | 'chevron-up' | 'chevrons-right' | 'circle' | 'circle-arrow-right' | 'circle-check' | 'circle-check-outline' | 'circle-exclamation' | 'circle-exclamation-outline' | 'circle-info' | 'circle-minus' | 'circle-plus' | 'circle-x' | 'circle-xmark' | 'circle-xmark-outline' | 'clock' | 'clock-rotate-left' | 'coin' | 'coins' | 'computer-classic' | 'copy' | 'credit-card' | 'credit-card-blank' | 'credit-card-front' | 'download' | 'ellipsis-vertical' | 'empty-img' | 'empty-set' | 'eye' | 'eye-slash' | 'filter-list' | 'fingerprint' | 'folder-magnifying-glass' | 'folder-open' | 'gift-card' | 'graduation-cap' | 'grid-2' | 'grid-horizontal' | 'grip-dots-vertical' | 'headphones-simple' | 'house-blank' | 'id-badge' | 'inbox-full' | 'laptop' | 'light/star' | 'list' | 'loader' | 'lock-keyhole' | 'lock-keyhole-open' | 'logo' | 'magnifying-glass' | 'map-location-dot' | 'map-pin' | 'messages-question' | 'mobile-screen-button' | 'money-bill-transfer' | 'money-bill-trend-up' | 'money-bills' | 'no-items-to-show' | 'notes-medical' | 'paste' | 'pen' | 'pen-to-square' | 'people-arrows-left-right' | 'percent' | 'piggy-bank' | 'plus' | 'rectangle-history' | 'rectangle-history-circle-user' | 'rectangle-terminal' | 'rotate' | 'scale-balanced' | 'sd-card' | 'sd-cards' | 'server' | 'sheet-plastic' | 'shield-xmark' | 'sidebar' | 'sitemap' | 'solid/star' | 'squirrel' | 'stethoscope' | 'store' | 'timer' | 'trash' | 'trash-can' | 'upload' | 'user' | 'user-gear' | 'user-group' | 'user-group-crown' | 'user-tie' | 'user-tie-hair' | 'user-vneck' | 'users' | 'wallet' | 'warehouse-full' | 'xmark';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import U, { useRef as et, createElement as x, createContext as ot, useReducer as st, useEffect as it, useDebugValue as ct, useCallback as ut, useContext as rt } from "react";
|
|
2
|
-
const
|
|
2
|
+
const _ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
|
|
3
3
|
function J(t) {
|
|
4
4
|
return "init" in t;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function T(t) {
|
|
7
7
|
return !!t.write;
|
|
8
8
|
}
|
|
9
9
|
function F(t) {
|
|
@@ -12,23 +12,23 @@ function F(t) {
|
|
|
12
12
|
function I(t) {
|
|
13
13
|
if ("e" in t)
|
|
14
14
|
throw t.e;
|
|
15
|
-
if ((
|
|
15
|
+
if ((_ ? "production" : void 0) !== "production" && !("v" in t))
|
|
16
16
|
throw new Error("[Bug] atom state is not initialized");
|
|
17
17
|
return t.v;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const P = /* @__PURE__ */ new WeakMap();
|
|
20
20
|
function $(t) {
|
|
21
21
|
var n;
|
|
22
|
-
return
|
|
22
|
+
return R(t) && !!((n = P.get(t)) != null && n[0]);
|
|
23
23
|
}
|
|
24
24
|
function at(t) {
|
|
25
|
-
const n =
|
|
25
|
+
const n = P.get(t);
|
|
26
26
|
n != null && n[0] && (n[0] = !1, n[1].forEach((o) => o()));
|
|
27
27
|
}
|
|
28
28
|
function O(t, n) {
|
|
29
|
-
let o =
|
|
29
|
+
let o = P.get(t);
|
|
30
30
|
if (!o) {
|
|
31
|
-
o = [!0, /* @__PURE__ */ new Set()],
|
|
31
|
+
o = [!0, /* @__PURE__ */ new Set()], P.set(t, o);
|
|
32
32
|
const e = () => {
|
|
33
33
|
o[0] = !1;
|
|
34
34
|
};
|
|
@@ -36,7 +36,7 @@ function O(t, n) {
|
|
|
36
36
|
}
|
|
37
37
|
o[1].add(n);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function R(t) {
|
|
40
40
|
return typeof (t == null ? void 0 : t.then) == "function";
|
|
41
41
|
}
|
|
42
42
|
function G(t, n, o) {
|
|
@@ -46,7 +46,7 @@ function G(t, n, o) {
|
|
|
46
46
|
n.then(e, e);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function q(t, n, o) {
|
|
50
50
|
var e;
|
|
51
51
|
const s = /* @__PURE__ */ new Set();
|
|
52
52
|
for (const i of ((e = o.get(t)) == null ? void 0 : e.t) || [])
|
|
@@ -68,7 +68,7 @@ const lt = (t, n, ...o) => n.read(...o), dt = (t, n, ...o) => n.write(...o), ft
|
|
|
68
68
|
}, ht = (t, n) => {
|
|
69
69
|
var o;
|
|
70
70
|
const e = S(t), s = e[0], i = e[6], a = e[9];
|
|
71
|
-
if ((
|
|
71
|
+
if ((_ ? "production" : void 0) !== "production" && !n)
|
|
72
72
|
throw new Error("Atom is undefined or null");
|
|
73
73
|
let v = s.get(n);
|
|
74
74
|
return v || (v = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 }, s.set(n, v), (o = i.i) == null || o.call(i, n), a == null || a(t, n)), v;
|
|
@@ -101,13 +101,13 @@ const lt = (t, n, ...o) => n.read(...o), dt = (t, n, ...o) => n.write(...o), ft
|
|
|
101
101
|
if (c.has(h)) {
|
|
102
102
|
if (e.get(h) === l.n)
|
|
103
103
|
f.push([h, l]);
|
|
104
|
-
else if ((
|
|
104
|
+
else if ((_ ? "production" : void 0) !== "production" && e.has(h))
|
|
105
105
|
throw new Error("[Bug] invalidated atom exists");
|
|
106
106
|
d.add(h), u.pop();
|
|
107
107
|
continue;
|
|
108
108
|
}
|
|
109
109
|
c.add(h);
|
|
110
|
-
for (const p of
|
|
110
|
+
for (const p of q(h, l, o))
|
|
111
111
|
c.has(p) || u.push(p);
|
|
112
112
|
}
|
|
113
113
|
for (let h = f.length - 1; h >= 0; --h) {
|
|
@@ -120,7 +120,7 @@ const lt = (t, n, ...o) => n.read(...o), dt = (t, n, ...o) => n.write(...o), ft
|
|
|
120
120
|
}
|
|
121
121
|
b && (a(t, l), v(t, l)), e.delete(l);
|
|
122
122
|
}
|
|
123
|
-
},
|
|
123
|
+
}, W = /* @__PURE__ */ new WeakSet(), St = (t, n) => {
|
|
124
124
|
var o, e;
|
|
125
125
|
const s = S(t), i = s[1], a = s[2], v = s[3], f = s[6], c = s[7], d = s[11], u = s[12], h = s[13], l = s[14], p = s[16], b = s[17], r = d(t, n);
|
|
126
126
|
if (F(r)) {
|
|
@@ -136,26 +136,26 @@ const lt = (t, n, ...o) => n.read(...o), dt = (t, n, ...o) => n.write(...o), ft
|
|
|
136
136
|
return r;
|
|
137
137
|
}
|
|
138
138
|
r.d.clear();
|
|
139
|
-
let
|
|
140
|
-
function
|
|
139
|
+
let A = !0;
|
|
140
|
+
function m() {
|
|
141
141
|
i.has(n) && (b(t, n), h(t), u(t));
|
|
142
142
|
}
|
|
143
143
|
function M(g) {
|
|
144
144
|
var D;
|
|
145
145
|
if (g === n) {
|
|
146
|
-
const
|
|
147
|
-
if (!F(
|
|
146
|
+
const N = d(t, g);
|
|
147
|
+
if (!F(N))
|
|
148
148
|
if (J(g))
|
|
149
|
-
|
|
149
|
+
C(t, g, g.init);
|
|
150
150
|
else
|
|
151
151
|
throw new Error("no atom init");
|
|
152
|
-
return I(
|
|
152
|
+
return I(N);
|
|
153
153
|
}
|
|
154
154
|
const y = l(t, g);
|
|
155
155
|
try {
|
|
156
156
|
return I(y);
|
|
157
157
|
} finally {
|
|
158
|
-
r.d.set(g, y.n), $(r.v) && G(n, r.v, y), i.has(n) && ((D = i.get(g)) == null || D.t.add(n)),
|
|
158
|
+
r.d.set(g, y.n), $(r.v) && G(n, r.v, y), i.has(n) && ((D = i.get(g)) == null || D.t.add(n)), A || m();
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
let w, k;
|
|
@@ -164,8 +164,8 @@ const lt = (t, n, ...o) => n.read(...o), dt = (t, n, ...o) => n.write(...o), ft
|
|
|
164
164
|
return w || (w = new AbortController()), w.signal;
|
|
165
165
|
},
|
|
166
166
|
get setSelf() {
|
|
167
|
-
return (
|
|
168
|
-
if ((
|
|
167
|
+
return (_ ? "production" : void 0) !== "production" && !T(n) && console.warn("setSelf function cannot be used with read-only atom"), !k && T(n) && (k = (...g) => {
|
|
168
|
+
if ((_ ? "production" : void 0) !== "production" && A && console.warn("setSelf function cannot be called in sync"), !A)
|
|
169
169
|
try {
|
|
170
170
|
return p(t, n, ...g);
|
|
171
171
|
} finally {
|
|
@@ -175,41 +175,41 @@ const lt = (t, n, ...o) => n.read(...o), dt = (t, n, ...o) => n.write(...o), ft
|
|
|
175
175
|
}
|
|
176
176
|
}, H = r.n;
|
|
177
177
|
try {
|
|
178
|
-
(
|
|
178
|
+
(_ ? "production" : void 0) !== "production" && W.delete(t);
|
|
179
179
|
const g = c(t, n, M, nt);
|
|
180
|
-
return (
|
|
180
|
+
return (_ ? "production" : void 0) !== "production" && W.has(t) && console.warn(
|
|
181
181
|
"Detected store mutation during atom read. This is not supported."
|
|
182
|
-
),
|
|
182
|
+
), C(t, n, g), R(g) && (O(g, () => w == null ? void 0 : w.abort()), g.then(m, m)), (o = f.r) == null || o.call(f, n), r;
|
|
183
183
|
} catch (g) {
|
|
184
184
|
return delete r.v, r.e = g, ++r.n, r;
|
|
185
185
|
} finally {
|
|
186
|
-
|
|
186
|
+
A = !1, H !== r.n && a.get(n) === H && (a.set(n, r.n), v.add(n), (e = f.c) == null || e.call(f, n));
|
|
187
187
|
}
|
|
188
188
|
}, bt = (t, n) => {
|
|
189
189
|
const o = S(t), e = o[1], s = o[2], i = o[11], a = [n];
|
|
190
190
|
for (; a.length; ) {
|
|
191
191
|
const v = a.pop(), f = i(t, v);
|
|
192
|
-
for (const c of
|
|
192
|
+
for (const c of q(v, f, e)) {
|
|
193
193
|
const d = i(t, c);
|
|
194
194
|
s.set(c, d.n), a.push(c);
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
},
|
|
197
|
+
}, K = (t, n, ...o) => {
|
|
198
198
|
const e = S(t), s = e[3], i = e[6], a = e[8], v = e[11], f = e[12], c = e[13], d = e[14], u = e[15], h = e[17];
|
|
199
199
|
let l = !0;
|
|
200
|
-
const p = (r) => I(d(t, r)), b = (r, ...
|
|
201
|
-
var
|
|
200
|
+
const p = (r) => I(d(t, r)), b = (r, ...A) => {
|
|
201
|
+
var m;
|
|
202
202
|
const M = v(t, r);
|
|
203
203
|
try {
|
|
204
204
|
if (r === n) {
|
|
205
205
|
if (!J(r))
|
|
206
206
|
throw new Error("atom not writable");
|
|
207
|
-
(
|
|
208
|
-
const w = M.n, k =
|
|
209
|
-
|
|
207
|
+
(_ ? "production" : void 0) !== "production" && W.add(t);
|
|
208
|
+
const w = M.n, k = A[0];
|
|
209
|
+
C(t, r, k), h(t, r), w !== M.n && (s.add(r), u(t, r), (m = i.c) == null || m.call(i, r));
|
|
210
210
|
return;
|
|
211
211
|
} else
|
|
212
|
-
return
|
|
212
|
+
return K(t, r, ...A);
|
|
213
213
|
} finally {
|
|
214
214
|
l || (c(t), f(t));
|
|
215
215
|
}
|
|
@@ -219,7 +219,7 @@ const lt = (t, n, ...o) => n.read(...o), dt = (t, n, ...o) => n.write(...o), ft
|
|
|
219
219
|
} finally {
|
|
220
220
|
l = !1;
|
|
221
221
|
}
|
|
222
|
-
},
|
|
222
|
+
}, mt = (t, n) => {
|
|
223
223
|
var o;
|
|
224
224
|
const e = S(t), s = e[1], i = e[3], a = e[6], v = e[11], f = e[15], c = e[18], d = e[19], u = v(t, n), h = s.get(n);
|
|
225
225
|
if (h && !$(u.v)) {
|
|
@@ -235,34 +235,34 @@ const lt = (t, n, ...o) => n.read(...o), dt = (t, n, ...o) => n.write(...o), ft
|
|
|
235
235
|
p == null || p.t.delete(n);
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
},
|
|
238
|
+
}, Q = (t, n) => {
|
|
239
239
|
var o;
|
|
240
240
|
const e = S(t), s = e[1], i = e[4], a = e[6], v = e[10], f = e[11], c = e[12], d = e[13], u = e[14], h = e[16], l = f(t, n);
|
|
241
241
|
let p = s.get(n);
|
|
242
242
|
if (!p) {
|
|
243
243
|
u(t, n);
|
|
244
244
|
for (const b of l.d.keys())
|
|
245
|
-
|
|
245
|
+
Q(t, b).t.add(n);
|
|
246
246
|
if (p = {
|
|
247
247
|
l: /* @__PURE__ */ new Set(),
|
|
248
248
|
d: new Set(l.d.keys()),
|
|
249
249
|
t: /* @__PURE__ */ new Set()
|
|
250
|
-
}, s.set(n, p),
|
|
250
|
+
}, s.set(n, p), T(n)) {
|
|
251
251
|
const b = () => {
|
|
252
252
|
let r = !0;
|
|
253
|
-
const
|
|
253
|
+
const A = (...m) => {
|
|
254
254
|
try {
|
|
255
|
-
return h(t, n, ...
|
|
255
|
+
return h(t, n, ...m);
|
|
256
256
|
} finally {
|
|
257
257
|
r || (d(t), c(t));
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
260
|
try {
|
|
261
|
-
const
|
|
262
|
-
|
|
261
|
+
const m = v(t, n, A);
|
|
262
|
+
m && (p.u = () => {
|
|
263
263
|
r = !0;
|
|
264
264
|
try {
|
|
265
|
-
|
|
265
|
+
m();
|
|
266
266
|
} finally {
|
|
267
267
|
r = !1;
|
|
268
268
|
}
|
|
@@ -276,7 +276,7 @@ const lt = (t, n, ...o) => n.read(...o), dt = (t, n, ...o) => n.write(...o), ft
|
|
|
276
276
|
(o = a.m) == null || o.call(a, n);
|
|
277
277
|
}
|
|
278
278
|
return p;
|
|
279
|
-
},
|
|
279
|
+
}, At = (t, n) => {
|
|
280
280
|
var o, e;
|
|
281
281
|
const s = S(t), i = s[1], a = s[5], v = s[6], f = s[11], c = s[19], d = f(t, n);
|
|
282
282
|
let u = i.get(n);
|
|
@@ -298,17 +298,17 @@ const lt = (t, n, ...o) => n.read(...o), dt = (t, n, ...o) => n.write(...o), ft
|
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
300
|
return u;
|
|
301
|
-
},
|
|
301
|
+
}, C = (t, n, o) => {
|
|
302
302
|
const e = S(t)[11], s = e(t, n), i = "v" in s, a = s.v;
|
|
303
|
-
if (
|
|
303
|
+
if (R(o))
|
|
304
304
|
for (const v of s.d.keys())
|
|
305
305
|
G(
|
|
306
306
|
n,
|
|
307
307
|
o,
|
|
308
308
|
e(t, v)
|
|
309
309
|
);
|
|
310
|
-
s.v = o, delete s.e, (!i || !Object.is(a, s.v)) && (++s.n,
|
|
311
|
-
},
|
|
310
|
+
s.v = o, delete s.e, (!i || !Object.is(a, s.v)) && (++s.n, R(a) && at(a));
|
|
311
|
+
}, _t = (t, n) => {
|
|
312
312
|
const o = S(t)[14];
|
|
313
313
|
return I(o(t, n));
|
|
314
314
|
}, wt = (t, n, ...o) => {
|
|
@@ -323,9 +323,9 @@ const lt = (t, n, ...o) => n.read(...o), dt = (t, n, ...o) => n.write(...o), ft
|
|
|
323
323
|
return f.add(o), s(t), () => {
|
|
324
324
|
f.delete(o), a(t, n), s(t);
|
|
325
325
|
};
|
|
326
|
-
},
|
|
327
|
-
const n =
|
|
328
|
-
if ((
|
|
326
|
+
}, X = /* @__PURE__ */ new WeakMap(), S = (t) => {
|
|
327
|
+
const n = X.get(t);
|
|
328
|
+
if ((_ ? "production" : void 0) !== "production" && !n)
|
|
329
329
|
throw new Error(
|
|
330
330
|
"Store must be created by buildStore to read its building blocks"
|
|
331
331
|
);
|
|
@@ -372,24 +372,24 @@ function yt(...t) {
|
|
|
372
372
|
gt,
|
|
373
373
|
St,
|
|
374
374
|
bt,
|
|
375
|
-
|
|
376
|
-
_t,
|
|
377
|
-
q,
|
|
375
|
+
K,
|
|
378
376
|
mt,
|
|
379
|
-
|
|
377
|
+
Q,
|
|
380
378
|
At,
|
|
379
|
+
C,
|
|
380
|
+
_t,
|
|
381
381
|
wt,
|
|
382
382
|
kt,
|
|
383
383
|
void 0
|
|
384
384
|
].map((e, s) => t[s] || e);
|
|
385
|
-
return
|
|
385
|
+
return X.set(n, Object.freeze(o)), n;
|
|
386
386
|
}
|
|
387
|
-
const
|
|
387
|
+
const Y = {};
|
|
388
388
|
let Et = 0;
|
|
389
389
|
function Ot(t, n) {
|
|
390
390
|
const o = `atom${++Et}`, e = {
|
|
391
391
|
toString() {
|
|
392
|
-
return (
|
|
392
|
+
return (Y ? "production" : void 0) !== "production" && this.debugLabel ? o + ":" + this.debugLabel : o;
|
|
393
393
|
}
|
|
394
394
|
};
|
|
395
395
|
return e.init = t, e.read = Mt, e.write = Dt, e;
|
|
@@ -408,23 +408,23 @@ function Z() {
|
|
|
408
408
|
}
|
|
409
409
|
let E;
|
|
410
410
|
function It() {
|
|
411
|
-
return E || (E = Z(), (
|
|
411
|
+
return E || (E = Z(), (Y ? "production" : void 0) !== "production" && (globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = E), globalThis.__JOTAI_DEFAULT_STORE__ !== E && console.warn(
|
|
412
412
|
"Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"
|
|
413
413
|
))), E;
|
|
414
414
|
}
|
|
415
|
-
const
|
|
415
|
+
const Pt = {}, L = ot(
|
|
416
416
|
void 0
|
|
417
417
|
);
|
|
418
418
|
function tt(t) {
|
|
419
|
-
return rt(
|
|
419
|
+
return rt(L) || It();
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function Wt({
|
|
422
422
|
children: t,
|
|
423
423
|
store: n
|
|
424
424
|
}) {
|
|
425
425
|
const o = et(null);
|
|
426
|
-
return n ? x(
|
|
427
|
-
|
|
426
|
+
return n ? x(L.Provider, { value: n }, t) : (o.current === null && (o.current = Z()), x(
|
|
427
|
+
L.Provider,
|
|
428
428
|
{
|
|
429
429
|
// TODO: If this is not a false positive, consider using useState instead of useRef like https://github.com/pmndrs/jotai/pull/2771
|
|
430
430
|
// eslint-disable-next-line react-hooks/refs
|
|
@@ -433,7 +433,7 @@ function Lt({
|
|
|
433
433
|
t
|
|
434
434
|
));
|
|
435
435
|
}
|
|
436
|
-
const V = (t) => typeof (t == null ? void 0 : t.then) == "function",
|
|
436
|
+
const V = (t) => typeof (t == null ? void 0 : t.then) == "function", z = (t) => {
|
|
437
437
|
t.status || (t.status = "pending", t.then(
|
|
438
438
|
(n) => {
|
|
439
439
|
t.status = "fulfilled", t.value = n;
|
|
@@ -442,15 +442,15 @@ const V = (t) => typeof (t == null ? void 0 : t.then) == "function", N = (t) =>
|
|
|
442
442
|
t.status = "rejected", t.reason = n;
|
|
443
443
|
}
|
|
444
444
|
));
|
|
445
|
-
},
|
|
445
|
+
}, Rt = U.use || // A shim for older React versions
|
|
446
446
|
((t) => {
|
|
447
447
|
if (t.status === "pending")
|
|
448
448
|
throw t;
|
|
449
449
|
if (t.status === "fulfilled")
|
|
450
450
|
return t.value;
|
|
451
|
-
throw t.status === "rejected" ? t.reason : (
|
|
452
|
-
}),
|
|
453
|
-
let o =
|
|
451
|
+
throw t.status === "rejected" ? t.reason : (z(t), t);
|
|
452
|
+
}), B = /* @__PURE__ */ new WeakMap(), j = (t, n) => {
|
|
453
|
+
let o = B.get(t);
|
|
454
454
|
return o || (o = new Promise((e, s) => {
|
|
455
455
|
let i = t;
|
|
456
456
|
const a = (c) => (d) => {
|
|
@@ -460,15 +460,15 @@ const V = (t) => typeof (t == null ? void 0 : t.then) == "function", N = (t) =>
|
|
|
460
460
|
}, f = () => {
|
|
461
461
|
try {
|
|
462
462
|
const c = n();
|
|
463
|
-
V(c) ? (
|
|
463
|
+
V(c) ? (B.set(c, o), i = c, c.then(a(c), v(c)), O(c, f)) : e(c);
|
|
464
464
|
} catch (c) {
|
|
465
465
|
s(c);
|
|
466
466
|
}
|
|
467
467
|
};
|
|
468
468
|
t.then(a(t), v(t)), O(t, f);
|
|
469
|
-
}),
|
|
469
|
+
}), B.set(t, o)), o;
|
|
470
470
|
};
|
|
471
|
-
function
|
|
471
|
+
function Ct(t, n) {
|
|
472
472
|
const { delay: o, unstable_promiseStatus: e = !U.use } = {}, s = tt(), [[i, a, v], f] = st(
|
|
473
473
|
(d) => {
|
|
474
474
|
const u = s.get(t);
|
|
@@ -483,7 +483,7 @@ function Pt(t, n) {
|
|
|
483
483
|
if (e)
|
|
484
484
|
try {
|
|
485
485
|
const u = s.get(t);
|
|
486
|
-
V(u) &&
|
|
486
|
+
V(u) && z(
|
|
487
487
|
j(u, () => s.get(t))
|
|
488
488
|
);
|
|
489
489
|
} catch {
|
|
@@ -497,30 +497,30 @@ function Pt(t, n) {
|
|
|
497
497
|
return f(), d;
|
|
498
498
|
}, [s, t, o, e]), ct(c), V(c)) {
|
|
499
499
|
const d = j(c, () => s.get(t));
|
|
500
|
-
return e &&
|
|
500
|
+
return e && z(d), Rt(d);
|
|
501
501
|
}
|
|
502
502
|
return c;
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function Bt(t, n) {
|
|
505
505
|
const o = tt();
|
|
506
506
|
return ut(
|
|
507
507
|
(...s) => {
|
|
508
|
-
if ((
|
|
508
|
+
if ((Pt ? "production" : void 0) !== "production" && !("write" in t))
|
|
509
509
|
throw new Error("not writable atom");
|
|
510
510
|
return o.set(t, ...s);
|
|
511
511
|
},
|
|
512
512
|
[o, t]
|
|
513
513
|
);
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Lt(t, n) {
|
|
516
516
|
return [
|
|
517
|
-
|
|
517
|
+
Ct(t),
|
|
518
518
|
// We do wrong type assertion here, which results in throwing an error.
|
|
519
|
-
|
|
519
|
+
Bt(t)
|
|
520
520
|
];
|
|
521
521
|
}
|
|
522
522
|
export {
|
|
523
|
-
|
|
523
|
+
Wt as P,
|
|
524
524
|
Ot as a,
|
|
525
|
-
|
|
525
|
+
Lt as u
|
|
526
526
|
};
|