@onereach/ui-components 25.1.1-beta.5754.0 → 25.1.1-beta.5755.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("[data-v-538f3986] .or-cm-paragraph{@apply my-xs;}[data-v-538f3986] .or-cm-bulletList{@apply mx-lg my-xs list-disc;}[data-v-538f3986] .or-cm-orderedList{@apply mx-lg my-xs list-decimal;}[data-v-538f3986] .or-cm-blockquote{@apply my-sm mx-lg px-lg border-l-2 border-outline;}[data-v-538f3986] .or-cm-link{@apply text-primary cursor-pointer;}[data-v-538f3986] .or-cm-placeholder{@apply text-outline;}[data-v-538f3986] .or-cm-editorProps{@apply flex flex-col focus:outline-none gap-xs h-full;}.tiptap-editor-v3 .is-editor-empty:before{float:left;height:0;pointer-events:none;content:attr(data-placeholder)}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("[data-v-1222a307] .or-cm-paragraph{@apply my-xs;}[data-v-1222a307] .or-cm-bulletList{@apply mx-lg my-xs list-disc;}[data-v-1222a307] .or-cm-orderedList{@apply mx-lg my-xs list-decimal;}[data-v-1222a307] .or-cm-blockquote{@apply my-sm mx-lg px-lg border-l-2 border-outline;}[data-v-1222a307] .or-cm-link{@apply text-primary cursor-pointer;}[data-v-1222a307] .or-cm-placeholder{@apply text-outline;}[data-v-1222a307] .or-cm-editorProps{@apply flex flex-col focus:outline-none gap-xs h-full;}.tiptap-editor-v3 .is-editor-empty:before{float:left;height:0;pointer-events:none;content:attr(data-placeholder)}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  import { useTheme as ft, useResponsive as pt } from "@onereach/ui-components-common/hooks";
3
3
  import { isArray as gt } from "@onereach/ui-components-common/utils";
4
4
  import { O as ht } from "./OrButton-C_hXddAf.mjs";
@@ -13,39 +13,39 @@ import { O as St } from "./OrMenu-CJT4Snay.mjs";
13
13
  import { O as Lt } from "./OrModal-CQhwUYFk.mjs";
14
14
  import { O as Bt } from "./OrPopover-DbygLPtT.mjs";
15
15
  import { Node as Mt, Editor as At, mergeAttributes as Pt } from "@tiptap/core";
16
- import Fe from "@tiptap/extension-blockquote";
17
- import qe from "@tiptap/extension-bullet-list";
16
+ import qe from "@tiptap/extension-blockquote";
17
+ import ze from "@tiptap/extension-bullet-list";
18
18
  import Ht from "@tiptap/extension-heading";
19
- import ze from "@tiptap/extension-highlight";
20
- import Te from "@tiptap/extension-link";
21
- import De from "@tiptap/extension-ordered-list";
22
- import Ue from "@tiptap/extension-paragraph";
19
+ import Te from "@tiptap/extension-highlight";
20
+ import De from "@tiptap/extension-link";
21
+ import Ue from "@tiptap/extension-ordered-list";
22
+ import We from "@tiptap/extension-paragraph";
23
23
  import Rt from "@tiptap/extension-placeholder";
24
- import We from "@tiptap/extension-underline";
24
+ import Ge from "@tiptap/extension-underline";
25
25
  import Nt from "@tiptap/starter-kit";
26
26
  import { useResizeObserver as Vt, useDebounceFn as $t, onClickOutside as It } from "@vueuse/core";
27
27
  import { useFocusTrap as Et } from "@vueuse/integrations/useFocusTrap";
28
- import { defineComponent as Ft, shallowRef as qt, ref as m, onMounted as zt, onBeforeUnmount as Tt, computed as w, watch as Dt, nextTick as Ut, resolveComponent as O, openBlock as f, createElementBlock as q, normalizeClass as N, createBlock as R, withCtx as v, renderSlot as re, createTextVNode as V, toDisplayString as ne, createCommentVNode as D, createVNode as $, createElementVNode as z, Fragment as ae, renderList as le, withDirectives as se, vShow as ie, vModelText as Wt } from "vue";
28
+ import { defineComponent as Ft, shallowRef as qt, ref as m, onMounted as zt, onBeforeUnmount as Tt, computed as w, watch as Dt, nextTick as Ut, resolveComponent as O, openBlock as f, createElementBlock as q, normalizeClass as V, createBlock as N, withCtx as b, renderSlot as re, createTextVNode as $, toDisplayString as ae, createCommentVNode as T, createVNode as I, createElementVNode as z, Fragment as ne, renderList as le, withDirectives as se, vShow as ie, vModelText as Wt } from "vue";
29
29
  import { TextSelection as Gt, Selection as Jt } from "prosemirror-state";
30
30
  import { exitCode as jt } from "prosemirror-commands";
31
- import { EditorState as Ce } from "@codemirror/state";
32
- import { EditorView as Ge, highlightActiveLine as Kt, highlightActiveLineGutter as Qt, lineNumbers as Xt, keymap as Yt } from "@codemirror/view";
31
+ import { EditorState as we } from "@codemirror/state";
32
+ import { EditorView as Je, highlightActiveLine as Kt, highlightActiveLineGutter as Qt, lineNumbers as Xt, keymap as Yt } from "@codemirror/view";
33
33
  import { HighlightStyle as Zt, syntaxHighlighting as xt } from "@codemirror/language";
34
- import { tags as a } from "@lezer/highlight";
34
+ import { tags as n } from "@lezer/highlight";
35
35
  import { minimalSetup as _t } from "codemirror";
36
36
  import { javascript as eo } from "@codemirror/lang-javascript";
37
37
  import to from "@tiptap/extension-bold";
38
38
  import oo from "@tiptap/extension-code-block";
39
39
  import ro from "@tiptap/extension-hard-break";
40
- import no from "@tiptap/extension-italic";
41
- import ao from "@tiptap/extension-list-item";
40
+ import ao from "@tiptap/extension-italic";
41
+ import no from "@tiptap/extension-list-item";
42
42
  import lo from "@tiptap/extension-strike";
43
43
  import so from "@tiptap/extension-horizontal-rule";
44
44
  import { marked as io } from "marked";
45
45
  import { defaultMarkdownSerializer as S, MarkdownSerializer as uo } from "prosemirror-markdown";
46
46
  import { DOMParser as co } from "prosemirror-model";
47
47
  import { _ as mo } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
48
- var Je = /* @__PURE__ */ ((e) => (e.Markdown = "markdown", e.Markup = "markup", e))(Je || {}), je = /* @__PURE__ */ ((e) => (e.bold = "format_bold", e.italic = "format_italic", e.underline = "format_underlined", e.strike = "format_strikethrough", e.bulletList = "format_list_bulleted", e.orderedList = "format_list_numbered", e.link = "link", e.highlight = "highlight", e.redo = "redo", e.undo = "undo", e.codeBlock = "code_blocks", e.blockquote = "format_quote", e.file = "attach_file", e.source = "source_notes", e))(je || {}), Ke = /* @__PURE__ */ ((e) => (e.bold = "Bold", e.italic = "Italic", e.underline = "Underline", e.strike = "Strike", e.bulletList = "Bulleted List", e.orderedList = "Numbered List", e.link = "Link", e.highlight = "Highlight", e.redo = "Redo", e.undo = "Undo", e.codeBlock = "Code Block", e.blockquote = "Quote", e.file = "File", e.source = "Source", e))(Ke || {});
48
+ var je = /* @__PURE__ */ ((e) => (e.Markdown = "markdown", e.Markup = "markup", e))(je || {}), Ke = /* @__PURE__ */ ((e) => (e.bold = "format_bold", e.italic = "format_italic", e.underline = "format_underlined", e.strike = "format_strikethrough", e.bulletList = "format_list_bulleted", e.orderedList = "format_list_numbered", e.link = "link", e.highlight = "highlight", e.redo = "redo", e.undo = "undo", e.codeBlock = "code_blocks", e.blockquote = "format_quote", e.file = "attach_file", e.source = "source_notes", e))(Ke || {}), Qe = /* @__PURE__ */ ((e) => (e.bold = "Bold", e.italic = "Italic", e.underline = "Underline", e.strike = "Strike", e.bulletList = "Bulleted List", e.orderedList = "Numbered List", e.link = "Link", e.highlight = "Highlight", e.redo = "Redo", e.undo = "Undo", e.codeBlock = "Code Block", e.blockquote = "Quote", e.file = "File", e.source = "Source", e))(Qe || {});
49
49
  const fo = [
50
50
  // Layout
51
51
  "layout-column",
@@ -84,24 +84,24 @@ const fo = [
84
84
  "typography-body-2-regular",
85
85
  // Size
86
86
  "h-full"
87
- ], n = ft(), vo = n == null ? void 0 : n.backgroundColor["custom-colors-custom-6"], we = n == null ? void 0 : n.backgroundColor["custom-colors-custom-1"], bo = n == null ? void 0 : n.backgroundColor["custom-colors-custom-3"];
88
- var Be;
89
- const ko = (Be = n == null ? void 0 : n.backgroundColor) == null ? void 0 : Be.white, ue = n == null ? void 0 : n.backgroundColor["custom-colors-custom-6"], he = n == null ? void 0 : n.backgroundColor["custom-colors-custom-5"], yo = n == null ? void 0 : n.backgroundColor["custom-colors-custom-3"], Co = n == null ? void 0 : n.backgroundColor.success, Oe = n == null ? void 0 : n.backgroundColor.warning, wo = n == null ? void 0 : n.backgroundColor["custom-colors-custom-1"];
90
- var Me, Ae, Pe, He, Re, Ne, Ve, $e, Ie, Ee;
91
- const Oo = Ge.theme({
87
+ ], a = ft(), vo = a == null ? void 0 : a.backgroundColor["custom-colors-custom-6"], Oe = a == null ? void 0 : a.backgroundColor["custom-colors-custom-1"], bo = a == null ? void 0 : a.backgroundColor["custom-colors-custom-3"];
88
+ var Me;
89
+ const ko = (Me = a == null ? void 0 : a.backgroundColor) == null ? void 0 : Me.white, ue = a == null ? void 0 : a.backgroundColor["custom-colors-custom-6"], ve = a == null ? void 0 : a.backgroundColor["custom-colors-custom-5"], yo = a == null ? void 0 : a.backgroundColor["custom-colors-custom-3"], Co = a == null ? void 0 : a.backgroundColor.success, Se = a == null ? void 0 : a.backgroundColor.warning, wo = a == null ? void 0 : a.backgroundColor["custom-colors-custom-1"];
90
+ var Ae, Pe, He, Re, Ne, Ve, $e, Ie, Ee, Fe;
91
+ const Oo = Je.theme({
92
92
  "&": {
93
93
  color: ue,
94
- backgroundColor: (Me = n == null ? void 0 : n.backgroundColor) == null ? void 0 : Me["bg-primary-container"]
94
+ backgroundColor: (Ae = a == null ? void 0 : a.backgroundColor) == null ? void 0 : Ae["bg-primary-container"]
95
95
  },
96
96
  ".cm-editor": {
97
97
  border: "none",
98
- borderRadius: (Ae = n == null ? void 0 : n.spacing) == null ? void 0 : Ae.xs
98
+ borderRadius: (Pe = a == null ? void 0 : a.spacing) == null ? void 0 : Pe.xs
99
99
  },
100
100
  "&.cm-focused": {
101
101
  outline: "none"
102
102
  },
103
103
  ".cm-scroller": {
104
- borderRadius: (Pe = n == null ? void 0 : n.spacing) == null ? void 0 : Pe.xs
104
+ borderRadius: (He = a == null ? void 0 : a.spacing) == null ? void 0 : He.xs
105
105
  },
106
106
  ".cm-content": {
107
107
  // caretColor: cursor,
@@ -110,7 +110,7 @@ const Oo = Ge.theme({
110
110
  // background: highlightBackground,
111
111
  // color: themes?.colors?.neutral?.[600],
112
112
  border: 0,
113
- borderRadius: (He = n == null ? void 0 : n.spacing) == null ? void 0 : He.xs
113
+ borderRadius: (Re = a == null ? void 0 : a.spacing) == null ? void 0 : Re.xs
114
114
  },
115
115
  ".cm-panel.cm-search input[type=checkbox]": {
116
116
  display: "inline-block",
@@ -134,23 +134,23 @@ const Oo = Ge.theme({
134
134
  // backgroundColor: themes?.colors?.sky?.[100],
135
135
  },
136
136
  ".cm-activeLine": {
137
- backgroundColor: (Re = n == null ? void 0 : n.backgroundColor) == null ? void 0 : Re["bg-secondary-container"]
137
+ backgroundColor: (Ne = a == null ? void 0 : a.backgroundColor) == null ? void 0 : Ne["bg-secondary-container"]
138
138
  },
139
139
  // '.cm-selectionMatch': { backgroundColor: themes?.colors?.lime?.[500] },
140
140
  "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": {
141
141
  // backgroundColor: themes?.colors?.lime?.[600],
142
142
  },
143
143
  ".cm-gutters": {
144
- backgroundColor: (Ne = n == null ? void 0 : n.backgroundColor) == null ? void 0 : Ne["primary-opacity-0-12"],
145
- color: he,
144
+ backgroundColor: (Ve = a == null ? void 0 : a.backgroundColor) == null ? void 0 : Ve["primary-opacity-0-12"],
145
+ color: ve,
146
146
  border: "none"
147
147
  },
148
148
  ".cm-lineNumbers .cm-gutterElement": {
149
- paddingLeft: (Ve = n == null ? void 0 : n.spacing) == null ? void 0 : Ve["sm+*"],
150
- paddingRight: ($e = n == null ? void 0 : n.spacing) == null ? void 0 : $e["sm+*"]
149
+ paddingLeft: ($e = a == null ? void 0 : a.spacing) == null ? void 0 : $e["sm+*"],
150
+ paddingRight: (Ie = a == null ? void 0 : a.spacing) == null ? void 0 : Ie["sm+*"]
151
151
  },
152
152
  ".cm-activeLineGutter": {
153
- backgroundColor: (Ie = n == null ? void 0 : n.backgroundColor) == null ? void 0 : Ie["primary-opacity-0-16"]
153
+ backgroundColor: (Ee = a == null ? void 0 : a.backgroundColor) == null ? void 0 : Ee["primary-opacity-0-16"]
154
154
  },
155
155
  ".cm-foldPlaceholder": {
156
156
  backgroundColor: "transparent",
@@ -181,76 +181,76 @@ const Oo = Ge.theme({
181
181
  // color: themes?.colors?.neutral?.[600],
182
182
  // backgroundColor: themes?.colors?.neutral?.[100],
183
183
  // border: `1px solid ${themes?.colors?.neutral?.[200]}`,
184
- borderRadius: (Ee = n == null ? void 0 : n.spacing) == null ? void 0 : Ee.xs
184
+ borderRadius: (Fe = a == null ? void 0 : a.spacing) == null ? void 0 : Fe.xs
185
185
  }
186
186
  }, { dark: !0 }), So = Zt.define([
187
187
  {
188
- tag: a.keyword,
188
+ tag: n.keyword,
189
189
  color: wo
190
190
  },
191
191
  {
192
- tag: [a.name, a.deleted, a.character, a.propertyName, a.macroName],
193
- color: we
192
+ tag: [n.name, n.deleted, n.character, n.propertyName, n.macroName],
193
+ color: Oe
194
194
  },
195
195
  {
196
- tag: [a.function(a.variableName), a.labelName],
196
+ tag: [n.function(n.variableName), n.labelName],
197
197
  color: yo
198
198
  },
199
199
  {
200
- tag: [a.color, a.constant(a.name), a.standard(a.name)],
201
- color: Oe
200
+ tag: [n.color, n.constant(n.name), n.standard(n.name)],
201
+ color: Se
202
202
  },
203
203
  {
204
- tag: [a.definition(a.name), a.separator],
204
+ tag: [n.definition(n.name), n.separator],
205
205
  color: ue
206
206
  },
207
207
  {
208
- tag: [a.typeName, a.className, a.number, a.changed, a.annotation, a.modifier, a.self, a.namespace],
208
+ tag: [n.typeName, n.className, n.number, n.changed, n.annotation, n.modifier, n.self, n.namespace],
209
209
  color: vo
210
210
  },
211
211
  {
212
- tag: [a.operator, a.operatorKeyword, a.url, a.escape, a.regexp, a.link, a.special(a.string)],
212
+ tag: [n.operator, n.operatorKeyword, n.url, n.escape, n.regexp, n.link, n.special(n.string)],
213
213
  color: bo
214
214
  },
215
215
  {
216
- tag: [a.meta, a.comment],
217
- color: he
216
+ tag: [n.meta, n.comment],
217
+ color: ve
218
218
  },
219
219
  {
220
- tag: a.strong,
220
+ tag: n.strong,
221
221
  fontWeight: "bold"
222
222
  },
223
223
  {
224
- tag: a.emphasis,
224
+ tag: n.emphasis,
225
225
  fontStyle: "italic"
226
226
  },
227
227
  {
228
- tag: a.strikethrough,
228
+ tag: n.strikethrough,
229
229
  textDecoration: "line-through"
230
230
  },
231
231
  {
232
- tag: a.link,
233
- color: he,
232
+ tag: n.link,
233
+ color: ve,
234
234
  textDecoration: "underline"
235
235
  },
236
236
  {
237
- tag: a.heading,
237
+ tag: n.heading,
238
238
  fontWeight: "bold",
239
- color: we
239
+ color: Oe
240
240
  },
241
241
  {
242
- tag: [a.atom, a.bool, a.special(a.variableName)],
243
- color: Oe
242
+ tag: [n.atom, n.bool, n.special(n.variableName)],
243
+ color: Se
244
244
  },
245
245
  {
246
- tag: [a.processingInstruction, a.string, a.inserted],
246
+ tag: [n.processingInstruction, n.string, n.inserted],
247
247
  color: Co
248
248
  },
249
249
  {
250
- tag: a.invalid,
250
+ tag: n.invalid,
251
251
  color: ko
252
252
  }
253
- ]), Lo = [Oo, xt(So)], Se = (e, o) => {
253
+ ]), Lo = [Oo, xt(So)], Le = (e, o) => {
254
254
  if (e === o)
255
255
  return null;
256
256
  let t = 0, s = e.length, l = o.length;
@@ -266,15 +266,15 @@ const Oo = Ge.theme({
266
266
  };
267
267
  class Bo {
268
268
  constructor(o) {
269
- var g;
269
+ var h;
270
270
  this.updating = !1, this.node = o.node, this.view = o.view;
271
- const t = ((g = o.cmOptions) == null ? void 0 : g.extensions) || [];
271
+ const t = ((h = o.cmOptions) == null ? void 0 : h.extensions) || [];
272
272
  this.name = "codeBlock", this.getPos = o.getPos;
273
- const s = Ce.changeFilter.of((L) => (!L.docChanged && !this.updating && this.forwardSelection(), !0));
274
- this.cm = new Ge({
273
+ const s = we.changeFilter.of((L) => (!L.docChanged && !this.updating && this.forwardSelection(), !0));
274
+ this.cm = new Je({
275
275
  dispatch: this.dispatch.bind(this)
276
276
  }), this.dom = this.cm.dom;
277
- const l = Ce.create({
277
+ const l = we.create({
278
278
  doc: this.node.textContent,
279
279
  extensions: [
280
280
  Lo,
@@ -321,25 +321,25 @@ class Bo {
321
321
  }
322
322
  dispatch(o) {
323
323
  if (this.cm.setState(o.state), o.docChanged && !this.updating) {
324
- const t = this.getPos() + 1, s = o.state.doc.toString(), l = Se(this.node.textContent, s);
324
+ const t = this.getPos() + 1, s = o.state.doc.toString(), l = Le(this.node.textContent, s);
325
325
  if (!l)
326
326
  return;
327
- const g = l.text ? this.view.state.schema.text(l.text) : null, L = this.view.state.tr.replaceWith(l.from + t, l.to + t, g);
327
+ const h = l.text ? this.view.state.schema.text(l.text) : null, L = this.view.state.tr.replaceWith(l.from + t, l.to + t, h);
328
328
  this.view.dispatch(L), this.forwardSelection();
329
329
  }
330
330
  }
331
331
  mayBeEscape(o, t) {
332
332
  return (s) => {
333
- const { state: l } = s, { selection: g } = l, k = (() => {
334
- const y = g.main.from, A = l.doc.lineAt(y);
333
+ const { state: l } = s, { selection: h } = l, k = (() => {
334
+ const y = h.main.from, A = l.doc.lineAt(y);
335
335
  return {
336
336
  line: A.number,
337
337
  ch: y - A.from
338
338
  };
339
- })(), U = l.selection.ranges.some((y) => !y.empty), W = 1, G = l.doc.lineAt(l.doc.length).number;
340
- if (U || k.line !== (t < 0 ? W : G) || o === "char" && k.ch !== (t < 0 ? 0 : l.doc.line(k.line).length))
339
+ })(), D = l.selection.ranges.some((y) => !y.empty), U = 1, W = l.doc.lineAt(l.doc.length).number;
340
+ if (D || k.line !== (t < 0 ? U : W) || o === "char" && k.ch !== (t < 0 ? 0 : l.doc.line(k.line).length))
341
341
  return !1;
342
- const J = this.getPos() + (t < 0 ? 0 : this.node.nodeSize), B = Jt.near(this.view.state.doc.resolve(J), t);
342
+ const G = this.getPos() + (t < 0 ? 0 : this.node.nodeSize), B = Jt.near(this.view.state.doc.resolve(G), t);
343
343
  return this.view.dispatch(this.view.state.tr.setSelection(B).scrollIntoView()), this.view.focus(), !0;
344
344
  };
345
345
  }
@@ -347,7 +347,7 @@ class Bo {
347
347
  if (o.type !== this.node.type)
348
348
  return !1;
349
349
  this.node = o;
350
- const t = Se(this.cm.state.doc.toString(), o.textContent);
350
+ const t = Le(this.cm.state.doc.toString(), o.textContent);
351
351
  return t && (this.updating = !0, this.cm.dispatch({
352
352
  changes: {
353
353
  from: t.from,
@@ -408,13 +408,13 @@ const Mo = Mt.create({
408
408
  }
409
409
  }), Ao = {
410
410
  ...S.nodes,
411
- [Ue.name]: S.nodes.paragraph,
412
- [qe.name]: S.nodes.bullet_list,
413
- [ao.name]: S.nodes.list_item,
414
- [De.name]: S.nodes.ordered_list,
411
+ [We.name]: S.nodes.paragraph,
412
+ [ze.name]: S.nodes.bullet_list,
413
+ [no.name]: S.nodes.list_item,
414
+ [Ue.name]: S.nodes.ordered_list,
415
415
  [ro.name]: S.nodes.hard_break,
416
416
  [oo.name]: S.nodes.code_block,
417
- [Fe.name]: S.nodes.blockquote,
417
+ [qe.name]: S.nodes.blockquote,
418
418
  [so.name]: S.nodes.horizontal_rule
419
419
  }, Po = {
420
420
  ...S.marks,
@@ -425,51 +425,51 @@ const Mo = Mt.create({
425
425
  mixable: !0,
426
426
  expelEnclosingWhitespace: !0
427
427
  },
428
- [no.name]: {
428
+ [ao.name]: {
429
429
  open: " _",
430
430
  close: "_ ",
431
431
  mixable: !0,
432
432
  expelEnclosingWhitespace: !0
433
433
  },
434
- [ze.name]: {
434
+ [Te.name]: {
435
435
  open: "==",
436
436
  close: "==",
437
437
  mixable: !0,
438
438
  expelEnclosingWhitespace: !0
439
439
  },
440
- [We.name]: {
440
+ [Ge.name]: {
441
441
  open: "<u>",
442
442
  close: "</u>",
443
443
  mixable: !0,
444
444
  expelEnclosingWhitespace: !0
445
445
  },
446
- [Te.name]: {
446
+ [De.name]: {
447
447
  open(e, o, t, s) {
448
- return Le(o, t, s, 1) ? "<" : "[";
448
+ return Be(o, t, s, 1) ? "<" : "[";
449
449
  },
450
450
  close(e, o, t, s) {
451
451
  const l = o.attrs.canonicalSrc || o.attrs.href;
452
- return Le(o, t, s, -1) ? ">" : `](${e.esc(l)}${o.attrs.title ? ` ${e.quote(o.attrs.title)}` : ""})`;
452
+ return Be(o, t, s, -1) ? ">" : `](${e.esc(l)}${o.attrs.title ? ` ${e.quote(o.attrs.title)}` : ""})`;
453
453
  }
454
454
  }
455
455
  };
456
- function Le(e, o, t, s) {
456
+ function Be(e, o, t, s) {
457
457
  if (e.attrs.title || !/^\w+:/.test(e.attrs.href)) return !1;
458
458
  const l = o.child(t + (s < 0 ? -1 : 0));
459
459
  if (!l.isText || l.text !== e.attrs.href || l.marks[l.marks.length - 1] !== e)
460
460
  return !1;
461
461
  if (t === (s < 0 ? 1 : o.childCount - 1)) return !0;
462
- const g = o.child(t + (s < 0 ? -2 : 1));
463
- return !e.isInSet(g.marks);
462
+ const h = o.child(t + (s < 0 ? -2 : 1));
463
+ return !e.isInSet(h.marks);
464
464
  }
465
- function pe(e, o) {
465
+ function ge(e, o) {
466
466
  const t = new uo(
467
467
  Ao,
468
468
  Po
469
469
  ), s = e.nodeFromJSON(o);
470
470
  return t.serialize(s, { tightLists: !0 });
471
471
  }
472
- function ge(e, o) {
472
+ function he(e, o) {
473
473
  if (!o) return null;
474
474
  const t = io.parse(o);
475
475
  if (!t) return null;
@@ -510,7 +510,7 @@ const Ho = Ft({
510
510
  },
511
511
  format: {
512
512
  type: String,
513
- default: () => Je.Markup
513
+ default: () => je.Markup
514
514
  },
515
515
  label: {
516
516
  type: String,
@@ -550,7 +550,7 @@ const Ho = Ft({
550
550
  ],
551
551
  setup(e, o) {
552
552
  let t = qt();
553
- const s = m(), l = m(), g = m(), L = m(), k = m(), U = m(), W = m(), G = m(), J = m(), B = m({
553
+ const s = m(), l = m(), h = m(), L = m(), k = m(), D = m(), U = m(), W = m(), G = m(), B = m({
554
554
  bold: !1,
555
555
  italic: !1,
556
556
  underline: !1,
@@ -565,29 +565,29 @@ const Ho = Ft({
565
565
  blockquote: !1,
566
566
  file: !1,
567
567
  source: !1
568
- }), y = m(e.autofocus), A = [1, 2, 3, 4], P = m(0), I = m(""), i = m(!1), H = m(!1), d = m(""), b = m(""), ce = m(0), ve = m(""), { isMobile: be } = pt();
569
- let ke = Et(s, {
568
+ }), y = m(e.autofocus), A = [1, 2, 3, 4], P = m(0), E = m(""), i = m(!1), H = m(!1), d = m(""), v = m(""), ce = m(0), be = m(""), { isMobile: ke } = pt();
569
+ let ye = Et(s, {
570
570
  fallbackFocus: ".container",
571
571
  allowOutsideClick: !0
572
572
  });
573
- Vt(g, $t((r) => {
574
- var h, p;
573
+ Vt(h, $t((r) => {
574
+ var p, g;
575
575
  const u = r[0], { width: c } = u.contentRect;
576
- if (k.value && l.value && ye.value) {
576
+ if (k.value && l.value && Ce.value) {
577
577
  let C = 0;
578
- C = ((p = (h = l.value.firstElementChild) == null ? void 0 : h.firstElementChild) == null ? void 0 : p.offsetWidth) + 16;
578
+ C = ((g = (p = l.value.firstElementChild) == null ? void 0 : p.firstElementChild) == null ? void 0 : g.offsetWidth) + 16;
579
579
  const M = c / C - 2;
580
- ce.value = Math.round(ye.value - M);
580
+ ce.value = Math.round(Ce.value - M);
581
581
  }
582
582
  }, 10)), zt(() => {
583
583
  t.value = new At({
584
584
  onUpdate: ({ editor: r }) => {
585
585
  y.value = !0, me();
586
586
  const u = r.getHTML(), c = r.getText();
587
- e.format === "markdown" ? (I.value = pe(r.schema, r.getJSON()), E.value = I.value) : E.value = c === "" ? c : u;
587
+ e.format === "markdown" ? (E.value = ge(r.schema, r.getJSON()), F.value = E.value) : F.value = c === "" ? c : u;
588
588
  },
589
589
  onCreate: ({ editor: r }) => {
590
- e.format === "markdown" ? r.commands.setContent(ge(r.schema, E.value)) : r.commands.setContent(E.value);
590
+ e.format === "markdown" ? r.commands.setContent(he(r.schema, F.value)) : r.commands.setContent(F.value);
591
591
  },
592
592
  onFocus(r) {
593
593
  o.emit("focus", r);
@@ -609,22 +609,22 @@ const Ho = Ft({
609
609
  orderedList: !1,
610
610
  blockquote: !1
611
611
  }),
612
- Ue.configure({
612
+ We.configure({
613
613
  HTMLAttributes: {
614
614
  class: "or-cm-paragraph my-xs"
615
615
  }
616
616
  }),
617
- qe.configure({
617
+ ze.configure({
618
618
  HTMLAttributes: {
619
619
  class: "or-cm-bulletList mx-lg my-xs list-disc"
620
620
  }
621
621
  }),
622
- De.configure({
622
+ Ue.configure({
623
623
  HTMLAttributes: {
624
624
  class: "or-cm-orderedList mx-lg my-xs list-decimal"
625
625
  }
626
626
  }),
627
- Fe.configure({
627
+ qe.configure({
628
628
  HTMLAttributes: {
629
629
  class: "or-cm-blockquote my-sm mx-lg px-lg border-l-2 border-outline"
630
630
  }
@@ -641,8 +641,8 @@ const Ho = Ft({
641
641
  ];
642
642
  }
643
643
  }),
644
- We,
645
- Te.configure({
644
+ Ge,
645
+ De.configure({
646
646
  openOnClick: !0,
647
647
  linkOnPaste: !0,
648
648
  autolink: !1,
@@ -652,7 +652,7 @@ const Ho = Ft({
652
652
  class: "or-cm-link text-primary cursor-pointer"
653
653
  }
654
654
  }),
655
- ze,
655
+ Te,
656
656
  Rt.configure({
657
657
  placeholder: e.placeholder,
658
658
  emptyEditorClass: "or-cm-placeholder text-outline is-editor-empty"
@@ -666,94 +666,97 @@ const Ho = Ft({
666
666
  parseOptions: {
667
667
  preserveWhitespace: !0
668
668
  }
669
- }), me(), ke.activate();
669
+ }), me(), ye.activate();
670
670
  }), Tt(() => {
671
671
  var r;
672
672
  (r = t.value) == null || r.destroy();
673
- }), It(g, () => {
674
- y.value = !1, ke.deactivate();
673
+ }), It(h, () => {
674
+ y.value = !1, ye.deactivate();
675
675
  });
676
- const E = w({
676
+ const F = w({
677
677
  get: () => e.modelValue,
678
678
  set: (r) => {
679
679
  o.emit("input", r), o.emit("update:modelValue", r);
680
680
  }
681
- }), Qe = w(() => e.toolbar.flat().indexOf("heading")), Xe = w(() => (r) => je[r]), Ye = w(() => (r) => Ke[r]), Ze = w(() => P.value && B.value.heading ? `format_h${P.value}` : "format_paragraph"), ye = w(() => e.toolbar.flat().length), de = w(() => {
681
+ }), Xe = w(() => e.toolbar.flat().indexOf("heading")), Ye = w(() => (r) => Ke[r]), Ze = w(() => (r) => Qe[r]), xe = w(() => P.value && B.value.heading ? `format_h${P.value}` : "format_paragraph"), Ce = w(() => e.toolbar.flat().length), de = w(() => {
682
682
  const r = ce.value, u = e.toolbar.flat();
683
683
  let c = new Set(u.slice(u.length - r, u.length));
684
- return e.toolbar.forEach((h) => {
685
- h.some((p) => c.has(p)) && h.forEach((p) => c.add(p));
684
+ return e.toolbar.forEach((p) => {
685
+ p.some((g) => c.has(g)) && p.forEach((g) => c.add(g));
686
686
  }), c;
687
- }), xe = () => {
687
+ }), _e = () => {
688
688
  var r, u, c;
689
689
  me(), y.value = !0, (r = t.value) == null || r.commands.focus(), P.value = ((c = (u = t.value) == null ? void 0 : u.getAttributes("heading")) == null ? void 0 : c.level) || 0;
690
- }, _e = (r) => be.value ? !0 : gt(r) ? !r.some((c) => de.value.has(c)) : !de.value.has(r), et = (r) => {
691
- var h, p, C, M;
690
+ }, et = (r) => ke.value ? !0 : gt(r) ? !r.some((c) => de.value.has(c)) : !de.value.has(r), tt = (r) => {
691
+ var p, g, C, M;
692
692
  const c = r.target.value;
693
- (p = t.value) == null || p.commands.setContent(ge((h = t.value) == null ? void 0 : h.schema, c)), I.value = pe((C = t.value) == null ? void 0 : C.schema, (M = t.value) == null ? void 0 : M.getJSON()), E.value = I.value;
694
- }, tt = (r, u) => {
695
- var c, h, p, C, M, j, K, Q, X, Y, Z, x, _, ee, te, oe, T;
693
+ (g = t.value) == null || g.commands.setContent(he((p = t.value) == null ? void 0 : p.schema, c)), E.value = ge((C = t.value) == null ? void 0 : C.schema, (M = t.value) == null ? void 0 : M.getJSON()), F.value = E.value;
694
+ }, ot = (r, u) => {
695
+ var c, p, g, C, M, J, j, K, Q, X, Y, Z, x, _, ee, te, oe;
696
696
  switch (r) {
697
697
  case "source":
698
- i.value = !i.value, ve.value = pe((c = t.value) == null ? void 0 : c.schema, (h = t.value) == null ? void 0 : h.getJSON()), (C = L.value) == null || C.style.setProperty("height", `${((p = s.value) == null ? void 0 : p.offsetHeight) || 88}px`), Ut(() => {
699
- var F;
700
- return (F = L.value) == null ? void 0 : F.focus();
698
+ i.value = !i.value, be.value = ge((c = t.value) == null ? void 0 : c.schema, (p = t.value) == null ? void 0 : p.getJSON()), (C = L.value) == null || C.style.setProperty("height", `${((g = s.value) == null ? void 0 : g.offsetHeight) || 88}px`), Ut(() => {
699
+ var R;
700
+ return (R = L.value) == null ? void 0 : R.focus();
701
701
  });
702
702
  break;
703
703
  case "bulletList":
704
704
  case "orderedList":
705
- r === "bulletList" ? (M = t.value) == null || M.commands.toggleBulletList() : (j = t.value) == null || j.commands.toggleOrderedList();
705
+ r === "bulletList" ? (M = t.value) == null || M.commands.toggleBulletList() : (J = t.value) == null || J.commands.toggleOrderedList();
706
706
  break;
707
707
  case "link":
708
708
  if (t.value) {
709
- const F = ((K = t.value) == null ? void 0 : K.state.selection.$anchor.pos) || 0, { from: it, to: ut, empty: ct } = t.value.state.selection, fe = (Q = t.value.view.state.doc.nodeAt(F)) == null ? void 0 : Q.marks.filter((mt) => mt.type.name === "link"), dt = fe != null && fe.length && ((X = t.value.view.state.doc.nodeAt(F)) == null ? void 0 : X.text) || "";
710
- d.value = ct ? dt : t.value.state.doc.textBetween(it, ut, " "), b.value = t.value.getAttributes("link").href || "";
709
+ const R = ((j = t.value) == null ? void 0 : j.state.selection.$anchor.pos) || 0, { from: fe, to: ut, empty: ct } = t.value.state.selection, pe = (K = t.value.view.state.doc.nodeAt(R)) == null ? void 0 : K.marks.filter((mt) => mt.type.name === "link"), dt = pe != null && pe.length && ((Q = t.value.view.state.doc.nodeAt(R)) == null ? void 0 : Q.text) || "";
710
+ d.value = ct ? dt : t.value.state.doc.textBetween(fe, ut, " "), v.value = t.value.getAttributes("link").href || "";
711
711
  }
712
712
  H.value = !H.value;
713
713
  break;
714
714
  case "blockquote":
715
- (Y = t.value) == null || Y.chain().toggleBlockquote().run();
715
+ (X = t.value) == null || X.chain().toggleBlockquote().run();
716
716
  break;
717
717
  case "codeBlock":
718
- B.value.codeBlock ? (x = t.value) == null || x.commands.setNode("paragraph") : (Z = t.value) == null || Z.commands.setNode(r, { language: "javascript" });
718
+ B.value.codeBlock ? (Z = t.value) == null || Z.commands.setNode("paragraph") : (Y = t.value) == null || Y.commands.setNode(r, { language: "javascript" });
719
719
  break;
720
720
  case "heading":
721
- u ? (P.value = u, (ee = t.value) == null || ee.commands.toggleHeading({ level: u })) : ((_ = t.value) == null || _.commands.setParagraph(), P.value = 0);
721
+ u ? (P.value = u, (_ = t.value) == null || _.commands.toggleHeading({ level: u })) : ((x = t.value) == null || x.commands.setParagraph(), P.value = 0);
722
722
  break;
723
723
  case "undo":
724
724
  case "redo":
725
- r === "undo" ? (te = t.value) == null || te.commands.undo() : (oe = t.value) == null || oe.commands.redo();
725
+ r === "undo" ? (ee = t.value) == null || ee.commands.undo() : (te = t.value) == null || te.commands.redo();
726
726
  break;
727
727
  case "file":
728
728
  o.emit("file-upload");
729
729
  break;
730
730
  default:
731
- (T = t.value) == null || T.chain().toggleMark(r).run();
731
+ (oe = t.value) == null || oe.chain().toggleMark(r).run();
732
732
  break;
733
733
  }
734
- }, ot = async () => {
735
- var p, C, M, j, K, Q, X, Y, Z, x, _, ee, te, oe;
736
- b.value === "" && ((p = t.value) == null || p.chain().focus().extendMarkRange("link").unsetLink().run());
737
- const r = (C = t.value) == null ? void 0 : C.state.selection.empty, u = ((M = t.value) == null ? void 0 : M.state.selection.$anchor.pos) || 0, c = (K = (j = t.value) == null ? void 0 : j.view.state.doc.nodeAt(u)) == null ? void 0 : K.marks.filter((T) => T.type.name === "link"), h = c != null && c.length ? (X = (Q = t.value) == null ? void 0 : Q.view.state.doc.nodeAt(u)) == null ? void 0 : X.text : "";
738
- b.value && r && !h && ((Y = t.value) == null || Y.chain().focus().setMark("link", {
739
- href: b.value,
734
+ }, rt = async () => {
735
+ var g, C, M, J, j, K, Q, X, Y, Z, x, _, ee, te, oe;
736
+ v.value === "" && ((g = t.value) == null || g.chain().focus().extendMarkRange("link").unsetLink().run());
737
+ const r = (C = t.value) == null ? void 0 : C.state.selection.empty, u = ((M = t.value) == null ? void 0 : M.state.selection.$anchor.pos) || 0, c = (j = (J = t.value) == null ? void 0 : J.view.state.doc.nodeAt(u)) == null ? void 0 : j.marks.filter((R) => R.type.name === "link"), p = c != null && c.length ? (Q = (K = t.value) == null ? void 0 : K.view.state.doc.nodeAt(u)) == null ? void 0 : Q.text : "";
738
+ v.value && r && !p && ((X = t.value) == null || X.chain().focus().setMark("link", {
739
+ href: v.value,
740
740
  target: "__blank"
741
- }).command(({ tr: T }) => {
742
- const F = d.value[d.value.length - 1] === " " ? d.value : `${d.value} `;
743
- return T.insertText(F), !0;
744
- }).run()), b.value && h === d.value && r && ((Z = t.value) == null || Z.chain().extendMarkRange("link").updateAttributes("link", {
745
- href: b.value
746
- }).run()), b.value && !r && ((oe = t.value) == null || oe.chain().focus().insertContentAt({
747
- from: (x = t.value) == null ? void 0 : x.state.selection.from,
748
- to: (_ = t.value) == null ? void 0 : _.state.selection.to
741
+ }).command(({ tr: R }) => {
742
+ const fe = d.value[d.value.length - 1] === " " ? d.value : `${d.value} `;
743
+ return R.insertText(fe), !0;
744
+ }).run()), v.value && p === d.value && r && ((Y = t.value) == null || Y.chain().extendMarkRange("link").updateAttributes("link", {
745
+ href: v.value
746
+ }).run()), v.value && d.value !== p && !r && ((te = t.value) == null || te.chain().focus().insertContentAt({
747
+ from: (Z = t.value) == null ? void 0 : Z.state.selection.from,
748
+ to: (x = t.value) == null ? void 0 : x.state.selection.to
749
749
  }, d.value).setTextSelection({
750
- from: (ee = t.value) == null ? void 0 : ee.state.selection.from,
751
- to: ((te = t.value) == null ? void 0 : te.state.selection.from) + d.value.length
750
+ from: (_ = t.value) == null ? void 0 : _.state.selection.from,
751
+ to: ((ee = t.value) == null ? void 0 : ee.state.selection.from) + d.value.length
752
752
  }).setMark("link", {
753
- href: b.value,
753
+ href: v.value,
754
+ target: "__blank"
755
+ }).run()), v.value && !r && ((oe = t.value) == null || oe.chain().focus().setMark("link", {
756
+ href: v.value,
754
757
  target: "__blank"
755
- }).run()), d.value = "", b.value = "", H.value = !1;
756
- }, rt = () => {
758
+ }).run()), d.value = "", v.value = "", H.value = !1;
759
+ }, at = () => {
757
760
  H.value = !1;
758
761
  }, me = () => {
759
762
  e.toolbar.flat().forEach((u) => {
@@ -763,96 +766,96 @@ const Ho = Ft({
763
766
  };
764
767
  Dt([
765
768
  t,
766
- E,
769
+ F,
767
770
  () => e.disabled
768
771
  ], ([
769
772
  r,
770
773
  u,
771
774
  c
772
775
  ]) => {
773
- u !== (r == null ? void 0 : r.getHTML()) && e.format !== "markdown" && (r == null || r.commands.setContent(u)), u !== I.value && e.format === "markdown" && (r == null || r.commands.setContent(ge(r == null ? void 0 : r.schema, u))), r == null || r.setEditable(!c);
776
+ u !== (r == null ? void 0 : r.getHTML()) && e.format !== "markdown" && (r == null || r.commands.setContent(u)), u !== E.value && e.format === "markdown" && (r == null || r.commands.setContent(he(r == null ? void 0 : r.schema, u))), r == null || r.setEditable(!c);
774
777
  });
775
778
  const nt = w(() => [
776
779
  "or-rich-text-editor-v3",
777
780
  ...fo
778
- ]), at = w(() => [
779
- ...po
780
781
  ]), lt = w(() => [
781
- ...go
782
+ ...po
782
783
  ]), st = w(() => [
784
+ ...go
785
+ ]), it = w(() => [
783
786
  "tiptap-editor-v3",
784
787
  ...ho
785
788
  ]);
786
789
  return {
787
- root: g,
790
+ root: h,
788
791
  rootStyles: nt,
789
792
  toolbarRef: l,
790
- toolbarStyles: at,
791
- toolbarGroupStyles: lt,
793
+ toolbarStyles: lt,
794
+ toolbarGroupStyles: st,
792
795
  controlRef: s,
793
- controlStyles: st,
796
+ controlStyles: it,
794
797
  editor: t,
795
798
  containerRef: k,
796
- toolbarButtonRef: G,
797
- moreButtonRef: U,
799
+ toolbarButtonRef: W,
800
+ moreButtonRef: D,
798
801
  textareaRef: L,
799
- morePopoverRef: W,
800
- menuRef: J,
801
- handleToolbarClick: tt,
802
- handleEditorClick: xe,
802
+ morePopoverRef: U,
803
+ menuRef: G,
804
+ handleToolbarClick: ot,
805
+ handleEditorClick: _e,
803
806
  isActive: B,
804
- getRichTextEditorIcon: Xe,
805
- getRichTextEditorTooltipIcon: Ye,
806
- getIndexOfHeading: Qe,
807
+ getRichTextEditorIcon: Ye,
808
+ getRichTextEditorTooltipIcon: Ze,
809
+ getIndexOfHeading: Xe,
807
810
  headingLevels: A,
808
- headingIcon: Ze,
809
- attachLink: ot,
810
- discardLink: rt,
811
+ headingIcon: xe,
812
+ attachLink: rt,
813
+ discardLink: at,
811
814
  isOpenLinkModal: H,
812
815
  text: d,
813
- link: b,
816
+ link: v,
814
817
  isFocused: y,
815
- isVisible: _e,
816
- isMobile: be,
818
+ isVisible: et,
819
+ isMobile: ke,
817
820
  countOfNotVisibleTools: ce,
818
821
  notVisibleTools: de,
819
- handleInput: et,
820
- model: E,
822
+ handleInput: tt,
823
+ model: F,
821
824
  disableMarkdown: i,
822
- sourceValue: ve,
825
+ sourceValue: be,
823
826
  activeHeadingLevel: P
824
827
  };
825
828
  }
826
829
  }), Ro = ["disabled"], No = ["disabled"], Vo = {
827
- class: /* @__PURE__ */ N(["p-sm", "overflow-auto", "min-h-[88px]", "h-full"])
830
+ class: /* @__PURE__ */ V(["p-sm", "overflow-auto", "min-h-[88px]", "h-full"])
828
831
  }, $o = ["activated"], Io = { class: "flex p-sm gap-md" }, Eo = {
829
- class: /* @__PURE__ */ N(["layout-column", "gap-md"])
832
+ class: /* @__PURE__ */ V(["layout-column", "gap-md"])
830
833
  }, Fo = {
831
- class: /* @__PURE__ */ N(["layout-row-reverse", "gap-md"])
834
+ class: /* @__PURE__ */ V(["layout-row-reverse", "gap-md"])
832
835
  };
833
- function qo(e, o, t, s, l, g) {
834
- const L = O("OrLabel"), k = O("OrIconButton"), U = O("OrInputBox"), W = O("OrHint"), G = O("OrError"), J = O("OrPopover"), B = O("OrMenuItem"), y = O("OrMenu"), A = O("OrInput"), P = O("OrButton"), I = O("OrModal");
836
+ function qo(e, o, t, s, l, h) {
837
+ const L = O("OrLabel"), k = O("OrIconButton"), D = O("OrInputBox"), U = O("OrHint"), W = O("OrError"), G = O("OrPopover"), B = O("OrMenuItem"), y = O("OrMenu"), A = O("OrInput"), P = O("OrButton"), E = O("OrModal");
835
838
  return f(), q("div", {
836
839
  ref: "root",
837
- class: N(e.rootStyles)
840
+ class: V(e.rootStyles)
838
841
  }, [
839
- e.$slots.label || e.$slots.addon || e.label ? (f(), R(L, {
842
+ e.$slots.label || e.$slots.addon || e.label ? (f(), N(L, {
840
843
  key: 0,
841
844
  variant: "input",
842
845
  required: e.required,
843
846
  disabled: e.disabled
844
847
  }, {
845
- addon: v(() => [
848
+ addon: b(() => [
846
849
  re(e.$slots, "addon", {}, void 0, !0)
847
850
  ]),
848
- default: v(() => [
851
+ default: b(() => [
849
852
  re(e.$slots, "label", {}, () => [
850
- V(ne(e.label), 1)
853
+ $(ae(e.label), 1)
851
854
  ], !0)
852
855
  ]),
853
856
  _: 3
854
- }, 8, ["required", "disabled"])) : D("", !0),
855
- $(U, {
857
+ }, 8, ["required", "disabled"])) : T("", !0),
858
+ I(D, {
856
859
  ref: "containerRef",
857
860
  class: "grow",
858
861
  direction: "column",
@@ -860,22 +863,22 @@ function qo(e, o, t, s, l, g) {
860
863
  disabled: e.disabled,
861
864
  onClick: o[4] || (o[4] = (i) => e.handleEditorClick())
862
865
  }, {
863
- default: v(() => [
866
+ default: b(() => [
864
867
  z("div", {
865
868
  ref: "toolbarRef",
866
- class: N(e.toolbarStyles),
869
+ class: V(e.toolbarStyles),
867
870
  disabled: e.disabled || !e.isFocused
868
871
  }, [
869
- (f(!0), q(ae, null, le(e.toolbar, (i, H) => (f(), q("div", {
872
+ (f(!0), q(ne, null, le(e.toolbar, (i, H) => (f(), q("div", {
870
873
  key: H,
871
- class: N([...e.toolbarGroupStyles, { hidden: !e.isVisible(i) }]),
874
+ class: V([...e.toolbarGroupStyles, { hidden: !e.isVisible(i) }]),
872
875
  disabled: e.disabled || !e.isFocused
873
876
  }, [
874
- (f(!0), q(ae, null, le(i, (d) => (f(), q("div", {
877
+ (f(!0), q(ne, null, le(i, (d) => (f(), q("div", {
875
878
  key: d,
876
- class: N(["flex gap-md", { hidden: !e.isVisible(d) }])
879
+ class: V(["flex gap-md", { hidden: !e.isVisible(d) }])
877
880
  }, [
878
- d === "heading" ? (f(), R(k, {
881
+ d === "heading" ? (f(), N(k, {
879
882
  key: 0,
880
883
  ref_for: !0,
881
884
  ref: "toolbarButtonRef",
@@ -883,26 +886,26 @@ function qo(e, o, t, s, l, g) {
883
886
  tooltip: { content: d, placement: "top" },
884
887
  selected: e.isActive[d],
885
888
  disabled: e.disabled || !e.isFocused,
886
- onClick: o[0] || (o[0] = (b) => e.menuRef && e.menuRef.toggle())
887
- }, null, 8, ["icon", "tooltip", "selected", "disabled"])) : e.isVisible(d) ? (f(), R(k, {
889
+ onClick: o[0] || (o[0] = (v) => e.menuRef && e.menuRef.toggle())
890
+ }, null, 8, ["icon", "tooltip", "selected", "disabled"])) : e.isVisible(d) ? (f(), N(k, {
888
891
  key: 1,
889
892
  icon: { icon: e.getRichTextEditorIcon(d), variant: "inherit" },
890
893
  tooltip: { content: e.getRichTextEditorTooltipIcon(d), placement: "top" },
891
894
  selected: e.isActive[d],
892
895
  disabled: e.disabled || !e.isFocused,
893
- onClick: (b) => e.handleToolbarClick(d)
894
- }, null, 8, ["icon", "tooltip", "selected", "disabled", "onClick"])) : D("", !0)
896
+ onClick: (v) => e.handleToolbarClick(d)
897
+ }, null, 8, ["icon", "tooltip", "selected", "disabled", "onClick"])) : T("", !0)
895
898
  ], 2))), 128))
896
899
  ], 10, No))), 128)),
897
- e.countOfNotVisibleTools > 0 && !e.isMobile ? (f(), R(k, {
900
+ e.countOfNotVisibleTools > 0 && !e.isMobile ? (f(), N(k, {
898
901
  key: 0,
899
902
  ref: "moreButtonRef",
900
- class: N(["mx-sm"]),
903
+ class: V(["mx-sm"]),
901
904
  icon: { icon: "more_horiz", variant: "inherit" },
902
905
  disabled: e.disabled || !e.isFocused,
903
906
  "force-state": e.morePopoverRef && e.morePopoverRef.state === "open" ? "hover" : void 0,
904
907
  onClick: o[1] || (o[1] = (i) => e.morePopoverRef && e.morePopoverRef.open())
905
- }, null, 8, ["disabled", "force-state"])) : D("", !0)
908
+ }, null, 8, ["disabled", "force-state"])) : T("", !0)
906
909
  ], 10, Ro),
907
910
  z("div", Vo, [
908
911
  se(z("textarea", {
@@ -917,7 +920,7 @@ function qo(e, o, t, s, l, g) {
917
920
  ]),
918
921
  se(z("div", {
919
922
  ref: "controlRef",
920
- class: N(e.controlStyles)
923
+ class: V(e.controlStyles)
921
924
  }, null, 2), [
922
925
  [ie, !e.disableMarkdown]
923
926
  ]),
@@ -926,36 +929,36 @@ function qo(e, o, t, s, l, g) {
926
929
  ]),
927
930
  _: 3
928
931
  }, 8, ["invalid", "disabled"]),
929
- e.$slots.hint || e.hint ? se((f(), R(W, {
932
+ e.$slots.hint || e.hint ? se((f(), N(U, {
930
933
  key: 1,
931
934
  disabled: e.disabled
932
935
  }, {
933
- default: v(() => [
936
+ default: b(() => [
934
937
  re(e.$slots, "hint", {}, () => [
935
- V(ne(e.hint), 1)
938
+ $(ae(e.hint), 1)
936
939
  ], !0)
937
940
  ]),
938
941
  _: 3
939
942
  }, 8, ["disabled"])), [
940
943
  [ie, !e.error]
941
- ]) : D("", !0),
942
- se($(G, { disabled: e.disabled }, {
943
- default: v(() => [
944
- V(ne(e.error), 1)
944
+ ]) : T("", !0),
945
+ se(I(W, { disabled: e.disabled }, {
946
+ default: b(() => [
947
+ $(ae(e.error), 1)
945
948
  ]),
946
949
  _: 1
947
950
  }, 8, ["disabled"]), [
948
951
  [ie, typeof e.error == "string" && e.error.length > 0]
949
952
  ]),
950
- e.moreButtonRef ? (f(), R(J, {
953
+ e.moreButtonRef ? (f(), N(G, {
951
954
  key: 2,
952
955
  ref: "morePopoverRef",
953
956
  trigger: e.moreButtonRef && e.moreButtonRef.root,
954
957
  placement: "top-end"
955
958
  }, {
956
- default: v(() => [
959
+ default: b(() => [
957
960
  z("div", Io, [
958
- (f(!0), q(ae, null, le(e.notVisibleTools, (i) => (f(), R(k, {
961
+ (f(!0), q(ne, null, le(e.notVisibleTools, (i) => (f(), N(k, {
959
962
  key: i,
960
963
  icon: { icon: e.getRichTextEditorIcon(i), variant: "inherit" },
961
964
  tooltip: { content: e.getRichTextEditorTooltipIcon(i), placement: "top" },
@@ -965,74 +968,74 @@ function qo(e, o, t, s, l, g) {
965
968
  ])
966
969
  ]),
967
970
  _: 1
968
- }, 8, ["trigger"])) : D("", !0),
969
- e.toolbarButtonRef ? (f(), R(y, {
971
+ }, 8, ["trigger"])) : T("", !0),
972
+ e.toolbarButtonRef ? (f(), N(y, {
970
973
  key: 3,
971
974
  ref: "menuRef",
972
975
  trigger: e.toolbarButtonRef[e.getIndexOfHeading] && e.toolbarButtonRef[e.getIndexOfHeading].root,
973
976
  placement: "bottom-start"
974
977
  }, {
975
- default: v(() => [
976
- (f(!0), q(ae, null, le(e.headingLevels, (i) => (f(), R(B, {
978
+ default: b(() => [
979
+ (f(!0), q(ne, null, le(e.headingLevels, (i) => (f(), N(B, {
977
980
  key: i,
978
981
  selected: e.activeHeadingLevel === i,
979
982
  onClick: (H) => e.handleToolbarClick("heading", i)
980
983
  }, {
981
- default: v(() => [
982
- V(" Heading " + ne(i), 1)
984
+ default: b(() => [
985
+ $(" Heading " + ae(i), 1)
983
986
  ]),
984
987
  _: 2
985
988
  }, 1032, ["selected", "onClick"]))), 128)),
986
- $(B, {
989
+ I(B, {
987
990
  selected: !e.activeHeadingLevel,
988
991
  onClick: o[5] || (o[5] = (i) => e.handleToolbarClick("heading"))
989
992
  }, {
990
- default: v(() => [
991
- V(" None ")
993
+ default: b(() => [
994
+ $(" None ")
992
995
  ]),
993
996
  _: 1
994
997
  }, 8, ["selected"])
995
998
  ]),
996
999
  _: 1
997
- }, 8, ["trigger"])) : D("", !0),
998
- $(I, {
1000
+ }, 8, ["trigger"])) : T("", !0),
1001
+ I(E, {
999
1002
  "is-open": e.isOpenLinkModal,
1000
1003
  size: "s"
1001
1004
  }, {
1002
- header: v(() => [
1003
- V(" Add Link ")
1005
+ header: b(() => [
1006
+ $(" Add Link ")
1004
1007
  ]),
1005
- footer: v(() => [
1008
+ footer: b(() => [
1006
1009
  z("div", Fo, [
1007
- $(P, {
1010
+ I(P, {
1008
1011
  variant: "contained",
1009
1012
  onClick: o[8] || (o[8] = (i) => e.attachLink())
1010
1013
  }, {
1011
- default: v(() => [
1012
- V(" Save ")
1014
+ default: b(() => [
1015
+ $(" Save ")
1013
1016
  ]),
1014
1017
  _: 1
1015
1018
  }),
1016
- $(P, {
1019
+ I(P, {
1017
1020
  variant: "outlined",
1018
1021
  onClick: o[9] || (o[9] = (i) => e.discardLink())
1019
1022
  }, {
1020
- default: v(() => [
1021
- V(" Cancel ")
1023
+ default: b(() => [
1024
+ $(" Cancel ")
1022
1025
  ]),
1023
1026
  _: 1
1024
1027
  })
1025
1028
  ])
1026
1029
  ]),
1027
- default: v(() => [
1030
+ default: b(() => [
1028
1031
  z("div", Eo, [
1029
- $(A, {
1032
+ I(A, {
1030
1033
  modelValue: e.text,
1031
1034
  "onUpdate:modelValue": o[6] || (o[6] = (i) => e.text = i),
1032
1035
  label: "Text",
1033
1036
  placeholder: "Enter text"
1034
1037
  }, null, 8, ["modelValue"]),
1035
- $(A, {
1038
+ I(A, {
1036
1039
  modelValue: e.link,
1037
1040
  "onUpdate:modelValue": o[7] || (o[7] = (i) => e.link = i),
1038
1041
  label: "Link",
@@ -1044,11 +1047,11 @@ function qo(e, o, t, s, l, g) {
1044
1047
  }, 8, ["is-open"])
1045
1048
  ], 2);
1046
1049
  }
1047
- const Rr = /* @__PURE__ */ mo(Ho, [["render", qo], ["__scopeId", "data-v-538f3986"]]);
1050
+ const Rr = /* @__PURE__ */ mo(Ho, [["render", qo], ["__scopeId", "data-v-1222a307"]]);
1048
1051
  export {
1049
- Je as F,
1052
+ je as F,
1050
1053
  Rr as O,
1051
- je as R,
1052
- Ke as a
1054
+ Ke as R,
1055
+ Qe as a
1053
1056
  };
1054
- //# sourceMappingURL=OrRichTextEditor-DJTBMYpL.mjs.map
1057
+ //# sourceMappingURL=OrRichTextEditor-DKhL46g9.mjs.map