@wirecore/wirelayer-react 0.12.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/CopyButton-C_LAuCkR.js +47 -0
  2. package/dist/Tree-DLHbcH3-.js +602 -0
  3. package/dist/chart/Chart.d.ts +3 -3
  4. package/dist/chart/Chart.d.ts.map +1 -1
  5. package/dist/chart/PieChart.d.ts +3 -3
  6. package/dist/chart/PieChart.d.ts.map +1 -1
  7. package/dist/chart/SeriesChartView.d.ts +1 -1
  8. package/dist/chart/SeriesChartView.d.ts.map +1 -1
  9. package/dist/chart/Sparkline.d.ts +3 -3
  10. package/dist/chart/Sparkline.d.ts.map +1 -1
  11. package/dist/chart/WaterfallChart.d.ts +3 -3
  12. package/dist/chart/WaterfallChart.d.ts.map +1 -1
  13. package/dist/chart/types.d.ts +2 -2
  14. package/dist/chart/types.d.ts.map +1 -1
  15. package/dist/chart.js +148 -143
  16. package/dist/code.js +1 -1
  17. package/dist/components/AngleSlider/AngleSlider.d.ts +3 -3
  18. package/dist/components/AngleSlider/AngleSlider.d.ts.map +1 -1
  19. package/dist/components/BlockUi/BlockUi.d.ts +3 -3
  20. package/dist/components/BlockUi/BlockUi.d.ts.map +1 -1
  21. package/dist/components/Calendar/Calendar.d.ts +3 -3
  22. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  23. package/dist/components/Carousel/Carousel.d.ts +3 -3
  24. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  25. package/dist/components/CascadeSelect/CascadeSelect.d.ts +4 -3
  26. package/dist/components/CascadeSelect/CascadeSelect.d.ts.map +1 -1
  27. package/dist/components/ColorPicker/ColorPicker.d.ts +4 -4
  28. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  29. package/dist/components/CopyButton/CopyButton.d.ts +3 -3
  30. package/dist/components/CopyButton/CopyButton.d.ts.map +1 -1
  31. package/dist/components/DataView/DataView.d.ts +3 -3
  32. package/dist/components/DataView/DataView.d.ts.map +1 -1
  33. package/dist/components/Fieldset/Fieldset.d.ts +5 -3
  34. package/dist/components/Fieldset/Fieldset.d.ts.map +1 -1
  35. package/dist/components/Gallery/Gallery.d.ts +3 -3
  36. package/dist/components/Gallery/Gallery.d.ts.map +1 -1
  37. package/dist/components/JsonViewer/JsonViewer.d.ts +4 -3
  38. package/dist/components/JsonViewer/JsonViewer.d.ts.map +1 -1
  39. package/dist/components/Knob/Knob.d.ts +4 -3
  40. package/dist/components/Knob/Knob.d.ts.map +1 -1
  41. package/dist/components/Listbox/Listbox.d.ts +4 -4
  42. package/dist/components/Listbox/Listbox.d.ts.map +1 -1
  43. package/dist/components/LogViewer/LogViewer.d.ts +3 -3
  44. package/dist/components/LogViewer/LogViewer.d.ts.map +1 -1
  45. package/dist/components/MeterGroup/MeterGroup.d.ts +3 -3
  46. package/dist/components/MeterGroup/MeterGroup.d.ts.map +1 -1
  47. package/dist/components/NavigationMenu/NavigationMenu.d.ts +3 -3
  48. package/dist/components/NavigationMenu/NavigationMenu.d.ts.map +1 -1
  49. package/dist/components/OrderList/OrderList.d.ts +3 -3
  50. package/dist/components/OrderList/OrderList.d.ts.map +1 -1
  51. package/dist/components/OrgChart/OrgChart.d.ts +3 -3
  52. package/dist/components/OrgChart/OrgChart.d.ts.map +1 -1
  53. package/dist/components/Panel/Panel.d.ts +3 -3
  54. package/dist/components/Panel/Panel.d.ts.map +1 -1
  55. package/dist/components/PickList/PickList.d.ts +3 -3
  56. package/dist/components/PickList/PickList.d.ts.map +1 -1
  57. package/dist/components/PinInput/PinInput.d.ts +4 -4
  58. package/dist/components/PinInput/PinInput.d.ts.map +1 -1
  59. package/dist/components/ProgressCircle/ProgressCircle.d.ts +3 -3
  60. package/dist/components/ProgressCircle/ProgressCircle.d.ts.map +1 -1
  61. package/dist/components/Rating/Rating.d.ts +3 -3
  62. package/dist/components/Rating/Rating.d.ts.map +1 -1
  63. package/dist/components/ScrollPanel/ScrollPanel.d.ts +3 -3
  64. package/dist/components/ScrollPanel/ScrollPanel.d.ts.map +1 -1
  65. package/dist/components/ScrollTop/ScrollTop.d.ts +3 -2
  66. package/dist/components/ScrollTop/ScrollTop.d.ts.map +1 -1
  67. package/dist/components/SidebarNav/SidebarNav.d.ts +3 -3
  68. package/dist/components/SidebarNav/SidebarNav.d.ts.map +1 -1
  69. package/dist/components/SignaturePad/SignaturePad.d.ts +3 -3
  70. package/dist/components/SignaturePad/SignaturePad.d.ts.map +1 -1
  71. package/dist/components/Sortable/Sortable.d.ts +4 -3
  72. package/dist/components/Sortable/Sortable.d.ts.map +1 -1
  73. package/dist/components/SpeedDial/SpeedDial.d.ts +3 -3
  74. package/dist/components/SpeedDial/SpeedDial.d.ts.map +1 -1
  75. package/dist/components/SplitButton/SplitButton.d.ts +3 -3
  76. package/dist/components/SplitButton/SplitButton.d.ts.map +1 -1
  77. package/dist/components/Splitter/Splitter.d.ts +3 -3
  78. package/dist/components/Splitter/Splitter.d.ts.map +1 -1
  79. package/dist/components/Spoiler/Spoiler.d.ts +3 -3
  80. package/dist/components/Spoiler/Spoiler.d.ts.map +1 -1
  81. package/dist/components/Stepper/Stepper.d.ts +3 -3
  82. package/dist/components/Stepper/Stepper.d.ts.map +1 -1
  83. package/dist/components/TableOfContents/TableOfContents.d.ts +3 -3
  84. package/dist/components/TableOfContents/TableOfContents.d.ts.map +1 -1
  85. package/dist/components/Timeline/Timeline.d.ts +3 -3
  86. package/dist/components/Timeline/Timeline.d.ts.map +1 -1
  87. package/dist/components/Toolbar/Toolbar.d.ts +3 -3
  88. package/dist/components/Toolbar/Toolbar.d.ts.map +1 -1
  89. package/dist/components/Tree/Tree.d.ts +3 -3
  90. package/dist/components/Tree/Tree.d.ts.map +1 -1
  91. package/dist/components/Tree/useTree.d.ts +2 -0
  92. package/dist/components/Tree/useTree.d.ts.map +1 -1
  93. package/dist/components/TreeSelect/TreeSelect.d.ts +4 -4
  94. package/dist/components/TreeSelect/TreeSelect.d.ts.map +1 -1
  95. package/dist/data-table.js +1 -1
  96. package/dist/editor/Editor.d.ts +4 -4
  97. package/dist/editor/Editor.d.ts.map +1 -1
  98. package/dist/editor.js +184 -183
  99. package/dist/index.js +1272 -1216
  100. package/dist/pdf.js +1 -1
  101. package/dist/virtual/VirtualList.d.ts +3 -3
  102. package/dist/virtual/VirtualList.d.ts.map +1 -1
  103. package/dist/virtual/VirtualTree.d.ts.map +1 -1
  104. package/dist/virtual.js +224 -219
  105. package/llms-full.txt +66 -10
  106. package/package.json +1 -1
  107. package/dist/CopyButton-0e1pHR3f.js +0 -45
  108. package/dist/Tree-DVjwp6FG.js +0 -568
package/dist/editor.js CHANGED
@@ -3,7 +3,7 @@ import { a as e, n as t } from "./RecipesProvider-0idafuGm.js";
3
3
  import { t as n } from "./Button-Cd7lufvJ.js";
4
4
  import { t as r } from "./Checkbox-BMRax6m4.js";
5
5
  import { announce as i, countText as a, editor as o, editorColorToken as s, editorColorTokens as c, editorColorValue as l, input as ee, prose as te, sanitizeEditorHtml as ne, toolbarIndexForKey as re } from "@wirecore/wirelayer-recipes";
6
- import { Baseline as ie, Bold as u, Code as ae, CodeXml as oe, Heading2 as d, Heading3 as se, Highlighter as ce, Image as f, Italic as p, Link as m, List as le, ListChecks as ue, ListCollapse as h, ListOrdered as de, Minus as fe, Pilcrow as pe, Redo2 as g, SquareCode as me, Strikethrough as he, Subscript as ge, Superscript as _, Table as _e, TextAlignCenter as ve, TextAlignEnd as v, TextAlignJustify as y, TextAlignStart as b, TextQuote as x, Underline as S, Undo2 as ye } from "lucide-react";
6
+ import { Baseline as ie, Bold as u, Code as ae, CodeXml as oe, Heading2 as d, Heading3 as se, Highlighter as ce, Image as f, Italic as p, Link as m, List as le, ListChecks as ue, ListCollapse as h, ListOrdered as de, Minus as fe, Pilcrow as pe, Redo2 as g, SquareCode as me, Strikethrough as he, Subscript as ge, Superscript as _e, Table as _, TextAlignCenter as ve, TextAlignEnd as ye, TextAlignJustify as v, TextAlignStart as y, TextQuote as b, Underline as x, Undo2 as S } from "lucide-react";
7
7
  import { useCallback as be, useEffect as C, useId as xe, useRef as w, useState as T } from "react";
8
8
  import { Fragment as Se, jsx as E, jsxs as D } from "react/jsx-runtime";
9
9
  import { useFieldContext as Ce } from "@ark-ui/react/field";
@@ -22,10 +22,10 @@ import Ve from "@tiptap/starter-kit";
22
22
  import { EditorContent as He, useEditor as Ue, useEditorState as O } from "@tiptap/react";
23
23
  import { BubbleMenu as We, FloatingMenu as Ge } from "@tiptap/react/menus";
24
24
  import { Extension as k } from "@tiptap/core";
25
- import { Plugin as A, PluginKey as Ke } from "@tiptap/pm/state";
26
- import { Decoration as qe, DecorationSet as j } from "@tiptap/pm/view";
25
+ import { Plugin as A, PluginKey as j } from "@tiptap/pm/state";
26
+ import { Decoration as Ke, DecorationSet as qe } from "@tiptap/pm/view";
27
27
  //#region src/editor/features.ts
28
- var M = new Ke("wcImageUpload"), Je = k.create({
28
+ var M = new j("wcImageUpload"), Je = k.create({
29
29
  name: "wcImageUpload",
30
30
  addOptions: () => ({ className: "" }),
31
31
  addProseMirrorPlugins() {
@@ -33,12 +33,12 @@ var M = new Ke("wcImageUpload"), Je = k.create({
33
33
  return [new A({
34
34
  key: M,
35
35
  state: {
36
- init: () => j.empty,
36
+ init: () => qe.empty,
37
37
  apply(t, n) {
38
38
  let r = n.map(t.mapping, t.doc), i = t.getMeta(M);
39
39
  if (i && "add" in i) {
40
40
  let n = document.createElement("img");
41
- n.src = i.add.src, n.alt = "", n.className = e, r = r.add(t.doc, [qe.widget(i.add.pos, n, { id: i.add.id })]);
41
+ n.src = i.add.src, n.alt = "", n.className = e, r = r.add(t.doc, [Ke.widget(i.add.pos, n, { id: i.add.id })]);
42
42
  } else i && "remove" in i && (r = r.remove(r.find(void 0, void 0, (e) => e.id === i.remove)));
43
43
  return r;
44
44
  }
@@ -46,11 +46,11 @@ var M = new Ke("wcImageUpload"), Je = k.create({
46
46
  props: { decorations: (e) => M.getState(e) }
47
47
  })];
48
48
  }
49
- }), N = 0, P = (e) => [...e ?? []].filter((e) => e.type.startsWith("image/"));
50
- async function F(e, t, n, r, i) {
49
+ }), Ye = 0, N = (e) => [...e ?? []].filter((e) => e.type.startsWith("image/"));
50
+ async function P(e, t, n, r, i) {
51
51
  let a = 0, o = 0;
52
52
  await Promise.all(t.map(async (t) => {
53
- let i = `upload-${++N}`, s = typeof URL.createObjectURL == "function" ? URL.createObjectURL(t) : "";
53
+ let i = `upload-${++Ye}`, s = typeof URL.createObjectURL == "function" ? URL.createObjectURL(t) : "";
54
54
  e.dispatch(e.state.tr.setMeta(M, { add: {
55
55
  id: i,
56
56
  pos: n,
@@ -72,22 +72,22 @@ async function F(e, t, n, r, i) {
72
72
  failed: o
73
73
  });
74
74
  }
75
- function Ye(e, t) {
75
+ function Xe(e, t) {
76
76
  return {
77
77
  handlePaste(n, r) {
78
- let i = P(r.clipboardData?.files), a = e();
79
- return !i.length || !a ? !1 : (r.preventDefault(), F(n, i, n.state.selection.from, a, t), !0);
78
+ let i = N(r.clipboardData?.files), a = e();
79
+ return !i.length || !a ? !1 : (r.preventDefault(), P(n, i, n.state.selection.from, a, t), !0);
80
80
  },
81
81
  handleDrop(n, r, i, a) {
82
- let o = P(r.dataTransfer?.files), s = e();
83
- return a || !o.length || !s ? !1 : (r.preventDefault(), F(n, o, n.posAtCoords({
82
+ let o = N(r.dataTransfer?.files), s = e();
83
+ return a || !o.length || !s ? !1 : (r.preventDefault(), P(n, o, n.posAtCoords({
84
84
  left: r.clientX,
85
85
  top: r.clientY
86
86
  })?.pos ?? n.state.selection.from, s, t), !0);
87
87
  }
88
88
  };
89
89
  }
90
- function Xe(e) {
90
+ function Ze(e) {
91
91
  let t = [];
92
92
  return e.state.doc.descendants((e, n) => (e.type.name === "heading" && e.textContent.trim() && t.push({
93
93
  level: Number(e.attrs.level),
@@ -95,23 +95,23 @@ function Xe(e) {
95
95
  pos: n
96
96
  }), e.type.name !== "heading")), t;
97
97
  }
98
- function Ze(e, t) {
98
+ function Qe(e, t) {
99
99
  let n = t.pos + 1 + t.text.length;
100
100
  e.chain().focus().setTextSelection(n).scrollIntoView().run();
101
101
  }
102
- var I = {
102
+ var F = {
103
103
  open: !1,
104
104
  items: [],
105
105
  active: 0,
106
106
  rect: null,
107
107
  choose: null
108
108
  };
109
- function Qe(e, t) {
109
+ function $e(e, t) {
110
110
  return {
111
111
  char: "@",
112
112
  items: async ({ query: t }) => await e()?.(t) ?? [],
113
113
  render: () => {
114
- let e = I, n, r = (n) => {
114
+ let e = F, n, r = (n) => {
115
115
  e = {
116
116
  ...e,
117
117
  ...n
@@ -155,7 +155,7 @@ function Qe(e, t) {
155
155
  return t.key === "Escape" && (r({ open: !1 }), !0);
156
156
  },
157
157
  onExit: () => {
158
- n = void 0, e = I, t(I);
158
+ n = void 0, e = F, t(F);
159
159
  }
160
160
  };
161
161
  }
@@ -163,7 +163,7 @@ function Qe(e, t) {
163
163
  }
164
164
  //#endregion
165
165
  //#region src/editor/tools.ts
166
- var $e = [
166
+ var et = [
167
167
  "bold",
168
168
  "italic",
169
169
  "underline",
@@ -184,31 +184,31 @@ var $e = [
184
184
  "|",
185
185
  "undo",
186
186
  "redo"
187
- ], L = (e, t = !1) => ({
187
+ ], I = (e, t = !1) => ({
188
188
  aria: `Control+${t ? "Shift+" : ""}${e}`,
189
189
  letter: e,
190
190
  shift: t
191
- }), R = {
191
+ }), L = {
192
192
  bold: {
193
- shortcut: L("B"),
193
+ shortcut: I("B"),
194
194
  isActive: (e) => e.isActive("bold"),
195
195
  can: (e) => e.can().toggleBold(),
196
196
  run: (e) => e.chain().focus().toggleBold().run()
197
197
  },
198
198
  italic: {
199
- shortcut: L("I"),
199
+ shortcut: I("I"),
200
200
  isActive: (e) => e.isActive("italic"),
201
201
  can: (e) => e.can().toggleItalic(),
202
202
  run: (e) => e.chain().focus().toggleItalic().run()
203
203
  },
204
204
  underline: {
205
- shortcut: L("U"),
205
+ shortcut: I("U"),
206
206
  isActive: (e) => e.isActive("underline"),
207
207
  can: (e) => e.can().toggleUnderline(),
208
208
  run: (e) => e.chain().focus().toggleUnderline().run()
209
209
  },
210
210
  strike: {
211
- shortcut: L("S", !0),
211
+ shortcut: I("S", !0),
212
212
  isActive: (e) => e.isActive("strike"),
213
213
  can: (e) => e.can().toggleStrike(),
214
214
  run: (e) => e.chain().focus().toggleStrike().run()
@@ -224,31 +224,31 @@ var $e = [
224
224
  run: (e) => e.chain().focus().toggleHeading({ level: 3 }).run()
225
225
  },
226
226
  bulletList: {
227
- shortcut: L("8", !0),
227
+ shortcut: I("8", !0),
228
228
  isActive: (e) => e.isActive("bulletList"),
229
229
  can: (e) => e.can().toggleBulletList(),
230
230
  run: (e) => e.chain().focus().toggleBulletList().run()
231
231
  },
232
232
  orderedList: {
233
- shortcut: L("7", !0),
233
+ shortcut: I("7", !0),
234
234
  isActive: (e) => e.isActive("orderedList"),
235
235
  can: (e) => e.can().toggleOrderedList(),
236
236
  run: (e) => e.chain().focus().toggleOrderedList().run()
237
237
  },
238
238
  taskList: {
239
- shortcut: L("9", !0),
239
+ shortcut: I("9", !0),
240
240
  isActive: (e) => e.isActive("taskList"),
241
241
  can: (e) => e.can().toggleTaskList(),
242
242
  run: (e) => e.chain().focus().toggleTaskList().run()
243
243
  },
244
244
  blockquote: {
245
- shortcut: L("B", !0),
245
+ shortcut: I("B", !0),
246
246
  isActive: (e) => e.isActive("blockquote"),
247
247
  can: (e) => e.can().toggleBlockquote(),
248
248
  run: (e) => e.chain().focus().toggleBlockquote().run()
249
249
  },
250
250
  code: {
251
- shortcut: L("E"),
251
+ shortcut: I("E"),
252
252
  isActive: (e) => e.isActive("code"),
253
253
  can: (e) => e.can().toggleCode(),
254
254
  run: (e) => e.chain().focus().toggleCode().run()
@@ -278,19 +278,19 @@ var $e = [
278
278
  run: () => {}
279
279
  },
280
280
  undo: {
281
- shortcut: L("Z"),
281
+ shortcut: I("Z"),
282
282
  can: (e) => e.can().undo(),
283
283
  run: (e) => e.chain().focus().undo().run()
284
284
  },
285
285
  redo: {
286
- shortcut: L("Y"),
286
+ shortcut: I("Y"),
287
287
  can: (e) => e.can().redo(),
288
288
  run: (e) => e.chain().focus().redo().run()
289
289
  },
290
- alignLeft: z("left", "L"),
291
- alignCenter: z("center", "E"),
292
- alignRight: z("right", "R"),
293
- alignJustify: z("justify", "J"),
290
+ alignLeft: R("left", "L"),
291
+ alignCenter: R("center", "E"),
292
+ alignRight: R("right", "R"),
293
+ alignJustify: R("justify", "J"),
294
294
  textColor: {
295
295
  isActive: (e) => !!e.getAttributes("textStyle").color,
296
296
  can: (e) => e.isEditable,
@@ -337,25 +337,25 @@ var $e = [
337
337
  run: () => {}
338
338
  }
339
339
  };
340
- function z(e, t) {
340
+ function R(e, t) {
341
341
  return {
342
- shortcut: L(t, !0),
342
+ shortcut: I(t, !0),
343
343
  isActive: (t) => t.isActive({ textAlign: e }),
344
344
  can: (t) => t.can().setTextAlign(e),
345
345
  run: (t) => t.chain().focus().setTextAlign(e).run()
346
346
  };
347
347
  }
348
- function et(e, t) {
348
+ function tt(e, t) {
349
349
  let n = e.chain().focus().extendMarkRange("link");
350
350
  t.trim() ? n.setLink({ href: t.trim() }).run() : n.unsetLink().run();
351
351
  }
352
- var B = [
352
+ var z = [
353
353
  "link",
354
354
  "image",
355
355
  "table",
356
356
  "textColor",
357
357
  "backgroundColor"
358
- ], V = (e) => B.includes(e), H = {
358
+ ], B = (e) => z.includes(e), V = {
359
359
  insertTable: {
360
360
  can: (e) => !e.isActive("table") && e.can().insertTable({
361
361
  rows: 3,
@@ -405,13 +405,13 @@ var B = [
405
405
  run: (e) => e.chain().focus().deleteTable().run()
406
406
  }
407
407
  };
408
- function tt(e, t, n) {
408
+ function nt(e, t, n) {
409
409
  e.chain().focus().setImage({
410
410
  src: t.trim(),
411
411
  alt: n
412
412
  }).run();
413
413
  }
414
- function nt(e) {
414
+ function rt(e) {
415
415
  if (!e.isActive("image")) return null;
416
416
  let t = e.getAttributes("image");
417
417
  return {
@@ -419,20 +419,20 @@ function nt(e) {
419
419
  alt: t.alt ?? ""
420
420
  };
421
421
  }
422
- function rt(e, t, n) {
422
+ function it(e, t, n) {
423
423
  e.chain().focus().updateAttributes("image", {
424
424
  src: t.trim(),
425
425
  alt: n
426
426
  }).run();
427
427
  }
428
- var it = [
428
+ var at = [
429
429
  "bold",
430
430
  "italic",
431
431
  "underline",
432
432
  "strike",
433
433
  "code",
434
434
  "link"
435
- ], at = [
435
+ ], ot = [
436
436
  "heading2",
437
437
  "heading3",
438
438
  "bulletList",
@@ -441,43 +441,43 @@ var it = [
441
441
  "blockquote",
442
442
  "codeBlock",
443
443
  "horizontalRule"
444
- ], ot = {
444
+ ], st = {
445
445
  bold: u,
446
446
  italic: p,
447
- underline: S,
447
+ underline: x,
448
448
  strike: he,
449
449
  heading2: d,
450
450
  heading3: se,
451
451
  bulletList: le,
452
452
  orderedList: de,
453
453
  taskList: ue,
454
- blockquote: x,
454
+ blockquote: b,
455
455
  code: ae,
456
456
  codeBlock: me,
457
457
  horizontalRule: fe,
458
458
  link: m,
459
459
  image: f,
460
- table: _e,
461
- undo: ye,
460
+ table: _,
461
+ undo: S,
462
462
  redo: g,
463
- alignLeft: b,
463
+ alignLeft: y,
464
464
  alignCenter: ve,
465
- alignRight: v,
466
- alignJustify: y,
465
+ alignRight: ye,
466
+ alignJustify: v,
467
467
  textColor: ie,
468
468
  backgroundColor: ce,
469
469
  subscript: ge,
470
- superscript: _,
470
+ superscript: _e,
471
471
  details: h,
472
472
  invisibleCharacters: pe,
473
473
  source: oe
474
474
  };
475
- function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, toolbar: d = $e, disabled: se, invalid: ce, readonly: f, uploadImage: p, placeholder: m, stickyToolbar: le, counter: ue, maxLength: h, bubbleMenu: de = !1, floatingMenu: fe = !1, tableOfContents: pe, mentions: g, "aria-label": me, className: he, style: ge }) {
476
- let _ = t("editor", o, ie)({ sticky: le }), _e = t("input", ee), ve = t("prose", te), v = _e({ size: "sm" }), y = e().editor, b = Ce(), x = xe(), S = !!(se ?? b?.disabled), ye = !!(ce ?? b?.invalid), k = de === !0 ? it : de || [], A = fe === !0 ? at : fe || [], Ke = k.length > 0 || A.length > 0, qe = [.../* @__PURE__ */ new Set([
475
+ function H({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, toolbar: d = et, disabled: se, invalid: ce, readonly: f, uploadImage: p, placeholder: m, stickyToolbar: le, counter: ue, maxLength: h, bubbleMenu: de = !1, floatingMenu: fe = !1, tableOfContents: pe, mentions: g, "aria-label": me, className: he, style: ge, ..._e }) {
476
+ let _ = t("editor", o, ie)({ sticky: le }), ve = t("input", ee), ye = t("prose", te), v = ve({ size: "sm" }), y = e().editor, b = Ce(), x = xe(), S = !!(se ?? b?.disabled), k = !!(ce ?? b?.invalid), A = de === !0 ? at : de || [], j = fe === !0 ? ot : fe || [], Ke = A.length > 0 || j.length > 0, qe = [.../* @__PURE__ */ new Set([
477
477
  ...d.filter((e) => e !== "|"),
478
- ...k,
479
- ...A
480
- ])], [j, M] = T(I), N = [_.content(), ve()];
478
+ ...A,
479
+ ...j
480
+ ])], [M, Ye] = T(F), N = [_.content(), ye()];
481
481
  m && N.push(_.placeholder()), qe.includes("invisibleCharacters") && N.push(_.invisible());
482
482
  let P = {
483
483
  id: `${x}content`,
@@ -485,23 +485,23 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
485
485
  "aria-multiline": "true",
486
486
  class: N.join(" ")
487
487
  };
488
- b ? P["aria-labelledby"] = b.ids.label : me && (P["aria-label"] = me), b?.ariaDescribedby && (P["aria-describedby"] = b.ariaDescribedby), ye && (P["aria-invalid"] = "true"), b?.required && (P["aria-required"] = "true"), S && (P["aria-disabled"] = "true", P["data-disabled"] = ""), f && (P["aria-readonly"] = "true", P.tabindex = "0"), Ke && (P["aria-keyshortcuts"] = "Alt+F10"), g && (P["aria-autocomplete"] = "list", j.open && (P["aria-controls"] = `${x}mentions`, j.items.length && (P["aria-activedescendant"] = `${x}mention${j.active}`)));
489
- let F = JSON.stringify(P), L = w(oe), z = w(y), B = w({
488
+ b ? P["aria-labelledby"] = b.ids.label : me && (P["aria-label"] = me), b?.ariaDescribedby && (P["aria-describedby"] = b.ariaDescribedby), k && (P["aria-invalid"] = "true"), b?.required && (P["aria-required"] = "true"), S && (P["aria-disabled"] = "true", P["data-disabled"] = ""), f && (P["aria-readonly"] = "true", P.tabindex = "0"), Ke && (P["aria-keyshortcuts"] = "Alt+F10"), g && (P["aria-autocomplete"] = "list", M.open && (P["aria-controls"] = `${x}mentions`, M.items.length && (P["aria-activedescendant"] = `${x}mention${M.active}`)));
489
+ let I = JSON.stringify(P), R = w(oe), z = w(y), H = w({
490
490
  placeholder: m,
491
491
  uploadImage: p,
492
492
  mentions: g
493
493
  });
494
494
  C(() => {
495
- L.current = oe, z.current = y, B.current = {
495
+ R.current = oe, z.current = y, H.current = {
496
496
  placeholder: m,
497
497
  uploadImage: p,
498
498
  mentions: g
499
499
  };
500
500
  });
501
- let st = be((e, t) => z.current.taskItem(e.textContent, t), []), ct = w(null), lt = w(null), ut = be((e) => {
502
- let t = e.state.selection.empty ? lt.current : ct.current, n = t?.parentElement;
501
+ let ct = be((e, t) => z.current.taskItem(e.textContent, t), []), lt = w(null), ut = w(null), dt = be((e) => {
502
+ let t = e.state.selection.empty ? ut.current : lt.current, n = t?.parentElement;
503
503
  return !t || !n?.isConnected || n.style.visibility === "hidden" ? !1 : (t.querySelector("button:not(:disabled)")?.focus(), !0);
504
- }, []), dt = w(null), [ft] = T(() => {
504
+ }, []), ft = w(null), [pt] = T(() => {
505
505
  let e = [
506
506
  Ve.configure({
507
507
  heading: { levels: [2, 3] },
@@ -514,7 +514,7 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
514
514
  Ae,
515
515
  ke.configure({
516
516
  nested: !0,
517
- a11y: { checkboxLabel: st }
517
+ a11y: { checkboxLabel: ct }
518
518
  }),
519
519
  Pe.configure({ table: { resizable: !1 } }),
520
520
  De,
@@ -538,24 +538,24 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
538
538
  }),
539
539
  Je.configure({ className: _.uploading() })
540
540
  ];
541
- return m && e.push(Be.configure({ placeholder: () => B.current.placeholder ?? "" })), (ue || h) && e.push(ze.configure({ limit: h })), g && e.push(je.configure({ suggestion: Qe(() => B.current.mentions, M) })), e;
542
- }), [pt] = T(() => Ye(() => B.current.uploadImage, ({ inserted: e, failed: t }) => i(t ? z.current.imageFailed : e ? z.current.imageUploaded : ""))), U = Ue({
541
+ return m && e.push(Be.configure({ placeholder: () => H.current.placeholder ?? "" })), (ue || h) && e.push(ze.configure({ limit: h })), g && e.push(je.configure({ suggestion: $e(() => H.current.mentions, Ye) })), e;
542
+ }), [mt] = T(() => Xe(() => H.current.uploadImage, ({ inserted: e, failed: t }) => i(t ? z.current.imageFailed : e ? z.current.imageUploaded : ""))), U = Ue({
543
543
  immediatelyRender: !1,
544
544
  content: u ?? ae,
545
545
  editable: !S && !f,
546
- extensions: ft,
546
+ extensions: pt,
547
547
  editorProps: {
548
548
  attributes: P,
549
- handleKeyDown: (e, t) => t.altKey && t.key === "F10" && !!dt.current && ut(dt.current),
550
- ...pt
549
+ handleKeyDown: (e, t) => t.altKey && t.key === "F10" && !!ft.current && dt(ft.current),
550
+ ...mt
551
551
  },
552
- onUpdate: ({ editor: e }) => L.current?.(e.isEmpty ? "" : e.getHTML())
552
+ onUpdate: ({ editor: e }) => R.current?.(e.isEmpty ? "" : e.getHTML())
553
553
  });
554
554
  C(() => {
555
- dt.current = U;
555
+ ft.current = U;
556
556
  }, [U]), C(() => {
557
- U?.setOptions({ editorProps: { attributes: JSON.parse(F) } });
558
- }, [U, F]), C(() => {
557
+ U?.setOptions({ editorProps: { attributes: JSON.parse(I) } });
558
+ }, [U, I]), C(() => {
559
559
  U?.setEditable(!S && !f);
560
560
  }, [
561
561
  U,
@@ -564,19 +564,19 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
564
564
  ]), C(() => {
565
565
  U && u !== void 0 && u !== (U.isEmpty ? "" : U.getHTML()) && U.commands.setContent(u, { emitUpdate: !1 });
566
566
  }, [U, u]);
567
- let [W, mt] = T(!1), [ht, gt] = T(""), _t = w(null);
567
+ let [W, ht] = T(!1), [gt, _t] = T(""), vt = w(null);
568
568
  C(() => {
569
- W && _t.current?.focus();
569
+ W && vt.current?.focus();
570
570
  }, [W]);
571
- let vt = () => {
572
- U && (W ? (mt(!1), U.commands.setContent(ne(ht), { emitUpdate: !0 }), U.commands.focus()) : (gt(U.isEmpty ? "" : U.getHTML()), mt(!0)));
573
- }, yt = d.filter((e) => e !== "|"), bt = (e) => Object.fromEntries(qe.map((t) => [t, {
574
- active: t === "source" ? W : !!e && !!R[t].isActive?.(e),
575
- disabled: !e || S || !!f || W && t !== "source" || !R[t].can(e)
571
+ let yt = () => {
572
+ U && (W ? (ht(!1), U.commands.setContent(ne(gt), { emitUpdate: !0 }), U.commands.focus()) : (_t(U.isEmpty ? "" : U.getHTML()), ht(!0)));
573
+ }, bt = d.filter((e) => e !== "|"), xt = (e) => Object.fromEntries(qe.map((t) => [t, {
574
+ active: t === "source" ? W : !!e && !!L[t].isActive?.(e),
575
+ disabled: !e || S || !!f || W && t !== "source" || !L[t].can(e)
576
576
  }])), G = O({
577
577
  editor: U,
578
- selector: ({ editor: e }) => bt(e)
579
- }) ?? bt(null), K = O({
578
+ selector: ({ editor: e }) => xt(e)
579
+ }) ?? xt(null), K = O({
580
580
  editor: U,
581
581
  selector: ({ editor: e }) => {
582
582
  if (!e) return null;
@@ -588,66 +588,66 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
588
588
  characters: n.characters(),
589
589
  words: n.words()
590
590
  } : a(e.state.doc.textContent),
591
- headings: pe ? Xe(e) : []
591
+ headings: pe ? Ze(e) : []
592
592
  };
593
593
  }
594
- }), xt = K?.counts ?? {
594
+ }), St = K?.counts ?? {
595
595
  characters: 0,
596
596
  words: 0
597
- }, St = h !== void 0 && xt.characters >= h, [Ct, wt] = T(), Tt = Ct && !G[Ct]?.disabled ? Ct : yt.find((e) => !G[e].disabled), Et = (e) => {
597
+ }, Ct = h !== void 0 && St.characters >= h, [wt, Tt] = T(), Et = wt && !G[wt]?.disabled ? wt : bt.find((e) => !G[e].disabled), Dt = (e) => {
598
598
  let t = [...e.currentTarget.querySelectorAll("button:not(:disabled)")], n = re(e.key, t.indexOf(e.target), t.length, e.currentTarget);
599
599
  n !== void 0 && (e.preventDefault(), t[n]?.focus());
600
- }, [q, J] = T(null), Dt = w(null), [Ot, kt] = T(""), [At, jt] = T(""), [Mt, Nt] = T(""), [Y, Pt] = T(!1), [X, Ft] = T(!1), It = w(null), [Lt, Rt] = T(!1), zt = w(null), Bt = w(null), Vt = w(null), Ht = w(null), Ut = w(null);
600
+ }, [q, J] = T(null), Ot = w(null), [kt, At] = T(""), [jt, Mt] = T(""), [Nt, Pt] = T(""), [Y, Ft] = T(!1), [X, It] = T(!1), Lt = w(null), [Rt, zt] = T(!1), Bt = w(null), Vt = w(null), Ht = w(null), Ut = w(null), Wt = w(null);
601
601
  C(() => {
602
- q === "link" ? zt.current?.focus() : q === "image" ? (X ? It : Bt).current?.focus() : q === "table" ? Ht.current?.querySelector("button:not(:disabled)")?.focus() : q && Ut.current?.querySelector("[aria-pressed=true]")?.focus();
602
+ q === "link" ? Bt.current?.focus() : q === "image" ? (X ? Lt : Vt).current?.focus() : q === "table" ? Ut.current?.querySelector("button:not(:disabled)")?.focus() : q && Wt.current?.querySelector("[aria-pressed=true]")?.focus();
603
603
  }, [q, X]);
604
604
  let Z = () => {
605
- J(null), Dt.current?.focus();
605
+ J(null), Ot.current?.focus();
606
606
  }, Q = (e) => {
607
607
  e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), e.stopPropagation(), Z());
608
- }, Wt = (e, t) => {
609
- if (Dt.current = t, q === e) return Z();
610
- kt(U?.getAttributes("link").href ?? "");
611
- let n = U ? nt(U) : null;
612
- Ft(!!n), jt(n?.src ?? ""), Nt(n?.alt ?? ""), Pt(!!n && !n.alt), J(e);
613
- }, Gt = (e) => {
614
- U && et(U, e), J(null);
615
- }, Kt = !!At.trim() && (!!Mt.trim() || Y), qt = () => {
616
- U && Kt && ((X ? rt : tt)(U, At, Y ? "" : Mt.trim()), J(null));
617
- }, Jt = async (e) => {
608
+ }, Gt = (e, t) => {
609
+ if (Ot.current = t, q === e) return Z();
610
+ At(U?.getAttributes("link").href ?? "");
611
+ let n = U ? rt(U) : null;
612
+ It(!!n), Mt(n?.src ?? ""), Pt(n?.alt ?? ""), Ft(!!n && !n.alt), J(e);
613
+ }, Kt = (e) => {
614
+ U && tt(U, e), J(null);
615
+ }, qt = !!jt.trim() && (!!Nt.trim() || Y), Jt = () => {
616
+ U && qt && ((X ? it : nt)(U, jt, Y ? "" : Nt.trim()), J(null));
617
+ }, Yt = async (e) => {
618
618
  if (e && p) {
619
- Rt(!0);
619
+ zt(!0);
620
620
  try {
621
- jt(await p(e));
621
+ Mt(await p(e));
622
622
  } finally {
623
- Rt(!1);
623
+ zt(!1);
624
624
  }
625
625
  }
626
- }, Yt = (e) => Object.fromEntries(Object.keys(H).map((t) => [t, !e || S || !H[t].can(e)])), Xt = O({
626
+ }, Xt = (e) => Object.fromEntries(Object.keys(V).map((t) => [t, !e || S || !V[t].can(e)])), Zt = O({
627
627
  editor: U,
628
- selector: ({ editor: e }) => Yt(e)
629
- }) ?? Yt(null), Zt = (e, t) => {
630
- if (e === "source") return vt();
631
- if (V(e)) return Wt(e, t);
632
- U && R[e].run(U);
633
- }, Qt = (e, t) => {
628
+ selector: ({ editor: e }) => Xt(e)
629
+ }) ?? Xt(null), Qt = (e, t) => {
630
+ if (e === "source") return yt();
631
+ if (B(e)) return Gt(e, t);
632
+ U && L[e].run(U);
633
+ }, $t = (e, t) => {
634
634
  if (!U) return;
635
635
  let n = U.chain().focus();
636
636
  e === "textColor" ? (t ? n.setColor(l(t, "text")) : n.unsetColor()).run() : (t ? n.setBackgroundColor(l(t, "background")) : n.unsetBackgroundColor()).run(), J(null);
637
- }, $t = (e) => {
638
- e.key === "Escape" ? (e.preventDefault(), U?.commands.focus()) : Et(e);
639
- }, en = (e) => e.map((e, t) => {
640
- let n = R[e], r = ot[e];
637
+ }, en = (e) => {
638
+ e.key === "Escape" ? (e.preventDefault(), U?.commands.focus()) : Dt(e);
639
+ }, tn = (e) => e.map((e, t) => {
640
+ let n = L[e], r = st[e];
641
641
  return /* @__PURE__ */ E("button", {
642
642
  type: "button",
643
643
  className: _.tool(),
644
644
  "aria-label": y[e],
645
645
  title: n.shortcut ? `${y[e]} (${y.shortcut(n.shortcut.letter, n.shortcut.shift)})` : y[e],
646
- "aria-pressed": n.isActive && !V(e) ? G[e].active : void 0,
646
+ "aria-pressed": n.isActive && !B(e) ? G[e].active : void 0,
647
647
  disabled: G[e].disabled,
648
648
  tabIndex: t === 0 ? 0 : -1,
649
649
  onMouseDown: (e) => e.preventDefault(),
650
- onClick: (t) => Zt(e, t.currentTarget),
650
+ onClick: (t) => Qt(e, t.currentTarget),
651
651
  children: /* @__PURE__ */ E(r, {
652
652
  className: _.toolIcon(),
653
653
  "aria-hidden": "true"
@@ -657,37 +657,38 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
657
657
  t.key === "Enter" && (t.preventDefault(), e());
658
658
  };
659
659
  return /* @__PURE__ */ D("div", {
660
+ ..._e,
660
661
  className: _.base({ class: he }),
661
662
  style: ge,
662
- "data-invalid": ye || void 0,
663
+ "data-invalid": k || void 0,
663
664
  "data-disabled": S || void 0,
664
665
  children: [
665
666
  !f && /* @__PURE__ */ E("div", {
666
667
  role: "toolbar",
667
668
  "aria-label": y.toolbar,
668
669
  className: _.toolbar(),
669
- onKeyDown: Et,
670
+ onKeyDown: Dt,
670
671
  children: d.map((e, t) => {
671
672
  if (e === "|") return /* @__PURE__ */ E("span", {
672
673
  role: "separator",
673
674
  "aria-orientation": "vertical",
674
675
  className: _.separator()
675
676
  }, t);
676
- let n = R[e], r = ot[e];
677
+ let n = L[e], r = st[e];
677
678
  return /* @__PURE__ */ E("button", {
678
679
  type: "button",
679
680
  className: _.tool(),
680
681
  "aria-label": y[e],
681
682
  title: n.shortcut ? `${y[e]} (${y.shortcut(n.shortcut.letter, n.shortcut.shift)})` : y[e],
682
683
  "aria-keyshortcuts": n.shortcut?.aria,
683
- "aria-pressed": n.isActive && !V(e) ? G[e].active : void 0,
684
- "aria-expanded": V(e) ? q === e : void 0,
685
- "aria-controls": V(e) && q === e ? `${x}${e}` : void 0,
684
+ "aria-pressed": n.isActive && !B(e) ? G[e].active : void 0,
685
+ "aria-expanded": B(e) ? q === e : void 0,
686
+ "aria-controls": B(e) && q === e ? `${x}${e}` : void 0,
686
687
  disabled: G[e].disabled,
687
- tabIndex: e === Tt ? 0 : -1,
688
- onFocus: () => wt(e),
688
+ tabIndex: e === Et ? 0 : -1,
689
+ onFocus: () => Tt(e),
689
690
  onMouseDown: (e) => e.preventDefault(),
690
- onClick: (t) => Zt(e, t.currentTarget),
691
+ onClick: (t) => Qt(e, t.currentTarget),
691
692
  children: /* @__PURE__ */ E(r, {
692
693
  className: _.toolIcon(),
693
694
  "aria-hidden": "true"
@@ -703,25 +704,25 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
703
704
  /* @__PURE__ */ E("div", {
704
705
  className: v.base({ class: _.linkField() }),
705
706
  children: /* @__PURE__ */ E("input", {
706
- ref: zt,
707
- value: Ot,
707
+ ref: Bt,
708
+ value: kt,
708
709
  type: "url",
709
710
  placeholder: "https://",
710
711
  "aria-label": y.linkUrl,
711
712
  className: v.control(),
712
- onChange: (e) => kt(e.target.value),
713
- onKeyDown: $(() => Gt(Ot))
713
+ onChange: (e) => At(e.target.value),
714
+ onKeyDown: $(() => Kt(kt))
714
715
  })
715
716
  }),
716
717
  /* @__PURE__ */ E(n, {
717
718
  size: "sm",
718
- onClick: () => Gt(Ot),
719
+ onClick: () => Kt(kt),
719
720
  children: y.linkApply
720
721
  }),
721
722
  G.link?.active && /* @__PURE__ */ E(n, {
722
723
  size: "sm",
723
724
  variant: "outline",
724
- onClick: () => Gt(""),
725
+ onClick: () => Kt(""),
725
726
  children: y.linkRemove
726
727
  }),
727
728
  /* @__PURE__ */ E(n, {
@@ -740,54 +741,54 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
740
741
  /* @__PURE__ */ E("div", {
741
742
  className: v.base({ class: _.linkField() }),
742
743
  children: /* @__PURE__ */ E("input", {
743
- ref: Bt,
744
- value: At,
744
+ ref: Vt,
745
+ value: jt,
745
746
  type: "url",
746
747
  placeholder: "https://",
747
748
  "aria-label": y.imageUrl,
748
749
  className: v.control(),
749
- onChange: (e) => jt(e.target.value),
750
- onKeyDown: $(qt)
750
+ onChange: (e) => Mt(e.target.value),
751
+ onKeyDown: $(Jt)
751
752
  })
752
753
  }),
753
754
  /* @__PURE__ */ E("div", {
754
755
  className: v.base({ class: _.imageAlt() }),
755
756
  children: /* @__PURE__ */ E("input", {
756
- ref: It,
757
- value: Mt,
757
+ ref: Lt,
758
+ value: Nt,
758
759
  type: "text",
759
760
  placeholder: y.imageAlt,
760
761
  "aria-label": y.imageAlt,
761
762
  disabled: Y,
762
763
  className: v.control(),
763
- onChange: (e) => Nt(e.target.value),
764
- onKeyDown: $(qt)
764
+ onChange: (e) => Pt(e.target.value),
765
+ onKeyDown: $(Jt)
765
766
  })
766
767
  }),
767
768
  /* @__PURE__ */ E(r, {
768
769
  checked: Y,
769
- onCheckedChange: (e) => Pt(e === !0),
770
+ onCheckedChange: (e) => Ft(e === !0),
770
771
  children: y.imageDecorative
771
772
  }),
772
773
  p && /* @__PURE__ */ D(Se, { children: [/* @__PURE__ */ E("input", {
773
- ref: Vt,
774
+ ref: Ht,
774
775
  type: "file",
775
776
  accept: "image/*",
776
777
  tabIndex: -1,
777
778
  "aria-hidden": "true",
778
779
  className: _.fileInput(),
779
- onChange: (e) => void Jt(e.target.files?.[0])
780
+ onChange: (e) => void Yt(e.target.files?.[0])
780
781
  }), /* @__PURE__ */ E(n, {
781
782
  size: "sm",
782
783
  variant: "outline",
783
- loading: Lt,
784
- onClick: () => Vt.current?.click(),
784
+ loading: Rt,
785
+ onClick: () => Ht.current?.click(),
785
786
  children: y.imageUpload
786
787
  })] }),
787
788
  /* @__PURE__ */ E(n, {
788
789
  size: "sm",
789
- disabled: !Kt,
790
- onClick: qt,
790
+ disabled: !qt,
791
+ onClick: Jt,
791
792
  children: X ? y.imageUpdate : y.imageInsert
792
793
  }),
793
794
  /* @__PURE__ */ E(n, {
@@ -800,23 +801,23 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
800
801
  }),
801
802
  q === "table" && /* @__PURE__ */ E("div", {
802
803
  id: `${x}table`,
803
- ref: Ht,
804
+ ref: Ut,
804
805
  role: "group",
805
806
  "aria-label": y.tableBar,
806
807
  className: _.linkBar(),
807
808
  onKeyDown: Q,
808
- children: Object.keys(H).map((e) => /* @__PURE__ */ E(n, {
809
+ children: Object.keys(V).map((e) => /* @__PURE__ */ E(n, {
809
810
  size: "sm",
810
811
  variant: e === "insertTable" ? "primary" : e === "deleteTable" ? "outline" : "text",
811
- disabled: Xt[e],
812
+ disabled: Zt[e],
812
813
  onMouseDown: (e) => e.preventDefault(),
813
- onClick: () => H[e].run(U),
814
+ onClick: () => V[e].run(U),
814
815
  children: y.tableActions[e]
815
816
  }, e))
816
817
  }),
817
818
  (q === "textColor" || q === "backgroundColor") && /* @__PURE__ */ D("div", {
818
819
  id: `${x}${q}`,
819
- ref: Ut,
820
+ ref: Wt,
820
821
  role: "group",
821
822
  "aria-label": y[q],
822
823
  className: _.palette(),
@@ -834,7 +835,7 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
834
835
  title: y.colorDefault,
835
836
  "aria-pressed": !K?.[q],
836
837
  onMouseDown: (e) => e.preventDefault(),
837
- onClick: () => Qt(q, void 0),
838
+ onClick: () => $t(q, void 0),
838
839
  children: "A"
839
840
  }),
840
841
  c.map((e) => /* @__PURE__ */ E("button", {
@@ -845,7 +846,7 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
845
846
  title: y.colors[e],
846
847
  "aria-pressed": K?.[q] === e,
847
848
  onMouseDown: (e) => e.preventDefault(),
848
- onClick: () => Qt(q, e),
849
+ onClick: () => $t(q, e),
849
850
  children: "A"
850
851
  }, e))
851
852
  ]
@@ -863,64 +864,64 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
863
864
  type: "button",
864
865
  className: _.tocLink(),
865
866
  "data-level": e.level,
866
- onClick: () => U && Ze(U, e),
867
+ onClick: () => U && Qe(U, e),
867
868
  children: e.text
868
869
  }) }, e.pos))
869
870
  })]
870
871
  }),
871
872
  W && /* @__PURE__ */ E("textarea", {
872
- ref: _t,
873
- value: ht,
873
+ ref: vt,
874
+ value: gt,
874
875
  className: _.source(),
875
876
  "aria-label": y.sourceField,
876
877
  spellCheck: !1,
877
- onChange: (e) => gt(e.target.value)
878
+ onChange: (e) => _t(e.target.value)
878
879
  }),
879
880
  /* @__PURE__ */ E(He, {
880
881
  editor: U,
881
882
  hidden: W || void 0
882
883
  }),
883
- U && k.length > 0 && /* @__PURE__ */ E(We, {
884
+ U && A.length > 0 && /* @__PURE__ */ E(We, {
884
885
  editor: U,
885
886
  children: /* @__PURE__ */ E("div", {
886
- ref: ct,
887
+ ref: lt,
887
888
  role: "toolbar",
888
889
  "aria-label": y.bubbleMenu,
889
890
  className: _.menu(),
890
- onKeyDown: $t,
891
- children: en(k)
891
+ onKeyDown: en,
892
+ children: tn(A)
892
893
  })
893
894
  }),
894
- U && A.length > 0 && /* @__PURE__ */ E(Ge, {
895
+ U && j.length > 0 && /* @__PURE__ */ E(Ge, {
895
896
  editor: U,
896
897
  children: /* @__PURE__ */ E("div", {
897
- ref: lt,
898
+ ref: ut,
898
899
  role: "toolbar",
899
900
  "aria-label": y.floatingMenu,
900
901
  className: _.menu(),
901
- onKeyDown: $t,
902
- children: en(A)
902
+ onKeyDown: en,
903
+ children: tn(j)
903
904
  })
904
905
  }),
905
- g && /* @__PURE__ */ D(Se, { children: [j.open && /* @__PURE__ */ D("ul", {
906
+ g && /* @__PURE__ */ D(Se, { children: [M.open && /* @__PURE__ */ D("ul", {
906
907
  id: `${x}mentions`,
907
908
  role: "listbox",
908
909
  "aria-label": y.suggestions,
909
910
  className: _.suggestions(),
910
- style: j.rect ? {
911
- left: `${j.rect.left}px`,
912
- top: `${j.rect.top}px`
911
+ style: M.rect ? {
912
+ left: `${M.rect.left}px`,
913
+ top: `${M.rect.top}px`
913
914
  } : void 0,
914
- children: [j.items.map((e, t) => /* @__PURE__ */ E("li", {
915
+ children: [M.items.map((e, t) => /* @__PURE__ */ E("li", {
915
916
  id: `${x}mention${t}`,
916
917
  role: "option",
917
- "aria-selected": t === j.active,
918
- "data-highlighted": t === j.active || void 0,
918
+ "aria-selected": t === M.active,
919
+ "data-highlighted": t === M.active || void 0,
919
920
  className: _.suggestion(),
920
921
  onMouseDown: (e) => e.preventDefault(),
921
- onClick: () => j.choose?.(e),
922
+ onClick: () => M.choose?.(e),
922
923
  children: e.label
923
- }, e.id)), !j.items.length && /* @__PURE__ */ E("li", {
924
+ }, e.id)), !M.items.length && /* @__PURE__ */ E("li", {
924
925
  role: "option",
925
926
  "aria-disabled": "true",
926
927
  className: _.suggestion(),
@@ -929,21 +930,21 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
929
930
  }), /* @__PURE__ */ E("span", {
930
931
  role: "status",
931
932
  className: _.status(),
932
- children: j.open ? y.suggestionCount(j.items.length) : ""
933
+ children: M.open ? y.suggestionCount(M.items.length) : ""
933
934
  })] }),
934
935
  (ue || h !== void 0) && /* @__PURE__ */ D("div", {
935
936
  className: _.footer(),
936
937
  children: [
937
938
  /* @__PURE__ */ E("span", {
938
939
  className: _.limit(),
939
- "data-over": St,
940
- children: y.characters(xt.characters, h)
940
+ "data-over": Ct,
941
+ children: y.characters(St.characters, h)
941
942
  }),
942
- /* @__PURE__ */ E("span", { children: y.words(xt.words) }),
943
+ /* @__PURE__ */ E("span", { children: y.words(St.words) }),
943
944
  h !== void 0 && /* @__PURE__ */ E("span", {
944
945
  role: "status",
945
946
  className: _.status(),
946
- children: St ? y.limitReached : ""
947
+ children: Ct ? y.limitReached : ""
947
948
  })
948
949
  ]
949
950
  })
@@ -951,4 +952,4 @@ function st({ classes: ie, value: u, defaultValue: ae = "", onValueChange: oe, t
951
952
  });
952
953
  }
953
954
  //#endregion
954
- export { st as Editor, it as defaultBubbleTools, at as defaultFloatingTools, $e as defaultTools };
955
+ export { H as Editor, at as defaultBubbleTools, ot as defaultFloatingTools, et as defaultTools };