@nifrajs/web-solid 5.8.0 → 5.9.0
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/CHANGELOG.md +63 -0
- package/dist/fn.d.ts.map +1 -1
- package/dist/fn.js +2 -1
- package/dist/fn.js.map +1 -1
- package/dist/keep-alive.d.ts +1 -1
- package/dist/keep-alive.d.ts.map +1 -1
- package/dist/keep-alive.js +6 -14
- package/dist/keep-alive.js.map +1 -1
- package/dist/ppr.d.ts +1 -9
- package/dist/ppr.d.ts.map +1 -1
- package/dist/ppr.js.map +1 -1
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +3 -8
- package/dist/router.js.map +1 -1
- package/package.json +5 -5
- package/src/fn.ts +3 -2
- package/src/keep-alive.ts +7 -20
- package/src/ppr.ts +1 -10
- package/src/router.ts +3 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
# @nifrajs/web-solid
|
|
2
2
|
|
|
3
|
+
## 5.9.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2ffa7c1: The React, Preact, Solid, Svelte and Vue `useServerFn` bindings take their function through one shared helper in `@nifrajs/web/internal/client-server-fn`.
|
|
8
|
+
|
|
9
|
+
The React, Svelte and Vue client and keep-alive mounts read a hydration verification runner's hooks through one reader in `@nifrajs/web/internal/hydration-assurance`. Recoverable errors and warnings reach the runner as before.
|
|
10
|
+
- 71dea89: Every binding's `useNavigate` returns one navigate from `@nifrajs/web/internal/navigate-runtime`, the same function on every call. The React, Preact, Solid and Vue `Hole` components read their boundary state through the `HoleState` type in `@nifrajs/web/internal/hole-runtime`.
|
|
11
|
+
- a0fe5bf: The keep-alive mounts of the React, Preact, Svelte, Solid and Vue adapters take their framework-free half from `@nifrajs/web/internal/keep-alive-mount`. This covers the slot tree of each router state, the parking each committed tree goes to, render props made once per state, and the slots under each layout. Each adapter still renders the slots its own way. Kept pages behave as before.
|
|
12
|
+
- Updated dependencies [2ffa7c1]
|
|
13
|
+
- Updated dependencies [100a0aa]
|
|
14
|
+
- Updated dependencies [71dea89]
|
|
15
|
+
- Updated dependencies [9c20e05]
|
|
16
|
+
- Updated dependencies [9942748]
|
|
17
|
+
- Updated dependencies [8cdb138]
|
|
18
|
+
- Updated dependencies [be1c677]
|
|
19
|
+
- Updated dependencies [f399e06]
|
|
20
|
+
- Updated dependencies [93e7078]
|
|
21
|
+
- Updated dependencies [2c2f58b]
|
|
22
|
+
- Updated dependencies [123409c]
|
|
23
|
+
- Updated dependencies [7ee17d0]
|
|
24
|
+
- Updated dependencies [68d9f31]
|
|
25
|
+
- Updated dependencies [fa7d102]
|
|
26
|
+
- Updated dependencies [ddeb735]
|
|
27
|
+
- Updated dependencies [a3fb195]
|
|
28
|
+
- Updated dependencies [47a864f]
|
|
29
|
+
- Updated dependencies [9942748]
|
|
30
|
+
- Updated dependencies [ffcf41a]
|
|
31
|
+
- Updated dependencies [7a15327]
|
|
32
|
+
- Updated dependencies [866c8ec]
|
|
33
|
+
- Updated dependencies [bc42fd2]
|
|
34
|
+
- Updated dependencies [a29d1cc]
|
|
35
|
+
- Updated dependencies [9942748]
|
|
36
|
+
- Updated dependencies [77b98ea]
|
|
37
|
+
- Updated dependencies [a3caf9b]
|
|
38
|
+
- Updated dependencies [a0fe5bf]
|
|
39
|
+
- Updated dependencies [7ba5c9b]
|
|
40
|
+
- Updated dependencies [0445564]
|
|
41
|
+
- Updated dependencies [180bf9d]
|
|
42
|
+
- Updated dependencies [ff9bc11]
|
|
43
|
+
- Updated dependencies [8094874]
|
|
44
|
+
- Updated dependencies [a7b89ee]
|
|
45
|
+
- Updated dependencies [34b780e]
|
|
46
|
+
- Updated dependencies [111c3be]
|
|
47
|
+
- Updated dependencies [5bd225e]
|
|
48
|
+
- Updated dependencies [d6e6617]
|
|
49
|
+
- Updated dependencies [5bc60b7]
|
|
50
|
+
- Updated dependencies [159ae97]
|
|
51
|
+
- Updated dependencies [6ba9740]
|
|
52
|
+
- Updated dependencies [5f4416a]
|
|
53
|
+
- Updated dependencies [bc05ec5]
|
|
54
|
+
- Updated dependencies [d3c050e]
|
|
55
|
+
- Updated dependencies [c4ed3e9]
|
|
56
|
+
- Updated dependencies [9942748]
|
|
57
|
+
- Updated dependencies [5bc60b7]
|
|
58
|
+
- Updated dependencies [3299474]
|
|
59
|
+
- Updated dependencies [543d00a]
|
|
60
|
+
- Updated dependencies [020eb7b]
|
|
61
|
+
- Updated dependencies [9942748]
|
|
62
|
+
- Updated dependencies [9785cd4]
|
|
63
|
+
- @nifrajs/web@5.9.0
|
|
64
|
+
- @nifrajs/core@5.9.0
|
|
65
|
+
|
|
3
66
|
## 5.8.0
|
|
4
67
|
|
|
5
68
|
### Patch Changes
|
package/dist/fn.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fn.d.ts","sourceRoot":"","sources":["../src/fn.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"fn.d.ts","sourceRoot":"","sources":["../src/fn.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAE/E,OAAO,EAAE,KAAK,QAAQ,EAA2B,MAAM,UAAU,CAAA;AAEjE,+DAA+D;AAC/D,MAAM,WAAW,cAAc,CAAC,KAAK,EAAE,MAAM;IAC3C,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAA;IAC/C,mGAAmG;IACnG,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAChD,oBAAoB;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAA;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EACvC,EAAE,EAAE,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,GACnC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAS/B"}
|
package/dist/fn.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* "is it pending" has one answer rather than five that drift. This file contributes only a signal fed by the store.
|
|
9
9
|
*/
|
|
10
10
|
import { createServerFnStore } from "@nifrajs/web/fn-state";
|
|
11
|
+
import { clientServerFn } from "@nifrajs/web/internal/client-server-fn";
|
|
11
12
|
import { createSignal, onCleanup } from "solid-js";
|
|
12
13
|
/**
|
|
13
14
|
* Track one server function's call state.
|
|
@@ -16,7 +17,7 @@ import { createSignal, onCleanup } from "solid-js";
|
|
|
16
17
|
* <button disabled={addTodo.state().pending} onClick={() => addTodo.call({ text }).catch(() => {})}>
|
|
17
18
|
*/
|
|
18
19
|
export function useServerFn(fn) {
|
|
19
|
-
const store = createServerFnStore(fn);
|
|
20
|
+
const store = createServerFnStore(clientServerFn(fn));
|
|
20
21
|
// Seeded from the store, not from the idle constant. They are the same value here - the store is
|
|
21
22
|
// created one line up and cannot have moved - so this is correctness that does not depend on that
|
|
22
23
|
// staying true. Svelte had exactly this line reading the constant, and when its subscription turned
|
package/dist/fn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fn.js","sourceRoot":"","sources":["../src/fn.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,mBAAmB,EAAsB,MAAM,uBAAuB,CAAA;AAC/E,OAAO,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAYjE;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACzB,EAAoC;IAEpC,MAAM,KAAK,GAAG,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"fn.js","sourceRoot":"","sources":["../src/fn.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,mBAAmB,EAAsB,MAAM,uBAAuB,CAAA;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAA;AACvE,OAAO,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAYjE;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACzB,EAAoC;IAEpC,MAAM,KAAK,GAAG,mBAAmB,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;IACrD,iGAAiG;IACjG,kGAAkG;IAClG,oGAAoG;IACpG,oFAAoF;IACpF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,YAAY,CAAwB,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;IAC/E,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAA;IAClE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAA;AACxD,CAAC"}
|
package/dist/keep-alive.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* in place, synchronously, so the DOM half runs right after each publish.
|
|
10
10
|
*/
|
|
11
11
|
import type { MountRouterOptions } from "@nifrajs/web";
|
|
12
|
-
import {
|
|
12
|
+
import type { KeepAliveRouter, KeepAliveTable } from "@nifrajs/web/keep-alive";
|
|
13
13
|
export * from "./client.js";
|
|
14
14
|
export { onPageHide, onPageShow, usePageVisibility } from "./page-visibility.js";
|
|
15
15
|
/** `mountRouter`'s options in a keep-alive app: the generated entry adds where the wrappers go. */
|
package/dist/keep-alive.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keep-alive.d.ts","sourceRoot":"","sources":["../src/keep-alive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAe,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"keep-alive.d.ts","sourceRoot":"","sources":["../src/keep-alive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAe,MAAM,cAAc,CAAA;AAEnE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAY,MAAM,yBAAyB,CAAA;AAOxF,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAEhF,mGAAmG;AACnG,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;IAChC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAA;CACnC;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CA8BhE"}
|
package/dist/keep-alive.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { keptMount } from "@nifrajs/web/internal/keep-alive-mount";
|
|
2
2
|
import { createMemo, createSignal } from "solid-js";
|
|
3
3
|
import { hydrate as solidHydrate } from "solid-js/web";
|
|
4
4
|
import { setMountedRouter } from "./fetcher.js";
|
|
@@ -11,37 +11,29 @@ export { onPageHide, onPageShow, usePageVisibility } from "./page-visibility.js"
|
|
|
11
11
|
* wrappers the server rendered), so hydration claims the document as it is.
|
|
12
12
|
*/
|
|
13
13
|
export function mountRouter(options) {
|
|
14
|
-
const { router,
|
|
14
|
+
const { router, searchSchemas, container } = options;
|
|
15
15
|
const matchChains = options.matchChains ?? {};
|
|
16
16
|
setMountedRouter(router);
|
|
17
|
-
const
|
|
18
|
-
let committed;
|
|
19
|
-
router.beforePublish((next) => parking.before(slotTree(next, matchChains, table, committed)));
|
|
17
|
+
const kept = keptMount(options);
|
|
20
18
|
let current = [];
|
|
21
19
|
let publish;
|
|
22
|
-
// biome-ignore lint/plugin/requireSafetyCommentForTypeAssertion: the generated entry passes the element the server rendered the app into
|
|
23
20
|
solidHydrate(() => {
|
|
24
21
|
const [state, setState] = createSignal(router.snapshot());
|
|
25
22
|
publish = (next) => setState(() => next);
|
|
26
23
|
const tree = createMemo(() => {
|
|
27
|
-
current =
|
|
24
|
+
current = kept.tree(state(), current);
|
|
28
25
|
return current;
|
|
29
26
|
});
|
|
30
27
|
const mount = {
|
|
28
|
+
...kept,
|
|
31
29
|
propsOf: (of) => routeProps(of, searchSchemas, matchChains, (read) => createMemo(read)),
|
|
32
|
-
chainOf: (of) => routes[of.routeId] ?? [],
|
|
33
|
-
entry: parking.entry,
|
|
34
|
-
page: parking.page,
|
|
35
30
|
};
|
|
36
31
|
return KeepAliveView({ tree, shown: mount.propsOf(state), mount });
|
|
37
32
|
// biome-ignore lint/plugin/requireSafetyCommentForTypeAssertion: the generated entry passes the element the server rendered the app into
|
|
38
33
|
}, container);
|
|
39
34
|
// Solid has updated the document by the time a publish returns: park what it hid, restore what it
|
|
40
35
|
// showed again.
|
|
41
|
-
const after = () =>
|
|
42
|
-
committed = current;
|
|
43
|
-
parking.after(current);
|
|
44
|
-
};
|
|
36
|
+
const after = () => kept.after(current);
|
|
45
37
|
after();
|
|
46
38
|
router.subscribe(() => {
|
|
47
39
|
publish?.(router.snapshot());
|
package/dist/keep-alive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keep-alive.js","sourceRoot":"","sources":["../src/keep-alive.ts"],"names":[],"mappings":"AAWA,OAAO,
|
|
1
|
+
{"version":3,"file":"keep-alive.js","sourceRoot":"","sources":["../src/keep-alive.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAA;AAElE,OAAO,EAAE,UAAU,EAAE,YAAY,EA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,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;SACxF,CAAA;QACD,OAAO,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;QAClE,yIAAyI;IAC3I,CAAC,EAAE,SAAoB,CAAC,CAAA;IACxB,kGAAkG;IAClG,gBAAgB;IAChB,MAAM,KAAK,GAAG,GAAS,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAC7C,KAAK,EAAE,CAAA;IACP,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE;QACpB,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAA;QAC5B,KAAK,EAAE,CAAA;IACT,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/ppr.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type HoleState } from "@nifrajs/web/internal/hole-runtime";
|
|
1
2
|
import { type JSX } from "solid-js";
|
|
2
3
|
/**
|
|
3
4
|
* The fields of a route's boundary declaration a hole renders from. `fallback` is a function: JSX
|
|
@@ -9,14 +10,6 @@ export interface HoleDefinition<Data> {
|
|
|
9
10
|
readonly fallback?: () => JSX.Element;
|
|
10
11
|
readonly interactive?: boolean;
|
|
11
12
|
}
|
|
12
|
-
/** The slice of a boundary state a hole reads: `ppr` marks a hole the shared shell left open, and
|
|
13
|
-
* `fill` that host's refill when the page reloads. */
|
|
14
|
-
interface HoleState {
|
|
15
|
-
readonly status: "unresolved" | "pending" | "ready" | "error";
|
|
16
|
-
readonly data?: unknown;
|
|
17
|
-
readonly ppr?: true;
|
|
18
|
-
readonly fill?: unknown;
|
|
19
|
-
}
|
|
20
13
|
export interface HoleProps<Data> {
|
|
21
14
|
readonly of: HoleDefinition<Data>;
|
|
22
15
|
readonly state: HoleState | undefined;
|
|
@@ -33,5 +26,4 @@ export interface HoleProps<Data> {
|
|
|
33
26
|
* navigation the hole renders like any streamed boundary.
|
|
34
27
|
*/
|
|
35
28
|
export declare function Hole<Data>(props: HoleProps<Data>): JSX.Element;
|
|
36
|
-
export {};
|
|
37
29
|
//# sourceMappingURL=ppr.d.ts.map
|
package/dist/ppr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ppr.d.ts","sourceRoot":"","sources":["../src/ppr.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ppr.d.ts","sourceRoot":"","sources":["../src/ppr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,oCAAoC,CAAA;AAChF,OAAO,EAA+B,KAAK,GAAG,EAAW,MAAM,UAAU,CAAA;AAKzE;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,IAAI;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,GAAG,CAAC,OAAO,CAAA;IAC5C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,OAAO,CAAA;IACrC,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED,MAAM,WAAW,SAAS,CAAC,IAAI;IAC7B,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;IACjC,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAA;IACrC,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CAC7B;AAiBD;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,OAAO,CA4B9D"}
|
package/dist/ppr.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ppr.js","sourceR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ACH,CAAA;IACH,CAAC,CAAC,CAAA;IACF,mNAAmN;IACnN,OAAO,IAA8B,CAAA;AACvC,CAAC"}
|
package/dist/router.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAIzE,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EACf,YAAY,EACZ,gBAAgB,
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAIzE,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,OAAO,EACR,MAAM,cAAc,CAAA;AAOrB;;;;;;GAMG;AACH,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,OAAO,EAMb,MAAM,UAAU,CAAA;AAGjB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAChF,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAA;AAiBjF,eAAO,MAAM,aAAa,wDACoE,CAAA;AAO9F,eAAO,MAAM,kBAAkB,kCACuC,CAAA;AAKtE;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,IAAI,QAAQ,CAAC,SAAS,OAAO,EAAE,CAAC,CAIzD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,MAAM,SAAS,gBAAgB,GAAG,SAAS,GAAG,SAAS,KAAK,QAAQ,CAC5F,MAAM,SAAS,gBAAgB,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAChF,CAIA;AAED;;kCAEkC;AAClC,wBAAgB,WAAW,IAAI,gBAAgB,CAE9C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,OAAO,GAAG,eAAe,GAAG,QAAQ,CAAC,OAAO,CAAC,CAYpF"}
|
package/dist/router.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// `/client`, not the root - these are DOM values, and the root's graph carries the
|
|
2
2
|
// server, which Vite's dev server evaluates rather than tree-shakes.
|
|
3
|
-
import {
|
|
3
|
+
import { IDLE_BLOCKER, registerBlocker } from "@nifrajs/web/client";
|
|
4
4
|
// Its own subpath, so an app that never calls `useMatches` never bundles it.
|
|
5
5
|
import { chainMatches } from "@nifrajs/web/internal/matches-runtime";
|
|
6
|
+
import { navigateNow } from "@nifrajs/web/internal/navigate-runtime";
|
|
6
7
|
/**
|
|
7
8
|
* `@nifrajs/web-solid/router` - Solid routing bindings over the agnostic `@nifrajs/web` history layer:
|
|
8
9
|
* `useNavigate` (programmatic navigation), `useBlocker` (the unsaved-changes guard), and `useSearch`
|
|
@@ -71,13 +72,7 @@ export function useSearch() {
|
|
|
71
72
|
* Resolves the browser navigate at call time, so it works as soon as `installHistory` has run and no-ops
|
|
72
73
|
* before then / on the server. */
|
|
73
74
|
export function useNavigate() {
|
|
74
|
-
return
|
|
75
|
-
const navigate = getBrowserNavigate();
|
|
76
|
-
if (navigate === undefined)
|
|
77
|
-
return;
|
|
78
|
-
const resolved = resolveNavigate(to, options);
|
|
79
|
-
navigate(resolved.to, resolved.options);
|
|
80
|
-
});
|
|
75
|
+
return navigateNow;
|
|
81
76
|
}
|
|
82
77
|
/**
|
|
83
78
|
* Guard navigation away from a page with unsaved work, confirming with your OWN async UI. Mirrors
|
package/dist/router.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"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AAE,CAAC,CAAA;AAExD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,UAAU;IACxB,MAAM,KAAK,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAA;IAC5C,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,GAAG,EAAE,CAAC,UAAU,CAAA;IAChD,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAA;AAC9C,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,SAAS;IAGvB,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,qBAAqB,CAEzD,CAAA;AACH,CAAC;AAED;;kCAEkC;AAClC,MAAM,UAAU,WAAW;IACzB,OAAO,WAAW,CAAA;AACpB,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,UAAU,CAAC,WAAsC;IAC/D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,YAAY,CAAU,YAAY,CAAC,CAAA;IACjE,MAAM,IAAI,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IACpC,SAAS,CACP,eAAe,CACb,CAAC,IAAI,EAAE,EAAE,CACP,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI;QACvB,CAAC,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,EACvE,UAAU,CACX,CACF,CAAA;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nifrajs/web-solid",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.9.0",
|
|
4
4
|
"description": "Solid render adapter for @nifrajs/web - SSR + hydration, with the Solid Babel build plugin (@nifrajs/web-solid/plugin).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -132,16 +132,16 @@
|
|
|
132
132
|
"dependencies": {
|
|
133
133
|
"@babel/core": "^7.26.0",
|
|
134
134
|
"@babel/preset-typescript": "^7.26.0",
|
|
135
|
-
"@nifrajs/core": "5.
|
|
136
|
-
"@nifrajs/web": "5.
|
|
135
|
+
"@nifrajs/core": "5.9.0",
|
|
136
|
+
"@nifrajs/web": "5.9.0",
|
|
137
137
|
"babel-preset-solid": "^1.9.3",
|
|
138
138
|
"solid-refresh": "^0.7.8"
|
|
139
139
|
},
|
|
140
140
|
"peerDependencies": {
|
|
141
141
|
"@mdx-js/mdx": "^3",
|
|
142
142
|
"solid-js": "^1.9.0",
|
|
143
|
-
"@nifrajs/i18n": "^5.
|
|
144
|
-
"@nifrajs/image": "^5.
|
|
143
|
+
"@nifrajs/i18n": "^5.9.0",
|
|
144
|
+
"@nifrajs/image": "^5.9.0"
|
|
145
145
|
},
|
|
146
146
|
"peerDependenciesMeta": {
|
|
147
147
|
"@mdx-js/mdx": {
|
package/src/fn.ts
CHANGED
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
* "is it pending" has one answer rather than five that drift. This file contributes only a signal fed by the store.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {
|
|
11
|
+
import type { ServerFnReference } from "@nifrajs/web/fn"
|
|
12
12
|
import { createServerFnStore, type ServerFnState } from "@nifrajs/web/fn-state"
|
|
13
|
+
import { clientServerFn } from "@nifrajs/web/internal/client-server-fn"
|
|
13
14
|
import { type Accessor, createSignal, onCleanup } from "solid-js"
|
|
14
15
|
|
|
15
16
|
/** A server function's state accessor plus the call itself. */
|
|
@@ -31,7 +32,7 @@ export interface ServerFnHandle<Input, Output> {
|
|
|
31
32
|
export function useServerFn<Input, Output>(
|
|
32
33
|
fn: ServerFnReference<Input, Output>,
|
|
33
34
|
): ServerFnHandle<Input, Output> {
|
|
34
|
-
const store = createServerFnStore(fn
|
|
35
|
+
const store = createServerFnStore(clientServerFn(fn))
|
|
35
36
|
// Seeded from the store, not from the idle constant. They are the same value here - the store is
|
|
36
37
|
// created one line up and cannot have moved - so this is correctness that does not depend on that
|
|
37
38
|
// staying true. Svelte had exactly this line reading the constant, and when its subscription turned
|
package/src/keep-alive.ts
CHANGED
|
@@ -9,13 +9,8 @@
|
|
|
9
9
|
* in place, synchronously, so the DOM half runs right after each publish.
|
|
10
10
|
*/
|
|
11
11
|
import type { MountRouterOptions, RouterState } from "@nifrajs/web"
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
type KeepAliveRouter,
|
|
15
|
-
type KeepAliveTable,
|
|
16
|
-
type SlotNode,
|
|
17
|
-
slotTree,
|
|
18
|
-
} from "@nifrajs/web/keep-alive"
|
|
12
|
+
import { keptMount } from "@nifrajs/web/internal/keep-alive-mount"
|
|
13
|
+
import type { KeepAliveRouter, KeepAliveTable, SlotNode } from "@nifrajs/web/keep-alive"
|
|
19
14
|
import { createMemo, createSignal } from "solid-js"
|
|
20
15
|
import { hydrate as solidHydrate } from "solid-js/web"
|
|
21
16
|
import { setMountedRouter } from "./fetcher.ts"
|
|
@@ -36,38 +31,30 @@ export interface KeepAliveMountOptions extends MountRouterOptions {
|
|
|
36
31
|
* wrappers the server rendered), so hydration claims the document as it is.
|
|
37
32
|
*/
|
|
38
33
|
export function mountRouter(options: KeepAliveMountOptions): void {
|
|
39
|
-
const { router,
|
|
34
|
+
const { router, searchSchemas, container } = options
|
|
40
35
|
const matchChains = options.matchChains ?? {}
|
|
41
36
|
setMountedRouter(router)
|
|
42
|
-
const
|
|
43
|
-
let committed: readonly SlotNode[] | undefined
|
|
44
|
-
router.beforePublish((next) => parking.before(slotTree(next, matchChains, table, committed)))
|
|
37
|
+
const kept = keptMount(options)
|
|
45
38
|
|
|
46
39
|
let current: readonly SlotNode[] = []
|
|
47
40
|
let publish: ((state: RouterState) => void) | undefined
|
|
48
|
-
// biome-ignore lint/plugin/requireSafetyCommentForTypeAssertion: the generated entry passes the element the server rendered the app into
|
|
49
41
|
solidHydrate(() => {
|
|
50
42
|
const [state, setState] = createSignal(router.snapshot())
|
|
51
43
|
publish = (next) => setState(() => next)
|
|
52
44
|
const tree = createMemo(() => {
|
|
53
|
-
current =
|
|
45
|
+
current = kept.tree(state(), current)
|
|
54
46
|
return current
|
|
55
47
|
})
|
|
56
48
|
const mount: KeepAliveViewMount = {
|
|
49
|
+
...kept,
|
|
57
50
|
propsOf: (of) => routeProps(of, searchSchemas, matchChains, (read) => createMemo(read)),
|
|
58
|
-
chainOf: (of) => routes[of.routeId] ?? [],
|
|
59
|
-
entry: parking.entry,
|
|
60
|
-
page: parking.page,
|
|
61
51
|
}
|
|
62
52
|
return KeepAliveView({ tree, shown: mount.propsOf(state), mount })
|
|
63
53
|
// biome-ignore lint/plugin/requireSafetyCommentForTypeAssertion: the generated entry passes the element the server rendered the app into
|
|
64
54
|
}, container as Element)
|
|
65
55
|
// Solid has updated the document by the time a publish returns: park what it hid, restore what it
|
|
66
56
|
// showed again.
|
|
67
|
-
const after = (): void =>
|
|
68
|
-
committed = current
|
|
69
|
-
parking.after(current)
|
|
70
|
-
}
|
|
57
|
+
const after = (): void => kept.after(current)
|
|
71
58
|
after()
|
|
72
59
|
router.subscribe(() => {
|
|
73
60
|
publish?.(router.snapshot())
|
package/src/ppr.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { initialHtml } from "@nifrajs/web/internal/hole-runtime"
|
|
1
|
+
import { type HoleState, initialHtml } from "@nifrajs/web/internal/hole-runtime"
|
|
2
2
|
import { createComponent, createMemo, type JSX, untrack } from "solid-js"
|
|
3
3
|
import { Dynamic, isServer } from "solid-js/web"
|
|
4
4
|
import { Await } from "./await.ts"
|
|
@@ -15,15 +15,6 @@ export interface HoleDefinition<Data> {
|
|
|
15
15
|
readonly interactive?: boolean
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
/** The slice of a boundary state a hole reads: `ppr` marks a hole the shared shell left open, and
|
|
19
|
-
* `fill` that host's refill when the page reloads. */
|
|
20
|
-
interface HoleState {
|
|
21
|
-
readonly status: "unresolved" | "pending" | "ready" | "error"
|
|
22
|
-
readonly data?: unknown
|
|
23
|
-
readonly ppr?: true
|
|
24
|
-
readonly fill?: unknown
|
|
25
|
-
}
|
|
26
|
-
|
|
27
18
|
export interface HoleProps<Data> {
|
|
28
19
|
readonly of: HoleDefinition<Data>
|
|
29
20
|
readonly state: HoleState | undefined
|
package/src/router.ts
CHANGED
|
@@ -7,21 +7,15 @@ import type {
|
|
|
7
7
|
BlockerFunction,
|
|
8
8
|
BlockerState,
|
|
9
9
|
NavigateFunction,
|
|
10
|
-
NavigateOptions,
|
|
11
|
-
NavigateTargetInput,
|
|
12
10
|
RenderProps,
|
|
13
11
|
UIMatch,
|
|
14
12
|
} from "@nifrajs/web"
|
|
15
13
|
// `/client`, not the root - these are DOM values, and the root's graph carries the
|
|
16
14
|
// server, which Vite's dev server evaluates rather than tree-shakes.
|
|
17
|
-
import {
|
|
18
|
-
getBrowserNavigate,
|
|
19
|
-
IDLE_BLOCKER,
|
|
20
|
-
registerBlocker,
|
|
21
|
-
resolveNavigate,
|
|
22
|
-
} from "@nifrajs/web/client"
|
|
15
|
+
import { IDLE_BLOCKER, registerBlocker } from "@nifrajs/web/client"
|
|
23
16
|
// Its own subpath, so an app that never calls `useMatches` never bundles it.
|
|
24
17
|
import { chainMatches } from "@nifrajs/web/internal/matches-runtime"
|
|
18
|
+
import { navigateNow } from "@nifrajs/web/internal/navigate-runtime"
|
|
25
19
|
/**
|
|
26
20
|
* `@nifrajs/web-solid/router` - Solid routing bindings over the agnostic `@nifrajs/web` history layer:
|
|
27
21
|
* `useNavigate` (programmatic navigation), `useBlocker` (the unsaved-changes guard), and `useSearch`
|
|
@@ -114,12 +108,7 @@ export function useSearch<Schema extends StandardSchemaV1 | undefined = undefine
|
|
|
114
108
|
* Resolves the browser navigate at call time, so it works as soon as `installHistory` has run and no-ops
|
|
115
109
|
* before then / on the server. */
|
|
116
110
|
export function useNavigate(): NavigateFunction {
|
|
117
|
-
return
|
|
118
|
-
const navigate = getBrowserNavigate()
|
|
119
|
-
if (navigate === undefined) return
|
|
120
|
-
const resolved = resolveNavigate(to, options)
|
|
121
|
-
navigate(resolved.to, resolved.options)
|
|
122
|
-
}) as NavigateFunction
|
|
111
|
+
return navigateNow
|
|
123
112
|
}
|
|
124
113
|
|
|
125
114
|
/**
|