@flowgram.ai/form-materials 0.1.0-alpha.12 → 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 (164) hide show
  1. package/bin/index.ts +4 -29
  2. package/bin/materials.ts +56 -87
  3. package/bin/project.ts +4 -0
  4. package/bin/utils/import.ts +127 -0
  5. package/bin/utils/traverse-file.ts +60 -0
  6. package/dist/esm/chunk-727SU246.js +13 -0
  7. package/dist/esm/chunk-727SU246.js.map +1 -0
  8. package/dist/esm/chunk-DEZUEMUM.js +284 -0
  9. package/dist/esm/chunk-DEZUEMUM.js.map +1 -0
  10. package/dist/esm/chunk-DUOXDOUE.js +477 -0
  11. package/dist/esm/chunk-DUOXDOUE.js.map +1 -0
  12. package/dist/esm/editor-6UMULJYB.js +180 -0
  13. package/dist/esm/editor-6UMULJYB.js.map +1 -0
  14. package/dist/esm/editor-EYOQTGMT.js +282 -0
  15. package/dist/esm/editor-EYOQTGMT.js.map +1 -0
  16. package/dist/esm/editor-OXPGKPF5.js +167 -0
  17. package/dist/esm/editor-OXPGKPF5.js.map +1 -0
  18. package/dist/esm/editor-VO6YAXRC.js +249 -0
  19. package/dist/esm/editor-VO6YAXRC.js.map +1 -0
  20. package/dist/esm/editor-XYLKTB6L.js +365 -0
  21. package/dist/esm/editor-XYLKTB6L.js.map +1 -0
  22. package/dist/esm/index.js +1186 -2456
  23. package/dist/esm/index.js.map +1 -1
  24. package/dist/index.d.mts +363 -70
  25. package/dist/index.d.ts +363 -70
  26. package/dist/index.js +4064 -2887
  27. package/dist/index.js.map +1 -1
  28. package/package.json +9 -8
  29. package/src/components/assign-row/index.tsx +4 -4
  30. package/src/components/assign-rows/index.tsx +1 -1
  31. package/src/components/batch-outputs/index.tsx +7 -5
  32. package/src/components/batch-outputs/types.ts +1 -1
  33. package/src/components/batch-variable-selector/index.tsx +1 -1
  34. package/src/components/code-editor/editor.tsx +89 -0
  35. package/src/components/code-editor/index.tsx +5 -89
  36. package/src/components/code-editor/language-features.ts +18 -18
  37. package/src/components/code-editor/theme/dark.ts +49 -30
  38. package/src/components/code-editor/theme/light.ts +56 -32
  39. package/src/components/code-editor-mini/index.tsx +2 -2
  40. package/src/components/condition-row/constants.ts +10 -2
  41. package/src/components/condition-row/hooks/useOp.tsx +13 -9
  42. package/src/components/condition-row/hooks/useRule.ts +8 -4
  43. package/src/components/condition-row/index.tsx +31 -10
  44. package/src/components/condition-row/types.ts +5 -7
  45. package/src/components/constant-input/index.tsx +5 -2
  46. package/src/components/constant-input/types.ts +1 -1
  47. package/src/components/db-condition-row/hooks/use-left.tsx +66 -0
  48. package/src/components/db-condition-row/hooks/use-op.tsx +59 -0
  49. package/src/components/db-condition-row/index.tsx +93 -0
  50. package/src/components/db-condition-row/styles.tsx +43 -0
  51. package/src/components/db-condition-row/types.ts +34 -0
  52. package/src/components/display-flow-value/index.tsx +4 -14
  53. package/src/components/display-inputs-values/index.tsx +46 -7
  54. package/src/components/display-outputs/index.tsx +2 -1
  55. package/src/components/display-schema-tag/index.tsx +3 -2
  56. package/src/components/display-schema-tree/index.tsx +2 -1
  57. package/src/components/dynamic-value-input/hooks.ts +25 -4
  58. package/src/components/dynamic-value-input/index.tsx +33 -20
  59. package/src/components/dynamic-value-input/styles.tsx +14 -4
  60. package/src/components/index.ts +3 -0
  61. package/src/components/inputs-values/index.tsx +21 -8
  62. package/src/components/inputs-values/styles.tsx +1 -1
  63. package/src/components/inputs-values/types.ts +3 -3
  64. package/src/components/inputs-values-tree/hooks/use-child-list.tsx +76 -0
  65. package/src/components/inputs-values-tree/index.tsx +62 -0
  66. package/src/components/inputs-values-tree/row.tsx +177 -0
  67. package/src/components/inputs-values-tree/styles.tsx +128 -0
  68. package/src/components/inputs-values-tree/types.ts +21 -0
  69. package/src/components/json-editor-with-variables/editor.tsx +69 -0
  70. package/src/components/json-editor-with-variables/extensions/variable-tag.tsx +6 -5
  71. package/src/components/json-editor-with-variables/extensions/variable-tree.tsx +1 -1
  72. package/src/components/json-editor-with-variables/index.tsx +5 -58
  73. package/src/components/json-schema-editor/default-value.tsx +12 -108
  74. package/src/components/json-schema-editor/hooks.tsx +63 -93
  75. package/src/components/json-schema-editor/index.tsx +36 -70
  76. package/src/components/json-schema-editor/styles.tsx +12 -84
  77. package/src/components/json-schema-editor/types.ts +0 -1
  78. package/src/components/prompt-editor/editor.tsx +81 -0
  79. package/src/components/prompt-editor/index.tsx +5 -62
  80. package/src/components/prompt-editor/types.tsx +1 -1
  81. package/src/components/prompt-editor-with-inputs/editor.tsx +25 -0
  82. package/src/components/prompt-editor-with-inputs/extensions/inputs-tree.tsx +13 -1
  83. package/src/components/prompt-editor-with-inputs/index.tsx +5 -15
  84. package/src/components/prompt-editor-with-inputs/inputs-picker.tsx +34 -17
  85. package/src/components/prompt-editor-with-variables/editor.tsx +22 -0
  86. package/src/components/prompt-editor-with-variables/extensions/variable-tag.tsx +12 -20
  87. package/src/components/prompt-editor-with-variables/extensions/variable-tree.tsx +14 -2
  88. package/src/components/prompt-editor-with-variables/index.tsx +5 -12
  89. package/src/components/type-selector/index.tsx +21 -9
  90. package/src/components/variable-selector/context.tsx +28 -0
  91. package/src/components/variable-selector/index.tsx +19 -6
  92. package/src/components/variable-selector/use-variable-tree.tsx +4 -4
  93. package/src/effects/auto-rename-ref/index.ts +8 -55
  94. package/src/effects/listen-ref-schema-change/index.ts +1 -1
  95. package/src/effects/listen-ref-value-change/index.ts +1 -1
  96. package/src/effects/provide-batch-input/index.ts +1 -1
  97. package/src/effects/validate-when-variable-sync/index.ts +1 -1
  98. package/src/form-plugins/batch-outputs-plugin/index.ts +1 -1
  99. package/src/form-plugins/infer-assign-plugin/index.ts +2 -2
  100. package/src/form-plugins/infer-inputs-plugin/index.ts +4 -76
  101. package/src/hooks/use-object-list/index.tsx +35 -7
  102. package/src/index.ts +1 -0
  103. package/src/plugins/json-schema-preset/manager.ts +1 -0
  104. package/src/plugins/json-schema-preset/type-definition/array.tsx +3 -1
  105. package/src/plugins/json-schema-preset/type-definition/boolean.tsx +4 -3
  106. package/src/plugins/json-schema-preset/type-definition/date-time.tsx +25 -0
  107. package/src/plugins/json-schema-preset/type-definition/index.tsx +2 -0
  108. package/src/plugins/json-schema-preset/type-definition/integer.tsx +2 -1
  109. package/src/plugins/json-schema-preset/type-definition/number.tsx +2 -1
  110. package/src/plugins/json-schema-preset/type-definition/object.tsx +3 -1
  111. package/src/plugins/json-schema-preset/type-definition/string.tsx +19 -4
  112. package/src/shared/flow-value/index.ts +6 -0
  113. package/src/shared/flow-value/schema.ts +38 -0
  114. package/src/shared/flow-value/utils.ts +201 -0
  115. package/src/shared/format-legacy-refs/index.ts +1 -1
  116. package/src/shared/index.ts +4 -0
  117. package/src/shared/inject-material/README.md +170 -0
  118. package/src/shared/inject-material/README.zh.md +174 -0
  119. package/src/shared/inject-material/index.tsx +87 -0
  120. package/src/shared/lazy-suspense/index.tsx +28 -0
  121. package/src/shared/polyfill-create-root/index.tsx +33 -0
  122. package/src/typings/flow-value/index.ts +3 -1
  123. package/src/validate/validate-flow-value/index.tsx +4 -16
  124. package/src/components/assign-row/config.json +0 -11
  125. package/src/components/assign-rows/config.json +0 -11
  126. package/src/components/batch-outputs/config.json +0 -13
  127. package/src/components/batch-variable-selector/config.json +0 -9
  128. package/src/components/code-editor/config.json +0 -10
  129. package/src/components/code-editor-mini/config.json +0 -7
  130. package/src/components/condition-row/config.json +0 -13
  131. package/src/components/constant-input/config.json +0 -9
  132. package/src/components/display-flow-value/config.json +0 -8
  133. package/src/components/display-inputs-values/config.json +0 -9
  134. package/src/components/display-outputs/config.json +0 -10
  135. package/src/components/display-schema-tag/config.json +0 -10
  136. package/src/components/display-schema-tree/config.json +0 -11
  137. package/src/components/dynamic-value-input/config.json +0 -14
  138. package/src/components/inputs-values/config.json +0 -13
  139. package/src/components/json-editor-with-variables/config.json +0 -13
  140. package/src/components/json-schema-editor/components/blur-input.tsx +0 -27
  141. package/src/components/json-schema-editor/config.json +0 -13
  142. package/src/components/json-schema-editor/utils.ts +0 -29
  143. package/src/components/prompt-editor/config.json +0 -9
  144. package/src/components/prompt-editor-with-inputs/config.json +0 -13
  145. package/src/components/prompt-editor-with-variables/config.json +0 -13
  146. package/src/components/type-selector/config.json +0 -9
  147. package/src/components/variable-selector/config.json +0 -9
  148. package/src/effects/auto-rename-ref/config.json +0 -5
  149. package/src/effects/listen-ref-schema-change/config.json +0 -10
  150. package/src/effects/listen-ref-value-change/config.json +0 -9
  151. package/src/effects/provide-batch-input/config.json +0 -5
  152. package/src/effects/provide-json-schema-outputs/config.json +0 -7
  153. package/src/effects/sync-variable-title/config.json +0 -5
  154. package/src/effects/validate-when-variable-sync/config.json +0 -5
  155. package/src/form-plugins/batch-outputs-plugin/config.json +0 -7
  156. package/src/form-plugins/infer-assign-plugin/config.json +0 -7
  157. package/src/form-plugins/infer-inputs-plugin/config.json +0 -9
  158. package/src/hooks/use-object-list/config.json +0 -8
  159. package/src/plugins/disable-declaration-plugin/config.json +0 -5
  160. package/src/plugins/json-schema-preset/config.json +0 -9
  161. package/src/shared/format-legacy-refs/config.json +0 -5
  162. package/src/typings/flow-value/config.json +0 -7
  163. package/src/validate/validate-flow-value/config.json +0 -7
  164. /package/src/components/{inputs-values/components/blur-input.tsx → blur-input/index.tsx} +0 -0
package/dist/index.d.mts CHANGED
@@ -1,10 +1,13 @@
1
- import React$1 from 'react';
1
+ import * as React$1 from 'react';
2
+ import React__default, { ComponentType, lazy } from 'react';
2
3
  import { IJsonSchema, JsonSchemaTypeRegistry as JsonSchemaTypeRegistry$1, JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
3
4
  export { IJsonSchema, JsonSchemaBasicType, JsonSchemaUtils } from '@flowgram.ai/json-schema';
4
5
  import { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
5
6
  import { InferValues } from '@coze-editor/editor/react';
6
- import preset from '@coze-editor/editor/preset-code';
7
- import { BaseVariableField, EffectOptions, EffectFuncProps, FormPluginCreator, FeedbackLevel, FlowNodeEntity } from '@flowgram.ai/editor';
7
+ import preset from '@coze-editor/editor/preset-prompt';
8
+ import preset$1 from '@coze-editor/editor/preset-code';
9
+ import { InputProps } from '@douyinfe/semi-ui/lib/es/input';
10
+ import { BaseVariableField, EffectOptions, EffectFuncProps, Scope, FormPluginCreator, FeedbackLevel, FlowNodeEntity } from '@flowgram.ai/editor';
8
11
  import * as _flowgram_ai_node from '@flowgram.ai/node';
9
12
  import * as _flowgram_ai_core from '@flowgram.ai/core';
10
13
  import { TreeNodeData } from '@douyinfe/semi-ui/lib/es/tree';
@@ -22,7 +25,7 @@ type VariableField = BaseVariableField<{
22
25
  declare function useVariableTree(params: {
23
26
  includeSchema?: IJsonSchema | IJsonSchema[];
24
27
  excludeSchema?: IJsonSchema | IJsonSchema[];
25
- customSkip?: (variable: VariableField) => boolean;
28
+ skipVariable?: (variable: VariableField) => boolean;
26
29
  }): TreeNodeData[];
27
30
 
28
31
  /**
@@ -30,7 +33,17 @@ declare function useVariableTree(params: {
30
33
  * SPDX-License-Identifier: MIT
31
34
  */
32
35
 
33
- interface PropTypes$2 {
36
+ declare const VariableSelectorProvider: ({ children, skipVariable, }: {
37
+ skipVariable?: (variable?: BaseVariableField) => boolean;
38
+ children: React__default.ReactNode;
39
+ }) => React__default.JSX.Element;
40
+
41
+ /**
42
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
43
+ * SPDX-License-Identifier: MIT
44
+ */
45
+
46
+ interface VariableSelectorProps {
34
47
  value?: string[];
35
48
  config?: {
36
49
  placeholder?: string;
@@ -41,19 +54,22 @@ interface PropTypes$2 {
41
54
  excludeSchema?: IJsonSchema | IJsonSchema[];
42
55
  readonly?: boolean;
43
56
  hasError?: boolean;
44
- style?: React$1.CSSProperties;
45
- triggerRender?: (props: TriggerRenderProps) => React$1.ReactNode;
57
+ style?: React__default.CSSProperties;
58
+ triggerRender?: (props: TriggerRenderProps) => React__default.ReactNode;
46
59
  }
47
- type VariableSelectorProps = PropTypes$2;
48
60
 
49
- declare const VariableSelector: ({ value, config, onChange, style, readonly, includeSchema, excludeSchema, hasError, triggerRender, }: PropTypes$2) => React$1.JSX.Element;
61
+ declare const VariableSelector: {
62
+ ({ value, config, onChange, style, readonly, includeSchema, excludeSchema, hasError, triggerRender, }: VariableSelectorProps): React__default.JSX.Element;
63
+ renderKey: string;
64
+ };
65
+ declare const InjectVariableSelector: React__default.FC<VariableSelectorProps>;
50
66
 
51
67
  /**
52
68
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
53
69
  * SPDX-License-Identifier: MIT
54
70
  */
55
71
 
56
- interface PropTypes$1 {
72
+ interface TypeSelectorProps {
57
73
  value?: Partial<IJsonSchema>;
58
74
  onChange?: (value?: Partial<IJsonSchema>) => void;
59
75
  readonly?: boolean;
@@ -61,11 +77,15 @@ interface PropTypes$1 {
61
77
  * @deprecated use readonly instead
62
78
  */
63
79
  disabled?: boolean;
64
- style?: React$1.CSSProperties;
80
+ style?: React__default.CSSProperties;
65
81
  }
66
82
  declare const getTypeSelectValue: (value?: Partial<IJsonSchema>) => string[] | undefined;
67
83
  declare const parseTypeSelectValue: (value?: string[]) => Partial<IJsonSchema> | undefined;
68
- declare function TypeSelector(props: PropTypes$1): React$1.JSX.Element;
84
+ declare function TypeSelector(props: TypeSelectorProps): React__default.JSX.Element;
85
+ declare namespace TypeSelector {
86
+ var renderKey: string;
87
+ }
88
+ declare const InjectTypeSelector: React__default.FC<TypeSelectorProps>;
69
89
 
70
90
  /**
71
91
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
@@ -79,7 +99,6 @@ interface ConfigType {
79
99
  defaultValueTitle?: string;
80
100
  defaultValuePlaceholder?: string;
81
101
  addButtonText?: string;
82
- jsonFormatText?: string;
83
102
  }
84
103
 
85
104
  /**
@@ -93,14 +112,14 @@ declare function JsonSchemaEditor(props: {
93
112
  config?: ConfigType;
94
113
  className?: string;
95
114
  readonly?: boolean;
96
- }): React$1.JSX.Element;
115
+ }): React__default.JSX.Element;
97
116
 
98
117
  /**
99
118
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
100
119
  * SPDX-License-Identifier: MIT
101
120
  */
102
121
 
103
- declare function BatchVariableSelector(props: VariableSelectorProps): React$1.JSX.Element;
122
+ declare function BatchVariableSelector(props: VariableSelectorProps): React__default.JSX.Element;
104
123
 
105
124
  /**
106
125
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
@@ -111,6 +130,7 @@ interface ConstantRendererProps<Value = any> {
111
130
  value?: Value;
112
131
  onChange?: (value: Value) => void;
113
132
  readonly?: boolean;
133
+ [key: string]: any;
114
134
  }
115
135
  interface JsonSchemaTypeRegistry<Value = any> extends JsonSchemaTypeRegistry$1 {
116
136
  /**
@@ -130,9 +150,9 @@ declare const createTypePresetPlugin: _flowgram_ai_core.PluginCreator<{
130
150
  */
131
151
 
132
152
  declare const useTypeManager: () => JsonSchemaTypeManager<IJsonSchema, JsonSchemaTypeRegistry>;
133
- declare const JsonSchemaTypePresetProvider: ({ types, children, }: React$1.PropsWithChildren<{
153
+ declare const JsonSchemaTypePresetProvider: ({ types, children, }: React__default.PropsWithChildren<{
134
154
  types: JsonSchemaTypeRegistry[];
135
- }>) => React$1.JSX.Element;
155
+ }>) => React__default.JSX.Element;
136
156
 
137
157
  /**
138
158
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
@@ -161,7 +181,7 @@ interface PropsType$a extends ConstantRendererProps {
161
181
  * SPDX-License-Identifier: MIT
162
182
  */
163
183
 
164
- declare function ConstantInput(props: PropsType$a): React$1.JSX.Element;
184
+ declare function ConstantInput(props: PropsType$a): React__default.JSX.Element;
165
185
 
166
186
  /**
167
187
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
@@ -171,9 +191,10 @@ declare function ConstantInput(props: PropsType$a): React$1.JSX.Element;
171
191
  interface IFlowValueExtra {
172
192
  index?: number;
173
193
  }
194
+ type FlowValueType = 'constant' | 'ref' | 'expression' | 'template';
174
195
  interface IFlowConstantValue {
175
196
  type: 'constant';
176
- content?: string | number | boolean;
197
+ content?: any;
177
198
  schema?: IJsonSchema;
178
199
  extra?: IFlowValueExtra;
179
200
  }
@@ -205,7 +226,7 @@ interface PropsType$9 {
205
226
  onChange: (value?: IFlowConstantRefValue) => void;
206
227
  readonly?: boolean;
207
228
  hasError?: boolean;
208
- style?: React$1.CSSProperties;
229
+ style?: React__default.CSSProperties;
209
230
  schema?: IJsonSchema;
210
231
  constantProps?: {
211
232
  strategies?: Strategy[];
@@ -213,32 +234,28 @@ interface PropsType$9 {
213
234
  [key: string]: any;
214
235
  };
215
236
  }
216
- declare function DynamicValueInput({ value, onChange, readonly, style, schema: schemaFromProps, constantProps, }: PropsType$9): React$1.JSX.Element;
237
+ declare function DynamicValueInput({ value, onChange, readonly, style, schema: schemaFromProps, constantProps, }: PropsType$9): React__default.JSX.Element;
238
+ declare namespace DynamicValueInput {
239
+ var renderKey: string;
240
+ }
241
+ declare const InjectDynamicValueInput: React__default.FC<PropsType$9>;
217
242
 
218
243
  /**
219
244
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
220
245
  * SPDX-License-Identifier: MIT
221
246
  */
222
247
 
223
- declare enum Op {
224
- EQ = "eq",
225
- NEQ = "neq",
226
- GT = "gt",
227
- GTE = "gte",
228
- LT = "lt",
229
- LTE = "lte",
230
- IN = "in",
231
- NIN = "nin",
232
- CONTAINS = "contains",
233
- NOT_CONTAINS = "not_contains",
234
- IS_EMPTY = "is_empty",
235
- IS_NOT_EMPTY = "is_not_empty",
236
- IS_TRUE = "is_true",
237
- IS_FALSE = "is_false"
248
+ interface OpConfig$1 {
249
+ label: string;
250
+ abbreviation: string;
251
+ rightDisplay?: string;
238
252
  }
253
+ type OpConfigs$1 = Record<string, OpConfig$1>;
254
+ type IRule$1 = Partial<Record<string, string | null>>;
255
+ type IRules$1 = Record<string, IRule$1>;
239
256
  interface ConditionRowValueType {
240
257
  left?: IFlowRefValue;
241
- operator?: Op;
258
+ operator?: string;
242
259
  right?: IFlowConstantRefValue;
243
260
  }
244
261
 
@@ -247,13 +264,64 @@ interface ConditionRowValueType {
247
264
  * SPDX-License-Identifier: MIT
248
265
  */
249
266
 
250
- interface PropTypes {
267
+ interface PropTypes$1 {
251
268
  value?: ConditionRowValueType;
252
269
  onChange: (value?: ConditionRowValueType) => void;
253
- style?: React$1.CSSProperties;
270
+ style?: React__default.CSSProperties;
271
+ readonly?: boolean;
272
+ ruleConfig?: {
273
+ ops?: OpConfigs$1;
274
+ rules?: IRules$1;
275
+ };
276
+ }
277
+ declare function ConditionRow({ style, value, onChange, readonly, ruleConfig, }: PropTypes$1): React__default.JSX.Element;
278
+ declare namespace ConditionRow {
279
+ var defaultRules: IRules$1;
280
+ var defaultOpConfigs: OpConfigs$1;
281
+ }
282
+
283
+ /**
284
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
285
+ * SPDX-License-Identifier: MIT
286
+ */
287
+
288
+ interface OpConfig {
289
+ label: string;
290
+ abbreviation: string;
291
+ rightDisplay?: string;
292
+ }
293
+ type OpConfigs = Record<string, OpConfig>;
294
+ type IRule = Partial<Record<string, string | null>>;
295
+ type IRules = Record<string, IRule>;
296
+ interface DBConditionRowValueType {
297
+ left?: string;
298
+ schema?: IJsonSchema;
299
+ operator?: string;
300
+ right?: IFlowConstantRefValue;
301
+ }
302
+ interface DBConditionOptionType {
303
+ label: string | JSX.Element;
304
+ value: string;
305
+ schema: IJsonSchema;
306
+ }
307
+
308
+ /**
309
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
310
+ * SPDX-License-Identifier: MIT
311
+ */
312
+
313
+ interface PropTypes {
314
+ value?: DBConditionRowValueType;
315
+ onChange: (value?: DBConditionRowValueType) => void;
316
+ style?: React__default.CSSProperties;
317
+ options?: DBConditionOptionType[];
254
318
  readonly?: boolean;
319
+ ruleConfig?: {
320
+ ops?: OpConfigs;
321
+ rules?: IRules;
322
+ };
255
323
  }
256
- declare function ConditionRow({ style, value, onChange, readonly }: PropTypes): React$1.JSX.Element;
324
+ declare function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig, }: PropTypes): React__default.JSX.Element;
257
325
 
258
326
  /**
259
327
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
@@ -274,14 +342,14 @@ interface PropsType$8 {
274
342
  * SPDX-License-Identifier: MIT
275
343
  */
276
344
 
277
- declare function BatchOutputs(props: PropsType$8): React$1.JSX.Element;
345
+ declare function BatchOutputs(props: PropsType$8): React__default.JSX.Element;
278
346
 
279
347
  /**
280
348
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
281
349
  * SPDX-License-Identifier: MIT
282
350
  */
283
351
 
284
- type PropsType$7 = React$1.PropsWithChildren<{
352
+ type PropsType$7 = React__default.PropsWithChildren<{
285
353
  value?: IFlowTemplateValue;
286
354
  onChange: (value?: IFlowTemplateValue) => void;
287
355
  readonly?: boolean;
@@ -289,7 +357,7 @@ type PropsType$7 = React$1.PropsWithChildren<{
289
357
  placeholder?: string;
290
358
  activeLinePlaceholder?: string;
291
359
  disableMarkdownHighlight?: boolean;
292
- style?: React$1.CSSProperties;
360
+ style?: React__default.CSSProperties;
293
361
  }>;
294
362
 
295
363
  /**
@@ -297,34 +365,58 @@ type PropsType$7 = React$1.PropsWithChildren<{
297
365
  * SPDX-License-Identifier: MIT
298
366
  */
299
367
 
300
- type PromptEditorPropsType = PropsType$7;
301
- declare function PromptEditor(props: PropsType$7): React$1.JSX.Element;
368
+ type Preset$1 = typeof preset;
369
+ type Options$1 = Partial<InferValues<Preset$1[number]>>;
370
+ interface PromptEditorPropsType extends PropsType$7 {
371
+ options?: Options$1;
372
+ }
373
+ declare function PromptEditor$1(props: PromptEditorPropsType): React__default.JSX.Element;
374
+
375
+ /**
376
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
377
+ * SPDX-License-Identifier: MIT
378
+ */
379
+ declare const PromptEditor: React$1.LazyExoticComponent<typeof PromptEditor$1>;
302
380
 
303
381
  /**
304
382
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
305
383
  * SPDX-License-Identifier: MIT
306
384
  */
307
385
 
308
- declare function PromptEditorWithVariables(props: PromptEditorPropsType): React$1.JSX.Element;
386
+ interface PromptEditorWithVariablesProps extends PromptEditorPropsType {
387
+ }
388
+ declare function PromptEditorWithVariables$1(props: PromptEditorWithVariablesProps): React__default.JSX.Element;
309
389
 
310
390
  /**
311
391
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
312
392
  * SPDX-License-Identifier: MIT
313
393
  */
394
+ declare const PromptEditorWithVariables: React$1.LazyExoticComponent<typeof PromptEditorWithVariables$1>;
314
395
 
315
- interface PropsType$6 extends PromptEditorPropsType {
316
- inputsValues: Record<string, IFlowValue>;
396
+ /**
397
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
398
+ * SPDX-License-Identifier: MIT
399
+ */
400
+
401
+ interface PromptEditorWithInputsProps extends PromptEditorPropsType {
402
+ inputsValues: any;
317
403
  }
318
- declare function PromptEditorWithInputs({ inputsValues, ...restProps }: PropsType$6): React$1.JSX.Element;
404
+ declare function PromptEditorWithInputs$1({ inputsValues, ...restProps }: PromptEditorWithInputsProps): React__default.JSX.Element;
319
405
 
320
406
  /**
321
407
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
322
408
  * SPDX-License-Identifier: MIT
323
409
  */
410
+ declare const PromptEditorWithInputs: React$1.LazyExoticComponent<typeof PromptEditorWithInputs$1>;
324
411
 
325
- type Preset = typeof preset;
412
+ /**
413
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
414
+ * SPDX-License-Identifier: MIT
415
+ */
416
+
417
+ type Preset = typeof preset$1;
326
418
  type Options = Partial<InferValues<Preset[number]>>;
327
- interface CodeEditorPropsType extends React$1.PropsWithChildren<{}> {
419
+ interface CodeEditorPropsType extends React__default.PropsWithChildren<{}> {
328
420
  value?: string;
329
421
  onChange?: (value: string) => void;
330
422
  languageId: 'python' | 'typescript' | 'shell' | 'json';
@@ -334,28 +426,42 @@ interface CodeEditorPropsType extends React$1.PropsWithChildren<{}> {
334
426
  readonly?: boolean;
335
427
  options?: Options;
336
428
  }
337
- declare function CodeEditor({ value, onChange, languageId, theme, children, placeholder, activeLinePlaceholder, options, readonly, }: CodeEditorPropsType): React$1.JSX.Element;
429
+ declare function CodeEditor$1({ value, onChange, languageId, theme, children, placeholder, activeLinePlaceholder, options, readonly, }: CodeEditorPropsType): React__default.JSX.Element;
430
+
431
+ /**
432
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
433
+ * SPDX-License-Identifier: MIT
434
+ */
435
+ declare const CodeEditor: React$1.LazyExoticComponent<typeof CodeEditor$1>;
338
436
 
339
437
  /**
340
438
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
341
439
  * SPDX-License-Identifier: MIT
342
440
  */
343
441
 
344
- declare function CodeEditorMini(props: CodeEditorPropsType): React$1.JSX.Element;
442
+ declare function CodeEditorMini(props: CodeEditorPropsType): React__default.JSX.Element;
345
443
 
346
444
  /**
347
445
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
348
446
  * SPDX-License-Identifier: MIT
349
447
  */
350
448
 
351
- declare function JsonEditorWithVariables(props: Omit<CodeEditorPropsType, 'languageId'>): React$1.JSX.Element;
449
+ interface JsonEditorWithVariablesProps extends Omit<CodeEditorPropsType, 'languageId'> {
450
+ }
451
+ declare function JsonEditorWithVariables$1(props: JsonEditorWithVariablesProps): React__default.JSX.Element;
352
452
 
353
453
  /**
354
454
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
355
455
  * SPDX-License-Identifier: MIT
356
456
  */
457
+ declare const JsonEditorWithVariables: React$1.LazyExoticComponent<typeof JsonEditorWithVariables$1>;
357
458
 
358
- interface PropsType$5 {
459
+ /**
460
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
461
+ * SPDX-License-Identifier: MIT
462
+ */
463
+
464
+ interface PropsType$6 {
359
465
  value?: Record<string, IFlowValue | undefined>;
360
466
  onChange: (value?: Record<string, IFlowValue | undefined>) => void;
361
467
  readonly?: boolean;
@@ -373,14 +479,14 @@ interface PropsType$5 {
373
479
  * SPDX-License-Identifier: MIT
374
480
  */
375
481
 
376
- declare function InputsValues({ value, onChange, style, readonly, constantProps, schema, hasError, }: PropsType$5): React$1.JSX.Element;
482
+ declare function InputsValues({ value, onChange, style, readonly, constantProps, schema, hasError, }: PropsType$6): React__default.JSX.Element;
377
483
 
378
484
  /**
379
485
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
380
486
  * SPDX-License-Identifier: MIT
381
487
  */
382
488
 
383
- interface PropsType$4 {
489
+ interface PropsType$5 {
384
490
  value?: IJsonSchema;
385
491
  parentKey?: string;
386
492
  depth?: number;
@@ -388,57 +494,60 @@ interface PropsType$4 {
388
494
  showIcon?: boolean;
389
495
  typeManager?: JsonSchemaTypeManager;
390
496
  }
391
- declare function DisplaySchemaTree(props: Omit<PropsType$4, 'parentKey' | 'depth'>): React$1.JSX.Element;
497
+ declare function DisplaySchemaTree(props: Omit<PropsType$5, 'parentKey' | 'depth'>): React__default.JSX.Element;
392
498
 
393
499
  /**
394
500
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
395
501
  * SPDX-License-Identifier: MIT
396
502
  */
397
503
 
398
- interface PropsType$3 {
504
+ interface PropsType$4 {
399
505
  value?: IJsonSchema;
400
506
  showIconInTree?: boolean;
401
507
  displayFromScope?: boolean;
402
508
  typeManager?: JsonSchemaTypeManager;
403
509
  }
404
- declare function DisplayOutputs({ value, showIconInTree, displayFromScope }: PropsType$3): React$1.JSX.Element;
510
+ declare function DisplayOutputs({ value, showIconInTree, displayFromScope }: PropsType$4): React__default.JSX.Element;
405
511
 
406
512
  /**
407
513
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
408
514
  * SPDX-License-Identifier: MIT
409
515
  */
410
516
 
411
- interface PropsType$2 {
517
+ interface PropsType$3 {
412
518
  title?: JSX.Element | string;
413
519
  value?: IJsonSchema;
414
520
  showIconInTree?: boolean;
415
521
  warning?: boolean;
416
522
  }
417
- declare function DisplaySchemaTag({ value, showIconInTree, title, warning }: PropsType$2): React$1.JSX.Element;
523
+ declare function DisplaySchemaTag({ value, showIconInTree, title, warning }: PropsType$3): React__default.JSX.Element;
418
524
 
419
525
  /**
420
526
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
421
527
  * SPDX-License-Identifier: MIT
422
528
  */
423
529
 
424
- interface PropsType$1 {
530
+ interface PropsType$2 {
425
531
  value?: IFlowValue;
426
532
  title?: JSX.Element | string;
427
533
  showIconInTree?: boolean;
428
534
  typeManager?: JsonSchemaTypeManager;
429
535
  }
430
- declare function DisplayFlowValue({ value, title, showIconInTree }: PropsType$1): React$1.JSX.Element;
536
+ declare function DisplayFlowValue({ value, title, showIconInTree }: PropsType$2): React__default.JSX.Element;
431
537
 
432
538
  /**
433
539
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
434
540
  * SPDX-License-Identifier: MIT
435
541
  */
436
542
 
437
- interface PropsType {
438
- value?: Record<string, IFlowValue | undefined>;
543
+ interface PropsType$1 {
544
+ value?: any;
439
545
  showIconInTree?: boolean;
440
546
  }
441
- declare function DisplayInputsValues({ value, showIconInTree }: PropsType): React$1.JSX.Element;
547
+ declare function DisplayInputsValues({ value, showIconInTree }: PropsType$1): React__default.JSX.Element;
548
+ declare function DisplayInputsValueAllInTag({ value, title, showIconInTree, }: PropsType$1 & {
549
+ title: string;
550
+ }): React__default.JSX.Element;
442
551
 
443
552
  /**
444
553
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
@@ -449,7 +558,7 @@ interface AssignRowsProps {
449
558
  name: string;
450
559
  readonly?: boolean;
451
560
  }
452
- declare function AssignRows(props: AssignRowsProps): React$1.JSX.Element;
561
+ declare function AssignRows(props: AssignRowsProps): React__default.JSX.Element;
453
562
 
454
563
  /**
455
564
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
@@ -477,7 +586,39 @@ interface AssignRowProps {
477
586
  * SPDX-License-Identifier: MIT
478
587
  */
479
588
 
480
- declare function AssignRow(props: AssignRowProps): React$1.JSX.Element;
589
+ declare function AssignRow(props: AssignRowProps): React__default.JSX.Element;
590
+
591
+ /**
592
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
593
+ * SPDX-License-Identifier: MIT
594
+ */
595
+
596
+ declare function BlurInput(props: InputProps): React__default.JSX.Element;
597
+
598
+ /**
599
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
600
+ * SPDX-License-Identifier: MIT
601
+ */
602
+
603
+ interface PropsType {
604
+ value?: any;
605
+ onChange: (value?: any) => void;
606
+ readonly?: boolean;
607
+ hasError?: boolean;
608
+ schema?: IJsonSchema;
609
+ style?: React.CSSProperties;
610
+ constantProps?: {
611
+ strategies?: Strategy[];
612
+ [key: string]: any;
613
+ };
614
+ }
615
+
616
+ /**
617
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
618
+ * SPDX-License-Identifier: MIT
619
+ */
620
+
621
+ declare function InputsValuesTree(props: PropsType): React__default.JSX.Element;
481
622
 
482
623
  /**
483
624
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
@@ -654,6 +795,136 @@ declare function formatNewRefToLegacyRef(value: NewFlowRefValueSchema): {
654
795
  content: string;
655
796
  };
656
797
 
798
+ /**
799
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
800
+ * SPDX-License-Identifier: MIT
801
+ */
802
+
803
+ /**
804
+ * Creates a material component wrapper with dependency injection support
805
+ *
806
+ * This Higher-Order Component (HOC) implements a dynamic component replacement mechanism
807
+ * for material components. It automatically checks if a custom renderer is registered
808
+ * in the editor context, using the injected component if available, otherwise
809
+ * falling back to the default component.
810
+ *
811
+ * @example
812
+ * ```tsx
813
+ * // 1.Create an injectable material component
814
+ * const InjectVariableSelector = createInjectMaterial(VariableSelector)
815
+ *
816
+ * // 2. Register custom components in editor
817
+ * // Configure in use-editor-props.tsx:
818
+ * const editorProps = {
819
+ * materials: {
820
+ * components: {
821
+ * [VariableSelector.renderKey]: YourCustomVariableSelector
822
+ * }
823
+ * }
824
+ * }
825
+ * ```
826
+ *
827
+ * @description
828
+ * Data flow explanation:
829
+ * - Register components to FlowRendererRegistry in use-editor-props
830
+ * - InjectMaterial reads renderers from FlowRendererRegistry
831
+ * - If registered renderer exists and type is REACT, use injected component
832
+ * - If not exists or type mismatch, fallback to default component
833
+ *
834
+ * @param Component - Default React component
835
+ * @param params - Optional parameters
836
+ * @param params.renderKey - Custom render key name, highest priority
837
+ * @returns Wrapper component with dependency injection support
838
+ */
839
+ declare function createInjectMaterial<Props>(Component: React__default.FC<Props> & {
840
+ renderKey?: string;
841
+ }, params?: {
842
+ renderKey?: string;
843
+ }): React__default.FC<Props>;
844
+
845
+ /**
846
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
847
+ * SPDX-License-Identifier: MIT
848
+ */
849
+
850
+ declare namespace FlowValueUtils {
851
+ /**
852
+ * Check if the value is a constant type
853
+ */
854
+ function isConstant(value: any): value is IFlowConstantValue;
855
+ /**
856
+ * Check if the value is a reference type
857
+ */
858
+ function isRef(value: any): value is IFlowRefValue;
859
+ /**
860
+ * Check if the value is an expression type
861
+ */
862
+ function isExpression(value: any): value is IFlowExpressionValue;
863
+ /**
864
+ * Check if the value is a template type
865
+ */
866
+ function isTemplate(value: any): value is IFlowTemplateValue;
867
+ /**
868
+ * Check if the value is either a constant or reference type
869
+ */
870
+ function isConstantOrRef(value: any): value is IFlowConstantRefValue;
871
+ /**
872
+ * Check if the value is a valid flow value type
873
+ */
874
+ function isFlowValue(value: any): value is IFlowValue;
875
+ /**
876
+ * Traverse all flow values in the given value
877
+ * @param value The value to traverse
878
+ * @param options The options to traverse
879
+ * @returns A generator of flow values
880
+ */
881
+ function traverse(value: any, options: {
882
+ includeTypes?: FlowValueType[];
883
+ path?: string;
884
+ }): Generator<{
885
+ value: IFlowValue;
886
+ path: string;
887
+ }>;
888
+ /**
889
+ * Get all key paths in the template value
890
+ * @param value The template value
891
+ * @returns A list of key paths
892
+ */
893
+ function getTemplateKeyPaths(value: IFlowTemplateValue): string[][];
894
+ /**
895
+ * Infer the schema of the constant value
896
+ * @param value
897
+ * @returns
898
+ */
899
+ function inferConstantJsonSchema(value: IFlowConstantValue): IJsonSchema | undefined;
900
+ /**
901
+ * Infer the schema of the flow value
902
+ * @param values The flow value or object contains flow value
903
+ * @param scope
904
+ * @returns
905
+ */
906
+ function inferJsonSchema(values: any, scope: Scope): IJsonSchema | undefined;
907
+ }
908
+
909
+ /**
910
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
911
+ * SPDX-License-Identifier: MIT
912
+ */
913
+ interface IPolyfillRoot {
914
+ render(children: React.ReactNode): void;
915
+ unmount(): void;
916
+ }
917
+ declare function polyfillCreateRoot(dom: HTMLElement): IPolyfillRoot;
918
+ declare function unstableSetCreateRoot(createRoot: (dom: HTMLElement) => IPolyfillRoot): void;
919
+
920
+ /**
921
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
922
+ * SPDX-License-Identifier: MIT
923
+ */
924
+
925
+ declare function withSuspense<T extends ComponentType<any>>(Component: T, fallback?: React__default.ReactNode): T;
926
+ declare function lazySuspense<T extends ComponentType<any>>(params: Parameters<typeof lazy<T>>[0], fallback?: React__default.ReactNode): React__default.LazyExoticComponent<T>;
927
+
657
928
  /**
658
929
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
659
930
  * SPDX-License-Identifier: MIT
@@ -706,4 +977,26 @@ declare function validateFlowValue(value: IFlowValue | undefined, ctx: Context):
706
977
  message: string;
707
978
  } | undefined;
708
979
 
709
- export { AssignRow, AssignRows, type AssignValueType, BatchOutputs, BatchVariableSelector, CodeEditor, CodeEditorMini, type CodeEditorPropsType, ConditionRow, type ConditionRowValueType, ConstantInput, type ConstantRendererProps, DisplayFlowValue, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, InputsValues, JsonEditorWithVariables, JsonSchemaEditor, JsonSchemaTypePresetProvider, type JsonSchemaTypeRegistry, PromptEditor, type PromptEditorPropsType, PromptEditorWithInputs, PromptEditorWithVariables, TypeSelector, VariableSelector, type VariableSelectorProps, autoRenameRefEffect, createBatchOutputsFormPlugin, createDisableDeclarationPlugin, createInferAssignPlugin, createInferInputsPlugin, createTypePresetPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, listenRefSchemaChange, listenRefValueChange, parseTypeSelectValue, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, useTypeManager, useVariableTree, validateFlowValue, validateWhenVariableSync };
980
+ /**
981
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
982
+ * SPDX-License-Identifier: MIT
983
+ */
984
+ interface ListItem<ValueType> {
985
+ id: string;
986
+ key?: string;
987
+ value?: ValueType;
988
+ }
989
+ type ObjectType<ValueType> = Record<string, ValueType | undefined>;
990
+ declare function useObjectList<ValueType>({ value, onChange, sortIndexKey, }: {
991
+ value?: ObjectType<ValueType>;
992
+ onChange: (value?: ObjectType<ValueType>) => void;
993
+ sortIndexKey?: string | ((item: ValueType | undefined) => string);
994
+ }): {
995
+ list: ListItem<ValueType>[];
996
+ add: (defaultValue?: ValueType) => void;
997
+ updateKey: (itemId: string, key: string) => void;
998
+ updateValue: (itemId: string, value: ValueType) => void;
999
+ remove: (itemId: string) => void;
1000
+ };
1001
+
1002
+ export { AssignRow, AssignRows, type AssignValueType, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, type CodeEditorPropsType, ConditionRow, type ConditionRowValueType, ConstantInput, type Strategy as ConstantInputStrategy, type ConstantRendererProps, type DBConditionOptionType, DBConditionRow, type DBConditionRowValueType, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, type FlowValueType, FlowValueUtils, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, type IPolyfillRoot, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, type JsonEditorWithVariablesProps, JsonSchemaEditor, JsonSchemaTypePresetProvider, type JsonSchemaTypeRegistry, PromptEditor, type PromptEditorPropsType, PromptEditorWithInputs, type PromptEditorWithInputsProps, PromptEditorWithVariables, type PromptEditorWithVariablesProps, TypeSelector, type TypeSelectorProps, VariableSelector, type VariableSelectorProps, VariableSelectorProvider, autoRenameRefEffect, createBatchOutputsFormPlugin, createDisableDeclarationPlugin, createInferAssignPlugin, createInferInputsPlugin, createInjectMaterial, createTypePresetPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, lazySuspense, listenRefSchemaChange, listenRefValueChange, parseTypeSelectValue, polyfillCreateRoot, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, unstableSetCreateRoot, useObjectList, useTypeManager, useVariableTree, validateFlowValue, validateWhenVariableSync, withSuspense };