@cardenelabs/cdl 0.115.0 → 0.117.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 +69 -1
- package/dist/index.cjs +47 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -3
- package/dist/index.d.ts +23 -3
- package/dist/index.js +47 -5
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +10 -3
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +10 -3
- package/dist/react.js.map +1 -1
- package/dist/{render-oEmwYN-q.d.cts → render-A5AKjNuy.d.cts} +1 -1
- package/dist/{render-oEmwYN-q.d.ts → render-A5AKjNuy.d.ts} +1 -1
- package/package.json +1 -1
- package/src/index.ts +3 -0
- package/src/kinds/tree.tsx +78 -2
- package/src/presets.ts +5 -1
- package/src/visual-validate.ts +22 -1
package/dist/react.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
export {
|
|
2
|
+
export { t as CdlDiagramView, o as CdlDiagramViewProps } from './render-A5AKjNuy.cjs';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
export {
|
|
2
|
+
export { t as CdlDiagramView, o as CdlDiagramViewProps } from './render-A5AKjNuy.js';
|
package/dist/react.js
CHANGED
|
@@ -4699,6 +4699,8 @@ var PAD_TOP = 40;
|
|
|
4699
4699
|
var PAD_RIGHT = 24;
|
|
4700
4700
|
var PAD_BOTTOM = 40;
|
|
4701
4701
|
var PAD_LEFT = 24;
|
|
4702
|
+
var \u7BB1\u306E\u6700\u5927\u5E45 = 140;
|
|
4703
|
+
var \u7BB1\u306E\u6700\u5927\u9AD8\u3055 = 38;
|
|
4702
4704
|
var \u6728\u306E\u679D\u306E\u592A\u3055 = (\u6BB5) => Math.max(1.1, 2.6 - \u6BB5 * 0.45);
|
|
4703
4705
|
function \u6728\u306E\u4E2D\u8EAB(node, stateValues = {}) {
|
|
4704
4706
|
const treeNodes = resolveTreeData(node.treeData ?? [], stateValues);
|
|
@@ -4902,8 +4904,8 @@ function computeTreeLayout(treeNodes, canvasW, canvasH) {
|
|
|
4902
4904
|
);
|
|
4903
4905
|
const depthGap = canvasH / Math.max(maxDepth + 1, 1);
|
|
4904
4906
|
const slotW = canvasW / totalLeaves;
|
|
4905
|
-
const nodeH = Math.min(
|
|
4906
|
-
const nodeW = Math.min(
|
|
4907
|
+
const nodeH = Math.min(\u7BB1\u306E\u6700\u5927\u9AD8\u3055, depthGap * 0.7);
|
|
4908
|
+
const nodeW = Math.min(\u7BB1\u306E\u6700\u5927\u5E45, slotW * 0.85);
|
|
4907
4909
|
const \u7BB1\u306E\u5E45 = (n, depth) => {
|
|
4908
4910
|
const \u6750\u6599 = \u6728\u306E\u884C({ ...n, depth });
|
|
4909
4911
|
const \u540D\u524D = \u6750\u6599[0];
|
|
@@ -6216,6 +6218,9 @@ function visualValidateInner(laid, diag, violations, counts, push, profile, skip
|
|
|
6216
6218
|
return { diagramId: safeDiagramId(diag), ok: false, violations, counts, profile, skippedAxes };
|
|
6217
6219
|
}
|
|
6218
6220
|
}
|
|
6221
|
+
function \u4F4D\u7F6E\u3092\u624B\u3067\u66F8\u3044\u305F(n) {
|
|
6222
|
+
return n.posX !== void 0 && n.posY !== void 0;
|
|
6223
|
+
}
|
|
6219
6224
|
function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5668) {
|
|
6220
6225
|
const LIFELINE_W_THRESHOLD = 8;
|
|
6221
6226
|
for (const n of laid.nodes) {
|
|
@@ -6289,6 +6294,7 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5
|
|
|
6289
6294
|
}
|
|
6290
6295
|
const byLane = /* @__PURE__ */ new Map();
|
|
6291
6296
|
for (const n of laid.nodes) {
|
|
6297
|
+
if (\u4F4D\u7F6E\u3092\u624B\u3067\u66F8\u3044\u305F(n)) continue;
|
|
6292
6298
|
const list = byLane.get(n.lane) ?? [];
|
|
6293
6299
|
list.push(n);
|
|
6294
6300
|
byLane.set(n.lane, list);
|
|
@@ -6633,6 +6639,7 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5
|
|
|
6633
6639
|
const byLaneCol = /* @__PURE__ */ new Map();
|
|
6634
6640
|
for (const n of laid.nodes) {
|
|
6635
6641
|
if (n.id.endsWith("-spacer") || /^s\d+-/.test(n.id)) continue;
|
|
6642
|
+
if (\u4F4D\u7F6E\u3092\u624B\u3067\u66F8\u3044\u305F(n)) continue;
|
|
6636
6643
|
const list = byLaneCol.get(n.lane) ?? [];
|
|
6637
6644
|
list.push(n);
|
|
6638
6645
|
byLaneCol.set(n.lane, list);
|
|
@@ -6709,7 +6716,7 @@ function runAxes(laid, diag, violations, counts, push, profile, skippedAxes, \u5
|
|
|
6709
6716
|
for (const l of laid.lanes) laneById.set(l.id, l);
|
|
6710
6717
|
for (const n of laid.nodes) {
|
|
6711
6718
|
if (n.id.endsWith("-spacer") || /^s\d+-/.test(n.id)) continue;
|
|
6712
|
-
if (n
|
|
6719
|
+
if (\u4F4D\u7F6E\u3092\u624B\u3067\u66F8\u3044\u305F(n)) continue;
|
|
6713
6720
|
const lane = laneById.get(n.lane);
|
|
6714
6721
|
if (!lane) continue;
|
|
6715
6722
|
const laneCx = lane.x + lane.width / 2;
|