@cardenelabs/cdl 0.40.11 → 0.41.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 +51 -1
- package/dist/index.cjs +4 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -23
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +3 -20
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +3 -20
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/src/visual-validate.ts +22 -33
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,54 @@ CDL (Chainome Diagram Language) の主要変更履歴。
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.41.0] - 2026-09-10
|
|
9
|
+
|
|
10
|
+
### Removed (破壊的変更)
|
|
11
|
+
|
|
12
|
+
- **軸 40 `memory-budget` を廃し、描く物の数は軸 34 `dom-complexity-budget` に一本化した** (#775)
|
|
13
|
+
|
|
14
|
+
この軸は「図が大きすぎる」 を **箱の面積の合計** で測っていたため、順位が実物と逆になって
|
|
15
|
+
いた。 下流の見本帳 444 枚の実測がそれを示す。
|
|
16
|
+
|
|
17
|
+
| 図 | 旧軸 40 の値 | 箱 | 行 | 線の折れ | 段の指定 | 描く物の合計 |
|
|
18
|
+
|---|---|---|---|---|---|---|
|
|
19
|
+
| `oauth-flow` | 1153288 (超過) | 1 | 0 | 0 | 4 | **5** |
|
|
20
|
+
| `interactive-traffic-sankey` | 208070 (通る) | 6 | 0 | 44 | 3 | **53** |
|
|
21
|
+
|
|
22
|
+
箱 1 つの縦長の図が超過し、線の折れが 44 ある図が通っていた。 境の値も説明 (10^7) と
|
|
23
|
+
実装 (10^6) が食い違い、正常の範囲の内側に置かれていた。
|
|
24
|
+
|
|
25
|
+
**軸 34 の数え方は変えない**。 軸 40 は細かさ (行 / 線の折れ) を 1 度も拾えておらず
|
|
26
|
+
(面積の項が支配していた)、消しても失う検知が無い。 境の 400 は今の数え方で決めた値なので、
|
|
27
|
+
数え方を変えると境の根拠が消える。
|
|
28
|
+
|
|
29
|
+
消費側への影響は 2 つ。 `VisualAxis` から `"memory-budget"` が消え、`report.counts` の
|
|
30
|
+
同名の鍵も消える。 鍵で数えている側は参照を外す。
|
|
31
|
+
|
|
32
|
+
## [0.40.12] - 2026-09-10
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- **表の列に書いた型の名前を、データと読み違えて注意を出さなくなった** (#771)
|
|
37
|
+
|
|
38
|
+
行の検査 `row-content-typing` は `名前: 値` の名前から値の型を推し量る。 ER 図とクラス図は
|
|
39
|
+
値の位置に **型の名前** を書くので、そのままでは `total: numeric` が「数字を期待したのに
|
|
40
|
+
`numeric`」 と読まれていた。
|
|
41
|
+
|
|
42
|
+
逃げ道は型名を並べた手書きの一覧で、`BIGINT` / `INT` / `FLOAT` / `VARCHAR` は載っている
|
|
43
|
+
一方 `numeric` が抜けていた。 同じ形で `decimal` / `jsonb` / `interval` も抜けている。
|
|
44
|
+
**書き手が思い付いた名前が上限になる** 形で、方言ごとに増える型名を追えない。
|
|
45
|
+
|
|
46
|
+
行が列の宣言かどうかを、値の語ではなく **行頭の印** (`rowMarks`) で決めるようにした。
|
|
47
|
+
印は `er` / `classDiagram` が `columns` / `attributes` を受け取った時だけ付くので、
|
|
48
|
+
印がある行は engine 自身が「値の位置に型の名前が来る」 と知っている。
|
|
49
|
+
|
|
50
|
+
外すのは **行の単位** にした。 箱の単位で外すと、印を持つ箱に混ざった印なしの行の実データ
|
|
51
|
+
まで見なくなる。
|
|
52
|
+
|
|
53
|
+
手書きの一覧は残す。 `rows` を直接書いた古い形は印を持たないので、消すと丸ごと注意に
|
|
54
|
+
落ちる。 一方で **足しもしない** = 足すと同じ穴が次の型名で戻る。
|
|
55
|
+
|
|
8
56
|
## [0.40.11] - 2026-09-09
|
|
9
57
|
|
|
10
58
|
### Fixed
|
|
@@ -2063,7 +2111,9 @@ Initial OSS release.
|
|
|
2063
2111
|
使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
|
|
2064
2112
|
行き止まりになる。
|
|
2065
2113
|
|
|
2066
|
-
[Unreleased]: https://github.com/cardene777/cdl/compare/v0.
|
|
2114
|
+
[Unreleased]: https://github.com/cardene777/cdl/compare/v0.41.0...HEAD
|
|
2115
|
+
[0.41.0]: https://github.com/cardene777/cdl/compare/v0.40.12...v0.41.0
|
|
2116
|
+
[0.40.12]: https://github.com/cardene777/cdl/compare/v0.40.11...v0.40.12
|
|
2067
2117
|
[0.40.11]: https://github.com/cardene777/cdl/compare/v0.40.10...v0.40.11
|
|
2068
2118
|
[0.40.10]: https://github.com/cardene777/cdl/compare/v0.40.9...v0.40.10
|
|
2069
2119
|
[0.40.9]: https://github.com/cardene777/cdl/compare/v0.40.8...v0.40.9
|
package/dist/index.cjs
CHANGED
|
@@ -15542,7 +15542,6 @@ function emptyCounts() {
|
|
|
15542
15542
|
"row-content-typing": 0,
|
|
15543
15543
|
"terminal-safe-text": 0,
|
|
15544
15544
|
"gpu-layer-efficiency": 0,
|
|
15545
|
-
"memory-budget": 0,
|
|
15546
15545
|
"svg-injection-safety": 0,
|
|
15547
15546
|
"seo-metadata-quality": 0,
|
|
15548
15547
|
"bidi-hyphenation": 0,
|
|
@@ -17214,7 +17213,9 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes) {
|
|
|
17214
17213
|
const SCHEMA_KEYWORDS = /^(string|number|boolean|text|enum|timestamp|date|datetime|json|blob|PK|FK|UUID|BIGINT|INT|FLOAT|VARCHAR|TEXT|DATETIME)$|^enum\(|^varchar\(/i;
|
|
17215
17214
|
for (const n of diag.nodes) {
|
|
17216
17215
|
if (!n.rows) continue;
|
|
17217
|
-
for (
|
|
17216
|
+
for (let i = 0; i < n.rows.length; i++) {
|
|
17217
|
+
const row = n.rows[i];
|
|
17218
|
+
if (n.rowMarks?.[i] != null) continue;
|
|
17218
17219
|
const m = row.match(/^([^:]+):\s*(.+)$/);
|
|
17219
17220
|
if (!m) continue;
|
|
17220
17221
|
const [, key, value] = m;
|
|
@@ -17283,24 +17284,6 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes) {
|
|
|
17283
17284
|
"warn"
|
|
17284
17285
|
);
|
|
17285
17286
|
}
|
|
17286
|
-
const MEMORY_BUDGET = 1e6;
|
|
17287
|
-
let nodeMemUnit = 0;
|
|
17288
|
-
for (const n of laid.nodes) nodeMemUnit += n.w * n.h;
|
|
17289
|
-
let edgeMemUnit = 0;
|
|
17290
|
-
for (const e of laid.edges) {
|
|
17291
|
-
const segs = extractPathSegments(e.d);
|
|
17292
|
-
edgeMemUnit += segs.length * 100;
|
|
17293
|
-
}
|
|
17294
|
-
let phaseMemUnit = 0;
|
|
17295
|
-
for (const p of diag.phases) phaseMemUnit += (p.tweens.length + p.sets.length) * 50;
|
|
17296
|
-
const totalMemUnit = nodeMemUnit + edgeMemUnit + phaseMemUnit;
|
|
17297
|
-
if (totalMemUnit > MEMORY_BUDGET) {
|
|
17298
|
-
push(
|
|
17299
|
-
"memory-budget",
|
|
17300
|
-
`diagram memory unit \u63A8\u5B9A ${totalMemUnit.toFixed(0)} > budget ${MEMORY_BUDGET} (nodes=${nodeMemUnit.toFixed(0)} edges=${edgeMemUnit.toFixed(0)} phases=${phaseMemUnit.toFixed(0)})`,
|
|
17301
|
-
"warn"
|
|
17302
|
-
);
|
|
17303
|
-
}
|
|
17304
17287
|
const XSS_PATTERNS = [
|
|
17305
17288
|
{ re: /<script\b/i, label: "<script> tag" },
|
|
17306
17289
|
{ re: /javascript:/i, label: "javascript: URI" },
|
|
@@ -17807,7 +17790,6 @@ function validateMetaAxes(totalCounts, diagrams = [], durations = [], reports =
|
|
|
17807
17790
|
"row-content-typing",
|
|
17808
17791
|
"terminal-safe-text",
|
|
17809
17792
|
"gpu-layer-efficiency",
|
|
17810
|
-
"memory-budget",
|
|
17811
17793
|
"svg-injection-safety",
|
|
17812
17794
|
"seo-metadata-quality",
|
|
17813
17795
|
"bidi-hyphenation",
|
|
@@ -17877,7 +17859,6 @@ function validateMetaAxes(totalCounts, diagrams = [], durations = [], reports =
|
|
|
17877
17859
|
"row-content-typing",
|
|
17878
17860
|
"terminal-safe-text",
|
|
17879
17861
|
"gpu-layer-efficiency",
|
|
17880
|
-
"memory-budget",
|
|
17881
17862
|
"svg-injection-safety",
|
|
17882
17863
|
"seo-metadata-quality",
|
|
17883
17864
|
"bidi-hyphenation",
|
|
@@ -17919,7 +17900,7 @@ function validateMetaAxes(totalCounts, diagrams = [], durations = [], reports =
|
|
|
17919
17900
|
});
|
|
17920
17901
|
}
|
|
17921
17902
|
}
|
|
17922
|
-
const EXPECTED_AXIS_COUNT =
|
|
17903
|
+
const EXPECTED_AXIS_COUNT = 67;
|
|
17923
17904
|
if (allAxes.length !== EXPECTED_AXIS_COUNT) {
|
|
17924
17905
|
out.push({
|
|
17925
17906
|
axis: "axis-documentation-completeness",
|