@arronqzy/abuilder 1.1.4 → 1.1.6
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/README.md +30 -5
- package/dist/styles.css +85 -65
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# @arronqzy/abuilder
|
|
2
2
|
|
|
3
|
-
Abuilder
|
|
3
|
+
Abuilder **一站式可视化编辑器** npm 包。安装后在 React 应用中引入 `App` 即可渲染完整应用(视图画布 + 蓝图 + 工作区 + 在线预览)。
|
|
4
|
+
|
|
5
|
+
## 功能概览
|
|
6
|
+
|
|
7
|
+
- **视图编辑**:拖拽物料、图层、缩放平移、多选、图表与 Scope 配置
|
|
8
|
+
- **蓝图编辑**:节点连线、调试执行、蓝图库与执行日志
|
|
9
|
+
- **工作区**:多项目、IndexedDB 持久化、导入导出
|
|
10
|
+
- **在线预览**:独立预览页,支持 URL 参数打开指定工作区
|
|
4
11
|
|
|
5
12
|
## 安装
|
|
6
13
|
|
|
@@ -32,22 +39,40 @@ createRoot(document.getElementById("root")!).render(<App />);
|
|
|
32
39
|
|
|
33
40
|
### 在线预览
|
|
34
41
|
|
|
35
|
-
URL 带 `?preview=online&projectId=<工作区ID>`
|
|
42
|
+
URL 带 `?preview=online&projectId=<工作区ID>` 时自动进入预览模式:
|
|
36
43
|
|
|
37
44
|
```tsx
|
|
38
45
|
<App previewSearch="?preview=online&projectId=xxx" />
|
|
39
46
|
```
|
|
40
47
|
|
|
41
|
-
|
|
48
|
+
### 高级导出
|
|
42
49
|
|
|
43
|
-
除 `App`
|
|
50
|
+
除 `App` 外,也可单独使用底层组件:
|
|
44
51
|
|
|
45
52
|
```tsx
|
|
46
|
-
import {
|
|
53
|
+
import {
|
|
54
|
+
ReactViewPanel,
|
|
55
|
+
ReactViewOnlinePreview,
|
|
56
|
+
} from "@arronqzy/abuilder";
|
|
47
57
|
```
|
|
48
58
|
|
|
59
|
+
## Monorepo 包结构
|
|
60
|
+
|
|
61
|
+
| 包 | 职责 |
|
|
62
|
+
|----|------|
|
|
63
|
+
| `@arronqzy/abuilder` | 聚合入口(本包) |
|
|
64
|
+
| `@arronqzy/react-view` | 视图画布与工作区 |
|
|
65
|
+
| `@arronqzy/react-blueprint` | 蓝图编辑器 UI |
|
|
66
|
+
| `@arronqzy/blueprint-dsl` | 蓝图 DSL 与运行时 |
|
|
67
|
+
| `@arronqzy/rx-store` | 画布状态与 Undo/Redo |
|
|
68
|
+
| `@arronqzy/ui` | 共享 UI 组件 |
|
|
69
|
+
|
|
49
70
|
## 宿主应用要求
|
|
50
71
|
|
|
51
72
|
- React 18+
|
|
52
73
|
- 构建工具需支持 CSS 导入(Vite / Webpack 5 等)
|
|
53
74
|
- 根节点容器建议 `height: 100%`(样式已包含 `#root` / `#app` 规则)
|
|
75
|
+
|
|
76
|
+
## 许可证
|
|
77
|
+
|
|
78
|
+
MIT
|
package/dist/styles.css
CHANGED
|
@@ -754,14 +754,14 @@ body {
|
|
|
754
754
|
z-index: 10000;
|
|
755
755
|
}
|
|
756
756
|
|
|
757
|
-
.z-\[100\] {
|
|
758
|
-
z-index: 100;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
757
|
.z-\[1\] {
|
|
762
758
|
z-index: 1;
|
|
763
759
|
}
|
|
764
760
|
|
|
761
|
+
.z-toast {
|
|
762
|
+
z-index: 99999;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
765
|
.-mx-1 {
|
|
766
766
|
margin-left: -0.25rem;
|
|
767
767
|
margin-right: -0.25rem;
|
|
@@ -2300,6 +2300,10 @@ body {
|
|
|
2300
2300
|
pointer-events: none;
|
|
2301
2301
|
}
|
|
2302
2302
|
|
|
2303
|
+
.data-\[state\=closed\]\:pointer-events-none[data-state="closed"] {
|
|
2304
|
+
pointer-events: none;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2303
2307
|
.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction="vertical"] {
|
|
2304
2308
|
height: 1px;
|
|
2305
2309
|
}
|
|
@@ -2769,18 +2773,6 @@ body {
|
|
|
2769
2773
|
}
|
|
2770
2774
|
|
|
2771
2775
|
@media (min-width: 640px) {
|
|
2772
|
-
.sm\:bottom-0 {
|
|
2773
|
-
bottom: 0px;
|
|
2774
|
-
}
|
|
2775
|
-
|
|
2776
|
-
.sm\:right-0 {
|
|
2777
|
-
right: 0px;
|
|
2778
|
-
}
|
|
2779
|
-
|
|
2780
|
-
.sm\:top-auto {
|
|
2781
|
-
top: auto;
|
|
2782
|
-
}
|
|
2783
|
-
|
|
2784
2776
|
.sm\:mt-0 {
|
|
2785
2777
|
margin-top: 0px;
|
|
2786
2778
|
}
|
|
@@ -2793,10 +2785,6 @@ body {
|
|
|
2793
2785
|
flex-direction: row;
|
|
2794
2786
|
}
|
|
2795
2787
|
|
|
2796
|
-
.sm\:flex-col {
|
|
2797
|
-
flex-direction: column;
|
|
2798
|
-
}
|
|
2799
|
-
|
|
2800
2788
|
.sm\:justify-end {
|
|
2801
2789
|
justify-content: flex-end;
|
|
2802
2790
|
}
|
|
@@ -2818,10 +2806,6 @@ body {
|
|
|
2818
2806
|
.sm\:text-left {
|
|
2819
2807
|
text-align: left;
|
|
2820
2808
|
}
|
|
2821
|
-
|
|
2822
|
-
.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state="open"] {
|
|
2823
|
-
--tw-enter-translate-y: 100%;
|
|
2824
|
-
}
|
|
2825
2809
|
}
|
|
2826
2810
|
|
|
2827
2811
|
@media (min-width: 768px) {
|
|
@@ -3689,10 +3673,6 @@ video {
|
|
|
3689
3673
|
pointer-events: none;
|
|
3690
3674
|
}
|
|
3691
3675
|
|
|
3692
|
-
.visible {
|
|
3693
|
-
visibility: visible;
|
|
3694
|
-
}
|
|
3695
|
-
|
|
3696
3676
|
.collapse {
|
|
3697
3677
|
visibility: collapse;
|
|
3698
3678
|
}
|
|
@@ -3872,10 +3852,6 @@ video {
|
|
|
3872
3852
|
margin-top: 0.25rem;
|
|
3873
3853
|
}
|
|
3874
3854
|
|
|
3875
|
-
.mt-1\.5 {
|
|
3876
|
-
margin-top: 0.375rem;
|
|
3877
|
-
}
|
|
3878
|
-
|
|
3879
3855
|
.mt-2 {
|
|
3880
3856
|
margin-top: 0.5rem;
|
|
3881
3857
|
}
|
|
@@ -3995,6 +3971,10 @@ video {
|
|
|
3995
3971
|
height: 100%;
|
|
3996
3972
|
}
|
|
3997
3973
|
|
|
3974
|
+
.max-h-28 {
|
|
3975
|
+
max-height: 7rem;
|
|
3976
|
+
}
|
|
3977
|
+
|
|
3998
3978
|
.max-h-44 {
|
|
3999
3979
|
max-height: 11rem;
|
|
4000
3980
|
}
|
|
@@ -4135,14 +4115,14 @@ video {
|
|
|
4135
4115
|
max-width: 200px;
|
|
4136
4116
|
}
|
|
4137
4117
|
|
|
4138
|
-
.max-w-\[260px\] {
|
|
4139
|
-
max-width: 260px;
|
|
4140
|
-
}
|
|
4141
|
-
|
|
4142
4118
|
.max-w-\[360px\] {
|
|
4143
4119
|
max-width: 360px;
|
|
4144
4120
|
}
|
|
4145
4121
|
|
|
4122
|
+
.max-w-\[380px\] {
|
|
4123
|
+
max-width: 380px;
|
|
4124
|
+
}
|
|
4125
|
+
|
|
4146
4126
|
.max-w-\[420px\] {
|
|
4147
4127
|
max-width: 420px;
|
|
4148
4128
|
}
|
|
@@ -4383,10 +4363,18 @@ video {
|
|
|
4383
4363
|
white-space: nowrap;
|
|
4384
4364
|
}
|
|
4385
4365
|
|
|
4366
|
+
.whitespace-pre-wrap {
|
|
4367
|
+
white-space: pre-wrap;
|
|
4368
|
+
}
|
|
4369
|
+
|
|
4386
4370
|
.break-words {
|
|
4387
4371
|
overflow-wrap: break-word;
|
|
4388
4372
|
}
|
|
4389
4373
|
|
|
4374
|
+
.break-all {
|
|
4375
|
+
word-break: break-all;
|
|
4376
|
+
}
|
|
4377
|
+
|
|
4390
4378
|
.rounded {
|
|
4391
4379
|
border-radius: 0.25rem;
|
|
4392
4380
|
}
|
|
@@ -5115,6 +5103,10 @@ video {
|
|
|
5115
5103
|
color: hsl(var(--foreground));
|
|
5116
5104
|
}
|
|
5117
5105
|
|
|
5106
|
+
.text-foreground\/80 {
|
|
5107
|
+
color: hsl(var(--foreground) / 0.8);
|
|
5108
|
+
}
|
|
5109
|
+
|
|
5118
5110
|
.text-foreground\/90 {
|
|
5119
5111
|
color: hsl(var(--foreground) / 0.9);
|
|
5120
5112
|
}
|
|
@@ -5416,34 +5408,48 @@ video {
|
|
|
5416
5408
|
|
|
5417
5409
|
.rv-moveable-layer {
|
|
5418
5410
|
--moveable-color: #1990ff;
|
|
5411
|
+
z-index: 9999 !important;
|
|
5419
5412
|
}
|
|
5420
5413
|
|
|
5421
|
-
.rv-moveable-layer
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5414
|
+
.rv-moveable-layer.moveable-group,
|
|
5415
|
+
.rv-moveable-layer .moveable-group,
|
|
5416
|
+
.rv-moveable-layer.moveable-control-box,
|
|
5417
|
+
.rv-moveable-layer .moveable-control-box {
|
|
5418
|
+
z-index: 1 !important;
|
|
5419
|
+
}
|
|
5420
|
+
|
|
5421
|
+
.rv-moveable-layer .moveable-line {
|
|
5422
|
+
--moveable-color: #1990ff;
|
|
5430
5423
|
background: var(--moveable-color) !important;
|
|
5431
5424
|
}
|
|
5432
5425
|
|
|
5426
|
+
/* 组选/单边控制线:厚度由 moveable zoom 补偿,保持屏幕 1px */
|
|
5427
|
+
|
|
5433
5428
|
.rv-moveable-layer .moveable-line.moveable-direction {
|
|
5434
|
-
|
|
5435
|
-
height: 1px !important;
|
|
5436
|
-
margin: 0 !important;
|
|
5429
|
+
background: var(--moveable-color) !important;
|
|
5437
5430
|
}
|
|
5438
5431
|
|
|
5439
|
-
.rv-moveable-layer .moveable-
|
|
5440
|
-
|
|
5432
|
+
.rv-moveable-layer .moveable-group .moveable-control-box,
|
|
5433
|
+
.rv-moveable-layer.moveable-group .moveable-control-box {
|
|
5434
|
+
z-index: 2 !important;
|
|
5441
5435
|
}
|
|
5442
5436
|
|
|
5443
5437
|
.rv-moveable-layer .moveable-around-control {
|
|
5444
5438
|
background: transparent !important;
|
|
5445
5439
|
}
|
|
5446
5440
|
|
|
5441
|
+
.rv-moveable-layer .moveable-control {
|
|
5442
|
+
width: 14px !important;
|
|
5443
|
+
height: 14px !important;
|
|
5444
|
+
margin-top: -7px !important;
|
|
5445
|
+
margin-left: -7px !important;
|
|
5446
|
+
border-radius: 50% !important;
|
|
5447
|
+
box-sizing: border-box !important;
|
|
5448
|
+
border: 2px solid hsl(var(--background)) !important;
|
|
5449
|
+
background: #1990ff !important;
|
|
5450
|
+
background: var(--moveable-color) !important;
|
|
5451
|
+
}
|
|
5452
|
+
|
|
5447
5453
|
.hover\:border-border:hover {
|
|
5448
5454
|
border-color: hsl(var(--border));
|
|
5449
5455
|
}
|
|
@@ -5680,10 +5686,18 @@ video {
|
|
|
5680
5686
|
width: 0.5rem;
|
|
5681
5687
|
}
|
|
5682
5688
|
|
|
5689
|
+
.\[\&_\.moveable-area\]\:pointer-events-auto .moveable-area {
|
|
5690
|
+
pointer-events: auto;
|
|
5691
|
+
}
|
|
5692
|
+
|
|
5683
5693
|
.\[\&_\.moveable-control-box\]\:pointer-events-auto .moveable-control-box {
|
|
5684
5694
|
pointer-events: auto;
|
|
5685
5695
|
}
|
|
5686
5696
|
|
|
5697
|
+
.\[\&_\.moveable-group\]\:pointer-events-auto .moveable-group {
|
|
5698
|
+
pointer-events: auto;
|
|
5699
|
+
}
|
|
5700
|
+
|
|
5687
5701
|
.\[\&_\.scope-field--highlight\]\:rounded-md .scope-field--highlight {
|
|
5688
5702
|
border-radius: calc(var(--radius) - 2px);
|
|
5689
5703
|
}
|
|
@@ -6486,6 +6500,8 @@ svg.react-flow__connectionline {
|
|
|
6486
6500
|
--xy-edge-stroke-selected: #1d4ed8;
|
|
6487
6501
|
--xy-connectionline-stroke: #2563eb;
|
|
6488
6502
|
--xy-connectionline-stroke-width: 2.5;
|
|
6503
|
+
--xy-handle-background-color: hsl(var(--primary));
|
|
6504
|
+
--xy-handle-border-color: hsl(var(--background));
|
|
6489
6505
|
background-color: transparent;
|
|
6490
6506
|
}
|
|
6491
6507
|
|
|
@@ -6646,11 +6662,11 @@ svg.react-flow__connectionline {
|
|
|
6646
6662
|
height: 10px;
|
|
6647
6663
|
min-width: 10px;
|
|
6648
6664
|
min-height: 10px;
|
|
6649
|
-
border: 2px solid hsl(var(--background));
|
|
6665
|
+
border: 2px solid hsl(var(--background)) !important;
|
|
6650
6666
|
border-radius: 9999px;
|
|
6651
|
-
background: hsl(var(--
|
|
6667
|
+
background-color: hsl(var(--foreground) / 0.42) !important;
|
|
6652
6668
|
transition:
|
|
6653
|
-
background 0.15s ease,
|
|
6669
|
+
background-color 0.15s ease,
|
|
6654
6670
|
border-color 0.15s ease,
|
|
6655
6671
|
box-shadow 0.15s ease;
|
|
6656
6672
|
}
|
|
@@ -6658,30 +6674,34 @@ svg.react-flow__connectionline {
|
|
|
6658
6674
|
.bp-canvas .react-flow__handle.bp-flow-handle:hover,
|
|
6659
6675
|
.bp-flow .react-flow__handle.bp-flow-handle:hover,
|
|
6660
6676
|
[data-workspace-region="blueprint"] .react-flow__handle.bp-flow-handle:hover {
|
|
6661
|
-
background: hsl(var(--primary));
|
|
6662
|
-
border-color: hsl(var(--background));
|
|
6677
|
+
background-color: hsl(var(--primary)) !important;
|
|
6678
|
+
border-color: hsl(var(--background)) !important;
|
|
6663
6679
|
box-shadow: 0 0 0 3px hsl(var(--primary) / 0.28);
|
|
6664
6680
|
}
|
|
6665
6681
|
|
|
6666
6682
|
.bp-canvas .react-flow__handle.bp-flow-handle--target,
|
|
6667
6683
|
.bp-flow .react-flow__handle.bp-flow-handle--target,
|
|
6668
6684
|
[data-workspace-region="blueprint"] .react-flow__handle.bp-flow-handle--target {
|
|
6669
|
-
background: hsl(var(--
|
|
6685
|
+
background-color: hsl(var(--foreground) / 0.48) !important;
|
|
6670
6686
|
}
|
|
6671
6687
|
|
|
6672
6688
|
.bp-canvas .react-flow__handle.bp-flow-handle--source,
|
|
6673
6689
|
.bp-flow .react-flow__handle.bp-flow-handle--source,
|
|
6674
6690
|
[data-workspace-region="blueprint"] .react-flow__handle.bp-flow-handle--source {
|
|
6675
|
-
background: hsl(var(--primary) / 0.
|
|
6691
|
+
background-color: hsl(var(--primary) / 0.72) !important;
|
|
6676
6692
|
}
|
|
6677
6693
|
|
|
6678
6694
|
.bp-node--selected .bp-flow-handle {
|
|
6679
|
-
border-color: hsl(var(--card));
|
|
6695
|
+
border-color: hsl(var(--card)) !important;
|
|
6680
6696
|
box-shadow: 0 0 0 2px hsl(var(--primary) / 0.35);
|
|
6681
6697
|
}
|
|
6682
6698
|
|
|
6699
|
+
.bp-node--selected .bp-flow-handle--target {
|
|
6700
|
+
background-color: hsl(var(--foreground) / 0.55) !important;
|
|
6701
|
+
}
|
|
6702
|
+
|
|
6683
6703
|
.bp-node--selected .bp-flow-handle--source {
|
|
6684
|
-
background: hsl(var(--primary));
|
|
6704
|
+
background-color: hsl(var(--primary)) !important;
|
|
6685
6705
|
}
|
|
6686
6706
|
|
|
6687
6707
|
.bp-node--execution-true .bp-node-card {
|
|
@@ -6697,11 +6717,11 @@ svg.react-flow__connectionline {
|
|
|
6697
6717
|
}
|
|
6698
6718
|
|
|
6699
6719
|
.bp-node--execution-true .bp-flow-handle--source {
|
|
6700
|
-
background: #16a34a;
|
|
6720
|
+
background-color: #16a34a !important;
|
|
6701
6721
|
}
|
|
6702
6722
|
|
|
6703
6723
|
.bp-node--execution-true .bp-flow-handle--target {
|
|
6704
|
-
background: rgb(22 163 74 / 0.55);
|
|
6724
|
+
background-color: rgb(22 163 74 / 0.55) !important;
|
|
6705
6725
|
}
|
|
6706
6726
|
|
|
6707
6727
|
.bp-node--execution-false .bp-node-card {
|
|
@@ -6717,11 +6737,11 @@ svg.react-flow__connectionline {
|
|
|
6717
6737
|
}
|
|
6718
6738
|
|
|
6719
6739
|
.bp-node--execution-false .bp-flow-handle--source {
|
|
6720
|
-
background: hsl(var(--destructive));
|
|
6740
|
+
background-color: hsl(var(--destructive)) !important;
|
|
6721
6741
|
}
|
|
6722
6742
|
|
|
6723
6743
|
.bp-node--execution-false .bp-flow-handle--target {
|
|
6724
|
-
background: hsl(var(--destructive) / 0.55);
|
|
6744
|
+
background-color: hsl(var(--destructive) / 0.55) !important;
|
|
6725
6745
|
}
|
|
6726
6746
|
|
|
6727
6747
|
/* 生命周期节点无输入口:隐藏任何左侧/目标连接点(含旧数据产生的幽灵 handle) */
|
|
@@ -6740,13 +6760,13 @@ svg.react-flow__connectionline {
|
|
|
6740
6760
|
.bp-canvas .react-flow__handle.bp-flow-handle--signal,
|
|
6741
6761
|
.bp-flow .react-flow__handle.bp-flow-handle--signal,
|
|
6742
6762
|
[data-workspace-region="blueprint"] .react-flow__handle.bp-flow-handle--signal {
|
|
6743
|
-
background: hsl(38 92% 50% / 0.75);
|
|
6763
|
+
background-color: hsl(38 92% 50% / 0.75) !important;
|
|
6744
6764
|
width: 8px;
|
|
6745
6765
|
height: 8px;
|
|
6746
6766
|
}
|
|
6747
6767
|
|
|
6748
6768
|
.bp-node--selected .bp-flow-handle--signal {
|
|
6749
|
-
background: hsl(38 92% 50%);
|
|
6769
|
+
background-color: hsl(38 92% 50%) !important;
|
|
6750
6770
|
}
|
|
6751
6771
|
|
|
6752
6772
|
/* 右键菜单 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arronqzy/abuilder",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Abuilder 可视化编辑器 — 安装后即可通过 <App /> 渲染完整应用",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"./styles.css": "./dist/styles.css"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@arronqzy/blueprint-dsl": "1.0.
|
|
27
|
-
"@arronqzy/react-view": "1.0.
|
|
28
|
-
"@arronqzy/react-blueprint": "1.0.
|
|
29
|
-
"@arronqzy/rx-store": "1.0.
|
|
30
|
-
"@arronqzy/ui": "1.0.
|
|
26
|
+
"@arronqzy/blueprint-dsl": "1.0.3",
|
|
27
|
+
"@arronqzy/react-view": "1.0.5",
|
|
28
|
+
"@arronqzy/react-blueprint": "1.0.3",
|
|
29
|
+
"@arronqzy/rx-store": "1.0.2",
|
|
30
|
+
"@arronqzy/ui": "1.0.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": ">=18",
|