@flowgram.ai/renderer 0.2.16 → 0.2.18
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.map +1 -1
- package/dist/index.d.mts +82 -0
- package/dist/index.d.ts +82 -0
- package/dist/index.js.map +1 -1
- package/index.module.less +5 -0
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -6,6 +6,11 @@ import React from 'react';
|
|
|
6
6
|
import * as lodash from 'lodash';
|
|
7
7
|
import { ContainerModule } from 'inversify';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
11
|
+
* SPDX-License-Identifier: MIT
|
|
12
|
+
*/
|
|
13
|
+
|
|
9
14
|
interface FlowDragEntityConfig extends EntityOpts {
|
|
10
15
|
}
|
|
11
16
|
declare enum ScrollDirection {
|
|
@@ -41,6 +46,11 @@ declare class FlowDragEntity extends ConfigEntity<FlowDragEntityConfig> {
|
|
|
41
46
|
dispose(): void;
|
|
42
47
|
}
|
|
43
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
51
|
+
* SPDX-License-Identifier: MIT
|
|
52
|
+
*/
|
|
53
|
+
|
|
44
54
|
interface FlowSelectConfigEntityData {
|
|
45
55
|
selectedNodes: FlowNodeEntity[];
|
|
46
56
|
}
|
|
@@ -73,6 +83,11 @@ declare class FlowSelectConfigEntity extends ConfigEntity<FlowSelectConfigEntity
|
|
|
73
83
|
getSelectedBounds(): Rectangle;
|
|
74
84
|
}
|
|
75
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
88
|
+
* SPDX-License-Identifier: MIT
|
|
89
|
+
*/
|
|
90
|
+
|
|
76
91
|
interface SelectorBoxConfigData extends PlaygroundDragEvent {
|
|
77
92
|
disabled?: boolean;
|
|
78
93
|
}
|
|
@@ -94,6 +109,11 @@ declare class SelectorBoxConfigEntity extends ConfigEntity<SelectorBoxConfigData
|
|
|
94
109
|
toRectangle(scale: number): Rectangle;
|
|
95
110
|
}
|
|
96
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
114
|
+
* SPDX-License-Identifier: MIT
|
|
115
|
+
*/
|
|
116
|
+
|
|
97
117
|
/**
|
|
98
118
|
* 监听 dom 元素的 size 变化,用于画布节点的大小变化重新计算
|
|
99
119
|
*/
|
|
@@ -140,6 +160,11 @@ declare class FlowNodesTransformLayer extends Layer<FlowNodesTransformLayerOptio
|
|
|
140
160
|
private get renderElement();
|
|
141
161
|
}
|
|
142
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
165
|
+
* SPDX-License-Identifier: MIT
|
|
166
|
+
*/
|
|
167
|
+
|
|
143
168
|
declare enum FlowRendererComponentType {
|
|
144
169
|
REACT = 0,
|
|
145
170
|
DOM = 1,
|
|
@@ -295,6 +320,11 @@ declare class FlowLabelsLayer extends Layer {
|
|
|
295
320
|
render(): React.JSX.Element;
|
|
296
321
|
}
|
|
297
322
|
|
|
323
|
+
/**
|
|
324
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
325
|
+
* SPDX-License-Identifier: MIT
|
|
326
|
+
*/
|
|
327
|
+
|
|
298
328
|
/**
|
|
299
329
|
* 调试用,会绘出所有节点的边界
|
|
300
330
|
*/
|
|
@@ -332,6 +362,10 @@ declare class FlowDebugLayer extends Layer {
|
|
|
332
362
|
autorun(): void;
|
|
333
363
|
}
|
|
334
364
|
|
|
365
|
+
/**
|
|
366
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
367
|
+
* SPDX-License-Identifier: MIT
|
|
368
|
+
*/
|
|
335
369
|
/**
|
|
336
370
|
* 滚动条点击事件监听
|
|
337
371
|
*/
|
|
@@ -340,6 +374,11 @@ interface ScrollBarEvents {
|
|
|
340
374
|
dragStart: () => void;
|
|
341
375
|
}
|
|
342
376
|
|
|
377
|
+
/**
|
|
378
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
379
|
+
* SPDX-License-Identifier: MIT
|
|
380
|
+
*/
|
|
381
|
+
|
|
343
382
|
declare enum ScrollBarVisibility {
|
|
344
383
|
Show = "show",
|
|
345
384
|
Hidden = "hidden"
|
|
@@ -395,6 +434,11 @@ declare class FlowScrollBarLayer extends Layer<ScrollBarOptions> {
|
|
|
395
434
|
autorun(): void;
|
|
396
435
|
}
|
|
397
436
|
|
|
437
|
+
/**
|
|
438
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
439
|
+
* SPDX-License-Identifier: MIT
|
|
440
|
+
*/
|
|
441
|
+
|
|
398
442
|
interface FlowDragOptions {
|
|
399
443
|
onDrop?: (opts: {
|
|
400
444
|
dragNodes: FlowNodeEntity[];
|
|
@@ -496,6 +540,11 @@ declare class FlowSelectorBoxLayer extends Layer<FlowSelectorBoxOptions> {
|
|
|
496
540
|
private nodeSelectable;
|
|
497
541
|
}
|
|
498
542
|
|
|
543
|
+
/**
|
|
544
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
545
|
+
* SPDX-License-Identifier: MIT
|
|
546
|
+
*/
|
|
547
|
+
|
|
499
548
|
interface SelectorBoxPopoverProps {
|
|
500
549
|
bounds: Rectangle;
|
|
501
550
|
config: PlaygroundConfig;
|
|
@@ -536,6 +585,11 @@ declare class FlowSelectorBoundsLayer extends Layer<FlowSelectorBoundsLayerOptio
|
|
|
536
585
|
render(): JSX.Element;
|
|
537
586
|
}
|
|
538
587
|
|
|
588
|
+
/**
|
|
589
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
590
|
+
* SPDX-License-Identifier: MIT
|
|
591
|
+
*/
|
|
592
|
+
|
|
539
593
|
/**
|
|
540
594
|
* 流程右键菜单
|
|
541
595
|
*/
|
|
@@ -567,6 +621,11 @@ declare class FlowContextMenuLayer extends Layer {
|
|
|
567
621
|
render(): JSX.Element;
|
|
568
622
|
}
|
|
569
623
|
|
|
624
|
+
/**
|
|
625
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
626
|
+
* SPDX-License-Identifier: MIT
|
|
627
|
+
*/
|
|
628
|
+
|
|
570
629
|
/**
|
|
571
630
|
* 控制滚动边界
|
|
572
631
|
*/
|
|
@@ -576,15 +635,33 @@ declare class FlowScrollLimitLayer extends Layer {
|
|
|
576
635
|
onReady(): void;
|
|
577
636
|
}
|
|
578
637
|
|
|
638
|
+
/**
|
|
639
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
640
|
+
* SPDX-License-Identifier: MIT
|
|
641
|
+
*/
|
|
642
|
+
|
|
579
643
|
declare const FlowRendererContribution: unique symbol;
|
|
580
644
|
interface FlowRendererContribution {
|
|
581
645
|
registerRenderer?(registry: FlowRendererRegistry): void;
|
|
582
646
|
}
|
|
583
647
|
|
|
648
|
+
/**
|
|
649
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
650
|
+
* SPDX-License-Identifier: MIT
|
|
651
|
+
*/
|
|
652
|
+
|
|
584
653
|
declare const FlowRendererContainerModule: ContainerModule;
|
|
585
654
|
|
|
655
|
+
/**
|
|
656
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
657
|
+
* SPDX-License-Identifier: MIT
|
|
658
|
+
*/
|
|
586
659
|
declare const MARK_ARROW_ID = "$marker_arrow$";
|
|
587
660
|
|
|
661
|
+
/**
|
|
662
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
663
|
+
* SPDX-License-Identifier: MIT
|
|
664
|
+
*/
|
|
588
665
|
declare const MARK_ACTIVATED_ARROW_ID = "$marker_arrow_activated$";
|
|
589
666
|
|
|
590
667
|
declare function useBaseColor(): {
|
|
@@ -592,6 +669,11 @@ declare function useBaseColor(): {
|
|
|
592
669
|
baseActivatedColor: string;
|
|
593
670
|
};
|
|
594
671
|
|
|
672
|
+
/**
|
|
673
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
674
|
+
* SPDX-License-Identifier: MIT
|
|
675
|
+
*/
|
|
676
|
+
|
|
595
677
|
interface PropsType {
|
|
596
678
|
data: FlowNodeTransitionData;
|
|
597
679
|
rendererRegistry: FlowRendererRegistry;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ import React from 'react';
|
|
|
6
6
|
import * as lodash from 'lodash';
|
|
7
7
|
import { ContainerModule } from 'inversify';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
11
|
+
* SPDX-License-Identifier: MIT
|
|
12
|
+
*/
|
|
13
|
+
|
|
9
14
|
interface FlowDragEntityConfig extends EntityOpts {
|
|
10
15
|
}
|
|
11
16
|
declare enum ScrollDirection {
|
|
@@ -41,6 +46,11 @@ declare class FlowDragEntity extends ConfigEntity<FlowDragEntityConfig> {
|
|
|
41
46
|
dispose(): void;
|
|
42
47
|
}
|
|
43
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
51
|
+
* SPDX-License-Identifier: MIT
|
|
52
|
+
*/
|
|
53
|
+
|
|
44
54
|
interface FlowSelectConfigEntityData {
|
|
45
55
|
selectedNodes: FlowNodeEntity[];
|
|
46
56
|
}
|
|
@@ -73,6 +83,11 @@ declare class FlowSelectConfigEntity extends ConfigEntity<FlowSelectConfigEntity
|
|
|
73
83
|
getSelectedBounds(): Rectangle;
|
|
74
84
|
}
|
|
75
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
88
|
+
* SPDX-License-Identifier: MIT
|
|
89
|
+
*/
|
|
90
|
+
|
|
76
91
|
interface SelectorBoxConfigData extends PlaygroundDragEvent {
|
|
77
92
|
disabled?: boolean;
|
|
78
93
|
}
|
|
@@ -94,6 +109,11 @@ declare class SelectorBoxConfigEntity extends ConfigEntity<SelectorBoxConfigData
|
|
|
94
109
|
toRectangle(scale: number): Rectangle;
|
|
95
110
|
}
|
|
96
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
114
|
+
* SPDX-License-Identifier: MIT
|
|
115
|
+
*/
|
|
116
|
+
|
|
97
117
|
/**
|
|
98
118
|
* 监听 dom 元素的 size 变化,用于画布节点的大小变化重新计算
|
|
99
119
|
*/
|
|
@@ -140,6 +160,11 @@ declare class FlowNodesTransformLayer extends Layer<FlowNodesTransformLayerOptio
|
|
|
140
160
|
private get renderElement();
|
|
141
161
|
}
|
|
142
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
165
|
+
* SPDX-License-Identifier: MIT
|
|
166
|
+
*/
|
|
167
|
+
|
|
143
168
|
declare enum FlowRendererComponentType {
|
|
144
169
|
REACT = 0,
|
|
145
170
|
DOM = 1,
|
|
@@ -295,6 +320,11 @@ declare class FlowLabelsLayer extends Layer {
|
|
|
295
320
|
render(): React.JSX.Element;
|
|
296
321
|
}
|
|
297
322
|
|
|
323
|
+
/**
|
|
324
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
325
|
+
* SPDX-License-Identifier: MIT
|
|
326
|
+
*/
|
|
327
|
+
|
|
298
328
|
/**
|
|
299
329
|
* 调试用,会绘出所有节点的边界
|
|
300
330
|
*/
|
|
@@ -332,6 +362,10 @@ declare class FlowDebugLayer extends Layer {
|
|
|
332
362
|
autorun(): void;
|
|
333
363
|
}
|
|
334
364
|
|
|
365
|
+
/**
|
|
366
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
367
|
+
* SPDX-License-Identifier: MIT
|
|
368
|
+
*/
|
|
335
369
|
/**
|
|
336
370
|
* 滚动条点击事件监听
|
|
337
371
|
*/
|
|
@@ -340,6 +374,11 @@ interface ScrollBarEvents {
|
|
|
340
374
|
dragStart: () => void;
|
|
341
375
|
}
|
|
342
376
|
|
|
377
|
+
/**
|
|
378
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
379
|
+
* SPDX-License-Identifier: MIT
|
|
380
|
+
*/
|
|
381
|
+
|
|
343
382
|
declare enum ScrollBarVisibility {
|
|
344
383
|
Show = "show",
|
|
345
384
|
Hidden = "hidden"
|
|
@@ -395,6 +434,11 @@ declare class FlowScrollBarLayer extends Layer<ScrollBarOptions> {
|
|
|
395
434
|
autorun(): void;
|
|
396
435
|
}
|
|
397
436
|
|
|
437
|
+
/**
|
|
438
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
439
|
+
* SPDX-License-Identifier: MIT
|
|
440
|
+
*/
|
|
441
|
+
|
|
398
442
|
interface FlowDragOptions {
|
|
399
443
|
onDrop?: (opts: {
|
|
400
444
|
dragNodes: FlowNodeEntity[];
|
|
@@ -496,6 +540,11 @@ declare class FlowSelectorBoxLayer extends Layer<FlowSelectorBoxOptions> {
|
|
|
496
540
|
private nodeSelectable;
|
|
497
541
|
}
|
|
498
542
|
|
|
543
|
+
/**
|
|
544
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
545
|
+
* SPDX-License-Identifier: MIT
|
|
546
|
+
*/
|
|
547
|
+
|
|
499
548
|
interface SelectorBoxPopoverProps {
|
|
500
549
|
bounds: Rectangle;
|
|
501
550
|
config: PlaygroundConfig;
|
|
@@ -536,6 +585,11 @@ declare class FlowSelectorBoundsLayer extends Layer<FlowSelectorBoundsLayerOptio
|
|
|
536
585
|
render(): JSX.Element;
|
|
537
586
|
}
|
|
538
587
|
|
|
588
|
+
/**
|
|
589
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
590
|
+
* SPDX-License-Identifier: MIT
|
|
591
|
+
*/
|
|
592
|
+
|
|
539
593
|
/**
|
|
540
594
|
* 流程右键菜单
|
|
541
595
|
*/
|
|
@@ -567,6 +621,11 @@ declare class FlowContextMenuLayer extends Layer {
|
|
|
567
621
|
render(): JSX.Element;
|
|
568
622
|
}
|
|
569
623
|
|
|
624
|
+
/**
|
|
625
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
626
|
+
* SPDX-License-Identifier: MIT
|
|
627
|
+
*/
|
|
628
|
+
|
|
570
629
|
/**
|
|
571
630
|
* 控制滚动边界
|
|
572
631
|
*/
|
|
@@ -576,15 +635,33 @@ declare class FlowScrollLimitLayer extends Layer {
|
|
|
576
635
|
onReady(): void;
|
|
577
636
|
}
|
|
578
637
|
|
|
638
|
+
/**
|
|
639
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
640
|
+
* SPDX-License-Identifier: MIT
|
|
641
|
+
*/
|
|
642
|
+
|
|
579
643
|
declare const FlowRendererContribution: unique symbol;
|
|
580
644
|
interface FlowRendererContribution {
|
|
581
645
|
registerRenderer?(registry: FlowRendererRegistry): void;
|
|
582
646
|
}
|
|
583
647
|
|
|
648
|
+
/**
|
|
649
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
650
|
+
* SPDX-License-Identifier: MIT
|
|
651
|
+
*/
|
|
652
|
+
|
|
584
653
|
declare const FlowRendererContainerModule: ContainerModule;
|
|
585
654
|
|
|
655
|
+
/**
|
|
656
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
657
|
+
* SPDX-License-Identifier: MIT
|
|
658
|
+
*/
|
|
586
659
|
declare const MARK_ARROW_ID = "$marker_arrow$";
|
|
587
660
|
|
|
661
|
+
/**
|
|
662
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
663
|
+
* SPDX-License-Identifier: MIT
|
|
664
|
+
*/
|
|
588
665
|
declare const MARK_ACTIVATED_ARROW_ID = "$marker_arrow_activated$";
|
|
589
666
|
|
|
590
667
|
declare function useBaseColor(): {
|
|
@@ -592,6 +669,11 @@ declare function useBaseColor(): {
|
|
|
592
669
|
baseActivatedColor: string;
|
|
593
670
|
};
|
|
594
671
|
|
|
672
|
+
/**
|
|
673
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
674
|
+
* SPDX-License-Identifier: MIT
|
|
675
|
+
*/
|
|
676
|
+
|
|
595
677
|
interface PropsType {
|
|
596
678
|
data: FlowNodeTransitionData;
|
|
597
679
|
rendererRegistry: FlowRendererRegistry;
|