@takazudo/zudo-doc 7.0.0 → 7.1.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/CHANGELOG.md +10 -0
- package/README.md +1 -1
- package/dist/compiled.css +4 -0
- package/dist/content.css +6 -0
- package/dist/plugins/optional-peers.d.ts +3 -0
- package/dist/plugins/optional-peers.js +34 -0
- package/dist/preset.d.ts +2 -0
- package/dist/preset.js +14 -1
- package/package.json +12 -8
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,16 @@ The format is based on Keep a Changelog, and release notes are generated from th
|
|
|
8
8
|
|
|
9
9
|
No unreleased changes.
|
|
10
10
|
|
|
11
|
+
## [7.1.0] - 2026-10-23
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- Inline code inside table cells no longer breaks mid-word. The narrow-width `overflow-wrap: anywhere` from 7.0.0 collapsed the min-content width of table columns, so short identifiers such as `slug` were split instead of the table wrapper scrolling. Code in `th` / `td` goes back to `overflow-wrap: break-word`. (9d36a247, a30cdd85)
|
|
16
|
+
|
|
17
|
+
### Other Changes
|
|
18
|
+
|
|
19
|
+
- Requires the published zfb 4.7.0 family: the `@takazudo/zfb`, `zfb-runtime` and `zfb-md-wasm` peer floors move from `^4.5.2` to `^4.7.0`. This picks up the 4.5.3 MDX compile fixes: multiline expressions such as HtmlPreview template-literal props keep their authored whitespace, and a template string that contains a decimal comparison no longer fails to compile with `Unexpected numeric literal`. It also picks up the 4.5.4 islands fix: edits outside the browser graph, such as a page title or a Markdown body, no longer change the shipped islands JavaScript. 4.6.0 adds the RUSTSEC-2026-0381 and RUSTSEC-2026-0382 fixes in the CLI's HTTPS client, stages only the pnpm store packages a page can actually reach into the build shadow, and fixes two Windows path bugs in the SSR shadow and plugin virtual modules. 4.7.0 makes Rolldown the page/SSR and island bundler in place of esbuild, so shipped island asset hashes change on the first build after upgrading (set `ZFB_BUNDLER=esbuild` to go back); it also applies a project's tsconfig JSX options to TSX shipped inside packages (zfb#4407), and fixes Windows island builds that import a `?url` resource such as `@takazudo/zfb-md-wasm/highlight` (zfb#4413). Under Rolldown the optional `katex` and `diff` peers stay optional: a new `optional-peers` plugin shadows a peer that is not installed, or whose `math` / `docHistory` feature is off, so the project still builds and an enabled feature shows its usual "install the peer" message (workaround for zfb#4429). Upgrade the zfb family (and `zfb-adapter-cloudflare` when used) together. (f118e4e0, 2b222e31, 957c252d, 81fcc982, 39f1e8a8, 2e6676db)
|
|
20
|
+
|
|
11
21
|
## [7.0.0] - 2026-10-15
|
|
12
22
|
|
|
13
23
|
### Breaking Changes
|
package/README.md
CHANGED
|
@@ -109,7 +109,7 @@ If your project renders **semi-trusted or user-submitted** HTML in a preview, ov
|
|
|
109
109
|
|
|
110
110
|
**6.0.0** is the coordinated major release of `@takazudo/zudo-doc`,
|
|
111
111
|
`@takazudo/zudo-doc-history-server` and `create-zudo-doc`. The current workspace
|
|
112
|
-
targets the published **zfb 4.
|
|
112
|
+
targets the published **zfb 4.7.0** family (peer floor **^4.7.0**).
|
|
113
113
|
[Upstream #4097](https://github.com/Takazudo/zudo-front-builder/issues/4097) is
|
|
114
114
|
resolved; its strict published 4.3.1 consumer control passed 3/3 with no skips or
|
|
115
115
|
retries in the [source-bound verification](../../docs/findings/zfb-4.3.1/verification.md).
|
package/dist/compiled.css
CHANGED
package/dist/content.css
CHANGED
|
@@ -236,6 +236,12 @@
|
|
|
236
236
|
overflow-wrap: break-word;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
+
/* `anywhere` collapses min-content width, so table layout would shrink columns
|
|
240
|
+
* and split identifiers mid-word instead of scrolling the wrapper (#4594). */
|
|
241
|
+
.zd-content :where(th code, td code) {
|
|
242
|
+
overflow-wrap: break-word;
|
|
243
|
+
}
|
|
244
|
+
|
|
239
245
|
.zd-content :where(th) {
|
|
240
246
|
font-weight: var(--font-weight-semibold);
|
|
241
247
|
text-align: left;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
function shadowSource(specifier) {
|
|
3
|
+
const message = `Optional peer "${specifier}" is shadowed: it is not installed or the zudo-doc feature that uses it is off.`;
|
|
4
|
+
return `throw new Error(${JSON.stringify(message)});
|
|
5
|
+
export {};
|
|
6
|
+
`;
|
|
7
|
+
}
|
|
8
|
+
function stringList(value) {
|
|
9
|
+
return Array.isArray(value) ? value.filter((v) => typeof v === "string") : [];
|
|
10
|
+
}
|
|
11
|
+
function isResolvable(specifier) {
|
|
12
|
+
try {
|
|
13
|
+
createRequire(import.meta.url).resolve(specifier);
|
|
14
|
+
return true;
|
|
15
|
+
} catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const plugin = {
|
|
20
|
+
name: "optional-peers",
|
|
21
|
+
setup(ctx) {
|
|
22
|
+
const shadow = [
|
|
23
|
+
...stringList(ctx.options["shadow"]),
|
|
24
|
+
...stringList(ctx.options["shadowIfMissing"]).filter((s) => !isResolvable(s))
|
|
25
|
+
];
|
|
26
|
+
for (const specifier of shadow) {
|
|
27
|
+
ctx.addVirtualModule(specifier, () => shadowSource(specifier));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var optional_peers_default = plugin;
|
|
32
|
+
export {
|
|
33
|
+
optional_peers_default as default
|
|
34
|
+
};
|
package/dist/preset.d.ts
CHANGED
|
@@ -115,6 +115,8 @@ export interface PresetSettings {
|
|
|
115
115
|
trailingSlash: boolean;
|
|
116
116
|
minifyHtml?: boolean;
|
|
117
117
|
mermaid: boolean;
|
|
118
|
+
/** KaTeX math rendering; when off, the optional `katex` peer is shadowed. */
|
|
119
|
+
math?: boolean;
|
|
118
120
|
/** Enable transclusion of other Markdown/MDX files. */
|
|
119
121
|
transclude?: boolean;
|
|
120
122
|
onBrokenMarkdownLinks: "warn" | "error" | "ignore";
|
package/dist/preset.js
CHANGED
|
@@ -130,6 +130,16 @@ function buildMarkdownFeatures(settings, directiveVocabulary) {
|
|
|
130
130
|
headingIds: { strategy: "hierarchical" }
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
+
function optionalPeerShadows(settings) {
|
|
134
|
+
const peers = [
|
|
135
|
+
["katex", Boolean(settings.math)],
|
|
136
|
+
["diff", Boolean(settings.docHistory)]
|
|
137
|
+
];
|
|
138
|
+
return {
|
|
139
|
+
shadow: peers.filter(([, on]) => !on).map(([name]) => name),
|
|
140
|
+
shadowIfMissing: peers.filter(([, on]) => on).map(([name]) => name)
|
|
141
|
+
};
|
|
142
|
+
}
|
|
133
143
|
function buildPlugins(settings, routeContext) {
|
|
134
144
|
const localeArray = Object.entries(settings.locales).map(([code, locale]) => ({
|
|
135
145
|
code,
|
|
@@ -337,7 +347,10 @@ function buildPlugins(settings, routeContext) {
|
|
|
337
347
|
// `design-token-panel-bootstrap` (#4261). Preset-level rather than inside
|
|
338
348
|
// the routes plugin because the bootstrap is reachable from chrome even
|
|
339
349
|
// when packageOwnedRoutes is off.
|
|
340
|
-
...resolvesBundleZdtp(settings) ? [] : [{ name: "@takazudo/zudo-doc/plugins/zdtp-loader", options: {} }]
|
|
350
|
+
...resolvesBundleZdtp(settings) ? [] : [{ name: "@takazudo/zudo-doc/plugins/zdtp-loader", options: {} }],
|
|
351
|
+
// Absent or disabled katex/diff → throwing shadows, so they cannot fail a
|
|
352
|
+
// Rolldown build (Takazudo/zudo-front-builder#4429).
|
|
353
|
+
{ name: "@takazudo/zudo-doc/plugins/optional-peers", options: optionalPeerShadows(settings) }
|
|
341
354
|
];
|
|
342
355
|
}
|
|
343
356
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takazudo/zudo-doc",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "zudo-doc framework primitives layer that sits on top of zfb's engine — sidebar, theme, TOC, breadcrumb, layouts, head injection, View Transitions, SSR-skip wrappers (per ADR-003).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -206,6 +206,10 @@
|
|
|
206
206
|
"types": "./dist/plugins/zdtp-loader.d.ts",
|
|
207
207
|
"default": "./dist/plugins/zdtp-loader.js"
|
|
208
208
|
},
|
|
209
|
+
"./plugins/optional-peers": {
|
|
210
|
+
"types": "./dist/plugins/optional-peers.d.ts",
|
|
211
|
+
"default": "./dist/plugins/optional-peers.js"
|
|
212
|
+
},
|
|
209
213
|
"./content-admonition": {
|
|
210
214
|
"types": "./dist/content-admonition/index.d.ts",
|
|
211
215
|
"default": "./dist/content-admonition/index.js"
|
|
@@ -736,9 +740,9 @@
|
|
|
736
740
|
"peerDependencies": {
|
|
737
741
|
"@modelcontextprotocol/sdk": "1.32.1",
|
|
738
742
|
"@takazudo/zdtp": "^0.5.2 || ^0.6.0 || ^0.7.0 || ^0.8.0",
|
|
739
|
-
"@takazudo/zfb": "^4.
|
|
740
|
-
"@takazudo/zfb-md-wasm": "^4.
|
|
741
|
-
"@takazudo/zfb-runtime": "^4.
|
|
743
|
+
"@takazudo/zfb": "^4.7.0",
|
|
744
|
+
"@takazudo/zfb-md-wasm": "^4.7.0",
|
|
745
|
+
"@takazudo/zfb-runtime": "^4.7.0",
|
|
742
746
|
"@takazudo/zudo-doc-history-server": "^7.0.0",
|
|
743
747
|
"diff": "^8.0.0",
|
|
744
748
|
"katex": "^0.18.2 || ^0.19.0",
|
|
@@ -779,9 +783,9 @@
|
|
|
779
783
|
"devDependencies": {
|
|
780
784
|
"@modelcontextprotocol/sdk": "1.32.1",
|
|
781
785
|
"@takazudo/mdx-formatter": "1.3.0",
|
|
782
|
-
"@takazudo/zfb": "4.
|
|
783
|
-
"@takazudo/zfb-md-wasm": "4.
|
|
784
|
-
"@takazudo/zfb-runtime": "4.
|
|
786
|
+
"@takazudo/zfb": "4.7.0",
|
|
787
|
+
"@takazudo/zfb-md-wasm": "4.7.0",
|
|
788
|
+
"@takazudo/zfb-runtime": "4.7.0",
|
|
785
789
|
"@types/fs-extra": "^11.0.4",
|
|
786
790
|
"@types/minimist": "^1.2.5",
|
|
787
791
|
"@types/node": "^25.3.5",
|
|
@@ -791,7 +795,7 @@
|
|
|
791
795
|
"typescript": "^5.0.0",
|
|
792
796
|
"vitest": "^4.1.0",
|
|
793
797
|
"zod": "^4.3.6",
|
|
794
|
-
"@takazudo/zudo-doc-history-server": "7.
|
|
798
|
+
"@takazudo/zudo-doc-history-server": "7.1.0"
|
|
795
799
|
},
|
|
796
800
|
"scripts": {
|
|
797
801
|
"gen:search-widget-script": "node scripts/gen-search-widget-script.mjs",
|