solid-js 1.3.9 → 1.3.10
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 +8 -6
- package/dist/dev.js +8 -6
- package/dist/server.cjs +3 -2
- package/dist/server.js +3 -2
- package/dist/solid.cjs +8 -6
- package/dist/solid.js +8 -6
- package/package.json +2 -2
package/dist/dev.cjs
CHANGED
|
@@ -587,7 +587,8 @@ function createContext(defaultValue) {
|
|
|
587
587
|
};
|
|
588
588
|
}
|
|
589
589
|
function useContext(context) {
|
|
590
|
-
|
|
590
|
+
let ctx;
|
|
591
|
+
return (ctx = lookup(Owner, context.id)) !== undefined ? ctx : context.defaultValue;
|
|
591
592
|
}
|
|
592
593
|
function children(fn) {
|
|
593
594
|
const children = createMemo(fn);
|
|
@@ -668,8 +669,10 @@ function writeSignal(node, value, isComp) {
|
|
|
668
669
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
669
670
|
const o = node.observers[i];
|
|
670
671
|
if (TransitionRunning && Transition.disposed.has(o)) continue;
|
|
671
|
-
if (o.
|
|
672
|
-
|
|
672
|
+
if (TransitionRunning && !o.tState || !TransitionRunning && !o.state) {
|
|
673
|
+
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
674
|
+
if (o.observers) markUpstream(o);
|
|
675
|
+
}
|
|
673
676
|
if (TransitionRunning) o.tState = STALE;else o.state = STALE;
|
|
674
677
|
}
|
|
675
678
|
if (Updates.length > 10e5) {
|
|
@@ -760,8 +763,7 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
760
763
|
}
|
|
761
764
|
function runTop(node) {
|
|
762
765
|
const runningTransition = Transition && Transition.running;
|
|
763
|
-
if (!runningTransition && node.state !== STALE
|
|
764
|
-
if (runningTransition && node.tState !== STALE) return node.tState = 0;
|
|
766
|
+
if (!runningTransition && node.state !== STALE || runningTransition && node.tState !== STALE) return lookDownstream(node);
|
|
765
767
|
if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
|
|
766
768
|
const ancestors = [node];
|
|
767
769
|
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
@@ -954,7 +956,7 @@ function handleError(err) {
|
|
|
954
956
|
fns.forEach(f => f(err));
|
|
955
957
|
}
|
|
956
958
|
function lookup(owner, key) {
|
|
957
|
-
return owner
|
|
959
|
+
return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;
|
|
958
960
|
}
|
|
959
961
|
function resolveChildren(children) {
|
|
960
962
|
if (typeof children === "function" && !children.length) return resolveChildren(children());
|
package/dist/dev.js
CHANGED
|
@@ -583,7 +583,8 @@ function createContext(defaultValue) {
|
|
|
583
583
|
};
|
|
584
584
|
}
|
|
585
585
|
function useContext(context) {
|
|
586
|
-
|
|
586
|
+
let ctx;
|
|
587
|
+
return (ctx = lookup(Owner, context.id)) !== undefined ? ctx : context.defaultValue;
|
|
587
588
|
}
|
|
588
589
|
function children(fn) {
|
|
589
590
|
const children = createMemo(fn);
|
|
@@ -664,8 +665,10 @@ function writeSignal(node, value, isComp) {
|
|
|
664
665
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
665
666
|
const o = node.observers[i];
|
|
666
667
|
if (TransitionRunning && Transition.disposed.has(o)) continue;
|
|
667
|
-
if (o.
|
|
668
|
-
|
|
668
|
+
if (TransitionRunning && !o.tState || !TransitionRunning && !o.state) {
|
|
669
|
+
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
670
|
+
if (o.observers) markUpstream(o);
|
|
671
|
+
}
|
|
669
672
|
if (TransitionRunning) o.tState = STALE;else o.state = STALE;
|
|
670
673
|
}
|
|
671
674
|
if (Updates.length > 10e5) {
|
|
@@ -756,8 +759,7 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
756
759
|
}
|
|
757
760
|
function runTop(node) {
|
|
758
761
|
const runningTransition = Transition && Transition.running;
|
|
759
|
-
if (!runningTransition && node.state !== STALE
|
|
760
|
-
if (runningTransition && node.tState !== STALE) return node.tState = 0;
|
|
762
|
+
if (!runningTransition && node.state !== STALE || runningTransition && node.tState !== STALE) return lookDownstream(node);
|
|
761
763
|
if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
|
|
762
764
|
const ancestors = [node];
|
|
763
765
|
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
@@ -950,7 +952,7 @@ function handleError(err) {
|
|
|
950
952
|
fns.forEach(f => f(err));
|
|
951
953
|
}
|
|
952
954
|
function lookup(owner, key) {
|
|
953
|
-
return owner
|
|
955
|
+
return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;
|
|
954
956
|
}
|
|
955
957
|
function resolveChildren(children) {
|
|
956
958
|
if (typeof children === "function" && !children.length) return resolveChildren(children());
|
package/dist/server.cjs
CHANGED
|
@@ -118,7 +118,8 @@ function createContext(defaultValue) {
|
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
function useContext(context) {
|
|
121
|
-
|
|
121
|
+
let ctx;
|
|
122
|
+
return (ctx = lookup(Owner, context.id)) !== undefined ? ctx : context.defaultValue;
|
|
122
123
|
}
|
|
123
124
|
function getOwner() {
|
|
124
125
|
return Owner;
|
|
@@ -136,7 +137,7 @@ function runWithOwner(o, fn) {
|
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
139
|
function lookup(owner, key) {
|
|
139
|
-
return owner
|
|
140
|
+
return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;
|
|
140
141
|
}
|
|
141
142
|
function resolveChildren(children) {
|
|
142
143
|
if (typeof children === "function" && !children.length) return resolveChildren(children());
|
package/dist/server.js
CHANGED
|
@@ -114,7 +114,8 @@ function createContext(defaultValue) {
|
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
function useContext(context) {
|
|
117
|
-
|
|
117
|
+
let ctx;
|
|
118
|
+
return (ctx = lookup(Owner, context.id)) !== undefined ? ctx : context.defaultValue;
|
|
118
119
|
}
|
|
119
120
|
function getOwner() {
|
|
120
121
|
return Owner;
|
|
@@ -132,7 +133,7 @@ function runWithOwner(o, fn) {
|
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
135
|
function lookup(owner, key) {
|
|
135
|
-
return owner
|
|
136
|
+
return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;
|
|
136
137
|
}
|
|
137
138
|
function resolveChildren(children) {
|
|
138
139
|
if (typeof children === "function" && !children.length) return resolveChildren(children());
|
package/dist/solid.cjs
CHANGED
|
@@ -531,7 +531,8 @@ function createContext(defaultValue) {
|
|
|
531
531
|
};
|
|
532
532
|
}
|
|
533
533
|
function useContext(context) {
|
|
534
|
-
|
|
534
|
+
let ctx;
|
|
535
|
+
return (ctx = lookup(Owner, context.id)) !== undefined ? ctx : context.defaultValue;
|
|
535
536
|
}
|
|
536
537
|
function children(fn) {
|
|
537
538
|
const children = createMemo(fn);
|
|
@@ -612,8 +613,10 @@ function writeSignal(node, value, isComp) {
|
|
|
612
613
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
613
614
|
const o = node.observers[i];
|
|
614
615
|
if (TransitionRunning && Transition.disposed.has(o)) continue;
|
|
615
|
-
if (o.
|
|
616
|
-
|
|
616
|
+
if (TransitionRunning && !o.tState || !TransitionRunning && !o.state) {
|
|
617
|
+
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
618
|
+
if (o.observers) markUpstream(o);
|
|
619
|
+
}
|
|
617
620
|
if (TransitionRunning) o.tState = STALE;else o.state = STALE;
|
|
618
621
|
}
|
|
619
622
|
if (Updates.length > 10e5) {
|
|
@@ -703,8 +706,7 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
703
706
|
}
|
|
704
707
|
function runTop(node) {
|
|
705
708
|
const runningTransition = Transition && Transition.running;
|
|
706
|
-
if (!runningTransition && node.state !== STALE
|
|
707
|
-
if (runningTransition && node.tState !== STALE) return node.tState = 0;
|
|
709
|
+
if (!runningTransition && node.state !== STALE || runningTransition && node.tState !== STALE) return lookDownstream(node);
|
|
708
710
|
if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
|
|
709
711
|
const ancestors = [node];
|
|
710
712
|
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
@@ -896,7 +898,7 @@ function handleError(err) {
|
|
|
896
898
|
fns.forEach(f => f(err));
|
|
897
899
|
}
|
|
898
900
|
function lookup(owner, key) {
|
|
899
|
-
return owner
|
|
901
|
+
return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;
|
|
900
902
|
}
|
|
901
903
|
function resolveChildren(children) {
|
|
902
904
|
if (typeof children === "function" && !children.length) return resolveChildren(children());
|
package/dist/solid.js
CHANGED
|
@@ -527,7 +527,8 @@ function createContext(defaultValue) {
|
|
|
527
527
|
};
|
|
528
528
|
}
|
|
529
529
|
function useContext(context) {
|
|
530
|
-
|
|
530
|
+
let ctx;
|
|
531
|
+
return (ctx = lookup(Owner, context.id)) !== undefined ? ctx : context.defaultValue;
|
|
531
532
|
}
|
|
532
533
|
function children(fn) {
|
|
533
534
|
const children = createMemo(fn);
|
|
@@ -608,8 +609,10 @@ function writeSignal(node, value, isComp) {
|
|
|
608
609
|
for (let i = 0; i < node.observers.length; i += 1) {
|
|
609
610
|
const o = node.observers[i];
|
|
610
611
|
if (TransitionRunning && Transition.disposed.has(o)) continue;
|
|
611
|
-
if (o.
|
|
612
|
-
|
|
612
|
+
if (TransitionRunning && !o.tState || !TransitionRunning && !o.state) {
|
|
613
|
+
if (o.pure) Updates.push(o);else Effects.push(o);
|
|
614
|
+
if (o.observers) markUpstream(o);
|
|
615
|
+
}
|
|
613
616
|
if (TransitionRunning) o.tState = STALE;else o.state = STALE;
|
|
614
617
|
}
|
|
615
618
|
if (Updates.length > 10e5) {
|
|
@@ -699,8 +702,7 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
699
702
|
}
|
|
700
703
|
function runTop(node) {
|
|
701
704
|
const runningTransition = Transition && Transition.running;
|
|
702
|
-
if (!runningTransition && node.state !== STALE
|
|
703
|
-
if (runningTransition && node.tState !== STALE) return node.tState = 0;
|
|
705
|
+
if (!runningTransition && node.state !== STALE || runningTransition && node.tState !== STALE) return lookDownstream(node);
|
|
704
706
|
if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
|
|
705
707
|
const ancestors = [node];
|
|
706
708
|
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
@@ -892,7 +894,7 @@ function handleError(err) {
|
|
|
892
894
|
fns.forEach(f => f(err));
|
|
893
895
|
}
|
|
894
896
|
function lookup(owner, key) {
|
|
895
|
-
return owner
|
|
897
|
+
return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;
|
|
896
898
|
}
|
|
897
899
|
function resolveChildren(children) {
|
|
898
900
|
if (typeof children === "function" && !children.length) return resolveChildren(children());
|
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.10",
|
|
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": "95969d0b67dbad306f7b18736d88356d5e678532"
|
|
148
148
|
}
|