@cardenelabs/cdl 0.103.0 → 0.104.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.103.0",
3
+ "version": "0.104.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",
@@ -2363,9 +2363,15 @@ function runAxes(
2363
2363
  // 判定 = viewBox 外に node bbox が飛ぶと clip されて視覚破綻。 node bbox (cx±w/2, cy±h/2) の
2364
2364
  // いずれかの辺が viewBox 外なら error。 Axis 14 は edge-label 対象、 本 axis は node 対象で棲み分け。
2365
2365
  // spacer node (id endsWith "-spacer" or /^s\d+-/) は layout 補助用の非表示 node なので判定対象外。
2366
+ //
2367
+ // **描かない node も対象外** (#945)。 板は `isRenderedNode` で描く node だけに寄せる
2368
+ // (`layout/viewbox.ts`) ので、隠れる node を判定に入れると板の外に在ると数える。
2369
+ // 0.93.0 (#924) で板が中身に寄るようになってから、`visibleIf: "0"` の置き石だけを持つ図
2370
+ // (読み取り盤の見本 17 枚) が全て誤りとして挙がっていた。 判定は板と同じ述語を引く。
2366
2371
  // ───────────────────────────────────────────────────────────
2367
2372
  for (const n of laid.nodes) {
2368
2373
  if (n.id.endsWith("-spacer") || /^s\d+-/.test(n.id)) continue;
2374
+ if (!isRenderedNode(n)) continue;
2369
2375
  const nodeLeft = n.cx - n.w / 2;
2370
2376
  const nodeTop = n.cy - n.h / 2;
2371
2377
  const nodeRight = n.cx + n.w / 2;