@cardenelabs/cdl 0.115.0 → 0.116.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 +40 -1
- package/dist/index.cjs +41 -3
- 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 +41 -4
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +4 -2
- 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 +4 -2
- 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/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];
|