@flowgram.ai/form-materials 0.1.31 → 0.2.1

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 (46) hide show
  1. package/bin/materials.js +21 -5
  2. package/dist/esm/index.js +570 -54
  3. package/dist/esm/index.js.map +1 -1
  4. package/dist/index.d.mts +206 -28
  5. package/dist/index.d.ts +206 -28
  6. package/dist/index.js +582 -59
  7. package/dist/index.js.map +1 -1
  8. package/package.json +4 -4
  9. package/src/components/batch-variable-selector/config.json +5 -0
  10. package/src/components/batch-variable-selector/index.tsx +19 -0
  11. package/src/components/constant-input/config.json +6 -0
  12. package/src/components/constant-input/index.tsx +81 -0
  13. package/src/components/constant-input/types.ts +18 -0
  14. package/src/components/dynamic-value-input/config.json +5 -0
  15. package/src/components/dynamic-value-input/index.tsx +77 -0
  16. package/src/components/dynamic-value-input/styles.tsx +19 -0
  17. package/src/components/index.ts +6 -3
  18. package/src/components/json-schema-editor/config.json +1 -1
  19. package/src/components/json-schema-editor/hooks.tsx +35 -24
  20. package/src/components/json-schema-editor/index.tsx +3 -3
  21. package/src/components/json-schema-editor/types.ts +3 -3
  22. package/src/components/type-selector/config.json +1 -1
  23. package/src/components/type-selector/constants.tsx +2 -2
  24. package/src/components/type-selector/index.tsx +11 -8
  25. package/src/components/variable-selector/config.json +2 -2
  26. package/src/components/variable-selector/index.tsx +76 -16
  27. package/src/components/variable-selector/styles.tsx +43 -0
  28. package/src/components/variable-selector/use-variable-tree.tsx +34 -6
  29. package/src/effects/index.ts +2 -0
  30. package/src/effects/provide-batch-input/config.json +5 -0
  31. package/src/effects/provide-batch-input/index.ts +38 -0
  32. package/src/effects/provide-batch-outputs/config.json +5 -0
  33. package/src/effects/provide-batch-outputs/index.ts +34 -0
  34. package/src/index.ts +3 -0
  35. package/src/typings/flow-value/config.json +5 -0
  36. package/src/typings/flow-value/index.ts +27 -0
  37. package/src/typings/index.ts +2 -0
  38. package/src/typings/json-schema/config.json +5 -0
  39. package/src/typings/json-schema/index.ts +31 -0
  40. package/src/utils/format-legacy-refs/config.json +5 -0
  41. package/src/utils/format-legacy-refs/index.ts +153 -0
  42. package/src/utils/format-legacy-refs/readme.md +38 -0
  43. package/src/utils/index.ts +2 -0
  44. package/src/utils/json-schema/config.json +5 -0
  45. package/src/utils/json-schema/index.ts +154 -0
  46. package/src/components/type-selector/types.ts +0 -19
package/dist/index.d.mts CHANGED
@@ -1,47 +1,81 @@
1
- import React from 'react';
1
+ import React$1 from 'react';
2
+ import { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
3
+ import { EffectOptions, ASTNodeJSON, ASTNode, BaseType } from '@flowgram.ai/editor';
2
4
 
3
- interface PropTypes$1 {
4
- value?: string;
5
- config: {
6
- placeholder?: string;
7
- };
8
- onChange: (value?: string) => void;
9
- readonly?: boolean;
10
- hasError?: boolean;
11
- style?: React.CSSProperties;
12
- }
13
- declare const VariableSelector: ({ value, config, onChange, style, readonly, hasError, }: PropTypes$1) => React.JSX.Element;
14
-
15
- interface JsonSchema<T = string> {
5
+ type JsonSchemaBasicType = 'boolean' | 'string' | 'integer' | 'number' | 'object' | 'array' | 'map';
6
+ interface IJsonSchema<T = string> {
16
7
  type?: T;
17
8
  default?: any;
18
9
  title?: string;
19
10
  description?: string;
20
11
  enum?: (string | number)[];
21
- properties?: Record<string, JsonSchema>;
22
- additionalProperties?: JsonSchema;
23
- items?: JsonSchema;
12
+ properties?: Record<string, IJsonSchema<T>>;
13
+ additionalProperties?: IJsonSchema<T>;
14
+ items?: IJsonSchema<T>;
24
15
  required?: string[];
25
16
  $ref?: string;
26
17
  extra?: {
27
- order?: number;
28
- literal?: boolean;
18
+ index?: number;
19
+ weak?: boolean;
29
20
  formComponent?: string;
21
+ [key: string]: any;
22
+ };
23
+ }
24
+ type IBasicJsonSchema = IJsonSchema<JsonSchemaBasicType>;
25
+
26
+ interface PropTypes$1 {
27
+ value?: string[];
28
+ config?: {
29
+ placeholder?: string;
30
+ notFoundContent?: string;
30
31
  };
32
+ onChange: (value?: string[]) => void;
33
+ includeSchema?: IJsonSchema | IJsonSchema[];
34
+ excludeSchema?: IJsonSchema | IJsonSchema[];
35
+ readonly?: boolean;
36
+ hasError?: boolean;
37
+ style?: React$1.CSSProperties;
38
+ triggerRender?: (props: TriggerRenderProps) => React$1.ReactNode;
39
+ }
40
+ type VariableSelectorProps = PropTypes$1;
41
+ declare const VariableSelector: ({ value, config, onChange, style, readonly, includeSchema, excludeSchema, hasError, triggerRender, }: PropTypes$1) => React$1.JSX.Element;
42
+
43
+ interface IFlowConstantValue {
44
+ type: 'constant';
45
+ content?: string | number | boolean;
46
+ }
47
+ interface IFlowRefValue {
48
+ type: 'ref';
49
+ content?: string[];
50
+ }
51
+ interface IFlowExpressionValue {
52
+ type: 'expression';
53
+ content?: string;
31
54
  }
55
+ interface IFlowTemplateValue {
56
+ type: 'template';
57
+ content?: string;
58
+ }
59
+ type IFlowValue = IFlowConstantValue | IFlowRefValue | IFlowExpressionValue | IFlowTemplateValue;
60
+ type IFlowConstantRefValue = IFlowConstantValue | IFlowRefValue;
32
61
 
33
62
  declare const VariableTypeIcons: {
34
- [key: string]: React.ReactNode;
63
+ [key: string]: React$1.ReactNode;
35
64
  };
36
65
  declare const ArrayIcons: {
37
- [key: string]: React.ReactNode;
66
+ [key: string]: React$1.ReactNode;
38
67
  };
68
+ declare const getSchemaIcon: (value?: Partial<IJsonSchema>) => React$1.ReactNode;
39
69
 
40
70
  interface PropTypes {
41
- value?: Partial<JsonSchema>;
42
- onChange: (value?: Partial<JsonSchema>) => void;
71
+ value?: Partial<IJsonSchema>;
72
+ onChange: (value?: Partial<IJsonSchema>) => void;
73
+ disabled?: boolean;
74
+ style?: React$1.CSSProperties;
43
75
  }
44
- declare function TypeSelector(props: PropTypes): React.JSX.Element;
76
+ declare const getTypeSelectValue: (value?: Partial<IJsonSchema>) => string[] | undefined;
77
+ declare const parseTypeSelectValue: (value?: string[]) => Partial<IJsonSchema> | undefined;
78
+ declare function TypeSelector(props: PropTypes): React$1.JSX.Element;
45
79
 
46
80
  interface ConfigType {
47
81
  placeholder?: string;
@@ -51,9 +85,153 @@ interface ConfigType {
51
85
  }
52
86
 
53
87
  declare function JsonSchemaEditor(props: {
54
- value?: JsonSchema;
55
- onChange?: (value: JsonSchema) => void;
88
+ value?: IJsonSchema;
89
+ onChange?: (value: IJsonSchema) => void;
56
90
  config?: ConfigType;
57
- }): React.JSX.Element;
91
+ }): React$1.JSX.Element;
92
+
93
+ declare function BatchVariableSelector(props: VariableSelectorProps): React$1.JSX.Element;
94
+
95
+ interface Strategy<Value = any> {
96
+ hit: (schema: IJsonSchema) => boolean;
97
+ Renderer: React.FC<RendererProps<Value>>;
98
+ }
99
+ interface RendererProps<Value = any> {
100
+ value?: Value;
101
+ onChange?: (value: Value) => void;
102
+ readonly?: boolean;
103
+ }
104
+ interface PropsType$1 extends RendererProps {
105
+ schema: IJsonSchema;
106
+ strategies?: Strategy[];
107
+ [key: string]: any;
108
+ }
109
+
110
+ declare function ConstantInput(props: PropsType$1): React$1.JSX.Element;
111
+
112
+ interface PropsType {
113
+ value?: IFlowConstantRefValue;
114
+ onChange: (value?: IFlowConstantRefValue) => void;
115
+ readonly?: boolean;
116
+ hasError?: boolean;
117
+ style?: React$1.CSSProperties;
118
+ schema?: IJsonSchema;
119
+ constantProps?: {
120
+ strategies?: Strategy[];
121
+ [key: string]: any;
122
+ };
123
+ }
124
+ declare function DynamicValueInput({ value, onChange, readonly, style, schema, constantProps, }: PropsType): React$1.JSX.Element;
125
+
126
+ declare const provideBatchInputEffect: EffectOptions[];
127
+
128
+ declare const provideBatchOutputsEffect: EffectOptions[];
129
+
130
+ interface LegacyFlowRefValueSchema {
131
+ type: 'ref';
132
+ content: string;
133
+ }
134
+ interface NewFlowRefValueSchema {
135
+ type: 'ref';
136
+ content: string[];
137
+ }
138
+ /**
139
+ * In flowgram 0.2.0, for introducing Loop variable functionality,
140
+ * the FlowRefValueSchema type definition is updated:
141
+ *
142
+ * interface LegacyFlowRefValueSchema {
143
+ * type: 'ref';
144
+ * content: string;
145
+ * }
146
+ *
147
+ * interface NewFlowRefValueSchema {
148
+ * type: 'ref';
149
+ * content: string[];
150
+ * }
151
+ *
152
+ *
153
+ * For making sure backend json will not be changed, we provide format legacy ref utils for updating the formData
154
+ *
155
+ * How to use:
156
+ *
157
+ * 1. Call formatLegacyRefOnSubmit on the formData before submitting
158
+ * 2. Call formatLegacyRefOnInit on the formData after submitting
159
+ *
160
+ * Example:
161
+ * import { formatLegacyRefOnSubmit, formatLegacyRefOnInit } from '@flowgram.ai/form-materials';
162
+ * formMeta: {
163
+ * formatOnSubmit: (data) => formatLegacyRefOnSubmit(data),
164
+ * formatOnInit: (data) => formatLegacyRefOnInit(data),
165
+ * }
166
+ */
167
+ declare function formatLegacyRefOnSubmit(value: any): any;
168
+ /**
169
+ * In flowgram 0.2.0, for introducing Loop variable functionality,
170
+ * the FlowRefValueSchema type definition is updated:
171
+ *
172
+ * interface LegacyFlowRefValueSchema {
173
+ * type: 'ref';
174
+ * content: string;
175
+ * }
176
+ *
177
+ * interface NewFlowRefValueSchema {
178
+ * type: 'ref';
179
+ * content: string[];
180
+ * }
181
+ *
182
+ *
183
+ * For making sure backend json will not be changed, we provide format legacy ref utils for updating the formData
184
+ *
185
+ * How to use:
186
+ *
187
+ * 1. Call formatLegacyRefOnSubmit on the formData before submitting
188
+ * 2. Call formatLegacyRefOnInit on the formData after submitting
189
+ *
190
+ * Example:
191
+ * import { formatLegacyRefOnSubmit, formatLegacyRefOnInit } from '@flowgram.ai/form-materials';
192
+ *
193
+ * formMeta: {
194
+ * formatOnSubmit: (data) => formatLegacyRefOnSubmit(data),
195
+ * formatOnInit: (data) => formatLegacyRefOnInit(data),
196
+ * }
197
+ */
198
+ declare function formatLegacyRefOnInit(value: any): any;
199
+ declare function isLegacyFlowRefValueSchema(value: any): value is LegacyFlowRefValueSchema;
200
+ declare function isNewFlowRefValueSchema(value: any): value is NewFlowRefValueSchema;
201
+ declare function formatLegacyRefToNewRef(value: LegacyFlowRefValueSchema): {
202
+ type: string;
203
+ content: string[];
204
+ };
205
+ declare function formatNewRefToLegacyRef(value: NewFlowRefValueSchema): {
206
+ type: string;
207
+ content: string;
208
+ };
209
+
210
+ declare namespace JsonSchemaUtils {
211
+ /**
212
+ * Converts a JSON schema to an Abstract Syntax Tree (AST) representation.
213
+ * This function recursively processes the JSON schema and creates corresponding AST nodes.
214
+ *
215
+ * For more information on JSON Schema, refer to the official documentation:
216
+ * https://json-schema.org/
217
+ *
218
+ * @param jsonSchema - The JSON schema to convert.
219
+ * @returns An AST node representing the JSON schema, or undefined if the schema type is not recognized.
220
+ */
221
+ function schemaToAST(jsonSchema: IJsonSchema): ASTNodeJSON | undefined;
222
+ /**
223
+ * Convert AST To JSON Schema
224
+ * @param typeAST
225
+ * @returns
226
+ */
227
+ function astToSchema(typeAST: ASTNode): IJsonSchema | undefined;
228
+ /**
229
+ * Check if the AST type is match the JSON Schema
230
+ * @param typeAST
231
+ * @param schema
232
+ * @returns
233
+ */
234
+ function isASTMatchSchema(typeAST: BaseType, schema: IJsonSchema | IJsonSchema[]): boolean;
235
+ }
58
236
 
59
- export { ArrayIcons, type JsonSchema, JsonSchemaEditor, TypeSelector, VariableSelector, VariableTypeIcons };
237
+ export { ArrayIcons, BatchVariableSelector, 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, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getSchemaIcon, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, parseTypeSelectValue, provideBatchInputEffect, provideBatchOutputsEffect };
package/dist/index.d.ts CHANGED
@@ -1,47 +1,81 @@
1
- import React from 'react';
1
+ import React$1 from 'react';
2
+ import { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
3
+ import { EffectOptions, ASTNodeJSON, ASTNode, BaseType } from '@flowgram.ai/editor';
2
4
 
3
- interface PropTypes$1 {
4
- value?: string;
5
- config: {
6
- placeholder?: string;
7
- };
8
- onChange: (value?: string) => void;
9
- readonly?: boolean;
10
- hasError?: boolean;
11
- style?: React.CSSProperties;
12
- }
13
- declare const VariableSelector: ({ value, config, onChange, style, readonly, hasError, }: PropTypes$1) => React.JSX.Element;
14
-
15
- interface JsonSchema<T = string> {
5
+ type JsonSchemaBasicType = 'boolean' | 'string' | 'integer' | 'number' | 'object' | 'array' | 'map';
6
+ interface IJsonSchema<T = string> {
16
7
  type?: T;
17
8
  default?: any;
18
9
  title?: string;
19
10
  description?: string;
20
11
  enum?: (string | number)[];
21
- properties?: Record<string, JsonSchema>;
22
- additionalProperties?: JsonSchema;
23
- items?: JsonSchema;
12
+ properties?: Record<string, IJsonSchema<T>>;
13
+ additionalProperties?: IJsonSchema<T>;
14
+ items?: IJsonSchema<T>;
24
15
  required?: string[];
25
16
  $ref?: string;
26
17
  extra?: {
27
- order?: number;
28
- literal?: boolean;
18
+ index?: number;
19
+ weak?: boolean;
29
20
  formComponent?: string;
21
+ [key: string]: any;
22
+ };
23
+ }
24
+ type IBasicJsonSchema = IJsonSchema<JsonSchemaBasicType>;
25
+
26
+ interface PropTypes$1 {
27
+ value?: string[];
28
+ config?: {
29
+ placeholder?: string;
30
+ notFoundContent?: string;
30
31
  };
32
+ onChange: (value?: string[]) => void;
33
+ includeSchema?: IJsonSchema | IJsonSchema[];
34
+ excludeSchema?: IJsonSchema | IJsonSchema[];
35
+ readonly?: boolean;
36
+ hasError?: boolean;
37
+ style?: React$1.CSSProperties;
38
+ triggerRender?: (props: TriggerRenderProps) => React$1.ReactNode;
39
+ }
40
+ type VariableSelectorProps = PropTypes$1;
41
+ declare const VariableSelector: ({ value, config, onChange, style, readonly, includeSchema, excludeSchema, hasError, triggerRender, }: PropTypes$1) => React$1.JSX.Element;
42
+
43
+ interface IFlowConstantValue {
44
+ type: 'constant';
45
+ content?: string | number | boolean;
46
+ }
47
+ interface IFlowRefValue {
48
+ type: 'ref';
49
+ content?: string[];
50
+ }
51
+ interface IFlowExpressionValue {
52
+ type: 'expression';
53
+ content?: string;
31
54
  }
55
+ interface IFlowTemplateValue {
56
+ type: 'template';
57
+ content?: string;
58
+ }
59
+ type IFlowValue = IFlowConstantValue | IFlowRefValue | IFlowExpressionValue | IFlowTemplateValue;
60
+ type IFlowConstantRefValue = IFlowConstantValue | IFlowRefValue;
32
61
 
33
62
  declare const VariableTypeIcons: {
34
- [key: string]: React.ReactNode;
63
+ [key: string]: React$1.ReactNode;
35
64
  };
36
65
  declare const ArrayIcons: {
37
- [key: string]: React.ReactNode;
66
+ [key: string]: React$1.ReactNode;
38
67
  };
68
+ declare const getSchemaIcon: (value?: Partial<IJsonSchema>) => React$1.ReactNode;
39
69
 
40
70
  interface PropTypes {
41
- value?: Partial<JsonSchema>;
42
- onChange: (value?: Partial<JsonSchema>) => void;
71
+ value?: Partial<IJsonSchema>;
72
+ onChange: (value?: Partial<IJsonSchema>) => void;
73
+ disabled?: boolean;
74
+ style?: React$1.CSSProperties;
43
75
  }
44
- declare function TypeSelector(props: PropTypes): React.JSX.Element;
76
+ declare const getTypeSelectValue: (value?: Partial<IJsonSchema>) => string[] | undefined;
77
+ declare const parseTypeSelectValue: (value?: string[]) => Partial<IJsonSchema> | undefined;
78
+ declare function TypeSelector(props: PropTypes): React$1.JSX.Element;
45
79
 
46
80
  interface ConfigType {
47
81
  placeholder?: string;
@@ -51,9 +85,153 @@ interface ConfigType {
51
85
  }
52
86
 
53
87
  declare function JsonSchemaEditor(props: {
54
- value?: JsonSchema;
55
- onChange?: (value: JsonSchema) => void;
88
+ value?: IJsonSchema;
89
+ onChange?: (value: IJsonSchema) => void;
56
90
  config?: ConfigType;
57
- }): React.JSX.Element;
91
+ }): React$1.JSX.Element;
92
+
93
+ declare function BatchVariableSelector(props: VariableSelectorProps): React$1.JSX.Element;
94
+
95
+ interface Strategy<Value = any> {
96
+ hit: (schema: IJsonSchema) => boolean;
97
+ Renderer: React.FC<RendererProps<Value>>;
98
+ }
99
+ interface RendererProps<Value = any> {
100
+ value?: Value;
101
+ onChange?: (value: Value) => void;
102
+ readonly?: boolean;
103
+ }
104
+ interface PropsType$1 extends RendererProps {
105
+ schema: IJsonSchema;
106
+ strategies?: Strategy[];
107
+ [key: string]: any;
108
+ }
109
+
110
+ declare function ConstantInput(props: PropsType$1): React$1.JSX.Element;
111
+
112
+ interface PropsType {
113
+ value?: IFlowConstantRefValue;
114
+ onChange: (value?: IFlowConstantRefValue) => void;
115
+ readonly?: boolean;
116
+ hasError?: boolean;
117
+ style?: React$1.CSSProperties;
118
+ schema?: IJsonSchema;
119
+ constantProps?: {
120
+ strategies?: Strategy[];
121
+ [key: string]: any;
122
+ };
123
+ }
124
+ declare function DynamicValueInput({ value, onChange, readonly, style, schema, constantProps, }: PropsType): React$1.JSX.Element;
125
+
126
+ declare const provideBatchInputEffect: EffectOptions[];
127
+
128
+ declare const provideBatchOutputsEffect: EffectOptions[];
129
+
130
+ interface LegacyFlowRefValueSchema {
131
+ type: 'ref';
132
+ content: string;
133
+ }
134
+ interface NewFlowRefValueSchema {
135
+ type: 'ref';
136
+ content: string[];
137
+ }
138
+ /**
139
+ * In flowgram 0.2.0, for introducing Loop variable functionality,
140
+ * the FlowRefValueSchema type definition is updated:
141
+ *
142
+ * interface LegacyFlowRefValueSchema {
143
+ * type: 'ref';
144
+ * content: string;
145
+ * }
146
+ *
147
+ * interface NewFlowRefValueSchema {
148
+ * type: 'ref';
149
+ * content: string[];
150
+ * }
151
+ *
152
+ *
153
+ * For making sure backend json will not be changed, we provide format legacy ref utils for updating the formData
154
+ *
155
+ * How to use:
156
+ *
157
+ * 1. Call formatLegacyRefOnSubmit on the formData before submitting
158
+ * 2. Call formatLegacyRefOnInit on the formData after submitting
159
+ *
160
+ * Example:
161
+ * import { formatLegacyRefOnSubmit, formatLegacyRefOnInit } from '@flowgram.ai/form-materials';
162
+ * formMeta: {
163
+ * formatOnSubmit: (data) => formatLegacyRefOnSubmit(data),
164
+ * formatOnInit: (data) => formatLegacyRefOnInit(data),
165
+ * }
166
+ */
167
+ declare function formatLegacyRefOnSubmit(value: any): any;
168
+ /**
169
+ * In flowgram 0.2.0, for introducing Loop variable functionality,
170
+ * the FlowRefValueSchema type definition is updated:
171
+ *
172
+ * interface LegacyFlowRefValueSchema {
173
+ * type: 'ref';
174
+ * content: string;
175
+ * }
176
+ *
177
+ * interface NewFlowRefValueSchema {
178
+ * type: 'ref';
179
+ * content: string[];
180
+ * }
181
+ *
182
+ *
183
+ * For making sure backend json will not be changed, we provide format legacy ref utils for updating the formData
184
+ *
185
+ * How to use:
186
+ *
187
+ * 1. Call formatLegacyRefOnSubmit on the formData before submitting
188
+ * 2. Call formatLegacyRefOnInit on the formData after submitting
189
+ *
190
+ * Example:
191
+ * import { formatLegacyRefOnSubmit, formatLegacyRefOnInit } from '@flowgram.ai/form-materials';
192
+ *
193
+ * formMeta: {
194
+ * formatOnSubmit: (data) => formatLegacyRefOnSubmit(data),
195
+ * formatOnInit: (data) => formatLegacyRefOnInit(data),
196
+ * }
197
+ */
198
+ declare function formatLegacyRefOnInit(value: any): any;
199
+ declare function isLegacyFlowRefValueSchema(value: any): value is LegacyFlowRefValueSchema;
200
+ declare function isNewFlowRefValueSchema(value: any): value is NewFlowRefValueSchema;
201
+ declare function formatLegacyRefToNewRef(value: LegacyFlowRefValueSchema): {
202
+ type: string;
203
+ content: string[];
204
+ };
205
+ declare function formatNewRefToLegacyRef(value: NewFlowRefValueSchema): {
206
+ type: string;
207
+ content: string;
208
+ };
209
+
210
+ declare namespace JsonSchemaUtils {
211
+ /**
212
+ * Converts a JSON schema to an Abstract Syntax Tree (AST) representation.
213
+ * This function recursively processes the JSON schema and creates corresponding AST nodes.
214
+ *
215
+ * For more information on JSON Schema, refer to the official documentation:
216
+ * https://json-schema.org/
217
+ *
218
+ * @param jsonSchema - The JSON schema to convert.
219
+ * @returns An AST node representing the JSON schema, or undefined if the schema type is not recognized.
220
+ */
221
+ function schemaToAST(jsonSchema: IJsonSchema): ASTNodeJSON | undefined;
222
+ /**
223
+ * Convert AST To JSON Schema
224
+ * @param typeAST
225
+ * @returns
226
+ */
227
+ function astToSchema(typeAST: ASTNode): IJsonSchema | undefined;
228
+ /**
229
+ * Check if the AST type is match the JSON Schema
230
+ * @param typeAST
231
+ * @param schema
232
+ * @returns
233
+ */
234
+ function isASTMatchSchema(typeAST: BaseType, schema: IJsonSchema | IJsonSchema[]): boolean;
235
+ }
58
236
 
59
- export { ArrayIcons, type JsonSchema, JsonSchemaEditor, TypeSelector, VariableSelector, VariableTypeIcons };
237
+ export { ArrayIcons, BatchVariableSelector, 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, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getSchemaIcon, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, parseTypeSelectValue, provideBatchInputEffect, provideBatchOutputsEffect };