@cardenelabs/cdl 0.17.0 → 0.17.1

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/dist/index.js CHANGED
@@ -11801,7 +11801,7 @@ function genericTextCentered(kind, hasRows) {
11801
11801
  function genericTitleBaselineY(kind, h, hasRows) {
11802
11802
  return genericTextCentered(kind, hasRows) ? h / 2 + GENERIC_TITLE_CENTER_OFFSET : GENERIC_TITLE_TOP + genericTextShift(kind);
11803
11803
  }
11804
- var ROW_TOP_STORAGE = 130;
11804
+ var ROW_TOP_STORAGE = 152;
11805
11805
  var ROW_PITCH_STORAGE = 56;
11806
11806
  var ROW_TOP_GENERIC = 100;
11807
11807
  var ROW_PITCH_GENERIC = 28;
@@ -11812,7 +11812,8 @@ var GENERIC_TITLE_FONT = 20;
11812
11812
  var GLYPH_CAP_RATIO = 0.72;
11813
11813
  var ROW_FONT_STORAGE = 26;
11814
11814
  var ROW_FONT_GENERIC = 21;
11815
- var STORAGE_TITLE_BASELINE = 78;
11815
+ var STORAGE_TITLE_BASELINE = 86;
11816
+ var STORAGE_TITLE_FONT = 34;
11816
11817
  var SUBTITLE_ROW_SHIFT = 46;
11817
11818
  var STORAGE_ROW_DIVIDER_Y = Math.round(
11818
11819
  (STORAGE_TITLE_BASELINE + (ROW_TOP_STORAGE - ROW_FONT_STORAGE * GLYPH_CAP_RATIO)) / 2
@@ -15180,7 +15181,7 @@ function layoutNodes(diag, lanes) {
15180
15181
  const \u6BB5\u306E\u9AD8\u3055 = rowH.get(n.stack);
15181
15182
  const \u81EA\u524D\u306E\u9AD8\u3055 = n.rowMarks !== void 0;
15182
15183
  const h = n.h ?? (\u81EA\u524D\u306E\u9AD8\u3055 ? autoStorageHeight(n, size.h) : \u6BB5\u306E\u9AD8\u3055);
15183
- const cy = \u81EA\u524D\u306E\u9AD8\u3055 ? \u6BB5\u306E\u82AF - \u6BB5\u306E\u9AD8\u3055 / 2 + h / 2 : \u6BB5\u306E\u82AF;
15184
+ const cy = \u6BB5\u306E\u82AF;
15184
15185
  const w = autoRowsWidth(n, size.w);
15185
15186
  out.push({
15186
15187
  ...n,
@@ -18679,11 +18680,9 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes) {
18679
18680
  for (const [stack, group] of byStack) {
18680
18681
  if (group.length < 2) continue;
18681
18682
  const cy0 = group[0].cy;
18682
- const top0 = cy0 - (group[0].h ?? 0) / 2;
18683
18683
  for (const n of group.slice(1)) {
18684
18684
  const diff = Math.abs(n.cy - cy0);
18685
- const topDiff = Math.abs(n.cy - (n.h ?? 0) / 2 - top0);
18686
- if (diff > MIN_ROW_ALIGNMENT_TOLERANCE && topDiff > MIN_ROW_ALIGNMENT_TOLERANCE) {
18685
+ if (diff > MIN_ROW_ALIGNMENT_TOLERANCE) {
18687
18686
  push(
18688
18687
  "row-alignment",
18689
18688
  `stack=${stack} row \u5185 node "${n.id}" cy=${n.cy.toFixed(1)} \u304C row \u57FA\u6E96 cy=${cy0.toFixed(1)} \u3068 ${diff.toFixed(1)} world \u5DEE (\u8A31\u5BB9 ${MIN_ROW_ALIGNMENT_TOLERANCE})`
@@ -19732,18 +19731,24 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes) {
19732
19731
  if (group.length < 3) continue;
19733
19732
  const sorted = [...group].sort((a, b) => a.cy - b.cy);
19734
19733
  const gaps = [];
19735
- const tops = [];
19736
19734
  for (let i = 1; i < sorted.length; i++) {
19737
19735
  const prev = sorted[i - 1];
19738
19736
  const cur = sorted[i];
19739
19737
  gaps.push(cur.cy - cur.h / 2 - (prev.cy + prev.h / 2));
19740
- tops.push(cur.cy - cur.h / 2 - (prev.cy - prev.h / 2));
19741
19738
  }
19742
19739
  const maxGap = Math.max(...gaps);
19743
19740
  const minGap = Math.min(...gaps);
19744
19741
  const variance = maxGap - minGap;
19745
- const topVariance = Math.max(...tops) - Math.min(...tops);
19746
- if (variance > COLUMN_GAP_VARIANCE_TOL && topVariance > COLUMN_GAP_VARIANCE_TOL) {
19742
+ const \u683C\u5B50\u306B\u7F6E\u304F = group.every((n) => n.rowMarks !== void 0);
19743
+ const \u7AEF\u304C\u8DB3\u308A\u3066\u3044\u308B = minGap >= requiredNearClearance("node", "node");
19744
+ if (\u683C\u5B50\u306B\u7F6E\u304F) {
19745
+ if (!\u7AEF\u304C\u8DB3\u308A\u3066\u3044\u308B) {
19746
+ push(
19747
+ "column-gap-uniform",
19748
+ `lane "${laneId}" \u5185 node \u9593\u306E\u7AEF\u9593 gap ${minGap.toFixed(0)} world \u304C\u4E0B\u9650 ${requiredNearClearance("node", "node")} \u3092\u5272\u308B`
19749
+ );
19750
+ }
19751
+ } else if (variance > COLUMN_GAP_VARIANCE_TOL) {
19747
19752
  push(
19748
19753
  "column-gap-uniform",
19749
19754
  `lane "${laneId}" \u5185 node \u9593\u306E\u7AEF\u9593 gap variance ${variance.toFixed(1)} world \u304C spec ${COLUMN_GAP_VARIANCE_TOL} \u8D85\u904E (min=${minGap.toFixed(0)} max=${maxGap.toFixed(0)})`
@@ -21687,7 +21692,7 @@ function SequenceBoardNode({
21687
21692
  const v = Number.parseInt(interpolate(node.sequenceStep, stateValues ?? {}).trim(), 10);
21688
21693
  return Number.isFinite(v) ? v : null;
21689
21694
  })();
21690
- const \u6731 = "var(--cdl-tone-accent, #2d6a8f)";
21695
+ const \u6731 = "var(--cdl-now, var(--cdl-tone-accent, #2d6a8f))";
21691
21696
  const \u58A8 = "var(--cdl-text-2, #4a5162)";
21692
21697
  const \u898B\u305F\u76EE = (i) => {
21693
21698
  if (\u73FE\u5728 === null) return { opacity: 1, color: \u6731 };
@@ -21981,9 +21986,9 @@ function FunctionNode({ node, active }) {
21981
21986
  var ROW_GLYPH_HALF = 7;
21982
21987
  var ROW_GLYPH_CX = ROW_PAD_X_PX + ROW_GLYPH_HALF + 1;
21983
21988
  var ROW_GLYPH_LEAD = 40;
21984
- var ROW_TYPE_FONT = 24;
21985
- var SUBTITLE_BASELINE = 108;
21986
- var SUBTITLE_FONT = 22;
21989
+ var ROW_TYPE_FONT = 22;
21990
+ var SUBTITLE_BASELINE = 118;
21991
+ var SUBTITLE_FONT = 20;
21987
21992
  var UNDERLINE_DROP = 7;
21988
21993
  function RowGlyph({ mark, x, y, color }) {
21989
21994
  const \u534A = ROW_GLYPH_HALF;
@@ -22010,7 +22015,7 @@ function StorageNode({
22010
22015
  const accent = nodeAccent(node, "var(--cdl-tone-accent, #2d6a8f)");
22011
22016
  const x = node.cx - node.w / 2;
22012
22017
  const y = node.cy - node.h / 2;
22013
- const \u540D\u524D = titlePlacement(node, { x: 26, y: STORAGE_TITLE_BASELINE, size: 22 }, { hasEyebrow: Boolean(node.eyebrow) });
22018
+ const \u540D\u524D = titlePlacement(node, { x: 26, y: STORAGE_TITLE_BASELINE, size: STORAGE_TITLE_FONT }, { hasEyebrow: Boolean(node.eyebrow) });
22014
22019
  const splits = rows.map((r) => splitRow(r));
22015
22020
  const leftMaxWidth = splits.reduce((m, s) => Math.max(m, displayWidth(s.left)), 0);
22016
22021
  const rightColX = ROW_PAD_X_PX + leftMaxWidth * STORAGE_CHAR_ADVANCE_PX + STORAGE_COL_GAP_PX;