+22
-15
@@ -669,17 +669,20 @@ 'use strict'; | ||
| if (Listener) { | ||
| const sSlot = this.observers ? this.observers.length : 0; | ||
| if (!Listener.sources) { | ||
| Listener.sources = [this]; | ||
| Listener.sourceSlots = [sSlot]; | ||
| } else { | ||
| Listener.sources.push(this); | ||
| Listener.sourceSlots.push(sSlot); | ||
| const observers = this.observers; | ||
| if (!observers || observers[observers.length - 1] !== Listener) { | ||
| const sSlot = observers ? observers.length : 0; | ||
| if (!Listener.sources) { | ||
| Listener.sources = [this]; | ||
| Listener.sourceSlots = [sSlot]; | ||
| } else { | ||
| Listener.sources.push(this); | ||
| Listener.sourceSlots.push(sSlot); | ||
| } | ||
| if (!observers) { | ||
| this.observers = [Listener]; | ||
| this.observerSlots = [Listener.sources.length - 1]; | ||
| } else { | ||
| observers.push(Listener); | ||
| this.observerSlots.push(Listener.sources.length - 1); | ||
| } | ||
| } | ||
| if (!this.observers) { | ||
| this.observers = [Listener]; | ||
| this.observerSlots = [Listener.sources.length - 1]; | ||
| } else { | ||
| this.observers.push(Listener); | ||
| this.observerSlots.push(Listener.sources.length - 1); | ||
| } | ||
| } | ||
@@ -1056,3 +1059,7 @@ if (runningTransition && Transition.sources.has(this)) return this.tValue; | ||
| const result = resolveChildren(children[i]); | ||
| Array.isArray(result) ? results.push.apply(results, result) : results.push(result); | ||
| if (Array.isArray(result)) { | ||
| if (result.length < 32768) results.push.apply(results, result);else for (let j = 0; j < result.length; j++) results.push(result[j]); | ||
| } else { | ||
| results.push(result); | ||
| } | ||
| } | ||
@@ -1059,0 +1066,0 @@ return results; |
+22
-15
@@ -667,17 +667,20 @@ let taskIdCounter = 1, | ||
| if (Listener) { | ||
| const sSlot = this.observers ? this.observers.length : 0; | ||
| if (!Listener.sources) { | ||
| Listener.sources = [this]; | ||
| Listener.sourceSlots = [sSlot]; | ||
| } else { | ||
| Listener.sources.push(this); | ||
| Listener.sourceSlots.push(sSlot); | ||
| const observers = this.observers; | ||
| if (!observers || observers[observers.length - 1] !== Listener) { | ||
| const sSlot = observers ? observers.length : 0; | ||
| if (!Listener.sources) { | ||
| Listener.sources = [this]; | ||
| Listener.sourceSlots = [sSlot]; | ||
| } else { | ||
| Listener.sources.push(this); | ||
| Listener.sourceSlots.push(sSlot); | ||
| } | ||
| if (!observers) { | ||
| this.observers = [Listener]; | ||
| this.observerSlots = [Listener.sources.length - 1]; | ||
| } else { | ||
| observers.push(Listener); | ||
| this.observerSlots.push(Listener.sources.length - 1); | ||
| } | ||
| } | ||
| if (!this.observers) { | ||
| this.observers = [Listener]; | ||
| this.observerSlots = [Listener.sources.length - 1]; | ||
| } else { | ||
| this.observers.push(Listener); | ||
| this.observerSlots.push(Listener.sources.length - 1); | ||
| } | ||
| } | ||
@@ -1054,3 +1057,7 @@ if (runningTransition && Transition.sources.has(this)) return this.tValue; | ||
| const result = resolveChildren(children[i]); | ||
| Array.isArray(result) ? results.push.apply(results, result) : results.push(result); | ||
| if (Array.isArray(result)) { | ||
| if (result.length < 32768) results.push.apply(results, result);else for (let j = 0; j < result.length; j++) results.push(result[j]); | ||
| } else { | ||
| results.push(result); | ||
| } | ||
| } | ||
@@ -1057,0 +1064,0 @@ return results; |
+5
-1
@@ -195,3 +195,7 @@ 'use strict'; | ||
| const result = resolveChildren(children[i]); | ||
| Array.isArray(result) ? results.push.apply(results, result) : results.push(result); | ||
| if (Array.isArray(result)) { | ||
| if (result.length < 32768) results.push.apply(results, result);else for (let j = 0; j < result.length; j++) results.push(result[j]); | ||
| } else { | ||
| results.push(result); | ||
| } | ||
| } | ||
@@ -198,0 +202,0 @@ return results; |
+5
-1
@@ -193,3 +193,7 @@ const equalFn = (a, b) => a === b; | ||
| const result = resolveChildren(children[i]); | ||
| Array.isArray(result) ? results.push.apply(results, result) : results.push(result); | ||
| if (Array.isArray(result)) { | ||
| if (result.length < 32768) results.push.apply(results, result);else for (let j = 0; j < result.length; j++) results.push(result[j]); | ||
| } else { | ||
| results.push(result); | ||
| } | ||
| } | ||
@@ -196,0 +200,0 @@ return results; |
+22
-15
@@ -626,17 +626,20 @@ 'use strict'; | ||
| if (Listener) { | ||
| const sSlot = this.observers ? this.observers.length : 0; | ||
| if (!Listener.sources) { | ||
| Listener.sources = [this]; | ||
| Listener.sourceSlots = [sSlot]; | ||
| } else { | ||
| Listener.sources.push(this); | ||
| Listener.sourceSlots.push(sSlot); | ||
| const observers = this.observers; | ||
| if (!observers || observers[observers.length - 1] !== Listener) { | ||
| const sSlot = observers ? observers.length : 0; | ||
| if (!Listener.sources) { | ||
| Listener.sources = [this]; | ||
| Listener.sourceSlots = [sSlot]; | ||
| } else { | ||
| Listener.sources.push(this); | ||
| Listener.sourceSlots.push(sSlot); | ||
| } | ||
| if (!observers) { | ||
| this.observers = [Listener]; | ||
| this.observerSlots = [Listener.sources.length - 1]; | ||
| } else { | ||
| observers.push(Listener); | ||
| this.observerSlots.push(Listener.sources.length - 1); | ||
| } | ||
| } | ||
| if (!this.observers) { | ||
| this.observers = [Listener]; | ||
| this.observerSlots = [Listener.sources.length - 1]; | ||
| } else { | ||
| this.observers.push(Listener); | ||
| this.observerSlots.push(Listener.sources.length - 1); | ||
| } | ||
| } | ||
@@ -1010,3 +1013,7 @@ if (runningTransition && Transition.sources.has(this)) return this.tValue; | ||
| const result = resolveChildren(children[i]); | ||
| Array.isArray(result) ? results.push.apply(results, result) : results.push(result); | ||
| if (Array.isArray(result)) { | ||
| if (result.length < 32768) results.push.apply(results, result);else for (let j = 0; j < result.length; j++) results.push(result[j]); | ||
| } else { | ||
| results.push(result); | ||
| } | ||
| } | ||
@@ -1013,0 +1020,0 @@ return results; |
+22
-15
@@ -624,17 +624,20 @@ let taskIdCounter = 1, | ||
| if (Listener) { | ||
| const sSlot = this.observers ? this.observers.length : 0; | ||
| if (!Listener.sources) { | ||
| Listener.sources = [this]; | ||
| Listener.sourceSlots = [sSlot]; | ||
| } else { | ||
| Listener.sources.push(this); | ||
| Listener.sourceSlots.push(sSlot); | ||
| const observers = this.observers; | ||
| if (!observers || observers[observers.length - 1] !== Listener) { | ||
| const sSlot = observers ? observers.length : 0; | ||
| if (!Listener.sources) { | ||
| Listener.sources = [this]; | ||
| Listener.sourceSlots = [sSlot]; | ||
| } else { | ||
| Listener.sources.push(this); | ||
| Listener.sourceSlots.push(sSlot); | ||
| } | ||
| if (!observers) { | ||
| this.observers = [Listener]; | ||
| this.observerSlots = [Listener.sources.length - 1]; | ||
| } else { | ||
| observers.push(Listener); | ||
| this.observerSlots.push(Listener.sources.length - 1); | ||
| } | ||
| } | ||
| if (!this.observers) { | ||
| this.observers = [Listener]; | ||
| this.observerSlots = [Listener.sources.length - 1]; | ||
| } else { | ||
| this.observers.push(Listener); | ||
| this.observerSlots.push(Listener.sources.length - 1); | ||
| } | ||
| } | ||
@@ -1008,3 +1011,7 @@ if (runningTransition && Transition.sources.has(this)) return this.tValue; | ||
| const result = resolveChildren(children[i]); | ||
| Array.isArray(result) ? results.push.apply(results, result) : results.push(result); | ||
| if (Array.isArray(result)) { | ||
| if (result.length < 32768) results.push.apply(results, result);else for (let j = 0; j < result.length; j++) results.push(result[j]); | ||
| } else { | ||
| results.push(result); | ||
| } | ||
| } | ||
@@ -1011,0 +1018,0 @@ return results; |
| type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node; | ||
| export type ClassList = { | ||
| [k: string]: boolean | undefined; | ||
| }; | ||
| interface Runtime { | ||
@@ -10,9 +13,3 @@ effect<T>(fn: (prev?: T) => T, init?: T): any; | ||
| delegateEvents(eventNames: string[]): void; | ||
| classList(node: Element, value: { | ||
| [k: string]: boolean; | ||
| }, prev?: { | ||
| [k: string]: boolean; | ||
| }): { | ||
| [k: string]: boolean; | ||
| }; | ||
| classList(node: Element, value: ClassList, prev?: ClassList): ClassList; | ||
| style(node: Element, value: { | ||
@@ -19,0 +16,0 @@ [k: string]: string; |
+1
-1
| { | ||
| "name": "solid-js", | ||
| "description": "A declarative JavaScript library for building user interfaces.", | ||
| "version": "1.9.12", | ||
| "version": "1.9.13", | ||
| "author": "Ryan Carniato", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
+28
-1
@@ -20,7 +20,16 @@ 'use strict'; | ||
| const keys = Object.keys(value), | ||
| desc = Object.getOwnPropertyDescriptors(value); | ||
| desc = Object.getOwnPropertyDescriptors(value), | ||
| proto = Object.getPrototypeOf(value); | ||
| const isClass = proto !== null && value !== null && typeof value === "object" && !Array.isArray(value) && proto !== Object.prototype; | ||
| if (isClass) { | ||
| const descriptors = Object.getOwnPropertyDescriptors(proto); | ||
| keys.push(...Object.keys(descriptors)); | ||
| Object.assign(desc, descriptors); | ||
| } | ||
| for (let i = 0, l = keys.length; i < l; i++) { | ||
| const prop = keys[i]; | ||
| if (isClass && prop === "constructor") continue; | ||
| if (desc[prop].get) { | ||
| Object.defineProperty(value, prop, { | ||
| configurable: true, | ||
| enumerable: desc[prop].enumerable, | ||
@@ -128,2 +137,6 @@ get: desc[prop].get.bind(p) | ||
| function setProperty(state, property, value, deleting = false) { | ||
| if (property === "__proto__") { | ||
| console.warn(`Refusing to set "__proto__" on a store.`); | ||
| return; | ||
| } | ||
| if (!deleting && state[property] === value) return; | ||
@@ -153,5 +166,9 @@ const prev = state[property], | ||
| const key = keys[i]; | ||
| if (isUnsafeKey$1(key)) continue; | ||
| setProperty(state, key, value[key]); | ||
| } | ||
| } | ||
| function isUnsafeKey$1(property) { | ||
| return property === "__proto__" || property === "constructor" || property === "prototype"; | ||
| } | ||
| function updateArray(current, next) { | ||
@@ -178,2 +195,6 @@ if (typeof next === "function") next = next(current); | ||
| isArray = Array.isArray(current); | ||
| if (partType === "string" && (part === "__proto__" || path.length > 1 && isUnsafeKey$1(part))) { | ||
| console.warn(`Refusing to traverse unsafe key "${part}" on a store.`); | ||
| return; | ||
| } | ||
| if (Array.isArray(part)) { | ||
@@ -336,3 +357,7 @@ for (let i = 0; i < part.length; i++) { | ||
| const $ROOT = Symbol("store-root"); | ||
| function isUnsafeKey(property) { | ||
| return property === "__proto__" || property === "constructor" || property === "prototype"; | ||
| } | ||
| function applyState(target, parent, property, merge, key) { | ||
| if (isUnsafeKey(property)) return; | ||
| const previous = parent[property]; | ||
@@ -399,2 +424,3 @@ if (target === previous) return; | ||
| for (let i = 0, len = targetKeys.length; i < len; i++) { | ||
| if (isUnsafeKey(targetKeys[i])) continue; | ||
| applyState(target[targetKeys[i]], previous, targetKeys[i], merge, key); | ||
@@ -426,2 +452,3 @@ } | ||
| const value = target[property]; | ||
| if (property === solidJs.$PROXY || property === solidJs.$TRACK || property === $NODE || property === $HAS || property === "__proto__") return value; | ||
| let proxy; | ||
@@ -428,0 +455,0 @@ return isWrappable(value) ? producers.get(value) || (producers.set(value, proxy = new Proxy(value, setterTraps)), proxy) : value; |
+28
-1
@@ -18,7 +18,16 @@ import { $PROXY, DEV as DEV$1, batch, $TRACK, getListener, createSignal } from 'solid-js'; | ||
| const keys = Object.keys(value), | ||
| desc = Object.getOwnPropertyDescriptors(value); | ||
| desc = Object.getOwnPropertyDescriptors(value), | ||
| proto = Object.getPrototypeOf(value); | ||
| const isClass = proto !== null && value !== null && typeof value === "object" && !Array.isArray(value) && proto !== Object.prototype; | ||
| if (isClass) { | ||
| const descriptors = Object.getOwnPropertyDescriptors(proto); | ||
| keys.push(...Object.keys(descriptors)); | ||
| Object.assign(desc, descriptors); | ||
| } | ||
| for (let i = 0, l = keys.length; i < l; i++) { | ||
| const prop = keys[i]; | ||
| if (isClass && prop === "constructor") continue; | ||
| if (desc[prop].get) { | ||
| Object.defineProperty(value, prop, { | ||
| configurable: true, | ||
| enumerable: desc[prop].enumerable, | ||
@@ -126,2 +135,6 @@ get: desc[prop].get.bind(p) | ||
| function setProperty(state, property, value, deleting = false) { | ||
| if (property === "__proto__") { | ||
| console.warn(`Refusing to set "__proto__" on a store.`); | ||
| return; | ||
| } | ||
| if (!deleting && state[property] === value) return; | ||
@@ -151,5 +164,9 @@ const prev = state[property], | ||
| const key = keys[i]; | ||
| if (isUnsafeKey$1(key)) continue; | ||
| setProperty(state, key, value[key]); | ||
| } | ||
| } | ||
| function isUnsafeKey$1(property) { | ||
| return property === "__proto__" || property === "constructor" || property === "prototype"; | ||
| } | ||
| function updateArray(current, next) { | ||
@@ -176,2 +193,6 @@ if (typeof next === "function") next = next(current); | ||
| isArray = Array.isArray(current); | ||
| if (partType === "string" && (part === "__proto__" || path.length > 1 && isUnsafeKey$1(part))) { | ||
| console.warn(`Refusing to traverse unsafe key "${part}" on a store.`); | ||
| return; | ||
| } | ||
| if (Array.isArray(part)) { | ||
@@ -334,3 +355,7 @@ for (let i = 0; i < part.length; i++) { | ||
| const $ROOT = Symbol("store-root"); | ||
| function isUnsafeKey(property) { | ||
| return property === "__proto__" || property === "constructor" || property === "prototype"; | ||
| } | ||
| function applyState(target, parent, property, merge, key) { | ||
| if (isUnsafeKey(property)) return; | ||
| const previous = parent[property]; | ||
@@ -397,2 +422,3 @@ if (target === previous) return; | ||
| for (let i = 0, len = targetKeys.length; i < len; i++) { | ||
| if (isUnsafeKey(targetKeys[i])) continue; | ||
| applyState(target[targetKeys[i]], previous, targetKeys[i], merge, key); | ||
@@ -424,2 +450,3 @@ } | ||
| const value = target[property]; | ||
| if (property === $PROXY || property === $TRACK || property === $NODE || property === $HAS || property === "__proto__") return value; | ||
| let proxy; | ||
@@ -426,0 +453,0 @@ return isWrappable(value) ? producers.get(value) || (producers.set(value, proxy = new Proxy(value, setterTraps)), proxy) : value; |
@@ -11,2 +11,3 @@ 'use strict'; | ||
| function setProperty(state, property, value, force) { | ||
| if (property === "__proto__") return; | ||
| if (!force && state[property] === value) return; | ||
@@ -21,5 +22,9 @@ if (value === undefined) { | ||
| const key = keys[i]; | ||
| if (isUnsafeKey(key)) continue; | ||
| setProperty(state, key, value[key], force); | ||
| } | ||
| } | ||
| function isUnsafeKey(property) { | ||
| return property === "__proto__" || property === "constructor" || property === "prototype"; | ||
| } | ||
| function updateArray(current, next) { | ||
@@ -45,2 +50,3 @@ if (typeof next === "function") next = next(current); | ||
| isArray = Array.isArray(current); | ||
| if (partType === "string" && (part === "__proto__" || path.length > 1 && isUnsafeKey(part))) return; | ||
| if (Array.isArray(part)) { | ||
@@ -102,2 +108,3 @@ for (let i = 0; i < part.length; i++) { | ||
| const key = targetKeys[i]; | ||
| if (isUnsafeKey(key)) continue; | ||
| setProperty(state, key, value[key]); | ||
@@ -104,0 +111,0 @@ } |
@@ -9,2 +9,3 @@ const $RAW = Symbol("state-raw"); | ||
| function setProperty(state, property, value, force) { | ||
| if (property === "__proto__") return; | ||
| if (!force && state[property] === value) return; | ||
@@ -19,5 +20,9 @@ if (value === undefined) { | ||
| const key = keys[i]; | ||
| if (isUnsafeKey(key)) continue; | ||
| setProperty(state, key, value[key], force); | ||
| } | ||
| } | ||
| function isUnsafeKey(property) { | ||
| return property === "__proto__" || property === "constructor" || property === "prototype"; | ||
| } | ||
| function updateArray(current, next) { | ||
@@ -43,2 +48,3 @@ if (typeof next === "function") next = next(current); | ||
| isArray = Array.isArray(current); | ||
| if (partType === "string" && (part === "__proto__" || path.length > 1 && isUnsafeKey(part))) return; | ||
| if (Array.isArray(part)) { | ||
@@ -100,2 +106,3 @@ for (let i = 0; i < part.length; i++) { | ||
| const key = targetKeys[i]; | ||
| if (isUnsafeKey(key)) continue; | ||
| setProperty(state, key, value[key]); | ||
@@ -102,0 +109,0 @@ } |
+26
-1
@@ -17,7 +17,16 @@ 'use strict'; | ||
| const keys = Object.keys(value), | ||
| desc = Object.getOwnPropertyDescriptors(value); | ||
| desc = Object.getOwnPropertyDescriptors(value), | ||
| proto = Object.getPrototypeOf(value); | ||
| const isClass = proto !== null && value !== null && typeof value === "object" && !Array.isArray(value) && proto !== Object.prototype; | ||
| if (isClass) { | ||
| const descriptors = Object.getOwnPropertyDescriptors(proto); | ||
| keys.push(...Object.keys(descriptors)); | ||
| Object.assign(desc, descriptors); | ||
| } | ||
| for (let i = 0, l = keys.length; i < l; i++) { | ||
| const prop = keys[i]; | ||
| if (isClass && prop === "constructor") continue; | ||
| if (desc[prop].get) { | ||
| Object.defineProperty(value, prop, { | ||
| configurable: true, | ||
| enumerable: desc[prop].enumerable, | ||
@@ -123,2 +132,5 @@ get: desc[prop].get.bind(p) | ||
| function setProperty(state, property, value, deleting = false) { | ||
| if (property === "__proto__") { | ||
| return; | ||
| } | ||
| if (!deleting && state[property] === value) return; | ||
@@ -147,5 +159,9 @@ const prev = state[property], | ||
| const key = keys[i]; | ||
| if (isUnsafeKey$1(key)) continue; | ||
| setProperty(state, key, value[key]); | ||
| } | ||
| } | ||
| function isUnsafeKey$1(property) { | ||
| return property === "__proto__" || property === "constructor" || property === "prototype"; | ||
| } | ||
| function updateArray(current, next) { | ||
@@ -172,2 +188,5 @@ if (typeof next === "function") next = next(current); | ||
| isArray = Array.isArray(current); | ||
| if (partType === "string" && (part === "__proto__" || path.length > 1 && isUnsafeKey$1(part))) { | ||
| return; | ||
| } | ||
| if (Array.isArray(part)) { | ||
@@ -320,3 +339,7 @@ for (let i = 0; i < part.length; i++) { | ||
| const $ROOT = Symbol("store-root"); | ||
| function isUnsafeKey(property) { | ||
| return property === "__proto__" || property === "constructor" || property === "prototype"; | ||
| } | ||
| function applyState(target, parent, property, merge, key) { | ||
| if (isUnsafeKey(property)) return; | ||
| const previous = parent[property]; | ||
@@ -383,2 +406,3 @@ if (target === previous) return; | ||
| for (let i = 0, len = targetKeys.length; i < len; i++) { | ||
| if (isUnsafeKey(targetKeys[i])) continue; | ||
| applyState(target[targetKeys[i]], previous, targetKeys[i], merge, key); | ||
@@ -410,2 +434,3 @@ } | ||
| const value = target[property]; | ||
| if (property === solidJs.$PROXY || property === solidJs.$TRACK || property === $NODE || property === $HAS || property === "__proto__") return value; | ||
| let proxy; | ||
@@ -412,0 +437,0 @@ return isWrappable(value) ? producers.get(value) || (producers.set(value, proxy = new Proxy(value, setterTraps)), proxy) : value; |
+26
-1
@@ -15,7 +15,16 @@ import { batch, $PROXY, $TRACK, getListener, createSignal } from 'solid-js'; | ||
| const keys = Object.keys(value), | ||
| desc = Object.getOwnPropertyDescriptors(value); | ||
| desc = Object.getOwnPropertyDescriptors(value), | ||
| proto = Object.getPrototypeOf(value); | ||
| const isClass = proto !== null && value !== null && typeof value === "object" && !Array.isArray(value) && proto !== Object.prototype; | ||
| if (isClass) { | ||
| const descriptors = Object.getOwnPropertyDescriptors(proto); | ||
| keys.push(...Object.keys(descriptors)); | ||
| Object.assign(desc, descriptors); | ||
| } | ||
| for (let i = 0, l = keys.length; i < l; i++) { | ||
| const prop = keys[i]; | ||
| if (isClass && prop === "constructor") continue; | ||
| if (desc[prop].get) { | ||
| Object.defineProperty(value, prop, { | ||
| configurable: true, | ||
| enumerable: desc[prop].enumerable, | ||
@@ -121,2 +130,5 @@ get: desc[prop].get.bind(p) | ||
| function setProperty(state, property, value, deleting = false) { | ||
| if (property === "__proto__") { | ||
| return; | ||
| } | ||
| if (!deleting && state[property] === value) return; | ||
@@ -145,5 +157,9 @@ const prev = state[property], | ||
| const key = keys[i]; | ||
| if (isUnsafeKey$1(key)) continue; | ||
| setProperty(state, key, value[key]); | ||
| } | ||
| } | ||
| function isUnsafeKey$1(property) { | ||
| return property === "__proto__" || property === "constructor" || property === "prototype"; | ||
| } | ||
| function updateArray(current, next) { | ||
@@ -170,2 +186,5 @@ if (typeof next === "function") next = next(current); | ||
| isArray = Array.isArray(current); | ||
| if (partType === "string" && (part === "__proto__" || path.length > 1 && isUnsafeKey$1(part))) { | ||
| return; | ||
| } | ||
| if (Array.isArray(part)) { | ||
@@ -318,3 +337,7 @@ for (let i = 0; i < part.length; i++) { | ||
| const $ROOT = Symbol("store-root"); | ||
| function isUnsafeKey(property) { | ||
| return property === "__proto__" || property === "constructor" || property === "prototype"; | ||
| } | ||
| function applyState(target, parent, property, merge, key) { | ||
| if (isUnsafeKey(property)) return; | ||
| const previous = parent[property]; | ||
@@ -381,2 +404,3 @@ if (target === previous) return; | ||
| for (let i = 0, len = targetKeys.length; i < len; i++) { | ||
| if (isUnsafeKey(targetKeys[i])) continue; | ||
| applyState(target[targetKeys[i]], previous, targetKeys[i], merge, key); | ||
@@ -408,2 +432,3 @@ } | ||
| const value = target[property]; | ||
| if (property === $PROXY || property === $TRACK || property === $NODE || property === $HAS || property === "__proto__") return value; | ||
| let proxy; | ||
@@ -410,0 +435,0 @@ return isWrappable(value) ? producers.get(value) || (producers.set(value, proxy = new Proxy(value, setterTraps)), proxy) : value; |
| export { $RAW, createStore, unwrap } from "./store.js"; | ||
| export type { ArrayFilterFn, DeepMutable, DeepReadonly, NotWrappable, Part, SetStoreFunction, SolidStore, Store, StoreNode, StorePathRange, StoreSetter } from "./store.js"; | ||
| export type { ArrayFilterFn, DeepMutable, DeepReadonly, NotWrappable, Part, SetStoreFunction, SolidStore, Store, StoreNode, StoreReturn, StorePathRange, StoreSetter } from "./store.js"; | ||
| export * from "./mutable.js"; | ||
@@ -4,0 +4,0 @@ export * from "./modifiers.js"; |
@@ -1,3 +0,3 @@ | ||
| import type { SetStoreFunction, Store } from "./store.js"; | ||
| export type { ArrayFilterFn, DeepMutable, DeepReadonly, NotWrappable, Part, SetStoreFunction, SolidStore, Store, StoreNode, StorePathRange, StoreSetter } from "./store.js"; | ||
| import type { Store, StoreReturn } from "./store.js"; | ||
| export type { ArrayFilterFn, DeepMutable, DeepReadonly, NotWrappable, Part, SetStoreFunction, SolidStore, Store, StoreNode, StoreReturn, StorePathRange, StoreSetter } from "./store.js"; | ||
| export declare const $RAW: unique symbol; | ||
@@ -8,3 +8,3 @@ export declare function isWrappable(obj: any): boolean; | ||
| export declare function updatePath(current: any, path: any[], traversed?: PropertyKey[]): void; | ||
| export declare function createStore<T>(state: T | Store<T>): [Store<T>, SetStoreFunction<T>]; | ||
| export declare function createStore<T>(state: T | Store<T>): StoreReturn<T>; | ||
| export declare function createMutable<T>(state: T | Store<T>): T; | ||
@@ -11,0 +11,0 @@ export declare function modifyMutable<T>(state: T, modifier: (state: T) => T): void; |
@@ -97,2 +97,3 @@ export declare const IS_DEV: string | boolean; | ||
| } | ||
| export type StoreReturn<T> = [get: Store<T>, set: SetStoreFunction<T>]; | ||
| /** | ||
@@ -107,3 +108,3 @@ * Creates a reactive store that can be read through a proxy object and written with a setter function | ||
| name?: string; | ||
| }]): [get: Store<T>, set: SetStoreFunction<T>]; | ||
| }]): StoreReturn<T>; | ||
| export {}; |
@@ -331,5 +331,9 @@ /** | ||
| */ | ||
| export declare function createResource<T, R = unknown>(fetcher: ResourceFetcher<true, T, R>, options: InitializedResourceOptions<NoInfer<T>, true>): InitializedResourceReturn<T, R>; | ||
| export declare function createResource<T, R = unknown, I = T>(fetcher: (k: true, info: ResourceFetcherInfo<T | I, R>) => T | Promise<T>, options: ResourceOptions<T | I, true> & { | ||
| initialValue: I; | ||
| }): InitializedResourceReturn<T | I, R>; | ||
| export declare function createResource<T, R = unknown>(fetcher: ResourceFetcher<true, T, R>, options?: ResourceOptions<NoInfer<T>, true>): ResourceReturn<T, R>; | ||
| export declare function createResource<T, S, R = unknown>(source: ResourceSource<S>, fetcher: ResourceFetcher<S, T, R>, options: InitializedResourceOptions<NoInfer<T>, S>): InitializedResourceReturn<T, R>; | ||
| export declare function createResource<T, S, R = unknown, I = T>(source: ResourceSource<S>, fetcher: (k: S, info: ResourceFetcherInfo<T | I, R>) => T | Promise<T>, options: ResourceOptions<T | I, S> & { | ||
| initialValue: I; | ||
| }): InitializedResourceReturn<T | I, R>; | ||
| export declare function createResource<T, S, R = unknown>(source: ResourceSource<S>, fetcher: ResourceFetcher<S, T, R>, options?: ResourceOptions<NoInfer<T>, S>): ResourceReturn<T, R>; | ||
@@ -336,0 +340,0 @@ export interface DeferredOptions<T> { |
@@ -853,2 +853,3 @@ 'use strict'; | ||
| exports.className = notSup; | ||
| exports.clearDelegatedEvents = notSup; | ||
| exports.createDynamic = createDynamic; | ||
@@ -881,3 +882,5 @@ exports.delegateEvents = notSup; | ||
| exports.setAttributeNS = notSup; | ||
| exports.setBoolAttribute = notSup; | ||
| exports.setProperty = notSup; | ||
| exports.setStyleProperty = notSup; | ||
| exports.spread = notSup; | ||
@@ -894,2 +897,3 @@ exports.ssr = ssr; | ||
| exports.template = notSup; | ||
| exports.use = notSup; | ||
| exports.useAssets = useAssets; |
@@ -782,2 +782,2 @@ import { createMemo, sharedConfig, createRoot, splitProps } from 'solid-js'; | ||
| export { Aliases, Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Hydration, HydrationScript, NoHydration, Portal, Properties, RequestContext, SVGElements, SVGNamespace, notSup as addEventListener, notSup as assign, notSup as classList, notSup as className, createDynamic, notSup as delegateEvents, notSup as dynamicProperty, escape, generateHydrationScript, getAssets, getHydrationKey, notSup as getNextElement, notSup as getNextMarker, notSup as getNextMatch, getPropAlias, getRequestEvent, notSup as hydrate, notSup as insert, isDev, isServer, memo, pipeToNodeWritable, pipeToWritable, notSup as render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, notSup as runHydrationEvents, notSup as setAttribute, notSup as setAttributeNS, notSup as setProperty, notSup as spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrSpread, ssrStyle, ssrStyleProperty, notSup as style, notSup as template, useAssets }; | ||
| export { Aliases, Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Hydration, HydrationScript, NoHydration, Portal, Properties, RequestContext, SVGElements, SVGNamespace, notSup as addEventListener, notSup as assign, notSup as classList, notSup as className, notSup as clearDelegatedEvents, createDynamic, notSup as delegateEvents, notSup as dynamicProperty, escape, generateHydrationScript, getAssets, getHydrationKey, notSup as getNextElement, notSup as getNextMarker, notSup as getNextMatch, getPropAlias, getRequestEvent, notSup as hydrate, notSup as insert, isDev, isServer, memo, pipeToNodeWritable, pipeToWritable, notSup as render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, notSup as runHydrationEvents, notSup as setAttribute, notSup as setAttributeNS, notSup as setBoolAttribute, notSup as setProperty, notSup as setStyleProperty, notSup as spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrSpread, ssrStyle, ssrStyleProperty, notSup as style, notSup as template, notSup as use, useAssets }; |
@@ -59,5 +59,5 @@ import { JSX } from "./jsx.js"; | ||
| node: Element, | ||
| value: { [k: string]: boolean }, | ||
| prev?: { [k: string]: boolean } | ||
| ): { [k: string]: boolean }; | ||
| value: JSX.ClassList, | ||
| prev?: JSX.ClassList | ||
| ): JSX.ClassList; | ||
| export function style( | ||
@@ -64,0 +64,0 @@ node: Element, |
@@ -53,3 +53,3 @@ import { JSX } from "./jsx.js"; | ||
| ): { t: string }; | ||
| export function ssrClassList(value: { [k: string]: boolean }): string; | ||
| export function ssrClassList(value: JSX.ClassList): string; | ||
| export function ssrStyle(value: { [k: string]: string }): string; | ||
@@ -111,5 +111,5 @@ export function ssrAttribute(key: string, value: any, isBoolean: boolean): string; | ||
| node: Element, | ||
| value: { [k: string]: boolean }, | ||
| prev?: { [k: string]: boolean } | ||
| ): { [k: string]: boolean }; | ||
| value: JSX.ClassList, | ||
| prev?: JSX.ClassList | ||
| ): JSX.ClassList; | ||
@@ -180,1 +180,11 @@ /** @deprecated not supported on the server side */ | ||
| export function getNextMarker(start: Node): [Node, Array<Node>]; | ||
| /** @deprecated not supported on the server side */ | ||
| export function runHydrationEvents(): void; | ||
| /** @deprecated not supported on the server side */ | ||
| export function use<Arg, Ret>(fn: (node: Element, arg: Arg) => Ret, node: Element, arg?: Arg): Ret; | ||
| /** @deprecated not supported on the server side */ | ||
| export function setBoolAttribute(node: Element, name: string, value: any): void; | ||
| /** @deprecated not supported on the server side */ | ||
| export function setStyleProperty(node: Element, name: string, value: any): void; | ||
| /** @deprecated not supported on the server side */ | ||
| export function clearDelegatedEvents(d?: Document): void; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1066976
0.74%28376
0.6%