@factorialco/f0-react 12.13.0 → 12.14.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/{ArchiveThumbnail-BZgITTo2.js → ArchiveThumbnail-CgaNJ6v9.js} +4 -4
- package/dist/{ArchiveViewer-BHu224N3.js → ArchiveViewer-Uohl6wf1.js} +2 -2
- package/dist/{ChatPostComposerDialog-CsxxDqxh.js → ChatPostComposerDialog-Cr6Ci2dz.js} +2 -2
- package/dist/{CoachmarkProvider-9PVhiN-N.js → CoachmarkProvider-Cfb6WvLp.js} +22331 -22330
- package/dist/{CodeThumbnail-ChpXV1S-.js → CodeThumbnail-CFNKh12S.js} +1 -1
- package/dist/{CodeViewer-BKw04W0G.js → CodeViewer-C4XxNdq4.js} +5 -5
- package/dist/{DocumentToolbar-mB3bK8uS.js → DocumentToolbar-CcEggNyX.js} +1 -1
- package/dist/{DocxViewer-Dr8WXU1s.js → DocxViewer-DIiFGMl7.js} +1 -1
- package/dist/Ellipsis-CBouJQYY.js +34 -0
- package/dist/{F0AiProcessingOverlay-BUynKfyI.js → F0AiProcessingOverlay-wFS85Arm.js} +1396 -1342
- package/dist/{F0Alert-ALRcL0Af.js → F0Alert-DRK5Na7T.js} +1 -1
- package/dist/F0AudioPlayer-Ds4txTh4.js +2 -0
- package/dist/{F0CanvasPanel-D1QmpvzX.js → F0CanvasPanel-CbJxX6Qv.js} +8632 -7464
- package/dist/{F0DocumentViewer-CEuF9b_u.js → F0DocumentViewer-B2_6INMo.js} +1 -1
- package/dist/{F0DocumentViewer-ChCqzIK3.js → F0DocumentViewer-B6ccmcTZ.js} +2 -2
- package/dist/{F0Map-CWhV5A03.js → F0Map-BkrkSniz.js} +16 -16
- package/dist/F0Text-CXHuzMbj.js +14 -0
- package/dist/F0VideoPlayer-5bnm6ryg.js +1 -0
- package/dist/{F0VideoPlayer-wTc25_qN.js → F0VideoPlayer-BkRdc58E.js} +303 -303
- package/dist/{HtmlViewer-Uxb8n2vn.js → HtmlViewer-qkAWMkJy.js} +3 -3
- package/dist/{Map-95w5slTZ.js → Map-CZcZoNEa.js} +29 -28
- package/dist/{PdfThumbnail-BYrhsyMw.js → PdfThumbnail-RTw1aKm_.js} +1 -1
- package/dist/{PdfViewer-DUxhQr-O.js → PdfViewer-m56GqoJt.js} +2 -2
- package/dist/{SheetViewer-C9Rbh_xJ.js → SheetViewer-C80n4nta.js} +2 -2
- package/dist/{TextViewer-DP9lYxAB.js → TextViewer-BINEouL8.js} +1 -1
- package/dist/ai.d.ts +2 -2
- package/dist/ai.js +3 -3
- package/dist/component-status.js +1 -1
- package/dist/experimental.d.ts +2 -2
- package/dist/experimental.js +5072 -5152
- package/dist/{exports-cxvNeHfV.d.ts → exports-BGemf1WM.d.ts} +13 -11
- package/dist/f0.d.ts +6 -6
- package/dist/f0.js +382 -381
- package/dist/{highlight-Bjt-wXg6.js → highlight-BNASV9vz.js} +6 -6
- package/dist/{index-DF8ubeg6.d.ts → index-BkCnaiJG.d.ts} +326 -10
- package/dist/localized-CnKvEJya.js +73 -0
- package/dist/{maplibre-tJ3UolSF.js → maplibre-DTAAiC-N.js} +1 -1
- package/dist/{pdfWorker-BBnYtb1A.js → pdfWorker-D16_euGm.js} +1 -1
- package/dist/{types-oJKIDe-E.d.ts → types-C2gKTwyT.d.ts} +2 -300
- package/package.json +1 -1
- package/dist/F0AudioPlayer-Cd9nIQX5.js +0 -2
- package/dist/F0AudioPlayer-vRJmmSpp.js +0 -1175
- package/dist/F0VideoPlayer-DUw-DouS.js +0 -1
- package/dist/localized-BrUgGMzm.js +0 -46
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dt as e, Et as t, vt as n } from "./F0CanvasPanel-CbJxX6Qv.js";
|
|
2
2
|
import { t as r } from "./purify.es-ZpfdAuNV.js";
|
|
3
3
|
import { t as i } from "./ownValue-D4uSXt0d.js";
|
|
4
4
|
//#region src/addons/documents/lib/codeLanguages.ts
|
|
@@ -14,12 +14,12 @@ var a = {
|
|
|
14
14
|
xhtml: "xml",
|
|
15
15
|
svg: "xml",
|
|
16
16
|
env: "bash"
|
|
17
|
-
}, o = (
|
|
18
|
-
let n =
|
|
19
|
-
return n ? o(n) ? n : i(
|
|
17
|
+
}, o = (t) => e.includes(t), s = (e) => {
|
|
18
|
+
let n = e?.trim().toLowerCase();
|
|
19
|
+
return n ? o(n) ? n : i(t, n) ?? i(a, n) ?? null : null;
|
|
20
20
|
}, c = (e) => {
|
|
21
|
-
let
|
|
22
|
-
return
|
|
21
|
+
let t = e?.split(/[\\/]/).pop()?.trim();
|
|
22
|
+
return t ? n({ name: t }) : null;
|
|
23
23
|
}, l = {
|
|
24
24
|
bash: () => import("./bash-BcZBmoDA.js"),
|
|
25
25
|
c: () => import("./c-Dv-5_kUQ.js"),
|
|
@@ -4,6 +4,8 @@ import React$1, { AnchorHTMLAttributes, ComponentProps, ComponentType, FC, Forwa
|
|
|
4
4
|
import { VariantProps } from "cva";
|
|
5
5
|
import { baseColors } from "@factorialco/f0-core";
|
|
6
6
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
7
|
+
import "react-pdf";
|
|
8
|
+
import { PDFDocumentProxy } from "pdfjs-dist";
|
|
7
9
|
import { TooltipPopupProps, TooltipPositionerProps } from "@base-ui/react/tooltip";
|
|
8
10
|
//#region src/elements/lib/data-testid/data-testid.d.ts
|
|
9
11
|
interface WithDataTestIdProps {
|
|
@@ -1082,6 +1084,310 @@ interface DashboardCanvasActions {
|
|
|
1082
1084
|
getMetadata?: (id: string) => Promise<DashboardMetadata | void>;
|
|
1083
1085
|
}
|
|
1084
1086
|
//#endregion
|
|
1087
|
+
//#region src/elements/lib/global.types.d.ts
|
|
1088
|
+
interface DataAttributes {
|
|
1089
|
+
[key: `data-${string}`]: string | undefined;
|
|
1090
|
+
}
|
|
1091
|
+
//#endregion
|
|
1092
|
+
//#region src/addons/documents/F0DocumentViewer/types.d.ts
|
|
1093
|
+
declare const pdfScales: readonly ["page-width", "page-fit", "0.5", "0.75", "1", "1.25", "1.5", "2", "3", "4"];
|
|
1094
|
+
type F0PdfScale = (typeof pdfScales)[number];
|
|
1095
|
+
type F0PdfRotation = 0 | 90 | 180 | 270;
|
|
1096
|
+
/**
|
|
1097
|
+
* Document families the viewer can render. "pdf" is the default and keeps the
|
|
1098
|
+
* full toolbar (paging, zoom, print, download); the other kinds render a
|
|
1099
|
+
* lazy-loaded, read-only preview: "sheet" (xlsx/csv) as an Excel-style
|
|
1100
|
+
* grid with one tab per sheet, "docx" through docx-preview with page layout,
|
|
1101
|
+
* "text" as a rendered markdown document (`.md`) or monospaced source,
|
|
1102
|
+
* "code" as syntax-highlighted source, "html" as a sandboxed page running its
|
|
1103
|
+
* scripts and "archive" as the file listing of a zip (never extracted).
|
|
1104
|
+
*/
|
|
1105
|
+
type F0DocumentKind = "pdf" | "sheet" | "docx" | "text" | "code" | "html" | "archive";
|
|
1106
|
+
/**
|
|
1107
|
+
* When an HTML document's scripts may run. "auto" runs them on open, in the
|
|
1108
|
+
* isolated `htmlSandbox` origin when there is one, else in an opaque-origin
|
|
1109
|
+
* srcdoc frame. "ask" opens static with a "Run content" button. "never" keeps
|
|
1110
|
+
* it static.
|
|
1111
|
+
*/
|
|
1112
|
+
type F0DocumentHtmlExecution = "auto" | "ask" | "never";
|
|
1113
|
+
/** A separate registrable domain serving `f0-html-host/` (see its README). */
|
|
1114
|
+
interface F0DocumentHtmlSandbox {
|
|
1115
|
+
/** Exact origin, e.g. "https://usercontent.example.com". */
|
|
1116
|
+
origin: string;
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Where the toolbar sits. "top" (default) is a bar across the top of the
|
|
1120
|
+
* surface. "floating" is a dark pill that floats over the bottom of the
|
|
1121
|
+
* document, like an action bar — for hosts whose own header already carries
|
|
1122
|
+
* the title and the primary action (the AI chat canvas), so the controls stay
|
|
1123
|
+
* close to the content instead of competing with that header. "none" draws
|
|
1124
|
+
* no toolbar at all, for a host that already provides every control (the
|
|
1125
|
+
* chat attachment viewer on an HTML page).
|
|
1126
|
+
*/
|
|
1127
|
+
type F0DocumentViewerToolbarPlacement = "top" | "floating" | "none";
|
|
1128
|
+
/**
|
|
1129
|
+
* Host-provided toolbar action, appended after the built-in controls in every
|
|
1130
|
+
* kind — e.g. a Close button when the viewer lives inside a fullscreen overlay.
|
|
1131
|
+
*/
|
|
1132
|
+
interface F0DocumentViewerAction {
|
|
1133
|
+
icon: IconType;
|
|
1134
|
+
label: string;
|
|
1135
|
+
onClick: () => void;
|
|
1136
|
+
}
|
|
1137
|
+
interface F0DocumentViewerProps extends WithDataTestIdProps, DataAttributes {
|
|
1138
|
+
/** Source URL of the document. */
|
|
1139
|
+
url: string;
|
|
1140
|
+
/** File name used when downloading the document. Defaults to "document.pdf". */
|
|
1141
|
+
filename?: string;
|
|
1142
|
+
/**
|
|
1143
|
+
* Document family to render. Defaults to "pdf" (unchanged behavior). For the
|
|
1144
|
+
* other kinds the PDF-only props below (page, scale, rotation, print…) are
|
|
1145
|
+
* ignored.
|
|
1146
|
+
*/
|
|
1147
|
+
kind?: F0DocumentKind;
|
|
1148
|
+
/** MIME type of the document — used by kind "text" to detect markdown. */
|
|
1149
|
+
mimeType?: string;
|
|
1150
|
+
/**
|
|
1151
|
+
* Language for kind="code" (e.g. "typescript", "py"). Derived from the
|
|
1152
|
+
* file name when omitted; unknown languages show as plain source.
|
|
1153
|
+
*/
|
|
1154
|
+
language?: string;
|
|
1155
|
+
/** Hide the built-in Download button, in every kind. */
|
|
1156
|
+
hideDownload?: boolean;
|
|
1157
|
+
/** kind="html": when scripts may run. Defaults to "auto". */
|
|
1158
|
+
htmlExecution?: F0DocumentHtmlExecution;
|
|
1159
|
+
/** kind="html": isolated origin where scripts run like a Claude artifact. */
|
|
1160
|
+
htmlSandbox?: F0DocumentHtmlSandbox;
|
|
1161
|
+
/** kind="html": who sent the file, shown as "Content from {sender}". */
|
|
1162
|
+
sender?: string;
|
|
1163
|
+
/** Toolbar placement, in every kind. Defaults to "top". */
|
|
1164
|
+
toolbar?: F0DocumentViewerToolbarPlacement;
|
|
1165
|
+
/**
|
|
1166
|
+
* Custom actions appended to the toolbar (after the built-in controls), in
|
|
1167
|
+
* every kind — e.g. a Close button when the viewer fills an overlay.
|
|
1168
|
+
*/
|
|
1169
|
+
actions?: F0DocumentViewerAction[];
|
|
1170
|
+
/** Zero-based page index to scroll to initially (and on change). */
|
|
1171
|
+
page?: number;
|
|
1172
|
+
/** Restrict rendering to a subset of pages (zero-based indexes). */
|
|
1173
|
+
pagesToDisplay?: number[];
|
|
1174
|
+
/** Initial zoom level. Defaults to "page-width". */
|
|
1175
|
+
initialScale?: F0PdfScale;
|
|
1176
|
+
/** Send credentials with the document request. Defaults to true. */
|
|
1177
|
+
withCredentials?: boolean;
|
|
1178
|
+
/** Show a toolbar control to rotate the document in 90° steps. */
|
|
1179
|
+
rotatable?: boolean;
|
|
1180
|
+
/** Initial rotation in degrees. Defaults to 0. */
|
|
1181
|
+
initialRotation?: F0PdfRotation;
|
|
1182
|
+
/** Called with the new rotation in degrees whenever the user rotates. */
|
|
1183
|
+
onRotationChange?: (rotation: F0PdfRotation) => void;
|
|
1184
|
+
/** Called once the document has loaded, with the pdf.js document proxy. */
|
|
1185
|
+
onPdfLoaded?: (pdf: PDFDocumentProxy) => void;
|
|
1186
|
+
/** Called with the 1-based page number when the visible page changes. */
|
|
1187
|
+
onPageChange?: (page: number) => void;
|
|
1188
|
+
}
|
|
1189
|
+
//#endregion
|
|
1190
|
+
//#region src/addons/documents/F0DocumentViewer/F0DocumentViewerSkeleton.d.ts
|
|
1191
|
+
declare const F0DocumentViewerSkeleton: () => import("react").JSX.Element;
|
|
1192
|
+
//#endregion
|
|
1193
|
+
//#region src/addons/documents/F0DocumentViewer/F0DocumentViewer.d.ts
|
|
1194
|
+
/**
|
|
1195
|
+
* @experimental This is an experimental component, use it at your own risk.
|
|
1196
|
+
*/
|
|
1197
|
+
declare const F0DocumentViewer: WithDataTestIdReturnType<import("react").ForwardRefExoticComponent<F0DocumentViewerProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
1198
|
+
Skeleton: typeof F0DocumentViewerSkeleton;
|
|
1199
|
+
}>;
|
|
1200
|
+
/** @deprecated Renamed to `F0DocumentViewer`: it previews PDF, Word, Excel and text. */
|
|
1201
|
+
declare const F0PdfViewer: WithDataTestIdReturnType<import("react").ForwardRefExoticComponent<F0DocumentViewerProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
1202
|
+
Skeleton: typeof F0DocumentViewerSkeleton;
|
|
1203
|
+
}>;
|
|
1204
|
+
/** @deprecated Renamed to `F0DocumentViewerProps`. */
|
|
1205
|
+
type F0PdfViewerProps = F0DocumentViewerProps;
|
|
1206
|
+
/** @deprecated Renamed to `F0DocumentViewerToolbarPlacement`. */
|
|
1207
|
+
type F0PdfViewerToolbarPlacement = F0DocumentViewerToolbarPlacement;
|
|
1208
|
+
/** @deprecated Renamed to `F0DocumentViewerAction`. */
|
|
1209
|
+
type F0PdfViewerAction = F0DocumentViewerAction;
|
|
1210
|
+
//#endregion
|
|
1211
|
+
//#region src/elements/lib/localized.d.ts
|
|
1212
|
+
/**
|
|
1213
|
+
* Shared helpers for content that can be provided in one language (a plain
|
|
1214
|
+
* value) or several (a list of per-locale entries) — used by the media players
|
|
1215
|
+
* for captions, descriptions, transcriptions and summaries.
|
|
1216
|
+
*/
|
|
1217
|
+
interface LocalizedOption<T> {
|
|
1218
|
+
/** BCP-47 language tag, e.g. `"en"`, `"es"`, `"en-US"`. */
|
|
1219
|
+
locale: string;
|
|
1220
|
+
/**
|
|
1221
|
+
* Display label for the language picker. Defaults to the language name for
|
|
1222
|
+
* `locale` (via `Intl.DisplayNames`), so this is only needed to override it.
|
|
1223
|
+
*/
|
|
1224
|
+
label?: string;
|
|
1225
|
+
/** The value for this locale. */
|
|
1226
|
+
value: T;
|
|
1227
|
+
}
|
|
1228
|
+
/** A single value, or the same value provided in multiple languages. */
|
|
1229
|
+
type Localized<T> = T | LocalizedOption<T>[];
|
|
1230
|
+
//#endregion
|
|
1231
|
+
//#region src/blocks/F0VideoPlayer/types.d.ts
|
|
1232
|
+
/**
|
|
1233
|
+
* Structured content for the video player.
|
|
1234
|
+
*
|
|
1235
|
+
* Every field accepts either a single value or a localized list
|
|
1236
|
+
* (`[{ locale, label?, value }]`) — pass several languages and a language
|
|
1237
|
+
* selector appears in the controls. A single shared selection drives captions,
|
|
1238
|
+
* descriptions and the described source together (each falls back to its first
|
|
1239
|
+
* entry for languages it doesn't provide). See `F0VideoPlayerProps.defaultLanguage`.
|
|
1240
|
+
*
|
|
1241
|
+
* `captions` are timed text shown over the video during playback (WCAG 2.1
|
|
1242
|
+
* SC 1.2.2, Captions). Pass either a WebVTT resource URL or a raw WebVTT string
|
|
1243
|
+
* (the player turns raw VTT into a blob track, so no CORS setup is needed); a
|
|
1244
|
+
* remote URL requires the video host to allow cross-origin reads. When omitted,
|
|
1245
|
+
* the player uses any caption/subtitle track embedded in the video file. A
|
|
1246
|
+
* captions toggle in the controls shows/hides them (a filled glyph when on, a
|
|
1247
|
+
* line glyph when off).
|
|
1248
|
+
*
|
|
1249
|
+
* Audio description (WCAG 2.1 SC 1.2.5) conveys on-screen visual information as
|
|
1250
|
+
* audio, complementary to captions — both are independent and can be on at
|
|
1251
|
+
* once. Provide it in one of two ways, toggled with the audio-description
|
|
1252
|
+
* control (a filled "AD" badge when on, a line badge when off):
|
|
1253
|
+
* - `describedSrc`: a pre-produced media rendition with description mixed into
|
|
1254
|
+
* the audio. Toggling swaps the source, preserving position and play state.
|
|
1255
|
+
* Highest quality; assumed the same length as `src`.
|
|
1256
|
+
* - `descriptions`: a WebVTT `kind="descriptions"` script (URL or raw VTT),
|
|
1257
|
+
* delivered at runtime — the video pauses on each cue so the description can
|
|
1258
|
+
* be spoken (extended audio description), then resumes. Used only when
|
|
1259
|
+
* `describedSrc` is absent.
|
|
1260
|
+
*/
|
|
1261
|
+
interface VideoPlayerContent {
|
|
1262
|
+
/**
|
|
1263
|
+
* WebVTT URL, or raw WebVTT content, for captions shown during playback.
|
|
1264
|
+
* Localizable — pass a per-locale list to offer captions in several languages.
|
|
1265
|
+
*/
|
|
1266
|
+
captions?: Localized<string>;
|
|
1267
|
+
/**
|
|
1268
|
+
* A pre-produced described media source (description mixed into the audio),
|
|
1269
|
+
* swapped in when audio description is enabled. Takes precedence over
|
|
1270
|
+
* `descriptions`. Should match `src`'s duration so the position carries
|
|
1271
|
+
* across the swap. Localizable.
|
|
1272
|
+
*/
|
|
1273
|
+
describedSrc?: Localized<string>;
|
|
1274
|
+
/**
|
|
1275
|
+
* WebVTT URL, or raw WebVTT content, of a `kind="descriptions"` script.
|
|
1276
|
+
* Delivered at runtime with extended (pausing) audio description when no
|
|
1277
|
+
* `describedSrc` is provided. Localizable.
|
|
1278
|
+
*/
|
|
1279
|
+
descriptions?: Localized<string>;
|
|
1280
|
+
}
|
|
1281
|
+
interface F0VideoPlayerProps extends DataAttributes {
|
|
1282
|
+
/** Accessible name for this player region. Defaults to "Video player". */
|
|
1283
|
+
ariaLabel?: string;
|
|
1284
|
+
/**
|
|
1285
|
+
* Video source URL. Localizable — pass a per-locale list of dubbed renditions
|
|
1286
|
+
* to offer selectable audio languages; an "Audio" selector then appears,
|
|
1287
|
+
* independent of the subtitle/caption language.
|
|
1288
|
+
*/
|
|
1289
|
+
src: Localized<string>;
|
|
1290
|
+
/**
|
|
1291
|
+
* Initial language for localized content, matched against the provided
|
|
1292
|
+
* locales exactly or by primary subtag, then the viewer's browser language,
|
|
1293
|
+
* then the first provided. Applies to both the audio (`src`) and the text
|
|
1294
|
+
* (`content`) language selections. Only relevant when more than one language
|
|
1295
|
+
* is available.
|
|
1296
|
+
*/
|
|
1297
|
+
defaultLanguage?: string;
|
|
1298
|
+
/**
|
|
1299
|
+
* Image URL shown while the video loads and before playback starts (the
|
|
1300
|
+
* native `<video>` poster). Cleared by the browser once playback begins.
|
|
1301
|
+
*/
|
|
1302
|
+
poster?: string;
|
|
1303
|
+
/**
|
|
1304
|
+
* Marks the video as having no audio (video-only). Captions (WCAG 2.1
|
|
1305
|
+
* SC 1.2.2) don't apply to silent media, so this exempts the player from the
|
|
1306
|
+
* captions requirement — `data-video-captions` is set to `"no-audio"` instead
|
|
1307
|
+
* of `"missing"`. Note video-only content may still need a text/audio
|
|
1308
|
+
* alternative for its visual information (SC 1.2.1) — audio description still
|
|
1309
|
+
* works over a silent video (its description audio plays even though the video
|
|
1310
|
+
* itself is muted). Browsers can't reliably detect the absence of audio before
|
|
1311
|
+
* playback, so this is declared explicitly.
|
|
1312
|
+
* @default false
|
|
1313
|
+
*/
|
|
1314
|
+
silent?: boolean;
|
|
1315
|
+
/**
|
|
1316
|
+
* Structured content for the player. Currently carries `captions` (a WebVTT
|
|
1317
|
+
* URL or raw WebVTT string) shown over the video during playback and
|
|
1318
|
+
* toggled with the "CC" control. When `captions` is omitted, captions
|
|
1319
|
+
* embedded in the video file are used instead.
|
|
1320
|
+
*/
|
|
1321
|
+
content?: VideoPlayerContent;
|
|
1322
|
+
/**
|
|
1323
|
+
* Keep the controls bar visible during playback instead of auto-hiding it.
|
|
1324
|
+
* By default the controls show while the video is paused and auto-hide while
|
|
1325
|
+
* it plays (revealing on hover or keyboard focus); set this to keep them
|
|
1326
|
+
* visible the whole time. Default `false`.
|
|
1327
|
+
*/
|
|
1328
|
+
persistControls?: boolean;
|
|
1329
|
+
/** Start playing on mount. Default `false`. */
|
|
1330
|
+
autoPlay?: boolean;
|
|
1331
|
+
/** Focus the player on mount so keyboard shortcuts work immediately. Default `false`. */
|
|
1332
|
+
autoFocus?: boolean;
|
|
1333
|
+
/**
|
|
1334
|
+
* Optional download action rendered inside the player controls. Native media
|
|
1335
|
+
* downloads remain disabled, so embedded surfaces that allow saving the
|
|
1336
|
+
* source can expose an explicit, keyboard-accessible action here.
|
|
1337
|
+
*/
|
|
1338
|
+
download?: {
|
|
1339
|
+
label: string;
|
|
1340
|
+
onClick: () => void;
|
|
1341
|
+
};
|
|
1342
|
+
/**
|
|
1343
|
+
* Prevent seeking past the furthest point already watched. Renders a marker at
|
|
1344
|
+
* that position and blocks the cursor beyond it. Default `false`.
|
|
1345
|
+
*/
|
|
1346
|
+
restrictForwardSeek?: boolean;
|
|
1347
|
+
/** Called on play, on pause and on a recurring heartbeat during playback. */
|
|
1348
|
+
onTrackAction?: () => void;
|
|
1349
|
+
/**
|
|
1350
|
+
* Called once when each watched-% milestone (`25`, `50`, `75`) is first
|
|
1351
|
+
* reached. For progress analytics; completion is reported via `onComplete`.
|
|
1352
|
+
*/
|
|
1353
|
+
onMilestone?: (milestone: number, video: HTMLVideoElement) => void;
|
|
1354
|
+
/**
|
|
1355
|
+
* Called once when the video is "watched enough": the remaining time drops to
|
|
1356
|
+
* `min(10s, 3% of duration)` (the later of "last 10s" and "97%").
|
|
1357
|
+
*/
|
|
1358
|
+
onComplete?: (video: HTMLVideoElement) => void;
|
|
1359
|
+
}
|
|
1360
|
+
//#endregion
|
|
1361
|
+
//#region src/blocks/F0VideoPlayer/internal.d.ts
|
|
1362
|
+
/**
|
|
1363
|
+
* Video player built on a native `<video>` element.
|
|
1364
|
+
*
|
|
1365
|
+
* useVideoState → element ref, native listeners, derived state.
|
|
1366
|
+
* useFullscreen → toggles fullscreen on the wrapper (keeps controls visible).
|
|
1367
|
+
* useKeyboardShortcuts → Space, ←/→, ↑/↓, M, F.
|
|
1368
|
+
* useVideoTracking → analytics callback on play/pause + interval.
|
|
1369
|
+
* useVideoMilestones → watched-% milestone callbacks (25/50/75).
|
|
1370
|
+
* useVideoCompletion → "watched enough" callback (min(10s, 3%)).
|
|
1371
|
+
* useRestrictForwardSeek → blocks seeking past the furthest-watched point.
|
|
1372
|
+
* <Controls> → presentation only; interactions delegated back here.
|
|
1373
|
+
*/
|
|
1374
|
+
declare function F0VideoPlayerInternal({ src, poster, ariaLabel, silent, persistControls, content, defaultLanguage, autoPlay, autoFocus, download, restrictForwardSeek, onTrackAction, onMilestone, onComplete, ...dataAttributes }: F0VideoPlayerProps): import("react").JSX.Element;
|
|
1375
|
+
//#endregion
|
|
1376
|
+
//#region src/blocks/F0VideoPlayer/F0VideoPlayer.d.ts
|
|
1377
|
+
/**
|
|
1378
|
+
* @experimental This is an experimental component, use it at your own risk.
|
|
1379
|
+
*
|
|
1380
|
+
* Video player built on a native `<video>` element with f0-styled controls
|
|
1381
|
+
* (play/pause, seekbar, volume, playback speed, fullscreen) plus keyboard
|
|
1382
|
+
* shortcuts. Analytics, watch-% milestones, completion and forward-seek
|
|
1383
|
+
* restriction are built in and enabled via props (`onTrackAction`,
|
|
1384
|
+
* `onMilestone`, `onComplete`, `restrictForwardSeek`).
|
|
1385
|
+
*/
|
|
1386
|
+
declare const F0VideoPlayer: WithDataTestIdReturnType<typeof F0VideoPlayerInternal>;
|
|
1387
|
+
//#endregion
|
|
1388
|
+
//#region src/elements/primitives/_primitives/F0Attachments/types.d.ts
|
|
1389
|
+
type AttachmentDocumentKind = F0DocumentKind;
|
|
1390
|
+
//#endregion
|
|
1085
1391
|
//#region src/addons/ai/ai/F0AiFileAttachments/types.d.ts
|
|
1086
1392
|
/**
|
|
1087
1393
|
* A file shown in the AI chat: something the person sent, or something the
|
|
@@ -1110,10 +1416,12 @@ interface AiChatFile {
|
|
|
1110
1416
|
height?: number;
|
|
1111
1417
|
}
|
|
1112
1418
|
/**
|
|
1113
|
-
* Which kind of preview a file opened.
|
|
1114
|
-
*
|
|
1419
|
+
* Which kind of preview a file opened. `document` covers everything the
|
|
1420
|
+
* document viewer shows (pdf, sheets, Word, text, code, HTML); the exact
|
|
1421
|
+
* family comes in `onOpenFile`'s third argument. Zips never open: their card
|
|
1422
|
+
* downloads them.
|
|
1115
1423
|
*/
|
|
1116
|
-
type AiChatFileKind = "image" | "video" | "document" | "file";
|
|
1424
|
+
type AiChatFileKind = "image" | "video" | "audio" | "document" | "file";
|
|
1117
1425
|
/**
|
|
1118
1426
|
* Makes a file URL loadable by the browser. Needed when files sit behind
|
|
1119
1427
|
* authentication headers that `<img>`, video and the PDF reader can't send.
|
|
@@ -1134,7 +1442,7 @@ interface AiChatFilePreviewConfig {
|
|
|
1134
1442
|
/**
|
|
1135
1443
|
* Resolve file URLs before showing them. Without it, only files the browser
|
|
1136
1444
|
* already holds (`blob:` and `data:` URLs) get rich previews; anything else
|
|
1137
|
-
*
|
|
1445
|
+
* stays a download card, since the chat can't know the URL is loadable.
|
|
1138
1446
|
*/
|
|
1139
1447
|
resolveUrl?: AiChatFileUrlResolver;
|
|
1140
1448
|
/**
|
|
@@ -1143,6 +1451,18 @@ interface AiChatFilePreviewConfig {
|
|
|
1143
1451
|
* @default false
|
|
1144
1452
|
*/
|
|
1145
1453
|
directUrls?: boolean;
|
|
1454
|
+
/**
|
|
1455
|
+
* Separate registrable domain serving `f0-html-host/` (see its README).
|
|
1456
|
+
* With it, HTML files run in that isolated origin; without it they run in
|
|
1457
|
+
* an opaque-origin srcdoc frame inside this tab.
|
|
1458
|
+
*/
|
|
1459
|
+
htmlSandbox?: F0DocumentHtmlSandbox;
|
|
1460
|
+
/**
|
|
1461
|
+
* When HTML files run their scripts: "auto" on open, "ask" behind a "Run
|
|
1462
|
+
* content" button, "never" static.
|
|
1463
|
+
* @default "auto"
|
|
1464
|
+
*/
|
|
1465
|
+
htmlExecution?: F0DocumentHtmlExecution;
|
|
1146
1466
|
}
|
|
1147
1467
|
/** One file published by an agent's `showFiles` tool. */
|
|
1148
1468
|
interface AiChatShowFilesItem {
|
|
@@ -1155,6 +1475,7 @@ interface AiChatShowFilesItem {
|
|
|
1155
1475
|
/** A PDF rendering of the file, written next to it by the agent. */
|
|
1156
1476
|
preview?: {
|
|
1157
1477
|
path: string;
|
|
1478
|
+
url?: string;
|
|
1158
1479
|
};
|
|
1159
1480
|
}
|
|
1160
1481
|
//#endregion
|
|
@@ -1328,11 +1649,6 @@ interface ExpenseProfile {
|
|
|
1328
1649
|
status?: string;
|
|
1329
1650
|
}
|
|
1330
1651
|
//#endregion
|
|
1331
|
-
//#region src/elements/lib/global.types.d.ts
|
|
1332
|
-
interface DataAttributes {
|
|
1333
|
-
[key: `data-${string}`]: string | undefined;
|
|
1334
|
-
}
|
|
1335
|
-
//#endregion
|
|
1336
1652
|
//#region src/elements/Action/types.d.ts
|
|
1337
1653
|
declare const actionButtonVariants: readonly ["default", "outline", "critical", "neutral", "ghost", "promote", "outlinePromote", "ai"];
|
|
1338
1654
|
type ActionButtonVariant = (typeof actionButtonVariants)[number];
|
|
@@ -5166,4 +5482,4 @@ declare function useI18n(): TranslationsType & {
|
|
|
5166
5482
|
};
|
|
5167
5483
|
declare const buildTranslations: (translations: TranslationsType) => TranslationsType;
|
|
5168
5484
|
//#endregion
|
|
5169
|
-
export { AiChatCredits as $,
|
|
5485
|
+
export { AiChatCredits as $, F0AvatarTeamProps as $i, F0Button as $n, CanvasActions as $r, F0TagTeam as $t, Weekdays as A, WithDataTestIdPropsOf as Aa, FormCanvasContent as Ai, AvatarListSize as An, AttachmentDocumentKind as Ar, CustomEntityRefCard as At, RenderableTurn as B, AvatarAction as Bi, F0Link as Bn, F0DocumentHtmlExecution as Br, cardImageAspectRatios as Bt, FileItemSize as C, tagDotColors as Ca, CollectionComputation as Ci, TooltipProps as Cn, F0PersonCardProps as Cr, WelcomeScreenSuggestionItem as Ct, TagCounterItem as D, IconType as Da, DashboardMetadata as Di, ChartColorToken as Dn, AiChatFilePreviewConfig as Dr, SidePanelContextValue as Dt, TagCounter as E, F0IconProps as Ea, DashboardFetchSpec as Ei, HourDistributionDataPoint as En, AiChatFileKind as Er, SidePanelContent as Et, F0AiMessagesContainerProps as F, PieComputation as Fi, CardAvatarVariant as Fn, F0DocumentViewer as Fr, F0Card as Ft, F0AiChatProps as G, CompanyAvatarVariant as Gi, DropdownItemLabel as Gn, F0DocumentViewerToolbarPlacement as Gr, CardAlertVariant as Gt, MarkdownTagRenderers as H, AvatarVariants as Hi, DropdownContentVariant as Hn, F0DocumentKind as Hr, cardImageSizes as Ht, WelcomeScreenCta as I, RadarComputation as Ii, AlertAvatarProps as In, F0PdfViewer as Ir, F0CardProps as It, AiChatComposerActionItem as J, IconAvatarVariant as Ji, DropdownItemSeparator as Jn, DataAttributes as Jr, ValueDisplayRendererDefinition as Jt, F0AiChatProvider as K, FileAvatarVariant as Ki, DropdownItemObject as Kn, F0PdfScale as Kr, CardMetadata as Kt, FeedbackConfig as L, ScatterComputation as Li, F0AvatarAlert as Ln, F0PdfViewerAction as Lr, CardImageAspectRatio as Lt, useAiChatTranslations as M, withDataTestId as Ma, GaugeComputation as Mi, F0TagAlert as Mn, F0VideoPlayerProps as Mr, EntityRefs as Mt, useAiChat as N, HeatmapComputation as Ni, Level as Nn, VideoPlayerContent as Nr, EntityResolvers as Nt, F0TagRaw as O, DataTestIdWrapper as Oa, DataDownloadCanvasContent as Oi, chartColorTokens as On, AiChatFileUrlResolver as Or, SidePanelLayout as Ot, F0AiMessagesContainer as P, MetricComputation as Pi, Props$1 as Pn, Localized as Pr, EntityUrlBuilders as Pt, AiChatCreditWarning as Q, F0AvatarTeam as Qi, LinkContextValue as Qn, BulkResolveInconsistenciesCanvasContent as Qr, TagVariant as Qt, UserReaction as R, F0AvatarModule as Ri, alertAvatarTypes as Rn, F0PdfViewerProps as Rr, CardImageFit as Rt, FileItemProps as S, Props$2 as Sa, ChatDashboardScatterChartConfig as Si, TooltipGroupProps as Sn, F0PersonCardAction as Sr, WelcomeScreenSuggestion as St, F0TagList as T, F0Icon as Ta, DashboardCanvasContent as Ti, HourDistributionCellValue as Tn, AiChatFile as Tr, aiTranslations as Tt, markdownRenderers as U, ColorAvatarVariant as Ui, DropdownInternalProps as Un, F0DocumentViewerAction as Ur, CardAlertAction as Ut, ThinkingProps as V, AvatarVariant$1 as Vi, F0LinkProps as Vn, F0DocumentHtmlSandbox as Vr, cardImageFits as Vt, F0AiChat as W, ColorListAvatarVariant as Wi, DropdownItem as Wn, F0DocumentViewerProps as Wr, CardAlertProps as Wt, AiChatComposerActionSubmenu as X, TeamAvatarVariant as Xi, DropdownItemSwitch as Xn, AutofillTimesheetCanvasContent as Xr, TagType as Xt, AiChatComposerActionSeparator as Y, PersonAvatarVariant as Yi, DropdownItemSubmenu as Yn, AggregationType as Yr, F0TagListProps as Yt, AiChatComposerActionToggle as Z, avatarVariants as Zi, NavigationItem as Zn, AutofillTimesheetShift as Zr, Tag as Zt, F0FileItem as _, Badge as _a, ChatDashboardMetricFormat as _i, F0ProgressSeriesSize as _n, Variant as _r, PendingContext as _t, F0CardHorizontal as a, F0AvatarFileProps as aa, ChatDashboardChartConfig as ai, F0TagCompanyProps as an, EmojiImage as ar, AiChatTrackingOptions as at, FileAction as b, modules as ba, ChatDashboardPieChartConfig as bi, Tooltip as bn, PersonProfile as br, UploadedFile as bt, MobileDropdown as c, F0AvatarEmojiProps as ca, ChatDashboardColumn as ci, F0TagBalanceProps as cn, getEmojiLabel as cr, AiChatUsageLimits as ct, useFormCardValueFormatter as d, F0AvatarColorList as da, ChatDashboardFilterDefinition as di, RelaxedNumericWithFormatter as dn, ExpenseProfile as dr, AppendToolCall as dt, F0AvatarPersonProps as ea, CanvasContent as ei, F0TagTeamProps as en, F0ButtonProps as er, AiChatDisclaimer as et, useSetFormCardValueFormatter as f, F0AvatarColorListProps as fa, ChatDashboardFunnelChartConfig as fi, F0ProgressSeries as fn, VacancyProfile as fr, CreditsUsage as ft, F0FileAction as g, BaseAvatarProps as ga, ChatDashboardLineChartConfig as gi, F0ProgressSeriesProps as gn, StatusVariant as gr, F0ToolCall as gt, DetailsItemType as h, AvatarBadge as ha, ChatDashboardItem as hi, F0ProgressSeriesOptions as hn, F0TagStatusProps as hr, F0Message as ht, useI18n as i, F0AvatarFile as ia, ChatDashboardBarChartConfig as ii, F0TagCompany as in, buttonVariants as ir, AiChatProviderProps as it, AiChatTranslationsProvider as j, WithDataTestIdReturnType as ja, FormatPreset as ji, F0AvatarListProps as jn, F0VideoPlayer as jr, CustomEntityRefConfig as jt, F0TagDot as k, WithDataTestIdProps as ka, DataDownloadDataset as ki, BarSeriesStyle as kn, AiChatShowFilesItem as kr, SidePanelViewDefinition as kt, FormCardValueFormatterEntry as l, BaseAvatar as la, ChatDashboardConfig as li, Numeric as ln, useEmojiConfetti as lr, AiChatUsageLimitsSection as lt, DetailsItemContent as m, F0AvatarColorProps as ma, ChatDashboardHeatmapChartConfig as mi, F0ProgressSeriesColor as mn, F0TagStatus as mr, F0AiChatWelcomeCard as mt, I18nProviderProps as n, F0AvatarIconProps as na, CanvasEntityDefinition as ni, F0TagPerson as nn, ButtonVariant as nr, AiChatFileAttachmentConfig as nt, F0CardHorizontalProps as o, FileDef as oa, ChatDashboardChartItem as oi, F0TagBalance as on, EmojiImageProps as or, AiChatTranslations as ot, DetailsItem as p, F0AvatarColor as pa, ChatDashboardGaugeChartConfig as pi, F0ProgressSeriesBar as pn, RequisitionProfile as pr, F0AIMessage as pt, AiChatComposerAction as q, FlagAvatarVariant as qi, DropdownItemPanel as qn, pdfScales as qr, cardAlertVariants as qt, buildTranslations as r, CountryCode as ra, ChartComputation as ri, F0TagPersonProps as rn, buttonSizes as rr, AiChatMode as rt, Dropdown as s, F0AvatarEmoji as sa, ChatDashboardCollectionItem as si, BalanceStatus as sn, EmojiRenderMode as sr, AiChatTranslationsProviderProps as st, I18nProvider as t, F0AvatarIcon as ta, CanvasContentBase as ti, F0TagRawProps as tn, ButtonSize as tr, AiChatEmployeeCredits as tt, FormCardValueFormatterProvider as u, F0AvatarCompanyProps as ua, ChatDashboardDateNavigationGranularity as ui, NumericWithFormatter as un, ActionButtonVariant as ur, AppendMessage as ut, F0FileItemProps as v, BadgeProps as va, ChatDashboardMetricItem as vi, f0ProgressSeriesColors as vn, JobPostingProfile as vr, PendingQuote as vt, f0FileItemSizes as w, DistributiveOmit as wa, DashboardCanvasActions as wi, Shortcut as wn, F0Avatar as wr, WelcomeSuggestionClickEvent as wt, FileItem as x, NewColor as xa, ChatDashboardRadarChartConfig as xi, TooltipGroup as xn, F0PersonCard as xr, VisualizationMode as xt, F0FileItemSize as y, ModuleId as ya, ChatDashboardNavigationFilterDefinition as yi, f0ProgressSeriesSizes as yn, CandidateProfile as yr, TranscribeFn as yt, useToolCallId as z, F0AvatarModuleProps as zi, CardSecondaryAction as zn, F0PdfViewerToolbarPlacement as zr, CardImageSize as zt };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { forwardRef as e } from "react";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
var r = e((e, r) => /* @__PURE__ */ n("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
fill: "none",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
ref: r,
|
|
8
|
+
...e,
|
|
9
|
+
children: [/* @__PURE__ */ t("path", {
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
d: "M5.99999 17V6.99999C5.99999 5.89542 6.89542 4.99999 7.99999 4.99999C9.10456 4.99999 9.99999 5.89542 9.99999 6.99999V17C9.99999 18.1046 9.10456 19 7.99999 19C6.89542 19 5.99999 18.1046 5.99999 17Z"
|
|
12
|
+
}), /* @__PURE__ */ t("path", {
|
|
13
|
+
fill: "currentColor",
|
|
14
|
+
d: "M14 17V6.99999C14 5.89542 14.8954 4.99999 16 4.99999C17.1046 4.99999 18 5.89542 18 6.99999V17C18 18.1046 17.1046 19 16 19C14.8954 19 14 18.1046 14 17Z"
|
|
15
|
+
})]
|
|
16
|
+
})), i = e((e, n) => /* @__PURE__ */ t("svg", {
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
+
fill: "none",
|
|
19
|
+
viewBox: "0 0 24 24",
|
|
20
|
+
ref: n,
|
|
21
|
+
...e,
|
|
22
|
+
children: /* @__PURE__ */ t("path", {
|
|
23
|
+
fill: "currentColor",
|
|
24
|
+
d: "M5.99988 16.5536V7.44636C5.99988 5.91072 7.65884 4.94798 8.99216 5.70988L16.961 10.2635C18.3047 11.0313 18.3047 12.9687 16.961 13.7365L8.99216 18.2901C7.65884 19.052 5.99988 18.0893 5.99988 16.5536Z"
|
|
25
|
+
})
|
|
26
|
+
}));
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/elements/lib/localized.ts
|
|
29
|
+
function a(e) {
|
|
30
|
+
return Array.isArray(e) && e.every((e) => typeof e == "object" && !!e && "locale" in e && "value" in e);
|
|
31
|
+
}
|
|
32
|
+
function o(e, t) {
|
|
33
|
+
if (e !== void 0) {
|
|
34
|
+
if (!a(e)) return e;
|
|
35
|
+
if (e.length !== 0) return ((t ? e.find((e) => e.locale === t) : void 0) ?? e[0]).value;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function s(...e) {
|
|
39
|
+
let t = /* @__PURE__ */ new Map();
|
|
40
|
+
for (let n of e) if (a(n)) for (let e of n) {
|
|
41
|
+
let n = t.get(e.locale);
|
|
42
|
+
n ? !n.label && e.label && (n.label = e.label) : t.set(e.locale, {
|
|
43
|
+
locale: e.locale,
|
|
44
|
+
label: e.label
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return Array.from(t.values());
|
|
48
|
+
}
|
|
49
|
+
function c(e, t) {
|
|
50
|
+
if (e.label) return e.label;
|
|
51
|
+
try {
|
|
52
|
+
let n = t ?? e.locale, r = new Intl.DisplayNames([n], { type: "language" }).of(e.locale) ?? e.locale;
|
|
53
|
+
return r.charAt(0).toLocaleUpperCase(n) + r.slice(1);
|
|
54
|
+
} catch {
|
|
55
|
+
return e.locale;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function l(e, t) {
|
|
59
|
+
if (e.length === 0) return;
|
|
60
|
+
let n = e.map((e) => e.locale), r = (e) => e.split("-")[0], i = (e) => n.find((t) => t === e) ?? n.find((t) => r(t) === r(e));
|
|
61
|
+
if (t) {
|
|
62
|
+
let e = i(t);
|
|
63
|
+
if (e) return e;
|
|
64
|
+
}
|
|
65
|
+
let a = typeof navigator < "u" ? navigator.language : void 0;
|
|
66
|
+
if (a) {
|
|
67
|
+
let e = i(a);
|
|
68
|
+
if (e) return e;
|
|
69
|
+
}
|
|
70
|
+
return n[0];
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { i as a, o as i, l as n, r as o, c as r, s as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-BItFwnF5.js";
|
|
2
2
|
import { t } from "./dist-Cuwaibqg.js";
|
|
3
|
-
import { s as n } from "./F0Map-
|
|
3
|
+
import { s as n } from "./F0Map-BkrkSniz.js";
|
|
4
4
|
import './maplibre-gl.css';import './maplibre.css';/* empty css */
|
|
5
5
|
import { t as r } from "./maplibre-gl-DVldSYfz.js";
|
|
6
6
|
//#region ../../node_modules/.pnpm/@mapbox+mapbox-gl-rtl-text@0.2.3_mapbox-gl@1.13.3/node_modules/@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js?url
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "./rolldown-runtime-BItFwnF5.js";
|
|
2
2
|
import { z as clsx } from "./tooltip-BX4dSfeL.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Ji as invariant } from "./F0CanvasPanel-CbJxX6Qv.js";
|
|
4
4
|
import { t as dequal } from "./dist-Dt-cTb6D.js";
|
|
5
5
|
import { n as pdfWorkerOverride, r as registerPdfWorkerApplier } from "./pdfWorkerConfig-BwllKt1K.js";
|
|
6
6
|
import { createContext, forwardRef, useCallback, useContext, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef } from "react";
|