@factorialco/f0-react 3.0.0 → 3.1.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/{F0CanvasPanel-ptgXy87G.js → F0CanvasPanel-z8xqI8tX.js} +25018 -24508
- package/dist/F0CanvasPanel.css +1 -1
- package/dist/ai.d.ts +37 -38
- package/dist/ai.js +21 -21
- package/dist/experimental.d.ts +287 -231
- package/dist/experimental.js +1189 -1162
- package/dist/f0.d.ts +230 -233
- package/dist/f0.js +2962 -2956
- package/dist/i18n-provider-defaults.d.ts +4 -2
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/{useChatHistory-BphMZrVl.js → useChatHistory-0yvpUg-H.js} +3734 -4203
- package/dist/{useDataCollectionSource-SH2WbTKC.js → useDataCollectionSource-D0BqJ0ux.js} +14825 -14380
- package/package.json +1 -1
- package/dist/useChatHistory.css +0 -1
package/dist/experimental.d.ts
CHANGED
|
@@ -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;
|
|
@@ -1124,19 +1119,6 @@ declare type BreadcrumbBaseItemType = NavigationItem & {
|
|
|
1124
1119
|
label: string;
|
|
1125
1120
|
};
|
|
1126
1121
|
|
|
1127
|
-
/**
|
|
1128
|
-
* A breadcrumb "jump-to" select bound to a OneDataCollection: the options are
|
|
1129
|
-
* fetched from the declared `source`, seeded with the filters/sortings the
|
|
1130
|
-
* list persisted under `collectionId` — so on the detail page (even via a
|
|
1131
|
-
* direct link, with the list never mounted) the select only shows the items
|
|
1132
|
-
* the user was looking at on the list.
|
|
1133
|
-
*
|
|
1134
|
-
* F0 owns the seeding, pagination handling (a `pages` adapter is transparently
|
|
1135
|
-
* consumed as infinite scroll), current selection, navigation, and
|
|
1136
|
-
* loop-safety: `source` is captured when the crumb mounts, so inline-recreated
|
|
1137
|
-
* item objects never retrigger fetches. Give the item a new `id` to swap
|
|
1138
|
-
* sources.
|
|
1139
|
-
*/
|
|
1140
1122
|
export declare type BreadcrumbCollectionSelectItemType = BreadcrumbBaseItemType & {
|
|
1141
1123
|
type: "collection-select";
|
|
1142
1124
|
/**
|
|
@@ -1146,8 +1128,9 @@ export declare type BreadcrumbCollectionSelectItemType = BreadcrumbBaseItemType
|
|
|
1146
1128
|
*/
|
|
1147
1129
|
collectionId: string;
|
|
1148
1130
|
/** The declared data source — no mounted collection needed. */
|
|
1149
|
-
source:
|
|
1150
|
-
|
|
1131
|
+
source: CollectionSelectSourceDefinition;
|
|
1132
|
+
/** Method syntax on purpose: bivariant, so concrete-record mappers fit. */
|
|
1133
|
+
mapOptions(item: RecordType): F0SelectItemProps<string, RecordType>;
|
|
1151
1134
|
/** Current item id (the record the detail page is showing). */
|
|
1152
1135
|
value?: string;
|
|
1153
1136
|
/**
|
|
@@ -1180,14 +1163,15 @@ export declare type BreadcrumbCollectionSelectItemType = BreadcrumbBaseItemType
|
|
|
1180
1163
|
} & ({
|
|
1181
1164
|
/**
|
|
1182
1165
|
* Href to navigate to when an option is picked, routed through the
|
|
1183
|
-
* app's LinkProvider. Return undefined to skip navigation.
|
|
1166
|
+
* app's LinkProvider. Return undefined to skip navigation. Method
|
|
1167
|
+
* syntax on purpose: bivariant, so concrete-record callbacks fit.
|
|
1184
1168
|
*/
|
|
1185
|
-
getItemHref
|
|
1186
|
-
onSelect
|
|
1169
|
+
getItemHref(value: string, item?: RecordType): string | undefined;
|
|
1170
|
+
onSelect?(value: string, item?: RecordType): void;
|
|
1187
1171
|
} | {
|
|
1188
1172
|
getItemHref?: never;
|
|
1189
1173
|
/** Imperative escape hatch (e.g. router.push) when hrefs don't fit. */
|
|
1190
|
-
onSelect
|
|
1174
|
+
onSelect(value: string, item?: RecordType): void;
|
|
1191
1175
|
});
|
|
1192
1176
|
|
|
1193
1177
|
export declare type BreadcrumbItemType = BreadcrumbLoadingItemType | BreadcrumbNavItemType | BreadcrumbSelectItemType | BreadcrumbCollectionSelectItemType;
|
|
@@ -1298,18 +1282,6 @@ export declare type BulkActionsDefinition<R extends RecordType, Filters extends
|
|
|
1298
1282
|
warningMessage: string;
|
|
1299
1283
|
};
|
|
1300
1284
|
|
|
1301
|
-
export declare interface ButtonConfig {
|
|
1302
|
-
key: string;
|
|
1303
|
-
icon: IconType;
|
|
1304
|
-
active: (editor: Editor) => boolean;
|
|
1305
|
-
onClick: (editor: Editor) => void;
|
|
1306
|
-
label: string;
|
|
1307
|
-
tooltip: {
|
|
1308
|
-
label: string;
|
|
1309
|
-
shortcut: string[];
|
|
1310
|
-
};
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
1285
|
declare type ButtonDropdownItem<T = string> = {
|
|
1314
1286
|
/**
|
|
1315
1287
|
* The value of the item.
|
|
@@ -2202,6 +2174,15 @@ export declare type CollectionProps<Record extends RecordType, Filters extends F
|
|
|
2202
2174
|
fromVisualization?: TableVisualizationType;
|
|
2203
2175
|
} & VisualizationOptions;
|
|
2204
2176
|
|
|
2177
|
+
/**
|
|
2178
|
+
* The record-erased source a collection-select breadcrumb accepts: a
|
|
2179
|
+
* `DataSourceDefinition` whose callbacks (and data adapter) tolerate sources
|
|
2180
|
+
* declared over concrete record/filter types.
|
|
2181
|
+
*/
|
|
2182
|
+
export declare type CollectionSelectSourceDefinition = WithBivariantCallbacks<Omit<DataSourceDefinition<RecordType, FiltersDefinition, SortingsDefinition, GroupingDefinition<RecordType>>, "dataAdapter">> & {
|
|
2183
|
+
dataAdapter: WithBivariantCallbacks<DataAdapter<RecordType, FiltersDefinition>>;
|
|
2184
|
+
};
|
|
2185
|
+
|
|
2205
2186
|
declare type CollectionVisualizations<Record extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>> = {
|
|
2206
2187
|
table: VisualizacionTypeDefinition<TableCollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>, TableVisualizationSettings>;
|
|
2207
2188
|
editableTable: VisualizacionTypeDefinition<EditableTableCollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>, EditableTableVisualizationSettings>;
|
|
@@ -3633,7 +3614,7 @@ declare const defaultTranslations: {
|
|
|
3633
3614
|
readonly blocks: "Blocks";
|
|
3634
3615
|
};
|
|
3635
3616
|
readonly ai: {
|
|
3636
|
-
readonly enhanceButtonLabel: "
|
|
3617
|
+
readonly enhanceButtonLabel: "Generate";
|
|
3637
3618
|
readonly loadingEnhanceLabel: "Loading...";
|
|
3638
3619
|
readonly defaultError: "An error occurred while loading";
|
|
3639
3620
|
readonly closeErrorButtonLabel: "Continue editing";
|
|
@@ -3744,7 +3725,7 @@ declare const defaultTranslations: {
|
|
|
3744
3725
|
};
|
|
3745
3726
|
};
|
|
3746
3727
|
|
|
3747
|
-
declare interface DeleteBlockNotesTextEditorPageDocumentPatch {
|
|
3728
|
+
export declare interface DeleteBlockNotesTextEditorPageDocumentPatch {
|
|
3748
3729
|
type: "delete_block";
|
|
3749
3730
|
targetId: string;
|
|
3750
3731
|
}
|
|
@@ -3782,7 +3763,7 @@ export declare type DetailsItemContent = (ComponentProps<typeof DataList.Item> &
|
|
|
3782
3763
|
}[TagType_2] | {
|
|
3783
3764
|
type: "avatar-list";
|
|
3784
3765
|
avatarList: F0AvatarListProps;
|
|
3785
|
-
} | (ComponentProps<typeof
|
|
3766
|
+
} | (ComponentProps<typeof F0FileItem> & {
|
|
3786
3767
|
type: "file";
|
|
3787
3768
|
});
|
|
3788
3769
|
|
|
@@ -4079,17 +4060,25 @@ declare type EmptyStateType = (typeof emptyStatesTypes)[number];
|
|
|
4079
4060
|
export declare type enhanceConfig = {
|
|
4080
4061
|
onEnhanceText: (params: enhanceTextParams) => Promise<enhancedTextResponse>;
|
|
4081
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;
|
|
4082
4069
|
};
|
|
4083
4070
|
|
|
4084
4071
|
export declare type enhancedTextResponse = {
|
|
4085
4072
|
success: boolean;
|
|
4086
|
-
|
|
4073
|
+
/** Enhanced content: an HTML/plain string or a TipTap JSON document */
|
|
4074
|
+
text: string | JSONContent;
|
|
4087
4075
|
error?: string;
|
|
4088
4076
|
};
|
|
4089
4077
|
|
|
4090
4078
|
export declare type EnhancementOption = {
|
|
4091
4079
|
id: string;
|
|
4092
4080
|
label: string;
|
|
4081
|
+
icon?: IconType;
|
|
4093
4082
|
subOptions?: EnhancementOption[];
|
|
4094
4083
|
};
|
|
4095
4084
|
|
|
@@ -4300,6 +4289,24 @@ export declare type F0AiBannerProps = AiBannerInternalProps;
|
|
|
4300
4289
|
/** Assistant-flavoured `F0Message`. Same shape — alias kept for clarity. */
|
|
4301
4290
|
declare type F0AIMessage = F0Message;
|
|
4302
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
|
+
|
|
4303
4310
|
declare const F0AvatarAlert: WithDataTestIdReturnType_5<({ type, size, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, }: AlertAvatarProps_2) => JSX_2.Element>;
|
|
4304
4311
|
|
|
4305
4312
|
declare type F0AvatarCompanyProps = {
|
|
@@ -4543,6 +4550,29 @@ export declare const F0Callout: ForwardRefExoticComponent<Omit<CalloutInternalPr
|
|
|
4543
4550
|
|
|
4544
4551
|
export declare type F0CalloutProps = CalloutInternalProps;
|
|
4545
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
|
+
|
|
4546
4576
|
declare interface F0IconProps extends SVGProps<SVGSVGElement>, VariantProps<typeof iconVariants> {
|
|
4547
4577
|
icon: IconType;
|
|
4548
4578
|
size?: "lg" | "md" | "sm" | "xs";
|
|
@@ -4568,6 +4598,56 @@ declare type F0Message = {
|
|
|
4568
4598
|
[key: string]: any;
|
|
4569
4599
|
};
|
|
4570
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
|
+
|
|
4571
4651
|
/**
|
|
4572
4652
|
* F0NumberInput is the writable numeric field for forms — a box where the
|
|
4573
4653
|
* user types a number. For arbitrary text use F0TextInput; for durations
|
|
@@ -4577,6 +4657,70 @@ export declare const F0NumberInput: ForwardRefExoticComponent<Omit<F0NumberInput
|
|
|
4577
4657
|
|
|
4578
4658
|
export declare type F0NumberInputProps = Omit<NumberInputInternalProps, (typeof privateProps_4)[number]>;
|
|
4579
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
|
+
|
|
4580
4724
|
export declare const F0SearchInput: ForwardRefExoticComponent< {
|
|
4581
4725
|
value?: string;
|
|
4582
4726
|
threshold?: number;
|
|
@@ -4969,12 +5113,8 @@ export declare const FILE_TYPES: {
|
|
|
4969
5113
|
readonly MARKDOWN: "markdown";
|
|
4970
5114
|
};
|
|
4971
5115
|
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
label: string;
|
|
4975
|
-
onClick: () => void;
|
|
4976
|
-
critical?: boolean;
|
|
4977
|
-
};
|
|
5116
|
+
/** @deprecated Use F0FileAction */
|
|
5117
|
+
export declare type FileAction = F0FileAction;
|
|
4978
5118
|
|
|
4979
5119
|
declare type FileAvatarVariant = Extract<AvatarVariant, {
|
|
4980
5120
|
type: "file";
|
|
@@ -4985,26 +5125,14 @@ declare type FileDef = {
|
|
|
4985
5125
|
type: string;
|
|
4986
5126
|
};
|
|
4987
5127
|
|
|
4988
|
-
|
|
5128
|
+
/** @deprecated Use F0FileItem */
|
|
5129
|
+
export declare const FileItem: WithDataTestIdReturnType_2<ForwardRefExoticComponent<F0FileItemProps & RefAttributes<HTMLDivElement>>>;
|
|
4989
5130
|
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
actions?: FileAction[];
|
|
4993
|
-
disabled?: boolean;
|
|
4994
|
-
size?: FileItemSize;
|
|
4995
|
-
}
|
|
4996
|
-
|
|
4997
|
-
export declare type FileItemSize = NonNullable<VariantProps<typeof fileItemVariants>["size"]>;
|
|
5131
|
+
/** @deprecated Use F0FileItemProps */
|
|
5132
|
+
export declare type FileItemProps = F0FileItemProps;
|
|
4998
5133
|
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
} & ({
|
|
5002
|
-
class?: ClassValue;
|
|
5003
|
-
className?: never;
|
|
5004
|
-
} | {
|
|
5005
|
-
class?: never;
|
|
5006
|
-
className?: ClassValue;
|
|
5007
|
-
})) | undefined) => string;
|
|
5134
|
+
/** @deprecated Use F0FileItemSize */
|
|
5135
|
+
export declare type FileItemSize = F0FileItemSize;
|
|
5008
5136
|
|
|
5009
5137
|
export declare type filesConfig = {
|
|
5010
5138
|
onFiles: (files: File[]) => void;
|
|
@@ -5334,7 +5462,15 @@ declare type GroupRecord<RecordType> = {
|
|
|
5334
5462
|
records: RecordType[];
|
|
5335
5463
|
};
|
|
5336
5464
|
|
|
5337
|
-
declare
|
|
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 = {
|
|
5338
5474
|
module: {
|
|
5339
5475
|
id: ModuleId;
|
|
5340
5476
|
name: string;
|
|
@@ -5364,7 +5500,7 @@ declare type HeaderProps = {
|
|
|
5364
5500
|
oneSwitchAutoOpen?: boolean;
|
|
5365
5501
|
};
|
|
5366
5502
|
|
|
5367
|
-
declare type HeaderSecondaryAction = HeaderSecondaryButtonAction | HeaderSecondaryDropdownAction;
|
|
5503
|
+
export declare type HeaderSecondaryAction = HeaderSecondaryButtonAction | HeaderSecondaryDropdownAction;
|
|
5368
5504
|
|
|
5369
5505
|
declare type HeaderSecondaryButtonAction = SecondaryAction & {
|
|
5370
5506
|
hideLabel?: boolean;
|
|
@@ -5374,6 +5510,13 @@ declare type HeaderSecondaryDropdownAction = PrimaryDropdownAction<string> & {
|
|
|
5374
5510
|
variant?: "outline";
|
|
5375
5511
|
};
|
|
5376
5512
|
|
|
5513
|
+
export declare interface HeaderStatusProps {
|
|
5514
|
+
label: string;
|
|
5515
|
+
text: string;
|
|
5516
|
+
variant: StatusVariant;
|
|
5517
|
+
actions?: MetadataAction[];
|
|
5518
|
+
}
|
|
5519
|
+
|
|
5377
5520
|
declare interface HeatmapComputation {
|
|
5378
5521
|
datasetId: string;
|
|
5379
5522
|
xAxis: string;
|
|
@@ -5671,13 +5814,13 @@ declare type InputInternalProps = Pick<ComponentProps<typeof Input_2>, "ref" | "
|
|
|
5671
5814
|
*/
|
|
5672
5815
|
export declare type InputProps = F0TextInputProps;
|
|
5673
5816
|
|
|
5674
|
-
declare interface InsertAfterNotesTextEditorPageDocumentPatch {
|
|
5817
|
+
export declare interface InsertAfterNotesTextEditorPageDocumentPatch {
|
|
5675
5818
|
type: "insert_after";
|
|
5676
5819
|
targetId: string;
|
|
5677
5820
|
blocks: JSONContent[];
|
|
5678
5821
|
}
|
|
5679
5822
|
|
|
5680
|
-
declare interface InsertBeforeNotesTextEditorPageDocumentPatch {
|
|
5823
|
+
export declare interface InsertBeforeNotesTextEditorPageDocumentPatch {
|
|
5681
5824
|
type: "insert_before";
|
|
5682
5825
|
targetId: string;
|
|
5683
5826
|
blocks: JSONContent[];
|
|
@@ -5840,25 +5983,6 @@ export declare type MentionedUser = {
|
|
|
5840
5983
|
href?: string;
|
|
5841
5984
|
};
|
|
5842
5985
|
|
|
5843
|
-
export declare interface MentionItemComponentProps {
|
|
5844
|
-
item: MentionedUser;
|
|
5845
|
-
index: number;
|
|
5846
|
-
selected: boolean;
|
|
5847
|
-
}
|
|
5848
|
-
|
|
5849
|
-
export declare interface MentionListRef {
|
|
5850
|
-
onKeyDown: (props: {
|
|
5851
|
-
event: KeyboardEvent;
|
|
5852
|
-
}) => boolean;
|
|
5853
|
-
}
|
|
5854
|
-
|
|
5855
|
-
export declare interface MentionNodeAttrs {
|
|
5856
|
-
id: string;
|
|
5857
|
-
label: string;
|
|
5858
|
-
image_url?: string;
|
|
5859
|
-
href?: string;
|
|
5860
|
-
}
|
|
5861
|
-
|
|
5862
5986
|
export declare type MentionsConfig = {
|
|
5863
5987
|
onMentionQueryStringChanged?: (queryString: string) => Promise<MentionedUser[]> | undefined;
|
|
5864
5988
|
users: MentionedUser[];
|
|
@@ -5909,11 +6033,11 @@ declare type MetadataCopyAction = {
|
|
|
5909
6033
|
type: "copy";
|
|
5910
6034
|
};
|
|
5911
6035
|
|
|
5912
|
-
declare function MetadataItem({ item }: {
|
|
6036
|
+
export declare function MetadataItem({ item }: {
|
|
5913
6037
|
item: MetadataItem;
|
|
5914
6038
|
}): JSX_2.Element;
|
|
5915
6039
|
|
|
5916
|
-
declare interface MetadataItem {
|
|
6040
|
+
export declare interface MetadataItem {
|
|
5917
6041
|
label: string;
|
|
5918
6042
|
value: MetadataItemValue;
|
|
5919
6043
|
actions?: (MetadataAction | MetadataCopyAction)[];
|
|
@@ -5933,7 +6057,7 @@ declare interface MetadataItem {
|
|
|
5933
6057
|
};
|
|
5934
6058
|
}
|
|
5935
6059
|
|
|
5936
|
-
declare type MetadataItemValue = {
|
|
6060
|
+
export declare type MetadataItemValue = {
|
|
5937
6061
|
type: "text";
|
|
5938
6062
|
content: string;
|
|
5939
6063
|
} | {
|
|
@@ -6190,69 +6314,30 @@ declare interface NextStepsProps {
|
|
|
6190
6314
|
items: StepItemProps[];
|
|
6191
6315
|
}
|
|
6192
6316
|
|
|
6193
|
-
|
|
6317
|
+
/** @deprecated Use F0NotesTextEditor */
|
|
6318
|
+
export declare const NotesTextEditor: ForwardRefExoticComponent<F0NotesTextEditorProps & RefAttributes<F0NotesTextEditorHandle>> & {
|
|
6319
|
+
Skeleton: ({ withHeader, withTitle, withToolbar, }: F0NotesTextEditorSkeletonProps) => JSX_2.Element;
|
|
6320
|
+
};
|
|
6194
6321
|
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
focus: () => void;
|
|
6198
|
-
setContent: (content: string) => void;
|
|
6199
|
-
applyPageDocumentPatch: (patch: NotesTextEditorPageDocumentPatch) => NotesTextEditorSnapshot;
|
|
6200
|
-
insertAIBlock: () => void;
|
|
6201
|
-
insertTranscript: (title: string, users: User[], messages: Message[]) => void;
|
|
6202
|
-
pushContent: (content: string) => void;
|
|
6203
|
-
insertImage: (file: File) => void;
|
|
6204
|
-
}
|
|
6322
|
+
/** @deprecated Use F0NotesTextEditorHandle */
|
|
6323
|
+
export declare type NotesTextEditorHandle = F0NotesTextEditorHandle;
|
|
6205
6324
|
|
|
6206
6325
|
export declare type NotesTextEditorPageDocumentPatch = TopLevelPrependNotesTextEditorPageDocumentPatch | TopLevelAppendNotesTextEditorPageDocumentPatch | InsertBeforeNotesTextEditorPageDocumentPatch | InsertAfterNotesTextEditorPageDocumentPatch | ReplaceBlockNotesTextEditorPageDocumentPatch | ReplaceContentNotesTextEditorPageDocumentPatch | DeleteBlockNotesTextEditorPageDocumentPatch;
|
|
6207
6326
|
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
readonly targetId: string;
|
|
6211
|
-
constructor(targetId: string);
|
|
6212
|
-
}
|
|
6213
|
-
|
|
6214
|
-
export declare interface NotesTextEditorProps extends WithDataTestIdProps {
|
|
6215
|
-
onChange: (value: {
|
|
6216
|
-
json: JSONContent | null;
|
|
6217
|
-
html: string | null;
|
|
6218
|
-
}) => void;
|
|
6219
|
-
placeholder: string;
|
|
6220
|
-
initialEditorState?: {
|
|
6221
|
-
content?: JSONContent | string;
|
|
6222
|
-
title?: string;
|
|
6223
|
-
};
|
|
6224
|
-
readonly?: boolean;
|
|
6225
|
-
aiBlockConfig?: AIBlockConfig;
|
|
6226
|
-
imageUploadConfig?: ImageUploadConfig;
|
|
6227
|
-
onTitleChange?: (title: string) => void;
|
|
6228
|
-
titlePlaceholder?: string;
|
|
6229
|
-
primaryAction?: PrimaryActionButton | PrimaryDropdownAction<string>;
|
|
6230
|
-
secondaryActions?: HeaderSecondaryAction[];
|
|
6231
|
-
otherActions?: DropdownItem[];
|
|
6232
|
-
metadata?: MetadataItem[];
|
|
6233
|
-
banner?: BannerProps;
|
|
6234
|
-
showBubbleMenu?: boolean;
|
|
6235
|
-
}
|
|
6327
|
+
/** @deprecated Use F0NotesTextEditorProps */
|
|
6328
|
+
export declare type NotesTextEditorProps = F0NotesTextEditorProps;
|
|
6236
6329
|
|
|
6237
|
-
|
|
6330
|
+
/** @deprecated Use F0NotesTextEditorSkeleton */
|
|
6331
|
+
export declare const NotesTextEditorSkeleton: ({ withHeader, withTitle, withToolbar, }: F0NotesTextEditorSkeletonProps) => JSX_2.Element;
|
|
6238
6332
|
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
withTitle?: boolean;
|
|
6242
|
-
withToolbar?: boolean;
|
|
6243
|
-
}
|
|
6333
|
+
/** @deprecated Use F0NotesTextEditorSkeletonProps */
|
|
6334
|
+
export declare type NotesTextEditorSkeletonProps = F0NotesTextEditorSkeletonProps;
|
|
6244
6335
|
|
|
6245
6336
|
export declare interface NotesTextEditorSnapshot {
|
|
6246
6337
|
json: JSONContent | null;
|
|
6247
6338
|
html: string | null;
|
|
6248
6339
|
}
|
|
6249
6340
|
|
|
6250
|
-
export declare class NotesTextEditorUnsupportedPatchTypeError extends Error {
|
|
6251
|
-
readonly code = "unsupported_patch_type";
|
|
6252
|
-
readonly patchType: unknown;
|
|
6253
|
-
constructor(patchType: unknown);
|
|
6254
|
-
}
|
|
6255
|
-
|
|
6256
6341
|
declare type NumberCellConfig<R extends RecordType = RecordType> = {
|
|
6257
6342
|
min?: number;
|
|
6258
6343
|
max?: number;
|
|
@@ -6917,7 +7002,7 @@ export declare type PageBasedPaginatedResponse<TRecord> = BasePaginatedResponse<
|
|
|
6917
7002
|
pagesCount: number;
|
|
6918
7003
|
};
|
|
6919
7004
|
|
|
6920
|
-
export declare function PageHeader({ module, statusTag, breadcrumbs, actions, embedded, navigation, productUpdates, favorites, oneSwitchTooltip, oneSwitchAutoOpen, }:
|
|
7005
|
+
export declare function PageHeader({ module, statusTag, breadcrumbs, actions, embedded, navigation, productUpdates, favorites, oneSwitchTooltip, oneSwitchAutoOpen, }: HeaderProps_2): JSX_2.Element;
|
|
6921
7006
|
|
|
6922
7007
|
export declare type PageHeaderItemNavigationInput<R extends RecordType> = Pick<UseDataSourceItemNavigationReturn<R>, "previousItem" | "nextItem" | "previousItemUrl" | "nextItemUrl" | "absoluteIndex" | "totalItems" | "activeIndex">;
|
|
6923
7008
|
|
|
@@ -7143,7 +7228,7 @@ declare type PrimaryAction_2 = BaseAction & {
|
|
|
7143
7228
|
variant?: PrimaryActionVariant;
|
|
7144
7229
|
};
|
|
7145
7230
|
|
|
7146
|
-
declare interface PrimaryActionButton extends PrimaryAction {
|
|
7231
|
+
export declare interface PrimaryActionButton extends PrimaryAction {
|
|
7147
7232
|
label: string;
|
|
7148
7233
|
icon?: IconType;
|
|
7149
7234
|
onClick: () => void;
|
|
@@ -7168,7 +7253,7 @@ export declare type primaryActionType = {
|
|
|
7168
7253
|
|
|
7169
7254
|
declare type PrimaryActionVariant = "default" | "critical" | "neutral";
|
|
7170
7255
|
|
|
7171
|
-
declare interface PrimaryDropdownAction<T> extends PrimaryAction {
|
|
7256
|
+
export declare interface PrimaryDropdownAction<T> extends PrimaryAction {
|
|
7172
7257
|
items: ButtonDropdownItem<T>[];
|
|
7173
7258
|
value?: T;
|
|
7174
7259
|
onClick: (value: T, item: ButtonDropdownItem<T>) => void;
|
|
@@ -7453,13 +7538,13 @@ declare type RelaxedNumericWithFormatter = Omit<NumericWithFormatter, "numericVa
|
|
|
7453
7538
|
|
|
7454
7539
|
declare type RendererDefinition = ValueDisplayRendererDefinition;
|
|
7455
7540
|
|
|
7456
|
-
declare interface ReplaceBlockNotesTextEditorPageDocumentPatch {
|
|
7541
|
+
export declare interface ReplaceBlockNotesTextEditorPageDocumentPatch {
|
|
7457
7542
|
type: "replace_block";
|
|
7458
7543
|
targetId: string;
|
|
7459
7544
|
block: JSONContent;
|
|
7460
7545
|
}
|
|
7461
7546
|
|
|
7462
|
-
declare interface ReplaceContentNotesTextEditorPageDocumentPatch {
|
|
7547
|
+
export declare interface ReplaceContentNotesTextEditorPageDocumentPatch {
|
|
7463
7548
|
type: "replace_content";
|
|
7464
7549
|
targetId: string;
|
|
7465
7550
|
content: JSONContent[];
|
|
@@ -7500,59 +7585,28 @@ export declare type resultType = {
|
|
|
7500
7585
|
mentionIds?: string[];
|
|
7501
7586
|
};
|
|
7502
7587
|
|
|
7503
|
-
|
|
7588
|
+
/** @deprecated Use F0RichTextDisplay */
|
|
7589
|
+
export declare const RichTextDisplay: ForwardRefExoticComponent<F0RichTextDisplayProps & RefAttributes<HTMLDivElement>>;
|
|
7504
7590
|
|
|
7505
|
-
|
|
7591
|
+
/** @deprecated Use F0RichTextDisplayHandle */
|
|
7592
|
+
export declare type RichTextDisplayHandle = F0RichTextDisplayHandle;
|
|
7506
7593
|
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
className?: string;
|
|
7510
|
-
format?: "html" | "markdown";
|
|
7511
|
-
}
|
|
7594
|
+
/** @deprecated Use F0RichTextDisplayProps */
|
|
7595
|
+
export declare type RichTextDisplayProps = F0RichTextDisplayProps;
|
|
7512
7596
|
|
|
7513
|
-
|
|
7514
|
-
|
|
7597
|
+
/** @deprecated Use F0RichTextEditor */
|
|
7598
|
+
export declare const RichTextEditor: ForwardRefExoticComponent<F0RichTextEditorProps & RefAttributes<F0RichTextEditorHandle>> & {
|
|
7599
|
+
Skeleton: ({ rows, }: F0RichTextEditorSkeletonProps) => JSX_2.Element;
|
|
7515
7600
|
};
|
|
7516
7601
|
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
clearFiles: () => void;
|
|
7520
|
-
focus: () => void;
|
|
7521
|
-
setError: (error: string | null) => void;
|
|
7522
|
-
setContent: (content: string) => void;
|
|
7523
|
-
};
|
|
7602
|
+
/** @deprecated Use F0RichTextEditorHandle */
|
|
7603
|
+
export declare type RichTextEditorHandle = F0RichTextEditorHandle;
|
|
7524
7604
|
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
enhanceConfig?: enhanceConfig;
|
|
7528
|
-
filesConfig?: filesConfig;
|
|
7529
|
-
secondaryAction?: secondaryActionsType;
|
|
7530
|
-
primaryAction?: primaryActionType;
|
|
7531
|
-
onChange: (result: resultType) => void;
|
|
7532
|
-
onBlur?: () => void;
|
|
7533
|
-
maxCharacters?: number;
|
|
7534
|
-
placeholder: string;
|
|
7535
|
-
initialEditorState?: {
|
|
7536
|
-
content?: string;
|
|
7537
|
-
files?: File[];
|
|
7538
|
-
};
|
|
7539
|
-
title: string;
|
|
7540
|
-
height?: heightType;
|
|
7541
|
-
plainHtmlMode?: boolean;
|
|
7542
|
-
fullScreenMode?: boolean;
|
|
7543
|
-
onFullscreenChange?: (fullscreen: boolean) => void;
|
|
7544
|
-
/** Whether the editor is disabled */
|
|
7545
|
-
disabled?: boolean;
|
|
7546
|
-
/** Whether the editor has an error state */
|
|
7547
|
-
error?: boolean;
|
|
7548
|
-
/** Whether the editor is in a loading state */
|
|
7549
|
-
loading?: boolean;
|
|
7550
|
-
dataTestId?: string;
|
|
7551
|
-
}
|
|
7605
|
+
/** @deprecated Use F0RichTextEditorProps */
|
|
7606
|
+
export declare type RichTextEditorProps = F0RichTextEditorProps;
|
|
7552
7607
|
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
}
|
|
7608
|
+
/** @deprecated Use F0RichTextEditorSkeletonProps */
|
|
7609
|
+
export declare type RichTextEditorSkeletonProps = F0RichTextEditorSkeletonProps;
|
|
7556
7610
|
|
|
7557
7611
|
export declare const ScrollArea: WithDataTestIdReturnType<ForwardRefExoticComponent<Omit<Omit<ScrollAreaProps & RefAttributes<HTMLDivElement>, "ref"> & {
|
|
7558
7612
|
showBar?: boolean;
|
|
@@ -8406,38 +8460,6 @@ export declare const ToggleGroupItem: React_2.ForwardRefExoticComponent<Omit<Tog
|
|
|
8406
8460
|
className?: ClassValue;
|
|
8407
8461
|
})) | undefined) => string> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
8408
8462
|
|
|
8409
|
-
export declare interface ToolbarButtonProps {
|
|
8410
|
-
onClick?: () => void;
|
|
8411
|
-
active?: boolean;
|
|
8412
|
-
label: string;
|
|
8413
|
-
disabled: boolean;
|
|
8414
|
-
icon: IconType;
|
|
8415
|
-
tooltip?: {
|
|
8416
|
-
description?: string;
|
|
8417
|
-
label?: string;
|
|
8418
|
-
shortcut?: ComponentProps<typeof Shortcut>["keys"];
|
|
8419
|
-
};
|
|
8420
|
-
showLabel?: boolean;
|
|
8421
|
-
}
|
|
8422
|
-
|
|
8423
|
-
export declare interface ToolbarDropdownItem {
|
|
8424
|
-
label: string;
|
|
8425
|
-
icon: IconType;
|
|
8426
|
-
onClick: () => void;
|
|
8427
|
-
isActive: boolean;
|
|
8428
|
-
}
|
|
8429
|
-
|
|
8430
|
-
export declare interface ToolbarProps {
|
|
8431
|
-
editor: Editor;
|
|
8432
|
-
isFullscreen?: boolean;
|
|
8433
|
-
disableButtons: boolean;
|
|
8434
|
-
onClose?: () => void;
|
|
8435
|
-
animationComplete?: boolean;
|
|
8436
|
-
darkMode?: boolean;
|
|
8437
|
-
showEmojiPicker?: boolean;
|
|
8438
|
-
plainHtmlMode?: boolean;
|
|
8439
|
-
}
|
|
8440
|
-
|
|
8441
8463
|
/**
|
|
8442
8464
|
* @experimental This is an experimental component use it at your own risk
|
|
8443
8465
|
*/
|
|
@@ -8458,12 +8480,12 @@ declare type TooltipInternalProps = {
|
|
|
8458
8480
|
|
|
8459
8481
|
export declare type TooltipProps = Omit<TooltipInternalProps, (typeof privateProps_7)[number]>;
|
|
8460
8482
|
|
|
8461
|
-
declare interface TopLevelAppendNotesTextEditorPageDocumentPatch {
|
|
8483
|
+
export declare interface TopLevelAppendNotesTextEditorPageDocumentPatch {
|
|
8462
8484
|
type: "top_level_append";
|
|
8463
8485
|
blocks: JSONContent[];
|
|
8464
8486
|
}
|
|
8465
8487
|
|
|
8466
|
-
declare interface TopLevelPrependNotesTextEditorPageDocumentPatch {
|
|
8488
|
+
export declare interface TopLevelPrependNotesTextEditorPageDocumentPatch {
|
|
8467
8489
|
type: "top_level_prepend";
|
|
8468
8490
|
blocks: JSONContent[];
|
|
8469
8491
|
}
|
|
@@ -8521,6 +8543,8 @@ declare namespace Types {
|
|
|
8521
8543
|
}
|
|
8522
8544
|
}
|
|
8523
8545
|
|
|
8546
|
+
export declare const UPLOAD_INPUT_ID = "rich-text-editor-upload-button";
|
|
8547
|
+
|
|
8524
8548
|
/**
|
|
8525
8549
|
* Tracking options for the AI chat
|
|
8526
8550
|
*/
|
|
@@ -9179,6 +9203,36 @@ declare interface WiggleOptions {
|
|
|
9179
9203
|
errorHighlight?: boolean;
|
|
9180
9204
|
}
|
|
9181
9205
|
|
|
9206
|
+
/**
|
|
9207
|
+
* A breadcrumb "jump-to" select bound to a OneDataCollection: the options are
|
|
9208
|
+
* fetched from the declared `source`, seeded with the filters/sortings the
|
|
9209
|
+
* list persisted under `collectionId` — so on the detail page (even via a
|
|
9210
|
+
* direct link, with the list never mounted) the select only shows the items
|
|
9211
|
+
* the user was looking at on the list.
|
|
9212
|
+
*
|
|
9213
|
+
* F0 owns the seeding, pagination handling (a `pages` adapter is transparently
|
|
9214
|
+
* consumed as infinite scroll), current selection, navigation, and
|
|
9215
|
+
* loop-safety: `source` is captured when the crumb mounts, so inline-recreated
|
|
9216
|
+
* item objects never retrigger fetches. Give the item a new `id` to swap
|
|
9217
|
+
* sources.
|
|
9218
|
+
*/
|
|
9219
|
+
/**
|
|
9220
|
+
* Rewraps every function-valued member of `T` so its parameters are checked
|
|
9221
|
+
* BIVARIANTLY (the method-syntax trick). The breadcrumb item union is
|
|
9222
|
+
* record-erased (`RecordType`); under `strictFunctionTypes`, arrow-typed
|
|
9223
|
+
* members like `selectable?: (item: R) => ...` or the adapter's
|
|
9224
|
+
* `fetchData(options: PaginatedFetchOptions<Filters>)` would make a source
|
|
9225
|
+
* declared over a CONCRETE record/filters type unassignable here. Sound in
|
|
9226
|
+
* this context: each source is fully type-checked against its concrete types
|
|
9227
|
+
* where it is declared, and the select only feeds records fetched from that
|
|
9228
|
+
* same source back into these callbacks.
|
|
9229
|
+
*/
|
|
9230
|
+
declare type WithBivariantCallbacks<T> = {
|
|
9231
|
+
[K in keyof T]: [NonNullable<T[K]>] extends [never] ? T[K] : NonNullable<T[K]> extends (...args: infer Args) => infer Return ? {
|
|
9232
|
+
bivariant(...args: Args): Return;
|
|
9233
|
+
}["bivariant"] : T[K];
|
|
9234
|
+
};
|
|
9235
|
+
|
|
9182
9236
|
declare type WithDataTestIdProps = {
|
|
9183
9237
|
dataTestId?: string;
|
|
9184
9238
|
};
|
|
@@ -9274,7 +9328,9 @@ declare module "@tiptap/core" {
|
|
|
9274
9328
|
declare module "@tiptap/core" {
|
|
9275
9329
|
interface Commands<ReturnType> {
|
|
9276
9330
|
enhanceHighlight: {
|
|
9277
|
-
setEnhanceHighlight: (from: number, to: number
|
|
9331
|
+
setEnhanceHighlight: (from: number, to: number, options?: {
|
|
9332
|
+
placeholder?: string;
|
|
9333
|
+
}) => ReturnType;
|
|
9278
9334
|
clearEnhanceHighlight: () => ReturnType;
|
|
9279
9335
|
};
|
|
9280
9336
|
}
|