@cardenelabs/cdl 0.40.12 → 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 CHANGED
@@ -5,6 +5,30 @@ 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
+
8
32
  ## [0.40.12] - 2026-09-10
9
33
 
10
34
  ### Fixed
@@ -2087,7 +2111,8 @@ Initial OSS release.
2087
2111
  使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
2088
2112
  行き止まりになる。
2089
2113
 
2090
- [Unreleased]: https://github.com/cardene777/cdl/compare/v0.40.12...HEAD
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
2091
2116
  [0.40.12]: https://github.com/cardene777/cdl/compare/v0.40.11...v0.40.12
2092
2117
  [0.40.11]: https://github.com/cardene777/cdl/compare/v0.40.10...v0.40.11
2093
2118
  [0.40.10]: https://github.com/cardene777/cdl/compare/v0.40.9...v0.40.10
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,
@@ -17285,24 +17284,6 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes) {
17285
17284
  "warn"
17286
17285
  );
17287
17286
  }
17288
- const MEMORY_BUDGET = 1e6;
17289
- let nodeMemUnit = 0;
17290
- for (const n of laid.nodes) nodeMemUnit += n.w * n.h;
17291
- let edgeMemUnit = 0;
17292
- for (const e of laid.edges) {
17293
- const segs = extractPathSegments(e.d);
17294
- edgeMemUnit += segs.length * 100;
17295
- }
17296
- let phaseMemUnit = 0;
17297
- for (const p of diag.phases) phaseMemUnit += (p.tweens.length + p.sets.length) * 50;
17298
- const totalMemUnit = nodeMemUnit + edgeMemUnit + phaseMemUnit;
17299
- if (totalMemUnit > MEMORY_BUDGET) {
17300
- push(
17301
- "memory-budget",
17302
- `diagram memory unit \u63A8\u5B9A ${totalMemUnit.toFixed(0)} > budget ${MEMORY_BUDGET} (nodes=${nodeMemUnit.toFixed(0)} edges=${edgeMemUnit.toFixed(0)} phases=${phaseMemUnit.toFixed(0)})`,
17303
- "warn"
17304
- );
17305
- }
17306
17287
  const XSS_PATTERNS = [
17307
17288
  { re: /<script\b/i, label: "<script> tag" },
17308
17289
  { re: /javascript:/i, label: "javascript: URI" },
@@ -17809,7 +17790,6 @@ function validateMetaAxes(totalCounts, diagrams = [], durations = [], reports =
17809
17790
  "row-content-typing",
17810
17791
  "terminal-safe-text",
17811
17792
  "gpu-layer-efficiency",
17812
- "memory-budget",
17813
17793
  "svg-injection-safety",
17814
17794
  "seo-metadata-quality",
17815
17795
  "bidi-hyphenation",
@@ -17879,7 +17859,6 @@ function validateMetaAxes(totalCounts, diagrams = [], durations = [], reports =
17879
17859
  "row-content-typing",
17880
17860
  "terminal-safe-text",
17881
17861
  "gpu-layer-efficiency",
17882
- "memory-budget",
17883
17862
  "svg-injection-safety",
17884
17863
  "seo-metadata-quality",
17885
17864
  "bidi-hyphenation",
@@ -17921,7 +17900,7 @@ function validateMetaAxes(totalCounts, diagrams = [], durations = [], reports =
17921
17900
  });
17922
17901
  }
17923
17902
  }
17924
- const EXPECTED_AXIS_COUNT = 68;
17903
+ const EXPECTED_AXIS_COUNT = 67;
17925
17904
  if (allAxes.length !== EXPECTED_AXIS_COUNT) {
17926
17905
  out.push({
17927
17906
  axis: "axis-documentation-completeness",