@solidjs/web 2.0.0-beta.1 → 2.0.0-beta.2
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 +38 -4
- package/dist/dev.js +42 -8
- package/dist/server.cjs +4 -1
- package/dist/server.js +5 -2
- package/dist/web.cjs +17 -4
- package/dist/web.js +21 -8
- package/package.json +4 -3
- package/storage/types/src/index.d.ts +2 -1
- package/types/core.d.ts +1 -1
- package/types/index.d.ts +2 -1
package/dist/dev.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var solidJs = require('solid-js');
|
|
4
|
+
var signals = require('@solidjs/signals');
|
|
4
5
|
|
|
5
6
|
const Properties = /*#__PURE__*/new Set([
|
|
6
7
|
"value", "checked", "selected", "muted"]);
|
|
@@ -22,7 +23,9 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
|
|
|
22
23
|
const effect = (fn, effectFn, initial) => solidJs.createRenderEffect(fn, effectFn, initial, {
|
|
23
24
|
transparent: true
|
|
24
25
|
});
|
|
25
|
-
const memo = fn =>
|
|
26
|
+
const memo = (fn, transparent) => transparent ? fn.$r ? fn : signals.createMemo(() => fn(), undefined, {
|
|
27
|
+
transparent: true
|
|
28
|
+
}) : solidJs.createMemo(() => fn());
|
|
26
29
|
|
|
27
30
|
function reconcileArrays(parentNode, a, b) {
|
|
28
31
|
let bLength = b.length,
|
|
@@ -82,7 +85,7 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
const $$EVENTS = "_$DX_DELEGATE";
|
|
85
|
-
function render(code, element, init, options = {}) {
|
|
88
|
+
function render$1(code, element, init, options = {}) {
|
|
86
89
|
if (!element) {
|
|
87
90
|
throw new Error("The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document.");
|
|
88
91
|
}
|
|
@@ -256,6 +259,12 @@ function insert(parent, accessor, marker, initial) {
|
|
|
256
259
|
accessor = normalize(accessor, initial, multi, true);
|
|
257
260
|
if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
|
|
258
261
|
}
|
|
262
|
+
accessor = memo(accessor, true);
|
|
263
|
+
if (multi && initial.length === 0 && !isHydrating(parent)) {
|
|
264
|
+
const placeholder = document.createTextNode("");
|
|
265
|
+
parent.insertBefore(placeholder, marker);
|
|
266
|
+
initial = [placeholder];
|
|
267
|
+
}
|
|
259
268
|
effect(prev => normalize(accessor, prev, multi), (value, current) => insertExpression(parent, value, current, marker), initial);
|
|
260
269
|
}
|
|
261
270
|
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
@@ -276,7 +285,7 @@ function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = fals
|
|
|
276
285
|
}
|
|
277
286
|
}
|
|
278
287
|
function hydrate$1(code, element, options = {}) {
|
|
279
|
-
if (globalThis._$HY.done) return render(code, element, [...element.childNodes], options);
|
|
288
|
+
if (globalThis._$HY.done) return render$1(code, element, [...element.childNodes], options);
|
|
280
289
|
options.renderId ||= "";
|
|
281
290
|
if (!globalThis._$HY.modules) globalThis._$HY.modules = {};
|
|
282
291
|
if (!globalThis._$HY.loading) globalThis._$HY.loading = {};
|
|
@@ -313,7 +322,7 @@ function hydrate$1(code, element, options = {}) {
|
|
|
313
322
|
}
|
|
314
323
|
try {
|
|
315
324
|
gatherHydratable(element, options.renderId);
|
|
316
|
-
return render(code, element, [...element.childNodes], options);
|
|
325
|
+
return render$1(code, element, [...element.childNodes], options);
|
|
317
326
|
} finally {
|
|
318
327
|
solidJs.sharedConfig.hydrating = false;
|
|
319
328
|
}
|
|
@@ -630,6 +639,31 @@ function ssrHydrationKey() {}
|
|
|
630
639
|
function resolveSSRNode(node) {}
|
|
631
640
|
function escape(html) {}
|
|
632
641
|
|
|
642
|
+
function render(...args) {
|
|
643
|
+
let unhandledAsync = false;
|
|
644
|
+
{
|
|
645
|
+
solidJs.setOnUnhandledAsync(() => {
|
|
646
|
+
unhandledAsync = true;
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
const result = render$1(...args);
|
|
650
|
+
{
|
|
651
|
+
solidJs.setOnUnhandledAsync(null);
|
|
652
|
+
if (unhandledAsync) {
|
|
653
|
+
const message = "Async content was used in JSX without a <Loading> boundary. " + "Wrap async content in <Loading> to show a fallback while loading.";
|
|
654
|
+
result();
|
|
655
|
+
const container = args[1];
|
|
656
|
+
container.textContent = "";
|
|
657
|
+
const msg = document.createElement("pre");
|
|
658
|
+
msg.style.cssText = "color:#e53e3e;background:#fff5f5;border:2px solid #e53e3e;" + "border-radius:4px;padding:16px;margin:16px;font-family:monospace;" + "white-space:pre-wrap;word-break:break-word;";
|
|
659
|
+
msg.textContent = message;
|
|
660
|
+
container.appendChild(msg);
|
|
661
|
+
console.error(message);
|
|
662
|
+
return () => {};
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
return result;
|
|
666
|
+
}
|
|
633
667
|
const isServer = false;
|
|
634
668
|
const isDev = true;
|
|
635
669
|
const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
package/dist/dev.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner,
|
|
1
|
+
import { createRenderEffect, createMemo as createMemo$1, sharedConfig, untrack, runWithOwner, flatten, createRoot, omit, $DEVCOMP, enableHydration, setOnUnhandledAsync } from 'solid-js';
|
|
2
2
|
export { Errored, For, Hydration, Loading, Match, NoHydration, Show, Switch, createComponent, getOwner, merge as mergeProps, untrack } from 'solid-js';
|
|
3
|
+
import { createMemo } from '@solidjs/signals';
|
|
3
4
|
|
|
4
5
|
const Properties = /*#__PURE__*/new Set([
|
|
5
6
|
"value", "checked", "selected", "muted"]);
|
|
@@ -21,7 +22,9 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
|
|
|
21
22
|
const effect = (fn, effectFn, initial) => createRenderEffect(fn, effectFn, initial, {
|
|
22
23
|
transparent: true
|
|
23
24
|
});
|
|
24
|
-
const memo = fn => createMemo(() => fn()
|
|
25
|
+
const memo = (fn, transparent) => transparent ? fn.$r ? fn : createMemo(() => fn(), undefined, {
|
|
26
|
+
transparent: true
|
|
27
|
+
}) : createMemo$1(() => fn());
|
|
25
28
|
|
|
26
29
|
function reconcileArrays(parentNode, a, b) {
|
|
27
30
|
let bLength = b.length,
|
|
@@ -81,7 +84,7 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
81
84
|
}
|
|
82
85
|
|
|
83
86
|
const $$EVENTS = "_$DX_DELEGATE";
|
|
84
|
-
function render(code, element, init, options = {}) {
|
|
87
|
+
function render$1(code, element, init, options = {}) {
|
|
85
88
|
if (!element) {
|
|
86
89
|
throw new Error("The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document.");
|
|
87
90
|
}
|
|
@@ -255,6 +258,12 @@ function insert(parent, accessor, marker, initial) {
|
|
|
255
258
|
accessor = normalize(accessor, initial, multi, true);
|
|
256
259
|
if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
|
|
257
260
|
}
|
|
261
|
+
accessor = memo(accessor, true);
|
|
262
|
+
if (multi && initial.length === 0 && !isHydrating(parent)) {
|
|
263
|
+
const placeholder = document.createTextNode("");
|
|
264
|
+
parent.insertBefore(placeholder, marker);
|
|
265
|
+
initial = [placeholder];
|
|
266
|
+
}
|
|
258
267
|
effect(prev => normalize(accessor, prev, multi), (value, current) => insertExpression(parent, value, current, marker), initial);
|
|
259
268
|
}
|
|
260
269
|
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
@@ -275,7 +284,7 @@ function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = fals
|
|
|
275
284
|
}
|
|
276
285
|
}
|
|
277
286
|
function hydrate$1(code, element, options = {}) {
|
|
278
|
-
if (globalThis._$HY.done) return render(code, element, [...element.childNodes], options);
|
|
287
|
+
if (globalThis._$HY.done) return render$1(code, element, [...element.childNodes], options);
|
|
279
288
|
options.renderId ||= "";
|
|
280
289
|
if (!globalThis._$HY.modules) globalThis._$HY.modules = {};
|
|
281
290
|
if (!globalThis._$HY.loading) globalThis._$HY.loading = {};
|
|
@@ -312,7 +321,7 @@ function hydrate$1(code, element, options = {}) {
|
|
|
312
321
|
}
|
|
313
322
|
try {
|
|
314
323
|
gatherHydratable(element, options.renderId);
|
|
315
|
-
return render(code, element, [...element.childNodes], options);
|
|
324
|
+
return render$1(code, element, [...element.childNodes], options);
|
|
316
325
|
} finally {
|
|
317
326
|
sharedConfig.hydrating = false;
|
|
318
327
|
}
|
|
@@ -629,6 +638,31 @@ function ssrHydrationKey() {}
|
|
|
629
638
|
function resolveSSRNode(node) {}
|
|
630
639
|
function escape(html) {}
|
|
631
640
|
|
|
641
|
+
function render(...args) {
|
|
642
|
+
let unhandledAsync = false;
|
|
643
|
+
{
|
|
644
|
+
setOnUnhandledAsync(() => {
|
|
645
|
+
unhandledAsync = true;
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
const result = render$1(...args);
|
|
649
|
+
{
|
|
650
|
+
setOnUnhandledAsync(null);
|
|
651
|
+
if (unhandledAsync) {
|
|
652
|
+
const message = "Async content was used in JSX without a <Loading> boundary. " + "Wrap async content in <Loading> to show a fallback while loading.";
|
|
653
|
+
result();
|
|
654
|
+
const container = args[1];
|
|
655
|
+
container.textContent = "";
|
|
656
|
+
const msg = document.createElement("pre");
|
|
657
|
+
msg.style.cssText = "color:#e53e3e;background:#fff5f5;border:2px solid #e53e3e;" + "border-radius:4px;padding:16px;margin:16px;font-family:monospace;" + "white-space:pre-wrap;word-break:break-word;";
|
|
658
|
+
msg.textContent = message;
|
|
659
|
+
container.appendChild(msg);
|
|
660
|
+
console.error(message);
|
|
661
|
+
return () => {};
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
return result;
|
|
665
|
+
}
|
|
632
666
|
const isServer = false;
|
|
633
667
|
const isDev = true;
|
|
634
668
|
const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
@@ -646,7 +680,7 @@ function Portal(props) {
|
|
|
646
680
|
startMarker = document.createTextNode(""),
|
|
647
681
|
endMarker = document.createTextNode(""),
|
|
648
682
|
mount = () => createElementProxy(props.mount || document.body, treeMarker);
|
|
649
|
-
let content = createMemo(() => [startMarker, props.children]);
|
|
683
|
+
let content = createMemo$1(() => [startMarker, props.children]);
|
|
650
684
|
createRenderEffect(() => [mount(), content()], ([m, c]) => {
|
|
651
685
|
m.appendChild(endMarker);
|
|
652
686
|
insert(m, c, endMarker);
|
|
@@ -679,8 +713,8 @@ function createElementProxy(el, marker) {
|
|
|
679
713
|
});
|
|
680
714
|
}
|
|
681
715
|
function createDynamic(component, props) {
|
|
682
|
-
const cached = createMemo(component);
|
|
683
|
-
return createMemo(() => {
|
|
716
|
+
const cached = createMemo$1(component);
|
|
717
|
+
return createMemo$1(() => {
|
|
684
718
|
const component = cached();
|
|
685
719
|
switch (typeof component) {
|
|
686
720
|
case "function":
|
package/dist/server.cjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var solidJs = require('solid-js');
|
|
4
4
|
var seroval = require('seroval');
|
|
5
5
|
var web = require('seroval-plugins/web');
|
|
6
|
+
var signals = require('@solidjs/signals');
|
|
6
7
|
|
|
7
8
|
const Properties = /*#__PURE__*/new Set([
|
|
8
9
|
"value", "checked", "selected", "muted"]);
|
|
@@ -24,7 +25,9 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
|
|
|
24
25
|
const effect = (fn, effectFn, initial) => solidJs.createRenderEffect(fn, effectFn, initial, {
|
|
25
26
|
transparent: true
|
|
26
27
|
});
|
|
27
|
-
const memo = fn =>
|
|
28
|
+
const memo = (fn, transparent) => transparent ? fn.$r ? fn : signals.createMemo(() => fn(), undefined, {
|
|
29
|
+
transparent: true
|
|
30
|
+
}) : solidJs.createMemo(() => fn());
|
|
28
31
|
|
|
29
32
|
const ES2017FLAG = seroval.Feature.AggregateError
|
|
30
33
|
| seroval.Feature.BigIntTypedArray;
|
package/dist/server.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { createRenderEffect, createMemo, sharedConfig, createRoot, ssrHandleError, omit, getOwner, getNextChildId, createOwner, runWithOwner } from 'solid-js';
|
|
1
|
+
import { createRenderEffect, createMemo as createMemo$1, sharedConfig, createRoot, ssrHandleError, omit, getOwner, getNextChildId, createOwner, runWithOwner } from 'solid-js';
|
|
2
2
|
export { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Show, Switch, createComponent, getOwner, ssrRunInScope, untrack } from 'solid-js';
|
|
3
3
|
import { Serializer, Feature, getCrossReferenceHeader } from 'seroval';
|
|
4
4
|
import { AbortSignalPlugin, CustomEventPlugin, DOMExceptionPlugin, EventPlugin, FormDataPlugin, HeadersPlugin, ReadableStreamPlugin, RequestPlugin, ResponsePlugin, URLSearchParamsPlugin, URLPlugin } from 'seroval-plugins/web';
|
|
5
|
+
import { createMemo } from '@solidjs/signals';
|
|
5
6
|
|
|
6
7
|
const Properties = /*#__PURE__*/new Set([
|
|
7
8
|
"value", "checked", "selected", "muted"]);
|
|
@@ -23,7 +24,9 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
|
|
|
23
24
|
const effect = (fn, effectFn, initial) => createRenderEffect(fn, effectFn, initial, {
|
|
24
25
|
transparent: true
|
|
25
26
|
});
|
|
26
|
-
const memo = fn => createMemo(() => fn()
|
|
27
|
+
const memo = (fn, transparent) => transparent ? fn.$r ? fn : createMemo(() => fn(), undefined, {
|
|
28
|
+
transparent: true
|
|
29
|
+
}) : createMemo$1(() => fn());
|
|
27
30
|
|
|
28
31
|
const ES2017FLAG = Feature.AggregateError
|
|
29
32
|
| Feature.BigIntTypedArray;
|
package/dist/web.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var solidJs = require('solid-js');
|
|
4
|
+
var signals = require('@solidjs/signals');
|
|
4
5
|
|
|
5
6
|
const Properties = /*#__PURE__*/new Set([
|
|
6
7
|
"value", "checked", "selected", "muted"]);
|
|
@@ -22,7 +23,9 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
|
|
|
22
23
|
const effect = (fn, effectFn, initial) => solidJs.createRenderEffect(fn, effectFn, initial, {
|
|
23
24
|
transparent: true
|
|
24
25
|
});
|
|
25
|
-
const memo = fn =>
|
|
26
|
+
const memo = (fn, transparent) => transparent ? fn.$r ? fn : signals.createMemo(() => fn(), undefined, {
|
|
27
|
+
transparent: true
|
|
28
|
+
}) : solidJs.createMemo(() => fn());
|
|
26
29
|
|
|
27
30
|
function reconcileArrays(parentNode, a, b) {
|
|
28
31
|
let bLength = b.length,
|
|
@@ -82,7 +85,7 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
const $$EVENTS = "_$DX_DELEGATE";
|
|
85
|
-
function render(code, element, init, options = {}) {
|
|
88
|
+
function render$1(code, element, init, options = {}) {
|
|
86
89
|
let disposer;
|
|
87
90
|
solidJs.createRoot(dispose => {
|
|
88
91
|
disposer = dispose;
|
|
@@ -251,6 +254,12 @@ function insert(parent, accessor, marker, initial) {
|
|
|
251
254
|
accessor = normalize(accessor, initial, multi, true);
|
|
252
255
|
if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
|
|
253
256
|
}
|
|
257
|
+
accessor = memo(accessor, true);
|
|
258
|
+
if (multi && initial.length === 0 && !isHydrating(parent)) {
|
|
259
|
+
const placeholder = document.createTextNode("");
|
|
260
|
+
parent.insertBefore(placeholder, marker);
|
|
261
|
+
initial = [placeholder];
|
|
262
|
+
}
|
|
254
263
|
effect(prev => normalize(accessor, prev, multi), (value, current) => insertExpression(parent, value, current, marker), initial);
|
|
255
264
|
}
|
|
256
265
|
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
@@ -271,7 +280,7 @@ function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = fals
|
|
|
271
280
|
}
|
|
272
281
|
}
|
|
273
282
|
function hydrate$1(code, element, options = {}) {
|
|
274
|
-
if (globalThis._$HY.done) return render(code, element, [...element.childNodes], options);
|
|
283
|
+
if (globalThis._$HY.done) return render$1(code, element, [...element.childNodes], options);
|
|
275
284
|
options.renderId ||= "";
|
|
276
285
|
if (!globalThis._$HY.modules) globalThis._$HY.modules = {};
|
|
277
286
|
if (!globalThis._$HY.loading) globalThis._$HY.loading = {};
|
|
@@ -300,7 +309,7 @@ function hydrate$1(code, element, options = {}) {
|
|
|
300
309
|
solidJs.sharedConfig.hydrating = true;
|
|
301
310
|
try {
|
|
302
311
|
gatherHydratable(element, options.renderId);
|
|
303
|
-
return render(code, element, [...element.childNodes], options);
|
|
312
|
+
return render$1(code, element, [...element.childNodes], options);
|
|
304
313
|
} finally {
|
|
305
314
|
solidJs.sharedConfig.hydrating = false;
|
|
306
315
|
}
|
|
@@ -576,6 +585,10 @@ function ssrHydrationKey() {}
|
|
|
576
585
|
function resolveSSRNode(node) {}
|
|
577
586
|
function escape(html) {}
|
|
578
587
|
|
|
588
|
+
function render(...args) {
|
|
589
|
+
const result = render$1(...args);
|
|
590
|
+
return result;
|
|
591
|
+
}
|
|
579
592
|
const isServer = false;
|
|
580
593
|
const isDev = false;
|
|
581
594
|
const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
package/dist/web.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner,
|
|
1
|
+
import { createRenderEffect, createMemo as createMemo$1, sharedConfig, untrack, runWithOwner, flatten, createRoot, omit, enableHydration } from 'solid-js';
|
|
2
2
|
export { Errored, For, Hydration, Loading, Match, NoHydration, Show, Switch, createComponent, getOwner, merge as mergeProps, untrack } from 'solid-js';
|
|
3
|
+
import { createMemo } from '@solidjs/signals';
|
|
3
4
|
|
|
4
5
|
const Properties = /*#__PURE__*/new Set([
|
|
5
6
|
"value", "checked", "selected", "muted"]);
|
|
@@ -21,7 +22,9 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
|
|
|
21
22
|
const effect = (fn, effectFn, initial) => createRenderEffect(fn, effectFn, initial, {
|
|
22
23
|
transparent: true
|
|
23
24
|
});
|
|
24
|
-
const memo = fn => createMemo(() => fn()
|
|
25
|
+
const memo = (fn, transparent) => transparent ? fn.$r ? fn : createMemo(() => fn(), undefined, {
|
|
26
|
+
transparent: true
|
|
27
|
+
}) : createMemo$1(() => fn());
|
|
25
28
|
|
|
26
29
|
function reconcileArrays(parentNode, a, b) {
|
|
27
30
|
let bLength = b.length,
|
|
@@ -81,7 +84,7 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
81
84
|
}
|
|
82
85
|
|
|
83
86
|
const $$EVENTS = "_$DX_DELEGATE";
|
|
84
|
-
function render(code, element, init, options = {}) {
|
|
87
|
+
function render$1(code, element, init, options = {}) {
|
|
85
88
|
let disposer;
|
|
86
89
|
createRoot(dispose => {
|
|
87
90
|
disposer = dispose;
|
|
@@ -250,6 +253,12 @@ function insert(parent, accessor, marker, initial) {
|
|
|
250
253
|
accessor = normalize(accessor, initial, multi, true);
|
|
251
254
|
if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
|
|
252
255
|
}
|
|
256
|
+
accessor = memo(accessor, true);
|
|
257
|
+
if (multi && initial.length === 0 && !isHydrating(parent)) {
|
|
258
|
+
const placeholder = document.createTextNode("");
|
|
259
|
+
parent.insertBefore(placeholder, marker);
|
|
260
|
+
initial = [placeholder];
|
|
261
|
+
}
|
|
253
262
|
effect(prev => normalize(accessor, prev, multi), (value, current) => insertExpression(parent, value, current, marker), initial);
|
|
254
263
|
}
|
|
255
264
|
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
@@ -270,7 +279,7 @@ function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = fals
|
|
|
270
279
|
}
|
|
271
280
|
}
|
|
272
281
|
function hydrate$1(code, element, options = {}) {
|
|
273
|
-
if (globalThis._$HY.done) return render(code, element, [...element.childNodes], options);
|
|
282
|
+
if (globalThis._$HY.done) return render$1(code, element, [...element.childNodes], options);
|
|
274
283
|
options.renderId ||= "";
|
|
275
284
|
if (!globalThis._$HY.modules) globalThis._$HY.modules = {};
|
|
276
285
|
if (!globalThis._$HY.loading) globalThis._$HY.loading = {};
|
|
@@ -299,7 +308,7 @@ function hydrate$1(code, element, options = {}) {
|
|
|
299
308
|
sharedConfig.hydrating = true;
|
|
300
309
|
try {
|
|
301
310
|
gatherHydratable(element, options.renderId);
|
|
302
|
-
return render(code, element, [...element.childNodes], options);
|
|
311
|
+
return render$1(code, element, [...element.childNodes], options);
|
|
303
312
|
} finally {
|
|
304
313
|
sharedConfig.hydrating = false;
|
|
305
314
|
}
|
|
@@ -575,6 +584,10 @@ function ssrHydrationKey() {}
|
|
|
575
584
|
function resolveSSRNode(node) {}
|
|
576
585
|
function escape(html) {}
|
|
577
586
|
|
|
587
|
+
function render(...args) {
|
|
588
|
+
const result = render$1(...args);
|
|
589
|
+
return result;
|
|
590
|
+
}
|
|
578
591
|
const isServer = false;
|
|
579
592
|
const isDev = false;
|
|
580
593
|
const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
@@ -592,7 +605,7 @@ function Portal(props) {
|
|
|
592
605
|
startMarker = document.createTextNode(""),
|
|
593
606
|
endMarker = document.createTextNode(""),
|
|
594
607
|
mount = () => createElementProxy(props.mount || document.body, treeMarker);
|
|
595
|
-
let content = createMemo(() => [startMarker, props.children]);
|
|
608
|
+
let content = createMemo$1(() => [startMarker, props.children]);
|
|
596
609
|
createRenderEffect(() => [mount(), content()], ([m, c]) => {
|
|
597
610
|
m.appendChild(endMarker);
|
|
598
611
|
insert(m, c, endMarker);
|
|
@@ -625,8 +638,8 @@ function createElementProxy(el, marker) {
|
|
|
625
638
|
});
|
|
626
639
|
}
|
|
627
640
|
function createDynamic(component, props) {
|
|
628
|
-
const cached = createMemo(component);
|
|
629
|
-
return createMemo(() => {
|
|
641
|
+
const cached = createMemo$1(component);
|
|
642
|
+
return createMemo$1(() => {
|
|
630
643
|
const component = cached();
|
|
631
644
|
switch (typeof component) {
|
|
632
645
|
case "function":
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidjs/web",
|
|
3
3
|
"description": "Solid's web runtime for the browser and the server",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.2",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://solidjs.com",
|
|
@@ -75,10 +75,11 @@
|
|
|
75
75
|
"seroval-plugins": "^1.1.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"solid-js": "^2.0.0-beta.
|
|
78
|
+
"solid-js": "^2.0.0-beta.2",
|
|
79
|
+
"@solidjs/signals": "^0.12.0"
|
|
79
80
|
},
|
|
80
81
|
"devDependencies": {
|
|
81
|
-
"solid-js": "2.0.0-beta.
|
|
82
|
+
"solid-js": "2.0.0-beta.2"
|
|
82
83
|
},
|
|
83
84
|
"scripts": {
|
|
84
85
|
"build": "npm-run-all -nl build:*",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { hydrate as hydrateCore } from "./client.js";
|
|
1
|
+
import { hydrate as hydrateCore, render as renderCore } from "./client.js";
|
|
2
2
|
import { JSX, ComponentProps, ValidComponent } from "solid-js";
|
|
3
3
|
export * from "./client.js";
|
|
4
|
+
export declare function render(...args: Parameters<typeof renderCore>): ReturnType<typeof renderCore>;
|
|
4
5
|
export { For, Show, Switch, Match, Errored, Loading, NoHydration, Hydration, merge as mergeProps } from "solid-js";
|
|
5
6
|
export * from "./server-mock.js";
|
|
6
7
|
export declare const isServer: boolean;
|
package/types/core.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { getOwner, runWithOwner, createComponent, createRoot as root, sharedConfig, untrack, merge as mergeProps, flatten, ssrHandleError, ssrRunInScope } from "solid-js";
|
|
2
2
|
export declare const effect: (fn: any, effectFn: any, initial: any) => void;
|
|
3
|
-
export declare const memo: (fn: any) =>
|
|
3
|
+
export declare const memo: (fn: any, transparent: any) => any;
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { hydrate as hydrateCore } from "./client.js";
|
|
1
|
+
import { hydrate as hydrateCore, render as renderCore } from "./client.js";
|
|
2
2
|
import { JSX, ComponentProps, ValidComponent } from "solid-js";
|
|
3
3
|
export * from "./client.js";
|
|
4
|
+
export declare function render(...args: Parameters<typeof renderCore>): ReturnType<typeof renderCore>;
|
|
4
5
|
export { For, Show, Switch, Match, Errored, Loading, NoHydration, Hydration, merge as mergeProps } from "solid-js";
|
|
5
6
|
export * from "./server-mock.js";
|
|
6
7
|
export declare const isServer: boolean;
|