@instantdb/react-common 0.22.89-experimental.drewh-fix-export.20277749804.1 → 0.22.89-experimental.drewh-allow-react-19.20279083263.1
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/standalone/index.js
CHANGED
|
@@ -23,10 +23,10 @@ function Ui() {
|
|
|
23
23
|
}
|
|
24
24
|
return Re.Fragment = n, Re.jsx = o, Re.jsxs = o, Re;
|
|
25
25
|
}
|
|
26
|
-
var $e = {},
|
|
26
|
+
var $e = {}, Dn;
|
|
27
27
|
function Li() {
|
|
28
|
-
if (
|
|
29
|
-
|
|
28
|
+
if (Dn) return $e;
|
|
29
|
+
Dn = 1;
|
|
30
30
|
var t = {};
|
|
31
31
|
/**
|
|
32
32
|
* @license React
|
|
@@ -258,18 +258,18 @@ function Li() {
|
|
|
258
258
|
if (W && O && typeof W.stack == "string") {
|
|
259
259
|
for (var E = W.stack.split(`
|
|
260
260
|
`), z = O.stack.split(`
|
|
261
|
-
`),
|
|
261
|
+
`), D = E.length - 1, U = z.length - 1; D >= 1 && U >= 0 && E[D] !== z[U]; )
|
|
262
262
|
U--;
|
|
263
|
-
for (;
|
|
264
|
-
if (E[
|
|
265
|
-
if (
|
|
263
|
+
for (; D >= 1 && U >= 0; D--, U--)
|
|
264
|
+
if (E[D] !== z[U]) {
|
|
265
|
+
if (D !== 1 || U !== 1)
|
|
266
266
|
do
|
|
267
|
-
if (
|
|
267
|
+
if (D--, U--, U < 0 || E[D] !== z[U]) {
|
|
268
268
|
var J = `
|
|
269
|
-
` + E[
|
|
269
|
+
` + E[D].replace(" at new ", " at ");
|
|
270
270
|
return h.displayName && J.includes("<anonymous>") && (J = J.replace("<anonymous>", h.displayName)), typeof h == "function" && Je.set(h, J), J;
|
|
271
271
|
}
|
|
272
|
-
while (
|
|
272
|
+
while (D >= 1 && U >= 0);
|
|
273
273
|
break;
|
|
274
274
|
}
|
|
275
275
|
}
|
|
@@ -335,8 +335,8 @@ function Li() {
|
|
|
335
335
|
throw z.name = "Invariant Violation", z;
|
|
336
336
|
}
|
|
337
337
|
E = h[j](T, j, O, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
338
|
-
} catch (
|
|
339
|
-
E =
|
|
338
|
+
} catch (D) {
|
|
339
|
+
E = D;
|
|
340
340
|
}
|
|
341
341
|
E && !(E instanceof Error) && (Xe(I), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", O || "React class", m, j, typeof E), Xe(null)), E instanceof Error && !(E.message in wn) && (wn[E.message] = !0, Xe(I), v("Failed %s type: %s", m, E.message), Xe(null));
|
|
342
342
|
}
|
|
@@ -449,9 +449,9 @@ function Li() {
|
|
|
449
449
|
for (P in T)
|
|
450
450
|
Me.call(T, P) && !Ti.hasOwnProperty(P) && (j[P] = T[P]);
|
|
451
451
|
if (h && h.defaultProps) {
|
|
452
|
-
var
|
|
453
|
-
for (P in
|
|
454
|
-
j[P] === void 0 && (j[P] =
|
|
452
|
+
var D = h.defaultProps;
|
|
453
|
+
for (P in D)
|
|
454
|
+
j[P] === void 0 && (j[P] = D[P]);
|
|
455
455
|
}
|
|
456
456
|
if (E || z) {
|
|
457
457
|
var U = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
|
|
@@ -579,8 +579,8 @@ Check the top-level render call using <` + m + ">.");
|
|
|
579
579
|
(h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (E += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
580
580
|
var z = ki();
|
|
581
581
|
z ? E += z : E += jn();
|
|
582
|
-
var
|
|
583
|
-
h === null ?
|
|
582
|
+
var D;
|
|
583
|
+
h === null ? D = "null" : mt(h) ? D = "array" : h !== void 0 && h.$$typeof === n ? (D = "<" + (ne(h.type) || "Unknown") + " />", E = " Did you accidentally export a JSX literal instead of a component?") : D = typeof h, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, E);
|
|
584
584
|
}
|
|
585
585
|
var U = Ei(h, T, m, I, P);
|
|
586
586
|
if (U == null)
|
|
@@ -599,17 +599,17 @@ Check the top-level render call using <` + m + ">.");
|
|
|
599
599
|
Pn(J, h);
|
|
600
600
|
}
|
|
601
601
|
if (Me.call(T, "key")) {
|
|
602
|
-
var he = ne(h), W = Object.keys(T).filter(function(
|
|
603
|
-
return
|
|
602
|
+
var he = ne(h), W = Object.keys(T).filter(function(xi) {
|
|
603
|
+
return xi !== "key";
|
|
604
604
|
}), At = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
605
605
|
if (!Mn[he + At]) {
|
|
606
|
-
var
|
|
606
|
+
var Di = W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}";
|
|
607
607
|
v(`A props object containing a "key" prop is being spread into JSX:
|
|
608
608
|
let props = %s;
|
|
609
609
|
<%s {...props} />
|
|
610
610
|
React keys must be passed directly to JSX without using spread:
|
|
611
611
|
let props = %s;
|
|
612
|
-
<%s key={someKey} {...props} />`, At, he,
|
|
612
|
+
<%s key={someKey} {...props} />`, At, he, Di, he), Mn[he + At] = !0;
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
return h === i ? Ii(U) : Ci(U), U;
|
|
@@ -666,7 +666,7 @@ function q(t) {
|
|
|
666
666
|
}
|
|
667
667
|
return q(String(t));
|
|
668
668
|
}
|
|
669
|
-
const
|
|
669
|
+
const x = {
|
|
670
670
|
Remove: "remove",
|
|
671
671
|
Replace: "replace",
|
|
672
672
|
Add: "add"
|
|
@@ -677,7 +677,7 @@ const D = {
|
|
|
677
677
|
function Fe(t, e) {
|
|
678
678
|
return t instanceof Map ? t.has(e) : Object.prototype.hasOwnProperty.call(t, e);
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function xn(t, e) {
|
|
681
681
|
if (e in t) {
|
|
682
682
|
let n = Reflect.getPrototypeOf(t);
|
|
683
683
|
for (; n; ) {
|
|
@@ -825,15 +825,15 @@ function Or(t, e) {
|
|
|
825
825
|
function V(t) {
|
|
826
826
|
t.copy || (t.copy = Or(t.original, t.options));
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function xe(t) {
|
|
829
829
|
if (!ee(t))
|
|
830
830
|
return en(t);
|
|
831
831
|
if (Array.isArray(t))
|
|
832
|
-
return t.map(
|
|
832
|
+
return t.map(xe);
|
|
833
833
|
if (t instanceof Map) {
|
|
834
834
|
const n = Array.from(t.entries()).map(([r, i]) => [
|
|
835
835
|
r,
|
|
836
|
-
|
|
836
|
+
xe(i)
|
|
837
837
|
]);
|
|
838
838
|
if (!Xt(t)) {
|
|
839
839
|
const r = Object.getPrototypeOf(t).constructor;
|
|
@@ -842,7 +842,7 @@ function De(t) {
|
|
|
842
842
|
return new Map(n);
|
|
843
843
|
}
|
|
844
844
|
if (t instanceof Set) {
|
|
845
|
-
const n = Array.from(t).map(
|
|
845
|
+
const n = Array.from(t).map(xe);
|
|
846
846
|
if (!Zt(t)) {
|
|
847
847
|
const r = Object.getPrototypeOf(t).constructor;
|
|
848
848
|
return new r(n);
|
|
@@ -851,11 +851,11 @@ function De(t) {
|
|
|
851
851
|
}
|
|
852
852
|
const e = Object.create(Object.getPrototypeOf(t));
|
|
853
853
|
for (const n in t)
|
|
854
|
-
e[n] =
|
|
854
|
+
e[n] = xe(t[n]);
|
|
855
855
|
return e;
|
|
856
856
|
}
|
|
857
857
|
function ot(t) {
|
|
858
|
-
return Te(t) ?
|
|
858
|
+
return Te(t) ? xe(t) : t;
|
|
859
859
|
}
|
|
860
860
|
function ie(t) {
|
|
861
861
|
var e;
|
|
@@ -947,12 +947,12 @@ function Vi(t, e) {
|
|
|
947
947
|
const n = t.type === 3 ? t.setMap : t.copy;
|
|
948
948
|
t.finalities.revoke.length > 1 && t.assignedMap.get(e) && n && Ar(de(n, e), t.finalities.handledSet, t.options);
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Dt(t) {
|
|
951
951
|
t.type === 3 && t.copy && (t.copy.clear(), t.setMap.forEach((e) => {
|
|
952
952
|
t.copy.add(en(e));
|
|
953
953
|
}));
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function xt(t, e, n, r) {
|
|
956
956
|
if (t.operated && t.assignedMap && t.assignedMap.size > 0 && !t.finalized) {
|
|
957
957
|
if (n && r) {
|
|
958
958
|
const s = Sr(t);
|
|
@@ -968,7 +968,7 @@ function nn(t, e, n, r) {
|
|
|
968
968
|
const a = t.type === 3 ? t.setMap : t.copy;
|
|
969
969
|
if (ce(de(a, e), n)) {
|
|
970
970
|
let c = i.original;
|
|
971
|
-
i.copy && (c = i.copy),
|
|
971
|
+
i.copy && (c = i.copy), Dt(t), xt(t, r, s, o), t.options.enableAutoFreeze && (t.options.updatedValues = (u = t.options.updatedValues) !== null && u !== void 0 ? u : /* @__PURE__ */ new WeakMap(), t.options.updatedValues.set(c, i.original)), Ve(a, e, c);
|
|
972
972
|
}
|
|
973
973
|
}), t.options.enableAutoFreeze && i.finalities !== t.finalities && (t.options.enableAutoFreeze = !1)), ee(n, t.options) && t.finalities.draft.push(() => {
|
|
974
974
|
const s = t.type === 3 ? t.setMap : t.copy;
|
|
@@ -982,12 +982,12 @@ function Wi(t, e, n, r, i) {
|
|
|
982
982
|
if (o.get(c.toString()) && a[c] !== s[c]) {
|
|
983
983
|
const d = e.concat([c]), f = be(d, i);
|
|
984
984
|
n.push({
|
|
985
|
-
op:
|
|
985
|
+
op: x.Replace,
|
|
986
986
|
path: f,
|
|
987
987
|
// If it is a draft, it needs to be deep cloned, and it may also be non-draft.
|
|
988
988
|
value: ot(a[c])
|
|
989
989
|
}), r.push({
|
|
990
|
-
op:
|
|
990
|
+
op: x.Replace,
|
|
991
991
|
path: f,
|
|
992
992
|
// If it is a draft, it needs to be deep cloned, and it may also be non-draft.
|
|
993
993
|
value: ot(s[c])
|
|
@@ -996,7 +996,7 @@ function Wi(t, e, n, r, i) {
|
|
|
996
996
|
for (let c = s.length; c < a.length; c += 1) {
|
|
997
997
|
const d = e.concat([c]), f = be(d, i);
|
|
998
998
|
n.push({
|
|
999
|
-
op:
|
|
999
|
+
op: x.Add,
|
|
1000
1000
|
path: f,
|
|
1001
1001
|
// If it is a draft, it needs to be deep cloned, and it may also be non-draft.
|
|
1002
1002
|
value: ot(a[c])
|
|
@@ -1007,7 +1007,7 @@ function Wi(t, e, n, r, i) {
|
|
|
1007
1007
|
if (c) {
|
|
1008
1008
|
const d = e.concat(["length"]), f = be(d, i);
|
|
1009
1009
|
r.push({
|
|
1010
|
-
op:
|
|
1010
|
+
op: x.Replace,
|
|
1011
1011
|
path: f,
|
|
1012
1012
|
value: s.length
|
|
1013
1013
|
});
|
|
@@ -1015,7 +1015,7 @@ function Wi(t, e, n, r, i) {
|
|
|
1015
1015
|
for (let d = a.length; s.length < d; d -= 1) {
|
|
1016
1016
|
const f = e.concat([d - 1]), l = be(f, i);
|
|
1017
1017
|
r.push({
|
|
1018
|
-
op:
|
|
1018
|
+
op: x.Remove,
|
|
1019
1019
|
path: l
|
|
1020
1020
|
});
|
|
1021
1021
|
}
|
|
@@ -1023,11 +1023,11 @@ function Wi(t, e, n, r, i) {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
function Bi({ original: t, copy: e, assignedMap: n }, r, i, s, o) {
|
|
1025
1025
|
n.forEach((u, a) => {
|
|
1026
|
-
const c = de(t, a), d = ot(de(e, a)), f = u ? Fe(t, a) ?
|
|
1027
|
-
if (ce(c, d) && f ===
|
|
1026
|
+
const c = de(t, a), d = ot(de(e, a)), f = u ? Fe(t, a) ? x.Replace : x.Add : x.Remove;
|
|
1027
|
+
if (ce(c, d) && f === x.Replace)
|
|
1028
1028
|
return;
|
|
1029
1029
|
const l = r.concat(a), p = be(l, o);
|
|
1030
|
-
i.push(f ===
|
|
1030
|
+
i.push(f === x.Remove ? { op: f, path: p } : { op: f, path: p, value: d }), s.push(f === x.Add ? { op: x.Remove, path: p } : f === x.Remove ? { op: x.Add, path: p, value: c } : { op: x.Replace, path: p, value: c });
|
|
1031
1031
|
});
|
|
1032
1032
|
}
|
|
1033
1033
|
function Gi({ original: t, copy: e }, n, r, i, s) {
|
|
@@ -1036,11 +1036,11 @@ function Gi({ original: t, copy: e }, n, r, i, s) {
|
|
|
1036
1036
|
if (!e.has(u)) {
|
|
1037
1037
|
const a = n.concat([o]), c = be(a, s);
|
|
1038
1038
|
r.push({
|
|
1039
|
-
op:
|
|
1039
|
+
op: x.Remove,
|
|
1040
1040
|
path: c,
|
|
1041
1041
|
value: u
|
|
1042
1042
|
}), i.unshift({
|
|
1043
|
-
op:
|
|
1043
|
+
op: x.Add,
|
|
1044
1044
|
path: c,
|
|
1045
1045
|
value: u
|
|
1046
1046
|
});
|
|
@@ -1050,11 +1050,11 @@ function Gi({ original: t, copy: e }, n, r, i, s) {
|
|
|
1050
1050
|
if (!t.has(u)) {
|
|
1051
1051
|
const a = n.concat([o]), c = be(a, s);
|
|
1052
1052
|
r.push({
|
|
1053
|
-
op:
|
|
1053
|
+
op: x.Add,
|
|
1054
1054
|
path: c,
|
|
1055
1055
|
value: u
|
|
1056
1056
|
}), i.unshift({
|
|
1057
|
-
op:
|
|
1057
|
+
op: x.Remove,
|
|
1058
1058
|
path: c,
|
|
1059
1059
|
value: u
|
|
1060
1060
|
});
|
|
@@ -1299,7 +1299,7 @@ const Hi = Reflect.ownKeys(dt), Er = /* @__PURE__ */ new WeakSet(), kr = {
|
|
|
1299
1299
|
return c.bind(t.proxy);
|
|
1300
1300
|
}
|
|
1301
1301
|
if (!Fe(u, e)) {
|
|
1302
|
-
const c =
|
|
1302
|
+
const c = xn(u, e);
|
|
1303
1303
|
return c ? "value" in c ? c.value : (
|
|
1304
1304
|
// !case: support for getter
|
|
1305
1305
|
(i = c.get) === null || i === void 0 ? void 0 : i.call(t.proxy)
|
|
@@ -1330,7 +1330,7 @@ const Hi = Reflect.ownKeys(dt), Er = /* @__PURE__ */ new WeakSet(), kr = {
|
|
|
1330
1330
|
let i;
|
|
1331
1331
|
if (t.type === 1 && e !== "length" && !(Number.isInteger(i = Number(e)) && i >= 0 && (e === 0 || i === 0 || String(i) === String(e))))
|
|
1332
1332
|
throw new Error("Only supports setting array indices and the 'length' property.");
|
|
1333
|
-
const s =
|
|
1333
|
+
const s = xn(H(t), e);
|
|
1334
1334
|
if (s != null && s.set)
|
|
1335
1335
|
return s.set.call(t.proxy, n), !0;
|
|
1336
1336
|
const o = Et(H(t), e), u = k(o);
|
|
@@ -1389,7 +1389,7 @@ function rn(t) {
|
|
|
1389
1389
|
const w = de(_, r), g = k(w);
|
|
1390
1390
|
if (g) {
|
|
1391
1391
|
let v = g.original;
|
|
1392
|
-
g.operated && (v = en(w)),
|
|
1392
|
+
g.operated && (v = en(w)), Dt(g), xt(g, ze, f, l), d.options.enableAutoFreeze && (d.options.updatedValues = (p = d.options.updatedValues) !== null && p !== void 0 ? p : /* @__PURE__ */ new WeakMap(), d.options.updatedValues.set(v, g.original)), Ve(_, r, v);
|
|
1393
1393
|
}
|
|
1394
1394
|
(y = b.callbacks) === null || y === void 0 || y.forEach((v) => {
|
|
1395
1395
|
v(f, l);
|
|
@@ -1398,7 +1398,7 @@ function rn(t) {
|
|
|
1398
1398
|
} else {
|
|
1399
1399
|
const d = k(a);
|
|
1400
1400
|
d.finalities.draft.push((f, l) => {
|
|
1401
|
-
|
|
1401
|
+
Dt(d), xt(d, ze, f, l);
|
|
1402
1402
|
});
|
|
1403
1403
|
}
|
|
1404
1404
|
return a;
|
|
@@ -1413,8 +1413,8 @@ function Yi(t, e, n, r, i) {
|
|
|
1413
1413
|
const c = a ? e[0] : o ? o.operated ? o.copy : o.original : t;
|
|
1414
1414
|
return o && $t(o), i && Oe(c, c, o == null ? void 0 : o.options.updatedValues), [
|
|
1415
1415
|
c,
|
|
1416
|
-
n && a ? [{ op:
|
|
1417
|
-
r && a ? [{ op:
|
|
1416
|
+
n && a ? [{ op: x.Replace, path: [], value: e[0] }] : n,
|
|
1417
|
+
r && a ? [{ op: x.Replace, path: [], value: u }] : r
|
|
1418
1418
|
];
|
|
1419
1419
|
}
|
|
1420
1420
|
function Ji(t, e) {
|
|
@@ -2085,7 +2085,7 @@ function Rr(t) {
|
|
|
2085
2085
|
function $r(t, e) {
|
|
2086
2086
|
return at(t, e.triples, e.cardinalityInference, e.useDateObjects);
|
|
2087
2087
|
}
|
|
2088
|
-
function
|
|
2088
|
+
function Dr(t, e) {
|
|
2089
2089
|
if (t)
|
|
2090
2090
|
return new _e(t.attrs, t.linkIndex);
|
|
2091
2091
|
if (e && "__type" in e)
|
|
@@ -2125,7 +2125,7 @@ function We(t, e) {
|
|
|
2125
2125
|
return [i, ...u];
|
|
2126
2126
|
}
|
|
2127
2127
|
}
|
|
2128
|
-
function
|
|
2128
|
+
function xr(t, e, n) {
|
|
2129
2129
|
const r = We(t, n);
|
|
2130
2130
|
if (!r)
|
|
2131
2131
|
return;
|
|
@@ -2234,7 +2234,7 @@ function As(t, e, n) {
|
|
|
2234
2234
|
ms(t, e, i);
|
|
2235
2235
|
break;
|
|
2236
2236
|
case "retract-triple":
|
|
2237
|
-
|
|
2237
|
+
xr(t, e, i);
|
|
2238
2238
|
break;
|
|
2239
2239
|
case "delete-entity":
|
|
2240
2240
|
Nt(t, e, i);
|
|
@@ -2440,7 +2440,7 @@ function $s(t) {
|
|
|
2440
2440
|
return zn;
|
|
2441
2441
|
}
|
|
2442
2442
|
}
|
|
2443
|
-
const
|
|
2443
|
+
const Ds = [
|
|
2444
2444
|
"in",
|
|
2445
2445
|
"$in",
|
|
2446
2446
|
"$not",
|
|
@@ -2448,14 +2448,14 @@ const xs = [
|
|
|
2448
2448
|
"$comparator"
|
|
2449
2449
|
// covers all of $gt, $lt, etc.
|
|
2450
2450
|
];
|
|
2451
|
-
function
|
|
2452
|
-
for (const e of
|
|
2451
|
+
function xs(t) {
|
|
2452
|
+
for (const e of Ds)
|
|
2453
2453
|
if (t.hasOwnProperty(e))
|
|
2454
2454
|
return !0;
|
|
2455
2455
|
return !1;
|
|
2456
2456
|
}
|
|
2457
2457
|
function qr(t, e, n) {
|
|
2458
|
-
return n ? typeof t == "object" ?
|
|
2458
|
+
return n ? typeof t == "object" ? xs(t) ? n : null : $s(t)(t, e, n) : null;
|
|
2459
2459
|
}
|
|
2460
2460
|
function Us(t, e, n) {
|
|
2461
2461
|
return t.reduce((r, i, s) => {
|
|
@@ -3070,7 +3070,7 @@ function Hr(t, e, n, r) {
|
|
|
3070
3070
|
s
|
|
3071
3071
|
]].concat(r) : r;
|
|
3072
3072
|
}
|
|
3073
|
-
function
|
|
3073
|
+
function Do({ attrsStore: t }, [e, n, r]) {
|
|
3074
3074
|
const i = Object.entries(r).flatMap(([s, o]) => {
|
|
3075
3075
|
const u = Array.isArray(o) ? o : [o], a = F(t, e, s), c = me(t, e, s);
|
|
3076
3076
|
return u.map((d) => a ? [
|
|
@@ -3091,7 +3091,7 @@ function xo({ attrsStore: t }, [e, n, r]) {
|
|
|
3091
3091
|
});
|
|
3092
3092
|
return Hr(t, e, n, i);
|
|
3093
3093
|
}
|
|
3094
|
-
function
|
|
3094
|
+
function xo({ attrsStore: t }, [e, n, r]) {
|
|
3095
3095
|
const i = Object.entries(r).flatMap(([s, o]) => {
|
|
3096
3096
|
const u = Array.isArray(o) ? o : [o], a = F(t, e, s), c = me(t, e, s);
|
|
3097
3097
|
return u.map((d) => a ? [
|
|
@@ -3200,9 +3200,9 @@ function Vo(t, e) {
|
|
|
3200
3200
|
case "update":
|
|
3201
3201
|
return Fo(t, r);
|
|
3202
3202
|
case "link":
|
|
3203
|
-
return xo(t, r);
|
|
3204
|
-
case "unlink":
|
|
3205
3203
|
return Do(t, r);
|
|
3204
|
+
case "unlink":
|
|
3205
|
+
return xo(t, r);
|
|
3206
3206
|
case "delete":
|
|
3207
3207
|
return No(t, r);
|
|
3208
3208
|
case "ruleParams":
|
|
@@ -4276,7 +4276,7 @@ function ir(t) {
|
|
|
4276
4276
|
}, e;
|
|
4277
4277
|
}, {});
|
|
4278
4278
|
}
|
|
4279
|
-
const ni = "v0.22.89-experimental.drewh-
|
|
4279
|
+
const ni = "v0.22.89-experimental.drewh-allow-react-19.20279083263.1";
|
|
4280
4280
|
function Au(t, e) {
|
|
4281
4281
|
return {
|
|
4282
4282
|
info: t ? (...n) => console.info(...n, e()) : () => {
|
|
@@ -4652,7 +4652,7 @@ class fr {
|
|
|
4652
4652
|
return this.conn.send(JSON.stringify(e));
|
|
4653
4653
|
}
|
|
4654
4654
|
}
|
|
4655
|
-
class
|
|
4655
|
+
class Du {
|
|
4656
4656
|
constructor(e, n) {
|
|
4657
4657
|
this.type = "sse", this.initParams = null, this.sendQueue = [], this.closeFired = !1, this.sseInitTimeout = void 0, this.id = `${this.type}_${ai++}`, this.url = n, this.ES = e, this.conn = new e(n), this.sseInitTimeout = setTimeout(() => {
|
|
4658
4658
|
this.initParams || this.handleError();
|
|
@@ -4765,10 +4765,10 @@ var lr = function(t, e, n, r) {
|
|
|
4765
4765
|
c((r = r.apply(t, e || [])).next());
|
|
4766
4766
|
});
|
|
4767
4767
|
};
|
|
4768
|
-
function
|
|
4768
|
+
function xu(t, e) {
|
|
4769
4769
|
const n = t.values;
|
|
4770
4770
|
if (n) {
|
|
4771
|
-
const r =
|
|
4771
|
+
const r = Dr(n.attrsStore, null);
|
|
4772
4772
|
if (r) {
|
|
4773
4773
|
for (const i of n.entities || [])
|
|
4774
4774
|
i.store.useDateObjects = e, i.store = $r(r, i.store);
|
|
@@ -4812,7 +4812,7 @@ function pr(t, e, n) {
|
|
|
4812
4812
|
Lr(t, e, i);
|
|
4813
4813
|
break;
|
|
4814
4814
|
case "removed":
|
|
4815
|
-
|
|
4815
|
+
xr(t, e, i);
|
|
4816
4816
|
break;
|
|
4817
4817
|
}
|
|
4818
4818
|
}
|
|
@@ -4878,7 +4878,7 @@ class qu {
|
|
|
4878
4878
|
persister: n,
|
|
4879
4879
|
merge: Lu,
|
|
4880
4880
|
serialize: Uu,
|
|
4881
|
-
parse: (u, a) =>
|
|
4881
|
+
parse: (u, a) => xu(a, this.config.useDateObjects),
|
|
4882
4882
|
objectSize: (u) => {
|
|
4883
4883
|
var a;
|
|
4884
4884
|
return ((a = u.values) === null || a === void 0 ? void 0 : a.entities.length) || 0;
|
|
@@ -5196,7 +5196,7 @@ const oe = {
|
|
|
5196
5196
|
}, zu = 3e4, Vu = 3e4, Wu = 200, Bu = {
|
|
5197
5197
|
apiURI: "https://api.instantdb.com",
|
|
5198
5198
|
websocketURI: "wss://api.instantdb.com/runtime/session"
|
|
5199
|
-
}, It = "_instant_oauth_redirect",
|
|
5199
|
+
}, It = "_instant_oauth_redirect", De = "currentUser";
|
|
5200
5200
|
function Gu({ transportType: t, appId: e, apiURI: n, wsURI: r, EventSourceImpl: i }) {
|
|
5201
5201
|
if (!i)
|
|
5202
5202
|
return new fr(`${r}?app_id=${e}`);
|
|
@@ -5204,7 +5204,7 @@ function Gu({ transportType: t, appId: e, apiURI: n, wsURI: r, EventSourceImpl:
|
|
|
5204
5204
|
case "ws":
|
|
5205
5205
|
return new fr(`${r}?app_id=${e}`);
|
|
5206
5206
|
case "sse":
|
|
5207
|
-
return new
|
|
5207
|
+
return new Du(i, `${n}/runtime/sse?app_id=${e}`);
|
|
5208
5208
|
default:
|
|
5209
5209
|
throw new Error("Unknown transport type " + t);
|
|
5210
5210
|
}
|
|
@@ -5222,7 +5222,7 @@ function Hu(t, e) {
|
|
|
5222
5222
|
var n;
|
|
5223
5223
|
const r = typeof t == "string" ? JSON.parse(t) : t;
|
|
5224
5224
|
if (!((n = r == null ? void 0 : r.result) === null || n === void 0) && n.store) {
|
|
5225
|
-
const i =
|
|
5225
|
+
const i = Dr(r.result.attrsStore, r.result.store);
|
|
5226
5226
|
if (i) {
|
|
5227
5227
|
const s = r.result.store;
|
|
5228
5228
|
r.result.store = $r(i, Object.assign(Object.assign({}, s), { useDateObjects: e })), r.result.attrsStore = i;
|
|
@@ -5464,7 +5464,7 @@ class ea {
|
|
|
5464
5464
|
gc: null
|
|
5465
5465
|
}), this.kv.onKeyLoaded = (n) => {
|
|
5466
5466
|
n === "pendingMutations" && this.notifyAll();
|
|
5467
|
-
}, this.kv.waitForKeyToLoad("pendingMutations"), this.kv.waitForKeyToLoad(
|
|
5467
|
+
}, this.kv.waitForKeyToLoad("pendingMutations"), this.kv.waitForKeyToLoad(De), this._beforeUnloadCbs.push(() => {
|
|
5468
5468
|
this.kv.flush(), this.querySubs.flush();
|
|
5469
5469
|
});
|
|
5470
5470
|
}
|
|
@@ -6143,8 +6143,8 @@ class ea {
|
|
|
6143
6143
|
setCurrentUser(e) {
|
|
6144
6144
|
return L(this, void 0, void 0, function* () {
|
|
6145
6145
|
this.kv.updateInPlace((n) => {
|
|
6146
|
-
n[
|
|
6147
|
-
}), yield this.kv.waitForKeyToLoad(
|
|
6146
|
+
n[De] = e;
|
|
6147
|
+
}), yield this.kv.waitForKeyToLoad(De);
|
|
6148
6148
|
});
|
|
6149
6149
|
}
|
|
6150
6150
|
getCurrentUserCached() {
|
|
@@ -6152,7 +6152,7 @@ class ea {
|
|
|
6152
6152
|
}
|
|
6153
6153
|
_getCurrentUser() {
|
|
6154
6154
|
return L(this, void 0, void 0, function* () {
|
|
6155
|
-
const e = yield this.kv.waitForKeyToLoad(
|
|
6155
|
+
const e = yield this.kv.waitForKeyToLoad(De);
|
|
6156
6156
|
return typeof e == "string" ? JSON.parse(e) : e;
|
|
6157
6157
|
});
|
|
6158
6158
|
}
|
|
@@ -6177,7 +6177,7 @@ class ea {
|
|
|
6177
6177
|
}
|
|
6178
6178
|
_hasCurrentUser() {
|
|
6179
6179
|
return L(this, void 0, void 0, function* () {
|
|
6180
|
-
const e = yield this.kv.waitForKeyToLoad(
|
|
6180
|
+
const e = yield this.kv.waitForKeyToLoad(De);
|
|
6181
6181
|
return typeof e == "string" ? JSON.parse(e) != null : e != null;
|
|
6182
6182
|
});
|
|
6183
6183
|
}
|