@flowgram.ai/form-materials 0.4.4 → 0.4.6

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 (47) hide show
  1. package/dist/esm/chunk-6OZSB6PD.js +10 -0
  2. package/dist/esm/chunk-6OZSB6PD.js.map +1 -0
  3. package/dist/esm/chunk-G4HQ7OSI.js +440 -0
  4. package/dist/esm/chunk-G4HQ7OSI.js.map +1 -0
  5. package/dist/esm/chunk-QIJ4QVB2.js +271 -0
  6. package/dist/esm/chunk-QIJ4QVB2.js.map +1 -0
  7. package/dist/esm/editor-6UMULJYB.js +180 -0
  8. package/dist/esm/editor-6UMULJYB.js.map +1 -0
  9. package/dist/esm/editor-E2BQTPCD.js +388 -0
  10. package/dist/esm/editor-E2BQTPCD.js.map +1 -0
  11. package/dist/esm/editor-H2R7JJLO.js +282 -0
  12. package/dist/esm/editor-H2R7JJLO.js.map +1 -0
  13. package/dist/esm/editor-JX42GFAZ.js +249 -0
  14. package/dist/esm/editor-JX42GFAZ.js.map +1 -0
  15. package/dist/esm/editor-YMNCDGUR.js +167 -0
  16. package/dist/esm/editor-YMNCDGUR.js.map +1 -0
  17. package/dist/esm/index.js +1388 -3029
  18. package/dist/esm/index.js.map +1 -1
  19. package/dist/index.d.mts +144 -51
  20. package/dist/index.d.ts +144 -51
  21. package/dist/index.js +3511 -2759
  22. package/dist/index.js.map +1 -1
  23. package/package.json +6 -6
  24. package/src/components/code-editor/editor.tsx +96 -0
  25. package/src/components/code-editor/index.tsx +5 -89
  26. package/src/components/code-editor/theme/dark.ts +49 -30
  27. package/src/components/code-editor/theme/light.ts +56 -32
  28. package/src/components/code-editor-mini/index.tsx +2 -2
  29. package/src/components/condition-row/index.tsx +4 -0
  30. package/src/components/db-condition-row/hooks/use-left.tsx +66 -0
  31. package/src/components/db-condition-row/hooks/use-op.tsx +59 -0
  32. package/src/components/db-condition-row/index.tsx +93 -0
  33. package/src/components/db-condition-row/styles.tsx +43 -0
  34. package/src/components/db-condition-row/types.ts +34 -0
  35. package/src/components/index.ts +1 -0
  36. package/src/components/json-editor-with-variables/editor.tsx +69 -0
  37. package/src/components/json-editor-with-variables/extensions/variable-tag.tsx +4 -3
  38. package/src/components/json-editor-with-variables/index.tsx +5 -60
  39. package/src/components/prompt-editor/editor.tsx +81 -0
  40. package/src/components/prompt-editor/index.tsx +5 -69
  41. package/src/components/prompt-editor-with-inputs/editor.tsx +25 -0
  42. package/src/components/prompt-editor-with-inputs/index.tsx +5 -15
  43. package/src/components/prompt-editor-with-variables/editor.tsx +22 -0
  44. package/src/components/prompt-editor-with-variables/extensions/variable-tag.tsx +10 -18
  45. package/src/components/prompt-editor-with-variables/index.tsx +5 -13
  46. package/src/shared/index.ts +1 -0
  47. package/src/shared/polyfill-create-root/index.tsx +33 -0
@@ -0,0 +1,10 @@
1
+ // src/components/prompt-editor/index.tsx
2
+ import { lazy } from "react";
3
+ var PromptEditor = lazy(
4
+ () => import("./editor-6UMULJYB.js").then((module) => ({ default: module.PromptEditor }))
5
+ );
6
+
7
+ export {
8
+ PromptEditor
9
+ };
10
+ //# sourceMappingURL=chunk-6OZSB6PD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/prompt-editor/index.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { lazy } from 'react';\n\nexport const PromptEditor = lazy(() =>\n import('./editor').then((module) => ({ default: module.PromptEditor }))\n);\n\nexport type { PromptEditorPropsType } from './editor';\n"],"mappings":";AAKA,SAAS,YAAY;AAEd,IAAM,eAAe;AAAA,EAAK,MAC/B,OAAO,sBAAU,EAAE,KAAK,CAAC,YAAY,EAAE,SAAS,OAAO,aAAa,EAAE;AACxE;","names":[]}
@@ -0,0 +1,440 @@
1
+ import {
2
+ createInjectMaterial
3
+ } from "./chunk-QIJ4QVB2.js";
4
+
5
+ // src/components/code-editor/index.tsx
6
+ import { lazy } from "react";
7
+ var CodeEditor = lazy(
8
+ () => import("./editor-E2BQTPCD.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/boolean.tsx
123
+ import React6 from "react";
124
+ import { I18n as I18n5 } from "@flowgram.ai/editor";
125
+ import { Select } from "@douyinfe/semi-ui";
126
+ var booleanRegistry = {
127
+ type: "boolean",
128
+ ConstantRenderer: (props) => {
129
+ const { value, onChange, ...rest } = props;
130
+ return /* @__PURE__ */ React6.createElement(
131
+ Select,
132
+ {
133
+ placeholder: I18n5.t("Please Select Boolean"),
134
+ size: "small",
135
+ disabled: props.readonly,
136
+ optionList: [
137
+ { label: I18n5.t("True"), value: 1 },
138
+ { label: I18n5.t("False"), value: 0 }
139
+ ],
140
+ value: value ? 1 : 0,
141
+ onChange: (value2) => onChange?.(!!value2),
142
+ ...rest
143
+ }
144
+ );
145
+ }
146
+ };
147
+
148
+ // src/plugins/json-schema-preset/type-definition/array.tsx
149
+ import React7 from "react";
150
+ import { I18n as I18n6 } from "@flowgram.ai/editor";
151
+ var arrayRegistry = {
152
+ type: "array",
153
+ ConstantRenderer: (props) => /* @__PURE__ */ React7.createElement(
154
+ CodeEditorMini,
155
+ {
156
+ value: props.value,
157
+ languageId: "json",
158
+ onChange: (v) => props.onChange?.(v),
159
+ placeholder: I18n6.t("Please Input Array"),
160
+ readonly: props.readonly
161
+ }
162
+ )
163
+ };
164
+
165
+ // src/plugins/json-schema-preset/type-definition/index.tsx
166
+ var jsonSchemaTypePreset = [
167
+ stringRegistry,
168
+ objectRegistry,
169
+ numberRegistry,
170
+ integerRegistry,
171
+ booleanRegistry,
172
+ arrayRegistry
173
+ ];
174
+ jsonSchemaTypePreset.forEach((_type) => jsonSchemaTypeManager.register(_type));
175
+
176
+ // src/plugins/json-schema-preset/create-type-preset-plugin.tsx
177
+ var createTypePresetPlugin = definePluginCreator({
178
+ onInit(ctx, opts) {
179
+ const typeManager = ctx.get(BaseTypeManager);
180
+ jsonSchemaTypePreset.forEach((_type) => typeManager.register(_type));
181
+ opts.types?.forEach((_type) => typeManager.register(_type));
182
+ opts.unregisterTypes?.forEach((_type) => typeManager.unregister(_type));
183
+ },
184
+ containerModules: [jsonSchemaContainerModule]
185
+ });
186
+
187
+ // src/plugins/json-schema-preset/index.tsx
188
+ import React8 from "react";
189
+ import {
190
+ JsonSchemaUtils,
191
+ useTypeManager as useOriginTypeManager,
192
+ TypePresetProvider as OriginTypePresetProvider
193
+ } from "@flowgram.ai/json-schema";
194
+ var useTypeManager = () => useOriginTypeManager();
195
+ var JsonSchemaTypePresetProvider = ({
196
+ types = [],
197
+ children
198
+ }) => /* @__PURE__ */ React8.createElement(OriginTypePresetProvider, { types: [...jsonSchemaTypePreset, ...types] }, children);
199
+
200
+ // src/plugins/disable-declaration-plugin/create-disable-declaration-plugin.ts
201
+ import {
202
+ ASTMatch,
203
+ definePluginCreator as definePluginCreator2,
204
+ VariableEngine
205
+ } from "@flowgram.ai/editor";
206
+ var createDisableDeclarationPlugin = definePluginCreator2({
207
+ onInit(ctx) {
208
+ const variableEngine = ctx.get(VariableEngine);
209
+ const handleEvent = (action) => {
210
+ if (ASTMatch.isVariableDeclaration(action.ast)) {
211
+ if (!action.ast.meta?.disabled) {
212
+ action.ast.updateMeta({
213
+ ...action.ast.meta || {},
214
+ disabled: true
215
+ });
216
+ }
217
+ }
218
+ };
219
+ variableEngine.onGlobalEvent("NewAST", handleEvent);
220
+ variableEngine.onGlobalEvent("UpdateAST", handleEvent);
221
+ }
222
+ });
223
+
224
+ // src/components/variable-selector/use-variable-tree.tsx
225
+ import React9, { useCallback } from "react";
226
+ import { JsonSchemaUtils as JsonSchemaUtils2 } from "@flowgram.ai/json-schema";
227
+ import { ASTMatch as ASTMatch2, useAvailableVariables } from "@flowgram.ai/editor";
228
+ import { Icon } from "@douyinfe/semi-ui";
229
+ function useVariableTree(params) {
230
+ const { includeSchema, excludeSchema, customSkip } = params;
231
+ const typeManager = useTypeManager();
232
+ const variables = useAvailableVariables();
233
+ const getVariableTypeIcon = useCallback((variable) => {
234
+ if (variable.meta?.icon) {
235
+ if (typeof variable.meta.icon === "string") {
236
+ return /* @__PURE__ */ React9.createElement("img", { style: { marginRight: 8 }, width: 12, height: 12, src: variable.meta.icon });
237
+ }
238
+ return variable.meta.icon;
239
+ }
240
+ const schema = JsonSchemaUtils2.astToSchema(variable.type, { drilldownObject: false });
241
+ return /* @__PURE__ */ React9.createElement(Icon, { size: "small", svg: typeManager.getDisplayIcon(schema || {}) });
242
+ }, []);
243
+ const renderVariable = (variable, parentFields = []) => {
244
+ let type = variable?.type;
245
+ if (!type) {
246
+ return null;
247
+ }
248
+ let children;
249
+ if (ASTMatch2.isObject(type)) {
250
+ children = (type.properties || []).map((_property) => renderVariable(_property, [...parentFields, variable])).filter(Boolean);
251
+ }
252
+ const keyPath = [...parentFields.map((_field) => _field.key), variable.key];
253
+ const key = keyPath.join(".");
254
+ const isSchemaInclude = includeSchema ? JsonSchemaUtils2.isASTMatchSchema(type, includeSchema) : true;
255
+ const isSchemaExclude = excludeSchema ? JsonSchemaUtils2.isASTMatchSchema(type, excludeSchema) : false;
256
+ const isCustomSkip = customSkip ? customSkip(variable) : false;
257
+ const isMetaDisabled = variable.meta?.disabled;
258
+ const isSchemaMatch = isSchemaInclude && !isSchemaExclude && !isCustomSkip && !isMetaDisabled;
259
+ if (!isSchemaMatch && !children?.length) {
260
+ return null;
261
+ }
262
+ return {
263
+ key,
264
+ label: variable.meta?.title || variable.key,
265
+ value: key,
266
+ keyPath,
267
+ icon: getVariableTypeIcon(variable),
268
+ children,
269
+ disabled: !isSchemaMatch,
270
+ rootMeta: parentFields[0]?.meta || variable.meta,
271
+ isRoot: !parentFields?.length
272
+ };
273
+ };
274
+ return [...variables.slice(0).reverse()].map((_variable) => renderVariable(_variable)).filter(Boolean);
275
+ }
276
+
277
+ // src/components/variable-selector/index.tsx
278
+ import React10, { useMemo } from "react";
279
+ import { I18n as I18n7 } from "@flowgram.ai/editor";
280
+ import { Popover } from "@douyinfe/semi-ui";
281
+ import { IconChevronDownStroked, IconIssueStroked } from "@douyinfe/semi-icons";
282
+
283
+ // src/components/variable-selector/styles.tsx
284
+ import styled2, { css } from "styled-components";
285
+ import { Tag, TreeSelect } from "@douyinfe/semi-ui";
286
+ var UIRootTitle = styled2.div`
287
+ margin-right: 4px;
288
+ min-width: 20px;
289
+ overflow: hidden;
290
+ text-overflow: ellipsis;
291
+ white-space: nowrap;
292
+ color: var(--semi-color-text-2);
293
+ `;
294
+ var UIVarName = styled2.div`
295
+ overflow: hidden;
296
+ text-overflow: ellipsis;
297
+ white-space: nowrap;
298
+
299
+ ${({ $inSelector }) => $inSelector && css`
300
+ min-width: 50%;
301
+ `}
302
+ `;
303
+ var UITag = styled2(Tag)`
304
+ width: 100%;
305
+ display: flex;
306
+ align-items: center;
307
+ justify-content: flex-start;
308
+
309
+ & .semi-tag-content-center {
310
+ justify-content: flex-start;
311
+ }
312
+
313
+ &.semi-tag {
314
+ margin: 0;
315
+ height: 22px;
316
+ }
317
+ `;
318
+ var UITreeSelect = styled2(TreeSelect)`
319
+ outline: ${({ $error }) => $error ? "1px solid red" : "none"};
320
+
321
+ & .semi-tree-select-selection {
322
+ padding: 0px;
323
+ height: 22px;
324
+ }
325
+
326
+ & .semi-tree-select-selection-content {
327
+ width: 100%;
328
+ }
329
+
330
+ & .semi-tree-select-selection-placeholder {
331
+ padding-left: 10px;
332
+ }
333
+ `;
334
+ var UIPopoverContent = styled2.div`
335
+ padding: 10px;
336
+ display: inline-flex;
337
+ align-items: center;
338
+ justify-content: flex-start;
339
+ white-space: nowrap;
340
+ `;
341
+
342
+ // src/components/variable-selector/index.tsx
343
+ var VariableSelector = ({
344
+ value,
345
+ config = {},
346
+ onChange,
347
+ style,
348
+ readonly = false,
349
+ includeSchema,
350
+ excludeSchema,
351
+ hasError,
352
+ triggerRender
353
+ }) => {
354
+ const treeData = useVariableTree({ includeSchema, excludeSchema });
355
+ const treeValue = useMemo(() => {
356
+ if (typeof value === "string") {
357
+ console.warn(
358
+ "The Value of VariableSelector is a string, it should be an ARRAY. \n",
359
+ "Please check the value of VariableSelector \n"
360
+ );
361
+ return value;
362
+ }
363
+ return value?.join(".");
364
+ }, [value]);
365
+ const renderIcon = (icon) => {
366
+ if (typeof icon === "string") {
367
+ return /* @__PURE__ */ React10.createElement("img", { style: { marginRight: 8 }, width: 12, height: 12, src: icon });
368
+ }
369
+ return icon;
370
+ };
371
+ return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
372
+ UITreeSelect,
373
+ {
374
+ dropdownMatchSelectWidth: false,
375
+ disabled: readonly,
376
+ treeData,
377
+ size: "small",
378
+ value: treeValue,
379
+ clearIcon: null,
380
+ $error: hasError,
381
+ style,
382
+ validateStatus: hasError ? "error" : void 0,
383
+ onChange: (_, _config) => {
384
+ onChange(_config.keyPath);
385
+ },
386
+ renderSelectedItem: (_option) => {
387
+ if (!_option?.keyPath) {
388
+ return /* @__PURE__ */ React10.createElement(
389
+ UITag,
390
+ {
391
+ prefixIcon: /* @__PURE__ */ React10.createElement(IconIssueStroked, null),
392
+ color: "amber",
393
+ closable: !readonly,
394
+ onClose: () => onChange(void 0)
395
+ },
396
+ config?.notFoundContent ?? "Undefined"
397
+ );
398
+ }
399
+ const rootIcon = renderIcon(_option.rootMeta?.icon || _option?.icon);
400
+ const rootTitle = /* @__PURE__ */ React10.createElement(UIRootTitle, null, _option.rootMeta?.title ? `${_option.rootMeta?.title} ${_option.isRoot ? "" : "-"} ` : null);
401
+ return /* @__PURE__ */ React10.createElement("div", null, /* @__PURE__ */ React10.createElement(
402
+ Popover,
403
+ {
404
+ content: /* @__PURE__ */ React10.createElement(UIPopoverContent, null, rootIcon, rootTitle, /* @__PURE__ */ React10.createElement(UIVarName, null, _option.keyPath.slice(1).join(".")))
405
+ },
406
+ /* @__PURE__ */ React10.createElement(
407
+ UITag,
408
+ {
409
+ prefixIcon: rootIcon,
410
+ closable: !readonly,
411
+ onClose: () => onChange(void 0)
412
+ },
413
+ rootTitle,
414
+ !_option.isRoot && /* @__PURE__ */ React10.createElement(UIVarName, { $inSelector: true }, _option.label)
415
+ )
416
+ ));
417
+ },
418
+ showClear: false,
419
+ arrowIcon: /* @__PURE__ */ React10.createElement(IconChevronDownStroked, { size: "small" }),
420
+ triggerRender,
421
+ placeholder: config?.placeholder ?? I18n7.t("Select Variable")
422
+ }
423
+ ));
424
+ };
425
+ VariableSelector.renderKey = "variable-selector-render-key";
426
+ var InjectVariableSelector = createInjectMaterial(VariableSelector);
427
+
428
+ export {
429
+ CodeEditor,
430
+ CodeEditorMini,
431
+ createTypePresetPlugin,
432
+ JsonSchemaUtils,
433
+ useTypeManager,
434
+ JsonSchemaTypePresetProvider,
435
+ createDisableDeclarationPlugin,
436
+ useVariableTree,
437
+ VariableSelector,
438
+ InjectVariableSelector
439
+ };
440
+ //# sourceMappingURL=chunk-G4HQ7OSI.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/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/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 { lazy } from 'react';\n\nexport const CodeEditor = lazy(() =>\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 { booleanRegistry } from './boolean';\nimport { arrayRegistry } from './array';\n\nexport const jsonSchemaTypePreset = [\n stringRegistry,\n objectRegistry,\n numberRegistry,\n integerRegistry,\n booleanRegistry,\n arrayRegistry,\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 { 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 customSkip?: (variable: VariableField) => boolean;\n}): TreeNodeData[] {\n const { includeSchema, excludeSchema, customSkip } = 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 = customSkip ? customSkip(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, { 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';\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 treeData = useVariableTree({ includeSchema, excludeSchema });\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","/**\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":";;;;;AAKA,SAAS,YAAY;AAEd,IAAM,aAAa;AAAA,EAAK,MAC7B,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,QACZ,WAAW;AAAA,QACX,GAAI,MAAM,WAAW,CAAC;AAAA,MACxB;AAAA;AAAA,EACF,CACF;AAEJ;;;ACzBA;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,2BAA2B;;;ACLpC,SAAS,6BAA6B;;;ACCtC,OAAOA,YAAW;AAElB,SAAS,YAAY;AACrB,SAAS,OAAO,gBAAgB;AAIzB,IAAM,iBAAkD;AAAA,EAC7D,MAAM;AAAA,EACN,kBAAkB,CAAC,UACjB,OAAO,qBACL,gBAAAA,OAAA;AAAA,IAAC;AAAA;AAAA,MACC,UAAQ;AAAA,MACR,MA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AAG,MACvD,IACN;AAGF,eACE,gBAAAA,QAAA,cAAC,aACC,gBAAAA,QAAA;AAAA,UAAC;AAAA;AAAA,YACC,SACE,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","I18n","value","React","I18n","React","I18n","React","React","definePluginCreator","React","JsonSchemaUtils","ASTMatch","React","JsonSchemaUtils","ASTMatch","React","I18n","styled","React","I18n"]}