@rse/specbook 1.4.1 → 1.4.2
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.
|
@@ -81,16 +81,18 @@ const mermaidColors = (colors, style) => {
|
|
|
81
81
|
theme color spreads after the shape of the D2 themes "Neutral
|
|
82
82
|
Default" (light) and "Dark Mauve" (dark): the neutrals "N1" (text)
|
|
83
83
|
to "N7" (background), the base colors "B1" (strokes) to "B6"
|
|
84
|
-
(fills), and the alternative accents "AA*"/"AB*"
|
|
84
|
+
(fills), and the alternative accents "AA*"/"AB*", where the fills
|
|
85
|
+
"B4" to "B6" of the nesting levels 1 to 3 are spread far apart and,
|
|
86
|
+
unlike in D2, recede towards the outer levels (the containers) */
|
|
85
87
|
const d2Colors = (colors, style) => {
|
|
86
88
|
const [b, a, s] = [colors.base, colors.accent, colors.signal];
|
|
87
89
|
return style === "dark" ? {
|
|
88
90
|
N1: b[28], N2: b[25], N3: b[22], N4: b[13], N5: b[10], N6: b[8], N7: b[6],
|
|
89
|
-
B1: a[21], B2: a[21], B3: a[13], B4:
|
|
91
|
+
B1: a[21], B2: a[21], B3: a[13], B4: b[9], B5: a[0], B6: a[5],
|
|
90
92
|
AA2: s[19], AA4: s[10], AA5: s[8], AB4: s[10], AB5: s[8]
|
|
91
93
|
} : {
|
|
92
94
|
N1: b[3], N2: b[13], N3: b[19], N4: b[25], N5: b[27], N6: b[29], N7: b[31],
|
|
93
|
-
B1: a[7], B2: a[11], B3: a[27], B4: a[
|
|
95
|
+
B1: a[7], B2: a[11], B3: a[27], B4: a[31], B5: a[28], B6: a[24],
|
|
94
96
|
AA2: s[13], AA4: s[28], AA5: s[30], AB4: s[28], AB5: s[30]
|
|
95
97
|
};
|
|
96
98
|
};
|
|
@@ -128,7 +130,7 @@ const d2Error = (err) => {
|
|
|
128
130
|
const renderD2 = (source, colors, style) => {
|
|
129
131
|
const overrides = Object.entries(colors).map(([key, color]) => `${key}: "${color}"`).join("; ");
|
|
130
132
|
const request = d2Chain.then(async () => {
|
|
131
|
-
d2 ??= import("@
|
|
133
|
+
d2 ??= import("@d2lang/d2").then((module) => new module.D2())
|
|
132
134
|
.catch((err) => {
|
|
133
135
|
d2 = null;
|
|
134
136
|
throw err;
|
package/dst/specbook-format.md
CHANGED
|
@@ -1148,7 +1148,7 @@ its own and embedded like an image -- ``,
|
|
|
1148
1148
|
``, or `` -- inside a
|
|
1149
1149
|
description or property value, where its source is inlined at parse time.
|
|
1150
1150
|
The HTML/PDF export renders every such diagram (Mermaid through
|
|
1151
|
-
`beautiful-mermaid`, D2 through `@
|
|
1151
|
+
`beautiful-mermaid`, D2 through `@d2lang/d2`) in the theme colors of
|
|
1152
1152
|
the document, once per color theme, like a theme-aware image. It folds,
|
|
1153
1153
|
maximizes, and is omitted (`-O diagram:code`, for diagrams as code, or
|
|
1154
1154
|
by nesting level) like a derived Gradia diagram. A diagram failing to render
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rse/specbook",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"publishConfig": { "access": "public" },
|
|
5
5
|
"description": "Markdown-based Specification Format (API, CLI and MCP service)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@rse/mrcs": "0.9.2",
|
|
29
29
|
"@rse/gradia": "1.4.2",
|
|
30
30
|
"beautiful-mermaid": "1.1.3",
|
|
31
|
-
"@
|
|
31
|
+
"@d2lang/d2": "0.1.34",
|
|
32
32
|
"shiki": "4.5.0",
|
|
33
33
|
"pdfjs-dist": "6.4.299",
|
|
34
34
|
"@napi-rs/canvas": "1.0.10",
|