reactjs-tiptap-editor 1.0.13 → 1.0.15

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 (186) hide show
  1. package/lib/{ActionMenuButton-DNj0f_A4.cjs → ActionMenuButton-CWufGd7i.cjs} +1 -1
  2. package/lib/{ActionMenuButton-l5rSmAO_.js → ActionMenuButton-yWfQQXo5.js} +5 -5
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.js +6 -6
  5. package/lib/Blockquote.cjs +1 -1
  6. package/lib/Blockquote.js +4 -4
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +4 -4
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +4 -4
  11. package/lib/Callout.cjs +1 -1
  12. package/lib/Callout.js +36 -40
  13. package/lib/Clear.cjs +1 -1
  14. package/lib/Clear.js +3 -3
  15. package/lib/Code.cjs +1 -1
  16. package/lib/Code.js +4 -4
  17. package/lib/CodeBlock.cjs +1 -1
  18. package/lib/CodeBlock.js +6 -6
  19. package/lib/CodeView.cjs +1 -1
  20. package/lib/CodeView.js +4 -4
  21. package/lib/Color.cjs +1 -1
  22. package/lib/Color.js +6 -6
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +4 -4
  25. package/lib/{Drawer-Cbi_MURj.js → Drawer-C0rJpSQV.js} +8 -8
  26. package/lib/{Drawer-DKU32YW_.cjs → Drawer-CK1NdsE9.cjs} +1 -1
  27. package/lib/Drawer.cjs +1 -1
  28. package/lib/Drawer.js +3 -3
  29. package/lib/Emoji.cjs +1 -1
  30. package/lib/Emoji.js +212 -2076
  31. package/lib/{Excalidraw-CWrVL5hs.js → Excalidraw-ChvBaUFj.js} +6 -6
  32. package/lib/{Excalidraw-Kb-TRcWY.cjs → Excalidraw-FQMP_e8X.cjs} +1 -1
  33. package/lib/Excalidraw.cjs +1 -1
  34. package/lib/Excalidraw.js +2 -2
  35. package/lib/ExportPdf.cjs +1 -1
  36. package/lib/ExportPdf.js +4 -4
  37. package/lib/ExportWord.cjs +1 -1
  38. package/lib/ExportWord.js +4 -4
  39. package/lib/FontFamily.cjs +1 -1
  40. package/lib/FontFamily.js +6 -6
  41. package/lib/FontSize.cjs +1 -1
  42. package/lib/FontSize.js +6 -6
  43. package/lib/Heading.cjs +1 -1
  44. package/lib/Heading.js +6 -6
  45. package/lib/Highlight.cjs +1 -1
  46. package/lib/Highlight.js +6 -6
  47. package/lib/History.cjs +1 -1
  48. package/lib/History.js +22 -22
  49. package/lib/HorizontalRule.cjs +1 -1
  50. package/lib/HorizontalRule.js +4 -4
  51. package/lib/{Icon-yqCglrdK.cjs → Icon-CM1Cjn99.cjs} +1 -1
  52. package/lib/{Icon-Ctva8VeB.js → Icon-r62Z3hkc.js} +2 -2
  53. package/lib/{Iframe-C942bNjs.js → Iframe-C3rQAa7b.js} +6 -6
  54. package/lib/{Iframe-BczF8Hex.cjs → Iframe-Cxf_DSBV.cjs} +1 -1
  55. package/lib/Iframe.cjs +1 -1
  56. package/lib/Iframe.js +2 -2
  57. package/lib/Image-CndKNf1r.js +925 -0
  58. package/lib/Image-uX801fbV.cjs +1 -0
  59. package/lib/Image.cjs +1 -1
  60. package/lib/Image.js +5 -828
  61. package/lib/ImageGif.cjs +1 -1
  62. package/lib/ImageGif.js +9 -9
  63. package/lib/ImportWord.cjs +1 -231
  64. package/lib/ImportWord.js +91 -16623
  65. package/lib/{Indent-C_O5WdyR.js → Indent-CRs7DcJ7.js} +4 -4
  66. package/lib/{Indent-CkEC7x36.cjs → Indent-MRKDhN1d.cjs} +1 -1
  67. package/lib/Indent.cjs +1 -1
  68. package/lib/Indent.js +2 -2
  69. package/lib/Italic.cjs +1 -1
  70. package/lib/Italic.js +4 -4
  71. package/lib/{Katex-D3PEWimM.js → Katex-BwVNxYe7.js} +369 -347
  72. package/lib/Katex-Clvcitiy.cjs +4 -0
  73. package/lib/Katex.cjs +1 -1
  74. package/lib/Katex.js +2 -2
  75. package/lib/LineHeight.cjs +1 -1
  76. package/lib/LineHeight.js +7 -7
  77. package/lib/Link.cjs +1 -1
  78. package/lib/Link.js +2 -2
  79. package/lib/{LinkEditBlock-DL1e2ILk.cjs → LinkEditBlock-CWTjZr7s.cjs} +1 -1
  80. package/lib/{LinkEditBlock-h5054QDo.js → LinkEditBlock-wuQ6wF2z.js} +11 -11
  81. package/lib/Mention.cjs +1 -1
  82. package/lib/Mention.js +41 -63
  83. package/lib/Mermaid.cjs +1 -1
  84. package/lib/Mermaid.js +16 -16
  85. package/lib/MoreMark.cjs +1 -1
  86. package/lib/MoreMark.js +7 -7
  87. package/lib/OrderedList.cjs +1 -1
  88. package/lib/OrderedList.js +4 -4
  89. package/lib/SearchAndReplace.cjs +1 -1
  90. package/lib/SearchAndReplace.js +11 -11
  91. package/lib/SlashCommand.cjs +1 -1
  92. package/lib/SlashCommand.js +9 -9
  93. package/lib/{SlashCommandNodeView-DXUqkx82.js → SlashCommandNodeView-B1gtWo_V.js} +61 -66
  94. package/lib/SlashCommandNodeView-R0CQmgNf.cjs +1 -0
  95. package/lib/Strike.cjs +1 -1
  96. package/lib/Strike.js +4 -4
  97. package/lib/{Table-kY0nbqJo.cjs → Table-Bc7tWR2B.cjs} +1 -1
  98. package/lib/{Table-DdrY4jcM.js → Table-CX-KhOti.js} +22 -22
  99. package/lib/Table.cjs +1 -1
  100. package/lib/Table.js +1 -1
  101. package/lib/TaskList.cjs +1 -1
  102. package/lib/TaskList.js +4 -4
  103. package/lib/TextAlign.cjs +1 -1
  104. package/lib/TextAlign.js +7 -7
  105. package/lib/TextDirection.cjs +1 -1
  106. package/lib/TextDirection.js +7 -7
  107. package/lib/TextUnderline.cjs +1 -1
  108. package/lib/TextUnderline.js +4 -4
  109. package/lib/{Twitter-DjZcVa3l.cjs → Twitter-BEELS4WN.cjs} +1 -1
  110. package/lib/{Twitter-B-JQ3ZJ1.js → Twitter-DWxlLtyE.js} +10 -10
  111. package/lib/Twitter.cjs +1 -1
  112. package/lib/Twitter.js +2 -2
  113. package/lib/Video.cjs +1 -1
  114. package/lib/Video.js +9 -9
  115. package/lib/bubble.cjs +1 -1
  116. package/lib/bubble.js +27 -27
  117. package/lib/{button-Uv01FNnd.js → button-BHVEzoNa.js} +2 -2
  118. package/lib/{button-BS3n6_Aq.cjs → button-C_ES-H6-.cjs} +1 -1
  119. package/lib/{checkbox-C8ByRi7-.cjs → checkbox-DerJy3zE.cjs} +1 -1
  120. package/lib/{checkbox-DEFNwGwb.js → checkbox-H16jHmU7.js} +1 -1
  121. package/lib/{clsx-BWSGDJNJ.js → clsx-DSzxBzvL.js} +11 -11
  122. package/lib/{dialog-DwTMZSt6.js → dialog-BIDVvFgj.js} +1 -1
  123. package/lib/{dialog-Bt5zwGYB.cjs → dialog-C6j99nwb.cjs} +1 -1
  124. package/lib/{dropdown-menu-BetI14G6.js → dropdown-menu-BONvj89O.js} +1 -1
  125. package/lib/{dropdown-menu-Bo68IEOT.cjs → dropdown-menu-Bs9HlT_z.cjs} +1 -1
  126. package/lib/extensions/Emoji/Emoji.d.ts +3 -1
  127. package/lib/extensions/Emoji/components/EmojiList/EmojiNodeView.d.ts +9 -1
  128. package/lib/{index-CHKWG6E8.js → index-4bHF5ovf.js} +1 -1
  129. package/lib/index-BCnlmprm.cjs +1 -0
  130. package/lib/{index-Dujzr6bY.js → index-C5aucGFK.js} +69 -73
  131. package/lib/{index-CcoWj0mF.js → index-CL7JP-Xz.js} +1 -1
  132. package/lib/{index-mR8PNv5P.js → index-CpTykZBR.js} +1 -1
  133. package/lib/index-CyToCRcM.cjs +1 -0
  134. package/lib/{index-BDKHXe7R.js → index-D8li6EQ4.js} +1 -1
  135. package/lib/{index-Doks9cbR.cjs → index-D9U_fxh1.cjs} +1 -1
  136. package/lib/{index-DJbmnBzK.js → index-DR5tIdL7.js} +1 -1
  137. package/lib/index-QbkujP_O.js +273 -0
  138. package/lib/{index-DF5ZPtWM.js → index-w1tuwtjd.js} +54 -56
  139. package/lib/index.cjs +2 -2
  140. package/lib/index.js +4 -4
  141. package/lib/{input-DUBdJD3L.js → input-B5KKrCv9.js} +1 -1
  142. package/lib/{input-Dt_BA_9B.cjs → input-BqK_Byqu.cjs} +1 -1
  143. package/lib/{isNumber-CIgubz2e.js → isNumber-ClwLypY2.js} +1 -1
  144. package/lib/{label-JNOksCA-.cjs → label-B4bPSQ9R.cjs} +1 -1
  145. package/lib/{label-topD46-u.js → label-DRlIWK9v.js} +2 -2
  146. package/lib/locale-bundle.cjs +1 -1
  147. package/lib/locale-bundle.js +1 -1
  148. package/lib/locales/index.d.ts +5 -1
  149. package/lib/{popover-LfNBhRyz.js → popover-3G0SoGLu.js} +1 -1
  150. package/lib/{popover-mL-2sX5r.cjs → popover-Dz8-t65R.cjs} +1 -1
  151. package/lib/renderNodeView-CSazLrKF.js +28 -0
  152. package/lib/renderNodeView-DfLmGrgA.cjs +1 -0
  153. package/lib/{select-DctYuHLH.js → select-BsKwU96B.js} +1 -1
  154. package/lib/{select-CwGYPsPq.cjs → select-DAYrMJGw.cjs} +1 -1
  155. package/lib/{separator-Ddfrhn4D.js → separator-D-k3jqSx.js} +5 -5
  156. package/lib/{separator-NoH_SLRW.cjs → separator-DhFsFHrr.cjs} +1 -1
  157. package/lib/store/commandList.d.ts +5 -1
  158. package/lib/store/store.d.ts +7 -6
  159. package/lib/{store-DNpS8vXA.js → store-BqlO_bdQ.js} +1 -1
  160. package/lib/{store-CkjKIgjQ.cjs → store-DkhlVuvE.cjs} +1 -1
  161. package/lib/{tabs-DRSwUeKP.cjs → tabs-Bj_1FHsB.cjs} +1 -1
  162. package/lib/{tabs-BT3AeqQQ.js → tabs-Do-p89DG.js} +1 -1
  163. package/lib/{textarea-DZzMEDfZ.js → textarea-BU9GfWiN.js} +1 -1
  164. package/lib/{textarea-BDO6XQoF.cjs → textarea-DRQRAKDT.cjs} +1 -1
  165. package/lib/theme.cjs +1 -1
  166. package/lib/theme.js +21 -27
  167. package/lib/{throttle-IERhwcLa.js → throttle-D040PfWL.js} +1 -1
  168. package/lib/{toggle-DKHg5sLm.js → toggle-BFJ-X-Zp.js} +4 -4
  169. package/lib/{toggle-BQHMh_Q-.cjs → toggle-Df4nXsom.cjs} +1 -1
  170. package/lib/{tooltip-BYtGp6FM.cjs → tooltip-BCKvrxQJ.cjs} +1 -1
  171. package/lib/{tooltip-DNKq7zgN.js → tooltip-CKN-cdhm.js} +1 -1
  172. package/lib/{updatePosition-Bie75EFq.js → updatePosition-CDK7OR0i.js} +2 -2
  173. package/lib/{useButtonProps-DVP4s_ER.js → useButtonProps-BCNfeziv.js} +5 -5
  174. package/lib/{useButtonProps-DBJkNDS2.cjs → useButtonProps-BgjZY_Mu.cjs} +1 -1
  175. package/lib/utils/renderNodeView.d.ts +6 -0
  176. package/package.json +16 -3
  177. package/lib/Katex-DW_HjgNM.cjs +0 -4
  178. package/lib/SlashCommandNodeView-BqrmHCpu.cjs +0 -1
  179. package/lib/_commonjsHelpers-BItOPCY9.js +0 -28
  180. package/lib/_commonjsHelpers-BTDuMlIz.cjs +0 -1
  181. package/lib/extensions/Emoji/components/EmojiList/emojis.d.ts +0 -4
  182. package/lib/index-D3RLYf-J.cjs +0 -1
  183. package/lib/react-BEoMZB61.cjs +0 -1
  184. package/lib/react-c9FSfB30.js +0 -27
  185. package/lib/use-toast-Bz3QCOtE.cjs +0 -1
  186. package/lib/use-toast-Crf7-q5H.js +0 -98
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),a=require("react"),s=require("@radix-ui/react-slot");require("./index-D3RLYf-J.cjs");require("./theme.cjs");const d=require("./useButtonProps-DBJkNDS2.cjs"),u=require("./button-BS3n6_Aq.cjs"),m=require("./index-VhKd73hZ.cjs"),c=require("./tooltip-BYtGp6FM.cjs"),f=a.forwardRef(({asChild:h=!1,tooltip:i,...t},r)=>{var x;const n=m.icons[t.icon],l=h?s.Slot:u.Button;return e.jsxs(c.Tooltip,{children:[e.jsx(c.TooltipTrigger,{asChild:!0,children:e.jsx(l,{className:"richtext-h-[32px] richtext-min-w-24 richtext-overflow-hidden richtext-px-[5px] richtext-py-0","data-state":t!=null&&t.dataState?"on":"off",disabled:t==null?void 0:t.disabled,ref:r,variant:"ghost",...t,children:e.jsxs("div",{className:"richtext-flex richtext-h-full richtext-items-center richtext-font-normal",children:[(t==null?void 0:t.title)&&e.jsx("div",{className:"richtext-grow richtext-truncate richtext-text-left richtext-text-sm",children:t==null?void 0:t.title}),n&&e.jsx(n,{className:"richtext-ml-1 richtext-size-3 richtext-shrink-0 richtext-text-zinc-500"})]})})}),i&&e.jsx(c.TooltipContent,{children:e.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[i&&e.jsx("div",{children:i}),e.jsx("div",{className:"richtext-flex",children:!!((x=t==null?void 0:t.shortcutKeys)!=null&&x.length)&&e.jsx("span",{children:d.getShortcutKeys(t==null?void 0:t.shortcutKeys)})})]})})]})});exports.ActionMenuButton=f;
1
+ "use strict";const e=require("react/jsx-runtime"),a=require("react"),s=require("@radix-ui/react-slot");require("./index-CyToCRcM.cjs");require("./theme.cjs");const d=require("./useButtonProps-BgjZY_Mu.cjs"),u=require("./button-C_ES-H6-.cjs"),m=require("./index-VhKd73hZ.cjs"),c=require("./tooltip-BCKvrxQJ.cjs"),f=a.forwardRef(({asChild:h=!1,tooltip:i,...t},r)=>{var x;const n=m.icons[t.icon],l=h?s.Slot:u.Button;return e.jsxs(c.Tooltip,{children:[e.jsx(c.TooltipTrigger,{asChild:!0,children:e.jsx(l,{className:"richtext-h-[32px] richtext-min-w-24 richtext-overflow-hidden richtext-px-[5px] richtext-py-0","data-state":t!=null&&t.dataState?"on":"off",disabled:t==null?void 0:t.disabled,ref:r,variant:"ghost",...t,children:e.jsxs("div",{className:"richtext-flex richtext-h-full richtext-items-center richtext-font-normal",children:[(t==null?void 0:t.title)&&e.jsx("div",{className:"richtext-grow richtext-truncate richtext-text-left richtext-text-sm",children:t==null?void 0:t.title}),n&&e.jsx(n,{className:"richtext-ml-1 richtext-size-3 richtext-shrink-0 richtext-text-zinc-500"})]})})}),i&&e.jsx(c.TooltipContent,{children:e.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[i&&e.jsx("div",{children:i}),e.jsx("div",{className:"richtext-flex",children:!!((x=t==null?void 0:t.shortcutKeys)!=null&&x.length)&&e.jsx("span",{children:d.getShortcutKeys(t==null?void 0:t.shortcutKeys)})})]})})]})});exports.ActionMenuButton=f;
@@ -1,12 +1,12 @@
1
1
  import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
2
  import l from "react";
3
3
  import { Slot as n } from "@radix-ui/react-slot";
4
- import "./index-DF5ZPtWM.js";
4
+ import "./index-w1tuwtjd.js";
5
5
  import "./theme.js";
6
- import { g as m } from "./useButtonProps-DVP4s_ER.js";
7
- import { B as d } from "./button-Uv01FNnd.js";
8
- import { i as f } from "./index-CcoWj0mF.js";
9
- import { T as o, a as s, b as u } from "./tooltip-DNKq7zgN.js";
6
+ import { g as m } from "./useButtonProps-BCNfeziv.js";
7
+ import { B as d } from "./button-BHVEzoNa.js";
8
+ import { i as f } from "./index-CL7JP-Xz.js";
9
+ import { T as o, a as s, b as u } from "./tooltip-CKN-cdhm.js";
10
10
  const S = l.forwardRef(
11
11
  ({ asChild: r = !1, tooltip: i, ...t }, x) => {
12
12
  var a;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./clsx-CXbNJWDD.cjs"),A=require("./toggle-BQHMh_Q-.cjs"),e=require("react/jsx-runtime"),m=require("react"),q=require("./index-D3RLYf-J.cjs");require("./theme.cjs");const v=require("lucide-react"),L=require("./index-VhKd73hZ.cjs"),f=require("./file-i7e4nQY2.cjs"),_=require("./index-Doks9cbR.cjs"),d=require("./dom-dataset-BqoJhJXt.cjs"),C=require("./useButtonProps-DBJkNDS2.cjs"),R={audio:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-audio-lines"><path d="M2 10v3"/><path d="M6 6v11"/><path d="M10 3v18"/><path d="M14 8v7"/><path d="M18 5v13"/><path d="M22 10v3"/></svg>',video:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-video"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',file:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>',image:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-image"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>',pdf:`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32">
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./clsx-CXbNJWDD.cjs"),A=require("./toggle-Df4nXsom.cjs"),e=require("react/jsx-runtime"),m=require("react"),q=require("./index-CyToCRcM.cjs");require("./theme.cjs");const v=require("lucide-react"),L=require("./index-VhKd73hZ.cjs"),f=require("./file-i7e4nQY2.cjs"),_=require("./index-D9U_fxh1.cjs"),d=require("./dom-dataset-BqoJhJXt.cjs"),C=require("./useButtonProps-BgjZY_Mu.cjs"),R={audio:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-audio-lines"><path d="M2 10v3"/><path d="M6 6v11"/><path d="M10 3v18"/><path d="M14 8v7"/><path d="M18 5v13"/><path d="M22 10v3"/></svg>',video:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-video"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',file:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>',image:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-image"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>',pdf:`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32">
2
2
  <path fill="currentColor" d="M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3z"></path>
3
3
  <path fill="currentColor" d="M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z"></path>
4
4
  </svg>`,word:`<svg
package/lib/Attachment.js CHANGED
@@ -1,15 +1,15 @@
1
- import { h as x, j as y, N as j, k as D, m as P } from "./clsx-BWSGDJNJ.js";
2
- import { A as T } from "./toggle-DKHg5sLm.js";
1
+ import { h as x, j as y, N as j, k as D, m as P } from "./clsx-DSzxBzvL.js";
2
+ import { A as T } from "./toggle-BFJ-X-Zp.js";
3
3
  import { jsx as e, Fragment as L, jsxs as f } from "react/jsx-runtime";
4
4
  import { useRef as R, useState as $, useCallback as k, useEffect as I } from "react";
5
- import { a as O } from "./index-DF5ZPtWM.js";
5
+ import { a as O } from "./index-w1tuwtjd.js";
6
6
  import "./theme.js";
7
7
  import { LucideTableProperties as Z, LucideSheet as W, LucideImage as K, LucideFile as U, LucideVideo as q, LucideAudioLines as G } from "lucide-react";
8
- import { E as J, a as Q } from "./index-CcoWj0mF.js";
8
+ import { E as J, a as Q } from "./index-CL7JP-Xz.js";
9
9
  import { n as X, e as Y, a as ee, b as N } from "./file-BLas99n7.js";
10
- import { u as te } from "./index-Dujzr6bY.js";
10
+ import { u as te } from "./index-C5aucGFK.js";
11
11
  import { g as c } from "./dom-dataset-CIEeltF6.js";
12
- import { u as re, a as ie } from "./useButtonProps-DVP4s_ER.js";
12
+ import { u as re, a as ie } from "./useButtonProps-BCNfeziv.js";
13
13
  const oe = {
14
14
  audio: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-audio-lines"><path d="M2 10v3"/><path d="M6 6v11"/><path d="M10 3v18"/><path d="M14 8v7"/><path d="M18 5v13"/><path d="M22 10v3"/></svg>',
15
15
  video: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-video"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./clsx-CXbNJWDD.cjs"),d=require("./jsx-runtime-C_NLcKys.cjs"),l=require("react/jsx-runtime"),k=require("./toggle-BQHMh_Q-.cjs");require("react");require("./index-D3RLYf-J.cjs");require("./theme.cjs");const p=require("./useButtonProps-DBJkNDS2.cjs");var m=/^\s*>\s$/,b=c.Node3.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return d.h("blockquote",{...c.mergeAttributes(this.options.HTMLAttributes,t),children:d.h("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";const o=">",n=[];return t.content.forEach(i=>{const u=e.renderChildren([i]).split(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./clsx-CXbNJWDD.cjs"),d=require("./jsx-runtime-C_NLcKys.cjs"),l=require("react/jsx-runtime"),k=require("./toggle-Df4nXsom.cjs");require("react");require("./index-CyToCRcM.cjs");require("./theme.cjs");const p=require("./useButtonProps-BgjZY_Mu.cjs");var m=/^\s*>\s$/,b=c.Node3.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return d.h("blockquote",{...c.mergeAttributes(this.options.HTMLAttributes,t),children:d.h("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";const o=">",n=[];return t.content.forEach(i=>{const u=e.renderChildren([i]).split(`
2
2
  `).map(r=>r.trim()===""?o:`${o} ${r}`);n.push(u.join(`
3
3
  `))}),n.join(`
4
4
  ${o}
package/lib/Blockquote.js CHANGED
@@ -1,11 +1,11 @@
1
- import { N as m, w as h, m as k } from "./clsx-BWSGDJNJ.js";
1
+ import { N as m, w as h, m as k } from "./clsx-DSzxBzvL.js";
2
2
  import { h as a } from "./jsx-runtime-CT7Pcg-t.js";
3
3
  import { jsx as l, Fragment as f } from "react/jsx-runtime";
4
- import { A as g } from "./toggle-DKHg5sLm.js";
4
+ import { A as g } from "./toggle-BFJ-X-Zp.js";
5
5
  import "react";
6
- import "./index-DF5ZPtWM.js";
6
+ import "./index-w1tuwtjd.js";
7
7
  import "./theme.js";
8
- import { u as b, a as q } from "./useButtonProps-DVP4s_ER.js";
8
+ import { u as b, a as q } from "./useButtonProps-BCNfeziv.js";
9
9
  var v = /^\s*>\s$/, B = m.create({
10
10
  name: "blockquote",
11
11
  addOptions() {
package/lib/Bold.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./clsx-CXbNJWDD.cjs"),a=require("./jsx-runtime-C_NLcKys.cjs"),l=require("./toggle-BQHMh_Q-.cjs"),s=require("react/jsx-runtime");require("react");require("./index-D3RLYf-J.cjs");require("./theme.cjs");const u=require("./useButtonProps-DBJkNDS2.cjs");var B=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,_=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,k=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,v=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,M=r.Mark.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return a.h("strong",{...r.mergeAttributes(this.options.HTMLAttributes,t),children:a.h("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[r.markInputRule({find:B,type:this.type}),r.markInputRule({find:k,type:this.type})]},addPasteRules(){return[r.markPasteRule({find:_,type:this.type}),r.markPasteRule({find:v,type:this.type})]}});function b(){const t=u.useButtonProps(c.name),{icon:e=void 0,tooltip:o=void 0,shortcutKeys:n=void 0,tooltipOptions:p={},action:i=void 0,isActive:g=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:m,disabled:d,update:h}=u.useToggleActive(g),y=()=>{d||i&&(i(),h())};return t?s.jsx(l.ActionButton,{action:y,dataState:m,disabled:d,icon:e,shortcutKeys:n,tooltip:o,tooltipOptions:p}):s.jsx(s.Fragment,{})}const c=M.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:o,extension:n})=>({component:l.ActionButton,componentProps:{action:()=>e.commands.toggleBold(),isActive:()=>e.isActive("bold"),icon:"Bold",shortcutKeys:n.options.shortcutKeys??["mod","B"],tooltip:o("editor.bold.tooltip")}})}}});exports.Bold=c;exports.RichTextBold=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./clsx-CXbNJWDD.cjs"),a=require("./jsx-runtime-C_NLcKys.cjs"),l=require("./toggle-Df4nXsom.cjs"),s=require("react/jsx-runtime");require("react");require("./index-CyToCRcM.cjs");require("./theme.cjs");const u=require("./useButtonProps-BgjZY_Mu.cjs");var B=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,_=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,k=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,v=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,M=r.Mark.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return a.h("strong",{...r.mergeAttributes(this.options.HTMLAttributes,t),children:a.h("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[r.markInputRule({find:B,type:this.type}),r.markInputRule({find:k,type:this.type})]},addPasteRules(){return[r.markPasteRule({find:_,type:this.type}),r.markPasteRule({find:v,type:this.type})]}});function b(){const t=u.useButtonProps(c.name),{icon:e=void 0,tooltip:o=void 0,shortcutKeys:n=void 0,tooltipOptions:p={},action:i=void 0,isActive:g=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:m,disabled:d,update:h}=u.useToggleActive(g),y=()=>{d||i&&(i(),h())};return t?s.jsx(l.ActionButton,{action:y,dataState:m,disabled:d,icon:e,shortcutKeys:n,tooltip:o,tooltipOptions:p}):s.jsx(s.Fragment,{})}const c=M.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:o,extension:n})=>({component:l.ActionButton,componentProps:{action:()=>e.commands.toggleBold(),isActive:()=>e.isActive("bold"),icon:"Bold",shortcutKeys:n.options.shortcutKeys??["mod","B"],tooltip:o("editor.bold.tooltip")}})}}});exports.Bold=c;exports.RichTextBold=b;
package/lib/Bold.js CHANGED
@@ -1,11 +1,11 @@
1
- import { M as _, e as i, f as a, m as f } from "./clsx-BWSGDJNJ.js";
1
+ import { M as _, e as i, f as a, m as f } from "./clsx-DSzxBzvL.js";
2
2
  import { h as d } from "./jsx-runtime-CT7Pcg-t.js";
3
- import { A as l } from "./toggle-DKHg5sLm.js";
3
+ import { A as l } from "./toggle-BFJ-X-Zp.js";
4
4
  import { jsx as u, Fragment as y } from "react/jsx-runtime";
5
5
  import "react";
6
- import "./index-DF5ZPtWM.js";
6
+ import "./index-w1tuwtjd.js";
7
7
  import "./theme.js";
8
- import { u as M, a as v } from "./useButtonProps-DVP4s_ER.js";
8
+ import { u as M, a as v } from "./useButtonProps-BCNfeziv.js";
9
9
  var B = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, k = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, b = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, A = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, R = _.create({
10
10
  name: "bold",
11
11
  addOptions() {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-BCzvbrf5.cjs"),s=require("react/jsx-runtime"),m=require("./toggle-BQHMh_Q-.cjs");require("react");require("./index-D3RLYf-J.cjs");require("./theme.cjs");const u=require("./useButtonProps-DBJkNDS2.cjs");function B(){const t=u.useButtonProps(c.name),{icon:e=void 0,tooltip:i=void 0,shortcutKeys:o=void 0,tooltipOptions:l={},action:n=void 0,isActive:d=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:a,disabled:r,update:p}=u.useToggleActive(d),v=()=>{r||n&&(n(),p())};return t?s.jsx(m.ActionButton,{action:v,dataState:a,disabled:r,icon:e,shortcutKeys:o,tooltip:i,tooltipOptions:l}):s.jsx(s.Fragment,{})}const c=g.BulletList.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:i,extension:o})=>({componentProps:{action:()=>e.commands.toggleBulletList(),isActive:()=>e.isActive("bulletList"),disabled:!1,shortcutKeys:o.options.shortcutKeys??["shift","mod","8"],icon:"List",tooltip:i("editor.bulletlist.tooltip")}})}}});exports.BulletList=c;exports.RichTextBulletList=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-BCzvbrf5.cjs"),s=require("react/jsx-runtime"),m=require("./toggle-Df4nXsom.cjs");require("react");require("./index-CyToCRcM.cjs");require("./theme.cjs");const u=require("./useButtonProps-BgjZY_Mu.cjs");function B(){const t=u.useButtonProps(c.name),{icon:e=void 0,tooltip:i=void 0,shortcutKeys:o=void 0,tooltipOptions:l={},action:n=void 0,isActive:d=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:a,disabled:r,update:p}=u.useToggleActive(d),v=()=>{r||n&&(n(),p())};return t?s.jsx(m.ActionButton,{action:v,dataState:a,disabled:r,icon:e,shortcutKeys:o,tooltip:i,tooltipOptions:l}):s.jsx(s.Fragment,{})}const c=g.BulletList.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:i,extension:o})=>({componentProps:{action:()=>e.commands.toggleBulletList(),isActive:()=>e.isActive("bulletList"),disabled:!1,shortcutKeys:o.options.shortcutKeys??["shift","mod","8"],icon:"List",tooltip:i("editor.bulletlist.tooltip")}})}}});exports.BulletList=c;exports.RichTextBulletList=B;
package/lib/BulletList.js CHANGED
@@ -1,10 +1,10 @@
1
- import { B as m } from "./index-DJbmnBzK.js";
1
+ import { B as m } from "./index-DR5tIdL7.js";
2
2
  import { jsx as r, Fragment as d } from "react/jsx-runtime";
3
- import { A as f } from "./toggle-DKHg5sLm.js";
3
+ import { A as f } from "./toggle-BFJ-X-Zp.js";
4
4
  import "react";
5
- import "./index-DF5ZPtWM.js";
5
+ import "./index-w1tuwtjd.js";
6
6
  import "./theme.js";
7
- import { u as v, a as A } from "./useButtonProps-DVP4s_ER.js";
7
+ import { u as v, a as A } from "./useButtonProps-BCNfeziv.js";
8
8
  function O() {
9
9
  const t = v(B.name), {
10
10
  icon: o = void 0,
package/lib/Callout.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./clsx-CXbNJWDD.cjs"),L=require("./toggle-BQHMh_Q-.cjs"),e=require("react/jsx-runtime"),x=require("react");require("./index-D3RLYf-J.cjs");require("./theme.cjs");const n=require("lucide-react"),c=require("./dialog-Bt5zwGYB.cjs"),s=require("./select-CwGYPsPq.cjs"),p=require("./useButtonProps-DBJkNDS2.cjs"),R=require("./index-Doks9cbR.cjs"),b=require("./label-JNOksCA-.cjs"),y=require("./input-Dt_BA_9B.cjs"),T=require("./button-BS3n6_Aq.cjs"),A=[{value:"note",label:"Note",icon:n.Info,color:"#1f6feb",background:"#1f6feb1f"},{value:"tip",label:"Tip",icon:n.Lightbulb,color:"#238636",background:"#2386361f"},{value:"important",label:"Important",icon:n.AlertCircle,color:"#ab7df8",background:"#ab7df81f"},{value:"warning",label:"Warning",icon:n.TriangleAlert,color:"#d29922",background:"#d299221f"},{value:"caution",label:"Caution",icon:n.OctagonAlert,color:"#f85149",background:"#f851491f"}];function D({node:t}){const{type:o="note",title:l="",body:u=""}=t.attrs,d=(A.find(h=>h.value===o)||A[0]).icon;return e.jsx(i.NodeViewWrapper,{children:e.jsxs("div",{className:i.clsx("richtext-relative richtext-my-4 richtext-rounded-lg richtext-border richtext-p-4",{"richtext-bg-[#1f6feb1f] richtext-border-[#1f6feb]":o==="note","richtext-bg-[#2386361f] richtext-border-[#238636]":o==="tip","richtext-bg-[#ab7df81f] richtext-border-[#ab7df8]":o==="important","richtext-bg-[#d299221f] richtext-border-[#d29922]":o==="warning","richtext-bg-[#f851491f] richtext-border-[#f85149]":o==="caution"}),children:[e.jsxs("div",{className:i.clsx("richtext-mb-2 richtext-flex richtext-items-center richtext-gap-2",{"richtext-text-[#1f6feb]":o==="note","richtext-text-[#238636]":o==="tip","richtext-text-[#ab7df8]":o==="important","richtext-text-[#d29922]":o==="warning","richtext-text-[#f85149]":o==="caution"}),children:[e.jsx(d,{className:"richtext-size-5"}),e.jsx("span",{className:"richtext-font-semibold",children:l})]}),u&&e.jsx("p",{className:"richtext-pl-[28px]",children:u})]})})}const H=[{value:"note",label:"Note",icon:"Info"},{value:"tip",label:"Tip",icon:"Lightbulb"},{value:"important",label:"Important",icon:"AlertCircle"},{value:"warning",label:"Warning",icon:"TriangleAlert"},{value:"caution",label:"Caution",icon:"OctagonAlert"}];function P(){const{t}=R.useLocale(),o=p.useEditorInstance(),l=p.useButtonProps(N.name),[u,a]=x.useState(!1),[d,h]=x.useState("note"),[f,v]=x.useState(""),[m,j]=x.useState(""),{icon:q=void 0,tooltip:S=void 0,shortcutKeys:I=void 0,tooltipOptions:O={},isActive:k=void 0}=(l==null?void 0:l.componentProps)??{},{dataState:w,disabled:C}=p.useToggleActive(k),B=()=>{o&&(o.chain().focus().setCallout({type:d,title:f,body:m}).run(),a(!1),h("note"),v(""),j(""))},M=()=>{C||a(!0)};return l?e.jsxs(c.Dialog,{onOpenChange:a,open:u,children:[e.jsx(c.DialogTrigger,{asChild:!0,children:e.jsx(L.ActionButton,{action:M,dataState:w,disabled:C,icon:q,shortcutKeys:I,tooltip:S,tooltipOptions:O})}),e.jsxs(c.DialogContent,{children:[e.jsx(c.DialogTitle,{children:t("editor.callout.dialog.title")}),e.jsxs("div",{className:"richtext-space-y-4 richtext-py-4",children:[e.jsxs("div",{className:"richtext-space-y-2",children:[e.jsx(b.Label,{children:t("editor.callout.dialog.type")}),e.jsxs(s.Select,{onValueChange:h,value:d,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:t("editor.callout.dialog.type.placeholder")})}),e.jsx(s.SelectContent,{children:H.map(r=>e.jsx(s.SelectItem,{value:r.value,children:t(`editor.callout.type.${r.value}`)},r.value))})]})]}),e.jsxs("div",{className:"richtext-space-y-2",children:[e.jsx(b.Label,{children:t("editor.callout.dialog.title.label")}),e.jsx(y.Input,{onChange:r=>v(r.target.value),placeholder:t("editor.callout.dialog.title.placeholder"),value:f})]}),e.jsxs("div",{className:"richtext-space-y-2",children:[e.jsx(b.Label,{children:t("editor.callout.dialog.body.label")}),e.jsx(y.Input,{onChange:r=>j(r.target.value),placeholder:t("editor.callout.dialog.body.placeholder"),value:m})]})]}),e.jsxs(c.DialogFooter,{children:[e.jsx(T.Button,{onClick:()=>a(!1),variant:"outline",children:t("editor.callout.dialog.button.cancel")}),e.jsx(T.Button,{onClick:B,children:t("editor.callout.dialog.button.apply")})]})]})]}):e.jsx(e.Fragment,{})}function g(t){return o=>(console.log({element:o}),o.getAttribute(t))}const N=i.Node3.create({name:"callout",group:"block",selectable:!0,atom:!0,draggable:!0,inline:!1,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"callout"},button:({editor:o,t:l})=>({component:L.ActionButton,componentProps:{action:()=>!0,isActive:()=>o.isActive("callout"),disabled:!1,icon:"Callout",tooltip:l("editor.callout.tooltip")}})}},parseHTML(){return[{tag:"div.callout"}]},renderHTML({HTMLAttributes:t}){return console.log({HTMLAttributes:t}),["div",i.mergeAttributes(this.options&&this.options.HTMLAttributes||{},t)]},addAttributes(){return{type:{default:"",parseHTML:g("type")},title:{default:"",parseHTML:g("title")},body:{default:"",parseHTML:g("body")}}},addCommands(){return{setCallout:t=>({chain:o})=>o().insertContent({type:this.name,attrs:t}).run()}},addNodeView(){return i.ReactNodeViewRenderer(D)}});exports.Callout=N;exports.RichTextCallout=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./clsx-CXbNJWDD.cjs"),L=require("./toggle-Df4nXsom.cjs"),t=require("react/jsx-runtime"),x=require("react");require("./index-CyToCRcM.cjs");require("./theme.cjs");const n=require("lucide-react"),c=require("./dialog-C6j99nwb.cjs"),s=require("./select-DAYrMJGw.cjs"),p=require("./useButtonProps-BgjZY_Mu.cjs"),H=require("./index-D9U_fxh1.cjs"),b=require("./label-B4bPSQ9R.cjs"),y=require("./input-BqK_Byqu.cjs"),T=require("./button-C_ES-H6-.cjs"),A=[{value:"note",label:"Note",icon:n.Info,color:"#1f6feb",background:"#1f6feb1f"},{value:"tip",label:"Tip",icon:n.Lightbulb,color:"#238636",background:"#2386361f"},{value:"important",label:"Important",icon:n.AlertCircle,color:"#ab7df8",background:"#ab7df81f"},{value:"warning",label:"Warning",icon:n.TriangleAlert,color:"#d29922",background:"#d299221f"},{value:"caution",label:"Caution",icon:n.OctagonAlert,color:"#f85149",background:"#f851491f"}];function R({node:e}){const{type:l="note",title:o="",body:u=""}=e.attrs,d=(A.find(h=>h.value===l)||A[0]).icon;return t.jsx(i.NodeViewWrapper,{children:t.jsxs("div",{className:i.clsx("richtext-relative richtext-my-4 richtext-rounded-lg richtext-border richtext-p-4",{"richtext-bg-[#1f6feb1f] richtext-border-[#1f6feb]":l==="note","richtext-bg-[#2386361f] richtext-border-[#238636]":l==="tip","richtext-bg-[#ab7df81f] richtext-border-[#ab7df8]":l==="important","richtext-bg-[#d299221f] richtext-border-[#d29922]":l==="warning","richtext-bg-[#f851491f] richtext-border-[#f85149]":l==="caution"}),children:[t.jsxs("div",{className:i.clsx("richtext-mb-2 richtext-flex richtext-items-center richtext-gap-2",{"richtext-text-[#1f6feb]":l==="note","richtext-text-[#238636]":l==="tip","richtext-text-[#ab7df8]":l==="important","richtext-text-[#d29922]":l==="warning","richtext-text-[#f85149]":l==="caution"}),children:[t.jsx(d,{className:"richtext-size-5"}),t.jsx("span",{className:"richtext-font-semibold",children:o})]}),u&&t.jsx("p",{className:"richtext-pl-[28px]",children:u})]})})}const D=[{value:"note",label:"Note",icon:"Info"},{value:"tip",label:"Tip",icon:"Lightbulb"},{value:"important",label:"Important",icon:"AlertCircle"},{value:"warning",label:"Warning",icon:"TriangleAlert"},{value:"caution",label:"Caution",icon:"OctagonAlert"}];function P(){const{t:e}=H.useLocale(),l=p.useEditorInstance(),o=p.useButtonProps(N.name),[u,a]=x.useState(!1),[d,h]=x.useState("note"),[f,v]=x.useState(""),[m,j]=x.useState(""),{icon:q=void 0,tooltip:S=void 0,shortcutKeys:I=void 0,tooltipOptions:O={},isActive:k=void 0}=(o==null?void 0:o.componentProps)??{},{dataState:w,disabled:C}=p.useToggleActive(k),B=()=>{l&&(l.chain().focus().setCallout({type:d,title:f,body:m}).run(),a(!1),h("note"),v(""),j(""))},M=()=>{C||a(!0)};return o?t.jsxs(c.Dialog,{onOpenChange:a,open:u,children:[t.jsx(c.DialogTrigger,{asChild:!0,children:t.jsx(L.ActionButton,{action:M,dataState:w,disabled:C,icon:q,shortcutKeys:I,tooltip:S,tooltipOptions:O})}),t.jsxs(c.DialogContent,{children:[t.jsx(c.DialogTitle,{children:e("editor.callout.dialog.title")}),t.jsxs("div",{className:"richtext-space-y-4 richtext-py-4",children:[t.jsxs("div",{className:"richtext-space-y-2",children:[t.jsx(b.Label,{children:e("editor.callout.dialog.type")}),t.jsxs(s.Select,{onValueChange:h,value:d,children:[t.jsx(s.SelectTrigger,{children:t.jsx(s.SelectValue,{placeholder:e("editor.callout.dialog.type.placeholder")})}),t.jsx(s.SelectContent,{children:D.map(r=>t.jsx(s.SelectItem,{value:r.value,children:e(`editor.callout.type.${r.value}`)},r.value))})]})]}),t.jsxs("div",{className:"richtext-space-y-2",children:[t.jsx(b.Label,{children:e("editor.callout.dialog.title.label")}),t.jsx(y.Input,{onChange:r=>v(r.target.value),placeholder:e("editor.callout.dialog.title.placeholder"),value:f})]}),t.jsxs("div",{className:"richtext-space-y-2",children:[t.jsx(b.Label,{children:e("editor.callout.dialog.body.label")}),t.jsx(y.Input,{onChange:r=>j(r.target.value),placeholder:e("editor.callout.dialog.body.placeholder"),value:m})]})]}),t.jsxs(c.DialogFooter,{children:[t.jsx(T.Button,{onClick:()=>a(!1),variant:"outline",children:e("editor.callout.dialog.button.cancel")}),t.jsx(T.Button,{onClick:B,children:e("editor.callout.dialog.button.apply")})]})]})]}):t.jsx(t.Fragment,{})}function g(e){return l=>l.getAttribute(e)}const N=i.Node3.create({name:"callout",group:"block",selectable:!0,atom:!0,draggable:!0,inline:!1,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"callout"},button:({editor:l,t:o})=>({component:L.ActionButton,componentProps:{action:()=>!0,isActive:()=>l.isActive("callout"),disabled:!1,icon:"Callout",tooltip:o("editor.callout.tooltip")}})}},parseHTML(){return[{tag:"div.callout"}]},renderHTML({HTMLAttributes:e}){return["div",i.mergeAttributes(this.options&&this.options.HTMLAttributes||{},e)]},addAttributes(){return{type:{default:"",parseHTML:g("type")},title:{default:"",parseHTML:g("title")},body:{default:"",parseHTML:g("body")}}},addCommands(){return{setCallout:e=>({chain:l})=>l().insertContent({type:this.name,attrs:e}).run()}},addNodeView(){return i.ReactNodeViewRenderer(R)}});exports.Callout=N;exports.RichTextCallout=P;
package/lib/Callout.js CHANGED
@@ -1,17 +1,17 @@
1
- import { h as D, j as x, N as B, k as H, m as M } from "./clsx-BWSGDJNJ.js";
2
- import { A as T } from "./toggle-DKHg5sLm.js";
3
- import { jsx as o, jsxs as l, Fragment as V } from "react/jsx-runtime";
1
+ import { h as D, j as x, N as H, k as M, m as B } from "./clsx-DSzxBzvL.js";
2
+ import { A as T } from "./toggle-BFJ-X-Zp.js";
3
+ import { jsx as o, jsxs as r, Fragment as V } from "react/jsx-runtime";
4
4
  import { useState as s } from "react";
5
- import "./index-DF5ZPtWM.js";
5
+ import "./index-w1tuwtjd.js";
6
6
  import "./theme.js";
7
7
  import { Info as P, Lightbulb as j, AlertCircle as E, TriangleAlert as R, OctagonAlert as W } from "lucide-react";
8
- import { D as F, a as U, b as Y, c as _, d as $ } from "./dialog-DwTMZSt6.js";
9
- import { S as z, a as K, b as q, c as G, d as J } from "./select-DctYuHLH.js";
10
- import { c as Q, u as X, a as Z } from "./useButtonProps-DVP4s_ER.js";
11
- import { u as tt } from "./index-Dujzr6bY.js";
12
- import { L as u } from "./label-topD46-u.js";
13
- import { I as v } from "./input-DUBdJD3L.js";
14
- import { B as C } from "./button-Uv01FNnd.js";
8
+ import { D as F, a as U, b as Y, c as _, d as $ } from "./dialog-BIDVvFgj.js";
9
+ import { S as z, a as K, b as q, c as G, d as J } from "./select-BsKwU96B.js";
10
+ import { c as Q, u as X, a as Z } from "./useButtonProps-BCNfeziv.js";
11
+ import { u as tt } from "./index-C5aucGFK.js";
12
+ import { L as u } from "./label-DRlIWK9v.js";
13
+ import { I as v } from "./input-B5KKrCv9.js";
14
+ import { B as C } from "./button-BHVEzoNa.js";
15
15
  const y = [
16
16
  { value: "note", label: "Note", icon: P, color: "#1f6feb", background: "#1f6feb1f" },
17
17
  { value: "tip", label: "Tip", icon: j, color: "#238636", background: "#2386361f" },
@@ -20,8 +20,8 @@ const y = [
20
20
  { value: "caution", label: "Caution", icon: W, color: "#f85149", background: "#f851491f" }
21
21
  ];
22
22
  function et({ node: t }) {
23
- const { type: e = "note", title: r = "", body: n = "" } = t.attrs, c = (y.find((d) => d.value === e) || y[0]).icon;
24
- return /* @__PURE__ */ o(D, { children: /* @__PURE__ */ l(
23
+ const { type: e = "note", title: l = "", body: n = "" } = t.attrs, c = (y.find((d) => d.value === e) || y[0]).icon;
24
+ return /* @__PURE__ */ o(D, { children: /* @__PURE__ */ r(
25
25
  "div",
26
26
  {
27
27
  className: x(
@@ -35,7 +35,7 @@ function et({ node: t }) {
35
35
  }
36
36
  ),
37
37
  children: [
38
- /* @__PURE__ */ l(
38
+ /* @__PURE__ */ r(
39
39
  "div",
40
40
  {
41
41
  className: x("richtext-mb-2 richtext-flex richtext-items-center richtext-gap-2", {
@@ -47,7 +47,7 @@ function et({ node: t }) {
47
47
  }),
48
48
  children: [
49
49
  /* @__PURE__ */ o(c, { className: "richtext-size-5" }),
50
- /* @__PURE__ */ o("span", { className: "richtext-font-semibold", children: r })
50
+ /* @__PURE__ */ o("span", { className: "richtext-font-semibold", children: l })
51
51
  ]
52
52
  }
53
53
  ),
@@ -64,18 +64,18 @@ const ot = [
64
64
  { value: "caution", label: "Caution", icon: "OctagonAlert" }
65
65
  ];
66
66
  function xt() {
67
- const { t } = tt(), e = Q(), r = X(lt.name), [n, i] = s(!1), [c, d] = s("note"), [h, b] = s(""), [f, g] = s(""), {
67
+ const { t } = tt(), e = Q(), l = X(rt.name), [n, i] = s(!1), [c, d] = s("note"), [h, b] = s(""), [f, m] = s(""), {
68
68
  icon: A = void 0,
69
69
  tooltip: N = void 0,
70
70
  shortcutKeys: L = void 0,
71
71
  tooltipOptions: I = {},
72
72
  isActive: S = void 0
73
- } = (r == null ? void 0 : r.componentProps) ?? {}, { dataState: k, disabled: m } = Z(S), w = () => {
74
- e && (e.chain().focus().setCallout({ type: c, title: h, body: f }).run(), i(!1), d("note"), b(""), g(""));
73
+ } = (l == null ? void 0 : l.componentProps) ?? {}, { dataState: k, disabled: g } = Z(S), w = () => {
74
+ e && (e.chain().focus().setCallout({ type: c, title: h, body: f }).run(), i(!1), d("note"), b(""), m(""));
75
75
  }, O = () => {
76
- m || i(!0);
76
+ g || i(!0);
77
77
  };
78
- return r ? /* @__PURE__ */ l(
78
+ return l ? /* @__PURE__ */ r(
79
79
  F,
80
80
  {
81
81
  onOpenChange: i,
@@ -86,19 +86,19 @@ function xt() {
86
86
  {
87
87
  action: O,
88
88
  dataState: k,
89
- disabled: m,
89
+ disabled: g,
90
90
  icon: A,
91
91
  shortcutKeys: L,
92
92
  tooltip: N,
93
93
  tooltipOptions: I
94
94
  }
95
95
  ) }),
96
- /* @__PURE__ */ l(Y, { children: [
96
+ /* @__PURE__ */ r(Y, { children: [
97
97
  /* @__PURE__ */ o(_, { children: t("editor.callout.dialog.title") }),
98
- /* @__PURE__ */ l("div", { className: "richtext-space-y-4 richtext-py-4", children: [
99
- /* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
98
+ /* @__PURE__ */ r("div", { className: "richtext-space-y-4 richtext-py-4", children: [
99
+ /* @__PURE__ */ r("div", { className: "richtext-space-y-2", children: [
100
100
  /* @__PURE__ */ o(u, { children: t("editor.callout.dialog.type") }),
101
- /* @__PURE__ */ l(
101
+ /* @__PURE__ */ r(
102
102
  z,
103
103
  {
104
104
  onValueChange: d,
@@ -117,7 +117,7 @@ function xt() {
117
117
  }
118
118
  )
119
119
  ] }),
120
- /* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
120
+ /* @__PURE__ */ r("div", { className: "richtext-space-y-2", children: [
121
121
  /* @__PURE__ */ o(u, { children: t("editor.callout.dialog.title.label") }),
122
122
  /* @__PURE__ */ o(
123
123
  v,
@@ -128,19 +128,19 @@ function xt() {
128
128
  }
129
129
  )
130
130
  ] }),
131
- /* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
131
+ /* @__PURE__ */ r("div", { className: "richtext-space-y-2", children: [
132
132
  /* @__PURE__ */ o(u, { children: t("editor.callout.dialog.body.label") }),
133
133
  /* @__PURE__ */ o(
134
134
  v,
135
135
  {
136
- onChange: (a) => g(a.target.value),
136
+ onChange: (a) => m(a.target.value),
137
137
  placeholder: t("editor.callout.dialog.body.placeholder"),
138
138
  value: f
139
139
  }
140
140
  )
141
141
  ] })
142
142
  ] }),
143
- /* @__PURE__ */ l($, { children: [
143
+ /* @__PURE__ */ r($, { children: [
144
144
  /* @__PURE__ */ o(
145
145
  C,
146
146
  {
@@ -157,11 +157,9 @@ function xt() {
157
157
  ) : /* @__PURE__ */ o(V, {});
158
158
  }
159
159
  function p(t) {
160
- return (e) => (console.log({
161
- element: e
162
- }), e.getAttribute(t));
160
+ return (e) => e.getAttribute(t);
163
161
  }
164
- const lt = /* @__PURE__ */ B.create({
162
+ const rt = /* @__PURE__ */ H.create({
165
163
  name: "callout",
166
164
  group: "block",
167
165
  selectable: !0,
@@ -176,14 +174,14 @@ const lt = /* @__PURE__ */ B.create({
176
174
  HTMLAttributes: {
177
175
  class: "callout"
178
176
  },
179
- button: ({ editor: e, t: r }) => ({
177
+ button: ({ editor: e, t: l }) => ({
180
178
  component: T,
181
179
  componentProps: {
182
180
  action: () => !0,
183
181
  isActive: () => e.isActive("callout"),
184
182
  disabled: !1,
185
183
  icon: "Callout",
186
- tooltip: r("editor.callout.tooltip")
184
+ tooltip: l("editor.callout.tooltip")
187
185
  }
188
186
  })
189
187
  };
@@ -192,9 +190,7 @@ const lt = /* @__PURE__ */ B.create({
192
190
  return [{ tag: "div.callout" }];
193
191
  },
194
192
  renderHTML({ HTMLAttributes: t }) {
195
- return console.log({
196
- HTMLAttributes: t
197
- }), ["div", M(this.options && this.options.HTMLAttributes || {}, t)];
193
+ return ["div", B(this.options && this.options.HTMLAttributes || {}, t)];
198
194
  },
199
195
  addAttributes() {
200
196
  return {
@@ -221,10 +217,10 @@ const lt = /* @__PURE__ */ B.create({
221
217
  };
222
218
  },
223
219
  addNodeView() {
224
- return H(et);
220
+ return M(et);
225
221
  }
226
222
  });
227
223
  export {
228
- lt as Callout,
224
+ rt as Callout,
229
225
  xt as RichTextCallout
230
226
  };
package/lib/Clear.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./clsx-CXbNJWDD.cjs"),n=require("react/jsx-runtime"),v=require("./toggle-BQHMh_Q-.cjs"),c=require("./useButtonProps-DBJkNDS2.cjs");function f(){const t=c.useButtonProps(s.name),{icon:o=void 0,tooltip:e=void 0,shortcutKeys:a=void 0,tooltipOptions:u={},action:i=void 0,isActive:l=void 0}=(t==null?void 0:t.componentProps)??{},{disabled:r}=c.useActive(l),d=()=>{r||i&&i()};return t?n.jsx(v.ActionButton,{action:d,disabled:r,icon:o,shortcutKeys:a,tooltip:e,tooltipOptions:u}):n.jsx(n.Fragment,{})}const s=p.Node3.create({name:"clear",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:o,t:e})=>({componentProps:{action:()=>o.chain().focus().clearNodes().unsetAllMarks().run(),isActive:()=>o.can().chain().focus().clearNodes().unsetAllMarks().run(),icon:"Eraser",tooltip:e("editor.clear.tooltip")}})}}});exports.Clear=s;exports.RichTextClear=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./clsx-CXbNJWDD.cjs"),n=require("react/jsx-runtime"),v=require("./toggle-Df4nXsom.cjs"),c=require("./useButtonProps-BgjZY_Mu.cjs");function f(){const t=c.useButtonProps(s.name),{icon:o=void 0,tooltip:e=void 0,shortcutKeys:a=void 0,tooltipOptions:u={},action:i=void 0,isActive:l=void 0}=(t==null?void 0:t.componentProps)??{},{disabled:r}=c.useActive(l),d=()=>{r||i&&i()};return t?n.jsx(v.ActionButton,{action:d,disabled:r,icon:o,shortcutKeys:a,tooltip:e,tooltipOptions:u}):n.jsx(n.Fragment,{})}const s=p.Node3.create({name:"clear",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:o,t:e})=>({componentProps:{action:()=>o.chain().focus().clearNodes().unsetAllMarks().run(),isActive:()=>o.can().chain().focus().clearNodes().unsetAllMarks().run(),icon:"Eraser",tooltip:e("editor.clear.tooltip")}})}}});exports.Clear=s;exports.RichTextClear=f;
package/lib/Clear.js CHANGED
@@ -1,7 +1,7 @@
1
- import { N as p } from "./clsx-BWSGDJNJ.js";
1
+ import { N as p } from "./clsx-DSzxBzvL.js";
2
2
  import { jsx as e, Fragment as l } from "react/jsx-runtime";
3
- import { A as m } from "./toggle-DKHg5sLm.js";
4
- import { u as d, b as f } from "./useButtonProps-DVP4s_ER.js";
3
+ import { A as m } from "./toggle-BFJ-X-Zp.js";
4
+ import { u as d, b as f } from "./useButtonProps-BCNfeziv.js";
5
5
  function b() {
6
6
  const o = d(v.name), {
7
7
  icon: t = void 0,
package/lib/Code.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./clsx-CXbNJWDD.cjs"),s=require("react/jsx-runtime"),h=require("./toggle-BQHMh_Q-.cjs");require("react");require("./index-D3RLYf-J.cjs");require("./theme.cjs");const u=require("./useButtonProps-DBJkNDS2.cjs");var x=/(^|[^`])`([^`]+)`(?!`)$/,C=/(^|[^`])`([^`]+)`(?!`)/g,v=o.Mark.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",o.mergeAttributes(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[o.markInputRule({find:x,type:this.type})]},addPasteRules(){return[o.markPasteRule({find:C,type:this.type})]}});function M(){const e=u.useButtonProps(a.name),{icon:t=void 0,tooltip:r=void 0,shortcutKeys:n=void 0,tooltipOptions:c={},action:i=void 0,isActive:p=void 0}=(e==null?void 0:e.componentProps)??{},{dataState:l,disabled:d,update:g}=u.useToggleActive(p),m=()=>{d||i&&(i(),g())};return e?s.jsx(h.ActionButton,{action:m,dataState:l,disabled:d,icon:t,shortcutKeys:n,tooltip:r,tooltipOptions:c}):s.jsx(s.Fragment,{})}const a=v.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:r,extension:n})=>({componentProps:{action:()=>t.commands.toggleCode(),isActive:()=>t.isActive("code"),disabled:!t.can().toggleCode(),icon:"Code",shortcutKeys:n.options.shortcutKeys??["mod","E"],tooltip:r("editor.code.tooltip")}})}}});exports.Code=a;exports.RichTextCode=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./clsx-CXbNJWDD.cjs"),s=require("react/jsx-runtime"),h=require("./toggle-Df4nXsom.cjs");require("react");require("./index-CyToCRcM.cjs");require("./theme.cjs");const u=require("./useButtonProps-BgjZY_Mu.cjs");var x=/(^|[^`])`([^`]+)`(?!`)$/,C=/(^|[^`])`([^`]+)`(?!`)/g,v=o.Mark.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",o.mergeAttributes(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[o.markInputRule({find:x,type:this.type})]},addPasteRules(){return[o.markPasteRule({find:C,type:this.type})]}});function M(){const e=u.useButtonProps(a.name),{icon:t=void 0,tooltip:r=void 0,shortcutKeys:n=void 0,tooltipOptions:c={},action:i=void 0,isActive:p=void 0}=(e==null?void 0:e.componentProps)??{},{dataState:l,disabled:d,update:g}=u.useToggleActive(p),m=()=>{d||i&&(i(),g())};return e?s.jsx(h.ActionButton,{action:m,dataState:l,disabled:d,icon:t,shortcutKeys:n,tooltip:r,tooltipOptions:c}):s.jsx(s.Fragment,{})}const a=v.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:r,extension:n})=>({componentProps:{action:()=>t.commands.toggleCode(),isActive:()=>t.isActive("code"),disabled:!t.can().toggleCode(),icon:"Code",shortcutKeys:n.options.shortcutKeys??["mod","E"],tooltip:r("editor.code.tooltip")}})}}});exports.Code=a;exports.RichTextCode=M;
package/lib/Code.js CHANGED
@@ -1,10 +1,10 @@
1
- import { M as m, e as l, f as g, m as h } from "./clsx-BWSGDJNJ.js";
1
+ import { M as m, e as l, f as g, m as h } from "./clsx-DSzxBzvL.js";
2
2
  import { jsx as a, Fragment as M } from "react/jsx-runtime";
3
- import { A as f } from "./toggle-DKHg5sLm.js";
3
+ import { A as f } from "./toggle-BFJ-X-Zp.js";
4
4
  import "react";
5
- import "./index-DF5ZPtWM.js";
5
+ import "./index-w1tuwtjd.js";
6
6
  import "./theme.js";
7
- import { u as v, a as C } from "./useButtonProps-DVP4s_ER.js";
7
+ import { u as v, a as C } from "./useButtonProps-BCNfeziv.js";
8
8
  var k = /(^|[^`])`([^`]+)`(?!`)$/, x = /(^|[^`])`([^`]+)`(?!`)/g, y = m.create({
9
9
  name: "code",
10
10
  addOptions() {
package/lib/CodeBlock.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("./clsx-CXbNJWDD.cjs"),N=require("react/jsx-runtime"),Xn=require("./toggle-BQHMh_Q-.cjs"),oe=require("react"),Qn=require("./index-D3RLYf-J.cjs");require("./theme.cjs");const ee=require("./select-CwGYPsPq.cjs"),Jn=require("./delete-node-CosiBes5.cjs"),we=require("./Icon-yqCglrdK.cjs"),$t=require("./useButtonProps-DBJkNDS2.cjs");function ea(){const e=$t.useButtonProps(Pt.name),{icon:t=void 0,tooltip:n=void 0,tooltipOptions:s={},action:l=void 0,isActive:u=void 0}=(e==null?void 0:e.componentProps)??{},{dataState:f,disabled:E,update:y}=$t.useToggleActive(u),v=()=>{E||l&&(l(),y())};return e?N.jsx(Xn.ActionButton,{action:v,dataState:f,disabled:E,icon:t,tooltip:n,tooltipOptions:s}):N.jsx(N.Fragment,{})}var Ne={},W=Symbol(),te=Symbol(),St=e=>typeof e=="string"?_[e]:e,_={plain:Ne,plaintext:Ne,text:Ne,txt:Ne},xe=(e,t)=>(t[te]||Oe)(e,t),Oe=(e,t)=>{for(var n=[e],s,l=[],u=0;s=St(t[W]);)delete t[W],Object.assign(t,s);for(In(e,t,n,0);l[u++]=n[0],n=n[1];);return l},Dt="</span>",Le="",Ae="",wn=e=>{for(var t="",n=e.length,s=0;s<n;)t+=An(e[s++]);return t},An=e=>{if(e instanceof fe){var{type:t,alias:n,content:s}=e,l=Le,u=Ae,f=`<span class="token ${t+(n?" "+n:"")+(t=="keyword"&&typeof s=="string"?" keyword-"+s:"")}">`;Ae+=Dt,Le+=f;var E=An(s);return Le=l,Ae=u,f+E+Dt}return typeof e!="string"?wn(e):(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;"),Ae&&e.includes(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("./clsx-CXbNJWDD.cjs"),N=require("react/jsx-runtime"),Xn=require("./toggle-Df4nXsom.cjs"),oe=require("react"),Qn=require("./index-CyToCRcM.cjs");require("./theme.cjs");const ee=require("./select-DAYrMJGw.cjs"),Jn=require("./delete-node-CosiBes5.cjs"),we=require("./Icon-CM1Cjn99.cjs"),$t=require("./useButtonProps-BgjZY_Mu.cjs");function ea(){const e=$t.useButtonProps(Pt.name),{icon:t=void 0,tooltip:n=void 0,tooltipOptions:s={},action:l=void 0,isActive:u=void 0}=(e==null?void 0:e.componentProps)??{},{dataState:f,disabled:E,update:y}=$t.useToggleActive(u),v=()=>{E||l&&(l(),y())};return e?N.jsx(Xn.ActionButton,{action:v,dataState:f,disabled:E,icon:t,tooltip:n,tooltipOptions:s}):N.jsx(N.Fragment,{})}var Ne={},W=Symbol(),te=Symbol(),St=e=>typeof e=="string"?_[e]:e,_={plain:Ne,plaintext:Ne,text:Ne,txt:Ne},xe=(e,t)=>(t[te]||Oe)(e,t),Oe=(e,t)=>{for(var n=[e],s,l=[],u=0;s=St(t[W]);)delete t[W],Object.assign(t,s);for(In(e,t,n,0);l[u++]=n[0],n=n[1];);return l},Dt="</span>",Le="",Ae="",wn=e=>{for(var t="",n=e.length,s=0;s<n;)t+=An(e[s++]);return t},An=e=>{if(e instanceof fe){var{type:t,alias:n,content:s}=e,l=Le,u=Ae,f=`<span class="token ${t+(n?" "+n:"")+(t=="keyword"&&typeof s=="string"?" keyword-"+s:"")}">`;Ae+=Dt,Le+=f;var E=An(s);return Le=l,Ae=u,f+E+Dt}return typeof e!="string"?wn(e):(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;"),Ae&&e.includes(`
2
2
  `)?e.replace(/\n/g,Ae+`
3
3
  `+Le):e)},In=(e,t,n,s,l)=>{for(var u in t)if(t[u])for(var f=0,E=t[u],y=Array.isArray(E)?E:[E];f<y.length;++f){if(l&&l[0]==u&&l[1]==f)return;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]){var d=a[0],o=0,i,h;if(!(d instanceof fe)){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){if(!i)break;if(i[0]){for(var S=i.index,k=S+i[0].length,I;S>=r+(I=a[0].length);a=a[1],r+=I);if(a[0]instanceof fe)continue;for(var w=a,E=r;(E+=w[0].length)<k;w=w[1],o++);d=e.slice(r,E),i.index-=r}}if(i&&i[0]){for(var S=i.index,x=i[0],T=d.slice(S+x.length),L=r+d.length,P=new fe(u,p?xe(x,p):x,x,g),M=a,V=0,z;M=M[1],V++<o;);T&&(!M||M[0]instanceof fe?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&&(In(e,t,a,r,z=[u,f,L]),L=z[2]),l&&L>l[2]&&(l[2]=L)}}}}};function fe(e,t,n,s){this.type=e,this.content=t,this.alias=s,this.length=n.length}var He="\\b(?:BASH(?:OPTS|_ALIASES|_ARG[CV]|_CMDS|_COMPLETION_COMPAT_DIR|_LINENO|_REMATCH|_SOURCE|_VERSINFO|_VERSION)?|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|E?UID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_(?:ADDRESS|ALL|IDENTIFICATION|MEASUREMENT|MONETARY|NAME|NUMERIC|PAPER|TELEPHONE|TIME)|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS[1-4]|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_(?:CONFIG_DIRS|CURRENT_DESKTOP|DATA_DIRS|GREETER_DATA_DIR|MENU_PREFIX|RUNTIME_DIR|SEAT|SEAT_PATH|SESSION_DESKTOP|SESSION_ID|SESSION_PATH|SESSION_TYPE|VTNR)|XMODIFIERS)\\b",pt={pattern:/(^(["']?)\w+\2)[ ]+\S.*/,lookbehind:!0,alias:"punctuation"},Rn={variable:/^\$\(|^`|\)$|`$/},Ce={bash:pt,environment:{pattern:RegExp("\\$"+He),alias:"constant"},variable:[{pattern:/\$?\(\([^]*?\)\)/g,greedy:!0,inside:{variable:[{pattern:/(^\$[^]+)../,lookbehind:!0},/^\$\(\(/],number:/\b0x[a-fA-F\d]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|&&|\|\||(?:\*\*|<<|>>|[%&|^!=<>/*+-])=?|[?:~]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:[^()]|\([^)]*\))*\)|`[^`]+`/g,greedy:!0,inside:Rn},{pattern:/\$\{[^}]*\}/g,greedy:!0,inside:{operator:/:[?=+-]?|[!/]|##?|%%?|\^\^?|,,?/,punctuation:/[[\]]/,environment:{pattern:RegExp("(\\{)"+He),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[a-fA-F\d]{8}|u[a-fA-F\d]{4}|x[a-fA-F\d]{1,2})/},ta=pt.inside=_.sh=_.shell=_.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,lookbehind:!0,alias:"variable"},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,lookbehind:!0,alias:"variable",inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+He),lookbehind:!0,alias:"constant"}}},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?![^\s=])/,lookbehind:!0,alias:"variable"},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[^]*?\n\2/g,lookbehind:!0,greedy:!0,inside:Ce},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[^]*?\n\3/g,lookbehind:!0,greedy:!0,inside:{bash:pt}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[^]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^\\"`$])*"/g,lookbehind:!0,greedy:!0,inside:Ce},{pattern:/(^|[^$\\])'[^']*'/g,lookbehind:!0,greedy:!0},{pattern:/\$'(?:\\[^]|[^\\'])*'/g,greedy:!0,inside:{entity:Ce.entity}}],environment:{pattern:RegExp("\\$?"+He),alias:"constant"},variable:Ce.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|c?fdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cron|crontab|c?split|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff3?|dig|dircolors|dirname|dirs?|dmesg|docker|docker-compose|du|[ef]?grep|eject|env|ethtool|expand|expect|expr|fdformat|fg|file|find|fmt|fold|format|free|fsck|fuser|g?awk|git|g?parted|groupadd|groupdel|groupmod|groups|grub-mkconfig|halt|head|hg|history|host|hostname|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|killall|less|link|ln|logname|logrotate|look|lpc|lprint[dq]?|lprm?|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mm?v|more|most|mtools|m?tr|mutt|nano|nc|netstat|nice|nl|node|nohup|notify-send|nslookup|op|open|passwd|paste|pathchk|ping|p?kill|p?npm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ra[mr]|reboot|remsync|rename|renice|rev|rmdir|rp?m|r?sync|[sr]?cp|screen|sdiff|se[dq]|sendmail|service|s?ftp|shellcheck|shuf|shutdown|sleep|s?locate|[sz]?sh|stat|strace|sudo|sum?|suspend|swapon|sysctl|tac|tail|tar|tee|time|timeout|h?top|touch|traceroute|t?sort|tty|u?mount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vim?|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|g?zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|[ls]et|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[[\]{};\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"].forEach(e=>Rn[e]=ta[e]);var kn=/(?:"(?:\\[^]|[^\\\n"])*"|'(?:\\[^]|[^\\\n'])*')/g,Me=kn.source,Ft={rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^)]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}};Ft[W]=_.css={comment:/\/\*[^]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|${Me})*?(?:;|(?=\\s*\\{))`),inside:Ft},url:{pattern:RegExp(`\\burl\\((?:${Me}|(?:[^\\\\
4
4
  "')=]|\\\\[^])*)\\)`,"gi"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+Me+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|${Me})*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:kn,greedy:!0},property:{pattern:/(^|[^-\w\xa0-\uffff])(?!\d)(?:(?!\s)[-\w\xa0-\uffff])+(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z\d])[-a-z\d]+(?=\()/i,lookbehind:!0},punctuation:/[(){},:;]/};var Fe=(e,t)=>{if(t.has(e))return t.get(e);var n=e,s=na.call(e).slice(8,-1);if(s=="Object"){t.set(e,n={});for(var l in e)n[l]=Fe(e[l],t);e[W]&&(n[W]=Fe(e[W],t)),e[te]&&(n[te]=e[te])}else if(s=="Array"){t.set(e,n=[]);for(var u=0,f=e.length;u<f;u++)n[u]=Fe(e[u],t)}return n},Qe=e=>Fe(e,new Map),ie=(e,t)=>Object.assign(Qe(_[e]),t),$=(e,t,n)=>{var s={};for(var l in e)s[l]=e[l],delete e[l];for(var l in s)l==t&&Object.assign(e,n),n.hasOwnProperty(l)||(e[l]=s[l])},na={}.toString,Ve=_.css,Ut={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},Bt={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};Ve.selector.inside=Ve.atrule.inside["selector-function-argument"].inside={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:/\[(?:[^[\]"']|(["'])(?:\\[^]|(?!\1)[^\\\n])*\1)*\]/g,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xa0-\uffff])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xa0-\uffff])+/,lookbehind:!0},"attr-value":{pattern:/(=\s*)(?:(?!\s)[-\w\xa0-\uffff])+(?=\s*$)|(["'])(?:\\[^]|(?!\2)[^\\\n])*\2/,lookbehind:!0},operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/};$(Ve,"property",{variable:{pattern:/(^|[^-\w\xa0-\uffff])--(?!\d)(?:(?!\s)[-\w\xa0-\uffff])*/i,lookbehind:!0}});$(Ve,"function",{operator:{pattern:/(\s)[/*+-](?!\S)/,lookbehind:!0},hexcode:{pattern:/\B#[a-f\d]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:(?:alice|cadet|cornflower|deepsky|dodger|midnight|powder|royal|sky|steel)blue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blueviolet|brown|burlywood|chartreuse|chocolate|coral|cornsilk|crimson|(?:dark)?(?:blue|cyan|goldenrod|gr[ae]y|green|khaki|magenta|olivegreen|orange|orchid|red|salmon|seagreen|slateblue|slategr[ae]y|turquoise|violet)|deeppink|dimgr[ae]y|firebrick|floralwhite|(?:forest|lawn|lime|pale|spring)green|fuchsia|gainsboro|ghostwhite|gold|greenyellow|honeydew|hotpink|indianred|indigo|ivory|lavender|lavenderblush|lemonchiffon|light(?:blue|coral|cyan|goldenrodyellow|gr[ae]y|green|pink|salmon|seagreen|skyblue|slategr[ae]y|steelblue|yellow)|lime|linen|maroon|medium(?:aquamarine|blue|orchid|purple|seagreen|slateblue|springgreen|turquoise|violetred)|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orangered|palegoldenrod|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|purple|rebeccapurple|rosybrown|saddlebrown|sandybrown|seashell|sienna|silver|snow|tan|teal|thistle|tomato|transparent|wheat|white|whitesmoke|yellow|yellowgreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{function:/^[^(]+/,unit:Ut,number:Bt,punctuation:/[(),]/}}],entity:/\\[a-f\d]{1,8}/i,unit:Ut,number:Bt});_.ini={comment:{pattern:/(^[ \f \v]*)[#;].*/m,lookbehind:!0},section:{pattern:/(^[ \f \v]*)\[[^\n\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f \v]*)[^ \f \v\]]+(?:[ \f \v]+[^ \f \v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/[[\]]/}},key:{pattern:/(^[ \f \v]*)[^ \f\n \v=]+(?:[ \f \v]+[^ \f\n \v=]+)*(?=[ \f \v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f \v]*)[^ \f\n \v]+(?:[ \f \v]+[^ \f\n \v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^(["']).+(?=\1$)/,lookbehind:!0}}},punctuation:/=/};var se=()=>({pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0}),Tt=()=>({pattern:/(["'])(?:\\[^]|(?!\1)[^\\\n])*\1/g,greedy:!0}),Sn=/\b0x[a-f\d]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,ae=/[()[\]{}.,:;]/,j=/\b(?:false|true)\b/,at={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[^]+/}};at.expression.inside=_.kts=_.kt=_.kotlin={"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:at},string:/[^]+/}},{pattern:/"(?:\\.|[^\\\n"$]|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\\\)*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:at},string:/[^]+/}}],char:{pattern:/'(?:[^\\\n']|\\(?:.|u[a-fA-F\d]{0,4}))'/g,greedy:!0},comment:se(),annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"},keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},boolean:j,label:{pattern:/\b\w+@|@\w+/,alias:"symbol"},function:{pattern:/(?:`[^\n`]+`|\b\w+)(?=\s*\()|(\.)(?:`[^\n`]+`|\w+)(?=\s*\{)/g,lookbehind:!0,greedy:!0},number:/\b(?:0[xX][a-fA-F\d]+(?:_[a-fA-F\d]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/--|\+\+|&&|\|\||->|[!=]==|!!|[%!=<>/*+-]=?|[?:]:?|\.\.|\b(?:and|inv|shl|u?shr|x?or)\b/,punctuation:ae};var Tn=[{pattern:/&[a-z\d]{1,8};/i,alias:"named-entity"},/&#x?[a-f\d]{1,8};/i],aa={pattern:/<\/?(?!\d)[^\s/=>$<%]+(?:\s(?:\s*[^\s/=>]+(?:\s*=\s*(?!\s)(?:"[^"]*"|'[^']*'|[^\s"'=>]+(?=[\s>]))?|(?=[\s/>])))+)?\s*\/?>/g,greedy:!0,inside:{punctuation:/^<\/?|\/?>$/,tag:{pattern:/^\S+/,inside:{namespace:/^[^:]+:/}},"attr-value":[{pattern:/(=\s*)(?:"[^"]*"|'[^']*'|[^\s"'=>]+)/g,lookbehind:!0,greedy:!0,inside:{punctuation:/^["']|["']$/,entity:Tn}}],"attr-equals":/=/,"attr-name":{pattern:/\S+/,inside:{namespace:/^[^:]+:/}}}};_.rss=_.atom=_.ssml=_.xml={comment:{pattern:/<!--(?:(?!<!--)[^])*?-->/g,greedy:!0},prolog:{pattern:/<\?[^]+?\?>/g,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/gi,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[^]+(?=\]\s*>$)/,lookbehind:!0,inside:"xml"},string:/"[^"]*"|'[^']*'/,punctuation:/^<!|[>[\]]/,"doctype-tag":/^DOCTYPE/i,name:/\S+/}},cdata:{pattern:/<!\[CDATA\[[^]*?\]\]>/gi,greedy:!0},tag:aa,entity:Tn,"markup-bracket":{pattern:/[()[\]{}]/,alias:"punctuation"}};var bt=(e,t)=>(e["language-"+t]={pattern:/[^]+/,inside:t},e),Gt=(e,t)=>({pattern:RegExp(`(<${e}[^>]*>)(?!</${e}>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])+?(?=</${e}>)`,"gi"),lookbehind:!0,greedy:!0,inside:bt({"included-cdata":{pattern:/<!\[CDATA\[[^]*?\]\]>/i,inside:bt({cdata:/^<!\[CDATA\[|\]\]>$/i},t)}},t)}),zt=(e,t)=>({pattern:RegExp(`((?:^|["'\\s])(?:${e})\\s*=\\s*)(?:"[^"]*"|'[^']*'|[^\\s"'=>]+)`,"gi"),lookbehind:!0,greedy:!0,inside:bt({punctuation:/^["']|["']$/},t)}),xn=_.svg=_.mathml=_.html=_.markup=Qe(_.xml);xn.tag.inside["attr-value"].unshift(zt("style","css"),zt("on[a-z]+","javascript"));$(xn,"cdata",{style:Gt("style","css"),script:Gt("script","javascript")});_.r={comment:/#.*/,string:{pattern:/(["'])(?:\\.|(?!\1)[^\\\n])*\1/g,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[a-fA-F\d]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->>?|<=|<<?-|[!=<>]=?|::?|&&?|\|\|?|[~^$@/*+-]/,punctuation:/[()[\]{},;]/};_.basic={comment:{pattern:/(?:!|rem\b).+/i,inside:{keyword:/^rem/i}},string:{pattern:/"(?:""|[#$%&'().,:;\w ?^!=<>/*+-])*"/g,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,keyword:/\b(?:as|beep|bload|bsave|call absolute|call|case|chain|chdir|clear|close|cls|com|common|const|data|declare|def(?: fn| seg|dbl|int|[ls]ng|str)|dim|do|double|else|elseif|environ|erase|error|exit|field|files|for|function|get|gosub|goto|if|input|integer|ioctl|key|kill|line input|locate|lock|long|loop|[lr]set|mkdir|name|next|off|on(?: com| error| key| timer)?|open|option base|[op]ut|poke|read|redim|rem|restore|resume|return|rmdir|run|select case|shared|shell|single|sleep|static|step|stop|string|sub|swap|system|then|timer|to|troff|tron|type|unlock|until|using|view print|wait|w?end|while|write)(?:\$|\b)/i,function:/\b(?:abs|access|a?cos|angle|area|arithmetic|array|a?sin|ask|atn?|base|begin|break|cause|ceil|chr|clip|collate|color|co[nst]|cosh|csc|date|datum|debug|decimal|de[fgt]|degrees|delete|device|display|dot|elapsed|eps|erasable|exline|exp|external|extype|filetype|fixed|fp|go|graph|handler|idn|image|int?|internal|ip|is|keyed|[lu]bound|[lu]case|left|le[nt]|length|lines?|log2?|log10|[lr]trim|margin|ma[tx]|maxnum|mi[dn]|missing|mod|native|nul|numeric|of|option|ord|organization|outin|output|pi|pointer|points?|pos|print|program|prompt|rad|radians|randomize|record|recsize|rectype|relative|remainder|repeat|rest|retry|rewrite|right|rnd|round|same|se[ct]|select|sequential|setter|sgn|sinh|size|skip|s[qt]r|standard|status|stream|style|tab|tanh?|template|text|there|time|timeout|trace|transform|truncate|use|val|variable|viewport|when|window|with|zer|zonewidth)(?:\$|\b)/i,operator:/<=|<>|>=|[&^=<>/*+-]|\b(?:and|eqv|imp|not|x?or)\b/i,punctuation:/[(),:;]/};_.vbnet=ie("basic",{comment:{pattern:/(?:!|'|rem\b).*/i,inside:{keyword:/^rem/i}},string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/g,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:addhandler|addressof|alias|and|andalso|as|beep|bload|boolean|bsave|byref|byval|call absolute|call|case|catch|cbool|c?byte|cc?har|c?date|cdbl|cdec|chain|chdir|cu?int|class|clear|close|cls|cobj|com|common|const|continue|c?sbyte|c?u?short|c?sng|cstr|c?type|cu?lng|data|decimal|declare|def(?: fn| seg|dbl|int|lng|sng|str)|default|delegate|dim|directcast|do|double|else|elseif|enum|environ|erase|error|event|exit|false|true|field|files|finally|for each|for|friend|function|[gls]et|gettype|getxmlnamespace|global|gosub|goto|handles|i[fns]|implements|imports|inherits|input|interface|ioctl|isnot|key|kill|lib|like|line input|locate|lock|loop|[lr]set|me|mkdir|mod|module|mustinherit|mustoverride|mybase|myclass|name|namespace|narrowing|new|next|not|nothing|notinheritable|notoverridable|object|off?|on (?:com|error|key|timer)|on|open|operator|option base|option|optional|orelse|out|overloads|overridable|overrides|paramarray|partial|poke|private|property|protected|public|put|raiseevent|read|readonly|redim|removehandler|restore|resume|return|rmdir|run|select case|select|shadows|shared|shell|single|sleep|static|step|stop|string|structure|sub|swap|synclock|system|[tw]hen|throw|timer|to|troff|tron|try|trycast|typeof|u?integer|u?long|unlock|until|using|view print|wait|w?end|while|widening|with|withevents|write|writeonly|x?or)|\B#(?:const|else|elseif|end|if))(?:\$|\b)/i,punctuation:/[(){},:;]/});var Ht={pattern:/'(?:\\[^]|[^\\\n']){0,32}'/g,greedy:!0},Vt={pattern:/\/\/(?:[^\\\n]|\\\n?)*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},Zt={pattern:/"(?:\\[^]|[^\\\n"])*"/g,greedy:!0},jt={pattern:/\S[^]*/};jt.inside=_.c={comment:Vt,char:Ht,macro:{pattern:/(^[ ]*)#\s*[a-z](?:[^\\\n/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\[^])*/img,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Zt],char:Ht,comment:Vt,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=\n)/,expression:jt}},string:Zt,"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([^]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[a-f\d]+(?:\.[a-f\d]*)?|\.[a-f\d]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/->|([&|:+-])\1|[?:~]|>>=?|<<=?|[%&|^!=<>/*+-]=?/,punctuation:ae};$(_.opencl=ie("c",{keyword:/\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[a-f\d]+(?:\.[a-f\d]*)?|\.[a-f\d]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:j,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN2|LN10|LOG2E?|LOG10E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,alias:"constant"}}),"class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|u?intptr_t)\b/,alias:"keyword"}});var ft={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:[2348]|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:FALSE|TRUE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|RA?|READ_(?:ONLY|WRITE)_CACHE|RG|RGB[Ax]?|RG?x|RUNNING|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_5[56]5|VERSION_(?:1_[012]|2_[01])|s?BGRA|sRGB[Ax]?)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image[23]D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};$(_.c,"keyword",ft);_.cpp&&(ft["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image(?:[123]D|[12]DArray|1DBuffer|[23]DGL|Format|GL)?|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTrait(?:Atomic|Coarse|Fine|ReadOnly|ReadWrite|WriteOnly)|Sampler|UserEvent)\b/,alias:"keyword"},$(_.cpp,"keyword",ft));var ra=_.diff={coord:/^(?:\*{3}|-{3}|\+{3}|\d).*$|^@@.*@@$/m},rt={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};for(var pe in rt){var it=pe.split("-")[0];ra[pe]={pattern:RegExp("^(?:["+rt[pe]+`].*$
package/lib/CodeBlock.js CHANGED
@@ -1,13 +1,13 @@
1
- import { h as ta, j as Te, N as na, t as Pt, k as aa, m as ra } from "./clsx-BWSGDJNJ.js";
1
+ import { h as ta, j as Te, N as na, t as Pt, k as aa, m as ra } from "./clsx-DSzxBzvL.js";
2
2
  import { jsx as C, Fragment as ia, jsxs as tt } from "react/jsx-runtime";
3
- import { A as sa } from "./toggle-DKHg5sLm.js";
3
+ import { A as sa } from "./toggle-BFJ-X-Zp.js";
4
4
  import { useRef as $t, useCallback as nt, useEffect as Dt } from "react";
5
- import { a as oa } from "./index-DF5ZPtWM.js";
5
+ import { a as oa } from "./index-w1tuwtjd.js";
6
6
  import "./theme.js";
7
- import { S as Ft, a as Ut, b as la, c as Bt, d as Gt } from "./select-DctYuHLH.js";
7
+ import { S as Ft, a as Ut, b as la, c as Bt, d as Gt } from "./select-BsKwU96B.js";
8
8
  import { d as ca } from "./delete-node-IyVmiRbI.js";
9
- import { I as Ee } from "./Icon-Ctva8VeB.js";
10
- import { u as da, a as ua } from "./useButtonProps-DVP4s_ER.js";
9
+ import { I as Ee } from "./Icon-r62Z3hkc.js";
10
+ import { u as da, a as ua } from "./useButtonProps-BCNfeziv.js";
11
11
  function mr() {
12
12
  const e = da(ea.name), {
13
13
  icon: t = void 0,
package/lib/CodeView.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./clsx-CXbNJWDD.cjs"),n=require("react/jsx-runtime"),v=require("./toggle-BQHMh_Q-.cjs");require("react");require("./index-D3RLYf-J.cjs");require("./theme.cjs");const r=require("./useButtonProps-DBJkNDS2.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-Df4nXsom.cjs");require("react");require("./index-CyToCRcM.cjs");require("./theme.cjs");const r=require("./useButtonProps-BgjZY_Mu.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,10 +1,10 @@
1
- import { E as l } from "./clsx-BWSGDJNJ.js";
1
+ import { E as l } from "./clsx-DSzxBzvL.js";
2
2
  import { jsx as c, Fragment as g } from "react/jsx-runtime";
3
- import { A as u } from "./toggle-DKHg5sLm.js";
3
+ import { A as u } from "./toggle-BFJ-X-Zp.js";
4
4
  import "react";
5
- import "./index-DF5ZPtWM.js";
5
+ import "./index-w1tuwtjd.js";
6
6
  import "./theme.js";
7
- import { u as v, a as w } from "./useButtonProps-DVP4s_ER.js";
7
+ import { u as v, a as w } from "./useButtonProps-BCNfeziv.js";
8
8
  function b() {
9
9
  const t = v(C.name), {
10
10
  icon: e = void 0,
package/lib/Color.cjs CHANGED
@@ -1 +1 @@
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-BQHMh_Q-.cjs"),v=require("./separator-NoH_SLRW.cjs");require("./index-D3RLYf-J.cjs");require("./theme.cjs");const h=require("./useButtonProps-DBJkNDS2.cjs"),j=require("./Icon-yqCglrdK.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-Df4nXsom.cjs"),v=require("./separator-DhFsFHrr.cjs");require("./index-CyToCRcM.cjs");require("./theme.cjs");const h=require("./useButtonProps-BgjZY_Mu.cjs"),j=require("./Icon-CM1Cjn99.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;