solid-js 1.2.0 → 1.2.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/dev.cjs +11 -9
- package/dist/dev.js +11 -9
- package/dist/solid.cjs +11 -9
- package/dist/solid.js +11 -9
- package/package.json +2 -2
- package/types/jsx.d.ts +3 -1
package/dist/dev.cjs
CHANGED
|
@@ -553,10 +553,11 @@ function getSuspenseContext() {
|
|
|
553
553
|
return SuspenseContext || (SuspenseContext = createContext({}));
|
|
554
554
|
}
|
|
555
555
|
function readSignal() {
|
|
556
|
-
|
|
556
|
+
const runningTransition = Transition && Transition.running;
|
|
557
|
+
if (this.sources && (!runningTransition && this.state || runningTransition && this.tState)) {
|
|
557
558
|
const updates = Updates;
|
|
558
559
|
Updates = null;
|
|
559
|
-
this.state === STALE ||
|
|
560
|
+
!runningTransition && this.state === STALE || runningTransition && this.tState === STALE ? updateComputation(this) : lookDownstream(this);
|
|
560
561
|
Updates = updates;
|
|
561
562
|
}
|
|
562
563
|
if (Listener) {
|
|
@@ -576,7 +577,7 @@ function readSignal() {
|
|
|
576
577
|
this.observerSlots.push(Listener.sources.length - 1);
|
|
577
578
|
}
|
|
578
579
|
}
|
|
579
|
-
if (
|
|
580
|
+
if (runningTransition && Transition.sources.has(this)) return this.tValue;
|
|
580
581
|
return this.value;
|
|
581
582
|
}
|
|
582
583
|
function writeSignal(node, value, isComp) {
|
|
@@ -624,7 +625,7 @@ function updateComputation(node) {
|
|
|
624
625
|
listener = Listener,
|
|
625
626
|
time = ExecCount;
|
|
626
627
|
Listener = Owner = node;
|
|
627
|
-
runComputation(node, node.value, time);
|
|
628
|
+
runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);
|
|
628
629
|
if (Transition && !Transition.running && Transition.sources.has(node)) {
|
|
629
630
|
queueMicrotask(() => {
|
|
630
631
|
runUpdates(() => {
|
|
@@ -689,7 +690,7 @@ function runTop(node) {
|
|
|
689
690
|
const ancestors = [node];
|
|
690
691
|
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
691
692
|
if (runningTransition && Transition.disposed.has(node)) return;
|
|
692
|
-
if (node.state || runningTransition && node.tState) ancestors.push(node);
|
|
693
|
+
if (!runningTransition && node.state || runningTransition && node.tState) ancestors.push(node);
|
|
693
694
|
}
|
|
694
695
|
for (let i = ancestors.length - 1; i >= 0; i--) {
|
|
695
696
|
node = ancestors[i];
|
|
@@ -700,9 +701,9 @@ function runTop(node) {
|
|
|
700
701
|
if (Transition.disposed.has(top)) return;
|
|
701
702
|
}
|
|
702
703
|
}
|
|
703
|
-
if (node.state === STALE || runningTransition && node.tState === STALE) {
|
|
704
|
+
if (!runningTransition && node.state === STALE || runningTransition && node.tState === STALE) {
|
|
704
705
|
updateComputation(node);
|
|
705
|
-
} else if (node.state === PENDING || runningTransition && node.tState === PENDING) {
|
|
706
|
+
} else if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) {
|
|
706
707
|
const updates = Updates;
|
|
707
708
|
Updates = null;
|
|
708
709
|
lookDownstream(node);
|
|
@@ -806,10 +807,11 @@ function runUserEffects(queue) {
|
|
|
806
807
|
}
|
|
807
808
|
function lookDownstream(node) {
|
|
808
809
|
node.state = 0;
|
|
810
|
+
const runningTransition = Transition && Transition.running;
|
|
809
811
|
for (let i = 0; i < node.sources.length; i += 1) {
|
|
810
812
|
const source = node.sources[i];
|
|
811
813
|
if (source.sources) {
|
|
812
|
-
if (source.state === STALE ||
|
|
814
|
+
if (!runningTransition && source.state === STALE || runningTransition && source.tState === STALE) runTop(source);else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING) lookDownstream(source);
|
|
813
815
|
}
|
|
814
816
|
}
|
|
815
817
|
}
|
|
@@ -817,7 +819,7 @@ function markUpstream(node) {
|
|
|
817
819
|
const runningTransition = Transition && Transition.running;
|
|
818
820
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
819
821
|
const o = node.observers[i];
|
|
820
|
-
if (!o.state || runningTransition && !o.tState) {
|
|
822
|
+
if (!runningTransition && !o.state || runningTransition && !o.tState) {
|
|
821
823
|
if (runningTransition) o.tState = PENDING;else o.state = PENDING;
|
|
822
824
|
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
823
825
|
o.observers && markUpstream(o);
|
package/dist/dev.js
CHANGED
|
@@ -549,10 +549,11 @@ function getSuspenseContext() {
|
|
|
549
549
|
return SuspenseContext || (SuspenseContext = createContext({}));
|
|
550
550
|
}
|
|
551
551
|
function readSignal() {
|
|
552
|
-
|
|
552
|
+
const runningTransition = Transition && Transition.running;
|
|
553
|
+
if (this.sources && (!runningTransition && this.state || runningTransition && this.tState)) {
|
|
553
554
|
const updates = Updates;
|
|
554
555
|
Updates = null;
|
|
555
|
-
this.state === STALE ||
|
|
556
|
+
!runningTransition && this.state === STALE || runningTransition && this.tState === STALE ? updateComputation(this) : lookDownstream(this);
|
|
556
557
|
Updates = updates;
|
|
557
558
|
}
|
|
558
559
|
if (Listener) {
|
|
@@ -572,7 +573,7 @@ function readSignal() {
|
|
|
572
573
|
this.observerSlots.push(Listener.sources.length - 1);
|
|
573
574
|
}
|
|
574
575
|
}
|
|
575
|
-
if (
|
|
576
|
+
if (runningTransition && Transition.sources.has(this)) return this.tValue;
|
|
576
577
|
return this.value;
|
|
577
578
|
}
|
|
578
579
|
function writeSignal(node, value, isComp) {
|
|
@@ -620,7 +621,7 @@ function updateComputation(node) {
|
|
|
620
621
|
listener = Listener,
|
|
621
622
|
time = ExecCount;
|
|
622
623
|
Listener = Owner = node;
|
|
623
|
-
runComputation(node, node.value, time);
|
|
624
|
+
runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);
|
|
624
625
|
if (Transition && !Transition.running && Transition.sources.has(node)) {
|
|
625
626
|
queueMicrotask(() => {
|
|
626
627
|
runUpdates(() => {
|
|
@@ -685,7 +686,7 @@ function runTop(node) {
|
|
|
685
686
|
const ancestors = [node];
|
|
686
687
|
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
687
688
|
if (runningTransition && Transition.disposed.has(node)) return;
|
|
688
|
-
if (node.state || runningTransition && node.tState) ancestors.push(node);
|
|
689
|
+
if (!runningTransition && node.state || runningTransition && node.tState) ancestors.push(node);
|
|
689
690
|
}
|
|
690
691
|
for (let i = ancestors.length - 1; i >= 0; i--) {
|
|
691
692
|
node = ancestors[i];
|
|
@@ -696,9 +697,9 @@ function runTop(node) {
|
|
|
696
697
|
if (Transition.disposed.has(top)) return;
|
|
697
698
|
}
|
|
698
699
|
}
|
|
699
|
-
if (node.state === STALE || runningTransition && node.tState === STALE) {
|
|
700
|
+
if (!runningTransition && node.state === STALE || runningTransition && node.tState === STALE) {
|
|
700
701
|
updateComputation(node);
|
|
701
|
-
} else if (node.state === PENDING || runningTransition && node.tState === PENDING) {
|
|
702
|
+
} else if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) {
|
|
702
703
|
const updates = Updates;
|
|
703
704
|
Updates = null;
|
|
704
705
|
lookDownstream(node);
|
|
@@ -802,10 +803,11 @@ function runUserEffects(queue) {
|
|
|
802
803
|
}
|
|
803
804
|
function lookDownstream(node) {
|
|
804
805
|
node.state = 0;
|
|
806
|
+
const runningTransition = Transition && Transition.running;
|
|
805
807
|
for (let i = 0; i < node.sources.length; i += 1) {
|
|
806
808
|
const source = node.sources[i];
|
|
807
809
|
if (source.sources) {
|
|
808
|
-
if (source.state === STALE ||
|
|
810
|
+
if (!runningTransition && source.state === STALE || runningTransition && source.tState === STALE) runTop(source);else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING) lookDownstream(source);
|
|
809
811
|
}
|
|
810
812
|
}
|
|
811
813
|
}
|
|
@@ -813,7 +815,7 @@ function markUpstream(node) {
|
|
|
813
815
|
const runningTransition = Transition && Transition.running;
|
|
814
816
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
815
817
|
const o = node.observers[i];
|
|
816
|
-
if (!o.state || runningTransition && !o.tState) {
|
|
818
|
+
if (!runningTransition && !o.state || runningTransition && !o.tState) {
|
|
817
819
|
if (runningTransition) o.tState = PENDING;else o.state = PENDING;
|
|
818
820
|
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
819
821
|
o.observers && markUpstream(o);
|
package/dist/solid.cjs
CHANGED
|
@@ -502,10 +502,11 @@ function getSuspenseContext() {
|
|
|
502
502
|
return SuspenseContext || (SuspenseContext = createContext({}));
|
|
503
503
|
}
|
|
504
504
|
function readSignal() {
|
|
505
|
-
|
|
505
|
+
const runningTransition = Transition && Transition.running;
|
|
506
|
+
if (this.sources && (!runningTransition && this.state || runningTransition && this.tState)) {
|
|
506
507
|
const updates = Updates;
|
|
507
508
|
Updates = null;
|
|
508
|
-
this.state === STALE ||
|
|
509
|
+
!runningTransition && this.state === STALE || runningTransition && this.tState === STALE ? updateComputation(this) : lookDownstream(this);
|
|
509
510
|
Updates = updates;
|
|
510
511
|
}
|
|
511
512
|
if (Listener) {
|
|
@@ -525,7 +526,7 @@ function readSignal() {
|
|
|
525
526
|
this.observerSlots.push(Listener.sources.length - 1);
|
|
526
527
|
}
|
|
527
528
|
}
|
|
528
|
-
if (
|
|
529
|
+
if (runningTransition && Transition.sources.has(this)) return this.tValue;
|
|
529
530
|
return this.value;
|
|
530
531
|
}
|
|
531
532
|
function writeSignal(node, value, isComp) {
|
|
@@ -573,7 +574,7 @@ function updateComputation(node) {
|
|
|
573
574
|
listener = Listener,
|
|
574
575
|
time = ExecCount;
|
|
575
576
|
Listener = Owner = node;
|
|
576
|
-
runComputation(node, node.value, time);
|
|
577
|
+
runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);
|
|
577
578
|
if (Transition && !Transition.running && Transition.sources.has(node)) {
|
|
578
579
|
queueMicrotask(() => {
|
|
579
580
|
runUpdates(() => {
|
|
@@ -637,7 +638,7 @@ function runTop(node) {
|
|
|
637
638
|
const ancestors = [node];
|
|
638
639
|
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
639
640
|
if (runningTransition && Transition.disposed.has(node)) return;
|
|
640
|
-
if (node.state || runningTransition && node.tState) ancestors.push(node);
|
|
641
|
+
if (!runningTransition && node.state || runningTransition && node.tState) ancestors.push(node);
|
|
641
642
|
}
|
|
642
643
|
for (let i = ancestors.length - 1; i >= 0; i--) {
|
|
643
644
|
node = ancestors[i];
|
|
@@ -648,9 +649,9 @@ function runTop(node) {
|
|
|
648
649
|
if (Transition.disposed.has(top)) return;
|
|
649
650
|
}
|
|
650
651
|
}
|
|
651
|
-
if (node.state === STALE || runningTransition && node.tState === STALE) {
|
|
652
|
+
if (!runningTransition && node.state === STALE || runningTransition && node.tState === STALE) {
|
|
652
653
|
updateComputation(node);
|
|
653
|
-
} else if (node.state === PENDING || runningTransition && node.tState === PENDING) {
|
|
654
|
+
} else if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) {
|
|
654
655
|
const updates = Updates;
|
|
655
656
|
Updates = null;
|
|
656
657
|
lookDownstream(node);
|
|
@@ -753,10 +754,11 @@ function runUserEffects(queue) {
|
|
|
753
754
|
}
|
|
754
755
|
function lookDownstream(node) {
|
|
755
756
|
node.state = 0;
|
|
757
|
+
const runningTransition = Transition && Transition.running;
|
|
756
758
|
for (let i = 0; i < node.sources.length; i += 1) {
|
|
757
759
|
const source = node.sources[i];
|
|
758
760
|
if (source.sources) {
|
|
759
|
-
if (source.state === STALE ||
|
|
761
|
+
if (!runningTransition && source.state === STALE || runningTransition && source.tState === STALE) runTop(source);else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING) lookDownstream(source);
|
|
760
762
|
}
|
|
761
763
|
}
|
|
762
764
|
}
|
|
@@ -764,7 +766,7 @@ function markUpstream(node) {
|
|
|
764
766
|
const runningTransition = Transition && Transition.running;
|
|
765
767
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
766
768
|
const o = node.observers[i];
|
|
767
|
-
if (!o.state || runningTransition && !o.tState) {
|
|
769
|
+
if (!runningTransition && !o.state || runningTransition && !o.tState) {
|
|
768
770
|
if (runningTransition) o.tState = PENDING;else o.state = PENDING;
|
|
769
771
|
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
770
772
|
o.observers && markUpstream(o);
|
package/dist/solid.js
CHANGED
|
@@ -498,10 +498,11 @@ function getSuspenseContext() {
|
|
|
498
498
|
return SuspenseContext || (SuspenseContext = createContext({}));
|
|
499
499
|
}
|
|
500
500
|
function readSignal() {
|
|
501
|
-
|
|
501
|
+
const runningTransition = Transition && Transition.running;
|
|
502
|
+
if (this.sources && (!runningTransition && this.state || runningTransition && this.tState)) {
|
|
502
503
|
const updates = Updates;
|
|
503
504
|
Updates = null;
|
|
504
|
-
this.state === STALE ||
|
|
505
|
+
!runningTransition && this.state === STALE || runningTransition && this.tState === STALE ? updateComputation(this) : lookDownstream(this);
|
|
505
506
|
Updates = updates;
|
|
506
507
|
}
|
|
507
508
|
if (Listener) {
|
|
@@ -521,7 +522,7 @@ function readSignal() {
|
|
|
521
522
|
this.observerSlots.push(Listener.sources.length - 1);
|
|
522
523
|
}
|
|
523
524
|
}
|
|
524
|
-
if (
|
|
525
|
+
if (runningTransition && Transition.sources.has(this)) return this.tValue;
|
|
525
526
|
return this.value;
|
|
526
527
|
}
|
|
527
528
|
function writeSignal(node, value, isComp) {
|
|
@@ -569,7 +570,7 @@ function updateComputation(node) {
|
|
|
569
570
|
listener = Listener,
|
|
570
571
|
time = ExecCount;
|
|
571
572
|
Listener = Owner = node;
|
|
572
|
-
runComputation(node, node.value, time);
|
|
573
|
+
runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);
|
|
573
574
|
if (Transition && !Transition.running && Transition.sources.has(node)) {
|
|
574
575
|
queueMicrotask(() => {
|
|
575
576
|
runUpdates(() => {
|
|
@@ -633,7 +634,7 @@ function runTop(node) {
|
|
|
633
634
|
const ancestors = [node];
|
|
634
635
|
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
635
636
|
if (runningTransition && Transition.disposed.has(node)) return;
|
|
636
|
-
if (node.state || runningTransition && node.tState) ancestors.push(node);
|
|
637
|
+
if (!runningTransition && node.state || runningTransition && node.tState) ancestors.push(node);
|
|
637
638
|
}
|
|
638
639
|
for (let i = ancestors.length - 1; i >= 0; i--) {
|
|
639
640
|
node = ancestors[i];
|
|
@@ -644,9 +645,9 @@ function runTop(node) {
|
|
|
644
645
|
if (Transition.disposed.has(top)) return;
|
|
645
646
|
}
|
|
646
647
|
}
|
|
647
|
-
if (node.state === STALE || runningTransition && node.tState === STALE) {
|
|
648
|
+
if (!runningTransition && node.state === STALE || runningTransition && node.tState === STALE) {
|
|
648
649
|
updateComputation(node);
|
|
649
|
-
} else if (node.state === PENDING || runningTransition && node.tState === PENDING) {
|
|
650
|
+
} else if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) {
|
|
650
651
|
const updates = Updates;
|
|
651
652
|
Updates = null;
|
|
652
653
|
lookDownstream(node);
|
|
@@ -749,10 +750,11 @@ function runUserEffects(queue) {
|
|
|
749
750
|
}
|
|
750
751
|
function lookDownstream(node) {
|
|
751
752
|
node.state = 0;
|
|
753
|
+
const runningTransition = Transition && Transition.running;
|
|
752
754
|
for (let i = 0; i < node.sources.length; i += 1) {
|
|
753
755
|
const source = node.sources[i];
|
|
754
756
|
if (source.sources) {
|
|
755
|
-
if (source.state === STALE ||
|
|
757
|
+
if (!runningTransition && source.state === STALE || runningTransition && source.tState === STALE) runTop(source);else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING) lookDownstream(source);
|
|
756
758
|
}
|
|
757
759
|
}
|
|
758
760
|
}
|
|
@@ -760,7 +762,7 @@ function markUpstream(node) {
|
|
|
760
762
|
const runningTransition = Transition && Transition.running;
|
|
761
763
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
762
764
|
const o = node.observers[i];
|
|
763
|
-
if (!o.state || runningTransition && !o.tState) {
|
|
765
|
+
if (!runningTransition && !o.state || runningTransition && !o.tState) {
|
|
764
766
|
if (runningTransition) o.tState = PENDING;else o.state = PENDING;
|
|
765
767
|
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
766
768
|
o.observers && markUpstream(o);
|
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.2.
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/solidjs/solid#readme",
|
|
@@ -132,5 +132,5 @@
|
|
|
132
132
|
"compiler",
|
|
133
133
|
"performance"
|
|
134
134
|
],
|
|
135
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "8bca8fa83837ac7406bc76813fedbc72bbe11a01"
|
|
136
136
|
}
|
package/types/jsx.d.ts
CHANGED
|
@@ -2874,7 +2874,8 @@ export namespace JSX {
|
|
|
2874
2874
|
extends FilterPrimitiveElementSVGAttributes<T>,
|
|
2875
2875
|
ExternalResourceSVGAttributes,
|
|
2876
2876
|
StylableSVGAttributes {
|
|
2877
|
-
preserveAspectRatio
|
|
2877
|
+
preserveAspectRatio?: SVGPreserveAspectRatio;
|
|
2878
|
+
href?: string;
|
|
2878
2879
|
}
|
|
2879
2880
|
interface FeMergeSVGAttributes<T>
|
|
2880
2881
|
extends FilterPrimitiveElementSVGAttributes<T>,
|
|
@@ -2977,6 +2978,7 @@ export namespace JSX {
|
|
|
2977
2978
|
width?: number | string;
|
|
2978
2979
|
height?: number | string;
|
|
2979
2980
|
preserveAspectRatio?: ImagePreserveAspectRatio;
|
|
2981
|
+
href?: string;
|
|
2980
2982
|
}
|
|
2981
2983
|
interface LineSVGAttributes<T>
|
|
2982
2984
|
extends GraphicsElementSVGAttributes<T>,
|