create-zudo-doc 3.2.0 → 4.0.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.
Files changed (137) hide show
  1. package/README.md +3 -2
  2. package/dist/api.d.ts +2 -0
  3. package/dist/api.js +9 -1
  4. package/dist/claude-md-gen.d.ts +8 -0
  5. package/dist/claude-md-gen.js +44 -26
  6. package/dist/cli.d.ts +2 -0
  7. package/dist/cli.js +11 -1
  8. package/dist/compose.d.ts +14 -20
  9. package/dist/compose.js +15 -25
  10. package/dist/constants.d.ts +6 -0
  11. package/dist/constants.js +123 -1
  12. package/dist/features/body-foot-util.d.ts +8 -4
  13. package/dist/features/body-foot-util.js +8 -4
  14. package/dist/features/claude-resources.d.ts +9 -0
  15. package/dist/features/claude-resources.js +10 -6
  16. package/dist/features/design-token-panel.d.ts +0 -12
  17. package/dist/features/design-token-panel.js +32 -93
  18. package/dist/features/doc-history.d.ts +19 -3
  19. package/dist/features/doc-history.js +49 -60
  20. package/dist/features/doc-tags.d.ts +9 -13
  21. package/dist/features/doc-tags.js +10 -26
  22. package/dist/features/dynamic-page-transition.d.ts +19 -30
  23. package/dist/features/dynamic-page-transition.js +21 -209
  24. package/dist/features/footer-taglist.d.ts +1 -1
  25. package/dist/features/footer-taglist.js +1 -1
  26. package/dist/features/footer.d.ts +3 -2
  27. package/dist/features/footer.js +3 -2
  28. package/dist/features/i18n.d.ts +13 -8
  29. package/dist/features/i18n.js +14 -9
  30. package/dist/features/image-enlarge.d.ts +7 -26
  31. package/dist/features/image-enlarge.js +7 -26
  32. package/dist/features/index.js +2 -0
  33. package/dist/features/llms-txt.d.ts +3 -5
  34. package/dist/features/llms-txt.js +3 -5
  35. package/dist/features/search.d.ts +7 -3
  36. package/dist/features/search.js +7 -3
  37. package/dist/features/sidebar-resizer.d.ts +4 -8
  38. package/dist/features/sidebar-resizer.js +4 -8
  39. package/dist/features/sidebar-toggle.d.ts +7 -7
  40. package/dist/features/sidebar-toggle.js +7 -7
  41. package/dist/features/tag-governance.d.ts +3 -8
  42. package/dist/features/tag-governance.js +37 -9
  43. package/dist/features/tauri.d.ts +13 -10
  44. package/dist/features/tauri.js +16 -52
  45. package/dist/features/theme-pack-switcher.d.ts +11 -0
  46. package/dist/features/theme-pack-switcher.js +13 -0
  47. package/dist/features/versioning.d.ts +12 -24
  48. package/dist/features/versioning.js +13 -39
  49. package/dist/index.js +5 -3
  50. package/dist/preset.d.ts +2 -0
  51. package/dist/preset.js +12 -1
  52. package/dist/prompts.d.ts +2 -0
  53. package/dist/prompts.js +22 -1
  54. package/dist/scaffold.d.ts +13 -6
  55. package/dist/scaffold.js +97 -78
  56. package/dist/utils.d.ts +10 -0
  57. package/dist/utils.js +14 -0
  58. package/dist/zfb-config-gen.d.ts +32 -20
  59. package/dist/zfb-config-gen.js +410 -53
  60. package/package.json +2 -2
  61. package/templates/base/pages/docs/[[...slug]].tsx +64 -0
  62. package/templates/base/pages/index.tsx +6 -41
  63. package/templates/base/src/styles/global.css +15 -340
  64. package/templates/base/tsconfig.json +3 -26
  65. package/templates/features/i18n/files/pages/[locale]/docs/[[...slug]].tsx +92 -0
  66. package/dist/settings-gen.d.ts +0 -2
  67. package/dist/settings-gen.js +0 -320
  68. package/templates/base/.htmlvalidate.json +0 -5
  69. package/templates/base/.zfb/doc-history-meta.json +0 -1
  70. package/templates/base/pages/_data.ts +0 -160
  71. package/templates/base/pages/lib/_body-end-islands.tsx +0 -165
  72. package/templates/base/pages/lib/_chrome.ts +0 -167
  73. package/templates/base/pages/lib/_details.tsx +0 -29
  74. package/templates/base/pages/lib/_doc-route-entries.ts +0 -10
  75. package/templates/base/pages/lib/_extract-headings.ts +0 -37
  76. package/templates/base/pages/lib/_frontmatter-preview-data.ts +0 -27
  77. package/templates/base/pages/lib/_nav-source-cache.ts +0 -100
  78. package/templates/base/pages/lib/_nav-source-docs.ts +0 -17
  79. package/templates/base/pages/lib/_preset-generator.tsx +0 -81
  80. package/templates/base/pages/lib/_route-context.ts +0 -32
  81. package/templates/base/pages/lib/_search-widget.tsx +0 -17
  82. package/templates/base/pages/lib/doc-page-props.ts +0 -30
  83. package/templates/base/pages/lib/locale-merge.ts +0 -59
  84. package/templates/base/scripts/run-b4push.sh +0 -102
  85. package/templates/base/src/components/ai-chat-modal.tsx +0 -18
  86. package/templates/base/src/components/content/code-group.tsx +0 -3
  87. package/templates/base/src/components/content/content-admonition.tsx +0 -4
  88. package/templates/base/src/components/desktop-sidebar-toggle.tsx +0 -15
  89. package/templates/base/src/components/doc-history.tsx +0 -21
  90. package/templates/base/src/components/image-enlarge.tsx +0 -24
  91. package/templates/base/src/components/preset-generator.tsx +0 -14
  92. package/templates/base/src/components/sidebar-toggle.tsx +0 -6
  93. package/templates/base/src/components/sidebar-tree.tsx +0 -6
  94. package/templates/base/src/config/color-scheme-utils.ts +0 -69
  95. package/templates/base/src/config/color-schemes.ts +0 -165
  96. package/templates/base/src/config/docs-schema.ts +0 -95
  97. package/templates/base/src/config/frontmatter-preview-defaults.ts +0 -27
  98. package/templates/base/src/config/frontmatter-preview-renderers.tsx +0 -46
  99. package/templates/base/src/config/i18n.ts +0 -239
  100. package/templates/base/src/config/settings-types.ts +0 -45
  101. package/templates/base/src/config/sidebars.ts +0 -66
  102. package/templates/base/src/config/tag-vocabulary-types.ts +0 -4
  103. package/templates/base/src/config/tag-vocabulary.ts +0 -20
  104. package/templates/base/src/config/z-index-tokens.ts +0 -128
  105. package/templates/base/src/types/docs-entry.ts +0 -28
  106. package/templates/base/src/types/heading.ts +0 -5
  107. package/templates/base/src/types/locale.ts +0 -10
  108. package/templates/base/src/utils/base.ts +0 -164
  109. package/templates/base/src/utils/docs.ts +0 -446
  110. package/templates/base/src/utils/git-info.ts +0 -70
  111. package/templates/base/src/utils/github.ts +0 -22
  112. package/templates/base/src/utils/nav-scope.ts +0 -34
  113. package/templates/base/src/utils/sidebar.ts +0 -36
  114. package/templates/base/src/utils/slug.ts +0 -10
  115. package/templates/base/src/utils/smart-break.tsx +0 -12
  116. package/templates/base/src/utils/tags.ts +0 -83
  117. package/templates/base/zfb-shim.d.ts +0 -183
  118. package/templates/features/bodyFootUtil/files/src/utils/github.ts +0 -22
  119. package/templates/features/claudeResources/files/src/integrations/claude-resources/__tests__/escape-for-mdx.test.ts +0 -42
  120. package/templates/features/claudeResources/files/src/integrations/claude-resources/__tests__/generate.test.ts +0 -752
  121. package/templates/features/claudeResources/files/src/integrations/claude-resources/escape-for-mdx.ts +0 -97
  122. package/templates/features/claudeResources/files/src/integrations/claude-resources/generate.ts +0 -735
  123. package/templates/features/designTokenPanel/files/src/components/design-token-panel-bootstrap.tsx +0 -15
  124. package/templates/features/designTokenPanel/files/src/config/design-token-panel-config.ts +0 -435
  125. package/templates/features/designTokenPanel/files/src/config/design-tokens-manifest.ts +0 -174
  126. package/templates/features/designTokenPanel/files/src/lib/design-token-panel-bootstrap.ts +0 -30
  127. package/templates/features/docHistory/files/src/components/doc-history.tsx +0 -10
  128. package/templates/features/docHistory/files/src/types/doc-history.ts +0 -7
  129. package/templates/features/dynamicPageTransition/files/src/components/client-router-bootstrap.tsx +0 -72
  130. package/templates/features/i18n/files/pages/[locale]/index.tsx +0 -72
  131. package/templates/features/imageEnlarge/files/src/components/image-enlarge.tsx +0 -11
  132. package/templates/features/sidebarToggle/files/src/components/desktop-sidebar-toggle.tsx +0 -6
  133. package/templates/features/tagGovernance/files/scripts/tags-audit.ts +0 -131
  134. package/templates/features/tagGovernance/files/scripts/tags-suggest.ts +0 -428
  135. package/templates/features/tauri/files/src/components/find-bar.tsx +0 -122
  136. package/templates/features/tauri/files/src/components/find-in-page-init.tsx +0 -59
  137. package/templates/features/tauri/files/src/utils/find-in-page.ts +0 -175
@@ -1,100 +1,39 @@
1
- /**
2
- * Pre-hydration toggle shim for the zdtp panel (inline, minified).
3
- *
4
- * Emitted as a <script dangerouslySetInnerHTML> alongside the
5
- * DesignTokenPanelBootstrap Island so the header palette button is
6
- * responsive before the island hydrates. Records the first click as a
7
- * boolean flag and exposes window.__zdtpReadyClicks so the bootstrap
8
- * module can drain and re-dispatch once the real zdtp listener is live.
9
- * Guards against double-installation across SPA body swaps via
10
- * __zdtpToggleShimInstalled. Mirrors the host's ZDTP_TOGGLE_SHIM_SRC
11
- * constant (pages/lib/_body-end-islands.tsx, zudolab/zudo-doc#1627 Part B).
12
- */
13
- const ZDTP_TOGGLE_SHIM_SRC = `(function(){
14
- if(window.__zdtpToggleShimInstalled)return;
15
- window.__zdtpToggleShimInstalled=true;
16
- var pending=false;
17
- function shim(){pending=true;}
18
- window.addEventListener('toggle-design-token-panel',shim);
19
- window.__zdtpReadyClicks=function(){
20
- window.removeEventListener('toggle-design-token-panel',shim);
21
- delete window.__zdtpReadyClicks;
22
- if(pending){pending=false;window.dispatchEvent(new CustomEvent('toggle-design-token-panel'));}
23
- };
24
- })();`;
1
+ import fs from "fs-extra";
2
+ import path from "path";
25
3
  /**
26
4
  * Design-token-panel (zdtp) feature.
27
5
  *
28
- * Injects:
29
- * 1. The zdtp CSS @import at `@slot:global-css:feature-styles` in
30
- * `src/styles/global.css`.
31
- * 2. The DesignTokenPanelBootstrap import, displayName, and Island mount
32
- * (with pre-hydration toggle shim) into
33
- * `pages/lib/_body-end-islands.tsx` via the three @slot: anchors
34
- * (imports / display-names / extra-islands). Mirrors the tauri feature
35
- * injection shape (zudolab/zudo-doc#2162).
6
+ * Minimal-scaffold cutover (epic zudolab/zudo-doc#2651, Wave 6 #2660): the
7
+ * bootstrap island, its config builder, and the pre-hydration toggle shim
8
+ * are ALL package-owned now —
9
+ * `chrome/derive.tsx`'s `deriveBodyEndIslands` auto-defaults the real
10
+ * `DesignTokenPanelBootstrap` island for every `createChrome` consumer
11
+ * (#2658 gate-2 fix, verified against the locked-manifest self-contained
12
+ * doc stub in the target-manifest confirm fixture), and
13
+ * `doc-body-end-islands/index.tsx` carries the toggle shim inline. So this
14
+ * feature has nothing left to inject into `pages/lib/_body-end-islands.tsx`
15
+ * or `src/config/settings-types.ts` — both files are gone anyway.
16
+ *
17
+ * The ONE thing that stays generator-owned: `@takazudo/zdtp/styles.css` is
18
+ * the single conditional line in `src/styles/global.css` (documented in
19
+ * that file's header comment) — it can't ship unconditionally from
20
+ * `@takazudo/zudo-doc/theme.css` because it pulls in zdtp's own bytes.
21
+ * Inserted right after the `@layer zd-preflight, zd-flow;` line (the same
22
+ * position the locked-manifest reference shape uses).
36
23
  */
24
+ const ZDTP_IMPORT_LINE = `@import "@takazudo/zdtp/styles.css";`;
25
+ const LAYER_LINE = `@layer zd-preflight, zd-flow;`;
37
26
  export const designTokenPanelFeature = () => ({
38
27
  name: "designTokenPanel",
39
- injections: [
40
- {
41
- // Panel chrome CSS — imported here so the rules land in the main page
42
- // CSS bundle (not a deferred chunk), ensuring the panel renders
43
- // correctly on first click. Vite library mode strips the source CSS
44
- // import from the emitted JS, so this CSS-side import is the required
45
- // pull point. See @takazudo/zdtp PORTABLE-CONTRACT.md §7.
46
- file: "src/styles/global.css",
47
- anchor: "/* @slot:global-css:feature-styles */",
48
- content: `@import "@takazudo/zdtp/styles.css";`,
49
- },
50
- // 1. Import the island entry. Inserted AFTER the
51
- // `// @slot:body-end-islands:imports` anchor.
52
- {
53
- file: "pages/lib/_body-end-islands.tsx",
54
- anchor: "// @slot:body-end-islands:imports",
55
- position: "after",
56
- content: `import DesignTokenPanelBootstrap from "@/components/design-token-panel-bootstrap";`,
57
- },
58
- // 2. Stable island marker name (belt-and-braces guard matching the
59
- // sibling islands in the file). Inserted AFTER the
60
- // `// @slot:body-end-islands:display-names` anchor.
61
- {
62
- file: "pages/lib/_body-end-islands.tsx",
63
- anchor: "// @slot:body-end-islands:display-names",
64
- position: "after",
65
- content: `(DesignTokenPanelBootstrap as { displayName?: string }).displayName = "DesignTokenPanelBootstrap";`,
66
- },
67
- // 4. Extend HeaderRightTriggerName with "design-token-panel". Uses
68
- // replace-range between the :start/:end anchors in settings-types.ts
69
- // so the base template emits only "ai-chat" and this injection adds
70
- // the zdtp trigger only when the feature is on (zudolab/zudo-doc#2162).
71
- {
72
- file: "src/config/settings-types.ts",
73
- anchor: "// @slot:settings-types:trigger-names:start",
74
- position: "replace",
75
- content: `export type HeaderRightTriggerName = "design-token-panel" | "ai-chat";`,
76
- },
77
- // 3. Island mount + pre-hydration toggle shim. Inserted AFTER the
78
- // `{/* @slot:body-end-islands:extra-islands */}` anchor.
79
- // when="load" (not "idle"): the bootstrap module registers the
80
- // `toggle-design-token-panel` window listener as a side effect of
81
- // its import, so it must hydrate as early as possible (zudolab/zudo-doc#1623).
82
- // The inline <script> is the pre-hydration shim (zudolab/zudo-doc#1627 Part B).
83
- {
84
- file: "pages/lib/_body-end-islands.tsx",
85
- anchor: "{/* @slot:body-end-islands:extra-islands */}",
86
- position: "after",
87
- content: ` {/* zdtp panel bootstrap: hydrates on load so configurePanel() runs early
88
- and the toggle-design-token-panel listener is live before the user
89
- clicks the header trigger. The inline script is the pre-hydration
90
- shim that queues the first click (zudolab/zudo-doc#1627 Part B). */}
91
- <script
92
- dangerouslySetInnerHTML={{ __html: ${JSON.stringify(ZDTP_TOGGLE_SHIM_SRC)} }}
93
- />
94
- {Island({
95
- when: "load",
96
- children: <DesignTokenPanelBootstrap />,
97
- }) as unknown as VNode}`,
98
- },
99
- ],
28
+ injections: [],
29
+ postProcess: async (targetDir) => {
30
+ const cssPath = path.join(targetDir, "src/styles/global.css");
31
+ if (!(await fs.pathExists(cssPath)))
32
+ return;
33
+ let content = await fs.readFile(cssPath, "utf-8");
34
+ if (content.includes(ZDTP_IMPORT_LINE))
35
+ return; // already patched (idempotent)
36
+ content = content.replace(LAYER_LINE, `${LAYER_LINE}\n${ZDTP_IMPORT_LINE}`);
37
+ await fs.writeFile(cssPath, content);
38
+ },
100
39
  });
@@ -2,8 +2,24 @@ import type { FeatureModule } from "../compose.js";
2
2
  /**
3
3
  * Doc-history feature.
4
4
  *
5
- * W7A (#1736): post-cutover, `pages/lib/_doc-history-area.tsx` is mounted
6
- * unconditionally and self-gates on `settings.docHistory`. The plugin entry
7
- * is wired by `zfb-config-gen.ts`.
5
+ * Minimal-scaffold cutover (epic zudolab/zudo-doc#2651, Wave 6 #2660):
6
+ * `settings.docHistory` is a plain zudoDoc() field now (see zfb-config-gen.ts)
7
+ * and the diff-viewer CSS (`.diff-row`/`.diff-line-*`) ships unconditionally
8
+ * from `@takazudo/zudo-doc/features.css` (epic #2344 S4) — the old
9
+ * `@slot:global-css:feature-styles` CSS injection this module used to carry
10
+ * is DEAD (the anchor no longer exists in the ~20-line `global.css`) and has
11
+ * been removed.
12
+ *
13
+ * What's left to wire: the self-contained doc-route stub(s)
14
+ * (`pages/docs/[[...slug]].tsx`, and its i18n locale sibling when i18n is
15
+ * also selected) always thread the host's `chromeBindings`. Unlike
16
+ * `DesignTokenPanelBootstrap` (auto-defaulted at the chrome-derive seam,
17
+ * #2658 gate-2 fix), `DocHistory`'s derive-level default is a deliberate
18
+ * no-op stub (see `routes/_chrome.tsx`'s comment on why — its own island
19
+ * needs the REAL host binding to hydrate). So when docHistory is selected,
20
+ * this feature patches the stub(s) to statically import the real
21
+ * `DocHistory` component and merge it over those bindings — preserving every
22
+ * configured host slot while maintaining the same #2480 scanner-reachability
23
+ * chain `routes/_chrome.tsx` uses for the package's own routes.
8
24
  */
9
25
  export declare const docHistoryFeature: FeatureModule;
@@ -1,67 +1,56 @@
1
+ import fs from "fs-extra";
2
+ import path from "path";
1
3
  /**
2
4
  * Doc-history feature.
3
5
  *
4
- * W7A (#1736): post-cutover, `pages/lib/_doc-history-area.tsx` is mounted
5
- * unconditionally and self-gates on `settings.docHistory`. The plugin entry
6
- * is wired by `zfb-config-gen.ts`.
6
+ * Minimal-scaffold cutover (epic zudolab/zudo-doc#2651, Wave 6 #2660):
7
+ * `settings.docHistory` is a plain zudoDoc() field now (see zfb-config-gen.ts)
8
+ * and the diff-viewer CSS (`.diff-row`/`.diff-line-*`) ships unconditionally
9
+ * from `@takazudo/zudo-doc/features.css` (epic #2344 S4) — the old
10
+ * `@slot:global-css:feature-styles` CSS injection this module used to carry
11
+ * is DEAD (the anchor no longer exists in the ~20-line `global.css`) and has
12
+ * been removed.
13
+ *
14
+ * What's left to wire: the self-contained doc-route stub(s)
15
+ * (`pages/docs/[[...slug]].tsx`, and its i18n locale sibling when i18n is
16
+ * also selected) always thread the host's `chromeBindings`. Unlike
17
+ * `DesignTokenPanelBootstrap` (auto-defaulted at the chrome-derive seam,
18
+ * #2658 gate-2 fix), `DocHistory`'s derive-level default is a deliberate
19
+ * no-op stub (see `routes/_chrome.tsx`'s comment on why — its own island
20
+ * needs the REAL host binding to hydrate). So when docHistory is selected,
21
+ * this feature patches the stub(s) to statically import the real
22
+ * `DocHistory` component and merge it over those bindings — preserving every
23
+ * configured host slot while maintaining the same #2480 scanner-reachability
24
+ * chain `routes/_chrome.tsx` uses for the package's own routes.
7
25
  */
8
26
  export const docHistoryFeature = () => ({
9
27
  name: "docHistory",
10
- injections: [
11
- {
12
- // Diff-viewer CSS — the DocHistory island's side-by-side diff markup
13
- // (.diff-row / .diff-line-*) is styled only here; without this block
14
- // scaffolded projects render the diff viewer unstyled (#2081). Values
15
- // mirror the showcase src/styles/global.css (per-line separators at
16
- // the 15% muted mix, #2077).
17
- file: "src/styles/global.css",
18
- anchor: "/* @slot:global-css:feature-styles */",
19
- content: `/* ========================================
20
- * Doc History Diff Viewer (side-by-side)
21
- * ======================================== */
22
-
23
- .diff-row {
24
- border-bottom: 1px solid color-mix(in oklch, var(--color-muted) 15%, transparent);
25
- }
26
-
27
- .diff-line-num {
28
- font-family: var(--font-mono, ui-monospace, monospace);
29
- font-size: var(--text-caption);
30
- line-height: 1.5;
31
- padding: 0 var(--spacing-hsp-xs);
32
- text-align: right;
33
- color: var(--color-muted);
34
- user-select: none;
35
- vertical-align: top;
36
- border-right: 1px solid color-mix(in oklch, var(--color-muted) 15%, transparent);
37
- }
38
-
39
- .diff-line-content {
40
- font-family: var(--font-mono, ui-monospace, monospace);
41
- font-size: var(--text-caption);
42
- line-height: 1.5;
43
- padding: 0 var(--spacing-hsp-sm);
44
- white-space: pre-wrap;
45
- word-break: break-all;
46
- vertical-align: top;
47
- }
48
-
49
- /* Left column right border to separate the two sides */
50
- .diff-row td:nth-child(2) {
51
- border-right: 2px solid var(--color-muted);
52
- }
53
-
54
- .diff-line-added {
55
- background-color: color-mix(in oklch, var(--color-success) 15%, transparent);
56
- }
57
-
58
- .diff-line-removed {
59
- background-color: color-mix(in oklch, var(--color-danger) 15%, transparent);
60
- }
61
-
62
- .diff-line-empty {
63
- background-color: color-mix(in oklch, var(--color-muted) 8%, transparent);
64
- }`,
65
- },
66
- ],
28
+ injections: [],
29
+ postProcess: async (targetDir) => {
30
+ const stubPaths = [
31
+ path.join(targetDir, "pages", "docs", "[[...slug]].tsx"),
32
+ path.join(targetDir, "pages", "[locale]", "docs", "[[...slug]].tsx"),
33
+ ];
34
+ for (const stubPath of stubPaths) {
35
+ if (!(await fs.pathExists(stubPath)))
36
+ continue;
37
+ let content = await fs.readFile(stubPath, "utf-8");
38
+ // Idempotency guard: check for the actual inserted import statement,
39
+ // NOT a bare `.includes("DocHistory")` — this file's own header
40
+ // comment (explaining WHY this patch exists) mentions "DocHistory" in
41
+ // prose, which would false-positive a weaker check and skip patching
42
+ // on every run.
43
+ const importMarker = `import { DocHistory } from "@takazudo/zudo-doc/doc-history";`;
44
+ if (content.includes(importMarker))
45
+ continue; // already patched
46
+ content = content.replace(`import { createChrome } from "@takazudo/zudo-doc/chrome";`, `import { createChrome } from "@takazudo/zudo-doc/chrome";
47
+ ${importMarker}
48
+ import { defineChromeBindings } from "@takazudo/zudo-doc/chrome-bindings";`);
49
+ content = content.replace(`const { renderDocPage } = createChrome(routeCtx, chromeBindings);`, `const { renderDocPage } = createChrome(routeCtx, {
50
+ ...chromeBindings,
51
+ ...defineChromeBindings({ DocHistory }),
52
+ });`);
53
+ await fs.writeFile(stubPath, content);
54
+ }
55
+ },
67
56
  });
@@ -1,19 +1,15 @@
1
1
  import type { FeatureModule } from "../compose.js";
2
2
  /**
3
- * docTags feature (W7C — #1738).
3
+ * docTags feature.
4
4
  *
5
- * Settings gate: `settings.docTags === true`.
5
+ * Purely a `zudoDoc({ docTags: true })` field (see `zfb-config-gen.ts`)
6
+ * the `/docs/tags` + `/docs/tags/[tag]` routes are PACKAGE-INJECTED
7
+ * (`routes/docs-tags-index.tsx` / `routes/docs-tags-tag.tsx`), gated on
8
+ * `settings.docTags`. `templates/features/docTags/files/` has been empty
9
+ * since the host catch-all stubs were retired in favor of package
10
+ * injection — there is nothing left to copy or postProcess.
6
11
  *
7
- * Ships feature-conditional pages from
8
- * `templates/features/docTags/files/pages/`:
9
- *
10
- * docs/tags/[tag].tsx
11
- * docs/tags/index.tsx
12
- * [locale]/docs/tags/[tag].tsx — only when i18n ALSO selected
13
- * [locale]/docs/tags/index.tsx — only when i18n ALSO selected
14
- *
15
- * `copyFeatureFiles` (compose.ts) auto-emits every file under
16
- * `files/`; postProcess removes the `[locale]/**` subset when i18n
17
- * is NOT selected. See W2 spec-lock §Cross-feature interaction.
12
+ * Known limitation: same injected-DYNAMIC-route dev-mode gap noted on the
13
+ * versioning feature — the tag routes may 404 in `zfb dev` (build is fine).
18
14
  */
19
15
  export declare const docTagsFeature: FeatureModule;
@@ -1,33 +1,17 @@
1
- import fs from "fs-extra";
2
- import path from "path";
3
1
  /**
4
- * docTags feature (W7C — #1738).
2
+ * docTags feature.
5
3
  *
6
- * Settings gate: `settings.docTags === true`.
4
+ * Purely a `zudoDoc({ docTags: true })` field (see `zfb-config-gen.ts`)
5
+ * the `/docs/tags` + `/docs/tags/[tag]` routes are PACKAGE-INJECTED
6
+ * (`routes/docs-tags-index.tsx` / `routes/docs-tags-tag.tsx`), gated on
7
+ * `settings.docTags`. `templates/features/docTags/files/` has been empty
8
+ * since the host catch-all stubs were retired in favor of package
9
+ * injection — there is nothing left to copy or postProcess.
7
10
  *
8
- * Ships feature-conditional pages from
9
- * `templates/features/docTags/files/pages/`:
10
- *
11
- * docs/tags/[tag].tsx
12
- * docs/tags/index.tsx
13
- * [locale]/docs/tags/[tag].tsx — only when i18n ALSO selected
14
- * [locale]/docs/tags/index.tsx — only when i18n ALSO selected
15
- *
16
- * `copyFeatureFiles` (compose.ts) auto-emits every file under
17
- * `files/`; postProcess removes the `[locale]/**` subset when i18n
18
- * is NOT selected. See W2 spec-lock §Cross-feature interaction.
11
+ * Known limitation: same injected-DYNAMIC-route dev-mode gap noted on the
12
+ * versioning feature — the tag routes may 404 in `zfb dev` (build is fine).
19
13
  */
20
- export const docTagsFeature = (choices) => ({
14
+ export const docTagsFeature = () => ({
21
15
  name: "docTags",
22
16
  injections: [],
23
- postProcess: async (targetDir) => {
24
- if (!choices.features.includes("i18n")) {
25
- // i18n is OFF — strip the locale-scoped tag pages that were
26
- // copied unconditionally by copyFeatureFiles.
27
- const localeTagsDir = path.join(targetDir, "pages", "[locale]", "docs", "tags");
28
- if (await fs.pathExists(localeTagsDir)) {
29
- await fs.remove(localeTagsDir);
30
- }
31
- }
32
- },
33
17
  });
@@ -2,36 +2,25 @@ import type { FeatureModule } from "../compose.js";
2
2
  /**
3
3
  * Dynamic page transition feature.
4
4
  *
5
- * When enabled:
6
- * - Sets `enableClientRouter={settings.dynamicPageTransition}` on every
7
- * `<DocLayoutWithDefaults>` render site the SSR `<ClientRouter />` render
8
- * self-activates the SPA router on the client as a top-level module side
9
- * effect (primary activation path).
10
- * - Wires the ClientRouterBootstrap island and the PageLoadingOverlay (pure
11
- * SSR) into body-end-islands the island is now a redundant fallback;
12
- * PageLoadingOverlay provides the loading spinner UI.
13
- * - Injects `@import "@takazudo/zudo-doc/page-loading.css"` at the
14
- * `@slot:global-css:imports` anchor (top of global.css, before rule blocks).
15
- * - Injects the `--color-page-loading-overlay` token into `@theme` at the
16
- * `@slot:global-css:theme-tokens` anchor.
17
- * - Injects the View-Transitions CSS into global.css at
18
- * `@slot:global-css:feature-styles`.
5
+ * Minimal-scaffold cutover (epic zudolab/zudo-doc#2651, Wave 6 #2660):
6
+ * purely a `zudoDoc({ dynamicPageTransition: true })` field now (see
7
+ * `zfb-config-gen.ts`). The primary activation path
8
+ * `<ClientRouter enableClientRouter={settings.dynamicPageTransition} />`
9
+ * rendered by the package's own `doc-page-shell`/`doclayout` — and the
10
+ * pure-SSR `<PageLoadingOverlay/>` mount are BOTH already handled inside
11
+ * `doc-body-end-islands/index.tsx`, gated on the same flag; the View-
12
+ * Transitions CSS ships unconditionally from `@takazudo/zudo-doc/features.css`.
19
13
  *
20
- * Bug fix (#2265): the page-loading overlay CSS (.page-loading-overlay /
21
- * .page-loading-spinner / @keyframes page-loading-spin / [data-zd-nav-pending])
22
- * was never reaching scaffolded projects because it lived unconditionally in
23
- * the host global.css but had no corresponding injection for the template.
24
- * Gating this feature makes both the JS island and the CSS land together.
25
- *
26
- * The page-loading CSS now ships as a package artifact
27
- * `@takazudo/zudo-doc/page-loading.css` (Topic A, #2283) the generator
28
- * injects a gated `@import` instead of inline rule bodies. The
29
- * `--color-page-loading-overlay` token is defined inline (inside `@theme`) so
30
- * it lives alongside the other project tokens and can be overridden per-project.
31
- *
32
- * The ClientRouterBootstrap component lives in
33
- * templates/features/dynamicPageTransition/files/src/components/ and is
34
- * byte-identical to the host src/components/client-router-bootstrap.tsx.
35
- * The feature-template drift checker enforces this parity automatically.
14
+ * DROPPED: the host `ClientRouterBootstrap` island
15
+ * (`templates/features/dynamicPageTransition/files/src/components/`)
16
+ * its old host-owned mount point (`pages/lib/_body-end-islands.tsx`) no
17
+ * longer exists, and the package's own doc-body-end-islands header comment
18
+ * already calls it "a redundant fallback" once PageLoadingOverlay covers the
19
+ * loading UI. Known gap (documented, out of this generator's scope): the
20
+ * package's SSR-only `<ClientRouter/>` import may still need a "use client"
21
+ * bootstrap to guarantee the click-intercept ships to the browser bundle —
22
+ * same class of issue as tauri's find-in-page island (see tauri.ts). If a
23
+ * project needs it restored, wire a custom island through
24
+ * `settings.chromeBindingsModule`'s `BodyEndIslands` slot.
36
25
  */
37
26
  export declare const dynamicPageTransitionFeature: FeatureModule;