create-zudo-doc 0.2.3 → 0.2.4
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/scaffold.js
CHANGED
|
@@ -273,20 +273,26 @@ function generatePackageJson(choices) {
|
|
|
273
273
|
// npm-dist `"use client"` island scanning, link-resolution fixes for
|
|
274
274
|
// directory-style hrefs, and island-registry hardening (warns on island
|
|
275
275
|
// marker-name collisions).
|
|
276
|
-
// next.40
|
|
276
|
+
// next.40 flips `zfb dev` to lazy rendering by default —
|
|
277
277
|
// pages render on first request instead of on every file-change tick
|
|
278
278
|
// (Takazudo/zudo-front-builder#1029); `ZFB_DEV_EAGER=1` restores eager
|
|
279
279
|
// mode. Dev-server-only change, no build/config migration needed.
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
// next.41 (current pin) adds a URL-space fallback in resolve_links —
|
|
281
|
+
// dir-style hrefs written from non-index pages now resolve against the
|
|
282
|
+
// page's URL directory when the file-space lookup misses
|
|
283
|
+
// (Takazudo/zudo-front-builder#1030) — and the data-file skip warning
|
|
284
|
+
// (e.g. for `_category_.json`) now respects the collection's
|
|
285
|
+
// include/exclude globs (#1032). No consumer-facing breaking change.
|
|
286
|
+
"@takazudo/zfb": "0.1.0-next.41",
|
|
287
|
+
"@takazudo/zfb-runtime": "0.1.0-next.41",
|
|
282
288
|
// zfb-adapter-cloudflare — required for any route with `prerender = false`.
|
|
283
289
|
// Pinned in lockstep with @takazudo/zfb.
|
|
284
|
-
"@takazudo/zfb-adapter-cloudflare": "0.1.0-next.
|
|
290
|
+
"@takazudo/zfb-adapter-cloudflare": "0.1.0-next.41",
|
|
285
291
|
// @takazudo/zudo-doc — published from this monorepo via
|
|
286
292
|
// .github/workflows/publish-zudo-doc.yml. The pin here is bumped in
|
|
287
293
|
// lockstep by scripts/release-create-zudo-doc.sh whenever zudo-doc's
|
|
288
294
|
// version moves, so a fresh scaffold pulls the version we just published.
|
|
289
|
-
"@takazudo/zudo-doc": "^0.2.
|
|
295
|
+
"@takazudo/zudo-doc": "^0.2.4",
|
|
290
296
|
// zod — used by the generated zfb.config.ts. zfb-config-gen emits
|
|
291
297
|
// `import { z } from "zod"` for the content-collection schema +
|
|
292
298
|
// `z.toJSONSchema(...)` conversion. Without this dep, the consumer
|
|
@@ -340,7 +346,7 @@ function generatePackageJson(choices) {
|
|
|
340
346
|
// @takazudo/zudo-doc/integrations/doc-history which in turn imports
|
|
341
347
|
// @takazudo/zudo-doc-history-server/git-history. Without this dep the
|
|
342
348
|
// plugin host fails at init with ERR_MODULE_NOT_FOUND — W8A (#1739).
|
|
343
|
-
deps["@takazudo/zudo-doc-history-server"] = "^0.2.
|
|
349
|
+
deps["@takazudo/zudo-doc-history-server"] = "^0.2.4";
|
|
344
350
|
// W7A (#1736): doc-history-plugin.mjs spawns `tsx -e <inline-script>` to
|
|
345
351
|
// run the v2 runtime in a TS-aware Node subprocess; without tsx the
|
|
346
352
|
// plugin's preBuild step exits with ENOENT before zfb finishes config
|
package/package.json
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
1
1
|
// TOC section-label resolver for the Toc/MobileToc overrides mounted by
|
|
2
|
-
// `_doc-page-shell.tsx
|
|
3
|
-
|
|
4
|
-
// published version this scaffold installs (<= 0.2.2) does not yet export it,
|
|
5
|
-
// so the tiny lang→title map is duplicated here. After bumping the
|
|
6
|
-
// @takazudo/zudo-doc dependency past 0.2.2 you can replace this whole file
|
|
7
|
-
// with: export { getTocTitle } from "@takazudo/zudo-doc/toc";
|
|
8
|
-
const TOC_TITLES: Record<string, string> = {
|
|
9
|
-
en: "On this page",
|
|
10
|
-
ja: "目次",
|
|
11
|
-
de: "Auf dieser Seite",
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const DEFAULT_TOC_TITLE = "On this page";
|
|
15
|
-
|
|
16
|
-
/** Return the TOC section label for the given BCP-47 language tag. */
|
|
17
|
-
export function getTocTitle(lang?: string): string {
|
|
18
|
-
if (!lang) return DEFAULT_TOC_TITLE;
|
|
19
|
-
// "en-US" → try "en" first, then "en-US", then the English default.
|
|
20
|
-
const primary = lang.split("-")[0]!;
|
|
21
|
-
return TOC_TITLES[primary] ?? TOC_TITLES[lang] ?? DEFAULT_TOC_TITLE;
|
|
22
|
-
}
|
|
2
|
+
// `_doc-page-shell.tsx`, re-exported from the @takazudo/zudo-doc package.
|
|
3
|
+
export { getTocTitle } from "@takazudo/zudo-doc/toc";
|
|
@@ -610,7 +610,12 @@ export function DocHistory({ slug, locale, basePath = "/" }: DocHistoryProps) {
|
|
|
610
610
|
{/* Right: diff viewer (on mobile, replaces the sidebar) */}
|
|
611
611
|
{hasDiff && (
|
|
612
612
|
<div className="flex-1 min-w-0 h-full">
|
|
613
|
+
{/* Key on the compared pair forces a fresh mount whenever the
|
|
614
|
+
selection changes, so the previous pair's diff rows can
|
|
615
|
+
never render under the new header hashes while the lazy
|
|
616
|
+
import("diff") recompute is in flight (#2068). */}
|
|
613
617
|
<DiffViewer
|
|
618
|
+
key={`${diffSelection.older.hash}:${diffSelection.newer.hash}`}
|
|
614
619
|
selection={diffSelection}
|
|
615
620
|
onBack={handleBackToRevisions}
|
|
616
621
|
showBackButton={true}
|