create-zudo-doc 4.5.0 → 5.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.
@@ -19,7 +19,7 @@ export function generateCLAUDEFile(choices) {
19
19
  lines.push(``);
20
20
  lines.push(`- **zfb** — documentation build framework`);
21
21
  lines.push(`- **MDX** — content format, authored under \`src/content/\``);
22
- lines.push(`- **Tailwind CSS v4** — via \`@tailwindcss/vite\``);
22
+ lines.push(`- **Tailwind CSS v4** — compiled by zfb's embedded Tailwind engine (no \`@tailwindcss/vite\` plugin, no \`tailwindcss\` dependency); \`src/styles/global.css\` imports \`tailwindcss/preflight\` + \`tailwindcss/utilities\` and zfb's internal resolver serves both`);
23
23
  lines.push(`- **Preact** — for interactive islands only (with compat mode for React API)`);
24
24
  lines.push("- **zfb semantic highlighting** — native build-time fenced-code rendering plus lazy `@takazudo/zfb-md-wasm` for HtmlPreview; both emit `hi-*` classes resolved through `--zd-syntax-*` design tokens");
25
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`);
package/dist/constants.js CHANGED
@@ -247,6 +247,13 @@ export const FEATURES = [
247
247
  default: false,
248
248
  cliFlag: "sidebar-toggle",
249
249
  },
250
+ {
251
+ value: "tocToggle",
252
+ label: "TOC toggle",
253
+ hint: "Show/hide the desktop table of contents",
254
+ default: false,
255
+ cliFlag: "toc-toggle",
256
+ },
250
257
  {
251
258
  value: "versioning",
252
259
  label: "Versioning",
@@ -10,6 +10,7 @@ import { searchFeature } from "./search.js";
10
10
  import { footerFeature } from "./footer.js";
11
11
  import { sidebarResizerFeature } from "./sidebar-resizer.js";
12
12
  import { sidebarToggleFeature } from "./sidebar-toggle.js";
13
+ import { tocToggleFeature } from "./toc-toggle.js";
13
14
  import { docHistoryFeature } from "./doc-history.js";
14
15
  import { llmsTxtFeature } from "./llms-txt.js";
15
16
  import { claudeResourcesFeature } from "./claude-resources.js";
@@ -39,6 +40,7 @@ export const featureModules = {
39
40
  themePackSwitcher: themePackSwitcherFeature,
40
41
  sidebarResizer: sidebarResizerFeature,
41
42
  sidebarToggle: sidebarToggleFeature,
43
+ tocToggle: tocToggleFeature,
42
44
  versioning: versioningFeature,
43
45
  docHistory: docHistoryFeature,
44
46
  bodyFootUtil: bodyFootUtilFeature,
@@ -0,0 +1,11 @@
1
+ import type { FeatureModule } from "../compose.js";
2
+ /**
3
+ * TOC-toggle feature.
4
+ *
5
+ * Purely a `zudoDoc({ tocToggle: true })` field (see `zfb-config-gen.ts`).
6
+ * `DesktopTocToggle` is fully package-owned
7
+ * (`@takazudo/zudo-doc/desktop-toc-toggle-island`, wired into the doc-page
8
+ * shell directly) and its CSS ships unconditionally from
9
+ * `@takazudo/zudo-doc/features.css` — nothing to inject or copy.
10
+ */
11
+ export declare const tocToggleFeature: FeatureModule;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * TOC-toggle feature.
3
+ *
4
+ * Purely a `zudoDoc({ tocToggle: true })` field (see `zfb-config-gen.ts`).
5
+ * `DesktopTocToggle` is fully package-owned
6
+ * (`@takazudo/zudo-doc/desktop-toc-toggle-island`, wired into the doc-page
7
+ * shell directly) and its CSS ships unconditionally from
8
+ * `@takazudo/zudo-doc/features.css` — nothing to inject or copy.
9
+ */
10
+ export const tocToggleFeature = () => ({
11
+ name: "tocToggle",
12
+ injections: [],
13
+ });
@@ -32,5 +32,5 @@ export declare function deriveDocSkillName(projectName: string): string;
32
32
  *
33
33
  * Bumped in lockstep by scripts/release-create-zudo-doc.sh.
34
34
  */
35
- export declare const ZUDO_DOC_PIN = "^4.5.0";
35
+ export declare const ZUDO_DOC_PIN = "^5.0.0";
36
36
  export declare function scaffold(choices: UserChoices): Promise<void>;
package/dist/scaffold.js CHANGED
@@ -43,7 +43,7 @@ export function deriveDocSkillName(projectName) {
43
43
  *
44
44
  * Bumped in lockstep by scripts/release-create-zudo-doc.sh.
45
45
  */
46
- export const ZUDO_DOC_PIN = "^4.5.0";
46
+ export const ZUDO_DOC_PIN = "^5.0.0";
47
47
  /**
48
48
  * Files in `templates/base/**` that must not be copied by the unconditional
49
49
  * base mirror. Each entry is matched against the path relative to
@@ -573,9 +573,15 @@ function generatePackageJson(choices) {
573
573
  // 1.1.0: container-directive fixes (multi-block bodies, unclosed-opener
574
574
  // diagnostics) plus highlighting for fences nested in MDX JSX bodies and
575
575
  // directives. Content-rendering fixes, additive.
576
- "@takazudo/zfb": "1.1.0",
577
- "@takazudo/zfb-runtime": "1.1.0",
578
- "@takazudo/zfb-md-wasm": "1.1.0",
576
+ // 2.0.0: BREAKING — the `githubAutolinks` markdown feature was removed
577
+ // (`GithubAutolinksConfig` is gone from `zfb/config`, and a config still
578
+ // setting it hard-errors at load). A fresh scaffold never emitted it, so
579
+ // there is no generator-side migration. Additive alongside it:
580
+ // `strictContentBridge`, a build-only gate that fails `zfb build` when a
581
+ // collection entry falls back to `<pre data-zfb-content-fallback>`.
582
+ "@takazudo/zfb": "2.1.0",
583
+ "@takazudo/zfb-runtime": "2.1.0",
584
+ "@takazudo/zfb-md-wasm": "2.1.0",
579
585
  // @takazudo/zudo-doc — published from this monorepo via
580
586
  // .github/workflows/publish-zudo-doc.yml. The pin here is bumped in
581
587
  // lockstep by scripts/release-create-zudo-doc.sh whenever zudo-doc's
@@ -610,10 +616,6 @@ function generatePackageJson(choices) {
610
616
  // compiles. Same pin as host. Caught by W6B (#1735) consumer-build
611
617
  // verification.
612
618
  "preact-render-to-string": "^6.6.6",
613
- "gray-matter": "^4.0.0",
614
- mermaid: "^11.12.3",
615
- "remark-cjk-friendly": "^2.0.1",
616
- "remark-directive": "^3.0.0",
617
619
  // katex — server-side LaTeX renderer used by the always-on
618
620
  // pages/lib/_math-block.tsx (called from pages/_mdx-components.ts
619
621
  // for `$…$` and `$$…$$` math nodes). Caught by W6B (#1735)
@@ -663,11 +665,17 @@ function generatePackageJson(choices) {
663
665
  // packages/zudo-doc/src/__tests__/optional-peer-reachability.test.ts.)
664
666
  };
665
667
  const devDeps = {
666
- "@tailwindcss/vite": "^4.2.0",
667
- tailwindcss: "^4.2.0",
668
668
  typescript: "^5.9.0",
669
669
  "@types/node": "^22.0.0",
670
- "@types/react": "^19.2.0", // needed for preact/compat type resolution
670
+ // @types/react is intentionally ABSENT (#3181/#3183). tsconfig.base.json
671
+ // now sets `jsx: "react-jsx"` + `jsxImportSource: "preact"`, so TypeScript
672
+ // resolves `JSX.IntrinsicElements` from preact/jsx-runtime's own types —
673
+ // not from a global @types/react namespace. Ejected components (e.g.
674
+ // `src/components/zudo-doc/theme-toggle/`) typecheck cleanly under
675
+ // `zfb check` without it; verified by the create-zudo-doc `test:slow`
676
+ // post-eject build. Do not re-add this dep to work around a typecheck
677
+ // failure — that would mean the react-jsx flip regressed, which is worth
678
+ // reporting against #3181, not papering over here.
671
679
  // html-validate dropped — check:html is no longer a default script
672
680
  // (see the scripts block below; `.htmlvalidate.json` no longer ships).
673
681
  };
@@ -695,7 +703,7 @@ function generatePackageJson(choices) {
695
703
  // `/exclude` at module scope from the always-bundled chrome graph; #3110
696
704
  // moved compileExclude into @takazudo/zudo-doc, so docHistory-OFF projects
697
705
  // no longer need the package at all.
698
- deps["@takazudo/zudo-doc-history-server"] = "^4.5.0";
706
+ deps["@takazudo/zudo-doc-history-server"] = "^5.0.0";
699
707
  // tsx is no longer needed here: the relocated package plugin imports the
700
708
  // runner directly (no `tsx -e` spawn) since the package ships compiled
701
709
  // dist/ — package-first migration #2321 (#2337).
@@ -56,6 +56,7 @@ export const DEFAULT_MIRROR = {
56
56
  designTokenPanel: false,
57
57
  sidebarResizer: false,
58
58
  sidebarToggle: false,
59
+ tocToggle: false,
59
60
  imageEnlarge: false,
60
61
  findInPage: false,
61
62
  dynamicPageTransition: false,
@@ -219,6 +220,7 @@ function buildDesiredConfig(choices) {
219
220
  desired.designTokenPanel = choices.features.includes("designTokenPanel");
220
221
  desired.sidebarResizer = choices.features.includes("sidebarResizer");
221
222
  desired.sidebarToggle = choices.features.includes("sidebarToggle");
223
+ desired.tocToggle = choices.features.includes("tocToggle");
222
224
  desired.imageEnlarge = choices.features.includes("imageEnlarge");
223
225
  // findInPage rides the existing tauri feature (#2690) — the Cmd/Ctrl+F find
224
226
  // bar only makes sense inside the Tauri desktop shell, so it has no CLI
@@ -358,6 +360,7 @@ const FIELD_ORDER = [
358
360
  "designTokenPanel",
359
361
  "sidebarResizer",
360
362
  "sidebarToggle",
363
+ "tocToggle",
361
364
  "imageEnlarge",
362
365
  "findInPage",
363
366
  "dynamicPageTransition",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-zudo-doc",
3
- "version": "4.5.0",
3
+ "version": "5.0.0",
4
4
  "description": "Create a new zudo-doc documentation site",
5
5
  "license": "MIT",
6
6
  "author": "Takeshi Takatsudo",
@@ -61,7 +61,6 @@
61
61
  "@types/fs-extra": "^11.0.4",
62
62
  "@types/minimist": "^1.2.5",
63
63
  "@types/node": "^22.0.0",
64
- "gray-matter": "^4.0.3",
65
64
  "typescript": "^5.9.0",
66
65
  "vitest": "^4.1.0"
67
66
  }
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
2
+ <rect width="32" height="32" rx="6" fill="#7c3aed"/>
3
+ <text x="16" y="23" font-family="system-ui,sans-serif" font-size="20" font-weight="700" fill="white" text-anchor="middle">Z</text>
4
+ </svg>