@factorialco/f0-react 7.10.0 → 7.12.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 (28) hide show
  1. package/dist/{ChatPdfThumbnail-D7pTdFg5.js → ChatPdfThumbnail-DLaIYO-I.js} +1 -1
  2. package/dist/{ChatPostComposerDialog-C8ExuW4c.js → ChatPostComposerDialog-4FOpj4qy.js} +3 -3
  3. package/dist/{CoachmarkProvider-DJQHQFqk.js → CoachmarkProvider-C-z3xlg6.js} +1 -1
  4. package/dist/{DocumentToolbar-BjaiEUEi.js → DocumentToolbar-l7PxkK4o.js} +2 -2
  5. package/dist/{DocxViewer-BMVjKj4H.js → DocxViewer-CBiKF5rZ.js} +2 -2
  6. package/dist/{F0AiProcessingOverlay-Dj55I0Gt.js → F0AiProcessingOverlay-BYUYtCeT.js} +1 -1
  7. package/dist/{F0CanvasPanel-CuTymScT.js → F0CanvasPanel-B52A84Yd.js} +414 -403
  8. package/dist/{F0VideoPlayer-0aZy2NDP.js → F0VideoPlayer-CYkJgfvF.js} +1 -1
  9. package/dist/{LocationMap-DptfAWGn.js → LocationMap-P9l5SS9_.js} +1 -1
  10. package/dist/{SheetViewer-CjualyWJ.js → SheetViewer-DiM7dzkD.js} +2 -2
  11. package/dist/{TextViewer-4yJEabSH.js → TextViewer-6MkpYRV9.js} +2 -2
  12. package/dist/ai.d.ts +11 -8
  13. package/dist/ai.js +2 -2
  14. package/dist/component-status.d.ts +8 -8
  15. package/dist/component-status.js +1 -1
  16. package/dist/{experimental-BycvsCRG.js → experimental-DtqXX6Z2.js} +11588 -11312
  17. package/dist/experimental.d.ts +128 -15
  18. package/dist/experimental.js +195 -192
  19. package/dist/f0.d.ts +19 -8
  20. package/dist/f0.js +257 -257
  21. package/dist/i18n-provider-defaults.d.ts +11 -8
  22. package/dist/i18n-provider-defaults.js +3 -0
  23. package/dist/index-YxKgC6R7.js +4 -0
  24. package/dist/{index-DWIUIuqD.js → index-iNjzeXPY.js} +3 -3
  25. package/dist/{pdfWorker-Ch2XTIq-.js → pdfWorker-5KFe_TGk.js} +2 -2
  26. package/dist/styles.css +1 -1
  27. package/package.json +2 -2
  28. package/dist/index-D5k02dJT.js +0 -4
@@ -4179,7 +4179,7 @@ declare type CompanyAvatarVariant = Extract<AvatarVariant, {
4179
4179
  type: "company";
4180
4180
  }>;
4181
4181
 
4182
- export declare function CompanySelector({ companies, selected, onChange, isLoading, withNotification, additionalOptions, }: CompanySelectorProps): JSX_2.Element;
4182
+ export declare function CompanySelector({ companies, selected, onChange, isLoading, withNotification, additionalOptions, variant, }: CompanySelectorProps): JSX_2.Element;
4183
4183
 
4184
4184
  export declare type CompanySelectorProps = {
4185
4185
  companies: Company[];
@@ -4194,6 +4194,13 @@ export declare type CompanySelectorProps = {
4194
4194
  description?: string;
4195
4195
  onClick?: () => void;
4196
4196
  }[];
4197
+ /**
4198
+ * `"compact"` is the logo alone — no name, no chevron — for the module rail,
4199
+ * where the name has nowhere to go. It is the same select underneath: the
4200
+ * company list, the extra options and the switch all behave identically, and
4201
+ * the name reaches assistive tech through the trigger's `aria-label`.
4202
+ */
4203
+ variant?: "default" | "compact";
4197
4204
  };
4198
4205
 
4199
4206
  declare type CompanyTagProps = ComponentProps<typeof F0TagCompany>;
@@ -5188,6 +5195,9 @@ declare const defaultTranslations: {
5188
5195
  readonly tabs: {
5189
5196
  readonly label: "Sidebar sections";
5190
5197
  };
5198
+ readonly rail: {
5199
+ readonly label: "Modules";
5200
+ };
5191
5201
  readonly companySelector: {
5192
5202
  readonly label: "Select a company";
5193
5203
  readonly placeholder: "Select a company";
@@ -11165,6 +11175,20 @@ declare interface FrameContextType {
11165
11175
  isInvokedByUser: boolean;
11166
11176
  }) => void;
11167
11177
  setForceFloat: (force: boolean) => void;
11178
+ /**
11179
+ * How much room the permanent module rail takes, or 0 when the sidebar has
11180
+ * no rail (the classic composition). Registered by `Sidebar` when it is
11181
+ * given a `rail`, because the frame receives the whole navigation as one
11182
+ * opaque node and cannot see inside it.
11183
+ */
11184
+ railWidth: number;
11185
+ /**
11186
+ * Whether navigation is permanently on screen. What reads this is the
11187
+ * "Open main menu" button in the page surfaces: with a rail there is no
11188
+ * state without navigation, so the button has nothing to restore.
11189
+ */
11190
+ hasRail: boolean;
11191
+ setRailWidth: (width: number) => void;
11168
11192
  }
11169
11193
 
11170
11194
  /**
@@ -15186,7 +15210,7 @@ declare const shortcutVariants: (props?: ({
15186
15210
 
15187
15211
  export declare const Sidebar: WithDataTestIdReturnType_3<typeof _Sidebar>;
15188
15212
 
15189
- declare function _Sidebar({ header, body, footer, onFooterDropdownClick, }: SidebarProps): JSX_2.Element;
15213
+ declare function _Sidebar({ header, body, footer, onFooterDropdownClick, rail, }: SidebarProps): JSX_2.Element;
15190
15214
 
15191
15215
  export declare type SidebarChat = {
15192
15216
  id: string;
@@ -15455,11 +15479,7 @@ export declare interface SidebarCollapsibleSectionProps {
15455
15479
  export declare function SidebarFooter({ user, options, showActivityButton, activityButtonShortcut, onActivityButtonClick, onDropdownClick, hasActivityUpdates, }: SidebarFooterProps): JSX_2.Element;
15456
15480
 
15457
15481
  declare interface SidebarFooterProps {
15458
- user: {
15459
- firstName: string;
15460
- lastName: string;
15461
- avatarUrl?: string;
15462
- };
15482
+ user: SidebarUser;
15463
15483
  showActivityButton?: boolean;
15464
15484
  hasActivityUpdates?: boolean;
15465
15485
  activityButtonShortcut?: string[];
@@ -15477,13 +15497,80 @@ declare type SidebarIconProps = {
15477
15497
  onClick?: () => void;
15478
15498
  };
15479
15499
 
15500
+ /**
15501
+ * The panel's title bar in the rail composition: the active section, and the
15502
+ * control that collapses the panel down to the rail.
15503
+ *
15504
+ * `SidebarIcon` already renders as a cross on a small screen, so the same
15505
+ * button reads as "collapse" on desktop and "close" over the drawer.
15506
+ */
15507
+ export declare function SidebarPanelHeader({ title, actions, }: SidebarPanelHeaderProps): JSX_2.Element;
15508
+
15509
+ export declare type SidebarPanelHeaderProps = {
15510
+ /**
15511
+ * What the panel is showing — normally the label of the active rail tab.
15512
+ *
15513
+ * The company's name used to sit here. It moved into the rail's dropdown:
15514
+ * which workspace you are in changes once a session, which section you are
15515
+ * in changes constantly, and only one of the two earns the top of the panel.
15516
+ */
15517
+ title: string;
15518
+ /** Controls to the left of the collapse toggle (e.g. a "new" button). */
15519
+ actions?: ReactNode;
15520
+ };
15521
+
15480
15522
  declare interface SidebarProps {
15481
15523
  header?: ReactNode;
15482
15524
  body?: ReactNode;
15483
15525
  footer?: ReactNode;
15484
15526
  onFooterDropdownClick?: () => void;
15527
+ /**
15528
+ * The permanent module rail (`SidebarRail`), to the left of the panel.
15529
+ *
15530
+ * Passing it changes what "collapsed" means for the whole frame: the rail is
15531
+ * docked at every viewport and never animates, and the panel is the only
15532
+ * thing that slides away. Omit it and the sidebar behaves exactly as before.
15533
+ */
15534
+ rail?: ReactNode;
15485
15535
  }
15486
15536
 
15537
+ /**
15538
+ * The permanent module rail: the workspace logo, the modules, and the account.
15539
+ *
15540
+ * It is the half of the navigation that never collapses — at any viewport,
15541
+ * including mobile. That is the whole point of it: with the modules always on
15542
+ * screen there is no state in which the app has no navigation, so nothing has
15543
+ * to put an "open main menu" button back into the content to compensate.
15544
+ */
15545
+ export declare function SidebarRail({ company, tabs, activeTab, onTabChange, persistKey, onActiveTabPress, actions, user, }: SidebarRailProps): JSX_2.Element;
15546
+
15547
+ /** A shortcut pinned to the foot of the rail — marketplace, security, activity. */
15548
+ export declare type SidebarRailAction = {
15549
+ id: string;
15550
+ label: string;
15551
+ icon: IconType;
15552
+ onClick: () => void;
15553
+ /** Show the unread marker over the icon. */
15554
+ hasUpdates?: boolean;
15555
+ };
15556
+
15557
+ export declare type SidebarRailProps = {
15558
+ /** The workspace switcher, rendered as the logo alone. */
15559
+ company: Omit<CompanySelectorProps, "variant">;
15560
+ tabs: SidebarTab[];
15561
+ activeTab: string;
15562
+ onTabChange: (id: string) => void;
15563
+ /**
15564
+ * Remember the active tab across reloads. Same key space as `SidebarTabs`,
15565
+ * so a host that swaps one for the other keeps the user where they were.
15566
+ */
15567
+ persistKey?: string;
15568
+ /** Pressing the module you are already in. Hosts use it to fold the panel. */
15569
+ onActiveTabPress?: () => void;
15570
+ actions?: SidebarRailAction[];
15571
+ user?: Omit<SidebarUserMenuProps, "compact">;
15572
+ };
15573
+
15487
15574
  /**
15488
15575
  * One action on a section's own header — "new channel" beside Channels, "new
15489
15576
  * community" beside Communities. Icon-only, and revealed on hover like the
@@ -15617,6 +15704,32 @@ export declare type SidebarTabsProps = {
15617
15704
  persistKey?: string;
15618
15705
  };
15619
15706
 
15707
+ export declare type SidebarUser = {
15708
+ firstName: string;
15709
+ lastName: string;
15710
+ avatarUrl?: string;
15711
+ };
15712
+
15713
+ /**
15714
+ * The account menu: an avatar that opens the user's dropdown.
15715
+ *
15716
+ * Shared by `SidebarFooter` (full row, at the bottom of the panel) and
15717
+ * `SidebarRail` (avatar only, at the bottom of the rail) so the two can never
15718
+ * disagree about what the account menu contains or how it opens.
15719
+ */
15720
+ export declare function SidebarUserMenu({ user, options, onDropdownClick, compact, }: SidebarUserMenuProps): JSX_2.Element;
15721
+
15722
+ export declare type SidebarUserMenuProps = {
15723
+ user: SidebarUser;
15724
+ options: DropdownItem[];
15725
+ onDropdownClick?: () => void;
15726
+ /**
15727
+ * Avatar only — the rail, where the name has nowhere to go. Defaults to the
15728
+ * full row (avatar + name) the footer uses.
15729
+ */
15730
+ compact?: boolean;
15731
+ };
15732
+
15620
15733
  /**
15621
15734
  * A single piece of content hosted in the side panel — the resizable,
15622
15735
  * fullscreen-able space beside the page. Only one is mounted at a time: the
@@ -18028,11 +18141,9 @@ declare namespace Calendar {
18028
18141
 
18029
18142
  declare module "@tiptap/core" {
18030
18143
  interface Commands<ReturnType> {
18031
- enhanceHighlight: {
18032
- setEnhanceHighlight: (from: number, to: number, options?: {
18033
- placeholder?: string;
18034
- }) => ReturnType;
18035
- clearEnhanceHighlight: () => ReturnType;
18144
+ aiBlock: {
18145
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
18146
+ executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
18036
18147
  };
18037
18148
  }
18038
18149
  }
@@ -18040,9 +18151,11 @@ declare module "@tiptap/core" {
18040
18151
 
18041
18152
  declare module "@tiptap/core" {
18042
18153
  interface Commands<ReturnType> {
18043
- aiBlock: {
18044
- insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
18045
- executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
18154
+ enhanceHighlight: {
18155
+ setEnhanceHighlight: (from: number, to: number, options?: {
18156
+ placeholder?: string;
18157
+ }) => ReturnType;
18158
+ clearEnhanceHighlight: () => ReturnType;
18046
18159
  };
18047
18160
  }
18048
18161
  }