@solidjs/web 2.0.0-experimental.1 → 2.0.0-experimental.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/LICENSE +1 -1
- package/dist/dev.cjs +9 -5
- package/dist/dev.js +629 -81
- package/dist/server.cjs +9 -5
- package/dist/server.js +625 -102
- package/dist/web.cjs +9 -5
- package/dist/web.js +617 -79
- package/package.json +3 -3
- package/storage/dist/storage.js +3 -3
- package/types/client.d.ts +11 -2
- package/types/core.d.ts +11 -1
- package/types/index.d.ts +20 -4
- package/types/server-mock.d.ts +33 -26
package/dist/server.cjs
CHANGED
|
@@ -592,16 +592,19 @@ function notSup() {
|
|
|
592
592
|
|
|
593
593
|
const isServer = true;
|
|
594
594
|
const isDev = false;
|
|
595
|
-
function
|
|
596
|
-
const
|
|
597
|
-
const comp = p.component,
|
|
595
|
+
function createDynamic(component, props) {
|
|
596
|
+
const comp = component(),
|
|
598
597
|
t = typeof comp;
|
|
599
598
|
if (comp) {
|
|
600
|
-
if (t === "function") return comp(
|
|
601
|
-
return ssrElement(comp,
|
|
599
|
+
if (t === "function") return comp(props);else if (t === "string") {
|
|
600
|
+
return ssrElement(comp, props, undefined, true);
|
|
602
601
|
}
|
|
603
602
|
}
|
|
604
603
|
}
|
|
604
|
+
function Dynamic(props) {
|
|
605
|
+
const [, others] = solidJs.splitProps(props, ["component"]);
|
|
606
|
+
return createDynamic(() => props.component, others);
|
|
607
|
+
}
|
|
605
608
|
function Portal(props) {
|
|
606
609
|
return "";
|
|
607
610
|
}
|
|
@@ -678,6 +681,7 @@ exports.SVGNamespace = SVGNamespace;
|
|
|
678
681
|
exports.addEventListener = notSup;
|
|
679
682
|
exports.assign = notSup;
|
|
680
683
|
exports.className = notSup;
|
|
684
|
+
exports.createDynamic = createDynamic;
|
|
681
685
|
exports.delegateEvents = notSup;
|
|
682
686
|
exports.dynamicProperty = notSup;
|
|
683
687
|
exports.escape = escape;
|