solid-js 1.6.0-beta.1 → 1.6.0-beta.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/h/jsx-runtime/types/jsx.d.ts +2 -2
- package/package.json +1 -1
- package/types/jsx.d.ts +2 -2
- package/web/dist/server.cjs +10 -2
- package/web/dist/server.js +10 -2
|
@@ -603,7 +603,7 @@ export namespace JSX {
|
|
|
603
603
|
|
|
604
604
|
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
|
|
605
605
|
accessKey?: FunctionMaybe<string>;
|
|
606
|
-
class?: FunctionMaybe<string
|
|
606
|
+
class?: FunctionMaybe<string> | undefined;
|
|
607
607
|
contenteditable?: FunctionMaybe<boolean | "inherit">;
|
|
608
608
|
contextmenu?: FunctionMaybe<string>;
|
|
609
609
|
dir?: FunctionMaybe<HTMLDir>;
|
|
@@ -1090,7 +1090,7 @@ export namespace JSX {
|
|
|
1090
1090
|
tabindex?: FunctionMaybe<number | string>;
|
|
1091
1091
|
}
|
|
1092
1092
|
interface StylableSVGAttributes {
|
|
1093
|
-
class?: FunctionMaybe<string
|
|
1093
|
+
class?: FunctionMaybe<string> | undefined;
|
|
1094
1094
|
style?: FunctionMaybe<CSSProperties | string>;
|
|
1095
1095
|
}
|
|
1096
1096
|
interface TransformableSVGAttributes {
|
package/package.json
CHANGED
package/types/jsx.d.ts
CHANGED
|
@@ -611,7 +611,7 @@ export namespace JSX {
|
|
|
611
611
|
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
|
|
612
612
|
// [key: ClassKeys]: boolean;
|
|
613
613
|
accessKey?: string;
|
|
614
|
-
class?: string;
|
|
614
|
+
class?: string | undefined;
|
|
615
615
|
contenteditable?: boolean | "inherit";
|
|
616
616
|
contextmenu?: string;
|
|
617
617
|
dir?: HTMLDir;
|
|
@@ -1098,7 +1098,7 @@ export namespace JSX {
|
|
|
1098
1098
|
tabindex?: number | string;
|
|
1099
1099
|
}
|
|
1100
1100
|
interface StylableSVGAttributes {
|
|
1101
|
-
class?: string;
|
|
1101
|
+
class?: string | undefined;
|
|
1102
1102
|
style?: CSSProperties | string;
|
|
1103
1103
|
}
|
|
1104
1104
|
interface TransformableSVGAttributes {
|
package/web/dist/server.cjs
CHANGED
|
@@ -647,8 +647,16 @@ function generateHydrationScript({
|
|
|
647
647
|
return `<script${nonce ? ` nonce="${nonce}"` : ""}>var e,t;e=window._$HY||(_$HY={events:[],completed:new WeakSet,r:{}}),t=e=>e&&e.hasAttribute&&(e.hasAttribute("data-hk")?e:t(e.host&&e.host instanceof Node?e.host:e.parentNode)),["${eventNames.join('","')}"].forEach((o=>document.addEventListener(o,(o=>{let s=o.composedPath&&o.composedPath()[0]||o.target,a=t(s);a&&!e.completed.has(a)&&e.events.push([a,o])})))),e.init=(t,o)=>{e.r[t]=[new Promise(((e,t)=>o=e)),o]},e.set=(t,o,s)=>{(s=e.r[t])&&s[1](o),e.r[t]=[o]},e.unset=t=>{delete e.r[t]},e.load=t=>e.r[t];</script><!--xs-->`;
|
|
648
648
|
}
|
|
649
649
|
function Hydration(props) {
|
|
650
|
-
solidJs.sharedConfig.context.noHydrate
|
|
651
|
-
|
|
650
|
+
if (!solidJs.sharedConfig.context.noHydrate) return props.children;
|
|
651
|
+
const context = solidJs.sharedConfig.context;
|
|
652
|
+
solidJs.sharedConfig.context = { ...context,
|
|
653
|
+
count: 0,
|
|
654
|
+
id: `${context.id}${context.count++}-`,
|
|
655
|
+
noHydrate: false
|
|
656
|
+
};
|
|
657
|
+
const res = props.children;
|
|
658
|
+
solidJs.sharedConfig.context = context;
|
|
659
|
+
return res;
|
|
652
660
|
}
|
|
653
661
|
function NoHydration(props) {
|
|
654
662
|
solidJs.sharedConfig.context.noHydrate = true;
|
package/web/dist/server.js
CHANGED
|
@@ -644,8 +644,16 @@ function generateHydrationScript({
|
|
|
644
644
|
return `<script${nonce ? ` nonce="${nonce}"` : ""}>var e,t;e=window._$HY||(_$HY={events:[],completed:new WeakSet,r:{}}),t=e=>e&&e.hasAttribute&&(e.hasAttribute("data-hk")?e:t(e.host&&e.host instanceof Node?e.host:e.parentNode)),["${eventNames.join('","')}"].forEach((o=>document.addEventListener(o,(o=>{let s=o.composedPath&&o.composedPath()[0]||o.target,a=t(s);a&&!e.completed.has(a)&&e.events.push([a,o])})))),e.init=(t,o)=>{e.r[t]=[new Promise(((e,t)=>o=e)),o]},e.set=(t,o,s)=>{(s=e.r[t])&&s[1](o),e.r[t]=[o]},e.unset=t=>{delete e.r[t]},e.load=t=>e.r[t];</script><!--xs-->`;
|
|
645
645
|
}
|
|
646
646
|
function Hydration(props) {
|
|
647
|
-
sharedConfig.context.noHydrate
|
|
648
|
-
|
|
647
|
+
if (!sharedConfig.context.noHydrate) return props.children;
|
|
648
|
+
const context = sharedConfig.context;
|
|
649
|
+
sharedConfig.context = { ...context,
|
|
650
|
+
count: 0,
|
|
651
|
+
id: `${context.id}${context.count++}-`,
|
|
652
|
+
noHydrate: false
|
|
653
|
+
};
|
|
654
|
+
const res = props.children;
|
|
655
|
+
sharedConfig.context = context;
|
|
656
|
+
return res;
|
|
649
657
|
}
|
|
650
658
|
function NoHydration(props) {
|
|
651
659
|
sharedConfig.context.noHydrate = true;
|