solid-js 1.3.4 → 1.3.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/server.cjs +4 -0
- package/dist/server.js +3 -1
- package/package.json +2 -2
- package/types/server/index.d.ts +1 -1
- package/web/dist/dev.cjs +7 -11
- package/web/dist/dev.js +7 -11
- package/web/dist/server.cjs +9 -7
- package/web/dist/server.js +9 -7
- package/web/dist/web.cjs +7 -11
- package/web/dist/web.js +7 -11
package/dist/server.cjs
CHANGED
|
@@ -311,6 +311,7 @@ function Switch(props) {
|
|
|
311
311
|
function Match(props) {
|
|
312
312
|
return props;
|
|
313
313
|
}
|
|
314
|
+
function resetErrorBoundaries() {}
|
|
314
315
|
function ErrorBoundary(props) {
|
|
315
316
|
let error, res;
|
|
316
317
|
const ctx = sharedConfig.context;
|
|
@@ -411,6 +412,7 @@ function createResource(fn, fetcher, options = {}) {
|
|
|
411
412
|
mutate: v => value = v
|
|
412
413
|
}];
|
|
413
414
|
}
|
|
415
|
+
function refetchResources(info) {}
|
|
414
416
|
function lazy(fn) {
|
|
415
417
|
let resolved;
|
|
416
418
|
const p = fn();
|
|
@@ -558,7 +560,9 @@ exports.on = on;
|
|
|
558
560
|
exports.onCleanup = onCleanup;
|
|
559
561
|
exports.onError = onError;
|
|
560
562
|
exports.onMount = onMount;
|
|
563
|
+
exports.refetchResources = refetchResources;
|
|
561
564
|
exports.requestCallback = requestCallback;
|
|
565
|
+
exports.resetErrorBoundaries = resetErrorBoundaries;
|
|
562
566
|
exports.runWithOwner = runWithOwner;
|
|
563
567
|
exports.sharedConfig = sharedConfig;
|
|
564
568
|
exports.splitProps = splitProps;
|
package/dist/server.js
CHANGED
|
@@ -307,6 +307,7 @@ function Switch(props) {
|
|
|
307
307
|
function Match(props) {
|
|
308
308
|
return props;
|
|
309
309
|
}
|
|
310
|
+
function resetErrorBoundaries() {}
|
|
310
311
|
function ErrorBoundary(props) {
|
|
311
312
|
let error, res;
|
|
312
313
|
const ctx = sharedConfig.context;
|
|
@@ -407,6 +408,7 @@ function createResource(fn, fetcher, options = {}) {
|
|
|
407
408
|
mutate: v => value = v
|
|
408
409
|
}];
|
|
409
410
|
}
|
|
411
|
+
function refetchResources(info) {}
|
|
410
412
|
function lazy(fn) {
|
|
411
413
|
let resolved;
|
|
412
414
|
const p = fn();
|
|
@@ -513,4 +515,4 @@ function Suspense(props) {
|
|
|
513
515
|
return props.fallback;
|
|
514
516
|
}
|
|
515
517
|
|
|
516
|
-
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, runWithOwner, sharedConfig, splitProps, startTransition, untrack, useContext, useTransition };
|
|
518
|
+
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, refetchResources, requestCallback, resetErrorBoundaries, runWithOwner, sharedConfig, splitProps, startTransition, untrack, useContext, useTransition };
|
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.3.
|
|
4
|
+
"version": "1.3.5",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://solidjs.com",
|
|
@@ -144,5 +144,5 @@
|
|
|
144
144
|
"compiler",
|
|
145
145
|
"performance"
|
|
146
146
|
],
|
|
147
|
-
"gitHead": "
|
|
147
|
+
"gitHead": "cc19f07cfd675bd5579891dcae3145fa0d171c66"
|
|
148
148
|
}
|
package/types/server/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
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";
|
|
2
|
-
export { mergeProps, splitProps, createComponent, For, Index, Show, Switch, Match, ErrorBoundary, Suspense, SuspenseList, createResource, enableScheduling, enableHydration, startTransition, useTransition, createUniqueId, lazy, sharedConfig } from "./rendering";
|
|
2
|
+
export { mergeProps, splitProps, createComponent, For, Index, Show, Switch, Match, ErrorBoundary, Suspense, SuspenseList, createResource, refetchResources, resetErrorBoundaries, enableScheduling, enableHydration, startTransition, useTransition, createUniqueId, lazy, sharedConfig } from "./rendering";
|
|
3
3
|
export type { Component, Resource } from "./rendering";
|
package/web/dist/dev.cjs
CHANGED
|
@@ -389,18 +389,14 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
389
389
|
return current;
|
|
390
390
|
}
|
|
391
391
|
if (array.length === 0) {
|
|
392
|
-
|
|
393
|
-
|
|
392
|
+
cleanChildren(parent, current, marker);
|
|
393
|
+
} else if (Array.isArray(current)) {
|
|
394
|
+
if (current.length === 0) {
|
|
395
|
+
appendNodes(parent, array, marker);
|
|
396
|
+
} else reconcileArrays(parent, current, array);
|
|
394
397
|
} else {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
appendNodes(parent, array, marker);
|
|
398
|
-
} else reconcileArrays(parent, current, array);
|
|
399
|
-
} else if (current == null || current === "") {
|
|
400
|
-
appendNodes(parent, array);
|
|
401
|
-
} else {
|
|
402
|
-
reconcileArrays(parent, multi && current || [parent.firstChild], array);
|
|
403
|
-
}
|
|
398
|
+
current && cleanChildren(parent, current);
|
|
399
|
+
appendNodes(parent, array);
|
|
404
400
|
}
|
|
405
401
|
current = array;
|
|
406
402
|
} else if (value instanceof Node) {
|
package/web/dist/dev.js
CHANGED
|
@@ -386,18 +386,14 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
386
386
|
return current;
|
|
387
387
|
}
|
|
388
388
|
if (array.length === 0) {
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
cleanChildren(parent, current, marker);
|
|
390
|
+
} else if (Array.isArray(current)) {
|
|
391
|
+
if (current.length === 0) {
|
|
392
|
+
appendNodes(parent, array, marker);
|
|
393
|
+
} else reconcileArrays(parent, current, array);
|
|
391
394
|
} else {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
appendNodes(parent, array, marker);
|
|
395
|
-
} else reconcileArrays(parent, current, array);
|
|
396
|
-
} else if (current == null || current === "") {
|
|
397
|
-
appendNodes(parent, array);
|
|
398
|
-
} else {
|
|
399
|
-
reconcileArrays(parent, multi && current || [parent.firstChild], array);
|
|
400
|
-
}
|
|
395
|
+
current && cleanChildren(parent, current);
|
|
396
|
+
appendNodes(parent, array);
|
|
401
397
|
}
|
|
402
398
|
current = array;
|
|
403
399
|
} else if (value instanceof Node) {
|
package/web/dist/server.cjs
CHANGED
|
@@ -232,7 +232,7 @@ function stringifyString(str) {
|
|
|
232
232
|
return result;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
const REPLACE_SCRIPT = `function $df(e,y,t){t=document.getElementById(e),document.getElementById("pl"+e).replaceWith(...t.childNodes),_$HY.set(e,y||null)}`;
|
|
235
|
+
const REPLACE_SCRIPT = `function $df(e,y,t,g){t=document.getElementById(e),g=document.getElementById("pl"+e),g&&g.replaceWith(...t.childNodes),_$HY.set(e,y||null)}`;
|
|
236
236
|
const FRAGMENT_REPLACE = /<!\[([\d.]+)\]>/;
|
|
237
237
|
function renderToString(code, options = {}) {
|
|
238
238
|
let scripts = "";
|
|
@@ -375,12 +375,14 @@ function renderToStream(code, options = {}) {
|
|
|
375
375
|
}
|
|
376
376
|
tasks.push(`_$HY.init("${key}")`);
|
|
377
377
|
return (value, error) => {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
378
|
+
if (registry.has(key)) {
|
|
379
|
+
const keys = registry.get(key);
|
|
380
|
+
registry.delete(key);
|
|
381
|
+
if (waitForFragments(registry, key)) return;
|
|
382
|
+
if ((value !== undefined || error) && !completed) {
|
|
383
|
+
buffer.write(`<div hidden id="${key}">${value !== undefined ? value : " "}</div><script${nonce ? ` nonce="${nonce}"` : ""}>${!scriptFlushed ? REPLACE_SCRIPT : ""}${keys.length ? keys.map(k => `_$HY.unset("${k}");`) : ""}$df("${key}"${error ? "," + serializeError(error) : ""})</script>`);
|
|
384
|
+
scriptFlushed = true;
|
|
385
|
+
}
|
|
384
386
|
}
|
|
385
387
|
checkEnd();
|
|
386
388
|
return true;
|
package/web/dist/server.js
CHANGED
|
@@ -229,7 +229,7 @@ function stringifyString(str) {
|
|
|
229
229
|
return result;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
const REPLACE_SCRIPT = `function $df(e,y,t){t=document.getElementById(e),document.getElementById("pl"+e).replaceWith(...t.childNodes),_$HY.set(e,y||null)}`;
|
|
232
|
+
const REPLACE_SCRIPT = `function $df(e,y,t,g){t=document.getElementById(e),g=document.getElementById("pl"+e),g&&g.replaceWith(...t.childNodes),_$HY.set(e,y||null)}`;
|
|
233
233
|
const FRAGMENT_REPLACE = /<!\[([\d.]+)\]>/;
|
|
234
234
|
function renderToString(code, options = {}) {
|
|
235
235
|
let scripts = "";
|
|
@@ -372,12 +372,14 @@ function renderToStream(code, options = {}) {
|
|
|
372
372
|
}
|
|
373
373
|
tasks.push(`_$HY.init("${key}")`);
|
|
374
374
|
return (value, error) => {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
375
|
+
if (registry.has(key)) {
|
|
376
|
+
const keys = registry.get(key);
|
|
377
|
+
registry.delete(key);
|
|
378
|
+
if (waitForFragments(registry, key)) return;
|
|
379
|
+
if ((value !== undefined || error) && !completed) {
|
|
380
|
+
buffer.write(`<div hidden id="${key}">${value !== undefined ? value : " "}</div><script${nonce ? ` nonce="${nonce}"` : ""}>${!scriptFlushed ? REPLACE_SCRIPT : ""}${keys.length ? keys.map(k => `_$HY.unset("${k}");`) : ""}$df("${key}"${error ? "," + serializeError(error) : ""})</script>`);
|
|
381
|
+
scriptFlushed = true;
|
|
382
|
+
}
|
|
381
383
|
}
|
|
382
384
|
checkEnd();
|
|
383
385
|
return true;
|
package/web/dist/web.cjs
CHANGED
|
@@ -388,18 +388,14 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
388
388
|
return current;
|
|
389
389
|
}
|
|
390
390
|
if (array.length === 0) {
|
|
391
|
-
|
|
392
|
-
|
|
391
|
+
cleanChildren(parent, current, marker);
|
|
392
|
+
} else if (Array.isArray(current)) {
|
|
393
|
+
if (current.length === 0) {
|
|
394
|
+
appendNodes(parent, array, marker);
|
|
395
|
+
} else reconcileArrays(parent, current, array);
|
|
393
396
|
} else {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
appendNodes(parent, array, marker);
|
|
397
|
-
} else reconcileArrays(parent, current, array);
|
|
398
|
-
} else if (current == null || current === "") {
|
|
399
|
-
appendNodes(parent, array);
|
|
400
|
-
} else {
|
|
401
|
-
reconcileArrays(parent, multi && current || [parent.firstChild], array);
|
|
402
|
-
}
|
|
397
|
+
current && cleanChildren(parent, current);
|
|
398
|
+
appendNodes(parent, array);
|
|
403
399
|
}
|
|
404
400
|
current = array;
|
|
405
401
|
} else if (value instanceof Node) {
|
package/web/dist/web.js
CHANGED
|
@@ -385,18 +385,14 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
385
385
|
return current;
|
|
386
386
|
}
|
|
387
387
|
if (array.length === 0) {
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
cleanChildren(parent, current, marker);
|
|
389
|
+
} else if (Array.isArray(current)) {
|
|
390
|
+
if (current.length === 0) {
|
|
391
|
+
appendNodes(parent, array, marker);
|
|
392
|
+
} else reconcileArrays(parent, current, array);
|
|
390
393
|
} else {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
appendNodes(parent, array, marker);
|
|
394
|
-
} else reconcileArrays(parent, current, array);
|
|
395
|
-
} else if (current == null || current === "") {
|
|
396
|
-
appendNodes(parent, array);
|
|
397
|
-
} else {
|
|
398
|
-
reconcileArrays(parent, multi && current || [parent.firstChild], array);
|
|
399
|
-
}
|
|
394
|
+
current && cleanChildren(parent, current);
|
|
395
|
+
appendNodes(parent, array);
|
|
400
396
|
}
|
|
401
397
|
current = array;
|
|
402
398
|
} else if (value instanceof Node) {
|