@factorialco/f0-react 3.0.0 → 3.0.1
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-nz2dQz9Z.js} +17668 -17618
- package/dist/ai.d.ts +6 -6
- package/dist/ai.js +2 -2
- package/dist/experimental.d.ts +53 -25
- package/dist/experimental.js +1184 -1162
- package/dist/f0.d.ts +18 -6
- package/dist/f0.js +1304 -1303
- package/dist/i18n-provider-defaults.d.ts +6 -6
- package/dist/{useChatHistory-BphMZrVl.js → useChatHistory-DceLgsyD.js} +1 -1
- package/dist/{useDataCollectionSource-SH2WbTKC.js → useDataCollectionSource-DhEZxBan.js} +3241 -3256
- package/package.json +1 -1
package/dist/ai.d.ts
CHANGED
|
@@ -4696,9 +4696,9 @@ declare namespace Calendar {
|
|
|
4696
4696
|
|
|
4697
4697
|
declare module "@tiptap/core" {
|
|
4698
4698
|
interface Commands<ReturnType> {
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4699
|
+
enhanceHighlight: {
|
|
4700
|
+
setEnhanceHighlight: (from: number, to: number) => ReturnType;
|
|
4701
|
+
clearEnhanceHighlight: () => ReturnType;
|
|
4702
4702
|
};
|
|
4703
4703
|
}
|
|
4704
4704
|
}
|
|
@@ -4706,9 +4706,9 @@ declare module "@tiptap/core" {
|
|
|
4706
4706
|
|
|
4707
4707
|
declare module "@tiptap/core" {
|
|
4708
4708
|
interface Commands<ReturnType> {
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4709
|
+
aiBlock: {
|
|
4710
|
+
insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
|
|
4711
|
+
executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
|
|
4712
4712
|
};
|
|
4713
4713
|
}
|
|
4714
4714
|
}
|
package/dist/ai.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as e, F as r, a as t, e as o, f as i, c as n, d as F, I as C, P as A, b as l, u as d } from "./F0CanvasPanel-
|
|
1
|
+
import { D as e, F as r, a as t, e as o, f as i, c as n, d as F, I as C, P as A, b as l, u as d } from "./F0CanvasPanel-nz2dQz9Z.js";
|
|
2
2
|
import { defaultTranslations as m } from "./i18n-provider-defaults.js";
|
|
3
|
-
import { A as c, C as I, h as P, t as v, v as f, x as p, n as T, j as g, r as y, y as S, q as x, s as H, k as V, e as b, g as k, l as w, F as M, i as O, a as D, p as j, m as q, o as z, b as B, f as E, w as L, c as R, d as G, u as J } from "./useChatHistory-
|
|
3
|
+
import { A as c, C as I, h as P, t as v, v as f, x as p, n as T, j as g, r as y, y as S, q as x, s as H, k as V, e as b, g as k, l as w, F as M, i as O, a as D, p as j, m as q, o as z, b as B, f as E, w as L, c as R, d as G, u as J } from "./useChatHistory-DceLgsyD.js";
|
|
4
4
|
export {
|
|
5
5
|
c as AiChatTranslationsProvider,
|
|
6
6
|
I as ChatSpinner,
|
package/dist/experimental.d.ts
CHANGED
|
@@ -1124,19 +1124,6 @@ declare type BreadcrumbBaseItemType = NavigationItem & {
|
|
|
1124
1124
|
label: string;
|
|
1125
1125
|
};
|
|
1126
1126
|
|
|
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
1127
|
export declare type BreadcrumbCollectionSelectItemType = BreadcrumbBaseItemType & {
|
|
1141
1128
|
type: "collection-select";
|
|
1142
1129
|
/**
|
|
@@ -1146,8 +1133,9 @@ export declare type BreadcrumbCollectionSelectItemType = BreadcrumbBaseItemType
|
|
|
1146
1133
|
*/
|
|
1147
1134
|
collectionId: string;
|
|
1148
1135
|
/** The declared data source — no mounted collection needed. */
|
|
1149
|
-
source:
|
|
1150
|
-
|
|
1136
|
+
source: CollectionSelectSourceDefinition;
|
|
1137
|
+
/** Method syntax on purpose: bivariant, so concrete-record mappers fit. */
|
|
1138
|
+
mapOptions(item: RecordType): F0SelectItemProps<string, RecordType>;
|
|
1151
1139
|
/** Current item id (the record the detail page is showing). */
|
|
1152
1140
|
value?: string;
|
|
1153
1141
|
/**
|
|
@@ -1180,14 +1168,15 @@ export declare type BreadcrumbCollectionSelectItemType = BreadcrumbBaseItemType
|
|
|
1180
1168
|
} & ({
|
|
1181
1169
|
/**
|
|
1182
1170
|
* Href to navigate to when an option is picked, routed through the
|
|
1183
|
-
* app's LinkProvider. Return undefined to skip navigation.
|
|
1171
|
+
* app's LinkProvider. Return undefined to skip navigation. Method
|
|
1172
|
+
* syntax on purpose: bivariant, so concrete-record callbacks fit.
|
|
1184
1173
|
*/
|
|
1185
|
-
getItemHref
|
|
1186
|
-
onSelect
|
|
1174
|
+
getItemHref(value: string, item?: RecordType): string | undefined;
|
|
1175
|
+
onSelect?(value: string, item?: RecordType): void;
|
|
1187
1176
|
} | {
|
|
1188
1177
|
getItemHref?: never;
|
|
1189
1178
|
/** Imperative escape hatch (e.g. router.push) when hrefs don't fit. */
|
|
1190
|
-
onSelect
|
|
1179
|
+
onSelect(value: string, item?: RecordType): void;
|
|
1191
1180
|
});
|
|
1192
1181
|
|
|
1193
1182
|
export declare type BreadcrumbItemType = BreadcrumbLoadingItemType | BreadcrumbNavItemType | BreadcrumbSelectItemType | BreadcrumbCollectionSelectItemType;
|
|
@@ -2202,6 +2191,15 @@ export declare type CollectionProps<Record extends RecordType, Filters extends F
|
|
|
2202
2191
|
fromVisualization?: TableVisualizationType;
|
|
2203
2192
|
} & VisualizationOptions;
|
|
2204
2193
|
|
|
2194
|
+
/**
|
|
2195
|
+
* The record-erased source a collection-select breadcrumb accepts: a
|
|
2196
|
+
* `DataSourceDefinition` whose callbacks (and data adapter) tolerate sources
|
|
2197
|
+
* declared over concrete record/filter types.
|
|
2198
|
+
*/
|
|
2199
|
+
export declare type CollectionSelectSourceDefinition = WithBivariantCallbacks<Omit<DataSourceDefinition<RecordType, FiltersDefinition, SortingsDefinition, GroupingDefinition<RecordType>>, "dataAdapter">> & {
|
|
2200
|
+
dataAdapter: WithBivariantCallbacks<DataAdapter<RecordType, FiltersDefinition>>;
|
|
2201
|
+
};
|
|
2202
|
+
|
|
2205
2203
|
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
2204
|
table: VisualizacionTypeDefinition<TableCollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>, TableVisualizationSettings>;
|
|
2207
2205
|
editableTable: VisualizacionTypeDefinition<EditableTableCollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>, EditableTableVisualizationSettings>;
|
|
@@ -9179,6 +9177,36 @@ declare interface WiggleOptions {
|
|
|
9179
9177
|
errorHighlight?: boolean;
|
|
9180
9178
|
}
|
|
9181
9179
|
|
|
9180
|
+
/**
|
|
9181
|
+
* A breadcrumb "jump-to" select bound to a OneDataCollection: the options are
|
|
9182
|
+
* fetched from the declared `source`, seeded with the filters/sortings the
|
|
9183
|
+
* list persisted under `collectionId` — so on the detail page (even via a
|
|
9184
|
+
* direct link, with the list never mounted) the select only shows the items
|
|
9185
|
+
* the user was looking at on the list.
|
|
9186
|
+
*
|
|
9187
|
+
* F0 owns the seeding, pagination handling (a `pages` adapter is transparently
|
|
9188
|
+
* consumed as infinite scroll), current selection, navigation, and
|
|
9189
|
+
* loop-safety: `source` is captured when the crumb mounts, so inline-recreated
|
|
9190
|
+
* item objects never retrigger fetches. Give the item a new `id` to swap
|
|
9191
|
+
* sources.
|
|
9192
|
+
*/
|
|
9193
|
+
/**
|
|
9194
|
+
* Rewraps every function-valued member of `T` so its parameters are checked
|
|
9195
|
+
* BIVARIANTLY (the method-syntax trick). The breadcrumb item union is
|
|
9196
|
+
* record-erased (`RecordType`); under `strictFunctionTypes`, arrow-typed
|
|
9197
|
+
* members like `selectable?: (item: R) => ...` or the adapter's
|
|
9198
|
+
* `fetchData(options: PaginatedFetchOptions<Filters>)` would make a source
|
|
9199
|
+
* declared over a CONCRETE record/filters type unassignable here. Sound in
|
|
9200
|
+
* this context: each source is fully type-checked against its concrete types
|
|
9201
|
+
* where it is declared, and the select only feeds records fetched from that
|
|
9202
|
+
* same source back into these callbacks.
|
|
9203
|
+
*/
|
|
9204
|
+
declare type WithBivariantCallbacks<T> = {
|
|
9205
|
+
[K in keyof T]: [NonNullable<T[K]>] extends [never] ? T[K] : NonNullable<T[K]> extends (...args: infer Args) => infer Return ? {
|
|
9206
|
+
bivariant(...args: Args): Return;
|
|
9207
|
+
}["bivariant"] : T[K];
|
|
9208
|
+
};
|
|
9209
|
+
|
|
9182
9210
|
declare type WithDataTestIdProps = {
|
|
9183
9211
|
dataTestId?: string;
|
|
9184
9212
|
};
|
|
@@ -9263,9 +9291,9 @@ declare namespace Calendar {
|
|
|
9263
9291
|
|
|
9264
9292
|
declare module "@tiptap/core" {
|
|
9265
9293
|
interface Commands<ReturnType> {
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
|
|
9294
|
+
enhanceHighlight: {
|
|
9295
|
+
setEnhanceHighlight: (from: number, to: number) => ReturnType;
|
|
9296
|
+
clearEnhanceHighlight: () => ReturnType;
|
|
9269
9297
|
};
|
|
9270
9298
|
}
|
|
9271
9299
|
}
|
|
@@ -9273,9 +9301,9 @@ declare module "@tiptap/core" {
|
|
|
9273
9301
|
|
|
9274
9302
|
declare module "@tiptap/core" {
|
|
9275
9303
|
interface Commands<ReturnType> {
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9304
|
+
aiBlock: {
|
|
9305
|
+
insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
|
|
9306
|
+
executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
|
|
9279
9307
|
};
|
|
9280
9308
|
}
|
|
9281
9309
|
}
|