@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cardenelabs/cdl",
3
- "version": "0.40.12",
3
+ "version": "0.41.0",
4
4
  "description": "CDL (Chainome Diagram Language). Mermaid-like declarative DSL that compiles to animated SVG diagrams. Built for blockchain / Solidity flows, generic enough for sequence / flow / state / ER / topology diagrams.",
5
5
  "license": "MIT",
6
6
  "author": "cardene777",
@@ -325,7 +325,6 @@ export type VisualAxis =
325
325
  | "row-content-typing"
326
326
  | "terminal-safe-text"
327
327
  | "gpu-layer-efficiency"
328
- | "memory-budget"
329
328
  // CAR-Z8 (PR #87) 追加 = XSS / SEO / bidi / structured-data 4 領域。
330
329
  | "svg-injection-safety"
331
330
  | "seo-metadata-quality"
@@ -479,7 +478,6 @@ function emptyCounts(): Record<VisualAxis, number> {
479
478
  "row-content-typing": 0,
480
479
  "terminal-safe-text": 0,
481
480
  "gpu-layer-efficiency": 0,
482
- "memory-budget": 0,
483
481
  "svg-injection-safety": 0,
484
482
  "seo-metadata-quality": 0,
485
483
  "bidi-hyphenation": 0,
@@ -3630,32 +3628,6 @@ function runAxes(
3630
3628
  );
3631
3629
  }
3632
3630
 
3633
- // ───────────────────────────────────────────────────────────
3634
- // Axis 40: memory-budget (diagram size 総和による React re-render 負荷)
3635
- //
3636
- // 判定 = nodes×h×w + edges×path segment 数 + phases×(tweens + sets 数) の推定 memory 単位
3637
- // が MEMORY_BUDGET (10^7) を超えると React re-render で GC pressure。 catalog 内 diagram は
3638
- // 10^5-10^6 が実測、 10^7 で明確な破綻。
3639
- // ───────────────────────────────────────────────────────────
3640
- const MEMORY_BUDGET = 1_000_000;
3641
- let nodeMemUnit = 0;
3642
- for (const n of laid.nodes) nodeMemUnit += n.w * n.h;
3643
- let edgeMemUnit = 0;
3644
- for (const e of laid.edges) {
3645
- const segs = extractPathSegments(e.d);
3646
- edgeMemUnit += segs.length * 100; // 1 segment ≈ 100 memory unit (SVG path + marker + label)
3647
- }
3648
- let phaseMemUnit = 0;
3649
- for (const p of diag.phases) phaseMemUnit += (p.tweens.length + p.sets.length) * 50;
3650
- const totalMemUnit = nodeMemUnit + edgeMemUnit + phaseMemUnit;
3651
- if (totalMemUnit > MEMORY_BUDGET) {
3652
- push(
3653
- "memory-budget",
3654
- `diagram memory unit 推定 ${totalMemUnit.toFixed(0)} > budget ${MEMORY_BUDGET} (nodes=${nodeMemUnit.toFixed(0)} edges=${edgeMemUnit.toFixed(0)} phases=${phaseMemUnit.toFixed(0)})`,
3655
- "warn",
3656
- );
3657
- }
3658
-
3659
3631
  // ───────────────────────────────────────────────────────────
3660
3632
  // Axis 41: svg-injection-safety (XSS / script injection 検知、 error severity)
3661
3633
  //
@@ -4463,7 +4435,6 @@ function validateMetaAxes(
4463
4435
  "row-content-typing",
4464
4436
  "terminal-safe-text",
4465
4437
  "gpu-layer-efficiency",
4466
- "memory-budget",
4467
4438
  "svg-injection-safety",
4468
4439
  "seo-metadata-quality",
4469
4440
  "bidi-hyphenation",
@@ -4533,7 +4504,6 @@ function validateMetaAxes(
4533
4504
  "row-content-typing",
4534
4505
  "terminal-safe-text",
4535
4506
  "gpu-layer-efficiency",
4536
- "memory-budget",
4537
4507
  "svg-injection-safety",
4538
4508
  "seo-metadata-quality",
4539
4509
  "bidi-hyphenation",
@@ -4583,8 +4553,9 @@ function validateMetaAxes(
4583
4553
  // 以前は comment に 69、 定数に 68 と別の数が書かれており、 どちらが正か読めなかった。
4584
4554
  //
4585
4555
  // 削除済 = engine-meta 51 (mermaid-parity、 #366) / 軸 29 (svg-filter-integrity) /
4586
- // 軸 30 (neumorphism-shadow-budget、 どちらも #426 で主題の廃止に伴い削除)。
4587
- const EXPECTED_AXIS_COUNT = 68;
4556
+ // 軸 30 (neumorphism-shadow-budget、 どちらも #426 で主題の廃止に伴い削除) /
4557
+ // 軸 40 (memory-budget、 #775 で軸 34 に一本化)。
4558
+ const EXPECTED_AXIS_COUNT = 67;
4588
4559
  if (allAxes.length !== EXPECTED_AXIS_COUNT) {
4589
4560
  out.push({
4590
4561
  axis: "axis-documentation-completeness",