@takazudo/zudo-doc 2.2.0 → 2.2.1
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/routes/_chrome.js +4 -1
- package/package.json +1 -1
- package/routes-src/_chrome.tsx +22 -6
package/dist/routes/_chrome.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { routeCtx } from "./_context.js";
|
|
2
2
|
import { createChrome } from "../chrome/index.js";
|
|
3
|
-
|
|
3
|
+
import { DocHistory } from "../doc-history/index.js";
|
|
4
|
+
const chrome = createChrome(routeCtx, {
|
|
5
|
+
DocHistory
|
|
6
|
+
});
|
|
4
7
|
const {
|
|
5
8
|
composeMetaTitle,
|
|
6
9
|
HeadWithDefaults,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takazudo/zudo-doc",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "zudo-doc framework primitives layer that sits on top of zfb's engine — sidebar, theme, TOC, breadcrumb, layouts, head injection, View Transitions, SSR-skip wrappers (per ADR-003).",
|
|
6
6
|
"license": "MIT",
|
package/routes-src/_chrome.tsx
CHANGED
|
@@ -4,17 +4,33 @@
|
|
|
4
4
|
// The chrome wiring was PROMOTED to the public, shared
|
|
5
5
|
// `createChrome(context, hostBindings)` builder
|
|
6
6
|
// (`@takazudo/zudo-doc/chrome`, CTX #2423). This module is now just the seam
|
|
7
|
-
// that calls it ONCE with the reconstructed route context and
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
7
|
+
// that calls it ONCE with the reconstructed route context and the single
|
|
8
|
+
// DocHistory host binding needed for island registration (see below) — every
|
|
9
|
+
// OTHER host-bound slot resolves to its package-default stub, so the injected
|
|
10
|
+
// package-routes render stays byte-identical. The host (HOSTCOLLAPSE wave) will
|
|
11
|
+
// call `createChrome` directly with its full real bindings.
|
|
11
12
|
|
|
12
13
|
import { routeCtx } from "./_context.js";
|
|
13
14
|
import { createChrome } from "@takazudo/zudo-doc/chrome";
|
|
15
|
+
import { DocHistory } from "@takazudo/zudo-doc/doc-history";
|
|
16
|
+
import type { ChromeHostBindings } from "@takazudo/zudo-doc/factory-context";
|
|
14
17
|
import type { DocNavNode } from "./_docs-helpers.js";
|
|
15
18
|
|
|
16
|
-
//
|
|
17
|
-
|
|
19
|
+
// Island-scanner contract (load-bearing): the injected doc routes reach the real
|
|
20
|
+
// DocHistory client island ONLY through this static import → `createChrome`
|
|
21
|
+
// hostBindings chain (docs-slug.tsx → _chrome.tsx → DocHistory). Without it,
|
|
22
|
+
// `deriveDocHistorySlot` falls back to the no-op stub, the SSR marker
|
|
23
|
+
// `data-zfb-island-skip-ssr="DocHistory"` has no matching registry entry, and the
|
|
24
|
+
// History button never hydrates under `packageOwnedRoutes` (zudolab/zudo-doc#2480).
|
|
25
|
+
// The import MUST stay static — a dynamic/type-only import stops zfb's island
|
|
26
|
+
// scanner from walking it. SSR output is unchanged: `DocHistoryArea` gates on
|
|
27
|
+
// `settings.docHistory` and the island is skip-SSR, so binding the real component
|
|
28
|
+
// vs the stub is byte-identical. Mirrors the host's `pages/lib/_chrome.ts`.
|
|
29
|
+
// (The narrow real-island props signature isn't assignable to the structural
|
|
30
|
+
// `FactoryComponent`, so cast — same as the host.)
|
|
31
|
+
const chrome = createChrome(routeCtx, {
|
|
32
|
+
DocHistory: DocHistory as unknown as ChromeHostBindings["DocHistory"],
|
|
33
|
+
});
|
|
18
34
|
|
|
19
35
|
export const {
|
|
20
36
|
composeMetaTitle,
|