@factorialco/f0-react 12.19.0 → 12.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/{ArchiveThumbnail-C6VAmA8m.js → ArchiveThumbnail-B3rbpXVF.js} +1 -1
  2. package/dist/{ArchiveViewer-BazW1aiB.js → ArchiveViewer-e1fxWtqq.js} +2 -2
  3. package/dist/{ChatPostComposerDialog-B0y-__Ze.js → ChatPostComposerDialog-B7KUyMhn.js} +2 -2
  4. package/dist/{CoachmarkProvider-DLRXLziQ.js → CoachmarkProvider-CPaXTd-j.js} +258 -246
  5. package/dist/{CodeThumbnail-CWieoY1L.js → CodeThumbnail-Y5t2jitc.js} +1 -1
  6. package/dist/{CodeViewer-TxnjmBpq.js → CodeViewer-CVZL3m1j.js} +3 -3
  7. package/dist/{DocumentToolbar-DahGBwqk.js → DocumentToolbar-BxucP3u-.js} +1 -1
  8. package/dist/{DocxViewer-D0Y18q6_.js → DocxViewer-BkcBPKQ9.js} +1 -1
  9. package/dist/{F0AiProcessingOverlay-ohDfa0Py.js → F0AiProcessingOverlay-CBkyL1_h.js} +52 -52
  10. package/dist/{F0Alert-jXXSuKRF.js → F0Alert-Rklc_Vxl.js} +1 -1
  11. package/dist/F0AudioPlayer-C4597ZNk.js +2 -0
  12. package/dist/{F0CanvasPanel-CnonRuvY.js → F0CanvasPanel-BuTcey0-.js} +8 -8
  13. package/dist/{F0DocumentViewer-D7haXuNZ.js → F0DocumentViewer-BofWB9ez.js} +1 -1
  14. package/dist/{F0DocumentViewer-Dg4NWXCa.js → F0DocumentViewer-DMutXRO1.js} +2 -2
  15. package/dist/{F0Map-BDieutRV.js → F0Map-moAdMP9K.js} +3 -3
  16. package/dist/{F0VideoPlayer-qlCZpqK5.js → F0VideoPlayer-BF6JEDD9.js} +1 -1
  17. package/dist/F0VideoPlayer-DT-pLuut.js +1 -0
  18. package/dist/{HtmlViewer-CcIgTEz4.js → HtmlViewer-GGtMSGvj.js} +3 -3
  19. package/dist/{Map-Bcgnkg1N.js → Map-1iG6fqM7.js} +3 -3
  20. package/dist/{PdfThumbnail-Bb_lyqOG.js → PdfThumbnail-DXCNIgMo.js} +1 -1
  21. package/dist/{PdfViewer-D6cxjRu6.js → PdfViewer-BFbpiCYO.js} +2 -2
  22. package/dist/{SheetViewer-BYBFxR76.js → SheetViewer-DkxEJy-a.js} +2 -2
  23. package/dist/{TextViewer-BnG61rah.js → TextViewer-C-ciXmbv.js} +1 -1
  24. package/dist/ai.d.ts +2 -2
  25. package/dist/ai.js +2 -2
  26. package/dist/component-status.js +16 -16
  27. package/dist/experimental.d.ts +5 -5
  28. package/dist/experimental.js +6 -6
  29. package/dist/{exports-C7jMRUms.d.ts → exports-uEdbdS0t.d.ts} +32 -32
  30. package/dist/f0.d.ts +3 -3
  31. package/dist/f0.js +6 -6
  32. package/dist/{highlight-pN8V_hHA.js → highlight-CLTEoOBu.js} +1 -1
  33. package/dist/{index-DhHqqZvu.d.ts → index-CeS2Wdhj.d.ts} +21 -21
  34. package/dist/{maplibre-BpImIhom.js → maplibre-53AFhR3J.js} +1 -1
  35. package/dist/{pdfWorker-BnuMhHAU.js → pdfWorker-CbtWjaTA.js} +1 -1
  36. package/dist/{types-zDD6DPqU.d.ts → types-BY2VUBWt.d.ts} +10 -1
  37. package/package.json +1 -1
  38. package/dist/F0AudioPlayer-CH1sHdho.js +0 -2
  39. package/dist/F0VideoPlayer-BOMjuJ6J.js +0 -1
@@ -4,7 +4,7 @@ import { n as c, t as l } from "./skeleton-AC0Fb8zj.js";
4
4
  import { L as u, R as d, i as f, r as p, t as m, u as h, z as g } from "./tooltip-BX4dSfeL.js";
5
5
  import { B as _, Dt as v, E as y, Et as b, F as x, J as S, N as C, O as w, Ot as T, R as E, S as D, St as O, T as k, Tt as A, U as j, X as M, Y as N, _t as P, b as F, bt as I, dt as ee, g as L, h as te, ht as ne, k as re, n as R, pt as ie, r as z, st as ae, t as B, vt as oe, w as se, wt as ce, x as le, xt as ue, yt as de } from "./F0Button-d91IgOnc.js";
6
6
  import { t as fe } from "./LayoutGroup-BGb5jMxE.js";
7
- import { $a as pe, $i as me, $n as he, $r as ge, $s as _e, Aa as ve, Ac as ye, Ai as be, Ao as xe, As as Se, Bi as Ce, Bn as we, Bs as Te, Ca as Ee, Cn as De, Cr as Oe, Da as ke, Dc as Ae, Dn as je, Ds as Me, Ea as Ne, Ec as Pe, En as Fe, Er as Ie, Es as Le, Fa as Re, Fc as ze, Fi as Be, Fn as Ve, Fr as He, Fs as Ue, Gi as We, Gn as Ge, Go as Ke, Hc as qe, Hi as Je, Hn as Ye, Hr as Xe, Ia as Ze, Ic as Qe, Ii as $e, In as et, Ir as tt, Ji as nt, Jn as rt, Jo as it, Js as at, Ki as ot, Kn as st, Ko as ct, La as lt, Lc as ut, Li as dt, Ln as ft, Lo as pt, Lr as mt, Ls as ht, Ma as gt, Mi as _t, Mn as vt, Mr as yt, Na as bt, Nc as xt, Ni as St, Nn as Ct, Ns as wt, Oa as Tt, Oi as Et, On as Dt, Oo as Ot, Os as kt, Pa as At, Pc as jt, Pi as Mt, Pn as Nt, Pr as Pt, Ps as Ft, Qa as It, Qi as Lt, Qn as Rt, Qs as zt, Ra as Bt, Rc as Vt, Ri as Ht, Rn as Ut, Sn as Wt, Sr as Gt, Ss as Kt, Ta as qt, Tc as Jt, Tn as Yt, Ui as Xt, Un as Zt, Us as Qt, Vc as $t, Vi as en, Vn as tn, Vo as nn, Vs as rn, Wi as an, Wn as on, Wo as sn, Ws as cn, Xa as ln, Xi as un, Xn as dn, Xo as fn, Xr as pn, Yi as mn, Yn as hn, Yr as gn, Za as _n, Zi as vn, Zn as yn, Zo as bn, _a as xn, _c as Sn, _i as Cn, _n as wn, _o as Tn, aa as En, ac as eee, ai as tee, ao as nee, ar as ree, ba as iee, bi as aee, bn as Dn, bs as On, ca as oee, cc as see, ci as cee, co as kn, cr as lee, cs as uee, da as An, dn as jn, do as Mn, ds as dee, ea as fee, ec as pee, en as mee, eo as hee, er as Nn, fa as gee, fn as Pn, fo as _ee, fs as Fn, ga as In, gn as Ln, go as Rn, ha as zn, hc as vee, hi as yee, hn as bee, ho as Bn, hr as Vn, ia as Hn, ii as Un, in as xee, io as Wn, ir as See, ja as Gn, ji as Kn, jn as qn, jo as Cee, js as Jn, ka as Yn, kc as wee, ki as Tee, ko as Xn, kr as Eee, la as Dee, lc as Zn, ln as Oee, lo as Qn, lr as kee, ma as $n, mi as Aee, mn as er, mo as jee, na as tr, nc as Mee, ni as Nee, no as Pee, nr as Fee, ns as Iee, oa as Lee, oc as Ree, on as zee, oo as Bee, or as nr, pa as rr, pc as Vee, pi as Hee, pn as Uee, po as ir, qi as Wee, qn as Gee, ra as Kee, rc as qee, ri as ar, ro as Jee, rr as Yee, rs as Xee, si as or, sr as Zee, ss as Qee, ta as sr, tc as $ee, tn as ete, to as tte, tr as nte, ua as rte, uc as cr, un as ite, ur as ate, va as ote, vn as lr, vo as ste, vr as ur, wa as dr, wn as cte, wr as fr, xa as pr, xn as mr, xo as hr, xr as gr, yo as lte, yr as _r, ys as ute, za as dte, zi as fte, zn as vr, zo as pte, zr as mte, zs as yr } from "./F0CanvasPanel-CnonRuvY.js";
7
+ import { $a as pe, $i as me, $n as he, $r as ge, $s as _e, Aa as ve, Ac as ye, Ai as be, Ao as xe, As as Se, Bi as Ce, Bn as we, Bs as Te, Ca as Ee, Cn as De, Cr as Oe, Da as ke, Dc as Ae, Dn as je, Ds as Me, Ea as Ne, Ec as Pe, En as Fe, Er as Ie, Es as Le, Fa as Re, Fc as ze, Fi as Be, Fn as Ve, Fr as He, Fs as Ue, Gi as We, Gn as Ge, Go as Ke, Hc as qe, Hi as Je, Hn as Ye, Hr as Xe, Ia as Ze, Ic as Qe, Ii as $e, In as et, Ir as tt, Ji as nt, Jn as rt, Jo as it, Js as at, Ki as ot, Kn as st, Ko as ct, La as lt, Lc as ut, Li as dt, Ln as ft, Lo as pt, Lr as mt, Ls as ht, Ma as gt, Mi as _t, Mn as vt, Mr as yt, Na as bt, Nc as xt, Ni as St, Nn as Ct, Ns as wt, Oa as Tt, Oi as Et, On as Dt, Oo as Ot, Os as kt, Pa as At, Pc as jt, Pi as Mt, Pn as Nt, Pr as Pt, Ps as Ft, Qa as It, Qi as Lt, Qn as Rt, Qs as zt, Ra as Bt, Rc as Vt, Ri as Ht, Rn as Ut, Sn as Wt, Sr as Gt, Ss as Kt, Ta as qt, Tc as Jt, Tn as Yt, Ui as Xt, Un as Zt, Us as Qt, Vc as $t, Vi as en, Vn as tn, Vo as nn, Vs as rn, Wi as an, Wn as on, Wo as sn, Ws as cn, Xa as ln, Xi as un, Xn as dn, Xo as fn, Xr as pn, Yi as mn, Yn as hn, Yr as gn, Za as _n, Zi as vn, Zn as yn, Zo as bn, _a as xn, _c as Sn, _i as Cn, _n as wn, _o as Tn, aa as En, ac as eee, ai as tee, ao as nee, ar as ree, ba as iee, bi as aee, bn as Dn, bs as On, ca as oee, cc as see, ci as cee, co as kn, cr as lee, cs as uee, da as An, dn as jn, do as Mn, ds as dee, ea as fee, ec as pee, en as mee, eo as hee, er as Nn, fa as gee, fn as Pn, fo as _ee, fs as Fn, ga as In, gn as Ln, go as Rn, ha as zn, hc as vee, hi as yee, hn as bee, ho as Bn, hr as Vn, ia as Hn, ii as Un, in as xee, io as Wn, ir as See, ja as Gn, ji as Kn, jn as qn, jo as Cee, js as Jn, ka as Yn, kc as wee, ki as Tee, ko as Xn, kr as Eee, la as Dee, lc as Zn, ln as Oee, lo as Qn, lr as kee, ma as $n, mi as Aee, mn as er, mo as jee, na as tr, nc as Mee, ni as Nee, no as Pee, nr as Fee, ns as Iee, oa as Lee, oc as Ree, on as zee, oo as Bee, or as nr, pa as rr, pc as Vee, pi as Hee, pn as Uee, po as ir, qi as Wee, qn as Gee, ra as Kee, rc as qee, ri as ar, ro as Jee, rr as Yee, rs as Xee, si as or, sr as Zee, ss as Qee, ta as sr, tc as $ee, tn as ete, to as tte, tr as nte, ua as rte, uc as cr, un as ite, ur as ate, va as ote, vn as lr, vo as ste, vr as ur, wa as dr, wn as cte, wr as fr, xa as pr, xn as mr, xo as hr, xr as gr, yo as lte, yr as _r, ys as ute, za as dte, zi as fte, zn as vr, zo as pte, zr as mte, zs as yr } from "./F0CanvasPanel-BuTcey0-.js";
8
8
  import { n as br, o as xr, r as Sr, t as Cr } from "./F0Icon-DmCBV0gK.js";
9
9
  import { B as hte, F as gte, H as wr, I as _te, O as Tr, P as Er, R as Dr, S as Or, U as kr, V as Ar, _ as jr, b as Mr, c as vte, f as Nr, g as Pr, h as Fr, i as Ir, k as yte, n as Lr, o as bte, r as xte, v as Ste, y as Rr, z as zr } from "./useData-BYkiGUHX.js";
10
10
  import { $ as Cte, $t as Br, B as Vr, Bt as wte, C as Tte, Cr as Hr, Ct as Ete, D as Ur, Dr as Wr, E as Dte, En as Ote, Er as kte, Et as Gr, G as Kr, Gt as qr, H as Jr, Ht as Yr, I as Xr, Jt as Ate, K as Zr, Kt as jte, L as Qr, Lt as Mte, M as $r, Nn as Nte, O as Pte, Or as ei, Ot as ti, Pn as Fte, Q as ni, Qt as ri, R as ii, S as Ite, Sr as ai, St as oi, T as Lte, Tn as si, Tr as Rte, Ut as ci, V as zte, Vt as Bte, Wt as li, X as ui, Xt as Vte, Y as Hte, Yt as Ute, Z as di, Zt as Wte, _n as fi, _t as pi, at as Gte, b as Kte, cn as mi, cr as hi, d as qte, dn as gi, en as Jte, er as Yte, et as _i, f as Xte, ft as Zte, g as Qte, gn as $te, gt as ene, hr as tne, in as vi, it as nne, j as rne, jt as ine, k as ane, kn as one, l as sne, lt as yi, m as cne, mr as lne, n as une, nn as bi, nt as xi, or as Si, ot as dne, p as Ci, pn as fne, qt as pne, r as mne, rn as hne, rt as gne, sn as _ne, st as vne, t as wi, tt as Ti, ur as Ei, ut as yne, vt as bne, x as xne, xn as Sne, xr as Di, xt as Cne, zt as wne } from "./F0Select-CvMv06GW.js";
@@ -18,7 +18,7 @@ import { c as Gne, l as Kne, n as Bi, r as qne } from "./scrollarea-cxaFAWG5.js"
18
18
  import { t as Vi } from "./F0Text-CXHuzMbj.js";
19
19
  import { t as Hi } from "./dist-Cuwaibqg.js";
20
20
  import { i as Jne, r as Yne } from "./dist-DtILhk4w.js";
21
- import { t as Ui } from "./F0Alert-jXXSuKRF.js";
21
+ import { t as Ui } from "./F0Alert-Rklc_Vxl.js";
22
22
  import './RichText.css';import './CoachmarkProvider.css';/* empty css */
23
23
  import { t as Xne } from "./dist-Dt-cTb6D.js";
24
24
  import * as Wi from "react";
@@ -82335,7 +82335,7 @@ var qX = ({ lanes: e, renderCard: t, getKey: n, onCreate: r, onMove: i, idProvid
82335
82335
  })]
82336
82336
  })
82337
82337
  });
82338
- }, o5e = $ne(() => import("./Map-Bcgnkg1N.js").then((e) => ({ default: e.MapCollection }))), ZX = {
82338
+ }, o5e = $ne(() => import("./Map-1iG6fqM7.js").then((e) => ({ default: e.MapCollection }))), ZX = {
82339
82339
  table: {
82340
82340
  name: "Table",
82341
82341
  icon: pte,
@@ -102811,7 +102811,7 @@ var $mt = (e) => {
102811
102811
  })
102812
102812
  })]
102813
102813
  });
102814
- }, rht = (e, t) => e.map((n, r) => /* @__PURE__ */ J(Gi, { children: [n, r < e.length - 1 ? t : null] }, `intersperse-${r}`)), iht = (e) => [
102814
+ }, rht = (e, t) => e.map((n, r) => /* @__PURE__ */ J(Gi, { children: [n, r < e.length - 1 ? t : null] }, `intersperse-${r}`)), iht = (e, t) => [
102815
102815
  {
102816
102816
  key: "bold",
102817
102817
  icon: Ae,
@@ -102834,7 +102834,7 @@ var $mt = (e) => {
102834
102834
  shortcut: ["cmd", "i"]
102835
102835
  }
102836
102836
  },
102837
- {
102837
+ ...t ? [] : [{
102838
102838
  key: "underline",
102839
102839
  icon: Cee,
102840
102840
  label: e.richTextEditor.underline,
@@ -102844,7 +102844,7 @@ var $mt = (e) => {
102844
102844
  label: `_${e.richTextEditor.underline}_`,
102845
102845
  shortcut: ["cmd", "u"]
102846
102846
  }
102847
- },
102847
+ }],
102848
102848
  {
102849
102849
  key: "strike",
102850
102850
  icon: nn,
@@ -102975,14 +102975,18 @@ var $mt = (e) => {
102975
102975
  label: "Justify",
102976
102976
  icon: ze
102977
102977
  }
102978
- ], b4 = Qi(function({ editor: e, isFullscreen: t = !1, disableButtons: n, animationComplete: r = !0, darkMode: i = !1, showEmojiPicker: a = !0, plainHtmlMode: s = !1 }) {
102979
- let c = o(), l = W(() => iht(c), [c]), d = W(() => aht(c), [c]), f = W(() => oht(c, s), [c, s]), p = T2({
102978
+ ], b4 = Qi(function({ editor: e, isFullscreen: t = !1, disableButtons: n, animationComplete: r = !0, darkMode: i = !1, showEmojiPicker: a = !0, plainHtmlMode: s = !1, isMarkdownOnly: c = !1 }) {
102979
+ let l = o(), d = W(() => iht(l, c), [l, c]), f = W(() => aht(l), [l]), p = W(() => oht(l, s || c), [
102980
+ l,
102981
+ s,
102982
+ c
102983
+ ]), m = T2({
102980
102984
  editor: e,
102981
102985
  selector: ({ editor: e }) => ({
102982
102986
  buttons: Object.fromEntries([
102983
- ...l,
102984
102987
  ...d,
102985
- ...f
102988
+ ...f,
102989
+ ...p
102986
102990
  ].map((t) => [t.key, t.active(e)])),
102987
102991
  textAlign: y4.find(({ value: t }) => e.isActive({ textAlign: t }))?.value ?? "left",
102988
102992
  codeBlock: e.isActive("codeBlock"),
@@ -102990,90 +102994,89 @@ var $mt = (e) => {
102990
102994
  blockquote: e.isActive("blockquote"),
102991
102995
  details: e.isActive("details")
102992
102996
  })
102993
- }), m = (t) => /* @__PURE__ */ q("div", {
102997
+ }), h = (t) => /* @__PURE__ */ q("div", {
102994
102998
  className: "flex flex-row items-center gap-0.5",
102995
102999
  children: t.map((t) => /* @__PURE__ */ q(oi, {
102996
103000
  label: t.label,
102997
103001
  icon: t.icon,
102998
- selected: p.buttons[t.key],
103002
+ selected: m.buttons[t.key],
102999
103003
  disabled: n,
103000
103004
  onSelectedChange: () => t.onClick(e)
103001
103005
  }, t.key))
103002
- }), h = m(l), g = m(d), _ = y4.find(({ value: e }) => e === p.textAlign) ?? y4[0], v = /* @__PURE__ */ J("div", {
103006
+ }), g = h(d), _ = h(f), v = y4.find(({ value: e }) => e === m.textAlign) ?? y4[0], y = /* @__PURE__ */ J("div", {
103003
103007
  className: "flex flex-row items-center gap-0.5",
103004
103008
  children: [
103005
- /* @__PURE__ */ q(nht, {
103009
+ c ? null : /* @__PURE__ */ J(oa, { children: [/* @__PURE__ */ q(nht, {
103006
103010
  darkMode: i,
103007
103011
  items: [
103008
103012
  {
103009
- label: c.richTextEditor.left,
103013
+ label: l.richTextEditor.left,
103010
103014
  icon: jt,
103011
103015
  onClick: () => e.chain().focus().setTextAlign("left").run(),
103012
- isActive: p.textAlign === "left"
103016
+ isActive: m.textAlign === "left"
103013
103017
  },
103014
103018
  {
103015
- label: c.richTextEditor.center,
103019
+ label: l.richTextEditor.center,
103016
103020
  icon: Qe,
103017
103021
  onClick: () => e.chain().focus().setTextAlign("center").run(),
103018
- isActive: p.textAlign === "center"
103022
+ isActive: m.textAlign === "center"
103019
103023
  },
103020
103024
  {
103021
- label: c.richTextEditor.right,
103025
+ label: l.richTextEditor.right,
103022
103026
  icon: xt,
103023
103027
  onClick: () => e.chain().focus().setTextAlign("right").run(),
103024
- isActive: p.textAlign === "right"
103028
+ isActive: m.textAlign === "right"
103025
103029
  },
103026
103030
  {
103027
- label: c.richTextEditor.justify,
103031
+ label: l.richTextEditor.justify,
103028
103032
  icon: ze,
103029
103033
  onClick: () => e.chain().focus().setTextAlign("justify").run(),
103030
- isActive: p.textAlign === "justify"
103034
+ isActive: m.textAlign === "justify"
103031
103035
  }
103032
103036
  ],
103033
103037
  disabled: n,
103034
103038
  activator: {
103035
- label: _.label,
103036
- icon: _.icon
103039
+ label: v.label,
103040
+ icon: v.icon
103037
103041
  }
103038
- }),
103039
- /* @__PURE__ */ q(v4, { hidden: !t }),
103040
- m(f),
103042
+ }), /* @__PURE__ */ q(v4, { hidden: !t })] }),
103043
+ h(p),
103041
103044
  /* @__PURE__ */ q(nht, {
103042
103045
  darkMode: i,
103043
103046
  items: [
103044
103047
  {
103045
103048
  icon: Vee,
103046
- label: c.richTextEditor.codeBlock,
103049
+ label: l.richTextEditor.codeBlock,
103047
103050
  onClick: () => e.chain().focus().toggleCodeBlock().run(),
103048
- isActive: p.codeBlock
103051
+ isActive: m.codeBlock
103049
103052
  },
103050
103053
  {
103051
103054
  icon: zr,
103052
- label: c.richTextEditor.divider,
103055
+ label: l.richTextEditor.divider,
103053
103056
  onClick: () => e.chain().focus().setHorizontalRule().run(),
103054
- isActive: p.horizontalRule
103057
+ isActive: m.horizontalRule
103055
103058
  },
103056
103059
  {
103057
103060
  icon: bn,
103058
- label: c.richTextEditor.quote,
103061
+ label: l.richTextEditor.quote,
103059
103062
  onClick: () => e.chain().focus().toggleBlockquote().run(),
103060
- isActive: p.blockquote
103063
+ isActive: m.blockquote
103061
103064
  },
103062
- {
103065
+ ...c ? [] : [{
103063
103066
  icon: wr,
103064
- label: c.richTextEditor.details,
103067
+ label: l.richTextEditor.details,
103065
103068
  onClick: () => e.chain().focus().setDetails().run(),
103066
- isActive: p.details
103067
- }
103069
+ isActive: m.details
103070
+ }]
103068
103071
  ],
103069
103072
  disabled: n,
103070
103073
  activator: {
103071
- label: c.richTextEditor.moreOptions,
103074
+ label: l.richTextEditor.moreOptions,
103072
103075
  icon: Ai
103073
103076
  }
103074
103077
  })
103075
103078
  ]
103076
- }), y = (0, Pl.compact)([
103079
+ }), b = (0, Pl.compact)([
103077
103080
  [/* @__PURE__ */ q(tht, {
103078
103081
  editor: e,
103079
103082
  disabled: n
@@ -103084,15 +103087,15 @@ var $mt = (e) => {
103084
103087
  e.chain().focus().insertContent(t).run();
103085
103088
  }
103086
103089
  }),
103087
- h,
103088
103090
  g,
103089
- v
103091
+ _,
103092
+ y
103090
103093
  ]);
103091
103094
  return /* @__PURE__ */ q("div", {
103092
103095
  className: u("flex flex-row items-start gap-2 overflow-hidden"),
103093
103096
  children: /* @__PURE__ */ q("div", {
103094
103097
  className: u("flex grow flex-row items-center", r ? "scrollbar-macos overflow-x-auto overflow-y-hidden" : "overflow-hidden"),
103095
- children: rht(y, /* @__PURE__ */ q(v4, {}))
103098
+ children: rht(b, /* @__PURE__ */ q(v4, {}))
103096
103099
  })
103097
103100
  });
103098
103101
  }), sht = { modifiers: [{
@@ -103112,12 +103115,12 @@ var $mt = (e) => {
103112
103115
  "top-start",
103113
103116
  "top-end"
103114
103117
  ] }
103115
- }] }, cht = Qi(function({ editorId: e, editor: t, disableButtons: n, isToolbarOpen: r, isFullscreen: i, plainHtmlMode: a = !1, enhance: o }) {
103116
- let s = !!o?.error, c = !!o?.config && !!(o.isLoading || o.isAcceptChangesOpen), l = G(null), [d, f] = K();
103118
+ }] }, cht = Qi(function({ editorId: e, editor: t, disableButtons: n, isToolbarOpen: r, isFullscreen: i, plainHtmlMode: a = !1, isMarkdownOnly: o = !1, enhance: s }) {
103119
+ let c = !!s?.error, l = !!s?.config && !!(s.isLoading || s.isAcceptChangesOpen), d = G(null), [f, p] = K();
103117
103120
  return U(() => {
103118
- if (!l.current) return;
103121
+ if (!d.current) return;
103119
103122
  let e = () => {
103120
- f(l.current?.offsetWidth);
103123
+ p(d.current?.offsetWidth);
103121
103124
  };
103122
103125
  return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
103123
103126
  }, []), /* @__PURE__ */ q(tpt, {
@@ -103133,28 +103136,29 @@ var $mt = (e) => {
103133
103136
  },
103134
103137
  editor: t,
103135
103138
  shouldShow: ({ view: n, state: r, from: i, to: a }) => {
103136
- if (c) return !0;
103137
- let { doc: o, selection: s } = r, { empty: l } = s;
103139
+ if (l) return !0;
103140
+ let { doc: o, selection: s } = r, { empty: c } = s;
103138
103141
  if (s instanceof HQ) return !1;
103139
103142
  let u = !o.textBetween(i, a).length && Q1(r.selection), d = document.getElementById(e)?.contains(document.activeElement);
103140
- return !(!(n.hasFocus() || d) || l || u || !t.isEditable);
103143
+ return !(!(n.hasFocus() || d) || c || u || !t.isEditable);
103141
103144
  },
103142
- children: !r && (!s || c) ? /* @__PURE__ */ J("div", {
103143
- ref: l,
103144
- className: u("dark z-50 flex w-max flex-row items-center gap-1 rounded-md border border-solid border-f1-border bg-f1-background p-1.5 drop-shadow-sm", c && "invisible"),
103145
- children: [o?.config ? /* @__PURE__ */ J(oa, { children: [/* @__PURE__ */ q(N2, {
103146
- enhance: o,
103145
+ children: !r && (!c || l) ? /* @__PURE__ */ J("div", {
103146
+ ref: d,
103147
+ className: u("dark z-50 flex w-max flex-row items-center gap-1 rounded-md border border-solid border-f1-border bg-f1-background p-1.5 drop-shadow-sm", l && "invisible"),
103148
+ children: [s?.config ? /* @__PURE__ */ J(oa, { children: [/* @__PURE__ */ q(N2, {
103149
+ enhance: s,
103147
103150
  disabled: n,
103148
103151
  darkMode: !0,
103149
- menuWidth: d,
103150
- menuContainerRef: l,
103152
+ menuWidth: f,
103153
+ menuContainerRef: d,
103151
103154
  lockToViewportOnLock: !0
103152
103155
  }), /* @__PURE__ */ q(v4, {})] }) : null, /* @__PURE__ */ q(b4, {
103153
103156
  editor: t,
103154
103157
  disableButtons: n,
103155
103158
  darkMode: !0,
103156
103159
  showEmojiPicker: !1,
103157
- plainHtmlMode: a
103160
+ plainHtmlMode: a,
103161
+ isMarkdownOnly: o
103158
103162
  })]
103159
103163
  }) : null
103160
103164
  });
@@ -110585,21 +110589,21 @@ var sSt = ({ aiBlockConfig: e, translations: t, imageUploadConfig: n }) => {
110585
110589
  }) : null
110586
110590
  ]
110587
110591
  });
110588
- }, xSt = ({ editor: e, maxCharacters: t, secondaryAction: n, primaryAction: r, fileInputRef: i, canUseFiles: a, enhance: s, isFullscreen: c, disableButtons: l, disabled: d = !1, setIsToolbarOpen: f, isToolbarOpen: p, plainHtmlMode: m, canRecord: h, recordingStatus: g = "idle", recordingStream: _, onStartRecording: v, onStopRecording: y, onCancelRecording: b }) => {
110589
- let x = o(), [S, C] = K(!1), w = G(null), [T, E] = K(0), [D, O] = K(!1), k = D && !c && !s.isLoading;
110592
+ }, xSt = ({ editor: e, maxCharacters: t, secondaryAction: n, primaryAction: r, fileInputRef: i, canUseFiles: a, enhance: s, isFullscreen: c, disableButtons: l, disabled: d = !1, setIsToolbarOpen: f, isToolbarOpen: p, plainHtmlMode: m, isMarkdownOnly: h, canRecord: g, recordingStatus: _ = "idle", recordingStream: v, onStartRecording: y, onStopRecording: b, onCancelRecording: x }) => {
110593
+ let S = o(), [C, w] = K(!1), T = G(null), [E, D] = K(0), [O, k] = K(!1), A = O && !c && !s.isLoading;
110590
110594
  U(() => {
110591
- w.current && E(w.current.offsetWidth);
110595
+ T.current && D(T.current.offsetWidth);
110592
110596
  let e = () => {
110593
- w.current && E(w.current.offsetWidth);
110597
+ T.current && D(T.current.offsetWidth);
110594
110598
  };
110595
110599
  return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
110596
110600
  }, []);
110597
- let A = T < 500, M = T2({
110601
+ let M = E < 500, N = T2({
110598
110602
  editor: e,
110599
110603
  selector: ({ editor: e }) => e.storage.characterCount?.characters() ?? 0
110600
- }), N = (e) => {
110604
+ }), P = (e) => {
110601
110605
  e.preventDefault(), i?.current ? i.current.click() : document.getElementById(_8)?.click();
110602
- }, P = () => /* @__PURE__ */ q(B, {
110606
+ }, F = () => /* @__PURE__ */ q(B, {
110603
110607
  onClick: (e) => {
110604
110608
  e?.preventDefault(), f(!0);
110605
110609
  },
@@ -110609,21 +110613,21 @@ var sSt = ({ aiBlockConfig: e, translations: t, imageUploadConfig: n }) => {
110609
110613
  disabled: l,
110610
110614
  hideLabel: !0,
110611
110615
  icon: pt
110612
- }), F = () => /* @__PURE__ */ J(oa, { children: [
110613
- h ? /* @__PURE__ */ q(B, {
110614
- label: x.ai.recordAudio,
110616
+ }), I = () => /* @__PURE__ */ J(oa, { children: [
110617
+ g ? /* @__PURE__ */ q(B, {
110618
+ label: S.ai.recordAudio,
110615
110619
  hideLabel: !0,
110616
110620
  icon: Kt,
110617
110621
  variant: "outline",
110618
110622
  disabled: l,
110619
110623
  onClick: (e) => {
110620
- e?.preventDefault(), v?.();
110624
+ e?.preventDefault(), y?.();
110621
110625
  },
110622
- loading: g === "transcribing"
110626
+ loading: _ === "transcribing"
110623
110627
  }) : null,
110624
110628
  a ? /* @__PURE__ */ q(B, {
110625
110629
  icon: uee,
110626
- onClick: N,
110630
+ onClick: P,
110627
110631
  hideLabel: !0,
110628
110632
  label: "Add Attachment",
110629
110633
  variant: "outline",
@@ -110632,55 +110636,55 @@ var sSt = ({ aiBlockConfig: e, translations: t, imageUploadConfig: n }) => {
110632
110636
  s.config && !c ? /* @__PURE__ */ q(N2, {
110633
110637
  enhance: s,
110634
110638
  disabled: l,
110635
- hideLabel: A,
110636
- menuWidth: T,
110637
- menuContainerRef: w,
110638
- onOpenChange: O,
110639
+ hideLabel: M,
110640
+ menuWidth: E,
110641
+ menuContainerRef: T,
110642
+ onOpenChange: k,
110639
110643
  hideReviewPanel: !0
110640
110644
  }) : null,
110641
- t && !A ? /* @__PURE__ */ J("p", {
110645
+ t && !M ? /* @__PURE__ */ J("p", {
110642
110646
  className: "text-sm font-normal text-f1-foreground-secondary",
110643
110647
  children: [
110644
- M,
110648
+ N,
110645
110649
  "/",
110646
110650
  t
110647
110651
  ]
110648
110652
  }) : null
110649
110653
  ] });
110650
- return g === "recording" ? /* @__PURE__ */ J("div", {
110651
- ref: w,
110654
+ return _ === "recording" ? /* @__PURE__ */ J("div", {
110655
+ ref: T,
110652
110656
  className: "flex min-h-[56px] max-w-full items-center gap-3 py-3",
110653
110657
  children: [/* @__PURE__ */ J("div", {
110654
110658
  className: "flex shrink-0 items-center gap-2",
110655
110659
  children: [/* @__PURE__ */ q(B, {
110656
- label: x.ai.cancelRecording,
110660
+ label: S.ai.cancelRecording,
110657
110661
  hideLabel: !0,
110658
110662
  icon: cr,
110659
110663
  variant: "outline",
110660
110664
  size: "md",
110661
110665
  onClick: (e) => {
110662
- e?.preventDefault(), b?.();
110666
+ e?.preventDefault(), x?.();
110663
110667
  }
110664
110668
  }), /* @__PURE__ */ q(B, {
110665
- label: x.ai.stopRecording,
110669
+ label: S.ai.stopRecording,
110666
110670
  hideLabel: !0,
110667
110671
  icon: Oi,
110668
110672
  variant: "default",
110669
110673
  size: "md",
110670
110674
  onClick: (e) => {
110671
- e?.preventDefault(), y?.();
110675
+ e?.preventDefault(), b?.();
110672
110676
  }
110673
110677
  })]
110674
110678
  }), /* @__PURE__ */ q(mee, {
110675
- stream: _ ?? null,
110679
+ stream: v ?? null,
110676
110680
  className: "min-w-0 flex-1",
110677
110681
  anchor: "left"
110678
110682
  })]
110679
110683
  }) : /* @__PURE__ */ J("div", {
110680
- ref: w,
110684
+ ref: T,
110681
110685
  className: "relative flex min-h-[56px] max-w-full items-center gap-2 py-3",
110682
110686
  children: [
110683
- k && s.isAcceptChangesOpen ? /* @__PURE__ */ q("div", {
110687
+ A && s.isAcceptChangesOpen ? /* @__PURE__ */ q("div", {
110684
110688
  className: "absolute inset-x-0 inset-y-0 z-20 flex items-center",
110685
110689
  children: /* @__PURE__ */ q(M2, {
110686
110690
  onSelect: () => {},
@@ -110693,7 +110697,7 @@ var sSt = ({ aiBlockConfig: e, translations: t, imageUploadConfig: n }) => {
110693
110697
  })
110694
110698
  }) : null,
110695
110699
  /* @__PURE__ */ J("div", {
110696
- className: u("relative flex flex-grow items-center gap-2", k && "invisible"),
110700
+ className: u("relative flex flex-grow items-center gap-2", A && "invisible"),
110697
110701
  children: [
110698
110702
  c ? null : /* @__PURE__ */ q(j.div, {
110699
110703
  initial: { width: 0 },
@@ -110703,27 +110707,28 @@ var sSt = ({ aiBlockConfig: e, translations: t, imageUploadConfig: n }) => {
110703
110707
  delay: p ? .15 : 0,
110704
110708
  ease: "easeInOut"
110705
110709
  },
110706
- onAnimationComplete: () => C(p),
110710
+ onAnimationComplete: () => w(p),
110707
110711
  className: u("absolute left-0 top-0 z-10 h-full overflow-hidden", d ? "bg-f1-background-tertiary" : "bg-f1-background"),
110708
110712
  "aria-label": "Rich text editor toolbar",
110709
110713
  children: /* @__PURE__ */ J("div", {
110710
110714
  className: "flex items-start gap-2",
110711
110715
  children: [/* @__PURE__ */ q(B, {
110712
110716
  onClick: (t) => {
110713
- t.preventDefault(), f(!1), C(!1), queueMicrotask(() => e.commands.focus());
110717
+ t.preventDefault(), f(!1), w(!1), queueMicrotask(() => e.commands.focus());
110714
110718
  },
110715
110719
  variant: "neutral",
110716
110720
  size: "md",
110717
110721
  disabled: l,
110718
110722
  hideLabel: !0,
110719
- label: x.actions.close,
110723
+ label: S.actions.close,
110720
110724
  icon: cr
110721
110725
  }), /* @__PURE__ */ q(b4, {
110722
110726
  editor: e,
110723
110727
  isFullscreen: c,
110724
110728
  disableButtons: l,
110725
- animationComplete: S,
110726
- plainHtmlMode: m
110729
+ animationComplete: C,
110730
+ plainHtmlMode: m,
110731
+ isMarkdownOnly: h
110727
110732
  })]
110728
110733
  })
110729
110734
  }),
@@ -110736,20 +110741,20 @@ var sSt = ({ aiBlockConfig: e, translations: t, imageUploadConfig: n }) => {
110736
110741
  delay: p ? 0 : .2,
110737
110742
  ease: "easeInOut"
110738
110743
  },
110739
- children: [P(), F()]
110744
+ children: [F(), I()]
110740
110745
  }),
110741
110746
  c ? /* @__PURE__ */ J("div", {
110742
110747
  className: "flex items-center gap-2",
110743
- children: [p ? null : P(), F()]
110748
+ children: [p ? null : F(), I()]
110744
110749
  }) : null
110745
110750
  ]
110746
110751
  }),
110747
110752
  /* @__PURE__ */ q("div", {
110748
- className: u("contents", k && "invisible"),
110753
+ className: u("contents", A && "invisible"),
110749
110754
  children: /* @__PURE__ */ q(bSt, {
110750
110755
  primaryAction: r,
110751
110756
  secondaryAction: n,
110752
- useLittleMode: A,
110757
+ useLittleMode: M,
110753
110758
  disableButtons: l,
110754
110759
  isFullscreen: c
110755
110760
  })
@@ -110776,28 +110781,29 @@ var sSt = ({ aiBlockConfig: e, translations: t, imageUploadConfig: n }) => {
110776
110781
  className: "font-bold w-full max-w-[824px] text-3xl",
110777
110782
  children: i
110778
110783
  })
110779
- }) : null] }), CSt = ({ mentionsConfig: e, mentionSuggestions: t, setMentionSuggestions: n, placeholder: r, maxCharacters: i, plainHtmlMode: a = !1, variablesConfig: o }) => [
110784
+ }) : null] }), CSt = ({ mentionsConfig: e, mentionSuggestions: t, setMentionSuggestions: n, placeholder: r, maxCharacters: i, plainHtmlMode: a = !1, isMarkdownOnly: o = !1, variablesConfig: s }) => [
110780
110785
  B6,
110781
110786
  Jxt,
110782
- I6,
110783
- P6,
110784
- Myt,
110785
- Oxt,
110787
+ ...o ? [] : [
110788
+ I6,
110789
+ P6,
110790
+ Myt,
110791
+ Oxt
110792
+ ],
110786
110793
  F6,
110787
- L6,
110788
- Hxt,
110794
+ ...o ? [] : [L6, Hxt],
110789
110795
  z6,
110790
110796
  Qxt,
110791
110797
  wxt,
110792
- ...a ? [] : [
110798
+ ...!a && !o ? [
110793
110799
  R6,
110794
110800
  s8,
110795
110801
  N6
110796
- ],
110802
+ ] : [],
110797
110803
  V6(r),
110798
110804
  Lyt(i),
110799
- ...Xyt(t, n, e),
110800
- ...Qbt(o),
110805
+ ...o ? [] : Xyt(t, n, e),
110806
+ ...Qbt(s),
110801
110807
  Byt(r)
110802
110808
  ], wSt = (e, t = 240) => e.current ? e.current.clientHeight >= t : !1, TSt = (e) => {
110803
110809
  if (!e.current) return !0;
@@ -110892,37 +110898,38 @@ var sSt = ({ aiBlockConfig: e, translations: t, imageUploadConfig: n }) => {
110892
110898
  },
110893
110899
  className: "pointer-events-none absolute bottom-10 left-0 right-0 z-[9998] flex w-full items-center justify-center",
110894
110900
  children: e
110895
- }), PSt = ({ visible: e, editor: t, enhance: n, enhanceConfig: r, plainHtmlMode: i, toolbarRef: a, toolbarWidth: s, onClose: c }) => {
110896
- let l = o();
110901
+ }), PSt = ({ visible: e, editor: t, enhance: n, enhanceConfig: r, plainHtmlMode: i, isMarkdownOnly: a, toolbarRef: s, toolbarWidth: c, onClose: l }) => {
110902
+ let u = o();
110897
110903
  return /* @__PURE__ */ q(ce, { children: e ? /* @__PURE__ */ q(NSt, { children: /* @__PURE__ */ q("div", {
110898
- ref: a,
110904
+ ref: s,
110899
110905
  className: "absolute -bottom-4 left-1/2 z-50 max-w-[calc(100%-48px)] -translate-x-1/2 rounded-lg border border-solid border-f1-border-secondary bg-f1-background p-1.5 shadow-md pointer-events-auto",
110900
110906
  children: /* @__PURE__ */ J("div", {
110901
110907
  className: "flex items-center gap-1",
110902
110908
  children: [
110903
110909
  /* @__PURE__ */ q(B, {
110904
110910
  onClick: (e) => {
110905
- e.preventDefault(), c();
110911
+ e.preventDefault(), l();
110906
110912
  },
110907
110913
  variant: "neutral",
110908
110914
  size: "md",
110909
110915
  disabled: n.disableButtons,
110910
110916
  hideLabel: !0,
110911
- label: l.actions.close,
110917
+ label: u.actions.close,
110912
110918
  icon: cr
110913
110919
  }),
110914
110920
  /* @__PURE__ */ q(v4, {}),
110915
110921
  r ? /* @__PURE__ */ J(oa, { children: [/* @__PURE__ */ q(N2, {
110916
110922
  enhance: n,
110917
110923
  disabled: n.disableButtons,
110918
- menuWidth: s,
110919
- menuContainerRef: a
110924
+ menuWidth: c,
110925
+ menuContainerRef: s
110920
110926
  }), /* @__PURE__ */ q(v4, {})] }) : null,
110921
110927
  /* @__PURE__ */ q(b4, {
110922
110928
  editor: t,
110923
110929
  isFullscreen: !0,
110924
110930
  disableButtons: n.disableButtons,
110925
- plainHtmlMode: i
110931
+ plainHtmlMode: i,
110932
+ isMarkdownOnly: a
110926
110933
  })
110927
110934
  ]
110928
110935
  })
@@ -110939,53 +110946,55 @@ var sSt = ({ aiBlockConfig: e, translations: t, imageUploadConfig: n }) => {
110939
110946
  onReject: t.rejectChanges,
110940
110947
  onRetry: t.retryChanges
110941
110948
  })
110942
- }) }) : null }), ISt = Zi(function({ mentionsConfig: e, variablesConfig: t, enhanceConfig: n, filesConfig: r, secondaryAction: i, primaryAction: a, maxCharacters: s, initialEditorState: c, onChange: l, placeholder: d, title: f, height: p = "auto", plainHtmlMode: m = !1, fullScreenMode: h = !0, onFullscreenChange: g, disabled: _ = !1, error: v = !1, loading: y = !1, onTranscribe: b }, x) {
110943
- let S = o(), C = ta(), w = G(null), T = G(null), E = G(null), D = G(null), [O, k] = K(!1), [A, M] = K(!0), [N, P] = K(!1), [F, I] = K(!1), [ee, L] = K(0), [te, ne] = K(c?.files || []), [re, R] = K(e?.users || []);
110944
- U(() => (N ? (document.body.style.overflow = "hidden", I(!0)) : (document.body.style.overflow = "", I(!1)), () => {
110949
+ }) }) : null }), ISt = Zi(function({ mentionsConfig: e, variablesConfig: t, enhanceConfig: n, filesConfig: r, secondaryAction: i, primaryAction: a, maxCharacters: s, initialEditorState: c, onChange: l, placeholder: d, title: f, height: p = "auto", plainHtmlMode: m = !1, isMarkdownOnly: h = !1, fullScreenMode: g = !0, onFullscreenChange: _, disabled: v = !1, error: y = !1, loading: b = !1, onTranscribe: x }, S) {
110950
+ let C = o(), w = ta(), T = G(null), E = G(null), D = G(null), O = G(null), [k, A] = K(!1), [M, N] = K(!0), [P, F] = K(!1), [I, ee] = K(!1), [L, te] = K(0), [ne, re] = K(c?.files || []), [R, ie] = K(e?.users || []);
110951
+ U(() => (P ? (document.body.style.overflow = "hidden", ee(!0)) : (document.body.style.overflow = "", ee(!1)), () => {
110945
110952
  document.body.style.overflow = "";
110946
- }), [N]), U(() => {
110947
- let e = N ? window.innerHeight : DSt(p);
110953
+ }), [P]), U(() => {
110954
+ let e = P ? window.innerHeight : DSt(p);
110948
110955
  return kSt({
110949
- containerRef: E,
110950
- onHeightChange: k,
110951
- onScrollChange: M,
110956
+ containerRef: D,
110957
+ onHeightChange: A,
110958
+ onScrollChange: N,
110952
110959
  heightThreshold: e
110953
110960
  });
110954
- }, [p, N]), U(() => {
110955
- if (!N || !F) return;
110961
+ }, [p, P]), U(() => {
110962
+ if (!P || !I) return;
110956
110963
  let e = () => {
110957
- D.current && L(D.current.offsetWidth);
110964
+ O.current && te(O.current.offsetWidth);
110958
110965
  };
110959
110966
  return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
110960
- }, [N, F]);
110961
- let ie = W(() => ebt(t?.variables ?? []), [t]), z = H((e) => t ? hbt(e, ie) : e, [t, ie]), [ae] = K(() => z(c?.content || "")), B = G(!1), oe = H(({ editor: e, transaction: t }) => {
110962
- t.docChanged && (B.current = !0), ASt({
110967
+ }, [P, I]);
110968
+ let z = W(() => ebt(t?.variables ?? []), [t]), ae = H((e) => t ? hbt(e, z) : e, [t, z]), [B] = K(() => ae(c?.content || "")), oe = G(!1), se = H(({ editor: e, transaction: t }) => {
110969
+ t.docChanged && (oe.current = !0), ASt({
110963
110970
  editor: e,
110964
110971
  onChange: l
110965
110972
  });
110966
- }, [l]), se = W(() => CSt({
110973
+ }, [l]), le = W(() => CSt({
110967
110974
  mentionsConfig: e,
110968
- mentionSuggestions: re,
110969
- setMentionSuggestions: R,
110975
+ mentionSuggestions: R,
110976
+ setMentionSuggestions: ie,
110970
110977
  placeholder: d,
110971
110978
  maxCharacters: s,
110972
110979
  plainHtmlMode: m,
110980
+ isMarkdownOnly: h,
110973
110981
  variablesConfig: t
110974
110982
  }), [
110975
110983
  e,
110976
- re,
110977
110984
  R,
110985
+ ie,
110978
110986
  d,
110979
110987
  s,
110980
110988
  m,
110989
+ h,
110981
110990
  t
110982
- ]), le = G(!1), ue = D2({
110983
- extensions: se,
110984
- content: ae,
110985
- editable: !_,
110986
- onUpdate: oe,
110991
+ ]), ue = G(!1), de = D2({
110992
+ extensions: le,
110993
+ content: B,
110994
+ editable: !v,
110995
+ onUpdate: se,
110987
110996
  onFocus: () => {
110988
- le.current = !0;
110997
+ ue.current = !0;
110989
110998
  },
110990
110999
  editorProps: { attributes: {
110991
111000
  role: "textbox",
@@ -110993,143 +111002,144 @@ var sSt = ({ aiBlockConfig: e, translations: t, imageUploadConfig: n }) => {
110993
111002
  "aria-label": f
110994
111003
  } },
110995
111004
  shouldRerenderOnTransaction: !1
110996
- }), de = () => {
110997
- ue && MSt(ue), P((e) => {
111005
+ }), fe = () => {
111006
+ de && MSt(de), F((e) => {
110998
111007
  let t = !e;
110999
- return g && g(t), t;
111008
+ return _ && _(t), t;
111000
111009
  });
111001
111010
  };
111002
111011
  U(() => {
111003
- if (!ue || !t || !Nbt(ue, t.variables) || B.current) return;
111004
- let e = ue.getHTML(), n = hbt(gbt(e), ie);
111005
- n !== e && Pbt(ue, n);
111012
+ if (!de || !t || !Nbt(de, t.variables) || oe.current) return;
111013
+ let e = de.getHTML(), n = hbt(gbt(e), z);
111014
+ n !== e && Pbt(de, n);
111006
111015
  }, [
111007
- ue,
111016
+ de,
111008
111017
  t,
111009
- ie
111018
+ z
111010
111019
  ]);
111011
- let fe = vht(ue, n);
111020
+ let pe = vht(de, n);
111012
111021
  U(() => {
111013
- (fe.error || _) && ue ? ue.setEditable(!1) : ue && !fe.error && !_ && ue.setEditable(!0);
111022
+ (pe.error || v) && de ? de.setEditable(!1) : de && !pe.error && !v && de.setEditable(!0);
111014
111023
  }, [
111015
- fe.error,
111016
- _,
111017
- ue
111024
+ pe.error,
111025
+ v,
111026
+ de
111018
111027
  ]);
111019
- let pe = G(null), [me, he] = K(null), ge = G(null), _e = H((e) => {
111020
- ge.current && clearTimeout(ge.current), he(e), ge.current = setTimeout(() => {
111021
- he(null), ge.current = null;
111028
+ let me = G(null), [he, ge] = K(null), _e = G(null), ve = H((e) => {
111029
+ _e.current && clearTimeout(_e.current), ge(e), _e.current = setTimeout(() => {
111030
+ ge(null), _e.current = null;
111022
111031
  }, jSt);
111023
- }, []), ve = H(() => {
111024
- ge.current &&= (clearTimeout(ge.current), null), he(null);
111032
+ }, []), ye = H(() => {
111033
+ _e.current &&= (clearTimeout(_e.current), null), ge(null);
111025
111034
  }, []);
111026
111035
  U(() => () => {
111027
- ge.current && clearTimeout(ge.current);
111036
+ _e.current && clearTimeout(_e.current);
111028
111037
  }, []);
111029
- let ye = H((e) => {
111030
- let t = pe.current;
111031
- if (!ue || !t) return;
111032
- let n = ue.state.doc.content.size, r = Math.min(t.from, n), i = Math.min(t.to, n);
111033
- ue.chain().deleteRange({
111038
+ let be = H((e) => {
111039
+ let t = me.current;
111040
+ if (!de || !t) return;
111041
+ let n = de.state.doc.content.size, r = Math.min(t.from, n), i = Math.min(t.to, n);
111042
+ de.chain().deleteRange({
111034
111043
  from: r,
111035
111044
  to: i
111036
- }).insertContentAt(r, e).run(), pe.current = {
111045
+ }).insertContentAt(r, e).run(), me.current = {
111037
111046
  from: r,
111038
111047
  to: r + e.length
111039
111048
  };
111040
- }, [ue]), be = {
111041
- "permission-denied": S.ai.micPermissionDenied,
111042
- "device-error": S.ai.micError,
111043
- "transcription-failed": S.ai.transcriptionError
111044
- }, xe = zee({
111045
- onTranscribe: b,
111046
- onPartial: ye,
111049
+ }, [de]), xe = {
111050
+ "permission-denied": C.ai.micPermissionDenied,
111051
+ "device-error": C.ai.micError,
111052
+ "transcription-failed": C.ai.transcriptionError
111053
+ }, Se = zee({
111054
+ onTranscribe: x,
111055
+ onPartial: be,
111047
111056
  onFinal: (e) => {
111048
- ye(e), ue?.commands.focus();
111049
- },
111050
- onError: (e) => _e(be[e])
111051
- }), Se = !!b && xe.isSupported, Ce = H(() => {
111052
- ue && (pe.current = {
111053
- from: ue.state.selection.to,
111054
- to: ue.state.selection.to
111055
- }, xe.start());
111056
- }, [ue, xe]);
111057
- if (na(x, () => ({
111058
- clear: () => ue?.commands.clearContent(),
111057
+ be(e), de?.commands.focus();
111058
+ },
111059
+ onError: (e) => ve(xe[e])
111060
+ }), Ce = !!x && Se.isSupported, we = H(() => {
111061
+ de && (me.current = {
111062
+ from: de.state.selection.to,
111063
+ to: de.state.selection.to
111064
+ }, Se.start());
111065
+ }, [de, Se]);
111066
+ if (na(S, () => ({
111067
+ clear: () => de?.commands.clearContent(),
111059
111068
  clearFiles: () => {
111060
- ne([]), r && r.onFiles([]);
111069
+ re([]), r && r.onFiles([]);
111061
111070
  },
111062
111071
  focus: () => {
111063
- le.current = !0, ue?.commands.focus();
111072
+ ue.current = !0, de?.commands.focus();
111064
111073
  },
111065
111074
  setError: (e) => {
111066
- fe.setError(e);
111075
+ pe.setError(e);
111067
111076
  },
111068
111077
  setContent: (e) => {
111069
- ue?.commands.setContent(z(e));
111078
+ de?.commands.setContent(ae(e));
111070
111079
  },
111071
111080
  insertContent: (e) => {
111072
- ue?.chain().focus(le.current ? null : "end").insertContent(z(e)).run();
111081
+ de?.chain().focus(ue.current ? null : "end").insertContent(ae(e)).run();
111073
111082
  },
111074
111083
  openVariables: () => {
111075
- if (!ue || !ue.isEditable || !ue.can().openTemplateVariablePicker()) return;
111076
- let e = le.current ? null : "end";
111077
- le.current = !0, ue.chain().focus(e).openTemplateVariablePicker().run();
111084
+ if (!de || !de.isEditable || !de.can().openTemplateVariablePicker()) return;
111085
+ let e = ue.current ? null : "end";
111086
+ ue.current = !0, de.chain().focus(e).openTemplateVariablePicker().run();
111078
111087
  }
111079
- })), !ue) return null;
111080
- let we = /* @__PURE__ */ q(Hne, {
111088
+ })), !de) return null;
111089
+ let Te = /* @__PURE__ */ q(Hne, {
111081
111090
  trapped: !1,
111082
111091
  children: /* @__PURE__ */ J("div", {
111083
- ref: T,
111084
- id: C,
111085
- "aria-busy": y,
111086
- className: u("rich-text-editor-container pointer-events-auto flex flex-col text-f1-foreground", _ ? "bg-f1-background-tertiary" : "bg-f1-background", N ? "fixed inset-0 z-50" : "relative w-full rounded-xl border border-solid border-f1-border-secondary", !N && v && "border-f1-border-critical-bold bg-f1-background-critical bg-opacity-10"),
111092
+ ref: E,
111093
+ id: w,
111094
+ "aria-busy": b,
111095
+ className: u("rich-text-editor-container pointer-events-auto flex flex-col text-f1-foreground", v ? "bg-f1-background-tertiary" : "bg-f1-background", P ? "fixed inset-0 z-50" : "relative w-full rounded-xl border border-solid border-f1-border-secondary", !P && y && "border-f1-border-critical-bold bg-f1-background-critical bg-opacity-10"),
111087
111096
  children: [
111088
- N ? /* @__PURE__ */ q("div", { className: "pointer-events-none fixed inset-0 z-40" }) : null,
111097
+ P ? /* @__PURE__ */ q("div", { className: "pointer-events-none fixed inset-0 z-40" }) : null,
111089
111098
  /* @__PURE__ */ q(SSt, {
111090
- fullScreenMode: h,
111091
- isFullscreen: N,
111092
- handleToggleFullscreen: de,
111093
- disableAllButtons: fe.disableButtons,
111099
+ fullScreenMode: g,
111100
+ isFullscreen: P,
111101
+ handleToggleFullscreen: fe,
111102
+ disableAllButtons: pe.disableButtons,
111094
111103
  title: f
111095
111104
  }),
111096
111105
  /* @__PURE__ */ J("div", {
111097
111106
  className: "relative z-50 w-full flex-grow overflow-hidden",
111098
111107
  onClick: (e) => {
111099
111108
  let t = e.target;
111100
- !t.closest("button") && !t.closest("[role=\"button\"]") && !t.closest("input") && !t.closest("textarea") && !t.closest("[data-radix-popper-content-wrapper]") && (e?.preventDefault(), ue?.commands.focus());
111109
+ !t.closest("button") && !t.closest("[role=\"button\"]") && !t.closest("input") && !t.closest("textarea") && !t.closest("[data-radix-popper-content-wrapper]") && (e?.preventDefault(), de?.commands.focus());
111101
111110
  },
111102
111111
  children: [
111103
111112
  /* @__PURE__ */ q("div", {
111104
- ref: E,
111105
- className: u("scrollbar-macos relative flex w-full items-start justify-center overflow-y-auto py-3", N ? "h-full px-10 pb-24" : u(OSt(p), "pl-3 pr-10")),
111113
+ ref: D,
111114
+ className: u("scrollbar-macos relative flex w-full items-start justify-center overflow-y-auto py-3", P ? "h-full px-10 pb-24" : u(OSt(p), "pl-3 pr-10")),
111106
111115
  children: /* @__PURE__ */ q("div", {
111107
- className: u("w-full overflow-hidden", N && "max-w-[824px]"),
111108
- children: /* @__PURE__ */ q(C2, { editor: ue })
111116
+ className: u("w-full overflow-hidden", P && "max-w-[824px]"),
111117
+ children: /* @__PURE__ */ q(C2, { editor: de })
111109
111118
  })
111110
111119
  }),
111111
111120
  /* @__PURE__ */ q(PSt, {
111112
- visible: N && F && !fe.disableButtons,
111113
- editor: ue,
111114
- enhance: fe,
111121
+ visible: P && I && !pe.disableButtons,
111122
+ editor: de,
111123
+ enhance: pe,
111115
111124
  enhanceConfig: n,
111116
111125
  plainHtmlMode: m,
111117
- toolbarRef: D,
111118
- toolbarWidth: ee,
111126
+ isMarkdownOnly: h,
111127
+ toolbarRef: O,
111128
+ toolbarWidth: L,
111119
111129
  onClose: () => {
111120
- I(!1), queueMicrotask(() => ue.commands.focus());
111130
+ ee(!1), queueMicrotask(() => de.commands.focus());
111121
111131
  }
111122
111132
  }),
111123
111133
  /* @__PURE__ */ q(FSt, {
111124
- visible: N && F && fe.isAcceptChangesOpen,
111125
- enhance: fe
111134
+ visible: P && I && pe.isAcceptChangesOpen,
111135
+ enhance: pe
111126
111136
  })
111127
111137
  ]
111128
111138
  }),
111129
111139
  /* @__PURE__ */ J("div", {
111130
- className: u("relative z-40 rounded-b-lg px-3", !_ && "bg-f1-background", O && !A && "shadow-editor-tools"),
111140
+ className: u("relative z-40 rounded-b-lg px-3", !v && "bg-f1-background", k && !M && "shadow-editor-tools"),
111131
111141
  children: [
111132
- /* @__PURE__ */ q(ce, { children: fe.error && !fe.isLoading ? /* @__PURE__ */ q(j.div, {
111142
+ /* @__PURE__ */ q(ce, { children: pe.error && !pe.isLoading ? /* @__PURE__ */ q(j.div, {
111133
111143
  initial: {
111134
111144
  height: 0,
111135
111145
  opacity: 0,
@@ -111148,13 +111158,13 @@ var sSt = ({ aiBlockConfig: e, translations: t, imageUploadConfig: n }) => {
111148
111158
  transition: { duration: .3 },
111149
111159
  className: "flex w-full items-center justify-center pt-2",
111150
111160
  children: /* @__PURE__ */ q(x4, {
111151
- error: fe.error,
111152
- onDismiss: fe.clearError
111161
+ error: pe.error,
111162
+ onDismiss: pe.clearError
111153
111163
  })
111154
111164
  }, "accordion") : null }),
111155
111165
  /* @__PURE__ */ q(ce, {
111156
111166
  initial: !1,
111157
- children: me ? /* @__PURE__ */ q(j.div, {
111167
+ children: he ? /* @__PURE__ */ q(j.div, {
111158
111168
  role: "alert",
111159
111169
  "aria-live": "polite",
111160
111170
  className: "flex w-full items-center justify-center pt-2",
@@ -111171,55 +111181,57 @@ var sSt = ({ aiBlockConfig: e, translations: t, imageUploadConfig: n }) => {
111171
111181
  y: -4
111172
111182
  },
111173
111183
  children: /* @__PURE__ */ q(x4, {
111174
- error: me,
111175
- onDismiss: ve,
111176
- dismissLabel: S.actions.close
111184
+ error: he,
111185
+ onDismiss: ye,
111186
+ dismissLabel: C.actions.close
111177
111187
  })
111178
111188
  }, "dictation-error") : null
111179
111189
  }),
111180
111190
  /* @__PURE__ */ q(pSt, {
111181
- files: te,
111182
- disabled: fe.disableButtons,
111191
+ files: ne,
111192
+ disabled: pe.disableButtons,
111183
111193
  filesConfig: r,
111184
- setFiles: ne,
111185
- fileInputRef: w
111194
+ setFiles: re,
111195
+ fileInputRef: T
111186
111196
  }),
111187
111197
  /* @__PURE__ */ q(xSt, {
111188
- editor: ue,
111198
+ editor: de,
111189
111199
  maxCharacters: s,
111190
111200
  secondaryAction: i,
111191
111201
  primaryAction: a,
111192
- fileInputRef: w,
111202
+ fileInputRef: T,
111193
111203
  canUseFiles: !!r,
111194
- disableButtons: fe.disableButtons || _,
111195
- disabled: _,
111196
- enhance: fe,
111197
- isFullscreen: N,
111198
- setIsToolbarOpen: I,
111199
- isToolbarOpen: F,
111204
+ disableButtons: pe.disableButtons || v,
111205
+ disabled: v,
111206
+ enhance: pe,
111207
+ isFullscreen: P,
111208
+ setIsToolbarOpen: ee,
111209
+ isToolbarOpen: I,
111200
111210
  plainHtmlMode: m,
111201
- canRecord: Se,
111202
- recordingStatus: xe.status,
111203
- recordingStream: xe.stream,
111204
- onStartRecording: Ce,
111205
- onStopRecording: xe.stop,
111206
- onCancelRecording: xe.cancel
111211
+ isMarkdownOnly: h,
111212
+ canRecord: Ce,
111213
+ recordingStatus: Se.status,
111214
+ recordingStream: Se.stream,
111215
+ onStartRecording: we,
111216
+ onStopRecording: Se.stop,
111217
+ onCancelRecording: Se.cancel
111207
111218
  }),
111208
111219
  /* @__PURE__ */ q(cht, {
111209
- editorId: C,
111210
- editor: ue,
111211
- disableButtons: fe.disableButtons,
111212
- isToolbarOpen: F,
111213
- isFullscreen: N,
111220
+ editorId: w,
111221
+ editor: de,
111222
+ disableButtons: pe.disableButtons,
111223
+ isToolbarOpen: I,
111224
+ isFullscreen: P,
111214
111225
  plainHtmlMode: m,
111215
- enhance: fe
111226
+ isMarkdownOnly: h,
111227
+ enhance: pe
111216
111228
  })
111217
111229
  ]
111218
111230
  })
111219
111231
  ]
111220
111232
  })
111221
111233
  });
111222
- return N ? sa.createPortal(we, document.body) : we;
111234
+ return P ? sa.createPortal(Te, document.body) : Te;
111223
111235
  }), y8 = c("F0RichTextEditor", kn(ISt, ({ rows: e = 2 }) => {
111224
111236
  let t = [
111225
111237
  "75%",