solid-js 1.7.6 → 1.7.8
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 +35 -16
- package/dist/dev.js +35 -16
- package/dist/server.cjs +9 -5
- package/dist/server.js +9 -5
- package/dist/solid.cjs +35 -16
- package/dist/solid.js +35 -16
- package/h/jsx-runtime/types/jsx.d.ts +127 -100
- package/package.json +55 -109
- package/store/package.json +14 -28
- package/types/jsx.d.ts +7 -6
- package/types/reactive/signal.d.ts +1 -1
- package/types/render/hydration.d.ts +3 -0
- package/types/server/reactive.d.ts +1 -1
- package/universal/package.json +4 -8
- package/web/dist/dev.cjs +2 -2
- package/web/dist/dev.js +3 -3
- package/web/dist/server.cjs +4 -4
- package/web/dist/server.js +4 -4
- package/web/dist/web.cjs +2 -2
- package/web/dist/web.js +3 -3
- package/web/package.json +14 -28
package/store/package.json
CHANGED
|
@@ -13,51 +13,37 @@
|
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
15
|
"worker": {
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"default": "./dist/server.js"
|
|
19
|
-
},
|
|
16
|
+
"types": "./types/index.d.ts",
|
|
17
|
+
"import": "./dist/server.js",
|
|
20
18
|
"require": "./dist/server.cjs"
|
|
21
19
|
},
|
|
22
20
|
"browser": {
|
|
23
21
|
"development": {
|
|
24
|
-
"import": {
|
|
25
|
-
"types": "./types/index.d.ts",
|
|
26
|
-
"default": "./dist/dev.js"
|
|
27
|
-
},
|
|
28
|
-
"require": "./dist/dev.cjs"
|
|
29
|
-
},
|
|
30
|
-
"import": {
|
|
31
22
|
"types": "./types/index.d.ts",
|
|
32
|
-
"
|
|
23
|
+
"import": "./dist/dev.js",
|
|
24
|
+
"require": "./dist/dev.cjs"
|
|
33
25
|
},
|
|
26
|
+
"types": "./types/index.d.ts",
|
|
27
|
+
"import": "./dist/store.js",
|
|
34
28
|
"require": "./dist/store.cjs"
|
|
35
29
|
},
|
|
36
30
|
"deno": {
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
"default": "./dist/server.js"
|
|
40
|
-
},
|
|
31
|
+
"types": "./types/index.d.ts",
|
|
32
|
+
"import": "./dist/server.js",
|
|
41
33
|
"require": "./dist/server.cjs"
|
|
42
34
|
},
|
|
43
35
|
"node": {
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
"default": "./dist/server.js"
|
|
47
|
-
},
|
|
36
|
+
"types": "./types/index.d.ts",
|
|
37
|
+
"import": "./dist/server.js",
|
|
48
38
|
"require": "./dist/server.cjs"
|
|
49
39
|
},
|
|
50
40
|
"development": {
|
|
51
|
-
"import": {
|
|
52
|
-
"types": "./types/index.d.ts",
|
|
53
|
-
"default": "./dist/dev.js"
|
|
54
|
-
},
|
|
55
|
-
"require": "./dist/dev.cjs"
|
|
56
|
-
},
|
|
57
|
-
"import": {
|
|
58
41
|
"types": "./types/index.d.ts",
|
|
59
|
-
"
|
|
42
|
+
"import": "./dist/dev.js",
|
|
43
|
+
"require": "./dist/dev.cjs"
|
|
60
44
|
},
|
|
45
|
+
"types": "./types/index.d.ts",
|
|
46
|
+
"import": "./dist/store.js",
|
|
61
47
|
"require": "./dist/store.cjs"
|
|
62
48
|
}
|
|
63
49
|
}
|
package/types/jsx.d.ts
CHANGED
|
@@ -266,7 +266,8 @@ export namespace JSX {
|
|
|
266
266
|
onProgress?: EventHandlerUnion<T, Event>;
|
|
267
267
|
onRateChange?: EventHandlerUnion<T, Event>;
|
|
268
268
|
onReset?: EventHandlerUnion<T, Event>;
|
|
269
|
-
onScroll?: EventHandlerUnion<T,
|
|
269
|
+
onScroll?: EventHandlerUnion<T, Event>;
|
|
270
|
+
onScrollEnd?: EventHandlerUnion<T, Event>;
|
|
270
271
|
onSeeked?: EventHandlerUnion<T, Event>;
|
|
271
272
|
onSeeking?: EventHandlerUnion<T, Event>;
|
|
272
273
|
onSelect?: EventHandlerUnion<T, UIEvent>;
|
|
@@ -352,7 +353,8 @@ export namespace JSX {
|
|
|
352
353
|
onprogress?: EventHandlerUnion<T, Event>;
|
|
353
354
|
onratechange?: EventHandlerUnion<T, Event>;
|
|
354
355
|
onreset?: EventHandlerUnion<T, Event>;
|
|
355
|
-
onscroll?: EventHandlerUnion<T,
|
|
356
|
+
onscroll?: EventHandlerUnion<T, Event>;
|
|
357
|
+
onscrollend?: EventHandlerUnion<T, Event>;
|
|
356
358
|
onseeked?: EventHandlerUnion<T, Event>;
|
|
357
359
|
onseeking?: EventHandlerUnion<T, Event>;
|
|
358
360
|
onselect?: EventHandlerUnion<T, UIEvent>;
|
|
@@ -839,7 +841,7 @@ export namespace JSX {
|
|
|
839
841
|
name?: string;
|
|
840
842
|
}
|
|
841
843
|
interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
842
|
-
|
|
844
|
+
"accept-charset"?: string;
|
|
843
845
|
action?: string;
|
|
844
846
|
autocomplete?: string;
|
|
845
847
|
encoding?: HTMLFormEncType;
|
|
@@ -848,7 +850,6 @@ export namespace JSX {
|
|
|
848
850
|
name?: string;
|
|
849
851
|
novalidate?: boolean;
|
|
850
852
|
target?: string;
|
|
851
|
-
acceptCharset?: string;
|
|
852
853
|
noValidate?: boolean;
|
|
853
854
|
}
|
|
854
855
|
interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
@@ -989,9 +990,8 @@ export namespace JSX {
|
|
|
989
990
|
interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
990
991
|
charset?: string;
|
|
991
992
|
content?: string;
|
|
992
|
-
|
|
993
|
+
"http-equiv"?: string;
|
|
993
994
|
name?: string;
|
|
994
|
-
httpEquiv?: string;
|
|
995
995
|
}
|
|
996
996
|
interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
997
997
|
form?: string;
|
|
@@ -1101,6 +1101,7 @@ export namespace JSX {
|
|
|
1101
1101
|
cols?: number | string;
|
|
1102
1102
|
dirname?: string;
|
|
1103
1103
|
disabled?: boolean;
|
|
1104
|
+
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
1104
1105
|
form?: string;
|
|
1105
1106
|
maxlength?: number | string;
|
|
1106
1107
|
minlength?: number | string;
|
|
@@ -366,7 +366,7 @@ export type EqualityCheckerFunction<T, U> = (a: U, b: T) => boolean;
|
|
|
366
366
|
*
|
|
367
367
|
* @description https://www.solidjs.com/docs/latest/api#createselector
|
|
368
368
|
*/
|
|
369
|
-
export declare function createSelector<T, U>(source: Accessor<T>, fn?: EqualityCheckerFunction<T, U>, options?: BaseOptions): (key: U) => boolean;
|
|
369
|
+
export declare function createSelector<T, U = T>(source: Accessor<T>, fn?: EqualityCheckerFunction<T, U>, options?: BaseOptions): (key: U) => boolean;
|
|
370
370
|
/**
|
|
371
371
|
* Holds changes inside the block before the reactive context is updated
|
|
372
372
|
* @param fn wraps the reactive updates that should be batched
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Computation } from "../reactive/signal";
|
|
1
2
|
export type HydrationContext = {
|
|
2
3
|
id: string;
|
|
3
4
|
count: number;
|
|
@@ -11,6 +12,8 @@ type SharedConfig = {
|
|
|
11
12
|
gather?: (key: string) => void;
|
|
12
13
|
registry?: Map<string, Element>;
|
|
13
14
|
done?: boolean;
|
|
15
|
+
count?: number;
|
|
16
|
+
effects?: Computation<any, any>[];
|
|
14
17
|
};
|
|
15
18
|
export declare const sharedConfig: SharedConfig;
|
|
16
19
|
export declare function setHydrateContext(context?: HydrationContext): void;
|
|
@@ -38,7 +38,7 @@ export declare function cleanNode(node: Owner): void;
|
|
|
38
38
|
export declare function catchError<T>(fn: () => T, handler: (err: Error) => void): T | undefined;
|
|
39
39
|
/**
|
|
40
40
|
* @deprecated since version 1.7.0 and will be removed in next major - use catchError instead
|
|
41
|
-
*/
|
|
41
|
+
*/
|
|
42
42
|
export declare function onError(fn: (err: Error) => void): void;
|
|
43
43
|
export declare function getListener(): null;
|
|
44
44
|
export interface Context<T> {
|
package/universal/package.json
CHANGED
|
@@ -8,16 +8,12 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"development": {
|
|
11
|
-
"import": {
|
|
12
|
-
"types": "./types/index.d.ts",
|
|
13
|
-
"default": "./dist/dev.js"
|
|
14
|
-
},
|
|
15
|
-
"require": "./dist/dev.cjs"
|
|
16
|
-
},
|
|
17
|
-
"import": {
|
|
18
11
|
"types": "./types/index.d.ts",
|
|
19
|
-
"
|
|
12
|
+
"import": "./dist/dev.js",
|
|
13
|
+
"require": "./dist/dev.cjs"
|
|
20
14
|
},
|
|
15
|
+
"types": "./types/index.d.ts",
|
|
16
|
+
"import": "./dist/universal.js",
|
|
21
17
|
"require": "./dist/universal.cjs"
|
|
22
18
|
}
|
|
23
19
|
}
|
package/web/dist/dev.cjs
CHANGED
|
@@ -576,12 +576,12 @@ function Portal(props) {
|
|
|
576
576
|
let hydrating = !!solidJs.sharedConfig.context;
|
|
577
577
|
solidJs.createEffect(() => {
|
|
578
578
|
if (hydrating) solidJs.getOwner().user = hydrating = false;
|
|
579
|
-
content || (content = solidJs.runWithOwner(owner, () => props.children));
|
|
579
|
+
content || (content = solidJs.runWithOwner(owner, () => solidJs.createMemo(() => props.children)));
|
|
580
580
|
const el = mount();
|
|
581
581
|
if (el instanceof HTMLHeadElement) {
|
|
582
582
|
const [clean, setClean] = solidJs.createSignal(false);
|
|
583
583
|
const cleanup = () => setClean(true);
|
|
584
|
-
solidJs.createRoot(dispose => insert(el, () => !clean() ? content : dispose(), null));
|
|
584
|
+
solidJs.createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
|
|
585
585
|
solidJs.onCleanup(cleanup);
|
|
586
586
|
} else {
|
|
587
587
|
const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
|
package/web/dist/dev.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, getOwner, createEffect, runWithOwner, createSignal, onCleanup, splitProps,
|
|
1
|
+
import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, getOwner, createEffect, runWithOwner, createMemo, createSignal, onCleanup, splitProps, $DEVCOMP } from 'solid-js';
|
|
2
2
|
export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, createMemo as memo, 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"];
|
|
@@ -575,12 +575,12 @@ function Portal(props) {
|
|
|
575
575
|
let hydrating = !!sharedConfig.context;
|
|
576
576
|
createEffect(() => {
|
|
577
577
|
if (hydrating) getOwner().user = hydrating = false;
|
|
578
|
-
content || (content = runWithOwner(owner, () => props.children));
|
|
578
|
+
content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
|
|
579
579
|
const el = mount();
|
|
580
580
|
if (el instanceof HTMLHeadElement) {
|
|
581
581
|
const [clean, setClean] = createSignal(false);
|
|
582
582
|
const cleanup = () => setClean(true);
|
|
583
|
-
createRoot(dispose => insert(el, () => !clean() ? content : dispose(), null));
|
|
583
|
+
createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
|
|
584
584
|
onCleanup(cleanup);
|
|
585
585
|
} else {
|
|
586
586
|
const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
|
package/web/dist/server.cjs
CHANGED
|
@@ -124,10 +124,10 @@ function renderToStream(code, options = {}) {
|
|
|
124
124
|
},
|
|
125
125
|
replace(id, payloadFn) {
|
|
126
126
|
if (firstFlushed) return;
|
|
127
|
-
const placeholder =
|
|
127
|
+
const placeholder = `<!--!$${id}-->`;
|
|
128
128
|
const first = html.indexOf(placeholder);
|
|
129
129
|
if (first === -1) return;
|
|
130
|
-
const last = html.indexOf(
|
|
130
|
+
const last = html.indexOf(`<!--!$/${id}-->`, first + placeholder.length);
|
|
131
131
|
html = html.replace(html.slice(first, last + placeholder.length + 1), resolveSSRNode(payloadFn()));
|
|
132
132
|
},
|
|
133
133
|
writeResource(id, p, error, wait) {
|
|
@@ -197,7 +197,7 @@ function renderToStream(code, options = {}) {
|
|
|
197
197
|
fn(tmp);
|
|
198
198
|
}
|
|
199
199
|
if (onCompleteAll) {
|
|
200
|
-
ogComplete = onCompleteAll;
|
|
200
|
+
let ogComplete = onCompleteAll;
|
|
201
201
|
onCompleteAll = options => {
|
|
202
202
|
ogComplete(options);
|
|
203
203
|
complete();
|
|
@@ -462,7 +462,7 @@ function serializeSet(registry, key, value) {
|
|
|
462
462
|
}
|
|
463
463
|
function replacePlaceholder(html, key, value) {
|
|
464
464
|
const marker = `<template id="pl-${key}">`;
|
|
465
|
-
const close =
|
|
465
|
+
const close = `<!--pl-${key}-->`;
|
|
466
466
|
const first = html.indexOf(marker);
|
|
467
467
|
if (first === -1) return html;
|
|
468
468
|
const last = html.indexOf(close, first + marker.length);
|
package/web/dist/server.js
CHANGED
|
@@ -123,10 +123,10 @@ function renderToStream(code, options = {}) {
|
|
|
123
123
|
},
|
|
124
124
|
replace(id, payloadFn) {
|
|
125
125
|
if (firstFlushed) return;
|
|
126
|
-
const placeholder =
|
|
126
|
+
const placeholder = `<!--!$${id}-->`;
|
|
127
127
|
const first = html.indexOf(placeholder);
|
|
128
128
|
if (first === -1) return;
|
|
129
|
-
const last = html.indexOf(
|
|
129
|
+
const last = html.indexOf(`<!--!$/${id}-->`, first + placeholder.length);
|
|
130
130
|
html = html.replace(html.slice(first, last + placeholder.length + 1), resolveSSRNode(payloadFn()));
|
|
131
131
|
},
|
|
132
132
|
writeResource(id, p, error, wait) {
|
|
@@ -196,7 +196,7 @@ function renderToStream(code, options = {}) {
|
|
|
196
196
|
fn(tmp);
|
|
197
197
|
}
|
|
198
198
|
if (onCompleteAll) {
|
|
199
|
-
ogComplete = onCompleteAll;
|
|
199
|
+
let ogComplete = onCompleteAll;
|
|
200
200
|
onCompleteAll = options => {
|
|
201
201
|
ogComplete(options);
|
|
202
202
|
complete();
|
|
@@ -461,7 +461,7 @@ function serializeSet(registry, key, value) {
|
|
|
461
461
|
}
|
|
462
462
|
function replacePlaceholder(html, key, value) {
|
|
463
463
|
const marker = `<template id="pl-${key}">`;
|
|
464
|
-
const close =
|
|
464
|
+
const close = `<!--pl-${key}-->`;
|
|
465
465
|
const first = html.indexOf(marker);
|
|
466
466
|
if (first === -1) return html;
|
|
467
467
|
const last = html.indexOf(close, first + marker.length);
|
package/web/dist/web.cjs
CHANGED
|
@@ -576,12 +576,12 @@ function Portal(props) {
|
|
|
576
576
|
let hydrating = !!solidJs.sharedConfig.context;
|
|
577
577
|
solidJs.createEffect(() => {
|
|
578
578
|
if (hydrating) solidJs.getOwner().user = hydrating = false;
|
|
579
|
-
content || (content = solidJs.runWithOwner(owner, () => props.children));
|
|
579
|
+
content || (content = solidJs.runWithOwner(owner, () => solidJs.createMemo(() => props.children)));
|
|
580
580
|
const el = mount();
|
|
581
581
|
if (el instanceof HTMLHeadElement) {
|
|
582
582
|
const [clean, setClean] = solidJs.createSignal(false);
|
|
583
583
|
const cleanup = () => setClean(true);
|
|
584
|
-
solidJs.createRoot(dispose => insert(el, () => !clean() ? content : dispose(), null));
|
|
584
|
+
solidJs.createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
|
|
585
585
|
solidJs.onCleanup(cleanup);
|
|
586
586
|
} else {
|
|
587
587
|
const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
|
package/web/dist/web.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, getOwner, createEffect, runWithOwner, createSignal, onCleanup, splitProps,
|
|
1
|
+
import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, getOwner, createEffect, runWithOwner, createMemo, createSignal, onCleanup, splitProps, $DEVCOMP } from 'solid-js';
|
|
2
2
|
export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, createMemo as memo, 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"];
|
|
@@ -575,12 +575,12 @@ function Portal(props) {
|
|
|
575
575
|
let hydrating = !!sharedConfig.context;
|
|
576
576
|
createEffect(() => {
|
|
577
577
|
if (hydrating) getOwner().user = hydrating = false;
|
|
578
|
-
content || (content = runWithOwner(owner, () => props.children));
|
|
578
|
+
content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
|
|
579
579
|
const el = mount();
|
|
580
580
|
if (el instanceof HTMLHeadElement) {
|
|
581
581
|
const [clean, setClean] = createSignal(false);
|
|
582
582
|
const cleanup = () => setClean(true);
|
|
583
|
-
createRoot(dispose => insert(el, () => !clean() ? content : dispose(), null));
|
|
583
|
+
createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
|
|
584
584
|
onCleanup(cleanup);
|
|
585
585
|
} else {
|
|
586
586
|
const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
|
package/web/package.json
CHANGED
|
@@ -13,51 +13,37 @@
|
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
15
|
"worker": {
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"default": "./dist/server.js"
|
|
19
|
-
},
|
|
16
|
+
"types": "./types/index.d.ts",
|
|
17
|
+
"import": "./dist/server.js",
|
|
20
18
|
"require": "./dist/server.cjs"
|
|
21
19
|
},
|
|
22
20
|
"browser": {
|
|
23
21
|
"development": {
|
|
24
|
-
"import": {
|
|
25
|
-
"types": "./types/index.d.ts",
|
|
26
|
-
"default": "./dist/dev.js"
|
|
27
|
-
},
|
|
28
|
-
"require": "./dist/dev.cjs"
|
|
29
|
-
},
|
|
30
|
-
"import": {
|
|
31
22
|
"types": "./types/index.d.ts",
|
|
32
|
-
"
|
|
23
|
+
"import": "./dist/dev.js",
|
|
24
|
+
"require": "./dist/dev.cjs"
|
|
33
25
|
},
|
|
26
|
+
"types": "./types/index.d.ts",
|
|
27
|
+
"import": "./dist/web.js",
|
|
34
28
|
"require": "./dist/web.cjs"
|
|
35
29
|
},
|
|
36
30
|
"deno": {
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
"default": "./dist/server.js"
|
|
40
|
-
},
|
|
31
|
+
"types": "./types/index.d.ts",
|
|
32
|
+
"import": "./dist/server.js",
|
|
41
33
|
"require": "./dist/server.cjs"
|
|
42
34
|
},
|
|
43
35
|
"node": {
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
"default": "./dist/server.js"
|
|
47
|
-
},
|
|
36
|
+
"types": "./types/index.d.ts",
|
|
37
|
+
"import": "./dist/server.js",
|
|
48
38
|
"require": "./dist/server.cjs"
|
|
49
39
|
},
|
|
50
40
|
"development": {
|
|
51
|
-
"import": {
|
|
52
|
-
"types": "./types/index.d.ts",
|
|
53
|
-
"default": "./dist/dev.js"
|
|
54
|
-
},
|
|
55
|
-
"require": "./dist/dev.cjs"
|
|
56
|
-
},
|
|
57
|
-
"import": {
|
|
58
41
|
"types": "./types/index.d.ts",
|
|
59
|
-
"
|
|
42
|
+
"import": "./dist/dev.js",
|
|
43
|
+
"require": "./dist/dev.cjs"
|
|
60
44
|
},
|
|
45
|
+
"types": "./types/index.d.ts",
|
|
46
|
+
"import": "./dist/web.js",
|
|
61
47
|
"require": "./dist/web.cjs"
|
|
62
48
|
}
|
|
63
49
|
}
|