@factorialco/f0-react 7.23.0 → 7.24.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 (34) hide show
  1. package/dist/{ChatPdfThumbnail-BBAjTpRO.js → ChatPdfThumbnail-2_8sBW1U.js} +1 -1
  2. package/dist/{ChatPostComposerDialog-CzzBwu4c.js → ChatPostComposerDialog-BGEl20rM.js} +3 -3
  3. package/dist/{DocumentToolbar-CLmAa1CS.js → DocumentToolbar-BDDt63-g.js} +2 -2
  4. package/dist/{DocxViewer-17wM_5Ub.js → DocxViewer-Dt2nHTXV.js} +2 -2
  5. package/dist/{F0AiProcessingOverlay-Crv3v_qi.js → F0AiProcessingOverlay-nojpvoxK.js} +285 -285
  6. package/dist/{F0CanvasPanel-B2aaoYnV.js → F0CanvasPanel-DnlpQoxW.js} +639 -638
  7. package/dist/F0Map-C7hMGlk_.js +2499 -0
  8. package/dist/{F0VideoPlayer-aMaViir7.js → F0VideoPlayer-DKPfOJBp.js} +79 -79
  9. package/dist/{MapProvider-cgH29EcL.js → MapProvider-DNpgap--.js} +8174 -8124
  10. package/dist/{SheetViewer-DRvoh1Ht.js → SheetViewer-Wd4Fmg4a.js} +2 -2
  11. package/dist/{TextViewer-t6wTzXs4.js → TextViewer-C3OMcE58.js} +2 -2
  12. package/dist/ai.d.ts +22 -12
  13. package/dist/ai.js +2 -2
  14. package/dist/component-status.d.ts +12 -12
  15. package/dist/component-status.js +2 -2
  16. package/dist/{experimental-7owBUBms.js → experimental-DZvuUsDE.js} +11859 -13903
  17. package/dist/experimental.d.ts +367 -92
  18. package/dist/experimental.js +291 -284
  19. package/dist/f0.d.ts +182 -12
  20. package/dist/f0.js +6005 -6007
  21. package/dist/i18n-provider-defaults.d.ts +22 -12
  22. package/dist/i18n-provider-defaults.js +11 -1
  23. package/dist/index-B1UwLgNv.js +256 -0
  24. package/dist/index-BUqW79F1.js +4 -0
  25. package/dist/{index-CyVOH26Y.js → index-CCea6fTM.js} +1 -1
  26. package/dist/index-eeXQJkem.js +410 -0
  27. package/dist/{index-zELO6ifF.js → index-ekx-EJga.js} +31 -31
  28. package/dist/{pdfWorker-tk-Ol5j0.js → pdfWorker-CK4gerrz.js} +3 -3
  29. package/dist/styles.css +1 -1
  30. package/dist/{tooltip-BElsa4MF.js → tooltip-CrXp1Uaz.js} +2 -2
  31. package/package.json +1 -1
  32. package/dist/index-C2NRpdhB.js +0 -4
  33. package/dist/index-DnEPnn6A.js +0 -255
  34. /package/dist/{experimental.css → maplibre-gl.css} +0 -0
package/dist/f0.d.ts CHANGED
@@ -3563,6 +3563,7 @@ declare type CollectionVisualizations<Record extends RecordType, Filters extends
3563
3563
  card: VisualizacionTypeDefinition<CardCollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>>;
3564
3564
  kanban: VisualizacionTypeDefinition<KanbanCollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>>;
3565
3565
  graph: VisualizacionTypeDefinition<GraphCollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>, GraphVisualizationSettings>;
3566
+ map: VisualizacionTypeDefinition<MapCollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>>;
3566
3567
  };
3567
3568
 
3568
3569
  declare const collectionVisualizations: CollectionVisualizations<RecordType, FiltersDefinition, SortingsDefinition, SummariesDefinition, ItemActionsDefinition<RecordType>, NavigationFiltersDefinition, GroupingDefinition<RecordType>>;
@@ -5378,6 +5379,7 @@ export declare const defaultTranslations: {
5378
5379
  readonly list: "List";
5379
5380
  readonly kanban: "Kanban";
5380
5381
  readonly graph: "Graph";
5382
+ readonly map: "Map";
5381
5383
  readonly pagination: {
5382
5384
  readonly of: "of";
5383
5385
  };
@@ -5385,6 +5387,11 @@ export declare const defaultTranslations: {
5385
5387
  readonly reset: "Reset to default";
5386
5388
  readonly viewSelectorLabel: "Select view";
5387
5389
  };
5390
+ readonly map: {
5391
+ readonly notOnMap: "Not on map";
5392
+ readonly onMap: "On map";
5393
+ readonly notOnMapCount: "{{count}} not on map";
5394
+ };
5388
5395
  readonly table: {
5389
5396
  readonly seeMoreChildren: "See more";
5390
5397
  readonly settings: {
@@ -6277,11 +6284,15 @@ export declare const defaultTranslations: {
6277
6284
  readonly loadError: "Couldn't load the map.";
6278
6285
  readonly retry: "Retry";
6279
6286
  readonly currentLocation: "Your location";
6287
+ readonly panel: "Map panel";
6288
+ readonly detailPanel: "Map detail panel";
6280
6289
  readonly controls: {
6281
6290
  readonly zoomIn: "Zoom in";
6282
6291
  readonly zoomOut: "Zoom out";
6283
6292
  readonly fit: "Fit to markers";
6284
6293
  readonly locate: "My location";
6294
+ readonly showPanel: "Show panel";
6295
+ readonly hidePanel: "Hide panel";
6285
6296
  };
6286
6297
  };
6287
6298
  readonly wizard: {
@@ -12468,8 +12479,68 @@ declare type F0LocationSuggestion = {
12468
12479
  description?: string;
12469
12480
  };
12470
12481
 
12482
+ /**
12483
+ * The data each semantic variant needs. Appearance is fixed by the variant:
12484
+ * - `default`: a plain pin, no icon or avatar (the generic marker).
12485
+ * - `workplace`: a building glyph on a fixed brand hue (all sites match).
12486
+ * - `employee` / `company`: an avatar whose color is its own identity color
12487
+ * (grey when a photo replaces the colored chip).
12488
+ * - `stop`: a route stop - a single letter (A, B, C...) on the same fixed
12489
+ * hue as the route/arc lines it punctuates.
12490
+ */
12491
+ declare type F0MapMarkerVariantProps = {
12492
+ variant: "default";
12493
+ } | {
12494
+ variant: "workplace";
12495
+ } | {
12496
+ variant: "employee";
12497
+ firstName: string;
12498
+ lastName: string;
12499
+ src?: string;
12500
+ } | {
12501
+ variant: "company";
12502
+ name: string;
12503
+ src?: string;
12504
+ } | {
12505
+ variant: "stop";
12506
+ letter: string;
12507
+ };
12508
+
12509
+ /**
12510
+ * Map projection. `"globe"` renders the world as a 3D sphere (adaptive: it
12511
+ * eases into a flat mercator view as you zoom in).
12512
+ */
12513
+ declare type F0MapProjection = "mercator" | "globe";
12514
+
12471
12515
  declare type F0MapProvider = "maplibre" | "google";
12472
12516
 
12517
+ /** Initial camera position for the map. */
12518
+ declare interface F0MapViewport {
12519
+ /** `[longitude, latitude]`. */
12520
+ center: [number, number];
12521
+ /** Zoom level (`0` world, higher = closer). Defaults to a city-level view. */
12522
+ zoom?: number;
12523
+ }
12524
+
12525
+ /**
12526
+ * Region of the map (in screen px) covered by external chrome - typically a
12527
+ * side panel the consumer opens over it. Every camera move (fit, focus, reveal)
12528
+ * shifts its target so the point lands centred in the *free* area beside the
12529
+ * panel instead of behind it. The side is encoded by which key is set: a
12530
+ * right-hand panel sets `right`, a left-hand one or RTL sets `left`.
12531
+ *
12532
+ * The consumer supplies the value - `F0Map` has no notion of the panel. For a
12533
+ * fixed-width drawer pass its width while it is open (e.g. `{ right: 480 }`)
12534
+ * and `undefined` / `{}` while it is closed. Omitted or `0` on every side
12535
+ * behaves exactly as if there were no inset.
12536
+ */
12537
+ declare interface F0MapViewportInset {
12538
+ top?: number;
12539
+ right?: number;
12540
+ bottom?: number;
12541
+ left?: number;
12542
+ }
12543
+
12473
12544
  export declare type F0Message = {
12474
12545
  id: string;
12475
12546
  role: "user" | "assistant" | "system" | "tool";
@@ -16243,12 +16314,111 @@ export declare type LockedSectionNotice = {
16243
16314
  description: string;
16244
16315
  };
16245
16316
 
16317
+ declare type MapCollectionProps<Record extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>> = CollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping, MapVisualizationOptions<Record, Filters, Sortings>>;
16318
+
16246
16319
  /** A leaf module: the registry and `F0Provider` both need the shape. */
16247
16320
  declare interface MapProviderConfig {
16248
16321
  /** Required by `google`; `maplibre`'s tiles are keyless. */
16249
16322
  apiKey?: string;
16250
16323
  }
16251
16324
 
16325
+ /** Selection handles handed to the panels, so their content can drive the map. */
16326
+ declare type MapSidebarApi<R extends RecordType> = {
16327
+ /** Select a record (or clear with `null`), flying to its marker if it has one. */
16328
+ select: (record: R | null) => void;
16329
+ selectedRecordId: string | null;
16330
+ /**
16331
+ * What the map did with a record: `"placed"`, `"unplaced"` (no reason
16332
+ * given), or the `MapUnplaced` kind. Per record, so it also answers in the
16333
+ * search's flat list.
16334
+ */
16335
+ placement: (record: R) => "placed" | "unplaced" | MapUnplaced["kind"];
16336
+ };
16337
+
16338
+ /**
16339
+ * Why a record has no position, returned from `coordinates` instead of one.
16340
+ * `incomplete`: it should have a location and doesn't (an unfilled or
16341
+ * ungeocodable address) - the case somebody can fix.
16342
+ */
16343
+ declare type MapUnplaced = {
16344
+ kind: "incomplete";
16345
+ };
16346
+
16347
+ /**
16348
+ * Options for the map visualization: records projected onto coordinates. Only
16349
+ * reading a record's position is required; how markers look and behave is
16350
+ * `F0Map`'s concern.
16351
+ */
16352
+ declare type MapVisualizationOptions<R extends RecordType, _Filters extends FiltersDefinition, _Sortings extends SortingsDefinition> = {
16353
+ /**
16354
+ * A record's `[longitude, latitude]`. `null` or a `MapUnplaced` draws no
16355
+ * marker, and the record is listed under "Not on map" instead. No geocoding
16356
+ * happens here: resolve coordinates server-side.
16357
+ */
16358
+ coordinates: (record: R) => [number, number] | null | MapUnplaced;
16359
+ /** Label beside the marker. Omitted means an unlabelled pin. */
16360
+ label?: (record: R) => string;
16361
+ /** Marker variant per record. Defaults to `default`. */
16362
+ marker?: (record: R) => F0MapMarkerVariantProps;
16363
+ /** A record's id. Defaults to `String(record.id)`, like the graph view. */
16364
+ getRecordId?: (record: R) => string;
16365
+ /**
16366
+ * Controlled selection, `null` for none. Pass it whenever something outside
16367
+ * the map can end the selection, like closing the panel `onSelect` opened.
16368
+ */
16369
+ selectedRecordId?: string | null;
16370
+ /**
16371
+ * Fired when the selection changes: a marker click, a reveal, a panel row,
16372
+ * or `null` when it clears. If it opens your own chrome over the map, report
16373
+ * the region it covers through `viewportInset`.
16374
+ */
16375
+ onSelect?: (record: R | null) => void;
16376
+ /**
16377
+ * Flies to a record and selects it, e.g. from an external search. Pair it
16378
+ * with the collection's `searchSelectionNonce` so a repeat pick flies again.
16379
+ */
16380
+ revealRecordId?: string | null;
16381
+ /** Region covered by your own chrome. The map's own panels are folded in. */
16382
+ viewportInset?: F0MapViewportInset;
16383
+ /** Initial camera. Defaults to framing every marker. */
16384
+ initialViewport?: F0MapViewport;
16385
+ /** Show the navigation controls (locate / fit / zoom). Defaults to `true`. */
16386
+ showControls?: boolean;
16387
+ /** Fired with the side panel's new open state. */
16388
+ onSidebarToggle?: (expanded: boolean) => void;
16389
+ /** Map projection. Defaults to `"mercator"`. */
16390
+ projection?: F0MapProjection;
16391
+ /**
16392
+ * Rendering engine. Defaults to the one the app sets on `F0Provider`, so a
16393
+ * product that configures Google gets it here too; set it only to override
16394
+ * that for this view.
16395
+ */
16396
+ provider?: F0MapProvider;
16397
+ /**
16398
+ * Records to request in the one page the map loads, capped at the map's
16399
+ * recommended marker ceiling.
16400
+ */
16401
+ markerLimit?: number;
16402
+ /** Accessible label for the map region. */
16403
+ ariaLabel?: string;
16404
+ /**
16405
+ * Rows of the side panel, for the records of one section ("Not on map",
16406
+ * then "On map") or for the matches of the panel's search. They are the
16407
+ * records the map is drawing, from the same load. Return rows only: the
16408
+ * panel owns the scrolling. `select` drives the same selection a marker
16409
+ * click does.
16410
+ */
16411
+ sidebar?: (records: R[], api: MapSidebarApi<R>) => ReactNode;
16412
+ /**
16413
+ * Text the panel's search matches a record against. Given it, the panel's
16414
+ * header offers a search over the records the panel holds; the toolbar's
16415
+ * search still narrows the whole view.
16416
+ */
16417
+ sidebarSearchText?: (record: R) => string;
16418
+ /** Detail panel for the selected record, beside the side panel. */
16419
+ detail?: (record: R, api: MapSidebarApi<R>) => ReactNode;
16420
+ };
16421
+
16252
16422
  /** Margin tokens (spacing + auto for centering) */
16253
16423
  export declare type MarginToken = SpacingToken | "auto";
16254
16424
 
@@ -21493,16 +21663,6 @@ declare module "@tiptap/core" {
21493
21663
  }
21494
21664
 
21495
21665
 
21496
- declare module "@tiptap/core" {
21497
- interface Commands<ReturnType> {
21498
- fontSize: {
21499
- setFontSize: (fontSize: string) => ReturnType;
21500
- unsetFontSize: () => ReturnType;
21501
- };
21502
- }
21503
- }
21504
-
21505
-
21506
21666
  declare module "@tiptap/core" {
21507
21667
  interface Commands<ReturnType> {
21508
21668
  enhanceHighlight: {
@@ -21517,8 +21677,9 @@ declare module "@tiptap/core" {
21517
21677
 
21518
21678
  declare module "@tiptap/core" {
21519
21679
  interface Commands<ReturnType> {
21520
- moodTracker: {
21521
- insertMoodTracker: (data: MoodTrackerData) => ReturnType;
21680
+ fontSize: {
21681
+ setFontSize: (fontSize: string) => ReturnType;
21682
+ unsetFontSize: () => ReturnType;
21522
21683
  };
21523
21684
  }
21524
21685
  }
@@ -21535,6 +21696,15 @@ declare module "@tiptap/core" {
21535
21696
  }
21536
21697
 
21537
21698
 
21699
+ declare module "@tiptap/core" {
21700
+ interface Commands<ReturnType> {
21701
+ moodTracker: {
21702
+ insertMoodTracker: (data: MoodTrackerData) => ReturnType;
21703
+ };
21704
+ }
21705
+ }
21706
+
21707
+
21538
21708
  declare module "@tiptap/core" {
21539
21709
  interface Commands<ReturnType> {
21540
21710
  transcript: {