create-zudo-doc 3.2.0 → 3.3.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/dist/claude-md-gen.d.ts +8 -0
- package/dist/claude-md-gen.js +43 -26
- package/dist/compose.d.ts +14 -20
- package/dist/compose.js +15 -25
- 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 +12 -0
- package/dist/features/claude-resources.js +13 -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 +18 -3
- package/dist/features/doc-history.js +45 -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/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 +14 -7
- package/dist/features/tag-governance.js +52 -8
- package/dist/features/tauri.d.ts +13 -10
- package/dist/features/tauri.js +16 -52
- package/dist/features/versioning.d.ts +12 -24
- package/dist/features/versioning.js +13 -39
- package/dist/index.js +2 -3
- package/dist/scaffold.d.ts +13 -6
- package/dist/scaffold.js +64 -45
- 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 +400 -53
- package/package.json +2 -2
- package/templates/base/pages/docs/[[...slug]].tsx +59 -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 +88 -0
- package/templates/features/tagGovernance/files/scripts/tags-suggest.ts +3 -1
- 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/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
|
@@ -1,353 +1,28 @@
|
|
|
1
|
-
/* Cascade
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* preflight `margin: 0` reset and the .zd-content vertical rhythm is preserved.
|
|
8
|
-
* Preflight is the de-facto lowest-priority origin already, so moving it into
|
|
9
|
-
* the lowest layer is observably inert for every other author rule (which stay
|
|
10
|
-
* unlayered and continue to outrank it). */
|
|
1
|
+
/* Cascade layers: preflight → flow → (unlayered utilities). Tokens/base rules
|
|
2
|
+
ship from @takazudo/zudo-doc/theme.css.
|
|
3
|
+
NOTE: the `@takazudo/zdtp/styles.css` import is intentionally NOT here —
|
|
4
|
+
it is inserted right after the @layer line above, ONLY when
|
|
5
|
+
designTokenPanel is selected (see features/design-token-panel.ts). It
|
|
6
|
+
can't ship unconditionally because it pulls in zdtp's own bytes. */
|
|
11
7
|
@layer zd-preflight, zd-flow;
|
|
12
8
|
@import "tailwindcss/preflight" layer(zd-preflight);
|
|
13
9
|
@import "tailwindcss/utilities";
|
|
14
10
|
|
|
15
|
-
/*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* The package ships a build-generated safelist at `dist/safelist.css`
|
|
19
|
-
* (zudolab/zudo-doc#1993). Importing it via the module resolver is
|
|
20
|
-
* reliable across all consumer environments — the same module-resolver
|
|
21
|
-
* code path used for any feature stylesheet injected at the
|
|
22
|
-
* `@slot:global-css:feature-styles` anchor below.
|
|
23
|
-
*
|
|
24
|
-
* Why not @source the package dist/ glob? The old approach
|
|
25
|
-
* (`@source "../../node_modules/@takazudo/zudo-doc/dist/**"`) was
|
|
26
|
-
* unreliable: pnpm stores packages in a content-addressable store and
|
|
27
|
-
* surfaces them to node_modules via symlinks. Tailwind v4's file
|
|
28
|
-
* scanner does not reliably traverse those symlinks, so arbitrary-value
|
|
29
|
-
* candidates (e.g. `w-[var(--zd-sidebar-w)]`, `h-[calc(100vh-3.5rem)]`)
|
|
30
|
-
* were intermittently dropped across rebuilds (zudolab/zudo-doc#1971,
|
|
31
|
-
* #1989). The package-generated `@source inline()` in dist/safelist.css
|
|
32
|
-
* contains the full set, extracted at package build time — no drift, no
|
|
33
|
-
* symlink traversal, auto-syncs on package upgrade (zudolab/zudo-doc#1994).
|
|
34
|
-
* ======================================== */
|
|
35
|
-
|
|
11
|
+
/* Package-shipped tokens, safelist, content typography, and feature CSS.
|
|
12
|
+
Order is load-bearing — theme.css MUST precede features.css. Do not reorder. */
|
|
13
|
+
@import "@takazudo/zudo-doc/theme.css";
|
|
36
14
|
@import "@takazudo/zudo-doc/safelist.css";
|
|
37
|
-
|
|
38
|
-
/* Content typography (`.zd-content` rules + admonitions + mermaid layout).
|
|
39
|
-
Shipped by @takazudo/zudo-doc as the single source of truth — do not inline
|
|
40
|
-
these rules here (they used to live here and drifted; see
|
|
41
|
-
zudolab/zudo-doc#2188). The @layer zd-flow order it relies on is declared
|
|
42
|
-
above (line 11); the safelist import above generates the component utilities
|
|
43
|
-
its headings/links/etc. depend on. */
|
|
44
15
|
@import "@takazudo/zudo-doc/content.css";
|
|
45
|
-
|
|
46
|
-
.zd-html-preview-code, KaTeX, sidebar toggle geometry, view-transition chrome,
|
|
47
|
-
.ai-chat-md, .zd-enlarge*, .zd-mermaid*).
|
|
48
|
-
Shipped by @takazudo/zudo-doc as single source of truth. See zudolab/zudo-doc#2331. */
|
|
16
|
+
@import "@takazudo/zudo-doc/page-loading.css";
|
|
49
17
|
@import "@takazudo/zudo-doc/features.css";
|
|
50
|
-
/* @slot:global-css:imports */
|
|
51
|
-
|
|
52
|
-
/* ========================================
|
|
53
|
-
* Tailwind v4 content sources
|
|
54
|
-
*
|
|
55
|
-
* Without a `.git` directory in the project root Tailwind v4's content
|
|
56
|
-
* scanner falls back to explicit @source directives for class detection.
|
|
57
|
-
* Builds that run outside a git checkout (E2E fixtures, CI containers
|
|
58
|
-
* that copy the source tree without history, etc.) hit this fallback,
|
|
59
|
-
* and zfb's default content roots only cover `pages/`. Components live
|
|
60
|
-
* outside pages/, so these directives ensure the consumer's own code is
|
|
61
|
-
* always scanned for utility classes. The package's utilities are now
|
|
62
|
-
* covered by the @import above — these directives cover consumer code only.
|
|
63
|
-
* ======================================== */
|
|
64
18
|
|
|
65
|
-
|
|
19
|
+
/* Scan this project's own source for Tailwind utility classes. */
|
|
66
20
|
@source "src/content/**/*.{mdx,md}";
|
|
67
|
-
@source "src/
|
|
68
|
-
@source "src/utils/**/*.{tsx,ts,jsx,js}";
|
|
21
|
+
@source "src/components/**/*.{tsx,ts,jsx,js}";
|
|
69
22
|
@source "pages/**/*.{tsx,ts,jsx,js}";
|
|
70
23
|
|
|
71
|
-
/*
|
|
72
|
-
|
|
73
|
-
*
|
|
74
|
-
* Tight token strategy: import preflight + utilities only (no default theme).
|
|
75
|
-
* Only project-specific tokens are available.
|
|
76
|
-
*
|
|
77
|
-
* Base roles: --zd-bg/--zd-fg/--zd-selection-bg/--zd-selection-fg + ramps
|
|
78
|
-
* (--palette-base-0..4 / --palette-accent-0..2 / --palette-state-*) +
|
|
79
|
-
* 23 --zd-{role} semantic tokens, all injected by ColorSchemeProvider.
|
|
80
|
-
* Tailwind tokens: registered below via @theme
|
|
81
|
-
* ======================================== */
|
|
82
|
-
|
|
24
|
+
/* ── Your token overrides ──────────────────────────────────────────────
|
|
25
|
+
Override any default @theme token from @takazudo/zudo-doc/theme.css here. */
|
|
83
26
|
@theme {
|
|
84
|
-
/*
|
|
85
|
-
* Project tight-token color reset
|
|
86
|
-
*
|
|
87
|
-
* Wipes all Tailwind default color tokens (`--color-*`) so only
|
|
88
|
-
* project-defined palette and semantic tokens remain. This enforces the
|
|
89
|
-
* tight-token policy: "NEVER use Tailwind default colors" (per Color Rules
|
|
90
|
-
* in src/CLAUDE.md). Project color tokens (defined below) are added back
|
|
91
|
-
* after this reset.
|
|
92
|
-
*
|
|
93
|
-
* The upstream split-import fix (zfb#159 / 9e37551, shipped in f68a9ba)
|
|
94
|
-
* eliminated the original leak cause (zfb no longer prepends the full
|
|
95
|
-
* @import "tailwindcss" bundle). The reset is retained as an explicit
|
|
96
|
-
* design guardrail — it prevents accidental default palette bleed from any
|
|
97
|
-
* future upstream change and keeps the project's color surface intentional.
|
|
98
|
-
*
|
|
99
|
-
* NOT reset: `--spacing` (the base spacing scale, default 0.25rem).
|
|
100
|
-
* Tailwind spacing utilities compute as calc(var(--spacing) * N); wiping
|
|
101
|
-
* `--spacing` collapses them to zero (observed in Wave 4 Sub-7 #1403).
|
|
102
|
-
* ======================================== */
|
|
103
|
-
--color-*: initial;
|
|
104
|
-
|
|
105
|
-
/* ========================================
|
|
106
|
-
* Colors — Three-tier token system
|
|
107
|
-
* ======================================== */
|
|
108
|
-
|
|
109
|
-
/* ── Base ── */
|
|
110
|
-
--color-bg: var(--zd-bg);
|
|
111
|
-
--color-fg: var(--zd-fg);
|
|
112
|
-
--color-sel-bg: var(--zd-selection-bg);
|
|
113
|
-
--color-sel-fg: var(--zd-selection-fg);
|
|
114
|
-
|
|
115
|
-
/* ── Semantic aliases ── */
|
|
116
|
-
--color-surface: var(--zd-surface);
|
|
117
|
-
--color-muted: var(--zd-muted);
|
|
118
|
-
--color-accent: var(--zd-accent);
|
|
119
|
-
--color-accent-hover: var(--zd-accent-hover);
|
|
120
|
-
--color-code-bg: var(--zd-code-bg);
|
|
121
|
-
--color-code-fg: var(--zd-code-fg);
|
|
122
|
-
--color-success: var(--zd-success);
|
|
123
|
-
--color-danger: var(--zd-danger);
|
|
124
|
-
--color-warning: var(--zd-warning);
|
|
125
|
-
--color-info: var(--zd-info);
|
|
126
|
-
/* Overlay is intentionally theme-independent (always dark, not scheme-driven) */
|
|
127
|
-
--color-overlay: #000;
|
|
128
|
-
/* The page-loading overlay scrim token is feature-gated: the dynamicPageTransition
|
|
129
|
-
feature injects it into @slot:global-css:theme-tokens when enabled, so it is
|
|
130
|
-
intentionally absent from this base @theme block (the host showcase global.css
|
|
131
|
-
carries it inline only because the host is fully featured). Do not re-add it here. */
|
|
132
|
-
--color-image-overlay-bg: var(--zd-image-overlay-bg);
|
|
133
|
-
--color-image-overlay-fg: var(--zd-image-overlay-fg);
|
|
134
|
-
/* --color-mermaid-* aliases removed: mermaid-init-script.ts reads --zd-mermaid-* directly;
|
|
135
|
-
these @theme registrations were unused (no Tailwind utility references). --zd-mermaid-*
|
|
136
|
-
injection in color-scheme-utils.ts is preserved and remains the live source. */
|
|
137
|
-
--color-chat-user-bg: var(--zd-chat-user-bg);
|
|
138
|
-
--color-chat-user-text: var(--zd-chat-user-text);
|
|
139
|
-
--color-chat-assistant-bg: var(--zd-chat-assistant-bg);
|
|
140
|
-
--color-chat-assistant-text: var(--zd-chat-assistant-text);
|
|
141
|
-
--color-matched-keyword-bg: var(--zd-matched-keyword-bg);
|
|
142
|
-
--color-matched-keyword-fg: var(--zd-matched-keyword-fg);
|
|
143
|
-
/* @slot:global-css:theme-tokens */
|
|
144
|
-
|
|
145
|
-
/* ========================================
|
|
146
|
-
* Spacing — hsp (horizontal) + vsp (vertical)
|
|
147
|
-
* ======================================== */
|
|
148
|
-
--spacing-0: 0;
|
|
149
|
-
--spacing-px: 1px;
|
|
150
|
-
|
|
151
|
-
/* Horizontal spacing (7 steps) */
|
|
152
|
-
--spacing-hsp-2xs: 0.125rem; /* 2px — tight inline */
|
|
153
|
-
--spacing-hsp-xs: 0.375rem; /* 6px — compact inline */
|
|
154
|
-
--spacing-hsp-sm: 0.5rem; /* 8px — small padding */
|
|
155
|
-
--spacing-hsp-md: 0.75rem; /* 12px — default gaps */
|
|
156
|
-
--spacing-hsp-lg: 1rem; /* 16px — standard padding */
|
|
157
|
-
--spacing-hsp-xl: 1.5rem; /* 24px — generous padding */
|
|
158
|
-
--spacing-hsp-2xl: 2rem; /* 32px — large padding */
|
|
159
|
-
|
|
160
|
-
/* Vertical spacing (8 steps) */
|
|
161
|
-
--spacing-vsp-3xs: 0.25rem; /* 4px — hairline gap */
|
|
162
|
-
--spacing-vsp-2xs: 0.4375rem; /* 7px — tight gap */
|
|
163
|
-
--spacing-vsp-xs: 0.875rem; /* 14px — small gap */
|
|
164
|
-
--spacing-vsp-sm: 1.25rem; /* 20px — compact gap */
|
|
165
|
-
--spacing-vsp-md: 1.5rem; /* 24px — standard gap */
|
|
166
|
-
--spacing-vsp-lg: 1.75rem; /* 28px — section gap */
|
|
167
|
-
--spacing-vsp-xl: 2.5rem; /* 40px — large section gap */
|
|
168
|
-
--spacing-vsp-2xl: 3.5rem; /* 56px — page-level gap */
|
|
169
|
-
|
|
170
|
-
/* ========================================
|
|
171
|
-
* Element sizes — semantic icon dimensions
|
|
172
|
-
* ======================================== */
|
|
173
|
-
--spacing-icon-xs: 0.75rem; /* 12px — inline meta icons, chevrons */
|
|
174
|
-
--spacing-icon-sm: 1rem; /* 16px — standard UI icons */
|
|
175
|
-
--spacing-icon-md: 1.25rem; /* 20px — medium emphasis icons */
|
|
176
|
-
--spacing-icon-lg: 1.5rem; /* 24px — large / mobile icons */
|
|
177
|
-
|
|
178
|
-
/* Image overlay button chrome */
|
|
179
|
-
--spacing-image-overlay-inset: 0.5rem; /* 8px — overlay button corner inset + internal padding */
|
|
180
|
-
|
|
181
|
-
/* ========================================
|
|
182
|
-
* Elevation — the tight `@import "tailwindcss/utilities"` (no default
|
|
183
|
-
* @theme) drops Tailwind's default shadow scale, so `shadow-*` utilities
|
|
184
|
-
* generate nothing. Re-add the one elevation the components use: header
|
|
185
|
-
* and version-switcher dropdown panels apply `shadow-lg`. Value is
|
|
186
|
-
* Tailwind v4's default shadow-lg; the black is intentionally
|
|
187
|
-
* theme-independent (a drop shadow is absence of light, not a themed color).
|
|
188
|
-
* ======================================== */
|
|
189
|
-
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
190
|
-
|
|
191
|
-
/* ========================================
|
|
192
|
-
* Typography
|
|
193
|
-
* ======================================== */
|
|
194
|
-
|
|
195
|
-
/* ── Tier 2: Semantic font-size tokens (reference Tier 1 scale only) ── */
|
|
196
|
-
--text-micro: var(--text-scale-2xs); /* 12px — compact panel labels, color swatch annotations */
|
|
197
|
-
--text-caption: var(--text-scale-xs); /* labels, timestamps */
|
|
198
|
-
--text-small: var(--text-scale-sm); /* secondary text, nav items */
|
|
199
|
-
--text-body: var(--text-scale-md); /* paragraphs, default */
|
|
200
|
-
--text-title: var(--text-scale-lg); /* card titles, section labels */
|
|
201
|
-
--text-heading: var(--text-scale-xl); /* page headings */
|
|
202
|
-
--text-display: var(--text-scale-2xl); /* hero text */
|
|
203
|
-
|
|
204
|
-
/* Font families */
|
|
205
|
-
--font-sans: system-ui, sans-serif;
|
|
206
|
-
--font-mono: ui-monospace, monospace;
|
|
207
|
-
|
|
208
|
-
/* Font weights (4 steps) */
|
|
209
|
-
--font-weight-normal: 400;
|
|
210
|
-
--font-weight-medium: 500;
|
|
211
|
-
--font-weight-semibold: 600;
|
|
212
|
-
--font-weight-bold: 700;
|
|
213
|
-
|
|
214
|
-
/* Line heights (4 steps) */
|
|
215
|
-
--leading-tight: 1.25;
|
|
216
|
-
--leading-snug: 1.375;
|
|
217
|
-
--leading-normal: 1.5;
|
|
218
|
-
--leading-relaxed: 1.625;
|
|
219
|
-
|
|
220
|
-
/* Letter spacing / tracking (4 steps) */
|
|
221
|
-
--tracking-tight: -0.025em; /* headings, display text */
|
|
222
|
-
--tracking-normal: normal; /* browser default — resets any inherited tracking */
|
|
223
|
-
--tracking-wide: 0.05em; /* labels, UI text */
|
|
224
|
-
--tracking-wider: 0.1em; /* small caps, decorative */
|
|
225
|
-
|
|
226
|
-
/* ========================================
|
|
227
|
-
* Border radius (3 steps)
|
|
228
|
-
* ======================================== */
|
|
229
|
-
--radius-DEFAULT: 0.25rem; /* 4px — rounded */
|
|
230
|
-
--radius-lg: 0.5rem; /* 8px — rounded-lg */
|
|
231
|
-
--radius-full: 9999px; /* rounded-full */
|
|
232
|
-
|
|
233
|
-
/* ========================================
|
|
234
|
-
* Breakpoints (3 steps)
|
|
235
|
-
* ======================================== */
|
|
236
|
-
--breakpoint-sm: 640px;
|
|
237
|
-
--breakpoint-lg: 1024px;
|
|
238
|
-
--breakpoint-xl: 1280px;
|
|
27
|
+
/* e.g. --color-accent: oklch(0.6 0.2 250); */
|
|
239
28
|
}
|
|
240
|
-
|
|
241
|
-
/* ========================================
|
|
242
|
-
* Z-index tiers — semantic, single-namespace scale.
|
|
243
|
-
*
|
|
244
|
-
* The @theme block below is GENERATED from src/config/z-index-tokens.ts
|
|
245
|
-
* (the single source of truth) by `pnpm gen:z-index`. Tailwind v4 reads the
|
|
246
|
-
* --z-index-<name> theme key and generates a `z-<name>` utility, so e.g.
|
|
247
|
-
* --z-index-toolbar: 20 produces `.z-toolbar { z-index: 20 }`; raw CSS can
|
|
248
|
-
* also reference `z-index: var(--z-index-<name>)`. `pnpm check:z-index` fails
|
|
249
|
-
* on drift. Do NOT hand-edit between the BEGIN/END markers.
|
|
250
|
-
* ======================================== */
|
|
251
|
-
/* GENERATED:Z_INDEX_BEGIN
|
|
252
|
-
* GENERATED:Z_INDEX — do not hand-edit; run pnpm gen:z-index.
|
|
253
|
-
* Source of truth: src/config/z-index-tokens.ts. Tailwind v4 reads the
|
|
254
|
-
* --z-index-<name> theme key and generates a z-<name> utility. */
|
|
255
|
-
@theme {
|
|
256
|
-
--z-index-content: 0;
|
|
257
|
-
--z-index-local-1: 1;
|
|
258
|
-
--z-index-local-2: 2;
|
|
259
|
-
--z-index-local-3: 3;
|
|
260
|
-
--z-index-sidebar: 10;
|
|
261
|
-
--z-index-toolbar: 20;
|
|
262
|
-
--z-index-dropdown: 30;
|
|
263
|
-
--z-index-popover: 40;
|
|
264
|
-
--z-index-modal-backdrop: 50;
|
|
265
|
-
--z-index-modal: 60;
|
|
266
|
-
--z-index-toast: 70;
|
|
267
|
-
--z-index-tooltip: 80;
|
|
268
|
-
--z-index-drag: 90;
|
|
269
|
-
}
|
|
270
|
-
/* GENERATED:Z_INDEX_END */
|
|
271
|
-
|
|
272
|
-
:root {
|
|
273
|
-
/* Default responsive range; sidebar-resizer.ts allows 192–448px for explicit resizing. */
|
|
274
|
-
--zd-sidebar-w: clamp(14rem, 20vw, 22rem);
|
|
275
|
-
|
|
276
|
-
/* ── Tier 1: Abstract font-size scale (raw values — NOT for direct component use) ── */
|
|
277
|
-
/* Used only as a source of truth for Tier 2 semantic tokens above. */
|
|
278
|
-
--text-scale-2xs: 0.75rem; /* 12px */
|
|
279
|
-
--text-scale-xs: 0.875rem; /* 14px */
|
|
280
|
-
--text-scale-sm: 1rem; /* 16px */
|
|
281
|
-
--text-scale-md: 1.2rem; /* 19.2px */
|
|
282
|
-
--text-scale-lg: 1.4rem; /* 22.4px */
|
|
283
|
-
--text-scale-xl: 3rem; /* 48px */
|
|
284
|
-
--text-scale-2xl: 3.75rem; /* 60px */
|
|
285
|
-
|
|
286
|
-
--default-transition-duration: 150ms; /* consumed by image-enlarge and hash-link opacity fade */
|
|
287
|
-
--zd-transition-slow: 200ms; /* sidebar transform/visibility and content-band max-width */
|
|
288
|
-
--zd-transition-slower: 300ms; /* view-transition fade-in (contentFadeIn animation) */
|
|
289
|
-
--zd-header-h: 80px; /* sticky header height; consumed by scroll-margin-top on [id] anchors */
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/* ========================================
|
|
293
|
-
* Base styles
|
|
294
|
-
* ======================================== */
|
|
295
|
-
|
|
296
|
-
[id] {
|
|
297
|
-
scroll-margin-top: var(--zd-header-h);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
body {
|
|
301
|
-
background-color: var(--color-bg);
|
|
302
|
-
color: var(--color-fg);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
::selection {
|
|
306
|
-
background-color: var(--color-sel-bg);
|
|
307
|
-
color: var(--color-sel-fg);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
@layer base {
|
|
311
|
-
a {
|
|
312
|
-
text-underline-offset: 4px;
|
|
313
|
-
}
|
|
314
|
-
button {
|
|
315
|
-
cursor: pointer;
|
|
316
|
-
}
|
|
317
|
-
:focus-visible {
|
|
318
|
-
outline: 2px solid var(--color-accent);
|
|
319
|
-
outline-offset: 2px;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
/* ── Search highlight ── */
|
|
324
|
-
[data-search-results] mark {
|
|
325
|
-
background-color: var(--color-matched-keyword-bg);
|
|
326
|
-
color: var(--color-matched-keyword-fg);
|
|
327
|
-
padding: 0;
|
|
328
|
-
border-radius: 2px;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
/* Version-switcher responsive visibility (moved out of the component to
|
|
332
|
-
* avoid <style>-inside-<div> HTML5 content-model violation; required when
|
|
333
|
-
* the i18nVersion feature ships a <VersionSwitcher> wrapped in
|
|
334
|
-
* `<div class="hidden lg:block">`. Inert when no version-switcher is on
|
|
335
|
-
* the page. */
|
|
336
|
-
@media (min-width: 64rem) {
|
|
337
|
-
.hidden:has(> [data-version-switcher]) {
|
|
338
|
-
display: block;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/* ── Find-in-page highlight (W7A: unconditional — Tauri feature gates at runtime) ── */
|
|
343
|
-
.find-match {
|
|
344
|
-
background-color: color-mix(in oklch, var(--color-warning) 40%, transparent);
|
|
345
|
-
border-radius: 2px;
|
|
346
|
-
}
|
|
347
|
-
.find-match-active {
|
|
348
|
-
background-color: color-mix(in oklch, var(--color-warning) 70%, transparent);
|
|
349
|
-
border-radius: 2px;
|
|
350
|
-
outline: 2px solid color-mix(in oklch, var(--color-warning) 90%, transparent);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/* @slot:global-css:feature-styles */
|
|
@@ -1,36 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"extends": "@takazudo/zudo-doc/tsconfig.base.json",
|
|
3
|
+
"include": ["src", "pages", "zfb.config.ts"],
|
|
3
4
|
"compilerOptions": {
|
|
4
|
-
"target": "ESNext",
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "Bundler",
|
|
7
|
-
"allowImportingTsExtensions": true,
|
|
8
|
-
"resolveJsonModule": true,
|
|
9
|
-
"verbatimModuleSyntax": true,
|
|
10
|
-
"isolatedModules": true,
|
|
11
|
-
"noEmit": true,
|
|
12
|
-
"forceConsistentCasingInFileNames": true,
|
|
13
|
-
"esModuleInterop": true,
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"allowJs": true,
|
|
16
|
-
"jsx": "preserve",
|
|
17
|
-
"strict": true,
|
|
18
|
-
"noImplicitAny": true,
|
|
19
|
-
"strictNullChecks": true,
|
|
20
|
-
"strictFunctionTypes": true,
|
|
21
|
-
"strictBindCallApply": true,
|
|
22
|
-
"strictPropertyInitialization": true,
|
|
23
|
-
"noImplicitThis": true,
|
|
24
|
-
"useUnknownInCatchVariables": true,
|
|
25
|
-
"alwaysStrict": true,
|
|
26
5
|
"baseUrl": ".",
|
|
27
6
|
"paths": {
|
|
28
7
|
"@/*": ["src/*"],
|
|
29
|
-
"#doc-history-meta": [".zfb/doc-history-meta.json"],
|
|
30
8
|
"react": ["./node_modules/preact/compat/"],
|
|
31
9
|
"react/jsx-runtime": ["./node_modules/preact/jsx-runtime"],
|
|
32
10
|
"react-dom": ["./node_modules/preact/compat/"]
|
|
33
11
|
}
|
|
34
|
-
}
|
|
35
|
-
"exclude": ["dist", "e2e/fixtures", "packages", "pages", "worktrees", "vendor", "src/**/__tests__", "vitest.config.ts"]
|
|
12
|
+
}
|
|
36
13
|
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/** @jsxRuntime automatic */
|
|
2
|
+
/** @jsxImportSource preact */
|
|
3
|
+
// Locked manifest (#2653 Decision 4, i18n addendum): the locale-prefixed
|
|
4
|
+
// counterpart of pages/docs/[[...slug]].tsx — required for the same reason
|
|
5
|
+
// (injected DYNAMIC routes 404 in `zfb dev`). Self-contained: only the three
|
|
6
|
+
// sanctioned package entrypoints — no `pages/lib`, no `@/config`. Mirrors
|
|
7
|
+
// the package's own `routes/locale-docs-slug.tsx` shape, rebuilt from the
|
|
8
|
+
// route-context payload instead of the package-internal `_context.js`.
|
|
9
|
+
//
|
|
10
|
+
// Per-locale content dir + fallback notice (ported from
|
|
11
|
+
// packages/zudo-doc/src/routes/locale-docs-slug.tsx and the showcase's
|
|
12
|
+
// pages/[locale]/docs/[[...slug]].tsx): each route carries the locale's own
|
|
13
|
+
// content directory (`getLocaleConfig(locale).dir`) and an `isFallback` flag.
|
|
14
|
+
// A page that only exists in the default locale is served as an untranslated
|
|
15
|
+
// FALLBACK — it must (a) read doc-history from the DEFAULT-locale content dir
|
|
16
|
+
// (not the translated one, which has no such file), and (b) thread
|
|
17
|
+
// `isFallback` so the chrome renders the "not translated yet" notice. Dropping
|
|
18
|
+
// either — as this stub previously did by hardcoding `docsDir` for every
|
|
19
|
+
// locale and never passing `isFallback` — silently breaks translated pages.
|
|
20
|
+
//
|
|
21
|
+
// docHistory note: same as the default-locale stub — when docHistory is
|
|
22
|
+
// selected, the generator patches this file too.
|
|
23
|
+
|
|
24
|
+
import type { JSX } from "preact";
|
|
25
|
+
import { routeContext } from "virtual:zudo-doc-route-context";
|
|
26
|
+
import {
|
|
27
|
+
createRouteContext,
|
|
28
|
+
type RouteContextPayload,
|
|
29
|
+
} from "@takazudo/zudo-doc/route-context";
|
|
30
|
+
import { createChrome } from "@takazudo/zudo-doc/chrome";
|
|
31
|
+
|
|
32
|
+
const ctx = routeContext as unknown as RouteContextPayload;
|
|
33
|
+
const routeCtx = createRouteContext(ctx);
|
|
34
|
+
const { renderDocPage } = createChrome(routeCtx);
|
|
35
|
+
|
|
36
|
+
export const frontmatter = { title: "Docs" };
|
|
37
|
+
|
|
38
|
+
export function paths(): Array<{
|
|
39
|
+
params: { locale: string; slug: string[] };
|
|
40
|
+
props: unknown;
|
|
41
|
+
}> {
|
|
42
|
+
const result: Array<{
|
|
43
|
+
params: { locale: string; slug: string[] };
|
|
44
|
+
props: unknown;
|
|
45
|
+
}> = [];
|
|
46
|
+
|
|
47
|
+
for (const locale of Object.keys(routeCtx.settings.locales)) {
|
|
48
|
+
const contentDir =
|
|
49
|
+
routeCtx.getLocaleConfig(locale)?.dir ?? routeCtx.settings.docsDir;
|
|
50
|
+
const source = routeCtx.resolveNavSource(locale, undefined, {
|
|
51
|
+
applyDefaultLocaleOnlyFilter: true,
|
|
52
|
+
keepUnlisted: true,
|
|
53
|
+
});
|
|
54
|
+
for (const item of routeCtx.buildDocRouteEntries({
|
|
55
|
+
source,
|
|
56
|
+
locale,
|
|
57
|
+
routeSig: `locale-docs;${locale}`,
|
|
58
|
+
})) {
|
|
59
|
+
result.push({
|
|
60
|
+
params: { locale, slug: item.slugParams },
|
|
61
|
+
props: {
|
|
62
|
+
...(item.props as Record<string, unknown>),
|
|
63
|
+
// Fallback pages exist only in the default locale, so their
|
|
64
|
+
// doc-history lives under the EN docsDir; translated pages read
|
|
65
|
+
// their own locale dir.
|
|
66
|
+
contentDir: item.isFallback ? routeCtx.settings.docsDir : contentDir,
|
|
67
|
+
isFallback: item.isFallback,
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
type PageArgs = {
|
|
77
|
+
params: { locale: string; slug: string[] };
|
|
78
|
+
contentDir: string;
|
|
79
|
+
isFallback: boolean;
|
|
80
|
+
} & Record<string, unknown>;
|
|
81
|
+
|
|
82
|
+
export default function LocaleDocsPage(props: PageArgs): JSX.Element {
|
|
83
|
+
return renderDocPage(props as never, {
|
|
84
|
+
locale: props.params.locale,
|
|
85
|
+
isFallback: props.isFallback,
|
|
86
|
+
docHistoryContentDir: props.contentDir,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
@@ -16,7 +16,9 @@ import { parseArgs } from "node:util";
|
|
|
16
16
|
import matter from "gray-matter";
|
|
17
17
|
|
|
18
18
|
import { tagVocabulary } from "../src/config/tag-vocabulary";
|
|
19
|
-
|
|
19
|
+
// Minimal-scaffold cutover (epic zudolab/zudo-doc#2651): the standalone
|
|
20
|
+
// `tag-vocabulary-types.ts` shim is gone — the type ships from the package.
|
|
21
|
+
import type { TagVocabularyEntry } from "@takazudo/zudo-doc/settings";
|
|
20
22
|
|
|
21
23
|
const DEFAULT_HOST = "http://localhost:11434";
|
|
22
24
|
const DEFAULT_MODEL = "qwen2.5:7b";
|
package/dist/settings-gen.d.ts
DELETED