@flowgram.ai/form-materials 0.1.0-alpha.18 → 0.1.0-alpha.20

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 (260) hide show
  1. package/dist/cjs/components/assign-rows/index.js +8 -2
  2. package/dist/cjs/components/batch-outputs/index.js +5 -3
  3. package/dist/cjs/components/batch-outputs/styles.css +13 -0
  4. package/dist/cjs/components/blur-input/index.js +5 -1
  5. package/dist/cjs/components/code-editor/editor.js +16 -12
  6. package/dist/cjs/components/code-editor/styles.css +4 -0
  7. package/dist/cjs/components/code-editor/theme/dark.js +1 -1
  8. package/dist/cjs/components/code-editor/theme/light.js +1 -1
  9. package/dist/cjs/components/code-editor-mini/index.js +2 -16
  10. package/dist/cjs/components/condition-context/hooks/use-condition.js +21 -1
  11. package/dist/cjs/components/condition-row/index.js +26 -12
  12. package/dist/cjs/components/condition-row/styles.css +19 -0
  13. package/dist/cjs/components/coze-editor-extensions/extensions/inputs-tree.js +2 -2
  14. package/dist/cjs/components/coze-editor-extensions/extensions/variable-tag.js +44 -15
  15. package/dist/cjs/components/coze-editor-extensions/extensions/variable-tree.js +7 -3
  16. package/dist/{esm/components/coze-editor-extensions/styles.mjs → cjs/components/coze-editor-extensions/styles.css} +19 -18
  17. package/dist/cjs/components/db-condition-row/index.js +29 -14
  18. package/dist/cjs/components/db-condition-row/styles.css +30 -0
  19. package/dist/cjs/components/display-inputs-values/index.js +3 -2
  20. package/dist/cjs/components/display-inputs-values/styles.css +6 -0
  21. package/dist/cjs/components/display-outputs/index.js +8 -6
  22. package/dist/cjs/components/display-outputs/styles.css +6 -0
  23. package/dist/cjs/components/display-schema-tag/index.js +7 -4
  24. package/dist/cjs/components/display-schema-tag/styles.css +21 -0
  25. package/dist/cjs/components/display-schema-tree/index.js +12 -7
  26. package/dist/cjs/components/display-schema-tree/styles.css +64 -0
  27. package/dist/cjs/components/dynamic-value-input/index.js +9 -5
  28. package/dist/{esm/components/dynamic-value-input/styles.mjs → cjs/components/dynamic-value-input/styles.css} +24 -30
  29. package/dist/cjs/components/index.js +5 -1
  30. package/dist/cjs/components/inputs-values/index.js +5 -3
  31. package/dist/cjs/components/inputs-values/styles.css +13 -0
  32. package/dist/cjs/components/inputs-values-tree/icon.js +70 -0
  33. package/dist/cjs/components/inputs-values-tree/index.js +4 -3
  34. package/dist/cjs/components/inputs-values-tree/row.js +19 -15
  35. package/dist/cjs/components/inputs-values-tree/styles.css +85 -0
  36. package/dist/cjs/components/{display-inputs-values/styles.js → json-schema-creator/index.js} +4 -19
  37. package/dist/cjs/components/json-schema-creator/json-input-modal.js +96 -0
  38. package/dist/cjs/components/{prompt-editor-with-variables/editor.js → json-schema-creator/json-schema-creator.js} +23 -11
  39. package/dist/cjs/components/{batch-outputs/styles.js → json-schema-creator/utils/json-to-schema.js} +35 -28
  40. package/dist/cjs/components/json-schema-editor/default-value.js +2 -2
  41. package/dist/cjs/components/json-schema-editor/hooks.js +55 -48
  42. package/dist/cjs/components/json-schema-editor/icon.js +70 -0
  43. package/dist/cjs/components/json-schema-editor/index.js +37 -25
  44. package/dist/cjs/components/json-schema-editor/styles.css +113 -0
  45. package/dist/cjs/components/prompt-editor/editor.js +16 -6
  46. package/dist/cjs/components/prompt-editor/styles.css +10 -0
  47. package/dist/cjs/components/prompt-editor-with-inputs/index.js +16 -26
  48. package/dist/cjs/components/prompt-editor-with-variables/index.js +17 -26
  49. package/dist/cjs/components/variable-selector/context.js +7 -3
  50. package/dist/cjs/components/variable-selector/index.js +16 -10
  51. package/dist/{esm/components/variable-selector/styles.mjs → cjs/components/variable-selector/styles.css} +37 -29
  52. package/dist/cjs/components/variable-selector/use-variable-tree.js +3 -1
  53. package/dist/cjs/effects/validate-when-variable-sync/index.js +3 -3
  54. package/dist/cjs/index.js +3 -0
  55. package/dist/cjs/shared/inject-material/index.js +1 -1
  56. package/dist/esm/components/assign-rows/index.mjs +9 -3
  57. package/dist/esm/components/batch-outputs/index.mjs +5 -3
  58. package/dist/esm/components/batch-outputs/styles.css +13 -0
  59. package/dist/esm/components/blur-input/index.mjs +5 -1
  60. package/dist/esm/components/code-editor/editor.mjs +16 -11
  61. package/dist/esm/components/code-editor/styles.css +4 -0
  62. package/dist/esm/components/code-editor/theme/dark.mjs +1 -1
  63. package/dist/esm/components/code-editor/theme/light.mjs +1 -1
  64. package/dist/esm/components/code-editor-mini/index.mjs +2 -6
  65. package/dist/esm/components/condition-context/hooks/use-condition.mjs +22 -2
  66. package/dist/esm/components/condition-row/index.mjs +26 -12
  67. package/dist/esm/components/condition-row/styles.css +19 -0
  68. package/dist/esm/components/coze-editor-extensions/extensions/inputs-tree.mjs +3 -3
  69. package/dist/esm/components/coze-editor-extensions/extensions/variable-tag.mjs +45 -16
  70. package/dist/esm/components/coze-editor-extensions/extensions/variable-tree.mjs +8 -4
  71. package/dist/esm/components/coze-editor-extensions/styles.css +37 -0
  72. package/dist/esm/components/db-condition-row/index.mjs +29 -14
  73. package/dist/esm/components/db-condition-row/styles.css +30 -0
  74. package/dist/esm/components/display-inputs-values/index.mjs +3 -2
  75. package/dist/esm/components/display-inputs-values/styles.css +6 -0
  76. package/dist/esm/components/display-outputs/index.mjs +9 -7
  77. package/dist/esm/components/display-outputs/styles.css +6 -0
  78. package/dist/esm/components/display-schema-tag/index.mjs +8 -5
  79. package/dist/esm/components/display-schema-tag/styles.css +21 -0
  80. package/dist/esm/components/display-schema-tree/index.mjs +12 -7
  81. package/dist/esm/components/display-schema-tree/styles.css +64 -0
  82. package/dist/esm/components/dynamic-value-input/index.mjs +9 -5
  83. package/dist/esm/components/dynamic-value-input/styles.css +48 -0
  84. package/dist/esm/components/index.mjs +2 -1
  85. package/dist/esm/components/inputs-values/index.mjs +5 -3
  86. package/dist/esm/components/inputs-values/styles.css +13 -0
  87. package/dist/esm/components/inputs-values-tree/icon.mjs +26 -0
  88. package/dist/esm/components/inputs-values-tree/index.mjs +4 -3
  89. package/dist/esm/components/inputs-values-tree/row.mjs +18 -14
  90. package/dist/esm/components/inputs-values-tree/styles.css +85 -0
  91. package/dist/esm/components/json-schema-creator/index.mjs +2 -0
  92. package/dist/esm/components/json-schema-creator/json-input-modal.mjs +62 -0
  93. package/dist/esm/components/json-schema-creator/json-schema-creator.mjs +26 -0
  94. package/dist/esm/components/json-schema-creator/utils/json-to-schema.mjs +33 -0
  95. package/dist/esm/components/json-schema-editor/default-value.mjs +2 -2
  96. package/dist/esm/components/json-schema-editor/hooks.mjs +55 -48
  97. package/dist/esm/components/json-schema-editor/icon.mjs +26 -0
  98. package/dist/esm/components/json-schema-editor/index.mjs +36 -24
  99. package/dist/esm/components/json-schema-editor/styles.css +113 -0
  100. package/dist/esm/components/prompt-editor/editor.mjs +16 -6
  101. package/dist/esm/components/prompt-editor/styles.css +10 -0
  102. package/dist/esm/components/prompt-editor-with-inputs/index.mjs +12 -4
  103. package/dist/esm/components/prompt-editor-with-variables/index.mjs +13 -4
  104. package/dist/esm/components/variable-selector/context.mjs +7 -3
  105. package/dist/esm/components/variable-selector/index.mjs +17 -11
  106. package/{src/components/variable-selector/styles.tsx → dist/esm/components/variable-selector/styles.css} +35 -38
  107. package/dist/esm/components/variable-selector/use-variable-tree.mjs +3 -1
  108. package/dist/esm/effects/validate-when-variable-sync/index.mjs +3 -3
  109. package/dist/esm/index.mjs +2 -2
  110. package/dist/esm/shared/inject-material/index.mjs +1 -1
  111. package/dist/tsconfig.tsbuildinfo +1 -1
  112. package/dist/types/components/assign-rows/index.d.ts +2 -0
  113. package/dist/types/components/batch-outputs/index.d.ts +1 -0
  114. package/dist/types/components/blur-input/index.d.ts +1 -1
  115. package/dist/types/components/code-editor/editor.d.ts +1 -0
  116. package/dist/types/components/condition-context/hooks/use-condition.d.ts +16 -1
  117. package/dist/types/components/condition-row/index.d.ts +5 -1
  118. package/dist/types/components/coze-editor-extensions/extensions/inputs-tree.d.ts +3 -3
  119. package/dist/types/components/coze-editor-extensions/extensions/variable-tag.d.ts +1 -0
  120. package/dist/types/components/coze-editor-extensions/index.d.ts +1 -1
  121. package/dist/types/components/db-condition-row/index.d.ts +4 -0
  122. package/dist/types/components/db-condition-row/types.d.ts +0 -1
  123. package/dist/types/components/display-inputs-values/index.d.ts +3 -1
  124. package/dist/types/components/display-outputs/index.d.ts +3 -1
  125. package/dist/types/components/display-schema-tag/index.d.ts +1 -0
  126. package/dist/types/components/display-schema-tree/index.d.ts +1 -0
  127. package/dist/types/components/dynamic-value-input/index.d.ts +1 -0
  128. package/dist/types/components/index.d.ts +1 -0
  129. package/dist/types/components/inputs-values/index.d.ts +1 -0
  130. package/dist/types/components/inputs-values-tree/icon.d.ts +6 -0
  131. package/dist/types/components/inputs-values-tree/index.d.ts +1 -0
  132. package/dist/types/components/inputs-values-tree/row.d.ts +1 -0
  133. package/dist/types/components/inputs-values-tree/types.d.ts +3 -2
  134. package/dist/types/components/json-schema-creator/index.d.ts +6 -0
  135. package/dist/types/components/json-schema-creator/json-input-modal.d.ts +13 -0
  136. package/dist/types/components/json-schema-creator/json-schema-creator.d.ts +11 -0
  137. package/dist/types/components/json-schema-creator/utils/json-to-schema.d.ts +6 -0
  138. package/dist/types/components/json-schema-editor/icon.d.ts +6 -0
  139. package/dist/types/components/json-schema-editor/index.d.ts +1 -0
  140. package/dist/types/components/prompt-editor/editor.d.ts +1 -0
  141. package/dist/types/components/prompt-editor-with-inputs/index.d.ts +7 -2
  142. package/dist/types/components/prompt-editor-with-variables/index.d.ts +5 -2
  143. package/dist/types/components/variable-selector/context.d.ts +16 -3
  144. package/dist/types/components/variable-selector/index.d.ts +1 -0
  145. package/dist/types/index.d.ts +2 -2
  146. package/dist/types/plugins/json-schema-preset/create-type-preset-plugin.d.ts +7 -3
  147. package/dist/types/shared/flow-value/index.d.ts +1 -1
  148. package/dist/types/shared/flow-value/types.d.ts +3 -0
  149. package/dist/types/shared/index.d.ts +1 -1
  150. package/package.json +7 -10
  151. package/src/components/assign-rows/index.tsx +7 -6
  152. package/src/components/batch-outputs/index.tsx +5 -5
  153. package/src/components/batch-outputs/{styles.tsx → styles.css} +4 -6
  154. package/src/components/blur-input/index.tsx +6 -2
  155. package/src/components/code-editor/editor.tsx +19 -14
  156. package/src/components/code-editor/styles.css +11 -0
  157. package/src/components/code-editor/theme/dark.ts +1 -1
  158. package/src/components/code-editor/theme/light.ts +1 -1
  159. package/src/components/code-editor-mini/index.tsx +2 -9
  160. package/src/components/condition-context/hooks/use-condition.tsx +55 -7
  161. package/src/components/condition-row/index.tsx +27 -22
  162. package/src/components/condition-row/{styles.tsx → styles.css} +11 -11
  163. package/src/components/coze-editor-extensions/extensions/inputs-tree.tsx +7 -6
  164. package/src/components/coze-editor-extensions/extensions/variable-tag.tsx +35 -22
  165. package/src/components/coze-editor-extensions/extensions/variable-tree.tsx +14 -4
  166. package/src/components/coze-editor-extensions/{styles.tsx → styles.css} +8 -11
  167. package/src/components/db-condition-row/index.tsx +29 -26
  168. package/src/components/db-condition-row/{styles.tsx → styles.css} +14 -16
  169. package/src/components/db-condition-row/types.ts +0 -1
  170. package/src/components/display-inputs-values/index.tsx +5 -4
  171. package/src/components/display-inputs-values/{styles.ts → styles.css} +2 -4
  172. package/src/components/display-outputs/index.tsx +9 -8
  173. package/src/components/display-outputs/{styles.ts → styles.css} +2 -4
  174. package/src/components/display-schema-tag/index.tsx +7 -7
  175. package/src/components/display-schema-tag/{styles.ts → styles.css} +7 -10
  176. package/src/components/display-schema-tree/index.tsx +10 -10
  177. package/src/components/display-schema-tree/{styles.tsx → styles.css} +18 -24
  178. package/src/components/dynamic-value-input/index.tsx +6 -6
  179. package/src/components/dynamic-value-input/{styles.tsx → styles.css} +9 -12
  180. package/src/components/index.ts +1 -0
  181. package/src/components/inputs-values/index.tsx +5 -5
  182. package/src/components/inputs-values/{styles.tsx → styles.css} +4 -6
  183. package/src/components/inputs-values-tree/icon.tsx +28 -0
  184. package/src/components/inputs-values-tree/index.tsx +8 -6
  185. package/src/components/inputs-values-tree/row.tsx +25 -27
  186. package/src/components/inputs-values-tree/styles.css +94 -0
  187. package/src/components/inputs-values-tree/types.ts +3 -2
  188. package/src/components/json-schema-creator/index.tsx +7 -0
  189. package/src/components/json-schema-creator/json-input-modal.tsx +61 -0
  190. package/src/components/json-schema-creator/json-schema-creator.tsx +37 -0
  191. package/src/components/json-schema-creator/utils/json-to-schema.ts +50 -0
  192. package/src/components/json-schema-editor/default-value.tsx +2 -4
  193. package/src/components/json-schema-editor/hooks.tsx +60 -53
  194. package/src/components/json-schema-editor/icon.tsx +28 -0
  195. package/src/components/json-schema-editor/index.tsx +45 -50
  196. package/src/components/json-schema-editor/styles.css +135 -0
  197. package/src/components/prompt-editor/editor.tsx +18 -7
  198. package/src/components/prompt-editor/styles.css +14 -0
  199. package/src/components/prompt-editor-with-inputs/index.tsx +18 -5
  200. package/src/components/prompt-editor-with-variables/index.tsx +13 -5
  201. package/src/components/variable-selector/context.tsx +22 -2
  202. package/src/components/variable-selector/index.tsx +24 -14
  203. package/src/components/variable-selector/styles.css +70 -0
  204. package/src/components/variable-selector/use-variable-tree.tsx +9 -1
  205. package/src/effects/validate-when-variable-sync/index.ts +7 -3
  206. package/src/index.ts +3 -0
  207. package/src/plugins/json-schema-preset/create-type-preset-plugin.tsx +17 -12
  208. package/src/shared/flow-value/index.ts +1 -0
  209. package/src/shared/flow-value/types.ts +4 -0
  210. package/src/shared/index.ts +1 -0
  211. package/src/shared/inject-material/index.tsx +1 -1
  212. package/dist/cjs/components/condition-row/styles.js +0 -77
  213. package/dist/cjs/components/coze-editor-extensions/styles.js +0 -89
  214. package/dist/cjs/components/db-condition-row/styles.js +0 -94
  215. package/dist/cjs/components/display-outputs/styles.js +0 -51
  216. package/dist/cjs/components/display-schema-tag/styles.js +0 -71
  217. package/dist/cjs/components/display-schema-tree/styles.js +0 -135
  218. package/dist/cjs/components/dynamic-value-input/styles.js +0 -107
  219. package/dist/cjs/components/inputs-values/styles.js +0 -60
  220. package/dist/cjs/components/inputs-values-tree/styles.js +0 -177
  221. package/dist/cjs/components/json-schema-editor/styles.js +0 -231
  222. package/dist/cjs/components/prompt-editor/styles.js +0 -55
  223. package/dist/cjs/components/prompt-editor-with-inputs/editor.js +0 -47
  224. package/dist/cjs/components/variable-selector/styles.js +0 -114
  225. package/dist/esm/components/batch-outputs/styles.mjs +0 -13
  226. package/dist/esm/components/condition-row/styles.mjs +0 -21
  227. package/dist/esm/components/db-condition-row/styles.mjs +0 -32
  228. package/dist/esm/components/display-inputs-values/styles.mjs +0 -7
  229. package/dist/esm/components/display-outputs/styles.mjs +0 -7
  230. package/dist/esm/components/display-schema-tag/styles.mjs +0 -21
  231. package/dist/esm/components/display-schema-tree/styles.mjs +0 -79
  232. package/dist/esm/components/inputs-values/styles.mjs +0 -13
  233. package/dist/esm/components/inputs-values-tree/styles.mjs +0 -105
  234. package/dist/esm/components/json-schema-editor/styles.mjs +0 -138
  235. package/dist/esm/components/prompt-editor/styles.mjs +0 -11
  236. package/dist/esm/components/prompt-editor-with-inputs/editor.mjs +0 -13
  237. package/dist/esm/components/prompt-editor-with-variables/editor.mjs +0 -14
  238. package/dist/types/components/batch-outputs/styles.d.ts +0 -6
  239. package/dist/types/components/condition-row/styles.d.ts +0 -9
  240. package/dist/types/components/coze-editor-extensions/styles.d.ts +0 -9
  241. package/dist/types/components/db-condition-row/styles.d.ts +0 -12
  242. package/dist/types/components/display-inputs-values/styles.d.ts +0 -5
  243. package/dist/types/components/display-outputs/styles.d.ts +0 -5
  244. package/dist/types/components/display-schema-tag/styles.d.ts +0 -8
  245. package/dist/types/components/display-schema-tree/styles.d.ts +0 -11
  246. package/dist/types/components/dynamic-value-input/styles.d.ts +0 -8
  247. package/dist/types/components/inputs-values/styles.d.ts +0 -6
  248. package/dist/types/components/inputs-values-tree/styles.d.ts +0 -23
  249. package/dist/types/components/json-schema-editor/styles.d.ts +0 -30
  250. package/dist/types/components/prompt-editor/styles.d.ts +0 -7
  251. package/dist/types/components/prompt-editor-with-inputs/editor.d.ts +0 -10
  252. package/dist/types/components/prompt-editor-with-variables/editor.d.ts +0 -9
  253. package/dist/types/components/variable-selector/styles.d.ts +0 -14
  254. package/src/components/inputs-values-tree/styles.tsx +0 -128
  255. package/src/components/json-schema-editor/styles.tsx +0 -168
  256. package/src/components/prompt-editor/styles.tsx +0 -18
  257. package/src/components/prompt-editor-with-inputs/editor.tsx +0 -24
  258. package/src/components/prompt-editor-with-variables/editor.tsx +0 -20
  259. package/src/shared/inject-material/README.md +0 -170
  260. package/src/shared/inject-material/README.zh.md +0 -174
@@ -0,0 +1,62 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { I18n } from "@flowgram.ai/editor";
4
+ import { Modal, Typography } from "@douyinfe/semi-ui";
5
+ import { jsonToSchema } from "./utils/json-to-schema.mjs";
6
+ import { JsonCodeEditor } from "../code-editor/index.mjs";
7
+ const { Text } = Typography;
8
+ function JsonInputModal({ visible, onClose, onConfirm }) {
9
+ const [jsonInput, setJsonInput] = useState('');
10
+ const [error, setError] = useState('');
11
+ const handleConfirm = ()=>{
12
+ try {
13
+ const schema = jsonToSchema(jsonInput);
14
+ onConfirm(schema);
15
+ setJsonInput('');
16
+ setError('');
17
+ } catch (err) {
18
+ setError(err.message);
19
+ }
20
+ };
21
+ return /*#__PURE__*/ jsxs(Modal, {
22
+ visible: visible,
23
+ onCancel: onClose,
24
+ onOk: handleConfirm,
25
+ title: I18n.t('JSON to JSONSchema'),
26
+ okText: I18n.t('Generate'),
27
+ cancelText: I18n.t('Cancel'),
28
+ width: 600,
29
+ children: [
30
+ /*#__PURE__*/ jsx("div", {
31
+ style: {
32
+ marginBottom: 8
33
+ },
34
+ children: /*#__PURE__*/ jsxs(Text, {
35
+ children: [
36
+ I18n.t('Paste JSON data'),
37
+ ":"
38
+ ]
39
+ })
40
+ }),
41
+ /*#__PURE__*/ jsx("div", {
42
+ style: {
43
+ minHeight: 300
44
+ },
45
+ children: /*#__PURE__*/ jsx(JsonCodeEditor, {
46
+ value: jsonInput,
47
+ onChange: (value)=>setJsonInput(value || '')
48
+ })
49
+ }),
50
+ error && /*#__PURE__*/ jsx("div", {
51
+ style: {
52
+ marginTop: 8
53
+ },
54
+ children: /*#__PURE__*/ jsx(Text, {
55
+ type: "danger",
56
+ children: error
57
+ })
58
+ })
59
+ ]
60
+ });
61
+ }
62
+ export { JsonInputModal };
@@ -0,0 +1,26 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { I18n } from "@flowgram.ai/editor";
4
+ import { Button } from "@douyinfe/semi-ui";
5
+ import { JsonInputModal } from "./json-input-modal.mjs";
6
+ function JsonSchemaCreator({ onSchemaCreate }) {
7
+ const [visible, setVisible] = useState(false);
8
+ const handleCreate = (schema)=>{
9
+ onSchemaCreate?.(schema);
10
+ setVisible(false);
11
+ };
12
+ return /*#__PURE__*/ jsxs(Fragment, {
13
+ children: [
14
+ /*#__PURE__*/ jsx(Button, {
15
+ onClick: ()=>setVisible(true),
16
+ children: I18n.t('JSON to JSONSchema')
17
+ }),
18
+ /*#__PURE__*/ jsx(JsonInputModal, {
19
+ visible: visible,
20
+ onClose: ()=>setVisible(false),
21
+ onConfirm: handleCreate
22
+ })
23
+ ]
24
+ });
25
+ }
26
+ export { JsonSchemaCreator };
@@ -0,0 +1,33 @@
1
+ function jsonToSchema(jsonString) {
2
+ const data = JSON.parse(jsonString);
3
+ return generateSchema(data);
4
+ }
5
+ function generateSchema(value) {
6
+ if (null === value) return {
7
+ type: 'string'
8
+ };
9
+ if (Array.isArray(value)) {
10
+ const schema = {
11
+ type: 'array'
12
+ };
13
+ if (value.length > 0) schema.items = generateSchema(value[0]);
14
+ return schema;
15
+ }
16
+ if ('object' == typeof value) {
17
+ const schema = {
18
+ type: 'object',
19
+ properties: {},
20
+ required: []
21
+ };
22
+ for (const [key, val] of Object.entries(value)){
23
+ schema.properties[key] = generateSchema(val);
24
+ schema.required.push(key);
25
+ }
26
+ return schema;
27
+ }
28
+ const type = typeof value;
29
+ return {
30
+ type: type
31
+ };
32
+ }
33
+ export { jsonToSchema };
@@ -2,10 +2,10 @@ import { jsx } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { I18n } from "@flowgram.ai/editor";
4
4
  import { ConstantInput } from "../constant-input/index.mjs";
5
- import { ConstantInputWrapper } from "./styles.mjs";
6
5
  function DefaultValue(props) {
7
6
  const { value, schema, onChange, placeholder } = props;
8
- return /*#__PURE__*/ jsx(ConstantInputWrapper, {
7
+ return /*#__PURE__*/ jsx("div", {
8
+ className: "gedit-m-json-schema-editor-constant-input-wrapper",
9
9
  children: /*#__PURE__*/ jsx(ConstantInput, {
10
10
  value: value,
11
11
  onChange: (_v)=>onChange(_v),
@@ -11,68 +11,72 @@ function usePropertiesEdit(value, onChange) {
11
11
  const drilldownSchema = typeManager.getPropertiesParent(value || {});
12
12
  const canAddField = typeManager.canAddField(value || {});
13
13
  const [propertyList, setPropertyList] = useState([]);
14
+ const latestPropertyListRef = useRef(propertyList);
14
15
  const effectVersion = useRef(0);
15
16
  const changeVersion = useRef(0);
16
17
  useEffect(()=>{
17
18
  effectVersion.current = effectVersion.current + 1;
18
19
  if (effectVersion.current === changeVersion.current) return;
19
20
  effectVersion.current = changeVersion.current;
20
- setPropertyList((_list)=>{
21
- const newNames = Object.entries(drilldownSchema?.properties || {}).sort(([, a], [, b])=>(a.extra?.index ?? 0) - (b.extra?.index ?? 0)).map(([key])=>key);
22
- const oldNames = _list.map((item)=>item.name).filter(Boolean);
23
- const addNames = difference(newNames, oldNames);
24
- return _list.filter((item)=>!item.name || newNames.includes(item.name)).map((item)=>({
25
- key: item.key,
26
- name: item.name,
27
- isPropertyRequired: drilldownSchema?.required?.includes(item.name || '') || false,
28
- ...drilldownSchema?.properties?.[item.name || ''] || item || {}
29
- })).concat(addNames.map((_name)=>({
30
- key: genId(),
31
- name: _name,
32
- isPropertyRequired: drilldownSchema?.required?.includes(_name) || false,
33
- ...drilldownSchema?.properties?.[_name] || {}
34
- })));
35
- });
21
+ const _list = latestPropertyListRef.current;
22
+ const newNames = Object.entries(drilldownSchema?.properties || {}).sort(([, a], [, b])=>(a.extra?.index ?? 0) - (b.extra?.index ?? 0)).map(([key])=>key);
23
+ const oldNames = _list.map((item)=>item.name).filter(Boolean);
24
+ const addNames = difference(newNames, oldNames);
25
+ const next = _list.filter((item)=>!item.name || newNames.includes(item.name)).map((item)=>({
26
+ key: item.key,
27
+ name: item.name,
28
+ isPropertyRequired: drilldownSchema?.required?.includes(item.name || '') || false,
29
+ ...drilldownSchema?.properties?.[item.name || ''] || item || {}
30
+ })).concat(addNames.map((_name)=>({
31
+ key: genId(),
32
+ name: _name,
33
+ isPropertyRequired: drilldownSchema?.required?.includes(_name) || false,
34
+ ...drilldownSchema?.properties?.[_name] || {}
35
+ })));
36
+ latestPropertyListRef.current = next;
37
+ setPropertyList(next);
36
38
  }, [
37
39
  drilldownSchema
38
40
  ]);
39
41
  const updatePropertyList = (updater)=>{
40
42
  changeVersion.current = changeVersion.current + 1;
41
- setPropertyList((_list)=>{
42
- const next = updater(_list);
43
- const nextProperties = {};
44
- const nextRequired = [];
45
- for (const _property of next)if (_property.name) {
46
- nextProperties[_property.name] = omit(_property, [
47
- 'key',
48
- 'name',
49
- 'isPropertyRequired'
50
- ]);
51
- if (_property.isPropertyRequired) nextRequired.push(_property.name);
43
+ const next = updater(latestPropertyListRef.current);
44
+ latestPropertyListRef.current = next;
45
+ setPropertyList(next);
46
+ const nextProperties = {};
47
+ const nextRequired = [];
48
+ for (const _property of next)if (_property.name) {
49
+ nextProperties[_property.name] = omit(_property, [
50
+ 'key',
51
+ 'name',
52
+ 'isPropertyRequired'
53
+ ]);
54
+ if (_property.isPropertyRequired) nextRequired.push(_property.name);
55
+ }
56
+ onChange?.(produce(value || {}, (draft)=>{
57
+ const propertiesParent = typeManager.getPropertiesParent(draft);
58
+ if (propertiesParent) {
59
+ propertiesParent.properties = nextProperties;
60
+ propertiesParent.required = nextRequired;
61
+ return;
52
62
  }
53
- onChange?.(produce(value || {}, (draft)=>{
54
- const propertiesParent = typeManager.getPropertiesParent(draft);
55
- if (propertiesParent) {
56
- propertiesParent.properties = nextProperties;
57
- propertiesParent.required = nextRequired;
58
- return;
59
- }
60
- }));
61
- return next;
62
- });
63
+ }));
63
64
  };
64
65
  const onAddProperty = ()=>{
65
- setPropertyList((_list)=>[
66
- ..._list,
67
- {
68
- key: genId(),
69
- name: '',
70
- type: 'string',
71
- extra: {
72
- index: _list.length + 1
73
- }
66
+ const _list = latestPropertyListRef.current;
67
+ const next = [
68
+ ..._list,
69
+ {
70
+ key: genId(),
71
+ name: '',
72
+ type: 'string',
73
+ extra: {
74
+ index: _list.length + 1
74
75
  }
75
- ]);
76
+ }
77
+ ];
78
+ latestPropertyListRef.current = next;
79
+ setPropertyList(next);
76
80
  };
77
81
  const onRemoveProperty = (key)=>{
78
82
  updatePropertyList((_list)=>_list.filter((_property)=>_property.key !== key));
@@ -81,7 +85,10 @@ function usePropertiesEdit(value, onChange) {
81
85
  updatePropertyList((_list)=>_list.map((_property)=>_property.key === key ? nextValue : _property));
82
86
  };
83
87
  useEffect(()=>{
84
- if (!canAddField) setPropertyList([]);
88
+ if (!canAddField) {
89
+ latestPropertyListRef.current = [];
90
+ setPropertyList([]);
91
+ }
85
92
  }, [
86
93
  canAddField
87
94
  ]);
@@ -0,0 +1,26 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import semi_icons from "@douyinfe/semi-icons";
4
+ const iconAddChildrenSvg = /*#__PURE__*/ jsxs("svg", {
5
+ className: "icon-icon icon-icon-coz_add_node ",
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 24 24",
9
+ fill: "currentColor",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ children: [
12
+ /*#__PURE__*/ jsx("path", {
13
+ fillRule: "evenodd",
14
+ clipRule: "evenodd",
15
+ d: "M11 6.49988C11 8.64148 9.50397 10.4337 7.49995 10.8884V15.4998C7.49995 16.0521 7.94767 16.4998 8.49995 16.4998H11.208C11.0742 16.8061 11 17.1443 11 17.4998C11 17.8554 11.0742 18.1936 11.208 18.4998H8.49995C6.8431 18.4998 5.49995 17.1567 5.49995 15.4998V10.8884C3.49599 10.4336 2 8.64145 2 6.49988C2 4.0146 4.01472 1.99988 6.5 1.99988C8.98528 1.99988 11 4.0146 11 6.49988ZM6.5 8.99988C7.88071 8.99988 9 7.88059 9 6.49988C9 5.11917 7.88071 3.99988 6.5 3.99988C5.11929 3.99988 4 5.11917 4 6.49988C4 7.88059 5.11929 8.99988 6.5 8.99988Z"
16
+ }),
17
+ /*#__PURE__*/ jsx("path", {
18
+ d: "M17.5 12.4999C18.0523 12.4999 18.5 12.9476 18.5 13.4999V16.4999H21.5C22.0523 16.4999 22.5 16.9476 22.5 17.4999C22.5 18.0522 22.0523 18.4999 21.5 18.4999H18.5V21.4999C18.5 22.0522 18.0523 22.4999 17.5 22.4999C16.9477 22.4999 16.5 22.0522 16.5 21.4999V18.4999H13.5C12.9477 18.4999 12.5 18.0522 12.5 17.4999C12.5 16.9476 12.9477 16.4999 13.5 16.4999H16.5V13.4999C16.5 12.9476 16.9477 12.4999 17.5 12.4999Z"
19
+ })
20
+ ]
21
+ });
22
+ const IconAddChildren = ()=>/*#__PURE__*/ jsx(semi_icons, {
23
+ size: "small",
24
+ svg: iconAddChildrenSvg
25
+ });
26
+ export { IconAddChildren };
@@ -5,19 +5,21 @@ import { Button, Checkbox, IconButton } from "@douyinfe/semi-ui";
5
5
  import { IconChevronDown, IconChevronRight, IconExpand, IconMinus, IconPlus, IconShrink } from "@douyinfe/semi-icons";
6
6
  import { InjectTypeSelector } from "../type-selector/index.mjs";
7
7
  import { BlurInput } from "../blur-input/index.mjs";
8
- import { DefaultValueWrapper, IconAddChildren, UIActions, UICollapseTrigger, UICollapsible, UIContainer, UIExpandDetail, UILabel, UIName, UIRequired, UIRow, UITreeItemLeft, UITreeItemMain, UITreeItemRight, UITreeItems, UIType } from "./styles.mjs";
8
+ import { IconAddChildren } from "./icon.mjs";
9
9
  import { usePropertiesEdit } from "./hooks.mjs";
10
10
  import { DefaultValue } from "./default-value.mjs";
11
+ import "./styles.css";
11
12
  const DEFAULT = {
12
13
  type: 'object'
13
14
  };
14
15
  function JsonSchemaEditor(props) {
15
16
  const { value = DEFAULT, config = {}, onChange: onChangeProps, readonly } = props;
16
17
  const { propertyList, onAddProperty, onRemoveProperty, onEditProperty } = usePropertiesEdit(value, onChangeProps);
17
- return /*#__PURE__*/ jsxs(UIContainer, {
18
- className: props.className,
18
+ return /*#__PURE__*/ jsxs("div", {
19
+ className: "gedit-m-json-schema-editor-container",
19
20
  children: [
20
- /*#__PURE__*/ jsx(UITreeItems, {
21
+ /*#__PURE__*/ jsx("div", {
22
+ className: "gedit-m-json-schema-editor-tree-items",
21
23
  children: propertyList.map((_property)=>/*#__PURE__*/ jsx(PropertyEdit, {
22
24
  readonly: readonly,
23
25
  value: _property,
@@ -66,11 +68,10 @@ function PropertyEdit(props) {
66
68
  const showCollapse = canAddField && propertyList.length > 0;
67
69
  return /*#__PURE__*/ jsxs(Fragment, {
68
70
  children: [
69
- /*#__PURE__*/ jsx(UITreeItemLeft, {
70
- $isLast: $isLast,
71
- $showLine: $level > 0,
72
- $showCollapse: showCollapse,
73
- children: showCollapse && /*#__PURE__*/ jsx(UICollapseTrigger, {
71
+ /*#__PURE__*/ jsx("div", {
72
+ className: `gedit-m-json-schema-editor-tree-item-left ${$level > 0 ? 'show-line' : ''} ${$isLast ? 'is-last' : ''} ${showCollapse ? 'show-collapse' : ''}`,
73
+ children: showCollapse && /*#__PURE__*/ jsx("div", {
74
+ className: "gedit-m-json-schema-editor-collapse-trigger",
74
75
  onClick: ()=>setCollapse((_collapse)=>!_collapse),
75
76
  children: collapse ? /*#__PURE__*/ jsx(IconChevronDown, {
76
77
  size: "small"
@@ -79,13 +80,17 @@ function PropertyEdit(props) {
79
80
  })
80
81
  })
81
82
  }),
82
- /*#__PURE__*/ jsxs(UITreeItemRight, {
83
+ /*#__PURE__*/ jsxs("div", {
84
+ className: "gedit-m-json-schema-editor-tree-item-right",
83
85
  children: [
84
- /*#__PURE__*/ jsxs(UITreeItemMain, {
86
+ /*#__PURE__*/ jsxs("div", {
87
+ className: "gedit-m-json-schema-editor-tree-item-main",
85
88
  children: [
86
- /*#__PURE__*/ jsxs(UIRow, {
89
+ /*#__PURE__*/ jsxs("div", {
90
+ className: "gedit-m-json-schema-editor-row",
87
91
  children: [
88
- /*#__PURE__*/ jsx(UIName, {
92
+ /*#__PURE__*/ jsx("div", {
93
+ className: "gedit-m-json-schema-editor-name",
89
94
  children: /*#__PURE__*/ jsx(BlurInput, {
90
95
  disabled: readonly,
91
96
  placeholder: config?.placeholder ?? I18n.t('Input Variable Name'),
@@ -94,7 +99,8 @@ function PropertyEdit(props) {
94
99
  onChange: (value)=>onChange('name', value)
95
100
  })
96
101
  }),
97
- /*#__PURE__*/ jsx(UIType, {
102
+ /*#__PURE__*/ jsx("div", {
103
+ className: "gedit-m-json-schema-editor-type",
98
104
  children: /*#__PURE__*/ jsx(InjectTypeSelector, {
99
105
  value: typeSelectorValue,
100
106
  readonly: readonly,
@@ -106,14 +112,16 @@ function PropertyEdit(props) {
106
112
  }
107
113
  })
108
114
  }),
109
- /*#__PURE__*/ jsx(UIRequired, {
115
+ /*#__PURE__*/ jsx("div", {
116
+ className: "gedit-m-json-schema-editor-required",
110
117
  children: /*#__PURE__*/ jsx(Checkbox, {
111
118
  disabled: readonly,
112
119
  checked: isPropertyRequired,
113
120
  onChange: (e)=>onChange('isPropertyRequired', e.target.checked)
114
121
  })
115
122
  }),
116
- /*#__PURE__*/ jsxs(UIActions, {
123
+ /*#__PURE__*/ jsxs("div", {
124
+ className: "gedit-m-json-schema-editor-actions",
117
125
  children: [
118
126
  /*#__PURE__*/ jsx(IconButton, {
119
127
  disabled: readonly,
@@ -151,9 +159,11 @@ function PropertyEdit(props) {
151
159
  })
152
160
  ]
153
161
  }),
154
- expand && /*#__PURE__*/ jsxs(UIExpandDetail, {
162
+ expand && /*#__PURE__*/ jsxs("div", {
163
+ className: "gedit-m-json-schema-editor-expand-detail",
155
164
  children: [
156
- /*#__PURE__*/ jsx(UILabel, {
165
+ /*#__PURE__*/ jsx("div", {
166
+ className: "gedit-m-json-schema-editor-label",
157
167
  children: config?.descTitle ?? I18n.t("Description")
158
168
  }),
159
169
  /*#__PURE__*/ jsx(BlurInput, {
@@ -165,13 +175,15 @@ function PropertyEdit(props) {
165
175
  }),
166
176
  0 === $level && /*#__PURE__*/ jsxs(Fragment, {
167
177
  children: [
168
- /*#__PURE__*/ jsx(UILabel, {
178
+ /*#__PURE__*/ jsx("div", {
179
+ className: "gedit-m-json-schema-editor-label",
169
180
  style: {
170
181
  marginTop: 10
171
182
  },
172
183
  children: config?.defaultValueTitle ?? I18n.t('Default Value')
173
184
  }),
174
- /*#__PURE__*/ jsx(DefaultValueWrapper, {
185
+ /*#__PURE__*/ jsx("div", {
186
+ className: "gedit-m-json-schema-editor-default-value-wrapper",
175
187
  children: /*#__PURE__*/ jsx(DefaultValue, {
176
188
  value: defaultValue,
177
189
  schema: value,
@@ -185,10 +197,10 @@ function PropertyEdit(props) {
185
197
  })
186
198
  ]
187
199
  }),
188
- showCollapse && /*#__PURE__*/ jsx(UICollapsible, {
189
- $collapse: collapse,
190
- children: /*#__PURE__*/ jsx(UITreeItems, {
191
- $shrink: true,
200
+ showCollapse && /*#__PURE__*/ jsx("div", {
201
+ className: `gedit-m-json-schema-editor-collapsible ${collapse ? 'collapse' : ''}`,
202
+ children: /*#__PURE__*/ jsx("div", {
203
+ className: "gedit-m-json-schema-editor-tree-items shrink",
192
204
  children: propertyList.map((_property, index)=>/*#__PURE__*/ jsx(PropertyEdit, {
193
205
  readonly: readonly,
194
206
  value: _property,
@@ -0,0 +1,113 @@
1
+ .gedit-m-json-schema-editor-row {
2
+ align-items: center;
3
+ gap: 6px;
4
+ display: flex;
5
+ }
6
+
7
+ .gedit-m-json-schema-editor-collapse-trigger {
8
+ cursor: pointer;
9
+ margin-right: 5px;
10
+ }
11
+
12
+ .gedit-m-json-schema-editor-expand-detail {
13
+ flex-direction: column;
14
+ display: flex;
15
+ }
16
+
17
+ .gedit-m-json-schema-editor-label {
18
+ color: #999;
19
+ margin-bottom: 2px;
20
+ font-size: 12px;
21
+ font-weight: 400;
22
+ }
23
+
24
+ .gedit-m-json-schema-editor-tree-items {
25
+ grid-template-columns: auto 1fr;
26
+ display: grid;
27
+ }
28
+
29
+ .gedit-m-json-schema-editor-tree-items.shrink {
30
+ margin-top: 10px;
31
+ padding-left: 3px;
32
+ }
33
+
34
+ .gedit-m-json-schema-editor-tree-item-left {
35
+ grid-column: 1;
36
+ width: 16px;
37
+ position: relative;
38
+ }
39
+
40
+ .gedit-m-json-schema-editor-tree-item-left.show-line:before {
41
+ content: "";
42
+ height: var(--line-height, 100%);
43
+ background: #d9d9d9;
44
+ width: 1px;
45
+ display: block;
46
+ position: absolute;
47
+ top: -16px;
48
+ left: -14px;
49
+ }
50
+
51
+ .gedit-m-json-schema-editor-tree-item-left.show-line:after {
52
+ content: "";
53
+ width: var(--line-width, 30px);
54
+ background: #d9d9d9;
55
+ height: 1px;
56
+ display: block;
57
+ position: absolute;
58
+ top: 8px;
59
+ left: -14px;
60
+ }
61
+
62
+ .gedit-m-json-schema-editor-tree-item-left.show-line.is-last:before {
63
+ height: 24px;
64
+ }
65
+
66
+ .gedit-m-json-schema-editor-tree-item-left.show-line.show-collapse:after {
67
+ width: 12px;
68
+ }
69
+
70
+ .gedit-m-json-schema-editor-tree-item-right {
71
+ grid-column: 2;
72
+ margin-bottom: 10px;
73
+
74
+ &:last-child {
75
+ margin-bottom: 0;
76
+ }
77
+ }
78
+
79
+ .gedit-m-json-schema-editor-tree-item-main {
80
+ flex-direction: column;
81
+ gap: 10px;
82
+ display: flex;
83
+ position: relative;
84
+ }
85
+
86
+ .gedit-m-json-schema-editor-collapsible {
87
+ display: none;
88
+ }
89
+
90
+ .gedit-m-json-schema-editor-collapsible.collapse {
91
+ display: block;
92
+ }
93
+
94
+ .gedit-m-json-schema-editor-name {
95
+ flex-grow: 1;
96
+ }
97
+
98
+ .gedit-m-json-schema-editor-actions {
99
+ white-space: nowrap;
100
+ }
101
+
102
+ .gedit-m-json-schema-editor-default-value-wrapper {
103
+ margin: 0;
104
+ }
105
+
106
+ .gedit-m-json-schema-editor-constant-input-wrapper {
107
+ flex-grow: 1;
108
+
109
+ & .semi-tree-select, & .semi-input-number, & .semi-select {
110
+ width: 100%;
111
+ }
112
+ }
113
+
@@ -2,20 +2,30 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef } from "react";
3
3
  import { ActiveLinePlaceholder, EditorProvider, Renderer } from "@flowgram.ai/coze-editor/react";
4
4
  import preset_prompt from "@flowgram.ai/coze-editor/preset-prompt";
5
- import { UIContainer } from "./styles.mjs";
6
5
  import markdown from "./extensions/markdown.mjs";
7
6
  import language_support from "./extensions/language-support.mjs";
8
7
  import jinja from "./extensions/jinja.mjs";
8
+ import "./styles.css";
9
9
  function PromptEditor(props) {
10
10
  const { value, onChange, readonly, placeholder, activeLinePlaceholder, style, hasError, children, disableMarkdownHighlight, options } = props || {};
11
11
  const editorRef = useRef(null);
12
+ const editorValue = String(value?.content || '');
12
13
  useEffect(()=>{
13
- if (editorRef.current?.getValue() !== value?.content) editorRef.current?.setValue(String(value?.content || ''));
14
+ if (editorRef.current?.getValue() !== editorValue) {
15
+ const editorView = editorRef.current?.$view;
16
+ editorView?.dispatch({
17
+ changes: {
18
+ from: 0,
19
+ to: editorView?.state.doc.length,
20
+ insert: editorValue
21
+ }
22
+ });
23
+ }
14
24
  }, [
15
- value
25
+ editorValue
16
26
  ]);
17
- return /*#__PURE__*/ jsx(UIContainer, {
18
- $hasError: hasError,
27
+ return /*#__PURE__*/ jsx("div", {
28
+ className: `gedit-m-prompt-editor-container ${hasError ? 'has-error' : ''}`,
19
29
  style: style,
20
30
  children: /*#__PURE__*/ jsxs(EditorProvider, {
21
31
  children: [
@@ -24,7 +34,7 @@ function PromptEditor(props) {
24
34
  editorRef.current = editor;
25
35
  },
26
36
  plugins: preset_prompt,
27
- defaultValue: String(value?.content),
37
+ defaultValue: editorValue,
28
38
  options: {
29
39
  readOnly: readonly,
30
40
  editable: !readonly,
@@ -0,0 +1,10 @@
1
+ .gedit-m-prompt-editor-container {
2
+ background-color: var(--semi-color-fill-0);
3
+ padding-left: 10px;
4
+ padding-right: 6px;
5
+ }
6
+
7
+ .gedit-m-prompt-editor-container.has-error {
8
+ border: 1px solid var(--semi-color-danger-6);
9
+ }
10
+
@@ -1,5 +1,13 @@
1
- import { lazySuspense } from "../../shared/index.mjs";
2
- const PromptEditorWithInputs = lazySuspense(()=>import("./editor.mjs").then((module)=>({
3
- default: module.PromptEditorWithInputs
4
- })));
1
+ import { jsx } from "react/jsx-runtime";
2
+ import "react";
3
+ import { PromptEditor } from "../prompt-editor/index.mjs";
4
+ import { EditorInputsTree } from "../coze-editor-extensions/index.mjs";
5
+ function PromptEditorWithInputs({ inputsValues, ...restProps }) {
6
+ return /*#__PURE__*/ jsx(PromptEditor, {
7
+ ...restProps,
8
+ children: /*#__PURE__*/ jsx(EditorInputsTree, {
9
+ inputsValues: inputsValues
10
+ })
11
+ });
12
+ }
5
13
  export { PromptEditorWithInputs };
@@ -1,5 +1,14 @@
1
- import { lazySuspense } from "../../shared/index.mjs";
2
- const PromptEditorWithVariables = lazySuspense(()=>import("./editor.mjs").then((module)=>({
3
- default: module.PromptEditorWithVariables
4
- })));
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { PromptEditor } from "../prompt-editor/index.mjs";
4
+ import { EditorVariableTagInject, EditorVariableTree } from "../coze-editor-extensions/index.mjs";
5
+ function PromptEditorWithVariables(props) {
6
+ return /*#__PURE__*/ jsxs(PromptEditor, {
7
+ ...props,
8
+ children: [
9
+ /*#__PURE__*/ jsx(EditorVariableTree, {}),
10
+ /*#__PURE__*/ jsx(EditorVariableTagInject, {})
11
+ ]
12
+ });
13
+ }
5
14
  export { PromptEditorWithVariables };