@cardenelabs/cdl 0.26.0 → 0.28.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/CHANGELOG.md +99 -1
- package/dist/index.cjs +21 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +21 -3
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +11 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +11 -1
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/src/layout/nodes.ts +8 -4
- package/src/layout/spec.ts +31 -3
- package/src/presets.ts +40 -2
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)
|
|
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) {
|