@digitalsee-ai/rcs 2.0.2 → 2.0.4-alpha

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,5 +1,5 @@
1
1
  import { jsx as t, jsxs as v } from "react/jsx-runtime";
2
- import { D as T, V as L, e as V, i as P, t as l, f as R, d as O } from "./index-wBJwDIRx.mjs";
2
+ import { D as T, V as L, e as V, i as P, t as l, f as R, d as O } from "./index-CrFbT2mm.mjs";
3
3
  import { useEventEmitter as B, useReactive as W, useSize as H } from "ahooks";
4
4
  import { FormattedMessage as $ } from "react-intl";
5
5
  import { CloseCircleFilled as A, CheckCircleFilled as K } from "@ant-design/icons";
@@ -7,9 +7,9 @@ import { Button as M } from "antd";
7
7
  import * as z from "monaco-editor";
8
8
  import { useRef as I, useEffect as j } from "react";
9
9
  import { createPortal as q } from "react-dom";
10
- import J from "react-monaco-editor";
11
- const G = "_modalContainer_1ajlo_5", Q = "_editorContainer_1ajlo_16", U = "_sider_1ajlo_25", X = "_main_1ajlo_34", Y = "_header_1ajlo_40", Z = "_editor_1ajlo_16", w = {
12
- modalContainer: G,
10
+ import G from "react-monaco-editor";
11
+ const J = "_modalContainer_1ajlo_5", Q = "_editorContainer_1ajlo_16", U = "_sider_1ajlo_25", X = "_main_1ajlo_34", Y = "_header_1ajlo_40", Z = "_editor_1ajlo_16", w = {
12
+ modalContainer: J,
13
13
  editorContainer: Q,
14
14
  sider: U,
15
15
  main: X,
@@ -31,7 +31,9 @@ function re(e) {
31
31
  function se({ language: e = "javascript" }) {
32
32
  return /* @__PURE__ */ v("h2", { id: "workflow-online-ide-title", className: "workflow-online-ide-title", children: [
33
33
  /* @__PURE__ */ t($, { id: "link.flow.code_editor" }),
34
- " (Javascript)"
34
+ " (",
35
+ e,
36
+ ")"
35
37
  ] });
36
38
  }
37
39
  function ae(e) {
@@ -111,7 +113,7 @@ function N(e, i) {
111
113
  u.length !== a.length && e.editor.setModelMarkers(i, d, u.map(ge));
112
114
  });
113
115
  }
114
- function pe(e, i) {
116
+ function fe(e, i) {
115
117
  const o = [].map((c) => ({
116
118
  insertText: c,
117
119
  kind: e.languages.CompletionItemKind.Function,
@@ -130,7 +132,7 @@ function pe(e, i) {
130
132
  // 触发提示的字符 可以定义多个
131
133
  });
132
134
  }
133
- function fe(e) {
135
+ function pe(e) {
134
136
  return e.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
135
137
  noSemanticValidation: !0,
136
138
  noSyntaxValidation: !1
@@ -154,20 +156,20 @@ function $e(e) {
154
156
  code: "",
155
157
  range: new z.Range(1, 1, 1, 1)
156
158
  }), b = (n, r) => {
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);
159
+ n.onDidChangeCursorPosition((f) => {
160
+ const m = f.position, { lineNumber: p = 0, column: C = 0 } = m;
161
+ g.range = new r.Range(p, C, p, C);
160
162
  }), d.current = n, n.focus(), g.code = n.getValue();
161
163
  const S = r.languages.registerHoverProvider(s, {
162
- provideHover: (p, m) => new Promise((f) => {
163
- const h = V(p.getValue()).find(
164
+ provideHover: (f, m) => new Promise((p) => {
165
+ const h = V(f.getValue()).find(
164
166
  (F) => P(F, m.lineNumber, m.column)
165
167
  );
166
168
  if (!h) {
167
- f(null);
169
+ p(null);
168
170
  return;
169
171
  }
170
- f({
172
+ p({
171
173
  range: new r.Range(
172
174
  h.startLine,
173
175
  h.startColumn,
@@ -179,13 +181,13 @@ function $e(e) {
179
181
  })
180
182
  }), _ = n.getModel();
181
183
  if (_) {
182
- let p = !1;
183
- const m = r.editor.onDidChangeMarkers((f) => {
184
- p || !f.some((C) => C.toString() === _.uri.toString()) || (p = !0, window.setTimeout(() => {
184
+ let f = !1;
185
+ const m = r.editor.onDidChangeMarkers((p) => {
186
+ f || !p.some((C) => C.toString() === _.uri.toString()) || (f = !0, window.setTimeout(() => {
185
187
  try {
186
188
  N(r, _);
187
189
  } finally {
188
- p = !1;
190
+ f = !1;
189
191
  }
190
192
  }, 0));
191
193
  });
@@ -195,7 +197,7 @@ function $e(e) {
195
197
  }, x = (n) => {
196
198
  u.current.forEach((r) => {
197
199
  r.dispose();
198
- }), u.current = [pe(n, s)], s === "javascript" && u.current.push(fe(n));
200
+ }), u.current = [fe(n, s)], s === "javascript" && u.current.push(pe(n));
199
201
  };
200
202
  j(
201
203
  () => () => {
@@ -253,7 +255,7 @@ function $e(e) {
253
255
  /* @__PURE__ */ t(ae, { onCancel: e.onCancel, onFinish: k })
254
256
  ] }),
255
257
  /* @__PURE__ */ t("div", { className: w.editor, children: /* @__PURE__ */ t(
256
- J,
258
+ G,
257
259
  {
258
260
  width: "100%",
259
261
  height: ((y == null ? void 0 : y.height) ?? 0) - 40,
@@ -279,4 +281,4 @@ function $e(e) {
279
281
  export {
280
282
  $e as default
281
283
  };
282
- //# sourceMappingURL=index-gInfzdAP.mjs.map
284
+ //# sourceMappingURL=index-Cx8t3uUz.mjs.map