solid-js 1.6.7 → 1.6.9
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 +140 -127
- package/dist/dev.js +140 -127
- package/dist/server.cjs +35 -40
- package/dist/server.js +35 -40
- package/dist/solid.cjs +126 -115
- package/dist/solid.js +126 -115
- package/h/dist/h.cjs +4 -4
- package/h/dist/h.js +4 -4
- package/h/types/hyperscript.d.ts +3 -3
- package/html/dist/html.cjs +34 -35
- package/html/dist/html.js +34 -35
- package/html/types/lit.d.ts +2 -2
- package/package.json +1 -1
- package/store/dist/dev.cjs +16 -16
- package/store/dist/dev.js +16 -16
- package/store/dist/server.cjs +3 -3
- package/store/dist/server.js +3 -3
- package/store/dist/store.cjs +16 -16
- package/store/dist/store.js +16 -16
- package/types/reactive/signal.d.ts +9 -8
- package/types/server/rendering.d.ts +1 -0
- package/universal/dist/dev.cjs +10 -10
- package/universal/dist/dev.js +10 -10
- package/universal/dist/universal.cjs +10 -10
- package/universal/dist/universal.js +10 -10
- package/web/dist/dev.cjs +29 -22
- package/web/dist/dev.js +29 -22
- package/web/dist/server.cjs +14 -20
- package/web/dist/server.js +14 -20
- package/web/dist/web.cjs +29 -22
- package/web/dist/web.js +29 -22
package/web/dist/web.cjs
CHANGED
|
@@ -31,12 +31,12 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
|
|
|
31
31
|
|
|
32
32
|
function reconcileArrays(parentNode, a, b) {
|
|
33
33
|
let bLength = b.length,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
aEnd = a.length,
|
|
35
|
+
bEnd = bLength,
|
|
36
|
+
aStart = 0,
|
|
37
|
+
bStart = 0,
|
|
38
|
+
after = a[aEnd - 1].nextSibling,
|
|
39
|
+
map = null;
|
|
40
40
|
while (aStart < aEnd || bStart < bEnd) {
|
|
41
41
|
if (a[aStart] === b[bStart]) {
|
|
42
42
|
aStart++;
|
|
@@ -70,8 +70,8 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
70
70
|
if (index != null) {
|
|
71
71
|
if (bStart < index && index < bEnd) {
|
|
72
72
|
let i = aStart,
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
sequence = 1,
|
|
74
|
+
t;
|
|
75
75
|
while (++i < aEnd && i < bEnd) {
|
|
76
76
|
if ((t = map.get(a[i])) == null || t !== index + sequence) break;
|
|
77
77
|
sequence++;
|
|
@@ -143,7 +143,7 @@ function addEventListener(node, name, handler, delegate) {
|
|
|
143
143
|
}
|
|
144
144
|
function classList(node, value, prev = {}) {
|
|
145
145
|
const classKeys = Object.keys(value || {}),
|
|
146
|
-
|
|
146
|
+
prevKeys = Object.keys(prev);
|
|
147
147
|
let i, len;
|
|
148
148
|
for (i = 0, len = prevKeys.length; i < len; i++) {
|
|
149
149
|
const key = prevKeys[i];
|
|
@@ -153,7 +153,7 @@ function classList(node, value, prev = {}) {
|
|
|
153
153
|
}
|
|
154
154
|
for (i = 0, len = classKeys.length; i < len; i++) {
|
|
155
155
|
const key = classKeys[i],
|
|
156
|
-
|
|
156
|
+
classValue = !!value[key];
|
|
157
157
|
if (!key || key === "undefined" || prev[key] === classValue || !classValue) continue;
|
|
158
158
|
toggleClassKey(node, key, true);
|
|
159
159
|
prev[key] = classValue;
|
|
@@ -258,8 +258,8 @@ function getNextMatch(el, nodeName) {
|
|
|
258
258
|
}
|
|
259
259
|
function getNextMarker(start) {
|
|
260
260
|
let end = start,
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
count = 0,
|
|
262
|
+
current = [];
|
|
263
263
|
if (solidJs.sharedConfig.context) {
|
|
264
264
|
while (end) {
|
|
265
265
|
if (end.nodeType === 8) {
|
|
@@ -351,7 +351,14 @@ function eventHandler(e) {
|
|
|
351
351
|
});
|
|
352
352
|
if (solidJs.sharedConfig.registry && !solidJs.sharedConfig.done) {
|
|
353
353
|
solidJs.sharedConfig.done = true;
|
|
354
|
-
document.querySelectorAll("[id^=pl-]").forEach(elem =>
|
|
354
|
+
document.querySelectorAll("[id^=pl-]").forEach(elem => {
|
|
355
|
+
while (elem && elem.nodeType !== 8 && elem.nodeValue !== "pl-" + e) {
|
|
356
|
+
let x = elem.nextSibling;
|
|
357
|
+
elem.remove();
|
|
358
|
+
elem = x;
|
|
359
|
+
}
|
|
360
|
+
elem && elem.remove();
|
|
361
|
+
});
|
|
355
362
|
}
|
|
356
363
|
while (node) {
|
|
357
364
|
const handler = node[key];
|
|
@@ -368,7 +375,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
368
375
|
while (typeof current === "function") current = current();
|
|
369
376
|
if (value === current) return current;
|
|
370
377
|
const t = typeof value,
|
|
371
|
-
|
|
378
|
+
multi = marker !== undefined;
|
|
372
379
|
parent = multi && current[0] && current[0].parentNode || parent;
|
|
373
380
|
if (t === "string" || t === "number") {
|
|
374
381
|
if (solidJs.sharedConfig.context) return current;
|
|
@@ -435,7 +442,7 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
|
435
442
|
let dynamic = false;
|
|
436
443
|
for (let i = 0, len = array.length; i < len; i++) {
|
|
437
444
|
let item = array[i],
|
|
438
|
-
|
|
445
|
+
prev = current && current[i];
|
|
439
446
|
if (item instanceof Node) {
|
|
440
447
|
normalized.push(item);
|
|
441
448
|
} else if (item == null || item === true || item === false) ; else if (Array.isArray(item)) {
|
|
@@ -529,10 +536,10 @@ const hydrate = (...args) => {
|
|
|
529
536
|
};
|
|
530
537
|
function Portal(props) {
|
|
531
538
|
const {
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
539
|
+
useShadow
|
|
540
|
+
} = props,
|
|
541
|
+
marker = document.createTextNode(""),
|
|
542
|
+
mount = props.mount || document.body;
|
|
536
543
|
function renderPortal() {
|
|
537
544
|
if (solidJs.sharedConfig.context) {
|
|
538
545
|
const [s, set] = solidJs.createSignal(false);
|
|
@@ -549,9 +556,9 @@ function Portal(props) {
|
|
|
549
556
|
});
|
|
550
557
|
} else {
|
|
551
558
|
const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
559
|
+
renderRoot = useShadow && container.attachShadow ? container.attachShadow({
|
|
560
|
+
mode: "open"
|
|
561
|
+
}) : container;
|
|
555
562
|
Object.defineProperty(container, "_$host", {
|
|
556
563
|
get() {
|
|
557
564
|
return marker.parentNode;
|
package/web/dist/web.js
CHANGED
|
@@ -30,12 +30,12 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
|
|
|
30
30
|
|
|
31
31
|
function reconcileArrays(parentNode, a, b) {
|
|
32
32
|
let bLength = b.length,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
aEnd = a.length,
|
|
34
|
+
bEnd = bLength,
|
|
35
|
+
aStart = 0,
|
|
36
|
+
bStart = 0,
|
|
37
|
+
after = a[aEnd - 1].nextSibling,
|
|
38
|
+
map = null;
|
|
39
39
|
while (aStart < aEnd || bStart < bEnd) {
|
|
40
40
|
if (a[aStart] === b[bStart]) {
|
|
41
41
|
aStart++;
|
|
@@ -69,8 +69,8 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
69
69
|
if (index != null) {
|
|
70
70
|
if (bStart < index && index < bEnd) {
|
|
71
71
|
let i = aStart,
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
sequence = 1,
|
|
73
|
+
t;
|
|
74
74
|
while (++i < aEnd && i < bEnd) {
|
|
75
75
|
if ((t = map.get(a[i])) == null || t !== index + sequence) break;
|
|
76
76
|
sequence++;
|
|
@@ -142,7 +142,7 @@ function addEventListener(node, name, handler, delegate) {
|
|
|
142
142
|
}
|
|
143
143
|
function classList(node, value, prev = {}) {
|
|
144
144
|
const classKeys = Object.keys(value || {}),
|
|
145
|
-
|
|
145
|
+
prevKeys = Object.keys(prev);
|
|
146
146
|
let i, len;
|
|
147
147
|
for (i = 0, len = prevKeys.length; i < len; i++) {
|
|
148
148
|
const key = prevKeys[i];
|
|
@@ -152,7 +152,7 @@ function classList(node, value, prev = {}) {
|
|
|
152
152
|
}
|
|
153
153
|
for (i = 0, len = classKeys.length; i < len; i++) {
|
|
154
154
|
const key = classKeys[i],
|
|
155
|
-
|
|
155
|
+
classValue = !!value[key];
|
|
156
156
|
if (!key || key === "undefined" || prev[key] === classValue || !classValue) continue;
|
|
157
157
|
toggleClassKey(node, key, true);
|
|
158
158
|
prev[key] = classValue;
|
|
@@ -257,8 +257,8 @@ function getNextMatch(el, nodeName) {
|
|
|
257
257
|
}
|
|
258
258
|
function getNextMarker(start) {
|
|
259
259
|
let end = start,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
count = 0,
|
|
261
|
+
current = [];
|
|
262
262
|
if (sharedConfig.context) {
|
|
263
263
|
while (end) {
|
|
264
264
|
if (end.nodeType === 8) {
|
|
@@ -350,7 +350,14 @@ function eventHandler(e) {
|
|
|
350
350
|
});
|
|
351
351
|
if (sharedConfig.registry && !sharedConfig.done) {
|
|
352
352
|
sharedConfig.done = true;
|
|
353
|
-
document.querySelectorAll("[id^=pl-]").forEach(elem =>
|
|
353
|
+
document.querySelectorAll("[id^=pl-]").forEach(elem => {
|
|
354
|
+
while (elem && elem.nodeType !== 8 && elem.nodeValue !== "pl-" + e) {
|
|
355
|
+
let x = elem.nextSibling;
|
|
356
|
+
elem.remove();
|
|
357
|
+
elem = x;
|
|
358
|
+
}
|
|
359
|
+
elem && elem.remove();
|
|
360
|
+
});
|
|
354
361
|
}
|
|
355
362
|
while (node) {
|
|
356
363
|
const handler = node[key];
|
|
@@ -367,7 +374,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
367
374
|
while (typeof current === "function") current = current();
|
|
368
375
|
if (value === current) return current;
|
|
369
376
|
const t = typeof value,
|
|
370
|
-
|
|
377
|
+
multi = marker !== undefined;
|
|
371
378
|
parent = multi && current[0] && current[0].parentNode || parent;
|
|
372
379
|
if (t === "string" || t === "number") {
|
|
373
380
|
if (sharedConfig.context) return current;
|
|
@@ -434,7 +441,7 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
|
434
441
|
let dynamic = false;
|
|
435
442
|
for (let i = 0, len = array.length; i < len; i++) {
|
|
436
443
|
let item = array[i],
|
|
437
|
-
|
|
444
|
+
prev = current && current[i];
|
|
438
445
|
if (item instanceof Node) {
|
|
439
446
|
normalized.push(item);
|
|
440
447
|
} else if (item == null || item === true || item === false) ; else if (Array.isArray(item)) {
|
|
@@ -528,10 +535,10 @@ const hydrate = (...args) => {
|
|
|
528
535
|
};
|
|
529
536
|
function Portal(props) {
|
|
530
537
|
const {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
538
|
+
useShadow
|
|
539
|
+
} = props,
|
|
540
|
+
marker = document.createTextNode(""),
|
|
541
|
+
mount = props.mount || document.body;
|
|
535
542
|
function renderPortal() {
|
|
536
543
|
if (sharedConfig.context) {
|
|
537
544
|
const [s, set] = createSignal(false);
|
|
@@ -548,9 +555,9 @@ function Portal(props) {
|
|
|
548
555
|
});
|
|
549
556
|
} else {
|
|
550
557
|
const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
558
|
+
renderRoot = useShadow && container.attachShadow ? container.attachShadow({
|
|
559
|
+
mode: "open"
|
|
560
|
+
}) : container;
|
|
554
561
|
Object.defineProperty(container, "_$host", {
|
|
555
562
|
get() {
|
|
556
563
|
return marker.parentNode;
|