markdown-flow-ui 0.2.36-dev.1 → 0.3.0

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 (128) hide show
  1. package/README.md +12 -12
  2. package/dist/_virtual/index.es4.js +5 -5
  3. package/dist/_virtual/index.es5.js +5 -5
  4. package/dist/_virtual/index4.cjs +1 -1
  5. package/dist/_virtual/index5.cjs +1 -1
  6. package/dist/_virtual/variable-marker.cjs +2 -0
  7. package/dist/_virtual/variable-marker.cjs.map +1 -0
  8. package/dist/_virtual/variable-marker.es.js +5 -0
  9. package/dist/_virtual/variable-marker.es.js.map +1 -0
  10. package/dist/components/ContentRender/ContentRender.cjs +2 -2
  11. package/dist/components/ContentRender/ContentRender.cjs.map +1 -1
  12. package/dist/components/ContentRender/ContentRender.es.js +206 -205
  13. package/dist/components/ContentRender/ContentRender.es.js.map +1 -1
  14. package/dist/components/ContentRender/utils/inline-code-ranges.cjs +9 -9
  15. package/dist/components/ContentRender/utils/inline-code-ranges.cjs.map +1 -1
  16. package/dist/components/ContentRender/utils/inline-code-ranges.d.ts +3 -0
  17. package/dist/components/ContentRender/utils/inline-code-ranges.es.js +185 -161
  18. package/dist/components/ContentRender/utils/inline-code-ranges.es.js.map +1 -1
  19. package/dist/components/ContentRender/utils/mermaid-parse.cjs +4 -4
  20. package/dist/components/ContentRender/utils/mermaid-parse.cjs.map +1 -1
  21. package/dist/components/ContentRender/utils/mermaid-parse.es.js +53 -48
  22. package/dist/components/ContentRender/utils/mermaid-parse.es.js.map +1 -1
  23. package/dist/components/ContentRender/utils/split-content.cjs +6 -6
  24. package/dist/components/ContentRender/utils/split-content.cjs.map +1 -1
  25. package/dist/components/ContentRender/utils/split-content.d.ts +1 -0
  26. package/dist/components/ContentRender/utils/split-content.es.js +361 -313
  27. package/dist/components/ContentRender/utils/split-content.es.js.map +1 -1
  28. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs +1 -1
  29. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs.map +1 -1
  30. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js +278 -283
  31. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js.map +1 -1
  32. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs +1 -1
  33. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs.map +1 -1
  34. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js +57 -58
  35. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js.map +1 -1
  36. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs +1 -1
  37. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.d.ts +1 -1
  38. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js +1 -1
  39. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.cjs +1 -1
  40. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.d.ts +1 -1
  41. package/dist/components/MarkdownFlowEditor/locales/de-DE.json.es.js +19 -19
  42. package/dist/components/MarkdownFlowEditor/locales/en-US.json.cjs +1 -1
  43. package/dist/components/MarkdownFlowEditor/locales/en-US.json.d.ts +1 -1
  44. package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js +5 -5
  45. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.cjs +1 -1
  46. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.d.ts +1 -1
  47. package/dist/components/MarkdownFlowEditor/locales/es-ES.json.es.js +1 -1
  48. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.cjs +1 -1
  49. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.d.ts +1 -1
  50. package/dist/components/MarkdownFlowEditor/locales/fil-PH.json.es.js +15 -15
  51. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.cjs +1 -1
  52. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.d.ts +1 -1
  53. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js +13 -13
  54. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.cjs +1 -1
  55. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.d.ts +1 -1
  56. package/dist/components/MarkdownFlowEditor/locales/ja-JP.json.es.js +1 -1
  57. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs +1 -1
  58. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.d.ts +1 -1
  59. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js +1 -1
  60. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.cjs +1 -1
  61. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.d.ts +1 -1
  62. package/dist/components/MarkdownFlowEditor/locales/ur-PK.json.es.js +1 -1
  63. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.cjs +1 -1
  64. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.d.ts +1 -1
  65. package/dist/components/MarkdownFlowEditor/locales/vi-VN.json.es.js +15 -15
  66. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.cjs +1 -1
  67. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.d.ts +1 -1
  68. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js +1 -1
  69. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs +3 -3
  70. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.map +1 -1
  71. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js +177 -176
  72. package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js.map +1 -1
  73. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.cjs +2 -1
  74. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.cjs.map +1 -1
  75. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.d.ts +3 -1
  76. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.es.js +38 -55
  77. package/dist/components/MarkdownFlowEditor/plugins/VariablePlaceholder.es.js.map +1 -1
  78. package/dist/components/MarkdownFlowEditor/utils.cjs +1 -1
  79. package/dist/components/MarkdownFlowEditor/utils.cjs.map +1 -1
  80. package/dist/components/MarkdownFlowEditor/utils.d.ts +2 -2
  81. package/dist/components/MarkdownFlowEditor/utils.es.js +34 -31
  82. package/dist/components/MarkdownFlowEditor/utils.es.js.map +1 -1
  83. package/dist/components/ui/inputGroup/textarea.cjs +1 -1
  84. package/dist/components/ui/inputGroup/textarea.es.js +1 -1
  85. package/dist/lib/interaction-defaults.cjs +1 -1
  86. package/dist/lib/interaction-defaults.cjs.map +1 -1
  87. package/dist/lib/interaction-defaults.es.js +124 -133
  88. package/dist/lib/interaction-defaults.es.js.map +1 -1
  89. package/dist/lib/interaction-defaults.failure.test.d.ts +1 -0
  90. package/dist/node_modules/rc-input/es/BaseInput.cjs +1 -1
  91. package/dist/node_modules/rc-input/es/BaseInput.es.js +1 -1
  92. package/dist/node_modules/rc-textarea/es/ResizableTextArea.cjs +1 -1
  93. package/dist/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
  94. package/dist/node_modules/rc-textarea/es/TextArea.cjs +1 -1
  95. package/dist/node_modules/rc-textarea/es/TextArea.es.js +1 -1
  96. package/dist/node_modules/rc-textarea/es/index.cjs +1 -1
  97. package/dist/node_modules/rc-textarea/es/index.es.js +1 -1
  98. package/dist/node_modules/remark-flow/dist/escaping.cjs +2 -2
  99. package/dist/node_modules/remark-flow/dist/escaping.cjs.map +1 -1
  100. package/dist/node_modules/remark-flow/dist/escaping.es.js +128 -63
  101. package/dist/node_modules/remark-flow/dist/escaping.es.js.map +1 -1
  102. package/dist/node_modules/remark-flow/dist/index.cjs +1 -1
  103. package/dist/node_modules/remark-flow/dist/index.cjs.map +1 -1
  104. package/dist/node_modules/remark-flow/dist/index.es.js +49 -37
  105. package/dist/node_modules/remark-flow/dist/index.es.js.map +1 -1
  106. package/dist/node_modules/remark-flow/dist/interaction-parser.cjs +1 -1
  107. package/dist/node_modules/remark-flow/dist/interaction-parser.cjs.map +1 -1
  108. package/dist/node_modules/remark-flow/dist/interaction-parser.es.js +260 -255
  109. package/dist/node_modules/remark-flow/dist/interaction-parser.es.js.map +1 -1
  110. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs +1 -1
  111. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs.map +1 -1
  112. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js +71 -42
  113. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js.map +1 -1
  114. package/dist/node_modules/remark-flow/dist/interaction-syntax.cjs +1 -1
  115. package/dist/node_modules/remark-flow/dist/interaction-syntax.cjs.map +1 -1
  116. package/dist/node_modules/remark-flow/dist/interaction-syntax.es.js +501 -46
  117. package/dist/node_modules/remark-flow/dist/interaction-syntax.es.js.map +1 -1
  118. package/dist/node_modules/remark-flow/dist/variable-marker.cjs +2 -0
  119. package/dist/node_modules/remark-flow/dist/variable-marker.cjs.map +1 -0
  120. package/dist/node_modules/remark-flow/dist/variable-marker.es.js +77 -0
  121. package/dist/node_modules/remark-flow/dist/variable-marker.es.js.map +1 -0
  122. package/dist/node_modules/remark-flow/dist/variable-name.cjs +14 -1
  123. package/dist/node_modules/remark-flow/dist/variable-name.cjs.map +1 -1
  124. package/dist/node_modules/remark-flow/dist/variable-name.es.js +742 -25
  125. package/dist/node_modules/remark-flow/dist/variable-name.es.js.map +1 -1
  126. package/dist/node_modules/unified/lib/index.cjs +1 -1
  127. package/dist/node_modules/unified/lib/index.es.js +1 -1
  128. package/package.json +2 -2
@@ -1,82 +1,77 @@
1
- import { jsx as m, jsxs as $ } from "react/jsx-runtime";
2
- import { useEffect as b, useMemo as w, useState as v, useRef as Q, useCallback as s } from "react";
3
- import Qe from "../../node_modules/@uiw/react-codemirror/esm/index.es.js";
4
- import { autocompletion as Ue } from "../../node_modules/@codemirror/autocomplete/dist/index.es.js";
5
- import { EditorView as Le } from "../../node_modules/@codemirror/view/dist/index.es.js";
6
- import { markdown as Ye } from "../../node_modules/@codemirror/lang-markdown/dist/index.es.js";
7
- import { syntaxHighlighting as Je, defaultHighlightStyle as Xe } from "../../node_modules/@codemirror/language/dist/index.es.js";
8
- import { Tooltip as Ze, TooltipTrigger as et, TooltipContent as tt } from "../ui/tooltip.es.js";
9
- import ot from "./components/CustomDialog.es.js";
10
- import nt from "./components/CustomPopover.es.js";
11
- import rt from "./components/EditorToolbar.es.js";
12
- import it from "./components/VariableSearchDropdown.es.js";
13
- import at from "./editor-context.es.js";
14
- import st from "./components/ImageInject.es.js";
15
- import lt from "./components/VideoInject.es.js";
16
- import ct from "./components/VariableSelect.es.js";
1
+ import { jsx as m, jsxs as B } from "react/jsx-runtime";
2
+ import { useEffect as C, useMemo as v, useState as w, useRef as K, useCallback as l } from "react";
3
+ import Ye from "../../node_modules/@uiw/react-codemirror/esm/index.es.js";
4
+ import { autocompletion as Je } from "../../node_modules/@codemirror/autocomplete/dist/index.es.js";
5
+ import { EditorView as we } from "../../node_modules/@codemirror/view/dist/index.es.js";
6
+ import { markdown as Xe } from "../../node_modules/@codemirror/lang-markdown/dist/index.es.js";
7
+ import { syntaxHighlighting as Ze, defaultHighlightStyle as et } from "../../node_modules/@codemirror/language/dist/index.es.js";
8
+ import { Tooltip as tt, TooltipTrigger as ot, TooltipContent as nt } from "../ui/tooltip.es.js";
9
+ import rt from "./components/CustomDialog.es.js";
10
+ import it from "./components/CustomPopover.es.js";
11
+ import at from "./components/EditorToolbar.es.js";
12
+ import lt from "./components/VariableSearchDropdown.es.js";
13
+ import st from "./editor-context.es.js";
14
+ import ct from "./components/ImageInject.es.js";
15
+ import ut from "./components/VideoInject.es.js";
16
+ import mt from "./components/VariableSelect.es.js";
17
17
  import { SelectedOption as f } from "./types.es.js";
18
18
  /* empty css */
19
- import { getImageContentToInsert as ut, getVideoContentToInsert as mt, createSlashCommands as ft, parseContentInfo as ht, createVariableExpressionRegexp as pt } from "./utils.es.js";
19
+ import { getImageContentToInsert as ft, getVideoContentToInsert as ht, createSlashCommands as pt, parseContentInfo as gt } from "./utils.es.js";
20
20
  import dt from "./plugins/ImgPlaceholder.es.js";
21
- import gt from "./plugins/VideoPlaceholder.es.js";
22
- import { mediaPlaceholderLabels as Vt } from "./plugins/mediaPlaceholderLabels.es.js";
21
+ import Vt from "./plugins/VideoPlaceholder.es.js";
22
+ import { mediaPlaceholderLabels as bt } from "./plugins/mediaPlaceholderLabels.es.js";
23
23
  import Ct from "./plugins/VariablePlaceholder.es.js";
24
- import bt from "./plugins/SyntaxHighlighter.es.js";
25
- import ie from "../../node_modules/i18next/dist/esm/i18next.es.js";
26
- import { DEFAULT_EDITOR_LOCALE as ae, editorLocaleResources as Ee, getEditorLocaleMessages as St } from "./editorI18n.es.js";
27
- import { normalizeMarkdownFlowLocale as It, getMarkdownFlowDirection as wt, getMarkdownFlowLanguage as vt } from "../../lib/locale.es.js";
24
+ import St from "./plugins/SyntaxHighlighter.es.js";
25
+ import ne from "../../node_modules/i18next/dist/esm/i18next.es.js";
26
+ import { DEFAULT_EDITOR_LOCALE as re, editorLocaleResources as Te, getEditorLocaleMessages as It } from "./editorI18n.es.js";
27
+ import { normalizeMarkdownFlowLocale as vt, getMarkdownFlowDirection as wt, getMarkdownFlowLanguage as Tt } from "../../lib/locale.es.js";
28
28
  import { useDetachedLanguage as Lt } from "../../lib/useDetachedLanguage.es.js";
29
- import { useResolvedDirection as Et } from "../../lib/useResolvedDirection.es.js";
30
- import { initReactI18next as Tt } from "../../node_modules/react-i18next/dist/es/initReactI18next.es.js";
31
- import { useTranslation as kt } from "../../node_modules/react-i18next/dist/es/useTranslation.es.js";
32
- import { d as xt } from "../../_virtual/index.es.js";
33
- ie.isInitialized ? Object.entries(Ee).forEach(([C, h]) => {
34
- ie.addResourceBundle(
35
- C,
29
+ import { useResolvedDirection as kt } from "../../lib/useResolvedDirection.es.js";
30
+ import { initReactI18next as Et } from "../../node_modules/react-i18next/dist/es/initReactI18next.es.js";
31
+ import { useTranslation as Ot } from "../../node_modules/react-i18next/dist/es/useTranslation.es.js";
32
+ import { d as N } from "../../_virtual/index.es.js";
33
+ ne.isInitialized ? Object.entries(Te).forEach(([V, h]) => {
34
+ ne.addResourceBundle(
35
+ V,
36
36
  "translation",
37
37
  h.translation,
38
38
  !0,
39
39
  !0
40
40
  );
41
- }) : ie.use(Tt).init({
42
- resources: Ee,
43
- lng: ae,
44
- fallbackLng: ae,
41
+ }) : ne.use(Et).init({
42
+ resources: Te,
43
+ lng: re,
44
+ fallbackLng: re,
45
45
  interpolation: { escapeValue: !1 }
46
46
  });
47
- const Te = [], ke = (C, h) => {
48
- if (!C || h < 0)
47
+ const Le = [], ke = (V, h) => {
48
+ if (!V || h < 0)
49
49
  return !1;
50
- const x = pt();
51
- let L;
52
- for (; (L = x.exec(C)) !== null; ) {
53
- const E = L.index ?? 0, U = E + L[0].length, R = E + 2, Y = U - 2;
54
- if (h >= R && h <= Y)
50
+ for (const k of N.findDocumentVariableMarkers(V))
51
+ if (k.name !== null && h >= k.start + 2 && h <= k.end - 2)
55
52
  return !0;
56
- x.lastIndex === L.index && x.lastIndex++;
57
- }
58
53
  return !1;
59
- }, Ot = (C = "") => `{{${C}}}`, lo = ({
60
- content: C = "",
54
+ }, yt = (V = "") => V ? N.formatVariableReference(V) : "{{ }}", so = ({
55
+ content: V = "",
61
56
  editMode: h = "codeEdit",
62
- variables: x,
63
- systemVariables: L,
64
- onChange: E,
65
- onBlur: U,
66
- locale: R,
67
- lang: Y,
68
- uploadProps: xe,
57
+ variables: k,
58
+ systemVariables: ie,
59
+ onChange: F,
60
+ onBlur: Ee,
61
+ locale: Q,
62
+ lang: Oe,
63
+ uploadProps: ye,
69
64
  disabled: n = !1,
70
- toolbarActionsRight: J,
71
- onReady: Oe
65
+ toolbarActionsRight: U,
66
+ onReady: xe
72
67
  }) => {
73
- const { t: a, i18n: X } = kt(), j = It(
74
- R ?? ae
75
- ), se = wt(R), le = Y ?? vt(R);
76
- b(() => {
77
- X.language !== j && X.changeLanguage(j);
78
- }, [X, j]);
79
- const O = St(j), V = w(
68
+ const { t: a, i18n: Y } = Ot(), j = vt(
69
+ Q ?? re
70
+ ), ae = wt(Q), le = Oe ?? Tt(Q);
71
+ C(() => {
72
+ Y.language !== j && Y.changeLanguage(j);
73
+ }, [Y, j]);
74
+ const E = It(j), b = v(
80
75
  () => ({
81
76
  image: a("toolbarInsertImage", {
82
77
  defaultValue: "Insert image"
@@ -122,7 +117,7 @@ const Te = [], ke = (C, h) => {
122
117
  })
123
118
  }),
124
119
  [a]
125
- ), ye = w(
120
+ ), Pe = v(
126
121
  () => ({
127
122
  searchPlaceholder: a("variableSearchPlaceholder", {
128
123
  defaultValue: "Search variable"
@@ -132,115 +127,113 @@ const Te = [], ke = (C, h) => {
132
127
  emptyLabel: a("variableNotFound", "No variables found")
133
128
  }),
134
129
  [a]
135
- ), Pe = h === "quickEdit" ? a("placeholderQuickEdit", {
130
+ ), Ne = h === "quickEdit" ? a("placeholderQuickEdit", {
136
131
  defaultValue: a("placeholderCodeEdit", {
137
132
  defaultValue: a("placeholder")
138
133
  })
139
- }) : a("placeholderCodeEdit", { defaultValue: a("placeholder") }), A = w(() => {
134
+ }) : a("placeholderCodeEdit", { defaultValue: a("placeholder") }), D = v(() => {
140
135
  const e = /* @__PURE__ */ new Set();
141
- return (L ?? Te).filter((o) => {
142
- const r = typeof o?.name == "string" ? o.name.toLowerCase() : "";
143
- return !r || e.has(r) ? !1 : (e.add(r), !0);
136
+ return (ie ?? Le).flatMap((o) => {
137
+ const r = typeof o?.name == "string" ? N.normalizeVariableName(o.name) : null;
138
+ return r === null || e.has(r) ? [] : (e.add(r), [{ ...o, name: r }]);
144
139
  });
145
- }, [L]), Z = w(() => {
140
+ }, [ie]), J = v(() => {
146
141
  const e = new Set(
147
- A.map((r) => r.name.toLowerCase())
142
+ D.map((r) => r.name)
148
143
  ), o = /* @__PURE__ */ new Set();
149
- return (x ?? Te).filter((r) => {
150
- const t = typeof r?.name == "string" ? r.name.toLowerCase() : "";
151
- return !t || e.has(t) || o.has(t) ? !1 : (o.add(t), !0);
144
+ return (k ?? Le).flatMap((r) => {
145
+ const t = typeof r?.name == "string" ? N.normalizeVariableName(r.name) : null;
146
+ return t === null || e.has(t) || o.has(t) ? [] : (o.add(t), [{ ...r, name: t }]);
152
147
  });
153
- }, [x, A]), [ee, T] = v(!1), [te, y] = v(!1), H = Q(null), z = Lt(H, le), { resolvedDirection: B } = Et(
148
+ }, [k, D]), [X, T] = w(!1), [Z, O] = w(!1), H = K(null), R = Lt(H, le), { resolvedDirection: A } = kt(
154
149
  H,
155
- se
156
- ), [Ne, F] = v(null), [ce, oe] = v(
157
- Z
158
- ), [q, De] = v(
159
- A
150
+ ae
151
+ ), [De, z] = w(null), [se, ee] = w(
152
+ J
153
+ ), [$, Re] = w(
154
+ D
160
155
  );
161
- b(() => {
162
- oe(Z);
163
- }, [Z]), b(() => {
164
- De(A);
165
- }, [A]);
166
- const [S, k] = v(
156
+ C(() => {
157
+ ee(J);
158
+ }, [J]), C(() => {
159
+ Re(D);
160
+ }, [D]);
161
+ const [S, L] = w(
167
162
  f.Empty
168
- ), [l, M] = v(), i = Q(null), _ = Q(null), G = Q(null), [ne, ue] = v(!1), d = s(() => {
169
- ue(!1), G.current = null;
170
- }, []), Re = s(
163
+ ), [s, M] = w(), i = K(null), q = K(null), _ = K(null), [te, ce] = w(!1), d = l(() => {
164
+ ce(!1), _.current = null;
165
+ }, []), Ae = l(
171
166
  (e) => {
172
167
  if (!n) {
173
- if (ne && G.current === e) {
168
+ if (te && _.current === e) {
174
169
  d();
175
170
  return;
176
171
  }
177
- G.current = e, ue(!0);
172
+ _.current = e, ce(!0);
178
173
  }
179
174
  },
180
- [d, n, ne]
181
- ), Ae = {
175
+ [d, n, te]
176
+ ), ze = {
182
177
  selectedOption: S,
183
- setSelectedOption: k,
184
- dialogOpen: ee,
178
+ setSelectedOption: L,
179
+ dialogOpen: X,
185
180
  setDialogOpen: T,
186
- popoverOpen: te,
187
- setPopoverOpen: y,
188
- popoverPosition: Ne,
189
- setPopoverPosition: F
181
+ popoverOpen: Z,
182
+ setPopoverOpen: O,
183
+ popoverPosition: De,
184
+ setPopoverPosition: z
190
185
  };
191
- b(() => {
192
- n && (T(!1), y(!1), k(f.Empty), M(null), F(null), d());
186
+ C(() => {
187
+ n && (T(!1), O(!1), L(f.Empty), M(null), z(null), d());
193
188
  }, [
194
189
  d,
195
190
  n,
196
191
  T,
197
- y,
198
- F,
199
- k,
192
+ O,
193
+ z,
194
+ L,
200
195
  M
201
196
  ]);
202
- const P = s(
197
+ const y = l(
203
198
  (e) => {
204
199
  if (h !== "quickEdit" || !e)
205
200
  return;
206
- const o = xt.extractVariableNames(e);
201
+ const o = N.extractVariableNames(e);
207
202
  if (!o.length)
208
203
  return;
209
204
  const r = new Set(
210
- q.map((t) => t.name.toLowerCase())
205
+ $.map((t) => t.name)
211
206
  );
212
- oe((t) => {
213
- const c = new Set(
214
- t.map((g) => g.name.toLowerCase())
215
- ), u = /* @__PURE__ */ new Set(), p = [];
207
+ ee((t) => {
208
+ const c = new Set(t.map((g) => g.name)), u = /* @__PURE__ */ new Set(), p = [];
216
209
  return o.forEach((g) => {
217
- const I = g.toLowerCase();
210
+ const I = g;
218
211
  !g || r.has(I) || c.has(I) || u.has(I) || (p.push({ name: g }), u.add(I));
219
212
  }), p.length ? [...p, ...t] : t;
220
213
  });
221
214
  },
222
- [h, q]
215
+ [h, $]
223
216
  );
224
- b(() => {
225
- P(C);
226
- }, [C, P]);
227
- const re = s(
217
+ C(() => {
218
+ y(V);
219
+ }, [V, y]);
220
+ const oe = l(
228
221
  (e) => {
229
222
  if (!n)
230
- if (d(), k(e), e === f.Variable) {
223
+ if (d(), L(e), e === f.Variable) {
231
224
  if (i.current) {
232
225
  const { state: o } = i.current, r = o.selection.main.from, t = i.current.coordsAtPos(r);
233
- t && F({
226
+ t && z({
234
227
  x: t.left,
235
228
  y: t.bottom
236
229
  });
237
230
  }
238
- y(!0);
231
+ O(!0);
239
232
  } else
240
233
  T(!0);
241
234
  },
242
235
  [d, n]
243
- ), N = s(
236
+ ), x = l(
244
237
  (e) => {
245
238
  if (n || !i.current) return;
246
239
  const { state: o, dispatch: r } = i.current, t = o.selection.main.from;
@@ -250,7 +243,7 @@ const Te = [], ke = (C, h) => {
250
243
  });
251
244
  },
252
245
  [i, n]
253
- ), me = s(
246
+ ), ue = l(
254
247
  (e) => {
255
248
  if (n || !i.current)
256
249
  return;
@@ -261,14 +254,14 @@ const Te = [], ke = (C, h) => {
261
254
  });
262
255
  },
263
256
  [n]
264
- ), fe = s(() => {
257
+ ), me = l(() => {
265
258
  i.current?.focus();
266
- }, []), he = s(() => i.current?.state.doc.toString() ?? "", []), pe = s(
259
+ }, []), fe = l(() => i.current?.state.doc.toString() ?? "", []), he = l(
267
260
  (e) => {
268
261
  if (n)
269
262
  return;
270
263
  if (!i.current) {
271
- E?.(e);
264
+ F?.(e);
272
265
  return;
273
266
  }
274
267
  const o = i.current, { state: r, dispatch: t } = o;
@@ -277,19 +270,21 @@ const Te = [], ke = (C, h) => {
277
270
  selection: { anchor: e.length }
278
271
  });
279
272
  },
280
- [n, E]
281
- ), W = s(() => {
282
- if (n || !l || !i.current || l.from === -1)
273
+ [n, F]
274
+ ), G = l(() => {
275
+ if (n || !s || !i.current || s.from === -1)
283
276
  return;
284
- const { from: e, to: o } = l, { dispatch: r } = i.current;
277
+ const { from: e, to: o } = s, { dispatch: r } = i.current;
285
278
  r({
286
279
  changes: { from: e, to: o, insert: "" }
287
280
  });
288
- }, [l, i, n]), K = s(
281
+ }, [s, i, n]), W = l(
289
282
  (e, o, r = !1) => {
290
283
  if (n || !i.current)
291
284
  return;
292
- const t = i.current, { state: c, dispatch: u } = t, p = o ?? c.selection.main, g = Ot(e), I = r ? g.length : 2 + e.length;
285
+ const t = i.current, { state: c, dispatch: u } = t, p = o ?? c.selection.main, g = yt(e);
286
+ if (!g) return;
287
+ const I = N.normalizeVariableName(e) ?? "", Ue = r ? g.length : 3 + I.length;
293
288
  u({
294
289
  changes: {
295
290
  from: p.from,
@@ -297,14 +292,14 @@ const Te = [], ke = (C, h) => {
297
292
  insert: g
298
293
  },
299
294
  selection: {
300
- anchor: p.from + I
295
+ anchor: p.from + Ue
301
296
  }
302
297
  }), t.focus();
303
298
  },
304
299
  [n]
305
- ), ze = s(() => {
306
- n || (d(), K(""));
307
- }, [d, n, K]), Be = s(() => {
300
+ ), Me = l(() => {
301
+ n || (d(), W(""));
302
+ }, [d, n, W]), Be = l(() => {
308
303
  if (n || !i.current)
309
304
  return;
310
305
  const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main;
@@ -318,7 +313,7 @@ const Te = [], ke = (C, h) => {
318
313
  anchor: t.from + 3
319
314
  }
320
315
  }), e.focus();
321
- }, [n]), Fe = s(() => {
316
+ }, [n]), Fe = l(() => {
322
317
  if (n || !i.current)
323
318
  return;
324
319
  const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main;
@@ -332,7 +327,7 @@ const Te = [], ke = (C, h) => {
332
327
  anchor: t.from + 1
333
328
  }
334
329
  }), e.focus();
335
- }, [n]), Me = s(() => {
330
+ }, [n]), je = l(() => {
336
331
  if (n || !i.current)
337
332
  return;
338
333
  const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main;
@@ -346,10 +341,10 @@ const Te = [], ke = (C, h) => {
346
341
  anchor: t.from + 2
347
342
  }
348
343
  }), e.focus();
349
- }, [n]), $e = s(() => {
344
+ }, [n]), He = l(() => {
350
345
  if (n || !i.current)
351
346
  return;
352
- const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main, c = V.singleChoiceOption1, u = V.singleChoiceOption2, p = `?[%{{}} ${c} | ${u}]`;
347
+ const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main, c = b.singleChoiceOption1, u = b.singleChoiceOption2, p = `?[%{{ }} ${c} | ${u}]`;
353
348
  r({
354
349
  changes: {
355
350
  from: t.from,
@@ -357,17 +352,17 @@ const Te = [], ke = (C, h) => {
357
352
  insert: p
358
353
  },
359
354
  selection: {
360
- anchor: t.from + 5
355
+ anchor: t.from + 6
361
356
  }
362
357
  }), e.focus();
363
358
  }, [
364
359
  n,
365
- V.singleChoiceOption1,
366
- V.singleChoiceOption2
367
- ]), je = s(() => {
360
+ b.singleChoiceOption1,
361
+ b.singleChoiceOption2
362
+ ]), $e = l(() => {
368
363
  if (n || !i.current)
369
364
  return;
370
- const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main, c = V.singleChoiceOption1, u = V.singleChoiceOption2, p = `?[%{{}} ${c} || ${u}]`;
365
+ const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main, c = b.singleChoiceOption1, u = b.singleChoiceOption2, p = `?[%{{ }} ${c} || ${u}]`;
371
366
  r({
372
367
  changes: {
373
368
  from: t.from,
@@ -375,17 +370,17 @@ const Te = [], ke = (C, h) => {
375
370
  insert: p
376
371
  },
377
372
  selection: {
378
- anchor: t.from + 5
373
+ anchor: t.from + 6
379
374
  }
380
375
  }), e.focus();
381
376
  }, [
382
377
  n,
383
- V.singleChoiceOption1,
384
- V.singleChoiceOption2
385
- ]), He = s(() => {
378
+ b.singleChoiceOption1,
379
+ b.singleChoiceOption2
380
+ ]), qe = l(() => {
386
381
  if (n || !i.current)
387
382
  return;
388
- const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main, u = `?[%{{}}...${V.inputPlaceholder ?? "请输入"}]`;
383
+ const e = i.current, { state: o, dispatch: r } = e, t = o.selection.main, u = `?[%{{ }}...${b.inputPlaceholder ?? "请输入"}]`;
389
384
  r({
390
385
  changes: {
391
386
  from: t.from,
@@ -393,157 +388,157 @@ const Te = [], ke = (C, h) => {
393
388
  insert: u
394
389
  },
395
390
  selection: {
396
- anchor: t.from + 5
391
+ anchor: t.from + 6
397
392
  }
398
393
  }), e.focus();
399
- }, [n, V.inputPlaceholder]), qe = s(
394
+ }, [n, b.inputPlaceholder]), _e = l(
400
395
  ({
401
396
  resourceUrl: e,
402
397
  resourceTitle: o,
403
398
  scalePercent: r
404
399
  }) => {
405
400
  if (!e || n) return;
406
- const t = ut({
401
+ const t = ft({
407
402
  resourceUrl: e,
408
403
  resourceTitle: o,
409
404
  scalePercent: r
410
405
  });
411
- if (l?.type === f.Image) {
412
- if (W(), !i.current) return;
406
+ if (s?.type === f.Image) {
407
+ if (G(), !i.current) return;
413
408
  const { dispatch: c } = i.current;
414
409
  c({
415
- changes: { from: l.from, insert: t }
410
+ changes: { from: s.from, insert: t }
416
411
  });
417
412
  } else
418
- N(t);
413
+ x(t);
419
414
  T(!1);
420
415
  },
421
- [W, n, N, l]
422
- ), _e = s(
416
+ [G, n, x, s]
417
+ ), Ge = l(
423
418
  ({
424
419
  resourceUrl: e,
425
420
  resourceTitle: o
426
421
  }) => {
427
422
  if (n)
428
423
  return;
429
- const r = mt(e, o);
430
- if (l?.type === f.Video) {
431
- if (W(), !i.current) return;
424
+ const r = ht(e, o);
425
+ if (s?.type === f.Video) {
426
+ if (G(), !i.current) return;
432
427
  const { dispatch: t } = i.current;
433
428
  t({
434
- changes: { from: l.from, insert: r }
429
+ changes: { from: s.from, insert: r }
435
430
  });
436
431
  } else
437
- N(r);
432
+ x(r);
438
433
  T(!1);
439
434
  },
440
- [W, n, N, l]
441
- ), de = s(
435
+ [G, n, x, s]
436
+ ), pe = l(
442
437
  (e) => {
443
438
  if (n)
444
439
  return;
445
- const o = l?.type === f.Variable ? { from: l.from, to: l.to } : void 0;
446
- K(e.name, o, !0), y(!1), d();
440
+ const o = s?.type === f.Variable ? { from: s.from, to: s.to } : void 0;
441
+ W(e.name, o, !0), O(!1), d();
447
442
  },
448
- [n, K, l, d]
449
- ), ge = s(() => Ue({
443
+ [n, W, s, d]
444
+ ), ge = l(() => Je({
450
445
  override: [
451
- ft(re, {
446
+ pt(oe, {
452
447
  // divider: currentStrings.slashDivider,
453
448
  // fixedText: currentStrings.slashFixedText,
454
- image: O.slashImage,
455
- video: O.slashVideo,
456
- variable: O.slashVariable
449
+ image: E.slashImage,
450
+ video: E.slashVideo,
451
+ variable: E.slashVariable
457
452
  })
458
453
  ]
459
454
  }), [
460
455
  // currentStrings.slashDivider,
461
456
  // currentStrings.slashFixedText,
462
- O.slashImage,
463
- O.slashVideo,
464
- O.slashVariable,
465
- re
466
- ]), Ve = s(
457
+ E.slashImage,
458
+ E.slashVideo,
459
+ E.slashVariable,
460
+ oe
461
+ ]), de = l(
467
462
  (e) => {
468
- if (i.current = e.view, h === "quickEdit" && _.current && e.selectionSet) {
463
+ if (i.current = e.view, h === "quickEdit" && q.current && e.selectionSet) {
469
464
  const o = e.state.selection.main.head, r = e.state.doc.toString();
470
465
  ke(
471
466
  r,
472
467
  o
473
- ) || (P(r), _.current = null);
468
+ ) || (y(r), q.current = null);
474
469
  }
475
470
  },
476
- [P, h]
477
- ), Ce = s(
471
+ [y, h]
472
+ ), Ve = l(
478
473
  (e) => {
479
474
  if (e.stopPropagation(), n)
480
475
  return;
481
- const { type: o, from: r, to: t, dataset: c, target: u } = e.detail, p = ht(o, c);
476
+ const { type: o, from: r, to: t, dataset: c, target: u } = e.detail, p = gt(o, c);
482
477
  if (M({
483
478
  type: o,
484
479
  value: p,
485
480
  from: r,
486
481
  to: t
487
- }), k(o), o === f.Variable) {
482
+ }), L(o), o === f.Variable) {
488
483
  if (u) {
489
484
  const g = u.getBoundingClientRect(), I = u.ownerDocument.defaultView?.getComputedStyle(
490
485
  H.current ?? u
491
486
  ).direction;
492
- F({
487
+ z({
493
488
  x: I === "rtl" ? g.right : g.left,
494
489
  y: g.bottom
495
490
  });
496
491
  }
497
- y(!0);
492
+ O(!0);
498
493
  } else
499
494
  T(!0);
500
495
  },
501
496
  [n]
502
497
  );
503
- b(() => {
504
- ee || (k(f.Empty), M(null));
505
- }, [ee]), b(() => {
506
- !te && S === f.Variable && (k(f.Empty), M(null));
507
- }, [te, S]), b(() => {
498
+ C(() => {
499
+ X || (L(f.Empty), M(null));
500
+ }, [X]), C(() => {
501
+ !Z && S === f.Variable && (L(f.Empty), M(null));
502
+ }, [Z, S]), C(() => {
508
503
  const e = (o) => {
509
- o.detail.view === i.current && Ce(o);
504
+ o.detail.view === i.current && Ve(o);
510
505
  };
511
506
  return window.addEventListener("globalTagClick", e), () => {
512
507
  window.removeEventListener("globalTagClick", e);
513
508
  };
514
- }, [Ce]);
515
- const be = a("imageDefaultTitle"), Se = a("videoDefaultTitle"), Ie = w(
516
- () => Vt.of({
509
+ }, [Ve]);
510
+ const be = a("imageDefaultTitle"), Ce = a("videoDefaultTitle"), Se = v(
511
+ () => bt.of({
517
512
  image: be,
518
- video: Se
513
+ video: Ce
519
514
  }),
520
- [be, Se]
521
- ), Ge = w(() => {
515
+ [be, Ce]
516
+ ), We = v(() => {
522
517
  const e = [
523
- Le.lineWrapping,
524
- Ye(),
525
- Je(Xe),
526
- bt
518
+ we.lineWrapping,
519
+ Xe(),
520
+ Ze(et),
521
+ St
527
522
  ];
528
523
  return n || e.push(ge()), h === "quickEdit" && e.push(
529
- Ie,
524
+ Se,
530
525
  dt,
531
- gt,
526
+ Vt,
532
527
  Ct
533
528
  // fixedTextPlaceholderExtension,
534
529
  // DividerPlaceholder,
535
530
  ), e.push(
536
- Le.updateListener.of((o) => {
537
- Ve(o);
531
+ we.updateListener.of((o) => {
532
+ de(o);
538
533
  })
539
534
  ), e;
540
535
  }, [
541
536
  n,
542
537
  h,
543
538
  ge,
544
- Ve,
545
- Ie
546
- ]), We = s(
539
+ de,
540
+ Se
541
+ ]), Ke = l(
547
542
  (e) => {
548
543
  if (n)
549
544
  return;
@@ -551,34 +546,34 @@ const Te = [], ke = (C, h) => {
551
546
  ke(
552
547
  e,
553
548
  o
554
- ) ? _.current = e : (_.current = null, P(e)), E?.(e);
549
+ ) ? q.current = e : (q.current = null, y(e)), F?.(e);
555
550
  },
556
- [P, E, n]
557
- ), we = !n && ne, D = w(
551
+ [y, F, n]
552
+ ), Ie = !n && te, P = v(
558
553
  () => ({
559
- insertTextAtCursor: N,
560
- replaceSelection: me,
561
- focus: fe,
562
- getContent: he,
563
- setContent: pe
554
+ insertTextAtCursor: x,
555
+ replaceSelection: ue,
556
+ focus: me,
557
+ getContent: fe,
558
+ setContent: he
564
559
  }),
565
- [fe, he, N, me, pe]
566
- ), ve = s(
560
+ [me, fe, x, ue, he]
561
+ ), ve = l(
567
562
  (e) => {
568
- n || "render" in e || e.onClick?.(D);
563
+ n || "render" in e || e.onClick?.(P);
569
564
  },
570
- [n, D]
571
- ), Ke = w(() => J?.length ? /* @__PURE__ */ m("div", { className: "markdown-flow-editor-toolbar-right", children: J.map((e) => {
565
+ [n, P]
566
+ ), Qe = v(() => U?.length ? /* @__PURE__ */ m("div", { className: "markdown-flow-editor-toolbar-right", children: U.map((e) => {
572
567
  if ("render" in e)
573
568
  return /* @__PURE__ */ m(
574
569
  "div",
575
570
  {
576
571
  className: "markdown-flow-editor-toolbar-right-item",
577
- children: e.render(D)
572
+ children: e.render(P)
578
573
  },
579
574
  e.key
580
575
  );
581
- const o = e.label || e.tooltip || void 0, r = /* @__PURE__ */ $(
576
+ const o = e.label || e.tooltip || void 0, r = /* @__PURE__ */ B(
582
577
  "button",
583
578
  {
584
579
  type: "button",
@@ -593,14 +588,14 @@ const Te = [], ke = (C, h) => {
593
588
  ]
594
589
  },
595
590
  e.key
596
- ), t = e.tooltip ? /* @__PURE__ */ $(Ze, { children: [
597
- /* @__PURE__ */ m(et, { asChild: !0, children: r }),
591
+ ), t = e.tooltip ? /* @__PURE__ */ B(tt, { children: [
592
+ /* @__PURE__ */ m(ot, { asChild: !0, children: r }),
598
593
  /* @__PURE__ */ m(
599
- tt,
594
+ nt,
600
595
  {
601
596
  side: "top",
602
- dir: B,
603
- lang: z,
597
+ dir: A,
598
+ lang: R,
604
599
  children: e.tooltip
605
600
  }
606
601
  )
@@ -615,62 +610,62 @@ const Te = [], ke = (C, h) => {
615
610
  );
616
611
  }) }) : null, [
617
612
  n,
618
- D,
613
+ P,
619
614
  ve,
620
- B,
621
- z,
622
- J
615
+ A,
616
+ R,
617
+ U
623
618
  ]);
624
- return b(() => {
625
- Oe?.(D);
626
- }, [D]), /* @__PURE__ */ $(
619
+ return C(() => {
620
+ xe?.(P);
621
+ }, [P]), /* @__PURE__ */ B(
627
622
  "div",
628
623
  {
629
624
  className: "markdown-flow-editor",
630
625
  ref: H,
631
- dir: se,
626
+ dir: ae,
632
627
  lang: le,
633
628
  "data-disabled": n ? "true" : void 0,
634
629
  "aria-disabled": n,
635
630
  children: [
636
631
  /* @__PURE__ */ m(
637
- rt,
632
+ at,
638
633
  {
639
634
  disabled: n,
640
- labels: V,
641
- tooltipDirection: B,
642
- tooltipLanguage: z,
643
- onSelect: re,
644
- onInsertVariablePlaceholder: ze,
645
- onVariableSearchToggle: Re,
635
+ labels: b,
636
+ tooltipDirection: A,
637
+ tooltipLanguage: R,
638
+ onSelect: oe,
639
+ onInsertVariablePlaceholder: Me,
640
+ onVariableSearchToggle: Ae,
646
641
  onVariableSearchClose: d,
647
642
  onInsertConfirmOutput: Be,
648
643
  onInsertLink: Fe,
649
- onInsertButton: Me,
650
- onInsertSingleChoice: $e,
651
- onInsertMultiChoice: je,
652
- onInsertInputField: He,
653
- variableSearchActive: we,
654
- rightSlot: Ke
644
+ onInsertButton: je,
645
+ onInsertSingleChoice: He,
646
+ onInsertMultiChoice: $e,
647
+ onInsertInputField: qe,
648
+ variableSearchActive: Ie,
649
+ rightSlot: Qe
655
650
  }
656
651
  ),
657
652
  /* @__PURE__ */ m(
658
- it,
653
+ lt,
659
654
  {
660
- open: we,
661
- anchorElement: G.current,
655
+ open: Ie,
656
+ anchorElement: _.current,
662
657
  onClose: d,
663
- onSelect: de,
664
- variables: ce,
665
- systemVariables: q,
666
- labels: ye
658
+ onSelect: pe,
659
+ variables: se,
660
+ systemVariables: $,
661
+ labels: Pe
667
662
  }
668
663
  ),
669
- /* @__PURE__ */ m("div", { className: "markdown-flow-editor-body relative overflow-auto", children: /* @__PURE__ */ $(at.Provider, { value: Ae, children: [
664
+ /* @__PURE__ */ m("div", { className: "markdown-flow-editor-body relative overflow-auto", children: /* @__PURE__ */ B(st.Provider, { value: ze, children: [
670
665
  /* @__PURE__ */ m(
671
- Qe,
666
+ Ye,
672
667
  {
673
- extensions: Ge,
668
+ extensions: We,
674
669
  basicSetup: {
675
670
  lineNumbers: !1,
676
671
  searchKeymap: !1,
@@ -680,55 +675,55 @@ const Te = [], ke = (C, h) => {
680
675
  foldGutter: !1
681
676
  },
682
677
  className: "rounded-md",
683
- placeholder: Pe,
684
- value: C,
678
+ placeholder: Ne,
679
+ value: V,
685
680
  theme: "light",
686
681
  minHeight: "2rem",
687
682
  editable: !n,
688
- onChange: We,
689
- onBlur: U
683
+ onChange: Ke,
684
+ onBlur: Ee
690
685
  }
691
686
  ),
692
- !n && /* @__PURE__ */ $(
693
- ot,
687
+ !n && /* @__PURE__ */ B(
688
+ rt,
694
689
  {
695
- dir: B,
696
- lang: z,
690
+ dir: A,
691
+ lang: R,
697
692
  labels: {
698
693
  closeButtonLabel: a("dialogCloseLabel"),
699
694
  title: S === f.Image ? a("dialogTitleImage") : S === f.Video ? a("dialogTitleVideo") : S === f.Variable ? a("dialogTitleVariable") : a("dialogTitle")
700
695
  },
701
696
  children: [
702
697
  S === f.Image && /* @__PURE__ */ m(
703
- st,
698
+ ct,
704
699
  {
705
- value: l?.value,
706
- onSelect: qe,
707
- uploadProps: xe
700
+ value: s?.value,
701
+ onSelect: _e,
702
+ uploadProps: ye
708
703
  }
709
704
  ),
710
705
  S === f.Video && /* @__PURE__ */ m(
711
- lt,
706
+ ut,
712
707
  {
713
- value: l?.value,
714
- onSelect: _e
708
+ value: s?.value,
709
+ onSelect: Ge
715
710
  }
716
711
  )
717
712
  ]
718
713
  }
719
714
  ),
720
- !n && /* @__PURE__ */ m(nt, { dir: B, lang: z, children: /* @__PURE__ */ m(
721
- ct,
715
+ !n && /* @__PURE__ */ m(it, { dir: A, lang: R, children: /* @__PURE__ */ m(
716
+ mt,
722
717
  {
723
- variables: ce,
724
- systemVariables: q,
725
- selectedName: l?.value?.variableName,
726
- onSelect: de,
718
+ variables: se,
719
+ systemVariables: $,
720
+ selectedName: s?.value?.variableName,
721
+ onSelect: pe,
727
722
  onAddVariable: (e) => {
728
- oe((o) => {
729
- const r = e.name.toLowerCase();
723
+ ee((o) => {
724
+ const r = e.name;
730
725
  return o.some(
731
- (c) => c.name.toLowerCase() === r
726
+ (c) => c.name === r
732
727
  ) ? o : [e, ...o];
733
728
  });
734
729
  }
@@ -740,6 +735,6 @@ const Te = [], ke = (C, h) => {
740
735
  );
741
736
  };
742
737
  export {
743
- lo as default
738
+ so as default
744
739
  };
745
740
  //# sourceMappingURL=MarkdownFlowEditor.es.js.map