@onereach/ui-components 25.1.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-f034427c] .or-cm-paragraph{@apply my-xs;}[data-v-f034427c] .or-cm-bulletList{@apply mx-lg my-xs list-disc;}[data-v-f034427c] .or-cm-orderedList{@apply mx-lg my-xs list-decimal;}[data-v-f034427c] .or-cm-blockquote{@apply my-sm mx-lg px-lg border-l-2 border-outline;}[data-v-f034427c] .or-cm-link{@apply text-primary cursor-pointer;}[data-v-f034427c] .or-cm-placeholder{@apply text-outline;}[data-v-f034427c] .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 F, normalizeClass as R, createBlock as H, withCtx as v, renderSlot as ee, createTextVNode as V, toDisplayString as te, createCommentVNode as T, createVNode as $, createElementVNode as q, Fragment as oe, renderList as re, withDirectives as ne, vShow as ae, 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
- import { defaultMarkdownSerializer as S, MarkdownSerializer as co } from "prosemirror-markdown";
46
- import { DOMParser as uo } from "prosemirror-model";
45
+ import { defaultMarkdownSerializer as S, MarkdownSerializer as uo } from "prosemirror-markdown";
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, le = n == null ? void 0 : n.backgroundColor["custom-colors-custom-6"], fe = 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
- color: le,
94
- backgroundColor: (Me = n == null ? void 0 : n.backgroundColor) == null ? void 0 : Me["bg-primary-container"]
93
+ color: ue,
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",
@@ -122,7 +122,7 @@ const Oo = Ge.theme({
122
122
  },
123
123
  ".cm-panels": {
124
124
  // backgroundColor: darkBackground,
125
- color: le
125
+ color: ue
126
126
  },
127
127
  // '.cm-panels.cm-panels-top': { borderBottom: `2px solid ${themes?.colors?.neutral?.[200]}` },
128
128
  // '.cm-panels.cm-panels-bottom': { borderTop: `2px solid ${themes?.colors?.neutral?.[200]}` },
@@ -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: fe,
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",
@@ -172,7 +172,7 @@ const Oo = Ge.theme({
172
172
  ".cm-tooltip-autocomplete": {
173
173
  "& > ul > li[aria-selected]": {
174
174
  // backgroundColor: highlightBackground,
175
- color: le
175
+ color: ue
176
176
  }
177
177
  },
178
178
  ".cm-textfield": {
@@ -181,104 +181,104 @@ 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],
205
- color: le
204
+ tag: [n.definition(n.name), n.separator],
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: fe
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: fe,
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
- let t = 0, i = e.length, l = o.length;
257
- for (; t < i && e.charCodeAt(t) === o.charCodeAt(t); )
256
+ let t = 0, s = e.length, l = o.length;
257
+ for (; t < s && e.charCodeAt(t) === o.charCodeAt(t); )
258
258
  t += 1;
259
- for (; i > t && l > t && e.charCodeAt(i - 1) === o.charCodeAt(l - 1); )
260
- i -= 1, l -= 1;
259
+ for (; s > t && l > t && e.charCodeAt(s - 1) === o.charCodeAt(l - 1); )
260
+ s -= 1, l -= 1;
261
261
  return {
262
262
  from: t,
263
- to: i,
263
+ to: s,
264
264
  text: o.slice(t, l)
265
265
  };
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 i = 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,
281
- i,
281
+ s,
282
282
  Kt(),
283
283
  Qt(),
284
284
  Xt(),
@@ -316,22 +316,22 @@ class Bo {
316
316
  t.eq(o.selection) || this.view.dispatch(o.tr.setSelection(t));
317
317
  }
318
318
  asProseMirrorSelection(o) {
319
- const t = this.getPos() + 1, { anchor: i, head: l } = this.cm.state.selection.main;
320
- return Gt.create(o, i + t, l + t);
319
+ const t = this.getPos() + 1, { anchor: s, head: l } = this.cm.state.selection.main;
320
+ return Gt.create(o, s + t, l + t);
321
321
  }
322
322
  dispatch(o) {
323
323
  if (this.cm.setState(o.state), o.docChanged && !this.updating) {
324
- const t = this.getPos() + 1, i = o.state.doc.toString(), l = Se(this.node.textContent, i);
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
- return (i) => {
333
- const { state: l } = i, { selection: g } = l, k = (() => {
334
- const y = g.main.from, A = l.doc.lineAt(y);
332
+ return (s) => {
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
@@ -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,56 +425,56 @@ 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]: {
447
- open(e, o, t, i) {
448
- return Le(o, t, i, 1) ? "<" : "[";
446
+ [De.name]: {
447
+ open(e, o, t, s) {
448
+ return Be(o, t, s, 1) ? "<" : "[";
449
449
  },
450
- close(e, o, t, i) {
450
+ close(e, o, t, s) {
451
451
  const l = o.attrs.canonicalSrc || o.attrs.href;
452
- return Le(o, t, i, -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, i) {
456
+ function Be(e, o, t, s) {
457
457
  if (e.attrs.title || !/^\w+:/.test(e.attrs.href)) return !1;
458
- const l = o.child(t + (i < 0 ? -1 : 0));
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
- if (t === (i < 0 ? 1 : o.childCount - 1)) return !0;
462
- const g = o.child(t + (i < 0 ? -2 : 1));
463
- return !e.isInSet(g.marks);
461
+ if (t === (s < 0 ? 1 : o.childCount - 1)) return !0;
462
+ const h = o.child(t + (s < 0 ? -2 : 1));
463
+ return !e.isInSet(h.marks);
464
464
  }
465
- function de(e, o) {
466
- const t = new co(
465
+ function ge(e, o) {
466
+ const t = new uo(
467
467
  Ao,
468
468
  Po
469
- ), i = e.nodeFromJSON(o);
470
- return t.serialize(i, { tightLists: !0 });
469
+ ), s = e.nodeFromJSON(o);
470
+ return t.serialize(s, { tightLists: !0 });
471
471
  }
472
- function me(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;
476
- const i = new DOMParser(), { body: l } = i.parseFromString(t, "text/html");
477
- return l.append(document.createComment(o)), uo.fromSchema(e).parse(l).toJSON();
476
+ const s = new DOMParser(), { body: l } = s.parseFromString(t, "text/html");
477
+ return l.append(document.createComment(o)), co.fromSchema(e).parse(l).toJSON();
478
478
  }
479
479
  const Ho = Ft({
480
480
  name: "OrRichTextEditor",
@@ -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 i = m(), l = m(), g = m(), L = m(), k = m(), D = m(), U = m(), W = m(), G = 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(""), s = m(!1), N = m(!1), d = m(""), b = m(""), se = m(0), pe = m(""), { isMobile: ge } = pt();
569
- let he = Et(i, {
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;
575
- const c = r[0], { width: u } = c.contentRect;
576
- if (k.value && l.value && ve.value) {
573
+ Vt(h, $t((r) => {
574
+ var p, g;
575
+ const u = r[0], { width: c } = u.contentRect;
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;
579
- const M = u / C - 2;
580
- se.value = Math.round(ve.value - M);
578
+ C = ((g = (p = l.value.firstElementChild) == null ? void 0 : p.firstElementChild) == null ? void 0 : g.offsetWidth) + 16;
579
+ const M = c / C - 2;
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
- y.value = !0, ce();
586
- const c = r.getHTML(), u = r.getText();
587
- e.format === "markdown" ? (I.value = de(r.schema, r.getJSON()), E.value = I.value) : E.value = u === "" ? u : c;
585
+ y.value = !0, me();
586
+ const u = r.getHTML(), c = r.getText();
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(me(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);
@@ -595,7 +595,7 @@ const Ho = Ft({
595
595
  onBlur(r) {
596
596
  o.emit("blur", r);
597
597
  },
598
- element: i.value,
598
+ element: s.value,
599
599
  autofocus: e.autofocus,
600
600
  enableInputRules: !0,
601
601
  enablePasteRules: !0,
@@ -609,40 +609,40 @@ 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
  }
631
631
  }),
632
632
  Ht.configure({ levels: A }).extend({
633
633
  levels: A,
634
- renderHTML({ node: r, HTMLAttributes: c }) {
634
+ renderHTML({ node: r, HTMLAttributes: u }) {
635
635
  return [
636
636
  "h" + r.attrs.level,
637
- Pt(c, {
637
+ Pt(u, {
638
638
  class: `typography-headline-${r.attrs.level} my-xs`
639
639
  }),
640
640
  0
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,38 +666,38 @@ const Ho = Ft({
666
666
  parseOptions: {
667
667
  preserveWhitespace: !0
668
668
  }
669
- }), ce(), he.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, he.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"), ve = w(() => e.toolbar.flat().length), ie = w(() => {
682
- const r = se.value, c = e.toolbar.flat();
683
- let u = new Set(c.slice(c.length - r, c.length));
684
- return e.toolbar.forEach((h) => {
685
- h.some((p) => u.has(p)) && h.forEach((p) => u.add(p));
686
- }), u;
687
- }), xe = () => {
688
- var r, c, u;
689
- ce(), y.value = !0, (r = t.value) == null || r.commands.focus(), P.value = ((u = (c = t.value) == null ? void 0 : c.getAttributes("heading")) == null ? void 0 : u.level) || 0;
690
- }, _e = (r) => ge.value ? !0 : gt(r) ? !r.some((u) => ie.value.has(u)) : !ie.value.has(r), et = (r) => {
691
- var h, p, C, M;
692
- const u = r.target.value;
693
- (p = t.value) == null || p.commands.setContent(me((h = t.value) == null ? void 0 : h.schema, u)), I.value = de((C = t.value) == null ? void 0 : C.schema, (M = t.value) == null ? void 0 : M.getJSON()), E.value = I.value;
694
- }, tt = (r, c) => {
695
- var u, h, p, C, M, J, j, K, Q, X, Y, Z, z, _, be, ke, ye;
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
+ const r = ce.value, u = e.toolbar.flat();
683
+ let c = new Set(u.slice(u.length - r, u.length));
684
+ return e.toolbar.forEach((p) => {
685
+ p.some((g) => c.has(g)) && p.forEach((g) => c.add(g));
686
+ }), c;
687
+ }), _e = () => {
688
+ var r, u, c;
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
+ }, 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
+ const c = r.target.value;
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
- N.value = !N.value, pe.value = de((u = t.value) == null ? void 0 : u.schema, (h = t.value) == null ? void 0 : h.getJSON()), (C = L.value) == null || C.style.setProperty("height", `${((p = i.value) == null ? void 0 : p.offsetHeight) || 88}px`), Ut(() => {
699
- var x;
700
- return (x = L.value) == null ? void 0 : x.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":
@@ -706,10 +706,10 @@ const Ho = Ft({
706
706
  break;
707
707
  case "link":
708
708
  if (t.value) {
709
- const x = ((j = t.value) == null ? void 0 : j.state.selection.$anchor.pos) || 0, { from: it, to: ct, empty: ut } = t.value.state.selection, ue = (K = t.value.view.state.doc.nodeAt(x)) == null ? void 0 : K.marks.filter((mt) => mt.type.name === "link"), dt = ue != null && ue.length && ((Q = t.value.view.state.doc.nodeAt(x)) == null ? void 0 : Q.text) || "";
710
- d.value = ut ? dt : t.value.state.doc.textBetween(it, ct, " "), 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
- s.value = !s.value;
712
+ H.value = !H.value;
713
713
  break;
714
714
  case "blockquote":
715
715
  (X = t.value) == null || X.chain().toggleBlockquote().run();
@@ -718,73 +718,82 @@ const Ho = Ft({
718
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
- c ? (P.value = c, (_ = t.value) == null || _.commands.toggleHeading({ level: c })) : ((z = t.value) == null || z.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" ? (be = t.value) == null || be.commands.undo() : (ke = t.value) == null || ke.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
- (ye = t.value) == null || ye.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, j, K, Q, X, Y, Z;
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, c = ((M = t.value) == null ? void 0 : M.state.selection.$anchor.pos) || 0, u = (j = (J = t.value) == null ? void 0 : J.view.state.doc.nodeAt(c)) == null ? void 0 : j.marks.filter((z) => z.type.name === "link"), h = u != null && u.length ? (Q = (K = t.value) == null ? void 0 : K.view.state.doc.nodeAt(c)) == null ? void 0 : Q.text : "";
738
- b.value && r && !h && ((X = t.value) == null || X.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
+ target: "__blank"
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
+ }, d.value).setTextSelection({
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
+ }).setMark("link", {
753
+ href: v.value,
740
754
  target: "__blank"
741
- }).command(({ tr: z }) => {
742
- const _ = d.value[d.value.length - 1] === " " ? d.value : `${d.value} `;
743
- return z.insertText(_), !0;
744
- }).run()), b.value && h === d.value && r && ((Y = t.value) == null || Y.chain().extendMarkRange("link").updateAttributes("link", {
745
- href: b.value
746
- }).run()), b.value && !r && ((Z = t.value) == null || Z.chain().focus().setMark("link", {
747
- href: b.value,
755
+ }).run()), v.value && !r && ((oe = t.value) == null || oe.chain().focus().setMark("link", {
756
+ href: v.value,
748
757
  target: "__blank"
749
- }).run()), d.value = "", b.value = "", s.value = !1;
750
- }, rt = () => {
751
- s.value = !1;
752
- }, ce = () => {
753
- e.toolbar.flat().forEach((c) => {
754
- var u;
755
- c === "source" ? B.value[c] = N.value : B.value[c] = ((u = t.value) == null ? void 0 : u.isActive(c)) || !1;
758
+ }).run()), d.value = "", v.value = "", H.value = !1;
759
+ }, at = () => {
760
+ H.value = !1;
761
+ }, me = () => {
762
+ e.toolbar.flat().forEach((u) => {
763
+ var c;
764
+ u === "source" ? B.value[u] = i.value : B.value[u] = ((c = t.value) == null ? void 0 : c.isActive(u)) || !1;
756
765
  });
757
766
  };
758
767
  Dt([
759
768
  t,
760
- E,
769
+ F,
761
770
  () => e.disabled
762
771
  ], ([
763
772
  r,
764
- c,
765
- u
773
+ u,
774
+ c
766
775
  ]) => {
767
- c !== (r == null ? void 0 : r.getHTML()) && e.format !== "markdown" && (r == null || r.commands.setContent(c)), c !== I.value && e.format === "markdown" && (r == null || r.commands.setContent(me(r == null ? void 0 : r.schema, c))), r == null || r.setEditable(!u);
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);
768
777
  });
769
778
  const nt = w(() => [
770
779
  "or-rich-text-editor-v3",
771
780
  ...fo
772
- ]), at = w(() => [
773
- ...po
774
781
  ]), lt = w(() => [
775
- ...go
782
+ ...po
776
783
  ]), st = w(() => [
784
+ ...go
785
+ ]), it = w(() => [
777
786
  "tiptap-editor-v3",
778
787
  ...ho
779
788
  ]);
780
789
  return {
781
- root: g,
790
+ root: h,
782
791
  rootStyles: nt,
783
792
  toolbarRef: l,
784
- toolbarStyles: at,
785
- toolbarGroupStyles: lt,
786
- controlRef: i,
787
- controlStyles: st,
793
+ toolbarStyles: lt,
794
+ toolbarGroupStyles: st,
795
+ controlRef: s,
796
+ controlStyles: it,
788
797
  editor: t,
789
798
  containerRef: k,
790
799
  toolbarButtonRef: W,
@@ -792,84 +801,84 @@ const Ho = Ft({
792
801
  textareaRef: L,
793
802
  morePopoverRef: U,
794
803
  menuRef: G,
795
- handleToolbarClick: tt,
796
- handleEditorClick: xe,
804
+ handleToolbarClick: ot,
805
+ handleEditorClick: _e,
797
806
  isActive: B,
798
- getRichTextEditorIcon: Xe,
799
- getRichTextEditorTooltipIcon: Ye,
800
- getIndexOfHeading: Qe,
807
+ getRichTextEditorIcon: Ye,
808
+ getRichTextEditorTooltipIcon: Ze,
809
+ getIndexOfHeading: Xe,
801
810
  headingLevels: A,
802
- headingIcon: Ze,
803
- attachLink: ot,
804
- discardLink: rt,
805
- isOpenLinkModal: s,
811
+ headingIcon: xe,
812
+ attachLink: rt,
813
+ discardLink: at,
814
+ isOpenLinkModal: H,
806
815
  text: d,
807
- link: b,
816
+ link: v,
808
817
  isFocused: y,
809
- isVisible: _e,
810
- isMobile: ge,
811
- countOfNotVisibleTools: se,
812
- notVisibleTools: ie,
813
- handleInput: et,
814
- model: E,
815
- disableMarkdown: N,
816
- sourceValue: pe,
818
+ isVisible: et,
819
+ isMobile: ke,
820
+ countOfNotVisibleTools: ce,
821
+ notVisibleTools: de,
822
+ handleInput: tt,
823
+ model: F,
824
+ disableMarkdown: i,
825
+ sourceValue: be,
817
826
  activeHeadingLevel: P
818
827
  };
819
828
  }
820
829
  }), Ro = ["disabled"], No = ["disabled"], Vo = {
821
- class: /* @__PURE__ */ R(["p-sm", "overflow-auto", "min-h-[88px]", "h-full"])
830
+ class: /* @__PURE__ */ V(["p-sm", "overflow-auto", "min-h-[88px]", "h-full"])
822
831
  }, $o = ["activated"], Io = { class: "flex p-sm gap-md" }, Eo = {
823
- class: /* @__PURE__ */ R(["layout-column", "gap-md"])
832
+ class: /* @__PURE__ */ V(["layout-column", "gap-md"])
824
833
  }, Fo = {
825
- class: /* @__PURE__ */ R(["layout-row-reverse", "gap-md"])
834
+ class: /* @__PURE__ */ V(["layout-row-reverse", "gap-md"])
826
835
  };
827
- function qo(e, o, t, i, l, g) {
828
- 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"), I = O("OrModal");
829
- return f(), F("div", {
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");
838
+ return f(), q("div", {
830
839
  ref: "root",
831
- class: R(e.rootStyles)
840
+ class: V(e.rootStyles)
832
841
  }, [
833
- e.$slots.label || e.$slots.addon || e.label ? (f(), H(L, {
842
+ e.$slots.label || e.$slots.addon || e.label ? (f(), N(L, {
834
843
  key: 0,
835
844
  variant: "input",
836
845
  required: e.required,
837
846
  disabled: e.disabled
838
847
  }, {
839
- addon: v(() => [
840
- ee(e.$slots, "addon", {}, void 0, !0)
848
+ addon: b(() => [
849
+ re(e.$slots, "addon", {}, void 0, !0)
841
850
  ]),
842
- default: v(() => [
843
- ee(e.$slots, "label", {}, () => [
844
- V(te(e.label), 1)
851
+ default: b(() => [
852
+ re(e.$slots, "label", {}, () => [
853
+ $(ae(e.label), 1)
845
854
  ], !0)
846
855
  ]),
847
856
  _: 3
848
857
  }, 8, ["required", "disabled"])) : T("", !0),
849
- $(D, {
858
+ I(D, {
850
859
  ref: "containerRef",
851
860
  class: "grow",
852
861
  direction: "column",
853
862
  invalid: !!e.error,
854
863
  disabled: e.disabled,
855
- onClick: o[4] || (o[4] = (s) => e.handleEditorClick())
864
+ onClick: o[4] || (o[4] = (i) => e.handleEditorClick())
856
865
  }, {
857
- default: v(() => [
858
- q("div", {
866
+ default: b(() => [
867
+ z("div", {
859
868
  ref: "toolbarRef",
860
- class: R(e.toolbarStyles),
869
+ class: V(e.toolbarStyles),
861
870
  disabled: e.disabled || !e.isFocused
862
871
  }, [
863
- (f(!0), F(oe, null, re(e.toolbar, (s, N) => (f(), F("div", {
864
- key: N,
865
- class: R([...e.toolbarGroupStyles, { hidden: !e.isVisible(s) }]),
872
+ (f(!0), q(ne, null, le(e.toolbar, (i, H) => (f(), q("div", {
873
+ key: H,
874
+ class: V([...e.toolbarGroupStyles, { hidden: !e.isVisible(i) }]),
866
875
  disabled: e.disabled || !e.isFocused
867
876
  }, [
868
- (f(!0), F(oe, null, re(s, (d) => (f(), F("div", {
877
+ (f(!0), q(ne, null, le(i, (d) => (f(), q("div", {
869
878
  key: d,
870
- class: R(["flex gap-md", { hidden: !e.isVisible(d) }])
879
+ class: V(["flex gap-md", { hidden: !e.isVisible(d) }])
871
880
  }, [
872
- d === "heading" ? (f(), H(k, {
881
+ d === "heading" ? (f(), N(k, {
873
882
  key: 0,
874
883
  ref_for: !0,
875
884
  ref: "toolbarButtonRef",
@@ -877,158 +886,158 @@ function qo(e, o, t, i, l, g) {
877
886
  tooltip: { content: d, placement: "top" },
878
887
  selected: e.isActive[d],
879
888
  disabled: e.disabled || !e.isFocused,
880
- onClick: o[0] || (o[0] = (b) => e.menuRef && e.menuRef.toggle())
881
- }, null, 8, ["icon", "tooltip", "selected", "disabled"])) : e.isVisible(d) ? (f(), H(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, {
882
891
  key: 1,
883
892
  icon: { icon: e.getRichTextEditorIcon(d), variant: "inherit" },
884
893
  tooltip: { content: e.getRichTextEditorTooltipIcon(d), placement: "top" },
885
894
  selected: e.isActive[d],
886
895
  disabled: e.disabled || !e.isFocused,
887
- onClick: (b) => e.handleToolbarClick(d)
896
+ onClick: (v) => e.handleToolbarClick(d)
888
897
  }, null, 8, ["icon", "tooltip", "selected", "disabled", "onClick"])) : T("", !0)
889
898
  ], 2))), 128))
890
899
  ], 10, No))), 128)),
891
- e.countOfNotVisibleTools > 0 && !e.isMobile ? (f(), H(k, {
900
+ e.countOfNotVisibleTools > 0 && !e.isMobile ? (f(), N(k, {
892
901
  key: 0,
893
902
  ref: "moreButtonRef",
894
- class: R(["mx-sm"]),
903
+ class: V(["mx-sm"]),
895
904
  icon: { icon: "more_horiz", variant: "inherit" },
896
905
  disabled: e.disabled || !e.isFocused,
897
906
  "force-state": e.morePopoverRef && e.morePopoverRef.state === "open" ? "hover" : void 0,
898
- onClick: o[1] || (o[1] = (s) => e.morePopoverRef && e.morePopoverRef.open())
907
+ onClick: o[1] || (o[1] = (i) => e.morePopoverRef && e.morePopoverRef.open())
899
908
  }, null, 8, ["disabled", "force-state"])) : T("", !0)
900
909
  ], 10, Ro),
901
- q("div", Vo, [
902
- ne(q("textarea", {
910
+ z("div", Vo, [
911
+ se(z("textarea", {
903
912
  ref: "textareaRef",
904
- "onUpdate:modelValue": o[2] || (o[2] = (s) => e.sourceValue = s),
913
+ "onUpdate:modelValue": o[2] || (o[2] = (i) => e.sourceValue = i),
905
914
  activated: e.disableMarkdown,
906
915
  class: "block w-full h-full resize-none border-none outline-none bg-transparent typography-body-2-regular",
907
- onInput: o[3] || (o[3] = (...s) => e.handleInput && e.handleInput(...s))
916
+ onInput: o[3] || (o[3] = (...i) => e.handleInput && e.handleInput(...i))
908
917
  }, null, 40, $o), [
909
- [ae, e.disableMarkdown],
918
+ [ie, e.disableMarkdown],
910
919
  [Wt, e.sourceValue]
911
920
  ]),
912
- ne(q("div", {
921
+ se(z("div", {
913
922
  ref: "controlRef",
914
- class: R(e.controlStyles)
923
+ class: V(e.controlStyles)
915
924
  }, null, 2), [
916
- [ae, !e.disableMarkdown]
925
+ [ie, !e.disableMarkdown]
917
926
  ]),
918
- ee(e.$slots, "files", {}, void 0, !0)
927
+ re(e.$slots, "files", {}, void 0, !0)
919
928
  ])
920
929
  ]),
921
930
  _: 3
922
931
  }, 8, ["invalid", "disabled"]),
923
- e.$slots.hint || e.hint ? ne((f(), H(U, {
932
+ e.$slots.hint || e.hint ? se((f(), N(U, {
924
933
  key: 1,
925
934
  disabled: e.disabled
926
935
  }, {
927
- default: v(() => [
928
- ee(e.$slots, "hint", {}, () => [
929
- V(te(e.hint), 1)
936
+ default: b(() => [
937
+ re(e.$slots, "hint", {}, () => [
938
+ $(ae(e.hint), 1)
930
939
  ], !0)
931
940
  ]),
932
941
  _: 3
933
942
  }, 8, ["disabled"])), [
934
- [ae, !e.error]
943
+ [ie, !e.error]
935
944
  ]) : T("", !0),
936
- ne($(W, { disabled: e.disabled }, {
937
- default: v(() => [
938
- V(te(e.error), 1)
945
+ se(I(W, { disabled: e.disabled }, {
946
+ default: b(() => [
947
+ $(ae(e.error), 1)
939
948
  ]),
940
949
  _: 1
941
950
  }, 8, ["disabled"]), [
942
- [ae, typeof e.error == "string" && e.error.length > 0]
951
+ [ie, typeof e.error == "string" && e.error.length > 0]
943
952
  ]),
944
- e.moreButtonRef ? (f(), H(G, {
953
+ e.moreButtonRef ? (f(), N(G, {
945
954
  key: 2,
946
955
  ref: "morePopoverRef",
947
956
  trigger: e.moreButtonRef && e.moreButtonRef.root,
948
957
  placement: "top-end"
949
958
  }, {
950
- default: v(() => [
951
- q("div", Io, [
952
- (f(!0), F(oe, null, re(e.notVisibleTools, (s) => (f(), H(k, {
953
- key: s,
954
- icon: { icon: e.getRichTextEditorIcon(s), variant: "inherit" },
955
- tooltip: { content: e.getRichTextEditorTooltipIcon(s), placement: "top" },
956
- selected: e.isActive[s],
957
- onClick: (N) => e.handleToolbarClick(s)
959
+ default: b(() => [
960
+ z("div", Io, [
961
+ (f(!0), q(ne, null, le(e.notVisibleTools, (i) => (f(), N(k, {
962
+ key: i,
963
+ icon: { icon: e.getRichTextEditorIcon(i), variant: "inherit" },
964
+ tooltip: { content: e.getRichTextEditorTooltipIcon(i), placement: "top" },
965
+ selected: e.isActive[i],
966
+ onClick: (H) => e.handleToolbarClick(i)
958
967
  }, null, 8, ["icon", "tooltip", "selected", "onClick"]))), 128))
959
968
  ])
960
969
  ]),
961
970
  _: 1
962
971
  }, 8, ["trigger"])) : T("", !0),
963
- e.toolbarButtonRef ? (f(), H(y, {
972
+ e.toolbarButtonRef ? (f(), N(y, {
964
973
  key: 3,
965
974
  ref: "menuRef",
966
975
  trigger: e.toolbarButtonRef[e.getIndexOfHeading] && e.toolbarButtonRef[e.getIndexOfHeading].root,
967
976
  placement: "bottom-start"
968
977
  }, {
969
- default: v(() => [
970
- (f(!0), F(oe, null, re(e.headingLevels, (s) => (f(), H(B, {
971
- key: s,
972
- selected: e.activeHeadingLevel === s,
973
- onClick: (N) => e.handleToolbarClick("heading", s)
978
+ default: b(() => [
979
+ (f(!0), q(ne, null, le(e.headingLevels, (i) => (f(), N(B, {
980
+ key: i,
981
+ selected: e.activeHeadingLevel === i,
982
+ onClick: (H) => e.handleToolbarClick("heading", i)
974
983
  }, {
975
- default: v(() => [
976
- V(" Heading " + te(s), 1)
984
+ default: b(() => [
985
+ $(" Heading " + ae(i), 1)
977
986
  ]),
978
987
  _: 2
979
988
  }, 1032, ["selected", "onClick"]))), 128)),
980
- $(B, {
989
+ I(B, {
981
990
  selected: !e.activeHeadingLevel,
982
- onClick: o[5] || (o[5] = (s) => e.handleToolbarClick("heading"))
991
+ onClick: o[5] || (o[5] = (i) => e.handleToolbarClick("heading"))
983
992
  }, {
984
- default: v(() => [
985
- V(" None ")
993
+ default: b(() => [
994
+ $(" None ")
986
995
  ]),
987
996
  _: 1
988
997
  }, 8, ["selected"])
989
998
  ]),
990
999
  _: 1
991
1000
  }, 8, ["trigger"])) : T("", !0),
992
- $(I, {
1001
+ I(E, {
993
1002
  "is-open": e.isOpenLinkModal,
994
1003
  size: "s"
995
1004
  }, {
996
- header: v(() => [
997
- V(" Add Link ")
1005
+ header: b(() => [
1006
+ $(" Add Link ")
998
1007
  ]),
999
- footer: v(() => [
1000
- q("div", Fo, [
1001
- $(P, {
1008
+ footer: b(() => [
1009
+ z("div", Fo, [
1010
+ I(P, {
1002
1011
  variant: "contained",
1003
- onClick: o[8] || (o[8] = (s) => e.attachLink())
1012
+ onClick: o[8] || (o[8] = (i) => e.attachLink())
1004
1013
  }, {
1005
- default: v(() => [
1006
- V(" Save ")
1014
+ default: b(() => [
1015
+ $(" Save ")
1007
1016
  ]),
1008
1017
  _: 1
1009
1018
  }),
1010
- $(P, {
1019
+ I(P, {
1011
1020
  variant: "outlined",
1012
- onClick: o[9] || (o[9] = (s) => e.discardLink())
1021
+ onClick: o[9] || (o[9] = (i) => e.discardLink())
1013
1022
  }, {
1014
- default: v(() => [
1015
- V(" Cancel ")
1023
+ default: b(() => [
1024
+ $(" Cancel ")
1016
1025
  ]),
1017
1026
  _: 1
1018
1027
  })
1019
1028
  ])
1020
1029
  ]),
1021
- default: v(() => [
1022
- q("div", Eo, [
1023
- $(A, {
1030
+ default: b(() => [
1031
+ z("div", Eo, [
1032
+ I(A, {
1024
1033
  modelValue: e.text,
1025
- "onUpdate:modelValue": o[6] || (o[6] = (s) => e.text = s),
1034
+ "onUpdate:modelValue": o[6] || (o[6] = (i) => e.text = i),
1026
1035
  label: "Text",
1027
1036
  placeholder: "Enter text"
1028
1037
  }, null, 8, ["modelValue"]),
1029
- $(A, {
1038
+ I(A, {
1030
1039
  modelValue: e.link,
1031
- "onUpdate:modelValue": o[7] || (o[7] = (s) => e.link = s),
1040
+ "onUpdate:modelValue": o[7] || (o[7] = (i) => e.link = i),
1032
1041
  label: "Link",
1033
1042
  placeholder: "Enter link"
1034
1043
  }, null, 8, ["modelValue"])
@@ -1038,11 +1047,11 @@ function qo(e, o, t, i, l, g) {
1038
1047
  }, 8, ["is-open"])
1039
1048
  ], 2);
1040
1049
  }
1041
- const Rr = /* @__PURE__ */ mo(Ho, [["render", qo], ["__scopeId", "data-v-f034427c"]]);
1050
+ const Rr = /* @__PURE__ */ mo(Ho, [["render", qo], ["__scopeId", "data-v-1222a307"]]);
1042
1051
  export {
1043
- Je as F,
1052
+ je as F,
1044
1053
  Rr as O,
1045
- je as R,
1046
- Ke as a
1054
+ Ke as R,
1055
+ Qe as a
1047
1056
  };
1048
- //# sourceMappingURL=OrRichTextEditor-B_uVsae1.mjs.map
1057
+ //# sourceMappingURL=OrRichTextEditor-DKhL46g9.mjs.map