@factorialco/f0-react 8.24.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-Hbw_WAU8.js → ChatPdfThumbnail-76lZY5ae.js} +1 -1
  2. package/dist/{ChatPostComposerDialog-tfRN0-3K.js → ChatPostComposerDialog-CEX5fw42.js} +19 -19
  3. package/dist/{DocumentToolbar-DX79oXzF.js → DocumentToolbar-DYmTcpSP.js} +2 -2
  4. package/dist/{DocxViewer-BJRn9ROF.js → DocxViewer-B9TQv3Hj.js} +2 -2
  5. package/dist/{F0AiProcessingOverlay-B5WA3jJt.js → F0AiProcessingOverlay-hGn9LOZJ.js} +1 -1
  6. package/dist/{F0CanvasPanel-Rkf-f6ge.js → F0CanvasPanel-9nKAw7ck.js} +23994 -23451
  7. package/dist/{F0Map-Dzgjuq89.js → F0Map-Chfnm0BC.js} +4 -4
  8. package/dist/{F0VideoPlayer-BG_MSJyp.js → F0VideoPlayer-BlIN9tNR.js} +2 -2
  9. package/dist/{MapProvider-DlazFyCh.js → MapProvider-DHX6Eb2y.js} +56 -56
  10. package/dist/{SheetViewer-CoayiGl_.js → SheetViewer-CenNW1Oc.js} +2 -2
  11. package/dist/{TextViewer-Dljx7q7Y.js → TextViewer-ChFUVDAi.js} +2 -2
  12. package/dist/ai.d.ts +38 -10
  13. package/dist/ai.js +2 -2
  14. package/dist/component-status.d.ts +33 -10
  15. package/dist/component-status.js +16 -16
  16. package/dist/{experimental-B5_SBbZo.js → experimental-B0dtwyN_.js} +14949 -17813
  17. package/dist/experimental.d.ts +124 -12
  18. package/dist/experimental.js +275 -272
  19. package/dist/f0.d.ts +94 -32
  20. package/dist/f0.js +7995 -7947
  21. package/dist/i18n-provider-defaults.d.ts +38 -10
  22. package/dist/i18n-provider-defaults.js +5 -0
  23. package/dist/{index-BcDwQNGH.js → index-Cvy98Wf3.js} +3 -3
  24. package/dist/{index-C255Mt5f.js → index-DVdaC2pk.js} +1 -1
  25. package/dist/index-DcRkKTf6.js +4 -0
  26. package/dist/{index-Bf7snjOt.js → index-DvgwBZyS.js} +2 -2
  27. package/dist/{index-dsJVIYGM.js → index-mWe7Jgzz.js} +3 -3
  28. package/dist/{pdfWorker-V2aHzdYi.js → pdfWorker-BuQCiUUb.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
@@ -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";
@@ -4159,7 +4166,7 @@ export declare type CommandRunContext = {
4159
4166
  setQuery: (query: string) => void;
4160
4167
  };
4161
4168
 
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) & {
4169
+ 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
4170
  Skeleton: ({ withEvent, withImage, }: CommunityPostSkeletonProps) => JSX_2.Element;
4164
4171
  };
4165
4172
 
@@ -4197,7 +4204,13 @@ export declare type CommunityPostProps = {
4197
4204
  onClick: () => void;
4198
4205
  };
4199
4206
  actions?: CommunityPostAction[];
4207
+ /** Sets `preload="none"` on a video: for lists that mount posts ahead of
4208
+ * the reader (a virtualized feed), where preloading would fetch unseen media. */
4200
4209
  noVideoPreload?: boolean;
4210
+ /** Keeps the counters line one line tall even while empty, so the first view
4211
+ * or comment doesn't grow a post already on screen (a virtualized feed
4212
+ * anchors on row heights). */
4213
+ reserveCountersLine?: boolean;
4201
4214
  /**
4202
4215
  * WHAT CLICKING THE POST DOES — and whether it does anything.
4203
4216
  *
@@ -5466,6 +5479,9 @@ declare const defaultTranslations: {
5466
5479
  readonly language: "Language";
5467
5480
  readonly audio: "Audio";
5468
5481
  };
5482
+ readonly swipeDeck: {
5483
+ readonly label: "Swipe deck";
5484
+ };
5469
5485
  readonly meetingCard: {
5470
5486
  readonly today: "Today";
5471
5487
  readonly yesterday: "Yesterday";
@@ -6075,6 +6091,7 @@ declare const defaultTranslations: {
6075
6091
  readonly documentPreview: "Document preview";
6076
6092
  readonly videoPlayerLabel: "Video player: {{name}}";
6077
6093
  readonly loadingVideo: "Loading video: {{name}}";
6094
+ readonly previewUnavailable: "Can't preview this file";
6078
6095
  readonly photo: "Photo";
6079
6096
  readonly photoCount: {
6080
6097
  readonly one: "{{count}} photo";
@@ -6188,6 +6205,7 @@ declare const defaultTranslations: {
6188
6205
  readonly description: "Try a different date or fewer filters";
6189
6206
  };
6190
6207
  readonly windowedCategories: "Showing {{count}} of {{total}} categories";
6208
+ readonly noData: "No data";
6191
6209
  readonly tooltip: {
6192
6210
  readonly ofTotal: "of total";
6193
6211
  readonly total: "total";
@@ -12443,6 +12461,22 @@ export declare type F0SelectTagProp = string | {
12443
12461
 
12444
12462
  export declare type F0SelectVariant = (typeof selectVariants)[number];
12445
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
+
12446
12480
  /**
12447
12481
  * @experimental This is an experimental component use it at your own risk
12448
12482
  */
@@ -18785,6 +18819,24 @@ export declare type SummaryKey<Definition extends SummariesDefinition> = Definit
18785
18819
 
18786
18820
  export declare type SummaryType = "sum";
18787
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
+
18788
18840
  /**
18789
18841
  * @experimental This is an experimental component use it at your own risk
18790
18842
  */
@@ -20051,6 +20103,43 @@ export declare const useSidebarChats: () => SidebarChatStore;
20051
20103
  */
20052
20104
  export declare function useSidePanel(): SidePanelContextValue;
20053
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
+
20054
20143
  /**
20055
20144
  * Attaches a track to a media element F0 owns.
20056
20145
  *
@@ -21018,16 +21107,6 @@ declare module "@tiptap/core" {
21018
21107
  }
21019
21108
 
21020
21109
 
21021
- declare module "@tiptap/core" {
21022
- interface Commands<ReturnType> {
21023
- fontSize: {
21024
- setFontSize: (fontSize: string) => ReturnType;
21025
- unsetFontSize: () => ReturnType;
21026
- };
21027
- }
21028
- }
21029
-
21030
-
21031
21110
  declare module "@tiptap/core" {
21032
21111
  interface Commands<ReturnType> {
21033
21112
  enhanceHighlight: {
@@ -21051,6 +21130,16 @@ declare module "@tiptap/core" {
21051
21130
  }
21052
21131
 
21053
21132
 
21133
+ declare module "@tiptap/core" {
21134
+ interface Commands<ReturnType> {
21135
+ fontSize: {
21136
+ setFontSize: (fontSize: string) => ReturnType;
21137
+ unsetFontSize: () => ReturnType;
21138
+ };
21139
+ }
21140
+ }
21141
+
21142
+
21054
21143
  declare module "@tiptap/core" {
21055
21144
  interface Commands<ReturnType> {
21056
21145
  moodTracker: {
@@ -21098,3 +21187,26 @@ declare namespace F0GraphCollapserWrapperInner {
21098
21187
  declare namespace F0GraphStackGroupWrapperInner {
21099
21188
  var displayName: string;
21100
21189
  }
21190
+
21191
+
21192
+ declare global {
21193
+ interface Window {
21194
+ __f0Jank?: JankProbe;
21195
+ }
21196
+ }
21197
+
21198
+
21199
+ declare global {
21200
+ interface Window {
21201
+ __f0ChatHarness?: JankHarnessApi;
21202
+ __f0JankInput?: JankRealInput;
21203
+ __f0JankLast?: JankReport;
21204
+ __f0JankState?: JankRunState;
21205
+ /** Set by the runner when recording video: draw the anchor lines. */
21206
+ __f0JankOverlay?: boolean;
21207
+ /** Set by the runner: serve images through a slow route. */
21208
+ __f0JankSlowImages?: boolean;
21209
+ /** Force hard assertions on the gates (also `?jankStrict` in the URL). */
21210
+ __f0JankStrict?: boolean;
21211
+ }
21212
+ }