@flowgram.ai/form-materials 0.2.16 → 0.2.18

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 (64) hide show
  1. package/bin/materials.ts +6 -1
  2. package/bin/project.ts +5 -0
  3. package/dist/esm/index.js +462 -14
  4. package/dist/esm/index.js.map +1 -1
  5. package/dist/index.d.mts +177 -6
  6. package/dist/index.d.ts +177 -6
  7. package/dist/index.js +482 -43
  8. package/dist/index.js.map +1 -1
  9. package/package.json +6 -4
  10. package/src/components/batch-outputs/config.json +12 -0
  11. package/src/components/batch-outputs/index.tsx +61 -0
  12. package/src/components/batch-outputs/styles.tsx +19 -0
  13. package/src/components/batch-outputs/types.ts +22 -0
  14. package/src/components/batch-outputs/use-list.ts +86 -0
  15. package/src/components/batch-variable-selector/index.tsx +5 -0
  16. package/src/components/condition-row/constants.ts +5 -0
  17. package/src/components/condition-row/hooks/useOp.tsx +5 -0
  18. package/src/components/condition-row/hooks/useRule.ts +5 -0
  19. package/src/components/condition-row/index.tsx +5 -0
  20. package/src/components/condition-row/styles.tsx +5 -0
  21. package/src/components/condition-row/types.ts +5 -0
  22. package/src/components/constant-input/index.tsx +5 -0
  23. package/src/components/constant-input/types.ts +5 -0
  24. package/src/components/dynamic-value-input/index.tsx +7 -0
  25. package/src/components/dynamic-value-input/styles.tsx +7 -0
  26. package/src/components/index.ts +8 -0
  27. package/src/components/json-schema-editor/components/blur-input.tsx +5 -0
  28. package/src/components/json-schema-editor/default-value.tsx +5 -0
  29. package/src/components/json-schema-editor/hooks.tsx +5 -0
  30. package/src/components/json-schema-editor/index.tsx +5 -0
  31. package/src/components/json-schema-editor/styles.tsx +5 -0
  32. package/src/components/json-schema-editor/types.ts +5 -0
  33. package/src/components/json-schema-editor/utils.ts +5 -0
  34. package/src/components/prompt-editor/config.json +9 -0
  35. package/src/components/prompt-editor/extensions/jinja.tsx +58 -0
  36. package/src/components/prompt-editor/extensions/language-support.tsx +19 -0
  37. package/src/components/prompt-editor/extensions/markdown.tsx +75 -0
  38. package/src/components/prompt-editor/index.tsx +43 -0
  39. package/src/components/prompt-editor/styles.tsx +18 -0
  40. package/src/components/prompt-editor/types.tsx +16 -0
  41. package/src/components/prompt-editor-with-variables/config.json +10 -0
  42. package/src/components/prompt-editor-with-variables/extensions/variable.tsx +85 -0
  43. package/src/components/prompt-editor-with-variables/index.tsx +17 -0
  44. package/src/components/type-selector/constants.tsx +5 -0
  45. package/src/components/type-selector/index.tsx +5 -0
  46. package/src/components/variable-selector/index.tsx +9 -2
  47. package/src/components/variable-selector/styles.tsx +17 -1
  48. package/src/components/variable-selector/use-variable-tree.tsx +8 -3
  49. package/src/effects/auto-rename-ref/index.ts +5 -0
  50. package/src/effects/index.ts +5 -0
  51. package/src/effects/provide-batch-input/index.ts +5 -0
  52. package/src/effects/provide-batch-outputs/index.ts +5 -1
  53. package/src/effects/provide-json-schema-outputs/index.ts +5 -0
  54. package/src/effects/sync-variable-title/index.ts +5 -0
  55. package/src/form-plugins/batch-outputs-plugin/config.json +7 -0
  56. package/src/form-plugins/batch-outputs-plugin/index.ts +104 -0
  57. package/src/form-plugins/index.ts +6 -0
  58. package/src/index.ts +6 -0
  59. package/src/typings/flow-value/index.ts +5 -0
  60. package/src/typings/index.ts +5 -0
  61. package/src/typings/json-schema/index.ts +5 -0
  62. package/src/utils/format-legacy-refs/index.ts +5 -0
  63. package/src/utils/index.ts +5 -0
  64. package/src/utils/json-schema/index.ts +21 -2
package/dist/index.d.mts CHANGED
@@ -1,7 +1,12 @@
1
1
  import React$1 from 'react';
2
2
  import { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
3
- import { EffectOptions, ASTNodeJSON, ASTNode, BaseType } from '@flowgram.ai/editor';
3
+ import { EffectOptions, ASTNodeJSON, ASTNode, BaseType, FormPluginCreator } from '@flowgram.ai/editor';
4
+ import { TreeNodeData } from '@douyinfe/semi-ui/lib/es/tree';
4
5
 
6
+ /**
7
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
8
+ * SPDX-License-Identifier: MIT
9
+ */
5
10
  type JsonSchemaBasicType = 'boolean' | 'string' | 'integer' | 'number' | 'object' | 'array' | 'map';
6
11
  interface IJsonSchema<T = string> {
7
12
  type?: T;
@@ -23,6 +28,21 @@ interface IJsonSchema<T = string> {
23
28
  }
24
29
  type IBasicJsonSchema = IJsonSchema<JsonSchemaBasicType>;
25
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
+
26
46
  interface PropTypes$2 {
27
47
  value?: string[];
28
48
  config?: {
@@ -38,8 +58,13 @@ interface PropTypes$2 {
38
58
  triggerRender?: (props: TriggerRenderProps) => React$1.ReactNode;
39
59
  }
40
60
  type VariableSelectorProps = PropTypes$2;
61
+
41
62
  declare const VariableSelector: ({ value, config, onChange, style, readonly, includeSchema, excludeSchema, hasError, triggerRender, }: PropTypes$2) => React$1.JSX.Element;
42
63
 
64
+ /**
65
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
66
+ * SPDX-License-Identifier: MIT
67
+ */
43
68
  interface IFlowConstantValue {
44
69
  type: 'constant';
45
70
  content?: string | number | boolean;
@@ -59,6 +84,11 @@ interface IFlowTemplateValue {
59
84
  type IFlowValue = IFlowConstantValue | IFlowRefValue | IFlowExpressionValue | IFlowTemplateValue;
60
85
  type IFlowConstantRefValue = IFlowConstantValue | IFlowRefValue;
61
86
 
87
+ /**
88
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
89
+ * SPDX-License-Identifier: MIT
90
+ */
91
+
62
92
  declare const VariableTypeIcons: {
63
93
  [key: string]: React$1.ReactNode;
64
94
  };
@@ -67,6 +97,11 @@ declare const ArrayIcons: {
67
97
  };
68
98
  declare const getSchemaIcon: (value?: Partial<IJsonSchema>) => React$1.ReactNode;
69
99
 
100
+ /**
101
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
102
+ * SPDX-License-Identifier: MIT
103
+ */
104
+
70
105
  interface PropTypes$1 {
71
106
  value?: Partial<IJsonSchema>;
72
107
  onChange: (value?: Partial<IJsonSchema>) => void;
@@ -77,6 +112,11 @@ declare const getTypeSelectValue: (value?: Partial<IJsonSchema>) => string[] | u
77
112
  declare const parseTypeSelectValue: (value?: string[]) => Partial<IJsonSchema> | undefined;
78
113
  declare function TypeSelector(props: PropTypes$1): React$1.JSX.Element;
79
114
 
115
+ /**
116
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
117
+ * SPDX-License-Identifier: MIT
118
+ */
119
+
80
120
  interface ConfigType {
81
121
  placeholder?: string;
82
122
  descTitle?: string;
@@ -87,6 +127,11 @@ interface ConfigType {
87
127
  jsonFormatText?: string;
88
128
  }
89
129
 
130
+ /**
131
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
132
+ * SPDX-License-Identifier: MIT
133
+ */
134
+
90
135
  declare function JsonSchemaEditor(props: {
91
136
  value?: IJsonSchema;
92
137
  onChange?: (value: IJsonSchema) => void;
@@ -94,8 +139,18 @@ declare function JsonSchemaEditor(props: {
94
139
  className?: string;
95
140
  }): React$1.JSX.Element;
96
141
 
142
+ /**
143
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
144
+ * SPDX-License-Identifier: MIT
145
+ */
146
+
97
147
  declare function BatchVariableSelector(props: VariableSelectorProps): React$1.JSX.Element;
98
148
 
149
+ /**
150
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
151
+ * SPDX-License-Identifier: MIT
152
+ */
153
+
99
154
  interface Strategy<Value = any> {
100
155
  hit: (schema: IJsonSchema) => boolean;
101
156
  Renderer: React.FC<RendererProps<Value>>;
@@ -105,15 +160,25 @@ interface RendererProps<Value = any> {
105
160
  onChange?: (value: Value) => void;
106
161
  readonly?: boolean;
107
162
  }
108
- interface PropsType$1 extends RendererProps {
163
+ interface PropsType$3 extends RendererProps {
109
164
  schema: IJsonSchema;
110
165
  strategies?: Strategy[];
111
166
  [key: string]: any;
112
167
  }
113
168
 
114
- declare function ConstantInput(props: PropsType$1): React$1.JSX.Element;
169
+ /**
170
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
171
+ * SPDX-License-Identifier: MIT
172
+ */
173
+
174
+ declare function ConstantInput(props: PropsType$3): React$1.JSX.Element;
175
+
176
+ /**
177
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
178
+ * SPDX-License-Identifier: MIT
179
+ */
115
180
 
116
- interface PropsType {
181
+ interface PropsType$2 {
117
182
  value?: IFlowConstantRefValue;
118
183
  onChange: (value?: IFlowConstantRefValue) => void;
119
184
  readonly?: boolean;
@@ -122,10 +187,16 @@ interface PropsType {
122
187
  schema?: IJsonSchema;
123
188
  constantProps?: {
124
189
  strategies?: Strategy[];
190
+ schema?: IJsonSchema;
125
191
  [key: string]: any;
126
192
  };
127
193
  }
128
- declare function DynamicValueInput({ value, onChange, readonly, style, schema, constantProps, }: PropsType): React$1.JSX.Element;
194
+ declare function DynamicValueInput({ value, onChange, readonly, style, schema, constantProps, }: PropsType$2): React$1.JSX.Element;
195
+
196
+ /**
197
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
198
+ * SPDX-License-Identifier: MIT
199
+ */
129
200
 
130
201
  declare enum Op {
131
202
  EQ = "eq",
@@ -149,6 +220,11 @@ interface ConditionRowValueType {
149
220
  right?: IFlowConstantRefValue;
150
221
  }
151
222
 
223
+ /**
224
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
225
+ * SPDX-License-Identifier: MIT
226
+ */
227
+
152
228
  interface PropTypes {
153
229
  value?: ConditionRowValueType;
154
230
  onChange: (value?: ConditionRowValueType) => void;
@@ -157,10 +233,74 @@ interface PropTypes {
157
233
  }
158
234
  declare function ConditionRow({ style, value, onChange, readonly }: PropTypes): React$1.JSX.Element;
159
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$1 {
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$1): 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 = React$1.PropsWithChildren<{
263
+ value?: IFlowTemplateValue;
264
+ onChange: (value?: IFlowTemplateValue) => void;
265
+ readonly?: boolean;
266
+ hasError?: boolean;
267
+ style?: React$1.CSSProperties;
268
+ }>;
269
+
270
+ /**
271
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
272
+ * SPDX-License-Identifier: MIT
273
+ */
274
+
275
+ type PromptEditorPropsType = PropsType;
276
+ declare function PromptEditor(props: PropsType): React$1.JSX.Element;
277
+
278
+ /**
279
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
280
+ * SPDX-License-Identifier: MIT
281
+ */
282
+
283
+ declare function PromptEditorWithVariables(props: PromptEditorPropsType): React$1.JSX.Element;
284
+
285
+ /**
286
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
287
+ * SPDX-License-Identifier: MIT
288
+ */
289
+
160
290
  declare const provideBatchInputEffect: EffectOptions[];
161
291
 
292
+ /**
293
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
294
+ * SPDX-License-Identifier: MIT
295
+ */
296
+
162
297
  declare const provideBatchOutputsEffect: EffectOptions[];
163
298
 
299
+ /**
300
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
301
+ * SPDX-License-Identifier: MIT
302
+ */
303
+
164
304
  /**
165
305
  * Auto rename ref when form item's key is renamed
166
306
  *
@@ -174,10 +314,24 @@ declare const provideBatchOutputsEffect: EffectOptions[];
174
314
  */
175
315
  declare const autoRenameRefEffect: EffectOptions[];
176
316
 
317
+ /**
318
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
319
+ * SPDX-License-Identifier: MIT
320
+ */
321
+
177
322
  declare const provideJsonSchemaOutputs: EffectOptions[];
178
323
 
324
+ /**
325
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
326
+ * SPDX-License-Identifier: MIT
327
+ */
328
+
179
329
  declare const syncVariableTitle: EffectOptions[];
180
330
 
331
+ /**
332
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
333
+ * SPDX-License-Identifier: MIT
334
+ */
181
335
  interface LegacyFlowRefValueSchema {
182
336
  type: 'ref';
183
337
  content: string;
@@ -258,6 +412,11 @@ declare function formatNewRefToLegacyRef(value: NewFlowRefValueSchema): {
258
412
  content: string;
259
413
  };
260
414
 
415
+ /**
416
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
417
+ * SPDX-License-Identifier: MIT
418
+ */
419
+
261
420
  declare namespace JsonSchemaUtils {
262
421
  /**
263
422
  * Converts a JSON schema to an Abstract Syntax Tree (AST) representation.
@@ -287,4 +446,16 @@ declare namespace JsonSchemaUtils {
287
446
  function isASTMatchSchema(typeAST: BaseType, schema: IJsonSchema | IJsonSchema[]): boolean;
288
447
  }
289
448
 
290
- export { ArrayIcons, BatchVariableSelector, ConditionRow, type ConditionRowValueType, ConstantInput, DynamicValueInput, type IBasicJsonSchema, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IJsonSchema, type JsonSchemaBasicType, JsonSchemaEditor, JsonSchemaUtils, TypeSelector, VariableSelector, type VariableSelectorProps, VariableTypeIcons, autoRenameRefEffect, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getSchemaIcon, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, parseTypeSelectValue, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle };
449
+ /**
450
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
451
+ * SPDX-License-Identifier: MIT
452
+ */
453
+
454
+ /**
455
+ * Free Layout only right now
456
+ */
457
+ declare const createBatchOutputsFormPlugin: FormPluginCreator<{
458
+ outputKey: string;
459
+ }>;
460
+
461
+ export { ArrayIcons, BatchOutputs, BatchVariableSelector, ConditionRow, type ConditionRowValueType, ConstantInput, DynamicValueInput, type IBasicJsonSchema, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IJsonSchema, type JsonSchemaBasicType, JsonSchemaEditor, JsonSchemaUtils, PromptEditor, type PromptEditorPropsType, PromptEditorWithVariables, TypeSelector, VariableSelector, type VariableSelectorProps, VariableTypeIcons, autoRenameRefEffect, createBatchOutputsFormPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getSchemaIcon, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, parseTypeSelectValue, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, useVariableTree };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,12 @@
1
1
  import React$1 from 'react';
2
2
  import { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
3
- import { EffectOptions, ASTNodeJSON, ASTNode, BaseType } from '@flowgram.ai/editor';
3
+ import { EffectOptions, ASTNodeJSON, ASTNode, BaseType, FormPluginCreator } from '@flowgram.ai/editor';
4
+ import { TreeNodeData } from '@douyinfe/semi-ui/lib/es/tree';
4
5
 
6
+ /**
7
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
8
+ * SPDX-License-Identifier: MIT
9
+ */
5
10
  type JsonSchemaBasicType = 'boolean' | 'string' | 'integer' | 'number' | 'object' | 'array' | 'map';
6
11
  interface IJsonSchema<T = string> {
7
12
  type?: T;
@@ -23,6 +28,21 @@ interface IJsonSchema<T = string> {
23
28
  }
24
29
  type IBasicJsonSchema = IJsonSchema<JsonSchemaBasicType>;
25
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
+
26
46
  interface PropTypes$2 {
27
47
  value?: string[];
28
48
  config?: {
@@ -38,8 +58,13 @@ interface PropTypes$2 {
38
58
  triggerRender?: (props: TriggerRenderProps) => React$1.ReactNode;
39
59
  }
40
60
  type VariableSelectorProps = PropTypes$2;
61
+
41
62
  declare const VariableSelector: ({ value, config, onChange, style, readonly, includeSchema, excludeSchema, hasError, triggerRender, }: PropTypes$2) => React$1.JSX.Element;
42
63
 
64
+ /**
65
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
66
+ * SPDX-License-Identifier: MIT
67
+ */
43
68
  interface IFlowConstantValue {
44
69
  type: 'constant';
45
70
  content?: string | number | boolean;
@@ -59,6 +84,11 @@ interface IFlowTemplateValue {
59
84
  type IFlowValue = IFlowConstantValue | IFlowRefValue | IFlowExpressionValue | IFlowTemplateValue;
60
85
  type IFlowConstantRefValue = IFlowConstantValue | IFlowRefValue;
61
86
 
87
+ /**
88
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
89
+ * SPDX-License-Identifier: MIT
90
+ */
91
+
62
92
  declare const VariableTypeIcons: {
63
93
  [key: string]: React$1.ReactNode;
64
94
  };
@@ -67,6 +97,11 @@ declare const ArrayIcons: {
67
97
  };
68
98
  declare const getSchemaIcon: (value?: Partial<IJsonSchema>) => React$1.ReactNode;
69
99
 
100
+ /**
101
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
102
+ * SPDX-License-Identifier: MIT
103
+ */
104
+
70
105
  interface PropTypes$1 {
71
106
  value?: Partial<IJsonSchema>;
72
107
  onChange: (value?: Partial<IJsonSchema>) => void;
@@ -77,6 +112,11 @@ declare const getTypeSelectValue: (value?: Partial<IJsonSchema>) => string[] | u
77
112
  declare const parseTypeSelectValue: (value?: string[]) => Partial<IJsonSchema> | undefined;
78
113
  declare function TypeSelector(props: PropTypes$1): React$1.JSX.Element;
79
114
 
115
+ /**
116
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
117
+ * SPDX-License-Identifier: MIT
118
+ */
119
+
80
120
  interface ConfigType {
81
121
  placeholder?: string;
82
122
  descTitle?: string;
@@ -87,6 +127,11 @@ interface ConfigType {
87
127
  jsonFormatText?: string;
88
128
  }
89
129
 
130
+ /**
131
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
132
+ * SPDX-License-Identifier: MIT
133
+ */
134
+
90
135
  declare function JsonSchemaEditor(props: {
91
136
  value?: IJsonSchema;
92
137
  onChange?: (value: IJsonSchema) => void;
@@ -94,8 +139,18 @@ declare function JsonSchemaEditor(props: {
94
139
  className?: string;
95
140
  }): React$1.JSX.Element;
96
141
 
142
+ /**
143
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
144
+ * SPDX-License-Identifier: MIT
145
+ */
146
+
97
147
  declare function BatchVariableSelector(props: VariableSelectorProps): React$1.JSX.Element;
98
148
 
149
+ /**
150
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
151
+ * SPDX-License-Identifier: MIT
152
+ */
153
+
99
154
  interface Strategy<Value = any> {
100
155
  hit: (schema: IJsonSchema) => boolean;
101
156
  Renderer: React.FC<RendererProps<Value>>;
@@ -105,15 +160,25 @@ interface RendererProps<Value = any> {
105
160
  onChange?: (value: Value) => void;
106
161
  readonly?: boolean;
107
162
  }
108
- interface PropsType$1 extends RendererProps {
163
+ interface PropsType$3 extends RendererProps {
109
164
  schema: IJsonSchema;
110
165
  strategies?: Strategy[];
111
166
  [key: string]: any;
112
167
  }
113
168
 
114
- declare function ConstantInput(props: PropsType$1): React$1.JSX.Element;
169
+ /**
170
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
171
+ * SPDX-License-Identifier: MIT
172
+ */
173
+
174
+ declare function ConstantInput(props: PropsType$3): React$1.JSX.Element;
175
+
176
+ /**
177
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
178
+ * SPDX-License-Identifier: MIT
179
+ */
115
180
 
116
- interface PropsType {
181
+ interface PropsType$2 {
117
182
  value?: IFlowConstantRefValue;
118
183
  onChange: (value?: IFlowConstantRefValue) => void;
119
184
  readonly?: boolean;
@@ -122,10 +187,16 @@ interface PropsType {
122
187
  schema?: IJsonSchema;
123
188
  constantProps?: {
124
189
  strategies?: Strategy[];
190
+ schema?: IJsonSchema;
125
191
  [key: string]: any;
126
192
  };
127
193
  }
128
- declare function DynamicValueInput({ value, onChange, readonly, style, schema, constantProps, }: PropsType): React$1.JSX.Element;
194
+ declare function DynamicValueInput({ value, onChange, readonly, style, schema, constantProps, }: PropsType$2): React$1.JSX.Element;
195
+
196
+ /**
197
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
198
+ * SPDX-License-Identifier: MIT
199
+ */
129
200
 
130
201
  declare enum Op {
131
202
  EQ = "eq",
@@ -149,6 +220,11 @@ interface ConditionRowValueType {
149
220
  right?: IFlowConstantRefValue;
150
221
  }
151
222
 
223
+ /**
224
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
225
+ * SPDX-License-Identifier: MIT
226
+ */
227
+
152
228
  interface PropTypes {
153
229
  value?: ConditionRowValueType;
154
230
  onChange: (value?: ConditionRowValueType) => void;
@@ -157,10 +233,74 @@ interface PropTypes {
157
233
  }
158
234
  declare function ConditionRow({ style, value, onChange, readonly }: PropTypes): React$1.JSX.Element;
159
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$1 {
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$1): 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 = React$1.PropsWithChildren<{
263
+ value?: IFlowTemplateValue;
264
+ onChange: (value?: IFlowTemplateValue) => void;
265
+ readonly?: boolean;
266
+ hasError?: boolean;
267
+ style?: React$1.CSSProperties;
268
+ }>;
269
+
270
+ /**
271
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
272
+ * SPDX-License-Identifier: MIT
273
+ */
274
+
275
+ type PromptEditorPropsType = PropsType;
276
+ declare function PromptEditor(props: PropsType): React$1.JSX.Element;
277
+
278
+ /**
279
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
280
+ * SPDX-License-Identifier: MIT
281
+ */
282
+
283
+ declare function PromptEditorWithVariables(props: PromptEditorPropsType): React$1.JSX.Element;
284
+
285
+ /**
286
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
287
+ * SPDX-License-Identifier: MIT
288
+ */
289
+
160
290
  declare const provideBatchInputEffect: EffectOptions[];
161
291
 
292
+ /**
293
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
294
+ * SPDX-License-Identifier: MIT
295
+ */
296
+
162
297
  declare const provideBatchOutputsEffect: EffectOptions[];
163
298
 
299
+ /**
300
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
301
+ * SPDX-License-Identifier: MIT
302
+ */
303
+
164
304
  /**
165
305
  * Auto rename ref when form item's key is renamed
166
306
  *
@@ -174,10 +314,24 @@ declare const provideBatchOutputsEffect: EffectOptions[];
174
314
  */
175
315
  declare const autoRenameRefEffect: EffectOptions[];
176
316
 
317
+ /**
318
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
319
+ * SPDX-License-Identifier: MIT
320
+ */
321
+
177
322
  declare const provideJsonSchemaOutputs: EffectOptions[];
178
323
 
324
+ /**
325
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
326
+ * SPDX-License-Identifier: MIT
327
+ */
328
+
179
329
  declare const syncVariableTitle: EffectOptions[];
180
330
 
331
+ /**
332
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
333
+ * SPDX-License-Identifier: MIT
334
+ */
181
335
  interface LegacyFlowRefValueSchema {
182
336
  type: 'ref';
183
337
  content: string;
@@ -258,6 +412,11 @@ declare function formatNewRefToLegacyRef(value: NewFlowRefValueSchema): {
258
412
  content: string;
259
413
  };
260
414
 
415
+ /**
416
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
417
+ * SPDX-License-Identifier: MIT
418
+ */
419
+
261
420
  declare namespace JsonSchemaUtils {
262
421
  /**
263
422
  * Converts a JSON schema to an Abstract Syntax Tree (AST) representation.
@@ -287,4 +446,16 @@ declare namespace JsonSchemaUtils {
287
446
  function isASTMatchSchema(typeAST: BaseType, schema: IJsonSchema | IJsonSchema[]): boolean;
288
447
  }
289
448
 
290
- export { ArrayIcons, BatchVariableSelector, ConditionRow, type ConditionRowValueType, ConstantInput, DynamicValueInput, type IBasicJsonSchema, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IJsonSchema, type JsonSchemaBasicType, JsonSchemaEditor, JsonSchemaUtils, TypeSelector, VariableSelector, type VariableSelectorProps, VariableTypeIcons, autoRenameRefEffect, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getSchemaIcon, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, parseTypeSelectValue, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle };
449
+ /**
450
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
451
+ * SPDX-License-Identifier: MIT
452
+ */
453
+
454
+ /**
455
+ * Free Layout only right now
456
+ */
457
+ declare const createBatchOutputsFormPlugin: FormPluginCreator<{
458
+ outputKey: string;
459
+ }>;
460
+
461
+ export { ArrayIcons, BatchOutputs, BatchVariableSelector, ConditionRow, type ConditionRowValueType, ConstantInput, DynamicValueInput, type IBasicJsonSchema, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IJsonSchema, type JsonSchemaBasicType, JsonSchemaEditor, JsonSchemaUtils, PromptEditor, type PromptEditorPropsType, PromptEditorWithVariables, TypeSelector, VariableSelector, type VariableSelectorProps, VariableTypeIcons, autoRenameRefEffect, createBatchOutputsFormPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getSchemaIcon, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, parseTypeSelectValue, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, useVariableTree };