@factorialco/f0-react 8.25.0 → 8.27.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/{ChatPdfThumbnail-BP3BhC1t.js → ChatPdfThumbnail-Clw27LPM.js} +1 -1
- package/dist/{ChatPostComposerDialog-Dj2P0bnN.js → ChatPostComposerDialog-CmnRQ1F0.js} +2 -2
- package/dist/{DocumentToolbar-DSrjm9Sk.js → DocumentToolbar-DHU5HR3w.js} +1 -1
- package/dist/{DocxViewer-DmH6PhfZ.js → DocxViewer-CHZTQJgL.js} +1 -1
- package/dist/{F0Map-CzUf3hPY.js → F0Map-CHhjjvNl.js} +2 -2
- package/dist/{F0VideoPlayer-BwJozdrv.js → F0VideoPlayer-D0WbTDFv.js} +1 -1
- package/dist/{MapProvider-CW-YsazY.js → MapProvider-zKDCz6AN.js} +55 -55
- package/dist/{SheetViewer-M_1YpAmn.js → SheetViewer-xXMjudIA.js} +1 -1
- package/dist/{TextViewer-DHX-xQuE.js → TextViewer-Wj3flD_N.js} +1 -1
- package/dist/ai.d.ts +4 -0
- package/dist/component-status.js +1 -1
- package/dist/{experimental-C7pr9C-7.js → experimental-Dtf0YbNg.js} +5483 -5271
- package/dist/experimental.d.ts +75 -0
- package/dist/experimental.js +276 -273
- package/dist/f0.d.ts +60 -22
- package/dist/f0.js +7995 -7947
- package/dist/i18n-provider-defaults.d.ts +4 -0
- package/dist/i18n-provider-defaults.js +4 -0
- package/dist/{index-Ib6ZsExK.js → index-B4hH3GtV.js} +2 -2
- package/dist/index-B5gQqowy.js +4 -0
- package/dist/{index-DIFVX207.js → index-CWsgWlWh.js} +2 -2
- package/dist/{index-BfdrCa05.js → index-CqSIbpwd.js} +1 -1
- package/dist/{pdfWorker-Cix1s-5O.js → pdfWorker-el3_96nF.js} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/index-Cw8x44pA.js +0 -4
package/dist/experimental.d.ts
CHANGED
|
@@ -5472,6 +5472,9 @@ declare const defaultTranslations: {
|
|
|
5472
5472
|
readonly language: "Language";
|
|
5473
5473
|
readonly audio: "Audio";
|
|
5474
5474
|
};
|
|
5475
|
+
readonly swipeDeck: {
|
|
5476
|
+
readonly label: "Swipe deck";
|
|
5477
|
+
};
|
|
5475
5478
|
readonly meetingCard: {
|
|
5476
5479
|
readonly today: "Today";
|
|
5477
5480
|
readonly yesterday: "Yesterday";
|
|
@@ -6195,6 +6198,7 @@ declare const defaultTranslations: {
|
|
|
6195
6198
|
readonly description: "Try a different date or fewer filters";
|
|
6196
6199
|
};
|
|
6197
6200
|
readonly windowedCategories: "Showing {{count}} of {{total}} categories";
|
|
6201
|
+
readonly noData: "No data";
|
|
6198
6202
|
readonly tooltip: {
|
|
6199
6203
|
readonly ofTotal: "of total";
|
|
6200
6204
|
readonly total: "total";
|
|
@@ -12450,6 +12454,22 @@ export declare type F0SelectTagProp = string | {
|
|
|
12450
12454
|
|
|
12451
12455
|
export declare type F0SelectVariant = (typeof selectVariants)[number];
|
|
12452
12456
|
|
|
12457
|
+
/**
|
|
12458
|
+
* @experimental This is an experimental component, use it at your own risk.
|
|
12459
|
+
*/
|
|
12460
|
+
export declare const F0SwipeDeck: <T>({ deck, renderCard, label, empty, dataTestId, offsetThreshold, velocityThreshold, }: F0SwipeDeckProps<T>) => JSX_2.Element;
|
|
12461
|
+
|
|
12462
|
+
export declare type F0SwipeDeckProps<T> = WithDataTestIdProps & {
|
|
12463
|
+
deck: UseSwipeDeckResult<T>;
|
|
12464
|
+
renderCard: (item: T) => ReactNode;
|
|
12465
|
+
label?: string;
|
|
12466
|
+
empty?: ReactNode;
|
|
12467
|
+
/** Drag distance in pixels that commits a decision. */
|
|
12468
|
+
offsetThreshold?: number;
|
|
12469
|
+
/** Drag speed in pixels per second that commits a decision regardless of distance. */
|
|
12470
|
+
velocityThreshold?: number;
|
|
12471
|
+
};
|
|
12472
|
+
|
|
12453
12473
|
/**
|
|
12454
12474
|
* @experimental This is an experimental component use it at your own risk
|
|
12455
12475
|
*/
|
|
@@ -18792,6 +18812,24 @@ export declare type SummaryKey<Definition extends SummariesDefinition> = Definit
|
|
|
18792
18812
|
|
|
18793
18813
|
export declare type SummaryType = "sum";
|
|
18794
18814
|
|
|
18815
|
+
export declare type SwipeDecision<T> = {
|
|
18816
|
+
item: T;
|
|
18817
|
+
direction: SwipeDirection;
|
|
18818
|
+
};
|
|
18819
|
+
|
|
18820
|
+
export declare type SwipeDeckAction = {
|
|
18821
|
+
type: "decide";
|
|
18822
|
+
direction: SwipeDirection;
|
|
18823
|
+
} | {
|
|
18824
|
+
type: "undo";
|
|
18825
|
+
} | {
|
|
18826
|
+
type: "rollback";
|
|
18827
|
+
};
|
|
18828
|
+
|
|
18829
|
+
export declare type SwipeDirection = (typeof swipeDirections)[number];
|
|
18830
|
+
|
|
18831
|
+
export declare const swipeDirections: readonly ["left", "right"];
|
|
18832
|
+
|
|
18795
18833
|
/**
|
|
18796
18834
|
* @experimental This is an experimental component use it at your own risk
|
|
18797
18835
|
*/
|
|
@@ -20058,6 +20096,43 @@ export declare const useSidebarChats: () => SidebarChatStore;
|
|
|
20058
20096
|
*/
|
|
20059
20097
|
export declare function useSidePanel(): SidePanelContextValue;
|
|
20060
20098
|
|
|
20099
|
+
export declare const useSwipeDeck: <T>({ items, getItemId, onDecide, onUndo, onNeedMore, undoDepth, needMoreThreshold, }: UseSwipeDeckOptions<T>) => UseSwipeDeckResult<T>;
|
|
20100
|
+
|
|
20101
|
+
export declare type UseSwipeDeckOptions<T> = {
|
|
20102
|
+
/**
|
|
20103
|
+
* Append-only: the deck reads it by position, so a page of new items must be
|
|
20104
|
+
* added to the end. Replacing the array with a differently ordered or
|
|
20105
|
+
* filtered one makes the deck skip items.
|
|
20106
|
+
*/
|
|
20107
|
+
items: T[];
|
|
20108
|
+
getItemId: (item: T) => string;
|
|
20109
|
+
/**
|
|
20110
|
+
* `rollback` returns the item to the deck, for a consumer whose mutation
|
|
20111
|
+
* failed: as the current card when it was the most recent decision, after
|
|
20112
|
+
* the items loaded so far otherwise.
|
|
20113
|
+
*/
|
|
20114
|
+
onDecide?: (decision: SwipeDecision<T>, rollback: () => void) => void;
|
|
20115
|
+
onUndo?: (item: T) => void;
|
|
20116
|
+
/** Fires once each time the remaining items drop to `needMoreThreshold`. */
|
|
20117
|
+
onNeedMore?: () => void;
|
|
20118
|
+
undoDepth?: number;
|
|
20119
|
+
needMoreThreshold?: number;
|
|
20120
|
+
};
|
|
20121
|
+
|
|
20122
|
+
export declare type UseSwipeDeckResult<T> = {
|
|
20123
|
+
current: T | undefined;
|
|
20124
|
+
currentId: string | undefined;
|
|
20125
|
+
index: number;
|
|
20126
|
+
total: number;
|
|
20127
|
+
remaining: number;
|
|
20128
|
+
canUndo: boolean;
|
|
20129
|
+
lastAction: SwipeDeckAction | undefined;
|
|
20130
|
+
decide: (direction: SwipeDirection) => void;
|
|
20131
|
+
swipeLeft: () => void;
|
|
20132
|
+
swipeRight: () => void;
|
|
20133
|
+
undo: () => void;
|
|
20134
|
+
};
|
|
20135
|
+
|
|
20061
20136
|
/**
|
|
20062
20137
|
* Attaches a track to a media element F0 owns.
|
|
20063
20138
|
*
|