@cardenelabs/cdl 0.116.0 → 0.118.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 +74 -1
- package/dist/index.cjs +16 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +16 -4
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +16 -4
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/src/kinds/storage.tsx +14 -4
- package/src/layout/nodes.ts +6 -1
- package/src/layout/spec.ts +26 -0
- package/src/visual-validate.ts +22 -1
package/dist/index.js
CHANGED
|
@@ -12587,11 +12587,16 @@ var ROW_FONT_GENERIC = 21;
|
|
|
12587
12587
|
var STORAGE_TITLE_BASELINE = 86;
|
|
12588
12588
|
var STORAGE_TITLE_FONT = 34;
|
|
12589
12589
|
var SUBTITLE_ROW_SHIFT = 46;
|
|
12590
|
+
var STORAGE_SUBTITLE_BASELINE = 118;
|
|
12591
|
+
var STORAGE_SUBTITLE_FONT = 20;
|
|
12590
12592
|
var STORAGE_ROW_DIVIDER_Y = Math.round(
|
|
12591
12593
|
(STORAGE_TITLE_BASELINE + (ROW_TOP_STORAGE - ROW_FONT_STORAGE * GLYPH_CAP_RATIO)) / 2
|
|
12592
12594
|
);
|
|
12593
12595
|
var ROW_GLYPH_DEPTH_RATIO = 0.4;
|
|
12594
12596
|
var TITLE_ROW_MIN_GAP = GENERIC_TITLE_FONT * ROW_GLYPH_DEPTH_RATIO + ROW_FONT_GENERIC * GLYPH_CAP_RATIO;
|
|
12597
|
+
var \u547C\u3073\u540D\u3067\u4F38\u3073\u308B\u91CF = Math.round(
|
|
12598
|
+
STORAGE_SUBTITLE_BASELINE - STORAGE_TITLE_BASELINE + (STORAGE_SUBTITLE_FONT - STORAGE_TITLE_FONT) * ROW_GLYPH_DEPTH_RATIO
|
|
12599
|
+
);
|
|
12595
12600
|
function rowGlyphDepth(kind) {
|
|
12596
12601
|
if (!rendersRows(kind)) return null;
|
|
12597
12602
|
const font = kind === "storage" ? ROW_FONT_STORAGE : ROW_FONT_GENERIC;
|
|
@@ -17345,6 +17350,9 @@ function visualValidateInner(laid, diag, violations, counts, push, profile, skip
|
|
|
17345
17350
|
return { diagramId: safeDiagramId(diag), ok: false, violations, counts, profile, skippedAxes };
|
|
17346
17351
|
}
|
|
17347
17352
|
}
|
|
17353
|
+
function \u4F4D\u7F6E\u3092\u624B\u3067\u66F8\u3044\u305F(n) {
|
|
17354
|
+
return n.posX !== void 0 && n.posY !== void 0;
|
|
17355
|
+
}
|
|
17348
17356
|
function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5668) {
|
|
17349
17357
|
const LIFELINE_W_THRESHOLD = 8;
|
|
17350
17358
|
for (const n of laid.nodes) {
|
|
@@ -17418,6 +17426,7 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5
|
|
|
17418
17426
|
}
|
|
17419
17427
|
const byLane = /* @__PURE__ */ new Map();
|
|
17420
17428
|
for (const n of laid.nodes) {
|
|
17429
|
+
if (\u4F4D\u7F6E\u3092\u624B\u3067\u66F8\u3044\u305F(n)) continue;
|
|
17421
17430
|
const list = byLane.get(n.lane) ?? [];
|
|
17422
17431
|
list.push(n);
|
|
17423
17432
|
byLane.set(n.lane, list);
|
|
@@ -17762,6 +17771,7 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5
|
|
|
17762
17771
|
const byLaneCol = /* @__PURE__ */ new Map();
|
|
17763
17772
|
for (const n of laid.nodes) {
|
|
17764
17773
|
if (n.id.endsWith("-spacer") || /^s\d+-/.test(n.id)) continue;
|
|
17774
|
+
if (\u4F4D\u7F6E\u3092\u624B\u3067\u66F8\u3044\u305F(n)) continue;
|
|
17765
17775
|
const list = byLaneCol.get(n.lane) ?? [];
|
|
17766
17776
|
list.push(n);
|
|
17767
17777
|
byLaneCol.set(n.lane, list);
|
|
@@ -17838,7 +17848,7 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5
|
|
|
17838
17848
|
for (const l of laid.lanes) laneById.set(l.id, l);
|
|
17839
17849
|
for (const n of laid.nodes) {
|
|
17840
17850
|
if (n.id.endsWith("-spacer") || /^s\d+-/.test(n.id)) continue;
|
|
17841
|
-
if (n
|
|
17851
|
+
if (\u4F4D\u7F6E\u3092\u624B\u3067\u66F8\u3044\u305F(n)) continue;
|
|
17842
17852
|
const lane = laneById.get(n.lane);
|
|
17843
17853
|
if (!lane) continue;
|
|
17844
17854
|
const laneCx = lane.x + lane.width / 2;
|
|
@@ -21642,7 +21652,9 @@ function autoStorageHeight(n, defaultH) {
|
|
|
21642
21652
|
const \u5370\u3042\u308A = n.rowMarks !== void 0;
|
|
21643
21653
|
const \u547C\u3073\u540D\u306E\u5206 = n.subtitle ? SUBTITLE_ROW_SHIFT : 0;
|
|
21644
21654
|
const \u7E70\u308A\u4E0A\u3052 = n.eyebrow ? 0 : \u76EE\u5370\u306A\u3057\u306E\u7E70\u308A\u4E0A\u3052("storage");
|
|
21645
|
-
if (!n.rows || n.rows.length === 0)
|
|
21655
|
+
if (!n.rows || n.rows.length === 0) {
|
|
21656
|
+
return 115 + (n.subtitle ? \u547C\u3073\u540D\u3067\u4F38\u3073\u308B\u91CF : 0) - \u7E70\u308A\u4E0A\u3052;
|
|
21657
|
+
}
|
|
21646
21658
|
const \u5FC5\u8981 = requiredRowsHeight("storage", n.rows.length) ?? defaultH;
|
|
21647
21659
|
if (\u5370\u3042\u308A) {
|
|
21648
21660
|
const \u5E2F\u304B\u3089\u5FC5\u8981 = requiredMarkedRowsHeight("storage", n.rows.length) ?? defaultH;
|
|
@@ -24919,9 +24931,9 @@ var ROW_GLYPH_HALF = 7;
|
|
|
24919
24931
|
var ROW_GLYPH_CX = ROW_PAD_X_PX + ROW_GLYPH_HALF + 1;
|
|
24920
24932
|
var ROW_GLYPH_LEAD = 40;
|
|
24921
24933
|
var ROW_TYPE_FONT = 22;
|
|
24922
|
-
var SUBTITLE_BASELINE =
|
|
24934
|
+
var SUBTITLE_BASELINE = STORAGE_SUBTITLE_BASELINE;
|
|
24923
24935
|
var STRIPE_MIN_ROWS = 2;
|
|
24924
|
-
var SUBTITLE_FONT =
|
|
24936
|
+
var SUBTITLE_FONT = STORAGE_SUBTITLE_FONT;
|
|
24925
24937
|
var UNDERLINE_DROP = 7;
|
|
24926
24938
|
function RowGlyph({ mark, x, y, color }) {
|
|
24927
24939
|
const \u534A = ROW_GLYPH_HALF;
|