solid-js 1.7.5 → 1.7.7
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 +71 -41
- package/dist/dev.js +71 -41
- package/dist/server.cjs +7 -3
- package/dist/server.js +7 -3
- package/dist/solid.cjs +71 -41
- package/dist/solid.js +71 -41
- package/package.json +55 -109
- package/store/dist/dev.js +1 -1
- package/store/package.json +14 -28
- package/types/jsx.d.ts +7 -1
- package/types/reactive/signal.d.ts +1 -1
- package/types/server/reactive.d.ts +1 -1
- package/universal/package.json +4 -8
- package/web/dist/dev.cjs +3 -3
- package/web/dist/dev.js +4 -4
- package/web/dist/server.cjs +0 -1
- package/web/dist/server.js +0 -1
- package/web/dist/web.cjs +3 -3
- package/web/dist/web.js +4 -4
- package/web/package.json +14 -28
package/web/dist/web.cjs
CHANGED
|
@@ -126,7 +126,7 @@ function template(html, isCE, isSVG) {
|
|
|
126
126
|
t.innerHTML = html;
|
|
127
127
|
return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
|
|
128
128
|
};
|
|
129
|
-
const fn = isCE ? () => (node || (node = create())
|
|
129
|
+
const fn = isCE ? () => solidJs.untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
130
130
|
fn.cloneNode = fn;
|
|
131
131
|
return fn;
|
|
132
132
|
}
|
|
@@ -576,12 +576,12 @@ function Portal(props) {
|
|
|
576
576
|
let hydrating = !!solidJs.sharedConfig.context;
|
|
577
577
|
solidJs.createEffect(() => {
|
|
578
578
|
if (hydrating) solidJs.getOwner().user = hydrating = false;
|
|
579
|
-
content || (content = solidJs.runWithOwner(owner, () => props.children));
|
|
579
|
+
content || (content = solidJs.runWithOwner(owner, () => solidJs.createMemo(() => props.children)));
|
|
580
580
|
const el = mount();
|
|
581
581
|
if (el instanceof HTMLHeadElement) {
|
|
582
582
|
const [clean, setClean] = solidJs.createSignal(false);
|
|
583
583
|
const cleanup = () => setClean(true);
|
|
584
|
-
solidJs.createRoot(dispose => insert(el, () => !clean() ? content : dispose(), null));
|
|
584
|
+
solidJs.createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
|
|
585
585
|
solidJs.onCleanup(cleanup);
|
|
586
586
|
} else {
|
|
587
587
|
const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
|
package/web/dist/web.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, getOwner, createEffect, runWithOwner, createSignal, onCleanup, splitProps,
|
|
1
|
+
import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, getOwner, createEffect, runWithOwner, createMemo, createSignal, onCleanup, splitProps, $DEVCOMP } from 'solid-js';
|
|
2
2
|
export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, createMemo as memo, mergeProps, untrack } 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"];
|
|
@@ -125,7 +125,7 @@ function template(html, isCE, isSVG) {
|
|
|
125
125
|
t.innerHTML = html;
|
|
126
126
|
return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
|
|
127
127
|
};
|
|
128
|
-
const fn = isCE ? () => (node || (node = create())
|
|
128
|
+
const fn = isCE ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
129
129
|
fn.cloneNode = fn;
|
|
130
130
|
return fn;
|
|
131
131
|
}
|
|
@@ -575,12 +575,12 @@ function Portal(props) {
|
|
|
575
575
|
let hydrating = !!sharedConfig.context;
|
|
576
576
|
createEffect(() => {
|
|
577
577
|
if (hydrating) getOwner().user = hydrating = false;
|
|
578
|
-
content || (content = runWithOwner(owner, () => props.children));
|
|
578
|
+
content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
|
|
579
579
|
const el = mount();
|
|
580
580
|
if (el instanceof HTMLHeadElement) {
|
|
581
581
|
const [clean, setClean] = createSignal(false);
|
|
582
582
|
const cleanup = () => setClean(true);
|
|
583
|
-
createRoot(dispose => insert(el, () => !clean() ? content : dispose(), null));
|
|
583
|
+
createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
|
|
584
584
|
onCleanup(cleanup);
|
|
585
585
|
} else {
|
|
586
586
|
const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
|
package/web/package.json
CHANGED
|
@@ -13,51 +13,37 @@
|
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
15
|
"worker": {
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"default": "./dist/server.js"
|
|
19
|
-
},
|
|
16
|
+
"types": "./types/index.d.ts",
|
|
17
|
+
"import": "./dist/server.js",
|
|
20
18
|
"require": "./dist/server.cjs"
|
|
21
19
|
},
|
|
22
20
|
"browser": {
|
|
23
21
|
"development": {
|
|
24
|
-
"import": {
|
|
25
|
-
"types": "./types/index.d.ts",
|
|
26
|
-
"default": "./dist/dev.js"
|
|
27
|
-
},
|
|
28
|
-
"require": "./dist/dev.cjs"
|
|
29
|
-
},
|
|
30
|
-
"import": {
|
|
31
22
|
"types": "./types/index.d.ts",
|
|
32
|
-
"
|
|
23
|
+
"import": "./dist/dev.js",
|
|
24
|
+
"require": "./dist/dev.cjs"
|
|
33
25
|
},
|
|
26
|
+
"types": "./types/index.d.ts",
|
|
27
|
+
"import": "./dist/web.js",
|
|
34
28
|
"require": "./dist/web.cjs"
|
|
35
29
|
},
|
|
36
30
|
"deno": {
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
"default": "./dist/server.js"
|
|
40
|
-
},
|
|
31
|
+
"types": "./types/index.d.ts",
|
|
32
|
+
"import": "./dist/server.js",
|
|
41
33
|
"require": "./dist/server.cjs"
|
|
42
34
|
},
|
|
43
35
|
"node": {
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
"default": "./dist/server.js"
|
|
47
|
-
},
|
|
36
|
+
"types": "./types/index.d.ts",
|
|
37
|
+
"import": "./dist/server.js",
|
|
48
38
|
"require": "./dist/server.cjs"
|
|
49
39
|
},
|
|
50
40
|
"development": {
|
|
51
|
-
"import": {
|
|
52
|
-
"types": "./types/index.d.ts",
|
|
53
|
-
"default": "./dist/dev.js"
|
|
54
|
-
},
|
|
55
|
-
"require": "./dist/dev.cjs"
|
|
56
|
-
},
|
|
57
|
-
"import": {
|
|
58
41
|
"types": "./types/index.d.ts",
|
|
59
|
-
"
|
|
42
|
+
"import": "./dist/dev.js",
|
|
43
|
+
"require": "./dist/dev.cjs"
|
|
60
44
|
},
|
|
45
|
+
"types": "./types/index.d.ts",
|
|
46
|
+
"import": "./dist/web.js",
|
|
61
47
|
"require": "./dist/web.cjs"
|
|
62
48
|
}
|
|
63
49
|
}
|