@factorialco/f0-react 8.25.0 → 8.28.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 (31) hide show
  1. package/dist/{ChatPdfThumbnail-BP3BhC1t.js → ChatPdfThumbnail-76lZY5ae.js} +1 -1
  2. package/dist/{ChatPostComposerDialog-Dj2P0bnN.js → ChatPostComposerDialog-CEX5fw42.js} +3 -3
  3. package/dist/{DocumentToolbar-DSrjm9Sk.js → DocumentToolbar-DYmTcpSP.js} +2 -2
  4. package/dist/{DocxViewer-DmH6PhfZ.js → DocxViewer-B9TQv3Hj.js} +2 -2
  5. package/dist/{F0AiProcessingOverlay-Ci2nfhE-.js → F0AiProcessingOverlay-hGn9LOZJ.js} +1 -1
  6. package/dist/{F0CanvasPanel-BVax--nb.js → F0CanvasPanel-9nKAw7ck.js} +11 -10
  7. package/dist/{F0Map-CzUf3hPY.js → F0Map-Chfnm0BC.js} +4 -4
  8. package/dist/{F0VideoPlayer-BwJozdrv.js → F0VideoPlayer-BlIN9tNR.js} +2 -2
  9. package/dist/{MapProvider-CW-YsazY.js → MapProvider-DHX6Eb2y.js} +56 -56
  10. package/dist/{SheetViewer-M_1YpAmn.js → SheetViewer-CenNW1Oc.js} +2 -2
  11. package/dist/{TextViewer-DHX-xQuE.js → TextViewer-ChFUVDAi.js} +2 -2
  12. package/dist/ai.d.ts +11 -7
  13. package/dist/ai.js +2 -2
  14. package/dist/component-status.d.ts +7 -7
  15. package/dist/component-status.js +1 -1
  16. package/dist/{experimental-C7pr9C-7.js → experimental-B0dtwyN_.js} +5536 -5306
  17. package/dist/experimental.d.ts +89 -7
  18. package/dist/experimental.js +276 -273
  19. package/dist/f0.d.ts +67 -29
  20. package/dist/f0.js +7995 -7947
  21. package/dist/i18n-provider-defaults.d.ts +11 -7
  22. package/dist/i18n-provider-defaults.js +4 -0
  23. package/dist/{index-Ib6ZsExK.js → index-Cvy98Wf3.js} +3 -3
  24. package/dist/{index-cPheoSzU.js → index-DVdaC2pk.js} +1 -1
  25. package/dist/index-DcRkKTf6.js +4 -0
  26. package/dist/{index-BfdrCa05.js → index-DvgwBZyS.js} +2 -2
  27. package/dist/{index-DIFVX207.js → index-mWe7Jgzz.js} +3 -3
  28. package/dist/{pdfWorker-Cix1s-5O.js → pdfWorker-BuQCiUUb.js} +2 -2
  29. package/dist/styles.css +1 -1
  30. package/package.json +1 -1
  31. package/dist/index-Cw8x44pA.js +0 -4
@@ -2019,6 +2019,13 @@ export declare interface CalendarEventProps {
2019
2019
  fromDate?: Date;
2020
2020
  toDate?: Date;
2021
2021
  noBackground?: boolean;
2022
+ /**
2023
+ * Makes the whole event a real link, routed through the app's `LinkProvider`.
2024
+ * Only an href to another host opens a new tab.
2025
+ */
2026
+ href?: string;
2027
+ /** Called when a linked event is activated, alongside its navigation. */
2028
+ onClick?: () => void;
2022
2029
  }
2023
2030
 
2024
2031
  export declare type CalendarMode = "single" | "range";
@@ -5472,6 +5479,9 @@ declare const defaultTranslations: {
5472
5479
  readonly language: "Language";
5473
5480
  readonly audio: "Audio";
5474
5481
  };
5482
+ readonly swipeDeck: {
5483
+ readonly label: "Swipe deck";
5484
+ };
5475
5485
  readonly meetingCard: {
5476
5486
  readonly today: "Today";
5477
5487
  readonly yesterday: "Yesterday";
@@ -6195,6 +6205,7 @@ declare const defaultTranslations: {
6195
6205
  readonly description: "Try a different date or fewer filters";
6196
6206
  };
6197
6207
  readonly windowedCategories: "Showing {{count}} of {{total}} categories";
6208
+ readonly noData: "No data";
6198
6209
  readonly tooltip: {
6199
6210
  readonly ofTotal: "of total";
6200
6211
  readonly total: "total";
@@ -12450,6 +12461,22 @@ export declare type F0SelectTagProp = string | {
12450
12461
 
12451
12462
  export declare type F0SelectVariant = (typeof selectVariants)[number];
12452
12463
 
12464
+ /**
12465
+ * @experimental This is an experimental component, use it at your own risk.
12466
+ */
12467
+ export declare const F0SwipeDeck: <T>({ deck, renderCard, label, empty, dataTestId, offsetThreshold, velocityThreshold, }: F0SwipeDeckProps<T>) => JSX_2.Element;
12468
+
12469
+ export declare type F0SwipeDeckProps<T> = WithDataTestIdProps & {
12470
+ deck: UseSwipeDeckResult<T>;
12471
+ renderCard: (item: T) => ReactNode;
12472
+ label?: string;
12473
+ empty?: ReactNode;
12474
+ /** Drag distance in pixels that commits a decision. */
12475
+ offsetThreshold?: number;
12476
+ /** Drag speed in pixels per second that commits a decision regardless of distance. */
12477
+ velocityThreshold?: number;
12478
+ };
12479
+
12453
12480
  /**
12454
12481
  * @experimental This is an experimental component use it at your own risk
12455
12482
  */
@@ -18792,6 +18819,24 @@ export declare type SummaryKey<Definition extends SummariesDefinition> = Definit
18792
18819
 
18793
18820
  export declare type SummaryType = "sum";
18794
18821
 
18822
+ export declare type SwipeDecision<T> = {
18823
+ item: T;
18824
+ direction: SwipeDirection;
18825
+ };
18826
+
18827
+ export declare type SwipeDeckAction = {
18828
+ type: "decide";
18829
+ direction: SwipeDirection;
18830
+ } | {
18831
+ type: "undo";
18832
+ } | {
18833
+ type: "rollback";
18834
+ };
18835
+
18836
+ export declare type SwipeDirection = (typeof swipeDirections)[number];
18837
+
18838
+ export declare const swipeDirections: readonly ["left", "right"];
18839
+
18795
18840
  /**
18796
18841
  * @experimental This is an experimental component use it at your own risk
18797
18842
  */
@@ -20058,6 +20103,43 @@ export declare const useSidebarChats: () => SidebarChatStore;
20058
20103
  */
20059
20104
  export declare function useSidePanel(): SidePanelContextValue;
20060
20105
 
20106
+ export declare const useSwipeDeck: <T>({ items, getItemId, onDecide, onUndo, onNeedMore, undoDepth, needMoreThreshold, }: UseSwipeDeckOptions<T>) => UseSwipeDeckResult<T>;
20107
+
20108
+ export declare type UseSwipeDeckOptions<T> = {
20109
+ /**
20110
+ * Append-only: the deck reads it by position, so a page of new items must be
20111
+ * added to the end. Replacing the array with a differently ordered or
20112
+ * filtered one makes the deck skip items.
20113
+ */
20114
+ items: T[];
20115
+ getItemId: (item: T) => string;
20116
+ /**
20117
+ * `rollback` returns the item to the deck, for a consumer whose mutation
20118
+ * failed: as the current card when it was the most recent decision, after
20119
+ * the items loaded so far otherwise.
20120
+ */
20121
+ onDecide?: (decision: SwipeDecision<T>, rollback: () => void) => void;
20122
+ onUndo?: (item: T) => void;
20123
+ /** Fires once each time the remaining items drop to `needMoreThreshold`. */
20124
+ onNeedMore?: () => void;
20125
+ undoDepth?: number;
20126
+ needMoreThreshold?: number;
20127
+ };
20128
+
20129
+ export declare type UseSwipeDeckResult<T> = {
20130
+ current: T | undefined;
20131
+ currentId: string | undefined;
20132
+ index: number;
20133
+ total: number;
20134
+ remaining: number;
20135
+ canUndo: boolean;
20136
+ lastAction: SwipeDeckAction | undefined;
20137
+ decide: (direction: SwipeDirection) => void;
20138
+ swipeLeft: () => void;
20139
+ swipeRight: () => void;
20140
+ undo: () => void;
20141
+ };
20142
+
20061
20143
  /**
20062
20144
  * Attaches a track to a media element F0 owns.
20063
20145
  *
@@ -21039,9 +21121,10 @@ declare module "@tiptap/core" {
21039
21121
 
21040
21122
  declare module "@tiptap/core" {
21041
21123
  interface Commands<ReturnType> {
21042
- fontSize: {
21043
- setFontSize: (fontSize: string) => ReturnType;
21044
- unsetFontSize: () => ReturnType;
21124
+ indent: {
21125
+ setIndent: (level: number) => ReturnType;
21126
+ unsetIndent: () => ReturnType;
21127
+ outdent: () => ReturnType;
21045
21128
  };
21046
21129
  }
21047
21130
  }
@@ -21049,10 +21132,9 @@ declare module "@tiptap/core" {
21049
21132
 
21050
21133
  declare module "@tiptap/core" {
21051
21134
  interface Commands<ReturnType> {
21052
- indent: {
21053
- setIndent: (level: number) => ReturnType;
21054
- unsetIndent: () => ReturnType;
21055
- outdent: () => ReturnType;
21135
+ fontSize: {
21136
+ setFontSize: (fontSize: string) => ReturnType;
21137
+ unsetFontSize: () => ReturnType;
21056
21138
  };
21057
21139
  }
21058
21140
  }