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