@flowgram.ai/form-materials 0.1.0-alpha.10

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 (100) hide show
  1. package/bin/index.ts +99 -0
  2. package/bin/materials.ts +156 -0
  3. package/bin/project.ts +91 -0
  4. package/dist/esm/index.js +3303 -0
  5. package/dist/esm/index.js.map +1 -0
  6. package/dist/index.d.mts +495 -0
  7. package/dist/index.d.ts +495 -0
  8. package/dist/index.js +3299 -0
  9. package/dist/index.js.map +1 -0
  10. package/package.json +75 -0
  11. package/src/components/batch-outputs/config.json +12 -0
  12. package/src/components/batch-outputs/index.tsx +61 -0
  13. package/src/components/batch-outputs/styles.tsx +19 -0
  14. package/src/components/batch-outputs/types.ts +22 -0
  15. package/src/components/batch-outputs/use-list.ts +86 -0
  16. package/src/components/batch-variable-selector/config.json +5 -0
  17. package/src/components/batch-variable-selector/index.tsx +24 -0
  18. package/src/components/code-editor/config.json +9 -0
  19. package/src/components/code-editor/index.tsx +74 -0
  20. package/src/components/code-editor/language-features.ts +24 -0
  21. package/src/components/code-editor/theme/dark.ts +119 -0
  22. package/src/components/code-editor/theme/index.ts +12 -0
  23. package/src/components/code-editor/theme/light.ts +119 -0
  24. package/src/components/code-editor/utils.ts +20 -0
  25. package/src/components/condition-row/config.json +5 -0
  26. package/src/components/condition-row/constants.ts +128 -0
  27. package/src/components/condition-row/hooks/useOp.tsx +50 -0
  28. package/src/components/condition-row/hooks/useRule.ts +31 -0
  29. package/src/components/condition-row/index.tsx +81 -0
  30. package/src/components/condition-row/styles.tsx +30 -0
  31. package/src/components/condition-row/types.ts +42 -0
  32. package/src/components/constant-input/config.json +6 -0
  33. package/src/components/constant-input/index.tsx +86 -0
  34. package/src/components/constant-input/types.ts +23 -0
  35. package/src/components/dynamic-value-input/config.json +5 -0
  36. package/src/components/dynamic-value-input/index.tsx +92 -0
  37. package/src/components/dynamic-value-input/styles.tsx +26 -0
  38. package/src/components/index.ts +18 -0
  39. package/src/components/json-editor-with-variables/config.json +13 -0
  40. package/src/components/json-editor-with-variables/extensions/variable-tag.tsx +173 -0
  41. package/src/components/json-editor-with-variables/extensions/variable-tree.tsx +83 -0
  42. package/src/components/json-editor-with-variables/index.tsx +19 -0
  43. package/src/components/json-editor-with-variables/styles.tsx +44 -0
  44. package/src/components/json-schema-editor/components/blur-input.tsx +27 -0
  45. package/src/components/json-schema-editor/config.json +13 -0
  46. package/src/components/json-schema-editor/default-value.tsx +135 -0
  47. package/src/components/json-schema-editor/hooks.tsx +166 -0
  48. package/src/components/json-schema-editor/index.tsx +267 -0
  49. package/src/components/json-schema-editor/styles.tsx +240 -0
  50. package/src/components/json-schema-editor/types.ts +26 -0
  51. package/src/components/json-schema-editor/utils.ts +29 -0
  52. package/src/components/prompt-editor/config.json +9 -0
  53. package/src/components/prompt-editor/extensions/jinja.tsx +58 -0
  54. package/src/components/prompt-editor/extensions/language-support.tsx +19 -0
  55. package/src/components/prompt-editor/extensions/markdown.tsx +75 -0
  56. package/src/components/prompt-editor/index.tsx +68 -0
  57. package/src/components/prompt-editor/styles.tsx +18 -0
  58. package/src/components/prompt-editor/types.tsx +18 -0
  59. package/src/components/prompt-editor-with-inputs/config.json +13 -0
  60. package/src/components/prompt-editor-with-inputs/extensions/inputs-tree.tsx +82 -0
  61. package/src/components/prompt-editor-with-inputs/index.tsx +22 -0
  62. package/src/components/prompt-editor-with-inputs/inputs-picker.tsx +100 -0
  63. package/src/components/prompt-editor-with-variables/config.json +13 -0
  64. package/src/components/prompt-editor-with-variables/extensions/variable-tag.tsx +179 -0
  65. package/src/components/prompt-editor-with-variables/extensions/variable-tree.tsx +83 -0
  66. package/src/components/prompt-editor-with-variables/index.tsx +19 -0
  67. package/src/components/prompt-editor-with-variables/styles.tsx +44 -0
  68. package/src/components/type-selector/config.json +5 -0
  69. package/src/components/type-selector/constants.tsx +364 -0
  70. package/src/components/type-selector/index.tsx +62 -0
  71. package/src/components/variable-selector/config.json +5 -0
  72. package/src/components/variable-selector/index.tsx +116 -0
  73. package/src/components/variable-selector/styles.tsx +59 -0
  74. package/src/components/variable-selector/use-variable-tree.tsx +103 -0
  75. package/src/effects/auto-rename-ref/config.json +5 -0
  76. package/src/effects/auto-rename-ref/index.ts +109 -0
  77. package/src/effects/index.ts +10 -0
  78. package/src/effects/provide-batch-input/config.json +5 -0
  79. package/src/effects/provide-batch-input/index.ts +43 -0
  80. package/src/effects/provide-batch-outputs/config.json +5 -0
  81. package/src/effects/provide-batch-outputs/index.ts +38 -0
  82. package/src/effects/provide-json-schema-outputs/config.json +8 -0
  83. package/src/effects/provide-json-schema-outputs/index.ts +28 -0
  84. package/src/effects/sync-variable-title/config.json +5 -0
  85. package/src/effects/sync-variable-title/index.ts +28 -0
  86. package/src/form-plugins/batch-outputs-plugin/config.json +7 -0
  87. package/src/form-plugins/batch-outputs-plugin/index.ts +104 -0
  88. package/src/form-plugins/index.ts +6 -0
  89. package/src/index.ts +10 -0
  90. package/src/typings/flow-value/config.json +5 -0
  91. package/src/typings/flow-value/index.ts +32 -0
  92. package/src/typings/index.ts +7 -0
  93. package/src/typings/json-schema/config.json +5 -0
  94. package/src/typings/json-schema/index.ts +36 -0
  95. package/src/utils/format-legacy-refs/config.json +5 -0
  96. package/src/utils/format-legacy-refs/index.ts +158 -0
  97. package/src/utils/format-legacy-refs/readme.md +38 -0
  98. package/src/utils/index.ts +7 -0
  99. package/src/utils/json-schema/config.json +5 -0
  100. package/src/utils/json-schema/index.ts +180 -0
@@ -0,0 +1,495 @@
1
+ import React$1 from 'react';
2
+ import { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
3
+ import { EffectOptions, ASTNodeJSON, ASTNode, BaseType, FormPluginCreator } from '@flowgram.ai/editor';
4
+ import { TreeNodeData } from '@douyinfe/semi-ui/lib/es/tree';
5
+
6
+ /**
7
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
8
+ * SPDX-License-Identifier: MIT
9
+ */
10
+ type JsonSchemaBasicType = 'boolean' | 'string' | 'integer' | 'number' | 'object' | 'array' | 'map';
11
+ interface IJsonSchema<T = string> {
12
+ type?: T;
13
+ default?: any;
14
+ title?: string;
15
+ description?: string;
16
+ enum?: (string | number)[];
17
+ properties?: Record<string, IJsonSchema<T>>;
18
+ additionalProperties?: IJsonSchema<T>;
19
+ items?: IJsonSchema<T>;
20
+ required?: string[];
21
+ $ref?: string;
22
+ extra?: {
23
+ index?: number;
24
+ weak?: boolean;
25
+ formComponent?: string;
26
+ [key: string]: any;
27
+ };
28
+ }
29
+ type IBasicJsonSchema = IJsonSchema<JsonSchemaBasicType>;
30
+
31
+ /**
32
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
33
+ * SPDX-License-Identifier: MIT
34
+ */
35
+
36
+ declare function useVariableTree(params: {
37
+ includeSchema?: IJsonSchema | IJsonSchema[];
38
+ excludeSchema?: IJsonSchema | IJsonSchema[];
39
+ }): TreeNodeData[];
40
+
41
+ /**
42
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
43
+ * SPDX-License-Identifier: MIT
44
+ */
45
+
46
+ interface PropTypes$2 {
47
+ value?: string[];
48
+ config?: {
49
+ placeholder?: string;
50
+ notFoundContent?: string;
51
+ };
52
+ onChange: (value?: string[]) => void;
53
+ includeSchema?: IJsonSchema | IJsonSchema[];
54
+ excludeSchema?: IJsonSchema | IJsonSchema[];
55
+ readonly?: boolean;
56
+ hasError?: boolean;
57
+ style?: React$1.CSSProperties;
58
+ triggerRender?: (props: TriggerRenderProps) => React$1.ReactNode;
59
+ }
60
+ type VariableSelectorProps = PropTypes$2;
61
+
62
+ declare const VariableSelector: ({ value, config, onChange, style, readonly, includeSchema, excludeSchema, hasError, triggerRender, }: PropTypes$2) => React$1.JSX.Element;
63
+
64
+ /**
65
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
66
+ * SPDX-License-Identifier: MIT
67
+ */
68
+ interface IFlowConstantValue {
69
+ type: 'constant';
70
+ content?: string | number | boolean;
71
+ }
72
+ interface IFlowRefValue {
73
+ type: 'ref';
74
+ content?: string[];
75
+ }
76
+ interface IFlowExpressionValue {
77
+ type: 'expression';
78
+ content?: string;
79
+ }
80
+ interface IFlowTemplateValue {
81
+ type: 'template';
82
+ content?: string;
83
+ }
84
+ type IFlowValue = IFlowConstantValue | IFlowRefValue | IFlowExpressionValue | IFlowTemplateValue;
85
+ type IFlowConstantRefValue = IFlowConstantValue | IFlowRefValue;
86
+
87
+ /**
88
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
89
+ * SPDX-License-Identifier: MIT
90
+ */
91
+
92
+ declare const VariableTypeIcons: {
93
+ [key: string]: React$1.ReactNode;
94
+ };
95
+ declare const ArrayIcons: {
96
+ [key: string]: React$1.ReactNode;
97
+ };
98
+ declare const getSchemaIcon: (value?: Partial<IJsonSchema>) => React$1.ReactNode;
99
+
100
+ /**
101
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
102
+ * SPDX-License-Identifier: MIT
103
+ */
104
+
105
+ interface PropTypes$1 {
106
+ value?: Partial<IJsonSchema>;
107
+ onChange: (value?: Partial<IJsonSchema>) => void;
108
+ disabled?: boolean;
109
+ style?: React$1.CSSProperties;
110
+ }
111
+ declare const getTypeSelectValue: (value?: Partial<IJsonSchema>) => string[] | undefined;
112
+ declare const parseTypeSelectValue: (value?: string[]) => Partial<IJsonSchema> | undefined;
113
+ declare function TypeSelector(props: PropTypes$1): React$1.JSX.Element;
114
+
115
+ /**
116
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
117
+ * SPDX-License-Identifier: MIT
118
+ */
119
+
120
+ interface ConfigType {
121
+ placeholder?: string;
122
+ descTitle?: string;
123
+ descPlaceholder?: string;
124
+ defaultValueTitle?: string;
125
+ defaultValuePlaceholder?: string;
126
+ addButtonText?: string;
127
+ jsonFormatText?: string;
128
+ }
129
+
130
+ /**
131
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
132
+ * SPDX-License-Identifier: MIT
133
+ */
134
+
135
+ declare function JsonSchemaEditor(props: {
136
+ value?: IJsonSchema;
137
+ onChange?: (value: IJsonSchema) => void;
138
+ config?: ConfigType;
139
+ className?: string;
140
+ }): React$1.JSX.Element;
141
+
142
+ /**
143
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
144
+ * SPDX-License-Identifier: MIT
145
+ */
146
+
147
+ declare function BatchVariableSelector(props: VariableSelectorProps): React$1.JSX.Element;
148
+
149
+ /**
150
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
151
+ * SPDX-License-Identifier: MIT
152
+ */
153
+
154
+ interface Strategy<Value = any> {
155
+ hit: (schema: IJsonSchema) => boolean;
156
+ Renderer: React.FC<RendererProps<Value>>;
157
+ }
158
+ interface RendererProps<Value = any> {
159
+ value?: Value;
160
+ onChange?: (value: Value) => void;
161
+ readonly?: boolean;
162
+ }
163
+ interface PropsType$4 extends RendererProps {
164
+ schema: IJsonSchema;
165
+ strategies?: Strategy[];
166
+ [key: string]: any;
167
+ }
168
+
169
+ /**
170
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
171
+ * SPDX-License-Identifier: MIT
172
+ */
173
+
174
+ declare function ConstantInput(props: PropsType$4): React$1.JSX.Element;
175
+
176
+ /**
177
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
178
+ * SPDX-License-Identifier: MIT
179
+ */
180
+
181
+ interface PropsType$3 {
182
+ value?: IFlowConstantRefValue;
183
+ onChange: (value?: IFlowConstantRefValue) => void;
184
+ readonly?: boolean;
185
+ hasError?: boolean;
186
+ style?: React$1.CSSProperties;
187
+ schema?: IJsonSchema;
188
+ constantProps?: {
189
+ strategies?: Strategy[];
190
+ schema?: IJsonSchema;
191
+ [key: string]: any;
192
+ };
193
+ }
194
+ declare function DynamicValueInput({ value, onChange, readonly, style, schema, constantProps, }: PropsType$3): React$1.JSX.Element;
195
+
196
+ /**
197
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
198
+ * SPDX-License-Identifier: MIT
199
+ */
200
+
201
+ declare enum Op {
202
+ EQ = "eq",
203
+ NEQ = "neq",
204
+ GT = "gt",
205
+ GTE = "gte",
206
+ LT = "lt",
207
+ LTE = "lte",
208
+ IN = "in",
209
+ NIN = "nin",
210
+ CONTAINS = "contains",
211
+ NOT_CONTAINS = "not_contains",
212
+ IS_EMPTY = "is_empty",
213
+ IS_NOT_EMPTY = "is_not_empty",
214
+ IS_TRUE = "is_true",
215
+ IS_FALSE = "is_false"
216
+ }
217
+ interface ConditionRowValueType {
218
+ left?: IFlowRefValue;
219
+ operator?: Op;
220
+ right?: IFlowConstantRefValue;
221
+ }
222
+
223
+ /**
224
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
225
+ * SPDX-License-Identifier: MIT
226
+ */
227
+
228
+ interface PropTypes {
229
+ value?: ConditionRowValueType;
230
+ onChange: (value?: ConditionRowValueType) => void;
231
+ style?: React$1.CSSProperties;
232
+ readonly?: boolean;
233
+ }
234
+ declare function ConditionRow({ style, value, onChange, readonly }: PropTypes): React$1.JSX.Element;
235
+
236
+ /**
237
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
238
+ * SPDX-License-Identifier: MIT
239
+ */
240
+
241
+ type ValueType = Record<string, IFlowRefValue | undefined>;
242
+ interface PropsType$2 {
243
+ value?: ValueType;
244
+ onChange: (value?: ValueType) => void;
245
+ readonly?: boolean;
246
+ hasError?: boolean;
247
+ style?: React.CSSProperties;
248
+ }
249
+
250
+ /**
251
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
252
+ * SPDX-License-Identifier: MIT
253
+ */
254
+
255
+ declare function BatchOutputs(props: PropsType$2): React$1.JSX.Element;
256
+
257
+ /**
258
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
259
+ * SPDX-License-Identifier: MIT
260
+ */
261
+
262
+ type PropsType$1 = React$1.PropsWithChildren<{
263
+ value?: IFlowTemplateValue;
264
+ onChange: (value?: IFlowTemplateValue) => void;
265
+ readonly?: boolean;
266
+ hasError?: boolean;
267
+ placeholder?: string;
268
+ activeLinePlaceholder?: string;
269
+ style?: React$1.CSSProperties;
270
+ }>;
271
+
272
+ /**
273
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
274
+ * SPDX-License-Identifier: MIT
275
+ */
276
+
277
+ type PromptEditorPropsType = PropsType$1;
278
+ declare function PromptEditor(props: PropsType$1): React$1.JSX.Element;
279
+
280
+ /**
281
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
282
+ * SPDX-License-Identifier: MIT
283
+ */
284
+
285
+ declare function PromptEditorWithVariables(props: PromptEditorPropsType): React$1.JSX.Element;
286
+
287
+ /**
288
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
289
+ * SPDX-License-Identifier: MIT
290
+ */
291
+
292
+ interface PropsType extends PromptEditorPropsType {
293
+ inputsValues: Record<string, IFlowValue>;
294
+ }
295
+ declare function PromptEditorWithInputs({ inputsValues, ...restProps }: PropsType): React$1.JSX.Element;
296
+
297
+ /**
298
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
299
+ * SPDX-License-Identifier: MIT
300
+ */
301
+
302
+ interface CodeEditorPropsType extends React$1.PropsWithChildren<{}> {
303
+ value?: string;
304
+ onChange?: (value: string) => void;
305
+ languageId: 'python' | 'typescript' | 'shell' | 'json';
306
+ theme?: 'dark' | 'light';
307
+ placeholder?: string;
308
+ activeLinePlaceholder?: string;
309
+ }
310
+ declare function CodeEditor({ value, onChange, languageId, theme, children, placeholder, activeLinePlaceholder, }: CodeEditorPropsType): React$1.JSX.Element;
311
+
312
+ /**
313
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
314
+ * SPDX-License-Identifier: MIT
315
+ */
316
+
317
+ declare function JsonEditorWithVariables(props: Omit<CodeEditorPropsType, 'languageId'>): React$1.JSX.Element;
318
+
319
+ /**
320
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
321
+ * SPDX-License-Identifier: MIT
322
+ */
323
+
324
+ declare const provideBatchInputEffect: EffectOptions[];
325
+
326
+ /**
327
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
328
+ * SPDX-License-Identifier: MIT
329
+ */
330
+
331
+ declare const provideBatchOutputsEffect: EffectOptions[];
332
+
333
+ /**
334
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
335
+ * SPDX-License-Identifier: MIT
336
+ */
337
+
338
+ /**
339
+ * Auto rename ref when form item's key is renamed
340
+ *
341
+ * Example:
342
+ *
343
+ * formMeta: {
344
+ * effects: {
345
+ * "inputsValues": autoRenameRefEffect,
346
+ * }
347
+ * }
348
+ */
349
+ declare const autoRenameRefEffect: EffectOptions[];
350
+
351
+ /**
352
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
353
+ * SPDX-License-Identifier: MIT
354
+ */
355
+
356
+ declare const provideJsonSchemaOutputs: EffectOptions[];
357
+
358
+ /**
359
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
360
+ * SPDX-License-Identifier: MIT
361
+ */
362
+
363
+ declare const syncVariableTitle: EffectOptions[];
364
+
365
+ /**
366
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
367
+ * SPDX-License-Identifier: MIT
368
+ */
369
+ interface LegacyFlowRefValueSchema {
370
+ type: 'ref';
371
+ content: string;
372
+ }
373
+ interface NewFlowRefValueSchema {
374
+ type: 'ref';
375
+ content: string[];
376
+ }
377
+ /**
378
+ * In flowgram 0.2.0, for introducing Loop variable functionality,
379
+ * the FlowRefValueSchema type definition is updated:
380
+ *
381
+ * interface LegacyFlowRefValueSchema {
382
+ * type: 'ref';
383
+ * content: string;
384
+ * }
385
+ *
386
+ * interface NewFlowRefValueSchema {
387
+ * type: 'ref';
388
+ * content: string[];
389
+ * }
390
+ *
391
+ *
392
+ * For making sure backend json will not be changed, we provide format legacy ref utils for updating the formData
393
+ *
394
+ * How to use:
395
+ *
396
+ * 1. Call formatLegacyRefOnSubmit on the formData before submitting
397
+ * 2. Call formatLegacyRefOnInit on the formData after submitting
398
+ *
399
+ * Example:
400
+ * import { formatLegacyRefOnSubmit, formatLegacyRefOnInit } from '@flowgram.ai/form-materials';
401
+ * formMeta: {
402
+ * formatOnSubmit: (data) => formatLegacyRefOnSubmit(data),
403
+ * formatOnInit: (data) => formatLegacyRefOnInit(data),
404
+ * }
405
+ */
406
+ declare function formatLegacyRefOnSubmit(value: any): any;
407
+ /**
408
+ * In flowgram 0.2.0, for introducing Loop variable functionality,
409
+ * the FlowRefValueSchema type definition is updated:
410
+ *
411
+ * interface LegacyFlowRefValueSchema {
412
+ * type: 'ref';
413
+ * content: string;
414
+ * }
415
+ *
416
+ * interface NewFlowRefValueSchema {
417
+ * type: 'ref';
418
+ * content: string[];
419
+ * }
420
+ *
421
+ *
422
+ * For making sure backend json will not be changed, we provide format legacy ref utils for updating the formData
423
+ *
424
+ * How to use:
425
+ *
426
+ * 1. Call formatLegacyRefOnSubmit on the formData before submitting
427
+ * 2. Call formatLegacyRefOnInit on the formData after submitting
428
+ *
429
+ * Example:
430
+ * import { formatLegacyRefOnSubmit, formatLegacyRefOnInit } from '@flowgram.ai/form-materials';
431
+ *
432
+ * formMeta: {
433
+ * formatOnSubmit: (data) => formatLegacyRefOnSubmit(data),
434
+ * formatOnInit: (data) => formatLegacyRefOnInit(data),
435
+ * }
436
+ */
437
+ declare function formatLegacyRefOnInit(value: any): any;
438
+ declare function isLegacyFlowRefValueSchema(value: any): value is LegacyFlowRefValueSchema;
439
+ declare function isNewFlowRefValueSchema(value: any): value is NewFlowRefValueSchema;
440
+ declare function formatLegacyRefToNewRef(value: LegacyFlowRefValueSchema): {
441
+ type: string;
442
+ content: string[];
443
+ };
444
+ declare function formatNewRefToLegacyRef(value: NewFlowRefValueSchema): {
445
+ type: string;
446
+ content: string;
447
+ };
448
+
449
+ /**
450
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
451
+ * SPDX-License-Identifier: MIT
452
+ */
453
+
454
+ declare namespace JsonSchemaUtils {
455
+ /**
456
+ * Converts a JSON schema to an Abstract Syntax Tree (AST) representation.
457
+ * This function recursively processes the JSON schema and creates corresponding AST nodes.
458
+ *
459
+ * For more information on JSON Schema, refer to the official documentation:
460
+ * https://json-schema.org/
461
+ *
462
+ * @param jsonSchema - The JSON schema to convert.
463
+ * @returns An AST node representing the JSON schema, or undefined if the schema type is not recognized.
464
+ */
465
+ function schemaToAST(jsonSchema: IJsonSchema): ASTNodeJSON | undefined;
466
+ /**
467
+ * Convert AST To JSON Schema
468
+ * @param typeAST
469
+ * @returns
470
+ */
471
+ function astToSchema(typeAST: ASTNode, options?: {
472
+ drilldown?: boolean;
473
+ }): IJsonSchema | undefined;
474
+ /**
475
+ * Check if the AST type is match the JSON Schema
476
+ * @param typeAST
477
+ * @param schema
478
+ * @returns
479
+ */
480
+ function isASTMatchSchema(typeAST: BaseType, schema: IJsonSchema | IJsonSchema[]): boolean;
481
+ }
482
+
483
+ /**
484
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
485
+ * SPDX-License-Identifier: MIT
486
+ */
487
+
488
+ /**
489
+ * Free Layout only right now
490
+ */
491
+ declare const createBatchOutputsFormPlugin: FormPluginCreator<{
492
+ outputKey: string;
493
+ }>;
494
+
495
+ export { ArrayIcons, BatchOutputs, BatchVariableSelector, CodeEditor, type CodeEditorPropsType, ConditionRow, type ConditionRowValueType, ConstantInput, DynamicValueInput, type IBasicJsonSchema, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IJsonSchema, JsonEditorWithVariables, type JsonSchemaBasicType, JsonSchemaEditor, JsonSchemaUtils, PromptEditor, type PromptEditorPropsType, PromptEditorWithInputs, PromptEditorWithVariables, TypeSelector, VariableSelector, type VariableSelectorProps, VariableTypeIcons, autoRenameRefEffect, createBatchOutputsFormPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getSchemaIcon, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, parseTypeSelectValue, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, useVariableTree };