@remarkablejames/editor 0.0.5 → 0.0.6

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 (139) hide show
  1. package/lib/{ActionMenuButton-DBZjUu-F.js → ActionMenuButton-CpmEfz31.js} +1 -1
  2. package/lib/{ActionMenuButton-C6jGtl3k.cjs → ActionMenuButton-NfiUDE60.cjs} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.js +2 -2
  5. package/lib/Blockquote.cjs +1 -1
  6. package/lib/Blockquote.js +1 -1
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +1 -1
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +1 -1
  11. package/lib/Callout.cjs +1 -1
  12. package/lib/Callout.js +15 -16
  13. package/lib/Clear.cjs +1 -1
  14. package/lib/Clear.js +1 -1
  15. package/lib/Code.cjs +1 -1
  16. package/lib/Code.js +1 -1
  17. package/lib/CodeBlock.cjs +1 -1
  18. package/lib/CodeBlock.js +31 -32
  19. package/lib/CodeView.cjs +1 -1
  20. package/lib/CodeView.js +1 -1
  21. package/lib/Color.cjs +1 -1
  22. package/lib/Color.js +2 -2
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +1 -1
  25. package/lib/{Drawer-DTCwtJEs.js → Drawer-CayP4Ww4.js} +13 -13
  26. package/lib/{Drawer-B031ezmA.cjs → Drawer-DlgdaO_B.cjs} +1 -1
  27. package/lib/Drawer.cjs +1 -1
  28. package/lib/Drawer.js +2 -2
  29. package/lib/Emoji.cjs +1 -1
  30. package/lib/Emoji.js +8 -8
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +36 -36
  33. package/lib/ExportPdf.cjs +1 -1
  34. package/lib/ExportPdf.js +1 -1
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +1 -1
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +3 -3
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +3 -3
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +8 -8
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +2 -2
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +1 -1
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +1 -1
  49. package/lib/{Iframe-D-UYBxiv.js → Iframe-C6Sb97KS.js} +5 -5
  50. package/lib/{Iframe-BUK2pkOL.cjs → Iframe-CANdxSpV.cjs} +1 -1
  51. package/lib/Iframe.cjs +1 -1
  52. package/lib/Iframe.js +2 -2
  53. package/lib/Image.cjs +1 -1
  54. package/lib/Image.js +3 -3
  55. package/lib/ImageGif.cjs +1 -1
  56. package/lib/ImageGif.js +19 -19
  57. package/lib/ImportWord.cjs +1 -1
  58. package/lib/ImportWord.js +12 -12
  59. package/lib/{Indent-Bvt-Qwar.js → Indent-CcFe8py3.js} +1 -1
  60. package/lib/{Indent-_y6N8MIQ.cjs → Indent-DuB2U6Cs.cjs} +1 -1
  61. package/lib/Indent.cjs +1 -1
  62. package/lib/Indent.js +1 -1
  63. package/lib/Italic.cjs +1 -1
  64. package/lib/Italic.js +1 -1
  65. package/lib/{Katex-CJDtvu-v.js → Katex-Bp6AnIUF.js} +3 -4
  66. package/lib/Katex-DFU1unCm.cjs +4 -0
  67. package/lib/Katex.cjs +1 -1
  68. package/lib/Katex.js +1 -1
  69. package/lib/LineHeight.cjs +1 -1
  70. package/lib/LineHeight.js +2 -2
  71. package/lib/Link.cjs +1 -1
  72. package/lib/Link.js +1 -1
  73. package/lib/{LinkEditBlock-Cdqwj_NU.js → LinkEditBlock-BiHumIJR.js} +7 -7
  74. package/lib/{LinkEditBlock-ewTApx0K.cjs → LinkEditBlock-C2zX0WVK.cjs} +1 -1
  75. package/lib/Mermaid-B8lQSOGn.cjs +2 -0
  76. package/lib/{Mermaid-CnMYVX1P.js → Mermaid-Dlx0XTJj.js} +23 -24
  77. package/lib/Mermaid.cjs +1 -1
  78. package/lib/Mermaid.js +1 -1
  79. package/lib/MoreMark.cjs +1 -1
  80. package/lib/MoreMark.js +2 -2
  81. package/lib/OrderedList.cjs +1 -1
  82. package/lib/OrderedList.js +1 -1
  83. package/lib/PaywallSeparator.cjs +1 -0
  84. package/lib/PaywallSeparator.js +140 -0
  85. package/lib/SearchAndReplace.cjs +1 -1
  86. package/lib/SearchAndReplace.js +7 -7
  87. package/lib/SlashCommand.cjs +1 -1
  88. package/lib/SlashCommand.js +2 -2
  89. package/lib/SlashCommandNodeView-BfWNWGRr.cjs +1 -0
  90. package/lib/{SlashCommandNodeView-DcoLvt_6.js → SlashCommandNodeView-DzmsYaNc.js} +73 -57
  91. package/lib/Strike.cjs +1 -1
  92. package/lib/Strike.js +1 -1
  93. package/lib/{Table-B8CHl8jK.cjs → Table-BfM6ywrZ.cjs} +1 -1
  94. package/lib/{Table-Cu12PvQ_.js → Table-IH34r4jd.js} +2 -2
  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 +1 -1
  99. package/lib/TextAlign.cjs +1 -1
  100. package/lib/TextAlign.js +2 -2
  101. package/lib/TextDirection.cjs +1 -1
  102. package/lib/TextDirection.js +2 -2
  103. package/lib/TextUnderline.cjs +1 -1
  104. package/lib/TextUnderline.js +1 -1
  105. package/lib/{Twitter-CrX4XY1j.js → Twitter-FVQKPaq6.js} +7 -7
  106. package/lib/{Twitter-6HYP_upt.cjs → Twitter-axcoCgD7.cjs} +1 -1
  107. package/lib/Twitter.cjs +1 -1
  108. package/lib/Twitter.js +1 -1
  109. package/lib/Video.cjs +1 -1
  110. package/lib/Video.js +3 -3
  111. package/lib/bubble.cjs +3 -3
  112. package/lib/bubble.js +81 -83
  113. package/lib/{dropdown-menu-CVwXaR3Z.js → dropdown-menu-Ce2TorkG.js} +1 -1
  114. package/lib/{dropdown-menu-XIrQk3jr.cjs → dropdown-menu-DirUyRAI.cjs} +1 -1
  115. package/lib/extensions/PaywallSeparator/PaywallSeparator.d.ts +35 -0
  116. package/lib/extensions/PaywallSeparator/components/PaywallIcon.d.ts +2 -0
  117. package/lib/extensions/PaywallSeparator/components/PaywallSeparatorView.d.ts +17 -0
  118. package/lib/extensions/PaywallSeparator/components/RichTextPaywallSeparator.d.ts +1 -0
  119. package/lib/extensions/PaywallSeparator/components/index.d.ts +2 -0
  120. package/lib/extensions/PaywallSeparator/index.d.ts +1 -0
  121. package/lib/index-BynXHtjJ.cjs +28 -0
  122. package/lib/{index-B0d-u29p.js → index-CnKgiZFQ.js} +1201 -1050
  123. package/lib/index.cjs +1 -1
  124. package/lib/index.js +27 -27
  125. package/lib/{popover-0syCfWYi.cjs → popover-BdLwAlrM.cjs} +1 -1
  126. package/lib/{popover-DDT8YRht.js → popover-BzJyaFvy.js} +1 -1
  127. package/lib/{separator-D8lOAf8f.cjs → separator-CoQaQmFK.cjs} +1 -1
  128. package/lib/{separator-DRGTEiX4.js → separator-D-fyzbfx.js} +14 -14
  129. package/lib/style.css +1 -1
  130. package/lib/types.d.ts +5 -5
  131. package/package.json +14 -1
  132. package/lib/Katex-bJXkt-VP.cjs +0 -4
  133. package/lib/Mermaid-Dwz9o-yM.cjs +0 -2
  134. package/lib/SlashCommandNodeView-BMgQJ4xT.cjs +0 -1
  135. package/lib/index-De9MZVWQ.cjs +0 -28
  136. package/lib/select-D9wQw2qB.js +0 -120
  137. package/lib/select-DTNz0ZeE.cjs +0 -1
  138. package/lib/textarea-DfVzbMr5.js +0 -20
  139. package/lib/textarea-DpkwluT0.cjs +0 -1
package/lib/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),q=require("./clsx-CXbNJWDD.cjs"),l=require("react"),a=require("./index-De9MZVWQ.cjs"),_=require("@radix-ui/react-toast"),$=require("lucide-react"),f=require("./theme.cjs");function j(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const x=j(l),s=j(_),V=s.Provider,w=x.forwardRef(({className:t,...r},e)=>i.jsx(s.Viewport,{ref:e,className:a.cn("richtext-fixed richtext-top-0 richtext-z-[100] richtext-flex richtext-max-h-screen richtext-w-full richtext-flex-col-reverse richtext-p-4 sm:richtext-bottom-0 sm:richtext-right-0 sm:richtext-top-auto sm:richtext-flex-col md:richtext-max-w-[420px]",t),...r}));w.displayName=s.Viewport.displayName;const z=a.cva("richtext-group richtext-pointer-events-auto richtext-relative richtext-flex richtext-w-full richtext-items-center richtext-justify-between richtext-space-x-4 richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-p-6 richtext-pr-8 richtext-shadow-lg richtext-transition-all data-[swipe=cancel]:richtext-translate-x-0 data-[swipe=end]:richtext-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:richtext-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:richtext-transition-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[swipe=end]:richtext-animate-out data-[state=closed]:richtext-fade-out-80 data-[state=closed]:richtext-slide-out-to-right-full data-[state=open]:richtext-slide-in-from-top-full data-[state=open]:sm:richtext-slide-in-from-bottom-full",{variants:{variant:{default:"richtext-border richtext-bg-background richtext-text-foreground",destructive:"richtext-destructive richtext-group richtext-border-destructive richtext-bg-destructive richtext-text-destructive-foreground"}},defaultVariants:{variant:"default"}}),N=x.forwardRef(({className:t,variant:r,...e},n)=>i.jsx(s.Root,{ref:n,className:a.cn(z({variant:r}),t),...e}));N.displayName=s.Root.displayName;const H=x.forwardRef(({className:t,...r},e)=>i.jsx(s.Action,{ref:e,className:a.cn("richtext-inline-flex richtext-h-8 richtext-shrink-0 richtext-items-center richtext-justify-center richtext-rounded-md !richtext-border richtext-bg-transparent richtext-px-3 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-secondary focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 group-[.destructive]:richtext-border-muted/40 group-[.destructive]:hover:richtext-border-destructive/30 group-[.destructive]:hover:richtext-bg-destructive group-[.destructive]:hover:richtext-text-destructive-foreground group-[.destructive]:focus:richtext-ring-destructive",t),...r}));H.displayName=s.Action.displayName;const T=x.forwardRef(({className:t,...r},e)=>i.jsx(s.Close,{ref:e,className:a.cn("richtext-absolute richtext-right-2 richtext-top-2 richtext-rounded-md richtext-p-1 richtext-text-foreground/50 richtext-opacity-0 richtext-transition-opacity hover:richtext-text-foreground focus:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 group-hover:richtext-opacity-100 group-[.destructive]:richtext-text-red-300 group-[.destructive]:hover:richtext-text-red-50 group-[.destructive]:focus:richtext-ring-red-400 group-[.destructive]:focus:richtext-ring-offset-red-600",t),"toast-close":"",...r,children:i.jsx($.X,{className:"richtext-h-4 richtext-w-4"})}));T.displayName=s.Close.displayName;const E=x.forwardRef(({className:t,...r},e)=>i.jsx(s.Title,{ref:e,className:a.cn("richtext-text-sm richtext-font-semibold",t),...r}));E.displayName=s.Title.displayName;const R=x.forwardRef(({className:t,...r},e)=>i.jsx(s.Description,{ref:e,className:a.cn("richtext-text-sm richtext-opacity-90",t),...r}));R.displayName=s.Description.displayName;function L(){const{toasts:t}=a.useToast();return i.jsxs(V,{children:[t.map(({id:r,title:e,description:n,action:o,...u})=>i.jsxs(N,{...u,children:[i.jsxs("div",{className:"richtext-grid richtext-gap-1",children:[e&&i.jsx(E,{children:e}),n&&i.jsx(R,{children:n})]}),o,i.jsx(T,{})]},r)),i.jsx(w,{})]})}const F=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),q=require("./clsx-CXbNJWDD.cjs"),l=require("react"),a=require("./index-BynXHtjJ.cjs"),_=require("@radix-ui/react-toast"),$=require("lucide-react"),f=require("./theme.cjs");function j(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const x=j(l),s=j(_),V=s.Provider,w=x.forwardRef(({className:t,...r},e)=>i.jsx(s.Viewport,{ref:e,className:a.cn("richtext-fixed richtext-top-0 richtext-z-[100] richtext-flex richtext-max-h-screen richtext-w-full richtext-flex-col-reverse richtext-p-4 sm:richtext-bottom-0 sm:richtext-right-0 sm:richtext-top-auto sm:richtext-flex-col md:richtext-max-w-[420px]",t),...r}));w.displayName=s.Viewport.displayName;const z=a.cva("richtext-group richtext-pointer-events-auto richtext-relative richtext-flex richtext-w-full richtext-items-center richtext-justify-between richtext-space-x-4 richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-p-6 richtext-pr-8 richtext-shadow-lg richtext-transition-all data-[swipe=cancel]:richtext-translate-x-0 data-[swipe=end]:richtext-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:richtext-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:richtext-transition-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[swipe=end]:richtext-animate-out data-[state=closed]:richtext-fade-out-80 data-[state=closed]:richtext-slide-out-to-right-full data-[state=open]:richtext-slide-in-from-top-full data-[state=open]:sm:richtext-slide-in-from-bottom-full",{variants:{variant:{default:"richtext-border richtext-bg-background richtext-text-foreground",destructive:"richtext-destructive richtext-group richtext-border-destructive richtext-bg-destructive richtext-text-destructive-foreground"}},defaultVariants:{variant:"default"}}),N=x.forwardRef(({className:t,variant:r,...e},n)=>i.jsx(s.Root,{ref:n,className:a.cn(z({variant:r}),t),...e}));N.displayName=s.Root.displayName;const H=x.forwardRef(({className:t,...r},e)=>i.jsx(s.Action,{ref:e,className:a.cn("richtext-inline-flex richtext-h-8 richtext-shrink-0 richtext-items-center richtext-justify-center richtext-rounded-md !richtext-border richtext-bg-transparent richtext-px-3 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-secondary focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 group-[.destructive]:richtext-border-muted/40 group-[.destructive]:hover:richtext-border-destructive/30 group-[.destructive]:hover:richtext-bg-destructive group-[.destructive]:hover:richtext-text-destructive-foreground group-[.destructive]:focus:richtext-ring-destructive",t),...r}));H.displayName=s.Action.displayName;const T=x.forwardRef(({className:t,...r},e)=>i.jsx(s.Close,{ref:e,className:a.cn("richtext-absolute richtext-right-2 richtext-top-2 richtext-rounded-md richtext-p-1 richtext-text-foreground/50 richtext-opacity-0 richtext-transition-opacity hover:richtext-text-foreground focus:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 group-hover:richtext-opacity-100 group-[.destructive]:richtext-text-red-300 group-[.destructive]:hover:richtext-text-red-50 group-[.destructive]:focus:richtext-ring-red-400 group-[.destructive]:focus:richtext-ring-offset-red-600",t),"toast-close":"",...r,children:i.jsx($.X,{className:"richtext-h-4 richtext-w-4"})}));T.displayName=s.Close.displayName;const E=x.forwardRef(({className:t,...r},e)=>i.jsx(s.Title,{ref:e,className:a.cn("richtext-text-sm richtext-font-semibold",t),...r}));E.displayName=s.Title.displayName;const R=x.forwardRef(({className:t,...r},e)=>i.jsx(s.Description,{ref:e,className:a.cn("richtext-text-sm richtext-opacity-90",t),...r}));R.displayName=s.Description.displayName;function L(){const{toasts:t}=a.useToast();return i.jsxs(V,{children:[t.map(({id:r,title:e,description:n,action:o,...u})=>i.jsxs(N,{...u,children:[i.jsxs("div",{className:"richtext-grid richtext-gap-1",children:[e&&i.jsx(E,{children:e}),n&&i.jsx(R,{children:n})]}),o,i.jsx(T,{})]},r)),i.jsx(w,{})]})}const F=`
2
2
  .remarkablejames-editor {
3
3
  button,
4
4
  input:where([type=button]),
package/lib/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { jsx as i, jsxs as f, Fragment as m } from "react/jsx-runtime";
2
- import { K as $ } from "./clsx-BUPZHhq3.js";
2
+ import { K as O } from "./clsx-BUPZHhq3.js";
3
3
  import * as u from "react";
4
4
  import { useEffect as x, useId as z } from "react";
5
- import { c as l, O as H, r as L, P as Q, R as _, Q as I, S as K } from "./index-B0d-u29p.js";
5
+ import { c as l, W as H, w as L, X as _, Y as Q, Z as Y, _ as I } from "./index-CnKgiZFQ.js";
6
6
  import * as c from "@radix-ui/react-toast";
7
- import { X as Y } from "lucide-react";
7
+ import { X as K } from "lucide-react";
8
8
  import { useTheme as q, THEME as y } from "./theme.js";
9
9
  const B = c.Provider, T = u.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ i(
10
10
  c.Viewport,
@@ -62,11 +62,11 @@ const E = u.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ i(
62
62
  ),
63
63
  "toast-close": "",
64
64
  ...r,
65
- children: /* @__PURE__ */ i(Y, { className: "richtext-h-4 richtext-w-4" })
65
+ children: /* @__PURE__ */ i(K, { className: "richtext-h-4 richtext-w-4" })
66
66
  }
67
67
  ));
68
68
  E.displayName = c.Close.displayName;
69
- const S = u.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ i(
69
+ const C = u.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ i(
70
70
  c.Title,
71
71
  {
72
72
  ref: e,
@@ -74,8 +74,8 @@ const S = u.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ i(
74
74
  ...r
75
75
  }
76
76
  ));
77
- S.displayName = c.Title.displayName;
78
- const C = u.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ i(
77
+ C.displayName = c.Title.displayName;
78
+ const S = u.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ i(
79
79
  c.Description,
80
80
  {
81
81
  ref: e,
@@ -83,14 +83,14 @@ const C = u.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ i(
83
83
  ...r
84
84
  }
85
85
  ));
86
- C.displayName = c.Description.displayName;
86
+ S.displayName = c.Description.displayName;
87
87
  function X() {
88
88
  const { toasts: t } = L();
89
89
  return /* @__PURE__ */ f(B, { children: [
90
90
  t.map(({ id: r, title: e, description: n, action: o, ...s }) => /* @__PURE__ */ f(R, { ...s, children: [
91
91
  /* @__PURE__ */ f("div", { className: "richtext-grid richtext-gap-1", children: [
92
- e && /* @__PURE__ */ i(S, { children: e }),
93
- n && /* @__PURE__ */ i(C, { children: n })
92
+ e && /* @__PURE__ */ i(C, { children: e }),
93
+ n && /* @__PURE__ */ i(S, { children: n })
94
94
  ] }),
95
95
  o,
96
96
  /* @__PURE__ */ i(E, {})
@@ -98,7 +98,7 @@ function X() {
98
98
  /* @__PURE__ */ i(T, {})
99
99
  ] });
100
100
  }
101
- const G = `
101
+ const Z = `
102
102
  .remarkablejames-editor {
103
103
  button,
104
104
  input:where([type=button]),
@@ -206,8 +206,8 @@ const G = `
206
206
  }
207
207
  }
208
208
  `;
209
- function J({ editor: t }) {
210
- const r = Q();
209
+ function G({ editor: t }) {
210
+ const r = _();
211
211
  x(() => {
212
212
  r(t == null ? void 0 : t.isEditable);
213
213
  }, [t == null ? void 0 : t.isEditable]);
@@ -218,8 +218,8 @@ function J({ editor: t }) {
218
218
  t && t.off("update", e);
219
219
  }), [t]), /* @__PURE__ */ i(m, {});
220
220
  }
221
- const w = "data-rc-order", N = "data-rc-priority", U = "rc-util-key", p = /* @__PURE__ */ new Map();
222
- function Z(t, r) {
221
+ const w = "data-rc-order", N = "data-rc-priority", J = "rc-util-key", p = /* @__PURE__ */ new Map();
222
+ function U(t, r) {
223
223
  if (!t)
224
224
  return !1;
225
225
  if (t.contains)
@@ -233,7 +233,7 @@ function Z(t, r) {
233
233
  return !1;
234
234
  }
235
235
  function j({ mark: t } = {}) {
236
- return t ? t.startsWith("data-") ? t : `data-${t}` : U;
236
+ return t ? t.startsWith("data-") ? t : `data-${t}` : J;
237
237
  }
238
238
  function g(t) {
239
239
  return t.attachTo ? t.attachTo : document.querySelector("head") || document.body;
@@ -249,19 +249,19 @@ function P(t) {
249
249
  function A(t, r = {}) {
250
250
  const { csp: e, prepend: n, priority: o = 0 } = r, s = tt(n), d = s === "prependQueue", a = document.createElement("style");
251
251
  a.setAttribute(w, s), d && o && a.setAttribute(N, `${o}`), e != null && e.nonce && (a.nonce = e == null ? void 0 : e.nonce), a.innerHTML = t;
252
- const h = g(r), { firstChild: O } = h;
252
+ const h = g(r), { firstChild: V } = h;
253
253
  if (n) {
254
254
  if (d) {
255
255
  const b = P(h).filter((v) => {
256
256
  if (!["prepend", "prependQueue"].includes(v.getAttribute(w)))
257
257
  return !1;
258
- const V = Number(v.getAttribute(N) || 0);
259
- return o >= V;
258
+ const $ = Number(v.getAttribute(N) || 0);
259
+ return o >= $;
260
260
  });
261
261
  if (b.length > 0)
262
262
  return h.insertBefore(a, b.at(-1).nextSibling), a;
263
263
  }
264
- O.before(a);
264
+ V.before(a);
265
265
  } else
266
266
  h.append(a);
267
267
  return a;
@@ -276,7 +276,7 @@ function k(t, r = {}) {
276
276
  }
277
277
  function et(t, r) {
278
278
  const e = p.get(t);
279
- if (!e || !Z(document, e)) {
279
+ if (!e || !U(document, e)) {
280
280
  const n = A("", r), { parentNode: o } = n;
281
281
  p.set(t, o), n.remove();
282
282
  }
@@ -320,19 +320,19 @@ function rt() {
320
320
  }
321
321
  function dt({ editor: t, children: r }) {
322
322
  const e = z();
323
- return x(() => (D(G, "react-tiptap-reset"), () => {
323
+ return x(() => (D(Z, "react-tiptap-reset"), () => {
324
324
  k("react-tiptap-reset");
325
325
  }), []), x(() => {
326
326
  t && (t.id = e);
327
- }, [e, t]), t ? /* @__PURE__ */ i("div", { className: "remarkablejames-editor", children: /* @__PURE__ */ i(_, { children: /* @__PURE__ */ f($.Provider, { value: { editor: t }, children: [
328
- /* @__PURE__ */ i(I, { delayDuration: 0, disableHoverableContent: !0, children: r }),
329
- /* @__PURE__ */ i(J, { editor: t }),
330
- /* @__PURE__ */ i(K, {}),
327
+ }, [e, t]), t ? /* @__PURE__ */ i("div", { className: "remarkablejames-editor", children: /* @__PURE__ */ i(Q, { children: /* @__PURE__ */ f(O.Provider, { value: { editor: t }, children: [
328
+ /* @__PURE__ */ i(Y, { delayDuration: 0, disableHoverableContent: !0, children: r }),
329
+ /* @__PURE__ */ i(G, { editor: t }),
330
+ /* @__PURE__ */ i(I, {}),
331
331
  /* @__PURE__ */ i(rt, {}),
332
332
  /* @__PURE__ */ i(X, {})
333
333
  ] }) }) }) : /* @__PURE__ */ i(m, {});
334
334
  }
335
335
  export {
336
336
  dt as RichTextProvider,
337
- I as TooltipProvider
337
+ Y as TooltipProvider
338
338
  };
@@ -1 +1 @@
1
- "use strict";const a=require("react/jsx-runtime"),d=require("@radix-ui/react-popover"),p=require("react"),h=require("./index-De9MZVWQ.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 o=n(d),l=n(p),x=o.Root,m=o.Trigger,c=l.forwardRef(({className:t,align:r="center",sideOffset:e=4,...i},s)=>a.jsx(o.Portal,{children:a.jsx(o.Content,{align:r,"data-richtext-portal":!0,ref:s,sideOffset:e,className:h.cn("richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-border !richtext-border-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",t),...i})}));c.displayName=o.Content.displayName;exports.Popover=x;exports.PopoverContent=c;exports.PopoverTrigger=m;
1
+ "use strict";const a=require("react/jsx-runtime"),d=require("@radix-ui/react-popover"),p=require("react"),h=require("./index-BynXHtjJ.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 o=n(d),l=n(p),x=o.Root,m=o.Trigger,c=l.forwardRef(({className:t,align:r="center",sideOffset:e=4,...i},s)=>a.jsx(o.Portal,{children:a.jsx(o.Content,{align:r,"data-richtext-portal":!0,ref:s,sideOffset:e,className:h.cn("richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-border !richtext-border-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",t),...i})}));c.displayName=o.Content.displayName;exports.Popover=x;exports.PopoverContent=c;exports.PopoverTrigger=m;
@@ -1,7 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import * as t from "@radix-ui/react-popover";
3
3
  import * as c from "react";
4
- import { c as s } from "./index-B0d-u29p.js";
4
+ import { c as s } from "./index-CnKgiZFQ.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 e=require("react/jsx-runtime"),E=require("lucide-react"),n=require("react"),P=require("react-colorful"),j=require("./index-De9MZVWQ.cjs");require("./theme.cjs");const C=require("./index-DgOXAdKt.cjs"),v=require("./popover-0syCfWYi.cjs"),O=require("@radix-ui/react-separator");function N(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 y=N(n),z=N(O);function R(){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 L(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 L("storage",m),L("local-storage",m),[d,b,g]}function q(t){const{t:r}=C.useLocale(),{disabled:c=!1,value:h,onChange:i,colors:f=C.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(R,{}),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,k)=>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-${k}`))},`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(M,{setColor:l})]})})]})}function M({setColor:t}){const{t:r}=C.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(P.HexColorPicker,{color:i,onChange:d=>{x(d)}}),e.jsx(j.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(S,{className:"richtext-my-[10px]"}),e.jsx(j.Button,{className:"richtext-w-full",onClick:d=>{d.preventDefault(),d.stopPropagation(),t(i),h(!1)},children:e.jsx(E.Plus,{size:16})})]})]})}const S=y.forwardRef(({className:t,orientation:r="horizontal",decorative:c=!0,...h},i)=>e.jsx(z.Root,{ref:i,decorative:c,orientation:r,className:j.cn("richtext-shrink-0 richtext-bg-border",r==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",t),...h}));S.displayName=z.Root.displayName;exports.ColorPicker=q;exports.Separator=S;
1
+ "use strict";const e=require("react/jsx-runtime"),E=require("lucide-react"),n=require("react"),P=require("react-colorful"),j=require("./index-BynXHtjJ.cjs");require("./theme.cjs");const v=require("./popover-BdLwAlrM.cjs"),O=require("@radix-ui/react-separator"),C=require("./index-DgOXAdKt.cjs");function N(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 y=N(n),z=N(O);function R(){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 L(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 L("storage",m),L("local-storage",m),[d,b,g]}function q(t){const{t:r}=C.useLocale(),{disabled:c=!1,value:h,onChange:i,colors:f=C.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(R,{}),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,k)=>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-${k}`))},`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(M,{setColor:l})]})})]})}function M({setColor:t}){const{t:r}=C.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(P.HexColorPicker,{color:i,onChange:d=>{x(d)}}),e.jsx(j.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(S,{className:"richtext-my-[10px]"}),e.jsx(j.Button,{className:"richtext-w-full",onClick:d=>{d.preventDefault(),d.stopPropagation(),t(i),h(!1)},children:e.jsx(E.Plus,{size:16})})]})]})}const S=y.forwardRef(({className:t,orientation:r="horizontal",decorative:c=!0,...h},i)=>e.jsx(z.Root,{ref:i,decorative:c,orientation:r,className:j.cn("richtext-shrink-0 richtext-bg-border",r==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",t),...h}));S.displayName=z.Root.displayName;exports.ColorPicker=q;exports.Separator=S;
@@ -3,11 +3,11 @@ import { Plus as k } from "lucide-react";
3
3
  import * as $ from "react";
4
4
  import { useCallback as m, useState as w, useEffect as L, useRef as M, useMemo as B } from "react";
5
5
  import { HexColorPicker as F } from "react-colorful";
6
- import { j as I, B as _, c as T } from "./index-B0d-u29p.js";
6
+ import { j as I, B as _, c as T } from "./index-CnKgiZFQ.js";
7
7
  import "./theme.js";
8
- import { u as N, C as j } from "./index-BGd2HiwP.js";
9
- import { P as z, a as E, b as y } from "./popover-DDT8YRht.js";
10
- import * as R from "@radix-ui/react-separator";
8
+ import { P as N, a as z, b as E } from "./popover-BzJyaFvy.js";
9
+ import * as y from "@radix-ui/react-separator";
10
+ import { u as R, C as j } from "./index-BGd2HiwP.js";
11
11
  function D() {
12
12
  return /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ t(
13
13
  "path",
@@ -102,7 +102,7 @@ function J(e, r, c = {}) {
102
102
  return S("storage", v), S("local-storage", v), [h, b, g];
103
103
  }
104
104
  function X(e) {
105
- const { t: r } = N(), { disabled: c = !1, value: d, onChange: n, colors: u = j, highlight: a } = e, [h, f] = w(!1), b = B(() => {
105
+ const { t: r } = R(), { disabled: c = !1, value: d, onChange: n, colors: u = j, highlight: a } = e, [h, f] = w(!1), b = B(() => {
106
106
  const i = u, l = [];
107
107
  for (let x = 0; x < i.length; x += 10)
108
108
  l.push(i.slice(x, x + 10));
@@ -121,10 +121,10 @@ function X(e) {
121
121
  }
122
122
  /^#([\da-f]{3}){1,2}$/i.test(i) && (n == null || n(i), o(i), f(!1));
123
123
  }
124
- return /* @__PURE__ */ p(z, { modal: !0, onOpenChange: f, open: h, children: [
125
- /* @__PURE__ */ t(E, { asChild: !0, className: "!richtext-p-0", disabled: c, children: e == null ? void 0 : e.children }),
124
+ return /* @__PURE__ */ p(N, { modal: !0, onOpenChange: f, open: h, children: [
125
+ /* @__PURE__ */ t(z, { asChild: !0, className: "!richtext-p-0", disabled: c, children: e == null ? void 0 : e.children }),
126
126
  /* @__PURE__ */ t(
127
- y,
127
+ E,
128
128
  {
129
129
  align: "start",
130
130
  className: "richtext-size-full !richtext-p-2",
@@ -227,15 +227,15 @@ function X(e) {
227
227
  ] });
228
228
  }
229
229
  function Z({ setColor: e }) {
230
- const { t: r } = N(), [c, d] = w(!1), [n, u] = w("#000000"), a = m((h) => {
230
+ const { t: r } = R(), [c, d] = w(!1), [n, u] = w("#000000"), a = m((h) => {
231
231
  u(h);
232
232
  }, []);
233
- return /* @__PURE__ */ p(z, { onOpenChange: d, open: c, children: [
234
- /* @__PURE__ */ t(E, { asChild: !0, children: /* @__PURE__ */ p("div", { className: "richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent", children: [
233
+ return /* @__PURE__ */ p(N, { onOpenChange: d, open: c, children: [
234
+ /* @__PURE__ */ t(z, { asChild: !0, children: /* @__PURE__ */ p("div", { className: "richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent", children: [
235
235
  r("editor.color.more"),
236
236
  "..."
237
237
  ] }) }),
238
- /* @__PURE__ */ p(y, { children: [
238
+ /* @__PURE__ */ p(E, { children: [
239
239
  /* @__PURE__ */ p("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-justify-center", children: [
240
240
  /* @__PURE__ */ t(
241
241
  F,
@@ -273,7 +273,7 @@ function Z({ setColor: e }) {
273
273
  ] });
274
274
  }
275
275
  const O = $.forwardRef(({ className: e, orientation: r = "horizontal", decorative: c = !0, ...d }, n) => /* @__PURE__ */ t(
276
- R.Root,
276
+ y.Root,
277
277
  {
278
278
  ref: n,
279
279
  decorative: c,
@@ -286,7 +286,7 @@ const O = $.forwardRef(({ className: e, orientation: r = "horizontal", decorativ
286
286
  ...d
287
287
  }
288
288
  ));
289
- O.displayName = R.Root.displayName;
289
+ O.displayName = y.Root.displayName;
290
290
  export {
291
291
  X as C,
292
292
  O as S