solid-js 1.9.11 → 1.9.13
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 +42 -25
- package/dist/dev.js +42 -25
- package/dist/server.cjs +5 -1
- package/dist/server.js +5 -1
- package/dist/solid.cjs +41 -20
- package/dist/solid.js +41 -20
- package/h/dist/h.js +1 -1
- package/h/jsx-runtime/types/jsx.d.ts +4 -5
- package/html/dist/html.cjs +3 -3
- package/html/dist/html.js +4 -4
- package/html/types/lit.d.ts +4 -7
- package/package.json +1 -1
- package/store/dist/dev.cjs +28 -1
- package/store/dist/dev.js +29 -2
- package/store/dist/server.cjs +7 -0
- package/store/dist/server.js +7 -0
- package/store/dist/store.cjs +26 -1
- package/store/dist/store.js +27 -2
- package/store/types/index.d.ts +1 -1
- package/store/types/server.d.ts +3 -3
- package/store/types/store.d.ts +2 -1
- package/types/jsx.d.ts +4 -5
- package/types/reactive/signal.d.ts +6 -2
- package/universal/dist/dev.js +1 -1
- package/universal/dist/universal.js +1 -1
- package/web/dist/dev.js +1 -1
- package/web/dist/server.cjs +6 -2
- package/web/dist/server.js +4 -4
- package/web/dist/web.js +1 -1
- package/web/types/client.d.ts +20 -6
- package/web/types/server.d.ts +14 -4
package/dist/dev.cjs
CHANGED
|
@@ -15,9 +15,12 @@ let taskIdCounter = 1,
|
|
|
15
15
|
const maxSigned31BitInt = 1073741823;
|
|
16
16
|
function setupScheduler() {
|
|
17
17
|
const channel = new MessageChannel(),
|
|
18
|
+
port1 = channel.port1,
|
|
18
19
|
port = channel.port2;
|
|
20
|
+
if (typeof port1.unref === "function") port1.unref();
|
|
21
|
+
if (typeof port.unref === "function") port.unref();
|
|
19
22
|
scheduleCallback = () => port.postMessage(null);
|
|
20
|
-
|
|
23
|
+
port1.onmessage = () => {
|
|
21
24
|
if (scheduledCallback !== null) {
|
|
22
25
|
const currentTime = performance.now();
|
|
23
26
|
deadline = currentTime + yieldInterval;
|
|
@@ -159,11 +162,7 @@ let runEffects = runQueue;
|
|
|
159
162
|
const STALE = 1;
|
|
160
163
|
const PENDING = 2;
|
|
161
164
|
const UNOWNED = {
|
|
162
|
-
|
|
163
|
-
cleanups: null,
|
|
164
|
-
context: null,
|
|
165
|
-
owner: null
|
|
166
|
-
};
|
|
165
|
+
};
|
|
167
166
|
const NO_INIT = {};
|
|
168
167
|
var Owner = null;
|
|
169
168
|
let Transition = null;
|
|
@@ -667,20 +666,23 @@ function readSignal() {
|
|
|
667
666
|
}
|
|
668
667
|
}
|
|
669
668
|
if (Listener) {
|
|
670
|
-
const
|
|
671
|
-
if (!Listener
|
|
672
|
-
|
|
673
|
-
Listener.
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
669
|
+
const observers = this.observers;
|
|
670
|
+
if (!observers || observers[observers.length - 1] !== Listener) {
|
|
671
|
+
const sSlot = observers ? observers.length : 0;
|
|
672
|
+
if (!Listener.sources) {
|
|
673
|
+
Listener.sources = [this];
|
|
674
|
+
Listener.sourceSlots = [sSlot];
|
|
675
|
+
} else {
|
|
676
|
+
Listener.sources.push(this);
|
|
677
|
+
Listener.sourceSlots.push(sSlot);
|
|
678
|
+
}
|
|
679
|
+
if (!observers) {
|
|
680
|
+
this.observers = [Listener];
|
|
681
|
+
this.observerSlots = [Listener.sources.length - 1];
|
|
682
|
+
} else {
|
|
683
|
+
observers.push(Listener);
|
|
684
|
+
this.observerSlots.push(Listener.sources.length - 1);
|
|
685
|
+
}
|
|
684
686
|
}
|
|
685
687
|
}
|
|
686
688
|
if (runningTransition && Transition.sources.has(this)) return this.tValue;
|
|
@@ -764,6 +766,7 @@ function runComputation(node, value, time) {
|
|
|
764
766
|
if (node.updatedAt != null && "observers" in node) {
|
|
765
767
|
writeSignal(node, nextValue, true);
|
|
766
768
|
} else if (Transition && Transition.running && node.pure) {
|
|
769
|
+
if (!Transition.sources.has(node)) node.value = nextValue;
|
|
767
770
|
Transition.sources.add(node);
|
|
768
771
|
node.tValue = nextValue;
|
|
769
772
|
} else node.value = nextValue;
|
|
@@ -797,16 +800,26 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
797
800
|
}
|
|
798
801
|
if (options && options.name) c.name = options.name;
|
|
799
802
|
if (ExternalSourceConfig && c.fn) {
|
|
803
|
+
const sourceFn = c.fn;
|
|
800
804
|
const [track, trigger] = createSignal(undefined, {
|
|
801
805
|
equals: false
|
|
802
806
|
});
|
|
803
|
-
const ordinary = ExternalSourceConfig.factory(
|
|
807
|
+
const ordinary = ExternalSourceConfig.factory(sourceFn, trigger);
|
|
804
808
|
onCleanup(() => ordinary.dispose());
|
|
805
|
-
|
|
806
|
-
const
|
|
809
|
+
let inTransition;
|
|
810
|
+
const triggerInTransition = () => startTransition(trigger).then(() => {
|
|
811
|
+
if (inTransition) {
|
|
812
|
+
inTransition.dispose();
|
|
813
|
+
inTransition = undefined;
|
|
814
|
+
}
|
|
815
|
+
});
|
|
807
816
|
c.fn = x => {
|
|
808
817
|
track();
|
|
809
|
-
|
|
818
|
+
if (Transition && Transition.running) {
|
|
819
|
+
if (!inTransition) inTransition = ExternalSourceConfig.factory(sourceFn, triggerInTransition);
|
|
820
|
+
return inTransition.track(x);
|
|
821
|
+
}
|
|
822
|
+
return ordinary.track(x);
|
|
810
823
|
};
|
|
811
824
|
}
|
|
812
825
|
DevHooks.afterCreateOwner && DevHooks.afterCreateOwner(c);
|
|
@@ -1042,7 +1055,11 @@ function resolveChildren(children) {
|
|
|
1042
1055
|
const results = [];
|
|
1043
1056
|
for (let i = 0; i < children.length; i++) {
|
|
1044
1057
|
const result = resolveChildren(children[i]);
|
|
1045
|
-
Array.isArray(result)
|
|
1058
|
+
if (Array.isArray(result)) {
|
|
1059
|
+
if (result.length < 32768) results.push.apply(results, result);else for (let j = 0; j < result.length; j++) results.push(result[j]);
|
|
1060
|
+
} else {
|
|
1061
|
+
results.push(result);
|
|
1062
|
+
}
|
|
1046
1063
|
}
|
|
1047
1064
|
return results;
|
|
1048
1065
|
}
|
package/dist/dev.js
CHANGED
|
@@ -13,9 +13,12 @@ let taskIdCounter = 1,
|
|
|
13
13
|
const maxSigned31BitInt = 1073741823;
|
|
14
14
|
function setupScheduler() {
|
|
15
15
|
const channel = new MessageChannel(),
|
|
16
|
+
port1 = channel.port1,
|
|
16
17
|
port = channel.port2;
|
|
18
|
+
if (typeof port1.unref === "function") port1.unref();
|
|
19
|
+
if (typeof port.unref === "function") port.unref();
|
|
17
20
|
scheduleCallback = () => port.postMessage(null);
|
|
18
|
-
|
|
21
|
+
port1.onmessage = () => {
|
|
19
22
|
if (scheduledCallback !== null) {
|
|
20
23
|
const currentTime = performance.now();
|
|
21
24
|
deadline = currentTime + yieldInterval;
|
|
@@ -157,11 +160,7 @@ let runEffects = runQueue;
|
|
|
157
160
|
const STALE = 1;
|
|
158
161
|
const PENDING = 2;
|
|
159
162
|
const UNOWNED = {
|
|
160
|
-
|
|
161
|
-
cleanups: null,
|
|
162
|
-
context: null,
|
|
163
|
-
owner: null
|
|
164
|
-
};
|
|
163
|
+
};
|
|
165
164
|
const NO_INIT = {};
|
|
166
165
|
var Owner = null;
|
|
167
166
|
let Transition = null;
|
|
@@ -665,20 +664,23 @@ function readSignal() {
|
|
|
665
664
|
}
|
|
666
665
|
}
|
|
667
666
|
if (Listener) {
|
|
668
|
-
const
|
|
669
|
-
if (!Listener
|
|
670
|
-
|
|
671
|
-
Listener.
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
667
|
+
const observers = this.observers;
|
|
668
|
+
if (!observers || observers[observers.length - 1] !== Listener) {
|
|
669
|
+
const sSlot = observers ? observers.length : 0;
|
|
670
|
+
if (!Listener.sources) {
|
|
671
|
+
Listener.sources = [this];
|
|
672
|
+
Listener.sourceSlots = [sSlot];
|
|
673
|
+
} else {
|
|
674
|
+
Listener.sources.push(this);
|
|
675
|
+
Listener.sourceSlots.push(sSlot);
|
|
676
|
+
}
|
|
677
|
+
if (!observers) {
|
|
678
|
+
this.observers = [Listener];
|
|
679
|
+
this.observerSlots = [Listener.sources.length - 1];
|
|
680
|
+
} else {
|
|
681
|
+
observers.push(Listener);
|
|
682
|
+
this.observerSlots.push(Listener.sources.length - 1);
|
|
683
|
+
}
|
|
682
684
|
}
|
|
683
685
|
}
|
|
684
686
|
if (runningTransition && Transition.sources.has(this)) return this.tValue;
|
|
@@ -762,6 +764,7 @@ function runComputation(node, value, time) {
|
|
|
762
764
|
if (node.updatedAt != null && "observers" in node) {
|
|
763
765
|
writeSignal(node, nextValue, true);
|
|
764
766
|
} else if (Transition && Transition.running && node.pure) {
|
|
767
|
+
if (!Transition.sources.has(node)) node.value = nextValue;
|
|
765
768
|
Transition.sources.add(node);
|
|
766
769
|
node.tValue = nextValue;
|
|
767
770
|
} else node.value = nextValue;
|
|
@@ -795,16 +798,26 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
795
798
|
}
|
|
796
799
|
if (options && options.name) c.name = options.name;
|
|
797
800
|
if (ExternalSourceConfig && c.fn) {
|
|
801
|
+
const sourceFn = c.fn;
|
|
798
802
|
const [track, trigger] = createSignal(undefined, {
|
|
799
803
|
equals: false
|
|
800
804
|
});
|
|
801
|
-
const ordinary = ExternalSourceConfig.factory(
|
|
805
|
+
const ordinary = ExternalSourceConfig.factory(sourceFn, trigger);
|
|
802
806
|
onCleanup(() => ordinary.dispose());
|
|
803
|
-
|
|
804
|
-
const
|
|
807
|
+
let inTransition;
|
|
808
|
+
const triggerInTransition = () => startTransition(trigger).then(() => {
|
|
809
|
+
if (inTransition) {
|
|
810
|
+
inTransition.dispose();
|
|
811
|
+
inTransition = undefined;
|
|
812
|
+
}
|
|
813
|
+
});
|
|
805
814
|
c.fn = x => {
|
|
806
815
|
track();
|
|
807
|
-
|
|
816
|
+
if (Transition && Transition.running) {
|
|
817
|
+
if (!inTransition) inTransition = ExternalSourceConfig.factory(sourceFn, triggerInTransition);
|
|
818
|
+
return inTransition.track(x);
|
|
819
|
+
}
|
|
820
|
+
return ordinary.track(x);
|
|
808
821
|
};
|
|
809
822
|
}
|
|
810
823
|
DevHooks.afterCreateOwner && DevHooks.afterCreateOwner(c);
|
|
@@ -1040,7 +1053,11 @@ function resolveChildren(children) {
|
|
|
1040
1053
|
const results = [];
|
|
1041
1054
|
for (let i = 0; i < children.length; i++) {
|
|
1042
1055
|
const result = resolveChildren(children[i]);
|
|
1043
|
-
Array.isArray(result)
|
|
1056
|
+
if (Array.isArray(result)) {
|
|
1057
|
+
if (result.length < 32768) results.push.apply(results, result);else for (let j = 0; j < result.length; j++) results.push(result[j]);
|
|
1058
|
+
} else {
|
|
1059
|
+
results.push(result);
|
|
1060
|
+
}
|
|
1044
1061
|
}
|
|
1045
1062
|
return results;
|
|
1046
1063
|
}
|
package/dist/server.cjs
CHANGED
|
@@ -192,7 +192,11 @@ function resolveChildren(children) {
|
|
|
192
192
|
const results = [];
|
|
193
193
|
for (let i = 0; i < children.length; i++) {
|
|
194
194
|
const result = resolveChildren(children[i]);
|
|
195
|
-
Array.isArray(result)
|
|
195
|
+
if (Array.isArray(result)) {
|
|
196
|
+
if (result.length < 32768) results.push.apply(results, result);else for (let j = 0; j < result.length; j++) results.push(result[j]);
|
|
197
|
+
} else {
|
|
198
|
+
results.push(result);
|
|
199
|
+
}
|
|
196
200
|
}
|
|
197
201
|
return results;
|
|
198
202
|
}
|
package/dist/server.js
CHANGED
|
@@ -190,7 +190,11 @@ function resolveChildren(children) {
|
|
|
190
190
|
const results = [];
|
|
191
191
|
for (let i = 0; i < children.length; i++) {
|
|
192
192
|
const result = resolveChildren(children[i]);
|
|
193
|
-
Array.isArray(result)
|
|
193
|
+
if (Array.isArray(result)) {
|
|
194
|
+
if (result.length < 32768) results.push.apply(results, result);else for (let j = 0; j < result.length; j++) results.push(result[j]);
|
|
195
|
+
} else {
|
|
196
|
+
results.push(result);
|
|
197
|
+
}
|
|
194
198
|
}
|
|
195
199
|
return results;
|
|
196
200
|
}
|
package/dist/solid.cjs
CHANGED
|
@@ -15,9 +15,12 @@ let taskIdCounter = 1,
|
|
|
15
15
|
const maxSigned31BitInt = 1073741823;
|
|
16
16
|
function setupScheduler() {
|
|
17
17
|
const channel = new MessageChannel(),
|
|
18
|
+
port1 = channel.port1,
|
|
18
19
|
port = channel.port2;
|
|
20
|
+
if (typeof port1.unref === "function") port1.unref();
|
|
21
|
+
if (typeof port.unref === "function") port.unref();
|
|
19
22
|
scheduleCallback = () => port.postMessage(null);
|
|
20
|
-
|
|
23
|
+
port1.onmessage = () => {
|
|
21
24
|
if (scheduledCallback !== null) {
|
|
22
25
|
const currentTime = performance.now();
|
|
23
26
|
deadline = currentTime + yieldInterval;
|
|
@@ -620,20 +623,23 @@ function readSignal() {
|
|
|
620
623
|
}
|
|
621
624
|
}
|
|
622
625
|
if (Listener) {
|
|
623
|
-
const
|
|
624
|
-
if (!Listener
|
|
625
|
-
|
|
626
|
-
Listener.
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
626
|
+
const observers = this.observers;
|
|
627
|
+
if (!observers || observers[observers.length - 1] !== Listener) {
|
|
628
|
+
const sSlot = observers ? observers.length : 0;
|
|
629
|
+
if (!Listener.sources) {
|
|
630
|
+
Listener.sources = [this];
|
|
631
|
+
Listener.sourceSlots = [sSlot];
|
|
632
|
+
} else {
|
|
633
|
+
Listener.sources.push(this);
|
|
634
|
+
Listener.sourceSlots.push(sSlot);
|
|
635
|
+
}
|
|
636
|
+
if (!observers) {
|
|
637
|
+
this.observers = [Listener];
|
|
638
|
+
this.observerSlots = [Listener.sources.length - 1];
|
|
639
|
+
} else {
|
|
640
|
+
observers.push(Listener);
|
|
641
|
+
this.observerSlots.push(Listener.sources.length - 1);
|
|
642
|
+
}
|
|
637
643
|
}
|
|
638
644
|
}
|
|
639
645
|
if (runningTransition && Transition.sources.has(this)) return this.tValue;
|
|
@@ -717,6 +723,7 @@ function runComputation(node, value, time) {
|
|
|
717
723
|
if (node.updatedAt != null && "observers" in node) {
|
|
718
724
|
writeSignal(node, nextValue, true);
|
|
719
725
|
} else if (Transition && Transition.running && node.pure) {
|
|
726
|
+
if (!Transition.sources.has(node)) node.value = nextValue;
|
|
720
727
|
Transition.sources.add(node);
|
|
721
728
|
node.tValue = nextValue;
|
|
722
729
|
} else node.value = nextValue;
|
|
@@ -749,16 +756,26 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
749
756
|
}
|
|
750
757
|
}
|
|
751
758
|
if (ExternalSourceConfig && c.fn) {
|
|
759
|
+
const sourceFn = c.fn;
|
|
752
760
|
const [track, trigger] = createSignal(undefined, {
|
|
753
761
|
equals: false
|
|
754
762
|
});
|
|
755
|
-
const ordinary = ExternalSourceConfig.factory(
|
|
763
|
+
const ordinary = ExternalSourceConfig.factory(sourceFn, trigger);
|
|
756
764
|
onCleanup(() => ordinary.dispose());
|
|
757
|
-
|
|
758
|
-
const
|
|
765
|
+
let inTransition;
|
|
766
|
+
const triggerInTransition = () => startTransition(trigger).then(() => {
|
|
767
|
+
if (inTransition) {
|
|
768
|
+
inTransition.dispose();
|
|
769
|
+
inTransition = undefined;
|
|
770
|
+
}
|
|
771
|
+
});
|
|
759
772
|
c.fn = x => {
|
|
760
773
|
track();
|
|
761
|
-
|
|
774
|
+
if (Transition && Transition.running) {
|
|
775
|
+
if (!inTransition) inTransition = ExternalSourceConfig.factory(sourceFn, triggerInTransition);
|
|
776
|
+
return inTransition.track(x);
|
|
777
|
+
}
|
|
778
|
+
return ordinary.track(x);
|
|
762
779
|
};
|
|
763
780
|
}
|
|
764
781
|
return c;
|
|
@@ -992,7 +1009,11 @@ function resolveChildren(children) {
|
|
|
992
1009
|
const results = [];
|
|
993
1010
|
for (let i = 0; i < children.length; i++) {
|
|
994
1011
|
const result = resolveChildren(children[i]);
|
|
995
|
-
Array.isArray(result)
|
|
1012
|
+
if (Array.isArray(result)) {
|
|
1013
|
+
if (result.length < 32768) results.push.apply(results, result);else for (let j = 0; j < result.length; j++) results.push(result[j]);
|
|
1014
|
+
} else {
|
|
1015
|
+
results.push(result);
|
|
1016
|
+
}
|
|
996
1017
|
}
|
|
997
1018
|
return results;
|
|
998
1019
|
}
|
package/dist/solid.js
CHANGED
|
@@ -13,9 +13,12 @@ let taskIdCounter = 1,
|
|
|
13
13
|
const maxSigned31BitInt = 1073741823;
|
|
14
14
|
function setupScheduler() {
|
|
15
15
|
const channel = new MessageChannel(),
|
|
16
|
+
port1 = channel.port1,
|
|
16
17
|
port = channel.port2;
|
|
18
|
+
if (typeof port1.unref === "function") port1.unref();
|
|
19
|
+
if (typeof port.unref === "function") port.unref();
|
|
17
20
|
scheduleCallback = () => port.postMessage(null);
|
|
18
|
-
|
|
21
|
+
port1.onmessage = () => {
|
|
19
22
|
if (scheduledCallback !== null) {
|
|
20
23
|
const currentTime = performance.now();
|
|
21
24
|
deadline = currentTime + yieldInterval;
|
|
@@ -618,20 +621,23 @@ function readSignal() {
|
|
|
618
621
|
}
|
|
619
622
|
}
|
|
620
623
|
if (Listener) {
|
|
621
|
-
const
|
|
622
|
-
if (!Listener
|
|
623
|
-
|
|
624
|
-
Listener.
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
624
|
+
const observers = this.observers;
|
|
625
|
+
if (!observers || observers[observers.length - 1] !== Listener) {
|
|
626
|
+
const sSlot = observers ? observers.length : 0;
|
|
627
|
+
if (!Listener.sources) {
|
|
628
|
+
Listener.sources = [this];
|
|
629
|
+
Listener.sourceSlots = [sSlot];
|
|
630
|
+
} else {
|
|
631
|
+
Listener.sources.push(this);
|
|
632
|
+
Listener.sourceSlots.push(sSlot);
|
|
633
|
+
}
|
|
634
|
+
if (!observers) {
|
|
635
|
+
this.observers = [Listener];
|
|
636
|
+
this.observerSlots = [Listener.sources.length - 1];
|
|
637
|
+
} else {
|
|
638
|
+
observers.push(Listener);
|
|
639
|
+
this.observerSlots.push(Listener.sources.length - 1);
|
|
640
|
+
}
|
|
635
641
|
}
|
|
636
642
|
}
|
|
637
643
|
if (runningTransition && Transition.sources.has(this)) return this.tValue;
|
|
@@ -715,6 +721,7 @@ function runComputation(node, value, time) {
|
|
|
715
721
|
if (node.updatedAt != null && "observers" in node) {
|
|
716
722
|
writeSignal(node, nextValue, true);
|
|
717
723
|
} else if (Transition && Transition.running && node.pure) {
|
|
724
|
+
if (!Transition.sources.has(node)) node.value = nextValue;
|
|
718
725
|
Transition.sources.add(node);
|
|
719
726
|
node.tValue = nextValue;
|
|
720
727
|
} else node.value = nextValue;
|
|
@@ -747,16 +754,26 @@ function createComputation(fn, init, pure, state = STALE, options) {
|
|
|
747
754
|
}
|
|
748
755
|
}
|
|
749
756
|
if (ExternalSourceConfig && c.fn) {
|
|
757
|
+
const sourceFn = c.fn;
|
|
750
758
|
const [track, trigger] = createSignal(undefined, {
|
|
751
759
|
equals: false
|
|
752
760
|
});
|
|
753
|
-
const ordinary = ExternalSourceConfig.factory(
|
|
761
|
+
const ordinary = ExternalSourceConfig.factory(sourceFn, trigger);
|
|
754
762
|
onCleanup(() => ordinary.dispose());
|
|
755
|
-
|
|
756
|
-
const
|
|
763
|
+
let inTransition;
|
|
764
|
+
const triggerInTransition = () => startTransition(trigger).then(() => {
|
|
765
|
+
if (inTransition) {
|
|
766
|
+
inTransition.dispose();
|
|
767
|
+
inTransition = undefined;
|
|
768
|
+
}
|
|
769
|
+
});
|
|
757
770
|
c.fn = x => {
|
|
758
771
|
track();
|
|
759
|
-
|
|
772
|
+
if (Transition && Transition.running) {
|
|
773
|
+
if (!inTransition) inTransition = ExternalSourceConfig.factory(sourceFn, triggerInTransition);
|
|
774
|
+
return inTransition.track(x);
|
|
775
|
+
}
|
|
776
|
+
return ordinary.track(x);
|
|
760
777
|
};
|
|
761
778
|
}
|
|
762
779
|
return c;
|
|
@@ -990,7 +1007,11 @@ function resolveChildren(children) {
|
|
|
990
1007
|
const results = [];
|
|
991
1008
|
for (let i = 0; i < children.length; i++) {
|
|
992
1009
|
const result = resolveChildren(children[i]);
|
|
993
|
-
Array.isArray(result)
|
|
1010
|
+
if (Array.isArray(result)) {
|
|
1011
|
+
if (result.length < 32768) results.push.apply(results, result);else for (let j = 0; j < result.length; j++) results.push(result[j]);
|
|
1012
|
+
} else {
|
|
1013
|
+
results.push(result);
|
|
1014
|
+
}
|
|
994
1015
|
}
|
|
995
1016
|
return results;
|
|
996
1017
|
}
|
package/h/dist/h.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SVGElements, dynamicProperty, createComponent, insert, assign, spread } from 'solid-js/web';
|
|
2
2
|
|
|
3
3
|
const $ELEMENT = Symbol("hyper-element");
|
|
4
4
|
function createHyperScript(r) {
|
|
@@ -140,14 +140,13 @@ export namespace JSX {
|
|
|
140
140
|
interface IntrinsicAttributes {
|
|
141
141
|
ref?: unknown | ((e: unknown) => void) | undefined;
|
|
142
142
|
}
|
|
143
|
+
export type ClassList = {
|
|
144
|
+
[k: string]: boolean | undefined;
|
|
145
|
+
};
|
|
143
146
|
interface CustomAttributes<T> {
|
|
144
147
|
ref?: T | ((el: T) => void) | undefined;
|
|
145
148
|
children?: FunctionMaybe<Element | undefined>;
|
|
146
|
-
classList?:
|
|
147
|
-
| {
|
|
148
|
-
[k: string]: boolean | undefined;
|
|
149
|
-
}
|
|
150
|
-
| undefined;
|
|
149
|
+
classList?: ClassList | undefined;
|
|
151
150
|
$ServerOnly?: boolean | undefined;
|
|
152
151
|
}
|
|
153
152
|
type Accessor<T> = () => T;
|
package/html/dist/html.cjs
CHANGED
|
@@ -64,7 +64,7 @@ function parseTag(tag) {
|
|
|
64
64
|
}
|
|
65
65
|
function pushTextNode(list, html, start) {
|
|
66
66
|
const end = html.indexOf('<', start);
|
|
67
|
-
const content = html.slice(start, end === -1 ?
|
|
67
|
+
const content = html.slice(start, end === -1 ? void 0 : end);
|
|
68
68
|
if (!/^\s*$/.test(content)) {
|
|
69
69
|
list.push({
|
|
70
70
|
type: 'text',
|
|
@@ -83,7 +83,7 @@ function pushCommentNode(list, tag) {
|
|
|
83
83
|
}
|
|
84
84
|
function parse(html) {
|
|
85
85
|
const result = [];
|
|
86
|
-
let current =
|
|
86
|
+
let current = void 0;
|
|
87
87
|
let level = -1;
|
|
88
88
|
const arr = [];
|
|
89
89
|
const byTag = {};
|
|
@@ -92,7 +92,7 @@ function parse(html) {
|
|
|
92
92
|
const isComment = tag.slice(0, 4) === '<!--';
|
|
93
93
|
const start = index + tag.length;
|
|
94
94
|
const nextChar = html.charAt(start);
|
|
95
|
-
let parent =
|
|
95
|
+
let parent = void 0;
|
|
96
96
|
if (isOpen && !isComment) {
|
|
97
97
|
level++;
|
|
98
98
|
current = parseTag(tag);
|
package/html/dist/html.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SVGNamespace, SVGElements, DelegatedEvents, ChildProperties, Properties, getPropAlias, Aliases, addEventListener, setAttributeNS, setAttribute, dynamicProperty, mergeProps, classList, delegateEvents, createComponent, spread, untrack, insert, style, effect } from 'solid-js/web';
|
|
2
2
|
|
|
3
3
|
const tagRE = /(?:<!--[\S\s]*?-->|<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>)/g;
|
|
4
4
|
const attrRE = /(?:\s(?<boolean>[^/\s><=]+?)(?=[\s/>]))|(?:(?<name>\S+?)(?:\s*=\s*(?:(['"])(?<quotedValue>[\s\S]*?)\3|(?<unquotedValue>[^\s>]+))))/g;
|
|
@@ -62,7 +62,7 @@ function parseTag(tag) {
|
|
|
62
62
|
}
|
|
63
63
|
function pushTextNode(list, html, start) {
|
|
64
64
|
const end = html.indexOf('<', start);
|
|
65
|
-
const content = html.slice(start, end === -1 ?
|
|
65
|
+
const content = html.slice(start, end === -1 ? void 0 : end);
|
|
66
66
|
if (!/^\s*$/.test(content)) {
|
|
67
67
|
list.push({
|
|
68
68
|
type: 'text',
|
|
@@ -81,7 +81,7 @@ function pushCommentNode(list, tag) {
|
|
|
81
81
|
}
|
|
82
82
|
function parse(html) {
|
|
83
83
|
const result = [];
|
|
84
|
-
let current =
|
|
84
|
+
let current = void 0;
|
|
85
85
|
let level = -1;
|
|
86
86
|
const arr = [];
|
|
87
87
|
const byTag = {};
|
|
@@ -90,7 +90,7 @@ function parse(html) {
|
|
|
90
90
|
const isComment = tag.slice(0, 4) === '<!--';
|
|
91
91
|
const start = index + tag.length;
|
|
92
92
|
const nextChar = html.charAt(start);
|
|
93
|
-
let parent =
|
|
93
|
+
let parent = void 0;
|
|
94
94
|
if (isOpen && !isComment) {
|
|
95
95
|
level++;
|
|
96
96
|
current = parseTag(tag);
|
package/html/types/lit.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node;
|
|
2
|
+
export type ClassList = {
|
|
3
|
+
[k: string]: boolean | undefined;
|
|
4
|
+
};
|
|
2
5
|
interface Runtime {
|
|
3
6
|
effect<T>(fn: (prev?: T) => T, init?: T): any;
|
|
4
7
|
untrack<T>(fn: () => T): T;
|
|
@@ -7,13 +10,7 @@ interface Runtime {
|
|
|
7
10
|
createComponent(Comp: (props: any) => any, props: any): any;
|
|
8
11
|
addEventListener(node: Element, name: string, handler: EventListener | EventListenerObject | (EventListenerObject & AddEventListenerOptions), delegate: boolean): void;
|
|
9
12
|
delegateEvents(eventNames: string[]): void;
|
|
10
|
-
classList(node: Element, value:
|
|
11
|
-
[k: string]: boolean;
|
|
12
|
-
}, prev?: {
|
|
13
|
-
[k: string]: boolean;
|
|
14
|
-
}): {
|
|
15
|
-
[k: string]: boolean;
|
|
16
|
-
};
|
|
13
|
+
classList(node: Element, value: ClassList, prev?: ClassList): ClassList;
|
|
17
14
|
style(node: Element, value: {
|
|
18
15
|
[k: string]: string;
|
|
19
16
|
}, prev?: {
|
package/package.json
CHANGED