@factorialco/f0-react 1.197.1 → 1.198.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/f0.d.ts CHANGED
@@ -1034,9 +1034,9 @@ export declare const defaultTranslations: {
1034
1034
  */
1035
1035
  declare type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
1036
1036
 
1037
- export declare interface DndDriver {
1037
+ export declare interface DndDriver<T = unknown> {
1038
1038
  registerDraggable: (el: HTMLElement, options: {
1039
- payload: DragPayload;
1039
+ payload: DragPayload<T>;
1040
1040
  disabled?: boolean;
1041
1041
  handle?: HTMLElement | null;
1042
1042
  }) => () => void;
@@ -1046,7 +1046,7 @@ export declare interface DndDriver {
1046
1046
  }) => () => void;
1047
1047
  subscribe: (cb: (e: {
1048
1048
  phase: "start" | "over" | "drop" | "cancel";
1049
- source: DragPayload;
1049
+ source: DragPayload<T>;
1050
1050
  intent?: DropIntent;
1051
1051
  }) => void) => () => void;
1052
1052
  }
@@ -2618,9 +2618,9 @@ export declare function useDndEvents(handler: (e: {
2618
2618
  source: DragPayload;
2619
2619
  }) => void): void;
2620
2620
 
2621
- export declare function useDraggable(args: {
2621
+ export declare function useDraggable<T = unknown>(args: {
2622
2622
  ref: React.RefObject<HTMLElement>;
2623
- payload: DragPayload;
2623
+ payload: DragPayload<T>;
2624
2624
  disabled?: boolean;
2625
2625
  handleRef?: React.RefObject<HTMLElement | null>;
2626
2626
  }): void;
@@ -2737,8 +2737,8 @@ declare global {
2737
2737
 
2738
2738
  declare module "@tiptap/core" {
2739
2739
  interface Commands<ReturnType> {
2740
- liveCompanion: {
2741
- insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
2740
+ aiBlock: {
2741
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfigWithLabels) => ReturnType;
2742
2742
  };
2743
2743
  }
2744
2744
  }
@@ -2746,8 +2746,8 @@ declare module "@tiptap/core" {
2746
2746
 
2747
2747
  declare module "@tiptap/core" {
2748
2748
  interface Commands<ReturnType> {
2749
- aiBlock: {
2750
- insertAIBlock: (data: AIBlockData, config: AIBlockConfigWithLabels) => ReturnType;
2749
+ liveCompanion: {
2750
+ insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
2751
2751
  };
2752
2752
  }
2753
2753
  }