@cardenelabs/cdl 0.25.0 → 0.27.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/dist/react.cjs CHANGED
@@ -671,6 +671,7 @@ function rowGlyphDepth(kind) {
671
671
  return Math.ceil(font * ROW_GLYPH_DEPTH_RATIO);
672
672
  }
673
673
  var ROW_LAYOUT_BOTTOM_PAD = 20;
674
+ var ROW_STRIPE_BOTTOM_PAD = 24;
674
675
  function requiredRowsHeight(kind, rowCount) {
675
676
  if (rowCount <= 0) return null;
676
677
  const lastBaseline = rowBaselineY(kind, rowCount - 1);
@@ -678,6 +679,12 @@ function requiredRowsHeight(kind, rowCount) {
678
679
  const pitch = ROW_PITCH_STORAGE ;
679
680
  return lastBaseline + pitch + ROW_LAYOUT_BOTTOM_PAD;
680
681
  }
682
+ function requiredMarkedRowsHeight(kind, rowCount) {
683
+ if (rowCount <= 0) return null;
684
+ const lastBand = rowStripeBand(kind, rowCount - 1, 0);
685
+ if (lastBand === null) return null;
686
+ return lastBand.y + lastBand.h + ROW_STRIPE_BOTTOM_PAD;
687
+ }
681
688
  function isRenderedNode(n) {
682
689
  if (n.visibleIf === void 0 || n.visibleIf === "") return true;
683
690
  if (n.visibleIf.includes("{")) return true;
@@ -8687,7 +8694,10 @@ function autoStorageHeight(n, defaultH) {
8687
8694
  const \u7E70\u308A\u4E0A\u3052 = n.eyebrow ? 0 : \u76EE\u5370\u306A\u3057\u306E\u7E70\u308A\u4E0A\u3052("storage");
8688
8695
  if (!n.rows || n.rows.length === 0) return 115 + \u547C\u3073\u540D\u306E\u5206 - \u7E70\u308A\u4E0A\u3052;
8689
8696
  const \u5FC5\u8981 = requiredRowsHeight("storage", n.rows.length) ?? defaultH;
8690
- if (\u5370\u3042\u308A) return \u5FC5\u8981 + \u547C\u3073\u540D\u306E\u5206;
8697
+ if (\u5370\u3042\u308A) {
8698
+ const \u5E2F\u304B\u3089\u5FC5\u8981 = requiredMarkedRowsHeight("storage", n.rows.length) ?? defaultH;
8699
+ return \u5E2F\u304B\u3089\u5FC5\u8981 + \u547C\u3073\u540D\u306E\u5206;
8700
+ }
8691
8701
  return Math.max(defaultH, \u5FC5\u8981);
8692
8702
  }
8693
8703
  function autoRowsWidth(n, defaultW) {
@@ -10269,6 +10279,7 @@ var ROW_GLYPH_CX = ROW_PAD_X_PX + ROW_GLYPH_HALF + 1;
10269
10279
  var ROW_GLYPH_LEAD = 40;
10270
10280
  var ROW_TYPE_FONT = 22;
10271
10281
  var SUBTITLE_BASELINE = 118;
10282
+ var STRIPE_MIN_ROWS = 2;
10272
10283
  var SUBTITLE_FONT = 20;
10273
10284
  var UNDERLINE_DROP = 7;
10274
10285
  function RowGlyph({ mark, x, y, color }) {
@@ -10326,7 +10337,7 @@ function StorageNode({
10326
10337
  strokeWidth: active ? 3 : 1.25
10327
10338
  }
10328
10339
  ),
10329
- node.rowStripe && rows.map((_, idx) => {
10340
+ node.rowStripe && rows.length >= STRIPE_MIN_ROWS && rows.map((_, idx) => {
10330
10341
  if (idx % 2 !== 0) return null;
10331
10342
  const \u5E2F = rowStripeBand("storage", idx, \u884C\u306E\u4E0B\u3052);
10332
10343
  if (!\u5E2F) return null;