@flowgram.ai/document 0.3.6 → 0.4.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/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -879,6 +879,10 @@ interface Vertex extends IPoint {
|
|
|
879
879
|
radiusY?: number;
|
|
880
880
|
moveX?: number;
|
|
881
881
|
moveY?: number;
|
|
882
|
+
/**
|
|
883
|
+
* Strategy for handling arc curvature when space is insufficient, defaults to compress
|
|
884
|
+
*/
|
|
885
|
+
radiusOverflow?: 'compress' | 'truncate';
|
|
882
886
|
}
|
|
883
887
|
interface FlowTransitionLine {
|
|
884
888
|
type: FlowTransitionLineEnum;
|
|
@@ -908,6 +912,14 @@ interface FlowTransitionLabel {
|
|
|
908
912
|
offset: IPoint;
|
|
909
913
|
width?: number;
|
|
910
914
|
rotate?: string;
|
|
915
|
+
/**
|
|
916
|
+
* Anchor point for positioning, relative to the label's bounding box
|
|
917
|
+
* 重心偏移量,相对于标签边界框
|
|
918
|
+
*
|
|
919
|
+
* Format: [x, y] / 格式:[x, y]
|
|
920
|
+
* Default Value: [0.5, 0.5] indicates center / 默认值:[0.5, 0.5] 表示居中
|
|
921
|
+
*/
|
|
922
|
+
origin?: [number, number];
|
|
911
923
|
props?: Record<string, any>;
|
|
912
924
|
labelId?: string;
|
|
913
925
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -879,6 +879,10 @@ interface Vertex extends IPoint {
|
|
|
879
879
|
radiusY?: number;
|
|
880
880
|
moveX?: number;
|
|
881
881
|
moveY?: number;
|
|
882
|
+
/**
|
|
883
|
+
* Strategy for handling arc curvature when space is insufficient, defaults to compress
|
|
884
|
+
*/
|
|
885
|
+
radiusOverflow?: 'compress' | 'truncate';
|
|
882
886
|
}
|
|
883
887
|
interface FlowTransitionLine {
|
|
884
888
|
type: FlowTransitionLineEnum;
|
|
@@ -908,6 +912,14 @@ interface FlowTransitionLabel {
|
|
|
908
912
|
offset: IPoint;
|
|
909
913
|
width?: number;
|
|
910
914
|
rotate?: string;
|
|
915
|
+
/**
|
|
916
|
+
* Anchor point for positioning, relative to the label's bounding box
|
|
917
|
+
* 重心偏移量,相对于标签边界框
|
|
918
|
+
*
|
|
919
|
+
* Format: [x, y] / 格式:[x, y]
|
|
920
|
+
* Default Value: [0.5, 0.5] indicates center / 默认值:[0.5, 0.5] 表示居中
|
|
921
|
+
*/
|
|
922
|
+
origin?: [number, number];
|
|
911
923
|
props?: Record<string, any>;
|
|
912
924
|
labelId?: string;
|
|
913
925
|
}
|
package/dist/index.js
CHANGED
|
@@ -194,7 +194,8 @@ var DEFAULT_SPACING = {
|
|
|
194
194
|
// block 底部留白
|
|
195
195
|
INLINE_BLOCKS_PADDING_TOP: 30,
|
|
196
196
|
// block list 上部留白间距
|
|
197
|
-
|
|
197
|
+
// JS 浮点数有误差,1046.6 -1006.6 = 39.9999999,会导致 间距/20 < 2 导致布局计算问题,因此需要额外增加 0.1 像素
|
|
198
|
+
[DefaultSpacingKey.INLINE_BLOCKS_PADDING_BOTTOM]: 40.1,
|
|
198
199
|
// block lit 下部留白间距,因为有两个拐弯,所以翻一倍
|
|
199
200
|
MIN_INLINE_BLOCK_SPACING: 200,
|
|
200
201
|
// 分支间最小边距 (垂直布局)
|