@digitalsee-ai/rcs 2.0.0-beta7 → 2.0.0-beta8

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.
@@ -1,4 +1,4 @@
1
- import { ActionItem, LinkSearchParams, ModernNodeSelectorProps, NodeFetchResult, NodeTypeItem } from '../types';
1
+ import { ActionItem, LinkSearchParams, ModernNodeSelectorProps, NodeTypeItem } from '../types';
2
2
  import { NodeAddInfo } from '../../../types/NodeAddContext';
3
3
  type SearchHandler = NonNullable<ModernNodeSelectorProps['onSearch']>;
4
4
  type CategoryHandler = NonNullable<ModernNodeSelectorProps['onFetchCategories']>;
@@ -21,9 +21,9 @@ interface UseConnectableNodeSelectorProps {
21
21
  export declare function useConnectableNodeSelector({ nodeSelectorVisible, effectiveNodeAddInfo, workflowId, onSearch, onFetchCategories, onFetchNodesByCategory, }: UseConnectableNodeSelectorProps): {
22
22
  actionRequestContextKey: string;
23
23
  connectableContext: import('../utils/connectableQuery').ConnectableQueryContext;
24
- onSearch: (params?: LinkSearchParams) => Promise<NodeFetchResult>;
24
+ onSearch: (params?: LinkSearchParams) => Promise<import('../types').NodeFetchResult>;
25
25
  onFetchCategories: (type?: import('../types').CategoryRequestType) => Promise<import('../types').CategoryItem[]>;
26
- onFetchNodesByCategory: (params?: LinkSearchParams) => Promise<NodeFetchResult>;
26
+ onFetchNodesByCategory: (params?: LinkSearchParams) => Promise<import('../types').NodeFetchResult>;
27
27
  fetchNodeActions: (node: NodeTypeItem, _options?: FetchNodeActionOptions) => Promise<ActionItem[]>;
28
28
  };
29
29
  export {};
@@ -32,18 +32,34 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
32
32
  };
33
33
  };
34
34
  sourceNode?: {
35
+ position: {
36
+ x: number;
37
+ y: number;
38
+ };
35
39
  data: {
36
40
  [x: string]: unknown;
37
41
  };
38
42
  id: string;
39
43
  type?: string;
44
+ measured?: {
45
+ width?: number;
46
+ height?: number;
47
+ };
40
48
  };
41
49
  targetNode?: {
50
+ position: {
51
+ x: number;
52
+ y: number;
53
+ };
42
54
  data: {
43
55
  [x: string]: unknown;
44
56
  };
45
57
  id: string;
46
58
  type?: string;
59
+ measured?: {
60
+ width?: number;
61
+ height?: number;
62
+ };
47
63
  };
48
64
  trigger?: boolean;
49
65
  protocol?: string;
@@ -75,18 +91,34 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
75
91
  };
76
92
  };
77
93
  sourceNode?: {
94
+ position: {
95
+ x: number;
96
+ y: number;
97
+ };
78
98
  data: {
79
99
  [x: string]: unknown;
80
100
  };
81
101
  id: string;
82
102
  type?: string;
103
+ measured?: {
104
+ width?: number;
105
+ height?: number;
106
+ };
83
107
  };
84
108
  targetNode?: {
109
+ position: {
110
+ x: number;
111
+ y: number;
112
+ };
85
113
  data: {
86
114
  [x: string]: unknown;
87
115
  };
88
116
  id: string;
89
117
  type?: string;
118
+ measured?: {
119
+ width?: number;
120
+ height?: number;
121
+ };
90
122
  };
91
123
  trigger?: boolean;
92
124
  protocol?: string;
@@ -118,18 +150,34 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
118
150
  };
119
151
  };
120
152
  sourceNode?: {
153
+ position: {
154
+ x: number;
155
+ y: number;
156
+ };
121
157
  data: {
122
158
  [x: string]: unknown;
123
159
  };
124
160
  id: string;
125
161
  type?: string;
162
+ measured?: {
163
+ width?: number;
164
+ height?: number;
165
+ };
126
166
  };
127
167
  targetNode?: {
168
+ position: {
169
+ x: number;
170
+ y: number;
171
+ };
128
172
  data: {
129
173
  [x: string]: unknown;
130
174
  };
131
175
  id: string;
132
176
  type?: string;
177
+ measured?: {
178
+ width?: number;
179
+ height?: number;
180
+ };
133
181
  };
134
182
  trigger?: boolean;
135
183
  protocol?: string;
@@ -161,18 +209,34 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
161
209
  };
162
210
  };
163
211
  sourceNode?: {
212
+ position: {
213
+ x: number;
214
+ y: number;
215
+ };
164
216
  data: {
165
217
  [x: string]: unknown;
166
218
  };
167
219
  id: string;
168
220
  type?: string;
221
+ measured?: {
222
+ width?: number;
223
+ height?: number;
224
+ };
169
225
  };
170
226
  targetNode?: {
227
+ position: {
228
+ x: number;
229
+ y: number;
230
+ };
171
231
  data: {
172
232
  [x: string]: unknown;
173
233
  };
174
234
  id: string;
175
235
  type?: string;
236
+ measured?: {
237
+ width?: number;
238
+ height?: number;
239
+ };
176
240
  };
177
241
  trigger?: boolean;
178
242
  protocol?: string;
@@ -1,6 +1,6 @@
1
1
  import { Node } from '@xyflow/react';
2
2
  /** 节点选择器只需保留 MCP 判定需要的轻量锚点信息,避免 Redux 声明泄漏 ReactFlow 样式类型。 */
3
- export type NodeAddAnchorNode = Pick<Node, 'id' | 'type' | 'data'>;
3
+ export type NodeAddAnchorNode = Pick<Node, 'id' | 'type' | 'data' | 'position' | 'measured'>;
4
4
  /** 边上插入节点时保留的原边上下文。 */
5
5
  export interface NodeAddEdgeContext {
6
6
  id: string;
@@ -1,8 +1,8 @@
1
1
  import { jsx as t, jsxs as v } from "react/jsx-runtime";
2
- import { D as T, V as L, e as x, i as P, t as l, f as R, d as O } from "./index-Dy43iMlV.mjs";
3
- import { useEventEmitter as B, useReactive as W, useSize as A } from "ahooks";
2
+ import { D as T, V as L, e as x, i as P, t as l, f as R, d as O } from "./index-DJvNGsCf.mjs";
3
+ import { useEventEmitter as B, useReactive as W, useSize as H } from "ahooks";
4
4
  import { FormattedMessage as I } from "react-intl";
5
- import { CloseCircleFilled as H, CheckCircleFilled as K } from "@ant-design/icons";
5
+ import { CloseCircleFilled as A, CheckCircleFilled as K } from "@ant-design/icons";
6
6
  import { Button as M } from "antd";
7
7
  import * as z from "monaco-editor";
8
8
  import { useRef as k, useEffect as N } from "react";
@@ -26,10 +26,7 @@ const G = "_modalContainer_8inkd_5", Q = "_editorContainer_8inkd_16", U = "_side
26
26
  siderContainer: ie
27
27
  };
28
28
  function re(e) {
29
- return /* @__PURE__ */ v("div", { className: oe.siderContainer, children: [
30
- /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(te, { open: e.open, nodeId: e.nodeId, onInsert: e.onInsert }) }),
31
- /* @__PURE__ */ t("div", { style: { textAlign: "center" } })
32
- ] });
29
+ return /* @__PURE__ */ t("div", { className: oe.siderContainer, children: /* @__PURE__ */ t(te, { open: e.open, nodeId: e.nodeId, onInsert: e.onInsert }) });
33
30
  }
34
31
  function se({ language: e = "javascript" }) {
35
32
  return /* @__PURE__ */ v("h2", { id: "workflow-online-ide-title", className: "workflow-online-ide-title", children: [
@@ -39,7 +36,7 @@ function se({ language: e = "javascript" }) {
39
36
  }
40
37
  function ae(e) {
41
38
  return /* @__PURE__ */ v("div", { className: "workflow-online-ide-toolbar", children: [
42
- /* @__PURE__ */ t(M, { size: "small", onClick: e.onCancel, icon: /* @__PURE__ */ t(H, {}), children: /* @__PURE__ */ t(I, { id: "app.common.word.cancel" }) }),
39
+ /* @__PURE__ */ t(M, { size: "small", onClick: e.onCancel, icon: /* @__PURE__ */ t(A, {}), children: /* @__PURE__ */ t(I, { id: "app.common.word.cancel" }) }),
43
40
  /* @__PURE__ */ t(M, { type: "primary", size: "small", onClick: e.onFinish, icon: /* @__PURE__ */ t(K, {}), children: /* @__PURE__ */ t(I, { id: "app.common.word.finish" }) })
44
41
  ] });
45
42
  }
@@ -114,7 +111,7 @@ function V(e, i) {
114
111
  u.length !== a.length && e.editor.setModelMarkers(i, d, u.map(ge));
115
112
  });
116
113
  }
117
- function fe(e, i) {
114
+ function pe(e, i) {
118
115
  const o = [].map((c) => ({
119
116
  insertText: c,
120
117
  kind: e.languages.CompletionItemKind.Function,
@@ -133,7 +130,7 @@ function fe(e, i) {
133
130
  // 触发提示的字符 可以定义多个
134
131
  });
135
132
  }
136
- function pe(e) {
133
+ function fe(e) {
137
134
  return e.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
138
135
  noSemanticValidation: !0,
139
136
  noSyntaxValidation: !1
@@ -157,20 +154,20 @@ function Ie(e) {
157
154
  code: "",
158
155
  range: new z.Range(1, 1, 1, 1)
159
156
  }), b = (n, r) => {
160
- n.onDidChangeCursorPosition((f) => {
161
- const m = f.position, { lineNumber: p = 0, column: C = 0 } = m;
162
- g.range = new r.Range(p, C, p, C);
157
+ n.onDidChangeCursorPosition((p) => {
158
+ const m = p.position, { lineNumber: f = 0, column: C = 0 } = m;
159
+ g.range = new r.Range(f, C, f, C);
163
160
  }), d.current = n, n.focus(), g.code = n.getValue();
164
161
  const j = r.languages.registerHoverProvider(s, {
165
- provideHover: (f, m) => new Promise((p) => {
166
- const h = x(f.getValue()).find(
162
+ provideHover: (p, m) => new Promise((f) => {
163
+ const h = x(p.getValue()).find(
167
164
  (F) => P(F, m.lineNumber, m.column)
168
165
  );
169
166
  if (!h) {
170
- p(null);
167
+ f(null);
171
168
  return;
172
169
  }
173
- p({
170
+ f({
174
171
  range: new r.Range(
175
172
  h.startLine,
176
173
  h.startColumn,
@@ -182,13 +179,13 @@ function Ie(e) {
182
179
  })
183
180
  }), _ = n.getModel();
184
181
  if (_) {
185
- let f = !1;
186
- const m = r.editor.onDidChangeMarkers((p) => {
187
- f || !p.some((C) => C.toString() === _.uri.toString()) || (f = !0, window.setTimeout(() => {
182
+ let p = !1;
183
+ const m = r.editor.onDidChangeMarkers((f) => {
184
+ p || !f.some((C) => C.toString() === _.uri.toString()) || (p = !0, window.setTimeout(() => {
188
185
  try {
189
186
  V(r, _);
190
187
  } finally {
191
- f = !1;
188
+ p = !1;
192
189
  }
193
190
  }, 0));
194
191
  });
@@ -198,7 +195,7 @@ function Ie(e) {
198
195
  }, E = (n) => {
199
196
  u.current.forEach((r) => {
200
197
  r.dispose();
201
- }), u.current = [fe(n, s)], s === "javascript" && u.current.push(pe(n));
198
+ }), u.current = [pe(n, s)], s === "javascript" && u.current.push(fe(n));
202
199
  };
203
200
  N(
204
201
  () => () => {
@@ -227,7 +224,7 @@ function Ie(e) {
227
224
  }, $ = () => {
228
225
  var n;
229
226
  (n = e.onFinish) == null || n.call(e, g.code);
230
- }, D = k(null), y = A(D);
227
+ }, D = k(null), y = H(D);
231
228
  return q(
232
229
  /* @__PURE__ */ t(
233
230
  "div",
@@ -239,7 +236,7 @@ function Ie(e) {
239
236
  "aria-modal": "true",
240
237
  "aria-labelledby": "workflow-online-ide-title",
241
238
  children: /* @__PURE__ */ v("div", { className: w.editorContainer, id: "javascript-code-editor", children: [
242
- a ? /* @__PURE__ */ t("div", { className: w.sider, children: /* @__PURE__ */ t(
239
+ a ? /* @__PURE__ */ t("div", { className: w.sider, style: { maxWidth: "20%", padding: 0 }, children: /* @__PURE__ */ t(
243
240
  re,
244
241
  {
245
242
  onCancel: e.onCancel,
@@ -282,4 +279,4 @@ function Ie(e) {
282
279
  export {
283
280
  Ie as default
284
281
  };
285
- //# sourceMappingURL=index-trJRukGS.mjs.map
282
+ //# sourceMappingURL=index-DBoa8kIP.mjs.map