reactjs-tiptap-editor 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/lib/{ActionMenuButton-DTXFBdGX.js → ActionMenuButton-BKqin6Kz.js} +17 -13
  2. package/lib/ActionMenuButton-CPPHERbq.cjs +1 -0
  3. package/lib/Attachment.cjs +2 -2
  4. package/lib/Attachment.js +24 -21
  5. package/lib/Blockquote.cjs +2 -2
  6. package/lib/Blockquote.js +7 -5
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +11 -9
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +14 -12
  11. package/lib/Clear.cjs +1 -1
  12. package/lib/Clear.js +3 -3
  13. package/lib/Code.cjs +1 -1
  14. package/lib/Code.js +11 -9
  15. package/lib/CodeBlock.cjs +39 -39
  16. package/lib/CodeBlock.js +842 -948
  17. package/lib/CodeView.cjs +1 -1
  18. package/lib/CodeView.js +10 -8
  19. package/lib/Color.cjs +1 -1
  20. package/lib/Color.js +20 -18
  21. package/lib/Column.cjs +1 -1
  22. package/lib/Column.js +7 -5
  23. package/lib/{Drawer-D0yQ0wR7.js → Drawer-DUPsBE0H.js} +18 -17
  24. package/lib/Drawer-fplzqNI6.cjs +1 -0
  25. package/lib/Drawer.cjs +1 -1
  26. package/lib/Drawer.js +3 -3
  27. package/lib/Emoji.cjs +1 -1
  28. package/lib/Emoji.js +19 -17
  29. package/lib/{Excalidraw-CO4IRHmG.js → Excalidraw-BEzpvRLx.js} +33 -32
  30. package/lib/Excalidraw-qjnQspLq.cjs +1 -0
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +2 -2
  33. package/lib/ExportPdf.cjs +2 -2
  34. package/lib/ExportPdf.js +7 -5
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +7 -5
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +9 -8
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +13 -12
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +25 -24
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +9 -7
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +18 -15
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +7 -5
  49. package/lib/Icon-CiR8RqdQ.cjs +1 -0
  50. package/lib/Icon-ONE1AwKo.js +12 -0
  51. package/lib/{Iframe-BEO28NPs.js → Iframe-CBTnv2mk.js} +45 -43
  52. package/lib/Iframe-DsUNJ2n2.cjs +1 -0
  53. package/lib/Iframe.cjs +1 -1
  54. package/lib/Iframe.js +2 -2
  55. package/lib/Image.cjs +1 -1
  56. package/lib/Image.js +52 -50
  57. package/lib/ImageGif.cjs +1 -1
  58. package/lib/ImageGif.js +55 -53
  59. package/lib/ImportWord.cjs +31 -31
  60. package/lib/ImportWord.js +12 -10
  61. package/lib/{Indent-CXurBbOr.js → Indent-B00o0P0M.js} +26 -24
  62. package/lib/Indent-CaGP0qTp.cjs +1 -0
  63. package/lib/Indent.cjs +1 -1
  64. package/lib/Indent.js +2 -2
  65. package/lib/Italic.cjs +1 -1
  66. package/lib/Italic.js +12 -10
  67. package/lib/Katex-XsfpKgJU.cjs +4 -0
  68. package/lib/{Katex-Bvj469K1.js → Katex-x370CSXZ.js} +27 -25
  69. package/lib/Katex.cjs +1 -1
  70. package/lib/Katex.js +2 -2
  71. package/lib/LineHeight.cjs +1 -1
  72. package/lib/LineHeight.js +17 -15
  73. package/lib/Link.cjs +1 -1
  74. package/lib/Link.js +2 -2
  75. package/lib/{LinkEditBlock-DjXUEubR.js → LinkEditBlock-C_ipl3EA.js} +27 -25
  76. package/lib/{LinkEditBlock-8ePAZ-G1.cjs → LinkEditBlock-xt88G5fb.cjs} +2 -2
  77. package/lib/Mention.cjs +1 -1
  78. package/lib/Mention.js +3 -3
  79. package/lib/Mermaid.cjs +2 -2
  80. package/lib/Mermaid.js +29 -28
  81. package/lib/MoreMark.cjs +1 -1
  82. package/lib/MoreMark.js +25 -22
  83. package/lib/OrderedList.cjs +1 -1
  84. package/lib/OrderedList.js +10 -8
  85. package/lib/SearchAndReplace.cjs +1 -1
  86. package/lib/SearchAndReplace.js +48 -46
  87. package/lib/SlashCommand.cjs +1 -1
  88. package/lib/SlashCommand.js +6 -6
  89. package/lib/SlashCommandNodeView-BT5ystah.cjs +1 -0
  90. package/lib/{SlashCommandNodeView-CcqL8ymb.js → SlashCommandNodeView-DX6axvLs.js} +74 -65
  91. package/lib/Strike.cjs +1 -1
  92. package/lib/Strike.js +7 -5
  93. package/lib/Table-DSRSwtXx.cjs +9 -0
  94. package/lib/{Table-9Y0Cg8Ab.js → Table-DidusYID.js} +10 -8
  95. package/lib/Table.cjs +1 -1
  96. package/lib/Table.js +1 -1
  97. package/lib/TaskList.cjs +1 -1
  98. package/lib/TaskList.js +15 -13
  99. package/lib/TextAlign.cjs +1 -1
  100. package/lib/TextAlign.js +20 -17
  101. package/lib/TextDirection.cjs +1 -1
  102. package/lib/TextDirection.js +20 -17
  103. package/lib/TextUnderline.cjs +1 -1
  104. package/lib/TextUnderline.js +7 -5
  105. package/lib/Twitter-CBuVBQM1.cjs +1 -0
  106. package/lib/{Twitter-DWwd0vHR.js → Twitter-D58T0Zt3.js} +59 -57
  107. package/lib/Twitter.cjs +1 -1
  108. package/lib/Twitter.js +2 -2
  109. package/lib/Video.cjs +1 -1
  110. package/lib/Video.js +27 -25
  111. package/lib/bubble.cjs +4 -4
  112. package/lib/bubble.js +70 -68
  113. package/lib/{button-RnHbJfd-.js → button-9_8t7ca7.js} +4 -3
  114. package/lib/button-Cs9TroWr.cjs +1 -0
  115. package/lib/{checkbox-CTEN0q4y.cjs → checkbox-BQRKTXXr.cjs} +1 -1
  116. package/lib/{checkbox-CLSoR1Qj.js → checkbox-DnkkV6qo.js} +1 -1
  117. package/lib/{index-BBNITgNi.cjs → clsx-CXbNJWDD.cjs} +13 -13
  118. package/lib/{index-sVScpCFG.js → clsx-DmuN0U_8.js} +228 -228
  119. package/lib/{dialog-CMC9hsCo.cjs → dialog-BS3zm-T9.cjs} +1 -1
  120. package/lib/{dialog-D_HCtKvc.js → dialog-DhayAPvV.js} +1 -1
  121. package/lib/{dropdown-menu-DKSAS-w_.cjs → dropdown-menu-CxwWX0yj.cjs} +1 -1
  122. package/lib/{dropdown-menu-66q7Ofc5.js → dropdown-menu-DQqKeZcx.js} +1 -1
  123. package/lib/events.constant-Dq21NPdV.cjs +1 -0
  124. package/lib/events.constant-do95b767.js +21 -0
  125. package/lib/{index-CApXPpjF.cjs → index-BCzvbrf5.cjs} +1 -1
  126. package/lib/{index-0OnGZkVF.js → index-BDX1uE62.js} +78 -312
  127. package/lib/index-CBFmXCcU.cjs +1 -0
  128. package/lib/{index-DmPwbBqm.js → index-CKmT9KAQ.js} +1 -1
  129. package/lib/index-CVFzP1Dc.cjs +1 -0
  130. package/lib/index-CX4pNJlH.cjs +1 -0
  131. package/lib/index-CjhjjJsN.cjs +1 -0
  132. package/lib/index-Cs6cp0Y6.cjs +1 -0
  133. package/lib/{index-9A6-kVBM.js → index-D1jd7elj.js} +1 -1
  134. package/lib/{index-C3zg3DPB.js → index-D9JOHlso.js} +493 -1186
  135. package/lib/{index-DRHrDScg.js → index-DdEmgiAA.js} +1 -1
  136. package/lib/{index-DKt5wfAc.js → index-DvvwJvau.js} +23 -23
  137. package/lib/index-EAK64CCA.js +425 -0
  138. package/lib/{index--nUS7Y66.cjs → index-neeeY2o7.cjs} +3 -3
  139. package/lib/index.cjs +9 -2
  140. package/lib/index.js +142 -26
  141. package/lib/{input-D555880-.cjs → input-BJ7ihMq-.cjs} +1 -1
  142. package/lib/{input-CvyMYMZG.js → input-YoheBL2D.js} +1 -1
  143. package/lib/{isNumber-Bv1Qhmw8.cjs → isNumber-BTYSVlKo.cjs} +1 -1
  144. package/lib/{isNumber-DF0fU3ob.js → isNumber-DmQXlKp3.js} +1 -1
  145. package/lib/label-C8PLcjFI.js +19 -0
  146. package/lib/label-Y7_hvqf2.cjs +1 -0
  147. package/lib/locale-bundle.cjs +1 -1
  148. package/lib/locale-bundle.js +6 -7
  149. package/lib/locales/index.d.ts +3 -4316
  150. package/lib/{popover-BSzR_R01.cjs → popover-BiSrlM4j.cjs} +1 -1
  151. package/lib/{popover-B7ec5-u2.js → popover-CWmTzHSy.js} +1 -1
  152. package/lib/react-BEoMZB61.cjs +1 -0
  153. package/lib/react-c9FSfB30.js +27 -0
  154. package/lib/separator-C-DKMYmg.js +329 -0
  155. package/lib/separator-CJ_adziN.cjs +1 -0
  156. package/lib/store/EditorEditableReactive.d.ts +1 -0
  157. package/lib/store/ThemeColorReactive.d.ts +1 -0
  158. package/lib/store/commandList.d.ts +1 -1
  159. package/lib/store/store.d.ts +6 -7
  160. package/lib/store-BKMaw1AW.cjs +1 -0
  161. package/lib/store-DG7cMfET.js +10 -0
  162. package/lib/{tabs-BTwiZkWd.cjs → tabs-DpHSMyF_.cjs} +1 -1
  163. package/lib/{tabs-CWr9HYaM.js → tabs-DxlKKM-N.js} +1 -1
  164. package/lib/{textarea-BdeLXbp8.js → textarea-D7m-apUh.js} +1 -1
  165. package/lib/{textarea-Yetl_PZi.cjs → textarea-DU9RMi6u.cjs} +1 -1
  166. package/lib/theme/theme.d.ts +5 -0
  167. package/lib/theme.cjs +1 -1
  168. package/lib/theme.js +37 -8
  169. package/lib/{throttle-DsowOft0.js → throttle-BRtichEP.js} +1 -1
  170. package/lib/throttle-gTTvqDTW.cjs +1 -0
  171. package/lib/toggle-BYvLnjCL.cjs +1 -0
  172. package/lib/toggle-Bxwwb_Kp.js +99 -0
  173. package/lib/tooltip-BTy5CRrN.js +24 -0
  174. package/lib/tooltip-COvf4_R-.cjs +1 -0
  175. package/lib/{updatePosition-Bbd8ETMv.js → updatePosition-CUukgu-Q.js} +2 -2
  176. package/lib/updatePosition-Cjuj2E26.cjs +1 -0
  177. package/lib/{useButtonProps-cMoicZgd.js → useButtonProps-CfYtuEnd.js} +48 -36
  178. package/lib/useButtonProps-CydzndG1.cjs +1 -0
  179. package/lib/utils/customEvents/events.constant.d.ts +0 -5
  180. package/package.json +3 -3
  181. package/lib/ActionMenuButton-BLlse5KO.cjs +0 -1
  182. package/lib/Drawer-kv6BU_6O.cjs +0 -1
  183. package/lib/Excalidraw-B82ThkJA.cjs +0 -1
  184. package/lib/Icon-DRuJhcHK.js +0 -10
  185. package/lib/Icon-DXePECFW.cjs +0 -1
  186. package/lib/Iframe-03dn9wcM.cjs +0 -1
  187. package/lib/Indent-Cqjdn3Jt.cjs +0 -1
  188. package/lib/Katex-DdWTV5NJ.cjs +0 -4
  189. package/lib/SlashCommandNodeView-Bl_gwZJB.cjs +0 -1
  190. package/lib/Table-DBGjezZK.cjs +0 -9
  191. package/lib/Twitter-Cnvt7GBg.cjs +0 -1
  192. package/lib/button-BW5bDPz_.cjs +0 -1
  193. package/lib/events.constant-DQYeJpu5.cjs +0 -1
  194. package/lib/events.constant-wrlJ_7JZ.js +0 -26
  195. package/lib/index-BZ6DfR2r.cjs +0 -1
  196. package/lib/index-C838s-or.cjs +0 -8
  197. package/lib/index-Cv9Z6dyV.cjs +0 -1
  198. package/lib/index-FSRjMsxW.cjs +0 -1
  199. package/lib/label-DsOYPjAo.js +0 -18
  200. package/lib/label-E6jF3Xud.cjs +0 -1
  201. package/lib/separator-JaTTqb3J.js +0 -241
  202. package/lib/separator-PGnA-6Hr.cjs +0 -1
  203. package/lib/store/ProviderUniqueId.d.ts +0 -6
  204. package/lib/store-Cf7tFiiI.js +0 -10
  205. package/lib/store-oDk-lTPM.cjs +0 -1
  206. package/lib/throttle-BM3Bmbf_.cjs +0 -1
  207. package/lib/updatePosition-M2IyqkI1.cjs +0 -1
  208. package/lib/useButtonProps-DfnJiJLV.cjs +0 -1
@@ -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-CX4pNJlH.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,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-D9JOHlso.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
  {
@@ -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,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-D9JOHlso.js";
7
+ import "./theme.js";
8
+ import { B as _ } from "./button-9_8t7ca7.js";
9
+ import { I as T } from "./input-YoheBL2D.js";
10
+ import { P as N, a as z, b as E } from "./popover-CWmTzHSy.js";
11
+ import * as y from "@radix-ui/react-separator";
12
+ import { u as R, C as j } from "./index-BDX1uE62.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 } = R(), {
105
+ disabled: c = !1,
106
+ value: d,
107
+ onChange: n,
108
+ colors: u = j,
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
+ N,
128
+ {
129
+ modal: !0,
130
+ onOpenChange: f,
131
+ open: h,
132
+ children: [
133
+ /* @__PURE__ */ t(
134
+ z,
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
+ E,
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 } = R(), [c, d] = w(!1), [n, u] = w("#000000"), a = m(
249
+ (h) => {
250
+ u(h);
251
+ },
252
+ []
253
+ );
254
+ return /* @__PURE__ */ p(
255
+ N,
256
+ {
257
+ onOpenChange: d,
258
+ open: c,
259
+ children: [
260
+ /* @__PURE__ */ t(z, { 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(E, { 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
+ _,
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
+ y.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 = y.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-CX4pNJlH.cjs");require("./theme.cjs");const O=require("./button-Cs9TroWr.cjs"),y=require("./input-BJ7ihMq-.cjs"),v=require("./popover-BiSrlM4j.cjs"),R=require("@radix-ui/react-separator"),j=require("./index-CVFzP1Dc.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(R);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(y.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(O.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-CX4pNJlH.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-D9JOHlso.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
+ };
@@ -1 +1 @@
1
- "use strict";const c=require("react/jsx-runtime"),h=require("react"),d=require("@radix-ui/react-tabs"),s=require("./index-C838s-or.cjs");function o(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return i.default=t,Object.freeze(i)}const n=o(h),r=o(d),l=r.Root,x=n.forwardRef(({className:t,...i},e)=>c.jsx(r.List,{ref:e,className:s.cn("richtext-inline-flex richtext-h-10 richtext-items-center richtext-justify-center richtext-rounded-md richtext-bg-muted richtext-p-1 richtext-text-muted-foreground",t),...i}));x.displayName=r.List.displayName;const f=n.forwardRef(({className:t,...i},e)=>c.jsx(r.Trigger,{ref:e,className:s.cn("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-sm richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-all focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=active]:richtext-bg-background data-[state=active]:richtext-text-foreground data-[state=active]:richtext-shadow-sm",t),...i}));f.displayName=r.Trigger.displayName;const u=n.forwardRef(({className:t,...i},e)=>c.jsx(r.Content,{ref:e,className:s.cn("richtext-mt-2 richtext-ring-offset-background focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1",t),...i}));u.displayName=r.Content.displayName;exports.Tabs=l;exports.TabsContent=u;exports.TabsList=x;exports.TabsTrigger=f;
1
+ "use strict";const c=require("react/jsx-runtime"),h=require("react"),d=require("@radix-ui/react-tabs"),s=require("./index-CX4pNJlH.cjs");function o(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return i.default=t,Object.freeze(i)}const n=o(h),r=o(d),l=r.Root,x=n.forwardRef(({className:t,...i},e)=>c.jsx(r.List,{ref:e,className:s.cn("richtext-inline-flex richtext-h-10 richtext-items-center richtext-justify-center richtext-rounded-md richtext-bg-muted richtext-p-1 richtext-text-muted-foreground",t),...i}));x.displayName=r.List.displayName;const f=n.forwardRef(({className:t,...i},e)=>c.jsx(r.Trigger,{ref:e,className:s.cn("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-sm richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-all focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=active]:richtext-bg-background data-[state=active]:richtext-text-foreground data-[state=active]:richtext-shadow-sm",t),...i}));f.displayName=r.Trigger.displayName;const u=n.forwardRef(({className:t,...i},e)=>c.jsx(r.Content,{ref:e,className:s.cn("richtext-mt-2 richtext-ring-offset-background focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1",t),...i}));u.displayName=r.Content.displayName;exports.Tabs=l;exports.TabsContent=u;exports.TabsList=x;exports.TabsTrigger=f;
@@ -1,7 +1,7 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
3
  import * as t from "@radix-ui/react-tabs";
4
- import { c as a } from "./index-C3zg3DPB.js";
4
+ import { c as a } from "./index-D9JOHlso.js";
5
5
  const d = t.Root, o = c.forwardRef(({ className: e, ...i }, r) => /* @__PURE__ */ s(
6
6
  t.List,
7
7
  {
@@ -1,6 +1,6 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
- import { c as o } from "./index-C3zg3DPB.js";
3
+ import { c as o } from "./index-D9JOHlso.js";
4
4
  const x = c.forwardRef(
5
5
  ({ className: t, ...e }, r) => /* @__PURE__ */ i(
6
6
  "textarea",
@@ -1 +1 @@
1
- "use strict";const n=require("react/jsx-runtime"),o=require("react"),a=require("./index-C838s-or.cjs");function s(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const x=s(o),c=x.forwardRef(({className:e,...r},t)=>n.jsx("textarea",{ref:t,className:a.cn("richtext-flex richtext-min-h-[80px] richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",e),...r}));c.displayName="Textarea";exports.Textarea=c;
1
+ "use strict";const n=require("react/jsx-runtime"),o=require("react"),a=require("./index-CX4pNJlH.cjs");function s(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const x=s(o),c=x.forwardRef(({className:e,...r},t)=>n.jsx("textarea",{ref:t,className:a.cn("richtext-flex richtext-min-h-[80px] richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",e),...r}));c.displayName="Textarea";exports.Textarea=c;
@@ -357,6 +357,11 @@ export declare const THEME: {
357
357
  };
358
358
  export type ThemeType = keyof typeof THEME;
359
359
  export type ThemeColorType = keyof typeof THEME.light;
360
+ export declare function useTheme(): {
361
+ theme: "light" | "dark";
362
+ color: "default" | "blue" | "green" | "orange" | "red" | "violet" | "yellow" | "rose";
363
+ borderRadius: string;
364
+ };
360
365
  export declare const themeActions: {
361
366
  setTheme: (theme: ThemeType) => void;
362
367
  setColor: (color: ThemeColorType) => void;
package/lib/theme.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./events.constant-DQYeJpu5.cjs"),e={light:{default:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"240 5.9% 10%","primary-foreground":"0 0% 98%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"240 5.9% 10%"},red:{radius:"0.65rem",background:"0 0% 100%",foreground:"0 0% 3.9%",card:"0 0% 100%","card-foreground":"0 0% 3.9%",popover:"0 0% 100%","popover-foreground":"0 0% 3.9%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 96.1%","secondary-foreground":"0 0% 9%",muted:"0 0% 96.1%","muted-foreground":"0 0% 45.1%",accent:"0 0% 96.1%","accent-foreground":"0 0% 9%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"0 0% 89.8%",input:"0 0% 89.8%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"0 0% 100%",foreground:"222.2 84% 4.9%",card:"0 0% 100%","card-foreground":"222.2 84% 4.9%",popover:"0 0% 100%","popover-foreground":"222.2 84% 4.9%",primary:"221.2 83.2% 53.3%","primary-foreground":"210 40% 98%",secondary:"210 40% 96.1%","secondary-foreground":"222.2 47.4% 11.2%",muted:"210 40% 96.1%","muted-foreground":"215.4 16.3% 46.9%",accent:"210 40% 96.1%","accent-foreground":"222.2 47.4% 11.2%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 40% 98%",border:"214.3 31.8% 91.4%",input:"214.3 31.8% 91.4%",ring:"221.2 83.2% 53.3%"},green:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"142.1 76.2% 36.3%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"142.1 76.2% 36.3%"},orange:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"24.6 95% 53.1%","primary-foreground":"60 9.1% 97.8%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%"},rose:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"0 0% 100%",foreground:"224 71.4% 4.1%",card:"0 0% 100%","card-foreground":"224 71.4% 4.1%",popover:"0 0% 100%","popover-foreground":"224 71.4% 4.1%",primary:"262.1 83.3% 57.8%","primary-foreground":"210 20% 98%",secondary:"220 14.3% 95.9%","secondary-foreground":"220.9 39.3% 11%",muted:"220 14.3% 95.9%","muted-foreground":"220 8.9% 46.1%",accent:"220 14.3% 95.9%","accent-foreground":"220.9 39.3% 11%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 20% 98%",border:"220 13% 91%",input:"220 13% 91%",ring:"262.1 83.3% 57.8%"},yellow:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%",ring:"20 14.3% 4.1"}},dark:{default:{radius:"0.65rem",background:"240 10% 3.9%",foreground:"0 0% 98%",card:"240 10% 3.9%","card-foreground":"0 0% 98%",popover:"240 10% 3.9%","popover-foreground":"0 0% 98%",primary:"0 0% 98%","primary-foreground":"240 5.9% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"240 3.7% 15.9%","muted-foreground":"240 5% 64.9%",accent:"240 3.7% 15.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"240 4.9% 83.9%"},red:{radius:"0.65rem",background:"0 0% 3.9%",foreground:"0 0% 98%",card:"0 0% 3.9%","card-foreground":"0 0% 98%",popover:"0 0% 3.9%","popover-foreground":"0 0% 98%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 14.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 14.9%","muted-foreground":"0 0% 63.9%",accent:"0 0% 14.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"0 0% 14.9%",input:"0 0% 14.9%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"222.2 84% 4.9%",foreground:"210 40% 98%",card:"222.2 84% 4.9%","card-foreground":"210 40% 98%",popover:"222.2 84% 4.9%","popover-foreground":"210 40% 98%",primary:"217.2 91.2% 59.8%","primary-foreground":"222.2 47.4% 11.2%",secondary:"217.2 32.6% 17.5%","secondary-foreground":"210 40% 98%",muted:"217.2 32.6% 17.5%","muted-foreground":"215 20.2% 65.1%",accent:"217.2 32.6% 17.5%","accent-foreground":"210 40% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 40% 98%",border:"217.2 32.6% 17.5%",input:"217.2 32.6% 17.5%",ring:"224.3 76.3% 48%"},green:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"142.1 70.6% 45.3%","primary-foreground":"144.9 80.4% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"142.4 71.8% 29.2%"},orange:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"20.5 90.2% 48.2%","primary-foreground":"60 9.1% 97.8%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 72.2% 50.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"20.5 90.2% 48.2%"},rose:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"224 71.4% 4.1%",foreground:"210 20% 98%",card:"224 71.4% 4.1%","card-foreground":"210 20% 98%",popover:"224 71.4% 4.1%","popover-foreground":"210 20% 98%",primary:"263.4 70% 50.4%","primary-foreground":"210 20% 98%",secondary:"215 27.9% 16.9%","secondary-foreground":"210 20% 98%",muted:"215 27.9% 16.9%","muted-foreground":"217.9 10.6% 64.9%",accent:"215 27.9% 16.9%","accent-foreground":"210 20% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 20% 98%",border:"215 27.9% 16.9%",input:"215 27.9% 16.9%",ring:"263.4 70% 50.4%"},yellow:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 62.8% 30.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"35.5 91.7% 32.9%"}}},d={setTheme:o=>{r.dispatchEvent(r.EVENTS.CHANGE_THEME,o)},setColor:o=>{r.dispatchEvent(r.EVENTS.CHANGE_COLOR,o)},setBorderRadius:o=>{r.dispatchEvent(r.EVENTS.CHANGE_BORDER_RADIUS,o)}};exports.THEME=e;exports.themeActions=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./react-BEoMZB61.cjs"),c={light:{default:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"240 5.9% 10%","primary-foreground":"0 0% 98%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"240 5.9% 10%"},red:{radius:"0.65rem",background:"0 0% 100%",foreground:"0 0% 3.9%",card:"0 0% 100%","card-foreground":"0 0% 3.9%",popover:"0 0% 100%","popover-foreground":"0 0% 3.9%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 96.1%","secondary-foreground":"0 0% 9%",muted:"0 0% 96.1%","muted-foreground":"0 0% 45.1%",accent:"0 0% 96.1%","accent-foreground":"0 0% 9%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"0 0% 89.8%",input:"0 0% 89.8%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"0 0% 100%",foreground:"222.2 84% 4.9%",card:"0 0% 100%","card-foreground":"222.2 84% 4.9%",popover:"0 0% 100%","popover-foreground":"222.2 84% 4.9%",primary:"221.2 83.2% 53.3%","primary-foreground":"210 40% 98%",secondary:"210 40% 96.1%","secondary-foreground":"222.2 47.4% 11.2%",muted:"210 40% 96.1%","muted-foreground":"215.4 16.3% 46.9%",accent:"210 40% 96.1%","accent-foreground":"222.2 47.4% 11.2%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 40% 98%",border:"214.3 31.8% 91.4%",input:"214.3 31.8% 91.4%",ring:"221.2 83.2% 53.3%"},green:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"142.1 76.2% 36.3%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"142.1 76.2% 36.3%"},orange:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"24.6 95% 53.1%","primary-foreground":"60 9.1% 97.8%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%"},rose:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"0 0% 100%",foreground:"224 71.4% 4.1%",card:"0 0% 100%","card-foreground":"224 71.4% 4.1%",popover:"0 0% 100%","popover-foreground":"224 71.4% 4.1%",primary:"262.1 83.3% 57.8%","primary-foreground":"210 20% 98%",secondary:"220 14.3% 95.9%","secondary-foreground":"220.9 39.3% 11%",muted:"220 14.3% 95.9%","muted-foreground":"220 8.9% 46.1%",accent:"220 14.3% 95.9%","accent-foreground":"220.9 39.3% 11%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 20% 98%",border:"220 13% 91%",input:"220 13% 91%",ring:"262.1 83.3% 57.8%"},yellow:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%",ring:"20 14.3% 4.1"}},dark:{default:{radius:"0.65rem",background:"240 10% 3.9%",foreground:"0 0% 98%",card:"240 10% 3.9%","card-foreground":"0 0% 98%",popover:"240 10% 3.9%","popover-foreground":"0 0% 98%",primary:"0 0% 98%","primary-foreground":"240 5.9% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"240 3.7% 15.9%","muted-foreground":"240 5% 64.9%",accent:"240 3.7% 15.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"240 4.9% 83.9%"},red:{radius:"0.65rem",background:"0 0% 3.9%",foreground:"0 0% 98%",card:"0 0% 3.9%","card-foreground":"0 0% 98%",popover:"0 0% 3.9%","popover-foreground":"0 0% 98%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 14.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 14.9%","muted-foreground":"0 0% 63.9%",accent:"0 0% 14.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"0 0% 14.9%",input:"0 0% 14.9%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"222.2 84% 4.9%",foreground:"210 40% 98%",card:"222.2 84% 4.9%","card-foreground":"210 40% 98%",popover:"222.2 84% 4.9%","popover-foreground":"210 40% 98%",primary:"217.2 91.2% 59.8%","primary-foreground":"222.2 47.4% 11.2%",secondary:"217.2 32.6% 17.5%","secondary-foreground":"210 40% 98%",muted:"217.2 32.6% 17.5%","muted-foreground":"215 20.2% 65.1%",accent:"217.2 32.6% 17.5%","accent-foreground":"210 40% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 40% 98%",border:"217.2 32.6% 17.5%",input:"217.2 32.6% 17.5%",ring:"224.3 76.3% 48%"},green:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"142.1 70.6% 45.3%","primary-foreground":"144.9 80.4% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"142.4 71.8% 29.2%"},orange:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"20.5 90.2% 48.2%","primary-foreground":"60 9.1% 97.8%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 72.2% 50.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"20.5 90.2% 48.2%"},rose:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"224 71.4% 4.1%",foreground:"210 20% 98%",card:"224 71.4% 4.1%","card-foreground":"210 20% 98%",popover:"224 71.4% 4.1%","popover-foreground":"210 20% 98%",primary:"263.4 70% 50.4%","primary-foreground":"210 20% 98%",secondary:"215 27.9% 16.9%","secondary-foreground":"210 20% 98%",muted:"215 27.9% 16.9%","muted-foreground":"217.9 10.6% 64.9%",accent:"215 27.9% 16.9%","accent-foreground":"210 20% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 20% 98%",border:"215 27.9% 16.9%",input:"215 27.9% 16.9%",ring:"263.4 70% 50.4%"},yellow:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 62.8% 30.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"35.5 91.7% 32.9%"}}},o=n.create(r=>({theme:"light",color:"default",borderRadius:"0.65rem",setTheme:e=>{r(()=>({theme:e}))},setColor:e=>{r(()=>({color:e}))},setBorderRadius:e=>{r(()=>({borderRadius:e}))}}));function t(){const r=o(d=>d.theme),e=o(d=>d.color),u=o(d=>d.borderRadius);return{theme:r,color:e,borderRadius:u}}const a={setTheme:r=>{o.getState().setTheme(r)},setColor:r=>{o.getState().setColor(r)},setBorderRadius:r=>{o.getState().setBorderRadius(r)}};exports.THEME=c;exports.themeActions=a;exports.useTheme=t;
package/lib/theme.js CHANGED
@@ -1,5 +1,5 @@
1
- import { d as o, E as e } from "./events.constant-wrlJ_7JZ.js";
2
- const n = {
1
+ import { c as n } from "./react-c9FSfB30.js";
2
+ const t = {
3
3
  light: {
4
4
  default: {
5
5
  radius: "0.65rem",
@@ -355,18 +355,47 @@ const n = {
355
355
  ring: "35.5 91.7% 32.9%"
356
356
  }
357
357
  }
358
- }, u = {
358
+ }, e = n((r) => ({
359
+ theme: "light",
360
+ color: "default",
361
+ borderRadius: "0.65rem",
362
+ setTheme: (o) => {
363
+ r(() => ({
364
+ theme: o
365
+ }));
366
+ },
367
+ setColor: (o) => {
368
+ r(() => ({
369
+ color: o
370
+ }));
371
+ },
372
+ setBorderRadius: (o) => {
373
+ r(() => ({
374
+ borderRadius: o
375
+ }));
376
+ }
377
+ }));
378
+ function a() {
379
+ const r = e((d) => d.theme), o = e((d) => d.color), u = e((d) => d.borderRadius);
380
+ return {
381
+ theme: r,
382
+ color: o,
383
+ borderRadius: u
384
+ };
385
+ }
386
+ const g = {
359
387
  setTheme: (r) => {
360
- o(e.CHANGE_THEME, r);
388
+ e.getState().setTheme(r);
361
389
  },
362
390
  setColor: (r) => {
363
- o(e.CHANGE_COLOR, r);
391
+ e.getState().setColor(r);
364
392
  },
365
393
  setBorderRadius: (r) => {
366
- o(e.CHANGE_BORDER_RADIUS, r);
394
+ e.getState().setBorderRadius(r);
367
395
  }
368
396
  };
369
397
  export {
370
- n as THEME,
371
- u as themeActions
398
+ t as THEME,
399
+ g as themeActions,
400
+ a as useTheme
372
401
  };
@@ -1,4 +1,4 @@
1
- import { N as C, n as L, a2 as W, m as z } from "./index-sVScpCFG.js";
1
+ import { N as C, n as L, a2 as W, m as z } from "./clsx-DmuN0U_8.js";
2
2
  var B = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, H = C.create({
3
3
  name: "image",
4
4
  addOptions() {
@@ -0,0 +1 @@
1
+ "use strict";const T=require("./clsx-CXbNJWDD.cjs");var B=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,H=T.Node3.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",T.mergeAttributes(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,r,a,c,u;const o=(n=(t=e.attrs)==null?void 0:t.src)!=null?n:"",s=(a=(r=e.attrs)==null?void 0:r.alt)!=null?a:"",d=(u=(c=e.attrs)==null?void 0:c.title)!=null?u:"";return d?`![${s}](${o} "${d}")`:`![${s}](${o})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:a,getPos:c,HTMLAttributes:u,editor:o})=>{const s=document.createElement("img");Object.entries(u).forEach(([l,f])=>{if(f!=null)switch(l){case"width":case"height":break;default:s.setAttribute(l,f);break}}),s.src=u.src;const d=new T.ResizableNodeView({element:s,editor:o,node:a,getPos:c,onResize:(l,f)=>{s.style.width=`${l}px`,s.style.height=`${f}px`},onCommit:(l,f)=>{const b=c();b!==void 0&&this.editor.chain().setNodeSelection(b).updateAttributes(this.name,{width:l,height:f}).run()},onUpdate:(l,f,b)=>l.type===a.type,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:r===!0}}),m=d.dom;return m.style.visibility="hidden",m.style.pointerEvents="none",s.onload=()=>{m.style.visibility="",m.style.pointerEvents=""},d}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[T.nodeInputRule({find:B,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),P=H,F=typeof global=="object"&&global&&global.Object===Object&&global,U=typeof self=="object"&&self&&self.Object===Object&&self,_=F||U||Function("return this")(),v=_.Symbol,A=Object.prototype,G=A.hasOwnProperty,V=A.toString,h=v?v.toStringTag:void 0;function D(e){var t=G.call(e,h),n=e[h];try{e[h]=void 0;var r=!0}catch{}var a=V.call(e);return r&&(t?e[h]=n:delete e[h]),a}var X=Object.prototype,q=X.toString;function J(e){return q.call(e)}var K="[object Null]",Q="[object Undefined]",$=v?v.toStringTag:void 0;function N(e){return e==null?e===void 0?Q:K:$&&$ in Object(e)?D(e):J(e)}function k(e){return e!=null&&typeof e=="object"}var Y="[object Symbol]";function Z(e){return typeof e=="symbol"||k(e)&&N(e)==Y}var ee=/\s/;function te(e){for(var t=e.length;t--&&ee.test(e.charAt(t)););return t}var ne=/^\s+/;function re(e){return e&&e.slice(0,te(e)+1).replace(ne,"")}function j(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var R=NaN,ie=/^[-+]0x[0-9a-f]+$/i,ae=/^0b[01]+$/i,oe=/^0o[0-7]+$/i,se=parseInt;function x(e){if(typeof e=="number")return e;if(Z(e))return R;if(j(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=j(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=re(e);var n=ae.test(e);return n||oe.test(e)?se(e.slice(2),n?2:8):ie.test(e)?R:+e}var S=function(){return _.Date.now()},le="Expected a function",ue=Math.max,ce=Math.min;function L(e,t,n){var r,a,c,u,o,s,d=0,m=!1,l=!1,f=!0;if(typeof e!="function")throw new TypeError(le);t=x(t)||0,j(n)&&(m=!!n.leading,l="maxWait"in n,c=l?ue(x(n.maxWait)||0,t):c,f="trailing"in n?!!n.trailing:f);function b(i){var g=r,p=a;return r=a=void 0,d=i,u=e.apply(p,g),u}function M(i){return d=i,o=setTimeout(y,t),m?b(i):u}function C(i){var g=i-s,p=i-d,I=t-g;return l?ce(I,c-p):I}function w(i){var g=i-s,p=i-d;return s===void 0||g>=t||g<0||l&&p>=c}function y(){var i=S();if(w(i))return E(i);o=setTimeout(y,C(i))}function E(i){return o=void 0,f&&r?b(i):(r=a=void 0,u)}function W(){o!==void 0&&clearTimeout(o),d=0,r=s=a=o=void 0}function z(){return o===void 0?u:E(S())}function O(){var i=S(),g=w(i);if(r=arguments,a=this,s=i,g){if(o===void 0)return M(s);if(l)return clearTimeout(o),o=setTimeout(y,t),b(s)}return o===void 0&&(o=setTimeout(y,t)),u}return O.cancel=W,O.flush=z,O}var de="Expected a function";function fe(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(de);return j(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),L(e,t,{leading:r,maxWait:t,trailing:a})}exports.baseGetTag=N;exports.debounce=L;exports.index_default=P;exports.isObjectLike=k;exports.throttle=fe;exports.toNumber=x;