@factorialco/f0-react 1.452.0 → 1.454.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.
package/dist/f0.d.ts CHANGED
@@ -286,6 +286,7 @@ declare type ActionDefinition = DropdownItemSeparator | (Pick<DropdownItemObject
286
286
  onClick: () => void;
287
287
  enabled?: boolean;
288
288
  type?: "primary" | "secondary" | "other";
289
+ hideLabel?: boolean;
289
290
  });
290
291
 
291
292
  export declare type ActionItemStatus = (typeof actionItemStatuses)[number];
@@ -6521,6 +6522,21 @@ declare interface F0FormActionBarSubmitConfig extends F0FormSubmitConfigBase {
6521
6522
  actionBarLabel?: string;
6522
6523
  }
6523
6524
 
6525
+ /**
6526
+ * Common props shared across all F0Form variants (formDefinition-based).
6527
+ * Used as the constraint for `F0FormLikeComponent`.
6528
+ */
6529
+ declare interface F0FormCommonProps {
6530
+ formDefinition: F0FormDefinitionSingleSchema_2<F0FormSchema> | F0FormDefinitionPerSection_2<F0PerSectionSchema>;
6531
+ className?: string;
6532
+ styling?: F0FormStylingConfig;
6533
+ formRef?: React.MutableRefObject<F0FormRef | null>;
6534
+ initialFiles?: InitialFile[];
6535
+ useUpload?: UseFileUpload;
6536
+ renderCustomField?: RenderCustomFieldFunction;
6537
+ isLoading?: boolean;
6538
+ }
6539
+
6524
6540
  /**
6525
6541
  * Submit configuration for default button type
6526
6542
  */
@@ -6748,6 +6764,19 @@ declare interface F0FormFieldNonFileProps extends F0FormFieldCommonProps {
6748
6764
 
6749
6765
  export declare type F0FormFieldProps = F0FormFieldFileProps | F0FormFieldNonFileProps;
6750
6766
 
6767
+ /**
6768
+ * Component type for F0Form-like wrappers (e.g. FactorialF0Form).
6769
+ *
6770
+ * Because F0Form uses overloaded/generic signatures, neither F0Form
6771
+ * nor FactorialF0Form can be directly assigned to this type.
6772
+ * Cast the component when passing it:
6773
+ *
6774
+ * ```tsx
6775
+ * <F0Provider formComponent={FactorialF0Form as F0FormLikeComponent} />
6776
+ * ```
6777
+ */
6778
+ export declare type F0FormLikeComponent = React.ComponentType<F0FormCommonProps>;
6779
+
6751
6780
  /**
6752
6781
  * Union of all F0Form prop variants.
6753
6782
  * The component detects the mode based on whether `schema` is a single Zod schema
@@ -7314,6 +7343,17 @@ export declare const F0Provider: React.FC<{
7314
7343
  showExperimentalWarnings?: boolean;
7315
7344
  dataCollectionStorageHandler?: DataCollectionStorageHandler;
7316
7345
  renderDataTestIdAttribute?: boolean;
7346
+ /**
7347
+ * Custom form component to use instead of the default F0Form in
7348
+ * AI canvas form panels. Useful for platform-level wrappers that
7349
+ * auto-provide `renderCustomField` or `useUpload`.
7350
+ *
7351
+ * Cast overloaded components when passing:
7352
+ * ```tsx
7353
+ * <F0Provider formComponent={FactorialF0Form as F0FormLikeComponent} />
7354
+ * ```
7355
+ */
7356
+ formComponent?: F0FormLikeComponent;
7317
7357
  }>;
7318
7358
 
7319
7359
  /**
@@ -12456,6 +12496,8 @@ export declare interface UseF0FormReturn {
12456
12496
  */
12457
12497
  export declare type UseFileUpload = () => FileUploadHookReturn;
12458
12498
 
12499
+ export declare const useFormComponent: () => F0FormLikeComponent | undefined;
12500
+
12459
12501
  export declare const useGroups: <R extends RecordType>(groups: GroupRecord<R>[], defaultOpenGroups?: boolean | GroupRecord<R>["key"][]) => {
12460
12502
  openGroups: Record<string, boolean>;
12461
12503
  setGroupOpen: (key: string, open: boolean) => void;