+8
-1
@@ -307,2 +307,8 @@ 'use strict'; | ||
| [state, setState] = createSignal(resolved ? "ready" : "unresolved"); | ||
| if (Owner) onCleanup(() => { | ||
| for (const c of contexts.keys()) c.decrement(); | ||
| contexts.clear(); | ||
| if (Transition && pr) Transition.promises.delete(pr); | ||
| pr = null; | ||
| }); | ||
| if (sharedConfig.context) { | ||
@@ -1499,5 +1505,6 @@ id = sharedConfig.getNextContextId(); | ||
| comp = s; | ||
| onCleanup(() => comp = undefined); | ||
| } | ||
| let Comp; | ||
| return createMemo(() => (Comp = comp()) ? untrack(() => { | ||
| return createMemo(() => (Comp = comp?.()) ? untrack(() => { | ||
| if (IS_DEV) Object.assign(Comp, { | ||
@@ -1504,0 +1511,0 @@ [$DEVCOMP]: true |
+8
-1
@@ -305,2 +305,8 @@ let taskIdCounter = 1, | ||
| [state, setState] = createSignal(resolved ? "ready" : "unresolved"); | ||
| if (Owner) onCleanup(() => { | ||
| for (const c of contexts.keys()) c.decrement(); | ||
| contexts.clear(); | ||
| if (Transition && pr) Transition.promises.delete(pr); | ||
| pr = null; | ||
| }); | ||
| if (sharedConfig.context) { | ||
@@ -1497,5 +1503,6 @@ id = sharedConfig.getNextContextId(); | ||
| comp = s; | ||
| onCleanup(() => comp = undefined); | ||
| } | ||
| let Comp; | ||
| return createMemo(() => (Comp = comp()) ? untrack(() => { | ||
| return createMemo(() => (Comp = comp?.()) ? untrack(() => { | ||
| if (IS_DEV) Object.assign(Comp, { | ||
@@ -1502,0 +1509,0 @@ [$DEVCOMP]: true |
+3
-3
@@ -418,3 +418,3 @@ 'use strict'; | ||
| for (const key in descriptors) { | ||
| if (key in target) continue; | ||
| if (key === "__proto__" || key === "constructor" || Object.prototype.hasOwnProperty.call(target, key)) continue; | ||
| Object.defineProperty(target, key, { | ||
@@ -471,3 +471,3 @@ enumerable: true, | ||
| let c; | ||
| return props.when ? typeof (c = props.children) === "function" ? c(props.keyed ? props.when : () => props.when) : c : props.fallback || ""; | ||
| return props.when ? typeof (c = props.children) === "function" && c.length > 0 ? c(props.keyed ? props.when : () => props.when) : c : props.fallback || ""; | ||
| } | ||
@@ -481,3 +481,3 @@ function Switch(props) { | ||
| const c = conditions[i].children; | ||
| return typeof c === "function" ? c(conditions[i].keyed ? w : () => w) : c; | ||
| return typeof c === "function" && c.length > 0 ? c(conditions[i].keyed ? w : () => w) : c; | ||
| } | ||
@@ -484,0 +484,0 @@ } |
+3
-3
@@ -416,3 +416,3 @@ const equalFn = (a, b) => a === b; | ||
| for (const key in descriptors) { | ||
| if (key in target) continue; | ||
| if (key === "__proto__" || key === "constructor" || Object.prototype.hasOwnProperty.call(target, key)) continue; | ||
| Object.defineProperty(target, key, { | ||
@@ -469,3 +469,3 @@ enumerable: true, | ||
| let c; | ||
| return props.when ? typeof (c = props.children) === "function" ? c(props.keyed ? props.when : () => props.when) : c : props.fallback || ""; | ||
| return props.when ? typeof (c = props.children) === "function" && c.length > 0 ? c(props.keyed ? props.when : () => props.when) : c : props.fallback || ""; | ||
| } | ||
@@ -479,3 +479,3 @@ function Switch(props) { | ||
| const c = conditions[i].children; | ||
| return typeof c === "function" ? c(conditions[i].keyed ? w : () => w) : c; | ||
| return typeof c === "function" && c.length > 0 ? c(conditions[i].keyed ? w : () => w) : c; | ||
| } | ||
@@ -482,0 +482,0 @@ } |
+8
-1
@@ -288,2 +288,8 @@ 'use strict'; | ||
| [state, setState] = createSignal(resolved ? "ready" : "unresolved"); | ||
| if (Owner) onCleanup(() => { | ||
| for (const c of contexts.keys()) c.decrement(); | ||
| contexts.clear(); | ||
| if (Transition && pr) Transition.promises.delete(pr); | ||
| pr = null; | ||
| }); | ||
| if (sharedConfig.context) { | ||
@@ -1449,5 +1455,6 @@ id = sharedConfig.getNextContextId(); | ||
| comp = s; | ||
| onCleanup(() => comp = undefined); | ||
| } | ||
| let Comp; | ||
| return createMemo(() => (Comp = comp()) ? untrack(() => { | ||
| return createMemo(() => (Comp = comp?.()) ? untrack(() => { | ||
| if (IS_DEV) ; | ||
@@ -1454,0 +1461,0 @@ if (!ctx || sharedConfig.done) return Comp(props); |
+8
-1
@@ -286,2 +286,8 @@ let taskIdCounter = 1, | ||
| [state, setState] = createSignal(resolved ? "ready" : "unresolved"); | ||
| if (Owner) onCleanup(() => { | ||
| for (const c of contexts.keys()) c.decrement(); | ||
| contexts.clear(); | ||
| if (Transition && pr) Transition.promises.delete(pr); | ||
| pr = null; | ||
| }); | ||
| if (sharedConfig.context) { | ||
@@ -1447,5 +1453,6 @@ id = sharedConfig.getNextContextId(); | ||
| comp = s; | ||
| onCleanup(() => comp = undefined); | ||
| } | ||
| let Comp; | ||
| return createMemo(() => (Comp = comp()) ? untrack(() => { | ||
| return createMemo(() => (Comp = comp?.()) ? untrack(() => { | ||
| if (IS_DEV) ; | ||
@@ -1452,0 +1459,0 @@ if (!ctx || sharedConfig.done) return Comp(props); |
+3
-3
| { | ||
| "name": "solid-js", | ||
| "description": "A declarative JavaScript library for building user interfaces.", | ||
| "version": "1.9.13", | ||
| "version": "1.9.14", | ||
| "author": "Ryan Carniato", | ||
@@ -218,4 +218,4 @@ "license": "MIT", | ||
| "csstype": "^3.1.0", | ||
| "seroval": "~1.5.0", | ||
| "seroval-plugins": "~1.5.0" | ||
| "seroval": "~1.5.4", | ||
| "seroval-plugins": "~1.5.4" | ||
| }, | ||
@@ -222,0 +222,0 @@ "scripts": { |
+1
-1
@@ -189,3 +189,3 @@ <p> | ||
| <a href="https://github.com/solidjs/solid/graphs/contributors"><img src="https://opencollective.com/solid/contributors.svg?width=890&button=false" style="max-width:100%;"></a> | ||
| <a href="https://github.com/solidjs/solid/graphs/contributors"><img src="https://contrib.rocks/image?repo=solidjs/solid" style="max-width:100%;"></a> | ||
@@ -192,0 +192,0 @@ ### Open Collective |
@@ -115,3 +115,3 @@ 'use strict'; | ||
| const desc = Object.getOwnPropertyDescriptor(target, property); | ||
| if (solidJs.getListener() && (typeof value !== "function" || target.hasOwnProperty(property)) && !(desc && desc.get)) value = getNode(nodes, property, value)(); | ||
| if (solidJs.getListener() && (typeof value !== "function" || Object.prototype.hasOwnProperty.call(target, property)) && !(desc && desc.get)) value = getNode(nodes, property, value)(); | ||
| } | ||
@@ -276,3 +276,3 @@ return isWrappable(value) ? wrap$1(value) : value; | ||
| const isFunction = typeof value === "function"; | ||
| if (solidJs.getListener() && (!isFunction || target.hasOwnProperty(property)) && !(desc && desc.get)) value = getNode(nodes, property, value)();else if (value != null && isFunction && value === Array.prototype[property]) { | ||
| if (solidJs.getListener() && (!isFunction || Object.prototype.hasOwnProperty.call(target, property)) && !(desc && desc.get)) value = getNode(nodes, property, value)();else if (value != null && isFunction && value === Array.prototype[property]) { | ||
| return (...args) => solidJs.batch(() => Array.prototype[property].apply(receiver, args)); | ||
@@ -279,0 +279,0 @@ } |
@@ -113,3 +113,3 @@ import { $PROXY, DEV as DEV$1, batch, $TRACK, getListener, createSignal } from 'solid-js'; | ||
| const desc = Object.getOwnPropertyDescriptor(target, property); | ||
| if (getListener() && (typeof value !== "function" || target.hasOwnProperty(property)) && !(desc && desc.get)) value = getNode(nodes, property, value)(); | ||
| if (getListener() && (typeof value !== "function" || Object.prototype.hasOwnProperty.call(target, property)) && !(desc && desc.get)) value = getNode(nodes, property, value)(); | ||
| } | ||
@@ -274,3 +274,3 @@ return isWrappable(value) ? wrap$1(value) : value; | ||
| const isFunction = typeof value === "function"; | ||
| if (getListener() && (!isFunction || target.hasOwnProperty(property)) && !(desc && desc.get)) value = getNode(nodes, property, value)();else if (value != null && isFunction && value === Array.prototype[property]) { | ||
| if (getListener() && (!isFunction || Object.prototype.hasOwnProperty.call(target, property)) && !(desc && desc.get)) value = getNode(nodes, property, value)();else if (value != null && isFunction && value === Array.prototype[property]) { | ||
| return (...args) => batch(() => Array.prototype[property].apply(receiver, args)); | ||
@@ -277,0 +277,0 @@ } |
@@ -112,3 +112,3 @@ 'use strict'; | ||
| const desc = Object.getOwnPropertyDescriptor(target, property); | ||
| if (solidJs.getListener() && (typeof value !== "function" || target.hasOwnProperty(property)) && !(desc && desc.get)) value = getNode(nodes, property, value)(); | ||
| if (solidJs.getListener() && (typeof value !== "function" || Object.prototype.hasOwnProperty.call(target, property)) && !(desc && desc.get)) value = getNode(nodes, property, value)(); | ||
| } | ||
@@ -263,3 +263,3 @@ return isWrappable(value) ? wrap$1(value) : value; | ||
| const isFunction = typeof value === "function"; | ||
| if (solidJs.getListener() && (!isFunction || target.hasOwnProperty(property)) && !(desc && desc.get)) value = getNode(nodes, property, value)();else if (value != null && isFunction && value === Array.prototype[property]) { | ||
| if (solidJs.getListener() && (!isFunction || Object.prototype.hasOwnProperty.call(target, property)) && !(desc && desc.get)) value = getNode(nodes, property, value)();else if (value != null && isFunction && value === Array.prototype[property]) { | ||
| return (...args) => solidJs.batch(() => Array.prototype[property].apply(receiver, args)); | ||
@@ -266,0 +266,0 @@ } |
@@ -110,3 +110,3 @@ import { batch, $PROXY, $TRACK, getListener, createSignal } from 'solid-js'; | ||
| const desc = Object.getOwnPropertyDescriptor(target, property); | ||
| if (getListener() && (typeof value !== "function" || target.hasOwnProperty(property)) && !(desc && desc.get)) value = getNode(nodes, property, value)(); | ||
| if (getListener() && (typeof value !== "function" || Object.prototype.hasOwnProperty.call(target, property)) && !(desc && desc.get)) value = getNode(nodes, property, value)(); | ||
| } | ||
@@ -261,3 +261,3 @@ return isWrappable(value) ? wrap$1(value) : value; | ||
| const isFunction = typeof value === "function"; | ||
| if (getListener() && (!isFunction || target.hasOwnProperty(property)) && !(desc && desc.get)) value = getNode(nodes, property, value)();else if (value != null && isFunction && value === Array.prototype[property]) { | ||
| if (getListener() && (!isFunction || Object.prototype.hasOwnProperty.call(target, property)) && !(desc && desc.get)) value = getNode(nodes, property, value)();else if (value != null && isFunction && value === Array.prototype[property]) { | ||
| return (...args) => batch(() => Array.prototype[property].apply(receiver, args)); | ||
@@ -264,0 +264,0 @@ } |
@@ -27,2 +27,3 @@ import { Accessor, Setter, Signal } from "./reactive.js"; | ||
| export declare function createComponent<T>(Comp: (props: T) => JSX.Element, props: T): JSX.Element; | ||
| export declare function mergeProps<T>(source: T): T; | ||
| export declare function mergeProps<T, U>(source: T, source1: U): T & U; | ||
@@ -29,0 +30,0 @@ export declare function mergeProps<T, U, V>(source: T, source1: U, source2: V): T & U & V; |
+1
-1
@@ -753,3 +753,3 @@ 'use strict'; | ||
| props.ref && props.ref(container); | ||
| solidJs.onCleanup(() => el.removeChild(container)); | ||
| solidJs.onCleanup(() => el.contains(container) && el.removeChild(container)); | ||
| } | ||
@@ -756,0 +756,0 @@ }, undefined, { |
+1
-1
@@ -752,3 +752,3 @@ import { createMemo, sharedConfig, createRenderEffect, createRoot, untrack, splitProps, getOwner, createEffect, runWithOwner, createSignal, onCleanup, $DEVCOMP, enableHydration } from 'solid-js'; | ||
| props.ref && props.ref(container); | ||
| onCleanup(() => el.removeChild(container)); | ||
| onCleanup(() => el.contains(container) && el.removeChild(container)); | ||
| } | ||
@@ -755,0 +755,0 @@ }, undefined, { |
+1
-1
@@ -745,3 +745,3 @@ 'use strict'; | ||
| props.ref && props.ref(container); | ||
| solidJs.onCleanup(() => el.removeChild(container)); | ||
| solidJs.onCleanup(() => el.contains(container) && el.removeChild(container)); | ||
| } | ||
@@ -748,0 +748,0 @@ }, undefined, { |
+1
-1
@@ -744,3 +744,3 @@ import { createMemo, sharedConfig, createRenderEffect, createRoot, untrack, splitProps, getOwner, createEffect, runWithOwner, createSignal, onCleanup, enableHydration } from 'solid-js'; | ||
| props.ref && props.ref(container); | ||
| onCleanup(() => el.removeChild(container)); | ||
| onCleanup(() => el.contains(container) && el.removeChild(container)); | ||
| } | ||
@@ -747,0 +747,0 @@ }, undefined, { |
1068427
0.14%28405
0.1%Updated
Updated