reactjs-tiptap-editor 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/lib/{ActionMenuButton-CKTxYtl7.js → ActionMenuButton-BKqin6Kz.js} +17 -13
  2. package/lib/ActionMenuButton-CPPHERbq.cjs +1 -0
  3. package/lib/Attachment.cjs +2 -2
  4. package/lib/Attachment.js +24 -21
  5. package/lib/Blockquote.cjs +2 -2
  6. package/lib/Blockquote.js +7 -5
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +11 -9
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +14 -12
  11. package/lib/Clear.cjs +1 -1
  12. package/lib/Clear.js +3 -3
  13. package/lib/Code.cjs +1 -1
  14. package/lib/Code.js +11 -9
  15. package/lib/CodeBlock.cjs +22 -22
  16. package/lib/CodeBlock.js +102 -100
  17. package/lib/CodeView.cjs +1 -1
  18. package/lib/CodeView.js +10 -8
  19. package/lib/Color.cjs +1 -1
  20. package/lib/Color.js +20 -18
  21. package/lib/Column.cjs +1 -1
  22. package/lib/Column.js +7 -5
  23. package/lib/{Drawer-Cfx115up.js → Drawer-DUPsBE0H.js} +10 -9
  24. package/lib/Drawer-fplzqNI6.cjs +1 -0
  25. package/lib/Drawer.cjs +1 -1
  26. package/lib/Drawer.js +3 -3
  27. package/lib/Emoji.cjs +1 -1
  28. package/lib/Emoji.js +11 -9
  29. package/lib/{Excalidraw-CO93Tsmb.js → Excalidraw-BEzpvRLx.js} +20 -19
  30. package/lib/Excalidraw-qjnQspLq.cjs +1 -0
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +2 -2
  33. package/lib/ExportPdf.cjs +2 -2
  34. package/lib/ExportPdf.js +7 -5
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +7 -5
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +9 -8
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +13 -12
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +25 -24
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +9 -7
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +18 -15
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +7 -5
  49. package/lib/Icon-CiR8RqdQ.cjs +1 -0
  50. package/lib/Icon-ONE1AwKo.js +12 -0
  51. package/lib/{Iframe-DwhclppJ.js → Iframe-CBTnv2mk.js} +41 -39
  52. package/lib/Iframe-DsUNJ2n2.cjs +1 -0
  53. package/lib/Iframe.cjs +1 -1
  54. package/lib/Iframe.js +2 -2
  55. package/lib/Image.cjs +1 -1
  56. package/lib/Image.js +25 -23
  57. package/lib/ImageGif.cjs +1 -1
  58. package/lib/ImageGif.js +53 -51
  59. package/lib/ImportWord.cjs +31 -31
  60. package/lib/ImportWord.js +8 -6
  61. package/lib/{Indent-BOsymiZ7.js → Indent-B00o0P0M.js} +26 -24
  62. package/lib/Indent-CaGP0qTp.cjs +1 -0
  63. package/lib/Indent.cjs +1 -1
  64. package/lib/Indent.js +2 -2
  65. package/lib/Italic.cjs +1 -1
  66. package/lib/Italic.js +12 -10
  67. package/lib/Katex-XsfpKgJU.cjs +4 -0
  68. package/lib/{Katex-BYK-b9X2.js → Katex-x370CSXZ.js} +12 -10
  69. package/lib/Katex.cjs +1 -1
  70. package/lib/Katex.js +2 -2
  71. package/lib/LineHeight.cjs +1 -1
  72. package/lib/LineHeight.js +10 -8
  73. package/lib/Link.cjs +1 -1
  74. package/lib/Link.js +2 -2
  75. package/lib/{LinkEditBlock-DgrLUMsJ.js → LinkEditBlock-C_ipl3EA.js} +23 -21
  76. package/lib/{LinkEditBlock-4-iRXH7m.cjs → LinkEditBlock-xt88G5fb.cjs} +2 -2
  77. package/lib/Mention.cjs +1 -1
  78. package/lib/Mention.js +3 -3
  79. package/lib/Mermaid.cjs +2 -2
  80. package/lib/Mermaid.js +18 -17
  81. package/lib/MoreMark.cjs +1 -1
  82. package/lib/MoreMark.js +25 -22
  83. package/lib/OrderedList.cjs +1 -1
  84. package/lib/OrderedList.js +10 -8
  85. package/lib/SearchAndReplace.cjs +1 -1
  86. package/lib/SearchAndReplace.js +43 -41
  87. package/lib/SlashCommand.cjs +1 -1
  88. package/lib/SlashCommand.js +6 -6
  89. package/lib/SlashCommandNodeView-BT5ystah.cjs +1 -0
  90. package/lib/{SlashCommandNodeView-BpNNU7Sm.js → SlashCommandNodeView-DX6axvLs.js} +75 -66
  91. package/lib/Strike.cjs +1 -1
  92. package/lib/Strike.js +7 -5
  93. package/lib/Table-DSRSwtXx.cjs +9 -0
  94. package/lib/{Table-CT9R9Sdq.js → Table-DidusYID.js} +10 -8
  95. package/lib/Table.cjs +1 -1
  96. package/lib/Table.js +1 -1
  97. package/lib/TaskList.cjs +1 -1
  98. package/lib/TaskList.js +15 -13
  99. package/lib/TextAlign.cjs +1 -1
  100. package/lib/TextAlign.js +20 -17
  101. package/lib/TextDirection.cjs +1 -1
  102. package/lib/TextDirection.js +20 -17
  103. package/lib/TextUnderline.cjs +1 -1
  104. package/lib/TextUnderline.js +7 -5
  105. package/lib/Twitter-CBuVBQM1.cjs +1 -0
  106. package/lib/{Twitter-mowilxRd.js → Twitter-D58T0Zt3.js} +51 -49
  107. package/lib/Twitter.cjs +1 -1
  108. package/lib/Twitter.js +2 -2
  109. package/lib/Video.cjs +1 -1
  110. package/lib/Video.js +13 -11
  111. package/lib/bubble.cjs +4 -4
  112. package/lib/bubble.js +403 -407
  113. package/lib/{button-CBO-WDXK.js → button-9_8t7ca7.js} +4 -3
  114. package/lib/button-Cs9TroWr.cjs +1 -0
  115. package/lib/{checkbox-DUcLSGZD.cjs → checkbox-BQRKTXXr.cjs} +1 -1
  116. package/lib/{checkbox-D1h32VWM.js → checkbox-DnkkV6qo.js} +1 -1
  117. package/lib/{index-BBNITgNi.cjs → clsx-CXbNJWDD.cjs} +13 -13
  118. package/lib/{index-sVScpCFG.js → clsx-DmuN0U_8.js} +228 -228
  119. package/lib/{dialog-DY868Uji.cjs → dialog-BS3zm-T9.cjs} +1 -1
  120. package/lib/{dialog-DSvgtlDI.js → dialog-DhayAPvV.js} +1 -1
  121. package/lib/{dropdown-menu-BripAeGB.cjs → dropdown-menu-CxwWX0yj.cjs} +1 -1
  122. package/lib/{dropdown-menu-B88Qn2KR.js → dropdown-menu-DQqKeZcx.js} +1 -1
  123. package/lib/events.constant-Dq21NPdV.cjs +1 -0
  124. package/lib/events.constant-do95b767.js +21 -0
  125. package/lib/{index-CApXPpjF.cjs → index-BCzvbrf5.cjs} +1 -1
  126. package/lib/{index-0OnGZkVF.js → index-BDX1uE62.js} +78 -312
  127. package/lib/index-CBFmXCcU.cjs +1 -0
  128. package/lib/{index-DmPwbBqm.js → index-CKmT9KAQ.js} +1 -1
  129. package/lib/index-CVFzP1Dc.cjs +1 -0
  130. package/lib/index-CX4pNJlH.cjs +1 -0
  131. package/lib/index-CjhjjJsN.cjs +1 -0
  132. package/lib/index-Cs6cp0Y6.cjs +1 -0
  133. package/lib/{index-9A6-kVBM.js → index-D1jd7elj.js} +1 -1
  134. package/lib/{index-BIqaogQg.js → index-D9JOHlso.js} +449 -1216
  135. package/lib/{index-DRHrDScg.js → index-DdEmgiAA.js} +1 -1
  136. package/lib/{index-DKt5wfAc.js → index-DvvwJvau.js} +23 -23
  137. package/lib/index-EAK64CCA.js +425 -0
  138. package/lib/{index--nUS7Y66.cjs → index-neeeY2o7.cjs} +3 -3
  139. package/lib/index.cjs +9 -2
  140. package/lib/index.js +142 -26
  141. package/lib/{input-BeD5GdMv.cjs → input-BJ7ihMq-.cjs} +1 -1
  142. package/lib/{input-Bx4uo4gO.js → input-YoheBL2D.js} +1 -1
  143. package/lib/{isNumber-Bv1Qhmw8.cjs → isNumber-BTYSVlKo.cjs} +1 -1
  144. package/lib/{isNumber-DF0fU3ob.js → isNumber-DmQXlKp3.js} +1 -1
  145. package/lib/label-C8PLcjFI.js +19 -0
  146. package/lib/label-Y7_hvqf2.cjs +1 -0
  147. package/lib/locale-bundle.cjs +1 -1
  148. package/lib/locale-bundle.js +6 -7
  149. package/lib/locales/index.d.ts +3 -4316
  150. package/lib/{popover-Csk538NC.cjs → popover-BiSrlM4j.cjs} +1 -1
  151. package/lib/{popover-BVX8otO9.js → popover-CWmTzHSy.js} +1 -1
  152. package/lib/react-BEoMZB61.cjs +1 -0
  153. package/lib/react-c9FSfB30.js +27 -0
  154. package/lib/separator-C-DKMYmg.js +329 -0
  155. package/lib/separator-CJ_adziN.cjs +1 -0
  156. package/lib/store/EditorEditableReactive.d.ts +1 -0
  157. package/lib/store/ThemeColorReactive.d.ts +1 -0
  158. package/lib/store/commandList.d.ts +1 -1
  159. package/lib/store/store.d.ts +6 -7
  160. package/lib/store-BKMaw1AW.cjs +1 -0
  161. package/lib/store-DG7cMfET.js +10 -0
  162. package/lib/style.css +1 -1
  163. package/lib/{tabs-DOasUMDU.cjs → tabs-DpHSMyF_.cjs} +1 -1
  164. package/lib/{tabs-BKpr0QQB.js → tabs-DxlKKM-N.js} +1 -1
  165. package/lib/{textarea-Ba9OOzba.js → textarea-D7m-apUh.js} +1 -1
  166. package/lib/{textarea-D9egO4qC.cjs → textarea-DU9RMi6u.cjs} +1 -1
  167. package/lib/theme/theme.d.ts +5 -0
  168. package/lib/theme.cjs +1 -1
  169. package/lib/theme.js +37 -8
  170. package/lib/{throttle-DsowOft0.js → throttle-BRtichEP.js} +1 -1
  171. package/lib/throttle-gTTvqDTW.cjs +1 -0
  172. package/lib/toggle-BYvLnjCL.cjs +1 -0
  173. package/lib/toggle-Bxwwb_Kp.js +99 -0
  174. package/lib/tooltip-BTy5CRrN.js +24 -0
  175. package/lib/tooltip-COvf4_R-.cjs +1 -0
  176. package/lib/{updatePosition-Bbd8ETMv.js → updatePosition-CUukgu-Q.js} +2 -2
  177. package/lib/updatePosition-Cjuj2E26.cjs +1 -0
  178. package/lib/{useButtonProps-C_bqxmHi.js → useButtonProps-CfYtuEnd.js} +48 -36
  179. package/lib/useButtonProps-CydzndG1.cjs +1 -0
  180. package/lib/utils/customEvents/events.constant.d.ts +0 -5
  181. package/package.json +3 -3
  182. package/lib/ActionMenuButton-BPdRqzDX.cjs +0 -1
  183. package/lib/Drawer-hHj4Opkg.cjs +0 -1
  184. package/lib/Excalidraw-8pWJ17Ye.cjs +0 -1
  185. package/lib/Icon-D7GJZzoa.js +0 -10
  186. package/lib/Icon-gtc3g-VK.cjs +0 -1
  187. package/lib/Iframe-BmXO2c65.cjs +0 -1
  188. package/lib/Indent-DPkMWfcv.cjs +0 -1
  189. package/lib/Katex-B1XbT8-X.cjs +0 -4
  190. package/lib/SlashCommandNodeView-CQvMTXys.cjs +0 -1
  191. package/lib/Table-LnWGm2m8.cjs +0 -9
  192. package/lib/Twitter-Bo4JkBTL.cjs +0 -1
  193. package/lib/button-wt49IYwP.cjs +0 -1
  194. package/lib/events.constant-DQYeJpu5.cjs +0 -1
  195. package/lib/events.constant-wrlJ_7JZ.js +0 -26
  196. package/lib/index-BZ6DfR2r.cjs +0 -1
  197. package/lib/index-BvIJKpX1.cjs +0 -8
  198. package/lib/index-Cv9Z6dyV.cjs +0 -1
  199. package/lib/index-FSRjMsxW.cjs +0 -1
  200. package/lib/label--161UPH6.cjs +0 -1
  201. package/lib/label-uKG7RzFU.js +0 -18
  202. package/lib/separator-DLRVddHS.cjs +0 -1
  203. package/lib/separator-DtrEdjAF.js +0 -241
  204. package/lib/store/ProviderUniqueId.d.ts +0 -6
  205. package/lib/store-B8IkVz1J.cjs +0 -1
  206. package/lib/store-CsIFDUKR.js +0 -10
  207. package/lib/throttle-BM3Bmbf_.cjs +0 -1
  208. package/lib/updatePosition-M2IyqkI1.cjs +0 -1
  209. package/lib/useButtonProps-DEtmDVPr.cjs +0 -1
package/lib/CodeBlock.js CHANGED
@@ -1,11 +1,13 @@
1
- import { q as ta, C as Te, N as na, t as Pt, u as aa, m as ra } from "./index-sVScpCFG.js";
1
+ import { o as ta, B as Te, N as na, t as Pt, s as aa, m as ra } from "./clsx-DmuN0U_8.js";
2
2
  import { jsx as C, Fragment as ia, jsxs as tt } from "react/jsx-runtime";
3
- import { A as sa, k as oa, S as $t, m as Dt, n as la, o as Ft, p as Ut } from "./index-BIqaogQg.js";
4
- import { useRef as Bt, useCallback as nt, useEffect as Gt } from "react";
3
+ import { A as sa } from "./toggle-Bxwwb_Kp.js";
4
+ import { useRef as $t, useCallback as nt, useEffect as Dt } from "react";
5
+ import { a as oa, S as Ft, b as Ut, d as la, e as Bt, f as Gt } from "./index-D9JOHlso.js";
6
+ import "./theme.js";
5
7
  import { d as ca } from "./delete-node-IyVmiRbI.js";
6
- import { I as Ee } from "./Icon-D7GJZzoa.js";
7
- import { u as da, a as ua } from "./useButtonProps-C_bqxmHi.js";
8
- function br() {
8
+ import { I as Ee } from "./Icon-ONE1AwKo.js";
9
+ import { u as da, a as ua } from "./useButtonProps-CfYtuEnd.js";
10
+ function gr() {
9
11
  const e = da(ea.name), {
10
12
  icon: t = void 0,
11
13
  tooltip: n = void 0,
@@ -27,17 +29,17 @@ function br() {
27
29
  }
28
30
  ) : /* @__PURE__ */ C(ia, {});
29
31
  }
30
- var xe = {}, j = Symbol(), J = Symbol(), St = (e) => typeof e == "string" ? _[e] : e, _ = {
32
+ var xe = {}, j = Symbol(), J = Symbol(), kt = (e) => typeof e == "string" ? _[e] : e, _ = {
31
33
  plain: xe,
32
34
  plaintext: xe,
33
35
  text: xe,
34
36
  txt: xe
35
- }, ke = (e, t) => (t[J] || Se)(e, t), Se = (e, t) => {
36
- for (var n = [e], s, l = [], u = 0; s = St(t[j]); )
37
+ }, Se = (e, t) => (t[J] || ke)(e, t), ke = (e, t) => {
38
+ for (var n = [e], s, l = [], u = 0; s = kt(t[j]); )
37
39
  delete t[j], Object.assign(t, s);
38
40
  for (xn(e, t, n, 0); l[u++] = n[0], n = n[1]; ) ;
39
41
  return l;
40
- }, zt = "</span>", Oe = "", ye = "", Sn = (e) => {
42
+ }, zt = "</span>", Oe = "", ye = "", kn = (e) => {
41
43
  for (var t = "", n = e.length, s = 0; s < n; ) t += Tn(e[s++]);
42
44
  return t;
43
45
  }, Tn = (e) => {
@@ -47,7 +49,7 @@ var xe = {}, j = Symbol(), J = Symbol(), St = (e) => typeof e == "string" ? _[e]
47
49
  var E = Tn(s);
48
50
  return Oe = l, ye = u, f + E + zt;
49
51
  }
50
- return typeof e != "string" ? Sn(e) : (e = e.replace(/&/g, "&amp;").replace(/</g, "&lt;"), ye && e.includes(`
52
+ return typeof e != "string" ? kn(e) : (e = e.replace(/&/g, "&amp;").replace(/</g, "&lt;"), ye && e.includes(`
51
53
  `) ? e.replace(/\n/g, ye + `
52
54
  ` + Oe) : e);
53
55
  }, xn = (e, t, n, s, l) => {
@@ -55,23 +57,23 @@ var xe = {}, j = Symbol(), J = Symbol(), St = (e) => typeof e == "string" ? _[e]
55
57
  if (t[u]) for (var f = 0, E = t[u], y = Array.isArray(E) ? E : [E]; f < y.length; ++f) {
56
58
  if (l && l[0] == u && l[1] == f)
57
59
  return;
58
- for (var v = y[f], m = v.pattern || v, p = St(v.inside), c = v.lookbehind, b = v.greedy && m.global, g = v.alias, a = n, r = s; a && (!l || r < l[2]); r += a[0].length, a = a[1]) {
60
+ for (var v = y[f], m = v.pattern || v, p = kt(v.inside), c = v.lookbehind, b = v.greedy && m.global, g = v.alias, a = n, r = s; a && (!l || r < l[2]); r += a[0].length, a = a[1]) {
59
61
  var d = a[0], o = 0, i, h;
60
62
  if (!(d instanceof ue)) {
61
63
  if (m.lastIndex = b ? r : 0, i = m.exec(b ? e : d), i && c && i[1] && (h = i[1].length, i.index += h, i[0] = i[0].slice(h)), b) {
62
64
  if (!i)
63
65
  break;
64
66
  if (i[0]) {
65
- for (var S = i.index, k = S + i[0].length, I; S >= r + (I = a[0].length); a = a[1], r += I) ;
67
+ for (var k = i.index, S = k + i[0].length, I; k >= r + (I = a[0].length); a = a[1], r += I) ;
66
68
  if (a[0] instanceof ue)
67
69
  continue;
68
- for (var w = a, E = r; (E += w[0].length) < k; w = w[1], o++) ;
70
+ for (var w = a, E = r; (E += w[0].length) < S; w = w[1], o++) ;
69
71
  d = e.slice(r, E), i.index -= r;
70
72
  }
71
73
  }
72
74
  if (i && i[0]) {
73
- for (var S = i.index, x = i[0], T = d.slice(S + x.length), N = r + d.length, P = new ue(u, p ? ke(x, p) : x, x, g), M = a, V = 0, z; M = M[1], V++ < o; ) ;
74
- T && (!M || M[0] instanceof ue ? M = [T, M] : M[0] = T + M[0]), r += S, a[0] = S ? d.slice(0, S) : P, S ? a = a[1] = [P, M] : a[1] = M, o && (xn(e, t, a, r, z = [u, f, N]), N = z[2]), l && N > l[2] && (l[2] = N);
75
+ for (var k = i.index, x = i[0], T = d.slice(k + x.length), N = r + d.length, P = new ue(u, p ? Se(x, p) : x, x, g), M = a, V = 0, z; M = M[1], V++ < o; ) ;
76
+ T && (!M || M[0] instanceof ue ? M = [T, M] : M[0] = T + M[0]), r += k, a[0] = k ? d.slice(0, k) : P, k ? a = a[1] = [P, M] : a[1] = M, o && (xn(e, t, a, r, z = [u, f, N]), N = z[2]), l && N > l[2] && (l[2] = N);
75
77
  }
76
78
  }
77
79
  }
@@ -1507,7 +1509,7 @@ _.js = _.javascript = Object.assign(lt, {
1507
1509
  punctuation: /\?\.|[()[\]{}.,:;]/
1508
1510
  });
1509
1511
  var Dn = (e) => (t, n) => {
1510
- for (var s = St(e), l = "", u = [], f = 0, E = Se(t, n), y = 0, v = E.length, g = 0; y < v; ) {
1512
+ for (var s = kt(e), l = "", u = [], f = 0, E = ke(t, n), y = 0, v = E.length, g = 0; y < v; ) {
1511
1513
  var m = E[y++], p = m.length, c = m.type;
1512
1514
  c && c.slice(0, 6) != "ignore" ? (u[f++] = [g, m], l += " ".repeat(p)) : l += t.slice(g, g + p), g += p;
1513
1515
  }
@@ -1517,12 +1519,12 @@ var Dn = (e) => (t, n) => {
1517
1519
  if (Array.isArray(h))
1518
1520
  a(h);
1519
1521
  else {
1520
- for (var k = i.length, I = [], w, S, x = 0, T = g; ([w, S] = u[b], w >= g && w < g + k) && (T < w && (I[x++] = l.slice(T, w)), T = w + S.length, I[x++] = S, ++b != f); )
1522
+ for (var S = i.length, I = [], w, k, x = 0, T = g; ([w, k] = u[b], w >= g && w < g + S) && (T < w && (I[x++] = l.slice(T, w)), T = w + k.length, I[x++] = k, ++b != f); )
1521
1523
  ;
1522
- g += k, x && (T < g && (I[x++] = l.slice(T, g)), h ? i.content = I : (d.splice(o, 1, ...I), o += x - 1));
1524
+ g += S, x && (T < g && (I[x++] = l.slice(T, g)), h ? i.content = I : (d.splice(o, 1, ...I), o += x - 1));
1523
1525
  }
1524
1526
  }
1525
- }, r = s ? ke(l, s) : [l];
1527
+ }, r = s ? Se(l, s) : [l];
1526
1528
  return a(r), r;
1527
1529
  }, Fn = _.js, xt = Fn["template-string"], ma = xt.pattern.source, ha = xt.inside.interpolation.pattern, de = (e, t) => ({
1528
1530
  pattern: RegExp("((?:" + t + ")\\s*)" + ma, "g"),
@@ -1626,7 +1628,7 @@ var De = "\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))*\\*/", _t = "\\{(?:[^{}]|\\{(?:[^{
1626
1628
  }
1627
1629
  }
1628
1630
  }
1629
- }), e[J] = (n, s) => _a(Se(n, s), n, 0);
1631
+ }), e[J] = (n, s) => _a(ke(n, s), n, 0);
1630
1632
  };
1631
1633
  Un(_.js, "jsx");
1632
1634
  _.lua = {
@@ -2177,7 +2179,7 @@ $(ne, "class-name", {
2177
2179
  });
2178
2180
  var Zn = Vn + "|" + Hn, qn = F(`/(?![*/])|//[^
2179
2181
  ]*
2180
- |/\\*(?:[^*]|\\*(?!/))*\\*/|<0>`, [Zn]), Kn = me(F(`[^()"'/]|<0>|\\(<self>*\\)`, [qn]), 2), ln = "\\b(?:assembly|event|field|method|module|param|property|return|type)\\b", ka = F("<0>(?:\\s*\\(<1>*\\))?", [le, Kn]), Lt = `:[^
2182
+ |/\\*(?:[^*]|\\*(?!/))*\\*/|<0>`, [Zn]), Kn = me(F(`[^()"'/]|<0>|\\(<self>*\\)`, [qn]), 2), ln = "\\b(?:assembly|event|field|method|module|param|property|return|type)\\b", Sa = F("<0>(?:\\s*\\(<1>*\\))?", [le, Kn]), Lt = `:[^
2181
2183
  }]+`, Wn = me(F(`[^()"'/]|<0>|\\(<self>*\\)`, [qn]), 2), cn = F("\\{(?!\\{)(?:(?![}:])<0>)*<1>?\\}", [Wn, Lt]), jn = me(F(`[^()"'/]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<0>|\\(<self>*\\)`, [Zn]), 2), dn = F("\\{(?!\\{)(?:(?![}:])<0>)*<1>?\\}", [jn, Lt]), un = (e, t) => ({
2182
2184
  interpolation: {
2183
2185
  pattern: O("((?:^|[^{])(?:\\{\\{)*)<0>", [e]),
@@ -2204,7 +2206,7 @@ $(ne, "class-name", {
2204
2206
  attribute: {
2205
2207
  // Attributes
2206
2208
  // [Foo], [Foo(1), Bar(2, Prop = "foo")], [return: Foo(1), Bar(2)], [assembly: Foo(Bar)]
2207
- pattern: O("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<0>\\s*:\\s*)?<1>(?:\\s*,\\s*<1>)*(?=\\s*\\])", [ln, ka], "g"),
2209
+ pattern: O("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<0>\\s*:\\s*)?<1>(?:\\s*,\\s*<1>)*(?=\\s*\\])", [ln, Sa], "g"),
2208
2210
  lookbehind: !0,
2209
2211
  greedy: !0,
2210
2212
  inside: {
@@ -2307,7 +2309,7 @@ _.graphql = {
2307
2309
  punctuation: /[()[\]{},:!=]/,
2308
2310
  property: /\w+/,
2309
2311
  [J](e, t) {
2310
- for (var n = Se(e, t), s = n.filter(({ type: a }) => a && a != "comment" && a != "scalar"), l = s.length, u = 0, f = (a) => {
2312
+ for (var n = ke(e, t), s = n.filter(({ type: a }) => a && a != "comment" && a != "scalar"), l = s.length, u = 0, f = (a) => {
2311
2313
  for (var r = 0; r < a.length; r++)
2312
2314
  if (u + r == l || s[u + r].type != a[r])
2313
2315
  return !0;
@@ -2515,7 +2517,7 @@ try {
2515
2517
  Et.lookbehind = !0;
2516
2518
  }
2517
2519
  Et.pattern = RegExp(Xn + `[^\\w$])|(?=</))${Et.pattern.source}`, "g");
2518
- var yt = /[*&][^\s[\]{},]+/, vt = /!(?:<[\w%#;/?:@&=$,.!~*'()[\]+-]+>|(?:[a-zA-Z\d-]*!)?[\w%#;/?:@&=$.~*'()+-]+)?/, wt = `(?:${vt.source}(?:[ ]+${yt.source})?|${yt.source}(?:[ ]+${vt.source})?)`, Sa = F(
2520
+ var yt = /[*&][^\s[\]{},]+/, vt = /!(?:<[\w%#;/?:@&=$,.!~*'()[\]+-]+>|(?:[a-zA-Z\d-]*!)?[\w%#;/?:@&=$.~*'()+-]+)?/, wt = `(?:${vt.source}(?:[ ]+${yt.source})?|${yt.source}(?:[ ]+${vt.source})?)`, ka = F(
2519
2521
  "(?:[^\\s\0-\\x08\\x0e-\\x1f!\"#%&'*,:>?@[\\]{}`|\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff-]|[?:-]<0>)(?:[ ]*(?:(?![#:])<0>|:<0>))*",
2520
2522
  ["[^\\s\0-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"]
2521
2523
  ), pn = `"(?:\\\\.|[^\\\\
@@ -2538,7 +2540,7 @@ _.yml = _.yaml = {
2538
2540
  pattern: O(
2539
2541
  `((?:^|[:,[{
2540
2542
  ?-])[ ]*(?:<0>[ ]+)?)<1>(?=\\s*:\\s)`,
2541
- [wt, "(?:" + Sa + "|" + pn + ")"],
2543
+ [wt, "(?:" + ka + "|" + pn + ")"],
2542
2544
  "g"
2543
2545
  ),
2544
2546
  lookbehind: !0,
@@ -2981,7 +2983,7 @@ _.php = {
2981
2983
  alias: "language-php",
2982
2984
  inside: vn
2983
2985
  },
2984
- [J]: (e, t) => e.includes("<?") ? Na(e, t) : ke(e, vn)
2986
+ [J]: (e, t) => e.includes("<?") ? Na(e, t) : Se(e, vn)
2985
2987
  };
2986
2988
  var La = [`(?:\\\\.|[^\\\\
2987
2989
  ]|
@@ -3059,10 +3061,10 @@ $(be, "prolog", {
3059
3061
  "code-language": /^.+/,
3060
3062
  "code-block": /(?!^)[^]+(?=\n)/,
3061
3063
  [J](e, t) {
3062
- var n = Se(e, t), s;
3064
+ var n = ke(e, t), s;
3063
3065
  return n[5] && (s = (/[a-z][\w-]*/i.exec(
3064
3066
  n[1].content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp")
3065
- ) || [""])[0].toLowerCase(), n[3].alias = "language-" + s, (t = _[s]) && (n[3].content = ke(n[3].content, t))), n;
3067
+ ) || [""])[0].toLowerCase(), n[3].alias = "language-" + s, (t = _[s]) && (n[3].content = Se(n[3].content, t))), n;
3066
3068
  }
3067
3069
  }
3068
3070
  }
@@ -3220,12 +3222,12 @@ $(be, "prolog", {
3220
3222
  const Ma = (e, t, ...n) => {
3221
3223
  var Y;
3222
3224
  let s, l, u = [], f, E = "", y, v = !1, m = !1, p = !0, c = [], b, g = 0;
3223
- const a = $a(), r = a.firstChild, d = r.children, o = d[0], i = o.firstChild, h = { language: "text", value: E }, k = new Set(n), I = {}, w = (A) => {
3225
+ const a = $a(), r = a.firstChild, d = r.children, o = d[0], i = o.firstChild, h = { language: "text", value: E }, S = new Set(n), I = {}, w = (A) => {
3224
3226
  if (Object.assign(h, A), E = A.value ?? E, s = h.language, !_[s]) throw Error(`Language '${s}' has no grammar.`);
3225
- b = !!h.readOnly, a.style.tabSize = h.tabSize || 2, i.inputMode = b ? "none" : "", i.setAttribute("aria-readonly", b), T(), x(), (l != (l = _[s]) || E != i.value) && (V(), i.value = E, i.selectionEnd = 0, S());
3226
- }, S = () => {
3227
- c = ke(E = i.value, l), z("tokenize", c, s, E);
3228
- let A = Sn(c).split(`
3227
+ b = !!h.readOnly, a.style.tabSize = h.tabSize || 2, i.inputMode = b ? "none" : "", i.setAttribute("aria-readonly", b), T(), x(), (l != (l = _[s]) || E != i.value) && (V(), i.value = E, i.selectionEnd = 0, k());
3228
+ }, k = () => {
3229
+ c = Se(E = i.value, l), z("tokenize", c, s, E);
3230
+ let A = kn(c).split(`
3229
3231
  `), R = 0, L = g, Z = g = A.length;
3230
3232
  for (; A[R] == u[R] && R < Z; ) ++R;
3231
3233
  for (; Z && A[--Z] == u[--L]; ) ;
@@ -3244,8 +3246,8 @@ const Ma = (e, t, ...n) => {
3244
3246
  }
3245
3247
  z("update", E), U(!0), p && setTimeout(setTimeout, 0, () => p = !0), u = A, p = !1;
3246
3248
  }, x = (A) => {
3247
- (A || k).forEach((R) => {
3248
- typeof R == "object" ? (R.update(D, h), A && k.add(R)) : (R(D, h), A || k.delete(R));
3249
+ (A || S).forEach((R) => {
3250
+ typeof R == "object" ? (R.update(D, h), A && S.add(R)) : (R(D, h), A || S.delete(R));
3249
3251
  });
3250
3252
  }, T = ([A, R] = N()) => {
3251
3253
  a.className = `prism-code-editor language-${s}${h.lineNumbers == !1 ? "" : " show-line-numbers"} pce-${h.wordWrap ? "" : "no"}wrap${h.rtl ? " pce-rtl" : ""} pce-${A < R ? "has" : "no"}-selection${m ? " pce-focus" : ""}${b ? " pce-readonly" : ""}`;
@@ -3301,7 +3303,7 @@ const Ma = (e, t, ...n) => {
3301
3303
  keyCommandMap: P,
3302
3304
  extensions: {},
3303
3305
  setOptions: w,
3304
- update: S,
3306
+ update: k,
3305
3307
  getSelection: N,
3306
3308
  setSelection(A, R = A, L) {
3307
3309
  V(), i.setSelectionRange(A, R, L), U(!0);
@@ -3326,7 +3328,7 @@ const Ma = (e, t, ...n) => {
3326
3328
  }), G(D, "beforeinput", (A) => {
3327
3329
  var R;
3328
3330
  (b || A.inputType == "insertText" && ((R = M[A.data]) != null && R.call(M, A, N(), E))) && B(A);
3329
- }), G(D, "input", S), G(D, "blur", () => {
3331
+ }), G(D, "input", k), G(D, "blur", () => {
3330
3332
  Re = null, m = !1, T();
3331
3333
  }), G(D, "focus", () => {
3332
3334
  Re = U, m = !0, T();
@@ -3392,32 +3394,32 @@ const we = (e) => e.replace(/[$+?|.^*()[\]{}\\]/g, "\\$&"), Rt = (e, t) => e.sli
3392
3394
  t.replace(/&/g, "&amp;").replace(/</g, "&lt;")
3393
3395
  ), y && f.selectionStart++) : document.execCommand(t ? "insertText" : "delete", !1, t), fe = 0;
3394
3396
  }, Ie = (e) => e.altKey + e.ctrlKey * 2 + e.metaKey * 4 + e.shiftKey * 8;
3395
- let kt = !1;
3396
- const In = navigator.clipboard, oe = qe ? 4 : 2, Ba = (e) => kt = e, se = (e) => e.search(/\S|$/), Ga = (e = ['""', "''", "``", "()", "[]", "{}"], t = /([^$\w'"`]["'`]|.[[({])[.,:;\])}>\s]|.[[({]`/s) => (n, s) => {
3397
+ let St = !1;
3398
+ const In = navigator.clipboard, oe = qe ? 4 : 2, Ba = (e) => St = e, se = (e) => e.search(/\S|$/), Ga = (e = ['""', "''", "``", "()", "[]", "{}"], t = /([^$\w'"`]["'`]|.[[({])[.,:;\])}>\s]|.[[({]`/s) => (n, s) => {
3397
3399
  let l;
3398
3400
  const { keyCommandMap: u, inputCommandMap: f, getSelection: E, scrollContainer: y } = n, v = ({ insertSpaces: a = !0, tabSize: r } = s) => [a ? " " : " ", a ? r || 2 : 1], m = () => {
3399
3401
  var a;
3400
3402
  return !s.readOnly && !((a = n.extensions.cursor) != null && a.scrollIntoView());
3401
3403
  }, p = ([a, r], [d, o], i, h) => (a < r || !h && t.test((i[r - 1] || " ") + d + (i[r] || " "))) && !H(n, d + i.slice(a, r) + o, null, null, a + 1, r + 1), c = ([a, r], d, o) => a == r && o[r] == d && !n.setSelection(a + 1), b = (a, r, d, o, i, h) => {
3402
- let k = r.join(`
3404
+ let S = r.join(`
3403
3405
  `);
3404
- if (k != a.join(`
3406
+ if (S != a.join(`
3405
3407
  `)) {
3406
- const I = a.length - 1, w = r[I], S = a[I], x = S.length - w.length, T = r[0].length - a[0].length, N = d + se((T < 0 ? r : a)[0]), P = o - S.length + se(x > 0 ? w : S), M = d - o + k.length + x, V = N > i ? i : Math.max(N, i + T), z = h + d - o + k.length;
3408
+ const I = a.length - 1, w = r[I], k = a[I], x = k.length - w.length, T = r[0].length - a[0].length, N = d + se((T < 0 ? r : a)[0]), P = o - k.length + se(x > 0 ? w : k), M = d - o + S.length + x, V = N > i ? i : Math.max(N, i + T), z = h + d - o + S.length;
3407
3409
  H(
3408
3410
  n,
3409
- k,
3411
+ S,
3410
3412
  d,
3411
3413
  o,
3412
3414
  V,
3413
3415
  h < P ? z + x : Math.max(P + M, z)
3414
3416
  );
3415
3417
  }
3416
- }, g = (a, r, d, o, i, h, k, I) => {
3418
+ }, g = (a, r, d, o, i, h, S, I) => {
3417
3419
  b(
3418
3420
  r,
3419
3421
  r.map(
3420
- a ? (w) => w.slice(se(w) ? I - se(w) % I : 0) : (w) => w && k.repeat(I - se(w) % I) + w
3422
+ a ? (w) => w.slice(se(w) ? I - se(w) % I : 0) : (w) => w && S.repeat(I - se(w) % I) + w
3421
3423
  ),
3422
3424
  d,
3423
3425
  o,
@@ -3433,56 +3435,56 @@ const In = navigator.clipboard, oe = qe ? 4 : 2, Ba = (e) => kt = e, se = (e) =>
3433
3435
  const o = (h = (i = ct[dt(n)]) == null ? void 0 : i.autoCloseTags) == null ? void 0 : h.call(i, r, d, n);
3434
3436
  o && (H(n, ">" + o, null, null, r[0] + 1), B(a));
3435
3437
  }, u.Tab = (a, [r, d], o) => {
3436
- if (kt || s.readOnly || Ie(a) & 6) return;
3437
- const [i, h] = v(s), k = a.shiftKey, [I, w, S] = ee(o, r, d);
3438
- return r < d || k ? g(k, I, w, S, r, d, i, h) : H(n, i.repeat(h - (r - w) % h)), m();
3438
+ if (St || s.readOnly || Ie(a) & 6) return;
3439
+ const [i, h] = v(s), S = a.shiftKey, [I, w, k] = ee(o, r, d);
3440
+ return r < d || S ? g(S, I, w, k, r, d, i, h) : H(n, i.repeat(h - (r - w) % h)), m();
3439
3441
  }, u.Enter = (a, r, d) => {
3440
- var i, h, k;
3442
+ var i, h, S;
3441
3443
  const o = Ie(a) & 7;
3442
3444
  if (!o || o == oe) {
3443
3445
  o && (r[0] = r[1] = ee(d, r[1])[2]);
3444
- const [I, w] = v(), [S, x] = r, T = (i = ct[dt(n)]) == null ? void 0 : i.autoIndent, N = Math.floor(se(Rt(d, S)) / w) * w, P = (h = T == null ? void 0 : T[0]) != null && h.call(T, r, d, n) ? w : 0, M = (k = T == null ? void 0 : T[1]) == null ? void 0 : k.call(T, r, d, n), V = `
3446
+ const [I, w] = v(), [k, x] = r, T = (i = ct[dt(n)]) == null ? void 0 : i.autoIndent, N = Math.floor(se(Rt(d, k)) / w) * w, P = (h = T == null ? void 0 : T[0]) != null && h.call(T, r, d, n) ? w : 0, M = (S = T == null ? void 0 : T[1]) == null ? void 0 : S.call(T, r, d, n), V = `
3445
3447
  ` + I.repeat(N + P) + (M ? `
3446
3448
  ` + I.repeat(N) : "");
3447
3449
  if (V[1] || d[x])
3448
- return H(n, V, S, x, S + N + P + 1), m();
3450
+ return H(n, V, k, x, k + N + P + 1), m();
3449
3451
  }
3450
3452
  }, u.Backspace = (a, [r, d], o) => {
3451
3453
  if (r == d) {
3452
- const i = Rt(o, r), h = s.tabSize || 2, k = e.includes(o.slice(r - 1, r + 1)), I = /[^ ]/.test(i) ? 0 : (i.length - 1) % h + 1;
3453
- if (k || I > 1)
3454
- return H(n, "", r - (k ? 1 : I), r + k), m();
3454
+ const i = Rt(o, r), h = s.tabSize || 2, S = e.includes(o.slice(r - 1, r + 1)), I = /[^ ]/.test(i) ? 0 : (i.length - 1) % h + 1;
3455
+ if (S || I > 1)
3456
+ return H(n, "", r - (S ? 1 : I), r + S), m();
3455
3457
  }
3456
3458
  };
3457
3459
  for (let a = 0; a < 2; a++)
3458
3460
  u[a ? "ArrowDown" : "ArrowUp"] = (r, [d, o], i) => {
3459
3461
  const h = Ie(r);
3460
3462
  if (h == 1) {
3461
- const k = a ? d : We(i, d) - 1, I = a ? i.indexOf(`
3463
+ const S = a ? d : We(i, d) - 1, I = a ? i.indexOf(`
3462
3464
  `, o) + 1 : o;
3463
- if (k > -1 && I > 0) {
3464
- const [w, S, x] = ee(i, k, I), T = w[a ? "pop" : "shift"](), N = (T.length + 1) * (a ? 1 : -1);
3465
+ if (S > -1 && I > 0) {
3466
+ const [w, k, x] = ee(i, S, I), T = w[a ? "pop" : "shift"](), N = (T.length + 1) * (a ? 1 : -1);
3465
3467
  w[a ? "unshift" : "push"](T), H(n, w.join(`
3466
- `), S, x, d + N, o + N);
3468
+ `), k, x, d + N, o + N);
3467
3469
  }
3468
3470
  return m();
3469
3471
  } else if (h == 9) {
3470
- const [k, I, w] = ee(i, d, o), S = k.join(`
3471
- `), x = a ? S.length + 1 : 0;
3472
- return H(n, S + `
3473
- ` + S, I, w, d + x, o + x), m();
3472
+ const [S, I, w] = ee(i, d, o), k = S.join(`
3473
+ `), x = a ? k.length + 1 : 0;
3474
+ return H(n, k + `
3475
+ ` + k, I, w, d + x, o + x), m();
3474
3476
  } else if (h == 2 && !qe)
3475
3477
  return y.scrollBy(0, Ua(y, "lineHeight") * (a ? 1 : -1)), !0;
3476
3478
  };
3477
3479
  G(n, "keydown", (a) => {
3478
- var k;
3480
+ var S;
3479
3481
  const r = Ie(a), d = a.keyCode, [o, i, h] = E();
3480
3482
  if (r == oe && (d == 221 || d == 219))
3481
3483
  g(d == 219, ...ee(n.value, o, i), o, i, ...v()), m(), B(a);
3482
3484
  else if (r == (qe ? 10 : 2) && d == 77)
3483
- Ba(!kt), B(a);
3485
+ Ba(!St), B(a);
3484
3486
  else if (d == 191 && r == oe || d == 65 && r == 9) {
3485
- const I = n.value, w = r == 9, S = w ? o : We(I, o), x = ct[dt(n, S)] || {}, { line: T, block: N } = ((k = x.getComments) == null ? void 0 : k.call(x, n, S, I)) || x.comments || {}, [P, M, V] = ee(I, o, i), z = P.length - 1;
3487
+ const I = n.value, w = r == 9, k = w ? o : We(I, o), x = ct[dt(n, k)] || {}, { line: T, block: N } = ((S = x.getComments) == null ? void 0 : S.call(x, n, k, I)) || x.comments || {}, [P, M, V] = ee(I, o, i), z = P.length - 1;
3486
3488
  if (w) {
3487
3489
  if (N) {
3488
3490
  const [U, D] = N, Y = I.slice(o, i), A = I.slice(0, o).search(we(U) + " ?$"), R = RegExp("^ ?" + we(D)).test(I.slice(i));
@@ -3520,22 +3522,22 @@ const In = navigator.clipboard, oe = qe ? 4 : 2, Ba = (e) => kt = e, se = (e) =>
3520
3522
  H(n, Z, M, V, K, Math.max(K, _e)), m(), B(a);
3521
3523
  }
3522
3524
  } else if (r == 8 + oe && d == 75) {
3523
- const I = n.value, [w, S, x] = ee(I, o, i), T = h > "f" ? i - x + w.pop().length : o - S, N = et(I, x + 1) - x - 1;
3525
+ const I = n.value, [w, k, x] = ee(I, o, i), T = h > "f" ? i - x + w.pop().length : o - k, N = et(I, x + 1) - x - 1;
3524
3526
  H(
3525
3527
  n,
3526
3528
  "",
3527
- S - !!S,
3528
- x + !S,
3529
- S + Math.min(T, N)
3529
+ k - !!k,
3530
+ x + !k,
3531
+ k + Math.min(T, N)
3530
3532
  ), m(), B(a);
3531
3533
  }
3532
3534
  }), ["copy", "cut", "paste"].forEach(
3533
3535
  (a) => G(n, a, (r) => {
3534
3536
  const [d, o] = E();
3535
3537
  if (d == o && In) {
3536
- const [[i], h, k] = ee(n.value, d, o);
3538
+ const [[i], h, S] = ee(n.value, d, o);
3537
3539
  a == "paste" ? r.clipboardData.getData("text/plain") == l && (H(n, l + `
3538
- `, h, h, d + l.length + 1), m(), B(r)) : (In.writeText(l = i), a == "cut" && (H(n, "", h, k + 1), m()), B(r));
3540
+ `, h, h, d + l.length + 1), m(), B(r)) : (In.writeText(l = i), a == "cut" && (H(n, "", h, S + 1), m()), B(r));
3539
3541
  }
3540
3542
  })
3541
3543
  );
@@ -3554,8 +3556,8 @@ const In = navigator.clipboard, oe = qe ? 4 : 2, Ba = (e) => kt = e, se = (e) =>
3554
3556
  /history/.test(i) ? (b(t + (i[7] == "U" ? -1 : 1)), B(d)) : (y = s && (u == i || h - E < 99 && i.slice(-4) == "Drop") && !fe && (o != " " || f == o)) || (p[t][2] = fe || m()), l = !0, f = o, E = h, u = i;
3555
3557
  }), G(a, "input", () => c(t + !y)), G(a, "keydown", (d) => {
3556
3558
  if (!r.readOnly) {
3557
- const o = Ie(d), i = d.keyCode, h = o == oe && i == 90, k = o == oe + 8 && i == 90 || !qe && o == oe && i == 89;
3558
- h ? (b(t - 1), B(d)) : k && (b(t + 1), B(d));
3559
+ const o = Ie(d), i = d.keyCode, h = o == oe && i == 90, S = o == oe + 8 && i == 90 || !qe && o == oe && i == 89;
3560
+ h ? (b(t - 1), B(d)) : S && (b(t + 1), B(d));
3559
3561
  }
3560
3562
  });
3561
3563
  };
@@ -3595,10 +3597,10 @@ const In = navigator.clipboard, oe = qe ? 4 : 2, Ba = (e) => kt = e, se = (e) =>
3595
3597
  const g = p(b.split(`
3596
3598
  `)), a = g.length;
3597
3599
  for (let r = 0, d = [], o = g[0]; o; r++) {
3598
- const i = (u[r] || (u[r] = qa())).style, [h, k, I] = o, w = f[r];
3599
- o = g[r + 1], h != (w == null ? void 0 : w[0]) && (i.top = h + "00%"), k != (w == null ? void 0 : w[1]) && (i.height = k + "00%"), I != (w == null ? void 0 : w[2]) && (i.left = I * 100 + "%");
3600
- const S = d[0] != h && (o == null ? void 0 : o[0]) != h, x = d[0] + d[1] != h + k && (o == null ? void 0 : o[0]) + (o == null ? void 0 : o[1]) != h + k;
3601
- for (let T = -S, N = k + x; T < N; T++)
3600
+ const i = (u[r] || (u[r] = qa())).style, [h, S, I] = o, w = f[r];
3601
+ o = g[r + 1], h != (w == null ? void 0 : w[0]) && (i.top = h + "00%"), S != (w == null ? void 0 : w[1]) && (i.height = S + "00%"), I != (w == null ? void 0 : w[2]) && (i.left = I * 100 + "%");
3602
+ const k = d[0] != h && (o == null ? void 0 : o[0]) != h, x = d[0] + d[1] != h + S && (o == null ? void 0 : o[0]) + (o == null ? void 0 : o[1]) != h + S;
3603
+ for (let T = -k, N = S + x; T < N; T++)
3602
3604
  n[T + h] = r;
3603
3605
  d = f[r] = g[r];
3604
3606
  }
@@ -3610,12 +3612,12 @@ const In = navigator.clipboard, oe = qe ? 4 : 2, Ba = (e) => kt = e, se = (e) =>
3610
3612
  }, p = (b) => {
3611
3613
  const g = b.length, a = [], r = [];
3612
3614
  for (let d = 0, o = -1, i = 0, h = 0; ; i++) {
3613
- const k = i == g, I = k ? 0 : y[i] = c(b[i]);
3615
+ const S = i == g, I = S ? 0 : y[i] = c(b[i]);
3614
3616
  if (I < 0)
3615
3617
  o < 0 && (o = i);
3616
3618
  else {
3617
3619
  for (let w = I; w < d; w++)
3618
- a[w][1] = (o < 0 || w == I && !k ? i : o) - a[w][0];
3620
+ a[w][1] = (o < 0 || w == I && !S ? i : o) - a[w][0];
3619
3621
  for (let w = d; w < I; )
3620
3622
  r[h++] = a[w] = [
3621
3623
  o < 0 || w > d ? i : o,
@@ -3624,7 +3626,7 @@ const In = navigator.clipboard, oe = qe ? 4 : 2, Ba = (e) => kt = e, se = (e) =>
3624
3626
  ];
3625
3627
  o = -1, d = I;
3626
3628
  }
3627
- if (k) break;
3629
+ if (S) break;
3628
3630
  }
3629
3631
  return y.length = g, r;
3630
3632
  }, c = (b) => {
@@ -3688,8 +3690,8 @@ const In = navigator.clipboard, oe = qe ? 4 : 2, Ba = (e) => kt = e, se = (e) =>
3688
3690
  if (E[s] = [b, c, 0, r, !!d, c + a], d) u[l++] = [s, d];
3689
3691
  else
3690
3692
  for (let i = l; i; ) {
3691
- let [h, k] = u[--i];
3692
- o == k && (y[y[s] = h] = s, E[s][2] = E[h][2] = l = i, i = 0);
3693
+ let [h, S] = u[--i];
3694
+ o == S && (y[y[s] = h] = s, E[s][2] = E[h][2] = l = i, i = 0);
3693
3695
  }
3694
3696
  s++;
3695
3697
  }
@@ -3711,8 +3713,8 @@ const In = navigator.clipboard, oe = qe ? 4 : 2, Ba = (e) => kt = e, se = (e) =>
3711
3713
  const o = r[0].length, i = r[2] ? n.substr(p + o, r[1].length) : "", h = r[r.length - 1].length < 2 && (c || !Xa.test(i));
3712
3714
  if (r[2] && c && y(r, m, p), h)
3713
3715
  if (o > 1)
3714
- for (let k = u; k; )
3715
- i == f[--k][1] && (t[t[l] = f[u = k][0]] = l, k = 0);
3716
+ for (let S = u; S; )
3717
+ i == f[--S][1] && (t[t[l] = f[u = S][0]] = l, S = 0);
3716
3718
  else
3717
3719
  f[u++] = [l, i];
3718
3720
  s[l++] = [
@@ -3750,7 +3752,7 @@ const In = navigator.clipboard, oe = qe ? 4 : 2, Ba = (e) => kt = e, se = (e) =>
3750
3752
  let v, m, p;
3751
3753
  E == y && e.focused && (p = Ja(E, l), p + 1 && (p = u[p], p + 1 && (v = je(e, ".tag>.tag")) && (m = je(e, ".tag>.tag", 2, 0, l[p][1])))), n != v && (f(!0), n = v, s = m, f());
3752
3754
  });
3753
- }, tr = "_wrap_1x3wi_1", nr = "_blockInfoEditable_1x3wi_30", kn = {
3755
+ }, tr = "_wrap_1x3wi_1", nr = "_blockInfoEditable_1x3wi_30", Sn = {
3754
3756
  wrap: tr,
3755
3757
  blockInfoEditable: nr
3756
3758
  }, Pe = [
@@ -3772,7 +3774,7 @@ const In = navigator.clipboard, oe = qe ? 4 : 2, Ba = (e) => kt = e, se = (e) =>
3772
3774
  { value: "php", label: "PHP" }
3773
3775
  ], ut = [2, 4, 8];
3774
3776
  function ar(e) {
3775
- const t = oa(), n = Bt(null), s = nt(() => ca(ea.name, e == null ? void 0 : e.editor), [e == null ? void 0 : e.editor]), l = Bt(null), u = e.node.attrs.code || e.node.textContent || "", f = nt((c) => {
3777
+ const t = oa(), n = $t(null), s = nt(() => ca(ea.name, e == null ? void 0 : e.editor), [e == null ? void 0 : e.editor]), l = $t(null), u = e.node.attrs.code || e.node.textContent || "", f = nt((c) => {
3776
3778
  c == null || c.stopPropagation(), setTimeout(() => {
3777
3779
  var b, g, a;
3778
3780
  (a = (g = (b = l.current) == null ? void 0 : b.textarea) == null ? void 0 : g.focus) == null || a.call(g);
@@ -3807,7 +3809,7 @@ function ar(e) {
3807
3809
  }, p = nt((c) => {
3808
3810
  f(c);
3809
3811
  }, [f]);
3810
- return Gt(() => {
3812
+ return Dt(() => {
3811
3813
  if (n.current) {
3812
3814
  const c = m(e.node.attrs);
3813
3815
  l.current = Ma(n.current, {
@@ -3841,23 +3843,23 @@ function ar(e) {
3841
3843
  var c, b;
3842
3844
  (c = l.current) != null && c.remove && ((b = l.current) == null || b.remove());
3843
3845
  };
3844
- }, [n]), Gt(() => {
3846
+ }, [n]), Dt(() => {
3845
3847
  var c, b;
3846
3848
  if ((c = l.current) != null && c.setOptions) {
3847
3849
  const g = m(e.node.attrs);
3848
3850
  (b = l.current) == null || b.setOptions(g);
3849
3851
  }
3850
- }, [l, e.node.attrs]), /* @__PURE__ */ C(ta, { className: Te(kn.wrap, "render-wrapper"), children: /* @__PURE__ */ C(
3852
+ }, [l, e.node.attrs]), /* @__PURE__ */ C(ta, { className: Te(Sn.wrap, "render-wrapper"), children: /* @__PURE__ */ C(
3851
3853
  "div",
3852
3854
  {
3853
3855
  onClick: p,
3854
3856
  ref: n,
3855
3857
  className: Te("richtext-node-container richtext-hover-shadow richtext-select-outline richtext-node-code-block !richtext-my-[10px]", {
3856
- [kn.blockInfoEditable]: !t
3858
+ [Sn.blockInfoEditable]: !t
3857
3859
  }),
3858
3860
  children: /* @__PURE__ */ tt("div", { className: "richtext-code-block-toolbar", children: [
3859
3861
  /* @__PURE__ */ C("div", { children: /* @__PURE__ */ tt(
3860
- $t,
3862
+ Ft,
3861
3863
  {
3862
3864
  defaultValue: e.node.attrs.language,
3863
3865
  disabled: !t,
@@ -3867,14 +3869,14 @@ function ar(e) {
3867
3869
  }), f();
3868
3870
  },
3869
3871
  children: [
3870
- /* @__PURE__ */ C(Dt, { className: "richtext-h-7 richtext-w-[160px] richtext-border-none richtext-text-sm richtext-outline-none hover:richtext-bg-[#5a5d5e4f]", children: /* @__PURE__ */ C(la, { placeholder: "Select language" }) }),
3872
+ /* @__PURE__ */ C(Ut, { className: "richtext-h-7 richtext-w-[160px] richtext-border-none richtext-text-sm richtext-outline-none hover:richtext-bg-[#5a5d5e4f]", children: /* @__PURE__ */ C(la, { placeholder: "Select language" }) }),
3871
3873
  /* @__PURE__ */ C(
3872
- Ft,
3874
+ Bt,
3873
3875
  {
3874
3876
  onCloseAutoFocus: (c) => c.preventDefault(),
3875
3877
  children: Pe == null ? void 0 : Pe.map(
3876
3878
  (c) => /* @__PURE__ */ C(
3877
- Ut,
3879
+ Gt,
3878
3880
  {
3879
3881
  value: c.value,
3880
3882
  children: c.label
@@ -3938,7 +3940,7 @@ function ar(e) {
3938
3940
  ),
3939
3941
  /* @__PURE__ */ C("div", { className: "toolbar-divider" }),
3940
3942
  /* @__PURE__ */ C("div", { children: /* @__PURE__ */ tt(
3941
- $t,
3943
+ Ft,
3942
3944
  {
3943
3945
  defaultValue: e.node.attrs.tabSize,
3944
3946
  disabled: !t,
@@ -3948,7 +3950,7 @@ function ar(e) {
3948
3950
  }), f();
3949
3951
  },
3950
3952
  children: [
3951
- /* @__PURE__ */ C(Dt, { className: "richtext-h-7 richtext-w-[60px] richtext-border-none richtext-text-sm richtext-outline-none hover:richtext-bg-[#5a5d5e4f]", children: /* @__PURE__ */ C(
3953
+ /* @__PURE__ */ C(Ut, { className: "richtext-h-7 richtext-w-[60px] richtext-border-none richtext-text-sm richtext-outline-none hover:richtext-bg-[#5a5d5e4f]", children: /* @__PURE__ */ C(
3952
3954
  Ee,
3953
3955
  {
3954
3956
  className: "richtext-size-4",
@@ -3956,11 +3958,11 @@ function ar(e) {
3956
3958
  }
3957
3959
  ) }),
3958
3960
  /* @__PURE__ */ C(
3959
- Ft,
3961
+ Bt,
3960
3962
  {
3961
3963
  onCloseAutoFocus: (c) => c.preventDefault(),
3962
3964
  children: ut == null ? void 0 : ut.map((c) => /* @__PURE__ */ C(
3963
- Ut,
3965
+ Gt,
3964
3966
  {
3965
3967
  value: c,
3966
3968
  children: c
@@ -4104,7 +4106,7 @@ const rr = /^`{3}([a-z]+)?\s$/, ir = /^~{3}([a-z]+)?\s$/, ea = /* @__PURE__ */ n
4104
4106
  });
4105
4107
  export {
4106
4108
  ea as CodeBlock,
4107
- br as RichTextCodeBlock,
4109
+ gr as RichTextCodeBlock,
4108
4110
  rr as backtickInputRegex,
4109
4111
  ir as tildeInputRegex
4110
4112
  };
package/lib/CodeView.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-BBNITgNi.cjs"),n=require("react/jsx-runtime"),v=require("./index-BvIJKpX1.cjs");require("react");const r=require("./useButtonProps-DEtmDVPr.cjs");function w(){const e=r.useButtonProps(a.name),{icon:t=void 0,tooltip:o=void 0,shortcutKeys:i=void 0,tooltipOptions:d={},action:s=void 0,isActive:u=void 0}=(e==null?void 0:e.componentProps)??{},{dataState:l,disabled:c,update:p}=r.useToggleActive(u),g=()=>{c||s&&(s(),p())};return e?n.jsx(v.ActionButton,{action:g,dataState:l,disabled:c,icon:t,shortcutKeys:i,tooltip:o,tooltipOptions:d}):n.jsx(n.Fragment,{})}const a=m.Extension.create({name:"codeView",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:o}){return{componentProps:{action:()=>{t.commands.toggleCodeView()},isActive:()=>t.storage.codeView.isActive,disabled:!1,icon:"Html",tooltip:o("editor.codeView.tooltip")||"View HTML Code",customClass:"tiptap-code-view-button"}}}}},addStorage(){return{isActive:!1,originalContent:""}},addCommands(){return{toggleCodeView:()=>({editor:e})=>{const t=e.storage.codeView.isActive;if(t)e.commands.setContent(e.getText());else{const o=e.getHTML();e.storage.codeView.originalContent=o;const i=o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");e.commands.setContent(`<div class="tiptap-code-view-wrapper">${i}</div>`)}return e.storage.codeView.isActive=!t,!0}}}});exports.CodeView=a;exports.RichTextCodeView=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./clsx-CXbNJWDD.cjs"),n=require("react/jsx-runtime"),v=require("./toggle-BYvLnjCL.cjs");require("react");require("./index-CX4pNJlH.cjs");require("./theme.cjs");const r=require("./useButtonProps-CydzndG1.cjs");function w(){const e=r.useButtonProps(a.name),{icon:t=void 0,tooltip:o=void 0,shortcutKeys:i=void 0,tooltipOptions:d={},action:s=void 0,isActive:u=void 0}=(e==null?void 0:e.componentProps)??{},{dataState:l,disabled:c,update:p}=r.useToggleActive(u),g=()=>{c||s&&(s(),p())};return e?n.jsx(v.ActionButton,{action:g,dataState:l,disabled:c,icon:t,shortcutKeys:i,tooltip:o,tooltipOptions:d}):n.jsx(n.Fragment,{})}const a=m.Extension.create({name:"codeView",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:o}){return{componentProps:{action:()=>{t.commands.toggleCodeView()},isActive:()=>t.storage.codeView.isActive,disabled:!1,icon:"Html",tooltip:o("editor.codeView.tooltip")||"View HTML Code",customClass:"tiptap-code-view-button"}}}}},addStorage(){return{isActive:!1,originalContent:""}},addCommands(){return{toggleCodeView:()=>({editor:e})=>{const t=e.storage.codeView.isActive;if(t)e.commands.setContent(e.getText());else{const o=e.getHTML();e.storage.codeView.originalContent=o;const i=o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");e.commands.setContent(`<div class="tiptap-code-view-wrapper">${i}</div>`)}return e.storage.codeView.isActive=!t,!0}}}});exports.CodeView=a;exports.RichTextCodeView=w;
package/lib/CodeView.js CHANGED
@@ -1,9 +1,11 @@
1
- import { E as l } from "./index-sVScpCFG.js";
1
+ import { E as l } from "./clsx-DmuN0U_8.js";
2
2
  import { jsx as c, Fragment as g } from "react/jsx-runtime";
3
- import { A as u } from "./index-BIqaogQg.js";
3
+ import { A as u } from "./toggle-Bxwwb_Kp.js";
4
4
  import "react";
5
- import { u as v, a as w } from "./useButtonProps-C_bqxmHi.js";
6
- function h() {
5
+ import "./index-D9JOHlso.js";
6
+ import "./theme.js";
7
+ import { u as v, a as w } from "./useButtonProps-CfYtuEnd.js";
8
+ function b() {
7
9
  const t = v(C.name), {
8
10
  icon: e = void 0,
9
11
  tooltip: o = void 0,
@@ -11,14 +13,14 @@ function h() {
11
13
  tooltipOptions: a = {},
12
14
  action: n = void 0,
13
15
  isActive: r = void 0
14
- } = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: d, disabled: s, update: p } = w(r), m = () => {
15
- s || n && (n(), p());
16
+ } = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: p, disabled: s, update: d } = w(r), m = () => {
17
+ s || n && (n(), d());
16
18
  };
17
19
  return t ? /* @__PURE__ */ c(
18
20
  u,
19
21
  {
20
22
  action: m,
21
- dataState: d,
23
+ dataState: p,
22
24
  disabled: s,
23
25
  icon: e,
24
26
  shortcutKeys: i,
@@ -77,5 +79,5 @@ const C = /* @__PURE__ */ l.create({
77
79
  });
78
80
  export {
79
81
  C as CodeView,
80
- h as RichTextCodeView
82
+ b as RichTextCodeView
81
83
  };
package/lib/Color.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-BZ6DfR2r.cjs"),t=require("react/jsx-runtime"),d=require("react"),g=require("./index-BvIJKpX1.cjs"),v=require("./separator-DLRVddHS.cjs"),h=require("./useButtonProps-DEtmDVPr.cjs"),j=require("./Icon-gtc3g-VK.cjs");function m({fill:e}){return t.jsx("svg",{height:"18px",version:"1.1",viewBox:"0 0 240 240",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:1,children:t.jsx("g",{transform:"translate(0.000000, 0.500000)",children:t.jsxs("g",{transform:"translate(39.000000, 17.353553)",children:[t.jsx("path",{d:"M11,201.146447 L167,201.146447 C173.075132,201.146447 178,206.071314 178,212.146447 C178,218.221579 173.075132,223.146447 167,223.146447 L11,223.146447 C4.92486775,223.146447 7.43989126e-16,218.221579 0,212.146447 C-7.43989126e-16,206.071314 4.92486775,201.146447 11,201.146447 Z",fill:typeof e=="string"?e:"#000",fillRule:"evenodd"}),t.jsx("path",{d:"M72.3425855,16.8295583 C75.799482,7.50883712 86.1577877,2.75526801 95.4785089,6.21216449 C100.284516,7.99463061 104.096358,11.7387855 105.968745,16.4968188 L106.112518,16.8745422 L159.385152,161.694068 C161.291848,166.877345 158.635655,172.624903 153.452378,174.531599 C148.358469,176.405421 142.719567,173.872338 140.716873,168.864661 L140.614848,168.598825 L89.211,28.86 L37.3759214,168.623816 C35.4885354,173.712715 29.8981043,176.351047 24.7909589,174.617647 L24.5226307,174.522368 C19.4337312,172.634982 16.7953993,167.044551 18.5287999,161.937406 L18.6240786,161.669077 L72.3425855,16.8295583 Z",fill:"currentColor",fillRule:"nonzero"}),t.jsx("path",{d:"M121,103.146447 C126.522847,103.146447 131,107.623599 131,113.146447 C131,118.575687 126.673329,122.994378 121.279905,123.142605 L121,123.146447 L55,123.146447 C49.4771525,123.146447 45,118.669294 45,113.146447 C45,107.717207 49.3266708,103.298515 54.7200952,103.150288 L55,103.146447 L121,103.146447 Z",fill:"currentColor",fillRule:"nonzero"})]})})})})}function L(){const e=h.useButtonProps(C.name),{tooltip:o=void 0,isActive:s=void 0,defaultColor:r=void 0,colors:n,action:i}=(e==null?void 0:e.componentProps)??{},{disabled:l,dataState:c}=h.useActive(s),[f,u]=d.useState(r);d.useEffect(()=>{u(c)},[c]);function x(a){l||i&&(i==null||i(a),u(a))}return e?t.jsx(v.ColorPicker,{colors:n,disabled:l,onChange:x,value:f,children:t.jsx(g.ActionButton,{disabled:l,tooltip:o,children:t.jsxs("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-gap-[4px] richtext-text-sm",children:[t.jsx(m,{fill:c}),t.jsx(j.IconComponent,{className:"!richtext-h-3 !richtext-w-3 richtext-text-zinc-500",name:"MenuDown"})]})})}):t.jsx(t.Fragment,{})}const C=p.Color.extend({addStorage(){return{currentColor:this.options.defaultColor||void 0}},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:o,t:s,extension:r}){return{componentProps:{colors:r.options.colors,defaultColor:r.options.defaultColor,action:n=>{if(typeof n=="string"){o.storage.color.currentColor=n,o.chain().focus().setColor(n).run();return}o.chain().focus().unsetColor().run()},isActive:()=>{const{color:n}=o.getAttributes("textStyle");return n},disabled:!1,shortcutKeys:r.options.shortcutKeys??["⇧","alt","C"],tooltip:s("editor.color.tooltip")}}}}},addKeyboardShortcuts(){var e;return{...(e=this.parent)==null?void 0:e.call(this),"Alt-Shift-c":()=>{const o=this.storage.currentColor||this.options.defaultColor;if(!o){const{color:r}=this.editor.getAttributes("textStyle");return r?this.editor.chain().focus().unsetColor().run():!1}return this.editor.isActive("textStyle",{color:o})?this.editor.chain().focus().unsetColor().run():this.editor.chain().focus().setColor(o).run()}}}});exports.Color=C;exports.RichTextColor=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-CjhjjJsN.cjs"),t=require("react/jsx-runtime"),d=require("react"),g=require("./toggle-BYvLnjCL.cjs"),v=require("./separator-CJ_adziN.cjs");require("./index-CX4pNJlH.cjs");require("./theme.cjs");const h=require("./useButtonProps-CydzndG1.cjs"),j=require("./Icon-CiR8RqdQ.cjs");function m({fill:e}){return t.jsx("svg",{height:"18px",version:"1.1",viewBox:"0 0 240 240",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:1,children:t.jsx("g",{transform:"translate(0.000000, 0.500000)",children:t.jsxs("g",{transform:"translate(39.000000, 17.353553)",children:[t.jsx("path",{d:"M11,201.146447 L167,201.146447 C173.075132,201.146447 178,206.071314 178,212.146447 C178,218.221579 173.075132,223.146447 167,223.146447 L11,223.146447 C4.92486775,223.146447 7.43989126e-16,218.221579 0,212.146447 C-7.43989126e-16,206.071314 4.92486775,201.146447 11,201.146447 Z",fill:typeof e=="string"?e:"#000",fillRule:"evenodd"}),t.jsx("path",{d:"M72.3425855,16.8295583 C75.799482,7.50883712 86.1577877,2.75526801 95.4785089,6.21216449 C100.284516,7.99463061 104.096358,11.7387855 105.968745,16.4968188 L106.112518,16.8745422 L159.385152,161.694068 C161.291848,166.877345 158.635655,172.624903 153.452378,174.531599 C148.358469,176.405421 142.719567,173.872338 140.716873,168.864661 L140.614848,168.598825 L89.211,28.86 L37.3759214,168.623816 C35.4885354,173.712715 29.8981043,176.351047 24.7909589,174.617647 L24.5226307,174.522368 C19.4337312,172.634982 16.7953993,167.044551 18.5287999,161.937406 L18.6240786,161.669077 L72.3425855,16.8295583 Z",fill:"currentColor",fillRule:"nonzero"}),t.jsx("path",{d:"M121,103.146447 C126.522847,103.146447 131,107.623599 131,113.146447 C131,118.575687 126.673329,122.994378 121.279905,123.142605 L121,123.146447 L55,123.146447 C49.4771525,123.146447 45,118.669294 45,113.146447 C45,107.717207 49.3266708,103.298515 54.7200952,103.150288 L55,103.146447 L121,103.146447 Z",fill:"currentColor",fillRule:"nonzero"})]})})})})}function L(){const e=h.useButtonProps(C.name),{tooltip:o=void 0,isActive:s=void 0,defaultColor:r=void 0,colors:n,action:i}=(e==null?void 0:e.componentProps)??{},{disabled:l,dataState:c}=h.useActive(s),[f,u]=d.useState(r);d.useEffect(()=>{u(c)},[c]);function x(a){l||i&&(i==null||i(a),u(a))}return e?t.jsx(v.ColorPicker,{colors:n,disabled:l,onChange:x,value:f,children:t.jsx(g.ActionButton,{disabled:l,tooltip:o,children:t.jsxs("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-gap-[4px] richtext-text-sm",children:[t.jsx(m,{fill:c}),t.jsx(j.IconComponent,{className:"!richtext-h-3 !richtext-w-3 richtext-text-zinc-500",name:"MenuDown"})]})})}):t.jsx(t.Fragment,{})}const C=p.Color.extend({addStorage(){return{currentColor:this.options.defaultColor||void 0}},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:o,t:s,extension:r}){return{componentProps:{colors:r.options.colors,defaultColor:r.options.defaultColor,action:n=>{if(typeof n=="string"){o.storage.color.currentColor=n,o.chain().focus().setColor(n).run();return}o.chain().focus().unsetColor().run()},isActive:()=>{const{color:n}=o.getAttributes("textStyle");return n},disabled:!1,shortcutKeys:r.options.shortcutKeys??["⇧","alt","C"],tooltip:s("editor.color.tooltip")}}}}},addKeyboardShortcuts(){var e;return{...(e=this.parent)==null?void 0:e.call(this),"Alt-Shift-c":()=>{const o=this.storage.currentColor||this.options.defaultColor;if(!o){const{color:r}=this.editor.getAttributes("textStyle");return r?this.editor.chain().focus().unsetColor().run():!1}return this.editor.isActive("textStyle",{color:o})?this.editor.chain().focus().unsetColor().run():this.editor.chain().focus().setColor(o).run()}}}});exports.Color=C;exports.RichTextColor=L;