reactjs-tiptap-editor 1.0.11 → 1.0.13

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 (226) hide show
  1. package/lib/ActionMenuButton-DNj0f_A4.cjs +1 -0
  2. package/lib/{ActionMenuButton-DTXFBdGX.js → ActionMenuButton-l5rSmAO_.js} +18 -14
  3. package/lib/Attachment.cjs +2 -2
  4. package/lib/Attachment.js +24 -21
  5. package/lib/Blockquote.cjs +2 -2
  6. package/lib/Blockquote.js +7 -5
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +11 -9
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +14 -12
  11. package/lib/Callout.cjs +1 -0
  12. package/lib/Callout.js +230 -0
  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 +11 -9
  17. package/lib/CodeBlock.cjs +39 -39
  18. package/lib/CodeBlock.js +840 -945
  19. package/lib/CodeView.cjs +1 -1
  20. package/lib/CodeView.js +10 -8
  21. package/lib/Color.cjs +1 -1
  22. package/lib/Color.js +20 -18
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +7 -5
  25. package/lib/{Drawer-D0yQ0wR7.js → Drawer-Cbi_MURj.js} +10 -9
  26. package/lib/Drawer-DKU32YW_.cjs +1 -0
  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 +11 -9
  31. package/lib/{Excalidraw-CO4IRHmG.js → Excalidraw-CWrVL5hs.js} +28 -27
  32. package/lib/Excalidraw-Kb-TRcWY.cjs +1 -0
  33. package/lib/Excalidraw.cjs +1 -1
  34. package/lib/Excalidraw.js +2 -2
  35. package/lib/ExportPdf.cjs +2 -2
  36. package/lib/ExportPdf.js +7 -5
  37. package/lib/ExportWord.cjs +1 -1
  38. package/lib/ExportWord.js +7 -5
  39. package/lib/FontFamily.cjs +1 -1
  40. package/lib/FontFamily.js +9 -8
  41. package/lib/FontSize.cjs +1 -1
  42. package/lib/FontSize.js +13 -12
  43. package/lib/Heading.cjs +1 -1
  44. package/lib/Heading.js +20 -19
  45. package/lib/Highlight.cjs +1 -1
  46. package/lib/Highlight.js +9 -7
  47. package/lib/History.cjs +1 -1
  48. package/lib/History.js +11 -8
  49. package/lib/HorizontalRule.cjs +1 -1
  50. package/lib/HorizontalRule.js +7 -5
  51. package/lib/Icon-Ctva8VeB.js +12 -0
  52. package/lib/Icon-yqCglrdK.cjs +1 -0
  53. package/lib/Iframe-BczF8Hex.cjs +1 -0
  54. package/lib/{Iframe-BEO28NPs.js → Iframe-C942bNjs.js} +42 -40
  55. package/lib/Iframe.cjs +1 -1
  56. package/lib/Iframe.js +2 -2
  57. package/lib/Image.cjs +1 -1
  58. package/lib/Image.js +25 -23
  59. package/lib/ImageGif.cjs +1 -1
  60. package/lib/ImageGif.js +50 -48
  61. package/lib/ImportWord.cjs +31 -31
  62. package/lib/ImportWord.js +8 -6
  63. package/lib/{Indent-CXurBbOr.js → Indent-C_O5WdyR.js} +26 -24
  64. package/lib/Indent-CkEC7x36.cjs +1 -0
  65. package/lib/Indent.cjs +1 -1
  66. package/lib/Indent.js +2 -2
  67. package/lib/Italic.cjs +1 -1
  68. package/lib/Italic.js +12 -10
  69. package/lib/{Katex-Bvj469K1.js → Katex-D3PEWimM.js} +12 -10
  70. package/lib/Katex-DW_HjgNM.cjs +4 -0
  71. package/lib/Katex.cjs +1 -1
  72. package/lib/Katex.js +2 -2
  73. package/lib/LineHeight.cjs +1 -1
  74. package/lib/LineHeight.js +10 -8
  75. package/lib/Link.cjs +1 -1
  76. package/lib/Link.js +2 -2
  77. package/lib/{LinkEditBlock-8ePAZ-G1.cjs → LinkEditBlock-DL1e2ILk.cjs} +1 -1
  78. package/lib/{LinkEditBlock-DjXUEubR.js → LinkEditBlock-h5054QDo.js} +22 -20
  79. package/lib/Mention.cjs +1 -1
  80. package/lib/Mention.js +3 -3
  81. package/lib/Mermaid.cjs +2 -2
  82. package/lib/Mermaid.js +8 -8
  83. package/lib/MoreMark.cjs +1 -1
  84. package/lib/MoreMark.js +25 -22
  85. package/lib/OrderedList.cjs +1 -1
  86. package/lib/OrderedList.js +10 -8
  87. package/lib/SearchAndReplace.cjs +1 -1
  88. package/lib/SearchAndReplace.js +43 -41
  89. package/lib/SlashCommand.cjs +1 -1
  90. package/lib/SlashCommand.js +6 -6
  91. package/lib/SlashCommandNodeView-BqrmHCpu.cjs +1 -0
  92. package/lib/{SlashCommandNodeView-CcqL8ymb.js → SlashCommandNodeView-DXUqkx82.js} +75 -66
  93. package/lib/Strike.cjs +1 -1
  94. package/lib/Strike.js +7 -5
  95. package/lib/{Table-9Y0Cg8Ab.js → Table-DdrY4jcM.js} +10 -8
  96. package/lib/Table-kY0nbqJo.cjs +9 -0
  97. package/lib/Table.cjs +1 -1
  98. package/lib/Table.js +1 -1
  99. package/lib/TaskList.cjs +1 -1
  100. package/lib/TaskList.js +15 -13
  101. package/lib/TextAlign.cjs +1 -1
  102. package/lib/TextAlign.js +20 -17
  103. package/lib/TextDirection.cjs +1 -1
  104. package/lib/TextDirection.js +20 -17
  105. package/lib/TextUnderline.cjs +1 -1
  106. package/lib/TextUnderline.js +7 -5
  107. package/lib/{Twitter-DWwd0vHR.js → Twitter-B-JQ3ZJ1.js} +51 -49
  108. package/lib/Twitter-DjZcVa3l.cjs +1 -0
  109. package/lib/Twitter.cjs +1 -1
  110. package/lib/Twitter.js +2 -2
  111. package/lib/Video.cjs +1 -1
  112. package/lib/Video.js +13 -11
  113. package/lib/bubble.cjs +4 -4
  114. package/lib/bubble.js +2084 -1949
  115. package/lib/button-BS3n6_Aq.cjs +1 -0
  116. package/lib/{button-RnHbJfd-.js → button-Uv01FNnd.js} +9 -8
  117. package/lib/{checkbox-CTEN0q4y.cjs → checkbox-C8ByRi7-.cjs} +1 -1
  118. package/lib/{checkbox-CLSoR1Qj.js → checkbox-DEFNwGwb.js} +1 -1
  119. package/lib/{index-sVScpCFG.js → clsx-BWSGDJNJ.js} +224 -224
  120. package/lib/{index-BBNITgNi.cjs → clsx-CXbNJWDD.cjs} +13 -13
  121. package/lib/components/Bubble/RichTextBubbleCallout.d.ts +1 -0
  122. package/lib/components/Bubble/index.d.ts +1 -0
  123. package/lib/components/ui/index.d.ts +1 -0
  124. package/lib/{dialog-CMC9hsCo.cjs → dialog-Bt5zwGYB.cjs} +1 -1
  125. package/lib/{dialog-D_HCtKvc.js → dialog-DwTMZSt6.js} +1 -1
  126. package/lib/{dropdown-menu-66q7Ofc5.js → dropdown-menu-BetI14G6.js} +1 -1
  127. package/lib/{dropdown-menu-DKSAS-w_.cjs → dropdown-menu-Bo68IEOT.cjs} +1 -1
  128. package/lib/events.constant-Dq21NPdV.cjs +1 -0
  129. package/lib/events.constant-do95b767.js +21 -0
  130. package/lib/extensions/Callout/Callout.d.ts +18 -0
  131. package/lib/extensions/Callout/components/NodeViewCallout/NodeViewCallout.d.ts +1 -0
  132. package/lib/extensions/Callout/components/RichTextCallout.d.ts +1 -0
  133. package/lib/extensions/Callout/index.d.ts +1 -0
  134. package/lib/{index-CApXPpjF.cjs → index-BCzvbrf5.cjs} +1 -1
  135. package/lib/{index-9A6-kVBM.js → index-BDKHXe7R.js} +1 -1
  136. package/lib/{index-DmPwbBqm.js → index-CHKWG6E8.js} +1 -1
  137. package/lib/index-CcoWj0mF.js +426 -0
  138. package/lib/index-CjhjjJsN.cjs +1 -0
  139. package/lib/index-Cs6cp0Y6.cjs +1 -0
  140. package/lib/index-D3RLYf-J.cjs +1 -0
  141. package/lib/{index-C3zg3DPB.js → index-DF5ZPtWM.js} +371 -1177
  142. package/lib/{index-DRHrDScg.js → index-DJbmnBzK.js} +1 -1
  143. package/lib/index-Doks9cbR.cjs +1 -0
  144. package/lib/{index-0OnGZkVF.js → index-Dujzr6bY.js} +179 -317
  145. package/lib/index-VhKd73hZ.cjs +1 -0
  146. package/lib/{index-DKt5wfAc.js → index-mR8PNv5P.js} +1 -1
  147. package/lib/{index--nUS7Y66.cjs → index-neeeY2o7.cjs} +3 -3
  148. package/lib/index.cjs +9 -2
  149. package/lib/index.js +142 -26
  150. package/lib/{input-CvyMYMZG.js → input-DUBdJD3L.js} +5 -5
  151. package/lib/{input-D555880-.cjs → input-Dt_BA_9B.cjs} +1 -1
  152. package/lib/{isNumber-Bv1Qhmw8.cjs → isNumber-BTYSVlKo.cjs} +1 -1
  153. package/lib/{isNumber-DF0fU3ob.js → isNumber-CIgubz2e.js} +1 -1
  154. package/lib/label-JNOksCA-.cjs +1 -0
  155. package/lib/label-topD46-u.js +19 -0
  156. package/lib/locale-bundle.cjs +1 -1
  157. package/lib/locale-bundle.js +6 -7
  158. package/lib/locales/en.d.ts +16 -0
  159. package/lib/locales/fi.d.ts +16 -0
  160. package/lib/locales/hu.d.ts +16 -0
  161. package/lib/locales/index.d.ts +99 -4316
  162. package/lib/locales/pt-br.d.ts +16 -0
  163. package/lib/locales/vi.d.ts +16 -0
  164. package/lib/locales/zh-cn.d.ts +16 -0
  165. package/lib/{popover-B7ec5-u2.js → popover-LfNBhRyz.js} +1 -1
  166. package/lib/{popover-BSzR_R01.cjs → popover-mL-2sX5r.cjs} +1 -1
  167. package/lib/react-BEoMZB61.cjs +1 -0
  168. package/lib/react-c9FSfB30.js +27 -0
  169. package/lib/select-CwGYPsPq.cjs +1 -0
  170. package/lib/select-DctYuHLH.js +117 -0
  171. package/lib/separator-Ddfrhn4D.js +329 -0
  172. package/lib/separator-NoH_SLRW.cjs +1 -0
  173. package/lib/store/EditorEditableReactive.d.ts +1 -0
  174. package/lib/store/ThemeColorReactive.d.ts +1 -0
  175. package/lib/store/commandList.d.ts +1 -1
  176. package/lib/store/store.d.ts +6 -7
  177. package/lib/store-CkjKIgjQ.cjs +1 -0
  178. package/lib/store-DNpS8vXA.js +10 -0
  179. package/lib/style.css +1 -1
  180. package/lib/{tabs-CWr9HYaM.js → tabs-BT3AeqQQ.js} +1 -1
  181. package/lib/{tabs-BTwiZkWd.cjs → tabs-DRSwUeKP.cjs} +1 -1
  182. package/lib/{textarea-Yetl_PZi.cjs → textarea-BDO6XQoF.cjs} +1 -1
  183. package/lib/{textarea-BdeLXbp8.js → textarea-DZzMEDfZ.js} +1 -1
  184. package/lib/theme/theme.d.ts +5 -0
  185. package/lib/theme.cjs +1 -1
  186. package/lib/theme.js +37 -8
  187. package/lib/{throttle-DsowOft0.js → throttle-IERhwcLa.js} +1 -1
  188. package/lib/throttle-gTTvqDTW.cjs +1 -0
  189. package/lib/toggle-BQHMh_Q-.cjs +1 -0
  190. package/lib/toggle-DKHg5sLm.js +99 -0
  191. package/lib/tooltip-BYtGp6FM.cjs +1 -0
  192. package/lib/tooltip-DNKq7zgN.js +24 -0
  193. package/lib/{updatePosition-Bbd8ETMv.js → updatePosition-Bie75EFq.js} +2 -2
  194. package/lib/updatePosition-Cjuj2E26.cjs +1 -0
  195. package/lib/useButtonProps-DBJkNDS2.cjs +1 -0
  196. package/lib/{useButtonProps-cMoicZgd.js → useButtonProps-DVP4s_ER.js} +48 -36
  197. package/lib/utils/customEvents/events.constant.d.ts +0 -5
  198. package/package.json +3 -3
  199. package/lib/ActionMenuButton-BLlse5KO.cjs +0 -1
  200. package/lib/Drawer-kv6BU_6O.cjs +0 -1
  201. package/lib/Excalidraw-B82ThkJA.cjs +0 -1
  202. package/lib/Icon-DRuJhcHK.js +0 -10
  203. package/lib/Icon-DXePECFW.cjs +0 -1
  204. package/lib/Iframe-03dn9wcM.cjs +0 -1
  205. package/lib/Indent-Cqjdn3Jt.cjs +0 -1
  206. package/lib/Katex-DdWTV5NJ.cjs +0 -4
  207. package/lib/SlashCommandNodeView-Bl_gwZJB.cjs +0 -1
  208. package/lib/Table-DBGjezZK.cjs +0 -9
  209. package/lib/Twitter-Cnvt7GBg.cjs +0 -1
  210. package/lib/button-BW5bDPz_.cjs +0 -1
  211. package/lib/events.constant-DQYeJpu5.cjs +0 -1
  212. package/lib/events.constant-wrlJ_7JZ.js +0 -26
  213. package/lib/index-BZ6DfR2r.cjs +0 -1
  214. package/lib/index-C838s-or.cjs +0 -8
  215. package/lib/index-Cv9Z6dyV.cjs +0 -1
  216. package/lib/index-FSRjMsxW.cjs +0 -1
  217. package/lib/label-DsOYPjAo.js +0 -18
  218. package/lib/label-E6jF3Xud.cjs +0 -1
  219. package/lib/separator-JaTTqb3J.js +0 -241
  220. package/lib/separator-PGnA-6Hr.cjs +0 -1
  221. package/lib/store/ProviderUniqueId.d.ts +0 -6
  222. package/lib/store-Cf7tFiiI.js +0 -10
  223. package/lib/store-oDk-lTPM.cjs +0 -1
  224. package/lib/throttle-BM3Bmbf_.cjs +0 -1
  225. package/lib/updatePosition-M2IyqkI1.cjs +0 -1
  226. package/lib/useButtonProps-DfnJiJLV.cjs +0 -1
@@ -176,5 +176,21 @@ declare const locale: {
176
176
  'editor.upload.fileTypeNotSupported': string;
177
177
  'editor.upload.fileSizeTooBig': string;
178
178
  'editor.upload.error': string;
179
+ 'editor.callout.tooltip': string;
180
+ 'editor.callout.dialog.title': string;
181
+ 'editor.callout.dialog.type': string;
182
+ 'editor.callout.dialog.type.placeholder': string;
183
+ 'editor.callout.dialog.title.label': string;
184
+ 'editor.callout.dialog.title.placeholder': string;
185
+ 'editor.callout.dialog.body.label': string;
186
+ 'editor.callout.dialog.body.placeholder': string;
187
+ 'editor.callout.dialog.button.apply': string;
188
+ 'editor.callout.dialog.button.cancel': string;
189
+ 'editor.callout.edit.title': string;
190
+ 'editor.callout.type.note': string;
191
+ 'editor.callout.type.tip': string;
192
+ 'editor.callout.type.important': string;
193
+ 'editor.callout.type.warning': string;
194
+ 'editor.callout.type.caution': string;
179
195
  };
180
196
  export default locale;
@@ -176,5 +176,21 @@ declare const locale: {
176
176
  'editor.upload.fileTypeNotSupported': string;
177
177
  'editor.upload.fileSizeTooBig': string;
178
178
  'editor.upload.error': string;
179
+ 'editor.callout.tooltip': string;
180
+ 'editor.callout.dialog.title': string;
181
+ 'editor.callout.dialog.type': string;
182
+ 'editor.callout.dialog.type.placeholder': string;
183
+ 'editor.callout.dialog.title.label': string;
184
+ 'editor.callout.dialog.title.placeholder': string;
185
+ 'editor.callout.dialog.body.label': string;
186
+ 'editor.callout.dialog.body.placeholder': string;
187
+ 'editor.callout.dialog.button.apply': string;
188
+ 'editor.callout.dialog.button.cancel': string;
189
+ 'editor.callout.edit.title': string;
190
+ 'editor.callout.type.note': string;
191
+ 'editor.callout.type.tip': string;
192
+ 'editor.callout.type.important': string;
193
+ 'editor.callout.type.warning': string;
194
+ 'editor.callout.type.caution': string;
179
195
  };
180
196
  export default locale;
@@ -176,5 +176,21 @@ declare const locale: {
176
176
  'editor.upload.fileTypeNotSupported': string;
177
177
  'editor.upload.fileSizeTooBig': string;
178
178
  'editor.upload.error': string;
179
+ 'editor.callout.tooltip': string;
180
+ 'editor.callout.dialog.title': string;
181
+ 'editor.callout.dialog.type': string;
182
+ 'editor.callout.dialog.type.placeholder': string;
183
+ 'editor.callout.dialog.title.label': string;
184
+ 'editor.callout.dialog.title.placeholder': string;
185
+ 'editor.callout.dialog.body.label': string;
186
+ 'editor.callout.dialog.body.placeholder': string;
187
+ 'editor.callout.dialog.button.apply': string;
188
+ 'editor.callout.dialog.button.cancel': string;
189
+ 'editor.callout.edit.title': string;
190
+ 'editor.callout.type.note': string;
191
+ 'editor.callout.type.tip': string;
192
+ 'editor.callout.type.important': string;
193
+ 'editor.callout.type.warning': string;
194
+ 'editor.callout.type.caution': string;
179
195
  };
180
196
  export default locale;
@@ -1,7 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
3
  import * as t from "@radix-ui/react-popover";
4
- import { c as s } from "./index-C3zg3DPB.js";
4
+ import { c as s } from "./index-DF5ZPtWM.js";
5
5
  const x = t.Root, p = t.Trigger, n = c.forwardRef(({ className: o, align: r = "center", sideOffset: i = 4, ...a }, d) => /* @__PURE__ */ e(t.Portal, { children: /* @__PURE__ */ e(
6
6
  t.Content,
7
7
  {
@@ -1 +1 @@
1
- "use strict";const a=require("react/jsx-runtime"),s=require("react"),p=require("@radix-ui/react-popover"),x=require("./index-C838s-or.cjs");function n(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const h=n(s),o=n(p),l=o.Root,m=o.Trigger,c=h.forwardRef(({className:t,align:r="center",sideOffset:e=4,...i},d)=>a.jsx(o.Portal,{children:a.jsx(o.Content,{align:r,"data-richtext-portal":!0,ref:d,sideOffset:e,className:x.cn("richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-4 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2 !richtext-border-border",t),...i})}));c.displayName=o.Content.displayName;exports.Popover=l;exports.PopoverContent=c;exports.PopoverTrigger=m;
1
+ "use strict";const a=require("react/jsx-runtime"),s=require("react"),p=require("@radix-ui/react-popover"),x=require("./index-D3RLYf-J.cjs");function n(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const h=n(s),o=n(p),l=o.Root,m=o.Trigger,c=h.forwardRef(({className:t,align:r="center",sideOffset:e=4,...i},d)=>a.jsx(o.Portal,{children:a.jsx(o.Content,{align:r,"data-richtext-portal":!0,ref:d,sideOffset:e,className:x.cn("richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-4 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2 !richtext-border-border",t),...i})}));c.displayName=o.Content.displayName;exports.Popover=l;exports.PopoverContent=c;exports.PopoverTrigger=m;
@@ -0,0 +1 @@
1
+ "use strict";const u=require("react"),S=t=>{let e;const n=new Set,o=(s,r)=>{const c=typeof s=="function"?s(e):s;if(!Object.is(c,e)){const g=e;e=r??(typeof c!="object"||c===null)?c:Object.assign({},e,c),n.forEach(f=>f(e,g))}},i=()=>e,a={setState:o,getState:i,getInitialState:()=>l,subscribe:s=>(n.add(s),()=>n.delete(s))},l=e=t(o,i,a);return a},d=(t=>t?S(t):S),I=t=>t;function j(t,e=I){const n=u.useSyncExternalStore(t.subscribe,u.useCallback(()=>e(t.getState()),[t,e]),u.useCallback(()=>e(t.getInitialState()),[t,e]));return u.useDebugValue(n),n}const b=t=>{const e=d(t),n=o=>j(e,o);return Object.assign(n,e),n},y=(t=>t?b(t):b);exports.create=y;
@@ -0,0 +1,27 @@
1
+ import u from "react";
2
+ const l = (t) => {
3
+ let e;
4
+ const n = /* @__PURE__ */ new Set(), o = (s, r) => {
5
+ const c = typeof s == "function" ? s(e) : s;
6
+ if (!Object.is(c, e)) {
7
+ const f = e;
8
+ e = r ?? (typeof c != "object" || c === null) ? c : Object.assign({}, e, c), n.forEach((g) => g(e, f));
9
+ }
10
+ }, a = () => e, i = { setState: o, getState: a, getInitialState: () => b, subscribe: (s) => (n.add(s), () => n.delete(s)) }, b = e = t(o, a, i);
11
+ return i;
12
+ }, d = ((t) => t ? l(t) : l), I = (t) => t;
13
+ function j(t, e = I) {
14
+ const n = u.useSyncExternalStore(
15
+ t.subscribe,
16
+ u.useCallback(() => e(t.getState()), [t, e]),
17
+ u.useCallback(() => e(t.getInitialState()), [t, e])
18
+ );
19
+ return u.useDebugValue(n), n;
20
+ }
21
+ const S = (t) => {
22
+ const e = d(t), n = (o) => j(e, o);
23
+ return Object.assign(n, e), n;
24
+ }, O = ((t) => t ? S(t) : S);
25
+ export {
26
+ O as c
27
+ };
@@ -0,0 +1 @@
1
+ "use strict";const c=require("react/jsx-runtime"),f=require("react"),g=require("@radix-ui/react-select"),x=require("lucide-react"),s=require("./index-D3RLYf-J.cjs");function l(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(i,e,a.get?a:{enumerable:!0,get:()=>r[e]})}}return i.default=r,Object.freeze(i)}const o=l(f),t=l(g),y=t.Root,b=t.Value,n=o.forwardRef(({className:r,children:i,...e},a)=>c.jsxs(t.Trigger,{ref:a,className:s.cn("richtext-flex richtext-h-10 richtext-w-full richtext-items-center richtext-justify-between richtext-rounded-md richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 [&>span]:richtext-line-clamp-1 richtext-text-foreground",r),...e,children:[i,c.jsx(t.Icon,{asChild:!0,children:c.jsx(x.ChevronDown,{className:"richtext-size-4 richtext-opacity-50"})})]}));n.displayName=t.Trigger.displayName;const h=o.forwardRef(({className:r,...i},e)=>c.jsx(t.ScrollUpButton,{ref:e,className:s.cn("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",r),...i,children:c.jsx(x.ChevronUp,{className:"richtext-size-4"})}));h.displayName=t.ScrollUpButton.displayName;const d=o.forwardRef(({className:r,...i},e)=>c.jsx(t.ScrollDownButton,{ref:e,className:s.cn("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",r),...i,children:c.jsx(x.ChevronDown,{className:"richtext-size-4"})}));d.displayName=t.ScrollDownButton.displayName;const m=o.forwardRef(({className:r,children:i,position:e="popper",...a},u)=>c.jsx(t.Portal,{children:c.jsxs(t.Content,{"data-richtext-portal":!0,position:e,ref:u,className:s.cn("richtext-relative richtext-z-50 richtext-max-h-60 richtext-overflow-y-auto richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md richtext-border !richtext-border-border richtext-bg-popover richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",e==="popper"&&"data-[side=bottom]:richtext-translate-y-1 data-[side=left]:richtext--translate-x-1 data-[side=right]:richtext-translate-x-1 data-[side=top]:richtext--translate-y-1",r),...a,children:[c.jsx(h,{}),c.jsx(t.Viewport,{className:s.cn("richtext-p-1",e==="popper"&&"richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"),children:i}),c.jsx(d,{})]})}));m.displayName=t.Content.displayName;const j=o.forwardRef(({className:r,...i},e)=>c.jsx(t.Label,{className:s.cn("richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold",r),ref:e,...i}));j.displayName=t.Label.displayName;const p=o.forwardRef(({className:r,children:i,...e},a)=>c.jsxs(t.Item,{ref:a,className:s.cn("richtext-relative richtext-flex richtext-w-full richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",r),...e,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:c.jsx(t.ItemIndicator,{children:c.jsx(x.Check,{className:"richtext-size-4"})})}),c.jsx(t.ItemText,{children:i})]}));p.displayName=t.Item.displayName;const N=o.forwardRef(({className:r,...i},e)=>c.jsx(t.Separator,{className:s.cn("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",r),ref:e,...i}));N.displayName=t.Separator.displayName;exports.Select=y;exports.SelectContent=m;exports.SelectItem=p;exports.SelectTrigger=n;exports.SelectValue=b;
@@ -0,0 +1,117 @@
1
+ import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
+ import * as o from "react";
3
+ import * as t from "@radix-ui/react-select";
4
+ import { ChevronDown as x, ChevronUp as m, Check as p } from "lucide-react";
5
+ import { c as a } from "./index-DF5ZPtWM.js";
6
+ const v = t.Root, R = t.Value, f = o.forwardRef(({ className: i, children: c, ...r }, s) => /* @__PURE__ */ h(
7
+ t.Trigger,
8
+ {
9
+ ref: s,
10
+ className: a(
11
+ "richtext-flex richtext-h-10 richtext-w-full richtext-items-center richtext-justify-between richtext-rounded-md richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 [&>span]:richtext-line-clamp-1 richtext-text-foreground",
12
+ i
13
+ ),
14
+ ...r,
15
+ children: [
16
+ c,
17
+ /* @__PURE__ */ e(t.Icon, { asChild: !0, children: /* @__PURE__ */ e(x, { className: "richtext-size-4 richtext-opacity-50" }) })
18
+ ]
19
+ }
20
+ ));
21
+ f.displayName = t.Trigger.displayName;
22
+ const l = o.forwardRef(({ className: i, ...c }, r) => /* @__PURE__ */ e(
23
+ t.ScrollUpButton,
24
+ {
25
+ ref: r,
26
+ className: a(
27
+ "richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
28
+ i
29
+ ),
30
+ ...c,
31
+ children: /* @__PURE__ */ e(m, { className: "richtext-size-4" })
32
+ }
33
+ ));
34
+ l.displayName = t.ScrollUpButton.displayName;
35
+ const d = o.forwardRef(({ className: i, ...c }, r) => /* @__PURE__ */ e(
36
+ t.ScrollDownButton,
37
+ {
38
+ ref: r,
39
+ className: a(
40
+ "richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
41
+ i
42
+ ),
43
+ ...c,
44
+ children: /* @__PURE__ */ e(x, { className: "richtext-size-4" })
45
+ }
46
+ ));
47
+ d.displayName = t.ScrollDownButton.displayName;
48
+ const u = o.forwardRef(({ className: i, children: c, position: r = "popper", ...s }, n) => /* @__PURE__ */ e(t.Portal, { children: /* @__PURE__ */ h(
49
+ t.Content,
50
+ {
51
+ "data-richtext-portal": !0,
52
+ position: r,
53
+ ref: n,
54
+ className: a(
55
+ "richtext-relative richtext-z-50 richtext-max-h-60 richtext-overflow-y-auto richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md richtext-border !richtext-border-border richtext-bg-popover richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",
56
+ r === "popper" && "data-[side=bottom]:richtext-translate-y-1 data-[side=left]:richtext--translate-x-1 data-[side=right]:richtext-translate-x-1 data-[side=top]:richtext--translate-y-1",
57
+ i
58
+ ),
59
+ ...s,
60
+ children: [
61
+ /* @__PURE__ */ e(l, {}),
62
+ /* @__PURE__ */ e(
63
+ t.Viewport,
64
+ {
65
+ className: a(
66
+ "richtext-p-1",
67
+ r === "popper" && "richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"
68
+ ),
69
+ children: c
70
+ }
71
+ ),
72
+ /* @__PURE__ */ e(d, {})
73
+ ]
74
+ }
75
+ ) }));
76
+ u.displayName = t.Content.displayName;
77
+ const y = o.forwardRef(({ className: i, ...c }, r) => /* @__PURE__ */ e(
78
+ t.Label,
79
+ {
80
+ className: a("richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold", i),
81
+ ref: r,
82
+ ...c
83
+ }
84
+ ));
85
+ y.displayName = t.Label.displayName;
86
+ const g = o.forwardRef(({ className: i, children: c, ...r }, s) => /* @__PURE__ */ h(
87
+ t.Item,
88
+ {
89
+ ref: s,
90
+ className: a(
91
+ "richtext-relative richtext-flex richtext-w-full richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",
92
+ i
93
+ ),
94
+ ...r,
95
+ children: [
96
+ /* @__PURE__ */ e("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ e(t.ItemIndicator, { children: /* @__PURE__ */ e(p, { className: "richtext-size-4" }) }) }),
97
+ /* @__PURE__ */ e(t.ItemText, { children: c })
98
+ ]
99
+ }
100
+ ));
101
+ g.displayName = t.Item.displayName;
102
+ const N = o.forwardRef(({ className: i, ...c }, r) => /* @__PURE__ */ e(
103
+ t.Separator,
104
+ {
105
+ className: a("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted", i),
106
+ ref: r,
107
+ ...c
108
+ }
109
+ ));
110
+ N.displayName = t.Separator.displayName;
111
+ export {
112
+ v as S,
113
+ f as a,
114
+ R as b,
115
+ u as c,
116
+ g as d
117
+ };
@@ -0,0 +1,329 @@
1
+ import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
+ import * as k from "react";
3
+ import { useCallback as m, useState as w, useEffect as L, useRef as $, useMemo as M } from "react";
4
+ import { Plus as I } from "lucide-react";
5
+ import { HexColorPicker as B } from "react-colorful";
6
+ import { c as F } from "./index-DF5ZPtWM.js";
7
+ import "./theme.js";
8
+ import { u as N, C as _ } from "./index-Dujzr6bY.js";
9
+ import { P as z, a as E, b as y } from "./popover-LfNBhRyz.js";
10
+ import { I as T } from "./input-DUBdJD3L.js";
11
+ import * as R from "@radix-ui/react-separator";
12
+ import { B as j } from "./button-Uv01FNnd.js";
13
+ function D() {
14
+ return /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ t("path", { fill: "currentColor", d: "M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z" }) });
15
+ }
16
+ const C = typeof window > "u";
17
+ function S(e, r, c = window) {
18
+ const d = $(void 0);
19
+ L(() => {
20
+ d.current = r;
21
+ }, [r]), L(() => {
22
+ if (!(c && c.addEventListener)) return;
23
+ const u = (a) => {
24
+ d.current && d.current(a);
25
+ };
26
+ return c.addEventListener(e, u), () => {
27
+ c.removeEventListener(e, u);
28
+ };
29
+ }, [e, c]);
30
+ }
31
+ function J(e, r, c = {}) {
32
+ const { initializeWithValue: d = !0 } = c, n = m(
33
+ (o) => c.serializer ? c.serializer(o) : JSON.stringify(o),
34
+ [c]
35
+ ), u = m(
36
+ (o) => {
37
+ if (c.deserializer)
38
+ return c.deserializer(o);
39
+ if (o === "undefined")
40
+ return;
41
+ const s = r instanceof Function ? r() : r;
42
+ let i;
43
+ try {
44
+ i = JSON.parse(o);
45
+ } catch (l) {
46
+ return console.error("Error parsing JSON:", l), s;
47
+ }
48
+ return i;
49
+ },
50
+ [c, r]
51
+ ), a = m(() => {
52
+ const o = r instanceof Function ? r() : r;
53
+ if (C)
54
+ return o;
55
+ try {
56
+ const s = window.localStorage.getItem(e);
57
+ return s ? u(s) : o;
58
+ } catch (s) {
59
+ return console.warn(
60
+ `Error reading localStorage key “${e}”:`,
61
+ s
62
+ ), o;
63
+ }
64
+ }, [r, e, u]), [h, f] = w(() => d ? a() : r instanceof Function ? r() : r), b = m((o) => {
65
+ C && console.warn(
66
+ `Tried setting localStorage key “${e}” even though environment is not a client`
67
+ );
68
+ try {
69
+ const s = o instanceof Function ? o(a()) : o;
70
+ window.localStorage.setItem(e, n(s)), f(s), window.dispatchEvent(
71
+ new StorageEvent("local-storage", {
72
+ key: e
73
+ })
74
+ );
75
+ } catch (s) {
76
+ console.warn(
77
+ `Error setting localStorage key “${e}”:`,
78
+ s
79
+ );
80
+ }
81
+ }, [e, n, a]), g = m(() => {
82
+ C && console.warn(
83
+ `Tried removing localStorage key “${e}” even though environment is not a client`
84
+ );
85
+ const o = r instanceof Function ? r() : r;
86
+ window.localStorage.removeItem(e), f(o), window.dispatchEvent(
87
+ new StorageEvent("local-storage", {
88
+ key: e
89
+ })
90
+ );
91
+ }, [e, r]);
92
+ L(() => {
93
+ f(a());
94
+ }, [e]);
95
+ const v = m(
96
+ (o) => {
97
+ o.key && o.key !== e || f(a());
98
+ },
99
+ [e, a]
100
+ );
101
+ return S("storage", v), S("local-storage", v), [h, b, g];
102
+ }
103
+ function V(e) {
104
+ const { t: r } = N(), {
105
+ disabled: c = !1,
106
+ value: d,
107
+ onChange: n,
108
+ colors: u = _,
109
+ highlight: a
110
+ } = e, [h, f] = w(!1), b = M(() => {
111
+ const i = u, l = [];
112
+ for (let x = 0; x < i.length; x += 10)
113
+ l.push(i.slice(x, x + 10));
114
+ return l;
115
+ }, [u]), [g, v] = J(a ? "richtext-recent-highlight" : "richtext-recent-colors", []), o = (i) => {
116
+ const l = [...g], x = l.indexOf(i);
117
+ x !== -1 && l.splice(x, 1), l.unshift(i), l.length > 10 && l.pop(), v(l);
118
+ };
119
+ function s(i) {
120
+ if (i === void 0) {
121
+ n == null || n(i), f(!1);
122
+ return;
123
+ }
124
+ /^#([\da-f]{3}){1,2}$/i.test(i) && (n == null || n(i), o(i), f(!1));
125
+ }
126
+ return /* @__PURE__ */ p(
127
+ z,
128
+ {
129
+ modal: !0,
130
+ onOpenChange: f,
131
+ open: h,
132
+ children: [
133
+ /* @__PURE__ */ t(
134
+ E,
135
+ {
136
+ asChild: !0,
137
+ className: "!richtext-p-0",
138
+ disabled: c,
139
+ children: e == null ? void 0 : e.children
140
+ }
141
+ ),
142
+ /* @__PURE__ */ t(
143
+ y,
144
+ {
145
+ align: "start",
146
+ className: "richtext-size-full !richtext-p-2",
147
+ hideWhenDetached: !0,
148
+ side: "bottom",
149
+ children: /* @__PURE__ */ p("div", { className: "richtext-flex richtext-flex-col", children: [
150
+ /* @__PURE__ */ p(
151
+ "div",
152
+ {
153
+ className: "rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",
154
+ onClick: () => {
155
+ s(void 0);
156
+ },
157
+ children: [
158
+ /* @__PURE__ */ t(D, {}),
159
+ /* @__PURE__ */ t("span", { className: "richtext-ml-1 richtext-text-sm", children: r(a ? "editor.nofill" : "editor.default") })
160
+ ]
161
+ }
162
+ ),
163
+ b.map((i, l) => /* @__PURE__ */ t(
164
+ "span",
165
+ {
166
+ className: "richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",
167
+ children: i.map((x, P) => /* @__PURE__ */ t(
168
+ "span",
169
+ {
170
+ className: "richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-solid !richtext-border-transparent richtext-p-0.5 hover:!richtext-border-border",
171
+ onClick: () => s(x),
172
+ children: /* @__PURE__ */ t(
173
+ "span",
174
+ {
175
+ className: "richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px]",
176
+ style: {
177
+ backgroundColor: x
178
+ },
179
+ children: x === d ? /* @__PURE__ */ t(
180
+ "svg",
181
+ {
182
+ className: "richtext-absolute -richtext-top-px richtext-left-px richtext-block richtext-size-3",
183
+ viewBox: "0 0 18 18",
184
+ style: {
185
+ fill: "rgb(255, 255, 255)"
186
+ },
187
+ children: /* @__PURE__ */ t("path", { d: "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" })
188
+ }
189
+ ) : /* @__PURE__ */ t(
190
+ "svg",
191
+ {
192
+ viewBox: "0 0 18 18",
193
+ style: {
194
+ fill: "rgb(255, 255, 255)",
195
+ display: "none"
196
+ },
197
+ children: /* @__PURE__ */ t("path", { d: "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" })
198
+ }
199
+ )
200
+ }
201
+ )
202
+ },
203
+ `sub-color-${P}`
204
+ ))
205
+ },
206
+ `color-row-${l}`
207
+ )),
208
+ /* @__PURE__ */ p("div", { children: [
209
+ /* @__PURE__ */ t("div", { className: "richtext-my-1 richtext-text-sm", children: r("editor.recent") }),
210
+ /* @__PURE__ */ t("span", { className: "richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-flex-wrap richtext-p-0 last:richtext-pb-2", children: g == null ? void 0 : g.map((i, l) => /* @__PURE__ */ t(
211
+ "span",
212
+ {
213
+ className: "richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-transparent richtext-p-0.5 hover:richtext-border-border hover:richtext-shadow-sm",
214
+ onClick: () => s(i),
215
+ children: /* @__PURE__ */ t(
216
+ "span",
217
+ {
218
+ className: "richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",
219
+ style: {
220
+ backgroundColor: i
221
+ },
222
+ children: /* @__PURE__ */ t(
223
+ "svg",
224
+ {
225
+ viewBox: "0 0 18 18",
226
+ style: {
227
+ fill: "rgb(255, 255, 255)",
228
+ display: "none"
229
+ },
230
+ children: /* @__PURE__ */ t("path", { d: "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" })
231
+ }
232
+ )
233
+ }
234
+ )
235
+ },
236
+ `sub-color-recent-${l}`
237
+ )) })
238
+ ] }),
239
+ /* @__PURE__ */ t(Z, { setColor: s })
240
+ ] })
241
+ }
242
+ )
243
+ ]
244
+ }
245
+ );
246
+ }
247
+ function Z({ setColor: e }) {
248
+ const { t: r } = N(), [c, d] = w(!1), [n, u] = w("#000000"), a = m(
249
+ (h) => {
250
+ u(h);
251
+ },
252
+ []
253
+ );
254
+ return /* @__PURE__ */ p(
255
+ z,
256
+ {
257
+ onOpenChange: d,
258
+ open: c,
259
+ children: [
260
+ /* @__PURE__ */ t(E, { asChild: !0, children: /* @__PURE__ */ p(
261
+ "div",
262
+ {
263
+ className: "richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",
264
+ children: [
265
+ r("editor.color.more"),
266
+ "..."
267
+ ]
268
+ }
269
+ ) }),
270
+ /* @__PURE__ */ p(y, { children: [
271
+ /* @__PURE__ */ p("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-justify-center", children: [
272
+ /* @__PURE__ */ t(
273
+ B,
274
+ {
275
+ color: n,
276
+ onChange: (h) => {
277
+ a(h);
278
+ }
279
+ }
280
+ ),
281
+ /* @__PURE__ */ t(
282
+ T,
283
+ {
284
+ className: "richtext-mt-[8px] richtext-w-full",
285
+ type: "text",
286
+ value: n.replace("#", ""),
287
+ onChange: (h) => {
288
+ h.preventDefault(), h.stopPropagation(), a(`#${h.target.value}`);
289
+ }
290
+ }
291
+ )
292
+ ] }),
293
+ /* @__PURE__ */ t(O, { className: "richtext-my-[10px]" }),
294
+ /* @__PURE__ */ t(
295
+ j,
296
+ {
297
+ className: "richtext-w-full",
298
+ onClick: (h) => {
299
+ h.preventDefault(), h.stopPropagation(), e(n), d(!1);
300
+ },
301
+ children: /* @__PURE__ */ t(I, { size: 16 })
302
+ }
303
+ )
304
+ ] })
305
+ ]
306
+ }
307
+ );
308
+ }
309
+ const O = k.forwardRef(
310
+ ({ className: e, orientation: r = "horizontal", decorative: c = !0, ...d }, n) => /* @__PURE__ */ t(
311
+ R.Root,
312
+ {
313
+ ref: n,
314
+ decorative: c,
315
+ orientation: r,
316
+ className: F(
317
+ "richtext-shrink-0 richtext-bg-border",
318
+ r === "horizontal" ? "richtext-h-[1px] richtext-w-full" : "richtext-h-full richtext-w-[1px]",
319
+ e
320
+ ),
321
+ ...d
322
+ }
323
+ )
324
+ );
325
+ O.displayName = R.Root.displayName;
326
+ export {
327
+ V as C,
328
+ O as S
329
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),n=require("react"),k=require("lucide-react"),E=require("react-colorful"),P=require("./index-D3RLYf-J.cjs");require("./theme.cjs");const j=require("./index-Doks9cbR.cjs"),v=require("./popover-mL-2sX5r.cjs"),O=require("./input-Dt_BA_9B.cjs"),y=require("@radix-ui/react-separator"),R=require("./button-BS3n6_Aq.cjs");function L(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const c in t)if(c!=="default"){const h=Object.getOwnPropertyDescriptor(t,c);Object.defineProperty(r,c,h.get?h:{enumerable:!0,get:()=>t[c]})}}return r.default=t,Object.freeze(r)}const q=L(n),N=L(y);function _(){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z"})})}const w=typeof window>"u";function S(t,r,c=window){const h=n.useRef(void 0);n.useEffect(()=>{h.current=r},[r]),n.useEffect(()=>{if(!(c&&c.addEventListener))return;const f=x=>{h.current&&h.current(x)};return c.addEventListener(t,f),()=>{c.removeEventListener(t,f)}},[t,c])}function $(t,r,c={}){const{initializeWithValue:h=!0}=c,i=n.useCallback(o=>c.serializer?c.serializer(o):JSON.stringify(o),[c]),f=n.useCallback(o=>{if(c.deserializer)return c.deserializer(o);if(o==="undefined")return;const l=r instanceof Function?r():r;let s;try{s=JSON.parse(o)}catch(a){return console.error("Error parsing JSON:",a),l}return s},[c,r]),x=n.useCallback(()=>{const o=r instanceof Function?r():r;if(w)return o;try{const l=window.localStorage.getItem(t);return l?f(l):o}catch(l){return console.warn(`Error reading localStorage key “${t}”:`,l),o}},[r,t,f]),[d,p]=n.useState(()=>h?x():r instanceof Function?r():r),b=n.useCallback(o=>{w&&console.warn(`Tried setting localStorage key “${t}” even though environment is not a client`);try{const l=o instanceof Function?o(x()):o;window.localStorage.setItem(t,i(l)),p(l),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))}catch(l){console.warn(`Error setting localStorage key “${t}”:`,l)}},[t,i,x]),g=n.useCallback(()=>{w&&console.warn(`Tried removing localStorage key “${t}” even though environment is not a client`);const o=r instanceof Function?r():r;window.localStorage.removeItem(t),p(o),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))},[t,r]);n.useEffect(()=>{p(x())},[t]);const m=n.useCallback(o=>{o.key&&o.key!==t||p(x())},[t,x]);return S("storage",m),S("local-storage",m),[d,b,g]}function M(t){const{t:r}=j.useLocale(),{disabled:c=!1,value:h,onChange:i,colors:f=j.COLORS_LIST,highlight:x}=t,[d,p]=n.useState(!1),b=n.useMemo(()=>{const s=f,a=[];for(let u=0;u<s.length;u+=10)a.push(s.slice(u,u+10));return a},[f]),[g,m]=$(x?"richtext-recent-highlight":"richtext-recent-colors",[]),o=s=>{const a=[...g],u=a.indexOf(s);u!==-1&&a.splice(u,1),a.unshift(s),a.length>10&&a.pop(),m(a)};function l(s){if(s===void 0){i==null||i(s),p(!1);return}/^#([\da-f]{3}){1,2}$/i.test(s)&&(i==null||i(s),o(s),p(!1))}return e.jsxs(v.Popover,{modal:!0,onOpenChange:p,open:d,children:[e.jsx(v.PopoverTrigger,{asChild:!0,className:"!richtext-p-0",disabled:c,children:t==null?void 0:t.children}),e.jsx(v.PopoverContent,{align:"start",className:"richtext-size-full !richtext-p-2",hideWhenDetached:!0,side:"bottom",children:e.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[e.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>{l(void 0)},children:[e.jsx(_,{}),e.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:r(x?"editor.nofill":"editor.default")})]}),b.map((s,a)=>e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:s.map((u,z)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-solid !richtext-border-transparent richtext-p-0.5 hover:!richtext-border-border",onClick:()=>l(u),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px]",style:{backgroundColor:u},children:u===h?e.jsx("svg",{className:"richtext-absolute -richtext-top-px richtext-left-px richtext-block richtext-size-3",viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${z}`))},`color-row-${a}`)),e.jsxs("div",{children:[e.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:r("editor.recent")}),e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-flex-wrap richtext-p-0 last:richtext-pb-2",children:g==null?void 0:g.map((s,a)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-transparent richtext-p-0.5 hover:richtext-border-border hover:richtext-shadow-sm",onClick:()=>l(s),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:s},children:e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${a}`))})]}),e.jsx(T,{setColor:l})]})})]})}function T({setColor:t}){const{t:r}=j.useLocale(),[c,h]=n.useState(!1),[i,f]=n.useState("#000000"),x=n.useCallback(d=>{f(d)},[]);return e.jsxs(v.Popover,{onOpenChange:h,open:c,children:[e.jsx(v.PopoverTrigger,{asChild:!0,children:e.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",children:[r("editor.color.more"),"..."]})}),e.jsxs(v.PopoverContent,{children:[e.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[e.jsx(E.HexColorPicker,{color:i,onChange:d=>{x(d)}}),e.jsx(O.Input,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:i.replace("#",""),onChange:d=>{d.preventDefault(),d.stopPropagation(),x(`#${d.target.value}`)}})]}),e.jsx(C,{className:"richtext-my-[10px]"}),e.jsx(R.Button,{className:"richtext-w-full",onClick:d=>{d.preventDefault(),d.stopPropagation(),t(i),h(!1)},children:e.jsx(k.Plus,{size:16})})]})]})}const C=q.forwardRef(({className:t,orientation:r="horizontal",decorative:c=!0,...h},i)=>e.jsx(N.Root,{ref:i,decorative:c,orientation:r,className:P.cn("richtext-shrink-0 richtext-bg-border",r==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",t),...h}));C.displayName=N.Root.displayName;exports.ColorPicker=M;exports.Separator=C;
@@ -0,0 +1 @@
1
+ export declare function EditorEditableReactive({ editor }: any): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ThemeColorReactive(): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { CommandList } from '../extensions/SlashCommand/types';
2
- export declare function useSignalCommandList(): readonly [CommandList[], (val: CommandList[] | ((oldVal: CommandList[]) => CommandList[])) => void];
2
+ export declare function useSignalCommandList(): readonly [CommandList[], (newCommandList: CommandList[]) => void];
@@ -12,12 +12,11 @@ declare const ProviderUploadVideo: ({ children }: {
12
12
  }) => SelectorOutput) => [SelectorOutput, (value: Partial<{
13
13
  value: boolean;
14
14
  }>) => void];
15
- declare const ProviderEditableEditor: ({ children }: {
16
- children: React.ReactNode;
17
- }) => import("react/jsx-runtime").JSX.Element, useStoreEditableEditor: <SelectorOutput>(selector: (store: {
18
- value: boolean;
19
- }) => SelectorOutput) => [SelectorOutput, (value: Partial<{
15
+ declare const useStoreEditableEditor: import('zustand').UseBoundStore<import('zustand').StoreApi<{
20
16
  value: boolean;
21
- }>) => void];
17
+ setEditable: (newValue: {
18
+ value: boolean;
19
+ }) => void;
20
+ }>>;
22
21
  declare function useEditableEditor(): boolean;
23
- export { ProviderUploadImage, useStoreUploadImage, ProviderUploadVideo, useStoreUploadVideo, ProviderEditableEditor, useStoreEditableEditor, useEditableEditor, };
22
+ export { ProviderUploadImage, useStoreUploadImage, ProviderUploadVideo, useStoreUploadVideo, useStoreEditableEditor, useEditableEditor, };
@@ -0,0 +1 @@
1
+ "use strict";require("./index-D3RLYf-J.cjs");const e=require("./events.constant-Dq21NPdV.cjs"),a={setOpen:(t,n)=>{e.dispatchEvent(e.EVENTS.UPLOAD_IMAGE(t),n)}};exports.actionDialogImage=a;
@@ -0,0 +1,10 @@
1
+ import "./index-DF5ZPtWM.js";
2
+ import { d as o, E as s } from "./events.constant-do95b767.js";
3
+ const p = {
4
+ setOpen: (a, t) => {
5
+ o(s.UPLOAD_IMAGE(a), t);
6
+ }
7
+ };
8
+ export {
9
+ p as a
10
+ };