@factorialco/f0-react 8.24.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.
Files changed (31) hide show
  1. package/dist/{ChatPdfThumbnail-Hbw_WAU8.js → ChatPdfThumbnail-Clw27LPM.js} +1 -1
  2. package/dist/{ChatPostComposerDialog-tfRN0-3K.js → ChatPostComposerDialog-CmnRQ1F0.js} +19 -19
  3. package/dist/{DocumentToolbar-DX79oXzF.js → DocumentToolbar-DHU5HR3w.js} +2 -2
  4. package/dist/{DocxViewer-BJRn9ROF.js → DocxViewer-CHZTQJgL.js} +2 -2
  5. package/dist/{F0AiProcessingOverlay-B5WA3jJt.js → F0AiProcessingOverlay-Ci2nfhE-.js} +1 -1
  6. package/dist/{F0CanvasPanel-Rkf-f6ge.js → F0CanvasPanel-BVax--nb.js} +23988 -23446
  7. package/dist/{F0Map-Dzgjuq89.js → F0Map-CHhjjvNl.js} +4 -4
  8. package/dist/{F0VideoPlayer-BG_MSJyp.js → F0VideoPlayer-D0WbTDFv.js} +2 -2
  9. package/dist/{MapProvider-DlazFyCh.js → MapProvider-zKDCz6AN.js} +56 -56
  10. package/dist/{SheetViewer-CoayiGl_.js → SheetViewer-xXMjudIA.js} +2 -2
  11. package/dist/{TextViewer-Dljx7q7Y.js → TextViewer-Wj3flD_N.js} +2 -2
  12. package/dist/ai.d.ts +35 -8
  13. package/dist/ai.js +2 -2
  14. package/dist/component-status.d.ts +31 -8
  15. package/dist/component-status.js +16 -16
  16. package/dist/{experimental-B5_SBbZo.js → experimental-Dtf0YbNg.js} +14919 -17801
  17. package/dist/experimental.d.ts +114 -10
  18. package/dist/experimental.js +275 -272
  19. package/dist/f0.d.ts +35 -8
  20. package/dist/f0.js +10 -10
  21. package/dist/i18n-provider-defaults.d.ts +35 -8
  22. package/dist/i18n-provider-defaults.js +4 -0
  23. package/dist/{index-BcDwQNGH.js → index-B4hH3GtV.js} +3 -3
  24. package/dist/index-B5gQqowy.js +4 -0
  25. package/dist/{index-dsJVIYGM.js → index-CWsgWlWh.js} +3 -3
  26. package/dist/{index-Bf7snjOt.js → index-CqSIbpwd.js} +2 -2
  27. package/dist/{index-C255Mt5f.js → index-cPheoSzU.js} +1 -1
  28. package/dist/{pdfWorker-V2aHzdYi.js → pdfWorker-el3_96nF.js} +2 -2
  29. package/dist/styles.css +1 -1
  30. package/package.json +2 -3
  31. package/dist/index-BoXRnsIw.js +0 -4
@@ -1430,7 +1430,7 @@ declare interface BaseChipProps extends VariantProps<typeof chipVariants> {
1430
1430
 
1431
1431
  declare type BaseColor = keyof typeof baseColors;
1432
1432
 
1433
- export declare const BaseCommunityPost: ({ id, author, group, createdAt, title, description, onClick, mediaUrl, event, counters, reactions, inLabel, comment, actions, dropdownItems, noReactionsButton, descriptionExpandable, noDescriptionClamp, hideTitle, hideGroup, pinned, pinnedLabel, relativeDate, }: CommunityPostProps) => JSX_2.Element;
1433
+ export declare const BaseCommunityPost: ({ id, author, group, createdAt, title, description, onClick, mediaUrl, event, counters, reactions, inLabel, comment, actions, dropdownItems, noReactionsButton, descriptionExpandable, noDescriptionClamp, hideTitle, hideGroup, pinned, pinnedLabel, relativeDate, noVideoPreload, reserveCountersLine, }: CommunityPostProps) => JSX_2.Element;
1434
1434
 
1435
1435
  /**
1436
1436
  * Base data adapter configuration for non-paginated collections
@@ -4159,7 +4159,7 @@ export declare type CommandRunContext = {
4159
4159
  setQuery: (query: string) => void;
4160
4160
  };
4161
4161
 
4162
- export declare const CommunityPost: (({ id, author, group, createdAt, title, description, onClick, mediaUrl, event, counters, reactions, inLabel, comment, actions, dropdownItems, noReactionsButton, descriptionExpandable, noDescriptionClamp, hideTitle, hideGroup, pinned, pinnedLabel, relativeDate, }: CommunityPostProps) => JSX_2.Element) & {
4162
+ export declare const CommunityPost: (({ id, author, group, createdAt, title, description, onClick, mediaUrl, event, counters, reactions, inLabel, comment, actions, dropdownItems, noReactionsButton, descriptionExpandable, noDescriptionClamp, hideTitle, hideGroup, pinned, pinnedLabel, relativeDate, noVideoPreload, reserveCountersLine, }: CommunityPostProps) => JSX_2.Element) & {
4163
4163
  Skeleton: ({ withEvent, withImage, }: CommunityPostSkeletonProps) => JSX_2.Element;
4164
4164
  };
4165
4165
 
@@ -4197,7 +4197,13 @@ export declare type CommunityPostProps = {
4197
4197
  onClick: () => void;
4198
4198
  };
4199
4199
  actions?: CommunityPostAction[];
4200
+ /** Sets `preload="none"` on a video: for lists that mount posts ahead of
4201
+ * the reader (a virtualized feed), where preloading would fetch unseen media. */
4200
4202
  noVideoPreload?: boolean;
4203
+ /** Keeps the counters line one line tall even while empty, so the first view
4204
+ * or comment doesn't grow a post already on screen (a virtualized feed
4205
+ * anchors on row heights). */
4206
+ reserveCountersLine?: boolean;
4201
4207
  /**
4202
4208
  * WHAT CLICKING THE POST DOES — and whether it does anything.
4203
4209
  *
@@ -5466,6 +5472,9 @@ declare const defaultTranslations: {
5466
5472
  readonly language: "Language";
5467
5473
  readonly audio: "Audio";
5468
5474
  };
5475
+ readonly swipeDeck: {
5476
+ readonly label: "Swipe deck";
5477
+ };
5469
5478
  readonly meetingCard: {
5470
5479
  readonly today: "Today";
5471
5480
  readonly yesterday: "Yesterday";
@@ -6075,6 +6084,7 @@ declare const defaultTranslations: {
6075
6084
  readonly documentPreview: "Document preview";
6076
6085
  readonly videoPlayerLabel: "Video player: {{name}}";
6077
6086
  readonly loadingVideo: "Loading video: {{name}}";
6087
+ readonly previewUnavailable: "Can't preview this file";
6078
6088
  readonly photo: "Photo";
6079
6089
  readonly photoCount: {
6080
6090
  readonly one: "{{count}} photo";
@@ -12443,6 +12453,22 @@ export declare type F0SelectTagProp = string | {
12443
12453
 
12444
12454
  export declare type F0SelectVariant = (typeof selectVariants)[number];
12445
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
+
12446
12472
  /**
12447
12473
  * @experimental This is an experimental component use it at your own risk
12448
12474
  */
@@ -18785,6 +18811,24 @@ export declare type SummaryKey<Definition extends SummariesDefinition> = Definit
18785
18811
 
18786
18812
  export declare type SummaryType = "sum";
18787
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
+
18788
18832
  /**
18789
18833
  * @experimental This is an experimental component use it at your own risk
18790
18834
  */
@@ -20051,6 +20095,43 @@ export declare const useSidebarChats: () => SidebarChatStore;
20051
20095
  */
20052
20096
  export declare function useSidePanel(): SidePanelContextValue;
20053
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
+
20054
20135
  /**
20055
20136
  * Attaches a track to a media element F0 owns.
20056
20137
  *
@@ -21020,9 +21101,11 @@ declare module "@tiptap/core" {
21020
21101
 
21021
21102
  declare module "@tiptap/core" {
21022
21103
  interface Commands<ReturnType> {
21023
- fontSize: {
21024
- setFontSize: (fontSize: string) => ReturnType;
21025
- unsetFontSize: () => ReturnType;
21104
+ enhanceHighlight: {
21105
+ setEnhanceHighlight: (from: number, to: number, options?: {
21106
+ placeholder?: string;
21107
+ }) => ReturnType;
21108
+ clearEnhanceHighlight: () => ReturnType;
21026
21109
  };
21027
21110
  }
21028
21111
  }
@@ -21030,11 +21113,9 @@ declare module "@tiptap/core" {
21030
21113
 
21031
21114
  declare module "@tiptap/core" {
21032
21115
  interface Commands<ReturnType> {
21033
- enhanceHighlight: {
21034
- setEnhanceHighlight: (from: number, to: number, options?: {
21035
- placeholder?: string;
21036
- }) => ReturnType;
21037
- clearEnhanceHighlight: () => ReturnType;
21116
+ fontSize: {
21117
+ setFontSize: (fontSize: string) => ReturnType;
21118
+ unsetFontSize: () => ReturnType;
21038
21119
  };
21039
21120
  }
21040
21121
  }
@@ -21098,3 +21179,26 @@ declare namespace F0GraphCollapserWrapperInner {
21098
21179
  declare namespace F0GraphStackGroupWrapperInner {
21099
21180
  var displayName: string;
21100
21181
  }
21182
+
21183
+
21184
+ declare global {
21185
+ interface Window {
21186
+ __f0Jank?: JankProbe;
21187
+ }
21188
+ }
21189
+
21190
+
21191
+ declare global {
21192
+ interface Window {
21193
+ __f0ChatHarness?: JankHarnessApi;
21194
+ __f0JankInput?: JankRealInput;
21195
+ __f0JankLast?: JankReport;
21196
+ __f0JankState?: JankRunState;
21197
+ /** Set by the runner when recording video: draw the anchor lines. */
21198
+ __f0JankOverlay?: boolean;
21199
+ /** Set by the runner: serve images through a slow route. */
21200
+ __f0JankSlowImages?: boolean;
21201
+ /** Force hard assertions on the gates (also `?jankStrict` in the URL). */
21202
+ __f0JankStrict?: boolean;
21203
+ }
21204
+ }