@factorialco/f0-react 4.59.0 → 4.60.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-DECZZzOT.js → ChatPdfThumbnail-C6f0btcZ.js} +1 -1
- package/dist/{DocumentToolbar-BQRZ8kPq.js → DocumentToolbar-D5RFd-m2.js} +2 -2
- package/dist/{DocxViewer-f1Qx-1g7.js → DocxViewer-YbJWweNA.js} +2 -2
- package/dist/{F0AiProcessingOverlay-C3PLGL9k.js → F0AiProcessingOverlay-DWjggPHl.js} +17 -15
- package/dist/{F0CanvasPanel-Bm-rOddX.js → F0CanvasPanel-DZnIZ1lj.js} +13293 -13291
- package/dist/{SheetViewer-CyFUTGAF.js → SheetViewer-JzdSM-Xt.js} +2 -2
- package/dist/{TextViewer-CyJFvBXS.js → TextViewer-GEPi8xxX.js} +2 -2
- package/dist/ai.d.ts +15 -0
- package/dist/ai.js +2 -2
- package/dist/component-status.js +1 -1
- package/dist/experimental.d.ts +15 -0
- package/dist/experimental.js +6 -6
- package/dist/f0.d.ts +213 -4
- package/dist/f0.js +15537 -14630
- package/dist/i18n-provider-defaults.d.ts +15 -0
- package/dist/i18n-provider-defaults.js +17 -2
- package/dist/{index-CbHjzW27.js → index-B00tg7uM.js} +1 -1
- package/dist/{index-BihWWw-L.js → index-BjppyLWI.js} +3 -3
- package/dist/{pdfWorker-BJ-lBzFV.js → pdfWorker-DGnb8wYm.js} +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/experimental.d.ts
CHANGED
|
@@ -3315,7 +3315,15 @@ declare const defaultTranslations: {
|
|
|
3315
3315
|
readonly position: "{{current}} of {{total}}";
|
|
3316
3316
|
readonly viewDetail: "View detail";
|
|
3317
3317
|
readonly hideDetail: "Hide detail";
|
|
3318
|
+
readonly viewTranscription: "View transcription";
|
|
3319
|
+
readonly hideTranscription: "Hide transcription";
|
|
3320
|
+
readonly viewSummary: "View summary";
|
|
3321
|
+
readonly hideSummary: "Hide summary";
|
|
3318
3322
|
readonly details: "Recording details";
|
|
3323
|
+
readonly summary: "Summary";
|
|
3324
|
+
readonly transcription: "Transcription";
|
|
3325
|
+
readonly language: "Language";
|
|
3326
|
+
readonly audio: "Audio";
|
|
3319
3327
|
};
|
|
3320
3328
|
readonly actions: {
|
|
3321
3329
|
readonly add: "Add";
|
|
@@ -4132,6 +4140,7 @@ declare const defaultTranslations: {
|
|
|
4132
4140
|
readonly paused: "Paused";
|
|
4133
4141
|
readonly mute: "Mute";
|
|
4134
4142
|
readonly unmute: "Unmute";
|
|
4143
|
+
readonly noAudio: "No audio";
|
|
4135
4144
|
readonly volume: "Volume";
|
|
4136
4145
|
readonly seekLabel: "Seek";
|
|
4137
4146
|
readonly enterFullscreen: "Enter fullscreen";
|
|
@@ -4139,6 +4148,12 @@ declare const defaultTranslations: {
|
|
|
4139
4148
|
readonly playbackSpeed: "Playback speed ({{rate}})";
|
|
4140
4149
|
readonly playbackSpeedLabel: "Playback speed";
|
|
4141
4150
|
readonly timeProgress: "{{current}} of {{total}}";
|
|
4151
|
+
readonly captions: "Captions";
|
|
4152
|
+
readonly audioDescription: "Audio description";
|
|
4153
|
+
readonly audio: "Audio";
|
|
4154
|
+
readonly subtitles: "Subtitles";
|
|
4155
|
+
readonly settings: "Settings";
|
|
4156
|
+
readonly off: "Off";
|
|
4142
4157
|
};
|
|
4143
4158
|
};
|
|
4144
4159
|
|
package/dist/experimental.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { v as Sl, B as kl, x as Tl, y as Rl, z as Vo, A as Tn, E as ln, G as El, H as ue, J as zt, u as pe, R as Ll, K as zl, L as so, M as Hn, N as mn, O as Ve, Q as Al, U as Fl, V as ve, W as Pl, X as Ml, Y as Ie, Z as ea, _ as Ol, $ as Dl, m as Me, a0 as er, S as ie, a1 as Vt, a2 as Bl, a3 as _l, a4 as Hl, a5 as $l, a6 as Wl, a7 as ct, a8 as ta, a9 as na, aa as At, ab as $n, ac as jl, e as ra, ad as Wt, ae as oa, af as tr, w as tt, r as We, ag as Wn, ah as ia, ai as Vl, aj as aa, ak as Ue, s as Qe, al as Ul, am as Gl, an as Kl, ao as ql, ap as Yl, aq as Et, ar as nr, as as Xl, at as Ql, au as Jl, av as Zl, aw as rr, ax as sa, j as la, ay as ec, az as tc, k as jn, aA as nc, aB as ca, aC as rc, aD as oc, aE as ic, aF as ac, aG as sc, aH as da, aI as ua, aJ as fa, aK as Br, aL as ha, aM as _r, aN as ma, aO as lc, aP as cc, aQ as dc, aR as pa, aS as uc, aT as nt, aU as Zt, aV as Hr, aW as ga, aX as fc, aY as or, aZ as hc, a_ as mc, a$ as pc, b0 as Jt, b1 as gc, b2 as bc, b3 as dn, b4 as Uo, b5 as $r, b6 as vc, b7 as xc, b as ba, b8 as yc, a as wc, b9 as ir, ba as Nc, g as Cc, F as Ic, bb as Sc, bc as va, bd as kc, o as lo, be as Tc, bf as co, bg as en, bh as Rc, bi as Ec, bj as Lc, bk as zc, bl as xa, bm as Ac, bn as Fc, bo as Pc, bp as Wr, bq as Mc, br as Oc, bs as Dc, bt as uo, bu as Bc, bv as _c, bw as Hc, bx as $c, by as Wc, bz as jc, bA as Vc, bB as ya, bC as wa, bD as Na, bE as Uc, bF as Gc, bG as Kc, bH as qc, bI as Yc, bJ as Ca, bK as Xc, bL as Qc, bM as Ia, bN as fo, bO as Jc, bP as Zc, bQ as ed, n as td, bR as nd, bS as Sa, bT as rd, bU as od, bV as ka, bW as Ta, bX as Ra, l as Vn, bY as id, bZ as Go, b_ as Ea, b$ as ad, c0 as sd, c1 as ld, c2 as jr, c3 as Vr, c4 as cd, c5 as dd, c6 as ud, c7 as fd, c8 as hd, c9 as md, ca as pd, cb as St, cc as ho, cd as mo, ce as po, cf as La, cg as go, ch as za, ci as Aa, cj as gd, ck as bd, cl as vd, cm as xd, cn as yd, co as wd, cp as Nd, cq as Ko, cr as Cd, cs as Id, ct as qo, cu as Sd, cv as kd, cw as Td, cx as Rd, cy as Fa, cz as Ed, cA as Ld } from "./F0CanvasPanel-
|
|
2
|
-
import { cL as R0, cK as E0, cX as L0, cH as z0, cI as A0, cB as F0, cC as P0, cC as M0, cD as O0, cE as D0, c_ as B0, cJ as _0, cT as H0, cU as $0, cY as W0, cF as j0, cN as V0, cM as U0, T as G0, h as K0, cV as q0, c$ as Y0, cW as X0, cZ as Q0, cS as J0, cP as Z0, cR as ex, cO as tx, cG as nx, cQ as rx } from "./F0CanvasPanel-
|
|
1
|
+
import { v as Sl, B as kl, x as Tl, y as Rl, z as Vo, A as Tn, E as ln, G as El, H as ue, J as zt, u as pe, R as Ll, K as zl, L as so, M as Hn, N as mn, O as Ve, Q as Al, U as Fl, V as ve, W as Pl, X as Ml, Y as Ie, Z as ea, _ as Ol, $ as Dl, m as Me, a0 as er, S as ie, a1 as Vt, a2 as Bl, a3 as _l, a4 as Hl, a5 as $l, a6 as Wl, a7 as ct, a8 as ta, a9 as na, aa as At, ab as $n, ac as jl, e as ra, ad as Wt, ae as oa, af as tr, w as tt, r as We, ag as Wn, ah as ia, ai as Vl, aj as aa, ak as Ue, s as Qe, al as Ul, am as Gl, an as Kl, ao as ql, ap as Yl, aq as Et, ar as nr, as as Xl, at as Ql, au as Jl, av as Zl, aw as rr, ax as sa, j as la, ay as ec, az as tc, k as jn, aA as nc, aB as ca, aC as rc, aD as oc, aE as ic, aF as ac, aG as sc, aH as da, aI as ua, aJ as fa, aK as Br, aL as ha, aM as _r, aN as ma, aO as lc, aP as cc, aQ as dc, aR as pa, aS as uc, aT as nt, aU as Zt, aV as Hr, aW as ga, aX as fc, aY as or, aZ as hc, a_ as mc, a$ as pc, b0 as Jt, b1 as gc, b2 as bc, b3 as dn, b4 as Uo, b5 as $r, b6 as vc, b7 as xc, b as ba, b8 as yc, a as wc, b9 as ir, ba as Nc, g as Cc, F as Ic, bb as Sc, bc as va, bd as kc, o as lo, be as Tc, bf as co, bg as en, bh as Rc, bi as Ec, bj as Lc, bk as zc, bl as xa, bm as Ac, bn as Fc, bo as Pc, bp as Wr, bq as Mc, br as Oc, bs as Dc, bt as uo, bu as Bc, bv as _c, bw as Hc, bx as $c, by as Wc, bz as jc, bA as Vc, bB as ya, bC as wa, bD as Na, bE as Uc, bF as Gc, bG as Kc, bH as qc, bI as Yc, bJ as Ca, bK as Xc, bL as Qc, bM as Ia, bN as fo, bO as Jc, bP as Zc, bQ as ed, n as td, bR as nd, bS as Sa, bT as rd, bU as od, bV as ka, bW as Ta, bX as Ra, l as Vn, bY as id, bZ as Go, b_ as Ea, b$ as ad, c0 as sd, c1 as ld, c2 as jr, c3 as Vr, c4 as cd, c5 as dd, c6 as ud, c7 as fd, c8 as hd, c9 as md, ca as pd, cb as St, cc as ho, cd as mo, ce as po, cf as La, cg as go, ch as za, ci as Aa, cj as gd, ck as bd, cl as vd, cm as xd, cn as yd, co as wd, cp as Nd, cq as Ko, cr as Cd, cs as Id, ct as qo, cu as Sd, cv as kd, cw as Td, cx as Rd, cy as Fa, cz as Ed, cA as Ld } from "./F0CanvasPanel-DZnIZ1lj.js";
|
|
2
|
+
import { cL as R0, cK as E0, cX as L0, cH as z0, cI as A0, cB as F0, cC as P0, cC as M0, cD as O0, cE as D0, c_ as B0, cJ as _0, cT as H0, cU as $0, cY as W0, cF as j0, cN as V0, cM as U0, T as G0, h as K0, cV as q0, c$ as Y0, cW as X0, cZ as Q0, cS as J0, cP as Z0, cR as ex, cO as tx, cG as nx, cQ as rx } from "./F0CanvasPanel-DZnIZ1lj.js";
|
|
3
3
|
import { jsx as n, jsxs as m, Fragment as De } from "react/jsx-runtime";
|
|
4
4
|
import Q, { forwardRef as Ae, useRef as _, useTransition as zd, useState as $, useLayoutEffect as ar, useId as Ur, useContext as Nt, createContext as st, useEffect as te, useCallback as K, useMemo as he, Fragment as Rt, isValidElement as Ad, cloneElement as Pa, Suspense as bo, lazy as tn, createElement as Mn, memo as Ma, Children as Oa } from "react";
|
|
5
5
|
import { d as S, T as Fd, a as Pd, b as Md, f as Je, c as Od } from "./tooltip-BH6Se8A4.js";
|
|
6
|
-
import { C as Dd, P as Bd, a as Nn, M as _d, p as Hd, b as $d, R as Yo, c as Da, u as Wd, e as jd, f as Vd, g as Ud, h as Gd, i as Kd, O as Ba, j as _a, S as qd, A as Yd, B as Xd, L as Qd, k as Jd, V as Zd, l as eu, m as tu, n as nu } from "./index-
|
|
7
|
-
import { a3 as ix, a4 as ax, t as sx, v as lx, r as cx, J as dx, w as ux, E as fx, ae as hx, I as mx, s as px, a1 as gx, ag as bx, af as vx, U as xx, aj as yx, F as wx, _ as Nx, X as Cx, N as Ix, al as Sx, Q as kx, $ as Tx, a0 as Rx, x as Ex, ah as Lx, ai as zx, T as Ax, a2 as Fx, ab as Px, ad as Mx, y as Ox, D as Dx, G as Bx, Y as _x, ak as Hx, Z as $x, W as Wx, am as jx, z as Vx, H as Ux, o as Gx, q as Kx, a7 as qx, a8 as Yx, a5 as Xx, ac as Qx, K as Jx, a9 as Zx, a6 as e1, aa as t1 } from "./index-
|
|
6
|
+
import { C as Dd, P as Bd, a as Nn, M as _d, p as Hd, b as $d, R as Yo, c as Da, u as Wd, e as jd, f as Vd, g as Ud, h as Gd, i as Kd, O as Ba, j as _a, S as qd, A as Yd, B as Xd, L as Qd, k as Jd, V as Zd, l as eu, m as tu, n as nu } from "./index-B00tg7uM.js";
|
|
7
|
+
import { a3 as ix, a4 as ax, t as sx, v as lx, r as cx, J as dx, w as ux, E as fx, ae as hx, I as mx, s as px, a1 as gx, ag as bx, af as vx, U as xx, aj as yx, F as wx, _ as Nx, X as Cx, N as Ix, al as Sx, Q as kx, $ as Tx, a0 as Rx, x as Ex, ah as Lx, ai as zx, T as Ax, a2 as Fx, ab as Px, ad as Mx, y as Ox, D as Dx, G as Bx, Y as _x, ak as Hx, Z as $x, W as Wx, am as jx, z as Vx, H as Ux, o as Gx, q as Kx, a7 as qx, a8 as Yx, a5 as Xx, ac as Qx, K as Jx, a9 as Zx, a6 as e1, aa as t1 } from "./index-B00tg7uM.js";
|
|
8
8
|
import ru from "react-dom";
|
|
9
9
|
const ou = Sl("Search", [
|
|
10
10
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
@@ -8425,7 +8425,7 @@ const $h = {
|
|
|
8425
8425
|
] })
|
|
8426
8426
|
] }) });
|
|
8427
8427
|
}, Jh = tn(
|
|
8428
|
-
() => import("./index-
|
|
8428
|
+
() => import("./index-BjppyLWI.js").then((e) => e.i).then((e) => ({
|
|
8429
8429
|
default: e.F0PdfViewer
|
|
8430
8430
|
}))
|
|
8431
8431
|
), Zh = () => {
|
|
@@ -12641,7 +12641,7 @@ const Wp = (e) => {
|
|
|
12641
12641
|
}
|
|
12642
12642
|
)
|
|
12643
12643
|
] });
|
|
12644
|
-
}, Jp = tn(() => import("./ChatPdfThumbnail-
|
|
12644
|
+
}, Jp = tn(() => import("./ChatPdfThumbnail-C6f0btcZ.js")), Zp = tn(() => import("./ChatSheetThumbnail-BvnxT-4A.js")), eg = tn(() => import("./ChatDocxThumbnail-DzNPNFya.js")), tg = tn(() => import("./ChatTextThumbnail-yVt_iYi7.js")), Fr = 288, ng = 160, rg = (e) => {
|
|
12645
12645
|
const [t, r] = $(!1);
|
|
12646
12646
|
return te(() => {
|
|
12647
12647
|
const o = e.current;
|
package/dist/f0.d.ts
CHANGED
|
@@ -1268,6 +1268,38 @@ export declare type AttachedFile = {
|
|
|
1268
1268
|
errorMessage?: string;
|
|
1269
1269
|
};
|
|
1270
1270
|
|
|
1271
|
+
/**
|
|
1272
|
+
* Structured detail content for {@link F0AudioPlayerCardProps.content}.
|
|
1273
|
+
*
|
|
1274
|
+
* Pass a `summary` and/or a `transcription` string and the card builds the
|
|
1275
|
+
* tabbed "View detail" panel for you, with labels pulled from translations
|
|
1276
|
+
* (`audioPlayer.summary` / `audioPlayer.transcription`) — you no longer wire up
|
|
1277
|
+
* the tabs yourself as with the deprecated `details` array.
|
|
1278
|
+
*
|
|
1279
|
+
* A transcription is what makes an audio-only recording accessible
|
|
1280
|
+
* (WCAG 2.1 SC 1.2.1, Audio-only). When you omit `transcription`, the card
|
|
1281
|
+
* still tries to derive one from the audio file's own text tracks; if none can
|
|
1282
|
+
* be passed or derived, the recording is flagged in the accessibility checks.
|
|
1283
|
+
*
|
|
1284
|
+
* Both fields are localizable — pass a per-locale list
|
|
1285
|
+
* (`[{ locale, label?, value }]`) to offer several languages, and a language
|
|
1286
|
+
* selector appears in the detail panel (a single selection drives both tabs).
|
|
1287
|
+
*/
|
|
1288
|
+
export declare interface AudioPlayerContent {
|
|
1289
|
+
/**
|
|
1290
|
+
* Plain-text summary of the recording, shown in the "Summary" tab.
|
|
1291
|
+
* Localizable.
|
|
1292
|
+
*/
|
|
1293
|
+
summary?: Localized<string>;
|
|
1294
|
+
/**
|
|
1295
|
+
* Plain-text transcription of the recording, shown in the "Transcription"
|
|
1296
|
+
* tab. Line breaks are preserved. When omitted, the card attempts to derive
|
|
1297
|
+
* a transcription from the audio file's embedded/attached text tracks.
|
|
1298
|
+
* Localizable.
|
|
1299
|
+
*/
|
|
1300
|
+
transcription?: Localized<string>;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1271
1303
|
export declare interface AudioPlayerControls extends AudioPlayerState {
|
|
1272
1304
|
play: () => void;
|
|
1273
1305
|
pause: () => void;
|
|
@@ -1276,6 +1308,11 @@ export declare interface AudioPlayerControls extends AudioPlayerState {
|
|
|
1276
1308
|
setPlaybackRate: (rate: number) => void;
|
|
1277
1309
|
}
|
|
1278
1310
|
|
|
1311
|
+
/**
|
|
1312
|
+
* @deprecated Prefer the structured `content` prop
|
|
1313
|
+
* ({@link AudioPlayerContent}). The raw tab array is still honoured for now for
|
|
1314
|
+
* backward compatibility, but will be removed in a future release.
|
|
1315
|
+
*/
|
|
1279
1316
|
export declare interface AudioPlayerDetailTab {
|
|
1280
1317
|
/** Stable value used to identify the tab. */
|
|
1281
1318
|
value: string;
|
|
@@ -4529,7 +4566,15 @@ export declare const defaultTranslations: {
|
|
|
4529
4566
|
readonly position: "{{current}} of {{total}}";
|
|
4530
4567
|
readonly viewDetail: "View detail";
|
|
4531
4568
|
readonly hideDetail: "Hide detail";
|
|
4569
|
+
readonly viewTranscription: "View transcription";
|
|
4570
|
+
readonly hideTranscription: "Hide transcription";
|
|
4571
|
+
readonly viewSummary: "View summary";
|
|
4572
|
+
readonly hideSummary: "Hide summary";
|
|
4532
4573
|
readonly details: "Recording details";
|
|
4574
|
+
readonly summary: "Summary";
|
|
4575
|
+
readonly transcription: "Transcription";
|
|
4576
|
+
readonly language: "Language";
|
|
4577
|
+
readonly audio: "Audio";
|
|
4533
4578
|
};
|
|
4534
4579
|
readonly actions: {
|
|
4535
4580
|
readonly add: "Add";
|
|
@@ -5346,6 +5391,7 @@ export declare const defaultTranslations: {
|
|
|
5346
5391
|
readonly paused: "Paused";
|
|
5347
5392
|
readonly mute: "Mute";
|
|
5348
5393
|
readonly unmute: "Unmute";
|
|
5394
|
+
readonly noAudio: "No audio";
|
|
5349
5395
|
readonly volume: "Volume";
|
|
5350
5396
|
readonly seekLabel: "Seek";
|
|
5351
5397
|
readonly enterFullscreen: "Enter fullscreen";
|
|
@@ -5353,6 +5399,12 @@ export declare const defaultTranslations: {
|
|
|
5353
5399
|
readonly playbackSpeed: "Playback speed ({{rate}})";
|
|
5354
5400
|
readonly playbackSpeedLabel: "Playback speed";
|
|
5355
5401
|
readonly timeProgress: "{{current}} of {{total}}";
|
|
5402
|
+
readonly captions: "Captions";
|
|
5403
|
+
readonly audioDescription: "Audio description";
|
|
5404
|
+
readonly audio: "Audio";
|
|
5405
|
+
readonly subtitles: "Subtitles";
|
|
5406
|
+
readonly settings: "Settings";
|
|
5407
|
+
readonly off: "Off";
|
|
5356
5408
|
};
|
|
5357
5409
|
};
|
|
5358
5410
|
|
|
@@ -7113,10 +7165,23 @@ export declare interface F0AudioPlayerCardProps extends F0AudioPlayerProps {
|
|
|
7113
7165
|
* is always rendered by the card.
|
|
7114
7166
|
*/
|
|
7115
7167
|
actions?: AudioPlayerMenuAction[];
|
|
7168
|
+
/**
|
|
7169
|
+
* Structured detail content revealed by a "View detail" toggle in the header:
|
|
7170
|
+
* a `summary` and/or a `transcription`. The card renders the tabs with
|
|
7171
|
+
* translated labels. Providing a `transcription` (or shipping one in the
|
|
7172
|
+
* audio file) keeps the recording accessible. Takes precedence over the
|
|
7173
|
+
* deprecated `details` prop when both are set.
|
|
7174
|
+
*/
|
|
7175
|
+
content?: AudioPlayerContent;
|
|
7116
7176
|
/**
|
|
7117
7177
|
* Tabbed detail content revealed by a "View detail" toggle in the header
|
|
7118
7178
|
* (e.g. a Summary and a Transcript tab). When omitted or empty, no toggle and
|
|
7119
7179
|
* no panel are rendered and the card behaves like a plain recording player.
|
|
7180
|
+
*
|
|
7181
|
+
* @deprecated Use the structured {@link F0AudioPlayerCardProps.content} prop
|
|
7182
|
+
* instead (`{ summary, transcription }`). This raw tab array is still
|
|
7183
|
+
* honoured for backward compatibility but will be removed in a future
|
|
7184
|
+
* release.
|
|
7120
7185
|
*/
|
|
7121
7186
|
details?: AudioPlayerDetailTab[];
|
|
7122
7187
|
/**
|
|
@@ -7146,8 +7211,19 @@ export declare interface F0AudioPlayerProps extends WithDataTestIdProps, DataAtt
|
|
|
7146
7211
|
* the URL the first time playback is requested. Use the function form for
|
|
7147
7212
|
* on-demand credentials (e.g. presigned URLs) so the URL is only fetched on
|
|
7148
7213
|
* user intent.
|
|
7214
|
+
*
|
|
7215
|
+
* Localizable — pass a per-locale list of dubbed recordings to offer
|
|
7216
|
+
* selectable audio languages; a language selector then appears (in the card's
|
|
7217
|
+
* kebab menu, or inline on the bare player).
|
|
7218
|
+
*/
|
|
7219
|
+
src: Localized<string | (() => Promise<string>)>;
|
|
7220
|
+
/**
|
|
7221
|
+
* Initial language for localized content — the audio `src` and, on the card,
|
|
7222
|
+
* the detail `content` (summary/transcription). Matched against the provided
|
|
7223
|
+
* locales exactly or by primary subtag, then the viewer's browser language,
|
|
7224
|
+
* then the first provided. Only relevant when more than one language is given.
|
|
7149
7225
|
*/
|
|
7150
|
-
|
|
7226
|
+
defaultLanguage?: string;
|
|
7151
7227
|
/**
|
|
7152
7228
|
* Known total duration in seconds. Lets the player show the total time and an
|
|
7153
7229
|
* active seek bar before the audio loads (e.g. with `preload="none"`).
|
|
@@ -11973,11 +12049,54 @@ export declare const F0VideoPlayer: WithDataTestIdReturnType_3<typeof F0VideoPla
|
|
|
11973
12049
|
* useRestrictForwardSeek → blocks seeking past the furthest-watched point.
|
|
11974
12050
|
* <Controls> → presentation only; interactions delegated back here.
|
|
11975
12051
|
*/
|
|
11976
|
-
declare function F0VideoPlayerInternal({ src, autoPlay, autoFocus, restrictForwardSeek, onTrackAction, onMilestone, onComplete, ...dataAttributes }: F0VideoPlayerProps): JSX_2.Element;
|
|
12052
|
+
declare function F0VideoPlayerInternal({ src, poster, silent, persistControls, content, defaultLanguage, autoPlay, autoFocus, restrictForwardSeek, onTrackAction, onMilestone, onComplete, ...dataAttributes }: F0VideoPlayerProps): JSX_2.Element;
|
|
11977
12053
|
|
|
11978
12054
|
export declare interface F0VideoPlayerProps extends DataAttributes_2 {
|
|
11979
|
-
/**
|
|
11980
|
-
|
|
12055
|
+
/**
|
|
12056
|
+
* Video source URL. Localizable — pass a per-locale list of dubbed renditions
|
|
12057
|
+
* to offer selectable audio languages; an "Audio" selector then appears,
|
|
12058
|
+
* independent of the subtitle/caption language.
|
|
12059
|
+
*/
|
|
12060
|
+
src: Localized<string>;
|
|
12061
|
+
/**
|
|
12062
|
+
* Initial language for localized content, matched against the provided
|
|
12063
|
+
* locales exactly or by primary subtag, then the viewer's browser language,
|
|
12064
|
+
* then the first provided. Applies to both the audio (`src`) and the text
|
|
12065
|
+
* (`content`) language selections. Only relevant when more than one language
|
|
12066
|
+
* is available.
|
|
12067
|
+
*/
|
|
12068
|
+
defaultLanguage?: string;
|
|
12069
|
+
/**
|
|
12070
|
+
* Image URL shown while the video loads and before playback starts (the
|
|
12071
|
+
* native `<video>` poster). Cleared by the browser once playback begins.
|
|
12072
|
+
*/
|
|
12073
|
+
poster?: string;
|
|
12074
|
+
/**
|
|
12075
|
+
* Marks the video as having no audio (video-only). Captions (WCAG 2.1
|
|
12076
|
+
* SC 1.2.2) don't apply to silent media, so this exempts the player from the
|
|
12077
|
+
* captions requirement — `data-video-captions` is set to `"no-audio"` instead
|
|
12078
|
+
* of `"missing"`. Note video-only content may still need a text/audio
|
|
12079
|
+
* alternative for its visual information (SC 1.2.1) — audio description still
|
|
12080
|
+
* works over a silent video (its description audio plays even though the video
|
|
12081
|
+
* itself is muted). Browsers can't reliably detect the absence of audio before
|
|
12082
|
+
* playback, so this is declared explicitly.
|
|
12083
|
+
* @default false
|
|
12084
|
+
*/
|
|
12085
|
+
silent?: boolean;
|
|
12086
|
+
/**
|
|
12087
|
+
* Structured content for the player. Currently carries `captions` (a WebVTT
|
|
12088
|
+
* URL or raw WebVTT string) shown over the video during playback and
|
|
12089
|
+
* toggled with the "CC" control. When `captions` is omitted, captions
|
|
12090
|
+
* embedded in the video file are used instead.
|
|
12091
|
+
*/
|
|
12092
|
+
content?: VideoPlayerContent;
|
|
12093
|
+
/**
|
|
12094
|
+
* Keep the controls bar visible during playback instead of auto-hiding it.
|
|
12095
|
+
* By default the controls show while the video is paused and auto-hide while
|
|
12096
|
+
* it plays (revealing on hover or keyboard focus); set this to keep them
|
|
12097
|
+
* visible the whole time. Default `false`.
|
|
12098
|
+
*/
|
|
12099
|
+
persistControls?: boolean;
|
|
11981
12100
|
/** Start playing on mount. Default `false`. */
|
|
11982
12101
|
autoPlay?: boolean;
|
|
11983
12102
|
/** Focus the player on mount so keyboard shortcuts work immediately. Default `false`. */
|
|
@@ -13702,6 +13821,26 @@ export declare interface LoadingStateProps {
|
|
|
13702
13821
|
label: string;
|
|
13703
13822
|
}
|
|
13704
13823
|
|
|
13824
|
+
/** A single value, or the same value provided in multiple languages. */
|
|
13825
|
+
declare type Localized<T> = T | LocalizedOption<T>[];
|
|
13826
|
+
|
|
13827
|
+
/**
|
|
13828
|
+
* Shared helpers for content that can be provided in one language (a plain
|
|
13829
|
+
* value) or several (a list of per-locale entries) — used by the media players
|
|
13830
|
+
* for captions, descriptions, transcriptions and summaries.
|
|
13831
|
+
*/
|
|
13832
|
+
declare interface LocalizedOption<T> {
|
|
13833
|
+
/** BCP-47 language tag, e.g. `"en"`, `"es"`, `"en-US"`. */
|
|
13834
|
+
locale: string;
|
|
13835
|
+
/**
|
|
13836
|
+
* Display label for the language picker. Defaults to the language name for
|
|
13837
|
+
* `locale` (via `Intl.DisplayNames`), so this is only needed to override it.
|
|
13838
|
+
*/
|
|
13839
|
+
label?: string;
|
|
13840
|
+
/** The value for this locale. */
|
|
13841
|
+
value: T;
|
|
13842
|
+
}
|
|
13843
|
+
|
|
13705
13844
|
export declare type LockedQuestionNotice = {
|
|
13706
13845
|
description: string;
|
|
13707
13846
|
};
|
|
@@ -17702,6 +17841,26 @@ export declare interface UseDataSourceItemNavigationReturn<R extends RecordType>
|
|
|
17702
17841
|
previousItemUrl: string | null;
|
|
17703
17842
|
}
|
|
17704
17843
|
|
|
17844
|
+
/**
|
|
17845
|
+
* Derives a transcription from the audio element's text tracks, so a recording
|
|
17846
|
+
* that ships its own transcript surfaces one even when the consumer doesn't
|
|
17847
|
+
* pass `content.transcription`.
|
|
17848
|
+
*
|
|
17849
|
+
* Tracks are read in-band-first (embedded in the file), then from out-of-band
|
|
17850
|
+
* `<track>` children as a fallback — both live on `audio.textTracks`. Cues load
|
|
17851
|
+
* asynchronously, so the hook watches for tracks and cue changes and re-reads
|
|
17852
|
+
* until it finds text.
|
|
17853
|
+
*
|
|
17854
|
+
* @param audioRef ref to the player's `<audio>` element
|
|
17855
|
+
* @param currentSrc the resolved source URL; derivation restarts when it
|
|
17856
|
+
* changes so a new file's tracks replace the old ones
|
|
17857
|
+
* @param enabled when `false`, derivation is skipped (e.g. a transcription
|
|
17858
|
+
* was already passed explicitly) and the hook returns
|
|
17859
|
+
* `undefined`
|
|
17860
|
+
* @returns the joined cue text, or `undefined` while none is available
|
|
17861
|
+
*/
|
|
17862
|
+
export declare const useDerivedTranscription: (audioRef: RefObject<HTMLAudioElement>, currentSrc: string | undefined, enabled: boolean) => string | undefined;
|
|
17863
|
+
|
|
17705
17864
|
export declare function useDndEvents(handler: (e: {
|
|
17706
17865
|
phase: "start" | "over" | "drop" | "cancel";
|
|
17707
17866
|
source: DragPayload;
|
|
@@ -18293,6 +18452,56 @@ showRatio?: boolean;
|
|
|
18293
18452
|
valueFormatter?: (value: string | number | undefined) => string | number;
|
|
18294
18453
|
} & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>>;
|
|
18295
18454
|
|
|
18455
|
+
/**
|
|
18456
|
+
* Structured content for the video player.
|
|
18457
|
+
*
|
|
18458
|
+
* Every field accepts either a single value or a localized list
|
|
18459
|
+
* (`[{ locale, label?, value }]`) — pass several languages and a language
|
|
18460
|
+
* selector appears in the controls. A single shared selection drives captions,
|
|
18461
|
+
* descriptions and the described source together (each falls back to its first
|
|
18462
|
+
* entry for languages it doesn't provide). See `F0VideoPlayerProps.defaultLanguage`.
|
|
18463
|
+
*
|
|
18464
|
+
* `captions` are timed text shown over the video during playback (WCAG 2.1
|
|
18465
|
+
* SC 1.2.2, Captions). Pass either a WebVTT resource URL or a raw WebVTT string
|
|
18466
|
+
* (the player turns raw VTT into a blob track, so no CORS setup is needed); a
|
|
18467
|
+
* remote URL requires the video host to allow cross-origin reads. When omitted,
|
|
18468
|
+
* the player uses any caption/subtitle track embedded in the video file. A
|
|
18469
|
+
* captions toggle in the controls shows/hides them (a filled glyph when on, a
|
|
18470
|
+
* line glyph when off).
|
|
18471
|
+
*
|
|
18472
|
+
* Audio description (WCAG 2.1 SC 1.2.5) conveys on-screen visual information as
|
|
18473
|
+
* audio, complementary to captions — both are independent and can be on at
|
|
18474
|
+
* once. Provide it in one of two ways, toggled with the audio-description
|
|
18475
|
+
* control (a filled "AD" badge when on, a line badge when off):
|
|
18476
|
+
* - `describedSrc`: a pre-produced media rendition with description mixed into
|
|
18477
|
+
* the audio. Toggling swaps the source, preserving position and play state.
|
|
18478
|
+
* Highest quality; assumed the same length as `src`.
|
|
18479
|
+
* - `descriptions`: a WebVTT `kind="descriptions"` script (URL or raw VTT),
|
|
18480
|
+
* delivered at runtime — the video pauses on each cue so the description can
|
|
18481
|
+
* be spoken (extended audio description), then resumes. Used only when
|
|
18482
|
+
* `describedSrc` is absent.
|
|
18483
|
+
*/
|
|
18484
|
+
export declare interface VideoPlayerContent {
|
|
18485
|
+
/**
|
|
18486
|
+
* WebVTT URL, or raw WebVTT content, for captions shown during playback.
|
|
18487
|
+
* Localizable — pass a per-locale list to offer captions in several languages.
|
|
18488
|
+
*/
|
|
18489
|
+
captions?: Localized<string>;
|
|
18490
|
+
/**
|
|
18491
|
+
* A pre-produced described media source (description mixed into the audio),
|
|
18492
|
+
* swapped in when audio description is enabled. Takes precedence over
|
|
18493
|
+
* `descriptions`. Should match `src`'s duration so the position carries
|
|
18494
|
+
* across the swap. Localizable.
|
|
18495
|
+
*/
|
|
18496
|
+
describedSrc?: Localized<string>;
|
|
18497
|
+
/**
|
|
18498
|
+
* WebVTT URL, or raw WebVTT content, of a `kind="descriptions"` script.
|
|
18499
|
+
* Delivered at runtime with extended (pausing) audio description when no
|
|
18500
|
+
* `describedSrc` is provided. Localizable.
|
|
18501
|
+
*/
|
|
18502
|
+
descriptions?: Localized<string>;
|
|
18503
|
+
}
|
|
18504
|
+
|
|
18296
18505
|
declare type VisualizacionTypeDefinition<Props, Settings = Record<string, never>> = {
|
|
18297
18506
|
render: (props: Props) => JSX.Element;
|
|
18298
18507
|
name: string;
|