solid-js 1.5.4 → 1.5.6
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/solid.cjs +1 -1
- package/dist/solid.js +1 -1
- package/package.json +43 -1
- package/store/package.json +14 -0
- package/types/reactive/signal.d.ts +5 -4
- package/web/dist/dev.cjs +2 -2
- package/web/dist/dev.js +2 -2
- package/web/dist/server.cjs +8 -1
- package/web/dist/server.js +8 -1
- package/web/dist/web.cjs +2 -2
- package/web/dist/web.js +2 -2
- package/web/package.json +14 -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/solid.cjs
CHANGED
package/dist/solid.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-js",
|
|
3
3
|
"description": "A declarative JavaScript library for building user interfaces.",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.6",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://solidjs.com",
|
|
@@ -58,6 +58,20 @@
|
|
|
58
58
|
},
|
|
59
59
|
"require": "./dist/solid.cjs"
|
|
60
60
|
},
|
|
61
|
+
"deno": {
|
|
62
|
+
"import": {
|
|
63
|
+
"types": "./types/index.d.ts",
|
|
64
|
+
"default": "./dist/server.js"
|
|
65
|
+
},
|
|
66
|
+
"require": "./dist/server.cjs"
|
|
67
|
+
},
|
|
68
|
+
"worker": {
|
|
69
|
+
"import": {
|
|
70
|
+
"types": "./types/index.d.ts",
|
|
71
|
+
"default": "./dist/server.js"
|
|
72
|
+
},
|
|
73
|
+
"require": "./dist/server.cjs"
|
|
74
|
+
},
|
|
61
75
|
"node": {
|
|
62
76
|
"import": {
|
|
63
77
|
"types": "./types/index.d.ts",
|
|
@@ -98,6 +112,20 @@
|
|
|
98
112
|
},
|
|
99
113
|
"require": "./store/dist/store.cjs"
|
|
100
114
|
},
|
|
115
|
+
"deno": {
|
|
116
|
+
"import": {
|
|
117
|
+
"types": "./store/types/index.d.ts",
|
|
118
|
+
"default": "./store/dist/server.js"
|
|
119
|
+
},
|
|
120
|
+
"require": "./store/dist/server.cjs"
|
|
121
|
+
},
|
|
122
|
+
"worker": {
|
|
123
|
+
"import": {
|
|
124
|
+
"types": "./store/types/index.d.ts",
|
|
125
|
+
"default": "./store/dist/server.js"
|
|
126
|
+
},
|
|
127
|
+
"require": "./store/dist/server.cjs"
|
|
128
|
+
},
|
|
101
129
|
"node": {
|
|
102
130
|
"import": {
|
|
103
131
|
"types": "./store/types/index.d.ts",
|
|
@@ -134,6 +162,20 @@
|
|
|
134
162
|
},
|
|
135
163
|
"require": "./web/dist/web.cjs"
|
|
136
164
|
},
|
|
165
|
+
"deno": {
|
|
166
|
+
"import": {
|
|
167
|
+
"types": "./web/types/index.d.ts",
|
|
168
|
+
"default": "./web/dist/server.js"
|
|
169
|
+
},
|
|
170
|
+
"require": "./web/dist/server.cjs"
|
|
171
|
+
},
|
|
172
|
+
"worker": {
|
|
173
|
+
"import": {
|
|
174
|
+
"types": "./web/types/index.d.ts",
|
|
175
|
+
"default": "./web/dist/server.js"
|
|
176
|
+
},
|
|
177
|
+
"require": "./web/dist/server.cjs"
|
|
178
|
+
},
|
|
137
179
|
"node": {
|
|
138
180
|
"import": {
|
|
139
181
|
"types": "./web/types/index.d.ts",
|
package/store/package.json
CHANGED
|
@@ -26,6 +26,20 @@
|
|
|
26
26
|
},
|
|
27
27
|
"require": "./dist/store.cjs"
|
|
28
28
|
},
|
|
29
|
+
"deno": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./types/index.d.ts",
|
|
32
|
+
"default": "./dist/server.js"
|
|
33
|
+
},
|
|
34
|
+
"require": "./dist/server.cjs"
|
|
35
|
+
},
|
|
36
|
+
"worker": {
|
|
37
|
+
"import": {
|
|
38
|
+
"types": "./types/index.d.ts",
|
|
39
|
+
"default": "./dist/server.js"
|
|
40
|
+
},
|
|
41
|
+
"require": "./dist/server.cjs"
|
|
42
|
+
},
|
|
29
43
|
"node": {
|
|
30
44
|
"import": {
|
|
31
45
|
"types": "./types/index.d.ts",
|
|
@@ -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/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
|
}
|
package/web/dist/dev.js
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
|
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
|
}
|
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
|
}
|
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
|
}
|
package/web/dist/web.js
CHANGED
|
@@ -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/package.json
CHANGED
|
@@ -26,6 +26,20 @@
|
|
|
26
26
|
},
|
|
27
27
|
"require": "./dist/web.cjs"
|
|
28
28
|
},
|
|
29
|
+
"deno": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./types/index.d.ts",
|
|
32
|
+
"default": "./dist/server.js"
|
|
33
|
+
},
|
|
34
|
+
"require": "./dist/server.cjs"
|
|
35
|
+
},
|
|
36
|
+
"worker": {
|
|
37
|
+
"import": {
|
|
38
|
+
"types": "./types/index.d.ts",
|
|
39
|
+
"default": "./dist/server.js"
|
|
40
|
+
},
|
|
41
|
+
"require": "./dist/server.cjs"
|
|
42
|
+
},
|
|
29
43
|
"node": {
|
|
30
44
|
"import": {
|
|
31
45
|
"types": "./types/index.d.ts",
|