@flowgram.ai/form-materials 0.4.9 → 0.4.11
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.
- package/bin/run.sh +6 -0
- package/dist/cjs/components/assign-row/index.js +112 -0
- package/dist/cjs/components/assign-row/types.js +18 -0
- package/dist/cjs/components/assign-rows/index.js +85 -0
- package/dist/cjs/components/batch-outputs/index.js +91 -0
- package/dist/cjs/components/batch-outputs/styles.js +60 -0
- package/dist/cjs/components/batch-outputs/types.js +18 -0
- package/dist/cjs/components/batch-variable-selector/index.js +53 -0
- package/dist/cjs/components/blur-input/index.js +54 -0
- package/dist/cjs/components/code-editor/editor.js +117 -0
- package/dist/cjs/components/code-editor/index.js +57 -0
- package/dist/cjs/components/code-editor/init-worker.js +56 -0
- package/dist/cjs/components/code-editor/language-features.js +21 -0
- package/dist/cjs/components/code-editor/theme/dark.js +188 -0
- package/dist/cjs/components/code-editor/theme/index.js +11 -0
- package/dist/cjs/components/code-editor/theme/light.js +195 -0
- package/dist/cjs/components/code-editor/utils.js +42 -0
- package/dist/cjs/components/code-editor-mini/index.js +66 -0
- package/dist/cjs/components/condition-row/constants.js +165 -0
- package/dist/cjs/components/condition-row/hooks/useOp.js +78 -0
- package/dist/cjs/components/condition-row/hooks/useRule.js +68 -0
- package/dist/cjs/components/condition-row/index.js +123 -0
- package/dist/cjs/components/condition-row/styles.js +77 -0
- package/dist/cjs/components/condition-row/types.js +52 -0
- package/dist/cjs/components/constant-input/index.js +80 -0
- package/dist/cjs/components/constant-input/types.js +18 -0
- package/dist/cjs/components/coze-editor-extensions/extensions/inputs-tree.js +172 -0
- package/dist/cjs/components/coze-editor-extensions/extensions/variable-tag.js +151 -0
- package/dist/cjs/components/coze-editor-extensions/extensions/variable-tree.js +106 -0
- package/dist/cjs/components/coze-editor-extensions/index.js +86 -0
- package/dist/cjs/components/coze-editor-extensions/styles.js +89 -0
- package/dist/cjs/components/db-condition-row/hooks/use-left.js +86 -0
- package/dist/cjs/components/db-condition-row/hooks/use-op.js +79 -0
- package/dist/cjs/components/db-condition-row/index.js +115 -0
- package/dist/cjs/components/db-condition-row/styles.js +94 -0
- package/dist/cjs/components/db-condition-row/types.js +18 -0
- package/dist/cjs/components/display-flow-value/index.js +64 -0
- package/dist/cjs/components/display-inputs-values/index.js +76 -0
- package/dist/cjs/components/display-inputs-values/styles.js +51 -0
- package/dist/cjs/components/display-outputs/index.js +72 -0
- package/dist/cjs/components/display-outputs/styles.js +51 -0
- package/dist/cjs/components/display-schema-tag/index.js +77 -0
- package/dist/cjs/components/display-schema-tag/styles.js +71 -0
- package/dist/cjs/components/display-schema-tree/index.js +93 -0
- package/dist/cjs/components/display-schema-tree/styles.js +135 -0
- package/dist/cjs/components/dynamic-value-input/hooks.js +99 -0
- package/dist/cjs/components/dynamic-value-input/index.js +174 -0
- package/dist/cjs/components/dynamic-value-input/styles.js +107 -0
- package/dist/cjs/components/index.js +166 -0
- package/dist/cjs/components/inputs-values/index.js +112 -0
- package/dist/cjs/components/inputs-values/styles.js +60 -0
- package/dist/cjs/components/inputs-values/types.js +18 -0
- package/dist/cjs/components/inputs-values-tree/hooks/use-child-list.js +77 -0
- package/dist/cjs/components/inputs-values-tree/index.js +87 -0
- package/dist/cjs/components/inputs-values-tree/row.js +183 -0
- package/dist/cjs/components/inputs-values-tree/styles.js +177 -0
- package/dist/cjs/components/inputs-values-tree/types.js +18 -0
- package/dist/cjs/components/json-editor-with-variables/editor.js +85 -0
- package/dist/cjs/components/json-editor-with-variables/index.js +57 -0
- package/dist/cjs/components/json-schema-editor/default-value.js +54 -0
- package/dist/cjs/components/json-schema-editor/hooks.js +130 -0
- package/dist/cjs/components/json-schema-editor/index.js +246 -0
- package/dist/cjs/components/json-schema-editor/styles.js +231 -0
- package/dist/cjs/components/json-schema-editor/types.js +18 -0
- package/dist/cjs/components/prompt-editor/editor.js +99 -0
- package/dist/cjs/components/prompt-editor/extensions/jinja.js +73 -0
- package/dist/cjs/components/prompt-editor/extensions/language-support.js +48 -0
- package/dist/cjs/components/prompt-editor/extensions/markdown.js +81 -0
- package/dist/cjs/components/prompt-editor/index.js +57 -0
- package/dist/cjs/components/prompt-editor/styles.js +55 -0
- package/dist/cjs/components/prompt-editor/types.js +7 -0
- package/dist/cjs/components/prompt-editor-with-inputs/editor.js +47 -0
- package/dist/cjs/components/prompt-editor-with-inputs/index.js +57 -0
- package/dist/cjs/components/prompt-editor-with-variables/editor.js +48 -0
- package/dist/cjs/components/prompt-editor-with-variables/index.js +57 -0
- package/dist/cjs/components/type-selector/index.js +139 -0
- package/dist/cjs/components/variable-selector/context.js +56 -0
- package/dist/cjs/components/variable-selector/index.js +144 -0
- package/dist/cjs/components/variable-selector/styles.js +114 -0
- package/dist/cjs/components/variable-selector/use-variable-tree.js +100 -0
- package/dist/cjs/effects/auto-rename-ref/index.js +98 -0
- package/dist/cjs/effects/index.js +60 -0
- package/dist/cjs/effects/listen-ref-schema-change/index.js +57 -0
- package/dist/cjs/effects/listen-ref-value-change/index.js +54 -0
- package/dist/cjs/effects/provide-batch-input/index.js +64 -0
- package/dist/cjs/effects/provide-json-schema-outputs/index.js +49 -0
- package/dist/cjs/effects/sync-variable-title/index.js +52 -0
- package/dist/cjs/effects/validate-when-variable-sync/index.js +49 -0
- package/dist/cjs/form-plugins/batch-outputs-plugin/index.js +97 -0
- package/dist/cjs/form-plugins/index.js +47 -0
- package/dist/cjs/form-plugins/infer-assign-plugin/index.js +72 -0
- package/dist/cjs/form-plugins/infer-inputs-plugin/index.js +47 -0
- package/dist/cjs/hooks/index.js +36 -0
- package/dist/cjs/hooks/use-object-list/index.js +136 -0
- package/dist/cjs/index.js +237 -0
- package/dist/cjs/plugins/disable-declaration-plugin/create-disable-declaration-plugin.js +51 -0
- package/dist/cjs/plugins/disable-declaration-plugin/index.js +36 -0
- package/dist/cjs/plugins/index.js +49 -0
- package/dist/cjs/plugins/json-schema-preset/create-type-preset-plugin.js +49 -0
- package/dist/cjs/plugins/json-schema-preset/index.js +57 -0
- package/dist/cjs/plugins/json-schema-preset/manager.js +18 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/array.js +49 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/boolean.js +63 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/date-time.js +52 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/index.js +53 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/integer.js +49 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/number.js +49 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/object.js +49 -0
- package/dist/cjs/plugins/json-schema-preset/type-definition/string.js +54 -0
- package/dist/cjs/shared/flow-value/index.js +36 -0
- package/dist/cjs/shared/flow-value/schema.js +82 -0
- package/dist/cjs/shared/flow-value/types.js +18 -0
- package/dist/cjs/shared/flow-value/utils.js +142 -0
- package/dist/cjs/shared/format-legacy-refs/index.js +99 -0
- package/dist/cjs/shared/index.js +73 -0
- package/dist/cjs/shared/inject-material/index.js +66 -0
- package/dist/cjs/shared/lazy-suspense/index.js +58 -0
- package/dist/cjs/shared/polyfill-create-root/index.js +53 -0
- package/dist/cjs/validate/index.js +36 -0
- package/dist/cjs/validate/validate-flow-value/index.js +63 -0
- package/dist/esm/components/assign-row/index.mjs +78 -0
- package/dist/esm/components/assign-row/types.mjs +0 -0
- package/dist/esm/components/assign-rows/index.mjs +51 -0
- package/dist/esm/components/batch-outputs/index.mjs +57 -0
- package/dist/esm/components/batch-outputs/styles.mjs +13 -0
- package/dist/esm/components/batch-outputs/types.mjs +0 -0
- package/dist/esm/components/batch-variable-selector/index.mjs +19 -0
- package/dist/esm/components/blur-input/index.mjs +20 -0
- package/dist/esm/components/code-editor/editor.mjs +55 -0
- package/dist/esm/components/code-editor/index.mjs +5 -0
- package/dist/esm/components/code-editor/init-worker.mjs +19 -0
- package/dist/esm/components/code-editor/language-features.mjs +15 -0
- package/dist/esm/components/code-editor/theme/dark.mjs +154 -0
- package/dist/esm/components/code-editor/theme/index.mjs +5 -0
- package/dist/esm/components/code-editor/theme/light.mjs +161 -0
- package/dist/esm/components/code-editor/utils.mjs +8 -0
- package/dist/esm/components/code-editor-mini/index.mjs +22 -0
- package/dist/esm/components/condition-row/constants.mjs +128 -0
- package/dist/esm/components/condition-row/hooks/useOp.mjs +44 -0
- package/dist/esm/components/condition-row/hooks/useRule.mjs +34 -0
- package/dist/esm/components/condition-row/index.mjs +89 -0
- package/dist/esm/components/condition-row/styles.mjs +21 -0
- package/dist/esm/components/condition-row/types.mjs +18 -0
- package/dist/esm/components/constant-input/index.mjs +36 -0
- package/dist/esm/components/constant-input/types.mjs +0 -0
- package/dist/esm/components/coze-editor-extensions/extensions/inputs-tree.mjs +135 -0
- package/dist/esm/components/coze-editor-extensions/extensions/variable-tag.mjs +117 -0
- package/dist/esm/components/coze-editor-extensions/extensions/variable-tree.mjs +72 -0
- package/dist/esm/components/coze-editor-extensions/index.mjs +18 -0
- package/{src/components/prompt-editor-with-variables/styles.tsx → dist/esm/components/coze-editor-extensions/styles.mjs} +7 -15
- package/dist/esm/components/db-condition-row/hooks/use-left.mjs +52 -0
- package/dist/esm/components/db-condition-row/hooks/use-op.mjs +45 -0
- package/dist/esm/components/db-condition-row/index.mjs +81 -0
- package/dist/esm/components/db-condition-row/styles.mjs +32 -0
- package/dist/esm/components/db-condition-row/types.mjs +0 -0
- package/dist/esm/components/display-flow-value/index.mjs +30 -0
- package/dist/esm/components/display-inputs-values/index.mjs +39 -0
- package/dist/esm/components/display-inputs-values/styles.mjs +7 -0
- package/dist/esm/components/display-outputs/index.mjs +38 -0
- package/dist/esm/components/display-outputs/styles.mjs +7 -0
- package/dist/esm/components/display-schema-tag/index.mjs +33 -0
- package/dist/esm/components/display-schema-tag/styles.mjs +21 -0
- package/dist/esm/components/display-schema-tree/index.mjs +49 -0
- package/dist/esm/components/display-schema-tree/styles.mjs +79 -0
- package/dist/esm/components/dynamic-value-input/hooks.mjs +59 -0
- package/dist/esm/components/dynamic-value-input/index.mjs +137 -0
- package/dist/esm/components/dynamic-value-input/styles.mjs +54 -0
- package/dist/esm/components/index.mjs +27 -0
- package/dist/esm/components/inputs-values/index.mjs +78 -0
- package/dist/esm/components/inputs-values/styles.mjs +13 -0
- package/dist/esm/components/inputs-values/types.mjs +0 -0
- package/dist/esm/components/inputs-values-tree/hooks/use-child-list.mjs +43 -0
- package/dist/esm/components/inputs-values-tree/index.mjs +53 -0
- package/dist/esm/components/inputs-values-tree/row.mjs +149 -0
- package/dist/esm/components/inputs-values-tree/styles.mjs +105 -0
- package/dist/esm/components/inputs-values-tree/types.mjs +0 -0
- package/dist/esm/components/json-editor-with-variables/editor.mjs +51 -0
- package/dist/esm/components/json-editor-with-variables/index.mjs +5 -0
- package/dist/esm/components/json-schema-editor/default-value.mjs +20 -0
- package/dist/esm/components/json-schema-editor/hooks.mjs +96 -0
- package/dist/esm/components/json-schema-editor/index.mjs +212 -0
- package/dist/esm/components/json-schema-editor/styles.mjs +138 -0
- package/dist/esm/components/json-schema-editor/types.mjs +0 -0
- package/dist/esm/components/prompt-editor/editor.mjs +52 -0
- package/dist/esm/components/prompt-editor/extensions/jinja.mjs +39 -0
- package/dist/esm/components/prompt-editor/extensions/language-support.mjs +14 -0
- package/dist/esm/components/prompt-editor/extensions/markdown.mjs +47 -0
- package/dist/esm/components/prompt-editor/index.mjs +5 -0
- package/dist/esm/components/prompt-editor/styles.mjs +11 -0
- package/dist/esm/components/prompt-editor/types.mjs +1 -0
- package/dist/esm/components/prompt-editor-with-inputs/editor.mjs +13 -0
- package/dist/esm/components/prompt-editor-with-inputs/index.mjs +5 -0
- package/dist/esm/components/prompt-editor-with-variables/editor.mjs +14 -0
- package/dist/esm/components/prompt-editor-with-variables/index.mjs +5 -0
- package/dist/esm/components/type-selector/index.mjs +96 -0
- package/dist/esm/components/variable-selector/context.mjs +16 -0
- package/dist/esm/components/variable-selector/index.mjs +101 -0
- package/dist/esm/components/variable-selector/styles.mjs +58 -0
- package/dist/esm/components/variable-selector/use-variable-tree.mjs +66 -0
- package/dist/esm/effects/auto-rename-ref/index.mjs +64 -0
- package/dist/esm/effects/index.mjs +8 -0
- package/dist/esm/effects/listen-ref-schema-change/index.mjs +23 -0
- package/dist/esm/effects/listen-ref-value-change/index.mjs +20 -0
- package/dist/esm/effects/provide-batch-input/index.mjs +30 -0
- package/dist/esm/effects/provide-json-schema-outputs/index.mjs +15 -0
- package/dist/esm/effects/sync-variable-title/index.mjs +18 -0
- package/dist/esm/effects/validate-when-variable-sync/index.mjs +15 -0
- package/dist/esm/form-plugins/batch-outputs-plugin/index.mjs +60 -0
- package/dist/esm/form-plugins/index.mjs +4 -0
- package/dist/esm/form-plugins/infer-assign-plugin/index.mjs +38 -0
- package/dist/esm/form-plugins/infer-inputs-plugin/index.mjs +13 -0
- package/dist/esm/hooks/index.mjs +2 -0
- package/dist/esm/hooks/use-object-list/index.mjs +102 -0
- package/dist/esm/index.mjs +8 -0
- package/dist/esm/plugins/disable-declaration-plugin/create-disable-declaration-plugin.mjs +17 -0
- package/dist/esm/plugins/disable-declaration-plugin/index.mjs +2 -0
- package/dist/esm/plugins/index.mjs +3 -0
- package/dist/esm/plugins/json-schema-preset/create-type-preset-plugin.mjs +15 -0
- package/dist/esm/plugins/json-schema-preset/index.mjs +14 -0
- package/dist/esm/plugins/json-schema-preset/manager.mjs +0 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/array.mjs +15 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/boolean.mjs +29 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/date-time.mjs +18 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/index.mjs +19 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/integer.mjs +15 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/number.mjs +15 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/object.mjs +15 -0
- package/dist/esm/plugins/json-schema-preset/type-definition/string.mjs +20 -0
- package/dist/esm/shared/flow-value/index.mjs +2 -0
- package/dist/esm/shared/flow-value/schema.mjs +26 -0
- package/dist/esm/shared/flow-value/types.mjs +0 -0
- package/dist/esm/shared/flow-value/utils.mjs +108 -0
- package/dist/esm/shared/format-legacy-refs/index.mjs +50 -0
- package/dist/esm/shared/index.mjs +6 -0
- package/dist/esm/shared/inject-material/index.mjs +22 -0
- package/dist/esm/shared/lazy-suspense/index.mjs +21 -0
- package/dist/esm/shared/polyfill-create-root/index.mjs +16 -0
- package/dist/esm/validate/index.mjs +2 -0
- package/dist/esm/validate/validate-flow-value/index.mjs +29 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/components/assign-row/index.d.ts +8 -0
- package/dist/types/components/assign-row/types.d.ts +20 -0
- package/dist/types/components/assign-rows/index.d.ts +11 -0
- package/dist/types/components/batch-outputs/index.d.ts +7 -0
- package/dist/types/components/batch-outputs/styles.d.ts +6 -0
- package/dist/types/components/batch-outputs/types.d.ts +18 -0
- package/dist/types/components/batch-variable-selector/index.d.ts +7 -0
- package/dist/types/components/blur-input/index.d.ts +13 -0
- package/dist/types/components/code-editor/editor.d.ts +23 -0
- package/dist/types/components/code-editor/index.d.ts +6 -0
- package/{src/validate/index.tsx → dist/types/components/code-editor/init-worker.d.ts} +1 -2
- package/{src/typings/index.ts → dist/types/components/code-editor/language-features.d.ts} +1 -2
- package/dist/types/components/code-editor/theme/dark.d.ts +6 -0
- package/{src/hooks/index.tsx → dist/types/components/code-editor/theme/index.d.ts} +1 -2
- package/dist/types/components/code-editor/theme/light.d.ts +6 -0
- package/dist/types/components/code-editor/utils.d.ts +5 -0
- package/dist/types/components/code-editor-mini/index.d.ts +7 -0
- package/dist/types/components/condition-row/constants.d.ts +7 -0
- package/dist/types/components/condition-row/hooks/useOp.d.ts +18 -0
- package/dist/types/components/condition-row/hooks/useRule.d.ts +9 -0
- package/dist/types/components/condition-row/index.d.ts +22 -0
- package/dist/types/components/condition-row/styles.d.ts +9 -0
- package/dist/types/components/condition-row/types.d.ts +34 -0
- package/dist/types/components/constant-input/index.d.ts +8 -0
- package/dist/types/components/constant-input/types.d.ts +16 -0
- package/dist/types/components/coze-editor-extensions/extensions/inputs-tree.d.ts +14 -0
- package/dist/types/components/coze-editor-extensions/extensions/variable-tag.d.ts +5 -0
- package/dist/types/components/coze-editor-extensions/extensions/variable-tree.d.ts +8 -0
- package/dist/types/components/coze-editor-extensions/index.d.ts +18 -0
- package/dist/types/components/coze-editor-extensions/styles.d.ts +9 -0
- package/dist/types/components/db-condition-row/hooks/use-left.d.ts +18 -0
- package/dist/types/components/db-condition-row/hooks/use-op.d.ts +18 -0
- package/dist/types/components/db-condition-row/index.d.ts +19 -0
- package/dist/types/components/db-condition-row/styles.d.ts +12 -0
- package/dist/types/components/db-condition-row/types.d.ts +25 -0
- package/dist/types/components/display-flow-value/index.d.ts +15 -0
- package/dist/types/components/display-inputs-values/index.d.ts +14 -0
- package/dist/types/components/display-inputs-values/styles.d.ts +5 -0
- package/dist/types/components/display-outputs/index.d.ts +14 -0
- package/dist/types/components/display-outputs/styles.d.ts +5 -0
- package/dist/types/components/display-schema-tag/index.d.ts +14 -0
- package/dist/types/components/display-schema-tag/styles.d.ts +8 -0
- package/dist/types/components/display-schema-tree/index.d.ts +16 -0
- package/dist/types/components/display-schema-tree/styles.d.ts +11 -0
- package/dist/types/components/dynamic-value-input/hooks.d.ts +28 -0
- package/dist/types/components/dynamic-value-input/index.d.ts +29 -0
- package/dist/types/components/dynamic-value-input/styles.d.ts +8 -0
- package/dist/types/components/index.d.ts +30 -0
- package/dist/types/components/inputs-values/index.d.ts +7 -0
- package/dist/types/components/inputs-values/styles.d.ts +6 -0
- package/dist/types/components/inputs-values/types.d.ts +19 -0
- package/dist/types/components/inputs-values-tree/hooks/use-child-list.d.ts +19 -0
- package/dist/types/components/inputs-values-tree/index.d.ts +7 -0
- package/dist/types/components/inputs-values-tree/row.d.ts +15 -0
- package/dist/types/components/inputs-values-tree/styles.d.ts +23 -0
- package/dist/types/components/inputs-values-tree/types.d.ts +18 -0
- package/dist/types/components/json-editor-with-variables/editor.d.ts +9 -0
- package/dist/types/components/json-editor-with-variables/index.d.ts +6 -0
- package/dist/types/components/json-schema-editor/default-value.d.ts +17 -0
- package/dist/types/components/json-schema-editor/hooks.d.ts +12 -0
- package/dist/types/components/json-schema-editor/index.d.ts +14 -0
- package/dist/types/components/json-schema-editor/styles.d.ts +30 -0
- package/dist/types/components/json-schema-editor/types.d.ts +20 -0
- package/dist/types/components/prompt-editor/editor.d.ts +15 -0
- package/dist/types/components/prompt-editor/extensions/jinja.d.ts +6 -0
- package/dist/types/components/prompt-editor/extensions/language-support.d.ts +6 -0
- package/dist/types/components/prompt-editor/extensions/markdown.d.ts +6 -0
- package/dist/types/components/prompt-editor/index.d.ts +6 -0
- package/dist/types/components/prompt-editor/styles.d.ts +7 -0
- package/dist/types/components/prompt-editor/types.d.ts +16 -0
- package/dist/types/components/prompt-editor-with-inputs/editor.d.ts +10 -0
- package/dist/types/components/prompt-editor-with-inputs/index.d.ts +6 -0
- package/dist/types/components/prompt-editor-with-variables/editor.d.ts +9 -0
- package/dist/types/components/prompt-editor-with-variables/index.d.ts +6 -0
- package/dist/types/components/type-selector/index.d.ts +25 -0
- package/dist/types/components/variable-selector/context.d.ts +16 -0
- package/dist/types/components/variable-selector/index.d.ts +31 -0
- package/dist/types/components/variable-selector/styles.d.ts +14 -0
- package/dist/types/components/variable-selector/use-variable-tree.d.ts +18 -0
- package/dist/types/effects/auto-rename-ref/index.d.ts +17 -0
- package/dist/types/effects/index.d.ts +11 -0
- package/dist/types/effects/listen-ref-schema-change/index.d.ts +22 -0
- package/dist/types/effects/listen-ref-value-change/index.d.ts +22 -0
- package/dist/types/effects/provide-batch-input/index.d.ts +6 -0
- package/dist/types/effects/provide-json-schema-outputs/index.d.ts +6 -0
- package/dist/types/effects/sync-variable-title/index.d.ts +6 -0
- package/dist/types/effects/validate-when-variable-sync/index.d.ts +8 -0
- package/dist/types/form-plugins/batch-outputs-plugin/index.d.ts +12 -0
- package/dist/types/form-plugins/index.d.ts +7 -0
- package/dist/types/form-plugins/infer-assign-plugin/index.d.ts +10 -0
- package/dist/types/form-plugins/infer-inputs-plugin/index.d.ts +11 -0
- package/dist/types/hooks/index.d.ts +5 -0
- package/dist/types/hooks/use-object-list/index.d.ts +22 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/plugins/disable-declaration-plugin/create-disable-declaration-plugin.d.ts +5 -0
- package/dist/types/plugins/disable-declaration-plugin/index.d.ts +5 -0
- package/dist/types/plugins/index.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/create-type-preset-plugin.d.ts +9 -0
- package/dist/types/plugins/json-schema-preset/index.d.ts +13 -0
- package/dist/types/plugins/json-schema-preset/manager.d.ts +17 -0
- package/dist/types/plugins/json-schema-preset/type-definition/array.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/type-definition/boolean.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/type-definition/date-time.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/type-definition/index.d.ts +5 -0
- package/dist/types/plugins/json-schema-preset/type-definition/integer.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/type-definition/number.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/type-definition/object.d.ts +6 -0
- package/dist/types/plugins/json-schema-preset/type-definition/string.d.ts +6 -0
- package/dist/types/shared/flow-value/index.d.ts +6 -0
- package/dist/types/shared/flow-value/schema.d.ts +107 -0
- package/dist/types/shared/flow-value/types.d.ts +32 -0
- package/dist/types/shared/flow-value/utils.d.ts +65 -0
- package/dist/types/shared/format-legacy-refs/index.d.ts +84 -0
- package/dist/types/shared/index.d.ts +9 -0
- package/dist/types/shared/inject-material/index.d.ts +48 -0
- package/dist/types/shared/lazy-suspense/index.d.ts +7 -0
- package/dist/types/shared/polyfill-create-root/index.d.ts +10 -0
- package/dist/types/validate/index.d.ts +5 -0
- package/dist/types/validate/validate-flow-value/index.d.ts +19 -0
- package/package.json +20 -21
- package/src/components/assign-row/index.tsx +3 -3
- package/src/components/assign-row/types.ts +1 -1
- package/src/components/batch-outputs/types.ts +1 -1
- package/src/components/blur-input/index.tsx +9 -1
- package/src/components/code-editor/editor.tsx +10 -9
- package/src/components/code-editor/init-worker.ts +27 -0
- package/src/components/code-editor/language-features.ts +6 -27
- package/src/components/code-editor/theme/dark.ts +1 -1
- package/src/components/code-editor/theme/index.ts +1 -1
- package/src/components/code-editor/theme/light.ts +1 -1
- package/src/components/condition-row/hooks/useRule.ts +1 -1
- package/src/components/condition-row/types.ts +1 -1
- package/src/components/constant-input/index.tsx +1 -1
- package/src/components/{prompt-editor-with-inputs/inputs-picker.tsx → coze-editor-extensions/extensions/inputs-tree.tsx} +95 -5
- package/src/components/{prompt-editor-with-variables → coze-editor-extensions}/extensions/variable-tag.tsx +1 -1
- package/src/components/{prompt-editor-with-variables → coze-editor-extensions}/extensions/variable-tree.tsx +12 -6
- package/src/components/coze-editor-extensions/index.tsx +33 -0
- package/src/components/db-condition-row/types.ts +1 -1
- package/src/components/display-flow-value/index.tsx +1 -1
- package/src/components/dynamic-value-input/hooks.ts +1 -1
- package/src/components/dynamic-value-input/index.tsx +1 -1
- package/src/components/index.ts +55 -25
- package/src/components/inputs-values/index.tsx +1 -1
- package/src/components/inputs-values/types.ts +1 -1
- package/src/components/inputs-values-tree/row.tsx +1 -1
- package/src/components/json-editor-with-variables/editor.tsx +6 -6
- package/src/components/prompt-editor/editor.tsx +2 -2
- package/src/components/prompt-editor/extensions/jinja.tsx +2 -2
- package/src/components/prompt-editor/extensions/language-support.tsx +2 -2
- package/src/components/prompt-editor/extensions/markdown.tsx +2 -2
- package/src/components/prompt-editor/types.tsx +1 -1
- package/src/components/prompt-editor-with-inputs/editor.tsx +2 -3
- package/src/components/prompt-editor-with-variables/editor.tsx +3 -5
- package/src/components/variable-selector/index.tsx +2 -0
- package/src/effects/auto-rename-ref/index.ts +1 -1
- package/src/effects/index.ts +7 -7
- package/src/effects/listen-ref-schema-change/index.ts +1 -1
- package/src/effects/listen-ref-value-change/index.ts +1 -1
- package/src/effects/provide-batch-input/index.ts +1 -1
- package/src/form-plugins/batch-outputs-plugin/index.ts +1 -1
- package/src/form-plugins/index.ts +3 -3
- package/src/form-plugins/infer-assign-plugin/index.ts +1 -1
- package/src/hooks/index.ts +6 -0
- package/src/index.ts +101 -8
- package/src/plugins/index.ts +11 -2
- package/src/plugins/json-schema-preset/index.tsx +4 -4
- package/src/shared/flow-value/index.ts +11 -1
- package/src/shared/flow-value/utils.ts +1 -2
- package/src/shared/index.ts +26 -5
- package/src/shared/inject-material/index.tsx +10 -6
- package/src/validate/index.ts +6 -0
- package/src/validate/validate-flow-value/index.tsx +1 -1
- package/bin/index.ts +0 -80
- package/bin/materials.ts +0 -134
- package/bin/project.ts +0 -95
- package/bin/utils/import.ts +0 -127
- package/bin/utils/traverse-file.ts +0 -60
- package/dist/esm/chunk-727SU246.js +0 -13
- package/dist/esm/chunk-727SU246.js.map +0 -1
- package/dist/esm/chunk-DEZUEMUM.js +0 -284
- package/dist/esm/chunk-DEZUEMUM.js.map +0 -1
- package/dist/esm/chunk-IHOHRV5V.js +0 -477
- package/dist/esm/chunk-IHOHRV5V.js.map +0 -1
- package/dist/esm/editor-4X7K477H.js +0 -282
- package/dist/esm/editor-4X7K477H.js.map +0 -1
- package/dist/esm/editor-6UMULJYB.js +0 -180
- package/dist/esm/editor-6UMULJYB.js.map +0 -1
- package/dist/esm/editor-E2BQTPCD.js +0 -388
- package/dist/esm/editor-E2BQTPCD.js.map +0 -1
- package/dist/esm/editor-OXPGKPF5.js +0 -167
- package/dist/esm/editor-OXPGKPF5.js.map +0 -1
- package/dist/esm/editor-Z24WLBPO.js +0 -249
- package/dist/esm/editor-Z24WLBPO.js.map +0 -1
- package/dist/esm/index.js +0 -2668
- package/dist/esm/index.js.map +0 -1
- package/dist/index.d.mts +0 -1002
- package/dist/index.d.ts +0 -1002
- package/dist/index.js +0 -5127
- package/dist/index.js.map +0 -1
- package/src/components/assign-row/components/blur-input.tsx +0 -27
- package/src/components/json-editor-with-variables/extensions/variable-tag.tsx +0 -174
- package/src/components/json-editor-with-variables/extensions/variable-tree.tsx +0 -83
- package/src/components/prompt-editor-with-inputs/extensions/inputs-tree.tsx +0 -94
- /package/src/components/{json-editor-with-variables → coze-editor-extensions}/styles.tsx +0 -0
- /package/src/{typings/flow-value/index.ts → shared/flow-value/types.ts} +0 -0
package/dist/index.d.mts
DELETED
|
@@ -1,1002 +0,0 @@
|
|
|
1
|
-
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { ComponentType, lazy } from 'react';
|
|
3
|
-
import { IJsonSchema, JsonSchemaTypeRegistry as JsonSchemaTypeRegistry$1, JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
|
|
4
|
-
export { IJsonSchema, JsonSchemaBasicType, JsonSchemaUtils } from '@flowgram.ai/json-schema';
|
|
5
|
-
import { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
|
|
6
|
-
import { InferValues } from '@coze-editor/editor/react';
|
|
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';
|
|
11
|
-
import * as _flowgram_ai_node from '@flowgram.ai/node';
|
|
12
|
-
import * as _flowgram_ai_core from '@flowgram.ai/core';
|
|
13
|
-
import { TreeNodeData } from '@douyinfe/semi-ui/lib/es/tree';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
17
|
-
* SPDX-License-Identifier: MIT
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
type VariableField = BaseVariableField<{
|
|
21
|
-
icon?: string | JSX.Element;
|
|
22
|
-
title?: string;
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
}>;
|
|
25
|
-
declare function useVariableTree(params: {
|
|
26
|
-
includeSchema?: IJsonSchema | IJsonSchema[];
|
|
27
|
-
excludeSchema?: IJsonSchema | IJsonSchema[];
|
|
28
|
-
skipVariable?: (variable: VariableField) => boolean;
|
|
29
|
-
}): TreeNodeData[];
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
33
|
-
* SPDX-License-Identifier: MIT
|
|
34
|
-
*/
|
|
35
|
-
|
|
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 {
|
|
47
|
-
value?: string[];
|
|
48
|
-
config?: {
|
|
49
|
-
placeholder?: string;
|
|
50
|
-
notFoundContent?: string;
|
|
51
|
-
};
|
|
52
|
-
onChange: (value?: string[]) => void;
|
|
53
|
-
includeSchema?: IJsonSchema | IJsonSchema[];
|
|
54
|
-
excludeSchema?: IJsonSchema | IJsonSchema[];
|
|
55
|
-
readonly?: boolean;
|
|
56
|
-
hasError?: boolean;
|
|
57
|
-
style?: React__default.CSSProperties;
|
|
58
|
-
triggerRender?: (props: TriggerRenderProps) => React__default.ReactNode;
|
|
59
|
-
}
|
|
60
|
-
|
|
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>;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
69
|
-
* SPDX-License-Identifier: MIT
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
interface TypeSelectorProps {
|
|
73
|
-
value?: Partial<IJsonSchema>;
|
|
74
|
-
onChange?: (value?: Partial<IJsonSchema>) => void;
|
|
75
|
-
readonly?: boolean;
|
|
76
|
-
/**
|
|
77
|
-
* @deprecated use readonly instead
|
|
78
|
-
*/
|
|
79
|
-
disabled?: boolean;
|
|
80
|
-
style?: React__default.CSSProperties;
|
|
81
|
-
}
|
|
82
|
-
declare const getTypeSelectValue: (value?: Partial<IJsonSchema>) => string[] | undefined;
|
|
83
|
-
declare const parseTypeSelectValue: (value?: string[]) => Partial<IJsonSchema> | undefined;
|
|
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>;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
92
|
-
* SPDX-License-Identifier: MIT
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
|
-
interface ConfigType {
|
|
96
|
-
placeholder?: string;
|
|
97
|
-
descTitle?: string;
|
|
98
|
-
descPlaceholder?: string;
|
|
99
|
-
defaultValueTitle?: string;
|
|
100
|
-
defaultValuePlaceholder?: string;
|
|
101
|
-
addButtonText?: string;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
106
|
-
* SPDX-License-Identifier: MIT
|
|
107
|
-
*/
|
|
108
|
-
|
|
109
|
-
declare function JsonSchemaEditor(props: {
|
|
110
|
-
value?: IJsonSchema;
|
|
111
|
-
onChange?: (value: IJsonSchema) => void;
|
|
112
|
-
config?: ConfigType;
|
|
113
|
-
className?: string;
|
|
114
|
-
readonly?: boolean;
|
|
115
|
-
}): React__default.JSX.Element;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
119
|
-
* SPDX-License-Identifier: MIT
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
|
-
declare function BatchVariableSelector(props: VariableSelectorProps): React__default.JSX.Element;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
126
|
-
* SPDX-License-Identifier: MIT
|
|
127
|
-
*/
|
|
128
|
-
|
|
129
|
-
interface ConstantRendererProps<Value = any> {
|
|
130
|
-
value?: Value;
|
|
131
|
-
onChange?: (value: Value) => void;
|
|
132
|
-
readonly?: boolean;
|
|
133
|
-
[key: string]: any;
|
|
134
|
-
}
|
|
135
|
-
interface JsonSchemaTypeRegistry<Value = any> extends JsonSchemaTypeRegistry$1 {
|
|
136
|
-
/**
|
|
137
|
-
* Render Constant Input
|
|
138
|
-
*/
|
|
139
|
-
ConstantRenderer: React.FC<ConstantRendererProps<Value>>;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
declare const createTypePresetPlugin: _flowgram_ai_core.PluginCreator<{
|
|
143
|
-
types?: Partial<JsonSchemaTypeRegistry> & Pick<JsonSchemaTypeRegistry, "type">[];
|
|
144
|
-
unregisterTypes?: string[];
|
|
145
|
-
}>;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
149
|
-
* SPDX-License-Identifier: MIT
|
|
150
|
-
*/
|
|
151
|
-
|
|
152
|
-
declare const useTypeManager: () => JsonSchemaTypeManager<IJsonSchema, JsonSchemaTypeRegistry>;
|
|
153
|
-
declare const JsonSchemaTypePresetProvider: ({ types, children, }: React__default.PropsWithChildren<{
|
|
154
|
-
types: JsonSchemaTypeRegistry[];
|
|
155
|
-
}>) => React__default.JSX.Element;
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
159
|
-
* SPDX-License-Identifier: MIT
|
|
160
|
-
*/
|
|
161
|
-
declare const createDisableDeclarationPlugin: _flowgram_ai_core.PluginCreator<void>;
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
165
|
-
* SPDX-License-Identifier: MIT
|
|
166
|
-
*/
|
|
167
|
-
|
|
168
|
-
interface Strategy<Value = any> {
|
|
169
|
-
hit: (schema: IJsonSchema) => boolean;
|
|
170
|
-
Renderer: React.FC<ConstantRendererProps<Value>>;
|
|
171
|
-
}
|
|
172
|
-
interface PropsType$a extends ConstantRendererProps {
|
|
173
|
-
schema: IJsonSchema;
|
|
174
|
-
strategies?: Strategy[];
|
|
175
|
-
fallbackRenderer?: React.FC<ConstantRendererProps>;
|
|
176
|
-
[key: string]: any;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
181
|
-
* SPDX-License-Identifier: MIT
|
|
182
|
-
*/
|
|
183
|
-
|
|
184
|
-
declare function ConstantInput(props: PropsType$a): React__default.JSX.Element;
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
188
|
-
* SPDX-License-Identifier: MIT
|
|
189
|
-
*/
|
|
190
|
-
|
|
191
|
-
interface IFlowValueExtra {
|
|
192
|
-
index?: number;
|
|
193
|
-
}
|
|
194
|
-
type FlowValueType = 'constant' | 'ref' | 'expression' | 'template';
|
|
195
|
-
interface IFlowConstantValue {
|
|
196
|
-
type: 'constant';
|
|
197
|
-
content?: any;
|
|
198
|
-
schema?: IJsonSchema;
|
|
199
|
-
extra?: IFlowValueExtra;
|
|
200
|
-
}
|
|
201
|
-
interface IFlowRefValue {
|
|
202
|
-
type: 'ref';
|
|
203
|
-
content?: string[];
|
|
204
|
-
extra?: IFlowValueExtra;
|
|
205
|
-
}
|
|
206
|
-
interface IFlowExpressionValue {
|
|
207
|
-
type: 'expression';
|
|
208
|
-
content?: string;
|
|
209
|
-
extra?: IFlowValueExtra;
|
|
210
|
-
}
|
|
211
|
-
interface IFlowTemplateValue {
|
|
212
|
-
type: 'template';
|
|
213
|
-
content?: string;
|
|
214
|
-
extra?: IFlowValueExtra;
|
|
215
|
-
}
|
|
216
|
-
type IFlowValue = IFlowConstantValue | IFlowRefValue | IFlowExpressionValue | IFlowTemplateValue;
|
|
217
|
-
type IFlowConstantRefValue = IFlowConstantValue | IFlowRefValue;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
221
|
-
* SPDX-License-Identifier: MIT
|
|
222
|
-
*/
|
|
223
|
-
|
|
224
|
-
interface PropsType$9 {
|
|
225
|
-
value?: IFlowConstantRefValue;
|
|
226
|
-
onChange: (value?: IFlowConstantRefValue) => void;
|
|
227
|
-
readonly?: boolean;
|
|
228
|
-
hasError?: boolean;
|
|
229
|
-
style?: React__default.CSSProperties;
|
|
230
|
-
schema?: IJsonSchema;
|
|
231
|
-
constantProps?: {
|
|
232
|
-
strategies?: Strategy[];
|
|
233
|
-
schema?: IJsonSchema;
|
|
234
|
-
[key: string]: any;
|
|
235
|
-
};
|
|
236
|
-
}
|
|
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>;
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
245
|
-
* SPDX-License-Identifier: MIT
|
|
246
|
-
*/
|
|
247
|
-
|
|
248
|
-
interface OpConfig$1 {
|
|
249
|
-
label: string;
|
|
250
|
-
abbreviation: string;
|
|
251
|
-
rightDisplay?: string;
|
|
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>;
|
|
256
|
-
interface ConditionRowValueType {
|
|
257
|
-
left?: IFlowRefValue;
|
|
258
|
-
operator?: string;
|
|
259
|
-
right?: IFlowConstantRefValue;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
264
|
-
* SPDX-License-Identifier: MIT
|
|
265
|
-
*/
|
|
266
|
-
|
|
267
|
-
interface PropTypes$1 {
|
|
268
|
-
value?: ConditionRowValueType;
|
|
269
|
-
onChange: (value?: ConditionRowValueType) => void;
|
|
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[];
|
|
318
|
-
readonly?: boolean;
|
|
319
|
-
ruleConfig?: {
|
|
320
|
-
ops?: OpConfigs;
|
|
321
|
-
rules?: IRules;
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
declare function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig, }: PropTypes): React__default.JSX.Element;
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
328
|
-
* SPDX-License-Identifier: MIT
|
|
329
|
-
*/
|
|
330
|
-
|
|
331
|
-
type ValueType = Record<string, IFlowRefValue | undefined>;
|
|
332
|
-
interface PropsType$8 {
|
|
333
|
-
value?: ValueType;
|
|
334
|
-
onChange: (value?: ValueType) => void;
|
|
335
|
-
readonly?: boolean;
|
|
336
|
-
hasError?: boolean;
|
|
337
|
-
style?: React.CSSProperties;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
342
|
-
* SPDX-License-Identifier: MIT
|
|
343
|
-
*/
|
|
344
|
-
|
|
345
|
-
declare function BatchOutputs(props: PropsType$8): React__default.JSX.Element;
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
349
|
-
* SPDX-License-Identifier: MIT
|
|
350
|
-
*/
|
|
351
|
-
|
|
352
|
-
type PropsType$7 = React__default.PropsWithChildren<{
|
|
353
|
-
value?: IFlowTemplateValue;
|
|
354
|
-
onChange: (value?: IFlowTemplateValue) => void;
|
|
355
|
-
readonly?: boolean;
|
|
356
|
-
hasError?: boolean;
|
|
357
|
-
placeholder?: string;
|
|
358
|
-
activeLinePlaceholder?: string;
|
|
359
|
-
disableMarkdownHighlight?: boolean;
|
|
360
|
-
style?: React__default.CSSProperties;
|
|
361
|
-
}>;
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
365
|
-
* SPDX-License-Identifier: MIT
|
|
366
|
-
*/
|
|
367
|
-
|
|
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>;
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
383
|
-
* SPDX-License-Identifier: MIT
|
|
384
|
-
*/
|
|
385
|
-
|
|
386
|
-
interface PromptEditorWithVariablesProps extends PromptEditorPropsType {
|
|
387
|
-
}
|
|
388
|
-
declare function PromptEditorWithVariables$1(props: PromptEditorWithVariablesProps): React__default.JSX.Element;
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
392
|
-
* SPDX-License-Identifier: MIT
|
|
393
|
-
*/
|
|
394
|
-
declare const PromptEditorWithVariables: React$1.LazyExoticComponent<typeof PromptEditorWithVariables$1>;
|
|
395
|
-
|
|
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;
|
|
403
|
-
}
|
|
404
|
-
declare function PromptEditorWithInputs$1({ inputsValues, ...restProps }: PromptEditorWithInputsProps): React__default.JSX.Element;
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
408
|
-
* SPDX-License-Identifier: MIT
|
|
409
|
-
*/
|
|
410
|
-
declare const PromptEditorWithInputs: React$1.LazyExoticComponent<typeof PromptEditorWithInputs$1>;
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
414
|
-
* SPDX-License-Identifier: MIT
|
|
415
|
-
*/
|
|
416
|
-
|
|
417
|
-
type Preset = typeof preset$1;
|
|
418
|
-
type Options = Partial<InferValues<Preset[number]>>;
|
|
419
|
-
interface CodeEditorPropsType extends React__default.PropsWithChildren<{}> {
|
|
420
|
-
value?: string;
|
|
421
|
-
onChange?: (value: string) => void;
|
|
422
|
-
languageId: 'python' | 'typescript' | 'shell' | 'json';
|
|
423
|
-
theme?: 'dark' | 'light';
|
|
424
|
-
placeholder?: string;
|
|
425
|
-
activeLinePlaceholder?: string;
|
|
426
|
-
readonly?: boolean;
|
|
427
|
-
options?: Options;
|
|
428
|
-
}
|
|
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>;
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
439
|
-
* SPDX-License-Identifier: MIT
|
|
440
|
-
*/
|
|
441
|
-
|
|
442
|
-
declare function CodeEditorMini(props: CodeEditorPropsType): React__default.JSX.Element;
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
446
|
-
* SPDX-License-Identifier: MIT
|
|
447
|
-
*/
|
|
448
|
-
|
|
449
|
-
interface JsonEditorWithVariablesProps extends Omit<CodeEditorPropsType, 'languageId'> {
|
|
450
|
-
}
|
|
451
|
-
declare function JsonEditorWithVariables$1(props: JsonEditorWithVariablesProps): React__default.JSX.Element;
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
455
|
-
* SPDX-License-Identifier: MIT
|
|
456
|
-
*/
|
|
457
|
-
declare const JsonEditorWithVariables: React$1.LazyExoticComponent<typeof JsonEditorWithVariables$1>;
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
461
|
-
* SPDX-License-Identifier: MIT
|
|
462
|
-
*/
|
|
463
|
-
|
|
464
|
-
interface PropsType$6 {
|
|
465
|
-
value?: Record<string, IFlowValue | undefined>;
|
|
466
|
-
onChange: (value?: Record<string, IFlowValue | undefined>) => void;
|
|
467
|
-
readonly?: boolean;
|
|
468
|
-
hasError?: boolean;
|
|
469
|
-
schema?: IJsonSchema;
|
|
470
|
-
style?: React.CSSProperties;
|
|
471
|
-
constantProps?: {
|
|
472
|
-
strategies?: Strategy[];
|
|
473
|
-
[key: string]: any;
|
|
474
|
-
};
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
/**
|
|
478
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
479
|
-
* SPDX-License-Identifier: MIT
|
|
480
|
-
*/
|
|
481
|
-
|
|
482
|
-
declare function InputsValues({ value, onChange, style, readonly, constantProps, schema, hasError, }: PropsType$6): React__default.JSX.Element;
|
|
483
|
-
|
|
484
|
-
/**
|
|
485
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
486
|
-
* SPDX-License-Identifier: MIT
|
|
487
|
-
*/
|
|
488
|
-
|
|
489
|
-
interface PropsType$5 {
|
|
490
|
-
value?: IJsonSchema;
|
|
491
|
-
parentKey?: string;
|
|
492
|
-
depth?: number;
|
|
493
|
-
drilldown?: boolean;
|
|
494
|
-
showIcon?: boolean;
|
|
495
|
-
typeManager?: JsonSchemaTypeManager;
|
|
496
|
-
}
|
|
497
|
-
declare function DisplaySchemaTree(props: Omit<PropsType$5, 'parentKey' | 'depth'>): React__default.JSX.Element;
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
501
|
-
* SPDX-License-Identifier: MIT
|
|
502
|
-
*/
|
|
503
|
-
|
|
504
|
-
interface PropsType$4 {
|
|
505
|
-
value?: IJsonSchema;
|
|
506
|
-
showIconInTree?: boolean;
|
|
507
|
-
displayFromScope?: boolean;
|
|
508
|
-
typeManager?: JsonSchemaTypeManager;
|
|
509
|
-
}
|
|
510
|
-
declare function DisplayOutputs({ value, showIconInTree, displayFromScope }: PropsType$4): React__default.JSX.Element;
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
514
|
-
* SPDX-License-Identifier: MIT
|
|
515
|
-
*/
|
|
516
|
-
|
|
517
|
-
interface PropsType$3 {
|
|
518
|
-
title?: JSX.Element | string;
|
|
519
|
-
value?: IJsonSchema;
|
|
520
|
-
showIconInTree?: boolean;
|
|
521
|
-
warning?: boolean;
|
|
522
|
-
}
|
|
523
|
-
declare function DisplaySchemaTag({ value, showIconInTree, title, warning }: PropsType$3): React__default.JSX.Element;
|
|
524
|
-
|
|
525
|
-
/**
|
|
526
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
527
|
-
* SPDX-License-Identifier: MIT
|
|
528
|
-
*/
|
|
529
|
-
|
|
530
|
-
interface PropsType$2 {
|
|
531
|
-
value?: IFlowValue;
|
|
532
|
-
title?: JSX.Element | string;
|
|
533
|
-
showIconInTree?: boolean;
|
|
534
|
-
typeManager?: JsonSchemaTypeManager;
|
|
535
|
-
}
|
|
536
|
-
declare function DisplayFlowValue({ value, title, showIconInTree }: PropsType$2): React__default.JSX.Element;
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
540
|
-
* SPDX-License-Identifier: MIT
|
|
541
|
-
*/
|
|
542
|
-
|
|
543
|
-
interface PropsType$1 {
|
|
544
|
-
value?: any;
|
|
545
|
-
showIconInTree?: boolean;
|
|
546
|
-
}
|
|
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;
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
554
|
-
* SPDX-License-Identifier: MIT
|
|
555
|
-
*/
|
|
556
|
-
|
|
557
|
-
interface AssignRowsProps {
|
|
558
|
-
name: string;
|
|
559
|
-
readonly?: boolean;
|
|
560
|
-
}
|
|
561
|
-
declare function AssignRows(props: AssignRowsProps): React__default.JSX.Element;
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
565
|
-
* SPDX-License-Identifier: MIT
|
|
566
|
-
*/
|
|
567
|
-
|
|
568
|
-
type AssignValueType = {
|
|
569
|
-
operator: 'assign';
|
|
570
|
-
left?: IFlowRefValue;
|
|
571
|
-
right?: IFlowValue;
|
|
572
|
-
} | {
|
|
573
|
-
operator: 'declare';
|
|
574
|
-
left?: string;
|
|
575
|
-
right?: IFlowValue;
|
|
576
|
-
};
|
|
577
|
-
interface AssignRowProps {
|
|
578
|
-
value?: AssignValueType;
|
|
579
|
-
onChange?: (value?: AssignValueType) => void;
|
|
580
|
-
onDelete?: () => void;
|
|
581
|
-
readonly?: boolean;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
586
|
-
* SPDX-License-Identifier: MIT
|
|
587
|
-
*/
|
|
588
|
-
|
|
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;
|
|
622
|
-
|
|
623
|
-
/**
|
|
624
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
625
|
-
* SPDX-License-Identifier: MIT
|
|
626
|
-
*/
|
|
627
|
-
|
|
628
|
-
declare const provideBatchInputEffect: EffectOptions[];
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
632
|
-
* SPDX-License-Identifier: MIT
|
|
633
|
-
*/
|
|
634
|
-
|
|
635
|
-
/**
|
|
636
|
-
* Auto rename ref when form item's key is renamed
|
|
637
|
-
*
|
|
638
|
-
* Example:
|
|
639
|
-
*
|
|
640
|
-
* formMeta: {
|
|
641
|
-
* effects: {
|
|
642
|
-
* "inputsValues": autoRenameRefEffect,
|
|
643
|
-
* }
|
|
644
|
-
* }
|
|
645
|
-
*/
|
|
646
|
-
declare const autoRenameRefEffect: EffectOptions[];
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
650
|
-
* SPDX-License-Identifier: MIT
|
|
651
|
-
*/
|
|
652
|
-
|
|
653
|
-
declare const provideJsonSchemaOutputs: EffectOptions[];
|
|
654
|
-
|
|
655
|
-
/**
|
|
656
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
657
|
-
* SPDX-License-Identifier: MIT
|
|
658
|
-
*/
|
|
659
|
-
|
|
660
|
-
declare const syncVariableTitle: EffectOptions[];
|
|
661
|
-
|
|
662
|
-
/**
|
|
663
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
664
|
-
* SPDX-License-Identifier: MIT
|
|
665
|
-
*/
|
|
666
|
-
|
|
667
|
-
declare const validateWhenVariableSync: ({ scope, }?: {
|
|
668
|
-
scope?: "private" | "public";
|
|
669
|
-
}) => EffectOptions[];
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
673
|
-
* SPDX-License-Identifier: MIT
|
|
674
|
-
*/
|
|
675
|
-
|
|
676
|
-
/**
|
|
677
|
-
* Example:
|
|
678
|
-
* const formMeta = {
|
|
679
|
-
* effect: {
|
|
680
|
-
* 'inputsValues.*': listenRefValueChange(({ name, variable, form }) => {
|
|
681
|
-
* const schema = JsonSchemaUtils.astToSchema(variable?.type);
|
|
682
|
-
* form.setValueIn(`${name}.schema`, schema);
|
|
683
|
-
* })
|
|
684
|
-
* }
|
|
685
|
-
* }
|
|
686
|
-
* @param cb
|
|
687
|
-
* @returns
|
|
688
|
-
*/
|
|
689
|
-
declare const listenRefValueChange: (cb: (props: EffectFuncProps<IFlowRefValue> & {
|
|
690
|
-
variable?: BaseVariableField;
|
|
691
|
-
}) => void) => EffectOptions[];
|
|
692
|
-
|
|
693
|
-
/**
|
|
694
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
695
|
-
* SPDX-License-Identifier: MIT
|
|
696
|
-
*/
|
|
697
|
-
|
|
698
|
-
/**
|
|
699
|
-
* Example:
|
|
700
|
-
* const formMeta = {
|
|
701
|
-
* effect: {
|
|
702
|
-
* 'inputsValues.*': listenRefSchemaChange(({ name, schema, form }) => {
|
|
703
|
-
* form.setValueIn(`${name}.schema`, schema);
|
|
704
|
-
* })
|
|
705
|
-
* }
|
|
706
|
-
* }
|
|
707
|
-
* @param cb
|
|
708
|
-
* @returns
|
|
709
|
-
*/
|
|
710
|
-
declare const listenRefSchemaChange: (cb: (props: EffectFuncProps<IFlowRefValue> & {
|
|
711
|
-
schema?: IJsonSchema;
|
|
712
|
-
}) => void) => EffectOptions[];
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
716
|
-
* SPDX-License-Identifier: MIT
|
|
717
|
-
*/
|
|
718
|
-
interface LegacyFlowRefValueSchema {
|
|
719
|
-
type: 'ref';
|
|
720
|
-
content: string;
|
|
721
|
-
}
|
|
722
|
-
interface NewFlowRefValueSchema {
|
|
723
|
-
type: 'ref';
|
|
724
|
-
content: string[];
|
|
725
|
-
}
|
|
726
|
-
/**
|
|
727
|
-
* In flowgram 0.2.0, for introducing Loop variable functionality,
|
|
728
|
-
* the FlowRefValueSchema type definition is updated:
|
|
729
|
-
*
|
|
730
|
-
* interface LegacyFlowRefValueSchema {
|
|
731
|
-
* type: 'ref';
|
|
732
|
-
* content: string;
|
|
733
|
-
* }
|
|
734
|
-
*
|
|
735
|
-
* interface NewFlowRefValueSchema {
|
|
736
|
-
* type: 'ref';
|
|
737
|
-
* content: string[];
|
|
738
|
-
* }
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
* For making sure backend json will not be changed, we provide format legacy ref utils for updating the formData
|
|
742
|
-
*
|
|
743
|
-
* How to use:
|
|
744
|
-
*
|
|
745
|
-
* 1. Call formatLegacyRefOnSubmit on the formData before submitting
|
|
746
|
-
* 2. Call formatLegacyRefOnInit on the formData after submitting
|
|
747
|
-
*
|
|
748
|
-
* Example:
|
|
749
|
-
* import { formatLegacyRefOnSubmit, formatLegacyRefOnInit } from '@flowgram.ai/form-materials';
|
|
750
|
-
* formMeta: {
|
|
751
|
-
* formatOnSubmit: (data) => formatLegacyRefOnSubmit(data),
|
|
752
|
-
* formatOnInit: (data) => formatLegacyRefOnInit(data),
|
|
753
|
-
* }
|
|
754
|
-
*/
|
|
755
|
-
declare function formatLegacyRefOnSubmit(value: any): any;
|
|
756
|
-
/**
|
|
757
|
-
* In flowgram 0.2.0, for introducing Loop variable functionality,
|
|
758
|
-
* the FlowRefValueSchema type definition is updated:
|
|
759
|
-
*
|
|
760
|
-
* interface LegacyFlowRefValueSchema {
|
|
761
|
-
* type: 'ref';
|
|
762
|
-
* content: string;
|
|
763
|
-
* }
|
|
764
|
-
*
|
|
765
|
-
* interface NewFlowRefValueSchema {
|
|
766
|
-
* type: 'ref';
|
|
767
|
-
* content: string[];
|
|
768
|
-
* }
|
|
769
|
-
*
|
|
770
|
-
*
|
|
771
|
-
* For making sure backend json will not be changed, we provide format legacy ref utils for updating the formData
|
|
772
|
-
*
|
|
773
|
-
* How to use:
|
|
774
|
-
*
|
|
775
|
-
* 1. Call formatLegacyRefOnSubmit on the formData before submitting
|
|
776
|
-
* 2. Call formatLegacyRefOnInit on the formData after submitting
|
|
777
|
-
*
|
|
778
|
-
* Example:
|
|
779
|
-
* import { formatLegacyRefOnSubmit, formatLegacyRefOnInit } from '@flowgram.ai/form-materials';
|
|
780
|
-
*
|
|
781
|
-
* formMeta: {
|
|
782
|
-
* formatOnSubmit: (data) => formatLegacyRefOnSubmit(data),
|
|
783
|
-
* formatOnInit: (data) => formatLegacyRefOnInit(data),
|
|
784
|
-
* }
|
|
785
|
-
*/
|
|
786
|
-
declare function formatLegacyRefOnInit(value: any): any;
|
|
787
|
-
declare function isLegacyFlowRefValueSchema(value: any): value is LegacyFlowRefValueSchema;
|
|
788
|
-
declare function isNewFlowRefValueSchema(value: any): value is NewFlowRefValueSchema;
|
|
789
|
-
declare function formatLegacyRefToNewRef(value: LegacyFlowRefValueSchema): {
|
|
790
|
-
type: string;
|
|
791
|
-
content: string[];
|
|
792
|
-
};
|
|
793
|
-
declare function formatNewRefToLegacyRef(value: NewFlowRefValueSchema): {
|
|
794
|
-
type: string;
|
|
795
|
-
content: string;
|
|
796
|
-
};
|
|
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
|
-
|
|
928
|
-
/**
|
|
929
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
930
|
-
* SPDX-License-Identifier: MIT
|
|
931
|
-
*/
|
|
932
|
-
|
|
933
|
-
declare const provideBatchOutputsEffect: EffectOptions[];
|
|
934
|
-
/**
|
|
935
|
-
* Free Layout only right now
|
|
936
|
-
*/
|
|
937
|
-
declare const createBatchOutputsFormPlugin: FormPluginCreator<{
|
|
938
|
-
outputKey: string;
|
|
939
|
-
}>;
|
|
940
|
-
|
|
941
|
-
/**
|
|
942
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
943
|
-
* SPDX-License-Identifier: MIT
|
|
944
|
-
*/
|
|
945
|
-
interface InputConfig$1 {
|
|
946
|
-
sourceKey: string;
|
|
947
|
-
targetKey: string;
|
|
948
|
-
scope?: 'private' | 'public';
|
|
949
|
-
}
|
|
950
|
-
declare const createInferInputsPlugin: _flowgram_ai_node.FormPluginCreator<InputConfig$1>;
|
|
951
|
-
|
|
952
|
-
/**
|
|
953
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
954
|
-
* SPDX-License-Identifier: MIT
|
|
955
|
-
*/
|
|
956
|
-
interface InputConfig {
|
|
957
|
-
assignKey: string;
|
|
958
|
-
outputKey: string;
|
|
959
|
-
}
|
|
960
|
-
declare const createInferAssignPlugin: _flowgram_ai_node.FormPluginCreator<InputConfig>;
|
|
961
|
-
|
|
962
|
-
/**
|
|
963
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
964
|
-
* SPDX-License-Identifier: MIT
|
|
965
|
-
*/
|
|
966
|
-
|
|
967
|
-
interface Context {
|
|
968
|
-
node: FlowNodeEntity;
|
|
969
|
-
required?: boolean;
|
|
970
|
-
errorMessages?: {
|
|
971
|
-
required?: string;
|
|
972
|
-
unknownVariable?: string;
|
|
973
|
-
};
|
|
974
|
-
}
|
|
975
|
-
declare function validateFlowValue(value: IFlowValue | undefined, ctx: Context): {
|
|
976
|
-
level: FeedbackLevel;
|
|
977
|
-
message: string;
|
|
978
|
-
} | undefined;
|
|
979
|
-
|
|
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 };
|