@dialpad/dialtone 9.174.0 → 9.175.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.
@@ -2,7 +2,7 @@ import { nodeViewProps as pt, NodeViewWrapper as mt, VueRenderer as Fe, VueNodeV
2
2
  import { isTextSelection as qe, posToDOMRect as ae, getText as Xe, getTextSerializersFromSchema as Ye, mergeAttributes as st, Node as le, nodePasteRule as St, InputRule as Ge, getMarksBetween as Je, combineTransactionSteps as Ze, getChangedRanges as Qe, findChildrenInRange as tn, Mark as en, nodeInputRule as nn, Extension as on } from "@tiptap/core";
3
3
  import { Plugin as It, PluginKey as at, NodeSelection as sn } from "@tiptap/pm/state";
4
4
  import { CellSelection as rn } from "@tiptap/pm/tables";
5
- import { defineComponent as ce, ref as de, onMounted as ue, nextTick as an, onBeforeUnmount as he, h as fe, resolveComponent as T, openBlock as _, createBlock as A, withCtx as C, createVNode as M, createElementBlock as nt, withDirectives as ln, createElementVNode as ot, Fragment as cn, renderList as dn, withModifiers as Dt, normalizeClass as pe, resolveDynamicComponent as un, vShow as hn, markRaw as fn, createTextVNode as lt, toDisplayString as $, createCommentVNode as rt, withKeys as pn, mergeProps as me } from "vue";
5
+ import { defineComponent as ce, ref as de, onMounted as ue, nextTick as an, onBeforeUnmount as he, h as fe, resolveComponent as T, openBlock as _, createBlock as A, withCtx as C, createVNode as M, createElementBlock as et, withDirectives as ln, createElementVNode as nt, Fragment as cn, renderList as dn, withModifiers as Dt, normalizeClass as pe, resolveDynamicComponent as un, vShow as hn, markRaw as fn, createTextVNode as lt, toDisplayString as $, createCommentVNode as rt, withKeys as pn, mergeProps as me } from "vue";
6
6
  import mn from "@tiptap/extension-blockquote";
7
7
  import gn from "@tiptap/extension-code-block";
8
8
  import yn from "@tiptap/extension-code";
@@ -1650,37 +1650,44 @@ ce({
1650
1650
  };
1651
1651
  }
1652
1652
  });
1653
- const et = (t) => ({
1653
+ const ot = (t) => ({
1654
1654
  default: null,
1655
1655
  parseHTML: (e) => e.getAttribute(t),
1656
1656
  renderHTML: (e) => e[t] ? { [t]: e[t] } : {}
1657
- }), si = Rn.extend({
1657
+ }), si = () => {
1658
+ let t = ot("style");
1659
+ return t.renderHTML = (e) => e.style ? { style: ri(e.style) } : {}, t;
1660
+ };
1661
+ function ri(t) {
1662
+ return t.replace(new RegExp("(?<![a-z-])width\\s*:\\s*([^;]+);?", "gi"), (e, o) => /^\s*0\s*[a-z%]*\s*(!important)?\s*$/i.test(o) ? "width: 100%;" : e);
1663
+ }
1664
+ const ai = Rn.extend({
1658
1665
  addAttributes() {
1659
1666
  var t;
1660
1667
  return {
1661
1668
  ...(t = this.parent) == null ? void 0 : t.call(this),
1662
- border: et("border"),
1663
- cellpadding: et("cellpadding"),
1664
- cellspacing: et("cellspacing"),
1665
- style: et("style")
1669
+ border: ot("border"),
1670
+ cellpadding: ot("cellpadding"),
1671
+ cellspacing: ot("cellspacing"),
1672
+ style: si()
1666
1673
  };
1667
1674
  },
1668
1675
  renderHTML({ HTMLAttributes: t }) {
1669
1676
  return ["table", st(this.options.HTMLAttributes, t), ["tbody", 0]];
1670
1677
  }
1671
- }), ri = Mn.extend({
1678
+ }), li = Mn.extend({
1672
1679
  addAttributes() {
1673
1680
  var t;
1674
1681
  return {
1675
1682
  ...(t = this.parent) == null ? void 0 : t.call(this),
1676
- style: et("style")
1683
+ style: ot("style")
1677
1684
  };
1678
1685
  }
1679
1686
  }), Ue = {
1680
- style: et("style"),
1681
- valign: et("valign"),
1682
- width: et("width")
1683
- }, ai = $n.extend({
1687
+ style: ot("style"),
1688
+ valign: ot("valign"),
1689
+ width: ot("width")
1690
+ }, ci = $n.extend({
1684
1691
  addAttributes() {
1685
1692
  var t;
1686
1693
  return {
@@ -1688,7 +1695,7 @@ const et = (t) => ({
1688
1695
  ...Ue
1689
1696
  };
1690
1697
  }
1691
- }), li = Hn.extend({
1698
+ }), di = Hn.extend({
1692
1699
  addAttributes() {
1693
1700
  var t;
1694
1701
  return {
@@ -1696,7 +1703,7 @@ const et = (t) => ({
1696
1703
  ...Ue
1697
1704
  };
1698
1705
  }
1699
- }), ci = Bn.extend({
1706
+ }), ui = Bn.extend({
1700
1707
  parseHTML() {
1701
1708
  var t;
1702
1709
  return [
@@ -1713,7 +1720,7 @@ const et = (t) => ({
1713
1720
  }
1714
1721
  ];
1715
1722
  }
1716
- }), di = {
1723
+ }), hi = {
1717
1724
  compatConfig: { MODE: 3 },
1718
1725
  name: "EmojiComponent",
1719
1726
  components: {
@@ -1722,7 +1729,7 @@ const et = (t) => ({
1722
1729
  },
1723
1730
  props: pt
1724
1731
  };
1725
- function ui(t, e, o, n, i, s) {
1732
+ function fi(t, e, o, n, i, s) {
1726
1733
  const r = T("dt-emoji"), a = T("node-view-wrapper");
1727
1734
  return _(), A(a, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
1728
1735
  default: C(() => [
@@ -1734,7 +1741,7 @@ function ui(t, e, o, n, i, s) {
1734
1741
  _: 1
1735
1742
  });
1736
1743
  }
1737
- const hi = /* @__PURE__ */ q(di, [["render", ui]]), fi = {
1744
+ const pi = /* @__PURE__ */ q(hi, [["render", fi]]), mi = {
1738
1745
  compatConfig: { MODE: 3 },
1739
1746
  name: "SuggestionList",
1740
1747
  components: {
@@ -1807,15 +1814,15 @@ const hi = /* @__PURE__ */ q(di, [["render", ui]]), fi = {
1807
1814
  }
1808
1815
  }
1809
1816
  }
1810
- }, pi = { class: "d-popover__dialog d-suggestion-list__container" }, mi = {
1817
+ }, gi = { class: "d-popover__dialog d-suggestion-list__container" }, yi = {
1811
1818
  ref: "suggestionList",
1812
1819
  class: "d-suggestion-list"
1813
1820
  };
1814
- function gi(t, e, o, n, i, s) {
1821
+ function wi(t, e, o, n, i, s) {
1815
1822
  const r = T("dt-list-item");
1816
- return _(), nt("div", pi, [
1817
- ln(ot("ul", mi, [
1818
- (_(!0), nt(cn, null, dn(o.items, (a, l) => (_(), A(r, {
1823
+ return _(), et("div", gi, [
1824
+ ln(nt("ul", yi, [
1825
+ (_(!0), et(cn, null, dn(o.items, (a, l) => (_(), A(r, {
1819
1826
  key: a.id,
1820
1827
  class: pe([
1821
1828
  "d-suggestion-list__item",
@@ -1835,8 +1842,8 @@ function gi(t, e, o, n, i, s) {
1835
1842
  ])
1836
1843
  ]);
1837
1844
  }
1838
- const yi = /* @__PURE__ */ q(fi, [["render", gi]]), Ve = "top-start", je = "650";
1839
- function wi() {
1845
+ const bi = /* @__PURE__ */ q(mi, [["render", wi]]), Ve = "top-start", je = "650";
1846
+ function vi() {
1840
1847
  return {
1841
1848
  getBoundingClientRect: () => ({
1842
1849
  width: 0,
@@ -1853,7 +1860,7 @@ function wi() {
1853
1860
  function ie(t) {
1854
1861
  return { getBoundingClientRect: t };
1855
1862
  }
1856
- async function bi(t, e, o = {}) {
1863
+ async function xi(t, e, o = {}) {
1857
1864
  if (!t || !(e != null && e.getBoundingClientRect)) return;
1858
1865
  const {
1859
1866
  placement: n = Ve,
@@ -1867,28 +1874,28 @@ async function bi(t, e, o = {}) {
1867
1874
  top: `${r}px`
1868
1875
  });
1869
1876
  }
1870
- function vi(t, e = {}) {
1877
+ function Ti(t, e = {}) {
1871
1878
  const { zIndex: o = je } = e;
1872
1879
  t.style.position = "absolute", t.style.zIndex = o, t.style.display = "none";
1873
1880
  }
1874
- function xi(t) {
1881
+ function _i(t) {
1875
1882
  t && (t.style.display = "block");
1876
1883
  }
1877
- function Ti(t) {
1884
+ function ki(t) {
1878
1885
  t && (t.style.display = "none");
1879
1886
  }
1880
- function _i(t, e) {
1887
+ function Ci(t, e) {
1881
1888
  return (o) => {
1882
1889
  o.key === "Escape" && e() && t();
1883
1890
  };
1884
1891
  }
1885
- function ki(t) {
1892
+ function Oi(t) {
1886
1893
  document.addEventListener("keydown", t);
1887
1894
  }
1888
- function Ci(t) {
1895
+ function Ei(t) {
1889
1896
  document.removeEventListener("keydown", t);
1890
1897
  }
1891
- function Oi(t, e, o, n) {
1898
+ function Si(t, e, o, n) {
1892
1899
  return new Fe(t, {
1893
1900
  props: {
1894
1901
  itemComponent: fn(e),
@@ -1898,30 +1905,30 @@ function Oi(t, e, o, n) {
1898
1905
  editor: n.editor
1899
1906
  });
1900
1907
  }
1901
- function Ei(t) {
1908
+ function Li(t) {
1902
1909
  var e, o;
1903
- t.escHandler && Ci(t.escHandler), (e = t.floatingEl) == null || e.remove(), (o = t.component) == null || o.destroy();
1910
+ t.escHandler && Ei(t.escHandler), (e = t.floatingEl) == null || e.remove(), (o = t.component) == null || o.destroy();
1904
1911
  }
1905
1912
  function Ot(t, e, o = {}) {
1906
1913
  const {
1907
- listComponent: n = yi,
1914
+ listComponent: n = bi,
1908
1915
  placement: i = Ve,
1909
1916
  zIndex: s = je
1910
1917
  } = o;
1911
1918
  return () => {
1912
- let r = null, a = null, l = !1, u = wi(), d = null;
1919
+ let r = null, a = null, l = !1, u = vi(), d = null;
1913
1920
  function c() {
1914
- bi(a, u, { placement: i });
1921
+ xi(a, u, { placement: i });
1915
1922
  }
1916
1923
  function h() {
1917
- a && (xi(a), l = !0, c());
1924
+ a && (_i(a), l = !0, c());
1918
1925
  }
1919
1926
  function f() {
1920
- a && (Ti(a), l = !1);
1927
+ a && (ki(a), l = !1);
1921
1928
  }
1922
1929
  return {
1923
1930
  onStart: (p) => {
1924
- r = Oi(n, t, e, p), p.clientRect && (a = r.element, vi(a, { zIndex: s }), document.body.appendChild(a), u = ie(p.clientRect), d = _i(f, () => l), ki(d), p.items.length > 0 && h());
1931
+ r = Si(n, t, e, p), p.clientRect && (a = r.element, Ti(a, { zIndex: s }), document.body.appendChild(a), u = ie(p.clientRect), d = Ci(f, () => l), Oi(d), p.items.length > 0 && h());
1925
1932
  },
1926
1933
  onUpdate(p) {
1927
1934
  r == null || r.updateProps(p), p.items.length > 0 ? h() : f(), p.clientRect && (u = ie(p.clientRect), c());
@@ -1932,12 +1939,12 @@ function Ot(t, e, o = {}) {
1932
1939
  return (m = r == null ? void 0 : r.ref) == null ? void 0 : m.onKeyDown(p);
1933
1940
  },
1934
1941
  onExit() {
1935
- Ei({ escHandler: d, floatingEl: a, component: r }), d = null, a = null, r = null;
1942
+ Li({ escHandler: d, floatingEl: a, component: r }), d = null, a = null, r = null;
1936
1943
  }
1937
1944
  };
1938
1945
  };
1939
1946
  }
1940
- const Si = {
1947
+ const Ai = {
1941
1948
  compatConfig: { MODE: 3 },
1942
1949
  name: "EmojiSuggestion",
1943
1950
  components: {
@@ -1951,7 +1958,7 @@ const Si = {
1951
1958
  }
1952
1959
  }
1953
1960
  };
1954
- function Li(t, e, o, n, i, s) {
1961
+ function Ii(t, e, o, n, i, s) {
1955
1962
  const r = T("dt-emoji"), a = T("dt-stack");
1956
1963
  return _(), A(a, {
1957
1964
  direction: "row",
@@ -1967,11 +1974,11 @@ function Li(t, e, o, n, i, s) {
1967
1974
  _: 1
1968
1975
  });
1969
1976
  }
1970
- const Ai = /* @__PURE__ */ q(Si, [["render", Li]]), Ii = 20, Di = (t, e, o) => {
1977
+ const Di = /* @__PURE__ */ q(Ai, [["render", Ii]]), Ri = 20, Mi = (t, e, o) => {
1971
1978
  var a, l;
1972
1979
  const n = (a = t.shortname) == null ? void 0 : a.replaceAll(":", ""), i = (l = e.shortname) == null ? void 0 : l.replaceAll(":", ""), s = n.startsWith(o), r = i.startsWith(o);
1973
1980
  return s && !r ? -1 : !s && r ? 1 : n.localeCompare(i);
1974
- }, Ri = {
1981
+ }, Hi = {
1975
1982
  items: ({ query: t }) => {
1976
1983
  if (t.length < 2)
1977
1984
  return [];
@@ -1985,7 +1992,7 @@ const Ai = /* @__PURE__ */ q(Si, [["render", Li]]), Ii = 20, Di = (t, e, o) => {
1985
1992
  ...n.keywords || []
1986
1993
  ].some((s) => s && s.startsWith(t));
1987
1994
  }
1988
- ).splice(0, Ii).sort((n, i) => Di(n, i, t)).map((n) => ({ code: n.shortname }));
1995
+ ).splice(0, Ri).sort((n, i) => Mi(n, i, t)).map((n) => ({ code: n.shortname }));
1989
1996
  },
1990
1997
  command: ({ editor: t, range: e, props: o }) => {
1991
1998
  var s, r;
@@ -1997,15 +2004,15 @@ const Ai = /* @__PURE__ */ q(Si, [["render", Li]]), Ii = 20, Di = (t, e, o) => {
1997
2004
  }
1998
2005
  ]).run(), (r = window.getSelection()) == null || r.collapseToEnd();
1999
2006
  },
2000
- render: Ot(Ai, "emoji")
2001
- }, Mi = /(:\w+:)$/, Hi = new RegExp(ye + "$"), $i = (t) => {
2007
+ render: Ot(Di, "emoji")
2008
+ }, $i = /(:\w+:)$/, Bi = new RegExp(ye + "$"), Ni = (t) => {
2002
2009
  if (t && Rt(t[0]))
2003
2010
  return { text: t[2] || t[0] };
2004
- }, Bi = (t) => [...t.matchAll(zn)].filter((o) => Rt(o[0])).map((o) => ({
2011
+ }, Pi = (t) => [...t.matchAll(zn)].filter((o) => Rt(o[0])).map((o) => ({
2005
2012
  index: o.index,
2006
2013
  text: o[0],
2007
2014
  match: o
2008
- })), Ni = le.create({
2015
+ })), Ui = le.create({
2009
2016
  name: "emoji",
2010
2017
  addOptions() {
2011
2018
  return {
@@ -2017,7 +2024,7 @@ const Ai = /* @__PURE__ */ q(Si, [["render", Li]]), Ii = 20, Di = (t, e, o) => {
2017
2024
  selectable: !1,
2018
2025
  atom: !0,
2019
2026
  addNodeView() {
2020
- return gt(hi);
2027
+ return gt(pi);
2021
2028
  },
2022
2029
  addAttributes() {
2023
2030
  return {
@@ -2043,9 +2050,9 @@ const Ai = /* @__PURE__ */ q(Si, [["render", Li]]), Ii = 20, Di = (t, e, o) => {
2043
2050
  return [
2044
2051
  new Ge({
2045
2052
  find: (t) => {
2046
- const e = t.match(Mi) || t.match(Hi);
2053
+ const e = t.match($i) || t.match(Bi);
2047
2054
  if (e)
2048
- return $i(e);
2055
+ return Ni(e);
2049
2056
  },
2050
2057
  handler: ({ state: t, range: e, match: o }) => {
2051
2058
  const { tr: n } = t, i = e.from, s = e.to;
@@ -2057,7 +2064,7 @@ const Ai = /* @__PURE__ */ q(Si, [["render", Li]]), Ii = 20, Di = (t, e, o) => {
2057
2064
  addPasteRules() {
2058
2065
  return [
2059
2066
  St({
2060
- find: Bi,
2067
+ find: Pi,
2061
2068
  type: this.type,
2062
2069
  getAttributes(t) {
2063
2070
  return {
@@ -2083,7 +2090,7 @@ const Ai = /* @__PURE__ */ q(Si, [["render", Li]]), Ii = 20, Di = (t, e, o) => {
2083
2090
  pluginKey: new at("emoji"),
2084
2091
  editor: this.editor,
2085
2092
  ...this.options.suggestion,
2086
- ...Ri
2093
+ ...Hi
2087
2094
  })
2088
2095
  ];
2089
2096
  },
@@ -2100,7 +2107,7 @@ const Ai = /* @__PURE__ */ q(Si, [["render", Li]]), Ii = 20, Di = (t, e, o) => {
2100
2107
  };
2101
2108
  }
2102
2109
  });
2103
- function Pi(t, e, o = () => !0) {
2110
+ function Vi(t, e, o = () => !0) {
2104
2111
  const n = [];
2105
2112
  e.lastIndex = 0;
2106
2113
  let i;
@@ -2108,10 +2115,10 @@ function Pi(t, e, o = () => !0) {
2108
2115
  o(t, i) && n.push(i);
2109
2116
  return n;
2110
2117
  }
2111
- function Ui(t, e) {
2118
+ function ji(t, e) {
2112
2119
  return !["#", "@"].includes(t.charAt(e.index)) && !["#", "@"].includes(t.charAt(e.index - 1));
2113
2120
  }
2114
- function Vi(t) {
2121
+ function zi(t) {
2115
2122
  const e = new RegExp(
2116
2123
  "(?:" + [
2117
2124
  `[!?.,:;'"]`,
@@ -2121,7 +2128,7 @@ function Vi(t) {
2121
2128
  );
2122
2129
  return t.replace(e, "");
2123
2130
  }
2124
- function ji(t, e) {
2131
+ function Fi(t, e) {
2125
2132
  const o = t.slice(0, e + 1).search(/\S+\s*$/), n = t.slice(e).search(/\s/);
2126
2133
  if (n < 0) {
2127
2134
  const i = t.slice(o);
@@ -2138,13 +2145,13 @@ function ji(t, e) {
2138
2145
  };
2139
2146
  }
2140
2147
  function At(t, e, o, n) {
2141
- const i = ji(t, e);
2148
+ const i = Fi(t, e);
2142
2149
  if (n.lastIndex = 0, !n.test(i.text))
2143
2150
  return i;
2144
2151
  const s = o === "left" ? i.from - 1 : i.to + 1;
2145
2152
  return s <= 0 || s >= t.length || s === e ? i : At(t, s, o, n);
2146
2153
  }
2147
- function zi(t, e, o, n) {
2154
+ function Ki(t, e, o, n) {
2148
2155
  const i = Math.max(t.from - 1, 0), s = Math.min(t.to + 1, e.content.size), r = Je(i, s, e);
2149
2156
  for (const a of r)
2150
2157
  a.mark.type === n && o.removeMark(a.from, a.to, n);
@@ -2166,12 +2173,12 @@ function re(t, e, o, n, i, s) {
2166
2173
  "right",
2167
2174
  se
2168
2175
  ), d = t.slice(l.from, u.to);
2169
- Pi(d, Kn, Ui).forEach((h) => {
2170
- const f = Vi(h[0]), p = e + l.from + h.index + 1, m = p + f.length;
2176
+ Vi(d, Kn, ji).forEach((h) => {
2177
+ const f = zi(h[0]), p = e + l.from + h.index + 1, m = p + f.length;
2171
2178
  i.addMark(p, m, s.create());
2172
2179
  });
2173
2180
  }
2174
- function Fi(t) {
2181
+ function Wi(t) {
2175
2182
  let e = !1;
2176
2183
  return new It({
2177
2184
  key: new at("autolink"),
@@ -2186,7 +2193,7 @@ function Fi(t) {
2186
2193
  [...o]
2187
2194
  );
2188
2195
  return Qe(l).forEach(({ oldRange: d, newRange: c }) => {
2189
- zi(c, i.doc, r, t.type), tn(
2196
+ Ki(c, i.doc, r, t.type), tn(
2190
2197
  i.doc,
2191
2198
  c,
2192
2199
  (f) => f.isTextblock
@@ -2204,10 +2211,10 @@ function Fi(t) {
2204
2211
  }
2205
2212
  });
2206
2213
  }
2207
- const Ki = {
2214
+ const qi = {
2208
2215
  class: "d-link d-c-text d-d-inline-block d-wb-break-all",
2209
2216
  rel: "noopener noreferrer nofollow"
2210
- }, Wi = en.create({
2217
+ }, Xi = en.create({
2211
2218
  name: "CustomLink",
2212
2219
  renderHTML({ HTMLAttributes: t }) {
2213
2220
  return [
@@ -2215,7 +2222,7 @@ const Ki = {
2215
2222
  st(
2216
2223
  this.options.HTMLAttributes,
2217
2224
  t,
2218
- Ki
2225
+ qi
2219
2226
  )
2220
2227
  ];
2221
2228
  },
@@ -2224,10 +2231,10 @@ const Ki = {
2224
2231
  },
2225
2232
  addProseMirrorPlugins() {
2226
2233
  return [
2227
- Fi({ type: this.type })
2234
+ Wi({ type: this.type })
2228
2235
  ];
2229
2236
  }
2230
- }), qi = Xn.extend({
2237
+ }), Yi = Xn.extend({
2231
2238
  name: "ConfigurableImage",
2232
2239
  addAttributes() {
2233
2240
  return {
@@ -2251,7 +2258,7 @@ const Ki = {
2251
2258
  }
2252
2259
  };
2253
2260
  }
2254
- }).configure({ inline: !0, allowBase64: !0 }), Xi = /* @__PURE__ */ new Set([
2261
+ }).configure({ inline: !0, allowBase64: !0 }), Gi = /* @__PURE__ */ new Set([
2255
2262
  "address",
2256
2263
  "article",
2257
2264
  "aside",
@@ -2285,13 +2292,13 @@ const Ki = {
2285
2292
  "section",
2286
2293
  "table",
2287
2294
  "ul"
2288
- ]), Yi = ge.extend({
2295
+ ]), Ji = ge.extend({
2289
2296
  parseHTML() {
2290
2297
  return [{
2291
2298
  tag: "div",
2292
2299
  getAttrs: (t) => {
2293
2300
  for (const e of t.children)
2294
- if (Xi.has(e.tagName.toLowerCase()))
2301
+ if (Gi.has(e.tagName.toLowerCase()))
2295
2302
  return !1;
2296
2303
  return null;
2297
2304
  }
@@ -2300,7 +2307,7 @@ const Ki = {
2300
2307
  renderHTML({ HTMLAttributes: t }) {
2301
2308
  return ["div", st(this.options.HTMLAttributes, t), 0];
2302
2309
  }
2303
- }), Gi = {
2310
+ }), Zi = {
2304
2311
  compatConfig: { MODE: 3 },
2305
2312
  name: "MentionComponent",
2306
2313
  components: {
@@ -2333,7 +2340,7 @@ const Ki = {
2333
2340
  }
2334
2341
  }
2335
2342
  };
2336
- function Ji(t, e, o, n, i, s) {
2343
+ function Qi(t, e, o, n, i, s) {
2337
2344
  const r = T("dt-link"), a = T("node-view-wrapper");
2338
2345
  return _(), A(a, { class: "d-d-inline-block" }, {
2339
2346
  default: C(() => [
@@ -2354,9 +2361,9 @@ function Ji(t, e, o, n, i, s) {
2354
2361
  _: 1
2355
2362
  });
2356
2363
  }
2357
- const Zi = /* @__PURE__ */ q(Gi, [["render", Ji]]), Qi = Mt.extend({
2364
+ const ts = /* @__PURE__ */ q(Zi, [["render", Qi]]), es = Mt.extend({
2358
2365
  addNodeView() {
2359
- return gt(Zi);
2366
+ return gt(ts);
2360
2367
  },
2361
2368
  parseHTML() {
2362
2369
  return [
@@ -2392,7 +2399,7 @@ const Zi = /* @__PURE__ */ q(Gi, [["render", Ji]]), Qi = Mt.extend({
2392
2399
  char: "@",
2393
2400
  pluginKey: new at("mentionSuggestion")
2394
2401
  }
2395
- }), ts = {
2402
+ }), ns = {
2396
2403
  compatConfig: { MODE: 3 },
2397
2404
  name: "ChannelComponent",
2398
2405
  components: {
@@ -2419,7 +2426,7 @@ const Zi = /* @__PURE__ */ q(Gi, [["render", Ji]]), Qi = Mt.extend({
2419
2426
  }
2420
2427
  }
2421
2428
  };
2422
- function es(t, e, o, n, i, s) {
2429
+ function os(t, e, o, n, i, s) {
2423
2430
  const r = T("dt-icon-lock"), a = T("dt-stack"), l = T("dt-link"), u = T("node-view-wrapper");
2424
2431
  return _(), A(u, { class: "d-d-inline-block" }, {
2425
2432
  default: C(() => [
@@ -2437,7 +2444,7 @@ function es(t, e, o, n, i, s) {
2437
2444
  key: 0,
2438
2445
  size: "200"
2439
2446
  })) : rt("", !0),
2440
- ot("span", null, $(s.text), 1)
2447
+ nt("span", null, $(s.text), 1)
2441
2448
  ]),
2442
2449
  _: 1
2443
2450
  })
@@ -2448,10 +2455,10 @@ function es(t, e, o, n, i, s) {
2448
2455
  _: 1
2449
2456
  });
2450
2457
  }
2451
- const ns = /* @__PURE__ */ q(ts, [["render", es]]), os = Mt.extend({
2458
+ const is = /* @__PURE__ */ q(ns, [["render", os]]), ss = Mt.extend({
2452
2459
  name: "channel",
2453
2460
  addNodeView() {
2454
- return gt(ns);
2461
+ return gt(is);
2455
2462
  },
2456
2463
  parseHTML() {
2457
2464
  return [
@@ -2487,7 +2494,7 @@ const ns = /* @__PURE__ */ q(ts, [["render", es]]), os = Mt.extend({
2487
2494
  char: "#",
2488
2495
  pluginKey: new at("channelSuggestion")
2489
2496
  }
2490
- }), is = {
2497
+ }), rs = {
2491
2498
  compatConfig: { MODE: 3 },
2492
2499
  name: "SlashCommandsComponent",
2493
2500
  components: {
@@ -2510,7 +2517,7 @@ const ns = /* @__PURE__ */ q(ts, [["render", es]]), os = Mt.extend({
2510
2517
  e && typeof e == "function" && e(t);
2511
2518
  }
2512
2519
  };
2513
- function ss(t, e, o, n, i, s) {
2520
+ function as(t, e, o, n, i, s) {
2514
2521
  const r = T("node-view-wrapper");
2515
2522
  return _(), A(r, { class: "d-d-inline-block" }, {
2516
2523
  default: C(() => [
@@ -2519,14 +2526,14 @@ function ss(t, e, o, n, i, s) {
2519
2526
  _: 1
2520
2527
  });
2521
2528
  }
2522
- const rs = /* @__PURE__ */ q(is, [["render", ss]]), as = (t, e) => [...t.matchAll(e)].map((n) => {
2529
+ const ls = /* @__PURE__ */ q(rs, [["render", as]]), cs = (t, e) => [...t.matchAll(e)].map((n) => {
2523
2530
  let i = n[2];
2524
2531
  return i.endsWith(" ") || (i += " "), {
2525
2532
  index: n.index,
2526
2533
  text: i,
2527
2534
  match: n
2528
2535
  };
2529
- }), ls = Mt.extend({
2536
+ }), ds = Mt.extend({
2530
2537
  name: "slash-commands",
2531
2538
  group: "inline",
2532
2539
  inline: !0,
@@ -2543,7 +2550,7 @@ const rs = /* @__PURE__ */ q(is, [["render", ss]]), as = (t, e) => [...t.matchAl
2543
2550
  };
2544
2551
  },
2545
2552
  addNodeView() {
2546
- return gt(rs);
2553
+ return gt(ls);
2547
2554
  },
2548
2555
  parseHTML() {
2549
2556
  return [
@@ -2589,7 +2596,7 @@ const rs = /* @__PURE__ */ q(is, [["render", ss]]), as = (t, e) => [...t.matchAl
2589
2596
  const t = (o = this.options.suggestion) == null ? void 0 : o.items({ query: "" }).map((n) => n.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) ?$`, "g");
2590
2597
  return [
2591
2598
  St({
2592
- find: (n) => as(n, e),
2599
+ find: (n) => cs(n, e),
2593
2600
  type: this.type,
2594
2601
  getAttributes(n) {
2595
2602
  return { command: n[0].trim() };
@@ -2602,7 +2609,7 @@ const rs = /* @__PURE__ */ q(is, [["render", ss]]), as = (t, e) => [...t.matchAl
2602
2609
  char: "/",
2603
2610
  pluginKey: new at("slashCommandSuggestion")
2604
2611
  }
2605
- }), cs = 100, ds = {
2612
+ }), us = 100, hs = {
2606
2613
  name: "VariableComponent",
2607
2614
  components: {
2608
2615
  DtBadge: Zn,
@@ -2615,7 +2622,7 @@ const rs = /* @__PURE__ */ q(is, [["render", ss]]), as = (t, e) => [...t.matchAl
2615
2622
  data() {
2616
2623
  return {
2617
2624
  i18n: new ve(),
2618
- MAX_VARIABLE_ALT_LENGTH: cs
2625
+ MAX_VARIABLE_ALT_LENGTH: us
2619
2626
  };
2620
2627
  },
2621
2628
  computed: {
@@ -2655,7 +2662,7 @@ const rs = /* @__PURE__ */ q(is, [["render", ss]]), as = (t, e) => [...t.matchAl
2655
2662
  }
2656
2663
  }
2657
2664
  };
2658
- function us(t, e, o, n, i, s) {
2665
+ function fs(t, e, o, n, i, s) {
2659
2666
  const r = T("dt-badge"), a = T("dt-button"), l = T("dt-input"), u = T("dt-popover"), d = T("node-view-wrapper");
2660
2667
  return _(), A(d, { class: "d-d-inline-block" }, {
2661
2668
  default: C(() => [
@@ -2706,7 +2713,7 @@ function us(t, e, o, n, i, s) {
2706
2713
  _: 1
2707
2714
  });
2708
2715
  }
2709
- const hs = /* @__PURE__ */ q(ds, [["render", us]]), fs = le.create({
2716
+ const ps = /* @__PURE__ */ q(hs, [["render", fs]]), ms = le.create({
2710
2717
  name: "variable",
2711
2718
  group: "inline",
2712
2719
  inline: !0,
@@ -2719,7 +2726,7 @@ const hs = /* @__PURE__ */ q(ds, [["render", us]]), fs = le.create({
2719
2726
  };
2720
2727
  },
2721
2728
  addNodeView() {
2722
- return gt(hs);
2729
+ return gt(ps);
2723
2730
  },
2724
2731
  addAttributes() {
2725
2732
  return {
@@ -2778,7 +2785,7 @@ const hs = /* @__PURE__ */ q(ds, [["render", us]]), fs = le.create({
2778
2785
  })
2779
2786
  };
2780
2787
  }
2781
- }), ps = {
2788
+ }), gs = {
2782
2789
  compatConfig: { MODE: 3 },
2783
2790
  name: "MentionSuggestion",
2784
2791
  components: {
@@ -2819,14 +2826,14 @@ const hs = /* @__PURE__ */ q(ds, [["render", us]]), fs = le.create({
2819
2826
  return this.item.showDetails;
2820
2827
  }
2821
2828
  }
2822
- }, ms = { class: "d-mention-suggestion__name" }, gs = {
2829
+ }, ys = { class: "d-mention-suggestion__name" }, ws = {
2823
2830
  key: 1,
2824
2831
  class: "d-mention-suggestion__divider"
2825
- }, ys = {
2832
+ }, bs = {
2826
2833
  key: 2,
2827
2834
  class: "d-mention-suggestion__status"
2828
2835
  };
2829
- function ws(t, e, o, n, i, s) {
2836
+ function vs(t, e, o, n, i, s) {
2830
2837
  const r = T("dt-avatar"), a = T("dt-stack");
2831
2838
  return _(), A(a, {
2832
2839
  direction: "row",
@@ -2847,7 +2854,7 @@ function ws(t, e, o, n, i, s) {
2847
2854
  gap: "100"
2848
2855
  }, {
2849
2856
  default: C(() => [
2850
- ot("span", ms, $(s.name), 1),
2857
+ nt("span", ys, $(s.name), 1),
2851
2858
  s.showDetails ? (_(), A(a, {
2852
2859
  key: 0,
2853
2860
  direction: "row",
@@ -2855,12 +2862,12 @@ function ws(t, e, o, n, i, s) {
2855
2862
  class: "d-label--sm-plain"
2856
2863
  }, {
2857
2864
  default: C(() => [
2858
- s.presenceText ? (_(), nt("span", {
2865
+ s.presenceText ? (_(), et("span", {
2859
2866
  key: 0,
2860
2867
  class: pe(["d-mention-suggestion__presence", [s.presenceFontColorClass]])
2861
2868
  }, $(s.presenceText), 3)) : rt("", !0),
2862
- s.status && s.presenceText ? (_(), nt("div", gs, " • ")) : rt("", !0),
2863
- s.status ? (_(), nt("div", ys, $(s.status), 1)) : rt("", !0)
2869
+ s.status && s.presenceText ? (_(), et("div", ws, " • ")) : rt("", !0),
2870
+ s.status ? (_(), et("div", bs, $(s.status), 1)) : rt("", !0)
2864
2871
  ]),
2865
2872
  _: 1
2866
2873
  })) : rt("", !0)
@@ -2871,13 +2878,13 @@ function ws(t, e, o, n, i, s) {
2871
2878
  _: 1
2872
2879
  });
2873
2880
  }
2874
- const bs = /* @__PURE__ */ q(ps, [["render", ws]]), vs = {
2881
+ const xs = /* @__PURE__ */ q(gs, [["render", vs]]), Ts = {
2875
2882
  // This function comes from the user and passed to the editor directly.
2876
2883
  // This will also activate the mention plugin on the editor
2877
2884
  // items: ({ query }) => { return [] },
2878
2885
  allowSpaces: !0,
2879
- render: Ot(bs, "mention")
2880
- }, xs = {
2886
+ render: Ot(xs, "mention")
2887
+ }, _s = {
2881
2888
  compatConfig: { MODE: 3 },
2882
2889
  name: "ChannelSuggestion",
2883
2890
  components: {
@@ -2897,7 +2904,7 @@ const bs = /* @__PURE__ */ q(ps, [["render", ws]]), vs = {
2897
2904
  }
2898
2905
  }
2899
2906
  };
2900
- function Ts(t, e, o, n, i, s) {
2907
+ function ks(t, e, o, n, i, s) {
2901
2908
  const r = T("dt-icon-hash"), a = T("dt-icon-lock"), l = T("dt-stack");
2902
2909
  return _(), A(l, {
2903
2910
  direction: "row",
@@ -2911,18 +2918,18 @@ function Ts(t, e, o, n, i, s) {
2911
2918
  key: 0,
2912
2919
  size: "300"
2913
2920
  })),
2914
- ot("span", null, $(s.name), 1)
2921
+ nt("span", null, $(s.name), 1)
2915
2922
  ]),
2916
2923
  _: 1
2917
2924
  });
2918
2925
  }
2919
- const _s = /* @__PURE__ */ q(xs, [["render", Ts]]), ks = {
2926
+ const Cs = /* @__PURE__ */ q(_s, [["render", ks]]), Os = {
2920
2927
  // This function comes from the user and passed to the editor directly.
2921
2928
  // This will also activate the mention plugin on the editor
2922
2929
  // items: ({ query }) => { return [] },
2923
2930
  allowSpaces: !0,
2924
- render: Ot(_s, "channel")
2925
- }, Cs = {
2931
+ render: Ot(Cs, "channel")
2932
+ }, Es = {
2926
2933
  compatConfig: { MODE: 3 },
2927
2934
  name: "SlashCommandSuggestion",
2928
2935
  props: {
@@ -2942,24 +2949,24 @@ const _s = /* @__PURE__ */ q(xs, [["render", Ts]]), ks = {
2942
2949
  return this.item.parametersExample;
2943
2950
  }
2944
2951
  }
2945
- }, Os = { class: "d-body--md-compact" }, Es = { key: 0 }, Ss = { class: "d-body--sm d-fc-tertiary" };
2946
- function Ls(t, e, o, n, i, s) {
2947
- return _(), nt("div", null, [
2948
- ot("div", Os, [
2949
- ot("span", null, "/" + $(s.command), 1),
2950
- s.parametersExample ? (_(), nt("span", Es, $(s.parametersExample), 1)) : rt("", !0)
2952
+ }, Ss = { class: "d-body--md-compact" }, Ls = { key: 0 }, As = { class: "d-body--sm d-fc-tertiary" };
2953
+ function Is(t, e, o, n, i, s) {
2954
+ return _(), et("div", null, [
2955
+ nt("div", Ss, [
2956
+ nt("span", null, "/" + $(s.command), 1),
2957
+ s.parametersExample ? (_(), et("span", Ls, $(s.parametersExample), 1)) : rt("", !0)
2951
2958
  ]),
2952
- ot("div", Ss, $(s.description), 1)
2959
+ nt("div", As, $(s.description), 1)
2953
2960
  ]);
2954
2961
  }
2955
- const As = /* @__PURE__ */ q(Cs, [["render", Ls]]), Is = {
2962
+ const Ds = /* @__PURE__ */ q(Es, [["render", Is]]), Rs = {
2956
2963
  // This function comes from the user and passed to the editor directly.
2957
2964
  // This will also activate the mention plugin on the editor
2958
2965
  // items: ({ query }) => { return [] },
2959
2966
  allowSpaces: !0,
2960
2967
  startOfLine: !0,
2961
- render: Ot(As, "slash-command")
2962
- }, Ds = {
2968
+ render: Ot(Ds, "slash-command")
2969
+ }, Ms = {
2963
2970
  compatConfig: { MODE: 3 },
2964
2971
  name: "DtRichTextEditor",
2965
2972
  components: {
@@ -3549,7 +3556,7 @@ ${this.processNodeContent(t)}
3549
3556
  // eslint-disable-next-line complexity
3550
3557
  extensions() {
3551
3558
  const t = [wn, In, bn, Tn];
3552
- t.push(this.useDivTags ? Yi : ge), this.allowBold && t.push(_n), this.allowBlockquote && t.push(mn), this.allowBulletList && (t.push(kn), t.push(Cn.extend({
3559
+ t.push(this.useDivTags ? Ji : ge), this.allowBold && t.push(_n), this.allowBlockquote && t.push(mn), this.allowBulletList && (t.push(kn), t.push(Cn.extend({
3553
3560
  renderText({ node: n }) {
3554
3561
  return n.textContent;
3555
3562
  }
@@ -3584,26 +3591,26 @@ ${this.processNodeContent(t)}
3584
3591
  openOnClick: !1,
3585
3592
  autolink: !0,
3586
3593
  protocols: Kt
3587
- })), this.customLink && t.push(this.getExtension(Wi, this.customLink)), this.mentionSuggestion) {
3588
- const n = { ...this.mentionSuggestion, ...vs };
3589
- t.push(Qi.configure({ suggestion: n }));
3594
+ })), this.customLink && t.push(this.getExtension(Xi, this.customLink)), this.mentionSuggestion) {
3595
+ const n = { ...this.mentionSuggestion, ...Ts };
3596
+ t.push(es.configure({ suggestion: n }));
3590
3597
  }
3591
3598
  if (this.channelSuggestion) {
3592
- const n = { ...this.channelSuggestion, ...ks };
3593
- t.push(os.configure({ suggestion: n }));
3599
+ const n = { ...this.channelSuggestion, ...Os };
3600
+ t.push(ss.configure({ suggestion: n }));
3594
3601
  }
3595
3602
  if (this.slashCommandSuggestion) {
3596
- const n = { ...this.slashCommandSuggestion, ...Is };
3597
- t.push(ls.configure({
3603
+ const n = { ...this.slashCommandSuggestion, ...Rs };
3604
+ t.push(ds.configure({
3598
3605
  suggestion: n,
3599
3606
  onSelectedCommand: (i) => {
3600
3607
  this.$emit("selected-command", i);
3601
3608
  }
3602
3609
  }));
3603
3610
  }
3604
- return this.allowVariable && t.push(fs.configure({
3611
+ return this.allowVariable && t.push(ms.configure({
3605
3612
  variableItems: this.variableItems
3606
- })), t.push(Ni), t.push(Dn.configure({
3613
+ })), t.push(Ui), t.push(Dn.configure({
3607
3614
  types: ["paragraph"]
3608
3615
  })), this.allowCode && t.push(yn), this.allowCodeblock && t.push(gn.extend({
3609
3616
  renderText({ node: n }) {
@@ -3615,7 +3622,7 @@ ${n.textContent}
3615
3622
  HTMLAttributes: {
3616
3623
  class: "d-rich-text-editor__code-block"
3617
3624
  }
3618
- })), this.allowInlineImages && t.push(qi.configure({
3625
+ })), this.allowInlineImages && t.push(Yi.configure({
3619
3626
  resize: {
3620
3627
  enabled: this.allowImageResize,
3621
3628
  alwaysPreserveAspectRatio: !0
@@ -3626,11 +3633,11 @@ ${n.textContent}
3626
3633
  fontFamily: this.allowFontFamily,
3627
3634
  fontSize: this.allowFontSize,
3628
3635
  lineHeight: this.allowLineHeight
3629
- })), t.push(ci)), this.additionalExtensions.length && t.push(...this.additionalExtensions), this.allowTables && t.push(
3630
- si.configure({ resizable: !0 }),
3631
- ri,
3636
+ })), t.push(ui)), this.additionalExtensions.length && t.push(...this.additionalExtensions), this.allowTables && t.push(
3637
+ ai.configure({ resizable: !0 }),
3632
3638
  li,
3633
- ai,
3639
+ di,
3640
+ ci,
3634
3641
  xn
3635
3642
  ), t;
3636
3643
  },
@@ -3898,10 +3905,10 @@ ${n.textContent}
3898
3905
  this.editor.commands.focus();
3899
3906
  }
3900
3907
  }
3901
- }, Rs = { class: "d-popover__dialog" };
3902
- function Ms(t, e, o, n, i, s) {
3908
+ }, Hs = { class: "d-popover__dialog" };
3909
+ function $s(t, e, o, n, i, s) {
3903
3910
  const r = T("dt-button"), a = T("dt-stack"), l = T("bubble-menu"), u = T("editor-content");
3904
- return _(), nt("div", null, [
3911
+ return _(), et("div", null, [
3905
3912
  i.editor && o.link && !o.hideLinkBubbleMenu ? (_(), A(l, {
3906
3913
  key: 0,
3907
3914
  editor: i.editor,
@@ -3911,7 +3918,7 @@ function Ms(t, e, o, n, i, s) {
3911
3918
  style: { visibility: "visible" }
3912
3919
  }, {
3913
3920
  default: C(() => [
3914
- ot("div", Rs, [
3921
+ nt("div", Hs, [
3915
3922
  M(a, {
3916
3923
  direction: "row",
3917
3924
  class: "d-rich-text-editor-bubble-menu__button-stack",
@@ -3963,8 +3970,8 @@ function Ms(t, e, o, n, i, s) {
3963
3970
  }, s.attrs), null, 16, ["editor"])
3964
3971
  ]);
3965
3972
  }
3966
- const Cr = /* @__PURE__ */ q(Ds, [["render", Ms]]);
3973
+ const Er = /* @__PURE__ */ q(Ms, [["render", $s]]);
3967
3974
  export {
3968
- Cr as default
3975
+ Er as default
3969
3976
  };
3970
3977
  //# sourceMappingURL=rich-text-editor.js.map