@factorialco/f0-react 7.22.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.
- package/dist/{ChatPdfThumbnail-qvQdSurw.js → ChatPdfThumbnail-2_8sBW1U.js} +1 -1
- package/dist/{ChatPostComposerDialog-s3q1HVc4.js → ChatPostComposerDialog-BGEl20rM.js} +3 -3
- package/dist/{DocumentToolbar-B3gh97Ay.js → DocumentToolbar-BDDt63-g.js} +2 -2
- package/dist/{DocxViewer-CSS81Mh3.js → DocxViewer-Dt2nHTXV.js} +2 -2
- package/dist/{F0AiProcessingOverlay-D06B5o3I.js → F0AiProcessingOverlay-nojpvoxK.js} +285 -285
- package/dist/{F0CanvasPanel-A9QPf6uH.js → F0CanvasPanel-DnlpQoxW.js} +9046 -9030
- package/dist/F0Map-C7hMGlk_.js +2499 -0
- package/dist/{F0VideoPlayer-BqEMPz3U.js → F0VideoPlayer-DKPfOJBp.js} +79 -79
- package/dist/{MapProvider-DklrZcSf.js → MapProvider-DNpgap--.js} +15668 -15614
- package/dist/{SheetViewer-BtjAYR_w.js → SheetViewer-Wd4Fmg4a.js} +2 -2
- package/dist/{TextViewer-BOPO0hDJ.js → TextViewer-C3OMcE58.js} +2 -2
- package/dist/ai.d.ts +10 -0
- package/dist/ai.js +2 -2
- package/dist/component-status.js +2 -2
- package/dist/{experimental-B8jn4Q2z.js → experimental-DZvuUsDE.js} +11859 -13903
- package/dist/experimental.d.ts +375 -80
- package/dist/experimental.js +291 -284
- package/dist/f0.d.ts +182 -0
- package/dist/f0.js +6005 -6007
- package/dist/i18n-provider-defaults.d.ts +10 -0
- package/dist/i18n-provider-defaults.js +11 -1
- package/dist/index-B1UwLgNv.js +256 -0
- package/dist/index-BUqW79F1.js +4 -0
- package/dist/{index-d7fjuIpD.js → index-CCea6fTM.js} +1 -1
- package/dist/index-eeXQJkem.js +410 -0
- package/dist/{index-C331dySn.js → index-ekx-EJga.js} +31 -31
- package/dist/{pdfWorker-B7y75nkc.js → pdfWorker-CK4gerrz.js} +3 -3
- package/dist/styles.css +1 -1
- package/dist/{tooltip-BElsa4MF.js → tooltip-CrXp1Uaz.js} +2 -2
- package/package.json +1 -1
- package/dist/index-DaBdqaNW.js +0 -4
- package/dist/index-DvEXSMtC.js +0 -255
- /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: {
|
|
@@ -6675,6 +6686,10 @@ declare type DrawerSize = (typeof drawerSizes)[number];
|
|
|
6675
6686
|
|
|
6676
6687
|
declare const drawerSizes: readonly ["md"];
|
|
6677
6688
|
|
|
6689
|
+
declare type DropdownContentVariant = (typeof dropdownContentVariants)[number];
|
|
6690
|
+
|
|
6691
|
+
declare const dropdownContentVariants: readonly ["expanded", "reduced"];
|
|
6692
|
+
|
|
6678
6693
|
export declare type DropdownItem = DropdownItemObject | DropdownItemSeparator | DropdownItemLabel;
|
|
6679
6694
|
|
|
6680
6695
|
declare type DropdownItemLabel = {
|
|
@@ -8999,6 +9014,14 @@ declare type F0ButtonDropdownDropdownProps<T = string> = F0ButtonDropdownBasePro
|
|
|
8999
9014
|
* @param item The item that was clicked.
|
|
9000
9015
|
*/
|
|
9001
9016
|
onClick: (value: T, item: ButtonDropdownItem<T>) => void;
|
|
9017
|
+
/**
|
|
9018
|
+
* Caps the width of the dropdown menu.
|
|
9019
|
+
* - "expanded": (default) sizes to content, same as today.
|
|
9020
|
+
* - "reduced": caps the menu at 300px, e.g. when an item's
|
|
9021
|
+
* `description` is long enough to otherwise stretch the menu.
|
|
9022
|
+
* @default "expanded"
|
|
9023
|
+
*/
|
|
9024
|
+
menuVariant?: DropdownContentVariant;
|
|
9002
9025
|
};
|
|
9003
9026
|
|
|
9004
9027
|
export declare type F0ButtonDropdownProps<T = string> = F0ButtonDropdownSplitProps<T> | F0ButtonDropdownDropdownProps<T>;
|
|
@@ -12456,8 +12479,68 @@ declare type F0LocationSuggestion = {
|
|
|
12456
12479
|
description?: string;
|
|
12457
12480
|
};
|
|
12458
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
|
+
|
|
12459
12515
|
declare type F0MapProvider = "maplibre" | "google";
|
|
12460
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
|
+
|
|
12461
12544
|
export declare type F0Message = {
|
|
12462
12545
|
id: string;
|
|
12463
12546
|
role: "user" | "assistant" | "system" | "tool";
|
|
@@ -16231,12 +16314,111 @@ export declare type LockedSectionNotice = {
|
|
|
16231
16314
|
description: string;
|
|
16232
16315
|
};
|
|
16233
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
|
+
|
|
16234
16319
|
/** A leaf module: the registry and `F0Provider` both need the shape. */
|
|
16235
16320
|
declare interface MapProviderConfig {
|
|
16236
16321
|
/** Required by `google`; `maplibre`'s tiles are keyless. */
|
|
16237
16322
|
apiKey?: string;
|
|
16238
16323
|
}
|
|
16239
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
|
+
|
|
16240
16422
|
/** Margin tokens (spacing + auto for centering) */
|
|
16241
16423
|
export declare type MarginToken = SpacingToken | "auto";
|
|
16242
16424
|
|