create-zudo-doc 0.2.21 → 0.2.22
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/features/image-enlarge.d.ts +10 -2
- package/dist/features/image-enlarge.js +10 -2
- package/dist/scaffold.js +20 -22
- package/dist/zfb-config-gen.d.ts +16 -10
- package/dist/zfb-config-gen.js +34 -239
- package/package.json +1 -1
- package/templates/base/pages/lib/_body-end-islands.tsx +6 -13
- package/templates/base/pages/lib/_category-nav.tsx +30 -115
- package/templates/base/pages/lib/_category-tree-nav.tsx +38 -65
- package/templates/base/pages/lib/_compose-meta-title.ts +2 -6
- package/templates/base/pages/lib/_doc-body-end.tsx +3 -35
- package/templates/base/pages/lib/_doc-content-header.tsx +10 -111
- package/templates/base/pages/lib/_doc-history-area.tsx +19 -211
- package/templates/base/pages/lib/_doc-metainfo-area.tsx +10 -113
- package/templates/base/pages/lib/_doc-page-renderer.tsx +22 -183
- package/templates/base/pages/lib/_doc-page-shell.tsx +17 -251
- package/templates/base/pages/lib/_doc-pager.tsx +4 -74
- package/templates/base/pages/lib/_doc-route-entries.ts +43 -177
- package/templates/base/pages/lib/_doc-route-paths.ts +16 -101
- package/templates/base/pages/lib/_doc-tags-area.tsx +14 -77
- package/templates/base/pages/lib/_footer-with-defaults.tsx +37 -225
- package/templates/base/pages/lib/_frontmatter-preview-data.ts +5 -31
- package/templates/base/pages/lib/_head-with-defaults.tsx +13 -138
- package/templates/base/pages/lib/_header-with-defaults.tsx +24 -324
- package/templates/base/pages/lib/_inline-version-switcher.tsx +16 -78
- package/templates/base/pages/lib/_nav-data-prep.ts +32 -51
- package/templates/base/pages/lib/_nav-source-cache.ts +12 -57
- package/templates/base/pages/lib/_nav-source-docs.ts +33 -233
- package/templates/base/pages/lib/_search-widget-script.ts +2 -470
- package/templates/base/pages/lib/_search-widget.tsx +9 -195
- package/templates/base/pages/lib/_sidebar-prepaint.tsx +6 -59
- package/templates/base/pages/lib/_sidebar-with-defaults.tsx +16 -118
- package/templates/base/pages/lib/_site-tree-nav.tsx +29 -80
- package/templates/base/pages/lib/doc-page-props.ts +26 -44
- package/templates/base/pages/lib/locale-merge.ts +32 -145
- package/templates/base/pages/lib/route-enumerators.ts +52 -286
- package/templates/base/pages/robots.txt.tsx +2 -26
- package/templates/base/src/components/ai-chat-modal.tsx +9 -8
- package/templates/base/src/components/doc-history.tsx +9 -8
- package/templates/base/src/components/image-enlarge.tsx +11 -8
- package/templates/base/src/components/sidebar-toggle.tsx +6 -170
- package/templates/base/src/components/sidebar-tree.tsx +6 -548
- package/templates/base/src/components/site-tree-nav.tsx +6 -220
- package/templates/base/src/config/color-scheme-utils.ts +34 -158
- package/templates/base/src/config/i18n.ts +9 -0
- package/templates/base/src/config/z-index-tokens.ts +5 -4
- package/templates/base/src/styles/global.css +5 -579
- package/templates/base/src/utils/base.ts +1 -1
- package/templates/base/src/utils/docs.ts +47 -16
- package/templates/base/src/utils/github.ts +12 -9
- package/templates/base/src/utils/nav-scope.ts +13 -42
- package/templates/base/src/utils/sidebar.ts +18 -86
- package/templates/base/src/utils/slug.ts +10 -53
- package/templates/base/src/utils/smart-break.tsx +12 -120
- package/templates/base/src/utils/tags.ts +25 -68
- package/templates/features/bodyFootUtil/files/src/utils/github.ts +12 -9
- package/templates/features/designTokenPanel/files/src/lib/design-token-panel-bootstrap.ts +13 -39
- package/templates/features/docHistory/files/src/components/doc-history.tsx +8 -636
- package/templates/features/docHistory/files/src/types/doc-history.ts +7 -23
- package/templates/features/docTags/files/pages/lib/_tag-pages.tsx +35 -201
- package/templates/features/imageEnlarge/files/src/components/image-enlarge.tsx +8 -269
- package/templates/features/sidebarToggle/files/src/components/desktop-sidebar-toggle.tsx +6 -99
- package/templates/features/tagGovernance/files/scripts/tags-audit.ts +67 -515
- package/templates/features/versioning/files/pages/lib/_versions-page.tsx +21 -73
- package/templates/base/plugins/connect-adapter.mjs +0 -169
- package/templates/base/plugins/search-index-plugin.mjs +0 -66
- package/templates/base/scripts/gen-z-index.mjs +0 -157
- package/templates/base/src/components/mermaid-enlarge.tsx +0 -490
- package/templates/features/claudeResources/files/plugins/claude-resources-plugin.mjs +0 -47
- package/templates/features/docHistory/files/plugins/doc-history-plugin.mjs +0 -111
- package/templates/features/llmsTxt/files/plugins/llms-txt-plugin.mjs +0 -93
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
// Host thin-stub — see @takazudo/zudo-doc/github-helpers (epic #2344, S7).
|
|
2
|
+
//
|
|
3
|
+
// `buildGitHubRepoUrl` and `buildGitHubSourceUrl` are now parameterized pure
|
|
4
|
+
// functions in the package; this module wraps them with the host's
|
|
5
|
+
// `settings.githubUrl` singleton.
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
import { settings } from "@/config/settings";
|
|
8
|
+
import {
|
|
9
|
+
buildGitHubRepoUrl as _buildGitHubRepoUrl,
|
|
10
|
+
buildGitHubSourceUrl as _buildGitHubSourceUrl,
|
|
11
|
+
} from "@takazudo/zudo-doc/github-helpers";
|
|
6
12
|
|
|
7
13
|
export function buildGitHubRepoUrl(): string | null {
|
|
8
|
-
|
|
9
|
-
return trimTrailingSlash(settings.githubUrl as string);
|
|
14
|
+
return _buildGitHubRepoUrl(settings.githubUrl);
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
export function buildGitHubSourceUrl(
|
|
13
18
|
contentDir: string,
|
|
14
19
|
entryId: string,
|
|
15
20
|
): string | null {
|
|
16
|
-
|
|
17
|
-
if (!repoUrl) return null;
|
|
18
|
-
return `${repoUrl}/blob/HEAD/${contentDir}/${entryId}`;
|
|
21
|
+
return _buildGitHubSourceUrl(settings.githubUrl, contentDir, entryId);
|
|
19
22
|
}
|
|
@@ -3,47 +3,21 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Imported as a side-effect from the body-end islands helper when
|
|
5
5
|
* settings.designTokenPanel is truthy. The dynamic import is gated there so
|
|
6
|
-
* this module is only bundled
|
|
7
|
-
* when the feature is enabled.
|
|
6
|
+
* this module is only bundled when the feature is enabled.
|
|
8
7
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* The wiring MECHANISM (configurePanel + setLifecycleAdapter) now lives in the
|
|
9
|
+
* package at `@takazudo/zudo-doc/design-token-panel-bootstrap`. This file
|
|
10
|
+
* passes the project's PanelConfig DATA to that mechanism.
|
|
11
|
+
*
|
|
12
|
+
* S9a package-first migration — zudolab/zudo-doc#2333.
|
|
13
|
+
*
|
|
14
|
+
* CSS is pulled via `@import "@takazudo/zdtp/styles.css"` in
|
|
15
|
+
* src/styles/global.css so the panel chrome lands in the main page CSS bundle
|
|
16
|
+
* (not a deferred chunk). Vite library mode strips the source CSS import from
|
|
17
|
+
* the emitted JS, so the explicit CSS-side import is the required pull point.
|
|
13
18
|
*/
|
|
14
19
|
|
|
15
|
-
import {
|
|
16
|
-
// CSS is pulled via `@import "@takazudo/zdtp/styles.css"` in
|
|
17
|
-
// src/styles/global.css so the panel chrome lands in the main page CSS bundle
|
|
18
|
-
// (not a deferred chunk). Vite library mode strips the source CSS import from
|
|
19
|
-
// the emitted JS, so the explicit CSS-side import is the required pull point.
|
|
20
|
+
import { bootstrapDesignTokenPanel } from "@takazudo/zudo-doc/design-token-panel-bootstrap";
|
|
20
21
|
import { designTokenPanelConfig } from "@/config/design-token-panel-config";
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// Drain the pre-hydration click queue. If the user clicked the palette button
|
|
25
|
-
// before this module evaluated, a pre-hydration shim captured the event as a
|
|
26
|
-
// single boolean flag. Calling __zdtpReadyClicks() here removes the shim
|
|
27
|
-
// listener and re-dispatches once (at most) so the now-registered zdtp
|
|
28
|
-
// listener picks it up and mounts the panel.
|
|
29
|
-
if (typeof window !== "undefined") {
|
|
30
|
-
(window as { __zdtpReadyClicks?: () => void }).__zdtpReadyClicks?.();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// zfb fires "zfb:before-preparation" (before nav) and "zfb:after-swap" (after nav).
|
|
34
|
-
// Adjust these event names if your zfb version uses different names.
|
|
35
|
-
if (typeof document !== "undefined") {
|
|
36
|
-
const adapter: LifecycleAdapter = {
|
|
37
|
-
onBeforeSwap(cb) {
|
|
38
|
-
const handler = () => cb();
|
|
39
|
-
document.addEventListener("zfb:before-preparation", handler);
|
|
40
|
-
return () => document.removeEventListener("zfb:before-preparation", handler);
|
|
41
|
-
},
|
|
42
|
-
onPageLoad(cb) {
|
|
43
|
-
const handler = () => cb();
|
|
44
|
-
document.addEventListener("zfb:after-swap", handler);
|
|
45
|
-
return () => document.removeEventListener("zfb:after-swap", handler);
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
setLifecycleAdapter(adapter);
|
|
49
|
-
}
|
|
23
|
+
bootstrapDesignTokenPanel(designTokenPanelConfig);
|