@factorialco/f0-react 1.481.1 → 2.0.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/ai.d.ts +307 -36
- package/dist/ai.js +45 -31
- package/dist/experimental.d.ts +69 -5
- package/dist/experimental.js +109 -109
- package/dist/f0.d.ts +546 -39
- package/dist/f0.js +3431 -3095
- package/dist/i18n-provider-defaults.d.ts +5 -5
- package/dist/{index-CFZgQgvw.js → index-KOI_379G.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/types-CwpBoipC.js +66371 -0
- package/dist/{F0AiChat-BkT2gIR8.js → useDataCollectionSource-DkUx3lCB.js} +135971 -216956
- package/dist/{F0AiChat.css → useDataCollectionSource.css} +1 -1
- package/dist/xlsx-Bedf3nwD.js +15557 -0
- package/package.json +1 -1
- package/dist/types-B9UK4dHQ.js +0 -2354
package/dist/experimental.d.ts
CHANGED
|
@@ -522,6 +522,14 @@ declare type AiChatProviderProps = {
|
|
|
522
522
|
* Provides save/create functions for persisting canvas entities externally.
|
|
523
523
|
*/
|
|
524
524
|
canvasActions?: CanvasActions;
|
|
525
|
+
/**
|
|
526
|
+
* Canvas entity definitions keyed by `CanvasContent["type"]`. The canvas
|
|
527
|
+
* panel looks up the matching definition when `openCanvas` is called.
|
|
528
|
+
*
|
|
529
|
+
* F0AiChat ships without built-in canvas entities; the host app supplies
|
|
530
|
+
* them here so canvas logic lives in one place.
|
|
531
|
+
*/
|
|
532
|
+
canvasEntities?: Record<string, CanvasEntityDefinition>;
|
|
525
533
|
/**
|
|
526
534
|
* Available tool hints that the user can activate to provide intent context
|
|
527
535
|
* to the AI. Renders a selector button next to the send button.
|
|
@@ -1387,6 +1395,57 @@ declare type CanvasActions = {
|
|
|
1387
1395
|
dashboard?: DashboardCanvasActions;
|
|
1388
1396
|
};
|
|
1389
1397
|
|
|
1398
|
+
/**
|
|
1399
|
+
* Base shape shared by all canvas content types.
|
|
1400
|
+
* Every entity adds its own fields on top of this.
|
|
1401
|
+
*/
|
|
1402
|
+
declare type CanvasContentBase = {
|
|
1403
|
+
type: string;
|
|
1404
|
+
title: string;
|
|
1405
|
+
description?: string;
|
|
1406
|
+
toolCallId?: string;
|
|
1407
|
+
};
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* Contract for a canvas entity type.
|
|
1411
|
+
*
|
|
1412
|
+
* Each entity (dashboard, survey, goal, job-posting…) implements this
|
|
1413
|
+
* interface and is added to the `canvasEntities` record in `registry.ts`.
|
|
1414
|
+
*
|
|
1415
|
+
* To add a new entity type:
|
|
1416
|
+
* 1. Create a folder in `canvas/entities/<your-entity>/`
|
|
1417
|
+
* 2. Define a type extending `CanvasContentBase` in `types.ts`
|
|
1418
|
+
* 3. Implement and export `CanvasEntityDefinition` in `index.tsx`
|
|
1419
|
+
* 4. Add the entity to the record in `canvas/registry.ts`
|
|
1420
|
+
*/
|
|
1421
|
+
declare type CanvasEntityDefinition<T extends CanvasContentBase = CanvasContentBase> = {
|
|
1422
|
+
/** Must match the `type` discriminant on the content object */
|
|
1423
|
+
type: T["type"];
|
|
1424
|
+
/** Renders the main body of the canvas panel */
|
|
1425
|
+
renderContent: (props: {
|
|
1426
|
+
content: T;
|
|
1427
|
+
refreshKey: number;
|
|
1428
|
+
}) => ReactNode;
|
|
1429
|
+
/** Renders the full header (title, actions, close button) */
|
|
1430
|
+
renderHeader: (props: {
|
|
1431
|
+
content: T;
|
|
1432
|
+
onClose: () => void;
|
|
1433
|
+
}) => ReactNode;
|
|
1434
|
+
/**
|
|
1435
|
+
* Optional wrapper providing entity-scoped context around
|
|
1436
|
+
* both header and body (e.g. shared edit-mode state).
|
|
1437
|
+
*/
|
|
1438
|
+
wrapper?: (props: {
|
|
1439
|
+
content: T;
|
|
1440
|
+
children: ReactNode;
|
|
1441
|
+
}) => ReactNode;
|
|
1442
|
+
/**
|
|
1443
|
+
* When true the content area uses `overflow-hidden` instead of
|
|
1444
|
+
* `overflow-auto`, letting the entity manage its own scrolling.
|
|
1445
|
+
*/
|
|
1446
|
+
overflowHidden?: boolean;
|
|
1447
|
+
};
|
|
1448
|
+
|
|
1390
1449
|
declare type CardAvatarVariant = AvatarVariant | {
|
|
1391
1450
|
type: "emoji";
|
|
1392
1451
|
emoji: string;
|
|
@@ -7272,6 +7331,11 @@ declare type TableVisualizationOptions<R extends RecordType, _Filters extends Fi
|
|
|
7272
7331
|
* definitions, values are the display labels rendered in the spanning header row.
|
|
7273
7332
|
*/
|
|
7274
7333
|
headerGroupLabels?: Record<string, string>;
|
|
7334
|
+
/**
|
|
7335
|
+
* Wraps the table in a rounded border container.
|
|
7336
|
+
* Useful for embedding the table inside panels or detail views.
|
|
7337
|
+
*/
|
|
7338
|
+
bordered?: boolean;
|
|
7275
7339
|
};
|
|
7276
7340
|
|
|
7277
7341
|
declare type TableVisualizationSettings = {
|
|
@@ -8113,11 +8177,6 @@ declare module "gridstack" {
|
|
|
8113
8177
|
}
|
|
8114
8178
|
|
|
8115
8179
|
|
|
8116
|
-
declare namespace Calendar {
|
|
8117
|
-
var displayName: string;
|
|
8118
|
-
}
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
8180
|
declare module "@tiptap/core" {
|
|
8122
8181
|
interface Commands<ReturnType> {
|
|
8123
8182
|
aiBlock: {
|
|
@@ -8165,3 +8224,8 @@ declare module "@tiptap/core" {
|
|
|
8165
8224
|
};
|
|
8166
8225
|
}
|
|
8167
8226
|
}
|
|
8227
|
+
|
|
8228
|
+
|
|
8229
|
+
declare namespace Calendar {
|
|
8230
|
+
var displayName: string;
|
|
8231
|
+
}
|