solid-js 1.3.13 → 1.3.14
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.cjs +9 -8
- package/dist/dev.js +9 -8
- package/dist/solid.cjs +8 -8
- package/dist/solid.js +8 -8
- package/package.json +2 -2
- package/store/types/store.d.ts +2 -2
- package/types/jsx.d.ts +2 -2
- package/universal/dist/dev.cjs +5 -5
- package/universal/dist/dev.js +5 -5
- package/universal/dist/universal.cjs +5 -5
- package/universal/dist/universal.js +5 -5
- package/web/dist/dev.cjs +16 -9
- package/web/dist/dev.js +16 -9
- package/web/dist/web.cjs +16 -9
- package/web/dist/web.js +16 -9
package/dist/dev.cjs
CHANGED
|
@@ -621,7 +621,7 @@ function readSignal() {
|
|
|
621
621
|
if (this.sources && (!runningTransition && this.state || runningTransition && this.tState)) {
|
|
622
622
|
const updates = Updates;
|
|
623
623
|
Updates = null;
|
|
624
|
-
!runningTransition && this.state === STALE || runningTransition && this.tState === STALE ? updateComputation(this) :
|
|
624
|
+
!runningTransition && this.state === STALE || runningTransition && this.tState === STALE ? updateComputation(this) : lookUpstream(this);
|
|
625
625
|
Updates = updates;
|
|
626
626
|
}
|
|
627
627
|
if (Listener) {
|
|
@@ -671,7 +671,7 @@ function writeSignal(node, value, isComp) {
|
|
|
671
671
|
if (TransitionRunning && Transition.disposed.has(o)) continue;
|
|
672
672
|
if (TransitionRunning && !o.tState || !TransitionRunning && !o.state) {
|
|
673
673
|
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
674
|
-
if (o.observers)
|
|
674
|
+
if (o.observers) markDownstream(o);
|
|
675
675
|
}
|
|
676
676
|
if (TransitionRunning) o.tState = STALE;else o.state = STALE;
|
|
677
677
|
}
|
|
@@ -764,7 +764,7 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
764
764
|
function runTop(node) {
|
|
765
765
|
const runningTransition = Transition && Transition.running;
|
|
766
766
|
if (!runningTransition && node.state === 0 || runningTransition && node.tState === 0) return;
|
|
767
|
-
if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) return
|
|
767
|
+
if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) return lookUpstream(node);
|
|
768
768
|
if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
|
|
769
769
|
const ancestors = [node];
|
|
770
770
|
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
@@ -785,7 +785,7 @@ function runTop(node) {
|
|
|
785
785
|
} else if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) {
|
|
786
786
|
const updates = Updates;
|
|
787
787
|
Updates = null;
|
|
788
|
-
|
|
788
|
+
lookUpstream(node, ancestors[0]);
|
|
789
789
|
Updates = updates;
|
|
790
790
|
}
|
|
791
791
|
}
|
|
@@ -884,7 +884,7 @@ function runUserEffects(queue) {
|
|
|
884
884
|
for (i = 0; i < userLength; i++) runTop(queue[i]);
|
|
885
885
|
for (i = resume; i < queue.length; i++) runTop(queue[i]);
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function lookUpstream(node, ignore) {
|
|
888
888
|
const runningTransition = Transition && Transition.running;
|
|
889
889
|
if (runningTransition) node.tState = 0;else node.state = 0;
|
|
890
890
|
for (let i = 0; i < node.sources.length; i += 1) {
|
|
@@ -892,18 +892,18 @@ function lookDownstream(node, ignore) {
|
|
|
892
892
|
if (source.sources) {
|
|
893
893
|
if (!runningTransition && source.state === STALE || runningTransition && source.tState === STALE) {
|
|
894
894
|
if (source !== ignore) runTop(source);
|
|
895
|
-
} else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING)
|
|
895
|
+
} else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING) lookUpstream(source, ignore);
|
|
896
896
|
}
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function markDownstream(node) {
|
|
900
900
|
const runningTransition = Transition && Transition.running;
|
|
901
901
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
902
902
|
const o = node.observers[i];
|
|
903
903
|
if (!runningTransition && !o.state || runningTransition && !o.tState) {
|
|
904
904
|
if (runningTransition) o.tState = PENDING;else o.state = PENDING;
|
|
905
905
|
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
906
|
-
o.observers &&
|
|
906
|
+
o.observers && markDownstream(o);
|
|
907
907
|
}
|
|
908
908
|
}
|
|
909
909
|
}
|
|
@@ -1426,6 +1426,7 @@ function ErrorBoundary(props) {
|
|
|
1426
1426
|
return createMemo(() => {
|
|
1427
1427
|
if ((e = errored()) != null) {
|
|
1428
1428
|
const f = props.fallback;
|
|
1429
|
+
if ((typeof f !== "function" || f.length == 0)) console.error(e);
|
|
1429
1430
|
return typeof f === "function" && f.length ? untrack(() => f(e, () => setErrored(null))) : f;
|
|
1430
1431
|
}
|
|
1431
1432
|
onError(setErrored);
|
package/dist/dev.js
CHANGED
|
@@ -617,7 +617,7 @@ function readSignal() {
|
|
|
617
617
|
if (this.sources && (!runningTransition && this.state || runningTransition && this.tState)) {
|
|
618
618
|
const updates = Updates;
|
|
619
619
|
Updates = null;
|
|
620
|
-
!runningTransition && this.state === STALE || runningTransition && this.tState === STALE ? updateComputation(this) :
|
|
620
|
+
!runningTransition && this.state === STALE || runningTransition && this.tState === STALE ? updateComputation(this) : lookUpstream(this);
|
|
621
621
|
Updates = updates;
|
|
622
622
|
}
|
|
623
623
|
if (Listener) {
|
|
@@ -667,7 +667,7 @@ function writeSignal(node, value, isComp) {
|
|
|
667
667
|
if (TransitionRunning && Transition.disposed.has(o)) continue;
|
|
668
668
|
if (TransitionRunning && !o.tState || !TransitionRunning && !o.state) {
|
|
669
669
|
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
670
|
-
if (o.observers)
|
|
670
|
+
if (o.observers) markDownstream(o);
|
|
671
671
|
}
|
|
672
672
|
if (TransitionRunning) o.tState = STALE;else o.state = STALE;
|
|
673
673
|
}
|
|
@@ -760,7 +760,7 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
760
760
|
function runTop(node) {
|
|
761
761
|
const runningTransition = Transition && Transition.running;
|
|
762
762
|
if (!runningTransition && node.state === 0 || runningTransition && node.tState === 0) return;
|
|
763
|
-
if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) return
|
|
763
|
+
if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) return lookUpstream(node);
|
|
764
764
|
if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
|
|
765
765
|
const ancestors = [node];
|
|
766
766
|
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
@@ -781,7 +781,7 @@ function runTop(node) {
|
|
|
781
781
|
} else if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) {
|
|
782
782
|
const updates = Updates;
|
|
783
783
|
Updates = null;
|
|
784
|
-
|
|
784
|
+
lookUpstream(node, ancestors[0]);
|
|
785
785
|
Updates = updates;
|
|
786
786
|
}
|
|
787
787
|
}
|
|
@@ -880,7 +880,7 @@ function runUserEffects(queue) {
|
|
|
880
880
|
for (i = 0; i < userLength; i++) runTop(queue[i]);
|
|
881
881
|
for (i = resume; i < queue.length; i++) runTop(queue[i]);
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function lookUpstream(node, ignore) {
|
|
884
884
|
const runningTransition = Transition && Transition.running;
|
|
885
885
|
if (runningTransition) node.tState = 0;else node.state = 0;
|
|
886
886
|
for (let i = 0; i < node.sources.length; i += 1) {
|
|
@@ -888,18 +888,18 @@ function lookDownstream(node, ignore) {
|
|
|
888
888
|
if (source.sources) {
|
|
889
889
|
if (!runningTransition && source.state === STALE || runningTransition && source.tState === STALE) {
|
|
890
890
|
if (source !== ignore) runTop(source);
|
|
891
|
-
} else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING)
|
|
891
|
+
} else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING) lookUpstream(source, ignore);
|
|
892
892
|
}
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function markDownstream(node) {
|
|
896
896
|
const runningTransition = Transition && Transition.running;
|
|
897
897
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
898
898
|
const o = node.observers[i];
|
|
899
899
|
if (!runningTransition && !o.state || runningTransition && !o.tState) {
|
|
900
900
|
if (runningTransition) o.tState = PENDING;else o.state = PENDING;
|
|
901
901
|
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
902
|
-
o.observers &&
|
|
902
|
+
o.observers && markDownstream(o);
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
905
|
}
|
|
@@ -1422,6 +1422,7 @@ function ErrorBoundary(props) {
|
|
|
1422
1422
|
return createMemo(() => {
|
|
1423
1423
|
if ((e = errored()) != null) {
|
|
1424
1424
|
const f = props.fallback;
|
|
1425
|
+
if ((typeof f !== "function" || f.length == 0)) console.error(e);
|
|
1425
1426
|
return typeof f === "function" && f.length ? untrack(() => f(e, () => setErrored(null))) : f;
|
|
1426
1427
|
}
|
|
1427
1428
|
onError(setErrored);
|
package/dist/solid.cjs
CHANGED
|
@@ -565,7 +565,7 @@ function readSignal() {
|
|
|
565
565
|
if (this.sources && (!runningTransition && this.state || runningTransition && this.tState)) {
|
|
566
566
|
const updates = Updates;
|
|
567
567
|
Updates = null;
|
|
568
|
-
!runningTransition && this.state === STALE || runningTransition && this.tState === STALE ? updateComputation(this) :
|
|
568
|
+
!runningTransition && this.state === STALE || runningTransition && this.tState === STALE ? updateComputation(this) : lookUpstream(this);
|
|
569
569
|
Updates = updates;
|
|
570
570
|
}
|
|
571
571
|
if (Listener) {
|
|
@@ -615,7 +615,7 @@ function writeSignal(node, value, isComp) {
|
|
|
615
615
|
if (TransitionRunning && Transition.disposed.has(o)) continue;
|
|
616
616
|
if (TransitionRunning && !o.tState || !TransitionRunning && !o.state) {
|
|
617
617
|
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
618
|
-
if (o.observers)
|
|
618
|
+
if (o.observers) markDownstream(o);
|
|
619
619
|
}
|
|
620
620
|
if (TransitionRunning) o.tState = STALE;else o.state = STALE;
|
|
621
621
|
}
|
|
@@ -707,7 +707,7 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
707
707
|
function runTop(node) {
|
|
708
708
|
const runningTransition = Transition && Transition.running;
|
|
709
709
|
if (!runningTransition && node.state === 0 || runningTransition && node.tState === 0) return;
|
|
710
|
-
if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) return
|
|
710
|
+
if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) return lookUpstream(node);
|
|
711
711
|
if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
|
|
712
712
|
const ancestors = [node];
|
|
713
713
|
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
@@ -728,7 +728,7 @@ function runTop(node) {
|
|
|
728
728
|
} else if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) {
|
|
729
729
|
const updates = Updates;
|
|
730
730
|
Updates = null;
|
|
731
|
-
|
|
731
|
+
lookUpstream(node, ancestors[0]);
|
|
732
732
|
Updates = updates;
|
|
733
733
|
}
|
|
734
734
|
}
|
|
@@ -826,7 +826,7 @@ function runUserEffects(queue) {
|
|
|
826
826
|
for (i = 0; i < userLength; i++) runTop(queue[i]);
|
|
827
827
|
for (i = resume; i < queue.length; i++) runTop(queue[i]);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function lookUpstream(node, ignore) {
|
|
830
830
|
const runningTransition = Transition && Transition.running;
|
|
831
831
|
if (runningTransition) node.tState = 0;else node.state = 0;
|
|
832
832
|
for (let i = 0; i < node.sources.length; i += 1) {
|
|
@@ -834,18 +834,18 @@ function lookDownstream(node, ignore) {
|
|
|
834
834
|
if (source.sources) {
|
|
835
835
|
if (!runningTransition && source.state === STALE || runningTransition && source.tState === STALE) {
|
|
836
836
|
if (source !== ignore) runTop(source);
|
|
837
|
-
} else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING)
|
|
837
|
+
} else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING) lookUpstream(source, ignore);
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function markDownstream(node) {
|
|
842
842
|
const runningTransition = Transition && Transition.running;
|
|
843
843
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
844
844
|
const o = node.observers[i];
|
|
845
845
|
if (!runningTransition && !o.state || runningTransition && !o.tState) {
|
|
846
846
|
if (runningTransition) o.tState = PENDING;else o.state = PENDING;
|
|
847
847
|
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
848
|
-
o.observers &&
|
|
848
|
+
o.observers && markDownstream(o);
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
851
|
}
|
package/dist/solid.js
CHANGED
|
@@ -561,7 +561,7 @@ function readSignal() {
|
|
|
561
561
|
if (this.sources && (!runningTransition && this.state || runningTransition && this.tState)) {
|
|
562
562
|
const updates = Updates;
|
|
563
563
|
Updates = null;
|
|
564
|
-
!runningTransition && this.state === STALE || runningTransition && this.tState === STALE ? updateComputation(this) :
|
|
564
|
+
!runningTransition && this.state === STALE || runningTransition && this.tState === STALE ? updateComputation(this) : lookUpstream(this);
|
|
565
565
|
Updates = updates;
|
|
566
566
|
}
|
|
567
567
|
if (Listener) {
|
|
@@ -611,7 +611,7 @@ function writeSignal(node, value, isComp) {
|
|
|
611
611
|
if (TransitionRunning && Transition.disposed.has(o)) continue;
|
|
612
612
|
if (TransitionRunning && !o.tState || !TransitionRunning && !o.state) {
|
|
613
613
|
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
614
|
-
if (o.observers)
|
|
614
|
+
if (o.observers) markDownstream(o);
|
|
615
615
|
}
|
|
616
616
|
if (TransitionRunning) o.tState = STALE;else o.state = STALE;
|
|
617
617
|
}
|
|
@@ -703,7 +703,7 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
703
703
|
function runTop(node) {
|
|
704
704
|
const runningTransition = Transition && Transition.running;
|
|
705
705
|
if (!runningTransition && node.state === 0 || runningTransition && node.tState === 0) return;
|
|
706
|
-
if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) return
|
|
706
|
+
if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) return lookUpstream(node);
|
|
707
707
|
if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
|
|
708
708
|
const ancestors = [node];
|
|
709
709
|
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
@@ -724,7 +724,7 @@ function runTop(node) {
|
|
|
724
724
|
} else if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) {
|
|
725
725
|
const updates = Updates;
|
|
726
726
|
Updates = null;
|
|
727
|
-
|
|
727
|
+
lookUpstream(node, ancestors[0]);
|
|
728
728
|
Updates = updates;
|
|
729
729
|
}
|
|
730
730
|
}
|
|
@@ -822,7 +822,7 @@ function runUserEffects(queue) {
|
|
|
822
822
|
for (i = 0; i < userLength; i++) runTop(queue[i]);
|
|
823
823
|
for (i = resume; i < queue.length; i++) runTop(queue[i]);
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function lookUpstream(node, ignore) {
|
|
826
826
|
const runningTransition = Transition && Transition.running;
|
|
827
827
|
if (runningTransition) node.tState = 0;else node.state = 0;
|
|
828
828
|
for (let i = 0; i < node.sources.length; i += 1) {
|
|
@@ -830,18 +830,18 @@ function lookDownstream(node, ignore) {
|
|
|
830
830
|
if (source.sources) {
|
|
831
831
|
if (!runningTransition && source.state === STALE || runningTransition && source.tState === STALE) {
|
|
832
832
|
if (source !== ignore) runTop(source);
|
|
833
|
-
} else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING)
|
|
833
|
+
} else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING) lookUpstream(source, ignore);
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function markDownstream(node) {
|
|
838
838
|
const runningTransition = Transition && Transition.running;
|
|
839
839
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
840
840
|
const o = node.observers[i];
|
|
841
841
|
if (!runningTransition && !o.state || runningTransition && !o.tState) {
|
|
842
842
|
if (runningTransition) o.tState = PENDING;else o.state = PENDING;
|
|
843
843
|
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
844
|
-
o.observers &&
|
|
844
|
+
o.observers && markDownstream(o);
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
847
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-js",
|
|
3
3
|
"description": "A declarative JavaScript library for building user interfaces.",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.14",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://solidjs.com",
|
|
@@ -144,5 +144,5 @@
|
|
|
144
144
|
"compiler",
|
|
145
145
|
"performance"
|
|
146
146
|
],
|
|
147
|
-
"gitHead": "
|
|
147
|
+
"gitHead": "9a41feafea10717e785c603eadb96c6133cd2988"
|
|
148
148
|
}
|
package/store/types/store.d.ts
CHANGED
|
@@ -18,10 +18,10 @@ export declare function createDataNode(): Accessor<void> & {
|
|
|
18
18
|
export declare function setProperty(state: StoreNode, property: PropertyKey, value: any): void;
|
|
19
19
|
export declare function updatePath(current: StoreNode, path: any[], traversed?: PropertyKey[]): void;
|
|
20
20
|
export declare type DeepReadonly<T> = 0 extends 1 & T ? T : T extends NotWrappable ? T : {
|
|
21
|
-
readonly [K in keyof T]: T[K]
|
|
21
|
+
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
22
22
|
};
|
|
23
23
|
export declare type DeepMutable<T> = 0 extends 1 & T ? T : T extends NotWrappable ? T : {
|
|
24
|
-
-readonly [K in keyof T]: T[K]
|
|
24
|
+
-readonly [K in keyof T]: DeepMutable<T[K]>;
|
|
25
25
|
};
|
|
26
26
|
export declare type StorePathRange = {
|
|
27
27
|
from?: number;
|
package/types/jsx.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export namespace JSX {
|
|
|
21
21
|
(): Element;
|
|
22
22
|
}
|
|
23
23
|
interface ElementClass {
|
|
24
|
-
|
|
24
|
+
// empty, libs can define requirements downstream
|
|
25
25
|
}
|
|
26
26
|
type LibraryManagedAttributes<Component, Props> = Props;
|
|
27
27
|
interface ElementChildrenAttribute {
|
|
@@ -3112,7 +3112,7 @@ export namespace JSX {
|
|
|
3112
3112
|
ZoomAndPanSVGAttributes,
|
|
3113
3113
|
PresentationSVGAttributes {
|
|
3114
3114
|
version?: string;
|
|
3115
|
-
|
|
3115
|
+
baseProfile?: string;
|
|
3116
3116
|
x?: number | string;
|
|
3117
3117
|
y?: number | string;
|
|
3118
3118
|
width?: number | string;
|
package/universal/dist/dev.cjs
CHANGED
|
@@ -194,18 +194,18 @@ function createRenderer$1({
|
|
|
194
194
|
removeNode(parent, oldNode);
|
|
195
195
|
}
|
|
196
196
|
function spreadExpression(node, props, prevProps = {}, skipChildren) {
|
|
197
|
+
props || (props = {});
|
|
197
198
|
if (!skipChildren && "children" in props) {
|
|
198
199
|
solidJs.createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
199
200
|
}
|
|
201
|
+
props.ref && props.ref(node);
|
|
200
202
|
solidJs.createRenderEffect(() => {
|
|
201
203
|
for (const prop in props) {
|
|
202
|
-
if (prop === "children") continue;
|
|
204
|
+
if (prop === "children" || prop === "ref") continue;
|
|
203
205
|
const value = props[prop];
|
|
204
206
|
if (value === prevProps[prop]) continue;
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
prevProps[prop] = value;
|
|
208
|
-
}
|
|
207
|
+
setProperty(node, prop, value, prevProps[prop]);
|
|
208
|
+
prevProps[prop] = value;
|
|
209
209
|
}
|
|
210
210
|
});
|
|
211
211
|
return prevProps;
|
package/universal/dist/dev.js
CHANGED
|
@@ -190,18 +190,18 @@ function createRenderer$1({
|
|
|
190
190
|
removeNode(parent, oldNode);
|
|
191
191
|
}
|
|
192
192
|
function spreadExpression(node, props, prevProps = {}, skipChildren) {
|
|
193
|
+
props || (props = {});
|
|
193
194
|
if (!skipChildren && "children" in props) {
|
|
194
195
|
createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
195
196
|
}
|
|
197
|
+
props.ref && props.ref(node);
|
|
196
198
|
createRenderEffect(() => {
|
|
197
199
|
for (const prop in props) {
|
|
198
|
-
if (prop === "children") continue;
|
|
200
|
+
if (prop === "children" || prop === "ref") continue;
|
|
199
201
|
const value = props[prop];
|
|
200
202
|
if (value === prevProps[prop]) continue;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
prevProps[prop] = value;
|
|
204
|
-
}
|
|
203
|
+
setProperty(node, prop, value, prevProps[prop]);
|
|
204
|
+
prevProps[prop] = value;
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
return prevProps;
|
|
@@ -194,18 +194,18 @@ function createRenderer$1({
|
|
|
194
194
|
removeNode(parent, oldNode);
|
|
195
195
|
}
|
|
196
196
|
function spreadExpression(node, props, prevProps = {}, skipChildren) {
|
|
197
|
+
props || (props = {});
|
|
197
198
|
if (!skipChildren && "children" in props) {
|
|
198
199
|
solidJs.createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
199
200
|
}
|
|
201
|
+
props.ref && props.ref(node);
|
|
200
202
|
solidJs.createRenderEffect(() => {
|
|
201
203
|
for (const prop in props) {
|
|
202
|
-
if (prop === "children") continue;
|
|
204
|
+
if (prop === "children" || prop === "ref") continue;
|
|
203
205
|
const value = props[prop];
|
|
204
206
|
if (value === prevProps[prop]) continue;
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
prevProps[prop] = value;
|
|
208
|
-
}
|
|
207
|
+
setProperty(node, prop, value, prevProps[prop]);
|
|
208
|
+
prevProps[prop] = value;
|
|
209
209
|
}
|
|
210
210
|
});
|
|
211
211
|
return prevProps;
|
|
@@ -190,18 +190,18 @@ function createRenderer$1({
|
|
|
190
190
|
removeNode(parent, oldNode);
|
|
191
191
|
}
|
|
192
192
|
function spreadExpression(node, props, prevProps = {}, skipChildren) {
|
|
193
|
+
props || (props = {});
|
|
193
194
|
if (!skipChildren && "children" in props) {
|
|
194
195
|
createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
195
196
|
}
|
|
197
|
+
props.ref && props.ref(node);
|
|
196
198
|
createRenderEffect(() => {
|
|
197
199
|
for (const prop in props) {
|
|
198
|
-
if (prop === "children") continue;
|
|
200
|
+
if (prop === "children" || prop === "ref") continue;
|
|
199
201
|
const value = props[prop];
|
|
200
202
|
if (value === prevProps[prop]) continue;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
prevProps[prop] = value;
|
|
204
|
-
}
|
|
203
|
+
setProperty(node, prop, value, prevProps[prop]);
|
|
204
|
+
prevProps[prop] = value;
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
return prevProps;
|
package/web/dist/dev.cjs
CHANGED
|
@@ -166,8 +166,10 @@ function classList(node, value, prev = {}) {
|
|
|
166
166
|
}
|
|
167
167
|
function style(node, value, prev = {}) {
|
|
168
168
|
const nodeStyle = node.style;
|
|
169
|
-
|
|
170
|
-
typeof
|
|
169
|
+
const prevString = typeof prev === "string";
|
|
170
|
+
if (value == null && prevString || typeof value === "string") return nodeStyle.cssText = value;
|
|
171
|
+
prevString && (nodeStyle.cssText = undefined, prev = {});
|
|
172
|
+
value || (value = {});
|
|
171
173
|
let v, s;
|
|
172
174
|
for (s in prev) {
|
|
173
175
|
value[s] == null && nodeStyle.removeProperty(s);
|
|
@@ -205,11 +207,12 @@ function insert(parent, accessor, marker, initial) {
|
|
|
205
207
|
if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
|
|
206
208
|
solidJs.createRenderEffect(current => insertExpression(parent, accessor(), current, marker), initial);
|
|
207
209
|
}
|
|
208
|
-
function assign(node, props, isSVG, skipChildren, prevProps = {}) {
|
|
210
|
+
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
211
|
+
props || (props = {});
|
|
209
212
|
for (const prop in prevProps) {
|
|
210
213
|
if (!(prop in props)) {
|
|
211
214
|
if (prop === "children") continue;
|
|
212
|
-
assignProp(node, prop, null, prevProps[prop], isSVG);
|
|
215
|
+
assignProp(node, prop, null, prevProps[prop], isSVG, skipRef);
|
|
213
216
|
}
|
|
214
217
|
}
|
|
215
218
|
for (const prop in props) {
|
|
@@ -218,7 +221,7 @@ function assign(node, props, isSVG, skipChildren, prevProps = {}) {
|
|
|
218
221
|
continue;
|
|
219
222
|
}
|
|
220
223
|
const value = props[prop];
|
|
221
|
-
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG);
|
|
224
|
+
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef);
|
|
222
225
|
}
|
|
223
226
|
}
|
|
224
227
|
function hydrate$1(code, element, options = {}) {
|
|
@@ -293,13 +296,15 @@ function toggleClassKey(node, key, value) {
|
|
|
293
296
|
const classNames = key.trim().split(/\s+/);
|
|
294
297
|
for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
|
|
295
298
|
}
|
|
296
|
-
function assignProp(node, prop, value, prev, isSVG) {
|
|
299
|
+
function assignProp(node, prop, value, prev, isSVG, skipRef) {
|
|
297
300
|
let isCE, isProp, isChildProp;
|
|
298
301
|
if (prop === "style") return style(node, value, prev);
|
|
299
302
|
if (prop === "classList") return classList(node, value, prev);
|
|
300
303
|
if (value === prev) return prev;
|
|
301
304
|
if (prop === "ref") {
|
|
302
|
-
|
|
305
|
+
if (!skipRef) {
|
|
306
|
+
value(node);
|
|
307
|
+
}
|
|
303
308
|
} else if (prop.slice(0, 3) === "on:") {
|
|
304
309
|
node.addEventListener(prop.slice(3), value);
|
|
305
310
|
} else if (prop.slice(0, 10) === "oncapture:") {
|
|
@@ -343,10 +348,12 @@ function eventHandler(e) {
|
|
|
343
348
|
}
|
|
344
349
|
}
|
|
345
350
|
function spreadExpression(node, props, prevProps = {}, isSVG, skipChildren) {
|
|
351
|
+
props || (props = {});
|
|
346
352
|
if (!skipChildren && "children" in props) {
|
|
347
353
|
solidJs.createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
348
354
|
}
|
|
349
|
-
|
|
355
|
+
props.ref && props.ref(node);
|
|
356
|
+
solidJs.createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
350
357
|
return prevProps;
|
|
351
358
|
}
|
|
352
359
|
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
@@ -461,7 +468,7 @@ function gatherHydratable(element, root) {
|
|
|
461
468
|
for (let i = 0; i < templates.length; i++) {
|
|
462
469
|
const node = templates[i];
|
|
463
470
|
const key = node.getAttribute("data-hk");
|
|
464
|
-
if (!root || key.startsWith(root)) solidJs.sharedConfig.registry.set(key, node);
|
|
471
|
+
if ((!root || key.startsWith(root)) && !solidJs.sharedConfig.registry.has(key)) solidJs.sharedConfig.registry.set(key, node);
|
|
465
472
|
}
|
|
466
473
|
}
|
|
467
474
|
function getHydrationKey() {
|
package/web/dist/dev.js
CHANGED
|
@@ -163,8 +163,10 @@ function classList(node, value, prev = {}) {
|
|
|
163
163
|
}
|
|
164
164
|
function style(node, value, prev = {}) {
|
|
165
165
|
const nodeStyle = node.style;
|
|
166
|
-
|
|
167
|
-
typeof
|
|
166
|
+
const prevString = typeof prev === "string";
|
|
167
|
+
if (value == null && prevString || typeof value === "string") return nodeStyle.cssText = value;
|
|
168
|
+
prevString && (nodeStyle.cssText = undefined, prev = {});
|
|
169
|
+
value || (value = {});
|
|
168
170
|
let v, s;
|
|
169
171
|
for (s in prev) {
|
|
170
172
|
value[s] == null && nodeStyle.removeProperty(s);
|
|
@@ -202,11 +204,12 @@ function insert(parent, accessor, marker, initial) {
|
|
|
202
204
|
if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
|
|
203
205
|
createRenderEffect(current => insertExpression(parent, accessor(), current, marker), initial);
|
|
204
206
|
}
|
|
205
|
-
function assign(node, props, isSVG, skipChildren, prevProps = {}) {
|
|
207
|
+
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
208
|
+
props || (props = {});
|
|
206
209
|
for (const prop in prevProps) {
|
|
207
210
|
if (!(prop in props)) {
|
|
208
211
|
if (prop === "children") continue;
|
|
209
|
-
assignProp(node, prop, null, prevProps[prop], isSVG);
|
|
212
|
+
assignProp(node, prop, null, prevProps[prop], isSVG, skipRef);
|
|
210
213
|
}
|
|
211
214
|
}
|
|
212
215
|
for (const prop in props) {
|
|
@@ -215,7 +218,7 @@ function assign(node, props, isSVG, skipChildren, prevProps = {}) {
|
|
|
215
218
|
continue;
|
|
216
219
|
}
|
|
217
220
|
const value = props[prop];
|
|
218
|
-
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG);
|
|
221
|
+
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef);
|
|
219
222
|
}
|
|
220
223
|
}
|
|
221
224
|
function hydrate$1(code, element, options = {}) {
|
|
@@ -290,13 +293,15 @@ function toggleClassKey(node, key, value) {
|
|
|
290
293
|
const classNames = key.trim().split(/\s+/);
|
|
291
294
|
for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
|
|
292
295
|
}
|
|
293
|
-
function assignProp(node, prop, value, prev, isSVG) {
|
|
296
|
+
function assignProp(node, prop, value, prev, isSVG, skipRef) {
|
|
294
297
|
let isCE, isProp, isChildProp;
|
|
295
298
|
if (prop === "style") return style(node, value, prev);
|
|
296
299
|
if (prop === "classList") return classList(node, value, prev);
|
|
297
300
|
if (value === prev) return prev;
|
|
298
301
|
if (prop === "ref") {
|
|
299
|
-
|
|
302
|
+
if (!skipRef) {
|
|
303
|
+
value(node);
|
|
304
|
+
}
|
|
300
305
|
} else if (prop.slice(0, 3) === "on:") {
|
|
301
306
|
node.addEventListener(prop.slice(3), value);
|
|
302
307
|
} else if (prop.slice(0, 10) === "oncapture:") {
|
|
@@ -340,10 +345,12 @@ function eventHandler(e) {
|
|
|
340
345
|
}
|
|
341
346
|
}
|
|
342
347
|
function spreadExpression(node, props, prevProps = {}, isSVG, skipChildren) {
|
|
348
|
+
props || (props = {});
|
|
343
349
|
if (!skipChildren && "children" in props) {
|
|
344
350
|
createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
345
351
|
}
|
|
346
|
-
|
|
352
|
+
props.ref && props.ref(node);
|
|
353
|
+
createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
347
354
|
return prevProps;
|
|
348
355
|
}
|
|
349
356
|
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
@@ -458,7 +465,7 @@ function gatherHydratable(element, root) {
|
|
|
458
465
|
for (let i = 0; i < templates.length; i++) {
|
|
459
466
|
const node = templates[i];
|
|
460
467
|
const key = node.getAttribute("data-hk");
|
|
461
|
-
if (!root || key.startsWith(root)) sharedConfig.registry.set(key, node);
|
|
468
|
+
if ((!root || key.startsWith(root)) && !sharedConfig.registry.has(key)) sharedConfig.registry.set(key, node);
|
|
462
469
|
}
|
|
463
470
|
}
|
|
464
471
|
function getHydrationKey() {
|
package/web/dist/web.cjs
CHANGED
|
@@ -165,8 +165,10 @@ function classList(node, value, prev = {}) {
|
|
|
165
165
|
}
|
|
166
166
|
function style(node, value, prev = {}) {
|
|
167
167
|
const nodeStyle = node.style;
|
|
168
|
-
|
|
169
|
-
typeof
|
|
168
|
+
const prevString = typeof prev === "string";
|
|
169
|
+
if (value == null && prevString || typeof value === "string") return nodeStyle.cssText = value;
|
|
170
|
+
prevString && (nodeStyle.cssText = undefined, prev = {});
|
|
171
|
+
value || (value = {});
|
|
170
172
|
let v, s;
|
|
171
173
|
for (s in prev) {
|
|
172
174
|
value[s] == null && nodeStyle.removeProperty(s);
|
|
@@ -204,11 +206,12 @@ function insert(parent, accessor, marker, initial) {
|
|
|
204
206
|
if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
|
|
205
207
|
solidJs.createRenderEffect(current => insertExpression(parent, accessor(), current, marker), initial);
|
|
206
208
|
}
|
|
207
|
-
function assign(node, props, isSVG, skipChildren, prevProps = {}) {
|
|
209
|
+
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
210
|
+
props || (props = {});
|
|
208
211
|
for (const prop in prevProps) {
|
|
209
212
|
if (!(prop in props)) {
|
|
210
213
|
if (prop === "children") continue;
|
|
211
|
-
assignProp(node, prop, null, prevProps[prop], isSVG);
|
|
214
|
+
assignProp(node, prop, null, prevProps[prop], isSVG, skipRef);
|
|
212
215
|
}
|
|
213
216
|
}
|
|
214
217
|
for (const prop in props) {
|
|
@@ -217,7 +220,7 @@ function assign(node, props, isSVG, skipChildren, prevProps = {}) {
|
|
|
217
220
|
continue;
|
|
218
221
|
}
|
|
219
222
|
const value = props[prop];
|
|
220
|
-
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG);
|
|
223
|
+
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef);
|
|
221
224
|
}
|
|
222
225
|
}
|
|
223
226
|
function hydrate$1(code, element, options = {}) {
|
|
@@ -292,13 +295,15 @@ function toggleClassKey(node, key, value) {
|
|
|
292
295
|
const classNames = key.trim().split(/\s+/);
|
|
293
296
|
for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
|
|
294
297
|
}
|
|
295
|
-
function assignProp(node, prop, value, prev, isSVG) {
|
|
298
|
+
function assignProp(node, prop, value, prev, isSVG, skipRef) {
|
|
296
299
|
let isCE, isProp, isChildProp;
|
|
297
300
|
if (prop === "style") return style(node, value, prev);
|
|
298
301
|
if (prop === "classList") return classList(node, value, prev);
|
|
299
302
|
if (value === prev) return prev;
|
|
300
303
|
if (prop === "ref") {
|
|
301
|
-
|
|
304
|
+
if (!skipRef) {
|
|
305
|
+
value(node);
|
|
306
|
+
}
|
|
302
307
|
} else if (prop.slice(0, 3) === "on:") {
|
|
303
308
|
node.addEventListener(prop.slice(3), value);
|
|
304
309
|
} else if (prop.slice(0, 10) === "oncapture:") {
|
|
@@ -342,10 +347,12 @@ function eventHandler(e) {
|
|
|
342
347
|
}
|
|
343
348
|
}
|
|
344
349
|
function spreadExpression(node, props, prevProps = {}, isSVG, skipChildren) {
|
|
350
|
+
props || (props = {});
|
|
345
351
|
if (!skipChildren && "children" in props) {
|
|
346
352
|
solidJs.createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
347
353
|
}
|
|
348
|
-
|
|
354
|
+
props.ref && props.ref(node);
|
|
355
|
+
solidJs.createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
349
356
|
return prevProps;
|
|
350
357
|
}
|
|
351
358
|
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
@@ -460,7 +467,7 @@ function gatherHydratable(element, root) {
|
|
|
460
467
|
for (let i = 0; i < templates.length; i++) {
|
|
461
468
|
const node = templates[i];
|
|
462
469
|
const key = node.getAttribute("data-hk");
|
|
463
|
-
if (!root || key.startsWith(root)) solidJs.sharedConfig.registry.set(key, node);
|
|
470
|
+
if ((!root || key.startsWith(root)) && !solidJs.sharedConfig.registry.has(key)) solidJs.sharedConfig.registry.set(key, node);
|
|
464
471
|
}
|
|
465
472
|
}
|
|
466
473
|
function getHydrationKey() {
|
package/web/dist/web.js
CHANGED
|
@@ -162,8 +162,10 @@ function classList(node, value, prev = {}) {
|
|
|
162
162
|
}
|
|
163
163
|
function style(node, value, prev = {}) {
|
|
164
164
|
const nodeStyle = node.style;
|
|
165
|
-
|
|
166
|
-
typeof
|
|
165
|
+
const prevString = typeof prev === "string";
|
|
166
|
+
if (value == null && prevString || typeof value === "string") return nodeStyle.cssText = value;
|
|
167
|
+
prevString && (nodeStyle.cssText = undefined, prev = {});
|
|
168
|
+
value || (value = {});
|
|
167
169
|
let v, s;
|
|
168
170
|
for (s in prev) {
|
|
169
171
|
value[s] == null && nodeStyle.removeProperty(s);
|
|
@@ -201,11 +203,12 @@ function insert(parent, accessor, marker, initial) {
|
|
|
201
203
|
if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
|
|
202
204
|
createRenderEffect(current => insertExpression(parent, accessor(), current, marker), initial);
|
|
203
205
|
}
|
|
204
|
-
function assign(node, props, isSVG, skipChildren, prevProps = {}) {
|
|
206
|
+
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
207
|
+
props || (props = {});
|
|
205
208
|
for (const prop in prevProps) {
|
|
206
209
|
if (!(prop in props)) {
|
|
207
210
|
if (prop === "children") continue;
|
|
208
|
-
assignProp(node, prop, null, prevProps[prop], isSVG);
|
|
211
|
+
assignProp(node, prop, null, prevProps[prop], isSVG, skipRef);
|
|
209
212
|
}
|
|
210
213
|
}
|
|
211
214
|
for (const prop in props) {
|
|
@@ -214,7 +217,7 @@ function assign(node, props, isSVG, skipChildren, prevProps = {}) {
|
|
|
214
217
|
continue;
|
|
215
218
|
}
|
|
216
219
|
const value = props[prop];
|
|
217
|
-
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG);
|
|
220
|
+
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef);
|
|
218
221
|
}
|
|
219
222
|
}
|
|
220
223
|
function hydrate$1(code, element, options = {}) {
|
|
@@ -289,13 +292,15 @@ function toggleClassKey(node, key, value) {
|
|
|
289
292
|
const classNames = key.trim().split(/\s+/);
|
|
290
293
|
for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
|
|
291
294
|
}
|
|
292
|
-
function assignProp(node, prop, value, prev, isSVG) {
|
|
295
|
+
function assignProp(node, prop, value, prev, isSVG, skipRef) {
|
|
293
296
|
let isCE, isProp, isChildProp;
|
|
294
297
|
if (prop === "style") return style(node, value, prev);
|
|
295
298
|
if (prop === "classList") return classList(node, value, prev);
|
|
296
299
|
if (value === prev) return prev;
|
|
297
300
|
if (prop === "ref") {
|
|
298
|
-
|
|
301
|
+
if (!skipRef) {
|
|
302
|
+
value(node);
|
|
303
|
+
}
|
|
299
304
|
} else if (prop.slice(0, 3) === "on:") {
|
|
300
305
|
node.addEventListener(prop.slice(3), value);
|
|
301
306
|
} else if (prop.slice(0, 10) === "oncapture:") {
|
|
@@ -339,10 +344,12 @@ function eventHandler(e) {
|
|
|
339
344
|
}
|
|
340
345
|
}
|
|
341
346
|
function spreadExpression(node, props, prevProps = {}, isSVG, skipChildren) {
|
|
347
|
+
props || (props = {});
|
|
342
348
|
if (!skipChildren && "children" in props) {
|
|
343
349
|
createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
344
350
|
}
|
|
345
|
-
|
|
351
|
+
props.ref && props.ref(node);
|
|
352
|
+
createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
346
353
|
return prevProps;
|
|
347
354
|
}
|
|
348
355
|
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
@@ -457,7 +464,7 @@ function gatherHydratable(element, root) {
|
|
|
457
464
|
for (let i = 0; i < templates.length; i++) {
|
|
458
465
|
const node = templates[i];
|
|
459
466
|
const key = node.getAttribute("data-hk");
|
|
460
|
-
if (!root || key.startsWith(root)) sharedConfig.registry.set(key, node);
|
|
467
|
+
if ((!root || key.startsWith(root)) && !sharedConfig.registry.has(key)) sharedConfig.registry.set(key, node);
|
|
461
468
|
}
|
|
462
469
|
}
|
|
463
470
|
function getHydrationKey() {
|