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.
- package/README.md +3 -2
- package/dist/api.d.ts +2 -0
- package/dist/api.js +9 -1
- package/dist/claude-md-gen.d.ts +8 -0
- package/dist/claude-md-gen.js +44 -26
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +11 -1
- package/dist/compose.d.ts +14 -20
- package/dist/compose.js +15 -25
- package/dist/constants.d.ts +6 -0
- package/dist/constants.js +123 -1
- package/dist/features/body-foot-util.d.ts +8 -4
- package/dist/features/body-foot-util.js +8 -4
- package/dist/features/claude-resources.d.ts +9 -0
- package/dist/features/claude-resources.js +10 -6
- package/dist/features/design-token-panel.d.ts +0 -12
- package/dist/features/design-token-panel.js +32 -93
- package/dist/features/doc-history.d.ts +19 -3
- package/dist/features/doc-history.js +49 -60
- package/dist/features/doc-tags.d.ts +9 -13
- package/dist/features/doc-tags.js +10 -26
- package/dist/features/dynamic-page-transition.d.ts +19 -30
- package/dist/features/dynamic-page-transition.js +21 -209
- package/dist/features/footer-taglist.d.ts +1 -1
- package/dist/features/footer-taglist.js +1 -1
- package/dist/features/footer.d.ts +3 -2
- package/dist/features/footer.js +3 -2
- package/dist/features/i18n.d.ts +13 -8
- package/dist/features/i18n.js +14 -9
- package/dist/features/image-enlarge.d.ts +7 -26
- package/dist/features/image-enlarge.js +7 -26
- package/dist/features/index.js +2 -0
- package/dist/features/llms-txt.d.ts +3 -5
- package/dist/features/llms-txt.js +3 -5
- package/dist/features/search.d.ts +7 -3
- package/dist/features/search.js +7 -3
- package/dist/features/sidebar-resizer.d.ts +4 -8
- package/dist/features/sidebar-resizer.js +4 -8
- package/dist/features/sidebar-toggle.d.ts +7 -7
- package/dist/features/sidebar-toggle.js +7 -7
- package/dist/features/tag-governance.d.ts +3 -8
- package/dist/features/tag-governance.js +37 -9
- package/dist/features/tauri.d.ts +13 -10
- package/dist/features/tauri.js +16 -52
- package/dist/features/theme-pack-switcher.d.ts +11 -0
- package/dist/features/theme-pack-switcher.js +13 -0
- package/dist/features/versioning.d.ts +12 -24
- package/dist/features/versioning.js +13 -39
- package/dist/index.js +5 -3
- package/dist/preset.d.ts +2 -0
- package/dist/preset.js +12 -1
- package/dist/prompts.d.ts +2 -0
- package/dist/prompts.js +22 -1
- package/dist/scaffold.d.ts +13 -6
- package/dist/scaffold.js +97 -78
- package/dist/utils.d.ts +10 -0
- package/dist/utils.js +14 -0
- package/dist/zfb-config-gen.d.ts +32 -20
- package/dist/zfb-config-gen.js +410 -53
- package/package.json +2 -2
- package/templates/base/pages/docs/[[...slug]].tsx +64 -0
- package/templates/base/pages/index.tsx +6 -41
- package/templates/base/src/styles/global.css +15 -340
- package/templates/base/tsconfig.json +3 -26
- package/templates/features/i18n/files/pages/[locale]/docs/[[...slug]].tsx +92 -0
- package/dist/settings-gen.d.ts +0 -2
- package/dist/settings-gen.js +0 -320
- package/templates/base/.htmlvalidate.json +0 -5
- package/templates/base/.zfb/doc-history-meta.json +0 -1
- package/templates/base/pages/_data.ts +0 -160
- package/templates/base/pages/lib/_body-end-islands.tsx +0 -165
- package/templates/base/pages/lib/_chrome.ts +0 -167
- package/templates/base/pages/lib/_details.tsx +0 -29
- package/templates/base/pages/lib/_doc-route-entries.ts +0 -10
- package/templates/base/pages/lib/_extract-headings.ts +0 -37
- package/templates/base/pages/lib/_frontmatter-preview-data.ts +0 -27
- package/templates/base/pages/lib/_nav-source-cache.ts +0 -100
- package/templates/base/pages/lib/_nav-source-docs.ts +0 -17
- package/templates/base/pages/lib/_preset-generator.tsx +0 -81
- package/templates/base/pages/lib/_route-context.ts +0 -32
- package/templates/base/pages/lib/_search-widget.tsx +0 -17
- package/templates/base/pages/lib/doc-page-props.ts +0 -30
- package/templates/base/pages/lib/locale-merge.ts +0 -59
- package/templates/base/scripts/run-b4push.sh +0 -102
- package/templates/base/src/components/ai-chat-modal.tsx +0 -18
- package/templates/base/src/components/content/code-group.tsx +0 -3
- package/templates/base/src/components/content/content-admonition.tsx +0 -4
- package/templates/base/src/components/desktop-sidebar-toggle.tsx +0 -15
- package/templates/base/src/components/doc-history.tsx +0 -21
- package/templates/base/src/components/image-enlarge.tsx +0 -24
- package/templates/base/src/components/preset-generator.tsx +0 -14
- package/templates/base/src/components/sidebar-toggle.tsx +0 -6
- package/templates/base/src/components/sidebar-tree.tsx +0 -6
- package/templates/base/src/config/color-scheme-utils.ts +0 -69
- package/templates/base/src/config/color-schemes.ts +0 -165
- package/templates/base/src/config/docs-schema.ts +0 -95
- package/templates/base/src/config/frontmatter-preview-defaults.ts +0 -27
- package/templates/base/src/config/frontmatter-preview-renderers.tsx +0 -46
- package/templates/base/src/config/i18n.ts +0 -239
- package/templates/base/src/config/settings-types.ts +0 -45
- package/templates/base/src/config/sidebars.ts +0 -66
- package/templates/base/src/config/tag-vocabulary-types.ts +0 -4
- package/templates/base/src/config/tag-vocabulary.ts +0 -20
- package/templates/base/src/config/z-index-tokens.ts +0 -128
- package/templates/base/src/types/docs-entry.ts +0 -28
- package/templates/base/src/types/heading.ts +0 -5
- package/templates/base/src/types/locale.ts +0 -10
- package/templates/base/src/utils/base.ts +0 -164
- package/templates/base/src/utils/docs.ts +0 -446
- package/templates/base/src/utils/git-info.ts +0 -70
- package/templates/base/src/utils/github.ts +0 -22
- package/templates/base/src/utils/nav-scope.ts +0 -34
- package/templates/base/src/utils/sidebar.ts +0 -36
- package/templates/base/src/utils/slug.ts +0 -10
- package/templates/base/src/utils/smart-break.tsx +0 -12
- package/templates/base/src/utils/tags.ts +0 -83
- package/templates/base/zfb-shim.d.ts +0 -183
- package/templates/features/bodyFootUtil/files/src/utils/github.ts +0 -22
- package/templates/features/claudeResources/files/src/integrations/claude-resources/__tests__/escape-for-mdx.test.ts +0 -42
- package/templates/features/claudeResources/files/src/integrations/claude-resources/__tests__/generate.test.ts +0 -752
- package/templates/features/claudeResources/files/src/integrations/claude-resources/escape-for-mdx.ts +0 -97
- package/templates/features/claudeResources/files/src/integrations/claude-resources/generate.ts +0 -735
- package/templates/features/designTokenPanel/files/src/components/design-token-panel-bootstrap.tsx +0 -15
- package/templates/features/designTokenPanel/files/src/config/design-token-panel-config.ts +0 -435
- package/templates/features/designTokenPanel/files/src/config/design-tokens-manifest.ts +0 -174
- package/templates/features/designTokenPanel/files/src/lib/design-token-panel-bootstrap.ts +0 -30
- package/templates/features/docHistory/files/src/components/doc-history.tsx +0 -10
- package/templates/features/docHistory/files/src/types/doc-history.ts +0 -7
- package/templates/features/dynamicPageTransition/files/src/components/client-router-bootstrap.tsx +0 -72
- package/templates/features/i18n/files/pages/[locale]/index.tsx +0 -72
- package/templates/features/imageEnlarge/files/src/components/image-enlarge.tsx +0 -11
- package/templates/features/sidebarToggle/files/src/components/desktop-sidebar-toggle.tsx +0 -6
- package/templates/features/tagGovernance/files/scripts/tags-audit.ts +0 -131
- package/templates/features/tagGovernance/files/scripts/tags-suggest.ts +0 -428
- package/templates/features/tauri/files/src/components/find-bar.tsx +0 -122
- package/templates/features/tauri/files/src/components/find-in-page-init.tsx +0 -59
- package/templates/features/tauri/files/src/utils/find-in-page.ts +0 -175
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ Each feature has a `--[no-]<flag>` form. Passing `--feature` enables it; `--no-f
|
|
|
72
72
|
| `--[no-]search` | Pagefind full-text search | on |
|
|
73
73
|
| `--[no-]sidebar-filter` | Real-time sidebar filter | on |
|
|
74
74
|
| `--[no-]image-enlarge` | Click-to-enlarge for oversized images | on |
|
|
75
|
-
| `--[no-]tag-governance` | Vocabulary-aware tag audit + suggest scripts |
|
|
75
|
+
| `--[no-]tag-governance` | Vocabulary-aware tag audit + suggest scripts | off |
|
|
76
76
|
| `--[no-]claude-resources` | Auto-generate Claude Code docs (`CLAUDE.md`, `llms.txt`) | off |
|
|
77
77
|
| `--[no-]claude-skills` | Ship zudo-doc Claude Code skills (design-system, translate, version-bump) | off |
|
|
78
78
|
| `--[no-]design-token-panel` | Interactive panel for tweaking spacing, font, color tokens | off |
|
|
@@ -86,7 +86,8 @@ Each feature has a `--[no-]<flag>` form. Passing `--feature` enables it; `--no-f
|
|
|
86
86
|
| `--[no-]tauri` | Tauri desktop app — Mode 1 offline reader | off |
|
|
87
87
|
| `--[no-]tauri-dev` | Tauri dev wrapper — Mode 2 configurable dev wrapper | off |
|
|
88
88
|
| `--[no-]footer-nav-group` | Navigation links in the footer | off |
|
|
89
|
-
| `--[no-]
|
|
89
|
+
| `--[no-]dynamic-page-transition` | SPA-style page transition with history handling | on |
|
|
90
|
+
| `--[no-]footer-copyright` | Copyright notice in the footer | on |
|
|
90
91
|
| `--[no-]footer-taglist` | Grouped tag index in the footer (requires tag-governance) | off |
|
|
91
92
|
| `--[no-]changelog` | Changelog page | off |
|
|
92
93
|
|
package/dist/api.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export interface CreateOptions {
|
|
|
9
9
|
darkScheme?: string;
|
|
10
10
|
respectPrefersColorScheme?: boolean;
|
|
11
11
|
defaultMode?: "light" | "dark";
|
|
12
|
+
/** Theme pack slug (ADR #2818 Decision 7), validated against THEME_PACKS. Default: "default". */
|
|
13
|
+
themePack?: string;
|
|
12
14
|
features: string[];
|
|
13
15
|
/** GitHub repository URL — drives the header GitHub link and body-foot
|
|
14
16
|
* "View source on GitHub" link. Empty = disabled. */
|
package/dist/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from "path";
|
|
2
|
-
import { SINGLE_SCHEMES } from "./constants.js";
|
|
2
|
+
import { SINGLE_SCHEMES, THEME_PACKS } from "./constants.js";
|
|
3
3
|
import { scaffold } from "./scaffold.js";
|
|
4
4
|
import { initGitRepo, installDependencies, validateProjectName } from "./utils.js";
|
|
5
5
|
export async function createZudoDoc(options) {
|
|
@@ -22,6 +22,14 @@ export async function createZudoDoc(options) {
|
|
|
22
22
|
throw new Error(`Unknown ${label} "${value}"`);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
// Validate the theme pack slug like the CLI (cli.ts) and preset (preset.ts)
|
|
26
|
+
// paths do (ADR #2818 Decision 7 / #2823 codex-review follow-up) — an
|
|
27
|
+
// unvalidated slug here would be written verbatim into zfb.config.ts and
|
|
28
|
+
// only fail when the generated site's build reaches plugin setup.
|
|
29
|
+
if (rest.themePack && !THEME_PACKS.some((t) => t.slug === rest.themePack)) {
|
|
30
|
+
const catalog = THEME_PACKS.map((t) => t.slug).join(", ");
|
|
31
|
+
throw new Error(`Unknown theme pack "${rest.themePack}". Available: ${catalog}`);
|
|
32
|
+
}
|
|
25
33
|
const choices = { ...rest, defaultLang: rest.defaultLang ?? "en" };
|
|
26
34
|
await scaffold(choices);
|
|
27
35
|
const targetDir = path.resolve(process.cwd(), choices.projectName);
|
package/dist/claude-md-gen.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
import type { UserChoices } from "./prompts.js";
|
|
2
|
+
/**
|
|
3
|
+
* Generate the per-project `CLAUDE.md` (minimal-scaffold shape, epic
|
|
4
|
+
* zudolab/zudo-doc#2651, Wave 6 #2660). Rewritten from scratch — the old
|
|
5
|
+
* generator described a 64-file project (`src/components/admonitions/`,
|
|
6
|
+
* `src/layouts/`, `src/utils/`, per-page `pages/lib/*` wiring) that no
|
|
7
|
+
* longer exists. The scaffolded project is now ~12 files; almost
|
|
8
|
+
* everything referenced here lives in `node_modules/@takazudo/zudo-doc`.
|
|
9
|
+
*/
|
|
2
10
|
export declare function generateCLAUDEFile(choices: UserChoices): string;
|
package/dist/claude-md-gen.js
CHANGED
|
@@ -1,53 +1,63 @@
|
|
|
1
|
-
import { capitalize } from "./utils.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { capitalize, pmRunCommand } from "./utils.js";
|
|
2
|
+
/**
|
|
3
|
+
* Generate the per-project `CLAUDE.md` (minimal-scaffold shape, epic
|
|
4
|
+
* zudolab/zudo-doc#2651, Wave 6 #2660). Rewritten from scratch — the old
|
|
5
|
+
* generator described a 64-file project (`src/components/admonitions/`,
|
|
6
|
+
* `src/layouts/`, `src/utils/`, per-page `pages/lib/*` wiring) that no
|
|
7
|
+
* longer exists. The scaffolded project is now ~12 files; almost
|
|
8
|
+
* everything referenced here lives in `node_modules/@takazudo/zudo-doc`.
|
|
9
|
+
*/
|
|
7
10
|
export function generateCLAUDEFile(choices) {
|
|
8
11
|
const siteName = capitalize(choices.projectName.replace(/-/g, " "));
|
|
9
12
|
const lines = [];
|
|
10
13
|
lines.push(`# ${siteName}`);
|
|
11
14
|
lines.push(``);
|
|
12
|
-
lines.push(`Documentation site built with [zudo-doc](https://github.com/zudolab/zudo-doc) — a zfb-based documentation framework with MDX, Tailwind CSS v4, and Preact islands
|
|
15
|
+
lines.push(`Documentation site built with [zudo-doc](https://github.com/zudolab/zudo-doc) — a zfb-based documentation framework with MDX, Tailwind CSS v4, and Preact islands. This project is intentionally minimal: one config file (\`zfb.config.ts\`) plus markdown content — layout, chrome, and islands all ship from \`@takazudo/zudo-doc\` in \`node_modules\`.`);
|
|
13
16
|
lines.push(``);
|
|
14
17
|
// Tech stack
|
|
15
18
|
lines.push(`## Tech Stack`);
|
|
16
19
|
lines.push(``);
|
|
17
20
|
lines.push(`- **zfb** — documentation build framework`);
|
|
18
|
-
lines.push(`- **MDX** — content format
|
|
21
|
+
lines.push(`- **MDX** — content format, authored under \`src/content/\``);
|
|
19
22
|
lines.push(`- **Tailwind CSS v4** — via \`@tailwindcss/vite\``);
|
|
20
23
|
lines.push(`- **Preact** — for interactive islands only (with compat mode for React API)`);
|
|
21
|
-
lines.push(`- **
|
|
24
|
+
lines.push(`- **Shiki** — package-owned code highlighting with the configured light/dark theme pair`);
|
|
25
|
+
lines.push(`- **@takazudo/zudo-doc** — the package that owns everything: layout, chrome, islands, default \`@theme\` design tokens, and (via \`packageOwnedRoutes\`, on by default) the doc routes themselves`);
|
|
22
26
|
lines.push(``);
|
|
23
27
|
// Commands
|
|
24
28
|
lines.push(`## Commands`);
|
|
25
29
|
lines.push(``);
|
|
26
30
|
const pm = choices.packageManager;
|
|
27
|
-
lines.push(`- \`${
|
|
28
|
-
lines.push(`- \`${
|
|
29
|
-
lines.push(`- \`${
|
|
31
|
+
lines.push(`- \`${pmRunCommand(pm, "dev")}\` — zfb dev server (port 4321)`);
|
|
32
|
+
lines.push(`- \`${pmRunCommand(pm, "build")}\` — static HTML export to \`dist/\``);
|
|
33
|
+
lines.push(`- \`${pmRunCommand(pm, "check")}\` — TypeScript type checking`);
|
|
34
|
+
lines.push(`- \`${pmRunCommand(pm, "preview")}\` — serve the built \`dist/\``);
|
|
30
35
|
lines.push(``);
|
|
31
36
|
// Key directories
|
|
32
37
|
lines.push(`## Key Directories`);
|
|
33
38
|
lines.push(``);
|
|
34
39
|
lines.push("```");
|
|
40
|
+
lines.push(`zfb.config.ts # THE one config file — zudoDoc({ ...only fields you chose })`);
|
|
41
|
+
lines.push(`pages/`);
|
|
42
|
+
lines.push(`├── index.tsx # 1-line re-export of the package home route`);
|
|
43
|
+
lines.push(`└── docs/[[...slug]].tsx # self-contained doc-route stub (required for \`${pm} dev\`)`);
|
|
44
|
+
if (choices.features.includes("i18n")) {
|
|
45
|
+
lines.push(` [locale]/docs/[[...slug]].tsx # same, for non-default locales`);
|
|
46
|
+
}
|
|
35
47
|
lines.push(`src/`);
|
|
36
|
-
lines.push(`├──
|
|
37
|
-
lines.push(`│ └── admonitions/ # Note, Tip, Info, Warning, Danger`);
|
|
38
|
-
lines.push(`├── config/ # Settings, color schemes`);
|
|
48
|
+
lines.push(`├── chrome-bindings.tsx # optional typed primary chrome / named header / MDX bindings`);
|
|
39
49
|
lines.push(`├── content/`);
|
|
40
|
-
lines.push(`│ └── docs/
|
|
50
|
+
lines.push(`│ └── docs/ # MDX content (this project's showcase docs)`);
|
|
41
51
|
if (choices.features.includes("i18n")) {
|
|
42
52
|
const secondaryLang = choices.defaultLang === "ja" ? "en" : "ja";
|
|
43
53
|
lines.push(`│ └── docs-${secondaryLang}/ # ${secondaryLang === "ja" ? "Japanese" : "English"} MDX content (mirrors docs/)`);
|
|
44
54
|
}
|
|
45
|
-
lines.push(`├── layouts/ # JSX layouts`);
|
|
46
|
-
lines.push(`├── pages/ # File-based routing`);
|
|
47
55
|
lines.push(`└── styles/`);
|
|
48
|
-
lines.push(` └── global.css
|
|
56
|
+
lines.push(` └── global.css # @import chain + a token-override slot — that's it`);
|
|
49
57
|
lines.push("```");
|
|
50
58
|
lines.push(``);
|
|
59
|
+
lines.push(`Everything else — layout, header, sidebar, footer, doc chrome, islands, and the default design tokens — lives in \`node_modules/@takazudo/zudo-doc\`. For supported markup replacement, create \`src/chrome-bindings.tsx\` with \`defineChromeBindings\`, set \`chromeBindingsModule\`, and use the primary \`Header\` / \`Footer\` / \`Sidebar\` / \`Toc\` / \`Breadcrumb\` / \`DocPager\` slots or the named \`headerRightComponents\` registry. The generated default, locale, and doc-history route shapes already consume the same binding object; do not fork a route stub for presentational customization. \`npx zudo-doc eject <component>\` only copies source: heed its primary, nested-chrome, or content-layer remediation before expecting the copy to render. Settings you didn't set explicitly in \`zfb.config.ts\` use the package's documented defaults — hover \`zudoDoc\`'s \`ZudoDocConfig\` argument in your editor to see every field and its \`@default\`.`);
|
|
60
|
+
lines.push(``);
|
|
51
61
|
// Content conventions
|
|
52
62
|
lines.push(`## Content Conventions`);
|
|
53
63
|
lines.push(``);
|
|
@@ -59,18 +69,24 @@ export function generateCLAUDEFile(choices) {
|
|
|
59
69
|
lines.push(``);
|
|
60
70
|
lines.push(`### Admonitions`);
|
|
61
71
|
lines.push(``);
|
|
62
|
-
lines.push(`Available in all MDX files without imports:
|
|
63
|
-
lines.push(`Each accepts an optional \`title\` prop.`);
|
|
72
|
+
lines.push(`Available in all MDX files without imports, via directive syntax: \`:::note\`, \`:::tip\`, \`:::info\`, \`:::warning\`, \`:::danger\`, \`:::caution\`, \`:::details\`. Each accepts an optional \`{title="..."}\` attribute.`);
|
|
64
73
|
lines.push(``);
|
|
65
74
|
lines.push(`### Headings`);
|
|
66
75
|
lines.push(``);
|
|
67
76
|
lines.push(`Do NOT use h1 (\`#\`) in doc content — the page title from frontmatter is rendered as h1. Start content headings from h2 (\`##\`).`);
|
|
68
77
|
lines.push(``);
|
|
69
|
-
//
|
|
70
|
-
|
|
78
|
+
// Built-in MDX components. The seeded getting-started/index.mdx uses
|
|
79
|
+
// <CategoryNav>, a package-provided global — without this section a new user
|
|
80
|
+
// has no in-project pointer to what it is or which siblings exist (#2703).
|
|
81
|
+
lines.push(`### Built-in MDX components`);
|
|
82
|
+
lines.push(``);
|
|
83
|
+
lines.push(`\`@takazudo/zudo-doc\` ships a few **globally-available MDX components** — usable in any \`.mdx\` file with **no import**. The seeded \`getting-started/index.mdx\` already uses one:`);
|
|
84
|
+
lines.push(``);
|
|
85
|
+
lines.push(`- \`<CategoryNav category="..." />\` — a card-grid list of the pages in a docs category (this is the one seeded into \`getting-started/index.mdx\`).`);
|
|
86
|
+
lines.push(`- \`<CategoryTreeNav category="..." />\` — the same listing as a compact nested tree, better for deeper hierarchies.`);
|
|
87
|
+
lines.push(`- \`<SiteTreeNavDemo />\` — a full-site documentation tree (the MDX-available wrapper of the \`SiteTreeNav\` island).`);
|
|
71
88
|
lines.push(``);
|
|
72
|
-
lines.push(
|
|
73
|
-
lines.push(`- Use **Preact islands** (\`client:load\`) only when client-side interactivity is needed`);
|
|
89
|
+
lines.push(`Admonitions (above), tabbed content (\`<Tabs>\` / \`<TabItem>\`, \`<CodeGroup>\`), and block math (\`<MathBlock>\`) work the same way — no import. Full reference: https://zudo-doc.takazudomodular.com/docs/components/`);
|
|
74
90
|
lines.push(``);
|
|
75
91
|
// i18n section
|
|
76
92
|
if (choices.features.includes("i18n")) {
|
|
@@ -82,12 +98,12 @@ export function generateCLAUDEFile(choices) {
|
|
|
82
98
|
lines.push(`- ${defaultLabel} (default): \`/docs/...\` — content in \`src/content/docs/\``);
|
|
83
99
|
lines.push(`- ${secondaryLabel}: \`/${secondaryLang}/docs/...\` — content in \`src/content/docs-${secondaryLang}/\``);
|
|
84
100
|
lines.push(`- ${secondaryLabel} docs should mirror the ${defaultLabel} directory structure`);
|
|
101
|
+
lines.push(`- Both \`pages/docs/[[...slug]].tsx\` and \`pages/[locale]/docs/[[...slug]].tsx\` are self-contained doc-route stubs shipped by the generator — required so \`${pm} dev\` doesn't 404 on doc pages (a zfb dev-mode limitation on package-injected dynamic routes). Don't delete them.`);
|
|
85
102
|
lines.push(``);
|
|
86
103
|
}
|
|
87
104
|
// Enabled features
|
|
88
105
|
const featureDescriptions = {
|
|
89
106
|
search: "Full-text search via Pagefind",
|
|
90
|
-
sidebarFilter: "Real-time sidebar filtering",
|
|
91
107
|
designTokenPanel: "Interactive tabbed panel for tweaking spacing, font, size, and color tokens",
|
|
92
108
|
sidebarResizer: "Draggable sidebar width",
|
|
93
109
|
sidebarToggle: "Show/hide desktop sidebar",
|
|
@@ -96,6 +112,8 @@ export function generateCLAUDEFile(choices) {
|
|
|
96
112
|
llmsTxt: "Generates llms.txt for LLM consumption",
|
|
97
113
|
claudeResources: "Auto-generated docs for Claude Code resources",
|
|
98
114
|
changelog: "Changelog page at `/docs/changelog`",
|
|
115
|
+
tauri: "Desktop app wrapper (`cargo tauri dev` / `cargo tauri build`) — Cmd/Ctrl+F find bar via the package-owned `FindInPageInit` island (`findInPage: true` in `zfb.config.ts`)",
|
|
116
|
+
tagGovernance: "Vocabulary-aware tag audit (`tags:audit`) / suggest (`tags:suggest`) scripts",
|
|
99
117
|
};
|
|
100
118
|
const enabledFeatures = choices.features.filter((f) => featureDescriptions[f] !== undefined &&
|
|
101
119
|
f !== "footerNavGroup" &&
|
package/dist/cli.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface CliArgs {
|
|
|
7
7
|
darkScheme?: string;
|
|
8
8
|
defaultMode?: "light" | "dark";
|
|
9
9
|
respectSystemPreference?: boolean;
|
|
10
|
+
/** Theme pack slug (ADR #2818 Decision 7). Validated against THEME_PACKS. */
|
|
11
|
+
themePack?: string;
|
|
10
12
|
i18n?: boolean;
|
|
11
13
|
search?: boolean;
|
|
12
14
|
sidebarFilter?: boolean;
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import minimist from "minimist";
|
|
2
2
|
import pc from "picocolors";
|
|
3
|
-
import { FEATURES, SINGLE_SCHEMES, SUPPORTED_LANGS } from "./constants.js";
|
|
3
|
+
import { FEATURES, SINGLE_SCHEMES, SUPPORTED_LANGS, THEME_PACKS } from "./constants.js";
|
|
4
4
|
import { validateProjectName } from "./utils.js";
|
|
5
5
|
export function parseArgs(argv = process.argv.slice(2)) {
|
|
6
6
|
const raw = minimist(argv, {
|
|
@@ -12,6 +12,7 @@ export function parseArgs(argv = process.argv.slice(2)) {
|
|
|
12
12
|
"light-scheme",
|
|
13
13
|
"dark-scheme",
|
|
14
14
|
"default-mode",
|
|
15
|
+
"theme-pack",
|
|
15
16
|
"github-url",
|
|
16
17
|
"preset",
|
|
17
18
|
"pm",
|
|
@@ -49,6 +50,8 @@ export function parseArgs(argv = process.argv.slice(2)) {
|
|
|
49
50
|
args.darkScheme = raw["dark-scheme"];
|
|
50
51
|
if (raw["default-mode"])
|
|
51
52
|
args.defaultMode = raw["default-mode"];
|
|
53
|
+
if (raw["theme-pack"])
|
|
54
|
+
args.themePack = raw["theme-pack"];
|
|
52
55
|
if (raw.preset)
|
|
53
56
|
args.preset = raw.preset;
|
|
54
57
|
if (raw.pm)
|
|
@@ -77,6 +80,7 @@ export function parseArgs(argv = process.argv.slice(2)) {
|
|
|
77
80
|
}
|
|
78
81
|
export function printHelp() {
|
|
79
82
|
const langList = SUPPORTED_LANGS.map((l) => l.value).join(", ");
|
|
83
|
+
const themePackList = THEME_PACKS.map((t) => t.slug).join(", ");
|
|
80
84
|
const featureHelp = FEATURES.map((f) => ` --[no-]${f.cliFlag.padEnd(22)} ${f.hint}`).join("\n");
|
|
81
85
|
console.log(`
|
|
82
86
|
${pc.bold("Usage:")} create-zudo-doc [project-name] [options]
|
|
@@ -92,6 +96,8 @@ ${pc.bold("Options:")}
|
|
|
92
96
|
--default-mode <mode> light | dark (light-dark mode)
|
|
93
97
|
--[no-]respect-system-preference
|
|
94
98
|
Respect OS color scheme preference
|
|
99
|
+
--theme-pack <slug> Theme pack (${themePackList})
|
|
100
|
+
Default: default
|
|
95
101
|
${featureHelp}
|
|
96
102
|
--github-url <url> GitHub repository URL (drives header link + source link)
|
|
97
103
|
--preset <path> Load settings from a JSON preset file (use "-" for stdin)
|
|
@@ -135,6 +141,10 @@ export function validateArgs(args) {
|
|
|
135
141
|
if (args.defaultMode && !["light", "dark"].includes(args.defaultMode)) {
|
|
136
142
|
return `Invalid default-mode "${args.defaultMode}". Must be "light" or "dark"`;
|
|
137
143
|
}
|
|
144
|
+
if (args.themePack && !THEME_PACKS.some((t) => t.slug === args.themePack)) {
|
|
145
|
+
const catalog = THEME_PACKS.map((t) => t.slug).join(", ");
|
|
146
|
+
return `Unknown theme pack "${args.themePack}". Available: ${catalog}`;
|
|
147
|
+
}
|
|
138
148
|
if (args.pm && !["pnpm", "npm", "yarn", "bun"].includes(args.pm)) {
|
|
139
149
|
return `Invalid package manager "${args.pm}". Must be pnpm, npm, yarn, or bun`;
|
|
140
150
|
}
|
package/dist/compose.d.ts
CHANGED
|
@@ -68,27 +68,21 @@ export declare function resolveSelectedFeatures(choices: UserChoices, featureMod
|
|
|
68
68
|
* Throws if a selected feature depends on one that isn't selected.
|
|
69
69
|
*/
|
|
70
70
|
export declare function validateDependencies(features: FeatureDefinition[], allSelectedNames: Set<string>): void;
|
|
71
|
-
/**
|
|
72
|
-
*
|
|
73
|
-
* The anchor targets today are:
|
|
74
|
-
* - `global.css` — design-token-panel.ts injects
|
|
75
|
-
* `@import "@takazudo/zdtp/styles.css";` at `@slot:global-css:feature-styles`.
|
|
76
|
-
* The sibling `@slot:global-css:theme-tokens` anchor is consumed by the
|
|
77
|
-
* color-scheme palette generator and must remain.
|
|
78
|
-
* - `pages/lib/_body-end-islands.tsx` — tauri.ts injects the FindInPageInit
|
|
79
|
-
* island (import, displayName, Island mount) when tauri is enabled.
|
|
80
|
-
* design-token-panel.ts injects the DesignTokenPanelBootstrap island
|
|
81
|
-
* (import, displayName, Island mount + toggle shim) when designTokenPanel
|
|
82
|
-
* is enabled.
|
|
83
|
-
* - `src/config/settings-types.ts` — design-token-panel.ts injects the
|
|
84
|
-
* `"design-token-panel"` member into `HeaderRightTriggerName` when the
|
|
85
|
-
* feature is enabled (replace-range between the :start/:end anchors).
|
|
71
|
+
/**
|
|
72
|
+
* Files that may contain injection anchors and need cleaning.
|
|
86
73
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
74
|
+
* EMPTY as of the minimal-scaffold cutover (epic zudolab/zudo-doc#2651,
|
|
75
|
+
* Wave 6 #2660). Every anchor target this list used to name —
|
|
76
|
+
* `src/styles/global.css`'s `@slot:global-css:*` comments,
|
|
77
|
+
* `pages/lib/_body-end-islands.tsx`, `src/config/settings-types.ts` — is
|
|
78
|
+
* GONE from `templates/base/` (the package now owns chrome/islands/settings
|
|
79
|
+
* types entirely; see `templates/base/src/styles/global.css`'s fixed
|
|
80
|
+
* ~20-line `@import` chain). Feature modules are pure settings-field
|
|
81
|
+
* emission + genuine file copies now (see `src/features/*.ts`) — none of
|
|
82
|
+
* them call `applyInjections` with a real anchor anymore. The
|
|
83
|
+
* `Injection`/`applyInjections`/`cleanAnchors` machinery below is kept as
|
|
84
|
+
* infrastructure for a future feature that genuinely needs it (e.g. an
|
|
85
|
+
* eventual host-side extension point), not because anything uses it today.
|
|
92
86
|
*/
|
|
93
87
|
export declare const ANCHOR_FILES: string[];
|
|
94
88
|
/**
|
package/dist/compose.js
CHANGED
|
@@ -154,33 +154,23 @@ export function validateDependencies(features, allSelectedNames) {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
/**
|
|
158
|
-
*
|
|
159
|
-
* The anchor targets today are:
|
|
160
|
-
* - `global.css` — design-token-panel.ts injects
|
|
161
|
-
* `@import "@takazudo/zdtp/styles.css";` at `@slot:global-css:feature-styles`.
|
|
162
|
-
* The sibling `@slot:global-css:theme-tokens` anchor is consumed by the
|
|
163
|
-
* color-scheme palette generator and must remain.
|
|
164
|
-
* - `pages/lib/_body-end-islands.tsx` — tauri.ts injects the FindInPageInit
|
|
165
|
-
* island (import, displayName, Island mount) when tauri is enabled.
|
|
166
|
-
* design-token-panel.ts injects the DesignTokenPanelBootstrap island
|
|
167
|
-
* (import, displayName, Island mount + toggle shim) when designTokenPanel
|
|
168
|
-
* is enabled.
|
|
169
|
-
* - `src/config/settings-types.ts` — design-token-panel.ts injects the
|
|
170
|
-
* `"design-token-panel"` member into `HeaderRightTriggerName` when the
|
|
171
|
-
* feature is enabled (replace-range between the :start/:end anchors).
|
|
157
|
+
/**
|
|
158
|
+
* Files that may contain injection anchors and need cleaning.
|
|
172
159
|
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
160
|
+
* EMPTY as of the minimal-scaffold cutover (epic zudolab/zudo-doc#2651,
|
|
161
|
+
* Wave 6 #2660). Every anchor target this list used to name —
|
|
162
|
+
* `src/styles/global.css`'s `@slot:global-css:*` comments,
|
|
163
|
+
* `pages/lib/_body-end-islands.tsx`, `src/config/settings-types.ts` — is
|
|
164
|
+
* GONE from `templates/base/` (the package now owns chrome/islands/settings
|
|
165
|
+
* types entirely; see `templates/base/src/styles/global.css`'s fixed
|
|
166
|
+
* ~20-line `@import` chain). Feature modules are pure settings-field
|
|
167
|
+
* emission + genuine file copies now (see `src/features/*.ts`) — none of
|
|
168
|
+
* them call `applyInjections` with a real anchor anymore. The
|
|
169
|
+
* `Injection`/`applyInjections`/`cleanAnchors` machinery below is kept as
|
|
170
|
+
* infrastructure for a future feature that genuinely needs it (e.g. an
|
|
171
|
+
* eventual host-side extension point), not because anything uses it today.
|
|
178
172
|
*/
|
|
179
|
-
export const ANCHOR_FILES = [
|
|
180
|
-
"src/styles/global.css",
|
|
181
|
-
"pages/lib/_body-end-islands.tsx",
|
|
182
|
-
"src/config/settings-types.ts",
|
|
183
|
-
];
|
|
173
|
+
export const ANCHOR_FILES = [];
|
|
184
174
|
/**
|
|
185
175
|
* Main composition entry point. Orchestrates the full feature composition
|
|
186
176
|
* pipeline for a generated project.
|
package/dist/constants.d.ts
CHANGED
|
@@ -11,6 +11,12 @@ export interface SupportedLang {
|
|
|
11
11
|
label: string;
|
|
12
12
|
}
|
|
13
13
|
export declare const SUPPORTED_LANGS: SupportedLang[];
|
|
14
|
+
export interface ThemePackOption {
|
|
15
|
+
slug: string;
|
|
16
|
+
label: string;
|
|
17
|
+
hint: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const THEME_PACKS: ThemePackOption[];
|
|
14
20
|
export interface Feature {
|
|
15
21
|
value: string;
|
|
16
22
|
label: string;
|
package/dist/constants.js
CHANGED
|
@@ -18,6 +18,121 @@ export const SUPPORTED_LANGS = [
|
|
|
18
18
|
{ value: "de", label: "German" },
|
|
19
19
|
{ value: "pt", label: "Portuguese" },
|
|
20
20
|
];
|
|
21
|
+
// Hand-kept mirror of the bundled theme-pack registry
|
|
22
|
+
// (packages/zudo-doc/src/theme-packs/<slug>/meta.json — theme pack ADR
|
|
23
|
+
// #2818, census landed by #2819, full catalog synced by the Finalize epic's
|
|
24
|
+
// catalog-sync sub-issue #2855). Same convention as DEFAULT_MIRROR in
|
|
25
|
+
// zfb-config-gen.ts: create-zudo-doc cannot import @takazudo/zudo-doc at
|
|
26
|
+
// generator-build time, so the CLI/prompt catalog is a local copy. Order
|
|
27
|
+
// mirrors the package's own default enablement order (resolveEnabledPacks):
|
|
28
|
+
// "default" first, then the rest alphabetically by slug.
|
|
29
|
+
export const THEME_PACKS = [
|
|
30
|
+
{
|
|
31
|
+
slug: "default",
|
|
32
|
+
label: "Default",
|
|
33
|
+
hint: "Stock zudo-doc look — no extra stylesheet loaded",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
slug: "beacon",
|
|
37
|
+
label: "Beacon",
|
|
38
|
+
hint: "WCAG-AAA high contrast — 7:1+ ink, 3px focus rings, always-underlined links",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
slug: "broadsheet",
|
|
42
|
+
label: "Broadsheet",
|
|
43
|
+
hint: "Newspaper editorial — Playfair masthead, Oxford ink rules, a red drop cap",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
slug: "brutalist",
|
|
47
|
+
label: "Brutalist",
|
|
48
|
+
hint: "Raw concrete web — stark black on white, 4px slab borders, hazard-orange tape",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
slug: "drift",
|
|
52
|
+
label: "Drift",
|
|
53
|
+
hint: "Floaty slate-blue comfort dark for long reading, relaxed Plex type",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
slug: "fjord",
|
|
57
|
+
label: "Fjord",
|
|
58
|
+
hint: "Polar-night blue under a faint aurora — frost-cyan accents, icy borders",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
slug: "foundry",
|
|
62
|
+
label: "Foundry",
|
|
63
|
+
hint: "GitHub-neutral baseline — white paper, Primer-blue accents",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
slug: "futura-editorial",
|
|
67
|
+
label: "Futura Editorial",
|
|
68
|
+
hint: "Geometric Futura headings over Noto Sans body, one restrained red accent",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
slug: "hearth",
|
|
72
|
+
label: "Hearth",
|
|
73
|
+
hint: "Warm cream & brick-red fireside docs — Fraunces headings, ember-glow dark mode",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
slug: "hollow",
|
|
77
|
+
label: "Hollow",
|
|
78
|
+
hint: "Dark violet space — neon pink headings, violet links, a quiet starfield",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
slug: "ledger",
|
|
82
|
+
label: "Ledger",
|
|
83
|
+
hint: "Cream academic serif in the Tufte tradition — warm paper, oxblood links",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
slug: "manuscript",
|
|
87
|
+
label: "Manuscript",
|
|
88
|
+
hint: "A quiet Garamond book page — warm paper, soft ink, sepia rubrication",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
slug: "matcha",
|
|
92
|
+
label: "Matcha",
|
|
93
|
+
hint: "Green tea ceremony — deep matcha on warm cream, mincho headings, zen whitespace",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
slug: "nocturne",
|
|
97
|
+
label: "Nocturne",
|
|
98
|
+
hint: "Purple midnight — velvet aubergine depths, lavender links, muted gold hairlines",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
slug: "observatory",
|
|
102
|
+
label: "Observatory",
|
|
103
|
+
hint: "Night-sky atlas — star-field depth, nebula violet and comet gold over navy",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
slug: "onyx",
|
|
107
|
+
label: "Onyx",
|
|
108
|
+
hint: "Luxury noir — jet black, champagne serif headings, a single gold hairline accent",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
slug: "phosphor",
|
|
112
|
+
label: "Phosphor",
|
|
113
|
+
hint: "Green CRT terminal — phosphor glow, scanlines, inverse-video nav",
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
slug: "solar",
|
|
117
|
+
label: "Solar",
|
|
118
|
+
hint: "Solarized precision — low-eyestrain paper tones, blue/cyan/orange accents",
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
slug: "sumi",
|
|
122
|
+
label: "Sumi",
|
|
123
|
+
hint: "Sumi-e ink on washi — bold mincho brush headings, one vermillion hanko seal accent",
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
slug: "swissgrid",
|
|
127
|
+
label: "Swissgrid",
|
|
128
|
+
hint: "International Typographic Style — grid discipline, one hot Swiss-red accent",
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
slug: "washi",
|
|
132
|
+
label: "Washi",
|
|
133
|
+
hint: "Warm washi paper, sumi ink, and ai-iro indigo seals for calm documentation",
|
|
134
|
+
},
|
|
135
|
+
];
|
|
21
136
|
export const FEATURES = [
|
|
22
137
|
{
|
|
23
138
|
value: "i18n",
|
|
@@ -61,6 +176,13 @@ export const FEATURES = [
|
|
|
61
176
|
default: false,
|
|
62
177
|
cliFlag: "design-token-panel",
|
|
63
178
|
},
|
|
179
|
+
{
|
|
180
|
+
value: "themePackSwitcher",
|
|
181
|
+
label: "Theme pack switcher",
|
|
182
|
+
hint: "Bottom-right flyout to switch between installed theme packs",
|
|
183
|
+
default: false,
|
|
184
|
+
cliFlag: "theme-pack-switcher",
|
|
185
|
+
},
|
|
64
186
|
{
|
|
65
187
|
value: "sidebarResizer",
|
|
66
188
|
label: "Sidebar resizer",
|
|
@@ -149,7 +271,7 @@ export const FEATURES = [
|
|
|
149
271
|
value: "footerCopyright",
|
|
150
272
|
label: "Footer copyright",
|
|
151
273
|
hint: "Copyright notice in the footer",
|
|
152
|
-
default:
|
|
274
|
+
default: true,
|
|
153
275
|
cliFlag: "footer-copyright",
|
|
154
276
|
},
|
|
155
277
|
{
|
|
@@ -2,9 +2,13 @@ import type { FeatureModule } from "../compose.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* body-foot-util feature.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* `
|
|
7
|
-
*
|
|
8
|
-
* `settings.bodyFootUtilArea
|
|
5
|
+
* Purely a `zudoDoc({ bodyFootUtilArea: {...} })` field (see
|
|
6
|
+
* `zfb-config-gen.ts`) — `BodyFootUtilArea` is fully package-owned
|
|
7
|
+
* (`@takazudo/zudo-doc/body-foot-util`, wired through `doc-page-shell`) and
|
|
8
|
+
* runtime-gates on `settings.bodyFootUtilArea`. The old host thin-stub
|
|
9
|
+
* (`src/utils/github.ts`, which depended on the now-deleted
|
|
10
|
+
* `@/config/settings`) is gone too — the package component reads
|
|
11
|
+
* `settings.githubUrl` from the route context directly via
|
|
12
|
+
* `@takazudo/zudo-doc/github-helpers`. Nothing to inject or copy.
|
|
9
13
|
*/
|
|
10
14
|
export declare const bodyFootUtilFeature: FeatureModule;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* body-foot-util feature.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* `
|
|
6
|
-
*
|
|
7
|
-
* `settings.bodyFootUtilArea
|
|
4
|
+
* Purely a `zudoDoc({ bodyFootUtilArea: {...} })` field (see
|
|
5
|
+
* `zfb-config-gen.ts`) — `BodyFootUtilArea` is fully package-owned
|
|
6
|
+
* (`@takazudo/zudo-doc/body-foot-util`, wired through `doc-page-shell`) and
|
|
7
|
+
* runtime-gates on `settings.bodyFootUtilArea`. The old host thin-stub
|
|
8
|
+
* (`src/utils/github.ts`, which depended on the now-deleted
|
|
9
|
+
* `@/config/settings`) is gone too — the package component reads
|
|
10
|
+
* `settings.githubUrl` from the route context directly via
|
|
11
|
+
* `@takazudo/zudo-doc/github-helpers`. Nothing to inject or copy.
|
|
8
12
|
*/
|
|
9
13
|
export const bodyFootUtilFeature = () => ({
|
|
10
14
|
name: "bodyFootUtil",
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
import type { FeatureModule } from "../compose.js";
|
|
2
|
+
/**
|
|
3
|
+
* Claude-resources feature.
|
|
4
|
+
*
|
|
5
|
+
* Fully plugin-owned (`@takazudo/zudo-doc/plugins/claude-resources`,
|
|
6
|
+
* `zudoDocPreset()` wires it whenever `settings.claudeResources` is
|
|
7
|
+
* truthy). Generation is package-owned. This feature's touch points are now
|
|
8
|
+
* just: `claudeResources` + `defaultLocaleOnlyPrefixes` fields
|
|
9
|
+
* (`zfb-config-gen.ts`).
|
|
10
|
+
*/
|
|
2
11
|
export declare const claudeResourcesFeature: FeatureModule;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude-resources feature.
|
|
3
|
+
*
|
|
4
|
+
* Fully plugin-owned (`@takazudo/zudo-doc/plugins/claude-resources`,
|
|
5
|
+
* `zudoDocPreset()` wires it whenever `settings.claudeResources` is
|
|
6
|
+
* truthy). Generation is package-owned. This feature's touch points are now
|
|
7
|
+
* just: `claudeResources` + `defaultLocaleOnlyPrefixes` fields
|
|
8
|
+
* (`zfb-config-gen.ts`).
|
|
9
|
+
*/
|
|
1
10
|
export const claudeResourcesFeature = () => ({
|
|
2
11
|
name: "claudeResources",
|
|
3
|
-
injections: [
|
|
4
|
-
// No shared file injection needed — this feature's touch points are:
|
|
5
|
-
// - plugin entry: zfb-config-gen.ts (claudeResources conditional import/plugin)
|
|
6
|
-
// - settings: settings-gen.ts (claudeResources object + defaultLocaleOnlyPrefixes array)
|
|
7
|
-
// - devDep: scaffold.ts (tsx devDep — same subprocess runner as docHistory)
|
|
8
|
-
],
|
|
12
|
+
injections: [],
|
|
9
13
|
});
|
|
@@ -1,14 +1,2 @@
|
|
|
1
1
|
import type { FeatureModule } from "../compose.js";
|
|
2
|
-
/**
|
|
3
|
-
* Design-token-panel (zdtp) feature.
|
|
4
|
-
*
|
|
5
|
-
* Injects:
|
|
6
|
-
* 1. The zdtp CSS @import at `@slot:global-css:feature-styles` in
|
|
7
|
-
* `src/styles/global.css`.
|
|
8
|
-
* 2. The DesignTokenPanelBootstrap import, displayName, and Island mount
|
|
9
|
-
* (with pre-hydration toggle shim) into
|
|
10
|
-
* `pages/lib/_body-end-islands.tsx` via the three @slot: anchors
|
|
11
|
-
* (imports / display-names / extra-islands). Mirrors the tauri feature
|
|
12
|
-
* injection shape (zudolab/zudo-doc#2162).
|
|
13
|
-
*/
|
|
14
2
|
export declare const designTokenPanelFeature: FeatureModule;
|