@flowgram.ai/form-materials 0.4.18 → 0.5.0

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 (83) hide show
  1. package/bin/run.sh +2 -1
  2. package/dist/cjs/components/code-editor/editor-all.js +52 -0
  3. package/dist/cjs/components/code-editor/editor-json.js +71 -0
  4. package/dist/cjs/components/code-editor/editor-python.js +63 -0
  5. package/dist/cjs/components/code-editor/editor-shell.js +63 -0
  6. package/dist/cjs/components/code-editor/editor-sql.js +71 -0
  7. package/dist/cjs/components/code-editor/editor-ts.js +80 -0
  8. package/dist/cjs/components/code-editor/editor.js +41 -30
  9. package/dist/cjs/components/code-editor/factory.js +96 -0
  10. package/dist/cjs/components/code-editor/index.js +31 -36
  11. package/dist/cjs/components/code-editor/theme/dark.js +1 -1
  12. package/dist/cjs/components/code-editor/theme/light.js +1 -1
  13. package/dist/cjs/components/code-editor/utils.js +1 -0
  14. package/dist/cjs/components/index.js +38 -3
  15. package/dist/cjs/components/json-editor-with-variables/editor.js +1 -2
  16. package/dist/cjs/components/sql-editor-with-variables/editor.js +53 -0
  17. package/dist/cjs/components/sql-editor-with-variables/index.js +57 -0
  18. package/dist/cjs/index.js +35 -2
  19. package/dist/cjs/plugins/json-schema-preset/type-definition/array.js +3 -3
  20. package/dist/cjs/plugins/json-schema-preset/type-definition/map.js +3 -3
  21. package/dist/cjs/plugins/json-schema-preset/type-definition/object.js +3 -3
  22. package/dist/esm/components/code-editor/editor-all.mjs +18 -0
  23. package/dist/esm/components/code-editor/editor-json.mjs +16 -0
  24. package/dist/esm/components/code-editor/editor-python.mjs +8 -0
  25. package/dist/esm/components/code-editor/editor-shell.mjs +8 -0
  26. package/dist/esm/components/code-editor/editor-sql.mjs +16 -0
  27. package/dist/esm/components/code-editor/editor-ts.mjs +22 -0
  28. package/dist/esm/components/code-editor/editor.mjs +38 -28
  29. package/dist/esm/components/code-editor/factory.mjs +36 -0
  30. package/dist/esm/components/code-editor/index.mjs +8 -8
  31. package/dist/esm/components/code-editor/theme/dark.mjs +1 -1
  32. package/dist/esm/components/code-editor/theme/light.mjs +1 -1
  33. package/dist/esm/components/code-editor/utils.mjs +1 -0
  34. package/dist/esm/components/index.mjs +4 -2
  35. package/dist/esm/components/json-editor-with-variables/editor.mjs +2 -3
  36. package/dist/esm/components/sql-editor-with-variables/editor.mjs +19 -0
  37. package/dist/esm/components/sql-editor-with-variables/index.mjs +5 -0
  38. package/dist/esm/index.mjs +2 -2
  39. package/dist/esm/plugins/json-schema-preset/type-definition/array.mjs +3 -3
  40. package/dist/esm/plugins/json-schema-preset/type-definition/map.mjs +3 -3
  41. package/dist/esm/plugins/json-schema-preset/type-definition/object.mjs +3 -3
  42. package/dist/tsconfig.tsbuildinfo +1 -1
  43. package/dist/types/components/code-editor/editor-all.d.ts +8 -0
  44. package/dist/types/components/code-editor/editor-json.d.ts +6 -0
  45. package/dist/types/components/code-editor/editor-python.d.ts +6 -0
  46. package/dist/types/components/code-editor/editor-shell.d.ts +6 -0
  47. package/dist/types/components/code-editor/editor-sql.d.ts +6 -0
  48. package/dist/types/components/code-editor/editor-ts.d.ts +6 -0
  49. package/dist/types/components/code-editor/editor.d.ts +3 -2
  50. package/dist/types/components/code-editor/factory.d.ts +13 -0
  51. package/dist/types/components/code-editor/index.d.ts +7 -2
  52. package/dist/types/components/code-editor/utils.d.ts +1 -1
  53. package/dist/types/components/code-editor-mini/index.d.ts +3 -0
  54. package/dist/types/components/index.d.ts +4 -2
  55. package/dist/types/components/sql-editor-with-variables/editor.d.ts +9 -0
  56. package/dist/types/components/sql-editor-with-variables/index.d.ts +6 -0
  57. package/dist/types/index.d.ts +1 -1
  58. package/package.json +7 -8
  59. package/src/components/code-editor/editor-all.tsx +30 -0
  60. package/src/components/code-editor/editor-json.tsx +25 -0
  61. package/src/components/code-editor/editor-python.tsx +18 -0
  62. package/src/components/code-editor/editor-shell.tsx +18 -0
  63. package/src/components/code-editor/editor-sql.tsx +24 -0
  64. package/src/components/code-editor/editor-ts.tsx +31 -0
  65. package/src/components/code-editor/editor.tsx +45 -33
  66. package/src/components/code-editor/factory.tsx +61 -0
  67. package/src/components/code-editor/index.tsx +7 -9
  68. package/src/components/code-editor/theme/dark.ts +1 -1
  69. package/src/components/code-editor/theme/light.ts +1 -1
  70. package/src/components/code-editor/utils.ts +4 -0
  71. package/src/components/code-editor-mini/index.tsx +3 -0
  72. package/src/components/index.ts +25 -2
  73. package/src/components/json-editor-with-variables/editor.tsx +3 -4
  74. package/src/components/sql-editor-with-variables/editor.tsx +28 -0
  75. package/src/components/sql-editor-with-variables/index.tsx +12 -0
  76. package/src/index.ts +19 -3
  77. package/src/plugins/json-schema-preset/type-definition/array.tsx +3 -3
  78. package/src/plugins/json-schema-preset/type-definition/map.tsx +3 -3
  79. package/src/plugins/json-schema-preset/type-definition/object.tsx +3 -3
  80. package/dist/cjs/components/code-editor/language-features.js +0 -124
  81. package/dist/esm/components/code-editor/language-features.mjs +0 -51
  82. package/dist/types/components/code-editor/language-features.d.ts +0 -8
  83. package/src/components/code-editor/language-features.ts +0 -61
@@ -0,0 +1,22 @@
1
+ import { languages } from "@flowgram.ai/coze-editor/preset-code";
2
+ import { CodeEditorFactory } from "./factory.mjs";
3
+ const loadTypescriptLanguage = ()=>import("@flowgram.ai/coze-editor/language-typescript").then((module)=>{
4
+ languages.register("typescript", module.typescript);
5
+ const tsWorker = new Worker(new URL("@flowgram.ai/coze-editor/language-typescript/worker", import.meta.url), {
6
+ type: 'module'
7
+ });
8
+ module.typescript.languageService.initialize(tsWorker, {
9
+ compilerOptions: {
10
+ lib: [
11
+ 'es2015',
12
+ 'dom'
13
+ ],
14
+ noImplicitAny: false
15
+ }
16
+ });
17
+ });
18
+ const TypeScriptCodeEditor = CodeEditorFactory(loadTypescriptLanguage, {
19
+ displayName: 'TypeScriptCodeEditor',
20
+ fixLanguageId: "typescript"
21
+ });
22
+ export { TypeScriptCodeEditor, loadTypescriptLanguage };
@@ -1,11 +1,10 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef } from "react";
3
+ import styled_components, { css } from "styled-components";
3
4
  import { ActiveLinePlaceholder, EditorProvider, createRenderer } from "@flowgram.ai/coze-editor/react";
4
5
  import preset_code from "@flowgram.ai/coze-editor/preset-code";
5
- import { Skeleton } from "@douyinfe/semi-ui";
6
6
  import { EditorView } from "@codemirror/view";
7
7
  import { getSuffixByLanguageId } from "./utils.mjs";
8
- import { useDynamicLoadLanguage } from "./language-features.mjs";
9
8
  const OriginCodeEditor = createRenderer(preset_code, [
10
9
  EditorView.theme({
11
10
  '&.cm-focused': {
@@ -13,38 +12,49 @@ const OriginCodeEditor = createRenderer(preset_code, [
13
12
  }
14
13
  })
15
14
  ]);
16
- function CodeEditor({ value, onChange, languageId = 'python', theme = 'light', children, placeholder, activeLinePlaceholder, options, readonly }) {
17
- const { loaded } = useDynamicLoadLanguage(languageId);
15
+ const UIContainer = styled_components.div`
16
+ ${({ $mini })=>$mini && css`
17
+ height: 24px;
18
+ `}
19
+ `;
20
+ function BaseCodeEditor({ value, onChange, languageId = 'python', theme = 'light', children, placeholder, activeLinePlaceholder, options, readonly, mini }) {
18
21
  const editorRef = useRef(null);
19
22
  useEffect(()=>{
20
23
  if (editorRef.current?.getValue() !== value) editorRef.current?.setValue(String(value || ''));
21
24
  }, [
22
25
  value
23
26
  ]);
24
- if (!loaded) return /*#__PURE__*/ jsx(Skeleton, {});
25
- return /*#__PURE__*/ jsx(EditorProvider, {
26
- children: /*#__PURE__*/ jsxs(OriginCodeEditor, {
27
- defaultValue: String(value || ''),
28
- options: {
29
- uri: `file:///untitled${getSuffixByLanguageId(languageId)}`,
30
- languageId,
31
- theme,
32
- placeholder,
33
- readOnly: readonly,
34
- editable: !readonly,
35
- ...options || {}
36
- },
37
- didMount: (editor)=>{
38
- editorRef.current = editor;
39
- },
40
- onChange: (e)=>onChange?.(e.value),
41
- children: [
42
- activeLinePlaceholder && /*#__PURE__*/ jsx(ActiveLinePlaceholder, {
43
- children: activeLinePlaceholder
44
- }),
45
- children
46
- ]
27
+ return /*#__PURE__*/ jsx(UIContainer, {
28
+ $mini: mini,
29
+ children: /*#__PURE__*/ jsx(EditorProvider, {
30
+ children: /*#__PURE__*/ jsxs(OriginCodeEditor, {
31
+ defaultValue: String(value || ''),
32
+ options: {
33
+ uri: `file:///untitled${getSuffixByLanguageId(languageId)}`,
34
+ languageId,
35
+ theme,
36
+ placeholder,
37
+ readOnly: readonly,
38
+ editable: !readonly,
39
+ ...mini ? {
40
+ lineNumbersGutter: false,
41
+ foldGutter: false,
42
+ minHeight: 24
43
+ } : {},
44
+ ...options || {}
45
+ },
46
+ didMount: (editor)=>{
47
+ editorRef.current = editor;
48
+ },
49
+ onChange: (e)=>onChange?.(e.value),
50
+ children: [
51
+ activeLinePlaceholder && /*#__PURE__*/ jsx(ActiveLinePlaceholder, {
52
+ children: activeLinePlaceholder
53
+ }),
54
+ children
55
+ ]
56
+ })
47
57
  })
48
58
  });
49
59
  }
50
- export { CodeEditor };
60
+ export { BaseCodeEditor };
@@ -0,0 +1,36 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useEffect, useMemo, useState } from "react";
3
+ import { languages } from "@flowgram.ai/coze-editor/preset-code";
4
+ import { Skeleton } from "@douyinfe/semi-ui";
5
+ import { lazySuspense } from "../../shared/index.mjs";
6
+ const BaseCodeEditor = lazySuspense(()=>Promise.all([
7
+ import("./editor.mjs"),
8
+ import("./theme/index.mjs")
9
+ ]).then(([editorModule])=>({
10
+ default: editorModule.BaseCodeEditor
11
+ })));
12
+ const CodeEditorFactory = (loadLanguage, { displayName, fixLanguageId })=>{
13
+ const EditorWithLoad = (props)=>{
14
+ const { languageId = fixLanguageId } = props;
15
+ if (!languageId) throw new Error('CodeEditorFactory: languageId is required');
16
+ const [loaded, setLoaded] = useState(useMemo(()=>!!languages.get(languageId), [
17
+ languageId
18
+ ]));
19
+ useEffect(()=>{
20
+ if (!loaded && loadLanguage) loadLanguage(languageId).then(()=>{
21
+ setLoaded(true);
22
+ });
23
+ }, [
24
+ languageId,
25
+ loaded
26
+ ]);
27
+ if (!loaded) return /*#__PURE__*/ jsx(Skeleton, {});
28
+ return /*#__PURE__*/ jsx(BaseCodeEditor, {
29
+ ...props,
30
+ languageId: fixLanguageId || languageId
31
+ });
32
+ };
33
+ EditorWithLoad.displayName = displayName;
34
+ return EditorWithLoad;
35
+ };
36
+ export { BaseCodeEditor, CodeEditorFactory };
@@ -1,8 +1,8 @@
1
- import { lazySuspense } from "../../shared/index.mjs";
2
- const CodeEditor = lazySuspense(()=>Promise.all([
3
- import("./editor.mjs"),
4
- import("./theme/index.mjs")
5
- ]).then(([editorModule])=>({
6
- default: editorModule.CodeEditor
7
- })));
8
- export { CodeEditor };
1
+ import { CodeEditor } from "./editor-all.mjs";
2
+ import { TypeScriptCodeEditor } from "./editor-ts.mjs";
3
+ import { ShellCodeEditor } from "./editor-shell.mjs";
4
+ import { JsonCodeEditor } from "./editor-json.mjs";
5
+ import { SQLCodeEditor } from "./editor-sql.mjs";
6
+ import { PythonCodeEditor } from "./editor-python.mjs";
7
+ import { BaseCodeEditor } from "./editor.mjs";
8
+ export { BaseCodeEditor, CodeEditor, JsonCodeEditor, PythonCodeEditor, SQLCodeEditor, ShellCodeEditor, TypeScriptCodeEditor };
@@ -39,7 +39,7 @@ const darkTheme = createTheme({
39
39
  gutterForeground: colors.foreground,
40
40
  gutterBorderColor: 'transparent',
41
41
  gutterBorderWidth: 0,
42
- lineHighlight: '#21262D',
42
+ lineHighlight: 'transparent',
43
43
  bracketColors: [
44
44
  '#FBBF24',
45
45
  '#A78BFA',
@@ -34,7 +34,7 @@ const lightTheme = createTheme({
34
34
  gutterForeground: colors.foreground,
35
35
  gutterBorderColor: 'transparent',
36
36
  gutterBorderWidth: 0,
37
- lineHighlight: colors.background,
37
+ lineHighlight: 'transparent',
38
38
  bracketColors: [
39
39
  '#F59E0B',
40
40
  '#8B5CF6',
@@ -3,6 +3,7 @@ function getSuffixByLanguageId(languageId) {
3
3
  if ("typescript" === languageId) return '.ts';
4
4
  if ('shell' === languageId) return '.sh';
5
5
  if ('json' === languageId) return '.json';
6
+ if ('sql' === languageId) return '.sql';
6
7
  return '';
7
8
  }
8
9
  export { getSuffixByLanguageId };
@@ -3,8 +3,9 @@ import { AssignRows } from "./assign-rows/index.mjs";
3
3
  import { BatchOutputs } from "./batch-outputs/index.mjs";
4
4
  import { BatchVariableSelector } from "./batch-variable-selector/index.mjs";
5
5
  import { BlurInput } from "./blur-input/index.mjs";
6
- import { CodeEditor } from "./code-editor/index.mjs";
6
+ import { BaseCodeEditor, CodeEditor, JsonCodeEditor, PythonCodeEditor, SQLCodeEditor, ShellCodeEditor, TypeScriptCodeEditor } from "./code-editor/index.mjs";
7
7
  import { CodeEditorMini } from "./code-editor-mini/index.mjs";
8
+ import { ConditionPresetOp, ConditionProvider, useCondition, useConditionContext } from "./condition-context/index.mjs";
8
9
  import { ConditionRow } from "./condition-row/index.mjs";
9
10
  import { ConstantInput } from "./constant-input/index.mjs";
10
11
  import { EditorInputsTree, EditorVariableTagInject, EditorVariableTree } from "./coze-editor-extensions/index.mjs";
@@ -22,6 +23,7 @@ import { JsonSchemaEditor } from "./json-schema-editor/index.mjs";
22
23
  import { PromptEditor } from "./prompt-editor/index.mjs";
23
24
  import { PromptEditorWithInputs } from "./prompt-editor-with-inputs/index.mjs";
24
25
  import { PromptEditorWithVariables } from "./prompt-editor-with-variables/index.mjs";
26
+ import { SQLEditorWithVariables } from "./sql-editor-with-variables/index.mjs";
25
27
  import { InjectTypeSelector, TypeSelector, getTypeSelectValue, parseTypeSelectValue } from "./type-selector/index.mjs";
26
28
  import { InjectVariableSelector, VariableSelector, VariableSelectorProvider, useVariableTree } from "./variable-selector/index.mjs";
27
- export { AssignRow, AssignRows, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, ConditionRow, ConstantInput, DBConditionRow, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, EditorInputsTree, EditorVariableTagInject, EditorVariableTree, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, JsonSchemaEditor, PromptEditor, PromptEditorWithInputs, PromptEditorWithVariables, TypeSelector, VariableSelector, VariableSelectorProvider, getTypeSelectValue, parseTypeSelectValue, useVariableTree };
29
+ export { AssignRow, AssignRows, BaseCodeEditor, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, ConditionPresetOp, ConditionProvider, ConditionRow, ConstantInput, DBConditionRow, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, EditorInputsTree, EditorVariableTagInject, EditorVariableTree, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonCodeEditor, JsonEditorWithVariables, JsonSchemaEditor, PromptEditor, PromptEditorWithInputs, PromptEditorWithVariables, PythonCodeEditor, SQLCodeEditor, SQLEditorWithVariables, ShellCodeEditor, TypeScriptCodeEditor, TypeSelector, VariableSelector, VariableSelectorProvider, getTypeSelectValue, parseTypeSelectValue, useCondition, useConditionContext, useVariableTree };
@@ -3,7 +3,7 @@ import "react";
3
3
  import { I18n } from "@flowgram.ai/editor";
4
4
  import { transformerCreator } from "@flowgram.ai/coze-editor/preset-code";
5
5
  import { EditorVariableTagInject, EditorVariableTree } from "../coze-editor-extensions/index.mjs";
6
- import { CodeEditor } from "../code-editor/index.mjs";
6
+ import { JsonCodeEditor } from "../code-editor/index.mjs";
7
7
  const TRIGGER_CHARACTERS = [
8
8
  '@'
9
9
  ];
@@ -32,8 +32,7 @@ const transformer = transformerCreator((text)=>{
32
32
  return text;
33
33
  });
34
34
  function JsonEditorWithVariables(props) {
35
- return /*#__PURE__*/ jsxs(CodeEditor, {
36
- languageId: "json",
35
+ return /*#__PURE__*/ jsxs(JsonCodeEditor, {
37
36
  activeLinePlaceholder: I18n.t("Press '@' to Select variable"),
38
37
  ...props,
39
38
  options: {
@@ -0,0 +1,19 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { I18n } from "@flowgram.ai/editor";
4
+ import { EditorVariableTagInject, EditorVariableTree } from "../coze-editor-extensions/index.mjs";
5
+ import { SQLCodeEditor } from "../code-editor/index.mjs";
6
+ function SQLEditorWithVariables(props) {
7
+ return /*#__PURE__*/ jsxs(SQLCodeEditor, {
8
+ activeLinePlaceholder: I18n.t("Press '@' to Select variable"),
9
+ ...props,
10
+ options: {
11
+ ...props.options || {}
12
+ },
13
+ children: [
14
+ /*#__PURE__*/ jsx(EditorVariableTree, {}),
15
+ /*#__PURE__*/ jsx(EditorVariableTagInject, {})
16
+ ]
17
+ });
18
+ }
19
+ export { SQLEditorWithVariables };
@@ -0,0 +1,5 @@
1
+ import { lazySuspense } from "../../shared/index.mjs";
2
+ const SQLEditorWithVariables = lazySuspense(()=>import("./editor.mjs").then((module)=>({
3
+ default: module.SQLEditorWithVariables
4
+ })));
5
+ export { SQLEditorWithVariables };
@@ -1,8 +1,8 @@
1
- import { AssignRow, AssignRows, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, ConditionRow, ConstantInput, DBConditionRow, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, EditorInputsTree, EditorVariableTagInject, EditorVariableTree, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, JsonSchemaEditor, PromptEditor, PromptEditorWithInputs, PromptEditorWithVariables, TypeSelector, VariableSelector, VariableSelectorProvider, getTypeSelectValue, parseTypeSelectValue, useVariableTree } from "./components/index.mjs";
1
+ import { AssignRow, AssignRows, BaseCodeEditor, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, ConditionPresetOp, ConditionProvider, ConditionRow, ConstantInput, DBConditionRow, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, EditorInputsTree, EditorVariableTagInject, EditorVariableTree, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonCodeEditor, JsonEditorWithVariables, JsonSchemaEditor, PromptEditor, PromptEditorWithInputs, PromptEditorWithVariables, PythonCodeEditor, SQLCodeEditor, SQLEditorWithVariables, ShellCodeEditor, TypeScriptCodeEditor, TypeSelector, VariableSelector, VariableSelectorProvider, getTypeSelectValue, parseTypeSelectValue, useCondition, useConditionContext, useVariableTree } from "./components/index.mjs";
2
2
  import { autoRenameRefEffect, listenRefSchemaChange, listenRefValueChange, provideBatchInputEffect, provideJsonSchemaOutputs, syncVariableTitle, validateWhenVariableSync } from "./effects/index.mjs";
3
3
  import { createBatchOutputsFormPlugin, createInferAssignPlugin, createInferInputsPlugin, provideBatchOutputsEffect } from "./form-plugins/index.mjs";
4
4
  import { useObjectList } from "./hooks/index.mjs";
5
5
  import { JsonSchemaTypePresetProvider, JsonSchemaUtils, createDisableDeclarationPlugin, createTypePresetPlugin, useTypeManager } from "./plugins/index.mjs";
6
6
  import { FlowValueUtils, createInjectMaterial, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, lazySuspense, polyfillCreateRoot, unstableSetCreateRoot, withSuspense } from "./shared/index.mjs";
7
7
  import { validateFlowValue } from "./validate/index.mjs";
8
- export { AssignRow, AssignRows, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, ConditionRow, ConstantInput, DBConditionRow, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, EditorInputsTree, EditorVariableTagInject, EditorVariableTree, FlowValueUtils, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, JsonSchemaEditor, JsonSchemaTypePresetProvider, JsonSchemaUtils, PromptEditor, PromptEditorWithInputs, PromptEditorWithVariables, TypeSelector, VariableSelector, 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 };
8
+ export { AssignRow, AssignRows, BaseCodeEditor, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, ConditionPresetOp, ConditionProvider, ConditionRow, ConstantInput, DBConditionRow, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, EditorInputsTree, EditorVariableTagInject, EditorVariableTree, FlowValueUtils, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonCodeEditor, JsonEditorWithVariables, JsonSchemaEditor, JsonSchemaTypePresetProvider, JsonSchemaUtils, PromptEditor, PromptEditorWithInputs, PromptEditorWithVariables, PythonCodeEditor, SQLCodeEditor, SQLEditorWithVariables, ShellCodeEditor, TypeScriptCodeEditor, TypeSelector, VariableSelector, 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, useCondition, useConditionContext, useObjectList, useTypeManager, useVariableTree, validateFlowValue, validateWhenVariableSync, withSuspense };
@@ -2,12 +2,12 @@ import { jsx } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { I18n } from "@flowgram.ai/editor";
4
4
  import { ConditionPresetOp } from "../../../components/condition-context/op.mjs";
5
- import { CodeEditorMini } from "../../../components/code-editor-mini/index.mjs";
5
+ import { JsonCodeEditor } from "../../../components/code-editor/index.mjs";
6
6
  const arrayRegistry = {
7
7
  type: 'array',
8
- ConstantRenderer: (props)=>/*#__PURE__*/ jsx(CodeEditorMini, {
8
+ ConstantRenderer: (props)=>/*#__PURE__*/ jsx(JsonCodeEditor, {
9
+ mini: true,
9
10
  value: props.value,
10
- languageId: "json",
11
11
  onChange: (v)=>props.onChange?.(v),
12
12
  placeholder: I18n.t('Please Input Array'),
13
13
  readonly: props.readonly
@@ -2,13 +2,13 @@ import { jsx } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { I18n } from "@flowgram.ai/editor";
4
4
  import { ConditionPresetOp } from "../../../components/condition-context/op.mjs";
5
- import { CodeEditorMini } from "../../../components/code-editor-mini/index.mjs";
5
+ import { JsonCodeEditor } from "../../../components/code-editor/index.mjs";
6
6
  const mapRegistry = {
7
7
  type: 'map',
8
- ConstantRenderer: (props)=>/*#__PURE__*/ jsx(CodeEditorMini, {
8
+ ConstantRenderer: (props)=>/*#__PURE__*/ jsx(JsonCodeEditor, {
9
+ mini: true,
9
10
  value: props.value,
10
11
  onChange: (v)=>props.onChange?.(v),
11
- languageId: "json",
12
12
  placeholder: I18n.t('Please Input Map'),
13
13
  readonly: props.readonly
14
14
  }),
@@ -2,13 +2,13 @@ import { jsx } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { I18n } from "@flowgram.ai/editor";
4
4
  import { ConditionPresetOp } from "../../../components/condition-context/op.mjs";
5
- import { CodeEditorMini } from "../../../components/code-editor-mini/index.mjs";
5
+ import { JsonCodeEditor } from "../../../components/code-editor/index.mjs";
6
6
  const objectRegistry = {
7
7
  type: 'object',
8
- ConstantRenderer: (props)=>/*#__PURE__*/ jsx(CodeEditorMini, {
8
+ ConstantRenderer: (props)=>/*#__PURE__*/ jsx(JsonCodeEditor, {
9
+ mini: true,
9
10
  value: props.value,
10
11
  onChange: (v)=>props.onChange?.(v),
11
- languageId: "json",
12
12
  placeholder: I18n.t('Please Input Object'),
13
13
  readonly: props.readonly
14
14
  }),
@@ -1 +1 @@
1
- {"root":["../src/index.ts","../src/components/index.ts","../src/components/assign-row/index.tsx","../src/components/assign-row/types.ts","../src/components/assign-rows/index.tsx","../src/components/batch-outputs/index.tsx","../src/components/batch-outputs/styles.tsx","../src/components/batch-outputs/types.ts","../src/components/batch-variable-selector/index.tsx","../src/components/blur-input/index.tsx","../src/components/code-editor/editor.tsx","../src/components/code-editor/index.tsx","../src/components/code-editor/language-features.ts","../src/components/code-editor/utils.ts","../src/components/code-editor/theme/dark.ts","../src/components/code-editor/theme/index.ts","../src/components/code-editor/theme/light.ts","../src/components/code-editor-mini/index.tsx","../src/components/condition-context/context.tsx","../src/components/condition-context/index.tsx","../src/components/condition-context/op.ts","../src/components/condition-context/types.ts","../src/components/condition-context/hooks/use-condition.tsx","../src/components/condition-row/index.tsx","../src/components/condition-row/styles.tsx","../src/components/condition-row/types.ts","../src/components/constant-input/index.tsx","../src/components/constant-input/types.ts","../src/components/coze-editor-extensions/index.tsx","../src/components/coze-editor-extensions/styles.tsx","../src/components/coze-editor-extensions/extensions/inputs-tree.tsx","../src/components/coze-editor-extensions/extensions/variable-tag.tsx","../src/components/coze-editor-extensions/extensions/variable-tree.tsx","../src/components/db-condition-row/index.tsx","../src/components/db-condition-row/styles.tsx","../src/components/db-condition-row/types.ts","../src/components/display-flow-value/index.tsx","../src/components/display-inputs-values/index.tsx","../src/components/display-inputs-values/styles.ts","../src/components/display-outputs/index.tsx","../src/components/display-outputs/styles.ts","../src/components/display-schema-tag/index.tsx","../src/components/display-schema-tag/styles.ts","../src/components/display-schema-tree/index.tsx","../src/components/display-schema-tree/styles.tsx","../src/components/dynamic-value-input/hooks.ts","../src/components/dynamic-value-input/index.tsx","../src/components/dynamic-value-input/styles.tsx","../src/components/inputs-values/index.tsx","../src/components/inputs-values/styles.tsx","../src/components/inputs-values/types.ts","../src/components/inputs-values-tree/index.tsx","../src/components/inputs-values-tree/row.tsx","../src/components/inputs-values-tree/styles.tsx","../src/components/inputs-values-tree/types.ts","../src/components/inputs-values-tree/hooks/use-child-list.tsx","../src/components/json-editor-with-variables/editor.tsx","../src/components/json-editor-with-variables/index.tsx","../src/components/json-schema-editor/default-value.tsx","../src/components/json-schema-editor/hooks.tsx","../src/components/json-schema-editor/index.tsx","../src/components/json-schema-editor/styles.tsx","../src/components/json-schema-editor/types.ts","../src/components/prompt-editor/editor.tsx","../src/components/prompt-editor/index.tsx","../src/components/prompt-editor/styles.tsx","../src/components/prompt-editor/types.tsx","../src/components/prompt-editor/extensions/jinja.tsx","../src/components/prompt-editor/extensions/language-support.tsx","../src/components/prompt-editor/extensions/markdown.tsx","../src/components/prompt-editor-with-inputs/editor.tsx","../src/components/prompt-editor-with-inputs/index.tsx","../src/components/prompt-editor-with-variables/editor.tsx","../src/components/prompt-editor-with-variables/index.tsx","../src/components/type-selector/index.tsx","../src/components/variable-selector/context.tsx","../src/components/variable-selector/index.tsx","../src/components/variable-selector/styles.tsx","../src/components/variable-selector/use-variable-tree.tsx","../src/effects/index.ts","../src/effects/auto-rename-ref/index.ts","../src/effects/listen-ref-schema-change/index.ts","../src/effects/listen-ref-value-change/index.ts","../src/effects/provide-batch-input/index.ts","../src/effects/provide-json-schema-outputs/index.ts","../src/effects/sync-variable-title/index.ts","../src/effects/validate-when-variable-sync/index.ts","../src/form-plugins/index.ts","../src/form-plugins/batch-outputs-plugin/index.ts","../src/form-plugins/infer-assign-plugin/index.ts","../src/form-plugins/infer-inputs-plugin/index.ts","../src/hooks/index.ts","../src/hooks/use-object-list/index.tsx","../src/plugins/index.ts","../src/plugins/disable-declaration-plugin/create-disable-declaration-plugin.ts","../src/plugins/disable-declaration-plugin/index.tsx","../src/plugins/json-schema-preset/create-type-preset-plugin.tsx","../src/plugins/json-schema-preset/index.tsx","../src/plugins/json-schema-preset/react.tsx","../src/plugins/json-schema-preset/types.ts","../src/plugins/json-schema-preset/type-definition/array.tsx","../src/plugins/json-schema-preset/type-definition/boolean.tsx","../src/plugins/json-schema-preset/type-definition/date-time.tsx","../src/plugins/json-schema-preset/type-definition/index.tsx","../src/plugins/json-schema-preset/type-definition/integer.tsx","../src/plugins/json-schema-preset/type-definition/map.tsx","../src/plugins/json-schema-preset/type-definition/number.tsx","../src/plugins/json-schema-preset/type-definition/object.tsx","../src/plugins/json-schema-preset/type-definition/string.tsx","../src/shared/index.ts","../src/shared/flow-value/index.ts","../src/shared/flow-value/schema.ts","../src/shared/flow-value/types.ts","../src/shared/flow-value/utils.ts","../src/shared/format-legacy-refs/index.ts","../src/shared/inject-material/index.tsx","../src/shared/lazy-suspense/index.tsx","../src/shared/polyfill-create-root/index.tsx","../src/validate/index.ts","../src/validate/validate-flow-value/index.tsx"],"version":"5.9.2"}
1
+ {"root":["../src/index.ts","../src/components/index.ts","../src/components/assign-row/index.tsx","../src/components/assign-row/types.ts","../src/components/assign-rows/index.tsx","../src/components/batch-outputs/index.tsx","../src/components/batch-outputs/styles.tsx","../src/components/batch-outputs/types.ts","../src/components/batch-variable-selector/index.tsx","../src/components/blur-input/index.tsx","../src/components/code-editor/editor-all.tsx","../src/components/code-editor/editor-json.tsx","../src/components/code-editor/editor-python.tsx","../src/components/code-editor/editor-shell.tsx","../src/components/code-editor/editor-sql.tsx","../src/components/code-editor/editor-ts.tsx","../src/components/code-editor/editor.tsx","../src/components/code-editor/factory.tsx","../src/components/code-editor/index.tsx","../src/components/code-editor/utils.ts","../src/components/code-editor/theme/dark.ts","../src/components/code-editor/theme/index.ts","../src/components/code-editor/theme/light.ts","../src/components/code-editor-mini/index.tsx","../src/components/condition-context/context.tsx","../src/components/condition-context/index.tsx","../src/components/condition-context/op.ts","../src/components/condition-context/types.ts","../src/components/condition-context/hooks/use-condition.tsx","../src/components/condition-row/index.tsx","../src/components/condition-row/styles.tsx","../src/components/condition-row/types.ts","../src/components/constant-input/index.tsx","../src/components/constant-input/types.ts","../src/components/coze-editor-extensions/index.tsx","../src/components/coze-editor-extensions/styles.tsx","../src/components/coze-editor-extensions/extensions/inputs-tree.tsx","../src/components/coze-editor-extensions/extensions/variable-tag.tsx","../src/components/coze-editor-extensions/extensions/variable-tree.tsx","../src/components/db-condition-row/index.tsx","../src/components/db-condition-row/styles.tsx","../src/components/db-condition-row/types.ts","../src/components/display-flow-value/index.tsx","../src/components/display-inputs-values/index.tsx","../src/components/display-inputs-values/styles.ts","../src/components/display-outputs/index.tsx","../src/components/display-outputs/styles.ts","../src/components/display-schema-tag/index.tsx","../src/components/display-schema-tag/styles.ts","../src/components/display-schema-tree/index.tsx","../src/components/display-schema-tree/styles.tsx","../src/components/dynamic-value-input/hooks.ts","../src/components/dynamic-value-input/index.tsx","../src/components/dynamic-value-input/styles.tsx","../src/components/inputs-values/index.tsx","../src/components/inputs-values/styles.tsx","../src/components/inputs-values/types.ts","../src/components/inputs-values-tree/index.tsx","../src/components/inputs-values-tree/row.tsx","../src/components/inputs-values-tree/styles.tsx","../src/components/inputs-values-tree/types.ts","../src/components/inputs-values-tree/hooks/use-child-list.tsx","../src/components/json-editor-with-variables/editor.tsx","../src/components/json-editor-with-variables/index.tsx","../src/components/json-schema-editor/default-value.tsx","../src/components/json-schema-editor/hooks.tsx","../src/components/json-schema-editor/index.tsx","../src/components/json-schema-editor/styles.tsx","../src/components/json-schema-editor/types.ts","../src/components/prompt-editor/editor.tsx","../src/components/prompt-editor/index.tsx","../src/components/prompt-editor/styles.tsx","../src/components/prompt-editor/types.tsx","../src/components/prompt-editor/extensions/jinja.tsx","../src/components/prompt-editor/extensions/language-support.tsx","../src/components/prompt-editor/extensions/markdown.tsx","../src/components/prompt-editor-with-inputs/editor.tsx","../src/components/prompt-editor-with-inputs/index.tsx","../src/components/prompt-editor-with-variables/editor.tsx","../src/components/prompt-editor-with-variables/index.tsx","../src/components/sql-editor-with-variables/editor.tsx","../src/components/sql-editor-with-variables/index.tsx","../src/components/type-selector/index.tsx","../src/components/variable-selector/context.tsx","../src/components/variable-selector/index.tsx","../src/components/variable-selector/styles.tsx","../src/components/variable-selector/use-variable-tree.tsx","../src/effects/index.ts","../src/effects/auto-rename-ref/index.ts","../src/effects/listen-ref-schema-change/index.ts","../src/effects/listen-ref-value-change/index.ts","../src/effects/provide-batch-input/index.ts","../src/effects/provide-json-schema-outputs/index.ts","../src/effects/sync-variable-title/index.ts","../src/effects/validate-when-variable-sync/index.ts","../src/form-plugins/index.ts","../src/form-plugins/batch-outputs-plugin/index.ts","../src/form-plugins/infer-assign-plugin/index.ts","../src/form-plugins/infer-inputs-plugin/index.ts","../src/hooks/index.ts","../src/hooks/use-object-list/index.tsx","../src/plugins/index.ts","../src/plugins/disable-declaration-plugin/create-disable-declaration-plugin.ts","../src/plugins/disable-declaration-plugin/index.tsx","../src/plugins/json-schema-preset/create-type-preset-plugin.tsx","../src/plugins/json-schema-preset/index.tsx","../src/plugins/json-schema-preset/react.tsx","../src/plugins/json-schema-preset/types.ts","../src/plugins/json-schema-preset/type-definition/array.tsx","../src/plugins/json-schema-preset/type-definition/boolean.tsx","../src/plugins/json-schema-preset/type-definition/date-time.tsx","../src/plugins/json-schema-preset/type-definition/index.tsx","../src/plugins/json-schema-preset/type-definition/integer.tsx","../src/plugins/json-schema-preset/type-definition/map.tsx","../src/plugins/json-schema-preset/type-definition/number.tsx","../src/plugins/json-schema-preset/type-definition/object.tsx","../src/plugins/json-schema-preset/type-definition/string.tsx","../src/shared/index.ts","../src/shared/flow-value/index.ts","../src/shared/flow-value/schema.ts","../src/shared/flow-value/types.ts","../src/shared/flow-value/utils.ts","../src/shared/format-legacy-refs/index.ts","../src/shared/inject-material/index.tsx","../src/shared/lazy-suspense/index.tsx","../src/shared/polyfill-create-root/index.tsx","../src/validate/index.ts","../src/validate/validate-flow-value/index.tsx"],"version":"5.9.2"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ /**
6
+ * @deprecated CodeEditor will bundle all languages features, use XXXCodeEditor instead for better bundle experience
7
+ */
8
+ export declare const CodeEditor: import("react").FC<import("./editor").CodeEditorPropsType>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export declare const loadJsonLanguage: () => Promise<void>;
6
+ export declare const JsonCodeEditor: import("react").FC<Omit<import("./editor").CodeEditorPropsType, "languageId">>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export declare const loadPythonLanguage: () => Promise<() => void>;
6
+ export declare const PythonCodeEditor: import("react").FC<Omit<import("./editor").CodeEditorPropsType, "languageId">>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export declare const loadShellLanguage: () => Promise<() => void>;
6
+ export declare const ShellCodeEditor: import("react").FC<Omit<import("./editor").CodeEditorPropsType, "languageId">>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export declare const loadSqlLanguage: () => Promise<void>;
6
+ export declare const SQLCodeEditor: import("react").FC<Omit<import("./editor").CodeEditorPropsType, "languageId">>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export declare const loadTypescriptLanguage: () => Promise<void>;
6
+ export declare const TypeScriptCodeEditor: import("react").FC<Omit<import("./editor").CodeEditorPropsType, "languageId">>;
@@ -10,12 +10,13 @@ type Options = Partial<InferValues<Preset[number]>>;
10
10
  export interface CodeEditorPropsType extends React.PropsWithChildren<{}> {
11
11
  value?: string;
12
12
  onChange?: (value: string) => void;
13
- languageId: 'python' | 'typescript' | 'shell' | 'json';
13
+ languageId: 'python' | 'typescript' | 'shell' | 'json' | 'sql';
14
14
  theme?: 'dark' | 'light';
15
15
  placeholder?: string;
16
16
  activeLinePlaceholder?: string;
17
17
  readonly?: boolean;
18
18
  options?: Options;
19
+ mini?: boolean;
19
20
  }
20
- export declare function CodeEditor({ value, onChange, languageId, theme, children, placeholder, activeLinePlaceholder, options, readonly, }: CodeEditorPropsType): React.JSX.Element;
21
+ export declare function BaseCodeEditor({ value, onChange, languageId, theme, children, placeholder, activeLinePlaceholder, options, readonly, mini, }: CodeEditorPropsType): React.JSX.Element;
21
22
  export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import React from 'react';
6
+ import type { CodeEditorPropsType } from './editor';
7
+ export declare const BaseCodeEditor: React.LazyExoticComponent<typeof import("./editor").BaseCodeEditor>;
8
+ interface FactoryParams<FixLanguageId extends boolean> {
9
+ displayName: string;
10
+ fixLanguageId: FixLanguageId extends true ? CodeEditorPropsType['languageId'] : undefined;
11
+ }
12
+ export declare const CodeEditorFactory: <FixLanguageId extends boolean>(loadLanguage: (languageId: string) => Promise<any>, { displayName, fixLanguageId }: FactoryParams<FixLanguageId>) => FixLanguageId extends true ? React.FC<Omit<CodeEditorPropsType, "languageId">> : React.FC<CodeEditorPropsType>;
13
+ export {};
@@ -2,5 +2,10 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- export declare const CodeEditor: import("react").LazyExoticComponent<typeof import("./editor").CodeEditor>;
6
- export type { CodeEditorPropsType } from './editor';
5
+ export { CodeEditor } from './editor-all';
6
+ export { TypeScriptCodeEditor } from './editor-ts';
7
+ export { ShellCodeEditor } from './editor-shell';
8
+ export { JsonCodeEditor } from './editor-json';
9
+ export { SQLCodeEditor } from './editor-sql';
10
+ export { PythonCodeEditor } from './editor-python';
11
+ export { BaseCodeEditor, type CodeEditorPropsType } from './editor';
@@ -2,4 +2,4 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- export declare function getSuffixByLanguageId(languageId: string): "" | ".py" | ".ts" | ".sh" | ".json";
5
+ export declare function getSuffixByLanguageId(languageId: string): "" | ".py" | ".ts" | ".sh" | ".json" | ".sql";
@@ -4,4 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import { type CodeEditorPropsType } from '../code-editor';
7
+ /**
8
+ * @deprecated use mini in CodeEditorPropsType instead
9
+ */
7
10
  export declare function CodeEditorMini(props: CodeEditorPropsType): React.JSX.Element;
@@ -7,11 +7,12 @@ export { AssignRows } from './assign-rows';
7
7
  export { BatchOutputs } from './batch-outputs';
8
8
  export { BatchVariableSelector } from './batch-variable-selector';
9
9
  export { BlurInput } from './blur-input';
10
- export { CodeEditor, type CodeEditorPropsType } from './code-editor';
10
+ export { BaseCodeEditor, CodeEditor, JsonCodeEditor, PythonCodeEditor, SQLCodeEditor, ShellCodeEditor, TypeScriptCodeEditor, type CodeEditorPropsType, } from './code-editor';
11
11
  export { CodeEditorMini } from './code-editor-mini';
12
+ export { ConditionPresetOp, ConditionProvider, type ConditionOpConfig, type ConditionOpConfigs, type IConditionRule, type IConditionRuleFactory, useCondition, useConditionContext, } from './condition-context';
12
13
  export { ConditionRow, type ConditionRowValueType } from './condition-row';
13
14
  export { ConstantInput, type ConstantInputStrategy } from './constant-input';
14
- export { EditorVariableTagInject, EditorVariableTree, EditorInputsTree, } from './coze-editor-extensions';
15
+ export { EditorInputsTree, EditorVariableTagInject, EditorVariableTree, } from './coze-editor-extensions';
15
16
  export { DBConditionRow, type DBConditionOptionType, type DBConditionRowValueType, } from './db-condition-row';
16
17
  export { DisplayFlowValue } from './display-flow-value';
17
18
  export { DisplayInputsValueAllInTag, DisplayInputsValues } from './display-inputs-values';
@@ -26,5 +27,6 @@ export { JsonSchemaEditor } from './json-schema-editor';
26
27
  export { PromptEditor, type PromptEditorPropsType } from './prompt-editor';
27
28
  export { PromptEditorWithInputs, type PromptEditorWithInputsProps, } from './prompt-editor-with-inputs';
28
29
  export { PromptEditorWithVariables, type PromptEditorWithVariablesProps, } from './prompt-editor-with-variables';
30
+ export { SQLEditorWithVariables, type SQLEditorWithVariablesProps, } from './sql-editor-with-variables';
29
31
  export { InjectTypeSelector, TypeSelector, getTypeSelectValue, parseTypeSelectValue, type TypeSelectorProps, } from './type-selector';
30
32
  export { InjectVariableSelector, VariableSelector, VariableSelectorProvider, useVariableTree, type VariableSelectorProps, } from './variable-selector';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import React from 'react';
6
+ import { type CodeEditorPropsType } from '../code-editor';
7
+ export interface SQLEditorWithVariablesProps extends Omit<CodeEditorPropsType, 'languageId'> {
8
+ }
9
+ export declare function SQLEditorWithVariables(props: SQLEditorWithVariablesProps): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export declare const SQLEditorWithVariables: import("react").LazyExoticComponent<typeof import("./editor").SQLEditorWithVariables>;
6
+ export type { SQLEditorWithVariablesProps } from './editor';
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- export { AssignRow, AssignRows, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, ConditionRow, ConstantInput, DBConditionRow, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, JsonSchemaEditor, PromptEditor, PromptEditorWithInputs, PromptEditorWithVariables, TypeSelector, VariableSelector, VariableSelectorProvider, EditorVariableTagInject, EditorVariableTree, EditorInputsTree, getTypeSelectValue, parseTypeSelectValue, type AssignValueType, type CodeEditorPropsType, type ConditionRowValueType, type ConstantInputStrategy, type DBConditionOptionType, type DBConditionRowValueType, type JsonEditorWithVariablesProps, type PromptEditorPropsType, type PromptEditorWithInputsProps, type PromptEditorWithVariablesProps, type TypeSelectorProps, type VariableSelectorProps, useVariableTree, } from './components';
5
+ export { AssignRow, AssignRows, BaseCodeEditor, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, ConditionPresetOp, ConditionProvider, ConditionRow, ConstantInput, DBConditionRow, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, EditorInputsTree, EditorVariableTagInject, EditorVariableTree, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonCodeEditor, JsonEditorWithVariables, JsonSchemaEditor, PromptEditor, PromptEditorWithInputs, PromptEditorWithVariables, PythonCodeEditor, SQLCodeEditor, SQLEditorWithVariables, ShellCodeEditor, TypeScriptCodeEditor, TypeSelector, VariableSelector, VariableSelectorProvider, getTypeSelectValue, parseTypeSelectValue, type AssignValueType, type CodeEditorPropsType, type ConditionOpConfig, type ConditionOpConfigs, type ConditionRowValueType, type ConstantInputStrategy, type DBConditionOptionType, type DBConditionRowValueType, type IConditionRule, type IConditionRuleFactory, type JsonEditorWithVariablesProps, type PromptEditorPropsType, type PromptEditorWithInputsProps, type PromptEditorWithVariablesProps, type SQLEditorWithVariablesProps, type TypeSelectorProps, type VariableSelectorProps, useCondition, useConditionContext, useVariableTree, } from './components';
6
6
  export { autoRenameRefEffect, listenRefSchemaChange, listenRefValueChange, provideBatchInputEffect, provideJsonSchemaOutputs, syncVariableTitle, validateWhenVariableSync, } from './effects';
7
7
  export { createBatchOutputsFormPlugin, createInferAssignPlugin, createInferInputsPlugin, provideBatchOutputsEffect, } from './form-plugins';
8
8
  export { useObjectList } from './hooks';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowgram.ai/form-materials",
3
- "version": "0.4.18",
3
+ "version": "0.5.0",
4
4
  "homepage": "https://flowgram.ai/",
5
5
  "repository": "https://github.com/bytedance/flowgram.ai",
6
6
  "license": "MIT",
@@ -60,7 +60,6 @@
60
60
  ],
61
61
  "dependencies": {
62
62
  "@douyinfe/semi-icons": "^2.80.0",
63
- "@douyinfe/semi-illustrations": "^2.80.0",
64
63
  "@douyinfe/semi-ui": "^2.80.0",
65
64
  "lodash-es": "^4.17.21",
66
65
  "nanoid": "^5.0.9",
@@ -68,9 +67,9 @@
68
67
  "@codemirror/view": "~6.38.0",
69
68
  "@codemirror/state": "~6.5.2",
70
69
  "zod": "^3.24.4",
71
- "@flowgram.ai/json-schema": "0.4.18",
72
- "@flowgram.ai/editor": "0.4.18",
73
- "@flowgram.ai/coze-editor": "0.4.18"
70
+ "@flowgram.ai/json-schema": "0.5.0",
71
+ "@flowgram.ai/editor": "0.5.0",
72
+ "@flowgram.ai/coze-editor": "0.5.0"
74
73
  },
75
74
  "devDependencies": {
76
75
  "@types/lodash-es": "^4.17.12",
@@ -89,13 +88,13 @@
89
88
  "cross-env": "~7.0.3",
90
89
  "@rsbuild/plugin-react": "^1.1.1",
91
90
  "date-fns": "~4.1.0",
92
- "@flowgram.ai/ts-config": "0.4.18",
93
- "@flowgram.ai/eslint-config": "0.4.18"
91
+ "@flowgram.ai/eslint-config": "0.5.0",
92
+ "@flowgram.ai/ts-config": "0.5.0"
94
93
  },
95
94
  "peerDependencies": {
96
95
  "react": ">=16.8",
97
96
  "react-dom": ">=16.8",
98
- "styled-components": ">=4"
97
+ "styled-components": ">=5"
99
98
  },
100
99
  "publishConfig": {
101
100
  "access": "public",