solid-js 1.5.3 → 1.5.5
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 +2 -1
- package/dist/dev.js +2 -1
- package/dist/server.cjs +2 -0
- package/dist/server.js +2 -1
- package/dist/solid.cjs +1 -1
- package/dist/solid.js +1 -1
- package/html/dist/html.cjs +2 -1
- package/html/dist/html.js +3 -2
- package/html/types/lit.d.ts +1 -0
- package/package.json +1 -1
- package/types/reactive/observable.d.ts +2 -2
- package/types/reactive/signal.d.ts +5 -4
- package/types/server/index.d.ts +1 -1
- package/types/server/reactive.d.ts +1 -0
- package/web/dist/dev.cjs +6 -2
- package/web/dist/dev.js +3 -3
- package/web/dist/server.cjs +12 -1
- package/web/dist/server.js +11 -2
- package/web/dist/web.cjs +6 -2
- package/web/dist/web.js +3 -3
- package/web/types/client.d.ts +1 -0
package/dist/dev.cjs
CHANGED
|
@@ -338,7 +338,7 @@ function createResource(pSource, pFetcher, pOptions) {
|
|
|
338
338
|
value: value(),
|
|
339
339
|
refetching
|
|
340
340
|
}));
|
|
341
|
-
if (typeof p !== "object" || !("then" in p)) {
|
|
341
|
+
if (typeof p !== "object" || !(p && "then" in p)) {
|
|
342
342
|
loadEnd(pr, p);
|
|
343
343
|
return p;
|
|
344
344
|
}
|
|
@@ -522,6 +522,7 @@ function devComponent(Comp, props) {
|
|
|
522
522
|
});
|
|
523
523
|
return Comp(props);
|
|
524
524
|
}), undefined, true);
|
|
525
|
+
c.props = props;
|
|
525
526
|
c.observers = null;
|
|
526
527
|
c.observerSlots = null;
|
|
527
528
|
c.state = 0;
|
package/dist/dev.js
CHANGED
|
@@ -334,7 +334,7 @@ function createResource(pSource, pFetcher, pOptions) {
|
|
|
334
334
|
value: value(),
|
|
335
335
|
refetching
|
|
336
336
|
}));
|
|
337
|
-
if (typeof p !== "object" || !("then" in p)) {
|
|
337
|
+
if (typeof p !== "object" || !(p && "then" in p)) {
|
|
338
338
|
loadEnd(pr, p);
|
|
339
339
|
return p;
|
|
340
340
|
}
|
|
@@ -518,6 +518,7 @@ function devComponent(Comp, props) {
|
|
|
518
518
|
});
|
|
519
519
|
return Comp(props);
|
|
520
520
|
}), undefined, true);
|
|
521
|
+
c.props = props;
|
|
521
522
|
c.observers = null;
|
|
522
523
|
c.observerSlots = null;
|
|
523
524
|
c.state = 0;
|
package/dist/server.cjs
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const equalFn = (a, b) => a === b;
|
|
6
6
|
const $PROXY = Symbol("solid-proxy");
|
|
7
|
+
const $TRACK = Symbol("solid-track");
|
|
7
8
|
const $DEVCOMP = Symbol("solid-dev-component");
|
|
8
9
|
const DEV = {};
|
|
9
10
|
const ERROR = Symbol("error");
|
|
@@ -604,6 +605,7 @@ function Suspense(props) {
|
|
|
604
605
|
|
|
605
606
|
exports.$DEVCOMP = $DEVCOMP;
|
|
606
607
|
exports.$PROXY = $PROXY;
|
|
608
|
+
exports.$TRACK = $TRACK;
|
|
607
609
|
exports.DEV = DEV;
|
|
608
610
|
exports.ErrorBoundary = ErrorBoundary;
|
|
609
611
|
exports.For = For;
|
package/dist/server.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const equalFn = (a, b) => a === b;
|
|
2
2
|
const $PROXY = Symbol("solid-proxy");
|
|
3
|
+
const $TRACK = Symbol("solid-track");
|
|
3
4
|
const $DEVCOMP = Symbol("solid-dev-component");
|
|
4
5
|
const DEV = {};
|
|
5
6
|
const ERROR = Symbol("error");
|
|
@@ -598,4 +599,4 @@ function Suspense(props) {
|
|
|
598
599
|
return props.fallback;
|
|
599
600
|
}
|
|
600
601
|
|
|
601
|
-
export { $DEVCOMP, $PROXY, DEV, ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, batch, children, createComponent, createComputed, createContext, createDeferred, createEffect, createMemo, createReaction, createRenderEffect, createResource, createRoot, createSelector, createSignal, createUniqueId, enableExternalSource, enableHydration, enableScheduling, equalFn, from, getListener, getOwner, lazy, mapArray, mergeProps, observable, on, onCleanup, onError, onMount, requestCallback, resetErrorBoundaries, runWithOwner, sharedConfig, splitProps, startTransition, untrack, useContext, useTransition };
|
|
602
|
+
export { $DEVCOMP, $PROXY, $TRACK, DEV, ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, batch, children, createComponent, createComputed, createContext, createDeferred, createEffect, createMemo, createReaction, createRenderEffect, createResource, createRoot, createSelector, createSignal, createUniqueId, enableExternalSource, enableHydration, enableScheduling, equalFn, from, getListener, getOwner, lazy, mapArray, mergeProps, observable, on, onCleanup, onError, onMount, requestCallback, resetErrorBoundaries, runWithOwner, sharedConfig, splitProps, startTransition, untrack, useContext, useTransition };
|
package/dist/solid.cjs
CHANGED
package/dist/solid.js
CHANGED
package/html/dist/html.cjs
CHANGED
|
@@ -420,7 +420,7 @@ function createHTML(r, {
|
|
|
420
420
|
options.first = false;
|
|
421
421
|
processChildren(node, options);
|
|
422
422
|
if (topDecl) {
|
|
423
|
-
options.decl[0] = options.hasCustomElement ? `const ${tag} = document.importNode(tmpls[${templateId}].content.firstChild, true)` : `const ${tag} = tmpls[${templateId}].content.firstChild.cloneNode(true)`;
|
|
423
|
+
options.decl[0] = options.hasCustomElement ? `const ${tag} = r.untrack(() => document.importNode(tmpls[${templateId}].content.firstChild, true))` : `const ${tag} = tmpls[${templateId}].content.firstChild.cloneNode(true)`;
|
|
424
424
|
}
|
|
425
425
|
} else if (node.type === "text") {
|
|
426
426
|
const tag = `_$el${uuid++}`;
|
|
@@ -479,6 +479,7 @@ var index = createHTML({
|
|
|
479
479
|
effect: web.effect,
|
|
480
480
|
style: web.style,
|
|
481
481
|
insert: web.insert,
|
|
482
|
+
untrack: web.untrack,
|
|
482
483
|
spread: web.spread,
|
|
483
484
|
createComponent: web.createComponent,
|
|
484
485
|
delegateEvents: web.delegateEvents,
|
package/html/dist/html.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { effect, style, insert, spread, createComponent, delegateEvents, classList, mergeProps, dynamicProperty, setAttribute, setAttributeNS, addEventListener, Aliases, PropAliases, Properties, ChildProperties, DelegatedEvents, SVGElements, SVGNamespace } from 'solid-js/web';
|
|
1
|
+
import { effect, style, insert, untrack, spread, createComponent, delegateEvents, classList, mergeProps, dynamicProperty, setAttribute, setAttributeNS, addEventListener, Aliases, PropAliases, Properties, ChildProperties, DelegatedEvents, SVGElements, SVGNamespace } from 'solid-js/web';
|
|
2
2
|
|
|
3
3
|
const tagRE = /(?:<!--[\S\s]*?-->|<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>)/g;
|
|
4
4
|
const attrRE = /(?:\s(?<boolean>[^/\s><=]+?)(?=[\s/>]))|(?:(?<name>\S+?)(?:\s*=\s*(?:(['"])(?<quotedValue>[\s\S]*?)\3|(?<unquotedValue>[^\s>]+))))/g;
|
|
@@ -418,7 +418,7 @@ function createHTML(r, {
|
|
|
418
418
|
options.first = false;
|
|
419
419
|
processChildren(node, options);
|
|
420
420
|
if (topDecl) {
|
|
421
|
-
options.decl[0] = options.hasCustomElement ? `const ${tag} = document.importNode(tmpls[${templateId}].content.firstChild, true)` : `const ${tag} = tmpls[${templateId}].content.firstChild.cloneNode(true)`;
|
|
421
|
+
options.decl[0] = options.hasCustomElement ? `const ${tag} = r.untrack(() => document.importNode(tmpls[${templateId}].content.firstChild, true))` : `const ${tag} = tmpls[${templateId}].content.firstChild.cloneNode(true)`;
|
|
422
422
|
}
|
|
423
423
|
} else if (node.type === "text") {
|
|
424
424
|
const tag = `_$el${uuid++}`;
|
|
@@ -477,6 +477,7 @@ var index = createHTML({
|
|
|
477
477
|
effect,
|
|
478
478
|
style,
|
|
479
479
|
insert,
|
|
480
|
+
untrack,
|
|
480
481
|
spread,
|
|
481
482
|
createComponent,
|
|
482
483
|
delegateEvents,
|
package/html/types/lit.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node;
|
|
2
2
|
interface Runtime {
|
|
3
3
|
effect<T>(fn: (prev?: T) => T, init?: T): any;
|
|
4
|
+
untrack<T>(fn: () => T): T;
|
|
4
5
|
insert(parent: MountableElement, accessor: any, marker?: Node | null, init?: any): any;
|
|
5
6
|
spread<T>(node: Element, accessor: (() => T) | T, isSVG?: Boolean, skipChildren?: Boolean): void;
|
|
6
7
|
createComponent(Comp: (props: any) => any, props: any): any;
|
package/package.json
CHANGED
|
@@ -25,8 +25,8 @@ export declare function observable<T>(input: Accessor<T>): {
|
|
|
25
25
|
};
|
|
26
26
|
[Symbol.observable](): any;
|
|
27
27
|
};
|
|
28
|
-
export declare function from<T>(producer: ((setter: Setter<T>) => () => void) | {
|
|
28
|
+
export declare function from<T>(producer: ((setter: Setter<T | undefined>) => () => void) | {
|
|
29
29
|
subscribe: (fn: (v: T) => void) => (() => void) | {
|
|
30
30
|
unsubscribe: () => void;
|
|
31
31
|
};
|
|
32
|
-
}): Accessor<T>;
|
|
32
|
+
}): Accessor<T | undefined>;
|
|
@@ -256,10 +256,7 @@ export declare type ResourceOptions<T, S = unknown> = {
|
|
|
256
256
|
export declare type InitializedResourceOptions<T, S = unknown> = ResourceOptions<T, S> & {
|
|
257
257
|
initialValue: T;
|
|
258
258
|
};
|
|
259
|
-
export declare type ResourceReturn<T, R = unknown> = [
|
|
260
|
-
Resource<T>,
|
|
261
|
-
ResourceActions<T | undefined, R>
|
|
262
|
-
];
|
|
259
|
+
export declare type ResourceReturn<T, R = unknown> = [Resource<T>, ResourceActions<T | undefined, R>];
|
|
263
260
|
export declare type InitializedResourceReturn<T, R = unknown> = [
|
|
264
261
|
InitializedResource<T>,
|
|
265
262
|
ResourceActions<T, R>
|
|
@@ -447,6 +444,10 @@ export declare type Transition = [Accessor<boolean>, (fn: () => void) => Promise
|
|
|
447
444
|
*/
|
|
448
445
|
export declare function useTransition(): Transition;
|
|
449
446
|
export declare function resumeEffects(e: Computation<any>[]): void;
|
|
447
|
+
export interface DevComponent<T> extends Memo<JSX.Element> {
|
|
448
|
+
props: T;
|
|
449
|
+
componentName: string;
|
|
450
|
+
}
|
|
450
451
|
export declare function devComponent<T>(Comp: (props: T) => JSX.Element, props: T): JSX.Element;
|
|
451
452
|
export declare function hashValue(v: any): string;
|
|
452
453
|
export declare function registerGraph(name: string, value: {
|
package/types/server/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createRoot, createSignal, createComputed, createRenderEffect, createEffect, createReaction, createDeferred, createSelector, createMemo, getListener, onMount, onCleanup, onError, untrack, batch, on, children, createContext, useContext, getOwner, runWithOwner, equalFn, requestCallback, mapArray, observable, from, $PROXY, $DEVCOMP, DEV, enableExternalSource } from "./reactive.js";
|
|
1
|
+
export { createRoot, createSignal, createComputed, createRenderEffect, createEffect, createReaction, createDeferred, createSelector, createMemo, getListener, onMount, onCleanup, onError, untrack, batch, on, children, createContext, useContext, getOwner, runWithOwner, equalFn, requestCallback, mapArray, observable, from, $PROXY, $DEVCOMP, $TRACK, DEV, enableExternalSource } from "./reactive.js";
|
|
2
2
|
export { mergeProps, splitProps, createComponent, For, Index, Show, Switch, Match, ErrorBoundary, Suspense, SuspenseList, createResource, resetErrorBoundaries, enableScheduling, enableHydration, startTransition, useTransition, createUniqueId, lazy, sharedConfig } from "./rendering.js";
|
|
3
3
|
export type { Component, Resource } from "./rendering.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const equalFn: <T>(a: T, b: T) => boolean;
|
|
2
2
|
export declare const $PROXY: unique symbol;
|
|
3
|
+
export declare const $TRACK: unique symbol;
|
|
3
4
|
export declare const $DEVCOMP: unique symbol;
|
|
4
5
|
export declare const DEV: {};
|
|
5
6
|
export declare type Accessor<T> = () => T;
|
package/web/dist/dev.cjs
CHANGED
|
@@ -373,10 +373,10 @@ function eventHandler(e) {
|
|
|
373
373
|
}
|
|
374
374
|
function spreadExpression(node, props, prevProps = {}, isSVG, skipChildren) {
|
|
375
375
|
props || (props = {});
|
|
376
|
-
if (!skipChildren
|
|
376
|
+
if (!skipChildren) {
|
|
377
377
|
solidJs.createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
378
378
|
}
|
|
379
|
-
props.ref && props.ref(node);
|
|
379
|
+
solidJs.createRenderEffect(() => props.ref && props.ref(node));
|
|
380
380
|
solidJs.createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
381
381
|
return prevProps;
|
|
382
382
|
}
|
|
@@ -646,6 +646,10 @@ Object.defineProperty(exports, 'mergeProps', {
|
|
|
646
646
|
enumerable: true,
|
|
647
647
|
get: function () { return solidJs.mergeProps; }
|
|
648
648
|
});
|
|
649
|
+
Object.defineProperty(exports, 'untrack', {
|
|
650
|
+
enumerable: true,
|
|
651
|
+
get: function () { return solidJs.untrack; }
|
|
652
|
+
});
|
|
649
653
|
exports.Aliases = Aliases;
|
|
650
654
|
exports.Assets = voidFn;
|
|
651
655
|
exports.ChildProperties = ChildProperties;
|
package/web/dist/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createMemo, createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, createSignal, onCleanup, splitProps, $DEVCOMP } from 'solid-js';
|
|
2
|
-
export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps } from 'solid-js';
|
|
2
|
+
export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps, untrack } from 'solid-js';
|
|
3
3
|
|
|
4
4
|
const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
|
|
5
5
|
const Properties = /*#__PURE__*/new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
|
|
@@ -370,10 +370,10 @@ function eventHandler(e) {
|
|
|
370
370
|
}
|
|
371
371
|
function spreadExpression(node, props, prevProps = {}, isSVG, skipChildren) {
|
|
372
372
|
props || (props = {});
|
|
373
|
-
if (!skipChildren
|
|
373
|
+
if (!skipChildren) {
|
|
374
374
|
createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
375
375
|
}
|
|
376
|
-
props.ref && props.ref(node);
|
|
376
|
+
createRenderEffect(() => props.ref && props.ref(node));
|
|
377
377
|
createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
378
378
|
return prevProps;
|
|
379
379
|
}
|
package/web/dist/server.cjs
CHANGED
|
@@ -526,7 +526,7 @@ function ssrStyle(value) {
|
|
|
526
526
|
}
|
|
527
527
|
function ssrElement(tag, props, children, needsId) {
|
|
528
528
|
let result = `<${tag}${needsId ? ssrHydrationKey() : ""} `;
|
|
529
|
-
if (typeof props === "function") props = props();
|
|
529
|
+
if (props == null) props = {};else if (typeof props === "function") props = props();
|
|
530
530
|
const keys = Object.keys(props);
|
|
531
531
|
let classResolved;
|
|
532
532
|
for (let i = 0; i < keys.length; i++) {
|
|
@@ -567,6 +567,13 @@ function escape(s, attr) {
|
|
|
567
567
|
const t = typeof s;
|
|
568
568
|
if (t !== "string") {
|
|
569
569
|
if (!attr && t === "function") return escape(s(), attr);
|
|
570
|
+
if (!attr && Array.isArray(s)) {
|
|
571
|
+
let r = "";
|
|
572
|
+
for (let i = 0; i < s.length; i++) r += resolveSSRNode(escape(s[i], attr));
|
|
573
|
+
return {
|
|
574
|
+
t: r
|
|
575
|
+
};
|
|
576
|
+
}
|
|
570
577
|
if (attr && t === "boolean") return String(s);
|
|
571
578
|
return s;
|
|
572
579
|
}
|
|
@@ -763,7 +770,9 @@ function ssrSpread(props, isSVG, skipChildren) {
|
|
|
763
770
|
}
|
|
764
771
|
|
|
765
772
|
const isServer = true;
|
|
773
|
+
function insert() {}
|
|
766
774
|
function spread() {}
|
|
775
|
+
function delegateEvents() {}
|
|
767
776
|
function Dynamic(props) {
|
|
768
777
|
const [p, others] = solidJs.splitProps(props, ["component"]);
|
|
769
778
|
const comp = p.component,
|
|
@@ -823,10 +832,12 @@ exports.Dynamic = Dynamic;
|
|
|
823
832
|
exports.HydrationScript = HydrationScript;
|
|
824
833
|
exports.NoHydration = NoHydration;
|
|
825
834
|
exports.Portal = Portal;
|
|
835
|
+
exports.delegateEvents = delegateEvents;
|
|
826
836
|
exports.escape = escape;
|
|
827
837
|
exports.generateHydrationScript = generateHydrationScript;
|
|
828
838
|
exports.getAssets = getAssets;
|
|
829
839
|
exports.getHydrationKey = getHydrationKey;
|
|
840
|
+
exports.insert = insert;
|
|
830
841
|
exports.isServer = isServer;
|
|
831
842
|
exports.pipeToNodeWritable = pipeToNodeWritable;
|
|
832
843
|
exports.pipeToWritable = pipeToWritable;
|
package/web/dist/server.js
CHANGED
|
@@ -523,7 +523,7 @@ function ssrStyle(value) {
|
|
|
523
523
|
}
|
|
524
524
|
function ssrElement(tag, props, children, needsId) {
|
|
525
525
|
let result = `<${tag}${needsId ? ssrHydrationKey() : ""} `;
|
|
526
|
-
if (typeof props === "function") props = props();
|
|
526
|
+
if (props == null) props = {};else if (typeof props === "function") props = props();
|
|
527
527
|
const keys = Object.keys(props);
|
|
528
528
|
let classResolved;
|
|
529
529
|
for (let i = 0; i < keys.length; i++) {
|
|
@@ -564,6 +564,13 @@ function escape(s, attr) {
|
|
|
564
564
|
const t = typeof s;
|
|
565
565
|
if (t !== "string") {
|
|
566
566
|
if (!attr && t === "function") return escape(s(), attr);
|
|
567
|
+
if (!attr && Array.isArray(s)) {
|
|
568
|
+
let r = "";
|
|
569
|
+
for (let i = 0; i < s.length; i++) r += resolveSSRNode(escape(s[i], attr));
|
|
570
|
+
return {
|
|
571
|
+
t: r
|
|
572
|
+
};
|
|
573
|
+
}
|
|
567
574
|
if (attr && t === "boolean") return String(s);
|
|
568
575
|
return s;
|
|
569
576
|
}
|
|
@@ -760,7 +767,9 @@ function ssrSpread(props, isSVG, skipChildren) {
|
|
|
760
767
|
}
|
|
761
768
|
|
|
762
769
|
const isServer = true;
|
|
770
|
+
function insert() {}
|
|
763
771
|
function spread() {}
|
|
772
|
+
function delegateEvents() {}
|
|
764
773
|
function Dynamic(props) {
|
|
765
774
|
const [p, others] = splitProps(props, ["component"]);
|
|
766
775
|
const comp = p.component,
|
|
@@ -775,4 +784,4 @@ function Portal(props) {
|
|
|
775
784
|
return "";
|
|
776
785
|
}
|
|
777
786
|
|
|
778
|
-
export { Assets, Dynamic, HydrationScript, NoHydration, Portal, escape, generateHydrationScript, getAssets, getHydrationKey, isServer, pipeToNodeWritable, pipeToWritable, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrSpread, ssrStyle, useAssets };
|
|
787
|
+
export { Assets, Dynamic, HydrationScript, NoHydration, Portal, delegateEvents, escape, generateHydrationScript, getAssets, getHydrationKey, insert, isServer, pipeToNodeWritable, pipeToWritable, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrSpread, ssrStyle, useAssets };
|
package/web/dist/web.cjs
CHANGED
|
@@ -370,10 +370,10 @@ function eventHandler(e) {
|
|
|
370
370
|
}
|
|
371
371
|
function spreadExpression(node, props, prevProps = {}, isSVG, skipChildren) {
|
|
372
372
|
props || (props = {});
|
|
373
|
-
if (!skipChildren
|
|
373
|
+
if (!skipChildren) {
|
|
374
374
|
solidJs.createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
375
375
|
}
|
|
376
|
-
props.ref && props.ref(node);
|
|
376
|
+
solidJs.createRenderEffect(() => props.ref && props.ref(node));
|
|
377
377
|
solidJs.createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
378
378
|
return prevProps;
|
|
379
379
|
}
|
|
@@ -640,6 +640,10 @@ Object.defineProperty(exports, 'mergeProps', {
|
|
|
640
640
|
enumerable: true,
|
|
641
641
|
get: function () { return solidJs.mergeProps; }
|
|
642
642
|
});
|
|
643
|
+
Object.defineProperty(exports, 'untrack', {
|
|
644
|
+
enumerable: true,
|
|
645
|
+
get: function () { return solidJs.untrack; }
|
|
646
|
+
});
|
|
643
647
|
exports.Aliases = Aliases;
|
|
644
648
|
exports.Assets = voidFn;
|
|
645
649
|
exports.ChildProperties = ChildProperties;
|
package/web/dist/web.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createMemo, createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, createSignal, onCleanup, splitProps } from 'solid-js';
|
|
2
|
-
export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps } from 'solid-js';
|
|
2
|
+
export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps, untrack } from 'solid-js';
|
|
3
3
|
|
|
4
4
|
const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
|
|
5
5
|
const Properties = /*#__PURE__*/new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
|
|
@@ -367,10 +367,10 @@ function eventHandler(e) {
|
|
|
367
367
|
}
|
|
368
368
|
function spreadExpression(node, props, prevProps = {}, isSVG, skipChildren) {
|
|
369
369
|
props || (props = {});
|
|
370
|
-
if (!skipChildren
|
|
370
|
+
if (!skipChildren) {
|
|
371
371
|
createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
372
372
|
}
|
|
373
|
-
props.ref && props.ref(node);
|
|
373
|
+
createRenderEffect(() => props.ref && props.ref(node));
|
|
374
374
|
createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
375
375
|
return prevProps;
|
|
376
376
|
}
|
package/web/types/client.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export function render(code: () => JSX.Element, element: MountableElement): () =
|
|
|
13
13
|
export function template(html: string, count: number, isSVG?: boolean): Element;
|
|
14
14
|
export function effect<T>(fn: (prev?: T) => T, init?: T): void;
|
|
15
15
|
export function memo<T>(fn: () => T, equal: boolean): () => T;
|
|
16
|
+
export function untrack<T>(fn: () => T): T;
|
|
16
17
|
export function insert<T>(
|
|
17
18
|
parent: MountableElement,
|
|
18
19
|
accessor: (() => T) | T,
|