@fileverse-dev/ddoc 7.2.2 → 7.2.3

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.
@@ -1,4 +1,4 @@
1
- import { c as s } from "./use-headless-editor-BODPh_74.mjs";
1
+ import { c as s } from "./use-headless-editor-BVgpWreQ.mjs";
2
2
  const n = (e) => {
3
3
  const { getYjsConvertor: t, mergeYjsUpdates: r } = s(e);
4
4
  return { getYjsConvertor: t, mergeYjsUpdates: r };
@@ -1,4 +1,4 @@
1
- import { c5 as Cl, c6 as re } from "./use-headless-editor-BODPh_74.mjs";
1
+ import { c5 as Cl, c6 as re } from "./use-headless-editor-BVgpWreQ.mjs";
2
2
  import Wl from "base64-js";
3
3
  import Bl from "jszip";
4
4
  var Qe = {}, na = "1.13.7", xc = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || Function("return this")() || {}, Zt = Array.prototype, ta = Object.prototype, vc = typeof Symbol < "u" ? Symbol.prototype : null, Sl = Zt.push, Ut = Zt.slice, st = ta.toString, Nl = ta.hasOwnProperty, Du = typeof ArrayBuffer < "u", Rl = typeof DataView < "u", Ol = Array.isArray, Uc = Object.keys, Tc = Object.create, _c = Du && ArrayBuffer.isView, kl = isNaN, Il = isFinite, yu = !{ toString: null }.propertyIsEnumerable("toString"), Ec = [
package/dist/index.es.js CHANGED
@@ -2,8 +2,8 @@ var Ed = Object.defineProperty;
2
2
  var Ad = (e, t, n) => t in e ? Ed(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var ne = (e, t, n) => Ad(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { jsx as r, jsxs as v, Fragment as nt } from "react/jsx-runtime";
5
- import { P as os, a as rs, i as Xa, p as Qa, N as Rd, C as Id, E as is, g as Dd, b as Md, u as Za, l as Fd, d as Ct, e as z, f as Ht, r as Ja, n as as, h as To, j as Bd, k as Bs, F as Od, L as Ld, m as el, o as _d, q as Os, s as fr, I as We, S as Pd, t as gr, v as Ud, T as it, w as tl, x as Hd, y as Mi, z as zd, A as nl, B as Kd, D as jd, G as sl, H as es, J as ol, K as Fr, M as Vd, O as Br, Q as rl, R as Pn, U as il, V as Wd, W as Or, X as $d, Y as qd, Z as Gd, _ as Yd, $ as al, a0 as Xd, a1 as Qd, a2 as Zd, a3 as so, a4 as Jd, a5 as Yo, a6 as eu, a7 as tu, a8 as gt, a9 as nu, aa as Fi, ab as su, ac as ou, ad as ru, ae as iu, af as Fn, ag as ll, ah as au, ai as Es, aj as lu, ak as Eo, al as cu, am as du, an as uu, ao as hu, ap as mu, aq as cl, ar as Ls, as as dl, at as ul, au as Sn, av as pu, aw as yr, ax as Bi, ay as Oi, az as fu, aA as gu, aB as yu, aC as hl, aD as xu, aE as wu, aF as bu, aG as vu, aH as Cu, aI as ku, aJ as Su, aK as Nu, aL as Tu, aM as Eu, aN as Au, aO as Ru, aP as Iu, aQ as Du, aR as Mu, aS as Xo, aT as ml, aU as Fu, aV as pl, aW as Bu, aX as Ou, aY as Lu, aZ as _u, a_ as Pu, a$ as fn, b0 as Uu, b1 as Li, b2 as As, b3 as Lr, b4 as Hu, b5 as _r, b6 as zu, b7 as Qo, b8 as Ku, b9 as fl, ba as dt, bb as ju, bc as _i, bd as Vu, be as Wu, bf as gl, bg as $u, bh as ws, bi as qu, bj as Gu, bk as Yu, bl as Xu, bm as Qu, bn as Zu, bo as Ju, bp as eh, bq as th, br as nh, bs as sh, bt as xr, bu as wr, bv as oh, bw as Zo, bx as rh, by as ih, bz as ah, bA as lh, bB as ch, bC as Pi, bD as dh, bE as uh, bF as Ui, bG as hh, bH as mh, bI as ph, bJ as fh, bK as gh, bL as Hi, bM as br, bN as zi, bO as yh, bP as xh, bQ as wh, bR as bh, bS as vh, bT as yl, bU as Ki, bV as ji, bW as Ch, bX as kh, bY as Sh, bZ as Vi, b_ as Nh, b$ as Th, c0 as Eh, c1 as Ah, c2 as Rh } from "./use-headless-editor-BODPh_74.mjs";
6
- import { c3 as bx, c4 as vx } from "./use-headless-editor-BODPh_74.mjs";
5
+ import { P as os, a as rs, i as Xa, p as Qa, N as Rd, C as Id, E as is, g as Dd, b as Md, u as Za, l as Fd, d as Ct, e as z, f as Ht, r as Ja, n as as, h as To, j as Bd, k as Bs, F as Od, L as Ld, m as el, o as _d, q as Os, s as fr, I as We, S as Pd, t as gr, v as Ud, T as it, w as tl, x as Hd, y as Mi, z as zd, A as nl, B as Kd, D as jd, G as sl, H as es, J as ol, K as Fr, M as Vd, O as Br, Q as rl, R as Pn, U as il, V as Wd, W as Or, X as $d, Y as qd, Z as Gd, _ as Yd, $ as al, a0 as Xd, a1 as Qd, a2 as Zd, a3 as so, a4 as Jd, a5 as Yo, a6 as eu, a7 as tu, a8 as gt, a9 as nu, aa as Fi, ab as su, ac as ou, ad as ru, ae as iu, af as Fn, ag as ll, ah as au, ai as Es, aj as lu, ak as Eo, al as cu, am as du, an as uu, ao as hu, ap as mu, aq as cl, ar as Ls, as as dl, at as ul, au as Sn, av as pu, aw as yr, ax as Bi, ay as Oi, az as fu, aA as gu, aB as yu, aC as hl, aD as xu, aE as wu, aF as bu, aG as vu, aH as Cu, aI as ku, aJ as Su, aK as Nu, aL as Tu, aM as Eu, aN as Au, aO as Ru, aP as Iu, aQ as Du, aR as Mu, aS as Xo, aT as ml, aU as Fu, aV as pl, aW as Bu, aX as Ou, aY as Lu, aZ as _u, a_ as Pu, a$ as fn, b0 as Uu, b1 as Li, b2 as As, b3 as Lr, b4 as Hu, b5 as _r, b6 as zu, b7 as Qo, b8 as Ku, b9 as fl, ba as dt, bb as ju, bc as _i, bd as Vu, be as Wu, bf as gl, bg as $u, bh as ws, bi as qu, bj as Gu, bk as Yu, bl as Xu, bm as Qu, bn as Zu, bo as Ju, bp as eh, bq as th, br as nh, bs as sh, bt as xr, bu as wr, bv as oh, bw as Zo, bx as rh, by as ih, bz as ah, bA as lh, bB as ch, bC as Pi, bD as dh, bE as uh, bF as Ui, bG as hh, bH as mh, bI as ph, bJ as fh, bK as gh, bL as Hi, bM as br, bN as zi, bO as yh, bP as xh, bQ as wh, bR as bh, bS as vh, bT as yl, bU as Ki, bV as ji, bW as Ch, bX as kh, bY as Sh, bZ as Vi, b_ as Nh, b$ as Th, c0 as Eh, c1 as Ah, c2 as Rh } from "./use-headless-editor-BVgpWreQ.mjs";
6
+ import { c3 as bx, c4 as vx } from "./use-headless-editor-BVgpWreQ.mjs";
7
7
  import { flip as xl, shift as wl, offset as bl, arrow as vl, size as Cl, autoPlacement as kl, hide as Sl, inline as Nl, computePosition as Pr, platform as bs } from "@floating-ui/dom";
8
8
  import Ze, { useRef as B, useEffect as j, useState as Y, useCallback as M, createContext as Ih, useContext as Dh, useMemo as Ce, forwardRef as wt, useReducer as Mh, useLayoutEffect as yt, memo as Ao, createElement as vr, lazy as Tl, Suspense as Wi, useSyncExternalStore as $i, useImperativeHandle as El } from "react";
9
9
  import { createPortal as Tn } from "react-dom";
@@ -6,7 +6,7 @@ import nt, { useContext as Or, useState as pe, useLayoutEffect as sb, useEffect
6
6
  import VC, { flushSync as UC, createPortal as WC } from "react-dom";
7
7
  import { jsx as w, jsxs as z, Fragment as on } from "react/jsx-runtime";
8
8
  import { toast as zd, Drawer as qC, DrawerContent as KC, DrawerHeader as GC, DrawerTitle as YC, DrawerClose as JC, IconButton as dn, DropdownMenu as Hd, DropdownMenuTrigger as jd, LucideIcon as ge, DropdownMenuContent as Vd, DropdownMenuItem as $s, Button as Qn, TextField as cb, useTheme as ub, Tooltip as Wn, Skeleton as db, Divider as XC, cn as Gt, Select as Up, SelectTrigger as Wp, SelectValue as QC, SelectContent as qp, SelectGroup as ZC, SelectLabel as e1, SelectItem as Kp, Toggle as t1 } from "@fileverse/ui";
9
- import ce from "classnames";
9
+ import ue from "classnames";
10
10
  import { fromByteArray as n1, toByteArray as yl } from "base64-js";
11
11
  import * as j from "yjs";
12
12
  import { UndoManager as r1, Item as o1, ContentType as s1, Text as i1, XmlElement as a1 } from "yjs";
@@ -21996,7 +21996,7 @@ const KI = Wd()((t) => ({
21996
21996
  /* @__PURE__ */ w(
21997
21997
  "div",
21998
21998
  {
21999
- className: ce(
21999
+ className: ue(
22000
22000
  "flex flex-col gap-4 w-full h-full pb-4 text-base color-text-default",
22001
22001
  o
22002
22002
  ),
@@ -22066,7 +22066,7 @@ const KI = Wd()((t) => ({
22066
22066
  /* @__PURE__ */ w(
22067
22067
  Vd,
22068
22068
  {
22069
- className: ce(
22069
+ className: ue(
22070
22070
  "p-0 b-0",
22071
22071
  o && "rounded-lg w-[var(--radix-dropdown-menu-trigger-width)]"
22072
22072
  ),
@@ -22095,7 +22095,7 @@ const KI = Wd()((t) => ({
22095
22095
  return /* @__PURE__ */ w(
22096
22096
  "div",
22097
22097
  {
22098
- className: ce(
22098
+ className: ue(
22099
22099
  "z-50 flex flex-col items-center overflow-y-auto rounded color-bg-default p-2 shadow-elevation-1",
22100
22100
  r ? "w-full gap-0 max-h-[min(320px,var(--radix-dropdown-menu-content-available-height))]" : "gap-1 max-h-[var(--radix-dropdown-menu-content-available-height)]"
22101
22101
  ),
@@ -22104,7 +22104,7 @@ const KI = Wd()((t) => ({
22104
22104
  {
22105
22105
  onMouseDown: (i) => i.preventDefault(),
22106
22106
  onClick: () => n(s.value),
22107
- className: ce(
22107
+ className: ue(
22108
22108
  "flex w-full items-center justify-center rounded px-2 py-1 text-center text-sm color-text-default transition",
22109
22109
  {
22110
22110
  "!bg-[hsl(var(--color-bg-brand))] color-text-on-brand": e === s.value
@@ -22136,7 +22136,7 @@ const KI = Wd()((t) => ({
22136
22136
  /* @__PURE__ */ w(
22137
22137
  Vd,
22138
22138
  {
22139
- className: ce(
22139
+ className: ue(
22140
22140
  "p-0 b-0",
22141
22141
  o && "rounded-lg w-[var(--radix-dropdown-menu-trigger-width)]"
22142
22142
  ),
@@ -22270,7 +22270,7 @@ const Sw = vn(
22270
22270
  {
22271
22271
  ref: l,
22272
22272
  onKeyDownCapture: v,
22273
- className: ce("relative", s),
22273
+ className: ue("relative", s),
22274
22274
  role: "region",
22275
22275
  "aria-roledescription": "carousel",
22276
22276
  ...a,
@@ -22288,7 +22288,7 @@ const Tw = vn(({ className: t, style: e, ...n }, r) => {
22288
22288
  "div",
22289
22289
  {
22290
22290
  ref: r,
22291
- className: ce(
22291
+ className: ue(
22292
22292
  "flex",
22293
22293
  s === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
22294
22294
  t
@@ -22308,7 +22308,7 @@ const Aw = vn(
22308
22308
  ref: n,
22309
22309
  role: "group",
22310
22310
  "aria-roledescription": "slide",
22311
- className: ce(
22311
+ className: ue(
22312
22312
  "min-w-0 shrink-0 grow-0 basis-[var(--slide-size,100%)]",
22313
22313
  r === "horizontal" ? "pl-4" : "pt-4",
22314
22314
  t
@@ -22336,7 +22336,7 @@ const Ew = vn(({ index: t, className: e, ...n }, r) => {
22336
22336
  "button",
22337
22337
  {
22338
22338
  ref: r,
22339
- className: ce(
22339
+ className: ue(
22340
22340
  "w-2 h-2 transition-colors duration-200 rounded-full",
22341
22341
  s === t ? "bg-black" : "bg-[#E8EBEC] hover:bg-black/50",
22342
22342
  e
@@ -22360,7 +22360,7 @@ const Mw = vn(
22360
22360
  "div",
22361
22361
  {
22362
22362
  ref: n,
22363
- className: ce("flex justify-center gap-2", t),
22363
+ className: ue("flex justify-center gap-2", t),
22364
22364
  ...e,
22365
22365
  children: Array.from({ length: o }).map((i, a) => /* @__PURE__ */ w(Ew, { index: a }, a))
22366
22366
  }
@@ -22374,7 +22374,7 @@ const dR = nt.forwardRef(({ className: t, ...e }, n) => {
22374
22374
  "button",
22375
22375
  {
22376
22376
  ref: n,
22377
- className: ce(
22377
+ className: ue(
22378
22378
  "btn color-bg-default hover:color-bg-default-hover transition color-text-default flex items-center border-2 rounded h-9 px-4 py-2 text-sm font-medium disabled:bg-[#E8EBEC] disabled:text-[#A1AAB1]",
22379
22379
  t
22380
22380
  ),
@@ -22392,7 +22392,7 @@ const fR = nt.forwardRef(({ className: t, ...e }, n) => {
22392
22392
  "button",
22393
22393
  {
22394
22394
  ref: n,
22395
- className: ce(
22395
+ className: ue(
22396
22396
  "btn bg-black hover:bg-black color-text-default flex items-center border-2 rounded h-9 px-4 py-2 text-sm font-medium disabled:bg-[#E8EBEC] disabled:text-[#A1AAB1]",
22397
22397
  t
22398
22398
  ),
@@ -26965,14 +26965,14 @@ const as = () => {
26965
26965
  let be = !1, Ee = !1;
26966
26966
  const Ne = HP(), Ae = (G) => {
26967
26967
  var Fp, zp, Hp;
26968
- const ue = D.getState();
26969
- ue.syncActiveSuggestionDraftAtCursor();
26968
+ const ce = D.getState();
26969
+ ce.syncActiveSuggestionDraftAtCursor();
26970
26970
  const Ue = e.isActive("comment") ? {
26971
26971
  commentId: ((Fp = e.getAttributes("comment")) == null ? void 0 : Fp.commentId) ?? null,
26972
26972
  resolved: !!((zp = e.getAttributes("comment")) != null && zp.resolved)
26973
26973
  } : null, We = e.state.selection.from, $t = e.state.selection.to, qt = e.state.doc.content.size;
26974
26974
  let qe = null, He = Ue;
26975
- const bt = !!(G != null && G.getMeta("pointer")), Kt = Ne(ue.tabComments), lr = (un) => {
26975
+ const bt = !!(G != null && G.getMeta("pointer")), Kt = Ne(ce.tabComments), lr = (un) => {
26976
26976
  for (const Zo of un) {
26977
26977
  if (He || (He = AI(e.state, Zo)), !qe && x) {
26978
26978
  const jp = yI(
@@ -27006,21 +27006,21 @@ const as = () => {
27006
27006
  );
27007
27007
  lr(un);
27008
27008
  }
27009
- const Be = qe, Cn = (He == null ? void 0 : He.commentId) ?? null, xe = Cn ?? (Be == null ? void 0 : Be.id) ?? null, ur = (Cn ? He == null ? void 0 : He.resolved : void 0) ?? (Be == null ? void 0 : Be.resolved) ?? !1, NC = !!(Cn && !ur), OC = !!(Be && !Be.resolved), ec = !!xe, tc = !!xe && ur, nc = !!(G != null && G.getMeta(xw)), ki = W ? ue.floatingCards.find(
27009
+ const Be = qe, Cn = (He == null ? void 0 : He.commentId) ?? null, xe = Cn ?? (Be == null ? void 0 : Be.id) ?? null, ur = (Cn ? He == null ? void 0 : He.resolved : void 0) ?? (Be == null ? void 0 : Be.resolved) ?? !1, NC = !!(Cn && !ur), OC = !!(Be && !Be.resolved), ec = !!xe, tc = !!xe && ur, nc = !!(G != null && G.getMeta(xw)), ki = W ? ce.floatingCards.find(
27010
27010
  (un) => un.type === "thread" && un.isFocused
27011
- ) : null, _p = (ki == null ? void 0 : ki.type) === "thread" ? ki.commentId : null, Bp = !xe || (W ? !_p || _p === xe : ue.openReplyId === xe) || bt || nc, $p = !!(r && xe && bt && !nc), DC = !!(xe && !$p && Bp && W && (NC || OC)), IC = ec !== be, RC = tc !== Ee;
27012
- if (IC && (be = ec, ue.setIsCommentActive(ec)), RC && (Ee = tc, ue.setIsCommentResolved(tc)), xe && Bp && !$p) {
27013
- const un = !W && !!(bt || ue.openReplyId !== xe);
27014
- ue.activeCommentId !== xe && ue.setActiveCommentId(xe), W || (ue.setOpenReplyId(xe), (Hp = ue.setCommentDrawerOpen) == null || Hp.call(ue, !0), un && ke(xe));
27011
+ ) : null, _p = (ki == null ? void 0 : ki.type) === "thread" ? ki.commentId : null, Bp = !xe || (W ? !_p || _p === xe : ce.openReplyId === xe) || bt || nc, $p = !!(r && xe && bt && !nc), DC = !!(xe && !$p && Bp && W && (NC || OC)), IC = ec !== be, RC = tc !== Ee;
27012
+ if (IC && (be = ec, ce.setIsCommentActive(ec)), RC && (Ee = tc, ce.setIsCommentResolved(tc)), xe && Bp && !$p) {
27013
+ const un = !W && !!(bt || ce.openReplyId !== xe);
27014
+ ce.activeCommentId !== xe && ce.setActiveCommentId(xe), W || (ce.setOpenReplyId(xe), (Hp = ce.setCommentDrawerOpen) == null || Hp.call(ce, !0), un && ke(xe));
27015
27015
  }
27016
- DC && xe && (nc || o(xe), ue.openFloatingThread(xe));
27016
+ DC && xe && (nc || o(xe), ce.openFloatingThread(xe));
27017
27017
  }, _e = ({
27018
27018
  transaction: G
27019
27019
  }) => {
27020
27020
  G.docChanged && (Q.current = e.state);
27021
27021
  }, Mt = ({
27022
27022
  transaction: G,
27023
- appendedTransactions: ue = []
27023
+ appendedTransactions: ce = []
27024
27024
  }) => {
27025
27025
  if (G.docChanged) {
27026
27026
  const ve = Q.current;
@@ -27050,7 +27050,7 @@ const as = () => {
27050
27050
  if (qt.length > 0) {
27051
27051
  const qe = hf(
27052
27052
  G.before,
27053
- [G, ...ue]
27053
+ [G, ...ce]
27054
27054
  ), He = pI(
27055
27055
  qt,
27056
27056
  ve,
@@ -27955,7 +27955,7 @@ const Sg = (t, e) => {
27955
27955
  onClick: () => {
27956
27956
  t.chain().focus().toggleHighlight({ color: r.color }).run(), e(fe.NONE);
27957
27957
  },
27958
- className: ce(
27958
+ className: ue(
27959
27959
  "w-5 rounded-full flex items-center justify-center cursor-pointer ease-in duration-200 hover:scale-[1.05] h-5",
27960
27960
  r.code
27961
27961
  ),
@@ -27963,7 +27963,7 @@ const Sg = (t, e) => {
27963
27963
  ge,
27964
27964
  {
27965
27965
  name: "Check",
27966
- className: ce(
27966
+ className: ue(
27967
27967
  "w-[14px] aspect-square",
27968
27968
  t.isActive("highlight", {
27969
27969
  color: r.color
@@ -28021,7 +28021,7 @@ const Sg = (t, e) => {
28021
28021
  );
28022
28022
  }
28023
28023
  },
28024
- className: ce(
28024
+ className: ue(
28025
28025
  "w-full gap-2 text-left",
28026
28026
  u && "!bg-[hsl(var(--color-bg-brand))] color-text-on-brand"
28027
28027
  ),
@@ -28054,7 +28054,7 @@ const Sg = (t, e) => {
28054
28054
  "div",
28055
28055
  {
28056
28056
  ref: t,
28057
- className: ce(
28057
+ className: ue(
28058
28058
  "z-50 color-bg-default shadow-elevation-1 transition-all rounded",
28059
28059
  s ? "w-full p-2" : "w-48 px-1 py-2"
28060
28060
  ),
@@ -28100,7 +28100,7 @@ const Sg = (t, e) => {
28100
28100
  onClick: () => {
28101
28101
  e == null || e.chain().focus().setTextAlign("left").run(), n(fe.NONE);
28102
28102
  },
28103
- className: ce(
28103
+ className: ue(
28104
28104
  "rounded w-8 h-8 p-1 flex justify-center items-center cursor-pointer transition",
28105
28105
  e.isActive({ textAlign: "left" }) ? "color-bg-brand ddoc-xl:hover:brightness-90 color-text-on-brand" : "hover:color-bg-default-hover"
28106
28106
  ),
@@ -28114,7 +28114,7 @@ const Sg = (t, e) => {
28114
28114
  onClick: () => {
28115
28115
  e == null || e.chain().focus().setTextAlign("center").run(), n(fe.NONE);
28116
28116
  },
28117
- className: ce(
28117
+ className: ue(
28118
28118
  "rounded w-8 h-8 p-1 flex justify-center items-center cursor-pointer transition",
28119
28119
  e.isActive({ textAlign: "center" }) ? "color-bg-brand ddoc-xl:hover:brightness-90 color-text-on-brand" : "hover:color-bg-default-hover"
28120
28120
  ),
@@ -28128,7 +28128,7 @@ const Sg = (t, e) => {
28128
28128
  onClick: () => {
28129
28129
  e == null || e.chain().focus().setTextAlign("right").run(), n(fe.NONE);
28130
28130
  },
28131
- className: ce(
28131
+ className: ue(
28132
28132
  "rounded w-8 h-8 p-1 flex justify-center items-center cursor-pointer transition",
28133
28133
  e.isActive({ textAlign: "right" }) ? "color-bg-brand ddoc-xl:hover:brightness-90 color-text-on-brand" : "hover:color-bg-default-hover"
28134
28134
  ),
@@ -28142,7 +28142,7 @@ const Sg = (t, e) => {
28142
28142
  onClick: () => {
28143
28143
  e == null || e.chain().focus().setTextAlign("justify").run(), n(fe.NONE);
28144
28144
  },
28145
- className: ce(
28145
+ className: ue(
28146
28146
  "rounded w-8 h-8 p-1 flex justify-center items-center cursor-pointer transition",
28147
28147
  e.isActive({ textAlign: "justify" }) ? "color-bg-brand ddoc-xl:hover:brightness-90 color-text-on-brand" : "hover:color-bg-default-hover"
28148
28148
  ),
@@ -28238,7 +28238,7 @@ const Sg = (t, e) => {
28238
28238
  onClick: () => {
28239
28239
  r.command();
28240
28240
  },
28241
- className: ce(
28241
+ className: ue(
28242
28242
  "flex items-center justify-between w-full px-2 py-1 text-body-sm",
28243
28243
  r.isActive() && "color-bg-brand hover:!bg-[#B6A02E] color-text-on-brand"
28244
28244
  ),
@@ -28274,7 +28274,7 @@ const Sg = (t, e) => {
28274
28274
  onClick: () => {
28275
28275
  t && (t.chain().focus().setColor(a).run(), e(fe.NONE));
28276
28276
  },
28277
- className: ce(
28277
+ className: ue(
28278
28278
  "w-5 rounded-full flex justify-center items-center cursor-pointer ease-in duration-200 hover:scale-[1.05] h-5"
28279
28279
  ),
28280
28280
  style: { backgroundColor: a },
@@ -28282,7 +28282,7 @@ const Sg = (t, e) => {
28282
28282
  ge,
28283
28283
  {
28284
28284
  name: "Check",
28285
- className: ce(
28285
+ className: ue(
28286
28286
  "w-[14px] aspect-square",
28287
28287
  t != null && t.isActive("textStyle", {
28288
28288
  color: a
@@ -28356,7 +28356,7 @@ const Sg = (t, e) => {
28356
28356
  return /* @__PURE__ */ w(
28357
28357
  "div",
28358
28358
  {
28359
- className: ce(
28359
+ className: ue(
28360
28360
  "z-50 flex w-48 flex-col overflow-hidden rounded color-bg-default p-1 shadow-elevation-1"
28361
28361
  ),
28362
28362
  children: e.map((n) => /* @__PURE__ */ z(
@@ -28364,7 +28364,7 @@ const Sg = (t, e) => {
28364
28364
  {
28365
28365
  onMouseDown: (r) => r.preventDefault(),
28366
28366
  onClick: () => n.command(t),
28367
- className: ce(
28367
+ className: ue(
28368
28368
  "gap-2",
28369
28369
  n.isActive() && "!bg-[hsl(var(--color-bg-brand))]"
28370
28370
  ),
@@ -28396,7 +28396,7 @@ const Sg = (t, e) => {
28396
28396
  "div",
28397
28397
  {
28398
28398
  ref: n,
28399
- className: ce(
28399
+ className: ue(
28400
28400
  "z-50 flex flex-col justify-center items-center overflow-hidden rounded color-bg-default p-2 gap-1 shadow-elevation-1"
28401
28401
  ),
28402
28402
  children: s.map((i) => /* @__PURE__ */ w(
@@ -28406,7 +28406,7 @@ const Sg = (t, e) => {
28406
28406
  onClick: () => {
28407
28407
  o(i.value), e(fe.NONE);
28408
28408
  },
28409
- className: ce(
28409
+ className: ue(
28410
28410
  "flex w-full items-center justify-center rounded px-2 py-1 text-center text-sm color-text-default transition",
28411
28411
  {
28412
28412
  "color-bg-brand ddoc-xl:hover:brightness-90 color-text-on-brand": r === i.value,
@@ -28432,7 +28432,7 @@ const Sg = (t, e) => {
28432
28432
  "div",
28433
28433
  {
28434
28434
  ref: n,
28435
- className: ce(
28435
+ className: ue(
28436
28436
  "z-50 flex flex-col justify-center items-center overflow-hidden rounded color-bg-default p-2 gap-1 shadow-elevation-1"
28437
28437
  ),
28438
28438
  children: [
@@ -28443,7 +28443,7 @@ const Sg = (t, e) => {
28443
28443
  onClick: () => {
28444
28444
  o(a.value), e(fe.NONE);
28445
28445
  },
28446
- className: ce(
28446
+ className: ue(
28447
28447
  "flex w-full items-center gap-2 rounded px-2 py-1 text-sm color-text-default transition min-w-[120px]",
28448
28448
  {
28449
28449
  "color-bg-default-hover": r === a.value,
@@ -28677,7 +28677,7 @@ const Sg = (t, e) => {
28677
28677
  "button",
28678
28678
  {
28679
28679
  onClick: () => f.command(t),
28680
- className: ce(
28680
+ className: ue(
28681
28681
  "flex w-fit items-center font-medium space-x-2 rounded p-2 text-center text-sm color-text-default transition",
28682
28682
  {
28683
28683
  "color-bg-brand xl:hover:brightness-90 color-text-on-brand": f.isActive(),
@@ -28699,7 +28699,7 @@ const Sg = (t, e) => {
28699
28699
  consumerFonts: o,
28700
28700
  focusEditor: !1,
28701
28701
  mobileSheet: !0,
28702
- triggerClassName: ce(Eg, "flex-1")
28702
+ triggerClassName: ue(Eg, "flex-1")
28703
28703
  }
28704
28704
  ),
28705
28705
  /* @__PURE__ */ w(
@@ -28709,7 +28709,7 @@ const Sg = (t, e) => {
28709
28709
  currentSize: s,
28710
28710
  onSetFontSize: (f) => t.chain().setFontSize(f).run(),
28711
28711
  mobileSheet: !0,
28712
- triggerClassName: ce(Eg, "w-24")
28712
+ triggerClassName: ue(Eg, "w-24")
28713
28713
  }
28714
28714
  )
28715
28715
  ] })
@@ -28722,7 +28722,7 @@ const Sg = (t, e) => {
28722
28722
  icon: f.icon,
28723
28723
  size: "md",
28724
28724
  onClick: () => f.command(t),
28725
- className: ce({
28725
+ className: ue({
28726
28726
  "color-bg-brand hover:!bg-[hsl(var(--color-bg-brand-hover))] color-text-on-brand": f.isActive()
28727
28727
  })
28728
28728
  },
@@ -28736,7 +28736,7 @@ const Sg = (t, e) => {
28736
28736
  icon: f.icon,
28737
28737
  onClick: () => f.command(t),
28738
28738
  size: "md",
28739
- className: ce({
28739
+ className: ue({
28740
28740
  "color-bg-brand xl:hover:brightness-90 color-text-on-brand": f.isActive(),
28741
28741
  "hover:color-bg-default-hover": !f.isActive()
28742
28742
  })
@@ -28750,7 +28750,7 @@ const Sg = (t, e) => {
28750
28750
  icon: f.icon,
28751
28751
  size: "md",
28752
28752
  onClick: () => f.command(t),
28753
- className: ce({
28753
+ className: ue({
28754
28754
  "color-bg-brand xl:hover:brightness-90 color-text-on-brand": f.isActive(),
28755
28755
  "hover:color-bg-default-hover": !f.isActive()
28756
28756
  })
@@ -28765,7 +28765,7 @@ const Sg = (t, e) => {
28765
28765
  size: "md",
28766
28766
  variant: "ghost",
28767
28767
  onClick: () => f.command(t),
28768
- className: ce("col-span-3", {
28768
+ className: ue("col-span-3", {
28769
28769
  "color-bg-brand xl:hover:brightness-90 color-text-on-brand": f.isActive(),
28770
28770
  "hover:color-bg-default-hover": !f.isActive()
28771
28771
  })
@@ -28803,7 +28803,7 @@ const Sg = (t, e) => {
28803
28803
  ge,
28804
28804
  {
28805
28805
  name: "Check",
28806
- className: ce(
28806
+ className: ue(
28807
28807
  "w-[14px] aspect-square",
28808
28808
  t != null && t.isActive("textStyle", {
28809
28809
  color: g
@@ -33497,7 +33497,7 @@ const r2 = Jx.extend({
33497
33497
  icon: "PaintBucket",
33498
33498
  variant: "ghost",
33499
33499
  size: "sm",
33500
- className: ce(
33500
+ className: ue(
33501
33501
  "min-w-6 aspect-square",
33502
33502
  t && "color-bg-default-hover"
33503
33503
  )
@@ -33525,7 +33525,7 @@ const r2 = Jx.extend({
33525
33525
  ge,
33526
33526
  {
33527
33527
  name: "Check",
33528
- className: ce(
33528
+ className: ue(
33529
33529
  "w-[14px] aspect-square",
33530
33530
  (t == null ? void 0 : t.toUpperCase()) === s.value ? "visible" : "invisible",
33531
33531
  ["#262626", "#000000"].includes(s.value) ? "text-white" : "text-black"
@@ -33894,7 +33894,7 @@ const r2 = Jx.extend({
33894
33894
  po,
33895
33895
  {
33896
33896
  as: "article",
33897
- className: ce(
33897
+ className: ue(
33898
33898
  "media-node-view not-prose transition-all ease-in-out w-full",
33899
33899
  Q && `f-${n.attrs.dataFloat}`,
33900
33900
  se && `justify-${n.attrs.dataAlign === "left" ? "start" : n.attrs.dataAlign === "right" ? "end" : n.attrs.dataAlign}`
@@ -33905,7 +33905,7 @@ const r2 = Jx.extend({
33905
33905
  draggable: S,
33906
33906
  "data-drag-handle": S,
33907
33907
  "data-media-frame": !0,
33908
- className: ce(
33908
+ className: ue(
33909
33909
  "w-fit flex flex-col relative group transition-all ease-in-out",
33910
33910
  !l && "p-2 pt-1 color-bg-secondary rounded-lg",
33911
33911
  S && "opacity-50"
@@ -33945,7 +33945,7 @@ const r2 = Jx.extend({
33945
33945
  {
33946
33946
  ref: P,
33947
33947
  contentEditable: !1,
33948
- className: ce(
33948
+ className: ue(
33949
33949
  "relative",
33950
33950
  (n.attrs.dataAlign === "start" || n.attrs.dataAlign === "left") && "self-start",
33951
33951
  n.attrs.dataAlign === "center" && "self-center",
@@ -34021,7 +34021,7 @@ const r2 = Jx.extend({
34021
34021
  "iframe",
34022
34022
  {
34023
34023
  ref: v,
34024
- className: ce(
34024
+ className: ue(
34025
34025
  "rounded-lg max-w-full",
34026
34026
  b && "pointer-events-none"
34027
34027
  ),
@@ -34058,7 +34058,7 @@ const r2 = Jx.extend({
34058
34058
  Tf,
34059
34059
  {
34060
34060
  as: "div",
34061
- className: ce("media-caption", {
34061
+ className: ue("media-caption", {
34062
34062
  "text-left": n.attrs.dataAlign === "start" || n.attrs.dataAlign === "left",
34063
34063
  "text-center": n.attrs.dataAlign === "center",
34064
34064
  "text-right": n.attrs.dataAlign === "end" || n.attrs.dataAlign === "right"
@@ -34068,7 +34068,7 @@ const r2 = Jx.extend({
34068
34068
  "div",
34069
34069
  {
34070
34070
  contentEditable: !1,
34071
- className: ce("media-caption media-caption-legacy", {
34071
+ className: ue("media-caption media-caption-legacy", {
34072
34072
  "text-left": n.attrs.dataAlign === "start" || n.attrs.dataAlign === "left",
34073
34073
  "text-center": n.attrs.dataAlign === "center",
34074
34074
  "text-right": n.attrs.dataAlign === "end" || n.attrs.dataAlign === "right"
@@ -38477,15 +38477,15 @@ function R3(t, e) {
38477
38477
  if (G === void 0 && (G = !0), N.forEach(function(ve) {
38478
38478
  ve[B] && ve[B].apply(ve, X);
38479
38479
  }), G) {
38480
- var ue;
38481
- (ue = b.props)[B].apply(ue, X);
38480
+ var ce;
38481
+ (ce = b.props)[B].apply(ce, X);
38482
38482
  }
38483
38483
  }
38484
38484
  function $() {
38485
38485
  var B = b.props.aria;
38486
38486
  if (B.content) {
38487
- var X = "aria-" + B.content, G = S.id, ue = Do(b.props.triggerTarget || t);
38488
- ue.forEach(function(ve) {
38487
+ var X = "aria-" + B.content, G = S.id, ce = Do(b.props.triggerTarget || t);
38488
+ ce.forEach(function(ve) {
38489
38489
  var Ue = ve.getAttribute(X);
38490
38490
  if (b.state.isVisible)
38491
38491
  ve.setAttribute(X, Ue ? Ue + " " + G : G);
@@ -38550,17 +38550,17 @@ function R3(t, e) {
38550
38550
  }
38551
38551
  function yt(B, X) {
38552
38552
  var G = A().box;
38553
- function ue(ve) {
38554
- ve.target === G && (Zc(G, "remove", ue), X());
38553
+ function ce(ve) {
38554
+ ve.target === G && (Zc(G, "remove", ce), X());
38555
38555
  }
38556
38556
  if (B === 0)
38557
38557
  return X();
38558
- Zc(G, "remove", d), Zc(G, "add", ue), d = ue;
38558
+ Zc(G, "remove", d), Zc(G, "add", ce), d = ce;
38559
38559
  }
38560
38560
  function q(B, X, G) {
38561
38561
  G === void 0 && (G = !1);
38562
- var ue = Do(b.props.triggerTarget || t);
38563
- ue.forEach(function(ve) {
38562
+ var ce = Do(b.props.triggerTarget || t);
38563
+ ce.forEach(function(ve) {
38564
38564
  ve.addEventListener(B, X, G), p.push({
38565
38565
  node: ve,
38566
38566
  eventType: B,
@@ -38591,23 +38591,23 @@ function R3(t, e) {
38591
38591
  }
38592
38592
  function Ie() {
38593
38593
  p.forEach(function(B) {
38594
- var X = B.node, G = B.eventType, ue = B.handler, ve = B.options;
38595
- X.removeEventListener(G, ue, ve);
38594
+ var X = B.node, G = B.eventType, ce = B.handler, ve = B.options;
38595
+ X.removeEventListener(G, ce, ve);
38596
38596
  }), p = [];
38597
38597
  }
38598
38598
  function ke(B) {
38599
38599
  var X, G = !1;
38600
38600
  if (!(!b.state.isEnabled || Et(B) || a)) {
38601
- var ue = ((X = u) == null ? void 0 : X.type) === "focus";
38601
+ var ce = ((X = u) == null ? void 0 : X.type) === "focus";
38602
38602
  u = B, m = B.currentTarget, F(), !b.state.isVisible && h3(B) && qi.forEach(function(ve) {
38603
38603
  return ve(B);
38604
- }), B.type === "click" && (b.props.trigger.indexOf("mouseenter") < 0 || i) && b.props.hideOnClick !== !1 && b.state.isVisible ? G = !0 : Fn(B), B.type === "click" && (i = !G), G && !ue && cn(B);
38604
+ }), B.type === "click" && (b.props.trigger.indexOf("mouseenter") < 0 || i) && b.props.hideOnClick !== !1 && b.state.isVisible ? G = !0 : Fn(B), B.type === "click" && (i = !G), G && !ce && cn(B);
38605
38605
  }
38606
38606
  }
38607
38607
  function Fe(B) {
38608
38608
  var X = B.target, G = E().contains(X) || S.contains(X);
38609
38609
  if (!(B.type === "mousemove" && G)) {
38610
- var ue = Wt().concat(S).map(function(ve) {
38610
+ var ce = Wt().concat(S).map(function(ve) {
38611
38611
  var Ue, We = ve._tippy, $t = (Ue = We.popperInstance) == null ? void 0 : Ue.state;
38612
38612
  return $t ? {
38613
38613
  popperRect: ve.getBoundingClientRect(),
@@ -38615,7 +38615,7 @@ function R3(t, e) {
38615
38615
  props: n
38616
38616
  } : null;
38617
38617
  }).filter(Boolean);
38618
- b3(ue, B) && (W(), cn(B));
38618
+ b3(ce, B) && (W(), cn(B));
38619
38619
  }
38620
38620
  }
38621
38621
  function At(B) {
@@ -38636,7 +38636,7 @@ function R3(t, e) {
38636
38636
  }
38637
38637
  function Pr() {
38638
38638
  _r();
38639
- var B = b.props, X = B.popperOptions, G = B.placement, ue = B.offset, ve = B.getReferenceClientRect, Ue = B.moveTransition, We = O() ? Rd(S).arrow : null, $t = ve ? {
38639
+ var B = b.props, X = B.popperOptions, G = B.placement, ce = B.offset, ve = B.getReferenceClientRect, Ue = B.moveTransition, We = O() ? Rd(S).arrow : null, $t = ve ? {
38640
38640
  getBoundingClientRect: ve,
38641
38641
  contextElement: ve.contextElement || E()
38642
38642
  } : t, qt = {
@@ -38656,7 +38656,7 @@ function R3(t, e) {
38656
38656
  }, qe = [{
38657
38657
  name: "offset",
38658
38658
  options: {
38659
- offset: ue
38659
+ offset: ce
38660
38660
  }
38661
38661
  }, {
38662
38662
  name: "preventOverflow",
@@ -38709,8 +38709,8 @@ function R3(t, e) {
38709
38709
  }
38710
38710
  function Fn(B) {
38711
38711
  b.clearDelayTimeouts(), B && D("onTrigger", [b, B]), ne();
38712
- var X = L(!0), G = R(), ue = G[0], ve = G[1];
38713
- Mn.isTouch && ue === "hold" && ve && (X = ve), X ? r = setTimeout(function() {
38712
+ var X = L(!0), G = R(), ce = G[0], ve = G[1];
38713
+ Mn.isTouch && ce === "hold" && ve && (X = ve), X ? r = setTimeout(function() {
38714
38714
  b.show();
38715
38715
  }, X) : b.show();
38716
38716
  }
@@ -38743,10 +38743,10 @@ function R3(t, e) {
38743
38743
  var X = b.props, G = Ay(t, Object.assign({}, X, xy(B), {
38744
38744
  ignoreAttributes: !0
38745
38745
  }));
38746
- b.props = G, ee(), X.interactiveDebounce !== G.interactiveDebounce && (W(), h = vy(Fe, G.interactiveDebounce)), X.triggerTarget && !G.triggerTarget ? Do(X.triggerTarget).forEach(function(ue) {
38747
- ue.removeAttribute("aria-expanded");
38748
- }) : G.triggerTarget && t.removeAttribute("aria-expanded"), F(), I(), k && k(X, G), b.popperInstance && (Pr(), Wt().forEach(function(ue) {
38749
- requestAnimationFrame(ue._tippy.popperInstance.forceUpdate);
38746
+ b.props = G, ee(), X.interactiveDebounce !== G.interactiveDebounce && (W(), h = vy(Fe, G.interactiveDebounce)), X.triggerTarget && !G.triggerTarget ? Do(X.triggerTarget).forEach(function(ce) {
38747
+ ce.removeAttribute("aria-expanded");
38748
+ }) : G.triggerTarget && t.removeAttribute("aria-expanded"), F(), I(), k && k(X, G), b.popperInstance && (Pr(), Wt().forEach(function(ce) {
38749
+ requestAnimationFrame(ce._tippy.popperInstance.forceUpdate);
38750
38750
  })), D("onAfterUpdate", [b, B]);
38751
38751
  }
38752
38752
  }
@@ -38757,8 +38757,8 @@ function R3(t, e) {
38757
38757
  }
38758
38758
  function Ne() {
38759
38759
  process.env.NODE_ENV !== "production" && Kn(b.state.isDestroyed, To("show"));
38760
- var B = b.state.isVisible, X = b.state.isDestroyed, G = !b.state.isEnabled, ue = Mn.isTouch && !b.props.touch, ve = Xc(b.props.duration, 0, Vt.duration);
38761
- if (!(B || X || G || ue) && !E().hasAttribute("disabled") && (D("onShow", [b], !1), b.props.onShow(b) !== !1)) {
38760
+ var B = b.state.isVisible, X = b.state.isDestroyed, G = !b.state.isEnabled, ce = Mn.isTouch && !b.props.touch, ve = Xc(b.props.duration, 0, Vt.duration);
38761
+ if (!(B || X || G || ce) && !E().hasAttribute("disabled") && (D("onShow", [b], !1), b.props.onShow(b) !== !1)) {
38762
38762
  if (b.state.isVisible = !0, O() && (S.style.visibility = "visible"), I(), ne(), b.state.isMounted || (S.style.transition = "none"), O()) {
38763
38763
  var Ue = A(), We = Ue.box, $t = Ue.content;
38764
38764
  Qc([We, $t], 0);
@@ -38779,13 +38779,13 @@ function R3(t, e) {
38779
38779
  }
38780
38780
  function Ae() {
38781
38781
  process.env.NODE_ENV !== "production" && Kn(b.state.isDestroyed, To("hide"));
38782
- var B = !b.state.isVisible, X = b.state.isDestroyed, G = !b.state.isEnabled, ue = Xc(b.props.duration, 1, Vt.duration);
38782
+ var B = !b.state.isVisible, X = b.state.isDestroyed, G = !b.state.isEnabled, ce = Xc(b.props.duration, 1, Vt.duration);
38783
38783
  if (!(B || X || G) && (D("onHide", [b], !1), b.props.onHide(b) !== !1)) {
38784
38784
  if (b.state.isVisible = !1, b.state.isShown = !1, c = !1, i = !1, O() && (S.style.visibility = "hidden"), W(), Pe(), I(!0), O()) {
38785
38785
  var ve = A(), Ue = ve.box, We = ve.content;
38786
- b.props.animation && (Qc([Ue, We], ue), ky([Ue, We], "hidden"));
38786
+ b.props.animation && (Qc([Ue, We], ce), ky([Ue, We], "hidden"));
38787
38787
  }
38788
- $(), F(), b.props.animation ? O() && rt(ue, b.unmount) : b.unmount();
38788
+ $(), F(), b.props.animation ? O() && rt(ce, b.unmount) : b.unmount();
38789
38789
  }
38790
38790
  }
38791
38791
  function _e(B) {
@@ -39161,7 +39161,7 @@ const j3 = [
39161
39161
  onMouseLeave: c,
39162
39162
  children: [
39163
39163
  /* @__PURE__ */ w(Tf, { as: "div" }),
39164
- (r || e) && /* @__PURE__ */ w(
39164
+ !s && (r || e) && /* @__PURE__ */ w(
39165
39165
  H3,
39166
39166
  {
39167
39167
  appendTo: document.body,
@@ -39221,7 +39221,7 @@ const j3 = [
39221
39221
  {
39222
39222
  ref: i,
39223
39223
  tabIndex: 0,
39224
- className: ce("trigger-button", { hidden: s }),
39224
+ className: "trigger-button",
39225
39225
  contentEditable: !1,
39226
39226
  onClick: u,
39227
39227
  onMouseDown: (f) => {
@@ -41914,7 +41914,7 @@ ${u}
41914
41914
  f = h.showLoader(), p = h.removeLoader;
41915
41915
  }
41916
41916
  try {
41917
- const h = await a.arrayBuffer(), { default: m } = await import("./index-B1mVtyXJ.mjs").then((v) => v.i), { value: g } = await m.convertToHtml(
41917
+ const h = await a.arrayBuffer(), { default: m } = await import("./index-BljnoTGY.mjs").then((v) => v.i), { value: g } = await m.convertToHtml(
41918
41918
  { arrayBuffer: h },
41919
41919
  {
41920
41920
  styleMap: hC,
@@ -45948,7 +45948,7 @@ const c6 = (t, e, { state: n, dispatch: r }) => {
45948
45948
  return o ? /* @__PURE__ */ w(po, { "data-page-break-marker": "", className: "h-0" }) : /* @__PURE__ */ z(
45949
45949
  po,
45950
45950
  {
45951
- className: ce(
45951
+ className: ue(
45952
45952
  "flex relative w-[calc(100%+var(--padding-r)+var(--padding-l))] -translate-x-[var(--padding-l)] color-bg-secondary h-full justify-center items-center"
45953
45953
  ),
45954
45954
  style: u,
@@ -46314,7 +46314,7 @@ const M6 = (t, e) => {
46314
46314
  async function d(f, p, h) {
46315
46315
  if (f.type === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || f.name.endsWith(".docx"))
46316
46316
  try {
46317
- const m = await f.arrayBuffer(), { default: g } = await import("./index-B1mVtyXJ.mjs").then((k) => k.i), { value: y } = await g.convertToHtml(
46317
+ const m = await f.arrayBuffer(), { default: g } = await import("./index-BljnoTGY.mjs").then((k) => k.i), { value: y } = await g.convertToHtml(
46318
46318
  { arrayBuffer: m },
46319
46319
  {
46320
46320
  styleMap: hC,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "7.2.2",
5
+ "version": "7.2.3",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/fileverse/fileverse-ddocs.git"