@remarkablejames/editor 0.0.2 → 0.0.4

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 (193) hide show
  1. package/lib/{ActionMenuButton-Bmn3RME4.js → ActionMenuButton-BUtJUsfO.js} +9 -10
  2. package/lib/ActionMenuButton-M55VtCZ5.cjs +1 -0
  3. package/lib/Attachment.cjs +2 -2
  4. package/lib/Attachment.js +166 -133
  5. package/lib/Blockquote.cjs +2 -2
  6. package/lib/Blockquote.js +13 -12
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +11 -10
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +9 -8
  11. package/lib/Callout.cjs +1 -1
  12. package/lib/Callout.js +42 -46
  13. package/lib/Clear.cjs +1 -1
  14. package/lib/Clear.js +13 -14
  15. package/lib/Code.cjs +1 -1
  16. package/lib/Code.js +6 -5
  17. package/lib/CodeBlock.cjs +1 -1
  18. package/lib/CodeBlock.js +30 -31
  19. package/lib/CodeView.cjs +1 -1
  20. package/lib/CodeView.js +9 -8
  21. package/lib/Color.cjs +1 -1
  22. package/lib/Color.js +18 -19
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +9 -8
  25. package/lib/Drawer-CdQBnwUs.cjs +2 -0
  26. package/lib/{Drawer-DvGh9aXG.js → Drawer-mlmJ2nCT.js} +41 -47
  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 +15 -16
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +24 -28
  33. package/lib/ExportPdf.cjs +3 -3
  34. package/lib/ExportPdf.js +14 -13
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +6 -6
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +8 -7
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +16 -15
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +27 -27
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +22 -23
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +11 -11
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +10 -9
  49. package/lib/Iframe-B_a_AoZc.cjs +1 -0
  50. package/lib/{Iframe-CnnvV6cK.js → Iframe-CYgR99Ny.js} +11 -13
  51. package/lib/Iframe.cjs +1 -1
  52. package/lib/Iframe.js +2 -2
  53. package/lib/Image.cjs +1 -1
  54. package/lib/Image.js +4 -5
  55. package/lib/ImageGif.cjs +1 -1
  56. package/lib/ImageGif.js +79 -82
  57. package/lib/ImportWord.cjs +1 -1
  58. package/lib/ImportWord.js +26 -27
  59. package/lib/Indent-BAcoFdaq.cjs +1 -0
  60. package/lib/{Indent-Bsj8gKvT.js → Indent-BMz2ILRl.js} +31 -30
  61. package/lib/Indent.cjs +1 -1
  62. package/lib/Indent.js +2 -2
  63. package/lib/Italic.cjs +1 -1
  64. package/lib/Italic.js +12 -11
  65. package/lib/{Katex-CilGTz7u.js → Katex-DOlb4iTP.js} +19 -22
  66. package/lib/Katex-bIhj82VV.cjs +4 -0
  67. package/lib/Katex.cjs +1 -1
  68. package/lib/Katex.js +2 -2
  69. package/lib/LineHeight.cjs +1 -1
  70. package/lib/LineHeight.js +19 -20
  71. package/lib/Link.cjs +1 -1
  72. package/lib/Link.js +2 -2
  73. package/lib/LinkEditBlock-Cqs5RxjV.cjs +5 -0
  74. package/lib/{LinkEditBlock-BD_WvA3r.js → LinkEditBlock-xnokk4G7.js} +19 -24
  75. package/lib/Mention.js +3 -3
  76. package/lib/{Mermaid-BrjU75Bs.js → Mermaid-Bs3pIGc6.js} +45 -48
  77. package/lib/Mermaid-DiOdgQv1.cjs +2 -0
  78. package/lib/Mermaid.cjs +1 -1
  79. package/lib/Mermaid.js +2 -2
  80. package/lib/MoreMark.cjs +1 -1
  81. package/lib/MoreMark.js +26 -28
  82. package/lib/OrderedList.cjs +1 -1
  83. package/lib/OrderedList.js +11 -10
  84. package/lib/SearchAndReplace.cjs +1 -1
  85. package/lib/SearchAndReplace.js +37 -42
  86. package/lib/SlashCommand.cjs +1 -1
  87. package/lib/SlashCommand.js +6 -6
  88. package/lib/SlashCommandNodeView-CLimjqhb.cjs +1 -0
  89. package/lib/{SlashCommandNodeView-COx5qZ2y.js → SlashCommandNodeView-CYcf7mVz.js} +67 -79
  90. package/lib/Strike.cjs +1 -1
  91. package/lib/Strike.js +12 -11
  92. package/lib/{Table-BlM8yMhr.js → Table-bz1Wcojf.js} +47 -47
  93. package/lib/Table-dlXTKKwJ.cjs +5 -0
  94. package/lib/Table.cjs +1 -1
  95. package/lib/Table.js +1 -1
  96. package/lib/TaskList.cjs +1 -1
  97. package/lib/TaskList.js +12 -11
  98. package/lib/TextAlign.cjs +1 -1
  99. package/lib/TextAlign.js +26 -27
  100. package/lib/TextDirection.cjs +1 -1
  101. package/lib/TextDirection.js +18 -19
  102. package/lib/TextUnderline.cjs +1 -1
  103. package/lib/TextUnderline.js +9 -8
  104. package/lib/{Twitter-BP8sYXX7.js → Twitter-CNTXzgt0.js} +18 -22
  105. package/lib/Twitter-DhEnGg6P.cjs +1 -0
  106. package/lib/Twitter.cjs +1 -1
  107. package/lib/Twitter.js +2 -2
  108. package/lib/Video.cjs +1 -1
  109. package/lib/Video.js +5 -6
  110. package/lib/bubble.cjs +3 -3
  111. package/lib/bubble.js +78 -87
  112. package/lib/{clsx-m_C5j3RU.js → clsx-CDyrfCnw.js} +24 -24
  113. package/lib/{dropdown-menu-C1hdPLCZ.js → dropdown-menu-BuSlU2uN.js} +1 -1
  114. package/lib/{dropdown-menu-CkHN04Mx.cjs → dropdown-menu-CfWNst4v.cjs} +1 -1
  115. package/lib/extensions/Attachment/Attachment.d.ts +22 -2
  116. package/lib/extensions/Image/Image.d.ts +11 -0
  117. package/lib/extensions/Image/components/ImageCropper.d.ts +1 -1
  118. package/lib/index-8B00E8e4.js +5055 -0
  119. package/lib/index-BrxL7y9p.cjs +1 -0
  120. package/lib/index-Bt9LiArC.cjs +10 -0
  121. package/lib/{index-B3Ijnbxs.js → index-C-tDsIKJ.js} +1 -1
  122. package/lib/{index-C1KQsOcg.js → index-C1WCZhyA.js} +1 -1
  123. package/lib/{index-C8FjP66D.js → index-CsSfYR30.js} +1 -1
  124. package/lib/{index-4Q5IhypJ.js → index-DZfkCNKr.js} +15 -9
  125. package/lib/{index-s3l5RdyW.js → index-DjDf4BK8.js} +1 -1
  126. package/lib/index.cjs +4 -4
  127. package/lib/index.js +147 -392
  128. package/lib/locale-bundle.cjs +1 -1
  129. package/lib/locale-bundle.js +1 -1
  130. package/lib/locales/en.d.ts +189 -188
  131. package/lib/locales/fi.d.ts +189 -188
  132. package/lib/locales/hu.d.ts +189 -188
  133. package/lib/locales/index.d.ts +1134 -1128
  134. package/lib/locales/pt-br.d.ts +189 -188
  135. package/lib/locales/vi.d.ts +189 -188
  136. package/lib/locales/zh-cn.d.ts +189 -188
  137. package/lib/{popover-B05Fd8lC.cjs → popover-51mwx3UY.cjs} +1 -1
  138. package/lib/{popover-CsSXh7w6.js → popover-DMPRgXD3.js} +1 -1
  139. package/lib/{renderNodeView-C_hPIdEs.js → renderNodeView-BJSrgyGj.js} +2 -2
  140. package/lib/{select-7ubC1NF0.cjs → select-B7v1Scb-.cjs} +1 -1
  141. package/lib/{select-B3-5wTqn.js → select-BxFDMaZi.js} +1 -1
  142. package/lib/{separator-CYCA8tSn.js → separator-CpqX9KQC.js} +12 -13
  143. package/lib/separator-kB9YUfeO.cjs +1 -0
  144. package/lib/style.css +1 -1
  145. package/lib/{textarea-1FhpmBkP.js → textarea-C5DsgzSy.js} +1 -1
  146. package/lib/{textarea-Bjhcpp76.cjs → textarea-bQSzjqg3.cjs} +1 -1
  147. package/lib/theme/theme.d.ts +1 -1
  148. package/lib/{updatePosition-DvfTZHcH.js → updatePosition-e90ZrFWW.js} +2 -2
  149. package/package.json +1 -1
  150. package/lib/ActionMenuButton-C5P0Kzrb.cjs +0 -1
  151. package/lib/Drawer-gz9U5ArC.cjs +0 -2
  152. package/lib/Icon-CKM0tYbW.js +0 -15
  153. package/lib/Icon-CQyFgXeo.cjs +0 -1
  154. package/lib/Iframe-Ds6gG2YO.cjs +0 -1
  155. package/lib/ImageCropper-BKhXlnXN.cjs +0 -1
  156. package/lib/ImageCropper-DUzu_9-6.js +0 -896
  157. package/lib/Indent-D_7HOYYd.cjs +0 -1
  158. package/lib/Katex-lL3bHXJd.cjs +0 -4
  159. package/lib/LinkEditBlock-D3HSHmsU.cjs +0 -5
  160. package/lib/Mermaid-BfeLPzoS.cjs +0 -2
  161. package/lib/SlashCommandNodeView-DD-nlhM-.cjs +0 -1
  162. package/lib/Table-C21AlUrh.cjs +0 -5
  163. package/lib/Twitter-D46MnvPr.cjs +0 -1
  164. package/lib/Video-Bpd8W8l6.js +0 -231
  165. package/lib/Video-BwrHx6B1.cjs +0 -1
  166. package/lib/button-BmTP96NR.cjs +0 -1
  167. package/lib/button-CDIxPURh.js +0 -35
  168. package/lib/checkbox-7sfSdzy9.js +0 -29
  169. package/lib/checkbox-DyVlLWHv.cjs +0 -1
  170. package/lib/dialog-B-jOQ5i3.cjs +0 -1
  171. package/lib/dialog-QWWUWOGP.js +0 -95
  172. package/lib/events.constant-Bh2uzJud.js +0 -71
  173. package/lib/events.constant-ELn21EzG.cjs +0 -1
  174. package/lib/file-BLas99n7.js +0 -43
  175. package/lib/file-i7e4nQY2.cjs +0 -1
  176. package/lib/index-CAiZY1nx.js +0 -2741
  177. package/lib/index-DWSAk_9a.cjs +0 -1
  178. package/lib/index-bVGIXhRg.cjs +0 -1
  179. package/lib/input-qvpuOf-3.js +0 -21
  180. package/lib/input-s0JD5kf2.cjs +0 -1
  181. package/lib/isNumber-BTYSVlKo.cjs +0 -1
  182. package/lib/isNumber-WaBzl_0s.js +0 -15
  183. package/lib/label-CFax-gzo.cjs +0 -1
  184. package/lib/label-DC37f2RQ.js +0 -11
  185. package/lib/separator-ncbdw4oq.cjs +0 -1
  186. package/lib/tabs-BeHxylKH.js +0 -46
  187. package/lib/tabs-DBqNpGAq.cjs +0 -1
  188. package/lib/throttle-CRNq0z-O.js +0 -249
  189. package/lib/throttle-gTTvqDTW.cjs +0 -1
  190. package/lib/toggle-DoJTBdvy.js +0 -89
  191. package/lib/toggle-oFwBZC4x.cjs +0 -1
  192. package/lib/useButtonProps-BE10eHkG.js +0 -165
  193. package/lib/useButtonProps-CFu0GHzW.cjs +0 -1
@@ -1,16 +1,15 @@
1
1
  import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
2
  import { Slot as n } from "@radix-ui/react-slot";
3
3
  import r from "react";
4
- import { T as m, a as d, b as f, g as s } from "./useButtonProps-BE10eHkG.js";
5
- import { B as u } from "./button-CDIxPURh.js";
6
- import { i as o } from "./index-CAiZY1nx.js";
7
- const b = r.forwardRef(
4
+ import { i as d, T as m, a as f, B as s, b as u, g } from "./index-8B00E8e4.js";
5
+ import "./theme.js";
6
+ const C = r.forwardRef(
8
7
  ({ asChild: x = !1, tooltip: i, ...t }, l) => {
9
8
  var a;
10
- const h = o[t.icon];
9
+ const h = d[t.icon];
11
10
  return /* @__PURE__ */ c(m, { children: [
12
- /* @__PURE__ */ e(d, { asChild: !0, children: /* @__PURE__ */ e(
13
- x ? n : u,
11
+ /* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ e(
12
+ x ? n : s,
14
13
  {
15
14
  className: "richtext-h-[32px] richtext-min-w-24 richtext-overflow-hidden richtext-px-[5px] richtext-py-0",
16
15
  "data-state": t != null && t.dataState ? "on" : "off",
@@ -24,13 +23,13 @@ const b = r.forwardRef(
24
23
  ] })
25
24
  }
26
25
  ) }),
27
- i && /* @__PURE__ */ e(f, { children: /* @__PURE__ */ c("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
26
+ i && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ c("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
28
27
  i && /* @__PURE__ */ e("div", { children: i }),
29
- /* @__PURE__ */ e("div", { className: "richtext-flex", children: !!((a = t == null ? void 0 : t.shortcutKeys) != null && a.length) && /* @__PURE__ */ e("span", { children: s(t == null ? void 0 : t.shortcutKeys) }) })
28
+ /* @__PURE__ */ e("div", { className: "richtext-flex", children: !!((a = t == null ? void 0 : t.shortcutKeys) != null && a.length) && /* @__PURE__ */ e("span", { children: g(t == null ? void 0 : t.shortcutKeys) }) })
30
29
  ] }) })
31
30
  ] });
32
31
  }
33
32
  );
34
33
  export {
35
- b as A
34
+ C as A
36
35
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),a=require("@radix-ui/react-slot"),d=require("react"),i=require("./index-Bt9LiArC.cjs");require("./theme.cjs");const s=d.forwardRef(({asChild:h=!1,tooltip:c,...t},l)=>{var n;const x=i.icons[t.icon],r=h?a.Slot:i.Button;return e.jsxs(i.Tooltip,{children:[e.jsx(i.TooltipTrigger,{asChild:!0,children:e.jsx(r,{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:l,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}),x&&e.jsx(x,{className:"richtext-ml-1 richtext-size-3 richtext-shrink-0 richtext-text-zinc-500"})]})})}),c&&e.jsx(i.TooltipContent,{children:e.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[c&&e.jsx("div",{children:c}),e.jsx("div",{className:"richtext-flex",children:!!((n=t==null?void 0:t.shortcutKeys)!=null&&n.length)&&e.jsx("span",{children:i.getShortcutKeys(t==null?void 0:t.shortcutKeys)})})]})})]})});exports.ActionMenuButton=s;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./clsx-CXbNJWDD.cjs"),M=require("./toggle-oFwBZC4x.cjs"),e=require("react/jsx-runtime"),m=require("lucide-react"),C=require("./index-DWSAk_9a.cjs"),f=require("./file-i7e4nQY2.cjs"),v=require("react"),q=require("./index-bVGIXhRg.cjs"),A=require("./useButtonProps-CFu0GHzW.cjs"),d=require("./dom-dataset-BqoJhJXt.cjs"),_={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 u=require("./clsx-CXbNJWDD.cjs"),n=require("./index-Bt9LiArC.cjs"),e=require("react/jsx-runtime"),f=require("react");require("./theme.cjs");const w=require("lucide-react"),V=require("./index-BrxL7y9p.cjs"),v=require("./dom-dataset-BqoJhJXt.cjs"),P={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
@@ -16,4 +16,4 @@
16
16
  fill="currentColor"
17
17
  d="m810.667 913.135-.478.068H201.796c-19.865 0-36.727-11.673-36.727-25.6v-618.36h154.965c51.268 0 92.911-39.39 92.911-87.858v-87.86H810.19c19.797 0 36.522 11.742 36.522 25.669V739.26h61.987V119.262c0-46.421-44.169-84.241-98.51-84.241H328.364l-225.28 194.56v658.09c0 46.285 44.236 84.105 98.713 84.105H810.19c43.759 0 80.554-24.713 93.32-58.573h-92.842zM350.89 94.89v86.562c0 16.11-13.858 29.286-30.925 29.286H216.815L350.959 94.891z"
18
18
  />
19
- </svg>`,excel:'<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-sheet"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><line x1="3" x2="21" y1="9" y2="9"/><line x1="3" x2="21" y1="15" y2="15"/><line x1="9" x2="9" y1="9" y2="21"/><line x1="15" x2="15" y1="9" y2="21"/></svg>',ppt:'<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-table-properties"><path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/></svg>'};function R(t){const n=_[t],a=new DOMParser().parseFromString(n,"image/svg+xml").documentElement,s=["svg",{...Array.from(a.attributes).reduce((r,o)=>(r[o.name]=o.value,r),{})}];return Array.from(a.childNodes).forEach(r=>{if(r.nodeType===1){const o=[r.tagName.toLowerCase(),Array.from(r.attributes).reduce((u,h)=>(u[h.name]=h.value,u),{})];r.textContent&&o.push(r.textContent),s.push(o)}}),s}const P={audio:e.jsx(m.LucideAudioLines,{}),video:e.jsx(m.LucideVideo,{}),file:e.jsx(m.LucideFile,{}),image:e.jsx(m.LucideImage,{}),pdf:e.jsx(C.ExportPdf,{}),word:e.jsx(C.ExportWord,{}),excel:e.jsx(m.LucideSheet,{}),ppt:e.jsx(m.LucideTableProperties,{})};function H(t,n=!1){const i=f.normalizeFileType(t),c=P[i]||e.jsx(e.Fragment,{});return n?R(i):c}const $="_wrap_15oj2_2",k={wrap:$};function I({editor:t,node:n,updateAttributes:i,deleteNode:c,extension:a}){var b;const s=v.useRef(null),r=A.useEditableEditor(),{hasTrigger:o,fileName:u,fileSize:h,fileExt:z,fileType:E,url:p,error:T}=n.attrs,[F,w]=v.useState(!1),{t:y}=q.useLocale(),V=(b=a==null?void 0:a.options)==null?void 0:b.upload,x=v.useCallback(()=>{!r||p||s.current.click()},[p,r]),B=v.useCallback(async L=>{const g=L.target.files&&L.target.files[0];if(!g)return;const S={fileName:f.extractFilename(g.name),fileSize:g.size,fileType:g.type,fileExt:f.extractFileExtension(g.name)};w(!0);try{const j=await V(g);i({...S,url:j}),w(!1)}catch(j){i({error:`File upload fail: ${j&&j.message}`}),w(!1),s.current.value=""}},[w,i]);v.useEffect(()=>{!p&&!o&&(x(),i({hasTrigger:!0}))},[p,o,x,i]);const D=v.useCallback(()=>c(),[t]);return r&&!p?e.jsx(l.NodeViewWrapper,{children:e.jsxs("div",{className:l.clsx(k.wrap,"render-wrapper"),children:[e.jsx("p",{onClick:x,style:{cursor:"pointer"},children:F?e.jsx("span",{children:y("editor.attachment.uploading")}):e.jsx("span",{children:y("editor.attachment.please_upload")})}),e.jsx("input",{hidden:!0,onChange:B,ref:s,type:"file"})]})}):p?e.jsx(l.NodeViewWrapper,{children:e.jsxs("div",{className:l.clsx(k.wrap,"render-wrapper"),onClick:x,children:[e.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-[4px]",children:[e.jsx("span",{children:H(E)}),e.jsxs("span",{children:[u,".",z]}),e.jsxs("span",{children:["(",f.normalizeFileSize(h),")"]})]}),r&&e.jsx(M.ActionButton,{action:D,icon:"Trash2",tooltip:y("editor.delete")})]})}):T!=="null"?e.jsx(l.NodeViewWrapper,{children:e.jsx("div",{className:l.clsx(k.wrap,"render-wrapper"),onClick:x,children:e.jsx("p",{children:T})})}):e.jsx(e.Fragment,{})}function O(){const t=A.useButtonProps(N.name),{icon:n=void 0,tooltip:i=void 0,shortcutKeys:c=void 0,tooltipOptions:a={},action:s=void 0,isActive:r=void 0}=(t==null?void 0:t.componentProps)??{},{editorDisabled:o,update:u}=A.useToggleActive(r),h=()=>{o||s&&(s(),u())};return t?e.jsx(M.ActionButton,{action:h,disabled:o,icon:n,shortcutKeys:c,tooltip:i,tooltipOptions:a}):e.jsx(e.Fragment,{})}const N=l.Node3.create({name:"attachment",content:"",marks:"",group:"block",selectable:!0,atom:!0,draggable:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"attachment"},button:({editor:n,t:i})=>({component:M.ActionButton,componentProps:{action:()=>n.chain().focus().setAttachment().run(),isActive:()=>!1,disabled:!1,icon:"Attachment",tooltip:i("editor.attachment.tooltip")}})}},parseHTML(){return[{tag:"div[class=attachment]"}]},renderHTML({HTMLAttributes:t}){const{url:n="",fileName:i="",fileSize:c="",fileType:a="",fileExt:s=""}=t||{};return["div",l.mergeAttributes(this.options.HTMLAttributes||{},t||{}),n?["a",{href:n||"#"},["span",{class:"attachment__icon"},H(a,!0)],["span",{class:"attachment__text"},`${i}.${s} (${f.normalizeFileSize(c)})`]]:["div",{class:"attachment__placeholder"}]]},addAttributes(){return{fileName:{default:null,parseHTML:d.getDatasetAttribute("filename")},fileSize:{default:null,parseHTML:d.getDatasetAttribute("filesize")},fileType:{default:null,parseHTML:d.getDatasetAttribute("filetype")},fileExt:{default:null,parseHTML:d.getDatasetAttribute("fileext")},url:{default:null,parseHTML:d.getDatasetAttribute("url")},hasTrigger:{default:!1,parseHTML:t=>d.getDatasetAttribute("hastrigger")(t)==="true"},error:{default:null,parseHTML:d.getDatasetAttribute("error")}}},addCommands(){return{setAttachment:(t={})=>({chain:n})=>n().insertContent({type:this.name,attrs:t}).run()}},addNodeView(){return l.ReactNodeViewRenderer(I)}});exports.Attachment=N;exports.RichTextAttachment=O;
19
+ </svg>`,excel:'<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-sheet"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><line x1="3" x2="21" y1="9" y2="9"/><line x1="3" x2="21" y1="15" y2="15"/><line x1="9" x2="9" y1="9" y2="21"/><line x1="15" x2="15" y1="9" y2="21"/></svg>',ppt:'<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-table-properties"><path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/></svg>'};function I(t){const s=P[t],o=new DOMParser().parseFromString(s,"image/svg+xml").documentElement,l=["svg",{...Array.from(o.attributes).reduce((r,c)=>(r[c.name]=c.value,r),{})}];return Array.from(o.childNodes).forEach(r=>{if(r.nodeType===1){const c=[r.tagName.toLowerCase(),Array.from(r.attributes).reduce((p,m)=>(p[m.name]=m.value,p),{})];r.textContent&&c.push(r.textContent),l.push(c)}}),l}const R={audio:e.jsx(w.LucideAudioLines,{}),video:e.jsx(w.LucideVideo,{}),file:e.jsx(w.LucideFile,{}),image:e.jsx(w.LucideImage,{}),pdf:e.jsx(n.ExportPdf,{}),word:e.jsx(n.ExportWord,{}),excel:e.jsx(w.LucideSheet,{}),ppt:e.jsx(w.LucideTableProperties,{})};function H(t,s=!1){const i=n.normalizeFileType(t),d=R[i]||e.jsx(e.Fragment,{});return s?I(i):d}const q="_wrap_1is0r_5",W="_placeholder_1is0r_44",$="_placeholderText_1is0r_53",O="_card_1is0r_64",Z="_downloadBtn_1is0r_82",K="_cardLeft_1is0r_88",G="_iconWrap_1is0r_97",J="_fileInfo_1is0r_116",Q="_fileName_1is0r_123",U="_fileSize_1is0r_133",X="_cardPreview_1is0r_145",Y="_actions_1is0r_221",ee="_cardError_1is0r_236",te="_errorText_1is0r_240",a={wrap:q,placeholder:W,placeholderText:$,card:O,downloadBtn:Z,cardLeft:K,iconWrap:G,fileInfo:J,fileName:Q,fileSize:U,cardPreview:X,actions:Y,cardError:ee,errorText:te};function re({editor:t,node:s,updateAttributes:i,deleteNode:d,extension:o}){var L,C;const l=f.useRef(null),r=(t==null?void 0:t.isEditable)??!1,{hasTrigger:c,fileName:p,fileSize:m,fileExt:k,fileType:A,id:h,error:M}=s.attrs,[E,_]=f.useState(!1),{t:j}=V.useLocale(),b=(L=o==null?void 0:o.options)==null?void 0:L.upload,y=(C=o==null?void 0:o.options)==null?void 0:C.onDownload,N=f.useCallback(()=>{var x;!r||h||(x=l.current)==null||x.click()},[h,r]),B=f.useCallback(async x=>{const g=x.target.files&&x.target.files[0];if(!g)return;const F={fileName:n.extractFilename(g.name),fileSize:g.size,fileType:g.type,fileExt:n.extractFileExtension(g.name)};_(!0);try{const T=await b(g);i({...F,id:T}),_(!1)}catch(T){i({error:`File upload fail: ${T&&T.message}`}),_(!1),l.current&&(l.current.value="")}},[_,i,b]);f.useEffect(()=>{!h&&!c&&(N(),i({hasTrigger:!0}))},[h,c,N,i]);const D=f.useCallback(()=>d(),[d]),S=f.useCallback(()=>{!h||!y||y({id:h,fileName:p,fileExt:k,fileType:A,fileSize:m})},[h,p,k,A,m,y]);return r&&!h?e.jsx(u.NodeViewWrapper,{children:e.jsxs("div",{className:u.clsx(a.wrap,a.placeholder,"render-wrapper"),children:[e.jsx("p",{onClick:N,className:a.placeholderText,children:E?e.jsx("span",{children:j("editor.attachment.uploading")}):e.jsx("span",{children:j("editor.attachment.please_upload")})}),e.jsx("input",{hidden:!0,onChange:B,ref:l,type:"file"})]})}):h?e.jsx(u.NodeViewWrapper,{children:e.jsxs("div",{className:u.clsx(a.card,"render-wrapper",{[a.cardPreview]:!r}),children:[e.jsxs("div",{className:a.cardLeft,children:[e.jsx("div",{className:a.iconWrap,children:H(A)}),e.jsxs("div",{className:a.fileInfo,children:[e.jsxs("span",{className:a.fileName,children:[p,".",k]}),e.jsx("span",{className:a.fileSize,children:n.normalizeFileSize(m)})]})]}),e.jsxs("div",{className:a.actions,children:[y&&e.jsx(n.ActionButton,{action:S,icon:"AttachmentDownload",tooltip:j("editor.attachment.download"),customClass:r?void 0:a.downloadBtn}),r&&e.jsx(n.ActionButton,{action:D,icon:"Trash2",tooltip:j("editor.delete")})]})]})}):M&&M!=="null"?e.jsx(u.NodeViewWrapper,{children:e.jsx("div",{className:u.clsx(a.card,a.cardError,"render-wrapper"),children:e.jsx("p",{className:a.errorText,children:M})})}):e.jsx(e.Fragment,{})}function ie(){const t=n.useButtonProps(z.name),{icon:s=void 0,tooltip:i=void 0,shortcutKeys:d=void 0,tooltipOptions:o={},action:l=void 0,isActive:r=void 0}=(t==null?void 0:t.componentProps)??{},{editorDisabled:c,update:p}=n.useToggleActive(r),m=()=>{c||l&&(l(),p())};return t?e.jsx(n.ActionButton,{action:m,disabled:c,icon:s,shortcutKeys:d,tooltip:i,tooltipOptions:o}):e.jsx(e.Fragment,{})}const z=u.Node3.create({name:"attachment",content:"",marks:"",group:"block",selectable:!0,atom:!0,draggable:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"attachment"},button:({editor:s,t:i})=>({component:n.ActionButton,componentProps:{action:()=>s.chain().focus().setAttachment().run(),isActive:()=>!1,disabled:!1,icon:"Attachment",tooltip:i("editor.attachment.tooltip")}})}},parseHTML(){return[{tag:"div[class=attachment]"}]},renderHTML({HTMLAttributes:t}){const{id:s="",fileName:i="",fileSize:d="",fileType:o="",fileExt:l=""}=t||{};return["div",u.mergeAttributes(this.options.HTMLAttributes||{},t||{}),s?["span",{class:"attachment__body"},["span",{class:"attachment__icon"},H(o,!0)],["span",{class:"attachment__text"},`${i}.${l} (${n.normalizeFileSize(d)})`]]:["div",{class:"attachment__placeholder"}]]},addAttributes(){return{id:{default:null,parseHTML:v.getDatasetAttribute("id")},fileName:{default:null,parseHTML:v.getDatasetAttribute("filename")},fileSize:{default:null,parseHTML:v.getDatasetAttribute("filesize")},fileType:{default:null,parseHTML:v.getDatasetAttribute("filetype")},fileExt:{default:null,parseHTML:v.getDatasetAttribute("fileext")},hasTrigger:{default:!1,parseHTML:t=>v.getDatasetAttribute("hastrigger")(t)==="true"},error:{default:null,parseHTML:v.getDatasetAttribute("error")}}},addCommands(){return{setAttachment:(t={})=>({chain:s})=>s().insertContent({type:this.name,attrs:t}).run()}},addNodeView(){return u.ReactNodeViewRenderer(re)}});exports.Attachment=z;exports.RichTextAttachment=ie;
package/lib/Attachment.js CHANGED
@@ -1,14 +1,12 @@
1
- import { h as x, j as y, N as _, k as D, m as P } from "./clsx-m_C5j3RU.js";
2
- import { A as T } from "./toggle-DoJTBdvy.js";
3
- import { jsx as e, Fragment as L, jsxs as f } from "react/jsx-runtime";
4
- import { LucideTableProperties as R, LucideSheet as $, LucideImage as I, LucideFile as O, LucideVideo as Z, LucideAudioLines as W } from "lucide-react";
5
- import { E as K, b as q } from "./index-CAiZY1nx.js";
6
- import { n as G, e as J, a as Q, b } from "./file-BLas99n7.js";
7
- import { useRef as U, useState as X, useCallback as k, useEffect as Y } from "react";
8
- import { u as ee } from "./index-4Q5IhypJ.js";
9
- import { l as te, u as re, c as ie } from "./useButtonProps-BE10eHkG.js";
10
- import { g as c } from "./dom-dataset-CIEeltF6.js";
11
- const oe = {
1
+ import { h as H, j as A, N as I, k as R, m as W } from "./clsx-CDyrfCnw.js";
2
+ import { K as $, N as O, O as Z, P as K, Q, R as B, A as T, u as q, d as G } from "./index-8B00E8e4.js";
3
+ import { jsx as e, Fragment as z, jsxs as f } from "react/jsx-runtime";
4
+ import { useRef as J, useState as U, useCallback as y, useEffect as X } from "react";
5
+ import "./theme.js";
6
+ import { LucideTableProperties as Y, LucideSheet as ee, LucideImage as te, LucideFile as re, LucideVideo as ie, LucideAudioLines as oe } from "lucide-react";
7
+ import { u as ae } from "./index-DZfkCNKr.js";
8
+ import { g as u } from "./dom-dataset-CIEeltF6.js";
9
+ const ne = {
12
10
  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>',
13
11
  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>',
14
12
  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>',
@@ -36,141 +34,166 @@ const oe = {
36
34
  excel: '<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-sheet"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><line x1="3" x2="21" y1="9" y2="9"/><line x1="3" x2="21" y1="15" y2="15"/><line x1="9" x2="9" y1="9" y2="21"/><line x1="15" x2="15" y1="9" y2="21"/></svg>',
37
35
  ppt: '<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-table-properties"><path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/></svg>'
38
36
  };
39
- function ne(t) {
40
- const o = oe[t], s = new DOMParser().parseFromString(o, "image/svg+xml").documentElement, n = [
37
+ function se(t) {
38
+ const a = ne[t], n = new DOMParser().parseFromString(a, "image/svg+xml").documentElement, s = [
41
39
  "svg",
42
40
  {
43
- ...Array.from(s.attributes).reduce((r, a) => (r[a.name] = a.value, r), {})
41
+ ...Array.from(n.attributes).reduce((r, l) => (r[l.name] = l.value, r), {})
44
42
  }
45
43
  ];
46
- return Array.from(s.childNodes).forEach((r) => {
44
+ return Array.from(n.childNodes).forEach((r) => {
47
45
  if (r.nodeType === 1) {
48
- const a = [
46
+ const l = [
49
47
  r.tagName.toLowerCase(),
50
- Array.from(r.attributes).reduce((d, h) => (d[h.name] = h.value, d), {})
48
+ Array.from(r.attributes).reduce((h, p) => (h[p.name] = p.value, h), {})
51
49
  ];
52
- r.textContent && a.push(r.textContent), n.push(a);
50
+ r.textContent && l.push(r.textContent), s.push(l);
53
51
  }
54
- }), n;
52
+ }), s;
55
53
  }
56
- const ae = {
57
- audio: /* @__PURE__ */ e(W, {}),
58
- video: /* @__PURE__ */ e(Z, {}),
59
- file: /* @__PURE__ */ e(O, {}),
60
- image: /* @__PURE__ */ e(I, {}),
61
- pdf: /* @__PURE__ */ e(q, {}),
62
- word: /* @__PURE__ */ e(K, {}),
63
- excel: /* @__PURE__ */ e($, {}),
64
- ppt: /* @__PURE__ */ e(R, {})
54
+ const le = {
55
+ audio: /* @__PURE__ */ e(oe, {}),
56
+ video: /* @__PURE__ */ e(ie, {}),
57
+ file: /* @__PURE__ */ e(re, {}),
58
+ image: /* @__PURE__ */ e(te, {}),
59
+ pdf: /* @__PURE__ */ e(Z, {}),
60
+ word: /* @__PURE__ */ e(O, {}),
61
+ excel: /* @__PURE__ */ e(ee, {}),
62
+ ppt: /* @__PURE__ */ e(Y, {})
65
63
  };
66
- function N(t, o = !1) {
67
- const i = G(t), l = ae[i] || /* @__PURE__ */ e(L, {});
68
- return o ? ne(i) : l;
64
+ function S(t, a = !1) {
65
+ const i = $(t), c = le[i] || /* @__PURE__ */ e(z, {});
66
+ return a ? se(i) : c;
69
67
  }
70
- const se = "_wrap_15oj2_2", M = {
71
- wrap: se
68
+ const ce = "_wrap_1is0r_5", de = "_placeholder_1is0r_44", he = "_placeholderText_1is0r_53", pe = "_card_1is0r_64", ue = "_downloadBtn_1is0r_82", me = "_cardLeft_1is0r_88", fe = "_iconWrap_1is0r_97", ve = "_fileInfo_1is0r_116", ge = "_fileName_1is0r_123", we = "_fileSize_1is0r_133", xe = "_cardPreview_1is0r_145", _e = "_actions_1is0r_221", ye = "_cardError_1is0r_236", Te = "_errorText_1is0r_240", o = {
69
+ wrap: ce,
70
+ placeholder: de,
71
+ placeholderText: he,
72
+ card: pe,
73
+ downloadBtn: ue,
74
+ cardLeft: me,
75
+ iconWrap: fe,
76
+ fileInfo: ve,
77
+ fileName: ge,
78
+ fileSize: we,
79
+ cardPreview: xe,
80
+ actions: _e,
81
+ cardError: ye,
82
+ errorText: Te
72
83
  };
73
- function le({
84
+ function ke({
74
85
  editor: t,
75
- node: o,
86
+ node: a,
76
87
  updateAttributes: i,
77
- deleteNode: l,
78
- extension: s
88
+ deleteNode: c,
89
+ extension: n
79
90
  }) {
80
- var A;
81
- const n = U(null), r = te(), { hasTrigger: a, fileName: d, fileSize: h, fileExt: E, fileType: z, url: u, error: H } = o.attrs, [F, v] = X(!1), { t: w } = ee(), V = (A = s == null ? void 0 : s.options) == null ? void 0 : A.upload, m = k(() => {
82
- !r || u || n.current.click();
83
- }, [u, r]), j = k(
84
- async (C) => {
85
- const p = C.target.files && C.target.files[0];
86
- if (!p) return;
87
- const S = {
88
- fileName: Q(p.name),
89
- fileSize: p.size,
90
- fileType: p.type,
91
- fileExt: J(p.name)
91
+ var E, b;
92
+ const s = J(null), r = (t == null ? void 0 : t.isEditable) ?? !1, { hasTrigger: l, fileName: h, fileSize: p, fileExt: k, fileType: N, id: d, error: L } = a.attrs, [F, g] = U(!1), { t: w } = ae(), C = (E = n == null ? void 0 : n.options) == null ? void 0 : E.upload, x = (b = n == null ? void 0 : n.options) == null ? void 0 : b.onDownload, M = y(() => {
93
+ var v;
94
+ !r || d || (v = s.current) == null || v.click();
95
+ }, [d, r]), V = y(
96
+ async (v) => {
97
+ const m = v.target.files && v.target.files[0];
98
+ if (!m) return;
99
+ const j = {
100
+ fileName: Q(m.name),
101
+ fileSize: m.size,
102
+ fileType: m.type,
103
+ fileExt: K(m.name)
92
104
  };
93
- v(!0);
105
+ g(!0);
94
106
  try {
95
- const g = await V(p);
96
- i({ ...S, url: g }), v(!1);
97
- } catch (g) {
107
+ const _ = await C(m);
108
+ i({ ...j, id: _ }), g(!1);
109
+ } catch (_) {
98
110
  i({
99
- error: `File upload fail: ${g && g.message}`
100
- }), v(!1), n.current.value = "";
111
+ error: `File upload fail: ${_ && _.message}`
112
+ }), g(!1), s.current && (s.current.value = "");
101
113
  }
102
114
  },
103
- [v, i]
115
+ [g, i, C]
104
116
  );
105
- Y(() => {
106
- !u && !a && (m(), i({ hasTrigger: !0 }));
107
- }, [u, a, m, i]);
108
- const B = k(() => l(), [t]);
109
- return r && !u ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ f("div", { className: y(M.wrap, "render-wrapper"), children: [
110
- /* @__PURE__ */ e("p", { onClick: m, style: { cursor: "pointer" }, children: F ? /* @__PURE__ */ e("span", { children: w("editor.attachment.uploading") }) : /* @__PURE__ */ e("span", { children: w("editor.attachment.please_upload") }) }),
111
- /* @__PURE__ */ e("input", { hidden: !0, onChange: j, ref: n, type: "file" })
112
- ] }) }) : u ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ f(
117
+ X(() => {
118
+ !d && !l && (M(), i({ hasTrigger: !0 }));
119
+ }, [d, l, M, i]);
120
+ const P = y(() => c(), [c]), D = y(() => {
121
+ !d || !x || x({ id: d, fileName: h, fileExt: k, fileType: N, fileSize: p });
122
+ }, [d, h, k, N, p, x]);
123
+ return r && !d ? /* @__PURE__ */ e(H, { children: /* @__PURE__ */ f(
113
124
  "div",
114
125
  {
115
- className: y(M.wrap, "render-wrapper"),
116
- onClick: m,
126
+ className: A(o.wrap, o.placeholder, "render-wrapper"),
117
127
  children: [
118
- /* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center richtext-gap-[4px]", children: [
119
- /* @__PURE__ */ e("span", { children: N(z) }),
120
- /* @__PURE__ */ f("span", { children: [
121
- d,
122
- ".",
123
- E
124
- ] }),
125
- /* @__PURE__ */ f("span", { children: [
126
- "(",
127
- b(h),
128
- ")"
129
- ] })
130
- ] }),
131
- r && /* @__PURE__ */ e(
132
- T,
133
- {
134
- action: B,
135
- icon: "Trash2",
136
- tooltip: w("editor.delete")
137
- }
138
- )
128
+ /* @__PURE__ */ e("p", { onClick: M, className: o.placeholderText, children: F ? /* @__PURE__ */ e("span", { children: w("editor.attachment.uploading") }) : /* @__PURE__ */ e("span", { children: w("editor.attachment.please_upload") }) }),
129
+ /* @__PURE__ */ e("input", { hidden: !0, onChange: V, ref: s, type: "file" })
139
130
  ]
140
131
  }
141
- ) }) : H !== "null" ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(
132
+ ) }) : d ? /* @__PURE__ */ e(H, { children: /* @__PURE__ */ f(
142
133
  "div",
143
134
  {
144
- className: y(M.wrap, "render-wrapper"),
145
- onClick: m,
146
- children: /* @__PURE__ */ e("p", { children: H })
135
+ className: A(o.card, "render-wrapper", {
136
+ [o.cardPreview]: !r
137
+ }),
138
+ children: [
139
+ /* @__PURE__ */ f("div", { className: o.cardLeft, children: [
140
+ /* @__PURE__ */ e("div", { className: o.iconWrap, children: S(N) }),
141
+ /* @__PURE__ */ f("div", { className: o.fileInfo, children: [
142
+ /* @__PURE__ */ f("span", { className: o.fileName, children: [
143
+ h,
144
+ ".",
145
+ k
146
+ ] }),
147
+ /* @__PURE__ */ e("span", { className: o.fileSize, children: B(p) })
148
+ ] })
149
+ ] }),
150
+ /* @__PURE__ */ f("div", { className: o.actions, children: [
151
+ x && /* @__PURE__ */ e(
152
+ T,
153
+ {
154
+ action: D,
155
+ icon: "AttachmentDownload",
156
+ tooltip: w("editor.attachment.download"),
157
+ customClass: r ? void 0 : o.downloadBtn
158
+ }
159
+ ),
160
+ r && /* @__PURE__ */ e(
161
+ T,
162
+ {
163
+ action: P,
164
+ icon: "Trash2",
165
+ tooltip: w("editor.delete")
166
+ }
167
+ )
168
+ ] })
169
+ ]
147
170
  }
148
- ) }) : /* @__PURE__ */ e(L, {});
171
+ ) }) : L && L !== "null" ? /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e("div", { className: A(o.card, o.cardError, "render-wrapper"), children: /* @__PURE__ */ e("p", { className: o.errorText, children: L }) }) }) : /* @__PURE__ */ e(z, {});
149
172
  }
150
- function ye() {
151
- const t = re(ce.name), {
152
- icon: o = void 0,
173
+ function Be() {
174
+ const t = q(Ne.name), {
175
+ icon: a = void 0,
153
176
  tooltip: i = void 0,
154
- shortcutKeys: l = void 0,
155
- tooltipOptions: s = {},
156
- action: n = void 0,
177
+ shortcutKeys: c = void 0,
178
+ tooltipOptions: n = {},
179
+ action: s = void 0,
157
180
  isActive: r = void 0
158
- } = (t == null ? void 0 : t.componentProps) ?? {}, { editorDisabled: a, update: d } = ie(r), h = () => {
159
- a || n && (n(), d());
181
+ } = (t == null ? void 0 : t.componentProps) ?? {}, { editorDisabled: l, update: h } = G(r), p = () => {
182
+ l || s && (s(), h());
160
183
  };
161
184
  return t ? /* @__PURE__ */ e(
162
185
  T,
163
186
  {
164
- action: h,
165
- disabled: a,
166
- icon: o,
167
- shortcutKeys: l,
187
+ action: p,
188
+ disabled: l,
189
+ icon: a,
190
+ shortcutKeys: c,
168
191
  tooltip: i,
169
- tooltipOptions: s
192
+ tooltipOptions: n
170
193
  }
171
- ) : /* @__PURE__ */ e(L, {});
194
+ ) : /* @__PURE__ */ e(z, {});
172
195
  }
173
- const ce = /* @__PURE__ */ _.create({
196
+ const Ne = /* @__PURE__ */ I.create({
174
197
  name: "attachment",
175
198
  content: "",
176
199
  marks: "",
@@ -186,10 +209,10 @@ const ce = /* @__PURE__ */ _.create({
186
209
  HTMLAttributes: {
187
210
  class: "attachment"
188
211
  },
189
- button: ({ editor: o, t: i }) => ({
212
+ button: ({ editor: a, t: i }) => ({
190
213
  component: T,
191
214
  componentProps: {
192
- action: () => o.chain().focus().setAttachment().run(),
215
+ action: () => a.chain().focus().setAttachment().run(),
193
216
  isActive: () => !1,
194
217
  disabled: !1,
195
218
  icon: "Attachment",
@@ -203,73 +226,83 @@ const ce = /* @__PURE__ */ _.create({
203
226
  },
204
227
  renderHTML({ HTMLAttributes: t }) {
205
228
  const {
206
- url: o = "",
229
+ id: a = "",
207
230
  fileName: i = "",
208
- fileSize: l = "",
209
- fileType: s = "",
210
- fileExt: n = ""
231
+ fileSize: c = "",
232
+ fileType: n = "",
233
+ fileExt: s = ""
211
234
  } = t || {};
212
235
  return [
213
236
  "div",
214
- P(
237
+ W(
215
238
  // @ts-expect-error
216
239
  this.options.HTMLAttributes || {},
217
240
  t || {}
218
241
  ),
219
- o ? [
220
- "a",
221
- { href: o || "#" },
222
- ["span", { class: "attachment__icon" }, N(s, !0)],
242
+ a ? [
243
+ "span",
244
+ { class: "attachment__body" },
245
+ [
246
+ "span",
247
+ { class: "attachment__icon" },
248
+ S(n, !0)
249
+ ],
223
250
  [
224
251
  "span",
225
252
  { class: "attachment__text" },
226
- `${i}.${n} (${b(l)})`
253
+ `${i}.${s} (${B(c)})`
227
254
  ]
228
255
  ] : ["div", { class: "attachment__placeholder" }]
229
256
  ];
230
257
  },
231
258
  addAttributes() {
232
259
  return {
260
+ /**
261
+ * The UUID / primary key your backend assigned to this asset.
262
+ * This is the only persistent reference stored in the document.
263
+ * Use it server-side to look up, stream, delete, or generate a
264
+ * signed download URL for the file.
265
+ */
266
+ id: {
267
+ default: null,
268
+ parseHTML: u("id")
269
+ },
233
270
  fileName: {
234
271
  default: null,
235
- parseHTML: c("filename")
272
+ parseHTML: u("filename")
236
273
  },
237
274
  fileSize: {
238
275
  default: null,
239
- parseHTML: c("filesize")
276
+ parseHTML: u("filesize")
240
277
  },
241
278
  fileType: {
242
279
  default: null,
243
- parseHTML: c("filetype")
280
+ parseHTML: u("filetype")
244
281
  },
245
282
  fileExt: {
246
283
  default: null,
247
- parseHTML: c("fileext")
248
- },
249
- url: {
250
- default: null,
251
- parseHTML: c("url")
284
+ parseHTML: u("fileext")
252
285
  },
253
286
  hasTrigger: {
254
287
  default: !1,
255
- parseHTML: (t) => c("hastrigger")(t) === "true"
288
+ parseHTML: (t) => u("hastrigger")(t) === "true"
256
289
  },
257
290
  error: {
258
291
  default: null,
259
- parseHTML: c("error")
292
+ parseHTML: u("error")
260
293
  }
261
294
  };
262
295
  },
263
296
  addCommands() {
264
297
  return {
265
- setAttachment: (t = {}) => ({ chain: o }) => o().insertContent({ type: this.name, attrs: t }).run()
298
+ setAttachment: (t = {}) => ({ chain: a }) => a().insertContent({ type: this.name, attrs: t }).run()
266
299
  };
267
300
  },
268
301
  addNodeView() {
269
- return D(le);
302
+ return R(ke);
270
303
  }
271
304
  });
272
305
  export {
273
- ce as Attachment,
274
- ye as RichTextAttachment
306
+ Ne as Attachment,
307
+ Be as RichTextAttachment
275
308
  };
@@ -1,5 +1,5 @@
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"),q=require("./toggle-oFwBZC4x.cjs"),p=require("./useButtonProps-CFu0GHzW.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"),p=require("./jsx-runtime-C_NLcKys.cjs"),l=require("react/jsx-runtime"),a=require("./index-Bt9LiArC.cjs");require("react");require("./theme.cjs");var g=/^\s*>\s$/,m=c.Node3.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return p.h("blockquote",{...c.mergeAttributes(this.options.HTMLAttributes,t),children:p.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}
5
- `)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[c.wrappingInputRule({find:m,type:this.type})]}});function f(){const t=p.useButtonProps(h.name),{icon:e=void 0,tooltip:o=void 0,shortcutKeys:n=void 0,tooltipOptions:i={},action:s=void 0,isActive:a=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:u,disabled:r,update:g}=p.useToggleActive(a),k=()=>{r||s&&(s(),g())};return t?l.jsx(q.ActionButton,{action:k,dataState:u,disabled:r,icon:e,shortcutKeys:n,tooltip:o,tooltipOptions:i}):l.jsx(l.Fragment,{})}const h=b.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"blockquote"},button:({editor:e,t:o,extension:n})=>({componentProps:{action:()=>e.commands.toggleBlockquote(),isActive:()=>e.isActive("blockquote"),disabled:!e.can().toggleBlockquote(),icon:"TextQuote",shortcutKeys:n.options.shortcutKeys??["shift","mod","B"],tooltip:o("editor.blockquote.tooltip")}})}}});exports.Blockquote=h;exports.RichTextBlockquote=f;
5
+ `)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[c.wrappingInputRule({find:g,type:this.type})]}});function b(){const t=a.useButtonProps(h.name),{icon:e=void 0,tooltip:o=void 0,shortcutKeys:n=void 0,tooltipOptions:i={},action:s=void 0,isActive:d=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:u,disabled:r,update:q}=a.useToggleActive(d),k=()=>{r||s&&(s(),q())};return t?l.jsx(a.ActionButton,{action:k,dataState:u,disabled:r,icon:e,shortcutKeys:n,tooltip:o,tooltipOptions:i}):l.jsx(l.Fragment,{})}const h=m.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"blockquote"},button:({editor:e,t:o,extension:n})=>({componentProps:{action:()=>e.commands.toggleBlockquote(),isActive:()=>e.isActive("blockquote"),disabled:!e.can().toggleBlockquote(),icon:"TextQuote",shortcutKeys:n.options.shortcutKeys??["shift","mod","B"],tooltip:o("editor.blockquote.tooltip")}})}}});exports.Blockquote=h;exports.RichTextBlockquote=b;
package/lib/Blockquote.js CHANGED
@@ -1,8 +1,9 @@
1
- import { N as m, w as h, m as k } from "./clsx-m_C5j3RU.js";
1
+ import { N as m, w as h, m as k } from "./clsx-CDyrfCnw.js";
2
2
  import { h as a } from "./jsx-runtime-CT7Pcg-t.js";
3
- import { jsx as l, Fragment as f } from "react/jsx-runtime";
4
- import { A as g } from "./toggle-DoJTBdvy.js";
5
- import { u as b, c as q } from "./useButtonProps-BE10eHkG.js";
3
+ import { jsx as d, Fragment as g } from "react/jsx-runtime";
4
+ import { u as f, d as b, A as q } from "./index-8B00E8e4.js";
5
+ import "react";
6
+ import "./theme.js";
6
7
  var v = /^\s*>\s$/, B = m.create({
7
8
  name: "blockquote",
8
9
  addOptions() {
@@ -54,19 +55,19 @@ ${e}
54
55
  ];
55
56
  }
56
57
  });
57
- function C() {
58
- const t = b(A.name), {
58
+ function H() {
59
+ const t = f(A.name), {
59
60
  icon: o = void 0,
60
61
  tooltip: e = void 0,
61
62
  shortcutKeys: n = void 0,
62
63
  tooltipOptions: i = {},
63
64
  action: s = void 0,
64
65
  isActive: u = void 0
65
- } = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: c, disabled: r, update: d } = q(u), p = () => {
66
- r || s && (s(), d());
66
+ } = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: c, disabled: r, update: l } = b(u), p = () => {
67
+ r || s && (s(), l());
67
68
  };
68
- return t ? /* @__PURE__ */ l(
69
- g,
69
+ return t ? /* @__PURE__ */ d(
70
+ q,
70
71
  {
71
72
  action: p,
72
73
  dataState: c,
@@ -76,7 +77,7 @@ function C() {
76
77
  tooltip: e,
77
78
  tooltipOptions: i
78
79
  }
79
- ) : /* @__PURE__ */ l(f, {});
80
+ ) : /* @__PURE__ */ d(g, {});
80
81
  }
81
82
  const A = /* @__PURE__ */ B.extend({
82
83
  //@ts-expect-error
@@ -102,5 +103,5 @@ const A = /* @__PURE__ */ B.extend({
102
103
  });
103
104
  export {
104
105
  A as Blockquote,
105
- C as RichTextBlockquote
106
+ H as RichTextBlockquote
106
107
  };
package/lib/Bold.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./clsx-CXbNJWDD.cjs"),a=require("./jsx-runtime-C_NLcKys.cjs"),l=require("./toggle-oFwBZC4x.cjs"),s=require("react/jsx-runtime"),u=require("./useButtonProps-CFu0GHzW.cjs");var B=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,_=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,k=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,v=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,M=o.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",{...o.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[o.markInputRule({find:B,type:this.type}),o.markInputRule({find:k,type:this.type})]},addPasteRules(){return[o.markPasteRule({find:_,type:this.type}),o.markPasteRule({find:v,type:this.type})]}});function b(){const t=u.useButtonProps(c.name),{icon:e=void 0,tooltip:r=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:r,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:r,extension:n})=>({component:l.ActionButton,componentProps:{action:()=>e.commands.toggleBold(),isActive:()=>e.isActive("bold"),icon:"Bold",shortcutKeys:n.options.shortcutKeys??["mod","B"],tooltip:r("editor.bold.tooltip")}})}}});exports.Bold=c;exports.RichTextBold=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./clsx-CXbNJWDD.cjs"),u=require("./jsx-runtime-C_NLcKys.cjs"),r=require("./index-Bt9LiArC.cjs"),i=require("react/jsx-runtime");require("react");require("./theme.cjs");var y=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,_=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,B=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,k=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,v=o.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 u.h("strong",{...o.mergeAttributes(this.options.HTMLAttributes,t),children:u.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[o.markInputRule({find:y,type:this.type}),o.markInputRule({find:B,type:this.type})]},addPasteRules(){return[o.markPasteRule({find:_,type:this.type}),o.markPasteRule({find:k,type:this.type})]}});function M(){const t=r.useButtonProps(l.name),{icon:e=void 0,tooltip:n=void 0,shortcutKeys:s=void 0,tooltipOptions:c={},action:a=void 0,isActive:p=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:g,disabled:d,update:m}=r.useToggleActive(p),h=()=>{d||a&&(a(),m())};return t?i.jsx(r.ActionButton,{action:h,dataState:g,disabled:d,icon:e,shortcutKeys:s,tooltip:n,tooltipOptions:c}):i.jsx(i.Fragment,{})}const l=v.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:n,extension:s})=>({component:r.ActionButton,componentProps:{action:()=>e.commands.toggleBold(),isActive:()=>e.isActive("bold"),icon:"Bold",shortcutKeys:s.options.shortcutKeys??["mod","B"],tooltip:n("editor.bold.tooltip")}})}}});exports.Bold=l;exports.RichTextBold=M;