solid-js 1.8.0 → 1.8.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/package.json +1 -1
- package/web/dist/dev.cjs +2 -2
- package/web/dist/dev.js +6 -2
- package/web/dist/web.cjs +1 -6
- package/web/dist/web.js +2 -8
package/package.json
CHANGED
package/web/dist/dev.cjs
CHANGED
|
@@ -122,6 +122,7 @@ function render(code, element, init, options = {}) {
|
|
|
122
122
|
function template(html, isCE, isSVG) {
|
|
123
123
|
let node;
|
|
124
124
|
const create = () => {
|
|
125
|
+
if (solidJs.sharedConfig.context) throw new Error("Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration.");
|
|
125
126
|
const t = document.createElement("template");
|
|
126
127
|
t.innerHTML = html;
|
|
127
128
|
return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
|
|
@@ -275,8 +276,7 @@ function hydrate$1(code, element, options = {}) {
|
|
|
275
276
|
function getNextElement(template) {
|
|
276
277
|
let node, key;
|
|
277
278
|
if (!solidJs.sharedConfig.context || !(node = solidJs.sharedConfig.registry.get(key = getHydrationKey()))) {
|
|
278
|
-
if (solidJs.sharedConfig.context)
|
|
279
|
-
if (!template) throw new Error("Unrecoverable Hydration Mismatch. No template for key: " + key);
|
|
279
|
+
if (solidJs.sharedConfig.context) throw new Error(`Hydration Mismatch. Unable to find DOM nodes for hydration key: ${key}`);
|
|
280
280
|
return template();
|
|
281
281
|
}
|
|
282
282
|
if (solidJs.sharedConfig.completed) solidJs.sharedConfig.completed.add(node);
|
package/web/dist/dev.js
CHANGED
|
@@ -567,6 +567,10 @@ function render(code, element, init, options = {}) {
|
|
|
567
567
|
function template(html, isCE, isSVG) {
|
|
568
568
|
let node;
|
|
569
569
|
const create = () => {
|
|
570
|
+
if (sharedConfig.context)
|
|
571
|
+
throw new Error(
|
|
572
|
+
"Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration."
|
|
573
|
+
);
|
|
570
574
|
const t = document.createElement("template");
|
|
571
575
|
t.innerHTML = html;
|
|
572
576
|
return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
|
|
@@ -727,8 +731,8 @@ function hydrate$1(code, element, options = {}) {
|
|
|
727
731
|
function getNextElement(template) {
|
|
728
732
|
let node, key;
|
|
729
733
|
if (!sharedConfig.context || !(node = sharedConfig.registry.get((key = getHydrationKey())))) {
|
|
730
|
-
if (sharedConfig.context)
|
|
731
|
-
|
|
734
|
+
if (sharedConfig.context)
|
|
735
|
+
throw new Error(`Hydration Mismatch. Unable to find DOM nodes for hydration key: ${key}`);
|
|
732
736
|
return template();
|
|
733
737
|
}
|
|
734
738
|
if (sharedConfig.completed) sharedConfig.completed.add(node);
|
package/web/dist/web.cjs
CHANGED
|
@@ -275,8 +275,6 @@ function hydrate$1(code, element, options = {}) {
|
|
|
275
275
|
function getNextElement(template) {
|
|
276
276
|
let node, key;
|
|
277
277
|
if (!solidJs.sharedConfig.context || !(node = solidJs.sharedConfig.registry.get(key = getHydrationKey()))) {
|
|
278
|
-
if (solidJs.sharedConfig.context) console.warn("Unable to find DOM nodes for hydration key:", key);
|
|
279
|
-
if (!template) throw new Error("Unrecoverable Hydration Mismatch. No template for key: " + key);
|
|
280
278
|
return template();
|
|
281
279
|
}
|
|
282
280
|
if (solidJs.sharedConfig.completed) solidJs.sharedConfig.completed.add(node);
|
|
@@ -472,7 +470,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
472
470
|
parent.appendChild(value);
|
|
473
471
|
} else parent.replaceChild(value, parent.firstChild);
|
|
474
472
|
current = value;
|
|
475
|
-
} else
|
|
473
|
+
} else ;
|
|
476
474
|
return current;
|
|
477
475
|
}
|
|
478
476
|
function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
@@ -620,9 +618,6 @@ function Dynamic(props) {
|
|
|
620
618
|
const component = cached();
|
|
621
619
|
switch (typeof component) {
|
|
622
620
|
case "function":
|
|
623
|
-
Object.assign(component, {
|
|
624
|
-
[solidJs.$DEVCOMP]: true
|
|
625
|
-
});
|
|
626
621
|
return solidJs.untrack(() => component(others));
|
|
627
622
|
case "string":
|
|
628
623
|
const isSvg = SVGElements.has(component);
|
package/web/dist/web.js
CHANGED
|
@@ -10,8 +10,7 @@ import {
|
|
|
10
10
|
createMemo,
|
|
11
11
|
createSignal,
|
|
12
12
|
onCleanup,
|
|
13
|
-
splitProps
|
|
14
|
-
$DEVCOMP
|
|
13
|
+
splitProps
|
|
15
14
|
} from "solid-js";
|
|
16
15
|
export {
|
|
17
16
|
ErrorBoundary,
|
|
@@ -727,8 +726,6 @@ function hydrate$1(code, element, options = {}) {
|
|
|
727
726
|
function getNextElement(template) {
|
|
728
727
|
let node, key;
|
|
729
728
|
if (!sharedConfig.context || !(node = sharedConfig.registry.get((key = getHydrationKey())))) {
|
|
730
|
-
if (sharedConfig.context) console.warn("Unable to find DOM nodes for hydration key:", key);
|
|
731
|
-
if (!template) throw new Error("Unrecoverable Hydration Mismatch. No template for key: " + key);
|
|
732
729
|
return template();
|
|
733
730
|
}
|
|
734
731
|
if (sharedConfig.completed) sharedConfig.completed.add(node);
|
|
@@ -933,7 +930,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
933
930
|
parent.appendChild(value);
|
|
934
931
|
} else parent.replaceChild(value, parent.firstChild);
|
|
935
932
|
current = value;
|
|
936
|
-
} else
|
|
933
|
+
} else;
|
|
937
934
|
return current;
|
|
938
935
|
}
|
|
939
936
|
function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
@@ -1096,9 +1093,6 @@ function Dynamic(props) {
|
|
|
1096
1093
|
const component = cached();
|
|
1097
1094
|
switch (typeof component) {
|
|
1098
1095
|
case "function":
|
|
1099
|
-
Object.assign(component, {
|
|
1100
|
-
[$DEVCOMP]: true
|
|
1101
|
-
});
|
|
1102
1096
|
return untrack(() => component(others));
|
|
1103
1097
|
case "string":
|
|
1104
1098
|
const isSvg = SVGElements.has(component);
|