@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
package/es/registry.js CHANGED
@@ -1,15 +1,38 @@
1
1
  import { VueNodeView } from './view';
2
2
  import { VueNodeModel } from './model';
3
- export var vueNodesMap = {};
3
+ // Per-instance map: entries are eligible for garbage collection once the associated GraphModel instance is no longer referenced
4
+ var vueNodesMaps = new WeakMap();
5
+ /**
6
+ * @deprecated Use {@link getVueNodeConfig} instead for multi-instance support.
7
+ * This global map is still populated for backward compatibility but does NOT
8
+ * isolate registrations across different LogicFlow instances.
9
+ */
10
+ export var vueNodesMap = Object.create(null);
11
+ /**
12
+ * Retrieve the Vue node configuration scoped to a specific LogicFlow instance.
13
+ */
14
+ export function getVueNodeConfig(type, graphModel) {
15
+ var _a;
16
+ if (typeof graphModel !== 'object' || graphModel === null) {
17
+ return undefined;
18
+ }
19
+ return (_a = vueNodesMaps.get(graphModel)) === null || _a === void 0 ? void 0 : _a.get(type);
20
+ }
4
21
  export function register(config, lf) {
5
22
  var type = config.type, component = config.component, effect = config.effect, CustomNodeView = config.view, CustomNodeModel = config.model;
6
23
  if (!type) {
7
24
  throw new Error('You should specify type in config');
8
25
  }
9
- vueNodesMap[type] = {
10
- component: component,
11
- effect: effect,
12
- };
26
+ var entry = { component: component, effect: effect };
27
+ // Scope to this LogicFlow instance
28
+ var map = vueNodesMaps.get(lf.graphModel);
29
+ if (!map) {
30
+ map = new Map();
31
+ vueNodesMaps.set(lf.graphModel, map);
32
+ }
33
+ map.set(type, entry);
34
+ // Also populate global map for backward compatibility
35
+ vueNodesMap[type] = entry;
13
36
  lf.register({
14
37
  type: type,
15
38
  view: CustomNodeView || VueNodeView,
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAUtC,MAAM,CAAC,IAAM,WAAW,GAMpB,EAAE,CAAA;AAEN,MAAM,UAAU,QAAQ,CAAC,MAAqB,EAAE,EAAa;IAEzD,IAAA,IAAI,GAKF,MAAM,KALJ,EACJ,SAAS,GAIP,MAAM,UAJC,EACT,MAAM,GAGJ,MAAM,OAHF,EACA,cAAc,GAElB,MAAM,KAFY,EACb,eAAe,GACpB,MAAM,MADc,CACd;IAEV,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;IACtD,CAAC;IACD,WAAW,CAAC,IAAI,CAAC,GAAG;QAClB,SAAS,WAAA;QACT,MAAM,QAAA;KACP,CAAA;IAED,EAAE,CAAC,QAAQ,CAAC;QACV,IAAI,MAAA;QACJ,IAAI,EAAE,cAAc,IAAI,WAAW;QACnC,KAAK,EAAE,eAAe,IAAI,YAAY;KACvC,CAAC,CAAA;AACJ,CAAC"}
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAetC,gIAAgI;AAChI,IAAM,YAAY,GAAG,IAAI,OAAO,EAAyC,CAAA;AAEzE;;;;GAIG;AACH,MAAM,CAAC,IAAM,WAAW,GAAiC,MAAM,CAAC,MAAM,CACpE,IAAI,CAC2B,CAAA;AAEjC;;GAEG;AACH,MAAM,UA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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,6 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * Auto generated file, do not modify it!
4
+ */
5
+ export var 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";
6
+ //# 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;AAEH,MAAM,CAAC,IAAM,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,14 @@
1
+ export function computeBaseHeight(measuredHeight, _showTitle, _titleHeight) {
2
+ var extra = _showTitle
3
+ ? typeof _titleHeight === 'number'
4
+ ? _titleHeight
5
+ : 28
6
+ : 0;
7
+ return Math.max(1, Math.round(measuredHeight) - extra);
8
+ }
9
+ export function shouldUpdateSize(prevW, prevH, w, h) {
10
+ if (!w || !h)
11
+ return false;
12
+ return !(prevW === Math.round(w) && prevH === Math.round(h));
13
+ }
14
+ //# sourceMappingURL=size.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"size.js","sourceRoot":"","sources":["../../src/utils/size.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,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;AAED,MAAM,UAAU,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"}
package/es/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/es/view.js CHANGED
@@ -13,15 +13,51 @@ var __extends = (this && this.__extends) || (function () {
13
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
14
  };
15
15
  })();
16
- import { isVue2, isVue3, createApp, h, Vue2 } from 'vue-demi';
16
+ import { isVue2, isVue3, createApp, h, Vue2, defineComponent } from 'vue-demi';
17
+ // Vue2/3 兼容 API;使用 vue-demi 保持两端一致
18
+ import { throttle, round, get, isFunction, isArray, clamp, isNumber, } from 'lodash-es';
17
19
  import { HtmlNode } from '@logicflow/core';
18
- import { vueNodesMap } from './registry';
20
+ import { getVueNodeConfig } from './registry';
19
21
  import { isActive, connect, disconnect } from './teleport';
22
+ import { Container } from './components/container';
20
23
  var VueNodeView = /** @class */ (function (_super) {
21
24
  __extends(VueNodeView, _super);
22
25
  function VueNodeView() {
23
- return _super !== null && _super.apply(this, arguments) || this;
26
+ var _this = _super !== null && _super.apply(this, arguments) || this;
27
+ _this.__throttledUpdate = throttle(function () { return _this.measureAndUpdate(); }, 80);
28
+ _this.measureAndUpdate = function () {
29
+ try {
30
+ // 读取子组件(或容器本身)的实际尺寸并更新模型属性
31
+ var root = _this.getComponentContainer();
32
+ if (!root)
33
+ return;
34
+ var target = root.firstElementChild || root;
35
+ var rect = target.getBoundingClientRect();
36
+ var width = round(rect.width);
37
+ var height = round(rect.height);
38
+ if (width <= 0 || height <= 0)
39
+ return;
40
+ if (width === _this.__lastWidth && height === _this.__lastHeight)
41
+ return;
42
+ _this.__lastWidth = width;
43
+ _this.__lastHeight = height;
44
+ var props = _this.props.model.properties;
45
+ var extra = get(props, '_showTitle')
46
+ ? isNumber(get(props, '_titleHeight'))
47
+ ? get(props, '_titleHeight')
48
+ : 28
49
+ : 0;
50
+ // 去掉标题占用的高度,保证内容区域与模型高度一致
51
+ var baseHeight = clamp(height - extra, 1, Number.MAX_SAFE_INTEGER);
52
+ _this.props.model.setProperties({ width: width, height: baseHeight });
53
+ }
54
+ catch (err) {
55
+ // swallow error
56
+ }
57
+ };
58
+ return _this;
24
59
  }
60
+ // private isMounted: boolean = false
25
61
  VueNodeView.prototype.getComponentContainer = function () {
26
62
  return this.root;
27
63
  };
@@ -33,33 +69,81 @@ var VueNodeView = /** @class */ (function (_super) {
33
69
  this.unmount();
34
70
  };
35
71
  VueNodeView.prototype.setHtml = function (rootEl) {
36
- var el = document.createElement('div');
37
- el.className = 'custom-vue-node-content';
38
- this.root = el;
39
- rootEl.appendChild(el);
72
+ // 创建节点内容容器并注入到 foreignObject(若已存在则复用)
73
+ var existed = rootEl.querySelector('.custom-vue-node-content');
74
+ if (!existed) {
75
+ var el = document.createElement('div');
76
+ el.className = 'custom-vue-node-content';
77
+ this.root = el;
78
+ rootEl.appendChild(el);
79
+ }
80
+ // 渲染 Vue 组件并启用尺寸监听
40
81
  this.renderVueComponent();
82
+ this.startResizeObserver();
41
83
  };
42
84
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
43
85
  VueNodeView.prototype.confirmUpdate = function (_rootEl) {
44
86
  // TODO: 如有需要,可以先通过继承的方式,自定义该节点的更新逻辑;我们后续会根据实际需求,丰富该功能
45
- // console.log('_rootEl', _rootEl)
87
+ var model = this.props.model;
88
+ var _a = (model.properties || {})._showTitle, _showTitle = _a === void 0 ? false : _a;
89
+ if (_showTitle) {
90
+ this.setHtml(_rootEl);
91
+ }
46
92
  };
47
93
  VueNodeView.prototype.renderVueComponent = function () {
48
94
  var _a;
49
95
  this.unmountVueComponent();
50
96
  var root = this.getComponentContainer();
51
97
  var _b = this.props, model = _b.model, graphModel = _b.graphModel;
98
+ var _c = (model.properties || {})._showTitle, _showTitle = _c === void 0 ? false : _c;
99
+ var wrapWithContainer = function (child) {
100
+ return defineComponent({
101
+ name: 'LFVueNodeContainerWrapper',
102
+ props: {
103
+ node: { type: Object, required: true },
104
+ graph: { type: Object, required: true },
105
+ },
106
+ render: function () {
107
+ // 根据 _showTitle 决定是否用 Container 包裹,避免无标题时额外结构
108
+ if (!_showTitle) {
109
+ return h(child, { node: this.node, graph: this.graph });
110
+ }
111
+ return h(Container, { node: this.node, graph: this.graph }, [
112
+ h(child, { node: this.node, graph: this.graph }),
113
+ ]);
114
+ },
115
+ });
116
+ };
52
117
  if (root) {
53
- var component_1 = vueNodesMap[model.type].component;
54
- if (component_1) {
118
+ var nodeConfig = getVueNodeConfig(model.type, graphModel);
119
+ var flowId = this.props.graphModel.flowId;
120
+ if (!nodeConfig) {
121
+ // No registered config for this node type; ensure any existing Teleport mount is cleaned up
122
+ if (isVue3 && isActive() && flowId) {
123
+ disconnect(this.targetId(), flowId);
124
+ }
125
+ return;
126
+ }
127
+ var component = nodeConfig.component;
128
+ if (!component) {
129
+ // Config exists but has no component; also clean up any existing Teleport mount
130
+ if (isVue3 && isActive() && flowId) {
131
+ disconnect(this.targetId(), flowId);
132
+ }
133
+ return;
134
+ }
135
+ if (component) {
55
136
  if (isVue2) {
56
137
  var Vue = Vue2;
138
+ var Composed_1 = wrapWithContainer(component);
57
139
  this.vm = new Vue({
58
140
  el: root,
59
141
  render: function (h) {
60
- return h(component_1, {
61
- node: model,
62
- graph: graphModel,
142
+ return h(Composed_1, {
143
+ props: {
144
+ node: model,
145
+ graph: graphModel,
146
+ },
63
147
  });
64
148
  },
65
149
  provide: function () {
@@ -72,12 +156,14 @@ var VueNodeView = /** @class */ (function (_super) {
72
156
  }
73
157
  else if (isVue3) {
74
158
  if (isActive()) {
75
- connect(this.targetId(), component_1, root, model, graphModel);
159
+ var Composed = wrapWithContainer(component);
160
+ connect(this.targetId(), Composed, root, model, graphModel);
76
161
  }
77
162
  else {
163
+ var Composed_2 = wrapWithContainer(component);
78
164
  this.vm = createApp({
79
165
  render: function () {
80
- return h(component_1, {
166
+ return h(Composed_2, {
81
167
  node: model,
82
168
  graph: graphModel,
83
169
  });
@@ -90,24 +176,80 @@ var VueNodeView = /** @class */ (function (_super) {
90
176
  },
91
177
  });
92
178
  (_a = this.vm) === null || _a === void 0 ? void 0 : _a.mount(root);
179
+ // this.isMounted = true
93
180
  }
94
181
  }
95
182
  }
96
183
  }
97
184
  };
185
+ VueNodeView.prototype.startResizeObserver = function () {
186
+ var _this = this;
187
+ var _a;
188
+ // 启动尺寸监听:优先使用 ResizeObserver,退化到 window.resize
189
+ var root = this.getComponentContainer();
190
+ if (!root)
191
+ return;
192
+ try {
193
+ if (isFunction(window.ResizeObserver)) {
194
+ this.__resizeObserver = new window.ResizeObserver(function (entries) {
195
+ if (!isArray(entries) || !entries.length)
196
+ return;
197
+ if (_this.__resizeRafId)
198
+ cancelAnimationFrame(_this.__resizeRafId);
199
+ // 使用 RAF 对齐绘制帧,再用节流函数合并频繁变更
200
+ _this.__resizeRafId = requestAnimationFrame(_this.__throttledUpdate);
201
+ });
202
+ var target = root.firstElementChild || root;
203
+ (_a = this.__resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(target);
204
+ }
205
+ else {
206
+ // 退化监听:在窗口尺寸变化时尝试更新
207
+ window.addEventListener('resize', function () { return _this.__throttledUpdate(); });
208
+ this.__fallbackUnlisten = function () {
209
+ return window.removeEventListener('resize', function () { return _this.__throttledUpdate(); });
210
+ };
211
+ }
212
+ }
213
+ catch (err) {
214
+ // swallow error
215
+ }
216
+ };
217
+ VueNodeView.prototype.stopResizeObserver = function () {
218
+ try {
219
+ // 停止所有监听与异步回调,避免内存泄漏
220
+ if (this.__resizeObserver) {
221
+ this.__resizeObserver.disconnect();
222
+ this.__resizeObserver = undefined;
223
+ }
224
+ if (this.__resizeRafId) {
225
+ cancelAnimationFrame(this.__resizeRafId);
226
+ this.__resizeRafId = undefined;
227
+ }
228
+ if (this.__fallbackUnlisten) {
229
+ this.__fallbackUnlisten();
230
+ this.__fallbackUnlisten = undefined;
231
+ }
232
+ }
233
+ catch (err) {
234
+ // swallow error
235
+ }
236
+ };
98
237
  VueNodeView.prototype.unmountVueComponent = function () {
99
238
  var root = this.getComponentContainer();
239
+ // 在卸载 Vue 实例前先停止尺寸监听
240
+ this.stopResizeObserver();
100
241
  if (this.vm) {
101
242
  isVue2 && this.vm.$destroy();
102
243
  isVue3 && this.vm.unmount();
103
244
  this.vm = null;
104
245
  }
105
- if (root) {
246
+ if (root && !isActive()) {
106
247
  root.innerHTML = '';
107
248
  }
108
249
  return root;
109
250
  };
110
251
  VueNodeView.prototype.unmount = function () {
252
+ // Teleport 模式下断开连接,并清理视图与监听
111
253
  if (isActive()) {
112
254
  disconnect(this.targetId(), this.props.graphModel.flowId);
113
255
  }
package/es/view.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"view.js","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO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