@takazudo/zudo-doc 0.2.16 → 0.2.18

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.
@@ -102,6 +102,14 @@ interface DocLayoutProps extends DocLayoutHtmlAttrs {
102
102
  * the sidebar resizer) inject into the scripts slot specifically.
103
103
  */
104
104
  bodyEndScripts?: ComponentChildren;
105
+ /**
106
+ * When `false`, the zfb SPA soft-swap router (`ClientRouter`) is not
107
+ * mounted — the page uses plain full-page navigation instead. This
108
+ * also omits the `zfb-view-transitions-enabled` /
109
+ * `zfb-preserve-html-attrs` meta tags and the route-announcer that
110
+ * `ClientRouter` emits. Defaults to `true` (router enabled).
111
+ */
112
+ enableClientRouter?: boolean;
105
113
  }
106
114
  /**
107
115
  * `id` attribute of the desktop sidebar `<aside>`. Used by consumer code
@@ -24,7 +24,8 @@ function DocLayout(props) {
24
24
  hideToc = false,
25
25
  footer,
26
26
  bodyEndComponents,
27
- bodyEndScripts
27
+ bodyEndScripts,
28
+ enableClientRouter = true
28
29
  } = props;
29
30
  const hasSidebar = sidebar !== void 0;
30
31
  const showSidebar = !hideSidebar && hasSidebar;
@@ -43,9 +44,9 @@ function DocLayout(props) {
43
44
  /* @__PURE__ */ jsx("title", { children: title }),
44
45
  description !== void 0 && /* @__PURE__ */ jsx("meta", { name: "description", content: description }),
45
46
  noindex && /* @__PURE__ */ jsx("meta", { name: "robots", content: "noindex, nofollow" }),
46
- ClientRouter({
47
+ enableClientRouter !== false ? ClientRouter({
47
48
  preserveHtmlAttrs: ["data-sidebar-hidden", "data-theme", "style"]
48
- }),
49
+ }) : null,
49
50
  head
50
51
  ] }),
51
52
  /* @__PURE__ */ jsxs("body", { class: "min-h-screen antialiased", children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takazudo/zudo-doc",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
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",
@@ -165,8 +165,8 @@
165
165
  ],
166
166
  "peerDependencies": {
167
167
  "preact": "^10.29.1",
168
- "@takazudo/zfb": "^0.1.0-next.54",
169
- "@takazudo/zfb-runtime": "^0.1.0-next.54",
168
+ "@takazudo/zfb": "^0.1.0-next.55",
169
+ "@takazudo/zfb-runtime": "^0.1.0-next.55",
170
170
  "@takazudo/zudo-doc-history-server": "^0.2.15",
171
171
  "@takazudo/zdtp": "^0.2.3",
172
172
  "shiki": "^4.0.2"
@@ -194,8 +194,8 @@
194
194
  "tsup": "^8.0.0",
195
195
  "typescript": "^5.0.0",
196
196
  "vitest": "^4.1.0",
197
- "@takazudo/zfb": "0.1.0-next.54",
198
- "@takazudo/zfb-runtime": "0.1.0-next.54"
197
+ "@takazudo/zfb": "0.1.0-next.55",
198
+ "@takazudo/zfb-runtime": "0.1.0-next.55"
199
199
  },
200
200
  "scripts": {
201
201
  "build": "cross-env NODE_OPTIONS=--max-old-space-size=4096 tsup",