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,239 +0,0 @@
|
|
|
1
|
-
import { settings } from "./settings";
|
|
2
|
-
import type { LocaleConfig } from "./settings-types";
|
|
3
|
-
|
|
4
|
-
// Collection name string used by zfb's content engine (`getCollection(...)`).
|
|
5
|
-
// Kept as a structural string-literal alias so callers don't have to redeclare
|
|
6
|
-
// it; it's a structural type so the underlying engine is interchangeable.
|
|
7
|
-
type CollectionKey = string;
|
|
8
|
-
|
|
9
|
-
/** Default locale code, served from docsDir. */
|
|
10
|
-
export const defaultLocale = settings.defaultLocale;
|
|
11
|
-
|
|
12
|
-
/** All supported locale codes, derived from settings. */
|
|
13
|
-
export const locales = [
|
|
14
|
-
defaultLocale,
|
|
15
|
-
...(Object.keys(settings.locales) as Array<keyof typeof settings.locales>),
|
|
16
|
-
] as const;
|
|
17
|
-
export type Locale = (typeof locales)[number];
|
|
18
|
-
|
|
19
|
-
/** Safely look up a locale in settings.locales by string key. */
|
|
20
|
-
export function getLocaleConfig(locale: string): LocaleConfig | undefined {
|
|
21
|
-
return (settings.locales as Record<string, LocaleConfig | undefined>)[locale];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/** Get the content directory for a locale. */
|
|
25
|
-
export function getContentDir(locale: Locale | string): string {
|
|
26
|
-
if (locale === defaultLocale) return settings.docsDir;
|
|
27
|
-
return getLocaleConfig(locale)?.dir ?? settings.docsDir;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Get the Astro content collection name for a locale.
|
|
32
|
-
* Returns a CollectionKey so it can be passed directly to getCollection().
|
|
33
|
-
* The cast is safe because collections are dynamically created in content.config.ts
|
|
34
|
-
* for every locale in settings.locales.
|
|
35
|
-
*/
|
|
36
|
-
export function getCollectionName(locale: Locale | string): CollectionKey {
|
|
37
|
-
if (locale === defaultLocale) return "docs";
|
|
38
|
-
return `docs-${locale}` as CollectionKey;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/** Get the display label for a locale. */
|
|
42
|
-
export function getLocaleLabel(locale: Locale | string): string {
|
|
43
|
-
if (locale === defaultLocale) return defaultLocale.toUpperCase();
|
|
44
|
-
return getLocaleConfig(locale)?.label ?? locale.toUpperCase();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/** Detect locale from a URL pathname (after base stripping). */
|
|
48
|
-
export function detectLocaleFromPath(path: string): Locale {
|
|
49
|
-
for (const code of Object.keys(settings.locales)) {
|
|
50
|
-
if (path.startsWith(`/${code}/`) || path === `/${code}`) {
|
|
51
|
-
return code as Locale;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return defaultLocale;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** UI string translations */
|
|
58
|
-
export const translations: Record<string, Record<string, string>> = {
|
|
59
|
-
en: {
|
|
60
|
-
"nav.gettingStarted": "Getting Started",
|
|
61
|
-
"nav.learn": "Learn",
|
|
62
|
-
"nav.guides": "Guides",
|
|
63
|
-
"nav.components": "Components",
|
|
64
|
-
"nav.reference": "Reference",
|
|
65
|
-
"nav.claude": "Claude",
|
|
66
|
-
"nav.changelog": "Changelog",
|
|
67
|
-
"nav.develop": "Develop",
|
|
68
|
-
"nav.previous": "Previous",
|
|
69
|
-
"nav.next": "Next",
|
|
70
|
-
"nav.overview": "Overview",
|
|
71
|
-
"toc.title": "On this page",
|
|
72
|
-
"docs.browseAll": "Browse all documentation sections.",
|
|
73
|
-
"search.label": "Search",
|
|
74
|
-
"search.placeholder": "Type to search...",
|
|
75
|
-
"search.shortcutHint": "to open search from anywhere",
|
|
76
|
-
"search.resultCount": "{count} results",
|
|
77
|
-
"search.unavailable": "Search unavailable",
|
|
78
|
-
"search.loadingIndex": "Loading search index…",
|
|
79
|
-
"search.noResults": "No results found.",
|
|
80
|
-
"code.copy": "Copy code",
|
|
81
|
-
"code.copied": "Copied!",
|
|
82
|
-
"code.wrapToggle": "Toggle word wrap",
|
|
83
|
-
"doc.editPage": "Edit this page",
|
|
84
|
-
"doc.viewSource": "View source on GitHub",
|
|
85
|
-
"header.github": "GitHub repository",
|
|
86
|
-
"doc.tags": "Tags",
|
|
87
|
-
"doc.taggedWith": "Pages tagged with",
|
|
88
|
-
"doc.allTags": "All Tags",
|
|
89
|
-
"doc.created": "Created",
|
|
90
|
-
"doc.updated": "Updated",
|
|
91
|
-
"doc.noTags": "No tags found.",
|
|
92
|
-
"doc.pageCount": "{count} pages",
|
|
93
|
-
"doc.pageCountSingle": "{count} page",
|
|
94
|
-
"nav.backToMenu": "Back to main menu",
|
|
95
|
-
"doc.fallbackNotice":
|
|
96
|
-
"This page has not been translated yet and is shown in the original language.",
|
|
97
|
-
"frontmatter.preview.title": "Frontmatter",
|
|
98
|
-
"frontmatter.preview.keyCol": "Key",
|
|
99
|
-
"frontmatter.preview.valueCol": "Value",
|
|
100
|
-
"version.latest": "Latest",
|
|
101
|
-
"version.switcher.label": "Version",
|
|
102
|
-
"version.banner.unmaintained":
|
|
103
|
-
"You are viewing documentation for an older version.",
|
|
104
|
-
"version.banner.unreleased":
|
|
105
|
-
"You are viewing unreleased documentation.",
|
|
106
|
-
"version.banner.latestLink": "View the latest version",
|
|
107
|
-
"version.switcher.unavailable": "Not available in this version",
|
|
108
|
-
"version.switcher.allVersions": "All versions",
|
|
109
|
-
"version.page.title": "Documentation Versions",
|
|
110
|
-
"version.page.latest.title": "Latest Version (Current)",
|
|
111
|
-
"version.page.latest.description":
|
|
112
|
-
"The most up-to-date documentation for the latest stable release.",
|
|
113
|
-
"version.page.latest.link": "View latest docs",
|
|
114
|
-
"version.page.past.title": "Past Versions",
|
|
115
|
-
"version.page.past.description":
|
|
116
|
-
"Documentation for previously released versions.",
|
|
117
|
-
"version.page.unmaintained": "Unmaintained",
|
|
118
|
-
"version.page.unreleased": "Unreleased",
|
|
119
|
-
"version.page.status": "Status",
|
|
120
|
-
"version.page.docs": "Docs",
|
|
121
|
-
},
|
|
122
|
-
ja: {
|
|
123
|
-
"nav.gettingStarted": "はじめに",
|
|
124
|
-
"nav.learn": "学ぶ",
|
|
125
|
-
"nav.guides": "ガイド",
|
|
126
|
-
"nav.components": "コンポーネント",
|
|
127
|
-
"nav.reference": "リファレンス",
|
|
128
|
-
"nav.claude": "Claude",
|
|
129
|
-
"nav.changelog": "変更履歴",
|
|
130
|
-
"nav.develop": "開発",
|
|
131
|
-
"nav.previous": "前へ",
|
|
132
|
-
"nav.next": "次へ",
|
|
133
|
-
"nav.overview": "概要",
|
|
134
|
-
"toc.title": "目次",
|
|
135
|
-
"docs.browseAll": "すべてのドキュメントセクションを閲覧",
|
|
136
|
-
"search.label": "検索",
|
|
137
|
-
"search.placeholder": "検索したい単語を入力",
|
|
138
|
-
"search.shortcutHint": "いつでも検索バーを開ける",
|
|
139
|
-
"search.resultCount": "{count} 件",
|
|
140
|
-
"search.unavailable": "検索を利用できません",
|
|
141
|
-
"search.loadingIndex": "検索インデックスを読み込み中…",
|
|
142
|
-
"search.noResults": "検索結果が見つかりませんでした。",
|
|
143
|
-
"code.copy": "コードをコピー",
|
|
144
|
-
"code.copied": "コピーしました!",
|
|
145
|
-
"code.wrapToggle": "折り返し切替",
|
|
146
|
-
"doc.editPage": "このページを編集",
|
|
147
|
-
"doc.viewSource": "GitHub でソースを見る",
|
|
148
|
-
"header.github": "GitHub リポジトリ",
|
|
149
|
-
"doc.tags": "タグ",
|
|
150
|
-
"doc.taggedWith": "タグ付きページ",
|
|
151
|
-
"doc.allTags": "すべてのタグ",
|
|
152
|
-
"doc.created": "作成",
|
|
153
|
-
"doc.updated": "更新",
|
|
154
|
-
"doc.noTags": "タグが見つかりません。",
|
|
155
|
-
"doc.pageCount": "{count}ページ",
|
|
156
|
-
"doc.pageCountSingle": "{count}ページ",
|
|
157
|
-
"nav.backToMenu": "メインメニューに戻る",
|
|
158
|
-
"doc.fallbackNotice":
|
|
159
|
-
"このページはまだ翻訳されていません。原文のまま表示しています。",
|
|
160
|
-
"frontmatter.preview.title": "フロントマター",
|
|
161
|
-
"frontmatter.preview.keyCol": "キー",
|
|
162
|
-
"frontmatter.preview.valueCol": "値",
|
|
163
|
-
"version.latest": "最新",
|
|
164
|
-
"version.switcher.label": "バージョン",
|
|
165
|
-
"version.banner.unmaintained":
|
|
166
|
-
"これは旧バージョンのドキュメントです。",
|
|
167
|
-
"version.banner.unreleased":
|
|
168
|
-
"これは未リリースのドキュメントです。",
|
|
169
|
-
"version.banner.latestLink": "最新バージョンを見る",
|
|
170
|
-
"version.switcher.unavailable": "このバージョンでは利用できません",
|
|
171
|
-
"version.switcher.allVersions": "すべてのバージョン",
|
|
172
|
-
"version.page.title": "ドキュメントバージョン",
|
|
173
|
-
"version.page.latest.title": "最新バージョン(現在)",
|
|
174
|
-
"version.page.latest.description":
|
|
175
|
-
"最新の安定版リリースのドキュメントです。",
|
|
176
|
-
"version.page.latest.link": "最新ドキュメントを見る",
|
|
177
|
-
"version.page.past.title": "過去のバージョン",
|
|
178
|
-
"version.page.past.description":
|
|
179
|
-
"以前にリリースされたバージョンのドキュメントです。",
|
|
180
|
-
"version.page.unmaintained": "メンテナンス終了",
|
|
181
|
-
"version.page.unreleased": "未リリース",
|
|
182
|
-
"version.page.status": "ステータス",
|
|
183
|
-
"version.page.docs": "ドキュメント",
|
|
184
|
-
},
|
|
185
|
-
de: {
|
|
186
|
-
"nav.gettingStarted": "Erste Schritte",
|
|
187
|
-
"nav.learn": "Lernen",
|
|
188
|
-
"nav.guides": "Anleitungen",
|
|
189
|
-
"nav.components": "Komponenten",
|
|
190
|
-
"nav.reference": "Referenz",
|
|
191
|
-
"nav.claude": "Claude",
|
|
192
|
-
"nav.changelog": "Changelog",
|
|
193
|
-
"nav.develop": "Entwicklung",
|
|
194
|
-
"nav.previous": "Zurück",
|
|
195
|
-
"nav.next": "Weiter",
|
|
196
|
-
"nav.overview": "Überblick",
|
|
197
|
-
"toc.title": "Auf dieser Seite",
|
|
198
|
-
"docs.browseAll": "Alle Dokumentationsabschnitte durchsuchen.",
|
|
199
|
-
"search.label": "Suche",
|
|
200
|
-
"search.placeholder": "Suchbegriff eingeben...",
|
|
201
|
-
"search.shortcutHint": "Suche von überall öffnen",
|
|
202
|
-
"search.resultCount": "{count} Ergebnisse",
|
|
203
|
-
"search.unavailable": "Suche nicht verfügbar",
|
|
204
|
-
"search.loadingIndex": "Suchindex wird geladen…",
|
|
205
|
-
"search.noResults": "Keine Ergebnisse gefunden.",
|
|
206
|
-
"code.copy": "Code kopieren",
|
|
207
|
-
"code.copied": "Kopiert!",
|
|
208
|
-
"code.wrapToggle": "Zeilenumbruch umschalten",
|
|
209
|
-
"nav.backToMenu": "Zurück zum Hauptmenü",
|
|
210
|
-
"doc.editPage": "Diese Seite bearbeiten",
|
|
211
|
-
"doc.viewSource": "Quellcode auf GitHub ansehen",
|
|
212
|
-
"header.github": "GitHub-Repository",
|
|
213
|
-
"doc.tags": "Tags",
|
|
214
|
-
"doc.taggedWith": "Seiten mit Tag",
|
|
215
|
-
"doc.allTags": "Alle Tags",
|
|
216
|
-
"doc.created": "Erstellt",
|
|
217
|
-
"doc.updated": "Aktualisiert",
|
|
218
|
-
"doc.noTags": "Keine Tags gefunden.",
|
|
219
|
-
"doc.pageCount": "{count} Seiten",
|
|
220
|
-
"doc.pageCountSingle": "{count} Seite",
|
|
221
|
-
"doc.fallbackNotice":
|
|
222
|
-
"Diese Seite wurde noch nicht übersetzt und wird in der Originalsprache angezeigt.",
|
|
223
|
-
"frontmatter.preview.title": "Frontmatter",
|
|
224
|
-
"frontmatter.preview.keyCol": "Schlüssel",
|
|
225
|
-
"frontmatter.preview.valueCol": "Wert",
|
|
226
|
-
"version.latest": "Neueste",
|
|
227
|
-
"version.switcher.label": "Version",
|
|
228
|
-
"version.banner.unmaintained":
|
|
229
|
-
"Sie sehen die Dokumentation einer älteren Version.",
|
|
230
|
-
"version.banner.unreleased":
|
|
231
|
-
"Sie sehen unveröffentlichte Dokumentation.",
|
|
232
|
-
"version.banner.latestLink": "Neueste Version anzeigen",
|
|
233
|
-
},
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
/** Get a translated UI string */
|
|
237
|
-
export function t(key: string, locale: Locale | string = defaultLocale): string {
|
|
238
|
-
return translations[locale]?.[key] ?? translations[defaultLocale]?.[key] ?? key;
|
|
239
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// Re-export most types from the shared package — moved to @takazudo/zudo-doc/settings
|
|
2
|
-
// as part of the package-first migration (epic #2321, S4 #2327).
|
|
3
|
-
// HeaderRightTriggerName and HeaderRightTriggerItem are defined locally rather than
|
|
4
|
-
// re-exported from the package because the designTokenPanel feature injects its
|
|
5
|
-
// extra trigger-name variant into HeaderRightTriggerName via the @slot anchor; the
|
|
6
|
-
// package unconditionally includes both trigger names but the base template
|
|
7
|
-
// ships only "ai-chat", and the feature overlay adds the panel trigger variant
|
|
8
|
-
// via the compose engine. HeaderRightTriggerItem references the local
|
|
9
|
-
// HeaderRightTriggerName, so it stays local too.
|
|
10
|
-
export type {
|
|
11
|
-
TagGovernanceMode,
|
|
12
|
-
TagVocabularyEntry,
|
|
13
|
-
HeaderNavChildItem,
|
|
14
|
-
HeaderNavItem,
|
|
15
|
-
HeaderRightComponentName,
|
|
16
|
-
HeaderRightComponentItem,
|
|
17
|
-
HeaderRightLinkItem,
|
|
18
|
-
HeaderRightHtmlItem,
|
|
19
|
-
HeaderRightItem,
|
|
20
|
-
BodyFootUtilAreaConfig,
|
|
21
|
-
ColorModeConfig,
|
|
22
|
-
LocaleConfig,
|
|
23
|
-
FooterLinkItem,
|
|
24
|
-
FooterLinkColumn,
|
|
25
|
-
FooterTaglistLocaleConfig,
|
|
26
|
-
FooterTaglistConfig,
|
|
27
|
-
FooterConfig,
|
|
28
|
-
HtmlPreviewConfig,
|
|
29
|
-
FrontmatterPreviewConfig,
|
|
30
|
-
TagPlacement,
|
|
31
|
-
VersionConfig,
|
|
32
|
-
ChangelogConfig,
|
|
33
|
-
MetaTagsConfig,
|
|
34
|
-
SiteHeadConfig,
|
|
35
|
-
Settings,
|
|
36
|
-
} from "@takazudo/zudo-doc/settings";
|
|
37
|
-
|
|
38
|
-
// @slot:settings-types:trigger-names:start
|
|
39
|
-
export type HeaderRightTriggerName = "ai-chat";
|
|
40
|
-
// @slot:settings-types:trigger-names:end
|
|
41
|
-
|
|
42
|
-
export interface HeaderRightTriggerItem {
|
|
43
|
-
type: "trigger";
|
|
44
|
-
trigger: HeaderRightTriggerName;
|
|
45
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sidebar configuration file.
|
|
3
|
-
*
|
|
4
|
-
* Items can be:
|
|
5
|
-
* - "autogenerated" — auto-scan a directory (default behavior)
|
|
6
|
-
* - doc references with optional overrides
|
|
7
|
-
* - external links
|
|
8
|
-
* - category groupings
|
|
9
|
-
*
|
|
10
|
-
* If this file exports an empty object or the key for a section is not found,
|
|
11
|
-
* the sidebar falls back to filesystem-based auto-generation.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
export interface SidebarLink {
|
|
15
|
-
type: "link";
|
|
16
|
-
label: string;
|
|
17
|
-
href: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface SidebarDoc {
|
|
21
|
-
type: "doc";
|
|
22
|
-
id: string; // doc slug, e.g. "getting-started/introduction"
|
|
23
|
-
label?: string; // override the doc's title in sidebar
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface SidebarCategory {
|
|
27
|
-
type: "category";
|
|
28
|
-
label: string;
|
|
29
|
-
items: SidebarItem[];
|
|
30
|
-
collapsed?: boolean;
|
|
31
|
-
sortOrder?: "asc" | "desc";
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface SidebarAutogenerated {
|
|
35
|
-
type: "autogenerated";
|
|
36
|
-
dirName?: string; // subdirectory to scan (optional)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type SidebarItem =
|
|
40
|
-
| SidebarDoc
|
|
41
|
-
| SidebarLink
|
|
42
|
-
| SidebarCategory
|
|
43
|
-
| SidebarAutogenerated
|
|
44
|
-
| string;
|
|
45
|
-
|
|
46
|
-
// String shorthand: "getting-started/introduction" is equivalent to
|
|
47
|
-
// { type: "doc", id: "getting-started/introduction" }
|
|
48
|
-
|
|
49
|
-
export interface SidebarsConfig {
|
|
50
|
-
[sectionKey: string]: SidebarItem[] | undefined;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Sidebar configuration.
|
|
55
|
-
* Keys correspond to headerNav categoryMatch values.
|
|
56
|
-
* If a section has no config here, it uses auto-generated filesystem sidebar.
|
|
57
|
-
*/
|
|
58
|
-
const sidebars: SidebarsConfig = {
|
|
59
|
-
// Example:
|
|
60
|
-
// "!": [
|
|
61
|
-
// { type: "autogenerated" },
|
|
62
|
-
// { type: "link", label: "GitHub", href: "https://github.com/..." },
|
|
63
|
-
// ],
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export default sidebars;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// Re-export from the shared package — canonical definitions live in
|
|
2
|
-
// @takazudo/zudo-doc/settings (epic #2321). Consumers that import from
|
|
3
|
-
// this local path continue to work unchanged.
|
|
4
|
-
export type { TagGovernanceMode, TagVocabularyEntry } from "@takazudo/zudo-doc/settings";
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { TagVocabularyEntry } from "./tag-vocabulary-types";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Canonical tag vocabulary for this documentation base.
|
|
5
|
-
*
|
|
6
|
-
* Populate this array with the tags you use in `src/content/docs/**`.
|
|
7
|
-
* Then enable `tagGovernance: "warn"` (or `"strict"`) and
|
|
8
|
-
* `tagVocabulary: true` in `settings.ts` to activate alias resolution,
|
|
9
|
-
* deprecation filtering, and grouped tag rendering.
|
|
10
|
-
*
|
|
11
|
-
* Example entry:
|
|
12
|
-
*
|
|
13
|
-
* {
|
|
14
|
-
* id: "type:guide",
|
|
15
|
-
* label: "Guide",
|
|
16
|
-
* group: "type",
|
|
17
|
-
* aliases: ["guide", "guides"],
|
|
18
|
-
* }
|
|
19
|
-
*/
|
|
20
|
-
export const tagVocabulary: readonly TagVocabularyEntry[] = [];
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
// z-index design tokens — single source of truth.
|
|
2
|
-
//
|
|
3
|
-
// This file is the ONE place z-index tiers are defined. The CSS `@theme` block
|
|
4
|
-
// in `src/styles/global.css` is GENERATED from this list by the
|
|
5
|
-
// `gen-z-index` bin from `@takazudo/zudo-doc` (run `pnpm gen:z-index`); never
|
|
6
|
-
// hand-edit the generated block. `pnpm check:z-index` re-runs the generator
|
|
7
|
-
// into a buffer and fails on drift, so the committed CSS can never silently
|
|
8
|
-
// diverge from this list.
|
|
9
|
-
//
|
|
10
|
-
// Strategy (from zudolab/zudo-css-wisdom z-index-strategy): semantic single-
|
|
11
|
-
// namespace tokens — names describe ROLES, never magnitudes. One flat ordered
|
|
12
|
-
// list. Values are deliberately gapped but otherwise arbitrary: renaming and
|
|
13
|
-
// reordering is cheap, which is the whole point. Tailwind v4 reads the
|
|
14
|
-
// `--z-index-<name>` theme key and generates a `z-<name>` utility, so e.g.
|
|
15
|
-
// `@theme { --z-index-toolbar: 20 }` produces `.z-toolbar { z-index: 20 }`.
|
|
16
|
-
//
|
|
17
|
-
// `kind` distinguishes:
|
|
18
|
-
// - "global": a tier on the single global stacking scale (overlay chrome etc.)
|
|
19
|
-
// - "local": anonymous reusable helpers for promoting a child WITHIN a parent
|
|
20
|
-
// stacking context (`isolation: isolate` / `position: relative`),
|
|
21
|
-
// not a position on the global scale.
|
|
22
|
-
//
|
|
23
|
-
// Rationale for the two zudo-doc-specific additions (NOT in the generic
|
|
24
|
-
// overlay-centric strategy scale):
|
|
25
|
-
// - `sidebar` — persistent layout chrome (desktop sidebar, TOC, sidebar-toggle
|
|
26
|
-
// handle, resizer handle). The strategy's scale has no persistent-sidebar/TOC
|
|
27
|
-
// tier. `toolbar` (the sticky header) is deliberately placed ABOVE `sidebar`
|
|
28
|
-
// to preserve the existing header-wins ordering; they do not overlap
|
|
29
|
-
// spatially, but the historical relationship is kept explicit.
|
|
30
|
-
// - `drag` — transient drag affordance (sidebar-resizer ghost line). Replaces
|
|
31
|
-
// the old `z-9999` anti-pattern with a named top-of-steady-UI tier.
|
|
32
|
-
//
|
|
33
|
-
// `popover`, `toast`, and `tooltip` are reserved canonical tiers from the
|
|
34
|
-
// strategy's scale — kept for completeness (and so downstream `create-zudo-doc`
|
|
35
|
-
// users inherit the full scale) even though zudo-doc does not use them yet.
|
|
36
|
-
|
|
37
|
-
export type ZIndexKind = "global" | "local";
|
|
38
|
-
|
|
39
|
-
export interface ZIndexTier {
|
|
40
|
-
name: string;
|
|
41
|
-
value: number;
|
|
42
|
-
purpose: string;
|
|
43
|
-
kind: ZIndexKind;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export const Z_INDEX_TIERS: ZIndexTier[] = [
|
|
47
|
-
{
|
|
48
|
-
name: "content",
|
|
49
|
-
value: 0,
|
|
50
|
-
purpose: "default in-flow content (implicit baseline)",
|
|
51
|
-
kind: "global",
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
name: "local-1",
|
|
55
|
-
value: 1,
|
|
56
|
-
purpose: "child promotion inside an isolated parent stacking context",
|
|
57
|
-
kind: "local",
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
name: "local-2",
|
|
61
|
-
value: 2,
|
|
62
|
-
purpose: "child promotion inside an isolated parent stacking context",
|
|
63
|
-
kind: "local",
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: "local-3",
|
|
67
|
-
value: 3,
|
|
68
|
-
purpose: "child promotion inside an isolated parent stacking context",
|
|
69
|
-
kind: "local",
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
name: "sidebar",
|
|
73
|
-
value: 10,
|
|
74
|
-
purpose:
|
|
75
|
-
"persistent layout chrome: desktop sidebar, TOC, sidebar-toggle handle, resizer handle",
|
|
76
|
-
kind: "global",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
name: "toolbar",
|
|
80
|
-
value: 20,
|
|
81
|
-
purpose: "sticky top header (sits above sidebar chrome)",
|
|
82
|
-
kind: "global",
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: "dropdown",
|
|
86
|
-
value: 30,
|
|
87
|
-
purpose: "header menus, version/language switchers",
|
|
88
|
-
kind: "global",
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name: "popover",
|
|
92
|
-
value: 40,
|
|
93
|
-
purpose: "reserved — inline popovers (canonical scale; not yet used)",
|
|
94
|
-
kind: "global",
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
name: "modal-backdrop",
|
|
98
|
-
value: 50,
|
|
99
|
-
purpose: "mobile drawer backdrop, <dialog> ::backdrop",
|
|
100
|
-
kind: "global",
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
name: "modal",
|
|
104
|
-
value: 60,
|
|
105
|
-
purpose: "mobile sidebar drawer panel, search <dialog>",
|
|
106
|
-
kind: "global",
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
name: "toast",
|
|
110
|
-
value: 70,
|
|
111
|
-
purpose: "reserved — transient notifications (canonical scale; not yet used)",
|
|
112
|
-
kind: "global",
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
name: "tooltip",
|
|
116
|
-
value: 80,
|
|
117
|
-
purpose:
|
|
118
|
-
"reserved — highest steady UI layer, below only the transient drag tier (canonical scale; not yet used)",
|
|
119
|
-
kind: "global",
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
name: "drag",
|
|
123
|
-
value: 90,
|
|
124
|
-
purpose:
|
|
125
|
-
"transient drag affordance: sidebar-resizer ghost line (replaces the z-9999 anti-pattern)",
|
|
126
|
-
kind: "global",
|
|
127
|
-
},
|
|
128
|
-
];
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { DocsData } from "@/config/docs-schema";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Concrete entry type for docs collections.
|
|
5
|
-
*
|
|
6
|
-
* Mirrors the public surface that pages consume from `getCollection(...)`.
|
|
7
|
-
* Originally this was structurally identical to Astro's `CollectionEntry`
|
|
8
|
-
* but is defined locally now that the project runs on the zfb content
|
|
9
|
-
* engine — collection-name-specific generics are not exposed by zfb, so
|
|
10
|
-
* pages cast collection entries to this shape via `pages/_data.ts`.
|
|
11
|
-
*
|
|
12
|
-
* `data` is typed as `DocsData` — the `z.infer`-derived type from
|
|
13
|
-
* `src/config/docs-schema.ts` — so the field set is maintained in one place.
|
|
14
|
-
*/
|
|
15
|
-
// Structural shape of zfb's optional rendered-content payload for a doc
|
|
16
|
-
// entry (kept loose to stay engine-agnostic — pages do not rely on the
|
|
17
|
-
// exact field set today).
|
|
18
|
-
type RenderedContent = unknown;
|
|
19
|
-
export interface DocsEntry {
|
|
20
|
-
id: string;
|
|
21
|
-
/** zfb content engine slug (filename without `.md`/`.mdx`; used by toRouteSlug). */
|
|
22
|
-
slug: string;
|
|
23
|
-
body?: string;
|
|
24
|
-
collection: string;
|
|
25
|
-
data: DocsData;
|
|
26
|
-
rendered?: RenderedContent;
|
|
27
|
-
filePath?: string;
|
|
28
|
-
}
|