@flowgram.ai/form-materials 0.1.0-alpha.13 → 0.1.0-alpha.14

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 (97) hide show
  1. package/bin/index.ts +0 -11
  2. package/bin/materials.ts +29 -2
  3. package/dist/esm/chunk-727SU246.js +13 -0
  4. package/dist/esm/chunk-727SU246.js.map +1 -0
  5. package/dist/esm/chunk-DEZUEMUM.js +284 -0
  6. package/dist/esm/chunk-DEZUEMUM.js.map +1 -0
  7. package/dist/esm/chunk-DUOXDOUE.js +477 -0
  8. package/dist/esm/chunk-DUOXDOUE.js.map +1 -0
  9. package/dist/esm/editor-6UMULJYB.js +180 -0
  10. package/dist/esm/editor-6UMULJYB.js.map +1 -0
  11. package/dist/esm/editor-EYOQTGMT.js +282 -0
  12. package/dist/esm/editor-EYOQTGMT.js.map +1 -0
  13. package/dist/esm/editor-OXPGKPF5.js +167 -0
  14. package/dist/esm/editor-OXPGKPF5.js.map +1 -0
  15. package/dist/esm/editor-VO6YAXRC.js +249 -0
  16. package/dist/esm/editor-VO6YAXRC.js.map +1 -0
  17. package/dist/esm/editor-XYLKTB6L.js +365 -0
  18. package/dist/esm/editor-XYLKTB6L.js.map +1 -0
  19. package/dist/esm/index.js +1110 -2306
  20. package/dist/esm/index.js.map +1 -1
  21. package/dist/index.d.mts +298 -59
  22. package/dist/index.d.ts +298 -59
  23. package/dist/index.js +3932 -2681
  24. package/dist/index.js.map +1 -1
  25. package/package.json +9 -8
  26. package/src/components/batch-outputs/index.tsx +3 -2
  27. package/src/components/code-editor/editor.tsx +89 -0
  28. package/src/components/code-editor/index.tsx +5 -89
  29. package/src/components/code-editor/language-features.ts +18 -18
  30. package/src/components/code-editor/theme/dark.ts +49 -30
  31. package/src/components/code-editor/theme/light.ts +56 -32
  32. package/src/components/code-editor-mini/index.tsx +2 -2
  33. package/src/components/condition-row/constants.ts +8 -0
  34. package/src/components/condition-row/index.tsx +4 -0
  35. package/src/components/db-condition-row/hooks/use-left.tsx +66 -0
  36. package/src/components/db-condition-row/hooks/use-op.tsx +59 -0
  37. package/src/components/db-condition-row/index.tsx +93 -0
  38. package/src/components/db-condition-row/styles.tsx +43 -0
  39. package/src/components/db-condition-row/types.ts +34 -0
  40. package/src/components/display-flow-value/index.tsx +2 -12
  41. package/src/components/display-inputs-values/index.tsx +44 -6
  42. package/src/components/dynamic-value-input/hooks.ts +25 -4
  43. package/src/components/dynamic-value-input/index.tsx +21 -12
  44. package/src/components/dynamic-value-input/styles.tsx +14 -4
  45. package/src/components/index.ts +3 -0
  46. package/src/components/inputs-values/index.tsx +14 -3
  47. package/src/components/inputs-values/styles.tsx +1 -1
  48. package/src/components/inputs-values-tree/hooks/use-child-list.tsx +76 -0
  49. package/src/components/inputs-values-tree/index.tsx +62 -0
  50. package/src/components/inputs-values-tree/row.tsx +177 -0
  51. package/src/components/inputs-values-tree/styles.tsx +128 -0
  52. package/src/components/inputs-values-tree/types.ts +21 -0
  53. package/src/components/json-editor-with-variables/editor.tsx +69 -0
  54. package/src/components/json-editor-with-variables/extensions/variable-tag.tsx +6 -5
  55. package/src/components/json-editor-with-variables/index.tsx +5 -59
  56. package/src/components/json-schema-editor/default-value.tsx +1 -3
  57. package/src/components/json-schema-editor/hooks.tsx +14 -3
  58. package/src/components/json-schema-editor/index.tsx +18 -58
  59. package/src/components/json-schema-editor/styles.tsx +12 -55
  60. package/src/components/json-schema-editor/types.ts +0 -1
  61. package/src/components/prompt-editor/editor.tsx +81 -0
  62. package/src/components/prompt-editor/index.tsx +5 -62
  63. package/src/components/prompt-editor-with-inputs/editor.tsx +25 -0
  64. package/src/components/prompt-editor-with-inputs/extensions/inputs-tree.tsx +11 -0
  65. package/src/components/prompt-editor-with-inputs/index.tsx +5 -16
  66. package/src/components/prompt-editor-with-inputs/inputs-picker.tsx +34 -17
  67. package/src/components/prompt-editor-with-variables/editor.tsx +22 -0
  68. package/src/components/prompt-editor-with-variables/extensions/variable-tag.tsx +12 -20
  69. package/src/components/prompt-editor-with-variables/extensions/variable-tree.tsx +13 -1
  70. package/src/components/prompt-editor-with-variables/index.tsx +5 -13
  71. package/src/components/type-selector/index.tsx +12 -2
  72. package/src/components/variable-selector/context.tsx +28 -0
  73. package/src/components/variable-selector/index.tsx +10 -1
  74. package/src/components/variable-selector/use-variable-tree.tsx +3 -3
  75. package/src/effects/auto-rename-ref/index.ts +7 -54
  76. package/src/effects/validate-when-variable-sync/index.ts +1 -1
  77. package/src/form-plugins/infer-assign-plugin/index.ts +1 -1
  78. package/src/form-plugins/infer-inputs-plugin/index.ts +4 -76
  79. package/src/hooks/use-object-list/index.tsx +35 -7
  80. package/src/index.ts +1 -0
  81. package/src/plugins/json-schema-preset/manager.ts +1 -0
  82. package/src/plugins/json-schema-preset/type-definition/date-time.tsx +25 -0
  83. package/src/plugins/json-schema-preset/type-definition/index.tsx +2 -0
  84. package/src/plugins/json-schema-preset/type-definition/string.tsx +18 -9
  85. package/src/shared/flow-value/index.ts +6 -0
  86. package/src/shared/flow-value/schema.ts +38 -0
  87. package/src/shared/flow-value/utils.ts +201 -0
  88. package/src/shared/format-legacy-refs/index.ts +1 -1
  89. package/src/shared/index.ts +3 -0
  90. package/src/shared/lazy-suspense/index.tsx +28 -0
  91. package/src/shared/polyfill-create-root/index.tsx +33 -0
  92. package/src/typings/flow-value/index.ts +3 -1
  93. package/src/validate/validate-flow-value/index.tsx +4 -16
  94. package/src/components/json-schema-editor/components/blur-input.tsx +0 -27
  95. package/src/plugins/disable-declaration-plugin/config.json +0 -5
  96. package/src/plugins/json-schema-preset/config.json +0 -9
  97. /package/src/components/{inputs-values/components/blur-input.tsx → blur-input/index.tsx} +0 -0
@@ -0,0 +1,477 @@
1
+ import {
2
+ createInjectMaterial,
3
+ lazySuspense
4
+ } from "./chunk-DEZUEMUM.js";
5
+
6
+ // src/components/code-editor/index.tsx
7
+ var CodeEditor = lazySuspense(
8
+ () => import("./editor-XYLKTB6L.js").then((module) => ({ default: module.CodeEditor }))
9
+ );
10
+
11
+ // src/components/code-editor-mini/index.tsx
12
+ import React from "react";
13
+ import styled from "styled-components";
14
+ var UIMini = styled.div`
15
+ .ͼ1 .cm-content {
16
+ }
17
+ `;
18
+ function CodeEditorMini(props) {
19
+ return /* @__PURE__ */ React.createElement(UIMini, null, /* @__PURE__ */ React.createElement(
20
+ CodeEditor,
21
+ {
22
+ ...props,
23
+ options: {
24
+ lineNumbersGutter: false,
25
+ foldGutter: false,
26
+ minHeight: 24,
27
+ ...props.options || {}
28
+ }
29
+ }
30
+ ));
31
+ }
32
+
33
+ // src/plugins/json-schema-preset/create-type-preset-plugin.tsx
34
+ import {
35
+ BaseTypeManager,
36
+ jsonSchemaContainerModule
37
+ } from "@flowgram.ai/json-schema";
38
+ import { definePluginCreator } from "@flowgram.ai/editor";
39
+
40
+ // src/plugins/json-schema-preset/type-definition/index.tsx
41
+ import { jsonSchemaTypeManager } from "@flowgram.ai/json-schema";
42
+
43
+ // src/plugins/json-schema-preset/type-definition/string.tsx
44
+ import React2 from "react";
45
+ import { I18n } from "@flowgram.ai/editor";
46
+ import { Input, TextArea } from "@douyinfe/semi-ui";
47
+ var stringRegistry = {
48
+ type: "string",
49
+ ConstantRenderer: (props) => props?.enableMultiLineStr ? /* @__PURE__ */ React2.createElement(
50
+ TextArea,
51
+ {
52
+ autosize: true,
53
+ rows: 1,
54
+ placeholder: I18n.t("Please Input String"),
55
+ disabled: props.readonly,
56
+ ...props
57
+ }
58
+ ) : /* @__PURE__ */ React2.createElement(
59
+ Input,
60
+ {
61
+ size: "small",
62
+ placeholder: I18n.t("Please Input String"),
63
+ disabled: props.readonly,
64
+ ...props
65
+ }
66
+ )
67
+ };
68
+
69
+ // src/plugins/json-schema-preset/type-definition/object.tsx
70
+ import React3 from "react";
71
+ import { I18n as I18n2 } from "@flowgram.ai/editor";
72
+ var objectRegistry = {
73
+ type: "object",
74
+ ConstantRenderer: (props) => /* @__PURE__ */ React3.createElement(
75
+ CodeEditorMini,
76
+ {
77
+ value: props.value,
78
+ onChange: (v) => props.onChange?.(v),
79
+ languageId: "json",
80
+ placeholder: I18n2.t("Please Input Object"),
81
+ readonly: props.readonly
82
+ }
83
+ )
84
+ };
85
+
86
+ // src/plugins/json-schema-preset/type-definition/number.tsx
87
+ import React4 from "react";
88
+ import { I18n as I18n3 } from "@flowgram.ai/editor";
89
+ import { InputNumber } from "@douyinfe/semi-ui";
90
+ var numberRegistry = {
91
+ type: "number",
92
+ ConstantRenderer: (props) => /* @__PURE__ */ React4.createElement(
93
+ InputNumber,
94
+ {
95
+ placeholder: I18n3.t("Please Input Number"),
96
+ size: "small",
97
+ disabled: props.readonly,
98
+ hideButtons: true,
99
+ ...props
100
+ }
101
+ )
102
+ };
103
+
104
+ // src/plugins/json-schema-preset/type-definition/integer.tsx
105
+ import React5 from "react";
106
+ import { I18n as I18n4 } from "@flowgram.ai/editor";
107
+ import { InputNumber as InputNumber2 } from "@douyinfe/semi-ui";
108
+ var integerRegistry = {
109
+ type: "integer",
110
+ ConstantRenderer: (props) => /* @__PURE__ */ React5.createElement(
111
+ InputNumber2,
112
+ {
113
+ placeholder: I18n4.t("Please Input Integer"),
114
+ size: "small",
115
+ disabled: props.readonly,
116
+ precision: 0,
117
+ ...props
118
+ }
119
+ )
120
+ };
121
+
122
+ // src/plugins/json-schema-preset/type-definition/date-time.tsx
123
+ import React6 from "react";
124
+ import { DatePicker } from "@douyinfe/semi-ui";
125
+ var dateTimeRegistry = {
126
+ type: "date-time",
127
+ ConstantRenderer: (props) => /* @__PURE__ */ React6.createElement(
128
+ DatePicker,
129
+ {
130
+ size: "small",
131
+ type: "dateTime",
132
+ density: "compact",
133
+ style: { width: "100%", ...props.style || {} },
134
+ disabled: props.readonly,
135
+ ...props
136
+ }
137
+ )
138
+ };
139
+
140
+ // src/plugins/json-schema-preset/type-definition/boolean.tsx
141
+ import React7 from "react";
142
+ import { I18n as I18n5 } from "@flowgram.ai/editor";
143
+ import { Select } from "@douyinfe/semi-ui";
144
+ var booleanRegistry = {
145
+ type: "boolean",
146
+ ConstantRenderer: (props) => {
147
+ const { value, onChange, ...rest } = props;
148
+ return /* @__PURE__ */ React7.createElement(
149
+ Select,
150
+ {
151
+ placeholder: I18n5.t("Please Select Boolean"),
152
+ size: "small",
153
+ disabled: props.readonly,
154
+ optionList: [
155
+ { label: I18n5.t("True"), value: 1 },
156
+ { label: I18n5.t("False"), value: 0 }
157
+ ],
158
+ value: value ? 1 : 0,
159
+ onChange: (value2) => onChange?.(!!value2),
160
+ ...rest
161
+ }
162
+ );
163
+ }
164
+ };
165
+
166
+ // src/plugins/json-schema-preset/type-definition/array.tsx
167
+ import React8 from "react";
168
+ import { I18n as I18n6 } from "@flowgram.ai/editor";
169
+ var arrayRegistry = {
170
+ type: "array",
171
+ ConstantRenderer: (props) => /* @__PURE__ */ React8.createElement(
172
+ CodeEditorMini,
173
+ {
174
+ value: props.value,
175
+ languageId: "json",
176
+ onChange: (v) => props.onChange?.(v),
177
+ placeholder: I18n6.t("Please Input Array"),
178
+ readonly: props.readonly
179
+ }
180
+ )
181
+ };
182
+
183
+ // src/plugins/json-schema-preset/type-definition/index.tsx
184
+ var jsonSchemaTypePreset = [
185
+ stringRegistry,
186
+ objectRegistry,
187
+ numberRegistry,
188
+ integerRegistry,
189
+ booleanRegistry,
190
+ arrayRegistry,
191
+ dateTimeRegistry
192
+ ];
193
+ jsonSchemaTypePreset.forEach((_type) => jsonSchemaTypeManager.register(_type));
194
+
195
+ // src/plugins/json-schema-preset/create-type-preset-plugin.tsx
196
+ var createTypePresetPlugin = definePluginCreator({
197
+ onInit(ctx, opts) {
198
+ const typeManager = ctx.get(BaseTypeManager);
199
+ jsonSchemaTypePreset.forEach((_type) => typeManager.register(_type));
200
+ opts.types?.forEach((_type) => typeManager.register(_type));
201
+ opts.unregisterTypes?.forEach((_type) => typeManager.unregister(_type));
202
+ },
203
+ containerModules: [jsonSchemaContainerModule]
204
+ });
205
+
206
+ // src/plugins/json-schema-preset/index.tsx
207
+ import React9 from "react";
208
+ import {
209
+ JsonSchemaUtils,
210
+ useTypeManager as useOriginTypeManager,
211
+ TypePresetProvider as OriginTypePresetProvider
212
+ } from "@flowgram.ai/json-schema";
213
+ var useTypeManager = () => useOriginTypeManager();
214
+ var JsonSchemaTypePresetProvider = ({
215
+ types = [],
216
+ children
217
+ }) => /* @__PURE__ */ React9.createElement(OriginTypePresetProvider, { types: [...jsonSchemaTypePreset, ...types] }, children);
218
+
219
+ // src/plugins/disable-declaration-plugin/create-disable-declaration-plugin.ts
220
+ import {
221
+ ASTMatch,
222
+ definePluginCreator as definePluginCreator2,
223
+ VariableEngine
224
+ } from "@flowgram.ai/editor";
225
+ var createDisableDeclarationPlugin = definePluginCreator2({
226
+ onInit(ctx) {
227
+ const variableEngine = ctx.get(VariableEngine);
228
+ const handleEvent = (action) => {
229
+ if (ASTMatch.isVariableDeclaration(action.ast)) {
230
+ if (!action.ast.meta?.disabled) {
231
+ action.ast.updateMeta({
232
+ ...action.ast.meta || {},
233
+ disabled: true
234
+ });
235
+ }
236
+ }
237
+ };
238
+ variableEngine.onGlobalEvent("NewAST", handleEvent);
239
+ variableEngine.onGlobalEvent("UpdateAST", handleEvent);
240
+ }
241
+ });
242
+
243
+ // src/components/variable-selector/use-variable-tree.tsx
244
+ import React10, { useCallback } from "react";
245
+ import { JsonSchemaUtils as JsonSchemaUtils2 } from "@flowgram.ai/json-schema";
246
+ import { ASTMatch as ASTMatch2, useAvailableVariables } from "@flowgram.ai/editor";
247
+ import { Icon } from "@douyinfe/semi-ui";
248
+ function useVariableTree(params) {
249
+ const { includeSchema, excludeSchema, skipVariable } = params;
250
+ const typeManager = useTypeManager();
251
+ const variables = useAvailableVariables();
252
+ const getVariableTypeIcon = useCallback((variable) => {
253
+ if (variable.meta?.icon) {
254
+ if (typeof variable.meta.icon === "string") {
255
+ return /* @__PURE__ */ React10.createElement("img", { style: { marginRight: 8 }, width: 12, height: 12, src: variable.meta.icon });
256
+ }
257
+ return variable.meta.icon;
258
+ }
259
+ const schema = JsonSchemaUtils2.astToSchema(variable.type, { drilldownObject: false });
260
+ return /* @__PURE__ */ React10.createElement(Icon, { size: "small", svg: typeManager.getDisplayIcon(schema || {}) });
261
+ }, []);
262
+ const renderVariable = (variable, parentFields = []) => {
263
+ let type = variable?.type;
264
+ if (!type) {
265
+ return null;
266
+ }
267
+ let children;
268
+ if (ASTMatch2.isObject(type)) {
269
+ children = (type.properties || []).map((_property) => renderVariable(_property, [...parentFields, variable])).filter(Boolean);
270
+ }
271
+ const keyPath = [...parentFields.map((_field) => _field.key), variable.key];
272
+ const key = keyPath.join(".");
273
+ const isSchemaInclude = includeSchema ? JsonSchemaUtils2.isASTMatchSchema(type, includeSchema) : true;
274
+ const isSchemaExclude = excludeSchema ? JsonSchemaUtils2.isASTMatchSchema(type, excludeSchema) : false;
275
+ const isCustomSkip = skipVariable ? skipVariable(variable) : false;
276
+ const isMetaDisabled = variable.meta?.disabled;
277
+ const isSchemaMatch = isSchemaInclude && !isSchemaExclude && !isCustomSkip && !isMetaDisabled;
278
+ if (!isSchemaMatch && !children?.length) {
279
+ return null;
280
+ }
281
+ return {
282
+ key,
283
+ label: variable.meta?.title || variable.key,
284
+ value: key,
285
+ keyPath,
286
+ icon: getVariableTypeIcon(variable),
287
+ children,
288
+ disabled: !isSchemaMatch,
289
+ rootMeta: parentFields[0]?.meta || variable.meta,
290
+ isRoot: !parentFields?.length
291
+ };
292
+ };
293
+ return [...variables.slice(0).reverse()].map((_variable) => renderVariable(_variable)).filter(Boolean);
294
+ }
295
+
296
+ // src/components/variable-selector/context.tsx
297
+ import React11, { createContext, useContext, useMemo } from "react";
298
+ var VariableSelectorContext = createContext({});
299
+ var useVariableSelectorContext = () => useContext(VariableSelectorContext);
300
+ var VariableSelectorProvider = ({
301
+ children,
302
+ skipVariable
303
+ }) => {
304
+ const context = useMemo(() => ({ skipVariable }), [skipVariable]);
305
+ return /* @__PURE__ */ React11.createElement(VariableSelectorContext.Provider, { value: context }, children);
306
+ };
307
+
308
+ // src/components/variable-selector/index.tsx
309
+ import React12, { useMemo as useMemo2 } from "react";
310
+ import { I18n as I18n7 } from "@flowgram.ai/editor";
311
+ import { Popover } from "@douyinfe/semi-ui";
312
+ import { IconChevronDownStroked, IconIssueStroked } from "@douyinfe/semi-icons";
313
+
314
+ // src/components/variable-selector/styles.tsx
315
+ import styled2, { css } from "styled-components";
316
+ import { Tag, TreeSelect } from "@douyinfe/semi-ui";
317
+ var UIRootTitle = styled2.div`
318
+ margin-right: 4px;
319
+ min-width: 20px;
320
+ overflow: hidden;
321
+ text-overflow: ellipsis;
322
+ white-space: nowrap;
323
+ color: var(--semi-color-text-2);
324
+ `;
325
+ var UIVarName = styled2.div`
326
+ overflow: hidden;
327
+ text-overflow: ellipsis;
328
+ white-space: nowrap;
329
+
330
+ ${({ $inSelector }) => $inSelector && css`
331
+ min-width: 50%;
332
+ `}
333
+ `;
334
+ var UITag = styled2(Tag)`
335
+ width: 100%;
336
+ display: flex;
337
+ align-items: center;
338
+ justify-content: flex-start;
339
+
340
+ & .semi-tag-content-center {
341
+ justify-content: flex-start;
342
+ }
343
+
344
+ &.semi-tag {
345
+ margin: 0;
346
+ height: 22px;
347
+ }
348
+ `;
349
+ var UITreeSelect = styled2(TreeSelect)`
350
+ outline: ${({ $error }) => $error ? "1px solid red" : "none"};
351
+
352
+ & .semi-tree-select-selection {
353
+ padding: 0px;
354
+ height: 22px;
355
+ }
356
+
357
+ & .semi-tree-select-selection-content {
358
+ width: 100%;
359
+ }
360
+
361
+ & .semi-tree-select-selection-placeholder {
362
+ padding-left: 10px;
363
+ }
364
+ `;
365
+ var UIPopoverContent = styled2.div`
366
+ padding: 10px;
367
+ display: inline-flex;
368
+ align-items: center;
369
+ justify-content: flex-start;
370
+ white-space: nowrap;
371
+ `;
372
+
373
+ // src/components/variable-selector/index.tsx
374
+ var VariableSelector = ({
375
+ value,
376
+ config = {},
377
+ onChange,
378
+ style,
379
+ readonly = false,
380
+ includeSchema,
381
+ excludeSchema,
382
+ hasError,
383
+ triggerRender
384
+ }) => {
385
+ const { skipVariable } = useVariableSelectorContext();
386
+ const treeData = useVariableTree({
387
+ includeSchema,
388
+ excludeSchema,
389
+ skipVariable
390
+ });
391
+ const treeValue = useMemo2(() => {
392
+ if (typeof value === "string") {
393
+ console.warn(
394
+ "The Value of VariableSelector is a string, it should be an ARRAY. \n",
395
+ "Please check the value of VariableSelector \n"
396
+ );
397
+ return value;
398
+ }
399
+ return value?.join(".");
400
+ }, [value]);
401
+ const renderIcon = (icon) => {
402
+ if (typeof icon === "string") {
403
+ return /* @__PURE__ */ React12.createElement("img", { style: { marginRight: 8 }, width: 12, height: 12, src: icon });
404
+ }
405
+ return icon;
406
+ };
407
+ return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(
408
+ UITreeSelect,
409
+ {
410
+ dropdownMatchSelectWidth: false,
411
+ disabled: readonly,
412
+ treeData,
413
+ size: "small",
414
+ value: treeValue,
415
+ clearIcon: null,
416
+ $error: hasError,
417
+ style,
418
+ validateStatus: hasError ? "error" : void 0,
419
+ onChange: (_, _config) => {
420
+ onChange(_config.keyPath);
421
+ },
422
+ renderSelectedItem: (_option) => {
423
+ if (!_option?.keyPath) {
424
+ return /* @__PURE__ */ React12.createElement(
425
+ UITag,
426
+ {
427
+ prefixIcon: /* @__PURE__ */ React12.createElement(IconIssueStroked, null),
428
+ color: "amber",
429
+ closable: !readonly,
430
+ onClose: () => onChange(void 0)
431
+ },
432
+ config?.notFoundContent ?? "Undefined"
433
+ );
434
+ }
435
+ const rootIcon = renderIcon(_option.rootMeta?.icon || _option?.icon);
436
+ const rootTitle = /* @__PURE__ */ React12.createElement(UIRootTitle, null, _option.rootMeta?.title ? `${_option.rootMeta?.title} ${_option.isRoot ? "" : "-"} ` : null);
437
+ return /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement(
438
+ Popover,
439
+ {
440
+ content: /* @__PURE__ */ React12.createElement(UIPopoverContent, null, rootIcon, rootTitle, /* @__PURE__ */ React12.createElement(UIVarName, null, _option.keyPath.slice(1).join(".")))
441
+ },
442
+ /* @__PURE__ */ React12.createElement(
443
+ UITag,
444
+ {
445
+ prefixIcon: rootIcon,
446
+ closable: !readonly,
447
+ onClose: () => onChange(void 0)
448
+ },
449
+ rootTitle,
450
+ !_option.isRoot && /* @__PURE__ */ React12.createElement(UIVarName, { $inSelector: true }, _option.label)
451
+ )
452
+ ));
453
+ },
454
+ showClear: false,
455
+ arrowIcon: /* @__PURE__ */ React12.createElement(IconChevronDownStroked, { size: "small" }),
456
+ triggerRender,
457
+ placeholder: config?.placeholder ?? I18n7.t("Select Variable")
458
+ }
459
+ ));
460
+ };
461
+ VariableSelector.renderKey = "variable-selector-render-key";
462
+ var InjectVariableSelector = createInjectMaterial(VariableSelector);
463
+
464
+ export {
465
+ CodeEditor,
466
+ CodeEditorMini,
467
+ createTypePresetPlugin,
468
+ JsonSchemaUtils,
469
+ useTypeManager,
470
+ JsonSchemaTypePresetProvider,
471
+ createDisableDeclarationPlugin,
472
+ useVariableTree,
473
+ VariableSelectorProvider,
474
+ VariableSelector,
475
+ InjectVariableSelector
476
+ };
477
+ //# sourceMappingURL=chunk-DUOXDOUE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/code-editor/index.tsx","../../src/components/code-editor-mini/index.tsx","../../src/plugins/json-schema-preset/create-type-preset-plugin.tsx","../../src/plugins/json-schema-preset/type-definition/index.tsx","../../src/plugins/json-schema-preset/type-definition/string.tsx","../../src/plugins/json-schema-preset/type-definition/object.tsx","../../src/plugins/json-schema-preset/type-definition/number.tsx","../../src/plugins/json-schema-preset/type-definition/integer.tsx","../../src/plugins/json-schema-preset/type-definition/date-time.tsx","../../src/plugins/json-schema-preset/type-definition/boolean.tsx","../../src/plugins/json-schema-preset/type-definition/array.tsx","../../src/plugins/json-schema-preset/index.tsx","../../src/plugins/disable-declaration-plugin/create-disable-declaration-plugin.ts","../../src/components/variable-selector/use-variable-tree.tsx","../../src/components/variable-selector/context.tsx","../../src/components/variable-selector/index.tsx","../../src/components/variable-selector/styles.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { lazySuspense } from '@/shared';\n\nexport const CodeEditor = lazySuspense(() =>\n import('./editor').then((module) => ({ default: module.CodeEditor }))\n);\n\nexport type { CodeEditorPropsType } from './editor';\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport React from 'react';\n\nimport styled from 'styled-components';\n\nimport { CodeEditor, type CodeEditorPropsType } from '@/components/code-editor';\n\nconst UIMini = styled.div`\n .ͼ1 .cm-content {\n }\n`;\n\nexport function CodeEditorMini(props: CodeEditorPropsType) {\n return (\n <UIMini>\n <CodeEditor\n {...props}\n options={{\n lineNumbersGutter: false,\n foldGutter: false,\n minHeight: 24,\n ...(props.options || {}),\n }}\n />\n </UIMini>\n );\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport {\n BaseTypeManager,\n jsonSchemaContainerModule,\n JsonSchemaTypeManager,\n} from '@flowgram.ai/json-schema';\nimport { definePluginCreator } from '@flowgram.ai/editor';\n\nimport { jsonSchemaTypePreset } from './type-definition';\nimport { JsonSchemaTypeRegistry } from './manager';\n\nexport const createTypePresetPlugin = definePluginCreator<{\n types?: Partial<JsonSchemaTypeRegistry> & Pick<JsonSchemaTypeRegistry, 'type'>[];\n unregisterTypes?: string[];\n}>({\n onInit(ctx, opts) {\n const typeManager = ctx.get(BaseTypeManager) as JsonSchemaTypeManager;\n jsonSchemaTypePreset.forEach((_type) => typeManager.register(_type));\n\n opts.types?.forEach((_type) => typeManager.register(_type));\n opts.unregisterTypes?.forEach((_type) => typeManager.unregister(_type));\n },\n containerModules: [jsonSchemaContainerModule],\n});\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { jsonSchemaTypeManager } from '@flowgram.ai/json-schema';\n\nimport { stringRegistry } from './string';\nimport { objectRegistry } from './object';\nimport { numberRegistry } from './number';\nimport { integerRegistry } from './integer';\nimport { dateTimeRegistry } from './date-time';\nimport { booleanRegistry } from './boolean';\nimport { arrayRegistry } from './array';\n\nexport const jsonSchemaTypePreset = [\n stringRegistry,\n objectRegistry,\n numberRegistry,\n integerRegistry,\n booleanRegistry,\n arrayRegistry,\n dateTimeRegistry,\n];\n\njsonSchemaTypePreset.forEach((_type) => jsonSchemaTypeManager.register(_type));\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\n/* eslint-disable react/prop-types */\nimport React from 'react';\n\nimport { I18n } from '@flowgram.ai/editor';\nimport { Input, TextArea } from '@douyinfe/semi-ui';\n\nimport { type JsonSchemaTypeRegistry } from '../manager';\n\nexport const stringRegistry: Partial<JsonSchemaTypeRegistry> = {\n type: 'string',\n ConstantRenderer: (props) =>\n props?.enableMultiLineStr ? (\n <TextArea\n autosize\n rows={1}\n placeholder={I18n.t('Please Input String')}\n disabled={props.readonly}\n {...props}\n />\n ) : (\n <Input\n size=\"small\"\n placeholder={I18n.t('Please Input String')}\n disabled={props.readonly}\n {...props}\n />\n ),\n};\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\n/* eslint-disable react/prop-types */\nimport React from 'react';\n\nimport { I18n } from '@flowgram.ai/editor';\n\nimport { CodeEditorMini } from '@/components/code-editor-mini';\n\nimport { type JsonSchemaTypeRegistry } from '../manager';\n\nexport const objectRegistry: Partial<JsonSchemaTypeRegistry> = {\n type: 'object',\n ConstantRenderer: (props) => (\n <CodeEditorMini\n value={props.value}\n onChange={(v) => props.onChange?.(v)}\n languageId=\"json\"\n placeholder={I18n.t('Please Input Object')}\n readonly={props.readonly}\n />\n ),\n};\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\n/* eslint-disable react/prop-types */\nimport React from 'react';\n\nimport { I18n } from '@flowgram.ai/editor';\nimport { InputNumber } from '@douyinfe/semi-ui';\n\nimport { type JsonSchemaTypeRegistry } from '../manager';\n\nexport const numberRegistry: Partial<JsonSchemaTypeRegistry> = {\n type: 'number',\n ConstantRenderer: (props) => (\n <InputNumber\n placeholder={I18n.t('Please Input Number')}\n size=\"small\"\n disabled={props.readonly}\n hideButtons\n {...props}\n />\n ),\n};\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\n/* eslint-disable react/prop-types */\nimport React from 'react';\n\nimport { I18n } from '@flowgram.ai/editor';\nimport { InputNumber } from '@douyinfe/semi-ui';\n\nimport { type JsonSchemaTypeRegistry } from '../manager';\n\nexport const integerRegistry: Partial<JsonSchemaTypeRegistry> = {\n type: 'integer',\n ConstantRenderer: (props) => (\n <InputNumber\n placeholder={I18n.t('Please Input Integer')}\n size=\"small\"\n disabled={props.readonly}\n precision={0}\n {...props}\n />\n ),\n};\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\n/* eslint-disable react/prop-types */\nimport React from 'react';\n\nimport { DatePicker } from '@douyinfe/semi-ui';\n\nimport { type JsonSchemaTypeRegistry } from '../manager';\n\nexport const dateTimeRegistry: Partial<JsonSchemaTypeRegistry> = {\n type: 'date-time',\n ConstantRenderer: (props) => (\n <DatePicker\n size=\"small\"\n type=\"dateTime\"\n density=\"compact\"\n style={{ width: '100%', ...(props.style || {}) }}\n disabled={props.readonly}\n {...props}\n />\n ),\n};\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\n/* eslint-disable react/prop-types */\nimport React from 'react';\n\nimport { I18n } from '@flowgram.ai/editor';\nimport { Select } from '@douyinfe/semi-ui';\n\nimport { type JsonSchemaTypeRegistry } from '../manager';\n\nexport const booleanRegistry: Partial<JsonSchemaTypeRegistry> = {\n type: 'boolean',\n ConstantRenderer: (props) => {\n const { value, onChange, ...rest } = props;\n return (\n <Select\n placeholder={I18n.t('Please Select Boolean')}\n size=\"small\"\n disabled={props.readonly}\n optionList={[\n { label: I18n.t('True'), value: 1 },\n { label: I18n.t('False'), value: 0 },\n ]}\n value={value ? 1 : 0}\n onChange={(value) => onChange?.(!!value)}\n {...rest}\n />\n );\n },\n};\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\n/* eslint-disable react/prop-types */\nimport React from 'react';\n\nimport { I18n } from '@flowgram.ai/editor';\n\nimport { CodeEditorMini } from '@/components/code-editor-mini';\n\nimport { type JsonSchemaTypeRegistry } from '../manager';\n\nexport const arrayRegistry: Partial<JsonSchemaTypeRegistry> = {\n type: 'array',\n ConstantRenderer: (props) => (\n <CodeEditorMini\n value={props.value}\n languageId=\"json\"\n onChange={(v) => props.onChange?.(v)}\n placeholder={I18n.t('Please Input Array')}\n readonly={props.readonly}\n />\n ),\n};\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\nimport React from 'react';\n\nimport {\n type IJsonSchema,\n JsonSchemaUtils,\n useTypeManager as useOriginTypeManager,\n TypePresetProvider as OriginTypePresetProvider,\n JsonSchemaTypeManager,\n type JsonSchemaBasicType,\n} from '@flowgram.ai/json-schema';\n\nimport { jsonSchemaTypePreset } from './type-definition';\nimport { type JsonSchemaTypeRegistry, type ConstantRendererProps } from './manager';\nimport { createTypePresetPlugin } from './create-type-preset-plugin';\n\nconst useTypeManager = () =>\n useOriginTypeManager() as JsonSchemaTypeManager<IJsonSchema, JsonSchemaTypeRegistry>;\n\nconst JsonSchemaTypePresetProvider = ({\n types = [],\n children,\n}: React.PropsWithChildren<{ types: JsonSchemaTypeRegistry[] }>) => (\n <OriginTypePresetProvider types={[...jsonSchemaTypePreset, ...types]}>\n {children}\n </OriginTypePresetProvider>\n);\n\nexport {\n createTypePresetPlugin,\n useTypeManager,\n JsonSchemaTypePresetProvider,\n IJsonSchema,\n JsonSchemaUtils,\n JsonSchemaTypeRegistry,\n ConstantRendererProps,\n JsonSchemaBasicType,\n};\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport {\n ASTMatch,\n definePluginCreator,\n type GlobalEventActionType,\n VariableEngine,\n} from '@flowgram.ai/editor';\n\nexport const createDisableDeclarationPlugin = definePluginCreator<void>({\n onInit(ctx) {\n const variableEngine = ctx.get(VariableEngine);\n\n const handleEvent = (action: GlobalEventActionType) => {\n if (ASTMatch.isVariableDeclaration(action.ast)) {\n if (!action.ast.meta?.disabled) {\n action.ast.updateMeta({\n ...(action.ast.meta || {}),\n disabled: true,\n });\n }\n }\n };\n\n variableEngine.onGlobalEvent('NewAST', handleEvent);\n variableEngine.onGlobalEvent('UpdateAST', handleEvent);\n },\n});\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport React, { useCallback } from 'react';\n\nimport { IJsonSchema, JsonSchemaUtils } from '@flowgram.ai/json-schema';\nimport { ASTMatch, BaseVariableField, useAvailableVariables } from '@flowgram.ai/editor';\nimport { TreeNodeData } from '@douyinfe/semi-ui/lib/es/tree';\nimport { Icon } from '@douyinfe/semi-ui';\n\nimport { useTypeManager } from '@/plugins';\n\ntype VariableField = BaseVariableField<{\n icon?: string | JSX.Element;\n title?: string;\n disabled?: boolean;\n}>;\n\nexport function useVariableTree(params: {\n includeSchema?: IJsonSchema | IJsonSchema[];\n excludeSchema?: IJsonSchema | IJsonSchema[];\n skipVariable?: (variable: VariableField) => boolean;\n}): TreeNodeData[] {\n const { includeSchema, excludeSchema, skipVariable } = params;\n\n const typeManager = useTypeManager();\n const variables = useAvailableVariables();\n\n const getVariableTypeIcon = useCallback((variable: VariableField) => {\n if (variable.meta?.icon) {\n if (typeof variable.meta.icon === 'string') {\n return <img style={{ marginRight: 8 }} width={12} height={12} src={variable.meta.icon} />;\n }\n\n return variable.meta.icon;\n }\n\n const schema = JsonSchemaUtils.astToSchema(variable.type, { drilldownObject: false });\n\n return <Icon size=\"small\" svg={typeManager.getDisplayIcon(schema || {})} />;\n }, []);\n\n const renderVariable = (\n variable: VariableField,\n parentFields: VariableField[] = []\n ): TreeNodeData | null => {\n let type = variable?.type;\n\n if (!type) {\n return null;\n }\n\n let children: TreeNodeData[] | undefined;\n\n if (ASTMatch.isObject(type)) {\n children = (type.properties || [])\n .map((_property) => renderVariable(_property as VariableField, [...parentFields, variable]))\n .filter(Boolean) as TreeNodeData[];\n }\n\n const keyPath = [...parentFields.map((_field) => _field.key), variable.key];\n const key = keyPath.join('.');\n\n const isSchemaInclude = includeSchema\n ? JsonSchemaUtils.isASTMatchSchema(type, includeSchema)\n : true;\n const isSchemaExclude = excludeSchema\n ? JsonSchemaUtils.isASTMatchSchema(type, excludeSchema)\n : false;\n const isCustomSkip = skipVariable ? skipVariable(variable) : false;\n\n // disabled in meta when created\n const isMetaDisabled = variable.meta?.disabled;\n\n const isSchemaMatch = isSchemaInclude && !isSchemaExclude && !isCustomSkip && !isMetaDisabled;\n\n // If not match, and no children, return null\n if (!isSchemaMatch && !children?.length) {\n return null;\n }\n\n return {\n key: key,\n label: variable.meta?.title || variable.key,\n value: key,\n keyPath,\n icon: getVariableTypeIcon(variable),\n children,\n disabled: !isSchemaMatch,\n rootMeta: parentFields[0]?.meta || variable.meta,\n isRoot: !parentFields?.length,\n };\n };\n\n return [...variables.slice(0).reverse()]\n .map((_variable) => renderVariable(_variable as VariableField))\n .filter(Boolean) as TreeNodeData[];\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport React, { createContext, useContext, useMemo } from 'react';\n\nimport { BaseVariableField } from '@flowgram.ai/editor';\n\nexport const VariableSelectorContext = createContext<{\n skipVariable?: (variable?: BaseVariableField) => boolean;\n}>({});\n\nexport const useVariableSelectorContext = () => useContext(VariableSelectorContext);\n\nexport const VariableSelectorProvider = ({\n children,\n skipVariable,\n}: {\n skipVariable?: (variable?: BaseVariableField) => boolean;\n children: React.ReactNode;\n}) => {\n const context = useMemo(() => ({ skipVariable }), [skipVariable]);\n\n return (\n <VariableSelectorContext.Provider value={context}>{children}</VariableSelectorContext.Provider>\n );\n};\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport React, { useMemo } from 'react';\n\nimport { IJsonSchema } from '@flowgram.ai/json-schema';\nimport { I18n } from '@flowgram.ai/editor';\nimport { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';\nimport { TreeNodeData } from '@douyinfe/semi-ui/lib/es/tree';\nimport { Popover } from '@douyinfe/semi-ui';\nimport { IconChevronDownStroked, IconIssueStroked } from '@douyinfe/semi-icons';\n\nimport { createInjectMaterial } from '@/shared';\n\nimport { useVariableTree } from './use-variable-tree';\nimport { UIPopoverContent, UIRootTitle, UITag, UITreeSelect, UIVarName } from './styles';\nimport { useVariableSelectorContext } from './context';\n\nexport interface VariableSelectorProps {\n value?: string[];\n config?: {\n placeholder?: string;\n notFoundContent?: string;\n };\n onChange: (value?: string[]) => void;\n includeSchema?: IJsonSchema | IJsonSchema[];\n excludeSchema?: IJsonSchema | IJsonSchema[];\n readonly?: boolean;\n hasError?: boolean;\n style?: React.CSSProperties;\n triggerRender?: (props: TriggerRenderProps) => React.ReactNode;\n}\n\nexport { useVariableTree };\n\nexport const VariableSelector = ({\n value,\n config = {},\n onChange,\n style,\n readonly = false,\n includeSchema,\n excludeSchema,\n hasError,\n triggerRender,\n}: VariableSelectorProps) => {\n const { skipVariable } = useVariableSelectorContext();\n\n const treeData = useVariableTree({\n includeSchema,\n excludeSchema,\n skipVariable,\n });\n\n const treeValue = useMemo(() => {\n if (typeof value === 'string') {\n console.warn(\n 'The Value of VariableSelector is a string, it should be an ARRAY. \\n',\n 'Please check the value of VariableSelector \\n'\n );\n return value;\n }\n return value?.join('.');\n }, [value]);\n\n const renderIcon = (icon: string | JSX.Element) => {\n if (typeof icon === 'string') {\n return <img style={{ marginRight: 8 }} width={12} height={12} src={icon} />;\n }\n\n return icon;\n };\n\n return (\n <>\n <UITreeSelect\n dropdownMatchSelectWidth={false}\n disabled={readonly}\n treeData={treeData}\n size=\"small\"\n value={treeValue}\n clearIcon={null}\n $error={hasError}\n style={style}\n validateStatus={hasError ? 'error' : undefined}\n onChange={(_, _config) => {\n onChange((_config as TreeNodeData).keyPath as string[]);\n }}\n renderSelectedItem={(_option: TreeNodeData) => {\n if (!_option?.keyPath) {\n return (\n <UITag\n prefixIcon={<IconIssueStroked />}\n color=\"amber\"\n closable={!readonly}\n onClose={() => onChange(undefined)}\n >\n {config?.notFoundContent ?? 'Undefined'}\n </UITag>\n );\n }\n\n const rootIcon = renderIcon(_option.rootMeta?.icon || _option?.icon);\n\n const rootTitle = (\n <UIRootTitle>\n {_option.rootMeta?.title\n ? `${_option.rootMeta?.title} ${_option.isRoot ? '' : '-'} `\n : null}\n </UIRootTitle>\n );\n\n return (\n <div>\n <Popover\n content={\n <UIPopoverContent>\n {rootIcon}\n {rootTitle}\n <UIVarName>{_option.keyPath.slice(1).join('.')}</UIVarName>\n </UIPopoverContent>\n }\n >\n <UITag\n prefixIcon={rootIcon}\n closable={!readonly}\n onClose={() => onChange(undefined)}\n >\n {rootTitle}\n {!_option.isRoot && <UIVarName $inSelector>{_option.label}</UIVarName>}\n </UITag>\n </Popover>\n </div>\n );\n }}\n showClear={false}\n arrowIcon={<IconChevronDownStroked size=\"small\" />}\n triggerRender={triggerRender}\n placeholder={config?.placeholder ?? I18n.t('Select Variable')}\n />\n </>\n );\n};\n\nVariableSelector.renderKey = 'variable-selector-render-key';\nexport const InjectVariableSelector = createInjectMaterial(VariableSelector);\n\nexport { VariableSelectorProvider } from './context';\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport styled, { css } from 'styled-components';\nimport { Tag, TreeSelect } from '@douyinfe/semi-ui';\n\nexport const UIRootTitle = styled.div`\n margin-right: 4px;\n min-width: 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--semi-color-text-2);\n`;\n\nexport const UIVarName = styled.div<{ $inSelector?: boolean }>`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n ${({ $inSelector }) =>\n $inSelector &&\n css`\n min-width: 50%;\n `}\n`;\n\nexport const UITag = styled(Tag)`\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n & .semi-tag-content-center {\n justify-content: flex-start;\n }\n\n &.semi-tag {\n margin: 0;\n height: 22px;\n }\n`;\n\nexport const UITreeSelect = styled(TreeSelect)<{ $error?: boolean }>`\n outline: ${({ $error }) => ($error ? '1px solid red' : 'none')};\n\n & .semi-tree-select-selection {\n padding: 0px;\n height: 22px;\n }\n\n & .semi-tree-select-selection-content {\n width: 100%;\n }\n\n & .semi-tree-select-selection-placeholder {\n padding-left: 10px;\n }\n`;\n\nexport const UIPopoverContent = styled.div`\n padding: 10px;\n display: inline-flex;\n align-items: center;\n justify-content: flex-start;\n white-space: nowrap;\n`;\n"],"mappings":";;;;;;AAOO,IAAM,aAAa;AAAA,EAAa,MACrC,OAAO,sBAAU,EAAE,KAAK,CAAC,YAAY,EAAE,SAAS,OAAO,WAAW,EAAE;AACtE;;;ACJA,OAAO,WAAW;AAElB,OAAO,YAAY;AAInB,IAAM,SAAS,OAAO;AAAA;AAAA;AAAA;AAKf,SAAS,eAAe,OAA4B;AACzD,SACE,oCAAC,cACC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,SAAS;AAAA,QACP,mBAAmB;AAAA,QACnB,YAAY;AAAA,QAC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E,gBAAAA,QAAA,cAAC,wBACE,UACA,WACD,gBAAAA,QAAA,cAAC,iBAAW,QAAQ,QAAQ,MAAM,CAAC,EAAE,KAAK,GAAG,CAAE,CACjD;AAAA;AAAA,UAGF,gBAAAA,QAAA;AAAA,YAAC;AAAA;AAAA,cACC,YAAY;AAAA,cACZ,UAAU,CAAC;AAAA,cACX,SAAS,MAAM,SAAS,MAAS;AAAA;AAAA,YAEhC;AAAA,YACA,CAAC,QAAQ,UAAU,gBAAAA,QAAA,cAAC,aAAU,aAAW,QAAE,QAAQ,KAAM;AAAA,UAC5D;AAAA,QACF,CACF;AAAA,MAEJ;AAAA,MACA,WAAW;AAAA,MACX,WAAW,gBAAAA,QAAA,cAAC,0BAAuB,MAAK,SAAQ;AAAA,MAChD;AAAA,MACA,aAAa,QAAQ,eAAeC,MAAK,EAAE,iBAAiB;AAAA;AAAA,EAC9D,CACF;AAEJ;AAEA,iBAAiB,YAAY;AACtB,IAAM,yBAAyB,qBAAqB,gBAAgB;","names":["React","React","I18n","React","I18n","React","I18n","React","I18n","InputNumber","React","React","I18n","value","React","I18n","React","I18n","React","React","definePluginCreator","React","JsonSchemaUtils","ASTMatch","React","JsonSchemaUtils","ASTMatch","React","React","useMemo","I18n","styled","useMemo","React","I18n"]}