@factorialco/f0-react 4.74.0 → 4.75.1

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.
@@ -11926,10 +11926,8 @@ declare module "@tiptap/core" {
11926
11926
 
11927
11927
  declare module "@tiptap/core" {
11928
11928
  interface Commands<ReturnType> {
11929
- videoEmbed: {
11930
- setVideoEmbed: (options: {
11931
- src: string;
11932
- }) => ReturnType;
11929
+ transcript: {
11930
+ insertTranscript: (data: TranscriptData) => ReturnType;
11933
11931
  };
11934
11932
  }
11935
11933
  }
@@ -11937,8 +11935,10 @@ declare module "@tiptap/core" {
11937
11935
 
11938
11936
  declare module "@tiptap/core" {
11939
11937
  interface Commands<ReturnType> {
11940
- transcript: {
11941
- insertTranscript: (data: TranscriptData) => ReturnType;
11938
+ videoEmbed: {
11939
+ setVideoEmbed: (options: {
11940
+ src: string;
11941
+ }) => ReturnType;
11942
11942
  };
11943
11943
  }
11944
11944
  }
@@ -3,8 +3,8 @@ import { cY as d1, cX as u1, d8 as f1, cU as m1, cV as h1, cO as p1, cP as g1, c
3
3
  import { jsx as n, jsxs as h, Fragment as Fe } from "react/jsx-runtime";
4
4
  import Y, { forwardRef as Oe, useRef as D, useTransition as bu, useState as B, useLayoutEffect as $n, useId as Ln, useContext as zt, createContext as ht, useEffect as q, useCallback as U, useMemo as de, Fragment as _t, isValidElement as vu, cloneElement as hs, Suspense as Er, lazy as sn, createElement as rr, memo as ps, Children as gs } from "react";
5
5
  import { d as S, T as xu, a as yu, b as wu, f as qe, c as Nu, u as Cu } from "./tooltip-Cik7KBQT.js";
6
- import { C as Iu, P as ku, E as Su, a as jo, b as Hn, M as Tu, p as Ru, c as Eu, R as Ti, e as bs, u as Lu, f as zu, g as Au, h as Fu, i as Pu, j as Mu, O as vs, k as xs, S as Ou, A as Du, B as Bu, L as _u, l as $u, V as Hu, m as Wu, n as ju, o as Uu } from "./index-C37Recuv.js";
7
- import { a5 as H1, a6 as W1, v as j1, w as U1, s as V1, N as G1, x as K1, H as q1, ag as Y1, K as X1, t as J1, a3 as Q1, ai as Z1, ah as ey, X as ty, al as ny, F as ry, a0 as oy, Z as iy, T as ay, an as sy, U as ly, a1 as cy, a2 as dy, y as uy, aj as fy, ak as my, W as hy, a4 as py, ad as gy, af as by, z as vy, G as xy, I as yy, _ as wy, am as Ny, $ as Cy, Y as Iy, ao as ky, D as Sy, J as Ty, q as Ry, r as Ey, a9 as Ly, aa as zy, a7 as Ay, ae as Fy, Q as Py, ab as My, a8 as Oy, ac as Dy } from "./index-C37Recuv.js";
6
+ import { C as Iu, P as ku, E as Su, a as jo, b as Hn, M as Tu, p as Ru, c as Eu, R as Ti, e as bs, u as Lu, f as zu, g as Au, h as Fu, i as Pu, j as Mu, O as vs, k as xs, S as Ou, A as Du, B as Bu, L as _u, l as $u, V as Hu, m as Wu, n as ju, o as Uu } from "./index-D2DZqULg.js";
7
+ import { a5 as H1, a6 as W1, v as j1, w as U1, s as V1, N as G1, x as K1, H as q1, ag as Y1, K as X1, t as J1, a3 as Q1, ai as Z1, ah as ey, X as ty, al as ny, F as ry, a0 as oy, Z as iy, T as ay, an as sy, U as ly, a1 as cy, a2 as dy, y as uy, aj as fy, ak as my, W as hy, a4 as py, ad as gy, af as by, z as vy, G as xy, I as yy, _ as wy, am as Ny, $ as Cy, Y as Iy, ao as ky, D as Sy, J as Ty, q as Ry, r as Ey, a9 as Ly, aa as zy, a7 as Ay, ae as Fy, Q as Py, ab as My, a8 as Oy, ac as Dy } from "./index-D2DZqULg.js";
8
8
  import Vu from "react-dom";
9
9
  const Gu = mc("Search", [
10
10
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
@@ -7911,7 +7911,7 @@ const ul = () => Vt(rl, "useChatJump"), tp = () => Vt(ol, "useChatHighlightedId"
7911
7911
  }, Pr = (e, t) => {
7912
7912
  const r = document.createElement("a");
7913
7913
  r.href = e, r.download = t, r.rel = "noreferrer", r.click();
7914
- }, ip = sn(() => import("./ChatPdfThumbnail-BfB6Exsr.js")), ap = sn(() => import("./ChatSheetThumbnail-BvnxT-4A.js")), sp = sn(() => import("./ChatDocxThumbnail-DzNPNFya.js")), lp = sn(() => import("./ChatTextThumbnail-yVt_iYi7.js")), cp = 288, dp = 160, up = (e) => {
7914
+ }, ip = sn(() => import("./ChatPdfThumbnail-CXn_J7EK.js")), ap = sn(() => import("./ChatSheetThumbnail-BvnxT-4A.js")), sp = sn(() => import("./ChatDocxThumbnail-DzNPNFya.js")), lp = sn(() => import("./ChatTextThumbnail-yVt_iYi7.js")), cp = 288, dp = 160, up = (e) => {
7915
7915
  const [t, r] = B(!1);
7916
7916
  return q(() => {
7917
7917
  const o = e.current;
@@ -9954,7 +9954,7 @@ const Ep = {
9954
9954
  ] })
9955
9955
  ] }) });
9956
9956
  }, Hp = sn(
9957
- () => import("./index-C2nsiu-X.js").then((e) => e.i).then((e) => ({
9957
+ () => import("./index-Bco5bzTE.js").then((e) => e.i).then((e) => ({
9958
9958
  default: e.F0PdfViewer
9959
9959
  }))
9960
9960
  ), Wp = () => {
package/dist/f0.d.ts CHANGED
@@ -14769,7 +14769,7 @@ declare type OnChangeQuestionParams = BaseQuestionOnChangeParams & ({
14769
14769
  value?: string | null;
14770
14770
  } | {
14771
14771
  type: "rating";
14772
- value: number;
14772
+ value?: number;
14773
14773
  options?: {
14774
14774
  value: number;
14775
14775
  label: string;
@@ -18909,10 +18909,8 @@ declare module "@tiptap/core" {
18909
18909
 
18910
18910
  declare module "@tiptap/core" {
18911
18911
  interface Commands<ReturnType> {
18912
- videoEmbed: {
18913
- setVideoEmbed: (options: {
18914
- src: string;
18915
- }) => ReturnType;
18912
+ transcript: {
18913
+ insertTranscript: (data: TranscriptData) => ReturnType;
18916
18914
  };
18917
18915
  }
18918
18916
  }
@@ -18920,8 +18918,10 @@ declare module "@tiptap/core" {
18920
18918
 
18921
18919
  declare module "@tiptap/core" {
18922
18920
  interface Commands<ReturnType> {
18923
- transcript: {
18924
- insertTranscript: (data: TranscriptData) => ReturnType;
18921
+ videoEmbed: {
18922
+ setVideoEmbed: (options: {
18923
+ src: string;
18924
+ }) => ReturnType;
18925
18925
  };
18926
18926
  }
18927
18927
  }
package/dist/f0.js CHANGED
@@ -7,12 +7,12 @@ import { D as HF, E as WF, G as UF, H as _d, I as Ab, J as DN, K as AN, L as Zn,
7
7
  import { A as vde, C as pde, t as gde, s as mde, v as yde, y as _de, l as bde, i as xde, q as wde, z as Sde, B as Cde, p as Tde, r as Dde, j as Ade, e as Mde, g as Ede, k as Lde, T as Nde, w as Ide, h as kde, a as Pde, n as Rde, m as Ode, o as Bde, b as zde, f as Vde, x as Fde, c as Gde, d as Hde, u as Wde } from "./F0AiProcessingOverlay-BBVFRBSW.js";
8
8
  import { d as te, u as rf, h as KF, i as Ys, P as nf, g as Vl, j as QF, f as Pa } from "./tooltip-Cik7KBQT.js";
9
9
  import { createPortal as qv } from "react-dom";
10
- import { C as JF, ap as e5, aq as t5, ar as r5, as as Tw, at as n5, au as i5, av as a5, aw as o5, ax as s5, ay as l5, az as u5, j as c5, F as MN, aA as f5, aB as h5, aC as d5, aD as v5, aE as p5, aF as EN, aG as g5, aH as Zv, aI as Va, aJ as m5, aK as Mb, aL as Eb, K as y5, aM as _5, aN as hs, aO as LN, aP as b5, aQ as x5, aR as w5, aS as S5, aT as C5, aU as T5, a0 as D5, ag as A5, aV as M5, X as E5, E as L5, a as N5, e as jv, R as Lb, u as Nb, _ as NN, O as Ib, aW as IN, aX as Dw, aY as kb, s as I5, f as kN, a4 as PN, aZ as k5, a_ as P5, a$ as R5, b0 as O5, M as B5 } from "./index-C37Recuv.js";
11
- import { v as $de, w as Yde, N as Xde, x as qde, H as Zde, bm as jde, bl as Kde, bf as Qde, b2 as Jde, b1 as eve, b3 as tve, b4 as rve, b6 as nve, b7 as ive, ai as ave, ah as ove, al as sve, Z as lve, T as uve, an as cve, U as fve, y as hve, bn as dve, aj as vve, ak as pve, W as gve, z as mve, P as yve, G as _ve, I as bve, am as xve, Y as wve, ao as Sve, D as Cve, J as Tve, bp as Dve, q as Ave, r as Mve, be as Eve, bj as Lve, bj as Nve, bk as Ive, ba as kve, b9 as Pve, bo as Rve, ae as Ove, bc as Bve, bd as zve, Q as Vve, bq as Fve, br as Gve, g as Hve, bg as Wve, bh as Uve, bi as $ve, b5 as Yve, bb as Xve, h as qve, k as Zve, b8 as jve, bs as Kve } from "./index-C37Recuv.js";
10
+ import { C as JF, ap as e5, aq as t5, ar as r5, as as Tw, at as n5, au as i5, av as a5, aw as o5, ax as s5, ay as l5, az as u5, j as c5, F as MN, aA as f5, aB as h5, aC as d5, aD as v5, aE as p5, aF as EN, aG as g5, aH as Zv, aI as Va, aJ as m5, aK as Mb, aL as Eb, K as y5, aM as _5, aN as hs, aO as LN, aP as b5, aQ as x5, aR as w5, aS as S5, aT as C5, aU as T5, a0 as D5, ag as A5, aV as M5, X as E5, E as L5, a as N5, e as jv, R as Lb, u as Nb, _ as NN, O as Ib, aW as IN, aX as Dw, aY as kb, s as I5, f as kN, a4 as PN, aZ as k5, a_ as P5, a$ as R5, b0 as O5, M as B5 } from "./index-D2DZqULg.js";
11
+ import { v as $de, w as Yde, N as Xde, x as qde, H as Zde, bm as jde, bl as Kde, bf as Qde, b2 as Jde, b1 as eve, b3 as tve, b4 as rve, b6 as nve, b7 as ive, ai as ave, ah as ove, al as sve, Z as lve, T as uve, an as cve, U as fve, y as hve, bn as dve, aj as vve, ak as pve, W as gve, z as mve, P as yve, G as _ve, I as bve, am as xve, Y as wve, ao as Sve, D as Cve, J as Tve, bp as Dve, q as Ave, r as Mve, be as Eve, bj as Lve, bj as Nve, bk as Ive, ba as kve, b9 as Pve, bo as Rve, ae as Ove, bc as Bve, bd as zve, Q as Vve, bq as Fve, br as Gve, g as Hve, bg as Wve, bh as Uve, bi as $ve, b5 as Yve, bb as Xve, h as qve, k as Zve, b8 as jve, bs as Kve } from "./index-D2DZqULg.js";
12
12
  import { l as Wy, c as RN, d as bd, r as Uy } from "./F0VideoPlayer-C-ZIeH8A.js";
13
13
  import { F as Jve } from "./F0VideoPlayer-C-ZIeH8A.js";
14
- import { F as tpe, p as rpe } from "./index-C2nsiu-X.js";
15
- import { c as ipe } from "./pdfWorker-JTFiOHIh.js";
14
+ import { F as tpe, p as rpe } from "./index-Bco5bzTE.js";
15
+ import { c as ipe } from "./pdfWorker-BRbRmP32.js";
16
16
  import { g as z5 } from "./_commonjsHelpers-ByX85dGu.js";
17
17
  import { utils as al, write as ON } from "./xlsx-CzlURDDb.js";
18
18
  import { defaultTranslations as ope } from "./i18n-provider-defaults.js";
@@ -58192,6 +58192,12 @@ const CL = /* @__PURE__ */ z5(Zse), oV = (r) => {
58192
58192
  value: t + 1,
58193
58193
  label: (t + 1).toString()
58194
58194
  }));
58195
+ // Starts at 0, which makes it the standard eNPS scale.
58196
+ case "0-10":
58197
+ return new Array(11).fill(0).map((e, t) => ({
58198
+ value: t,
58199
+ label: t.toString()
58200
+ }));
58195
58201
  case "emojis":
58196
58202
  return [
58197
58203
  { value: 1, label: "😠" },
@@ -58204,12 +58210,14 @@ const CL = /* @__PURE__ */ z5(Zse), oV = (r) => {
58204
58210
  }, sV = (r) => {
58205
58211
  if (!r || r.length === 0) return null;
58206
58212
  const e = r.length, t = r.every((n) => /^\d+$/.test(n.label.trim()));
58207
- return e === 5 && t ? "1-5" : e === 10 && t ? "1-10" : e === 5 && !t ? "emojis" : null;
58213
+ return e === 5 && t ? "1-5" : e === 10 && t ? "1-10" : e === 11 && t ? "0-10" : e === 5 && !t ? "emojis" : null;
58208
58214
  }, db = (r) => {
58209
58215
  switch (r) {
58210
58216
  case "rating":
58211
58217
  return {
58212
- value: 0,
58218
+ // Undefined rather than 0: on a 0-10 scale a literal 0 would render
58219
+ // the "0" cell as already chosen on an unanswered question.
58220
+ value: void 0,
58213
58221
  options: oV("1-5")
58214
58222
  };
58215
58223
  case "select":
@@ -58717,6 +58725,7 @@ const fw = () => {
58717
58725
  }, Fv = [
58718
58726
  { label: "1 - 5", value: "1-5" },
58719
58727
  { label: "1 - 10", value: "1-10" },
58728
+ { label: "0 - 10", value: "0-10" },
58720
58729
  { label: "Emojis", value: "emojis" }
58721
58730
  ];
58722
58731
  function ele(r, e) {
@@ -58767,7 +58776,9 @@ function cV() {
58767
58776
  r?.({
58768
58777
  id: l,
58769
58778
  type: "rating",
58770
- value: 0,
58779
+ // Clear the selection rather than resetting it to 0, which is a real
58780
+ // option on the 0-10 scale.
58781
+ value: void 0,
58771
58782
  options: oV(T)
58772
58783
  });
58773
58784
  }, m = u === "dropdown-multi" && !!h, y = (T) => {
@@ -59721,7 +59732,9 @@ const AL = {
59721
59732
  n?.({
59722
59733
  id: t.id,
59723
59734
  type: "rating",
59724
- value: e ?? 0,
59735
+ // Passed through untouched: coercing to 0 would mark the "0" cell of a
59736
+ // 0-10 scale as selected just because a label was edited.
59737
+ value: e,
59725
59738
  options: v
59726
59739
  });
59727
59740
  };
@@ -1140,10 +1140,8 @@ declare module "@tiptap/core" {
1140
1140
 
1141
1141
  declare module "@tiptap/core" {
1142
1142
  interface Commands<ReturnType> {
1143
- videoEmbed: {
1144
- setVideoEmbed: (options: {
1145
- src: string;
1146
- }) => ReturnType;
1143
+ transcript: {
1144
+ insertTranscript: (data: TranscriptData) => ReturnType;
1147
1145
  };
1148
1146
  }
1149
1147
  }
@@ -1151,8 +1149,10 @@ declare module "@tiptap/core" {
1151
1149
 
1152
1150
  declare module "@tiptap/core" {
1153
1151
  interface Commands<ReturnType> {
1154
- transcript: {
1155
- insertTranscript: (data: TranscriptData) => ReturnType;
1152
+ videoEmbed: {
1153
+ setVideoEmbed: (options: {
1154
+ src: string;
1155
+ }) => ReturnType;
1156
1156
  };
1157
1157
  }
1158
1158
  }
@@ -1,7 +1,7 @@
1
1
  import { S as L, m as ye, u as Z, n as Se, o as Re, i as ke, j as _e, k as Ne, q as Ce, l as Le, w as Fe, r as Ve, s as Te } from "./F0CanvasPanel-CAY9Mu_e.js";
2
2
  import { jsx as t, jsxs as y } from "react/jsx-runtime";
3
3
  import { lazy as J, forwardRef as ne, Suspense as He, useState as V, useRef as A, useMemo as te, useCallback as w, useEffect as T } from "react";
4
- import { e as Ee, D as Ue, P as je, c as De } from "./pdfWorker-JTFiOHIh.js";
4
+ import { e as Ee, D as Ue, P as je, c as De } from "./pdfWorker-BRbRmP32.js";
5
5
  import { F as We } from "./Printer-BD-FEi_2.js";
6
6
  import { d as ae } from "./tooltip-Cik7KBQT.js";
7
7
  import './index.css';const Oe = ({
@@ -222,7 +222,7 @@ import './index.css';const Oe = ({
222
222
  }), i;
223
223
  };
224
224
  Ee();
225
- const qe = J(() => import("./SheetViewer-D5wIIOUJ.js")), Ge = J(() => import("./DocxViewer-CfzIQe_-.js")), Ze = J(() => import("./TextViewer-BYerZh2M.js")), oe = 48, se = ne(
225
+ const qe = J(() => import("./SheetViewer-BG2EdRon.js")), Ge = J(() => import("./DocxViewer-OG-L4Fwr.js")), Ze = J(() => import("./TextViewer-zInYmR0-.js")), oe = 48, se = ne(
226
226
  (o, a) => {
227
227
  const { kind: e = "pdf", mimeType: i, ...l } = o;
228
228
  if (e === "pdf") return /* @__PURE__ */ t(le, { ref: a, ...l });