@solidjs/signals 0.10.2 → 0.10.4
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/dev.js +169 -151
- package/dist/node.cjs +412 -399
- package/dist/prod.js +329 -316
- package/dist/types/core/core.d.ts +1 -6
- package/dist/types/core/index.d.ts +3 -1
- package/dist/types/core/owner.d.ts +5 -2
- package/dist/types/core/types.d.ts +2 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/signals.d.ts +2 -0
- package/package.json +2 -2
package/dist/prod.js
CHANGED
|
@@ -103,7 +103,7 @@ function markNode(e, t = REACTIVE_DIRTY) {
|
|
|
103
103
|
markNode(t.h, REACTIVE_CHECK);
|
|
104
104
|
}
|
|
105
105
|
if (e.A !== null) {
|
|
106
|
-
for (let t = e.A; t !== null; t = t.
|
|
106
|
+
for (let t = e.A; t !== null; t = t.C) {
|
|
107
107
|
for (let e = t.I; e !== null; e = e.p) {
|
|
108
108
|
markNode(e.h, REACTIVE_CHECK);
|
|
109
109
|
}
|
|
@@ -112,12 +112,12 @@ function markNode(e, t = REACTIVE_DIRTY) {
|
|
|
112
112
|
}
|
|
113
113
|
function runHeap(e, t) {
|
|
114
114
|
e._ = false;
|
|
115
|
-
for (e.
|
|
116
|
-
let n = e.l[e.
|
|
115
|
+
for (e.P = 0; e.P <= e.O; e.P++) {
|
|
116
|
+
let n = e.l[e.P];
|
|
117
117
|
while (n !== undefined) {
|
|
118
118
|
if (n.S & REACTIVE_IN_HEAP) t(n);
|
|
119
119
|
else adjustHeight(n, e);
|
|
120
|
-
n = e.l[e.
|
|
120
|
+
n = e.l[e.P];
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
e.O = 0;
|
|
@@ -138,8 +138,8 @@ function adjustHeight(e, t) {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
const transitions = new Set();
|
|
141
|
-
const dirtyQueue = { l: new Array(2e3).fill(undefined), _: false,
|
|
142
|
-
const zombieQueue = { l: new Array(2e3).fill(undefined), _: false,
|
|
141
|
+
const dirtyQueue = { l: new Array(2e3).fill(undefined), _: false, P: 0, O: 0 };
|
|
142
|
+
const zombieQueue = { l: new Array(2e3).fill(undefined), _: false, P: 0, O: 0 };
|
|
143
143
|
let clock = 0;
|
|
144
144
|
let activeTransition = null;
|
|
145
145
|
let scheduled = false;
|
|
@@ -250,7 +250,7 @@ class GlobalQueue extends Queue {
|
|
|
250
250
|
runLaneEffects(EFFECT_USER);
|
|
251
251
|
this.stashQueues(activeTransition.X);
|
|
252
252
|
clock++;
|
|
253
|
-
scheduled = dirtyQueue.O >= dirtyQueue.
|
|
253
|
+
scheduled = dirtyQueue.O >= dirtyQueue.P;
|
|
254
254
|
reassignPendingTransition(activeTransition.$);
|
|
255
255
|
activeTransition = null;
|
|
256
256
|
finalizePureQueue(null, true);
|
|
@@ -268,7 +268,7 @@ class GlobalQueue extends Queue {
|
|
|
268
268
|
finalizePureQueue();
|
|
269
269
|
}
|
|
270
270
|
clock++;
|
|
271
|
-
scheduled = dirtyQueue.O >= dirtyQueue.
|
|
271
|
+
scheduled = dirtyQueue.O >= dirtyQueue.P;
|
|
272
272
|
runLaneEffects(EFFECT_RENDER);
|
|
273
273
|
this.run(EFFECT_RENDER);
|
|
274
274
|
runLaneEffects(EFFECT_USER);
|
|
@@ -359,14 +359,14 @@ function insertSubs(e, t = false) {
|
|
|
359
359
|
continue;
|
|
360
360
|
}
|
|
361
361
|
const r = i.h.S & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
|
|
362
|
-
if (r.
|
|
362
|
+
if (r.P > i.h.o) r.P = i.h.o;
|
|
363
363
|
insertIntoHeap(i.h, r);
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
function finalizePureQueue(e = null, t = false) {
|
|
367
367
|
let n = !t;
|
|
368
368
|
if (!t) checkBoundaryChildren(globalQueue);
|
|
369
|
-
if (dirtyQueue.O >= dirtyQueue.
|
|
369
|
+
if (dirtyQueue.O >= dirtyQueue.P) runHeap(dirtyQueue, GlobalQueue.K);
|
|
370
370
|
if (n) {
|
|
371
371
|
const t = globalQueue.$;
|
|
372
372
|
for (let e = 0; e < t.length; e++) {
|
|
@@ -679,7 +679,7 @@ function notifyStatus(e, t, n, i, r) {
|
|
|
679
679
|
notifyStatus(i.h, t, n, c, l);
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
|
-
for (let i = e.A; i !== null; i = i.
|
|
682
|
+
for (let i = e.A; i !== null; i = i.C) {
|
|
683
683
|
for (let e = i.I; e !== null; e = e.p) {
|
|
684
684
|
e.h.J = clock;
|
|
685
685
|
if (e.h.q !== n) {
|
|
@@ -689,89 +689,67 @@ function notifyStatus(e, t, n, i, r) {
|
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
|
-
function
|
|
693
|
-
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
s.pe = (e, t) => {
|
|
709
|
-
const n = e !== undefined ? e : s.ae;
|
|
710
|
-
const i = t !== undefined ? t : s.q;
|
|
711
|
-
if (n & STATUS_ERROR) {
|
|
712
|
-
let e = i;
|
|
713
|
-
s.se.notify(s, STATUS_PENDING, 0);
|
|
714
|
-
if (s.re === EFFECT_USER) {
|
|
715
|
-
try {
|
|
716
|
-
return s.ge
|
|
717
|
-
? s.ge(e, () => {
|
|
718
|
-
s.Pe?.();
|
|
719
|
-
s.Pe = undefined;
|
|
720
|
-
})
|
|
721
|
-
: console.error(e);
|
|
722
|
-
} catch (t) {
|
|
723
|
-
e = t;
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
if (!s.se.notify(s, STATUS_ERROR, STATUS_ERROR)) throw e;
|
|
727
|
-
} else if (s.re === EFFECT_RENDER) s.se.notify(s, STATUS_PENDING | STATUS_ERROR, n, i);
|
|
728
|
-
};
|
|
729
|
-
recompute(s, true);
|
|
730
|
-
!r?.defer && (s.re === EFFECT_USER ? s.se.enqueue(s.re, runEffect.bind(s)) : runEffect.call(s));
|
|
731
|
-
o = true;
|
|
732
|
-
onCleanup(() => s.Pe?.());
|
|
692
|
+
function unlinkSubs(e) {
|
|
693
|
+
const t = e.V;
|
|
694
|
+
const n = e.D;
|
|
695
|
+
const i = e.p;
|
|
696
|
+
const r = e.he;
|
|
697
|
+
if (i !== null) i.he = r;
|
|
698
|
+
else t.Ae = r;
|
|
699
|
+
if (r !== null) r.p = i;
|
|
700
|
+
else {
|
|
701
|
+
t.I = i;
|
|
702
|
+
if (i === null) {
|
|
703
|
+
t.ge?.();
|
|
704
|
+
t.L && !t.Ce && unobserved(t);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
return n;
|
|
733
708
|
}
|
|
734
|
-
function
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
this.Pe = this.Ae(this.le, this.he);
|
|
740
|
-
} catch (e) {
|
|
741
|
-
if (!this.se.notify(this, STATUS_ERROR, STATUS_ERROR)) throw e;
|
|
742
|
-
} finally {
|
|
743
|
-
this.he = this.le;
|
|
744
|
-
this.oe = false;
|
|
709
|
+
function unobserved(e) {
|
|
710
|
+
deleteFromHeap(e, e.S & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
711
|
+
let t = e.N;
|
|
712
|
+
while (t !== null) {
|
|
713
|
+
t = unlinkSubs(t);
|
|
745
714
|
}
|
|
715
|
+
e.N = null;
|
|
716
|
+
disposeChildren(e, true);
|
|
746
717
|
}
|
|
747
|
-
function
|
|
748
|
-
const
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
()
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
);
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
n
|
|
769
|
-
n
|
|
770
|
-
|
|
718
|
+
function link(e, t) {
|
|
719
|
+
const n = t.Pe;
|
|
720
|
+
if (n !== null && n.V === e) return;
|
|
721
|
+
let i = null;
|
|
722
|
+
const r = t.S & REACTIVE_RECOMPUTING_DEPS;
|
|
723
|
+
if (r) {
|
|
724
|
+
i = n !== null ? n.D : t.N;
|
|
725
|
+
if (i !== null && i.V === e) {
|
|
726
|
+
t.Pe = i;
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
const o = e.Ae;
|
|
731
|
+
if (o !== null && o.h === t && (!r || isValidLink(o, t))) return;
|
|
732
|
+
const s = (t.Pe = e.Ae = { V: e, h: t, D: i, he: o, p: null });
|
|
733
|
+
if (n !== null) n.D = s;
|
|
734
|
+
else t.N = s;
|
|
735
|
+
if (o !== null) o.p = s;
|
|
736
|
+
else e.I = s;
|
|
737
|
+
}
|
|
738
|
+
function isValidLink(e, t) {
|
|
739
|
+
const n = t.Pe;
|
|
740
|
+
if (n !== null) {
|
|
741
|
+
let i = t.N;
|
|
742
|
+
do {
|
|
743
|
+
if (i === e) return true;
|
|
744
|
+
if (i === n) break;
|
|
745
|
+
i = i.D;
|
|
746
|
+
} while (i !== null);
|
|
747
|
+
}
|
|
748
|
+
return false;
|
|
771
749
|
}
|
|
772
750
|
const PENDING_OWNER = {};
|
|
773
751
|
function markDisposal(e) {
|
|
774
|
-
let t = e.
|
|
752
|
+
let t = e.Ne;
|
|
775
753
|
while (t) {
|
|
776
754
|
t.S |= REACTIVE_ZOMBIE;
|
|
777
755
|
if (t.S & REACTIVE_IN_HEAP) {
|
|
@@ -779,7 +757,7 @@ function markDisposal(e) {
|
|
|
779
757
|
insertIntoHeap(t, zombieQueue);
|
|
780
758
|
}
|
|
781
759
|
markDisposal(t);
|
|
782
|
-
t = t.
|
|
760
|
+
t = t.ye;
|
|
783
761
|
}
|
|
784
762
|
}
|
|
785
763
|
function dispose(e) {
|
|
@@ -788,15 +766,15 @@ function dispose(e) {
|
|
|
788
766
|
t = unlinkSubs(t);
|
|
789
767
|
} while (t !== null);
|
|
790
768
|
e.N = null;
|
|
791
|
-
e.
|
|
769
|
+
e.Pe = null;
|
|
792
770
|
disposeChildren(e, true);
|
|
793
771
|
}
|
|
794
772
|
function disposeChildren(e, t = false, n) {
|
|
795
773
|
if (e.S & REACTIVE_DISPOSED) return;
|
|
796
774
|
if (t) e.S = REACTIVE_DISPOSED;
|
|
797
|
-
let i = n ? e.De : e.
|
|
775
|
+
let i = n ? e.De : e.Ne;
|
|
798
776
|
while (i) {
|
|
799
|
-
const e = i.
|
|
777
|
+
const e = i.ye;
|
|
800
778
|
if (i.N) {
|
|
801
779
|
const e = i;
|
|
802
780
|
deleteFromHeap(e, e.S & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
@@ -805,7 +783,7 @@ function disposeChildren(e, t = false, n) {
|
|
|
805
783
|
t = unlinkSubs(t);
|
|
806
784
|
} while (t !== null);
|
|
807
785
|
e.N = null;
|
|
808
|
-
e.
|
|
786
|
+
e.Pe = null;
|
|
809
787
|
}
|
|
810
788
|
disposeChildren(i, true);
|
|
811
789
|
i = e;
|
|
@@ -813,8 +791,8 @@ function disposeChildren(e, t = false, n) {
|
|
|
813
791
|
if (n) {
|
|
814
792
|
e.De = null;
|
|
815
793
|
} else {
|
|
816
|
-
e.Ce = null;
|
|
817
794
|
e.Ne = null;
|
|
795
|
+
e.ye = null;
|
|
818
796
|
e.ve = 0;
|
|
819
797
|
}
|
|
820
798
|
runDisposal(e, n);
|
|
@@ -832,10 +810,18 @@ function runDisposal(e, t) {
|
|
|
832
810
|
}
|
|
833
811
|
t ? (e.we = null) : (e.be = null);
|
|
834
812
|
}
|
|
835
|
-
function
|
|
836
|
-
|
|
813
|
+
function childId(e, t) {
|
|
814
|
+
let n = e;
|
|
815
|
+
while (n.Ve && n.i) n = n.i;
|
|
816
|
+
if (n.id != null) return formatId(n.id, t ? n.ve++ : n.ve);
|
|
837
817
|
throw new Error("Cannot get child id from owner without an id");
|
|
838
818
|
}
|
|
819
|
+
function getNextChildId(e) {
|
|
820
|
+
return childId(e, true);
|
|
821
|
+
}
|
|
822
|
+
function peekNextChildId(e) {
|
|
823
|
+
return childId(e, false);
|
|
824
|
+
}
|
|
839
825
|
function formatId(e, t) {
|
|
840
826
|
const n = t.toString(36),
|
|
841
827
|
i = n.length - 1;
|
|
@@ -857,95 +843,119 @@ function onCleanup(e) {
|
|
|
857
843
|
}
|
|
858
844
|
function createOwner(e) {
|
|
859
845
|
const t = context;
|
|
860
|
-
const n =
|
|
861
|
-
|
|
846
|
+
const n = e?.transparent ?? false;
|
|
847
|
+
const i = {
|
|
848
|
+
id: e?.id ?? (n ? t?.id : t?.id != null ? getNextChildId(t) : undefined),
|
|
849
|
+
Ve: n || undefined,
|
|
862
850
|
t: true,
|
|
863
851
|
u: t?.t ? t.u : t,
|
|
864
|
-
Ce: null,
|
|
865
852
|
Ne: null,
|
|
853
|
+
ye: null,
|
|
866
854
|
be: null,
|
|
867
855
|
se: t?.se ?? globalQueue,
|
|
868
|
-
|
|
856
|
+
me: t?.me || defaultContext,
|
|
869
857
|
ve: 0,
|
|
870
858
|
we: null,
|
|
871
859
|
De: null,
|
|
872
860
|
i: t,
|
|
873
861
|
dispose(e = true) {
|
|
874
|
-
disposeChildren(
|
|
862
|
+
disposeChildren(i, e);
|
|
875
863
|
}
|
|
876
864
|
};
|
|
877
865
|
if (t) {
|
|
878
|
-
const e = t.
|
|
866
|
+
const e = t.Ne;
|
|
879
867
|
if (e === null) {
|
|
880
|
-
t.
|
|
868
|
+
t.Ne = i;
|
|
881
869
|
} else {
|
|
882
|
-
|
|
883
|
-
t.
|
|
870
|
+
i.ye = e;
|
|
871
|
+
t.Ne = i;
|
|
884
872
|
}
|
|
885
873
|
}
|
|
886
|
-
return
|
|
874
|
+
return i;
|
|
887
875
|
}
|
|
888
876
|
function createRoot(e, t) {
|
|
889
877
|
const n = createOwner(t);
|
|
890
878
|
return runWithOwner(n, () => e(n.dispose));
|
|
891
879
|
}
|
|
892
|
-
function
|
|
893
|
-
|
|
894
|
-
const
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
880
|
+
function effect(e, t, n, i, r) {
|
|
881
|
+
let o = false;
|
|
882
|
+
const s = computed(r?.render ? t => staleValues(() => e(t)) : e, i, {
|
|
883
|
+
...r,
|
|
884
|
+
equals: () => {
|
|
885
|
+
s.oe = !s.q;
|
|
886
|
+
if (o) s.se.enqueue(s.re, runEffect.bind(s));
|
|
887
|
+
return false;
|
|
888
|
+
},
|
|
889
|
+
lazy: true
|
|
890
|
+
});
|
|
891
|
+
s.Le = i;
|
|
892
|
+
s.ke = t;
|
|
893
|
+
s.Ue = n;
|
|
894
|
+
s.We = undefined;
|
|
895
|
+
s.re = r?.render ? EFFECT_RENDER : EFFECT_USER;
|
|
896
|
+
s.pe = (e, t) => {
|
|
897
|
+
const n = e !== undefined ? e : s.ae;
|
|
898
|
+
const i = t !== undefined ? t : s.q;
|
|
899
|
+
if (n & STATUS_ERROR) {
|
|
900
|
+
let e = i;
|
|
901
|
+
s.se.notify(s, STATUS_PENDING, 0);
|
|
902
|
+
if (s.re === EFFECT_USER) {
|
|
903
|
+
try {
|
|
904
|
+
return s.Ue
|
|
905
|
+
? s.Ue(e, () => {
|
|
906
|
+
s.We?.();
|
|
907
|
+
s.We = undefined;
|
|
908
|
+
})
|
|
909
|
+
: console.error(e);
|
|
910
|
+
} catch (t) {
|
|
911
|
+
e = t;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
if (!s.se.notify(s, STATUS_ERROR, STATUS_ERROR)) throw e;
|
|
915
|
+
} else if (s.re === EFFECT_RENDER) s.se.notify(s, STATUS_PENDING | STATUS_ERROR, n, i);
|
|
916
|
+
};
|
|
917
|
+
recompute(s, true);
|
|
918
|
+
!r?.defer && (s.re === EFFECT_USER ? s.se.enqueue(s.re, runEffect.bind(s)) : runEffect.call(s));
|
|
919
|
+
o = true;
|
|
920
|
+
onCleanup(() => s.We?.());
|
|
917
921
|
}
|
|
918
|
-
function
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
if (
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
922
|
+
function runEffect() {
|
|
923
|
+
if (!this.oe || this.S & REACTIVE_DISPOSED) return;
|
|
924
|
+
this.We?.();
|
|
925
|
+
this.We = undefined;
|
|
926
|
+
try {
|
|
927
|
+
this.We = this.ke(this.le, this.Le);
|
|
928
|
+
} catch (e) {
|
|
929
|
+
if (!this.se.notify(this, STATUS_ERROR, STATUS_ERROR)) throw e;
|
|
930
|
+
} finally {
|
|
931
|
+
this.Le = this.le;
|
|
932
|
+
this.oe = false;
|
|
929
933
|
}
|
|
930
|
-
const o = e.Le;
|
|
931
|
-
if (o !== null && o.h === t && (!r || isValidLink(o, t))) return;
|
|
932
|
-
const s = (t.ye = e.Le = { V: e, h: t, D: i, me: o, p: null });
|
|
933
|
-
if (n !== null) n.D = s;
|
|
934
|
-
else t.N = s;
|
|
935
|
-
if (o !== null) o.p = s;
|
|
936
|
-
else e.I = s;
|
|
937
934
|
}
|
|
938
|
-
function
|
|
939
|
-
const
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
935
|
+
function trackedEffect(e, t) {
|
|
936
|
+
const run = () => {
|
|
937
|
+
if (!n.oe || n.S & REACTIVE_DISPOSED) return;
|
|
938
|
+
n.oe = false;
|
|
939
|
+
recompute(n);
|
|
940
|
+
};
|
|
941
|
+
const n = computed(
|
|
942
|
+
() => {
|
|
943
|
+
try {
|
|
944
|
+
n.We?.();
|
|
945
|
+
n.We = undefined;
|
|
946
|
+
n.We = staleValues(e) || undefined;
|
|
947
|
+
} finally {
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
undefined,
|
|
951
|
+
{ ...t, lazy: true, pureWrite: true }
|
|
952
|
+
);
|
|
953
|
+
n.We = undefined;
|
|
954
|
+
n.oe = true;
|
|
955
|
+
n.re = EFFECT_TRACKED;
|
|
956
|
+
n.ue = run;
|
|
957
|
+
n.se.enqueue(EFFECT_USER, run);
|
|
958
|
+
onCleanup(() => n.We?.());
|
|
949
959
|
}
|
|
950
960
|
GlobalQueue.K = recompute;
|
|
951
961
|
GlobalQueue.Y = disposeChildren;
|
|
@@ -967,9 +977,9 @@ function recompute(e, t = false) {
|
|
|
967
977
|
else {
|
|
968
978
|
markDisposal(e);
|
|
969
979
|
e.we = e.be;
|
|
970
|
-
e.De = e.
|
|
980
|
+
e.De = e.Ne;
|
|
971
981
|
e.be = null;
|
|
972
|
-
e.
|
|
982
|
+
e.Ne = null;
|
|
973
983
|
e.ve = 0;
|
|
974
984
|
}
|
|
975
985
|
}
|
|
@@ -978,7 +988,7 @@ function recompute(e, t = false) {
|
|
|
978
988
|
const o = !!(e.ae & STATUS_PENDING);
|
|
979
989
|
const s = context;
|
|
980
990
|
context = e;
|
|
981
|
-
e.
|
|
991
|
+
e.Pe = null;
|
|
982
992
|
e.S = REACTIVE_RECOMPUTING_DEPS;
|
|
983
993
|
e.J = clock;
|
|
984
994
|
let u = e.ce === NOT_PENDING ? e.le : e.ce;
|
|
@@ -1020,7 +1030,7 @@ function recompute(e, t = false) {
|
|
|
1020
1030
|
context = s;
|
|
1021
1031
|
}
|
|
1022
1032
|
if (!e.q) {
|
|
1023
|
-
const s = e.
|
|
1033
|
+
const s = e.Pe;
|
|
1024
1034
|
let l = s !== null ? s.D : e.N;
|
|
1025
1035
|
if (l !== null) {
|
|
1026
1036
|
do {
|
|
@@ -1074,14 +1084,16 @@ function updateIfNecessary(e) {
|
|
|
1074
1084
|
e.S = REACTIVE_NONE;
|
|
1075
1085
|
}
|
|
1076
1086
|
function computed(e, t, n) {
|
|
1077
|
-
const i =
|
|
1078
|
-
|
|
1087
|
+
const i = n?.transparent ?? false;
|
|
1088
|
+
const r = {
|
|
1089
|
+
id: n?.id ?? (i ? context?.id : context?.id != null ? getNextChildId(context) : undefined),
|
|
1090
|
+
Ve: i || undefined,
|
|
1079
1091
|
_e: n?.equals != null ? n.equals : isEqual,
|
|
1080
|
-
|
|
1081
|
-
|
|
1092
|
+
xe: !!n?.pureWrite,
|
|
1093
|
+
ge: n?.unobserved,
|
|
1082
1094
|
be: null,
|
|
1083
1095
|
se: context?.se ?? globalQueue,
|
|
1084
|
-
|
|
1096
|
+
me: context?.me ?? defaultContext,
|
|
1085
1097
|
ve: 0,
|
|
1086
1098
|
L: e,
|
|
1087
1099
|
le: t,
|
|
@@ -1090,12 +1102,12 @@ function computed(e, t, n) {
|
|
|
1090
1102
|
R: undefined,
|
|
1091
1103
|
T: null,
|
|
1092
1104
|
N: null,
|
|
1093
|
-
|
|
1105
|
+
Pe: null,
|
|
1094
1106
|
I: null,
|
|
1095
|
-
|
|
1107
|
+
Ae: null,
|
|
1096
1108
|
i: context,
|
|
1109
|
+
ye: null,
|
|
1097
1110
|
Ne: null,
|
|
1098
|
-
Ce: null,
|
|
1099
1111
|
S: REACTIVE_NONE,
|
|
1100
1112
|
ae: STATUS_UNINITIALIZED,
|
|
1101
1113
|
J: clock,
|
|
@@ -1105,32 +1117,32 @@ function computed(e, t, n) {
|
|
|
1105
1117
|
Se: null,
|
|
1106
1118
|
ne: null
|
|
1107
1119
|
};
|
|
1108
|
-
|
|
1109
|
-
const
|
|
1120
|
+
r.T = r;
|
|
1121
|
+
const o = context?.t ? context.u : context;
|
|
1110
1122
|
if (context) {
|
|
1111
|
-
const e = context.
|
|
1123
|
+
const e = context.Ne;
|
|
1112
1124
|
if (e === null) {
|
|
1113
|
-
context.
|
|
1125
|
+
context.Ne = r;
|
|
1114
1126
|
} else {
|
|
1115
|
-
|
|
1116
|
-
context.
|
|
1127
|
+
r.ye = e;
|
|
1128
|
+
context.Ne = r;
|
|
1117
1129
|
}
|
|
1118
1130
|
}
|
|
1119
|
-
if (
|
|
1120
|
-
!n?.lazy && recompute(
|
|
1121
|
-
return
|
|
1131
|
+
if (o) r.o = o.o + 1;
|
|
1132
|
+
!n?.lazy && recompute(r, true);
|
|
1133
|
+
return r;
|
|
1122
1134
|
}
|
|
1123
1135
|
function signal(e, t, n = null) {
|
|
1124
1136
|
const i = {
|
|
1125
1137
|
_e: t?.equals != null ? t.equals : isEqual,
|
|
1126
|
-
|
|
1127
|
-
|
|
1138
|
+
xe: !!t?.pureWrite,
|
|
1139
|
+
ge: t?.unobserved,
|
|
1128
1140
|
le: e,
|
|
1129
1141
|
I: null,
|
|
1130
|
-
|
|
1142
|
+
Ae: null,
|
|
1131
1143
|
J: clock,
|
|
1132
1144
|
m: n,
|
|
1133
|
-
|
|
1145
|
+
C: n?.A || null,
|
|
1134
1146
|
ce: NOT_PENDING
|
|
1135
1147
|
};
|
|
1136
1148
|
n && (n.A = i);
|
|
@@ -1195,7 +1207,7 @@ function read(e) {
|
|
|
1195
1207
|
const n = e.m || e;
|
|
1196
1208
|
if (n.L) {
|
|
1197
1209
|
const i = e.S & REACTIVE_ZOMBIE;
|
|
1198
|
-
if (n.o >= (i ? zombieQueue.
|
|
1210
|
+
if (n.o >= (i ? zombieQueue.P : dirtyQueue.P)) {
|
|
1199
1211
|
markNode(t);
|
|
1200
1212
|
markHeap(i ? zombieQueue : dirtyQueue);
|
|
1201
1213
|
updateIfNecessary(n);
|
|
@@ -1402,7 +1414,7 @@ function getContext(e, t = getOwner()) {
|
|
|
1402
1414
|
if (!t) {
|
|
1403
1415
|
throw new NoOwnerError();
|
|
1404
1416
|
}
|
|
1405
|
-
const n = hasContext(e, t) ? t.
|
|
1417
|
+
const n = hasContext(e, t) ? t.me[e.id] : e.defaultValue;
|
|
1406
1418
|
if (isUndefined(n)) {
|
|
1407
1419
|
throw new ContextNotFoundError();
|
|
1408
1420
|
}
|
|
@@ -1412,10 +1424,10 @@ function setContext(e, t, n = getOwner()) {
|
|
|
1412
1424
|
if (!n) {
|
|
1413
1425
|
throw new NoOwnerError();
|
|
1414
1426
|
}
|
|
1415
|
-
n.
|
|
1427
|
+
n.me = { ...n.me, [e.id]: isUndefined(t) ? e.defaultValue : t };
|
|
1416
1428
|
}
|
|
1417
1429
|
function hasContext(e, t) {
|
|
1418
|
-
return !isUndefined(t?.
|
|
1430
|
+
return !isUndefined(t?.me[e.id]);
|
|
1419
1431
|
}
|
|
1420
1432
|
function isUndefined(e) {
|
|
1421
1433
|
return typeof e === "undefined";
|
|
@@ -1699,7 +1711,7 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
1699
1711
|
r !== i && r !== undefined && reconcile(r, n?.key || "id", n?.all)(o);
|
|
1700
1712
|
});
|
|
1701
1713
|
});
|
|
1702
|
-
i.
|
|
1714
|
+
i.Ce = true;
|
|
1703
1715
|
return { store: o, node: i };
|
|
1704
1716
|
}
|
|
1705
1717
|
function createProjection(e, t = {}, n) {
|
|
@@ -2167,7 +2179,7 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
|
|
|
2167
2179
|
setProjectionWriteActive(false);
|
|
2168
2180
|
}
|
|
2169
2181
|
});
|
|
2170
|
-
i.
|
|
2182
|
+
i.Ce = true;
|
|
2171
2183
|
}
|
|
2172
2184
|
return { store: o, node: i };
|
|
2173
2185
|
}
|
|
@@ -2351,68 +2363,68 @@ function mapArray(e, t, n) {
|
|
|
2351
2363
|
const i = typeof n?.keyed === "function" ? n.keyed : undefined;
|
|
2352
2364
|
return createMemo(
|
|
2353
2365
|
updateKeyedMap.bind({
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
He: [],
|
|
2366
|
+
Me: createOwner(),
|
|
2367
|
+
Fe: 0,
|
|
2368
|
+
Ge: e,
|
|
2369
|
+
$e: [],
|
|
2370
|
+
He: t,
|
|
2360
2371
|
je: [],
|
|
2361
|
-
Ke:
|
|
2362
|
-
Ye: i
|
|
2363
|
-
Be:
|
|
2364
|
-
Xe:
|
|
2372
|
+
Ke: [],
|
|
2373
|
+
Ye: i,
|
|
2374
|
+
Be: i || n?.keyed === false ? [] : undefined,
|
|
2375
|
+
Xe: t.length > 1 ? [] : undefined,
|
|
2376
|
+
qe: n?.fallback
|
|
2365
2377
|
})
|
|
2366
2378
|
);
|
|
2367
2379
|
}
|
|
2368
2380
|
const pureOptions = { pureWrite: true };
|
|
2369
2381
|
function updateKeyedMap() {
|
|
2370
|
-
const e = this.
|
|
2382
|
+
const e = this.Ge() || [],
|
|
2371
2383
|
t = e.length;
|
|
2372
2384
|
e[$TRACK];
|
|
2373
|
-
runWithOwner(this.
|
|
2385
|
+
runWithOwner(this.Me, () => {
|
|
2374
2386
|
let n,
|
|
2375
2387
|
i,
|
|
2376
|
-
r = this.
|
|
2388
|
+
r = this.Be
|
|
2377
2389
|
? () => {
|
|
2378
|
-
this.
|
|
2379
|
-
this.
|
|
2380
|
-
return this
|
|
2381
|
-
read.bind(null, this.
|
|
2382
|
-
this.
|
|
2390
|
+
this.Be[i] = signal(e[i], pureOptions);
|
|
2391
|
+
this.Xe && (this.Xe[i] = signal(i, pureOptions));
|
|
2392
|
+
return this.He(
|
|
2393
|
+
read.bind(null, this.Be[i]),
|
|
2394
|
+
this.Xe ? read.bind(null, this.Xe[i]) : undefined
|
|
2383
2395
|
);
|
|
2384
2396
|
}
|
|
2385
|
-
: this.
|
|
2397
|
+
: this.Xe
|
|
2386
2398
|
? () => {
|
|
2387
2399
|
const t = e[i];
|
|
2388
|
-
this.
|
|
2389
|
-
return this
|
|
2400
|
+
this.Xe[i] = signal(i, pureOptions);
|
|
2401
|
+
return this.He(() => t, read.bind(null, this.Xe[i]));
|
|
2390
2402
|
}
|
|
2391
2403
|
: () => {
|
|
2392
2404
|
const t = e[i];
|
|
2393
|
-
return this
|
|
2405
|
+
return this.He(() => t);
|
|
2394
2406
|
};
|
|
2395
2407
|
if (t === 0) {
|
|
2396
|
-
if (this.
|
|
2397
|
-
this.
|
|
2408
|
+
if (this.Fe !== 0) {
|
|
2409
|
+
this.Me.dispose(false);
|
|
2410
|
+
this.Ke = [];
|
|
2411
|
+
this.$e = [];
|
|
2398
2412
|
this.je = [];
|
|
2399
|
-
this.
|
|
2400
|
-
this.He = [];
|
|
2401
|
-
this.Me = 0;
|
|
2402
|
-
this.Ye && (this.Ye = []);
|
|
2413
|
+
this.Fe = 0;
|
|
2403
2414
|
this.Be && (this.Be = []);
|
|
2415
|
+
this.Xe && (this.Xe = []);
|
|
2404
2416
|
}
|
|
2405
|
-
if (this.
|
|
2406
|
-
this.
|
|
2417
|
+
if (this.qe && !this.je[0]) {
|
|
2418
|
+
this.je[0] = runWithOwner((this.Ke[0] = createOwner()), this.qe);
|
|
2407
2419
|
}
|
|
2408
|
-
} else if (this.
|
|
2409
|
-
if (this.
|
|
2410
|
-
this.
|
|
2420
|
+
} else if (this.Fe === 0) {
|
|
2421
|
+
if (this.Ke[0]) this.Ke[0].dispose();
|
|
2422
|
+
this.je = new Array(t);
|
|
2411
2423
|
for (i = 0; i < t; i++) {
|
|
2412
|
-
this
|
|
2413
|
-
this.
|
|
2424
|
+
this.$e[i] = e[i];
|
|
2425
|
+
this.je[i] = runWithOwner((this.Ke[i] = createOwner()), r);
|
|
2414
2426
|
}
|
|
2415
|
-
this.
|
|
2427
|
+
this.Fe = t;
|
|
2416
2428
|
} else {
|
|
2417
2429
|
let o,
|
|
2418
2430
|
s,
|
|
@@ -2423,130 +2435,130 @@ function updateKeyedMap() {
|
|
|
2423
2435
|
f,
|
|
2424
2436
|
E = new Array(t),
|
|
2425
2437
|
T = new Array(t),
|
|
2426
|
-
d = this.
|
|
2427
|
-
R = this.
|
|
2438
|
+
d = this.Be ? new Array(t) : undefined,
|
|
2439
|
+
R = this.Xe ? new Array(t) : undefined;
|
|
2428
2440
|
for (
|
|
2429
|
-
o = 0, s = Math.min(this.
|
|
2430
|
-
o < s && (this
|
|
2441
|
+
o = 0, s = Math.min(this.Fe, t);
|
|
2442
|
+
o < s && (this.$e[o] === e[o] || (this.Be && compare(this.Ye, this.$e[o], e[o])));
|
|
2431
2443
|
o++
|
|
2432
2444
|
) {
|
|
2433
|
-
if (this.
|
|
2445
|
+
if (this.Be) setSignal(this.Be[o], e[o]);
|
|
2434
2446
|
}
|
|
2435
2447
|
for (
|
|
2436
|
-
s = this.
|
|
2448
|
+
s = this.Fe - 1, u = t - 1;
|
|
2437
2449
|
s >= o &&
|
|
2438
2450
|
u >= o &&
|
|
2439
|
-
(this
|
|
2451
|
+
(this.$e[s] === e[u] || (this.Be && compare(this.Ye, this.$e[s], e[u])));
|
|
2440
2452
|
s--, u--
|
|
2441
2453
|
) {
|
|
2442
|
-
E[u] = this.
|
|
2443
|
-
T[u] = this.
|
|
2444
|
-
d && (d[u] = this.
|
|
2445
|
-
R && (R[u] = this.
|
|
2454
|
+
E[u] = this.je[s];
|
|
2455
|
+
T[u] = this.Ke[s];
|
|
2456
|
+
d && (d[u] = this.Be[s]);
|
|
2457
|
+
R && (R[u] = this.Xe[s]);
|
|
2446
2458
|
}
|
|
2447
2459
|
a = new Map();
|
|
2448
2460
|
f = new Array(u + 1);
|
|
2449
2461
|
for (i = u; i >= o; i--) {
|
|
2450
2462
|
c = e[i];
|
|
2451
|
-
l = this.
|
|
2463
|
+
l = this.Ye ? this.Ye(c) : c;
|
|
2452
2464
|
n = a.get(l);
|
|
2453
2465
|
f[i] = n === undefined ? -1 : n;
|
|
2454
2466
|
a.set(l, i);
|
|
2455
2467
|
}
|
|
2456
2468
|
for (n = o; n <= s; n++) {
|
|
2457
|
-
c = this
|
|
2458
|
-
l = this.
|
|
2469
|
+
c = this.$e[n];
|
|
2470
|
+
l = this.Ye ? this.Ye(c) : c;
|
|
2459
2471
|
i = a.get(l);
|
|
2460
2472
|
if (i !== undefined && i !== -1) {
|
|
2461
|
-
E[i] = this.
|
|
2462
|
-
T[i] = this.
|
|
2463
|
-
d && (d[i] = this.
|
|
2464
|
-
R && (R[i] = this.
|
|
2473
|
+
E[i] = this.je[n];
|
|
2474
|
+
T[i] = this.Ke[n];
|
|
2475
|
+
d && (d[i] = this.Be[n]);
|
|
2476
|
+
R && (R[i] = this.Xe[n]);
|
|
2465
2477
|
i = f[i];
|
|
2466
2478
|
a.set(l, i);
|
|
2467
|
-
} else this.
|
|
2479
|
+
} else this.Ke[n].dispose();
|
|
2468
2480
|
}
|
|
2469
2481
|
for (i = o; i < t; i++) {
|
|
2470
2482
|
if (i in E) {
|
|
2471
|
-
this.
|
|
2472
|
-
this.
|
|
2483
|
+
this.je[i] = E[i];
|
|
2484
|
+
this.Ke[i] = T[i];
|
|
2473
2485
|
if (d) {
|
|
2474
|
-
this.
|
|
2475
|
-
setSignal(this.
|
|
2486
|
+
this.Be[i] = d[i];
|
|
2487
|
+
setSignal(this.Be[i], e[i]);
|
|
2476
2488
|
}
|
|
2477
2489
|
if (R) {
|
|
2478
|
-
this.
|
|
2479
|
-
setSignal(this.
|
|
2490
|
+
this.Xe[i] = R[i];
|
|
2491
|
+
setSignal(this.Xe[i], i);
|
|
2480
2492
|
}
|
|
2481
2493
|
} else {
|
|
2482
|
-
this.
|
|
2494
|
+
this.je[i] = runWithOwner((this.Ke[i] = createOwner()), r);
|
|
2483
2495
|
}
|
|
2484
2496
|
}
|
|
2485
|
-
this.
|
|
2486
|
-
this
|
|
2497
|
+
this.je = this.je.slice(0, (this.Fe = t));
|
|
2498
|
+
this.$e = e.slice(0);
|
|
2487
2499
|
}
|
|
2488
2500
|
});
|
|
2489
|
-
return this.
|
|
2501
|
+
return this.je;
|
|
2490
2502
|
}
|
|
2491
2503
|
function repeat(e, t, n) {
|
|
2492
2504
|
return updateRepeat.bind({
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2505
|
+
Me: createOwner(),
|
|
2506
|
+
Fe: 0,
|
|
2507
|
+
ze: 0,
|
|
2508
|
+
Ze: e,
|
|
2509
|
+
He: t,
|
|
2510
|
+
Ke: [],
|
|
2498
2511
|
je: [],
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
Xe: n?.fallback
|
|
2512
|
+
Je: n?.from,
|
|
2513
|
+
qe: n?.fallback
|
|
2502
2514
|
});
|
|
2503
2515
|
}
|
|
2504
2516
|
function updateRepeat() {
|
|
2505
|
-
const e = this.
|
|
2506
|
-
const t = this.
|
|
2507
|
-
runWithOwner(this.
|
|
2517
|
+
const e = this.Ze();
|
|
2518
|
+
const t = this.Je?.() || 0;
|
|
2519
|
+
runWithOwner(this.Me, () => {
|
|
2508
2520
|
if (e === 0) {
|
|
2509
|
-
if (this.
|
|
2510
|
-
this.
|
|
2521
|
+
if (this.Fe !== 0) {
|
|
2522
|
+
this.Me.dispose(false);
|
|
2523
|
+
this.Ke = [];
|
|
2511
2524
|
this.je = [];
|
|
2512
|
-
this.
|
|
2513
|
-
this.Me = 0;
|
|
2525
|
+
this.Fe = 0;
|
|
2514
2526
|
}
|
|
2515
|
-
if (this.
|
|
2516
|
-
this.
|
|
2527
|
+
if (this.qe && !this.je[0]) {
|
|
2528
|
+
this.je[0] = runWithOwner((this.Ke[0] = createOwner()), this.qe);
|
|
2517
2529
|
}
|
|
2518
2530
|
return;
|
|
2519
2531
|
}
|
|
2520
2532
|
const n = t + e;
|
|
2521
|
-
const i = this.
|
|
2522
|
-
if (this.
|
|
2523
|
-
for (let e = n; e < i; e++) this.
|
|
2524
|
-
if (this.
|
|
2525
|
-
let e = this.
|
|
2526
|
-
while (e < t && e < this.
|
|
2527
|
-
this.
|
|
2528
|
-
this.
|
|
2529
|
-
} else if (this.
|
|
2530
|
-
let n = i - this.
|
|
2531
|
-
let r = this.
|
|
2532
|
-
this.
|
|
2533
|
+
const i = this.ze + this.Fe;
|
|
2534
|
+
if (this.Fe === 0 && this.Ke[0]) this.Ke[0].dispose();
|
|
2535
|
+
for (let e = n; e < i; e++) this.Ke[e - this.ze].dispose();
|
|
2536
|
+
if (this.ze < t) {
|
|
2537
|
+
let e = this.ze;
|
|
2538
|
+
while (e < t && e < this.Fe) this.Ke[e++].dispose();
|
|
2539
|
+
this.Ke.splice(0, t - this.ze);
|
|
2540
|
+
this.je.splice(0, t - this.ze);
|
|
2541
|
+
} else if (this.ze > t) {
|
|
2542
|
+
let n = i - this.ze - 1;
|
|
2543
|
+
let r = this.ze - t;
|
|
2544
|
+
this.Ke.length = this.je.length = e;
|
|
2533
2545
|
while (n >= r) {
|
|
2546
|
+
this.Ke[n] = this.Ke[n - r];
|
|
2534
2547
|
this.je[n] = this.je[n - r];
|
|
2535
|
-
this.He[n] = this.He[n - r];
|
|
2536
2548
|
n--;
|
|
2537
2549
|
}
|
|
2538
2550
|
for (let e = 0; e < r; e++) {
|
|
2539
|
-
this.
|
|
2551
|
+
this.je[e] = runWithOwner((this.Ke[e] = createOwner()), () => this.He(e + t));
|
|
2540
2552
|
}
|
|
2541
2553
|
}
|
|
2542
2554
|
for (let e = i; e < n; e++) {
|
|
2543
|
-
this.
|
|
2555
|
+
this.je[e - t] = runWithOwner((this.Ke[e - t] = createOwner()), () => this.He(e));
|
|
2544
2556
|
}
|
|
2545
|
-
this.
|
|
2546
|
-
this.
|
|
2547
|
-
this.
|
|
2557
|
+
this.je = this.je.slice(0, e);
|
|
2558
|
+
this.ze = t;
|
|
2559
|
+
this.Fe = e;
|
|
2548
2560
|
});
|
|
2549
|
-
return this.
|
|
2561
|
+
return this.je;
|
|
2550
2562
|
}
|
|
2551
2563
|
function compare(e, t, n) {
|
|
2552
2564
|
return e ? e(t) === e(n) : true;
|
|
@@ -2556,11 +2568,11 @@ function boundaryComputed(e, t) {
|
|
|
2556
2568
|
n.pe = (e, t) => {
|
|
2557
2569
|
const i = e !== undefined ? e : n.ae;
|
|
2558
2570
|
const r = t !== undefined ? t : n.q;
|
|
2559
|
-
n.ae &= ~n.
|
|
2560
|
-
n.se.notify(n, n.
|
|
2571
|
+
n.ae &= ~n.et;
|
|
2572
|
+
n.se.notify(n, n.et, i, r);
|
|
2561
2573
|
};
|
|
2562
|
-
n.
|
|
2563
|
-
n.
|
|
2574
|
+
n.et = t;
|
|
2575
|
+
n.Ce = true;
|
|
2564
2576
|
recompute(n, true);
|
|
2565
2577
|
return n;
|
|
2566
2578
|
}
|
|
@@ -2574,36 +2586,36 @@ function createBoundChildren(e, t, n, i) {
|
|
|
2574
2586
|
});
|
|
2575
2587
|
}
|
|
2576
2588
|
class CollectionQueue extends Queue {
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2589
|
+
tt;
|
|
2590
|
+
nt = new Set();
|
|
2591
|
+
it = signal(false, { pureWrite: true });
|
|
2592
|
+
rt = false;
|
|
2581
2593
|
constructor(e) {
|
|
2582
2594
|
super();
|
|
2583
|
-
this.
|
|
2595
|
+
this.tt = e;
|
|
2584
2596
|
}
|
|
2585
2597
|
run(e) {
|
|
2586
|
-
if (!e || read(this.
|
|
2598
|
+
if (!e || read(this.it)) return;
|
|
2587
2599
|
return super.run(e);
|
|
2588
2600
|
}
|
|
2589
2601
|
notify(e, t, n, i) {
|
|
2590
|
-
if (!(t & this.
|
|
2591
|
-
if (n & this.
|
|
2602
|
+
if (!(t & this.tt) || (this.tt & STATUS_PENDING && this.rt)) return super.notify(e, t, n, i);
|
|
2603
|
+
if (n & this.tt) {
|
|
2592
2604
|
const t = i?.source || e.q?.source;
|
|
2593
2605
|
if (t) {
|
|
2594
|
-
const e = this.
|
|
2595
|
-
this.
|
|
2596
|
-
if (e) setSignal(this.
|
|
2606
|
+
const e = this.nt.size === 0;
|
|
2607
|
+
this.nt.add(t);
|
|
2608
|
+
if (e) setSignal(this.it, true);
|
|
2597
2609
|
}
|
|
2598
2610
|
}
|
|
2599
|
-
t &= ~this.
|
|
2611
|
+
t &= ~this.tt;
|
|
2600
2612
|
return t ? super.notify(e, t, n, i) : true;
|
|
2601
2613
|
}
|
|
2602
2614
|
checkSources() {
|
|
2603
|
-
for (const e of this.
|
|
2604
|
-
if (!(e.ae & this.
|
|
2615
|
+
for (const e of this.nt) {
|
|
2616
|
+
if (!(e.ae & this.tt)) this.nt.delete(e);
|
|
2605
2617
|
}
|
|
2606
|
-
if (!this.
|
|
2618
|
+
if (!this.nt.size) setSignal(this.it, false);
|
|
2607
2619
|
}
|
|
2608
2620
|
}
|
|
2609
2621
|
function createCollectionBoundary(e, t, n) {
|
|
@@ -2611,10 +2623,10 @@ function createCollectionBoundary(e, t, n) {
|
|
|
2611
2623
|
const r = new CollectionQueue(e);
|
|
2612
2624
|
const o = createBoundChildren(i, t, r, e);
|
|
2613
2625
|
const s = computed(() => {
|
|
2614
|
-
if (!read(r.
|
|
2626
|
+
if (!read(r.it)) {
|
|
2615
2627
|
const e = read(o);
|
|
2616
|
-
if (!untrack(() => read(r.
|
|
2617
|
-
r.
|
|
2628
|
+
if (!untrack(() => read(r.it))) {
|
|
2629
|
+
r.rt = true;
|
|
2618
2630
|
return e;
|
|
2619
2631
|
}
|
|
2620
2632
|
}
|
|
@@ -2627,10 +2639,10 @@ function createLoadBoundary(e, t) {
|
|
|
2627
2639
|
}
|
|
2628
2640
|
function createErrorBoundary(e, t) {
|
|
2629
2641
|
return createCollectionBoundary(STATUS_ERROR, e, e => {
|
|
2630
|
-
let n = e.
|
|
2642
|
+
let n = e.nt.values().next().value;
|
|
2631
2643
|
const i = n.q?.cause ?? n.q;
|
|
2632
2644
|
return t(i, () => {
|
|
2633
|
-
for (const t of e.
|
|
2645
|
+
for (const t of e.nt) recompute(t);
|
|
2634
2646
|
schedule();
|
|
2635
2647
|
});
|
|
2636
2648
|
});
|
|
@@ -2724,6 +2736,7 @@ export {
|
|
|
2724
2736
|
omit,
|
|
2725
2737
|
onCleanup,
|
|
2726
2738
|
onSettled,
|
|
2739
|
+
peekNextChildId,
|
|
2727
2740
|
pending,
|
|
2728
2741
|
reconcile,
|
|
2729
2742
|
refresh,
|