solid-js 1.3.2 → 1.3.3
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 +4 -1
- package/dist/dev.js +4 -1
- package/dist/solid.cjs +1 -1
- package/dist/solid.js +1 -1
- package/package.json +2 -2
- package/store/package.json +23 -1
- package/universal/package.json +11 -1
- package/web/dist/dev.cjs +6 -3
- package/web/dist/dev.js +7 -4
- package/web/dist/web.cjs +3 -3
- package/web/dist/web.js +3 -3
- package/web/package.json +23 -1
package/dist/dev.cjs
CHANGED
|
@@ -1332,6 +1332,9 @@ function lazy(fn) {
|
|
|
1332
1332
|
}
|
|
1333
1333
|
let Comp;
|
|
1334
1334
|
return createMemo(() => (Comp = comp()) && untrack(() => {
|
|
1335
|
+
Object.assign(Comp, {
|
|
1336
|
+
[$DEVCOMP]: true
|
|
1337
|
+
});
|
|
1335
1338
|
if (!ctx) return Comp(props);
|
|
1336
1339
|
const c = sharedConfig.context;
|
|
1337
1340
|
setHydrateContext(ctx);
|
|
@@ -1519,7 +1522,6 @@ function Suspense(props) {
|
|
|
1519
1522
|
setHydrateContext(ctx);
|
|
1520
1523
|
set();
|
|
1521
1524
|
setHydrateContext();
|
|
1522
|
-
p = undefined;
|
|
1523
1525
|
});
|
|
1524
1526
|
}
|
|
1525
1527
|
}
|
|
@@ -1546,6 +1548,7 @@ function Suspense(props) {
|
|
|
1546
1548
|
dispose && dispose();
|
|
1547
1549
|
if ((!inFallback || p !== undefined) && visibleContent) {
|
|
1548
1550
|
store.resolved = true;
|
|
1551
|
+
ctx = p = undefined;
|
|
1549
1552
|
resumeEffects(store.effects);
|
|
1550
1553
|
return rendered;
|
|
1551
1554
|
}
|
package/dist/dev.js
CHANGED
|
@@ -1328,6 +1328,9 @@ function lazy(fn) {
|
|
|
1328
1328
|
}
|
|
1329
1329
|
let Comp;
|
|
1330
1330
|
return createMemo(() => (Comp = comp()) && untrack(() => {
|
|
1331
|
+
Object.assign(Comp, {
|
|
1332
|
+
[$DEVCOMP]: true
|
|
1333
|
+
});
|
|
1331
1334
|
if (!ctx) return Comp(props);
|
|
1332
1335
|
const c = sharedConfig.context;
|
|
1333
1336
|
setHydrateContext(ctx);
|
|
@@ -1515,7 +1518,6 @@ function Suspense(props) {
|
|
|
1515
1518
|
setHydrateContext(ctx);
|
|
1516
1519
|
set();
|
|
1517
1520
|
setHydrateContext();
|
|
1518
|
-
p = undefined;
|
|
1519
1521
|
});
|
|
1520
1522
|
}
|
|
1521
1523
|
}
|
|
@@ -1542,6 +1544,7 @@ function Suspense(props) {
|
|
|
1542
1544
|
dispose && dispose();
|
|
1543
1545
|
if ((!inFallback || p !== undefined) && visibleContent) {
|
|
1544
1546
|
store.resolved = true;
|
|
1547
|
+
ctx = p = undefined;
|
|
1545
1548
|
resumeEffects(store.effects);
|
|
1546
1549
|
return rendered;
|
|
1547
1550
|
}
|
package/dist/solid.cjs
CHANGED
|
@@ -1438,7 +1438,6 @@ function Suspense(props) {
|
|
|
1438
1438
|
setHydrateContext(ctx);
|
|
1439
1439
|
set();
|
|
1440
1440
|
setHydrateContext();
|
|
1441
|
-
p = undefined;
|
|
1442
1441
|
});
|
|
1443
1442
|
}
|
|
1444
1443
|
}
|
|
@@ -1465,6 +1464,7 @@ function Suspense(props) {
|
|
|
1465
1464
|
dispose && dispose();
|
|
1466
1465
|
if ((!inFallback || p !== undefined) && visibleContent) {
|
|
1467
1466
|
store.resolved = true;
|
|
1467
|
+
ctx = p = undefined;
|
|
1468
1468
|
resumeEffects(store.effects);
|
|
1469
1469
|
return rendered;
|
|
1470
1470
|
}
|
package/dist/solid.js
CHANGED
|
@@ -1434,7 +1434,6 @@ function Suspense(props) {
|
|
|
1434
1434
|
setHydrateContext(ctx);
|
|
1435
1435
|
set();
|
|
1436
1436
|
setHydrateContext();
|
|
1437
|
-
p = undefined;
|
|
1438
1437
|
});
|
|
1439
1438
|
}
|
|
1440
1439
|
}
|
|
@@ -1461,6 +1460,7 @@ function Suspense(props) {
|
|
|
1461
1460
|
dispose && dispose();
|
|
1462
1461
|
if ((!inFallback || p !== undefined) && visibleContent) {
|
|
1463
1462
|
store.resolved = true;
|
|
1463
|
+
ctx = p = undefined;
|
|
1464
1464
|
resumeEffects(store.effects);
|
|
1465
1465
|
return rendered;
|
|
1466
1466
|
}
|
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.3",
|
|
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": "58f98c55a3573b23f683978c8828bbda563ae666"
|
|
148
148
|
}
|
package/store/package.json
CHANGED
|
@@ -9,5 +9,27 @@
|
|
|
9
9
|
"unpkg": "./dist/store.cjs",
|
|
10
10
|
"types": "./types/index.d.ts",
|
|
11
11
|
"type": "module",
|
|
12
|
-
"sideEffects": false
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"browser": {
|
|
16
|
+
"development": {
|
|
17
|
+
"import": "./dist/dev.js",
|
|
18
|
+
"require": "./dist/dev.cjs"
|
|
19
|
+
},
|
|
20
|
+
"import": "./dist/store.js",
|
|
21
|
+
"require": "./dist/store.cjs"
|
|
22
|
+
},
|
|
23
|
+
"node": {
|
|
24
|
+
"import": "./dist/server.js",
|
|
25
|
+
"require": "./dist/server.cjs"
|
|
26
|
+
},
|
|
27
|
+
"development": {
|
|
28
|
+
"import": "./dist/dev.js",
|
|
29
|
+
"require": "./dist/dev.cjs"
|
|
30
|
+
},
|
|
31
|
+
"import": "./dist/store.js",
|
|
32
|
+
"require": "./dist/store.cjs"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
13
35
|
}
|
package/universal/package.json
CHANGED
|
@@ -4,5 +4,15 @@
|
|
|
4
4
|
"module": "./dist/universal.js",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"sideEffects": false
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"development": {
|
|
11
|
+
"import": "./dist/dev.js",
|
|
12
|
+
"require": "./dist/dev.cjs"
|
|
13
|
+
},
|
|
14
|
+
"import": "./dist/universal.js",
|
|
15
|
+
"require": "./dist/universal.cjs"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
8
18
|
}
|
package/web/dist/dev.cjs
CHANGED
|
@@ -404,13 +404,13 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
404
404
|
}
|
|
405
405
|
current = array;
|
|
406
406
|
} else if (value instanceof Node) {
|
|
407
|
-
if (solidJs.sharedConfig.context) return current = value.parentNode ? value : current;
|
|
407
|
+
if (solidJs.sharedConfig.context) return current = value.parentNode ? multi ? [value] : value : current;
|
|
408
408
|
if (Array.isArray(current)) {
|
|
409
409
|
if (multi) return current = cleanChildren(parent, current, marker, value);
|
|
410
410
|
cleanChildren(parent, current, null, value);
|
|
411
411
|
} else if (current == null || current === "" || !parent.firstChild) {
|
|
412
412
|
parent.appendChild(value);
|
|
413
|
-
} else parent.replaceChild(value,
|
|
413
|
+
} else parent.replaceChild(value, parent.firstChild);
|
|
414
414
|
current = value;
|
|
415
415
|
} else console.warn(`Unrecognized value. Skipped inserting`, value);
|
|
416
416
|
return current;
|
|
@@ -453,7 +453,7 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
453
453
|
if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && el.remove();
|
|
454
454
|
} else inserted = true;
|
|
455
455
|
}
|
|
456
|
-
} else
|
|
456
|
+
} else parent.insertBefore(node, marker);
|
|
457
457
|
return [node];
|
|
458
458
|
}
|
|
459
459
|
function gatherHydratable(element, root) {
|
|
@@ -540,6 +540,9 @@ function Dynamic(props) {
|
|
|
540
540
|
const component = p.component;
|
|
541
541
|
switch (typeof component) {
|
|
542
542
|
case "function":
|
|
543
|
+
Object.assign(component, {
|
|
544
|
+
[solidJs.$DEVCOMP]: true
|
|
545
|
+
});
|
|
543
546
|
return solidJs.untrack(() => component(others));
|
|
544
547
|
case "string":
|
|
545
548
|
const isSvg = SVGElements.has(component);
|
package/web/dist/dev.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createMemo, createRoot, createRenderEffect, sharedConfig, enableHydration, createSignal, onCleanup, splitProps, untrack } from 'solid-js';
|
|
1
|
+
import { createMemo, createRoot, createRenderEffect, sharedConfig, enableHydration, createSignal, onCleanup, splitProps, $DEVCOMP, untrack } from 'solid-js';
|
|
2
2
|
export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps } from 'solid-js';
|
|
3
3
|
|
|
4
4
|
const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
|
|
@@ -401,13 +401,13 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
401
401
|
}
|
|
402
402
|
current = array;
|
|
403
403
|
} else if (value instanceof Node) {
|
|
404
|
-
if (sharedConfig.context) return current = value.parentNode ? value : current;
|
|
404
|
+
if (sharedConfig.context) return current = value.parentNode ? multi ? [value] : value : current;
|
|
405
405
|
if (Array.isArray(current)) {
|
|
406
406
|
if (multi) return current = cleanChildren(parent, current, marker, value);
|
|
407
407
|
cleanChildren(parent, current, null, value);
|
|
408
408
|
} else if (current == null || current === "" || !parent.firstChild) {
|
|
409
409
|
parent.appendChild(value);
|
|
410
|
-
} else parent.replaceChild(value,
|
|
410
|
+
} else parent.replaceChild(value, parent.firstChild);
|
|
411
411
|
current = value;
|
|
412
412
|
} else console.warn(`Unrecognized value. Skipped inserting`, value);
|
|
413
413
|
return current;
|
|
@@ -450,7 +450,7 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
450
450
|
if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && el.remove();
|
|
451
451
|
} else inserted = true;
|
|
452
452
|
}
|
|
453
|
-
} else
|
|
453
|
+
} else parent.insertBefore(node, marker);
|
|
454
454
|
return [node];
|
|
455
455
|
}
|
|
456
456
|
function gatherHydratable(element, root) {
|
|
@@ -537,6 +537,9 @@ function Dynamic(props) {
|
|
|
537
537
|
const component = p.component;
|
|
538
538
|
switch (typeof component) {
|
|
539
539
|
case "function":
|
|
540
|
+
Object.assign(component, {
|
|
541
|
+
[$DEVCOMP]: true
|
|
542
|
+
});
|
|
540
543
|
return untrack(() => component(others));
|
|
541
544
|
case "string":
|
|
542
545
|
const isSvg = SVGElements.has(component);
|
package/web/dist/web.cjs
CHANGED
|
@@ -403,13 +403,13 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
403
403
|
}
|
|
404
404
|
current = array;
|
|
405
405
|
} else if (value instanceof Node) {
|
|
406
|
-
if (solidJs.sharedConfig.context) return current = value.parentNode ? value : current;
|
|
406
|
+
if (solidJs.sharedConfig.context) return current = value.parentNode ? multi ? [value] : value : current;
|
|
407
407
|
if (Array.isArray(current)) {
|
|
408
408
|
if (multi) return current = cleanChildren(parent, current, marker, value);
|
|
409
409
|
cleanChildren(parent, current, null, value);
|
|
410
410
|
} else if (current == null || current === "" || !parent.firstChild) {
|
|
411
411
|
parent.appendChild(value);
|
|
412
|
-
} else parent.replaceChild(value,
|
|
412
|
+
} else parent.replaceChild(value, parent.firstChild);
|
|
413
413
|
current = value;
|
|
414
414
|
} else ;
|
|
415
415
|
return current;
|
|
@@ -452,7 +452,7 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
452
452
|
if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && el.remove();
|
|
453
453
|
} else inserted = true;
|
|
454
454
|
}
|
|
455
|
-
} else
|
|
455
|
+
} else parent.insertBefore(node, marker);
|
|
456
456
|
return [node];
|
|
457
457
|
}
|
|
458
458
|
function gatherHydratable(element, root) {
|
package/web/dist/web.js
CHANGED
|
@@ -400,13 +400,13 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
400
400
|
}
|
|
401
401
|
current = array;
|
|
402
402
|
} else if (value instanceof Node) {
|
|
403
|
-
if (sharedConfig.context) return current = value.parentNode ? value : current;
|
|
403
|
+
if (sharedConfig.context) return current = value.parentNode ? multi ? [value] : value : current;
|
|
404
404
|
if (Array.isArray(current)) {
|
|
405
405
|
if (multi) return current = cleanChildren(parent, current, marker, value);
|
|
406
406
|
cleanChildren(parent, current, null, value);
|
|
407
407
|
} else if (current == null || current === "" || !parent.firstChild) {
|
|
408
408
|
parent.appendChild(value);
|
|
409
|
-
} else parent.replaceChild(value,
|
|
409
|
+
} else parent.replaceChild(value, parent.firstChild);
|
|
410
410
|
current = value;
|
|
411
411
|
} else ;
|
|
412
412
|
return current;
|
|
@@ -449,7 +449,7 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
449
449
|
if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && el.remove();
|
|
450
450
|
} else inserted = true;
|
|
451
451
|
}
|
|
452
|
-
} else
|
|
452
|
+
} else parent.insertBefore(node, marker);
|
|
453
453
|
return [node];
|
|
454
454
|
}
|
|
455
455
|
function gatherHydratable(element, root) {
|
package/web/package.json
CHANGED
|
@@ -9,5 +9,27 @@
|
|
|
9
9
|
"unpkg": "./dist/web.cjs",
|
|
10
10
|
"types": "./types/index.d.ts",
|
|
11
11
|
"type": "module",
|
|
12
|
-
"sideEffects": false
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"browser": {
|
|
16
|
+
"development": {
|
|
17
|
+
"import": "./dist/dev.js",
|
|
18
|
+
"require": "./dist/dev.cjs"
|
|
19
|
+
},
|
|
20
|
+
"import": "./dist/web.js",
|
|
21
|
+
"require": "./dist/web.cjs"
|
|
22
|
+
},
|
|
23
|
+
"node": {
|
|
24
|
+
"import": "./dist/server.js",
|
|
25
|
+
"require": "./dist/server.cjs"
|
|
26
|
+
},
|
|
27
|
+
"development": {
|
|
28
|
+
"import": "./dist/dev.js",
|
|
29
|
+
"require": "./dist/dev.cjs"
|
|
30
|
+
},
|
|
31
|
+
"import": "./dist/web.js",
|
|
32
|
+
"require": "./dist/web.cjs"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
13
35
|
}
|