@flowgram.ai/form-materials 0.4.6 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/esm/{chunk-6OZSB6PD.js → chunk-727SU246.js} +6 -3
  2. package/dist/esm/chunk-727SU246.js.map +1 -0
  3. package/dist/esm/{chunk-QIJ4QVB2.js → chunk-DEZUEMUM.js} +17 -4
  4. package/dist/esm/chunk-DEZUEMUM.js.map +1 -0
  5. package/dist/esm/{chunk-G4HQ7OSI.js → chunk-MFDEE4HB.js} +5 -5
  6. package/dist/esm/chunk-MFDEE4HB.js.map +1 -0
  7. package/dist/esm/{editor-H2R7JJLO.js → editor-2YHACGQ2.js} +4 -4
  8. package/dist/esm/editor-2YHACGQ2.js.map +1 -0
  9. package/dist/esm/{editor-JX42GFAZ.js → editor-G63XGWH2.js} +5 -5
  10. package/dist/esm/editor-G63XGWH2.js.map +1 -0
  11. package/dist/esm/{editor-YMNCDGUR.js → editor-OXPGKPF5.js} +4 -4
  12. package/dist/esm/editor-OXPGKPF5.js.map +1 -0
  13. package/dist/esm/index.js +24 -23
  14. package/dist/esm/index.js.map +1 -1
  15. package/dist/index.d.mts +10 -2
  16. package/dist/index.d.ts +10 -2
  17. package/dist/index.js +336 -313
  18. package/dist/index.js.map +1 -1
  19. package/package.json +7 -7
  20. package/src/components/code-editor/index.tsx +2 -2
  21. package/src/components/display-inputs-values/index.tsx +1 -1
  22. package/src/components/dynamic-value-input/hooks.ts +1 -1
  23. package/src/components/inputs-values-tree/hooks/use-child-list.tsx +1 -1
  24. package/src/components/json-editor-with-variables/extensions/variable-tag.tsx +1 -1
  25. package/src/components/json-editor-with-variables/index.tsx +2 -2
  26. package/src/components/json-schema-editor/hooks.tsx +1 -1
  27. package/src/components/prompt-editor/index.tsx +2 -2
  28. package/src/components/prompt-editor-with-inputs/index.tsx +2 -2
  29. package/src/components/prompt-editor-with-inputs/inputs-picker.tsx +1 -1
  30. package/src/components/prompt-editor-with-variables/extensions/variable-tag.tsx +1 -1
  31. package/src/components/prompt-editor-with-variables/index.tsx +2 -2
  32. package/src/effects/validate-when-variable-sync/index.ts +1 -1
  33. package/src/form-plugins/infer-assign-plugin/index.ts +1 -1
  34. package/src/form-plugins/infer-inputs-plugin/index.ts +1 -1
  35. package/src/hooks/use-object-list/index.tsx +1 -1
  36. package/src/shared/flow-value/utils.ts +1 -1
  37. package/src/shared/format-legacy-refs/index.ts +1 -1
  38. package/src/shared/index.ts +1 -0
  39. package/src/shared/lazy-suspense/index.tsx +28 -0
  40. package/src/validate/validate-flow-value/index.tsx +1 -1
  41. package/dist/esm/chunk-6OZSB6PD.js.map +0 -1
  42. package/dist/esm/chunk-G4HQ7OSI.js.map +0 -1
  43. package/dist/esm/chunk-QIJ4QVB2.js.map +0 -1
  44. package/dist/esm/editor-H2R7JJLO.js.map +0 -1
  45. package/dist/esm/editor-JX42GFAZ.js.map +0 -1
  46. package/dist/esm/editor-YMNCDGUR.js.map +0 -1
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default from 'react';
2
+ import React__default, { ComponentType, lazy } from 'react';
3
3
  import { IJsonSchema, JsonSchemaTypeRegistry as JsonSchemaTypeRegistry$1, JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
4
4
  export { IJsonSchema, JsonSchemaBasicType, JsonSchemaUtils } from '@flowgram.ai/json-schema';
5
5
  import { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
@@ -907,6 +907,14 @@ interface IPolyfillRoot {
907
907
  declare function polyfillCreateRoot(dom: HTMLElement): IPolyfillRoot;
908
908
  declare function unstableSetCreateRoot(createRoot: (dom: HTMLElement) => IPolyfillRoot): void;
909
909
 
910
+ /**
911
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
912
+ * SPDX-License-Identifier: MIT
913
+ */
914
+
915
+ declare function withSuspense<T extends ComponentType<any>>(Component: T, fallback?: React__default.ReactNode): T;
916
+ declare function lazySuspense<T extends ComponentType<any>>(params: Parameters<typeof lazy<T>>[0], fallback?: React__default.ReactNode): React__default.LazyExoticComponent<T>;
917
+
910
918
  /**
911
919
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
912
920
  * SPDX-License-Identifier: MIT
@@ -981,4 +989,4 @@ declare function useObjectList<ValueType>({ value, onChange, sortIndexKey, }: {
981
989
  remove: (itemId: string) => void;
982
990
  };
983
991
 
984
- 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, autoRenameRefEffect, createBatchOutputsFormPlugin, createDisableDeclarationPlugin, createInferAssignPlugin, createInferInputsPlugin, createInjectMaterial, createTypePresetPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, listenRefSchemaChange, listenRefValueChange, parseTypeSelectValue, polyfillCreateRoot, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, unstableSetCreateRoot, useObjectList, useTypeManager, useVariableTree, validateFlowValue, validateWhenVariableSync };
992
+ 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, 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 };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default from 'react';
2
+ import React__default, { ComponentType, lazy } from 'react';
3
3
  import { IJsonSchema, JsonSchemaTypeRegistry as JsonSchemaTypeRegistry$1, JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
4
4
  export { IJsonSchema, JsonSchemaBasicType, JsonSchemaUtils } from '@flowgram.ai/json-schema';
5
5
  import { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
@@ -907,6 +907,14 @@ interface IPolyfillRoot {
907
907
  declare function polyfillCreateRoot(dom: HTMLElement): IPolyfillRoot;
908
908
  declare function unstableSetCreateRoot(createRoot: (dom: HTMLElement) => IPolyfillRoot): void;
909
909
 
910
+ /**
911
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
912
+ * SPDX-License-Identifier: MIT
913
+ */
914
+
915
+ declare function withSuspense<T extends ComponentType<any>>(Component: T, fallback?: React__default.ReactNode): T;
916
+ declare function lazySuspense<T extends ComponentType<any>>(params: Parameters<typeof lazy<T>>[0], fallback?: React__default.ReactNode): React__default.LazyExoticComponent<T>;
917
+
910
918
  /**
911
919
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
912
920
  * SPDX-License-Identifier: MIT
@@ -981,4 +989,4 @@ declare function useObjectList<ValueType>({ value, onChange, sortIndexKey, }: {
981
989
  remove: (itemId: string) => void;
982
990
  };
983
991
 
984
- 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, autoRenameRefEffect, createBatchOutputsFormPlugin, createDisableDeclarationPlugin, createInferAssignPlugin, createInferInputsPlugin, createInjectMaterial, createTypePresetPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, listenRefSchemaChange, listenRefValueChange, parseTypeSelectValue, polyfillCreateRoot, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, unstableSetCreateRoot, useObjectList, useTypeManager, useVariableTree, validateFlowValue, validateWhenVariableSync };
992
+ 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, 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 };