@fileverse-dev/ddoc 3.0.79 → 3.0.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -2,7 +2,7 @@ var fJ = Object.defineProperty;
2
2
  var gJ = (e, t, n) => t in e ? fJ(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var lt = (e, t, n) => gJ(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as Cn from "react";
5
- import Et, { createRef as mJ, memo as dh, createContext as yd, createElement as x2, useContext as xd, version as q7, useRef as Ve, useState as Be, useDebugValue as MD, useEffect as Re, forwardRef as sr, useLayoutEffect as ph, useCallback as Se, useMemo as Ft, Fragment as bJ, useReducer as yJ, cloneElement as IO, useImperativeHandle as LO } from "react";
5
+ import Et, { createRef as mJ, memo as dh, createContext as yd, createElement as x2, useContext as xd, version as q7, useRef as Ve, useState as Be, useDebugValue as MD, useEffect as Re, forwardRef as sr, useLayoutEffect as ph, useCallback as Se, useMemo as vt, Fragment as bJ, useReducer as yJ, cloneElement as IO, useImperativeHandle as LO } from "react";
6
6
  import UO, { flushSync as xJ, createPortal as C1 } from "react-dom";
7
7
  import { Drawer as PO, DrawerContent as vJ, DrawerHeader as FJ, DrawerTitle as wJ, DrawerClose as DJ, LucideIcon as Ue, useTheme as kJ, Button as qt, TextField as ea, DynamicDropdown as Zn, Tooltip as ln, IconButton as vn, Avatar as OD, cn as Ge, ButtonGroup as RD, Skeleton as rn, TextAreaFieldV2 as v2, DatePicker as EJ, TimePicker as CJ, Divider as uf, BottomDrawer as zO, DynamicModal as ID, Select as cf, SelectTrigger as df, SelectValue as F2, SelectContent as pf, SelectItem as hf, DynamicDropdownV2 as LD, Popover as ff, PopoverTrigger as gf, PopoverContent as mf, toast as UD, UltimateIcons as _J, PopoverClose as $O, SelectGroup as HO, SelectLabel as AJ, Checkbox as SJ, DrawerTrigger as V7, AnimatedLoader as TJ, Label as jJ, DynamicDrawer as BJ, DynamicDrawerV2 as NJ, Tag as w2, TagInput as WO } from "@fileverse/ui";
8
8
  import { isAddress as MJ, createPublicClient as OJ, http as RJ } from "viem";
@@ -5859,7 +5859,7 @@ function DR(e, t, n) {
5859
5859
  }
5860
5860
  return n;
5861
5861
  }
5862
- class vt {
5862
+ class Ft {
5863
5863
  /**
5864
5864
  Create a plugin.
5865
5865
  */
@@ -5877,7 +5877,7 @@ const nv = /* @__PURE__ */ Object.create(null);
5877
5877
  function kR(e) {
5878
5878
  return e in nv ? e + "$" + ++nv[e] : (nv[e] = 0, e + "$");
5879
5879
  }
5880
- class Tt {
5880
+ class jt {
5881
5881
  /**
5882
5882
  Create a plugin key.
5883
5883
  */
@@ -10202,7 +10202,7 @@ function uv(e, t, n = !0) {
10202
10202
  return t.altKey && (e = "Alt-" + e), t.ctrlKey && (e = "Ctrl-" + e), t.metaKey && (e = "Meta-" + e), n && t.shiftKey && (e = "Shift-" + e), e;
10203
10203
  }
10204
10204
  function one(e) {
10205
- return new vt({ props: { handleKeyDown: sk(e) } });
10205
+ return new Ft({ props: { handleKeyDown: sk(e) } });
10206
10206
  }
10207
10207
  function sk(e) {
10208
10208
  let t = rne(e);
@@ -10978,7 +10978,7 @@ function _I(e) {
10978
10978
  });
10979
10979
  }), t;
10980
10980
  }
10981
- function jt(...e) {
10981
+ function Tt(...e) {
10982
10982
  return e.filter((t) => !!t).reduce((t, n) => {
10983
10983
  const r = { ...t };
10984
10984
  return Object.entries(n).forEach(([o, i]) => {
@@ -11006,7 +11006,7 @@ function jt(...e) {
11006
11006
  function Ef(e, t) {
11007
11007
  return t.filter((n) => n.type === e.type.name).filter((n) => n.attribute.rendered).map((n) => n.attribute.renderHTML ? n.attribute.renderHTML(e.attrs) || {} : {
11008
11008
  [n.name]: e.attrs[n.name]
11009
- }).reduce((n, r) => jt(n, r), {});
11009
+ }).reduce((n, r) => Tt(n, r), {});
11010
11010
  }
11011
11011
  function Jne(e) {
11012
11012
  return typeof e != "string" ? e : e.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(e) : e === "true" ? !0 : e === "false" ? !1 : e;
@@ -11777,7 +11777,7 @@ function Ag(e) {
11777
11777
  }), c;
11778
11778
  }
11779
11779
  function Bre(e) {
11780
- const { editor: t, rules: n } = e, r = new vt({
11780
+ const { editor: t, rules: n } = e, r = new Ft({
11781
11781
  state: {
11782
11782
  init() {
11783
11783
  return null;
@@ -12022,7 +12022,7 @@ function Lre(e) {
12022
12022
  return s = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, g;
12023
12023
  }
12024
12024
  };
12025
- return n.map((c) => new vt({
12025
+ return n.map((c) => new Ft({
12026
12026
  // we register a global drag handler to track the current drag source element
12027
12027
  view(d) {
12028
12028
  const p = (f) => {
@@ -12316,8 +12316,8 @@ var yt = class LI extends fk {
12316
12316
  },
12317
12317
  addProseMirrorPlugins() {
12318
12318
  return [
12319
- new vt({
12320
- key: new Tt("clipboardTextSerializer"),
12319
+ new Ft({
12320
+ key: new jt("clipboardTextSerializer"),
12321
12321
  props: {
12322
12322
  clipboardTextSerializer: () => {
12323
12323
  const { editor: e } = this, { state: t, schema: n } = e, { doc: r, selection: o } = t, { ranges: i } = o, s = Math.min(...i.map((c) => c.$from.pos)), a = Math.max(...i.map((c) => c.$to.pos)), l = pk(n);
@@ -12397,8 +12397,8 @@ var yt = class LI extends fk {
12397
12397
  name: "drop",
12398
12398
  addProseMirrorPlugins() {
12399
12399
  return [
12400
- new vt({
12401
- key: new Tt("tiptapDrop"),
12400
+ new Ft({
12401
+ key: new jt("tiptapDrop"),
12402
12402
  props: {
12403
12403
  handleDrop: (e, t, n, r) => {
12404
12404
  this.editor.emit("drop", {
@@ -12416,20 +12416,20 @@ var yt = class LI extends fk {
12416
12416
  name: "editable",
12417
12417
  addProseMirrorPlugins() {
12418
12418
  return [
12419
- new vt({
12420
- key: new Tt("editable"),
12419
+ new Ft({
12420
+ key: new jt("editable"),
12421
12421
  props: {
12422
12422
  editable: () => this.editor.options.editable
12423
12423
  }
12424
12424
  })
12425
12425
  ];
12426
12426
  }
12427
- }), WI = new Tt("focusEvents"), qI = yt.create({
12427
+ }), WI = new jt("focusEvents"), qI = yt.create({
12428
12428
  name: "focusEvents",
12429
12429
  addProseMirrorPlugins() {
12430
12430
  const { editor: e } = this;
12431
12431
  return [
12432
- new vt({
12432
+ new Ft({
12433
12433
  key: WI,
12434
12434
  props: {
12435
12435
  handleDOMEvents: {
@@ -12502,8 +12502,8 @@ var yt = class LI extends fk {
12502
12502
  // to a paragraph if necessary.
12503
12503
  // This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well
12504
12504
  // with many other commands.
12505
- new vt({
12506
- key: new Tt("clearDocument"),
12505
+ new Ft({
12506
+ key: new jt("clearDocument"),
12507
12507
  appendTransaction: (e, t, n) => {
12508
12508
  if (e.some((g) => g.getMeta("composition")))
12509
12509
  return;
@@ -12530,8 +12530,8 @@ var yt = class LI extends fk {
12530
12530
  name: "paste",
12531
12531
  addProseMirrorPlugins() {
12532
12532
  return [
12533
- new vt({
12534
- key: new Tt("tiptapPaste"),
12533
+ new Ft({
12534
+ key: new jt("tiptapPaste"),
12535
12535
  props: {
12536
12536
  handlePaste: (e, t, n) => {
12537
12537
  this.editor.emit("paste", {
@@ -12548,8 +12548,8 @@ var yt = class LI extends fk {
12548
12548
  name: "tabindex",
12549
12549
  addProseMirrorPlugins() {
12550
12550
  return [
12551
- new vt({
12552
- key: new Tt("tabindex"),
12551
+ new Ft({
12552
+ key: new jt("tabindex"),
12553
12553
  props: {
12554
12554
  attributes: () => this.editor.isEditable ? { tabindex: "0" } : {}
12555
12555
  }
@@ -12587,8 +12587,8 @@ var yt = class LI extends fk {
12587
12587
  },
12588
12588
  addProseMirrorPlugins() {
12589
12589
  return [
12590
- new vt({
12591
- key: new Tt("textDirection"),
12590
+ new Ft({
12591
+ key: new jt("textDirection"),
12592
12592
  props: {
12593
12593
  attributes: () => {
12594
12594
  const e = this.options.direction;
@@ -15986,7 +15986,7 @@ function uo(e) {
15986
15986
  }
15987
15987
  return t;
15988
15988
  }
15989
- var ou = new Tt("selectingCells");
15989
+ var ou = new jt("selectingCells");
15990
15990
  function bh(e) {
15991
15991
  for (let t = e.depth - 1; t > 0; t--)
15992
15992
  if (e.node(t).type.spec.tableRole == "row")
@@ -16290,7 +16290,7 @@ function vie(e, t, n) {
16290
16290
  } else r instanceof ut && yie(r) ? i = ut.create(o, r.from) : r instanceof ut && xie(r) && (i = ut.create(o, r.$from.start(), r.$from.end()));
16291
16291
  return i && (t || (t = e.tr)).setSelection(i), t;
16292
16292
  }
16293
- var Fie = new Tt("fix-tables");
16293
+ var Fie = new jt("fix-tables");
16294
16294
  function SL(e, t, n, r) {
16295
16295
  const o = e.childCount, i = t.childCount;
16296
16296
  e: for (let s = 0, a = 0; s < i; s++) {
@@ -17204,7 +17204,7 @@ function F5(e, t, n, r, o, i) {
17204
17204
  l ? (n.style.width = a + "px", n.style.minWidth = "") : (n.style.width = "", n.style.minWidth = a + "px");
17205
17205
  }
17206
17206
  }
17207
- var yi = new Tt(
17207
+ var yi = new jt(
17208
17208
  "tableColumnResizing"
17209
17209
  );
17210
17210
  function Kie({
@@ -17214,7 +17214,7 @@ function Kie({
17214
17214
  View: r = Gie,
17215
17215
  lastColumnResizable: o = !0
17216
17216
  } = {}) {
17217
- const i = new vt({
17217
+ const i = new Ft({
17218
17218
  key: yi,
17219
17219
  state: {
17220
17220
  init(s, a) {
@@ -17428,7 +17428,7 @@ function rse(e, t) {
17428
17428
  function ose({
17429
17429
  allowTableNodeSelection: e = !1
17430
17430
  } = {}) {
17431
- return new vt({
17431
+ return new Ft({
17432
17432
  key: ou,
17433
17433
  // This piece of state is used to remember when a mouse-drag
17434
17434
  // cell-selection is happening, so that it can continue even as
@@ -17637,8 +17637,8 @@ var sse = class {
17637
17637
  destroy() {
17638
17638
  this.hide(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.removeEventListener("dragstart", this.dragstartHandler), window.removeEventListener("resize", this.resizeHandler), this.scrollTarget.removeEventListener("scroll", this.resizeHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler), this.editor.off("transaction", this.transactionHandler), this.floatingUIOptions.onDestroy && this.floatingUIOptions.onDestroy();
17639
17639
  }
17640
- }, OL = (e) => new vt({
17641
- key: typeof e.pluginKey == "string" ? new Tt(e.pluginKey) : e.pluginKey,
17640
+ }, OL = (e) => new Ft({
17641
+ key: typeof e.pluginKey == "string" ? new jt(e.pluginKey) : e.pluginKey,
17642
17642
  view: (t) => new sse({ view: t, ...e })
17643
17643
  });
17644
17644
  yt.create({
@@ -17768,8 +17768,8 @@ var ase = class {
17768
17768
  destroy() {
17769
17769
  this.hide(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler), this.floatingUIOptions.onDestroy && this.floatingUIOptions.onDestroy();
17770
17770
  }
17771
- }, RL = (e) => new vt({
17772
- key: typeof e.pluginKey == "string" ? new Tt(e.pluginKey) : e.pluginKey,
17771
+ }, RL = (e) => new Ft({
17772
+ key: typeof e.pluginKey == "string" ? new jt(e.pluginKey) : e.pluginKey,
17773
17773
  view: (t) => new ase({ view: t, ...e })
17774
17774
  });
17775
17775
  yt.create({
@@ -18023,7 +18023,7 @@ const UL = (e) => kk(e).buffer, w5 = (e) => {
18023
18023
  } catch (o) {
18024
18024
  console.error("Error decrypting and displaying the image:", o);
18025
18025
  }
18026
- }, up = new Tt("upload-image"), Fse = () => new vt({
18026
+ }, up = new jt("upload-image"), Fse = () => new Ft({
18027
18027
  key: up,
18028
18028
  state: {
18029
18029
  init() {
@@ -28155,12 +28155,12 @@ const lP = yd(void 0), wce = ({
28155
28155
  }
28156
28156
  },
28157
28157
  [te, ce, h]
28158
- ), V = Ft(
28158
+ ), V = vt(
28159
28159
  () => r.filter(
28160
28160
  (Ae) => (Ae.tabId ?? _c) === u
28161
28161
  ),
28162
28162
  [r, u]
28163
- ), ie = Ft(
28163
+ ), ie = vt(
28164
28164
  () => V.find((Ae) => Ae.id === a),
28165
28165
  [V, a]
28166
28166
  );
@@ -28357,12 +28357,12 @@ const lP = yd(void 0), wce = ({
28357
28357
  Ae.currentTarget.style.height = `${nt}px`;
28358
28358
  },
28359
28359
  []
28360
- ), Te = Ft(
28360
+ ), Te = vt(
28361
28361
  () => V.filter(
28362
28362
  (Ae) => !Ae.resolved && Ae.selectedContent && Ae.selectedContent.length > 0 && !Ae.deleted
28363
28363
  ),
28364
28364
  [V]
28365
- ), Ne = Ft(
28365
+ ), Ne = vt(
28366
28366
  () => Te.findIndex((Ae) => Ae.id === a),
28367
28367
  [Te, a]
28368
28368
  ), Je = Se(() => {
@@ -28387,7 +28387,7 @@ const lP = yd(void 0), wce = ({
28387
28387
  t.commands.setTextSelection({ from: Ke, to: ht }), ne(nt.id || "");
28388
28388
  }
28389
28389
  }
28390
- }, [Ne, Te, t, ne]), wt = Ft(
28390
+ }, [Ne, Te, t, ne]), wt = vt(
28391
28391
  () => ({
28392
28392
  comments: V,
28393
28393
  showResolved: A,
@@ -32934,7 +32934,7 @@ function KP(e, t) {
32934
32934
  function i0e(e) {
32935
32935
  return e != null && (typeof e == "string" || e.nodeType && (e.nodeType === 1 || e.nodeType === 9 || e.nodeType === 11));
32936
32936
  }
32937
- const l8 = new Tt("inline-ui"), Yf = [], s0e = () => new vt({
32937
+ const l8 = new jt("inline-ui"), Yf = [], s0e = () => new Ft({
32938
32938
  key: l8,
32939
32939
  state: {
32940
32940
  init() {
@@ -35291,7 +35291,7 @@ const o1e = (e, t, n) => yt.create({
35291
35291
  name: "markdownPasteHandler",
35292
35292
  addProseMirrorPlugins() {
35293
35293
  return [
35294
- new vt({
35294
+ new Ft({
35295
35295
  props: {
35296
35296
  handlePaste: (r, o) => {
35297
35297
  o.preventDefault();
@@ -38983,7 +38983,7 @@ const E1e = /* @__PURE__ */ qu(k1e), t0 = () => {
38983
38983
  t.off("selectionUpdate", J);
38984
38984
  };
38985
38985
  }, [t, X, oe]);
38986
- const ee = Ft(() => [
38986
+ const ee = vt(() => [
38987
38987
  {
38988
38988
  name: "Bold",
38989
38989
  isActive: () => (t == null ? void 0 : t.isActive("bold")) ?? !1,
@@ -39445,7 +39445,7 @@ const E1e = /* @__PURE__ */ qu(k1e), t0 = () => {
39445
39445
  renderHTML({ HTMLAttributes: e }) {
39446
39446
  return [
39447
39447
  "div",
39448
- jt(e, { "data-type": "column" }),
39448
+ Tt(e, { "data-type": "column" }),
39449
39449
  0
39450
39450
  ];
39451
39451
  },
@@ -39765,7 +39765,7 @@ const I1e = {
39765
39765
  isCollaboratorsDoc: r,
39766
39766
  isPreviewEditor: o
39767
39767
  }) => {
39768
- const i = Ft(
39768
+ const i = vt(
39769
39769
  () => ({
39770
39770
  isPreviewMode: t,
39771
39771
  isPresentationMode: n,
@@ -39814,13 +39814,13 @@ const I1e = {
39814
39814
  initialFormat: i,
39815
39815
  initialTab: s
39816
39816
  }) => {
39817
- const [a, l] = Be(i || "pdf"), [u, c] = Be(s || "all"), d = Ft(
39817
+ const [a, l] = Be(i || "pdf"), [u, c] = Be(s || "all"), d = vt(
39818
39818
  () => {
39819
39819
  var f;
39820
39820
  return i ?? ((f = r[0]) == null ? void 0 : f.id) ?? "pdf";
39821
39821
  },
39822
39822
  [i, r]
39823
- ), p = Ft(
39823
+ ), p = vt(
39824
39824
  () => {
39825
39825
  var f;
39826
39826
  return s ?? ((f = o[0]) == null ? void 0 : f.id) ?? "all";
@@ -40173,13 +40173,13 @@ const Nz = ({
40173
40173
  ), i = Se(
40174
40174
  (x) => x.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"),
40175
40175
  []
40176
- ), s = Se((x) => x.includes("(.pdf)") ? "pdf" : x.includes("(.md)") ? "md" : x.includes("(.html)") ? "html" : x.includes("(.txt)") ? "txt" : "", []), a = Ft(
40176
+ ), s = Se((x) => x.includes("(.pdf)") ? "pdf" : x.includes("(.md)") ? "md" : x.includes("(.html)") ? "html" : x.includes("(.txt)") ? "txt" : "", []), a = vt(
40177
40177
  () => r.filter((x) => x !== null).reduce((x, v) => {
40178
40178
  const k = s(v.title);
40179
40179
  return k && (x[k] = v), x;
40180
40180
  }, {}),
40181
40181
  [r, s]
40182
- ), l = Ft(
40182
+ ), l = vt(
40183
40183
  () => Object.entries(a).filter(([, x]) => !x.disabled).map(([x, v]) => ({
40184
40184
  id: x,
40185
40185
  label: v.title
@@ -40400,7 +40400,7 @@ ${O.getHTML()}`
40400
40400
  tabs: s,
40401
40401
  ydoc: a,
40402
40402
  exportOptions: n
40403
- }), C = Ft(
40403
+ }), C = vt(
40404
40404
  () => [
40405
40405
  { id: "current", label: "Current tab" },
40406
40406
  { id: "all", label: "All tabs" }
@@ -41072,7 +41072,7 @@ ${O.getHTML()}`
41072
41072
  spellcheck: "true",
41073
41073
  suppressContentEditableWarning: "true"
41074
41074
  }
41075
- }, Wn = new Tt("y-sync"), oa = new Tt("y-undo"), D0 = new Tt("yjs-cursor"), cge = (e) => {
41075
+ }, Wn = new jt("y-sync"), oa = new jt("y-undo"), D0 = new jt("yjs-cursor"), cge = (e) => {
41076
41076
  for (let n = 6; n < e.length; n++)
41077
41077
  e[n % 6] = e[n % 6] ^ e[n];
41078
41078
  return e.slice(0, 6);
@@ -41098,7 +41098,7 @@ t.sv.get(e.id.client) > e.id.clock && !vh(t.ds, e.id), pge = [{ light: "#ecd4443
41098
41098
  mapping: i
41099
41099
  } = {}) => {
41100
41100
  let s = !1;
41101
- const a = new bge(e, i), l = new vt({
41101
+ const a = new bge(e, i), l = new Ft({
41102
41102
  props: {
41103
41103
  editable: (u) => {
41104
41104
  const c = Wn.getState(u);
@@ -41941,7 +41941,7 @@ const Sge = (e, t, n) => e !== t, Tge = (e) => {
41941
41941
  cursorBuilder: n = Tge,
41942
41942
  selectionBuilder: r = jge,
41943
41943
  getSelection: o = (s) => s.selection
41944
- } = {}, i = "cursor") => new vt({
41944
+ } = {}, i = "cursor") => new Ft({
41945
41945
  key: D0,
41946
41946
  state: {
41947
41947
  init(s, a) {
@@ -42014,7 +42014,7 @@ const Sge = (e, t, n) => e !== t, Tge = (e) => {
42014
42014
  const t = oa.getState(e).undoManager;
42015
42015
  if (t != null)
42016
42016
  return t.redo(), !0;
42017
- }, Rge = /* @__PURE__ */ new Set(["paragraph"]), Ige = (e, t) => !(e instanceof Tn) || !(e.content instanceof js) || !(e.content.type instanceof Ko || e.content.type instanceof Br && t.has(e.content.type.nodeName)) || e.content.type._length === 0, Lge = ({ protectedNodes: e = Rge, trackedOrigins: t = [], undoManager: n = null } = {}) => new vt({
42017
+ }, Rge = /* @__PURE__ */ new Set(["paragraph"]), Ige = (e, t) => !(e instanceof Tn) || !(e.content instanceof js) || !(e.content.type instanceof Ko || e.content.type instanceof Br && t.has(e.content.type.nodeName)) || e.content.type._length === 0, Lge = ({ protectedNodes: e = Rge, trackedOrigins: t = [], undoManager: n = null } = {}) => new Ft({
42018
42018
  key: oa,
42019
42019
  state: {
42020
42020
  init: (r, o) => {
@@ -42136,8 +42136,8 @@ var Uge = yt.create({
42136
42136
  i,
42137
42137
  n,
42138
42138
  // Only add the filterInvalidContent plugin if content checking is enabled
42139
- this.editor.options.enableContentCheck && new vt({
42140
- key: new Tt("filterInvalidContent"),
42139
+ this.editor.options.enableContentCheck && new Ft({
42140
+ key: new jt("filterInvalidContent"),
42141
42141
  filterTransaction: () => {
42142
42142
  var s;
42143
42143
  return this.storage.isDisabled !== !1 && ((s = t.doc) == null || s.destroy()), !0;
@@ -42168,7 +42168,7 @@ var Uge = yt.create({
42168
42168
  return [{ tag: "blockquote" }];
42169
42169
  },
42170
42170
  renderHTML({ HTMLAttributes: e }) {
42171
- return /* @__PURE__ */ cb("blockquote", { ...jt(this.options.HTMLAttributes, e), children: /* @__PURE__ */ cb("slot", {}) });
42171
+ return /* @__PURE__ */ cb("blockquote", { ...Tt(this.options.HTMLAttributes, e), children: /* @__PURE__ */ cb("slot", {}) });
42172
42172
  },
42173
42173
  parseMarkdown: (e, t) => t.createNode("blockquote", void 0, t.parseChildren(e.tokens || [])),
42174
42174
  renderMarkdown: (e, t) => {
@@ -42231,7 +42231,7 @@ ${n}
42231
42231
  ];
42232
42232
  },
42233
42233
  renderHTML({ HTMLAttributes: e }) {
42234
- return /* @__PURE__ */ cb("strong", { ...jt(this.options.HTMLAttributes, e), children: /* @__PURE__ */ cb("slot", {}) });
42234
+ return /* @__PURE__ */ cb("strong", { ...Tt(this.options.HTMLAttributes, e), children: /* @__PURE__ */ cb("slot", {}) });
42235
42235
  },
42236
42236
  markdownTokenName: "strong",
42237
42237
  parseMarkdown: (e, t) => t.applyMark("bold", t.parseInline(e.tokens || [])),
@@ -42287,7 +42287,7 @@ ${n}
42287
42287
  return [{ tag: "code" }];
42288
42288
  },
42289
42289
  renderHTML({ HTMLAttributes: e }) {
42290
- return ["code", jt(this.options.HTMLAttributes, e), 0];
42290
+ return ["code", Tt(this.options.HTMLAttributes, e), 0];
42291
42291
  },
42292
42292
  markdownTokenName: "codespan",
42293
42293
  parseMarkdown: (e, t) => t.applyMark("code", [{ type: "text", text: e.text || "" }]),
@@ -42365,7 +42365,7 @@ ${n}
42365
42365
  renderHTML({ node: e, HTMLAttributes: t }) {
42366
42366
  return [
42367
42367
  "pre",
42368
- jt(this.options.HTMLAttributes, t),
42368
+ Tt(this.options.HTMLAttributes, t),
42369
42369
  [
42370
42370
  "code",
42371
42371
  {
@@ -42512,8 +42512,8 @@ ${n}
42512
42512
  return [
42513
42513
  // this plugin creates a code block for pasted content from VS Code
42514
42514
  // we can also detect the copied code language
42515
- new vt({
42516
- key: new Tt("codeBlockVSCodeHandler"),
42515
+ new Ft({
42516
+ key: new jt("codeBlockVSCodeHandler"),
42517
42517
  props: {
42518
42518
  handlePaste: (e, t) => {
42519
42519
  if (!t.clipboardData || this.editor.isActive(this.type.name))
@@ -42553,7 +42553,7 @@ ${n}
42553
42553
  return [{ tag: "br" }];
42554
42554
  },
42555
42555
  renderHTML({ HTMLAttributes: e }) {
42556
- return ["br", jt(this.options.HTMLAttributes, e)];
42556
+ return ["br", Tt(this.options.HTMLAttributes, e)];
42557
42557
  },
42558
42558
  renderText() {
42559
42559
  return `
@@ -42616,7 +42616,7 @@ ${n}
42616
42616
  }));
42617
42617
  },
42618
42618
  renderHTML({ node: e, HTMLAttributes: t }) {
42619
- return [`h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`, jt(this.options.HTMLAttributes, t), 0];
42619
+ return [`h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`, Tt(this.options.HTMLAttributes, t), 0];
42620
42620
  },
42621
42621
  parseMarkdown: (e, t) => t.createNode("heading", { level: e.depth || 1 }, t.parseInline(e.tokens || [])),
42622
42622
  renderMarkdown: (e, t) => {
@@ -42661,7 +42661,7 @@ ${n}
42661
42661
  return [{ tag: "hr" }];
42662
42662
  },
42663
42663
  renderHTML({ HTMLAttributes: e }) {
42664
- return ["hr", jt(this.options.HTMLAttributes, e)];
42664
+ return ["hr", Tt(this.options.HTMLAttributes, e)];
42665
42665
  },
42666
42666
  markdownTokenName: "hr",
42667
42667
  parseMarkdown: (e, t) => t.createNode("horizontalRule"),
@@ -42724,7 +42724,7 @@ ${n}
42724
42724
  ];
42725
42725
  },
42726
42726
  renderHTML({ HTMLAttributes: e }) {
42727
- return ["em", jt(this.options.HTMLAttributes, e), 0];
42727
+ return ["em", Tt(this.options.HTMLAttributes, e), 0];
42728
42728
  },
42729
42729
  addCommands() {
42730
42730
  return {
@@ -43467,8 +43467,8 @@ function _me(e) {
43467
43467
  return e.length === 1 ? e[0].isLink : e.length === 3 && e[1].isLink ? ["()", "[]"].includes(e[0].value + e[2].value) : !1;
43468
43468
  }
43469
43469
  function Ame(e) {
43470
- return new vt({
43471
- key: new Tt("autolink"),
43470
+ return new Ft({
43471
+ key: new jt("autolink"),
43472
43472
  appendTransaction: (t, n, r) => {
43473
43473
  const o = t.some((u) => u.docChanged) && !n.doc.eq(r.doc), i = t.some((u) => u.getMeta("preventAutolink"));
43474
43474
  if (!o || i)
@@ -43520,8 +43520,8 @@ function Ame(e) {
43520
43520
  });
43521
43521
  }
43522
43522
  function Sme(e) {
43523
- return new vt({
43524
- key: new Tt("handleClickLink"),
43523
+ return new Ft({
43524
+ key: new jt("handleClickLink"),
43525
43525
  props: {
43526
43526
  handleClick: (t, n, r) => {
43527
43527
  var o, i;
@@ -43546,8 +43546,8 @@ function Sme(e) {
43546
43546
  });
43547
43547
  }
43548
43548
  function Tme(e) {
43549
- return new vt({
43550
- key: new Tt("handlePasteLink"),
43549
+ return new Ft({
43550
+ key: new jt("handlePasteLink"),
43551
43551
  props: {
43552
43552
  handlePaste: (t, n, r) => {
43553
43553
  const { shouldAutoLink: o } = e, { state: i } = t, { selection: s } = i, { empty: a } = s;
@@ -43657,7 +43657,7 @@ var jme = Lr.create({
43657
43657
  defaultValidate: (t) => !!uc(t, this.options.protocols),
43658
43658
  protocols: this.options.protocols,
43659
43659
  defaultProtocol: this.options.defaultProtocol
43660
- }) ? ["a", jt(this.options.HTMLAttributes, e), 0] : ["a", jt(this.options.HTMLAttributes, { ...e, href: "" }), 0];
43660
+ }) ? ["a", Tt(this.options.HTMLAttributes, e), 0] : ["a", Tt(this.options.HTMLAttributes, { ...e, href: "" }), 0];
43661
43661
  },
43662
43662
  markdownTokenName: "link",
43663
43663
  parseMarkdown: (e, t) => t.applyMark("link", t.parseInline(e.tokens || []), {
@@ -43774,7 +43774,7 @@ var jme = Lr.create({
43774
43774
  return [{ tag: "ul" }];
43775
43775
  },
43776
43776
  renderHTML({ HTMLAttributes: e }) {
43777
- return ["ul", jt(this.options.HTMLAttributes, e), 0];
43777
+ return ["ul", Tt(this.options.HTMLAttributes, e), 0];
43778
43778
  },
43779
43779
  markdownTokenName: "list",
43780
43780
  parseMarkdown: (e, t) => e.type !== "list" || e.ordered ? [] : {
@@ -43829,7 +43829,7 @@ var jme = Lr.create({
43829
43829
  ];
43830
43830
  },
43831
43831
  renderHTML({ HTMLAttributes: e }) {
43832
- return ["li", jt(this.options.HTMLAttributes, e), 0];
43832
+ return ["li", Tt(this.options.HTMLAttributes, e), 0];
43833
43833
  },
43834
43834
  markdownTokenName: "list_item",
43835
43835
  parseMarkdown: (e, t) => {
@@ -44137,7 +44137,7 @@ var Pme = "listItem", mS = "textStyle", bS = /^(\d+)\.\s$/, i$ = Ct.create({
44137
44137
  },
44138
44138
  renderHTML({ HTMLAttributes: e }) {
44139
44139
  const { start: t, ...n } = e;
44140
- return t === 1 ? ["ol", jt(this.options.HTMLAttributes, n), 0] : ["ol", jt(this.options.HTMLAttributes, e), 0];
44140
+ return t === 1 ? ["ol", Tt(this.options.HTMLAttributes, n), 0] : ["ol", Tt(this.options.HTMLAttributes, e), 0];
44141
44141
  },
44142
44142
  markdownTokenName: "list",
44143
44143
  parseMarkdown: (e, t) => {
@@ -44249,7 +44249,7 @@ var Pme = "listItem", mS = "textStyle", bS = /^(\d+)\.\s$/, i$ = Ct.create({
44249
44249
  renderHTML({ node: e, HTMLAttributes: t }) {
44250
44250
  return [
44251
44251
  "li",
44252
- jt(this.options.HTMLAttributes, t, {
44252
+ Tt(this.options.HTMLAttributes, t, {
44253
44253
  "data-type": this.name
44254
44254
  }),
44255
44255
  [
@@ -44354,7 +44354,7 @@ var Pme = "listItem", mS = "textStyle", bS = /^(\d+)\.\s$/, i$ = Ct.create({
44354
44354
  ];
44355
44355
  },
44356
44356
  renderHTML({ HTMLAttributes: e }) {
44357
- return ["ul", jt(this.options.HTMLAttributes, e, { "data-type": this.name }), 0];
44357
+ return ["ul", Tt(this.options.HTMLAttributes, e, { "data-type": this.name }), 0];
44358
44358
  },
44359
44359
  parseMarkdown: (e, t) => t.createNode("taskList", {}, t.parseChildren(e.items || [])),
44360
44360
  renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, `
@@ -44467,7 +44467,7 @@ var $me = Ct.create({
44467
44467
  return [{ tag: "p" }];
44468
44468
  },
44469
44469
  renderHTML({ HTMLAttributes: e }) {
44470
- return ["p", jt(this.options.HTMLAttributes, e), 0];
44470
+ return ["p", Tt(this.options.HTMLAttributes, e), 0];
44471
44471
  },
44472
44472
  parseMarkdown: (e, t) => {
44473
44473
  const n = e.tokens || [];
@@ -44515,7 +44515,7 @@ var $me = Ct.create({
44515
44515
  ];
44516
44516
  },
44517
44517
  renderHTML({ HTMLAttributes: e }) {
44518
- return ["s", jt(this.options.HTMLAttributes, e), 0];
44518
+ return ["s", Tt(this.options.HTMLAttributes, e), 0];
44519
44519
  },
44520
44520
  markdownTokenName: "del",
44521
44521
  parseMarkdown: (e, t) => t.applyMark("strike", t.parseInline(e.tokens || [])),
@@ -44576,7 +44576,7 @@ var $me = Ct.create({
44576
44576
  ];
44577
44577
  },
44578
44578
  renderHTML({ HTMLAttributes: e }) {
44579
- return ["u", jt(this.options.HTMLAttributes, e), 0];
44579
+ return ["u", Tt(this.options.HTMLAttributes, e), 0];
44580
44580
  },
44581
44581
  parseMarkdown(e, t) {
44582
44582
  return t.applyMark(this.name || "underline", t.parseInline(e.tokens || []));
@@ -44618,7 +44618,7 @@ var $me = Ct.create({
44618
44618
  }
44619
44619
  });
44620
44620
  function Kme(e = {}) {
44621
- return new vt({
44621
+ return new Ft({
44622
44622
  view(t) {
44623
44623
  return new Yme(t, e);
44624
44624
  }
@@ -44836,7 +44836,7 @@ function Zme(e) {
44836
44836
  return !0;
44837
44837
  }
44838
44838
  function Jme() {
44839
- return new vt({
44839
+ return new Ft({
44840
44840
  props: {
44841
44841
  decorations: n2e,
44842
44842
  createSelectionBetween(e, t, n) {
@@ -45192,12 +45192,12 @@ function o2(e) {
45192
45192
  }
45193
45193
  return n4;
45194
45194
  }
45195
- const qc = new Tt("history"), c2e = new Tt("closeHistory");
45195
+ const qc = new jt("history"), c2e = new jt("closeHistory");
45196
45196
  function d2e(e = {}) {
45197
45197
  return e = {
45198
45198
  depth: e.depth || 100,
45199
45199
  newGroupDelay: e.newGroupDelay || 500
45200
- }, new vt({
45200
+ }, new Ft({
45201
45201
  key: qc,
45202
45202
  state: {
45203
45203
  init() {
@@ -45263,8 +45263,8 @@ var p2e = yt.create({
45263
45263
  addProseMirrorPlugins() {
45264
45264
  let e = !1;
45265
45265
  return [
45266
- new vt({
45267
- key: new Tt("characterCount"),
45266
+ new Ft({
45267
+ key: new jt("characterCount"),
45268
45268
  appendTransaction: (t, n, r) => {
45269
45269
  if (e)
45270
45270
  return;
@@ -45322,8 +45322,8 @@ yt.create({
45322
45322
  },
45323
45323
  addProseMirrorPlugins() {
45324
45324
  return [
45325
- new vt({
45326
- key: new Tt("focus"),
45325
+ new Ft({
45326
+ key: new jt("focus"),
45327
45327
  props: {
45328
45328
  decorations: ({ doc: e, selection: t }) => {
45329
45329
  const { isEditable: n, isFocused: r } = this.editor, { anchor: o } = t, i = [];
@@ -45385,8 +45385,8 @@ var f$ = yt.create({
45385
45385
  },
45386
45386
  addProseMirrorPlugins() {
45387
45387
  return [
45388
- new vt({
45389
- key: new Tt("placeholder"),
45388
+ new Ft({
45389
+ key: new jt("placeholder"),
45390
45390
  props: {
45391
45391
  decorations: ({ doc: e, selection: t }) => {
45392
45392
  const n = this.editor.isEditable || !this.options.showOnlyWhenEditable, { anchor: r } = t, o = [];
@@ -45427,8 +45427,8 @@ yt.create({
45427
45427
  addProseMirrorPlugins() {
45428
45428
  const { editor: e, options: t } = this;
45429
45429
  return [
45430
- new vt({
45431
- key: new Tt("selection"),
45430
+ new Ft({
45431
+ key: new jt("selection"),
45432
45432
  props: {
45433
45433
  decorations(n) {
45434
45434
  return n.selection.empty || e.isFocused || !e.isEditable || NI(n.selection) || e.view.dragging ? null : Yt.create(n.doc, [
@@ -45455,9 +45455,9 @@ var f2e = yt.create({
45455
45455
  },
45456
45456
  addProseMirrorPlugins() {
45457
45457
  var e;
45458
- const t = new Tt(this.name), n = ((e = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : e.name) || this.options.node || "paragraph", r = Object.entries(this.editor.schema.nodes).map(([, o]) => o).filter((o) => (this.options.notAfter || []).concat(n).includes(o.name));
45458
+ const t = new jt(this.name), n = ((e = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : e.name) || this.options.node || "paragraph", r = Object.entries(this.editor.schema.nodes).map(([, o]) => o).filter((o) => (this.options.notAfter || []).concat(n).includes(o.name));
45459
45459
  return [
45460
- new vt({
45460
+ new Ft({
45461
45461
  key: t,
45462
45462
  appendTransaction: (o, i, s) => {
45463
45463
  const { doc: a, tr: l, schema: u } = s, c = t.getState(s), d = a.content.size, p = u.nodes[n];
@@ -45546,7 +45546,7 @@ var f2e = yt.create({
45546
45546
  ];
45547
45547
  },
45548
45548
  renderHTML({ HTMLAttributes: e }) {
45549
- return ["span", jt(this.options.HTMLAttributes, e), 0];
45549
+ return ["span", Tt(this.options.HTMLAttributes, e), 0];
45550
45550
  },
45551
45551
  addCommands() {
45552
45552
  return {
@@ -45811,8 +45811,8 @@ function hw(e, t, n) {
45811
45811
  var S2e = ({
45812
45812
  getId: e,
45813
45813
  anchorTypes: t = ["heading"]
45814
- }) => new vt({
45815
- key: new Tt("tableOfContent"),
45814
+ }) => new Ft({
45815
+ key: new jt("tableOfContent"),
45816
45816
  appendTransaction(n, r, o) {
45817
45817
  const i = o.tr;
45818
45818
  let s = !1;
@@ -46075,7 +46075,7 @@ var S2e = ({
46075
46075
  ];
46076
46076
  },
46077
46077
  renderHTML({ HTMLAttributes: e }) {
46078
- return ["mark", jt(this.options.HTMLAttributes, e), 0];
46078
+ return ["mark", Tt(this.options.HTMLAttributes, e), 0];
46079
46079
  },
46080
46080
  renderMarkdown: (e, t) => `==${t.renderChildren(e)}==`,
46081
46081
  parseMarkdown: (e, t) => t.applyMark("highlight", t.parseInline(e.tokens || [])),
@@ -46129,7 +46129,7 @@ const R2e = tme.extend({
46129
46129
  renderHTML() {
46130
46130
  return [
46131
46131
  "div",
46132
- jt(this.options.HTMLAttributes, { "data-type": this.name }),
46132
+ Tt(this.options.HTMLAttributes, { "data-type": this.name }),
46133
46133
  ["hr"]
46134
46134
  ];
46135
46135
  }
@@ -46684,7 +46684,7 @@ const F$ = (e, t) => ({ node: n, updateAttributes: r, deleteNode: o }) => {
46684
46684
  renderHTML({ HTMLAttributes: e }) {
46685
46685
  return [
46686
46686
  "iframe",
46687
- jt(this.options.HTMLAttributes, e)
46687
+ Tt(this.options.HTMLAttributes, e)
46688
46688
  ];
46689
46689
  },
46690
46690
  addCommands() {
@@ -47543,7 +47543,7 @@ const Nbe = (e) => ({
47543
47543
  });
47544
47544
  }, A$ = ({ tweet: e, components: t }) => {
47545
47545
  var n;
47546
- const r = Ft(() => Nbe(e), [
47546
+ const r = vt(() => Nbe(e), [
47547
47547
  e
47548
47548
  ]);
47549
47549
  return /* @__PURE__ */ F.jsxs(S8, {
@@ -47916,7 +47916,7 @@ const BS = (e, t) => {
47916
47916
  (e[1] === null ? e[2] : e[1]) || {}
47917
47917
  ], yxe = () => {
47918
47918
  const e = xd(hxe);
47919
- return Ft(() => Iu(dxe, e), [
47919
+ return vt(() => Iu(dxe, e), [
47920
47920
  e
47921
47921
  ]);
47922
47922
  }, xxe = (e) => (t, n, r) => e(t, n && ((...i) => {
@@ -47972,7 +47972,7 @@ const f4 = Et.use || // This extra generic is to avoid TypeScript mixing up the
47972
47972
  return !1;
47973
47973
  }
47974
47974
  return !0;
47975
- }, L = Ft(() => {
47975
+ }, L = vt(() => {
47976
47976
  const ce = !b || !t ? !1 : nn(a) ? C().isPaused() || i ? !1 : l !== !1 : a, N = (he) => {
47977
47977
  const De = Iu(he);
47978
47978
  return delete De._k, ce ? {
@@ -48249,7 +48249,7 @@ const Axe = (e, t, n) => {
48249
48249
  renderHTML({ HTMLAttributes: e }) {
48250
48250
  return [
48251
48251
  "div",
48252
- jt(this.options.HTMLAttributes, e)
48252
+ Tt(this.options.HTMLAttributes, e)
48253
48253
  ];
48254
48254
  },
48255
48255
  addNodeView() {
@@ -48362,25 +48362,25 @@ const Mxe = ({
48362
48362
  w += (C == null ? void 0 : C.nodeSize) || 1;
48363
48363
  }
48364
48364
  return v;
48365
- }, []), d = Ft(() => {
48365
+ }, []), d = vt(() => {
48366
48366
  var x, v;
48367
48367
  const { content: y } = e.content;
48368
48368
  return ((v = (x = y == null ? void 0 : y[0]) == null ? void 0 : x.type) == null ? void 0 : v.name) === "heading";
48369
- }, [e.content]), p = Ft(() => {
48369
+ }, [e.content]), p = vt(() => {
48370
48370
  var x;
48371
48371
  const { content: y } = e.content;
48372
48372
  return (x = y == null ? void 0 : y[0]) == null ? void 0 : x.attrs.textAlign;
48373
- }, [e.content]), h = Ft(() => {
48373
+ }, [e.content]), h = vt(() => {
48374
48374
  var v;
48375
48375
  if (!d) return null;
48376
48376
  const { content: y } = e.content, x = y == null ? void 0 : y[0];
48377
48377
  return ((v = x == null ? void 0 : x.attrs) == null ? void 0 : v.id) || `heading-${t()}`;
48378
- }, [d, e.content, t]), f = Ft(() => {
48378
+ }, [d, e.content, t]), f = vt(() => {
48379
48379
  var v;
48380
48380
  if (!d) return !1;
48381
48381
  const { content: y } = e.content, x = y == null ? void 0 : y[0];
48382
48382
  return ((v = x == null ? void 0 : x.attrs) == null ? void 0 : v.isCollapsed) ?? !1;
48383
- }, [d, e.content, h]), g = Ft(() => {
48383
+ }, [d, e.content, h]), g = vt(() => {
48384
48384
  var w, D, C, A;
48385
48385
  if (!e || !n) return !1;
48386
48386
  const y = t(), { headingMap: x } = u();
@@ -48612,7 +48612,7 @@ function Rxe(e) {
48612
48612
  return e.on("update", s), () => {
48613
48613
  e.off("update", s), o.current && clearTimeout(o.current);
48614
48614
  };
48615
- }, [e, i]), Ft(
48615
+ }, [e, i]), vt(
48616
48616
  () => ({
48617
48617
  hasAIWriter: t,
48618
48618
  canCreateAIWriter: !t
@@ -51974,18 +51974,18 @@ const g3e = Et.memo(
51974
51974
  }), D = Se(() => {
51975
51975
  const { content: B } = e.content, Y = B[0].attrs.id, Q = B[0].content.content[0].text, ce = B8(Q), N = Y.replace(/-/g, "").substring(0, 8), te = `heading=${ce}-${N}`;
51976
51976
  i == null || i(te);
51977
- }, [e.content, i]), C = Ft(() => {
51977
+ }, [e.content, i]), C = vt(() => {
51978
51978
  const { content: B } = e.content;
51979
51979
  return B[0].type.name === "table";
51980
- }, [e.content]), A = Ft(() => {
51980
+ }, [e.content]), A = vt(() => {
51981
51981
  var Y;
51982
51982
  const { content: B } = e.content;
51983
51983
  return (Y = B[0].content.content[0]) == null ? void 0 : Y.text;
51984
- }, [e.content]), M = Ft(() => {
51984
+ }, [e.content]), M = vt(() => {
51985
51985
  var Y;
51986
51986
  const { content: B } = e.content;
51987
51987
  return (Y = B[0].content.content[1]) == null ? void 0 : Y.text;
51988
- }, [e.content]), j = Ft(() => {
51988
+ }, [e.content]), j = vt(() => {
51989
51989
  const { content: B } = e.content;
51990
51990
  return B[0].content.content.find(
51991
51991
  (Y) => {
@@ -52058,7 +52058,7 @@ const g3e = Et.memo(
52058
52058
  [r]
52059
52059
  ), P = Se(() => {
52060
52060
  _();
52061
- }, [A, j]), $ = Ft(
52061
+ }, [A, j]), $ = vt(
52062
52062
  () => I$(P, 1e3),
52063
52063
  [P]
52064
52064
  ), q = Se(
@@ -52067,15 +52067,15 @@ const g3e = Et.memo(
52067
52067
  n.commands.insertContentAt(Y - 4, B);
52068
52068
  },
52069
52069
  [t, n, e.nodeSize]
52070
- ), z = Ft(
52070
+ ), z = vt(
52071
52071
  () => $xe(q),
52072
52072
  [q]
52073
- ), U = Ft(
52073
+ ), U = vt(
52074
52074
  () => zxe(q),
52075
52075
  [q]
52076
52076
  ), X = Se(() => {
52077
52077
  c(!u), p(u ? 2 : U.length);
52078
- }, [u, U.length]), oe = Ft(() => {
52078
+ }, [u, U.length]), oe = vt(() => {
52079
52079
  switch (w) {
52080
52080
  case "center":
52081
52081
  return "justify-center";
@@ -52090,7 +52090,7 @@ const g3e = Et.memo(
52090
52090
  Re(() => {
52091
52091
  A && $();
52092
52092
  }, [A]);
52093
- const ee = Ft(() => {
52093
+ const ee = vt(() => {
52094
52094
  const { doc: B, selection: Y } = n.state, Q = t();
52095
52095
  if (Q === void 0) return !1;
52096
52096
  const ce = B.nodeAt(Q);
@@ -52267,7 +52267,7 @@ const q$ = Ct.create({
52267
52267
  renderHTML({ HTMLAttributes: e }) {
52268
52268
  return [
52269
52269
  "div",
52270
- jt(e, { "data-type": "d-block" }),
52270
+ Tt(e, { "data-type": "d-block" }),
52271
52271
  0
52272
52272
  ];
52273
52273
  },
@@ -52337,7 +52337,9 @@ const q$ = Ct.create({
52337
52337
  const {
52338
52338
  selection: { $head: t, from: n, to: r },
52339
52339
  doc: o
52340
- } = e.state, s = t.marks().find((M) => M.type.name === "textStyle"), a = (s == null ? void 0 : s.attrs) ?? {}, l = t.node(t.depth), u = t.node(t.depth - 1), d = t.toString().split("/"), p = t.end() === n, h = t.start() === n, f = d.some((M) => M.includes("table"));
52340
+ } = e.state, s = t.marks().find(
52341
+ (M) => M.type.name === "textStyle"
52342
+ ), a = (s == null ? void 0 : s.attrs) ?? {}, l = t.node(t.depth), u = t.node(t.depth - 1), d = t.toString().split("/"), p = t.end() === n, h = t.start() === n, f = d.some((M) => M.includes("table"));
52341
52343
  if ((u == null ? void 0 : u.type.name) === "listItem" || (u == null ? void 0 : u.type.name) === "taskItem") {
52342
52344
  if (f)
52343
52345
  return !1;
@@ -52676,8 +52678,8 @@ const q$ = Ct.create({
52676
52678
  },
52677
52679
  addProseMirrorPlugins() {
52678
52680
  return this.options.hasAvailableModels ? [
52679
- new vt({
52680
- key: new Tt("dblock-aiwriter-space"),
52681
+ new Ft({
52682
+ key: new jt("dblock-aiwriter-space"),
52681
52683
  props: {
52682
52684
  handleTextInput: (e, t, n, r) => {
52683
52685
  var h, f;
@@ -52856,7 +52858,7 @@ const F3e = Ct.create({
52856
52858
  );
52857
52859
  return [
52858
52860
  "table",
52859
- jt(this.options.HTMLAttributes, t, {
52861
+ Tt(this.options.HTMLAttributes, t, {
52860
52862
  style: r ? `width: ${r}` : `min-width: ${o}`
52861
52863
  }),
52862
52864
  n,
@@ -55075,7 +55077,7 @@ const u4e = [
55075
55077
  renderHTML({ HTMLAttributes: e }) {
55076
55078
  return [
55077
55079
  "td",
55078
- jt(this.options.HTMLAttributes, e),
55080
+ Tt(this.options.HTMLAttributes, e),
55079
55081
  0
55080
55082
  ];
55081
55083
  },
@@ -55118,7 +55120,7 @@ const u4e = [
55118
55120
  renderHTML({ HTMLAttributes: e }) {
55119
55121
  return [
55120
55122
  "th",
55121
- jt(this.options.HTMLAttributes, e),
55123
+ Tt(this.options.HTMLAttributes, e),
55122
55124
  0
55123
55125
  ];
55124
55126
  },
@@ -55154,7 +55156,7 @@ const u4e = [
55154
55156
  renderHTML({ HTMLAttributes: e }) {
55155
55157
  return [
55156
55158
  "tr",
55157
- jt(this.options.HTMLAttributes, e),
55159
+ Tt(this.options.HTMLAttributes, e),
55158
55160
  0
55159
55161
  ];
55160
55162
  },
@@ -55265,9 +55267,9 @@ const g4e = yt.create({
55265
55267
  };
55266
55268
  },
55267
55269
  addProseMirrorPlugins() {
55268
- const e = new Tt(this.name), t = Object.entries(this.editor.schema.nodes).map(([, n]) => n).filter((n) => this.options.notAfter.includes(n.name));
55270
+ const e = new jt(this.name), t = Object.entries(this.editor.schema.nodes).map(([, n]) => n).filter((n) => this.options.notAfter.includes(n.name));
55269
55271
  return [
55270
- new vt({
55272
+ new Ft({
55271
55273
  key: e,
55272
55274
  appendTransaction: (n, r, o) => {
55273
55275
  const { doc: i, tr: s, schema: a } = o;
@@ -55598,7 +55600,7 @@ const g4e = yt.create({
55598
55600
  renderHTML({ HTMLAttributes: e }) {
55599
55601
  return [
55600
55602
  "div",
55601
- jt(e, { "data-action-node": "" }),
55603
+ Tt(e, { "data-action-node": "" }),
55602
55604
  0
55603
55605
  ];
55604
55606
  },
@@ -57058,8 +57060,8 @@ const UFe = yt.create({
57058
57060
  };
57059
57061
  },
57060
57062
  addProseMirrorPlugins() {
57061
- return [new vt({
57062
- key: new Tt("markdownClipboard"),
57063
+ return [new Ft({
57064
+ key: new jt("markdownClipboard"),
57063
57065
  props: {
57064
57066
  clipboardTextParser: (e, t, n) => {
57065
57067
  if (n || !this.options.transformPastedText)
@@ -91149,7 +91151,7 @@ const AY = { addInlineMath: !0, evaluation: !1, delimiters: "dollar", renderText
91149
91151
  let n = "x";
91150
91152
  return e.attrs.latex && typeof e.attrs.latex == "string" && (n = e.attrs.latex), [
91151
91153
  "span",
91152
- jt(t, {
91154
+ Tt(t, {
91153
91155
  "data-type": this.name
91154
91156
  }),
91155
91157
  _m(e.attrs.display === "yes" ? "block" : "inline", "start", this.options) + n + _m(e.attrs.display === "yes" ? "block" : "inline", "end", this.options)
@@ -91251,7 +91253,7 @@ const UBe = "mathExtension", PBe = yt.create({
91251
91253
  ];
91252
91254
  },
91253
91255
  renderHTML({ HTMLAttributes: e }) {
91254
- return ["footnote", jt(e), 0];
91256
+ return ["footnote", Tt(e), 0];
91255
91257
  }
91256
91258
  });
91257
91259
  Ct.create({
@@ -91274,7 +91276,7 @@ Ct.create({
91274
91276
  ];
91275
91277
  },
91276
91278
  renderHTML({ HTMLAttributes: e }) {
91277
- return ["footnote-ref", jt(e)];
91279
+ return ["footnote-ref", Tt(e)];
91278
91280
  }
91279
91281
  });
91280
91282
  var $Be = Lr.create({
@@ -91298,7 +91300,7 @@ var $Be = Lr.create({
91298
91300
  ];
91299
91301
  },
91300
91302
  renderHTML({ HTMLAttributes: e }) {
91301
- return ["sup", jt(this.options.HTMLAttributes, e), 0];
91303
+ return ["sup", Tt(this.options.HTMLAttributes, e), 0];
91302
91304
  },
91303
91305
  addCommands() {
91304
91306
  return {
@@ -91333,7 +91335,7 @@ var $Be = Lr.create({
91333
91335
  ];
91334
91336
  },
91335
91337
  renderHTML({ HTMLAttributes: e }) {
91336
- return ["sub", jt(this.options.HTMLAttributes, e), 0];
91338
+ return ["sub", Tt(this.options.HTMLAttributes, e), 0];
91337
91339
  },
91338
91340
  addCommands() {
91339
91341
  return {
@@ -91348,8 +91350,8 @@ var $Be = Lr.create({
91348
91350
  };
91349
91351
  }
91350
91352
  }), qBe = WBe;
91351
- const VBe = (e, t) => new vt({
91352
- key: new Tt("media-paste-drop"),
91353
+ const VBe = (e, t) => new Ft({
91354
+ key: new jt("media-paste-drop"),
91353
91355
  props: {
91354
91356
  handlePaste(n, r) {
91355
91357
  var u, c;
@@ -91509,10 +91511,10 @@ const VBe = (e, t) => new vt({
91509
91511
  const { "media-type": t } = e;
91510
91512
  return t === "img" ? [
91511
91513
  "img",
91512
- jt(this.options.HTMLAttributes, e)
91514
+ Tt(this.options.HTMLAttributes, e)
91513
91515
  ] : t === "secure-img" ? [
91514
91516
  "img",
91515
- jt(this.options.HTMLAttributes, e)
91517
+ Tt(this.options.HTMLAttributes, e)
91516
91518
  ] : t === "video" ? [
91517
91519
  "video",
91518
91520
  { controls: "true", style: "width: 100%", ...e },
@@ -91521,7 +91523,7 @@ const VBe = (e, t) => new vt({
91521
91523
  "TiptapMediaExtension-renderHTML method: Media Type not set, going default with image"
91522
91524
  ), [
91523
91525
  "img",
91524
- jt(this.options.HTMLAttributes, e)
91526
+ Tt(this.options.HTMLAttributes, e)
91525
91527
  ]);
91526
91528
  },
91527
91529
  addCommands() {
@@ -91716,11 +91718,11 @@ const XBe = ({
91716
91718
  name: "linkPreview",
91717
91719
  addProseMirrorPlugins() {
91718
91720
  if (!this.options.metadataProxyUrl) return [];
91719
- const e = new Tt("link-preview");
91721
+ const e = new jt("link-preview");
91720
91722
  let t = null, n = null, r = null, o = null, i = null;
91721
91723
  const s = new EventTarget();
91722
91724
  return [
91723
- new vt({
91725
+ new Ft({
91724
91726
  key: e,
91725
91727
  props: {
91726
91728
  handleDOMEvents: {
@@ -91788,9 +91790,9 @@ const XBe = ({
91788
91790
  };
91789
91791
  },
91790
91792
  addProseMirrorPlugins() {
91791
- const e = new Tt("callout-block");
91793
+ const e = new jt("callout-block");
91792
91794
  return [
91793
- new vt({
91795
+ new Ft({
91794
91796
  key: e,
91795
91797
  props: {
91796
91798
  transformPasted(t, n) {
@@ -91835,7 +91837,7 @@ const XBe = ({
91835
91837
  renderHTML({ HTMLAttributes: e }) {
91836
91838
  return [
91837
91839
  "aside",
91838
- jt(this.options.HTMLAttributes, e),
91840
+ Tt(this.options.HTMLAttributes, e),
91839
91841
  0
91840
91842
  ];
91841
91843
  }
@@ -91887,27 +91889,43 @@ const XBe = ({
91887
91889
  return (i == null ? void 0 : i.type.name) === "paragraph" && (!n.fontFamily && i.attrs.fontFamily && (n.fontFamily = i.attrs.fontFamily), !n.fontSize && i.attrs.fontSize && (n.fontSize = i.attrs.fontSize)), n;
91888
91890
  };
91889
91891
  return {
91890
- setFontSize: (t) => ({ chain: n }) => {
91891
- const r = e(this.editor);
91892
- return n().setMark("textStyle", { ...r, fontSize: t }).run();
91893
- },
91894
- unsetFontSize: () => ({ chain: t }) => {
91895
- const n = e(this.editor);
91896
- return t().setMark("textStyle", { ...n, fontSize: null }).removeEmptyTextStyle().run();
91897
- },
91898
- increaseFontSize: () => ({ chain: t }) => {
91899
- const n = e(this.editor);
91900
- let r = parseInt(n.fontSize || "16");
91901
- isNaN(r) && (r = 16);
91902
- const o = J5.find((i) => i > r);
91903
- return o ? t().setMark("textStyle", { ...n, fontSize: `${o}px` }).run() : !1;
91904
- },
91905
- decreaseFontSize: () => ({ chain: t }) => {
91906
- const n = e(this.editor);
91907
- let r = parseInt(n.fontSize || "16");
91908
- isNaN(r) && (r = 16);
91909
- const o = [...J5].reverse().find((i) => i < r);
91910
- return o ? t().setMark("textStyle", { ...n, fontSize: `${o}px` }).run() : !1;
91892
+ setFontSize: (t) => ({ chain: n, state: r, tr: o }) => {
91893
+ const i = e(this.editor), { selection: s } = r, a = s.$from, l = a.node(a.depth);
91894
+ return (l == null ? void 0 : l.type.name) === "paragraph" && l.textContent === "" && o.setNodeMarkup(a.before(a.depth), void 0, {
91895
+ ...l.attrs,
91896
+ fontSize: t
91897
+ }), n().setMark("textStyle", { ...i, fontSize: t }).run();
91898
+ },
91899
+ unsetFontSize: () => ({ chain: t, state: n, tr: r }) => {
91900
+ const o = e(this.editor), { selection: i } = n, s = i.$from, a = s.node(s.depth);
91901
+ return (a == null ? void 0 : a.type.name) === "paragraph" && a.textContent === "" && r.setNodeMarkup(s.before(s.depth), void 0, {
91902
+ ...a.attrs,
91903
+ fontSize: null
91904
+ }), t().setMark("textStyle", { ...o, fontSize: null }).removeEmptyTextStyle().run();
91905
+ },
91906
+ increaseFontSize: () => ({ chain: t, state: n, tr: r }) => {
91907
+ const o = e(this.editor);
91908
+ let i = parseInt(o.fontSize || "16");
91909
+ isNaN(i) && (i = 16);
91910
+ const s = J5.find((d) => d > i);
91911
+ if (!s) return !1;
91912
+ const a = `${s}px`, { selection: l } = n, u = l.$from, c = u.node(u.depth);
91913
+ return (c == null ? void 0 : c.type.name) === "paragraph" && c.textContent === "" && r.setNodeMarkup(u.before(u.depth), void 0, {
91914
+ ...c.attrs,
91915
+ fontSize: a
91916
+ }), t().setMark("textStyle", { ...o, fontSize: a }).run();
91917
+ },
91918
+ decreaseFontSize: () => ({ chain: t, state: n, tr: r }) => {
91919
+ const o = e(this.editor);
91920
+ let i = parseInt(o.fontSize || "16");
91921
+ isNaN(i) && (i = 16);
91922
+ const s = [...J5].reverse().find((d) => d < i);
91923
+ if (!s) return !1;
91924
+ const a = `${s}px`, { selection: l } = n, u = l.$from, c = u.node(u.depth);
91925
+ return (c == null ? void 0 : c.type.name) === "paragraph" && c.textContent === "" && r.setNodeMarkup(u.before(u.depth), void 0, {
91926
+ ...c.attrs,
91927
+ fontSize: a
91928
+ }), t().setMark("textStyle", { ...o, fontSize: `${s}px` }).run();
91911
91929
  }
91912
91930
  };
91913
91931
  },
@@ -91925,13 +91943,19 @@ const XBe = ({
91925
91943
  return (i == null ? void 0 : i.type.name) === "paragraph" && (!n.fontFamily && i.attrs.fontFamily && (n.fontFamily = i.attrs.fontFamily), !n.fontSize && i.attrs.fontSize && (n.fontSize = i.attrs.fontSize)), n;
91926
91944
  };
91927
91945
  return {
91928
- setFontFamily: (t) => ({ chain: n }) => {
91929
- const r = e(this.editor);
91930
- return n().setMark("textStyle", { ...r, fontFamily: t }).run();
91946
+ setFontFamily: (t) => ({ chain: n, state: r, tr: o }) => {
91947
+ const i = e(this.editor), { selection: s } = r, a = s.$from, l = a.node(a.depth);
91948
+ return (l == null ? void 0 : l.type.name) === "paragraph" && l.textContent === "" && o.setNodeMarkup(a.before(a.depth), void 0, {
91949
+ ...l.attrs,
91950
+ fontFamily: t
91951
+ }), n().setMark("textStyle", { ...i, fontFamily: t }).run();
91931
91952
  },
91932
- unsetFontFamily: () => ({ chain: t }) => {
91933
- const n = e(this.editor);
91934
- return t().setMark("textStyle", { ...n, fontFamily: null }).removeEmptyTextStyle().run();
91953
+ unsetFontFamily: () => ({ chain: t, state: n, tr: r }) => {
91954
+ const o = e(this.editor), { selection: i } = n, s = i.$from, a = s.node(s.depth);
91955
+ return (a == null ? void 0 : a.type.name) === "paragraph" && a.textContent === "" && r.setNodeMarkup(s.before(s.depth), void 0, {
91956
+ ...a.attrs,
91957
+ fontFamily: null
91958
+ }), t().setMark("textStyle", { ...o, fontFamily: null }).removeEmptyTextStyle().run();
91935
91959
  }
91936
91960
  };
91937
91961
  },
@@ -91961,8 +91985,8 @@ const XBe = ({
91961
91985
  // Plugin 1: Inheritance
91962
91986
  // When a paragraph is newly inserted next to a styled paragraph, copy
91963
91987
  // fontFamily and fontSize from the previous sibling in one pass.
91964
- new vt({
91965
- key: new Tt("typographyInheritance"),
91988
+ new Ft({
91989
+ key: new jt("typographyInheritance"),
91966
91990
  appendTransaction: (e, t, n) => {
91967
91991
  if (!e.some((s) => {
91968
91992
  if (!s.docChanged) return !1;
@@ -92002,64 +92026,28 @@ const XBe = ({
92002
92026
  // When cursor moves into an empty paragraph that has fontFamily or
92003
92027
  // fontSize node attrs, restore both as storedMarks in one pass so the
92004
92028
  // next typed character picks up the correct styling.
92005
- new vt({
92006
- key: new Tt("typographyStoredMarks"),
92029
+ new Ft({
92030
+ key: new jt("typographyStoredMarks"),
92007
92031
  appendTransaction: (e, t, n) => {
92008
- var a, l;
92009
- if (!e.some((u) => u.selectionSet)) return null;
92032
+ var a, l, u;
92033
+ if (!e.some((c) => c.selectionSet)) return null;
92010
92034
  const { selection: o } = n;
92011
92035
  if (!o.empty) return null;
92012
92036
  const i = o.$from, s = i.node(i.depth);
92013
92037
  if ((s == null ? void 0 : s.type.name) === "paragraph" && s.textContent === "" && (s.attrs.fontFamily || s.attrs.fontSize)) {
92014
- const u = n.schema.marks.textStyle;
92015
- if (!u) return null;
92016
- const c = n.tr, d = ((a = c.storedMarks) == null ? void 0 : a.find((h) => h.type === u)) || ((l = n.storedMarks) == null ? void 0 : l.find((h) => h.type === u));
92017
- if (d && d.attrs.fontFamily === s.attrs.fontFamily && d.attrs.fontSize === s.attrs.fontSize)
92038
+ const c = n.schema.marks.textStyle;
92039
+ if (!c) return null;
92040
+ const d = n.tr, p = ((a = d.storedMarks) == null ? void 0 : a.find((m) => m.type === c)) || ((l = n.storedMarks) == null ? void 0 : l.find((m) => m.type === c));
92041
+ if (p && p.attrs.fontFamily === s.attrs.fontFamily && p.attrs.fontSize === s.attrs.fontSize)
92018
92042
  return null;
92019
- const p = d ? {
92020
- ...d.attrs,
92021
- fontFamily: s.attrs.fontFamily,
92022
- fontSize: s.attrs.fontSize
92023
- } : {
92043
+ const h = (u = n.storedMarks) == null ? void 0 : u.find(
92044
+ (m) => m.type === c
92045
+ ), g = {
92046
+ ...(p == null ? void 0 : p.attrs) ?? (h == null ? void 0 : h.attrs) ?? {},
92024
92047
  fontFamily: s.attrs.fontFamily,
92025
92048
  fontSize: s.attrs.fontSize
92026
92049
  };
92027
- return c.addStoredMark(u.create(p)), c;
92028
- }
92029
- return null;
92030
- }
92031
- }),
92032
- // Plugin 3: Sync node attrs ↔ storedMarks
92033
- // When storedMarks change on an empty paragraph, reflect the new
92034
- // fontFamily/fontSize back to the node attrs so they persist when the
92035
- // user navigates away.
92036
- //
92037
- // IMPORTANT: Only clear a node attr when the textStyle mark itself
92038
- // exists but has an explicit null for that property. If storedMarks
92039
- // contains only non-textStyle marks (bold, italic, etc.), do NOT clear
92040
- // font attrs — that was the cause of bold/italic wiping fontSize.
92041
- new vt({
92042
- key: new Tt("typographySyncNodeAttr"),
92043
- appendTransaction: (e, t, n) => {
92044
- var p, h, f;
92045
- if (!e.some(
92046
- (g) => g.storedMarksSet
92047
- )) return null;
92048
- const { selection: o } = n;
92049
- if (!o.empty) return null;
92050
- const i = o.$from, s = i.node(i.depth);
92051
- if ((s == null ? void 0 : s.type.name) !== "paragraph" || s.textContent !== "")
92052
- return null;
92053
- const a = (p = n.storedMarks) == null ? void 0 : p.find(
92054
- (g) => g.type.name === "textStyle"
92055
- ), l = ((h = a == null ? void 0 : a.attrs) == null ? void 0 : h.fontFamily) ?? null, u = ((f = a == null ? void 0 : a.attrs) == null ? void 0 : f.fontSize) ?? null, c = a ? l : s.attrs.fontFamily, d = a ? u : s.attrs.fontSize;
92056
- if (c !== s.attrs.fontFamily || d !== s.attrs.fontSize) {
92057
- const g = n.tr;
92058
- return g.setNodeMarkup(i.before(i.depth), void 0, {
92059
- ...s.attrs,
92060
- fontFamily: c,
92061
- fontSize: d
92062
- }), g;
92050
+ return d.addStoredMark(c.create(g)), d;
92063
92051
  }
92064
92052
  return null;
92065
92053
  }
@@ -93174,8 +93162,8 @@ function ZNe({
93174
93162
  }) {
93175
93163
  if (!["highlight", "highlightAuto", "listLanguages"].every((o) => XNe(t[o])))
93176
93164
  throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");
93177
- const r = new vt({
93178
- key: new Tt("lowlight"),
93165
+ const r = new Ft({
93166
+ key: new jt("lowlight"),
93179
93167
  state: {
93180
93168
  init: (o, { doc: i }) => TM({
93181
93169
  doc: i,
@@ -93279,7 +93267,7 @@ function nMe({
93279
93267
  editor: n,
93280
93268
  deleteNode: r
93281
93269
  }) {
93282
- const o = Ve(null), [i, s] = Be("Copy"), a = e.attrs.language || "plaintext", l = !n.isEditable, u = e.attrs.lineNumbers && !l, c = e.attrs.wordWrap && !l, d = e.attrs.tabSize ?? 2, p = e.attrs.shouldFocus, { isMobile: h } = _l(), f = e.textContent || e.attrs.code || "", g = Ft(() => {
93270
+ const o = Ve(null), [i, s] = Be("Copy"), a = e.attrs.language || "plaintext", l = !n.isEditable, u = e.attrs.lineNumbers && !l, c = e.attrs.wordWrap && !l, d = e.attrs.tabSize ?? 2, p = e.attrs.shouldFocus, { isMobile: h } = _l(), f = e.textContent || e.attrs.code || "", g = vt(() => {
93283
93271
  const y = f.split(`
93284
93272
  `), x = [];
93285
93273
  let v = 0;
@@ -106499,9 +106487,9 @@ const AOe = yt.create({
106499
106487
  };
106500
106488
  },
106501
106489
  addProseMirrorPlugins() {
106502
- const e = new Tt("lineHeightInheritance");
106490
+ const e = new jt("lineHeightInheritance");
106503
106491
  return [
106504
- new vt({
106492
+ new Ft({
106505
106493
  key: e,
106506
106494
  appendTransaction: (t, n, r) => {
106507
106495
  if (!t.some((a) => {
@@ -106564,7 +106552,7 @@ function SOe(e) {
106564
106552
  text: m[0]
106565
106553
  } : null;
106566
106554
  }
106567
- var TOe = new Tt("suggestion");
106555
+ var TOe = new jt("suggestion");
106568
106556
  function jOe({
106569
106557
  pluginKey: e = TOe,
106570
106558
  editor: t,
@@ -106615,7 +106603,7 @@ function jOe({
106615
106603
  const A = w.state.tr.setMeta(D, { exit: !0 });
106616
106604
  w.dispatch(A);
106617
106605
  }
106618
- const k = new vt({
106606
+ const k = new Ft({
106619
106607
  key: e,
106620
106608
  view() {
106621
106609
  return {
@@ -166657,7 +166645,7 @@ function MOe(e) {
166657
166645
  };
166658
166646
  });
166659
166647
  }
166660
- const OOe = 200, ROe = new Tt("emoji"), IOe = Ct.create({
166648
+ const OOe = 200, ROe = new jt("emoji"), IOe = Ct.create({
166661
166649
  name: "emoji",
166662
166650
  content: "text*",
166663
166651
  priority: OOe,
@@ -166754,7 +166742,7 @@ const OOe = 200, ROe = new Tt("emoji"), IOe = Ct.create({
166754
166742
  var t;
166755
166743
  return [
166756
166744
  ...((t = this.parent) == null ? void 0 : t.call(this)) || [],
166757
- new vt({
166745
+ new Ft({
166758
166746
  props: {
166759
166747
  // Extends the default Subscript mark so users can exit subscript mode by typing a space.
166760
166748
  handleTextInput: (n, r, o, i) => {
@@ -167821,7 +167809,7 @@ const qOe = ({
167821
167809
  throw new Error("useEditorContext must be used within an EditorProvider");
167822
167810
  return e;
167823
167811
  }, dX = ({ children: e, documentStyling: t, theme: n = "light" }) => {
167824
- const r = Ft(
167812
+ const r = vt(
167825
167813
  () => ({
167826
167814
  documentStyling: t,
167827
167815
  theme: n
@@ -167917,7 +167905,7 @@ const qOe = ({
167917
167905
  ];
167918
167906
  },
167919
167907
  renderHTML({ HTMLAttributes: e }) {
167920
- return ["br", jt(this.options.HTMLAttributes, e)];
167908
+ return ["br", Tt(this.options.HTMLAttributes, e)];
167921
167909
  },
167922
167910
  addCommands() {
167923
167911
  return {
@@ -167938,8 +167926,8 @@ const qOe = ({
167938
167926
  },
167939
167927
  addProseMirrorPlugins() {
167940
167928
  return [
167941
- new vt({
167942
- key: new Tt("pageBreakPlugin"),
167929
+ new Ft({
167930
+ key: new jt("pageBreakPlugin"),
167943
167931
  props: {
167944
167932
  handleClick: (e, t, n) => {
167945
167933
  if (n.target.classList.contains("remove-page-break-icon")) {
@@ -168074,7 +168062,7 @@ const b6 = dD.getInstance(), tRe = (e) => ({
168074
168062
  renderHTML({ HTMLAttributes: e }) {
168075
168063
  return [
168076
168064
  "span",
168077
- jt(this.options.HTMLAttributes, e),
168065
+ Tt(this.options.HTMLAttributes, e),
168078
168066
  0
168079
168067
  ];
168080
168068
  },
@@ -168914,7 +168902,7 @@ const ERe = yt.create({
168914
168902
  },
168915
168903
  addProseMirrorPlugins() {
168916
168904
  var p;
168917
- const e = new Tt("ai-autocomplete");
168905
+ const e = new jt("ai-autocomplete");
168918
168906
  let t = null, n = !1, r = "", o = null;
168919
168907
  const i = new FX({
168920
168908
  host: (p = this.options) == null ? void 0 : p.endpoint
@@ -168992,7 +168980,7 @@ ${x}`, M = await l(A);
168992
168980
  }, s.typingDebounceTime);
168993
168981
  };
168994
168982
  return [
168995
- new vt({
168983
+ new Ft({
168996
168984
  key: e,
168997
168985
  state: {
168998
168986
  init() {
@@ -169614,7 +169602,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169614
169602
  renderHTML({ HTMLAttributes: e }) {
169615
169603
  return [
169616
169604
  "div",
169617
- jt(
169605
+ Tt(
169618
169606
  this.options.HTMLAttributes,
169619
169607
  { "data-type": "ai-writer" },
169620
169608
  e
@@ -169709,7 +169697,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169709
169697
  activeTabId: q
169710
169698
  }), { handleCommentInteraction: ce, handleCommentClick: N } = RRe({
169711
169699
  onCommentInteraction: d
169712
- }), te = Ve(!0), [le, G] = Be([]), V = Ft(() => Q, [Q]);
169700
+ }), te = Ve(!0), [le, G] = Be([]), V = vt(() => Q, [Q]);
169713
169701
  Re(() => {
169714
169702
  q && K(null);
169715
169703
  }, [q, K]);
@@ -169777,7 +169765,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169777
169765
  Re(() => {
169778
169766
  U && (U.current = he ?? null);
169779
169767
  }, [he, U]);
169780
- const De = Ft(() => X, [X]);
169768
+ const De = vt(() => X, [X]);
169781
169769
  Re(() => {
169782
169770
  he && (te.current = !1);
169783
169771
  }, [he]);
@@ -169793,7 +169781,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169793
169781
  he.off("update", Te), be.current && clearTimeout(be.current);
169794
169782
  };
169795
169783
  }, [he]);
169796
- const de = Ft(() => o ? !1 : De ? !l : !0, [o, De, l]);
169784
+ const de = vt(() => o ? !1 : De ? !l : !0, [o, De, l]);
169797
169785
  Re(() => {
169798
169786
  he == null || he.setEditable(de);
169799
169787
  }, [he, de]), Re(() => {
@@ -170117,7 +170105,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170117
170105
  y
170118
170106
  ),
170119
170107
  [u, a, l]
170120
- ), v = Ft(
170108
+ ), v = vt(
170121
170109
  () => gX.configure({
170122
170110
  HTMLAttributes: {
170123
170111
  class: "inline-comment"
@@ -170359,7 +170347,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170359
170347
  flushPendingUpdate: l,
170360
170348
  getEditor: u
170361
170349
  }) => {
170362
- const c = n || t !== null, d = Ft(() => e ? c ? t || r && !n && !t ? aP(t, e, {
170350
+ const c = n || t !== null, d = vt(() => e ? c ? t || r && !n && !t ? aP(t, e, {
170363
170351
  createDefaultTabIfMissing: o
170364
170352
  }) : { tabList: [], activeTabId: "default" } : { tabList: [], activeTabId: "default" } : { tabList: [], activeTabId: "default" }, [
170365
170353
  e,
@@ -170370,7 +170358,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170370
170358
  c
170371
170359
  ]), [p, h] = Be(
170372
170360
  s || d.activeTabId
170373
- ), [f, g] = Be(d.tabList), m = Ft(() => f.length > 0, [f]), b = Ve(null), y = Ve(p);
170361
+ ), [f, g] = Be(d.tabList), m = vt(() => f.length > 0, [f]), b = Ve(null), y = Ve(p);
170374
170362
  y.current = p;
170375
170363
  const x = Ve(d.tabList.length > 0);
170376
170364
  Re(() => {
@@ -180820,7 +180808,7 @@ const C$e = ({
180820
180808
  ), S = md(
180821
180809
  g == null ? void 0 : g.canvasBackground,
180822
180810
  b
180823
- ), L = Ft(() => new Wy({
180811
+ ), L = vt(() => new Wy({
180824
180812
  extensions: e.extensionManager.extensions.filter(
180825
180813
  (ee) => ![
180826
180814
  "collaboration",
@@ -181600,7 +181588,7 @@ const C$e = ({
181600
181588
  }, [e, c]);
181601
181589
  const p = i == null ? void 0 : i.find(
181602
181590
  (f) => f.id === t
181603
- ), h = Ft(
181591
+ ), h = vt(
181604
181592
  () => ({
181605
181593
  shouldShow: ({ editor: f }) => {
181606
181594
  var y, x;
@@ -181672,10 +181660,10 @@ const C$e = ({
181672
181660
  a.preventDefault(), a.stopPropagation(), t(a, e.id);
181673
181661
  },
181674
181662
  [t, e.id]
181675
- ), i = Ft(() => {
181663
+ ), i = vt(() => {
181676
181664
  const a = B8(e.textContent), l = e.id.replace(/-/g, "").substring(0, 8), u = `${a}-${l}`, c = new URL(globalThis.location.href), d = c.hash.startsWith("#") ? c.hash.substring(1) : c.hash, p = new URLSearchParams(d);
181677
181665
  return p.set("heading", u), c.hash = p.toString(), c.toString();
181678
- }, [e.id, e.textContent]), s = Ft(() => Ge(
181666
+ }, [e.id, e.textContent]), s = vt(() => Ge(
181679
181667
  `flex items-center transition-all text-body-sm-bold max-[1280px]:h-[32px] max-[1280px]:px-2 max-[1280px]:py-1 h-5 max-[1280px]:max-w-full ${r === "landscape" ? "xl:!max-w-[160px] min-[1750px]:!max-w-[240px]" : "xl:!max-w-[160px] min-[1410px]:!max-w-[240px] min-[1600px]:!max-w-[320px]"} xl:border-l-2`,
181680
181668
  e.isActive ? "color-border-active color-text-default max-[1280px]:border-none max-[1280px]:bg-[#F8F9FA] max-[1280px]:rounded max-[1280px]:text-[#363B3F]" : "color-text-secondary border-transparent lg:hover:!brightness-90"
181681
181669
  ), [e.isActive, r]);
@@ -181706,7 +181694,7 @@ const KZ = dh(() => /* @__PURE__ */ F.jsx("p", { className: "text-helper-text-sm
181706
181694
  KZ.displayName = "ToCEmptyState";
181707
181695
  const YZ = dh(
181708
181696
  ({ items: e = [], editor: t, setItems: n, orientation: r }) => {
181709
- const [o, i] = Be(null), s = Rn("(max-width: 1280px)"), a = Ve(null), l = Ve(0), u = Ve(null), c = Ft(() => e.map((m) => ({
181697
+ const [o, i] = Be(null), s = Rn("(max-width: 1280px)"), a = Ve(null), l = Ve(0), u = Ve(null), c = vt(() => e.map((m) => ({
181710
181698
  ...m,
181711
181699
  isActive: m.id === o
181712
181700
  })), [e, o]), d = Se(() => {
@@ -182645,10 +182633,10 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
182645
182633
  p(z, { emoji: U });
182646
182634
  }, w = zJ(
182647
182635
  $J(HJ, { activationConstraint: { distance: 5 } })
182648
- ), [D, C] = Be(null), A = Ft(
182636
+ ), [D, C] = Be(null), A = vt(
182649
182637
  () => e.find((z) => z.id === t),
182650
182638
  [e, t]
182651
- ), M = Ft(
182639
+ ), M = vt(
182652
182640
  () => e.find((z) => z.id === D),
182653
182641
  [e, D]
182654
182642
  ), [j, _] = Be(null), [O, E] = Be(!1), [T, S] = Be({}), L = Se(
@@ -183983,7 +183971,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
183983
183971
  return;
183984
183972
  }
183985
183973
  }, [fe, Le, dt]);
183986
- const H7 = Rn("(max-width: 768px)"), hJ = Ft(() => (ce || []).reduce(
183974
+ const H7 = Rn("(max-width: 768px)"), hJ = vt(() => (ce || []).reduce(
183987
183975
  (At, Dt) => {
183988
183976
  if (Dt.deleted) return At;
183989
183977
  const St = Dt.tabId || _c;
@@ -184865,7 +184853,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184865
184853
  if (!r) return null;
184866
184854
  const A = r.activeTabId, M = f(r.ydoc, A);
184867
184855
  return kh(r.editor, M);
184868
- }, [f, r]), y = Ft(() => r ? [
184856
+ }, [f, r]), y = vt(() => r ? [
184869
184857
  {
184870
184858
  icon: "FileExport",
184871
184859
  title: "PDF document (.pdf)",
@@ -184947,7 +184935,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184947
184935
  tabs: (r == null ? void 0 : r.tabs) ?? [],
184948
184936
  ydoc: (r == null ? void 0 : r.ydoc) ?? null,
184949
184937
  exportOptions: y
184950
- }), k = Ft(() => !r || r.tabs.length <= 1 ? [{ id: "current", label: "Current tab" }] : [
184938
+ }), k = vt(() => !r || r.tabs.length <= 1 ? [{ id: "current", label: "Current tab" }] : [
184951
184939
  { id: "current", label: "Current tab" },
184952
184940
  { id: "all", label: "All tabs" }
184953
184941
  ], [r]), w = Se(
@@ -184995,7 +184983,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184995
184983
  }));
184996
184984
  },
184997
184985
  [p, v, r]
184998
- ), C = Ft(
184986
+ ), C = vt(
184999
184987
  () => ({
185000
184988
  open: i && r !== null,
185001
184989
  onOpenChange: h,
@@ -185245,7 +185233,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
185245
185233
  renderHTML({ HTMLAttributes: e }) {
185246
185234
  return [
185247
185235
  "span",
185248
- jt(e, {
185236
+ Tt(e, {
185249
185237
  "data-type": "reminder-block",
185250
185238
  contenteditable: "false",
185251
185239
  style: "user-select: none;"