@factorialco/f0-react 3.0.1 → 3.2.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.
@@ -36,7 +36,6 @@ import { Dispatch } from 'react';
36
36
  import { DotTagCellValue } from './types/dotTag';
37
37
  import { DotTagCellValue as DotTagCellValue_2 } from './experimental';
38
38
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
39
- import { Editor } from '@tiptap/react';
40
39
  import { EmployeeItemProps } from './types';
41
40
  import { F0SegmentedControlProps as F0SegmentedControlProps_2 } from './types';
42
41
  import { F0SelectProps as F0SelectProps_2 } from './types';
@@ -717,6 +716,10 @@ declare const alertAvatarVariants: (props?: ({
717
716
 
718
717
  declare type AlertTagProps = ComponentProps<typeof F0TagAlert>;
719
718
 
719
+ declare type AlertVariant = (typeof alertVariantOptions)[number];
720
+
721
+ declare const alertVariantOptions: readonly ["info", "warning", "critical", "neutral", "positive"];
722
+
720
723
  /**
721
724
  * @experimental This is an experimental component use it at your own risk
722
725
  */
@@ -875,14 +878,6 @@ export declare type BannerAction = {
875
878
  icon?: IconType;
876
879
  };
877
880
 
878
- declare interface BannerProps {
879
- icon: IconType;
880
- title: string;
881
- variant: BannerVariant;
882
- }
883
-
884
- declare type BannerVariant = "info" | "warning" | "critical" | "neutral" | "positive";
885
-
886
881
  export declare const BarChart: WithDataTestIdReturnType_4<ForwardRefExoticComponent<Omit<ChartPropsBase<ChartConfig> & {
887
882
  type?: "simple" | "stacked" | "stacked-by-sign";
888
883
  label?: boolean;
@@ -1287,18 +1282,6 @@ export declare type BulkActionsDefinition<R extends RecordType, Filters extends
1287
1282
  warningMessage: string;
1288
1283
  };
1289
1284
 
1290
- export declare interface ButtonConfig {
1291
- key: string;
1292
- icon: IconType;
1293
- active: (editor: Editor) => boolean;
1294
- onClick: (editor: Editor) => void;
1295
- label: string;
1296
- tooltip: {
1297
- label: string;
1298
- shortcut: string[];
1299
- };
1300
- }
1301
-
1302
1285
  declare type ButtonDropdownItem<T = string> = {
1303
1286
  /**
1304
1287
  * The value of the item.
@@ -3631,7 +3614,7 @@ declare const defaultTranslations: {
3631
3614
  readonly blocks: "Blocks";
3632
3615
  };
3633
3616
  readonly ai: {
3634
- readonly enhanceButtonLabel: "Enhance";
3617
+ readonly enhanceButtonLabel: "Generate";
3635
3618
  readonly loadingEnhanceLabel: "Loading...";
3636
3619
  readonly defaultError: "An error occurred while loading";
3637
3620
  readonly closeErrorButtonLabel: "Continue editing";
@@ -3742,7 +3725,7 @@ declare const defaultTranslations: {
3742
3725
  };
3743
3726
  };
3744
3727
 
3745
- declare interface DeleteBlockNotesTextEditorPageDocumentPatch {
3728
+ export declare interface DeleteBlockNotesTextEditorPageDocumentPatch {
3746
3729
  type: "delete_block";
3747
3730
  targetId: string;
3748
3731
  }
@@ -3780,7 +3763,7 @@ export declare type DetailsItemContent = (ComponentProps<typeof DataList.Item> &
3780
3763
  }[TagType_2] | {
3781
3764
  type: "avatar-list";
3782
3765
  avatarList: F0AvatarListProps;
3783
- } | (ComponentProps<typeof FileItem> & {
3766
+ } | (ComponentProps<typeof F0FileItem> & {
3784
3767
  type: "file";
3785
3768
  });
3786
3769
 
@@ -4077,17 +4060,25 @@ declare type EmptyStateType = (typeof emptyStatesTypes)[number];
4077
4060
  export declare type enhanceConfig = {
4078
4061
  onEnhanceText: (params: enhanceTextParams) => Promise<enhancedTextResponse>;
4079
4062
  enhancementOptions?: EnhancementOption[];
4063
+ /** Notified when the user accepts the enhanced result (analytics hook) */
4064
+ onAcceptChanges?: () => void;
4065
+ /** Notified when the user discards the enhanced result (analytics hook) */
4066
+ onRejectChanges?: () => void;
4067
+ /** Notified when the user retries the enhancement (analytics hook) */
4068
+ onRetryChanges?: () => void;
4080
4069
  };
4081
4070
 
4082
4071
  export declare type enhancedTextResponse = {
4083
4072
  success: boolean;
4084
- text: string;
4073
+ /** Enhanced content: an HTML/plain string or a TipTap JSON document */
4074
+ text: string | JSONContent;
4085
4075
  error?: string;
4086
4076
  };
4087
4077
 
4088
4078
  export declare type EnhancementOption = {
4089
4079
  id: string;
4090
4080
  label: string;
4081
+ icon?: IconType;
4091
4082
  subOptions?: EnhancementOption[];
4092
4083
  };
4093
4084
 
@@ -4298,6 +4289,24 @@ export declare type F0AiBannerProps = AiBannerInternalProps;
4298
4289
  /** Assistant-flavoured `F0Message`. Same shape — alias kept for clarity. */
4299
4290
  declare type F0AIMessage = F0Message;
4300
4291
 
4292
+ declare interface F0AlertProps {
4293
+ title: string;
4294
+ description?: string;
4295
+ action?: {
4296
+ label: string;
4297
+ disabled?: boolean;
4298
+ onClick: () => void;
4299
+ };
4300
+ link?: {
4301
+ label: string;
4302
+ href: string;
4303
+ };
4304
+ icon?: IconType;
4305
+ variant: AlertVariant;
4306
+ /** Called when the user dismisses the alert. When provided, a close button is shown. */
4307
+ onClose?: () => void;
4308
+ }
4309
+
4301
4310
  declare const F0AvatarAlert: WithDataTestIdReturnType_5<({ type, size, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, }: AlertAvatarProps_2) => JSX_2.Element>;
4302
4311
 
4303
4312
  declare type F0AvatarCompanyProps = {
@@ -4541,6 +4550,29 @@ export declare const F0Callout: ForwardRefExoticComponent<Omit<CalloutInternalPr
4541
4550
 
4542
4551
  export declare type F0CalloutProps = CalloutInternalProps;
4543
4552
 
4553
+ export declare type F0FileAction = {
4554
+ icon?: IconType;
4555
+ label: string;
4556
+ onClick: () => void;
4557
+ critical?: boolean;
4558
+ };
4559
+
4560
+ /**
4561
+ * @experimental This is an experimental component, use it at your own risk
4562
+ */
4563
+ export declare const F0FileItem: WithDataTestIdReturnType_2<ForwardRefExoticComponent<F0FileItemProps & RefAttributes<HTMLDivElement>>>;
4564
+
4565
+ export declare interface F0FileItemProps extends HTMLAttributes<HTMLDivElement> {
4566
+ file: File | FileDef;
4567
+ actions?: F0FileAction[];
4568
+ disabled?: boolean;
4569
+ size?: F0FileItemSize;
4570
+ }
4571
+
4572
+ export declare type F0FileItemSize = (typeof f0FileItemSizes)[number];
4573
+
4574
+ export declare const f0FileItemSizes: readonly ["md", "lg"];
4575
+
4544
4576
  declare interface F0IconProps extends SVGProps<SVGSVGElement>, VariantProps<typeof iconVariants> {
4545
4577
  icon: IconType;
4546
4578
  size?: "lg" | "md" | "sm" | "xs";
@@ -4566,6 +4598,56 @@ declare type F0Message = {
4566
4598
  [key: string]: any;
4567
4599
  };
4568
4600
 
4601
+ /**
4602
+ * @experimental This is an experimental component, use it at your own risk
4603
+ */
4604
+ export declare const F0NotesTextEditor: ForwardRefExoticComponent<F0NotesTextEditorProps & RefAttributes<F0NotesTextEditorHandle>> & {
4605
+ Skeleton: ({ withHeader, withTitle, withToolbar, }: F0NotesTextEditorSkeletonProps) => JSX_2.Element;
4606
+ };
4607
+
4608
+ export declare type F0NotesTextEditorHandle = {
4609
+ clear: () => void;
4610
+ focus: () => void;
4611
+ setContent: (content: string) => void;
4612
+ applyPageDocumentPatch: (patch: NotesTextEditorPageDocumentPatch) => NotesTextEditorSnapshot;
4613
+ insertAIBlock: () => void;
4614
+ insertTranscript: (title: string, users: User[], messages: Message[]) => void;
4615
+ pushContent: (content: string) => void;
4616
+ insertImage: (file: File) => void;
4617
+ };
4618
+
4619
+ export declare interface F0NotesTextEditorProps {
4620
+ onChange: (value: {
4621
+ json: JSONContent | null;
4622
+ html: string | null;
4623
+ }) => void;
4624
+ placeholder: string;
4625
+ initialEditorState?: {
4626
+ content?: JSONContent | string;
4627
+ title?: string;
4628
+ };
4629
+ readonly?: boolean;
4630
+ aiBlockConfig?: AIBlockConfig;
4631
+ imageUploadConfig?: ImageUploadConfig;
4632
+ enhanceConfig?: enhanceConfig;
4633
+ onTitleChange?: (title: string) => void;
4634
+ titlePlaceholder?: string;
4635
+ primaryAction?: PrimaryActionButton | PrimaryDropdownAction<string>;
4636
+ secondaryActions?: HeaderSecondaryAction[];
4637
+ otherActions?: DropdownItem[];
4638
+ metadata?: MetadataItem[];
4639
+ status?: HeaderStatusProps;
4640
+ alert?: F0AlertProps;
4641
+ }
4642
+
4643
+ export declare const F0NotesTextEditorSkeleton: ({ withHeader, withTitle, withToolbar, }: F0NotesTextEditorSkeletonProps) => JSX_2.Element;
4644
+
4645
+ export declare interface F0NotesTextEditorSkeletonProps {
4646
+ withHeader?: boolean;
4647
+ withTitle?: boolean;
4648
+ withToolbar?: boolean;
4649
+ }
4650
+
4569
4651
  /**
4570
4652
  * F0NumberInput is the writable numeric field for forms — a box where the
4571
4653
  * user types a number. For arbitrary text use F0TextInput; for durations
@@ -4575,6 +4657,70 @@ export declare const F0NumberInput: ForwardRefExoticComponent<Omit<F0NumberInput
4575
4657
 
4576
4658
  export declare type F0NumberInputProps = Omit<NumberInputInternalProps, (typeof privateProps_4)[number]>;
4577
4659
 
4660
+ /**
4661
+ * @experimental This is an experimental component, use it at your own risk
4662
+ */
4663
+ export declare const F0RichTextDisplay: ForwardRefExoticComponent<F0RichTextDisplayProps & RefAttributes<HTMLDivElement>>;
4664
+
4665
+ export declare type F0RichTextDisplayHandle = HTMLDivElement;
4666
+
4667
+ export declare interface F0RichTextDisplayProps extends HTMLAttributes<HTMLDivElement> {
4668
+ content: string;
4669
+ className?: string;
4670
+ format?: "html" | "markdown";
4671
+ }
4672
+
4673
+ /**
4674
+ * @experimental This is an experimental component, use it at your own risk
4675
+ */
4676
+ export declare const F0RichTextEditor: ForwardRefExoticComponent<F0RichTextEditorProps & RefAttributes<F0RichTextEditorHandle>> & {
4677
+ Skeleton: ({ rows, }: F0RichTextEditorSkeletonProps) => JSX_2.Element;
4678
+ };
4679
+
4680
+ export declare type F0RichTextEditorHandle = {
4681
+ clear: () => void;
4682
+ clearFiles: () => void;
4683
+ focus: () => void;
4684
+ setError: (error: string | null) => void;
4685
+ setContent: (content: string) => void;
4686
+ };
4687
+
4688
+ export declare interface F0RichTextEditorProps {
4689
+ mentionsConfig?: MentionsConfig;
4690
+ enhanceConfig?: enhanceConfig;
4691
+ filesConfig?: filesConfig;
4692
+ secondaryAction?: secondaryActionsType;
4693
+ primaryAction?: primaryActionType;
4694
+ onChange: (result: resultType) => void;
4695
+ maxCharacters?: number;
4696
+ placeholder: string;
4697
+ initialEditorState?: {
4698
+ content?: string;
4699
+ files?: File[];
4700
+ };
4701
+ title: string;
4702
+ height?: heightType;
4703
+ plainHtmlMode?: boolean;
4704
+ fullScreenMode?: boolean;
4705
+ onFullscreenChange?: (fullscreen: boolean) => void;
4706
+ /** Whether the editor is disabled */
4707
+ disabled?: boolean;
4708
+ /** Whether the editor has an error state */
4709
+ error?: boolean;
4710
+ /** Whether the editor is in a loading state */
4711
+ loading?: boolean;
4712
+ /**
4713
+ * Voice dictation: transcribes a recorded audio blob into text inserted at
4714
+ * the cursor. Same contract as F0AiChatTextArea — when omitted, the
4715
+ * microphone button is not rendered.
4716
+ */
4717
+ onTranscribe?: TranscribeFn;
4718
+ }
4719
+
4720
+ export declare interface F0RichTextEditorSkeletonProps {
4721
+ rows?: number;
4722
+ }
4723
+
4578
4724
  export declare const F0SearchInput: ForwardRefExoticComponent< {
4579
4725
  value?: string;
4580
4726
  threshold?: number;
@@ -4967,12 +5113,8 @@ export declare const FILE_TYPES: {
4967
5113
  readonly MARKDOWN: "markdown";
4968
5114
  };
4969
5115
 
4970
- export declare type FileAction = {
4971
- icon?: IconType;
4972
- label: string;
4973
- onClick: () => void;
4974
- critical?: boolean;
4975
- };
5116
+ /** @deprecated Use F0FileAction */
5117
+ export declare type FileAction = F0FileAction;
4976
5118
 
4977
5119
  declare type FileAvatarVariant = Extract<AvatarVariant, {
4978
5120
  type: "file";
@@ -4983,26 +5125,14 @@ declare type FileDef = {
4983
5125
  type: string;
4984
5126
  };
4985
5127
 
4986
- export declare const FileItem: WithDataTestIdReturnType_5<ForwardRefExoticComponent<FileItemProps & RefAttributes<HTMLDivElement>>>;
5128
+ /** @deprecated Use F0FileItem */
5129
+ export declare const FileItem: WithDataTestIdReturnType_2<ForwardRefExoticComponent<F0FileItemProps & RefAttributes<HTMLDivElement>>>;
4987
5130
 
4988
- declare interface FileItemProps extends React.HTMLAttributes<HTMLDivElement> {
4989
- file: File | FileDef;
4990
- actions?: FileAction[];
4991
- disabled?: boolean;
4992
- size?: FileItemSize;
4993
- }
5131
+ /** @deprecated Use F0FileItemProps */
5132
+ export declare type FileItemProps = F0FileItemProps;
4994
5133
 
4995
- export declare type FileItemSize = NonNullable<VariantProps<typeof fileItemVariants>["size"]>;
4996
-
4997
- declare const fileItemVariants: (props?: ({
4998
- size?: "lg" | "md" | undefined;
4999
- } & ({
5000
- class?: ClassValue;
5001
- className?: never;
5002
- } | {
5003
- class?: never;
5004
- className?: ClassValue;
5005
- })) | undefined) => string;
5134
+ /** @deprecated Use F0FileItemSize */
5135
+ export declare type FileItemSize = F0FileItemSize;
5006
5136
 
5007
5137
  export declare type filesConfig = {
5008
5138
  onFiles: (files: File[]) => void;
@@ -5332,7 +5462,15 @@ declare type GroupRecord<RecordType> = {
5332
5462
  records: RecordType[];
5333
5463
  };
5334
5464
 
5335
- declare type HeaderProps = {
5465
+ export declare interface HeaderProps {
5466
+ primaryAction?: PrimaryActionButton | PrimaryDropdownAction<string>;
5467
+ secondaryActions?: HeaderSecondaryAction[];
5468
+ metadata?: MetadataItem[];
5469
+ otherActions?: DropdownItem[];
5470
+ status?: HeaderStatusProps;
5471
+ }
5472
+
5473
+ declare type HeaderProps_2 = {
5336
5474
  module: {
5337
5475
  id: ModuleId;
5338
5476
  name: string;
@@ -5362,7 +5500,7 @@ declare type HeaderProps = {
5362
5500
  oneSwitchAutoOpen?: boolean;
5363
5501
  };
5364
5502
 
5365
- declare type HeaderSecondaryAction = HeaderSecondaryButtonAction | HeaderSecondaryDropdownAction;
5503
+ export declare type HeaderSecondaryAction = HeaderSecondaryButtonAction | HeaderSecondaryDropdownAction;
5366
5504
 
5367
5505
  declare type HeaderSecondaryButtonAction = SecondaryAction & {
5368
5506
  hideLabel?: boolean;
@@ -5372,6 +5510,13 @@ declare type HeaderSecondaryDropdownAction = PrimaryDropdownAction<string> & {
5372
5510
  variant?: "outline";
5373
5511
  };
5374
5512
 
5513
+ export declare interface HeaderStatusProps {
5514
+ label: string;
5515
+ text: string;
5516
+ variant: StatusVariant;
5517
+ actions?: MetadataAction[];
5518
+ }
5519
+
5375
5520
  declare interface HeatmapComputation {
5376
5521
  datasetId: string;
5377
5522
  xAxis: string;
@@ -5669,13 +5814,13 @@ declare type InputInternalProps = Pick<ComponentProps<typeof Input_2>, "ref" | "
5669
5814
  */
5670
5815
  export declare type InputProps = F0TextInputProps;
5671
5816
 
5672
- declare interface InsertAfterNotesTextEditorPageDocumentPatch {
5817
+ export declare interface InsertAfterNotesTextEditorPageDocumentPatch {
5673
5818
  type: "insert_after";
5674
5819
  targetId: string;
5675
5820
  blocks: JSONContent[];
5676
5821
  }
5677
5822
 
5678
- declare interface InsertBeforeNotesTextEditorPageDocumentPatch {
5823
+ export declare interface InsertBeforeNotesTextEditorPageDocumentPatch {
5679
5824
  type: "insert_before";
5680
5825
  targetId: string;
5681
5826
  blocks: JSONContent[];
@@ -5838,25 +5983,6 @@ export declare type MentionedUser = {
5838
5983
  href?: string;
5839
5984
  };
5840
5985
 
5841
- export declare interface MentionItemComponentProps {
5842
- item: MentionedUser;
5843
- index: number;
5844
- selected: boolean;
5845
- }
5846
-
5847
- export declare interface MentionListRef {
5848
- onKeyDown: (props: {
5849
- event: KeyboardEvent;
5850
- }) => boolean;
5851
- }
5852
-
5853
- export declare interface MentionNodeAttrs {
5854
- id: string;
5855
- label: string;
5856
- image_url?: string;
5857
- href?: string;
5858
- }
5859
-
5860
5986
  export declare type MentionsConfig = {
5861
5987
  onMentionQueryStringChanged?: (queryString: string) => Promise<MentionedUser[]> | undefined;
5862
5988
  users: MentionedUser[];
@@ -5907,11 +6033,11 @@ declare type MetadataCopyAction = {
5907
6033
  type: "copy";
5908
6034
  };
5909
6035
 
5910
- declare function MetadataItem({ item }: {
6036
+ export declare function MetadataItem({ item }: {
5911
6037
  item: MetadataItem;
5912
6038
  }): JSX_2.Element;
5913
6039
 
5914
- declare interface MetadataItem {
6040
+ export declare interface MetadataItem {
5915
6041
  label: string;
5916
6042
  value: MetadataItemValue;
5917
6043
  actions?: (MetadataAction | MetadataCopyAction)[];
@@ -5931,7 +6057,7 @@ declare interface MetadataItem {
5931
6057
  };
5932
6058
  }
5933
6059
 
5934
- declare type MetadataItemValue = {
6060
+ export declare type MetadataItemValue = {
5935
6061
  type: "text";
5936
6062
  content: string;
5937
6063
  } | {
@@ -6144,20 +6270,26 @@ declare type NavigationItem = Pick<LinkProps, "href" | "exactMatch" | "onClick">
6144
6270
  } & DataAttributes_2;
6145
6271
 
6146
6272
  export declare type NavigationProps = {
6147
- previous?: {
6148
- url: string;
6149
- title: string;
6150
- };
6151
- next?: {
6152
- url: string;
6153
- title: string;
6154
- };
6273
+ previous?: NavigationTarget;
6274
+ next?: NavigationTarget;
6155
6275
  counter?: {
6156
6276
  current: number;
6157
6277
  total: number;
6158
6278
  };
6159
6279
  };
6160
6280
 
6281
+ /**
6282
+ * One prev/next target. Carry a `url` for full-page detail navigation
6283
+ * (renders a link) OR an `onClick` for id-based navigation that swaps content
6284
+ * in place — a mounted sidepanel/dialog that never changes the URL (renders a
6285
+ * button). `onClick` wins when both are present.
6286
+ */
6287
+ export declare type NavigationTarget = {
6288
+ title: string;
6289
+ url?: string;
6290
+ onClick?: () => void;
6291
+ };
6292
+
6161
6293
  declare type NavTarget = HTMLAttributeAnchorTarget;
6162
6294
 
6163
6295
  /**
@@ -6188,69 +6320,30 @@ declare interface NextStepsProps {
6188
6320
  items: StepItemProps[];
6189
6321
  }
6190
6322
 
6191
- export declare const NotesTextEditor: ForwardRefExoticComponent<NotesTextEditorProps & RefAttributes<NotesTextEditorHandle>>;
6323
+ /** @deprecated Use F0NotesTextEditor */
6324
+ export declare const NotesTextEditor: ForwardRefExoticComponent<F0NotesTextEditorProps & RefAttributes<F0NotesTextEditorHandle>> & {
6325
+ Skeleton: ({ withHeader, withTitle, withToolbar, }: F0NotesTextEditorSkeletonProps) => JSX_2.Element;
6326
+ };
6192
6327
 
6193
- export declare interface NotesTextEditorHandle {
6194
- clear: () => void;
6195
- focus: () => void;
6196
- setContent: (content: string) => void;
6197
- applyPageDocumentPatch: (patch: NotesTextEditorPageDocumentPatch) => NotesTextEditorSnapshot;
6198
- insertAIBlock: () => void;
6199
- insertTranscript: (title: string, users: User[], messages: Message[]) => void;
6200
- pushContent: (content: string) => void;
6201
- insertImage: (file: File) => void;
6202
- }
6328
+ /** @deprecated Use F0NotesTextEditorHandle */
6329
+ export declare type NotesTextEditorHandle = F0NotesTextEditorHandle;
6203
6330
 
6204
6331
  export declare type NotesTextEditorPageDocumentPatch = TopLevelPrependNotesTextEditorPageDocumentPatch | TopLevelAppendNotesTextEditorPageDocumentPatch | InsertBeforeNotesTextEditorPageDocumentPatch | InsertAfterNotesTextEditorPageDocumentPatch | ReplaceBlockNotesTextEditorPageDocumentPatch | ReplaceContentNotesTextEditorPageDocumentPatch | DeleteBlockNotesTextEditorPageDocumentPatch;
6205
6332
 
6206
- export declare class NotesTextEditorPatchTargetNotFoundError extends Error {
6207
- readonly code = "target_not_found";
6208
- readonly targetId: string;
6209
- constructor(targetId: string);
6210
- }
6333
+ /** @deprecated Use F0NotesTextEditorProps */
6334
+ export declare type NotesTextEditorProps = F0NotesTextEditorProps;
6211
6335
 
6212
- export declare interface NotesTextEditorProps extends WithDataTestIdProps {
6213
- onChange: (value: {
6214
- json: JSONContent | null;
6215
- html: string | null;
6216
- }) => void;
6217
- placeholder: string;
6218
- initialEditorState?: {
6219
- content?: JSONContent | string;
6220
- title?: string;
6221
- };
6222
- readonly?: boolean;
6223
- aiBlockConfig?: AIBlockConfig;
6224
- imageUploadConfig?: ImageUploadConfig;
6225
- onTitleChange?: (title: string) => void;
6226
- titlePlaceholder?: string;
6227
- primaryAction?: PrimaryActionButton | PrimaryDropdownAction<string>;
6228
- secondaryActions?: HeaderSecondaryAction[];
6229
- otherActions?: DropdownItem[];
6230
- metadata?: MetadataItem[];
6231
- banner?: BannerProps;
6232
- showBubbleMenu?: boolean;
6233
- }
6336
+ /** @deprecated Use F0NotesTextEditorSkeleton */
6337
+ export declare const NotesTextEditorSkeleton: ({ withHeader, withTitle, withToolbar, }: F0NotesTextEditorSkeletonProps) => JSX_2.Element;
6234
6338
 
6235
- export declare const NotesTextEditorSkeleton: ({ withHeader, withTitle, withToolbar, }: NotesTextEditorSkeletonProps) => JSX_2.Element;
6236
-
6237
- export declare interface NotesTextEditorSkeletonProps {
6238
- withHeader?: boolean;
6239
- withTitle?: boolean;
6240
- withToolbar?: boolean;
6241
- }
6339
+ /** @deprecated Use F0NotesTextEditorSkeletonProps */
6340
+ export declare type NotesTextEditorSkeletonProps = F0NotesTextEditorSkeletonProps;
6242
6341
 
6243
6342
  export declare interface NotesTextEditorSnapshot {
6244
6343
  json: JSONContent | null;
6245
6344
  html: string | null;
6246
6345
  }
6247
6346
 
6248
- export declare class NotesTextEditorUnsupportedPatchTypeError extends Error {
6249
- readonly code = "unsupported_patch_type";
6250
- readonly patchType: unknown;
6251
- constructor(patchType: unknown);
6252
- }
6253
-
6254
6347
  declare type NumberCellConfig<R extends RecordType = RecordType> = {
6255
6348
  min?: number;
6256
6349
  max?: number;
@@ -6915,9 +7008,9 @@ export declare type PageBasedPaginatedResponse<TRecord> = BasePaginatedResponse<
6915
7008
  pagesCount: number;
6916
7009
  };
6917
7010
 
6918
- export declare function PageHeader({ module, statusTag, breadcrumbs, actions, embedded, navigation, productUpdates, favorites, oneSwitchTooltip, oneSwitchAutoOpen, }: HeaderProps): JSX_2.Element;
7011
+ export declare function PageHeader({ module, statusTag, breadcrumbs, actions, embedded, navigation, productUpdates, favorites, oneSwitchTooltip, oneSwitchAutoOpen, }: HeaderProps_2): JSX_2.Element;
6919
7012
 
6920
- export declare type PageHeaderItemNavigationInput<R extends RecordType> = Pick<UseDataSourceItemNavigationReturn<R>, "previousItem" | "nextItem" | "previousItemUrl" | "nextItemUrl" | "absoluteIndex" | "totalItems" | "activeIndex">;
7013
+ export declare type PageHeaderItemNavigationInput<R extends RecordType> = Pick<UseDataSourceItemNavigationReturn<R>, "previousItem" | "nextItem" | "previousItemUrl" | "nextItemUrl" | "absoluteIndex" | "totalItems" | "activeIndex" | "hasPrevious" | "hasNext" | "goToPrevious" | "goToNext">;
6921
7014
 
6922
7015
  export declare const PageHeaderNavigationContext: Context<NavigationProps | null>;
6923
7016
 
@@ -7141,7 +7234,7 @@ declare type PrimaryAction_2 = BaseAction & {
7141
7234
  variant?: PrimaryActionVariant;
7142
7235
  };
7143
7236
 
7144
- declare interface PrimaryActionButton extends PrimaryAction {
7237
+ export declare interface PrimaryActionButton extends PrimaryAction {
7145
7238
  label: string;
7146
7239
  icon?: IconType;
7147
7240
  onClick: () => void;
@@ -7166,7 +7259,7 @@ export declare type primaryActionType = {
7166
7259
 
7167
7260
  declare type PrimaryActionVariant = "default" | "critical" | "neutral";
7168
7261
 
7169
- declare interface PrimaryDropdownAction<T> extends PrimaryAction {
7262
+ export declare interface PrimaryDropdownAction<T> extends PrimaryAction {
7170
7263
  items: ButtonDropdownItem<T>[];
7171
7264
  value?: T;
7172
7265
  onClick: (value: T, item: ButtonDropdownItem<T>) => void;
@@ -7451,13 +7544,13 @@ declare type RelaxedNumericWithFormatter = Omit<NumericWithFormatter, "numericVa
7451
7544
 
7452
7545
  declare type RendererDefinition = ValueDisplayRendererDefinition;
7453
7546
 
7454
- declare interface ReplaceBlockNotesTextEditorPageDocumentPatch {
7547
+ export declare interface ReplaceBlockNotesTextEditorPageDocumentPatch {
7455
7548
  type: "replace_block";
7456
7549
  targetId: string;
7457
7550
  block: JSONContent;
7458
7551
  }
7459
7552
 
7460
- declare interface ReplaceContentNotesTextEditorPageDocumentPatch {
7553
+ export declare interface ReplaceContentNotesTextEditorPageDocumentPatch {
7461
7554
  type: "replace_content";
7462
7555
  targetId: string;
7463
7556
  content: JSONContent[];
@@ -7498,59 +7591,28 @@ export declare type resultType = {
7498
7591
  mentionIds?: string[];
7499
7592
  };
7500
7593
 
7501
- export declare const RichTextDisplay: WithDataTestIdReturnType_5<ForwardRefExoticComponent<RichTextDisplayProps & RefAttributes<HTMLDivElement>>>;
7594
+ /** @deprecated Use F0RichTextDisplay */
7595
+ export declare const RichTextDisplay: ForwardRefExoticComponent<F0RichTextDisplayProps & RefAttributes<HTMLDivElement>>;
7502
7596
 
7503
- export declare type RichTextDisplayHandle = HTMLDivElement;
7597
+ /** @deprecated Use F0RichTextDisplayHandle */
7598
+ export declare type RichTextDisplayHandle = F0RichTextDisplayHandle;
7504
7599
 
7505
- export declare interface RichTextDisplayProps extends HTMLAttributes<HTMLDivElement> {
7506
- content: string;
7507
- className?: string;
7508
- format?: "html" | "markdown";
7509
- }
7600
+ /** @deprecated Use F0RichTextDisplayProps */
7601
+ export declare type RichTextDisplayProps = F0RichTextDisplayProps;
7510
7602
 
7511
- export declare const RichTextEditor: ForwardRefExoticComponent<RichTextEditorProps & RefAttributes<RichTextEditorHandle>> & {
7512
- Skeleton: ({ rows }: RichTextEditorSkeletonProps) => JSX_2.Element;
7603
+ /** @deprecated Use F0RichTextEditor */
7604
+ export declare const RichTextEditor: ForwardRefExoticComponent<F0RichTextEditorProps & RefAttributes<F0RichTextEditorHandle>> & {
7605
+ Skeleton: ({ rows, }: F0RichTextEditorSkeletonProps) => JSX_2.Element;
7513
7606
  };
7514
7607
 
7515
- export declare type RichTextEditorHandle = {
7516
- clear: () => void;
7517
- clearFiles: () => void;
7518
- focus: () => void;
7519
- setError: (error: string | null) => void;
7520
- setContent: (content: string) => void;
7521
- };
7608
+ /** @deprecated Use F0RichTextEditorHandle */
7609
+ export declare type RichTextEditorHandle = F0RichTextEditorHandle;
7522
7610
 
7523
- export declare interface RichTextEditorProps {
7524
- mentionsConfig?: MentionsConfig;
7525
- enhanceConfig?: enhanceConfig;
7526
- filesConfig?: filesConfig;
7527
- secondaryAction?: secondaryActionsType;
7528
- primaryAction?: primaryActionType;
7529
- onChange: (result: resultType) => void;
7530
- onBlur?: () => void;
7531
- maxCharacters?: number;
7532
- placeholder: string;
7533
- initialEditorState?: {
7534
- content?: string;
7535
- files?: File[];
7536
- };
7537
- title: string;
7538
- height?: heightType;
7539
- plainHtmlMode?: boolean;
7540
- fullScreenMode?: boolean;
7541
- onFullscreenChange?: (fullscreen: boolean) => void;
7542
- /** Whether the editor is disabled */
7543
- disabled?: boolean;
7544
- /** Whether the editor has an error state */
7545
- error?: boolean;
7546
- /** Whether the editor is in a loading state */
7547
- loading?: boolean;
7548
- dataTestId?: string;
7549
- }
7611
+ /** @deprecated Use F0RichTextEditorProps */
7612
+ export declare type RichTextEditorProps = F0RichTextEditorProps;
7550
7613
 
7551
- declare interface RichTextEditorSkeletonProps {
7552
- rows?: number;
7553
- }
7614
+ /** @deprecated Use F0RichTextEditorSkeletonProps */
7615
+ export declare type RichTextEditorSkeletonProps = F0RichTextEditorSkeletonProps;
7554
7616
 
7555
7617
  export declare const ScrollArea: WithDataTestIdReturnType<ForwardRefExoticComponent<Omit<Omit<ScrollAreaProps & RefAttributes<HTMLDivElement>, "ref"> & {
7556
7618
  showBar?: boolean;
@@ -8404,38 +8466,6 @@ export declare const ToggleGroupItem: React_2.ForwardRefExoticComponent<Omit<Tog
8404
8466
  className?: ClassValue;
8405
8467
  })) | undefined) => string> & React_2.RefAttributes<HTMLButtonElement>>;
8406
8468
 
8407
- export declare interface ToolbarButtonProps {
8408
- onClick?: () => void;
8409
- active?: boolean;
8410
- label: string;
8411
- disabled: boolean;
8412
- icon: IconType;
8413
- tooltip?: {
8414
- description?: string;
8415
- label?: string;
8416
- shortcut?: ComponentProps<typeof Shortcut>["keys"];
8417
- };
8418
- showLabel?: boolean;
8419
- }
8420
-
8421
- export declare interface ToolbarDropdownItem {
8422
- label: string;
8423
- icon: IconType;
8424
- onClick: () => void;
8425
- isActive: boolean;
8426
- }
8427
-
8428
- export declare interface ToolbarProps {
8429
- editor: Editor;
8430
- isFullscreen?: boolean;
8431
- disableButtons: boolean;
8432
- onClose?: () => void;
8433
- animationComplete?: boolean;
8434
- darkMode?: boolean;
8435
- showEmojiPicker?: boolean;
8436
- plainHtmlMode?: boolean;
8437
- }
8438
-
8439
8469
  /**
8440
8470
  * @experimental This is an experimental component use it at your own risk
8441
8471
  */
@@ -8456,12 +8486,12 @@ declare type TooltipInternalProps = {
8456
8486
 
8457
8487
  export declare type TooltipProps = Omit<TooltipInternalProps, (typeof privateProps_7)[number]>;
8458
8488
 
8459
- declare interface TopLevelAppendNotesTextEditorPageDocumentPatch {
8489
+ export declare interface TopLevelAppendNotesTextEditorPageDocumentPatch {
8460
8490
  type: "top_level_append";
8461
8491
  blocks: JSONContent[];
8462
8492
  }
8463
8493
 
8464
- declare interface TopLevelPrependNotesTextEditorPageDocumentPatch {
8494
+ export declare interface TopLevelPrependNotesTextEditorPageDocumentPatch {
8465
8495
  type: "top_level_prepend";
8466
8496
  blocks: JSONContent[];
8467
8497
  }
@@ -8519,6 +8549,8 @@ declare namespace Types {
8519
8549
  }
8520
8550
  }
8521
8551
 
8552
+ export declare const UPLOAD_INPUT_ID = "rich-text-editor-upload-button";
8553
+
8522
8554
  /**
8523
8555
  * Tracking options for the AI chat
8524
8556
  */
@@ -8629,6 +8661,16 @@ export declare interface UseDataCollectionItemNavigationProps<R extends RecordTy
8629
8661
  * re-resolves neighbors; `undefined` keeps the persisted/definition state.
8630
8662
  */
8631
8663
  currentFilters?: FiltersState<Filters>;
8664
+ /**
8665
+ * How the returned `navigation` arrows navigate:
8666
+ * - `"url"` (default): links to each item's `itemUrl` — for full-page
8667
+ * detail views where prev/next changes the route.
8668
+ * - `"callback"`: arrows call the controller's `goToPrevious`/`goToNext`,
8669
+ * swapping the active item in place with no URL change — for a mounted
8670
+ * sidepanel/dialog (drive `activeItemId` via `onActiveItemChange`).
8671
+ * @default "url"
8672
+ */
8673
+ navigationMode?: "url" | "callback";
8632
8674
  /**
8633
8675
  * Forwarded to `useDataCollectionSource` for `dataAdapter` memoization,
8634
8676
  * same convention as `useDataCollectionSource(source, deps)`.
@@ -8768,16 +8810,18 @@ export declare const useInfiniteScrollPagination: (paginationInfo: PaginationInf
8768
8810
 
8769
8811
  /**
8770
8812
  * Converts an item-navigation result into the `NavigationProps` shape that
8771
- * `PageHeader` accepts (directly or via `PageHeaderNavigationProvider`).
8813
+ * `PageHeader` and `F0Dialog` accept (directly or via
8814
+ * `PageHeaderNavigationProvider`).
8772
8815
  *
8773
- * URLs are read from `previousItemUrl` / `nextItemUrl`, which are computed by
8774
- * the `itemUrl` option on the navigation hook. A null URL omits that link
8775
- * (the button renders disabled). The counter is included only when both the
8776
- * absolute position and the total are known never a misleading `0/n`.
8816
+ * In `"url"` mode (default) the arrows are links to `previousItemUrl` /
8817
+ * `nextItemUrl` (computed from the hook's `itemUrl`); a null URL omits that
8818
+ * arrow. In `"callback"` mode the arrows call `goToPrevious`/`goToNext` and
8819
+ * presence is gated by `hasPrevious`/`hasNext`for in-place navigation that
8820
+ * never touches the URL. The counter is included only when both the absolute
8821
+ * position and the total are known — never a misleading `0/n`.
8777
8822
  *
8778
- * Returns null when there is nothing useful to render (no input, or the
8779
- * active item could not be located and no total is known), so it can be
8780
- * passed straight to `PageHeaderNavigationProvider`.
8823
+ * Returns null when there is nothing useful to render, so it can be passed
8824
+ * straight to `PageHeaderNavigationProvider`.
8781
8825
  */
8782
8826
  export declare function usePageHeaderItemNavigation<R extends RecordType>(nav: PageHeaderItemNavigationInput<R> | null, config?: UsePageHeaderItemNavigationConfig<R>): NavigationProps | null;
8783
8827
 
@@ -8787,6 +8831,16 @@ export declare interface UsePageHeaderItemNavigationConfig<R extends RecordType>
8787
8831
  * accessible label on the prev/next buttons.
8788
8832
  */
8789
8833
  getItemTitle?: (item: R) => string;
8834
+ /**
8835
+ * How the prev/next arrows navigate:
8836
+ * - `"url"` (default): each arrow is a link to the item's `itemUrl` — for
8837
+ * full-page detail views where navigation changes the route.
8838
+ * - `"callback"`: each arrow calls `goToPrevious`/`goToNext`, swapping the
8839
+ * active item in place — for a mounted sidepanel/dialog that never
8840
+ * changes the URL. Presence is gated by `hasPrevious`/`hasNext`.
8841
+ * @default "url"
8842
+ */
8843
+ mode?: "url" | "callback";
8790
8844
  }
8791
8845
 
8792
8846
  /**
@@ -9291,9 +9345,9 @@ declare namespace Calendar {
9291
9345
 
9292
9346
  declare module "@tiptap/core" {
9293
9347
  interface Commands<ReturnType> {
9294
- enhanceHighlight: {
9295
- setEnhanceHighlight: (from: number, to: number) => ReturnType;
9296
- clearEnhanceHighlight: () => ReturnType;
9348
+ aiBlock: {
9349
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
9350
+ executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
9297
9351
  };
9298
9352
  }
9299
9353
  }
@@ -9301,9 +9355,11 @@ declare module "@tiptap/core" {
9301
9355
 
9302
9356
  declare module "@tiptap/core" {
9303
9357
  interface Commands<ReturnType> {
9304
- aiBlock: {
9305
- insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
9306
- executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
9358
+ enhanceHighlight: {
9359
+ setEnhanceHighlight: (from: number, to: number, options?: {
9360
+ placeholder?: string;
9361
+ }) => ReturnType;
9362
+ clearEnhanceHighlight: () => ReturnType;
9307
9363
  };
9308
9364
  }
9309
9365
  }