@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/react.cjs CHANGED
@@ -640,7 +640,7 @@ function genericTextCentered(kind, hasRows) {
640
640
  function genericTitleBaselineY(kind, h, hasRows) {
641
641
  return genericTextCentered(kind, hasRows) ? h / 2 + GENERIC_TITLE_CENTER_OFFSET : GENERIC_TITLE_TOP + genericTextShift(kind);
642
642
  }
643
- var ROW_TOP_STORAGE = 130;
643
+ var ROW_TOP_STORAGE = 152;
644
644
  var ROW_PITCH_STORAGE = 56;
645
645
  var ROW_TOP_GENERIC = 100;
646
646
  var ROW_PITCH_GENERIC = 28;
@@ -651,7 +651,8 @@ var GENERIC_TITLE_FONT = 20;
651
651
  var GLYPH_CAP_RATIO = 0.72;
652
652
  var ROW_FONT_STORAGE = 26;
653
653
  var ROW_FONT_GENERIC = 21;
654
- var STORAGE_TITLE_BASELINE = 78;
654
+ var STORAGE_TITLE_BASELINE = 86;
655
+ var STORAGE_TITLE_FONT = 34;
655
656
  var SUBTITLE_ROW_SHIFT = 46;
656
657
  var STORAGE_ROW_DIVIDER_Y = Math.round(
657
658
  (STORAGE_TITLE_BASELINE + (ROW_TOP_STORAGE - ROW_FONT_STORAGE * GLYPH_CAP_RATIO)) / 2
@@ -3846,7 +3847,7 @@ function layoutNodes(diag, lanes) {
3846
3847
  const \u6BB5\u306E\u9AD8\u3055 = rowH.get(n.stack);
3847
3848
  const \u81EA\u524D\u306E\u9AD8\u3055 = n.rowMarks !== void 0;
3848
3849
  const h = n.h ?? (\u81EA\u524D\u306E\u9AD8\u3055 ? autoStorageHeight(n, size.h) : \u6BB5\u306E\u9AD8\u3055);
3849
- const cy = \u81EA\u524D\u306E\u9AD8\u3055 ? \u6BB5\u306E\u82AF - \u6BB5\u306E\u9AD8\u3055 / 2 + h / 2 : \u6BB5\u306E\u82AF;
3850
+ const cy = \u6BB5\u306E\u82AF;
3850
3851
  const w = autoRowsWidth(n, size.w);
3851
3852
  out.push({
3852
3853
  ...n,
@@ -6045,7 +6046,7 @@ function SequenceBoardNode({
6045
6046
  const v = Number.parseInt(interpolate(node.sequenceStep, stateValues ?? {}).trim(), 10);
6046
6047
  return Number.isFinite(v) ? v : null;
6047
6048
  })();
6048
- const \u6731 = "var(--cdl-tone-accent, #2d6a8f)";
6049
+ const \u6731 = "var(--cdl-now, var(--cdl-tone-accent, #2d6a8f))";
6049
6050
  const \u58A8 = "var(--cdl-text-2, #4a5162)";
6050
6051
  const \u898B\u305F\u76EE = (i) => {
6051
6052
  if (\u73FE\u5728 === null) return { opacity: 1, color: \u6731 };
@@ -6339,9 +6340,9 @@ function FunctionNode({ node, active }) {
6339
6340
  var ROW_GLYPH_HALF = 7;
6340
6341
  var ROW_GLYPH_CX = ROW_PAD_X_PX + ROW_GLYPH_HALF + 1;
6341
6342
  var ROW_GLYPH_LEAD = 40;
6342
- var ROW_TYPE_FONT = 24;
6343
- var SUBTITLE_BASELINE = 108;
6344
- var SUBTITLE_FONT = 22;
6343
+ var ROW_TYPE_FONT = 22;
6344
+ var SUBTITLE_BASELINE = 118;
6345
+ var SUBTITLE_FONT = 20;
6345
6346
  var UNDERLINE_DROP = 7;
6346
6347
  function RowGlyph({ mark, x, y, color }) {
6347
6348
  const \u534A = ROW_GLYPH_HALF;
@@ -6368,7 +6369,7 @@ function StorageNode({
6368
6369
  const accent = nodeAccent(node, "var(--cdl-tone-accent, #2d6a8f)");
6369
6370
  const x = node.cx - node.w / 2;
6370
6371
  const y = node.cy - node.h / 2;
6371
- const \u540D\u524D = titlePlacement(node, { x: 26, y: STORAGE_TITLE_BASELINE, size: 22 }, { hasEyebrow: Boolean(node.eyebrow) });
6372
+ const \u540D\u524D = titlePlacement(node, { x: 26, y: STORAGE_TITLE_BASELINE, size: STORAGE_TITLE_FONT }, { hasEyebrow: Boolean(node.eyebrow) });
6372
6373
  const splits = rows.map((r) => splitRow(r));
6373
6374
  const leftMaxWidth = splits.reduce((m, s) => Math.max(m, displayWidth(s.left)), 0);
6374
6375
  const rightColX = ROW_PAD_X_PX + leftMaxWidth * STORAGE_CHAR_ADVANCE_PX + STORAGE_COL_GAP_PX;
@@ -24275,11 +24276,9 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes) {
24275
24276
  for (const [stack, group] of byStack) {
24276
24277
  if (group.length < 2) continue;
24277
24278
  const cy0 = group[0].cy;
24278
- const top0 = cy0 - (group[0].h ?? 0) / 2;
24279
24279
  for (const n of group.slice(1)) {
24280
24280
  const diff = Math.abs(n.cy - cy0);
24281
- const topDiff = Math.abs(n.cy - (n.h ?? 0) / 2 - top0);
24282
- if (diff > MIN_ROW_ALIGNMENT_TOLERANCE && topDiff > MIN_ROW_ALIGNMENT_TOLERANCE) {
24281
+ if (diff > MIN_ROW_ALIGNMENT_TOLERANCE) {
24283
24282
  push(
24284
24283
  "row-alignment",
24285
24284
  `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})`
@@ -25328,18 +25327,24 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes) {
25328
25327
  if (group.length < 3) continue;
25329
25328
  const sorted = [...group].sort((a, b) => a.cy - b.cy);
25330
25329
  const gaps = [];
25331
- const tops = [];
25332
25330
  for (let i = 1; i < sorted.length; i++) {
25333
25331
  const prev = sorted[i - 1];
25334
25332
  const cur = sorted[i];
25335
25333
  gaps.push(cur.cy - cur.h / 2 - (prev.cy + prev.h / 2));
25336
- tops.push(cur.cy - cur.h / 2 - (prev.cy - prev.h / 2));
25337
25334
  }
25338
25335
  const maxGap = Math.max(...gaps);
25339
25336
  const minGap = Math.min(...gaps);
25340
25337
  const variance = maxGap - minGap;
25341
- const topVariance = Math.max(...tops) - Math.min(...tops);
25342
- if (variance > COLUMN_GAP_VARIANCE_TOL && topVariance > COLUMN_GAP_VARIANCE_TOL) {
25338
+ const \u683C\u5B50\u306B\u7F6E\u304F = group.every((n) => n.rowMarks !== void 0);
25339
+ const \u7AEF\u304C\u8DB3\u308A\u3066\u3044\u308B = minGap >= requiredNearClearance("node", "node");
25340
+ if (\u683C\u5B50\u306B\u7F6E\u304F) {
25341
+ if (!\u7AEF\u304C\u8DB3\u308A\u3066\u3044\u308B) {
25342
+ push(
25343
+ "column-gap-uniform",
25344
+ `lane "${laneId}" \u5185 node \u9593\u306E\u7AEF\u9593 gap ${minGap.toFixed(0)} world \u304C\u4E0B\u9650 ${requiredNearClearance("node", "node")} \u3092\u5272\u308B`
25345
+ );
25346
+ }
25347
+ } else if (variance > COLUMN_GAP_VARIANCE_TOL) {
25343
25348
  push(
25344
25349
  "column-gap-uniform",
25345
25350
  `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)})`