@takazudo/zudo-doc 4.4.7 → 4.4.9
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 +21 -0
- package/dist/auto-logo/shapes.d.ts +12 -8
- package/dist/auto-logo/shapes.js +27 -26
- package/dist/doc-history-area/index.js +1 -1
- package/dist/doc-history-exclude/index.d.ts +2 -0
- package/dist/doc-history-exclude/index.js +36 -0
- package/dist/plugins/internal/doc-history/pre-build.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,27 @@ All notable changes to `@takazudo/zudo-doc` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on Keep a Changelog, and release notes are generated from the changelog MDX pages.
|
|
6
6
|
|
|
7
|
+
## [4.4.9] - 2026-07-27
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- Fixed a build failure that made every `docHistory: false` project unbuildable with `Could not resolve "@takazudo/zudo-doc-history-server/exclude"`. The chrome graph's `doc-history-area` imported that subpath at module top level, and because the chrome graph is always bundled, esbuild had to resolve it on every build — even though `@takazudo/zudo-doc-history-server` is an *optional* peer that a doc-history-off project never installs. A regression introduced in 4.3.0 by the exclude-filtering work. The canonical matcher now lives inside `@takazudo/zudo-doc` and both consumers import it relatively; `doc-history-server` keeps its own copy and its published `./exclude` export (it is a standalone dependency-free Node server/CLI and cannot depend back on the framework package), with a source-identity parity test pinning the two copies together (5dc2a2bec)
|
|
12
|
+
- Restored `@takazudo/zudo-doc-history-server` to the `docHistory` feature block in the generated scaffold's `package.json`. It had been promoted to an unconditional base dependency purely to work around the resolution bug above; with that root cause fixed, a doc-history-off scaffold no longer needs the package at all. The scaffold test now asserts docHistory-OFF ⇒ absent so the workaround cannot silently creep back (5d5d0ad1a)
|
|
13
|
+
- Widened the release script's pin-rewrite regex to accept both pin spellings (bracket-assignment and object-literal-key). It previously matched only the colon form, so moving the pin into a conditional block would have failed the following release with `could not locate ... pin` (5d5d0ad1a)
|
|
14
|
+
|
|
15
|
+
### Other Changes
|
|
16
|
+
|
|
17
|
+
- Added an optional-peer reachability guard that walks the real injected doc routes and reports any optional peer reachable from the always-bundled graph. This bug class has now shipped three times and nothing else catches it — unit tests import from source, and this repo's own build installs every optional peer. The guard also resolves package self-imports back to source through the exports map rather than treating them as external, so the walk crosses the `@takazudo/zudo-doc/*` boundary instead of stopping at it (5dc2a2bec, cd6bd9516)
|
|
18
|
+
- Made cold checkouts self-healing. A tree installed with `pnpm install --ignore-scripts` has no `dist/` for the workspace packages, so `zfb` could not even load `zfb.config.ts` (it imports `@takazudo/zudo-doc/config`, which resolves through `dist/config.js`) and `check` / `build` / `check:pages` / `test:packages` all failed before a single line was edited. A new `ensure:workspace-build` prerequisite now runs ahead of those commands and as a `b4push` preflight, building the two workspace packages in their mandatory order (c63615d90)
|
|
19
|
+
- Made that build guard check every literal `./dist/**` target declared in each package's `exports` map instead of a single sentinel file. A `tsc` declaration pass killed partway leaves some `.d.ts` written and others missing — a state the sentinel pair accepted, so the next command failed on a missing subpath instead of self-healing. Deriving completeness from the manifest keeps the check correct as exports change and leaves no hand-maintained list to drift (833b9110e)
|
|
20
|
+
|
|
21
|
+
## [4.4.8] - 2026-07-27
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
- Corrected the color roles of the generated hero logo (`AutoLogo`, rendered when `logo: "auto"` — the default for every fresh scaffold), which were inverted relative to the intended design. In dark mode the tile rendered a foreground-filled interior with a dark center disc and a light glyph; it now renders a page-background interior with thin light frame lines, light corner rays, a light disc, and the glyph knocked out of that disc. Light mode is the exact inverse. Both roles are theme-driven tokens, so the fix applies to every color scheme and theme pack at once (31535b6f8)
|
|
26
|
+
- Fixed the same inversion in the SVG produced by `zudo-doc eject logo`, which serializes the identical shape data through a luminance mask and so baked the wrong silhouette into the ejected asset. Note that the ejected variant's tile interior is transparent where the live component paints an opaque page background — an inherent limitation of the one-color CSS-mask path, and visually identical over a flat page background (31535b6f8)
|
|
27
|
+
|
|
7
28
|
## [4.4.7] - 2026-07-27
|
|
8
29
|
|
|
9
30
|
### Bug Fixes
|
|
@@ -9,23 +9,27 @@ export declare const INSET = 6;
|
|
|
9
9
|
export declare const CX: number;
|
|
10
10
|
export declare const CY: number;
|
|
11
11
|
export declare const DISC_R = 34;
|
|
12
|
-
/** Full-bleed plate rect
|
|
12
|
+
/** Full-bleed plate rect, filled with the page background so the tile
|
|
13
|
+
* interior reads as the page itself (opaque, not `fill: "none"`, so it also
|
|
14
|
+
* covers a textured page background). */
|
|
13
15
|
export declare const PLATE_SHAPE: ShapePrimitive;
|
|
14
|
-
/** Thin inner frame stroke,
|
|
16
|
+
/** Thin inner frame stroke, drawn in ink over the plate. */
|
|
15
17
|
export declare const INNER_FRAME_SHAPE: ShapePrimitive;
|
|
16
|
-
/** 4 diagonal corner rays, each stopping just short of the disc edge. */
|
|
18
|
+
/** 4 diagonal corner rays in ink, each stopping just short of the disc edge. */
|
|
17
19
|
export declare const RAY_SHAPES: ShapePrimitive[];
|
|
18
|
-
/** Centered disc
|
|
20
|
+
/** Centered ink disc — the glyph below is knocked back out of it. */
|
|
19
21
|
export declare const DISC_SHAPE: ShapePrimitive;
|
|
20
22
|
/** Scale + translate that centers a glyph's 100×100 box onto the disc
|
|
21
23
|
* (slight overscan reads better). */
|
|
22
24
|
export declare const GLYPH_SCALE: number;
|
|
23
25
|
export declare const GLYPH_TRANSFORM = "translate(64.3, 16.799999999999997) scale(0.7140000000000001)";
|
|
24
26
|
/** Line-art glyphs drawn in a 100×100 box centered at (50,50), as plain
|
|
25
|
-
* shape data.
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* shape data. Every painted `fill`/`stroke` here is the knockout token, so
|
|
28
|
+
* the glyph reads as a hole punched through the ink disc it sits on.
|
|
29
|
+
* The original JSX wrapped each glyph (and some repeated groups) in a `<g>`
|
|
30
|
+
* that carried no attributes of its own — only React `key`s for list
|
|
31
|
+
* rendering — so flattening into a single primitive array per glyph loses
|
|
32
|
+
* no visual information. */
|
|
29
33
|
export declare const GLYPH_SHAPES: Record<string, ShapePrimitive[]>;
|
|
30
34
|
export declare const GLYPH_NAMES: string[];
|
|
31
35
|
/** Deterministic glyph name for a seed. */
|
package/dist/auto-logo/shapes.js
CHANGED
|
@@ -4,10 +4,11 @@ const INSET = 6;
|
|
|
4
4
|
const CX = W / 2;
|
|
5
5
|
const CY = H / 2;
|
|
6
6
|
const DISC_R = 34;
|
|
7
|
+
const INK = "currentColor";
|
|
7
8
|
const KO = "var(--color-bg)";
|
|
8
9
|
const PLATE_SHAPE = {
|
|
9
10
|
el: "rect",
|
|
10
|
-
attrs: { x: 0, y: 0, width: W, height: H, fill:
|
|
11
|
+
attrs: { x: 0, y: 0, width: W, height: H, fill: KO }
|
|
11
12
|
};
|
|
12
13
|
const INNER_FRAME_SHAPE = {
|
|
13
14
|
el: "rect",
|
|
@@ -17,7 +18,7 @@ const INNER_FRAME_SHAPE = {
|
|
|
17
18
|
width: W - INSET * 2,
|
|
18
19
|
height: H - INSET * 2,
|
|
19
20
|
fill: "none",
|
|
20
|
-
stroke:
|
|
21
|
+
stroke: INK,
|
|
21
22
|
"stroke-width": 1.6
|
|
22
23
|
}
|
|
23
24
|
};
|
|
@@ -33,12 +34,12 @@ const RAY_SHAPES = [
|
|
|
33
34
|
const stop = (len - DISC_R - 7) / len;
|
|
34
35
|
return {
|
|
35
36
|
el: "line",
|
|
36
|
-
attrs: { x1: x, y1: y, x2: x + dx * stop, y2: y + dy * stop, stroke:
|
|
37
|
+
attrs: { x1: x, y1: y, x2: x + dx * stop, y2: y + dy * stop, stroke: INK, "stroke-width": 1.4 }
|
|
37
38
|
};
|
|
38
39
|
});
|
|
39
40
|
const DISC_SHAPE = {
|
|
40
41
|
el: "circle",
|
|
41
|
-
attrs: { cx: CX, cy: CY, r: DISC_R, fill:
|
|
42
|
+
attrs: { cx: CX, cy: CY, r: DISC_R, fill: INK }
|
|
42
43
|
};
|
|
43
44
|
const GLYPH_SCALE = DISC_R * 2 / 100 * 1.05;
|
|
44
45
|
const GLYPH_TRANSFORM = `translate(${CX - 50 * GLYPH_SCALE}, ${CY - 50 * GLYPH_SCALE}) scale(${GLYPH_SCALE})`;
|
|
@@ -49,12 +50,12 @@ const GLYPH_SHAPES = {
|
|
|
49
50
|
attrs: {
|
|
50
51
|
d: "M50 30 C42 24, 30 23, 22 26 L22 68 C30 65, 42 66, 50 72 C58 66, 70 65, 78 68 L78 26 C70 23, 58 24, 50 30 Z",
|
|
51
52
|
fill: "none",
|
|
52
|
-
stroke:
|
|
53
|
+
stroke: KO,
|
|
53
54
|
"stroke-width": 6,
|
|
54
55
|
"stroke-linejoin": "round"
|
|
55
56
|
}
|
|
56
57
|
},
|
|
57
|
-
{ el: "line", attrs: { x1: 50, y1: 30, x2: 50, y2: 72, stroke:
|
|
58
|
+
{ el: "line", attrs: { x1: 50, y1: 30, x2: 50, y2: 72, stroke: KO, "stroke-width": 5 } },
|
|
58
59
|
...[0, 1, 2].flatMap(
|
|
59
60
|
(i) => [
|
|
60
61
|
{
|
|
@@ -64,7 +65,7 @@ const GLYPH_SHAPES = {
|
|
|
64
65
|
y1: 38 + i * 10,
|
|
65
66
|
x2: 43,
|
|
66
67
|
y2: 40 + i * 10,
|
|
67
|
-
stroke:
|
|
68
|
+
stroke: KO,
|
|
68
69
|
"stroke-width": 4,
|
|
69
70
|
"stroke-linecap": "round"
|
|
70
71
|
}
|
|
@@ -76,7 +77,7 @@ const GLYPH_SHAPES = {
|
|
|
76
77
|
y1: 40 + i * 10,
|
|
77
78
|
x2: 71,
|
|
78
79
|
y2: 38 + i * 10,
|
|
79
|
-
stroke:
|
|
80
|
+
stroke: KO,
|
|
80
81
|
"stroke-width": 4,
|
|
81
82
|
"stroke-linecap": "round"
|
|
82
83
|
}
|
|
@@ -87,37 +88,37 @@ const GLYPH_SHAPES = {
|
|
|
87
88
|
doc: [
|
|
88
89
|
{
|
|
89
90
|
el: "path",
|
|
90
|
-
attrs: { d: "M32 22 L60 22 L70 32 L70 78 L32 78 Z", fill: "none", stroke:
|
|
91
|
+
attrs: { d: "M32 22 L60 22 L70 32 L70 78 L32 78 Z", fill: "none", stroke: KO, "stroke-width": 6, "stroke-linejoin": "round" }
|
|
91
92
|
},
|
|
92
93
|
{
|
|
93
94
|
el: "path",
|
|
94
|
-
attrs: { d: "M60 22 L60 32 L70 32", fill: "none", stroke:
|
|
95
|
+
attrs: { d: "M60 22 L60 32 L70 32", fill: "none", stroke: KO, "stroke-width": 5, "stroke-linejoin": "round" }
|
|
95
96
|
},
|
|
96
97
|
...[0, 1, 2].map(
|
|
97
98
|
(i) => ({
|
|
98
99
|
el: "line",
|
|
99
|
-
attrs: { x1: 40, y1: 44 + i * 11, x2: 62, y2: 44 + i * 11, stroke:
|
|
100
|
+
attrs: { x1: 40, y1: 44 + i * 11, x2: 62, y2: 44 + i * 11, stroke: KO, "stroke-width": 4, "stroke-linecap": "round" }
|
|
100
101
|
})
|
|
101
102
|
)
|
|
102
103
|
],
|
|
103
104
|
bookmark: [
|
|
104
105
|
{
|
|
105
106
|
el: "path",
|
|
106
|
-
attrs: { d: "M34 22 L66 22 L66 78 L50 64 L34 78 Z", fill: "none", stroke:
|
|
107
|
+
attrs: { d: "M34 22 L66 22 L66 78 L50 64 L34 78 Z", fill: "none", stroke: KO, "stroke-width": 6, "stroke-linejoin": "round" }
|
|
107
108
|
},
|
|
108
|
-
{ el: "line", attrs: { x1: 42, y1: 36, x2: 58, y2: 36, stroke:
|
|
109
|
+
{ el: "line", attrs: { x1: 42, y1: 36, x2: 58, y2: 36, stroke: KO, "stroke-width": 4, "stroke-linecap": "round" } }
|
|
109
110
|
],
|
|
110
111
|
compass: [
|
|
111
|
-
{ el: "circle", attrs: { cx: 50, cy: 50, r: 26, fill: "none", stroke:
|
|
112
|
-
{ el: "path", attrs: { d: "M60 40 L54 56 L40 60 L46 44 Z", fill:
|
|
112
|
+
{ el: "circle", attrs: { cx: 50, cy: 50, r: 26, fill: "none", stroke: KO, "stroke-width": 6 } },
|
|
113
|
+
{ el: "path", attrs: { d: "M60 40 L54 56 L40 60 L46 44 Z", fill: KO } }
|
|
113
114
|
],
|
|
114
115
|
terminal: [
|
|
115
|
-
{ el: "rect", attrs: { x: 24, y: 30, width: 52, height: 40, rx: 5, fill: "none", stroke:
|
|
116
|
+
{ el: "rect", attrs: { x: 24, y: 30, width: 52, height: 40, rx: 5, fill: "none", stroke: KO, "stroke-width": 6 } },
|
|
116
117
|
{
|
|
117
118
|
el: "path",
|
|
118
|
-
attrs: { d: "M33 42 L41 50 L33 58", fill: "none", stroke:
|
|
119
|
+
attrs: { d: "M33 42 L41 50 L33 58", fill: "none", stroke: KO, "stroke-width": 5, "stroke-linecap": "round", "stroke-linejoin": "round" }
|
|
119
120
|
},
|
|
120
|
-
{ el: "line", attrs: { x1: 47, y1: 58, x2: 60, y2: 58, stroke:
|
|
121
|
+
{ el: "line", attrs: { x1: 47, y1: 58, x2: 60, y2: 58, stroke: KO, "stroke-width": 5, "stroke-linecap": "round" } }
|
|
121
122
|
],
|
|
122
123
|
bulb: [
|
|
123
124
|
{
|
|
@@ -125,30 +126,30 @@ const GLYPH_SHAPES = {
|
|
|
125
126
|
attrs: {
|
|
126
127
|
d: "M50 22 C37 22, 30 32, 30 41 C30 49, 35 53, 39 58 L39 64 L61 64 L61 58 C65 53, 70 49, 70 41 C70 32, 63 22, 50 22 Z",
|
|
127
128
|
fill: "none",
|
|
128
|
-
stroke:
|
|
129
|
+
stroke: KO,
|
|
129
130
|
"stroke-width": 6,
|
|
130
131
|
"stroke-linejoin": "round"
|
|
131
132
|
}
|
|
132
133
|
},
|
|
133
|
-
{ el: "line", attrs: { x1: 42, y1: 71, x2: 58, y2: 71, stroke:
|
|
134
|
-
{ el: "line", attrs: { x1: 45, y1: 78, x2: 55, y2: 78, stroke:
|
|
134
|
+
{ el: "line", attrs: { x1: 42, y1: 71, x2: 58, y2: 71, stroke: KO, "stroke-width": 5, "stroke-linecap": "round" } },
|
|
135
|
+
{ el: "line", attrs: { x1: 45, y1: 78, x2: 55, y2: 78, stroke: KO, "stroke-width": 5, "stroke-linecap": "round" } }
|
|
135
136
|
],
|
|
136
137
|
chat: [
|
|
137
138
|
{
|
|
138
139
|
el: "path",
|
|
139
|
-
attrs: { d: "M26 28 L74 28 L74 62 L48 62 L36 74 L36 62 L26 62 Z", fill: "none", stroke:
|
|
140
|
+
attrs: { d: "M26 28 L74 28 L74 62 L48 62 L36 74 L36 62 L26 62 Z", fill: "none", stroke: KO, "stroke-width": 6, "stroke-linejoin": "round" }
|
|
140
141
|
},
|
|
141
|
-
...[0, 1, 2].map((i) => ({ el: "circle", attrs: { cx: 38 + i * 12, cy: 45, r: 3, fill:
|
|
142
|
+
...[0, 1, 2].map((i) => ({ el: "circle", attrs: { cx: 38 + i * 12, cy: 45, r: 3, fill: KO } }))
|
|
142
143
|
],
|
|
143
144
|
layers: [
|
|
144
|
-
{ el: "path", attrs: { d: "M50 22 L78 36 L50 50 L22 36 Z", fill: "none", stroke:
|
|
145
|
+
{ el: "path", attrs: { d: "M50 22 L78 36 L50 50 L22 36 Z", fill: "none", stroke: KO, "stroke-width": 6, "stroke-linejoin": "round" } },
|
|
145
146
|
{
|
|
146
147
|
el: "path",
|
|
147
|
-
attrs: { d: "M25 47 L50 60 L75 47", fill: "none", stroke:
|
|
148
|
+
attrs: { d: "M25 47 L50 60 L75 47", fill: "none", stroke: KO, "stroke-width": 6, "stroke-linecap": "round", "stroke-linejoin": "round" }
|
|
148
149
|
},
|
|
149
150
|
{
|
|
150
151
|
el: "path",
|
|
151
|
-
attrs: { d: "M25 58 L50 71 L75 58", fill: "none", stroke:
|
|
152
|
+
attrs: { d: "M25 58 L50 71 L75 58", fill: "none", stroke: KO, "stroke-width": 6, "stroke-linecap": "round", "stroke-linejoin": "round" }
|
|
152
153
|
}
|
|
153
154
|
]
|
|
154
155
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
2
2
|
import { Island } from "@takazudo/zfb";
|
|
3
|
-
import { compileExclude } from "
|
|
3
|
+
import { compileExclude } from "../doc-history-exclude/index.js";
|
|
4
4
|
import { BodyFootUtilArea } from "../body-foot-util/index.js";
|
|
5
5
|
import { toHistorySlug } from "../slug/index.js";
|
|
6
6
|
import { buildGitHubSourceUrl as buildGitHubSourceUrlBase } from "../github-helpers/index.js";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function compileExclude(patterns) {
|
|
2
|
+
const matchers = patterns.map((pattern) => {
|
|
3
|
+
let source = "";
|
|
4
|
+
for (let i = 0; i < pattern.length; i++) {
|
|
5
|
+
const char = pattern[i];
|
|
6
|
+
if (char === "/" && pattern.slice(i + 1) === "**") {
|
|
7
|
+
source += "(?:/.*)?";
|
|
8
|
+
break;
|
|
9
|
+
}
|
|
10
|
+
if (pattern.slice(i, i + 3) === "**/") {
|
|
11
|
+
source += "(?:[^/]+/)*";
|
|
12
|
+
i += 2;
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
if (pattern.slice(i, i + 2) === "**") {
|
|
16
|
+
source += ".*";
|
|
17
|
+
i++;
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
if (char === "*") {
|
|
21
|
+
source += "[^/]*";
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
if (char === "?") {
|
|
25
|
+
source += "[^/]";
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
source += char?.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&");
|
|
29
|
+
}
|
|
30
|
+
return new RegExp(`^${source}$`);
|
|
31
|
+
});
|
|
32
|
+
return (slug) => matchers.some((matcher) => matcher.test(slug));
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
compileExclude
|
|
36
|
+
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
collectContentFiles,
|
|
5
5
|
getAllFilesFirstLastMetaAsync
|
|
6
6
|
} from "@takazudo/zudo-doc-history-server/git-history";
|
|
7
|
-
import { compileExclude } from "
|
|
7
|
+
import { compileExclude } from "../../../doc-history-exclude/index.js";
|
|
8
8
|
const META_OUT_RELATIVE_DIR = ".zfb";
|
|
9
9
|
const META_OUT_FILENAME = "doc-history-meta.json";
|
|
10
10
|
function deriveSourceExt(filePath) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takazudo/zudo-doc",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.9",
|
|
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",
|
|
@@ -650,7 +650,7 @@
|
|
|
650
650
|
"typescript": "^5.0.0",
|
|
651
651
|
"vitest": "^4.1.0",
|
|
652
652
|
"zod": "^4.3.6",
|
|
653
|
-
"@takazudo/zudo-doc-history-server": "4.4.
|
|
653
|
+
"@takazudo/zudo-doc-history-server": "4.4.9"
|
|
654
654
|
},
|
|
655
655
|
"scripts": {
|
|
656
656
|
"build": "tsup && tsc -p tsconfig.build.json",
|