@logicflow/vue-node-registry 1.2.0 → 1.2.1

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.
Files changed (63) hide show
  1. package/README.md +6 -3
  2. package/dist/index.css +122 -0
  3. package/es/components/container.d.ts +19 -0
  4. package/es/components/container.js +27 -0
  5. package/es/components/container.js.map +1 -0
  6. package/es/components/titleBar.d.ts +24 -0
  7. package/es/components/titleBar.js +160 -0
  8. package/es/components/titleBar.js.map +1 -0
  9. package/es/index.css +122 -0
  10. package/es/index.less +1 -0
  11. package/es/model.d.ts +18 -1
  12. package/es/model.js +44 -5
  13. package/es/model.js.map +1 -1
  14. package/es/registry.d.ts +14 -3
  15. package/es/registry.js +28 -5
  16. package/es/registry.js.map +1 -1
  17. package/es/style/index.css +122 -0
  18. package/es/style/index.less +140 -0
  19. package/es/style/raw.d.ts +4 -0
  20. package/es/style/raw.js +6 -0
  21. package/es/style/raw.js.map +1 -0
  22. package/es/utils/size.d.ts +2 -0
  23. package/es/utils/size.js +14 -0
  24. package/es/utils/size.js.map +1 -0
  25. package/es/view.d.ts +9 -0
  26. package/es/view.js +158 -16
  27. package/es/view.js.map +1 -1
  28. package/lib/components/container.d.ts +19 -0
  29. package/lib/components/container.js +30 -0
  30. package/lib/components/container.js.map +1 -0
  31. package/lib/components/titleBar.d.ts +24 -0
  32. package/lib/components/titleBar.js +163 -0
  33. package/lib/components/titleBar.js.map +1 -0
  34. package/lib/index.css +122 -0
  35. package/lib/index.less +1 -0
  36. package/lib/model.d.ts +18 -1
  37. package/lib/model.js +42 -3
  38. package/lib/model.js.map +1 -1
  39. package/lib/registry.d.ts +14 -3
  40. package/lib/registry.js +30 -6
  41. package/lib/registry.js.map +1 -1
  42. package/lib/style/index.css +122 -0
  43. package/lib/style/index.less +140 -0
  44. package/lib/style/raw.d.ts +4 -0
  45. package/lib/style/raw.js +9 -0
  46. package/lib/style/raw.js.map +1 -0
  47. package/lib/utils/size.d.ts +2 -0
  48. package/lib/utils/size.js +19 -0
  49. package/lib/utils/size.js.map +1 -0
  50. package/lib/view.d.ts +9 -0
  51. package/lib/view.js +156 -14
  52. package/lib/view.js.map +1 -1
  53. package/package.json +10 -5
  54. package/.turbo/turbo-build$colon$dev.log +0 -10
  55. package/.turbo/turbo-build.log +0 -34
  56. package/CHANGELOG.md +0 -217
  57. package/src/index.ts +0 -4
  58. package/src/model.ts +0 -64
  59. package/src/registry.ts +0 -43
  60. package/src/teleport.ts +0 -155
  61. package/src/view.ts +0 -109
  62. package/stats.html +0 -4842
  63. package/tsconfig.json +0 -20
@@ -0,0 +1,122 @@
1
+ .lf-vue-node-container {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: column;
5
+ box-sizing: border-box;
6
+ padding: 6px;
7
+ color: #474747;
8
+ border-radius: 12px;
9
+ box-shadow: 0 0 10px #cad2e15f;
10
+ }
11
+ .lf-vue-node-content-wrap {
12
+ display: flex;
13
+ flex: 1 1 auto;
14
+ justify-content: center;
15
+ }
16
+ .lf-vue-node-title {
17
+ display: flex;
18
+ align-items: flex-start;
19
+ justify-content: space-between;
20
+ box-sizing: border-box;
21
+ margin-bottom: 4px;
22
+ padding: 0 8px;
23
+ backdrop-filter: saturate(180%) blur(4px);
24
+ }
25
+ .lf-vue-node-title-expanded {
26
+ margin-bottom: 6px;
27
+ padding-bottom: 8px;
28
+ border-bottom: 1px solid #eaeaea;
29
+ }
30
+ @supports not (backdrop-filter: blur(1px)) {
31
+ .lf-vue-node-title {
32
+ backdrop-filter: none;
33
+ }
34
+ }
35
+ .lf-vue-node-title-left {
36
+ display: flex;
37
+ gap: 6px;
38
+ align-items: center;
39
+ min-width: 0;
40
+ }
41
+ .lf-vue-node-title-icon {
42
+ display: inline-block;
43
+ width: 16px;
44
+ height: 16px;
45
+ color: #666;
46
+ font-style: normal;
47
+ line-height: 16px;
48
+ text-align: center;
49
+ }
50
+ .lf-vue-node-title-text {
51
+ overflow: hidden;
52
+ color: #333;
53
+ font-weight: 500;
54
+ font-size: 14px;
55
+ white-space: nowrap;
56
+ text-overflow: ellipsis;
57
+ }
58
+ .lf-vue-node-title-actions {
59
+ display: flex;
60
+ gap: 6px;
61
+ align-items: center;
62
+ }
63
+ .lf-vue-node-title-expand,
64
+ .lf-vue-node-title-more {
65
+ display: inline-flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ width: 20px;
69
+ height: 20px;
70
+ padding: 2px;
71
+ background: transparent;
72
+ border: none;
73
+ border-radius: 4px;
74
+ cursor: pointer;
75
+ transition: background 0.15s ease;
76
+ appearance: none;
77
+ }
78
+ .lf-vue-node-title-expand:hover,
79
+ .lf-vue-node-title-more:hover {
80
+ background: rgba(0, 0, 0, 0.06);
81
+ }
82
+ .lf-vue-node-title-expand-icon {
83
+ color: #666;
84
+ font-style: normal;
85
+ transition: transform 0.3s ease;
86
+ }
87
+ .lf-vue-node-title-more-icon {
88
+ color: #666;
89
+ font-style: normal;
90
+ }
91
+ .lf-vue-node-title-tooltip {
92
+ position: absolute;
93
+ top: -50px;
94
+ right: -135px;
95
+ min-width: 120px;
96
+ max-width: 240px;
97
+ padding: 6px 8px;
98
+ background: #fff;
99
+ border: 1px solid rgba(0, 0, 0, 0.1);
100
+ border-radius: 6px;
101
+ box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
102
+ transform: translateY(calc(100% + 4px));
103
+ transition: opacity 0.15s ease, transform 0.15s ease;
104
+ }
105
+ .lf-vue-node-title-tooltip-list {
106
+ display: flex;
107
+ flex-direction: column;
108
+ gap: 4px;
109
+ }
110
+ .lf-vue-node-title-tooltip-item {
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: flex-start;
114
+ padding: 6px;
115
+ color: #333;
116
+ font-size: 12px;
117
+ border-radius: 4px;
118
+ cursor: pointer;
119
+ }
120
+ .lf-vue-node-title-tooltip-item:hover {
121
+ background: rgba(0, 0, 0, 0.05);
122
+ }
@@ -0,0 +1,140 @@
1
+ .lf-vue-node-container {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: column;
5
+ box-sizing: border-box;
6
+ padding: 6px;
7
+ color: #474747;
8
+ border-radius: 12px;
9
+ box-shadow: 0 0 10px #cad2e15f;
10
+ }
11
+
12
+ .lf-vue-node-content-wrap {
13
+ display: flex;
14
+ flex: 1 1 auto;
15
+ justify-content: center;
16
+ }
17
+
18
+ .lf-vue-node-title {
19
+ display: flex;
20
+ align-items: flex-start;
21
+ justify-content: space-between;
22
+ box-sizing: border-box;
23
+ margin-bottom: 4px;
24
+ padding: 0 8px;
25
+ backdrop-filter: saturate(180%) blur(4px);
26
+
27
+ &-expanded {
28
+ margin-bottom: 6px;
29
+ padding-bottom: 8px;
30
+ border-bottom: 1px solid #eaeaea;
31
+ }
32
+ }
33
+
34
+ @supports not (backdrop-filter: blur(1px)) {
35
+ .lf-vue-node-title {
36
+ backdrop-filter: none;
37
+ }
38
+ }
39
+
40
+ .lf-vue-node-title-left {
41
+ display: flex;
42
+ gap: 6px;
43
+ align-items: center;
44
+ min-width: 0;
45
+ }
46
+
47
+ .lf-vue-node-title-icon {
48
+ display: inline-block;
49
+ width: 16px;
50
+ height: 16px;
51
+ color: #666;
52
+ font-style: normal;
53
+ line-height: 16px;
54
+ text-align: center;
55
+ }
56
+
57
+ .lf-vue-node-title-text {
58
+ overflow: hidden;
59
+ color: #333;
60
+ font-weight: 500;
61
+ font-size: 14px;
62
+ white-space: nowrap;
63
+ text-overflow: ellipsis;
64
+ }
65
+
66
+ .lf-vue-node-title-actions {
67
+ display: flex;
68
+ gap: 6px;
69
+ align-items: center;
70
+ }
71
+
72
+ .lf-vue-node-title-expand,
73
+ .lf-vue-node-title-more {
74
+ display: inline-flex;
75
+ align-items: center;
76
+ justify-content: center;
77
+ width: 20px;
78
+ height: 20px;
79
+ padding: 2px;
80
+ background: transparent;
81
+ border: none;
82
+ border-radius: 4px;
83
+ cursor: pointer;
84
+ transition: background 0.15s ease;
85
+ appearance: none;
86
+ }
87
+
88
+ .lf-vue-node-title-expand:hover,
89
+ .lf-vue-node-title-more:hover {
90
+ background: rgb(0 0 0 / 6%);
91
+ }
92
+
93
+ .lf-vue-node-title-expand-icon {
94
+ color: #666;
95
+ font-style: normal;
96
+ transition: transform 0.3s ease;
97
+ }
98
+
99
+ .lf-vue-node-title-more-icon {
100
+ color: #666;
101
+ font-style: normal;
102
+ }
103
+
104
+ .lf-vue-node-title-tooltip {
105
+ position: absolute;
106
+ top: -50px;
107
+ right: -135px;
108
+ min-width: 120px;
109
+ max-width: 240px;
110
+ padding: 6px 8px;
111
+ background: #fff;
112
+ border: 1px solid rgb(0 0 0 / 10%);
113
+ border-radius: 6px;
114
+ box-shadow: 0 6px 20px rgb(0 0 0 / 12%);
115
+ transform: translateY(calc(100% + 4px));
116
+ transition:
117
+ opacity 0.15s ease,
118
+ transform 0.15s ease;
119
+ }
120
+
121
+ .lf-vue-node-title-tooltip-list {
122
+ display: flex;
123
+ flex-direction: column;
124
+ gap: 4px;
125
+ }
126
+
127
+ .lf-vue-node-title-tooltip-item {
128
+ display: flex;
129
+ align-items: center;
130
+ justify-content: flex-start;
131
+ padding: 6px;
132
+ color: #333;
133
+ font-size: 12px;
134
+ border-radius: 4px;
135
+ cursor: pointer;
136
+ }
137
+
138
+ .lf-vue-node-title-tooltip-item:hover {
139
+ background: rgb(0 0 0 / 5%);
140
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Auto generated file, do not modify it!
3
+ */
4
+ export declare const content = ".lf-vue-node-container {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: 6px;\n color: #474747;\n border-radius: 12px;\n box-shadow: 0 0 10px #cad2e15f;\n}\n.lf-vue-node-content-wrap {\n display: flex;\n flex: 1 1 auto;\n justify-content: center;\n}\n.lf-vue-node-title {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n box-sizing: border-box;\n margin-bottom: 4px;\n padding: 0 8px;\n backdrop-filter: saturate(180%) blur(4px);\n}\n.lf-vue-node-title-expanded {\n margin-bottom: 6px;\n padding-bottom: 8px;\n border-bottom: 1px solid #eaeaea;\n}\n@supports not (backdrop-filter: blur(1px)) {\n .lf-vue-node-title {\n backdrop-filter: none;\n }\n}\n.lf-vue-node-title-left {\n display: flex;\n gap: 6px;\n align-items: center;\n min-width: 0;\n}\n.lf-vue-node-title-icon {\n display: inline-block;\n width: 16px;\n height: 16px;\n color: #666;\n font-style: normal;\n line-height: 16px;\n text-align: center;\n}\n.lf-vue-node-title-text {\n overflow: hidden;\n color: #333;\n font-weight: 500;\n font-size: 14px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.lf-vue-node-title-actions {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n.lf-vue-node-title-expand,\n.lf-vue-node-title-more {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n padding: 2px;\n background: transparent;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n transition: background 0.15s ease;\n appearance: none;\n}\n.lf-vue-node-title-expand:hover,\n.lf-vue-node-title-more:hover {\n background: rgba(0, 0, 0, 0.06);\n}\n.lf-vue-node-title-expand-icon {\n color: #666;\n font-style: normal;\n transition: transform 0.3s ease;\n}\n.lf-vue-node-title-more-icon {\n color: #666;\n font-style: normal;\n}\n.lf-vue-node-title-tooltip {\n position: absolute;\n top: -50px;\n right: -135px;\n min-width: 120px;\n max-width: 240px;\n padding: 6px 8px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.1);\n border-radius: 6px;\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);\n transform: translateY(calc(100% + 4px));\n transition: opacity 0.15s ease, transform 0.15s ease;\n}\n.lf-vue-node-title-tooltip-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.lf-vue-node-title-tooltip-item {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n padding: 6px;\n color: #333;\n font-size: 12px;\n border-radius: 4px;\n cursor: pointer;\n}\n.lf-vue-node-title-tooltip-item:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n";
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.content = void 0;
5
+ /**
6
+ * Auto generated file, do not modify it!
7
+ */
8
+ exports.content = ".lf-vue-node-container {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: 6px;\n color: #474747;\n border-radius: 12px;\n box-shadow: 0 0 10px #cad2e15f;\n}\n.lf-vue-node-content-wrap {\n display: flex;\n flex: 1 1 auto;\n justify-content: center;\n}\n.lf-vue-node-title {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n box-sizing: border-box;\n margin-bottom: 4px;\n padding: 0 8px;\n backdrop-filter: saturate(180%) blur(4px);\n}\n.lf-vue-node-title-expanded {\n margin-bottom: 6px;\n padding-bottom: 8px;\n border-bottom: 1px solid #eaeaea;\n}\n@supports not (backdrop-filter: blur(1px)) {\n .lf-vue-node-title {\n backdrop-filter: none;\n }\n}\n.lf-vue-node-title-left {\n display: flex;\n gap: 6px;\n align-items: center;\n min-width: 0;\n}\n.lf-vue-node-title-icon {\n display: inline-block;\n width: 16px;\n height: 16px;\n color: #666;\n font-style: normal;\n line-height: 16px;\n text-align: center;\n}\n.lf-vue-node-title-text {\n overflow: hidden;\n color: #333;\n font-weight: 500;\n font-size: 14px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.lf-vue-node-title-actions {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n.lf-vue-node-title-expand,\n.lf-vue-node-title-more {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n padding: 2px;\n background: transparent;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n transition: background 0.15s ease;\n appearance: none;\n}\n.lf-vue-node-title-expand:hover,\n.lf-vue-node-title-more:hover {\n background: rgba(0, 0, 0, 0.06);\n}\n.lf-vue-node-title-expand-icon {\n color: #666;\n font-style: normal;\n transition: transform 0.3s ease;\n}\n.lf-vue-node-title-more-icon {\n color: #666;\n font-style: normal;\n}\n.lf-vue-node-title-tooltip {\n position: absolute;\n top: -50px;\n right: -135px;\n min-width: 120px;\n max-width: 240px;\n padding: 6px 8px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.1);\n border-radius: 6px;\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);\n transform: translateY(calc(100% + 4px));\n transition: opacity 0.15s ease, transform 0.15s ease;\n}\n.lf-vue-node-title-tooltip-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.lf-vue-node-title-tooltip-item {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n padding: 6px;\n color: #333;\n font-size: 12px;\n border-radius: 4px;\n cursor: pointer;\n}\n.lf-vue-node-title-tooltip-item:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n";
9
+ //# sourceMappingURL=raw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raw.js","sourceRoot":"","sources":["../../src/style/raw.ts"],"names":[],"mappings":";AAAA,oBAAoB;;;AAEpB;;GAEG;AAEU,QAAA,OAAO,GAAG,unFA0HtB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare function computeBaseHeight(measuredHeight: number, _showTitle?: boolean, _titleHeight?: number): number;
2
+ export declare function shouldUpdateSize(prevW?: number, prevH?: number, w?: number, h?: number): boolean;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.shouldUpdateSize = exports.computeBaseHeight = void 0;
4
+ function computeBaseHeight(measuredHeight, _showTitle, _titleHeight) {
5
+ var extra = _showTitle
6
+ ? typeof _titleHeight === 'number'
7
+ ? _titleHeight
8
+ : 28
9
+ : 0;
10
+ return Math.max(1, Math.round(measuredHeight) - extra);
11
+ }
12
+ exports.computeBaseHeight = computeBaseHeight;
13
+ function shouldUpdateSize(prevW, prevH, w, h) {
14
+ if (!w || !h)
15
+ return false;
16
+ return !(prevW === Math.round(w) && prevH === Math.round(h));
17
+ }
18
+ exports.shouldUpdateSize = shouldUpdateSize;
19
+ //# sourceMappingURL=size.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"size.js","sourceRoot":"","sources":["../../src/utils/size.ts"],"names":[],"mappings":";;;AAAA,SAAgB,iBAAiB,CAC/B,cAAsB,EACtB,UAAoB,EACpB,YAAqB;IAErB,IAAM,KAAK,GAAG,UAAU;QACtB,CAAC,CAAC,OAAO,YAAY,KAAK,QAAQ;YAChC,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,EAAE;QACN,CAAC,CAAC,CAAC,CAAA;IACL,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC,CAAA;AACxD,CAAC;AAXD,8CAWC;AAED,SAAgB,gBAAgB,CAC9B,KAAc,EACd,KAAc,EACd,CAAU,EACV,CAAU;IAEV,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAA;IAC1B,OAAO,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;AAC9D,CAAC;AARD,4CAQC"}
package/lib/view.d.ts CHANGED
@@ -2,12 +2,21 @@ import { HtmlNode } from '@logicflow/core';
2
2
  export declare class VueNodeView extends HtmlNode {
3
3
  root?: any;
4
4
  private vm;
5
+ private __resizeObserver?;
6
+ private __resizeRafId?;
7
+ private __lastWidth?;
8
+ private __lastHeight?;
9
+ private __fallbackUnlisten?;
10
+ private __throttledUpdate;
5
11
  getComponentContainer(): any;
6
12
  protected targetId(): string;
7
13
  componentWillUnmount(): void;
8
14
  setHtml(rootEl: SVGForeignObjectElement): void;
9
15
  confirmUpdate(_rootEl: SVGForeignObjectElement): void;
10
16
  protected renderVueComponent(): void;
17
+ private measureAndUpdate;
18
+ private startResizeObserver;
19
+ private stopResizeObserver;
11
20
  protected unmountVueComponent(): any;
12
21
  unmount(): void;
13
22
  }
package/lib/view.js CHANGED
@@ -17,14 +17,50 @@ var __extends = (this && this.__extends) || (function () {
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.VueNodeView = void 0;
19
19
  var vue_demi_1 = require("vue-demi");
20
+ // Vue2/3 兼容 API;使用 vue-demi 保持两端一致
21
+ var lodash_es_1 = require("lodash-es");
20
22
  var core_1 = require("@logicflow/core");
21
23
  var registry_1 = require("./registry");
22
24
  var teleport_1 = require("./teleport");
25
+ var container_1 = require("./components/container");
23
26
  var VueNodeView = /** @class */ (function (_super) {
24
27
  __extends(VueNodeView, _super);
25
28
  function VueNodeView() {
26
- return _super !== null && _super.apply(this, arguments) || this;
29
+ var _this = _super !== null && _super.apply(this, arguments) || this;
30
+ _this.__throttledUpdate = (0, lodash_es_1.throttle)(function () { return _this.measureAndUpdate(); }, 80);
31
+ _this.measureAndUpdate = function () {
32
+ try {
33
+ // 读取子组件(或容器本身)的实际尺寸并更新模型属性
34
+ var root = _this.getComponentContainer();
35
+ if (!root)
36
+ return;
37
+ var target = root.firstElementChild || root;
38
+ var rect = target.getBoundingClientRect();
39
+ var width = (0, lodash_es_1.round)(rect.width);
40
+ var height = (0, lodash_es_1.round)(rect.height);
41
+ if (width <= 0 || height <= 0)
42
+ return;
43
+ if (width === _this.__lastWidth && height === _this.__lastHeight)
44
+ return;
45
+ _this.__lastWidth = width;
46
+ _this.__lastHeight = height;
47
+ var props = _this.props.model.properties;
48
+ var extra = (0, lodash_es_1.get)(props, '_showTitle')
49
+ ? (0, lodash_es_1.isNumber)((0, lodash_es_1.get)(props, '_titleHeight'))
50
+ ? (0, lodash_es_1.get)(props, '_titleHeight')
51
+ : 28
52
+ : 0;
53
+ // 去掉标题占用的高度,保证内容区域与模型高度一致
54
+ var baseHeight = (0, lodash_es_1.clamp)(height - extra, 1, Number.MAX_SAFE_INTEGER);
55
+ _this.props.model.setProperties({ width: width, height: baseHeight });
56
+ }
57
+ catch (err) {
58
+ // swallow error
59
+ }
60
+ };
61
+ return _this;
27
62
  }
63
+ // private isMounted: boolean = false
28
64
  VueNodeView.prototype.getComponentContainer = function () {
29
65
  return this.root;
30
66
  };
@@ -36,33 +72,81 @@ var VueNodeView = /** @class */ (function (_super) {
36
72
  this.unmount();
37
73
  };
38
74
  VueNodeView.prototype.setHtml = function (rootEl) {
39
- var el = document.createElement('div');
40
- el.className = 'custom-vue-node-content';
41
- this.root = el;
42
- rootEl.appendChild(el);
75
+ // 创建节点内容容器并注入到 foreignObject(若已存在则复用)
76
+ var existed = rootEl.querySelector('.custom-vue-node-content');
77
+ if (!existed) {
78
+ var el = document.createElement('div');
79
+ el.className = 'custom-vue-node-content';
80
+ this.root = el;
81
+ rootEl.appendChild(el);
82
+ }
83
+ // 渲染 Vue 组件并启用尺寸监听
43
84
  this.renderVueComponent();
85
+ this.startResizeObserver();
44
86
  };
45
87
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
46
88
  VueNodeView.prototype.confirmUpdate = function (_rootEl) {
47
89
  // TODO: 如有需要,可以先通过继承的方式,自定义该节点的更新逻辑;我们后续会根据实际需求,丰富该功能
48
- // console.log('_rootEl', _rootEl)
90
+ var model = this.props.model;
91
+ var _a = (model.properties || {})._showTitle, _showTitle = _a === void 0 ? false : _a;
92
+ if (_showTitle) {
93
+ this.setHtml(_rootEl);
94
+ }
49
95
  };
50
96
  VueNodeView.prototype.renderVueComponent = function () {
51
97
  var _a;
52
98
  this.unmountVueComponent();
53
99
  var root = this.getComponentContainer();
54
100
  var _b = this.props, model = _b.model, graphModel = _b.graphModel;
101
+ var _c = (model.properties || {})._showTitle, _showTitle = _c === void 0 ? false : _c;
102
+ var wrapWithContainer = function (child) {
103
+ return (0, vue_demi_1.defineComponent)({
104
+ name: 'LFVueNodeContainerWrapper',
105
+ props: {
106
+ node: { type: Object, required: true },
107
+ graph: { type: Object, required: true },
108
+ },
109
+ render: function () {
110
+ // 根据 _showTitle 决定是否用 Container 包裹,避免无标题时额外结构
111
+ if (!_showTitle) {
112
+ return (0, vue_demi_1.h)(child, { node: this.node, graph: this.graph });
113
+ }
114
+ return (0, vue_demi_1.h)(container_1.Container, { node: this.node, graph: this.graph }, [
115
+ (0, vue_demi_1.h)(child, { node: this.node, graph: this.graph }),
116
+ ]);
117
+ },
118
+ });
119
+ };
55
120
  if (root) {
56
- var component_1 = registry_1.vueNodesMap[model.type].component;
57
- if (component_1) {
121
+ var nodeConfig = (0, registry_1.getVueNodeConfig)(model.type, graphModel);
122
+ var flowId = this.props.graphModel.flowId;
123
+ if (!nodeConfig) {
124
+ // No registered config for this node type; ensure any existing Teleport mount is cleaned up
125
+ if (vue_demi_1.isVue3 && (0, teleport_1.isActive)() && flowId) {
126
+ (0, teleport_1.disconnect)(this.targetId(), flowId);
127
+ }
128
+ return;
129
+ }
130
+ var component = nodeConfig.component;
131
+ if (!component) {
132
+ // Config exists but has no component; also clean up any existing Teleport mount
133
+ if (vue_demi_1.isVue3 && (0, teleport_1.isActive)() && flowId) {
134
+ (0, teleport_1.disconnect)(this.targetId(), flowId);
135
+ }
136
+ return;
137
+ }
138
+ if (component) {
58
139
  if (vue_demi_1.isVue2) {
59
140
  var Vue = vue_demi_1.Vue2;
141
+ var Composed_1 = wrapWithContainer(component);
60
142
  this.vm = new Vue({
61
143
  el: root,
62
144
  render: function (h) {
63
- return h(component_1, {
64
- node: model,
65
- graph: graphModel,
145
+ return h(Composed_1, {
146
+ props: {
147
+ node: model,
148
+ graph: graphModel,
149
+ },
66
150
  });
67
151
  },
68
152
  provide: function () {
@@ -75,12 +159,14 @@ var VueNodeView = /** @class */ (function (_super) {
75
159
  }
76
160
  else if (vue_demi_1.isVue3) {
77
161
  if ((0, teleport_1.isActive)()) {
78
- (0, teleport_1.connect)(this.targetId(), component_1, root, model, graphModel);
162
+ var Composed = wrapWithContainer(component);
163
+ (0, teleport_1.connect)(this.targetId(), Composed, root, model, graphModel);
79
164
  }
80
165
  else {
166
+ var Composed_2 = wrapWithContainer(component);
81
167
  this.vm = (0, vue_demi_1.createApp)({
82
168
  render: function () {
83
- return (0, vue_demi_1.h)(component_1, {
169
+ return (0, vue_demi_1.h)(Composed_2, {
84
170
  node: model,
85
171
  graph: graphModel,
86
172
  });
@@ -93,24 +179,80 @@ var VueNodeView = /** @class */ (function (_super) {
93
179
  },
94
180
  });
95
181
  (_a = this.vm) === null || _a === void 0 ? void 0 : _a.mount(root);
182
+ // this.isMounted = true
96
183
  }
97
184
  }
98
185
  }
99
186
  }
100
187
  };
188
+ VueNodeView.prototype.startResizeObserver = function () {
189
+ var _this = this;
190
+ var _a;
191
+ // 启动尺寸监听:优先使用 ResizeObserver,退化到 window.resize
192
+ var root = this.getComponentContainer();
193
+ if (!root)
194
+ return;
195
+ try {
196
+ if ((0, lodash_es_1.isFunction)(window.ResizeObserver)) {
197
+ this.__resizeObserver = new window.ResizeObserver(function (entries) {
198
+ if (!(0, lodash_es_1.isArray)(entries) || !entries.length)
199
+ return;
200
+ if (_this.__resizeRafId)
201
+ cancelAnimationFrame(_this.__resizeRafId);
202
+ // 使用 RAF 对齐绘制帧,再用节流函数合并频繁变更
203
+ _this.__resizeRafId = requestAnimationFrame(_this.__throttledUpdate);
204
+ });
205
+ var target = root.firstElementChild || root;
206
+ (_a = this.__resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(target);
207
+ }
208
+ else {
209
+ // 退化监听:在窗口尺寸变化时尝试更新
210
+ window.addEventListener('resize', function () { return _this.__throttledUpdate(); });
211
+ this.__fallbackUnlisten = function () {
212
+ return window.removeEventListener('resize', function () { return _this.__throttledUpdate(); });
213
+ };
214
+ }
215
+ }
216
+ catch (err) {
217
+ // swallow error
218
+ }
219
+ };
220
+ VueNodeView.prototype.stopResizeObserver = function () {
221
+ try {
222
+ // 停止所有监听与异步回调,避免内存泄漏
223
+ if (this.__resizeObserver) {
224
+ this.__resizeObserver.disconnect();
225
+ this.__resizeObserver = undefined;
226
+ }
227
+ if (this.__resizeRafId) {
228
+ cancelAnimationFrame(this.__resizeRafId);
229
+ this.__resizeRafId = undefined;
230
+ }
231
+ if (this.__fallbackUnlisten) {
232
+ this.__fallbackUnlisten();
233
+ this.__fallbackUnlisten = undefined;
234
+ }
235
+ }
236
+ catch (err) {
237
+ // swallow error
238
+ }
239
+ };
101
240
  VueNodeView.prototype.unmountVueComponent = function () {
102
241
  var root = this.getComponentContainer();
242
+ // 在卸载 Vue 实例前先停止尺寸监听
243
+ this.stopResizeObserver();
103
244
  if (this.vm) {
104
245
  vue_demi_1.isVue2 && this.vm.$destroy();
105
246
  vue_demi_1.isVue3 && this.vm.unmount();
106
247
  this.vm = null;
107
248
  }
108
- if (root) {
249
+ if (root && !(0, teleport_1.isActive)()) {
109
250
  root.innerHTML = '';
110
251
  }
111
252
  return root;
112
253
  };
113
254
  VueNodeView.prototype.unmount = function () {
255
+ // Teleport 模式下断开连接,并清理视图与监听
114
256
  if ((0, teleport_1.isActive)()) {
115
257
  (0, teleport_1.disconnect)(this.targetId(), this.props.graphModel.flowId);
116
258
  }
package/lib/view.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"view.js","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,qCAA6D;AAC7D,wCAA0C;AAC1C,uCAAwC;AACxC,uCAA0D;AAE1D;IAAiC,+BAAQ;IAAzC;;IAqGA,CAAC;IAjGC,2CAAqB,GAArB;QACE,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IAES,8BAAQ,GAAlB;QACE,OAAO,UAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,cAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAE,CAAA;IACjE,CAAC;IAED,0CAAoB,GAApB;QACE,gBAAK,CAAC,oBAAoB,WAAE,CAAA;QAC5B,IAAI,CAAC,OAAO,EAAE,CAAA;IAChB,CAAC;IAED,6BAAO,GAAP,UA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C,mBAAmB,EAAE,CAAA;IAC5B,CAAC;IACH,kBAAC;AAAD,CAAC,AA3OD,CAAiC,eAAQ,GA2OxC;AA3OY,kCAAW;AA6OxB,kBAAe,WAAW,CAAA"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@logicflow/vue-node-registry",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "LogicFlow Vue Component Node Registry",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
7
- "unpkg": "dist/index.js",
8
- "jsdeliver": "dist/index.js",
7
+ "unpkg": "dist/index.min.js",
8
+ "jsdelivr": "dist/index.min.js",
9
9
  "types": "lib/index.d.ts",
10
10
  "keywords": [
11
11
  "@logicflow/vue-node-registry",
@@ -20,7 +20,7 @@
20
20
  "peerDependencies": {
21
21
  "@vue/composition-api": "^1.0.0-rc.10",
22
22
  "vue": "^2.0.0 || >=3.0.0",
23
- "@logicflow/core": "2.2.0"
23
+ "@logicflow/core": "2.2.1"
24
24
  },
25
25
  "peerDependenciesMeta": {
26
26
  "@vue/composition-api": {
@@ -29,8 +29,13 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "vue": "^3.0.0",
32
- "@logicflow/core": "2.2.0"
32
+ "@logicflow/core": "2.2.1"
33
33
  },
34
+ "files": [
35
+ "dist",
36
+ "es",
37
+ "lib"
38
+ ],
34
39
  "author": {
35
40
  "name": "boyongjiong",
36
41
  "email": "boyongjiong@gmail.com"
@@ -1,10 +0,0 @@
1
-
2
- > @logicflow/vue-node-registry@1.1.5 build:dev /Users/didi/Desktop/github/LogicFlow/packages/vue-node-registry
3
- > rss
4
-
5
- > [build:dev] pnpm run --if-present build:less && run-p -s build:cjs build:esm
6
-
7
- > @logicflow/vue-node-registry@1.1.5 build:less /Users/didi/Desktop/github/LogicFlow/packages/vue-node-registry
8
- > rss
9
-
10
- > [build:less] ./scripts/build-less