@factorialco/f0-react 8.25.0 → 8.26.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 +3 -0
- package/dist/component-status.js +1 -1
- package/dist/{experimental-C7pr9C-7.js → experimental-Dtf0YbNg.js} +5483 -5271
- package/dist/experimental.d.ts +74 -0
- package/dist/experimental.js +276 -273
- package/dist/f0.d.ts +3 -0
- package/dist/f0.js +6 -6
- package/dist/i18n-provider-defaults.d.ts +3 -0
- package/dist/i18n-provider-defaults.js +3 -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";
|
|
@@ -12450,6 +12453,22 @@ export declare type F0SelectTagProp = string | {
|
|
|
12450
12453
|
|
|
12451
12454
|
export declare type F0SelectVariant = (typeof selectVariants)[number];
|
|
12452
12455
|
|
|
12456
|
+
/**
|
|
12457
|
+
* @experimental This is an experimental component, use it at your own risk.
|
|
12458
|
+
*/
|
|
12459
|
+
export declare const F0SwipeDeck: <T>({ deck, renderCard, label, empty, dataTestId, offsetThreshold, velocityThreshold, }: F0SwipeDeckProps<T>) => JSX_2.Element;
|
|
12460
|
+
|
|
12461
|
+
export declare type F0SwipeDeckProps<T> = WithDataTestIdProps & {
|
|
12462
|
+
deck: UseSwipeDeckResult<T>;
|
|
12463
|
+
renderCard: (item: T) => ReactNode;
|
|
12464
|
+
label?: string;
|
|
12465
|
+
empty?: ReactNode;
|
|
12466
|
+
/** Drag distance in pixels that commits a decision. */
|
|
12467
|
+
offsetThreshold?: number;
|
|
12468
|
+
/** Drag speed in pixels per second that commits a decision regardless of distance. */
|
|
12469
|
+
velocityThreshold?: number;
|
|
12470
|
+
};
|
|
12471
|
+
|
|
12453
12472
|
/**
|
|
12454
12473
|
* @experimental This is an experimental component use it at your own risk
|
|
12455
12474
|
*/
|
|
@@ -18792,6 +18811,24 @@ export declare type SummaryKey<Definition extends SummariesDefinition> = Definit
|
|
|
18792
18811
|
|
|
18793
18812
|
export declare type SummaryType = "sum";
|
|
18794
18813
|
|
|
18814
|
+
export declare type SwipeDecision<T> = {
|
|
18815
|
+
item: T;
|
|
18816
|
+
direction: SwipeDirection;
|
|
18817
|
+
};
|
|
18818
|
+
|
|
18819
|
+
export declare type SwipeDeckAction = {
|
|
18820
|
+
type: "decide";
|
|
18821
|
+
direction: SwipeDirection;
|
|
18822
|
+
} | {
|
|
18823
|
+
type: "undo";
|
|
18824
|
+
} | {
|
|
18825
|
+
type: "rollback";
|
|
18826
|
+
};
|
|
18827
|
+
|
|
18828
|
+
export declare type SwipeDirection = (typeof swipeDirections)[number];
|
|
18829
|
+
|
|
18830
|
+
export declare const swipeDirections: readonly ["left", "right"];
|
|
18831
|
+
|
|
18795
18832
|
/**
|
|
18796
18833
|
* @experimental This is an experimental component use it at your own risk
|
|
18797
18834
|
*/
|
|
@@ -20058,6 +20095,43 @@ export declare const useSidebarChats: () => SidebarChatStore;
|
|
|
20058
20095
|
*/
|
|
20059
20096
|
export declare function useSidePanel(): SidePanelContextValue;
|
|
20060
20097
|
|
|
20098
|
+
export declare const useSwipeDeck: <T>({ items, getItemId, onDecide, onUndo, onNeedMore, undoDepth, needMoreThreshold, }: UseSwipeDeckOptions<T>) => UseSwipeDeckResult<T>;
|
|
20099
|
+
|
|
20100
|
+
export declare type UseSwipeDeckOptions<T> = {
|
|
20101
|
+
/**
|
|
20102
|
+
* Append-only: the deck reads it by position, so a page of new items must be
|
|
20103
|
+
* added to the end. Replacing the array with a differently ordered or
|
|
20104
|
+
* filtered one makes the deck skip items.
|
|
20105
|
+
*/
|
|
20106
|
+
items: T[];
|
|
20107
|
+
getItemId: (item: T) => string;
|
|
20108
|
+
/**
|
|
20109
|
+
* `rollback` returns the item to the deck, for a consumer whose mutation
|
|
20110
|
+
* failed: as the current card when it was the most recent decision, after
|
|
20111
|
+
* the items loaded so far otherwise.
|
|
20112
|
+
*/
|
|
20113
|
+
onDecide?: (decision: SwipeDecision<T>, rollback: () => void) => void;
|
|
20114
|
+
onUndo?: (item: T) => void;
|
|
20115
|
+
/** Fires once each time the remaining items drop to `needMoreThreshold`. */
|
|
20116
|
+
onNeedMore?: () => void;
|
|
20117
|
+
undoDepth?: number;
|
|
20118
|
+
needMoreThreshold?: number;
|
|
20119
|
+
};
|
|
20120
|
+
|
|
20121
|
+
export declare type UseSwipeDeckResult<T> = {
|
|
20122
|
+
current: T | undefined;
|
|
20123
|
+
currentId: string | undefined;
|
|
20124
|
+
index: number;
|
|
20125
|
+
total: number;
|
|
20126
|
+
remaining: number;
|
|
20127
|
+
canUndo: boolean;
|
|
20128
|
+
lastAction: SwipeDeckAction | undefined;
|
|
20129
|
+
decide: (direction: SwipeDirection) => void;
|
|
20130
|
+
swipeLeft: () => void;
|
|
20131
|
+
swipeRight: () => void;
|
|
20132
|
+
undo: () => void;
|
|
20133
|
+
};
|
|
20134
|
+
|
|
20061
20135
|
/**
|
|
20062
20136
|
* Attaches a track to a media element F0 owns.
|
|
20063
20137
|
*
|