@remarkablejames/editor 0.0.6 → 0.0.7
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.
- package/README.md +1 -1
- package/lib/ActionMenuButton-D9o3Kwmv.cjs +1 -0
- package/lib/{ActionMenuButton-CpmEfz31.js → ActionMenuButton-nxV91Fqo.js} +10 -9
- package/lib/Attachment.cjs +19 -1
- package/lib/Attachment.js +270 -7
- package/lib/Blockquote.cjs +2 -2
- package/lib/Blockquote.js +12 -13
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +10 -11
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +8 -9
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +45 -40
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +14 -13
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +5 -6
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.js +33 -31
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +8 -9
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +19 -18
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +8 -9
- package/lib/Drawer-Bh-y5bs8.cjs +2 -0
- package/lib/{Drawer-CayP4Ww4.js → Drawer-CF6Z_IA2.js} +36 -30
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +3 -3
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +18 -17
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +37 -32
- package/lib/ExportPdf.cjs +3 -3
- package/lib/ExportPdf.js +13 -14
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +6 -6
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +6 -7
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +14 -15
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +28 -28
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +23 -22
- package/lib/History.cjs +1 -1
- package/lib/History.js +11 -11
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +9 -10
- package/lib/Icon-BvGyfX2j.js +15 -0
- package/lib/Icon-wjwoRc9F.cjs +1 -0
- package/lib/Iframe-BbfZKbPY.cjs +1 -0
- package/lib/{Iframe-C6Sb97KS.js → Iframe-Dfd3LI7b.js} +14 -11
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +3 -3
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +5 -4
- package/lib/ImageCropper-CY1ETEjC.cjs +10 -0
- package/lib/ImageCropper-DrSdjo9x.js +979 -0
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +83 -80
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +37 -35
- package/lib/{Indent-CcFe8py3.js → Indent-CDVF9DWN.js} +30 -31
- package/lib/Indent-Q1VuhSM2.cjs +1 -0
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +11 -12
- package/lib/{Katex-Bp6AnIUF.js → Katex-DqhWWAA-.js} +22 -18
- package/lib/Katex-K1QU2SB2.cjs +4 -0
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +20 -19
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/LinkEditBlock-CBYGLs3J.cjs +5 -0
- package/lib/{LinkEditBlock-BiHumIJR.js → LinkEditBlock-xP0pGVhB.js} +27 -22
- package/lib/Mention.js +3 -3
- package/lib/{Mermaid-Dlx0XTJj.js → Mermaid-BJ6ryVdY.js} +59 -55
- package/lib/Mermaid-D3_nLeOW.cjs +2 -0
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +28 -26
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +10 -11
- package/lib/PaywallSeparator.cjs +1 -1
- package/lib/PaywallSeparator.js +9 -9
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +39 -34
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +5 -5
- package/lib/SlashCommandNodeView-CUJrDQS7.cjs +1 -0
- package/lib/{SlashCommandNodeView-DzmsYaNc.js → SlashCommandNodeView-DS9FqMiY.js} +23 -21
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +11 -12
- package/lib/Table-CV6pUoVf.cjs +5 -0
- package/lib/{Table-IH34r4jd.js → Table-CcG-JNtV.js} +46 -46
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +11 -12
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +27 -26
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +19 -18
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +8 -9
- package/lib/{Twitter-FVQKPaq6.js → Twitter-BIL3o833.js} +19 -15
- package/lib/Twitter-BfSTqPDh.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +2 -2
- package/lib/Video-DAKr90QL.js +231 -0
- package/lib/Video-HAinT0w6.cjs +1 -0
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +5 -4
- package/lib/bubble.cjs +3 -3
- package/lib/bubble.js +112 -101
- package/lib/button-090-I3tp.js +35 -0
- package/lib/button-B4Sz2ZhW.cjs +1 -0
- package/lib/checkbox-BCPsu7yR.cjs +1 -0
- package/lib/checkbox-DiXWHAI0.js +29 -0
- package/lib/{clsx-BUPZHhq3.js → clsx-m_C5j3RU.js} +24 -24
- package/lib/components/RichTextProvider.d.ts +1 -1
- package/lib/dialog-C8J59d2J.cjs +1 -0
- package/lib/dialog-bDkDW-C_.js +95 -0
- package/lib/dom-dataset-BqoJhJXt.cjs +1 -0
- package/lib/dom-dataset-CIEeltF6.js +47 -0
- package/lib/{dropdown-menu-Ce2TorkG.js → dropdown-menu-DWt_xj4h.js} +1 -1
- package/lib/{dropdown-menu-DirUyRAI.cjs → dropdown-menu-tUP872Zv.cjs} +1 -1
- package/lib/events.constant-Bke62qxm.cjs +1 -0
- package/lib/events.constant-CSWD3-ho.js +72 -0
- package/lib/file-i7e4nQY2.cjs +1 -0
- package/lib/file-jDdkhyj7.js +43 -0
- package/lib/{index-RkKGy5oa.js → index-B3Ijnbxs.js} +1 -1
- package/lib/index-BXh8X1ch.cjs +1 -0
- package/lib/{index-Dl3OjzmR.js → index-C1KQsOcg.js} +1 -1
- package/lib/{index-D4M4hrH4.js → index-C8FjP66D.js} +1 -1
- package/lib/index-jMN4V2hr.js +2763 -0
- package/lib/{index-DZj2z9_1.js → index-s3l5RdyW.js} +1 -1
- package/lib/index.cjs +4 -4
- package/lib/index.js +464 -149
- package/lib/input-C_J-pfTx.js +21 -0
- package/lib/input-DwLo4r7V.cjs +1 -0
- package/lib/isNumber-BTYSVlKo.cjs +1 -0
- package/lib/isNumber-WaBzl_0s.js +15 -0
- package/lib/label-BgIVynq3.cjs +1 -0
- package/lib/label-ClsOg9Hr.js +11 -0
- package/lib/{popover-BzJyaFvy.js → popover-BC7FRr8B.js} +1 -1
- package/lib/{popover-BdLwAlrM.cjs → popover-C3A6zzNV.cjs} +1 -1
- package/lib/{renderNodeView-dj6AaFSX.js → renderNodeView-C_hPIdEs.js} +2 -2
- package/lib/select-B8HIWDXf.cjs +1 -0
- package/lib/select-DSKqhVGR.js +120 -0
- package/lib/{separator-D-fyzbfx.js → separator-BJWSNjvr.js} +23 -22
- package/lib/separator-D6ruF682.cjs +1 -0
- package/lib/style.css +1 -1
- package/lib/tabs-D1J1iB7B.js +46 -0
- package/lib/tabs-IEbMQmNX.cjs +1 -0
- package/lib/textarea-Ch5w3PiI.js +20 -0
- package/lib/textarea-CtVdqwSM.cjs +1 -0
- package/lib/theme.cjs +1 -1
- package/lib/theme.js +18 -18
- package/lib/throttle-CRNq0z-O.js +249 -0
- package/lib/throttle-gTTvqDTW.cjs +1 -0
- package/lib/toggle-C9tcMm1r.cjs +1 -0
- package/lib/toggle-CaSwYCk4.js +89 -0
- package/lib/{updatePosition-C294Pixi.js → updatePosition-DvfTZHcH.js} +2 -2
- package/lib/use-toast-C6zPo25l.cjs +1 -0
- package/lib/use-toast-CEOqhXfx.js +97 -0
- package/lib/useButtonProps-D-ruygH7.js +165 -0
- package/lib/useButtonProps-D9ndBdmA.cjs +1 -0
- package/package.json +21 -32
- package/lib/ActionMenuButton-NfiUDE60.cjs +0 -1
- package/lib/Drawer-DlgdaO_B.cjs +0 -2
- package/lib/Iframe-CANdxSpV.cjs +0 -1
- package/lib/Indent-DuB2U6Cs.cjs +0 -1
- package/lib/Katex-DFU1unCm.cjs +0 -4
- package/lib/LinkEditBlock-C2zX0WVK.cjs +0 -5
- package/lib/Mermaid-B8lQSOGn.cjs +0 -2
- package/lib/SlashCommandNodeView-BfWNWGRr.cjs +0 -1
- package/lib/Table-BfM6ywrZ.cjs +0 -5
- package/lib/Twitter-axcoCgD7.cjs +0 -1
- package/lib/index-BynXHtjJ.cjs +0 -28
- package/lib/index-CnKgiZFQ.js +0 -5576
- package/lib/separator-CoQaQmFK.cjs +0 -1
package/lib/index.js
CHANGED
|
@@ -1,24 +1,38 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import { useEffect as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as r, Fragment as E, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { a1 as ve } from "./clsx-m_C5j3RU.js";
|
|
3
|
+
import * as I from "react";
|
|
4
|
+
import { useState as y, useRef as _, useMemo as re, useEffect as D, useId as ye } from "react";
|
|
5
|
+
import { E as z, u as F, R as Ne } from "./events.constant-CSWD3-ho.js";
|
|
6
|
+
import { D as $, b as H, c as O } from "./dialog-bDkDW-C_.js";
|
|
7
|
+
import { Attachment as we } from "./Attachment.js";
|
|
8
|
+
import { f as q, c as B, i as Q, n as Te, o as Ce } from "./useButtonProps-D-ruygH7.js";
|
|
9
|
+
import { u as Y } from "./index-BGd2HiwP.js";
|
|
10
|
+
import { e as Ee, b as ke } from "./file-jDdkhyj7.js";
|
|
11
|
+
import { B as A } from "./button-090-I3tp.js";
|
|
12
|
+
import { I as De, a as Ie, v as Re } from "./ImageCropper-DrSdjo9x.js";
|
|
13
|
+
import { u as ie } from "./use-toast-CEOqhXfx.js";
|
|
14
|
+
import { T as ne, a as oe, b as S, c as L } from "./tabs-D1J1iB7B.js";
|
|
15
|
+
import { C as Ve } from "./checkbox-DiXWHAI0.js";
|
|
16
|
+
import { L as J } from "./label-ClsOg9Hr.js";
|
|
17
|
+
import { I as j } from "./input-C_J-pfTx.js";
|
|
18
|
+
import { V as Ae, c as Se } from "./Video-DAKr90QL.js";
|
|
19
|
+
import * as g from "@radix-ui/react-toast";
|
|
20
|
+
import { c as k, a as Le } from "./index-jMN4V2hr.js";
|
|
21
|
+
import { X as Pe } from "lucide-react";
|
|
22
|
+
import { useTheme as Me, THEME as Z, themeActions as je } from "./theme.js";
|
|
23
|
+
const Ue = g.Provider, ae = I.forwardRef(({ className: e, ...i }, t) => /* @__PURE__ */ r(
|
|
24
|
+
g.Viewport,
|
|
11
25
|
{
|
|
12
|
-
ref:
|
|
13
|
-
className:
|
|
26
|
+
ref: t,
|
|
27
|
+
className: k(
|
|
14
28
|
"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]",
|
|
15
|
-
|
|
29
|
+
e
|
|
16
30
|
),
|
|
17
|
-
...
|
|
31
|
+
...i
|
|
18
32
|
}
|
|
19
33
|
));
|
|
20
|
-
|
|
21
|
-
const
|
|
34
|
+
ae.displayName = g.Viewport.displayName;
|
|
35
|
+
const _e = Le(
|
|
22
36
|
"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",
|
|
23
37
|
{
|
|
24
38
|
variants: {
|
|
@@ -31,74 +45,373 @@ const F = H(
|
|
|
31
45
|
variant: "default"
|
|
32
46
|
}
|
|
33
47
|
}
|
|
34
|
-
),
|
|
35
|
-
|
|
48
|
+
), ce = I.forwardRef(({ className: e, variant: i, ...t }, s) => /* @__PURE__ */ r(
|
|
49
|
+
g.Root,
|
|
36
50
|
{
|
|
37
|
-
ref:
|
|
38
|
-
className:
|
|
39
|
-
...
|
|
51
|
+
ref: s,
|
|
52
|
+
className: k(_e({ variant: i }), e),
|
|
53
|
+
...t
|
|
40
54
|
}
|
|
41
55
|
));
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
56
|
+
ce.displayName = g.Root.displayName;
|
|
57
|
+
const ze = I.forwardRef(({ className: e, ...i }, t) => /* @__PURE__ */ r(
|
|
58
|
+
g.Action,
|
|
45
59
|
{
|
|
46
|
-
ref:
|
|
47
|
-
className:
|
|
60
|
+
ref: t,
|
|
61
|
+
className: k(
|
|
48
62
|
"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",
|
|
49
|
-
|
|
63
|
+
e
|
|
50
64
|
),
|
|
51
|
-
...
|
|
65
|
+
...i
|
|
52
66
|
}
|
|
53
67
|
));
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
68
|
+
ze.displayName = g.Action.displayName;
|
|
69
|
+
const se = I.forwardRef(({ className: e, ...i }, t) => /* @__PURE__ */ r(
|
|
70
|
+
g.Close,
|
|
57
71
|
{
|
|
58
|
-
ref:
|
|
59
|
-
className:
|
|
72
|
+
ref: t,
|
|
73
|
+
className: k(
|
|
60
74
|
"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",
|
|
61
|
-
|
|
75
|
+
e
|
|
62
76
|
),
|
|
63
77
|
"toast-close": "",
|
|
64
|
-
...
|
|
65
|
-
children: /* @__PURE__ */
|
|
78
|
+
...i,
|
|
79
|
+
children: /* @__PURE__ */ r(Pe, { className: "richtext-h-4 richtext-w-4" })
|
|
66
80
|
}
|
|
67
81
|
));
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
|
|
82
|
+
se.displayName = g.Close.displayName;
|
|
83
|
+
const le = I.forwardRef(({ className: e, ...i }, t) => /* @__PURE__ */ r(
|
|
84
|
+
g.Title,
|
|
71
85
|
{
|
|
72
|
-
ref:
|
|
73
|
-
className:
|
|
74
|
-
...
|
|
86
|
+
ref: t,
|
|
87
|
+
className: k("richtext-text-sm richtext-font-semibold", e),
|
|
88
|
+
...i
|
|
75
89
|
}
|
|
76
90
|
));
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
|
|
91
|
+
le.displayName = g.Title.displayName;
|
|
92
|
+
const de = I.forwardRef(({ className: e, ...i }, t) => /* @__PURE__ */ r(
|
|
93
|
+
g.Description,
|
|
80
94
|
{
|
|
81
|
-
ref:
|
|
82
|
-
className:
|
|
83
|
-
...
|
|
95
|
+
ref: t,
|
|
96
|
+
className: k("richtext-text-sm richtext-opacity-90", e),
|
|
97
|
+
...i
|
|
84
98
|
}
|
|
85
99
|
));
|
|
86
|
-
|
|
87
|
-
function
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
100
|
+
de.displayName = g.Description.displayName;
|
|
101
|
+
function Fe() {
|
|
102
|
+
var n;
|
|
103
|
+
const { t: e } = Y(), i = q(), { editorDisabled: t } = B(), [s, l] = y(!1), [d, f] = y(!1), [a, m] = y(null), b = _(null), p = Q(we.name), v = z.UPLOAD_ATTACHMENT(i.id);
|
|
104
|
+
F((u) => {
|
|
105
|
+
u && (m(null), f(!1), l(!0));
|
|
106
|
+
}, [v]);
|
|
107
|
+
const o = (n = p == null ? void 0 : p.options) == null ? void 0 : n.upload;
|
|
108
|
+
function T(u) {
|
|
109
|
+
var x;
|
|
110
|
+
u.preventDefault(), (x = b.current) == null || x.click();
|
|
111
|
+
}
|
|
112
|
+
async function N(u) {
|
|
113
|
+
var w;
|
|
114
|
+
const x = (w = u.target.files) == null ? void 0 : w[0];
|
|
115
|
+
if (!x || !i || i.isDestroyed) {
|
|
116
|
+
u.target.value = "";
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (!o) {
|
|
120
|
+
m(e("editor.attachment.error.no_upload_fn")), u.target.value = "";
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
m(null), f(!0);
|
|
124
|
+
try {
|
|
125
|
+
const c = await o(x);
|
|
126
|
+
i.chain().focus().setAttachment({
|
|
127
|
+
id: c,
|
|
128
|
+
fileName: ke(x.name),
|
|
129
|
+
fileSize: x.size,
|
|
130
|
+
fileType: x.type,
|
|
131
|
+
fileExt: Ee(x.name)
|
|
132
|
+
}).run(), l(!1);
|
|
133
|
+
} catch (c) {
|
|
134
|
+
m(
|
|
135
|
+
c != null && c.message ? `${e("editor.attachment.error.upload_failed")}: ${c.message}` : e("editor.attachment.error.upload_failed")
|
|
136
|
+
);
|
|
137
|
+
} finally {
|
|
138
|
+
f(!1), u.target.value = "";
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function C(u) {
|
|
142
|
+
d || (l(u), u || m(null));
|
|
143
|
+
}
|
|
144
|
+
return t ? /* @__PURE__ */ r(E, {}) : /* @__PURE__ */ r($, { onOpenChange: C, open: s, children: /* @__PURE__ */ h(H, { children: [
|
|
145
|
+
/* @__PURE__ */ r(O, { children: e("editor.attachment.dialog.title") }),
|
|
146
|
+
/* @__PURE__ */ h("div", { className: "richtext-flex richtext-flex-col richtext-gap-3", children: [
|
|
147
|
+
/* @__PURE__ */ r("p", { className: "richtext-text-sm richtext-text-muted-foreground", children: e("editor.attachment.dialog.description") }),
|
|
148
|
+
/* @__PURE__ */ r(
|
|
149
|
+
A,
|
|
150
|
+
{
|
|
151
|
+
className: "richtext-w-full",
|
|
152
|
+
disabled: d,
|
|
153
|
+
onClick: T,
|
|
154
|
+
size: "sm",
|
|
155
|
+
children: e(d ? "editor.attachment.uploading" : "editor.attachment.dialog.button.choose")
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
a && /* @__PURE__ */ r("p", { className: "richtext-text-sm richtext-text-destructive", children: a })
|
|
159
|
+
] }),
|
|
160
|
+
/* @__PURE__ */ r(
|
|
161
|
+
"input",
|
|
162
|
+
{
|
|
163
|
+
hidden: !0,
|
|
164
|
+
onChange: N,
|
|
165
|
+
ref: b,
|
|
166
|
+
type: "file"
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
] }) });
|
|
170
|
+
}
|
|
171
|
+
function $e() {
|
|
172
|
+
const { t: e } = Y(), { toast: i } = ie(), t = q(), { editorDisabled: s } = B(), [l, d] = y(!1), f = z.UPLOAD_IMAGE(t.id);
|
|
173
|
+
F(d, [f]);
|
|
174
|
+
const a = Q(De.name), [m, b] = y(""), [p, v] = y(""), o = _(null), T = (a == null ? void 0 : a.options.defaultInline) || !1, [N, C] = y(T), n = re(() => a == null ? void 0 : a.options, [a]);
|
|
175
|
+
function u(c) {
|
|
176
|
+
var X;
|
|
177
|
+
const R = (X = c == null ? void 0 : c.target) == null ? void 0 : X.files;
|
|
178
|
+
if (!t || t.isDestroyed || R.length === 0) {
|
|
179
|
+
c.target.value = "";
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
const V = Re(R, {
|
|
183
|
+
acceptMimes: n == null ? void 0 : n.acceptMimes,
|
|
184
|
+
maxSize: n == null ? void 0 : n.maxSize,
|
|
185
|
+
t: e,
|
|
186
|
+
toast: i,
|
|
187
|
+
onError: n.onError
|
|
188
|
+
});
|
|
189
|
+
if (V.length <= 0) {
|
|
190
|
+
c.target.value = "";
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
d(!1);
|
|
194
|
+
const G = p, W = N;
|
|
195
|
+
if (v(""), C(T), n.upload) {
|
|
196
|
+
const P = n != null && n.multiple ? V : [V[0]];
|
|
197
|
+
for (const M of P)
|
|
198
|
+
t.chain().focus().insertImagePlaceholder({
|
|
199
|
+
file: M,
|
|
200
|
+
inline: W,
|
|
201
|
+
alt: G
|
|
202
|
+
}).run();
|
|
203
|
+
} else {
|
|
204
|
+
const P = n != null && n.multiple ? V : [V[0]];
|
|
205
|
+
for (const M of P) {
|
|
206
|
+
const be = URL.createObjectURL(M);
|
|
207
|
+
t.chain().focus().setImageInline({ src: be, inline: W, alt: G }).run();
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
c.target.value = "";
|
|
211
|
+
}
|
|
212
|
+
function x(c) {
|
|
213
|
+
c.preventDefault(), c.stopPropagation(), t.chain().focus().setImageInline({ src: m, inline: N, alt: p }).run(), d(!1), C(T), b(""), v("");
|
|
214
|
+
}
|
|
215
|
+
function w(c) {
|
|
216
|
+
var R;
|
|
217
|
+
c.preventDefault(), (R = o.current) == null || R.click();
|
|
218
|
+
}
|
|
219
|
+
return s ? /* @__PURE__ */ r(E, {}) : /* @__PURE__ */ r($, { onOpenChange: d, open: l, children: /* @__PURE__ */ h(H, { children: [
|
|
220
|
+
/* @__PURE__ */ r(O, { children: e("editor.image.dialog.title") }),
|
|
221
|
+
/* @__PURE__ */ h(
|
|
222
|
+
ne,
|
|
223
|
+
{
|
|
224
|
+
activationMode: "manual",
|
|
225
|
+
defaultValue: n.resourceImage === "both" || n.resourceImage === "upload" ? "upload" : "link",
|
|
226
|
+
children: [
|
|
227
|
+
n.resourceImage === "both" && /* @__PURE__ */ h(oe, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
228
|
+
/* @__PURE__ */ r(S, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
|
|
229
|
+
/* @__PURE__ */ r(S, { value: "link", children: e("editor.image.dialog.tab.url") })
|
|
230
|
+
] }),
|
|
231
|
+
/* @__PURE__ */ h("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
|
|
232
|
+
/* @__PURE__ */ r(
|
|
233
|
+
Ve,
|
|
234
|
+
{
|
|
235
|
+
checked: N,
|
|
236
|
+
onCheckedChange: (c) => {
|
|
237
|
+
C(c);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
),
|
|
241
|
+
/* @__PURE__ */ r(J, { children: e("editor.link.dialog.inline") })
|
|
242
|
+
] }),
|
|
243
|
+
n.enableAlt && /* @__PURE__ */ h("div", { className: "richtext-my-[10px]", children: [
|
|
244
|
+
/* @__PURE__ */ r(J, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
|
|
245
|
+
/* @__PURE__ */ r(
|
|
246
|
+
j,
|
|
247
|
+
{
|
|
248
|
+
onChange: (c) => v(c.target.value),
|
|
249
|
+
required: !0,
|
|
250
|
+
type: "text",
|
|
251
|
+
value: p
|
|
252
|
+
}
|
|
253
|
+
)
|
|
254
|
+
] }),
|
|
255
|
+
/* @__PURE__ */ h(L, { value: "upload", children: [
|
|
256
|
+
/* @__PURE__ */ h("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
|
|
257
|
+
/* @__PURE__ */ r(
|
|
258
|
+
A,
|
|
259
|
+
{
|
|
260
|
+
className: "richtext-mt-1 richtext-w-full",
|
|
261
|
+
onClick: w,
|
|
262
|
+
size: "sm",
|
|
263
|
+
children: e("editor.image.dialog.tab.upload")
|
|
264
|
+
}
|
|
265
|
+
),
|
|
266
|
+
/* @__PURE__ */ r(
|
|
267
|
+
Ie,
|
|
268
|
+
{
|
|
269
|
+
alt: p,
|
|
270
|
+
disabled: !1,
|
|
271
|
+
editor: t,
|
|
272
|
+
imageInline: N,
|
|
273
|
+
onClose: () => {
|
|
274
|
+
v("");
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
)
|
|
278
|
+
] }),
|
|
279
|
+
/* @__PURE__ */ r(
|
|
280
|
+
"input",
|
|
281
|
+
{
|
|
282
|
+
accept: n.acceptMimes.join(",") || "image/*",
|
|
283
|
+
multiple: n.multiple,
|
|
284
|
+
onChange: u,
|
|
285
|
+
ref: o,
|
|
286
|
+
style: { display: "none" },
|
|
287
|
+
type: "file"
|
|
288
|
+
}
|
|
289
|
+
)
|
|
290
|
+
] }),
|
|
291
|
+
/* @__PURE__ */ r(L, { value: "link", children: /* @__PURE__ */ r("form", { onSubmit: x, children: /* @__PURE__ */ h("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
292
|
+
/* @__PURE__ */ r(
|
|
293
|
+
j,
|
|
294
|
+
{
|
|
295
|
+
autoFocus: !0,
|
|
296
|
+
onChange: (c) => b(c.target.value),
|
|
297
|
+
placeholder: e("editor.image.dialog.placeholder"),
|
|
298
|
+
required: !0,
|
|
299
|
+
type: "url",
|
|
300
|
+
value: m
|
|
301
|
+
}
|
|
302
|
+
),
|
|
303
|
+
/* @__PURE__ */ r(A, { type: "submit", children: e("editor.image.dialog.button.apply") })
|
|
304
|
+
] }) }) })
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
)
|
|
308
|
+
] }) });
|
|
309
|
+
}
|
|
310
|
+
function He() {
|
|
311
|
+
const { t: e } = Y(), i = q(), { editorDisabled: t } = B(), [s, l] = y(""), d = _(null), [f, a] = y(""), [m, b] = y(!1), p = Q(Ae.name), v = z.UPLOAD_VIDEO(i.id);
|
|
312
|
+
F(b, [v]);
|
|
313
|
+
const o = re(() => (p == null ? void 0 : p.options) ?? {}, [p]);
|
|
314
|
+
async function T(n) {
|
|
315
|
+
var c;
|
|
316
|
+
const u = (c = n == null ? void 0 : n.target) == null ? void 0 : c.files;
|
|
317
|
+
if (!i || i.isDestroyed || u.length === 0)
|
|
318
|
+
return;
|
|
319
|
+
const x = u[0];
|
|
320
|
+
let w = "";
|
|
321
|
+
o.upload ? w = await o.upload(x) : w = URL.createObjectURL(x), i.chain().focus().setVideo({
|
|
322
|
+
src: w,
|
|
323
|
+
width: "100%"
|
|
324
|
+
}).run(), b(!1);
|
|
325
|
+
}
|
|
326
|
+
function N(n) {
|
|
327
|
+
n.preventDefault(), n.stopPropagation(), s && (i.chain().focus().setVideo({
|
|
328
|
+
src: s,
|
|
329
|
+
width: "100%"
|
|
330
|
+
}).run(), b(!1), l(""));
|
|
331
|
+
}
|
|
332
|
+
function C(n) {
|
|
333
|
+
var u;
|
|
334
|
+
n.preventDefault(), (u = d.current) == null || u.click();
|
|
335
|
+
}
|
|
336
|
+
return t ? /* @__PURE__ */ r(E, {}) : /* @__PURE__ */ r($, { onOpenChange: b, open: m, children: /* @__PURE__ */ h(H, { children: [
|
|
337
|
+
/* @__PURE__ */ r(O, { children: e("editor.video.dialog.title") }),
|
|
338
|
+
/* @__PURE__ */ h(
|
|
339
|
+
ne,
|
|
340
|
+
{
|
|
341
|
+
activationMode: "manual",
|
|
342
|
+
defaultValue: (o == null ? void 0 : o.resourceVideo) === "both" || (o == null ? void 0 : o.resourceVideo) === "upload" ? "upload" : "link",
|
|
343
|
+
children: [
|
|
344
|
+
/* @__PURE__ */ h(oe, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
345
|
+
((o == null ? void 0 : o.resourceVideo) === "both" || (o == null ? void 0 : o.resourceVideo) === "upload") && /* @__PURE__ */ r(S, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
|
|
346
|
+
((o == null ? void 0 : o.resourceVideo) === "both" || (o == null ? void 0 : o.resourceVideo) === "link") && /* @__PURE__ */ r(S, { value: "link", children: e("editor.video.dialog.link") })
|
|
347
|
+
] }),
|
|
348
|
+
/* @__PURE__ */ h(L, { value: "upload", children: [
|
|
349
|
+
/* @__PURE__ */ r("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ r(A, { className: "richtext-mt-1 richtext-w-full", onClick: C, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
|
|
350
|
+
/* @__PURE__ */ r(
|
|
351
|
+
"input",
|
|
352
|
+
{
|
|
353
|
+
accept: "video/*",
|
|
354
|
+
multiple: !0,
|
|
355
|
+
onChange: T,
|
|
356
|
+
ref: d,
|
|
357
|
+
type: "file",
|
|
358
|
+
style: {
|
|
359
|
+
display: "none"
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
)
|
|
363
|
+
] }),
|
|
364
|
+
/* @__PURE__ */ h(L, { value: "link", children: [
|
|
365
|
+
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ h("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
366
|
+
/* @__PURE__ */ r(
|
|
367
|
+
j,
|
|
368
|
+
{
|
|
369
|
+
autoFocus: !0,
|
|
370
|
+
placeholder: e("editor.video.dialog.placeholder"),
|
|
371
|
+
required: !0,
|
|
372
|
+
type: "url",
|
|
373
|
+
value: s,
|
|
374
|
+
onBlur: (n) => {
|
|
375
|
+
const u = n.target.value, x = o.videoProviders || ["."];
|
|
376
|
+
u && !Se(u, x) ? a("Invalid video URL") : a("");
|
|
377
|
+
},
|
|
378
|
+
onChange: (n) => {
|
|
379
|
+
l(n.target.value);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
),
|
|
383
|
+
/* @__PURE__ */ r(A, { onClick: N, type: "button", children: e("editor.video.dialog.button.apply") })
|
|
384
|
+
] }) }),
|
|
385
|
+
f && /* @__PURE__ */ r("div", { className: "richtext-my-[5px] richtext-text-red-500", children: f })
|
|
386
|
+
] })
|
|
387
|
+
]
|
|
388
|
+
}
|
|
389
|
+
)
|
|
390
|
+
] }) });
|
|
391
|
+
}
|
|
392
|
+
function ue() {
|
|
393
|
+
return /* @__PURE__ */ h(E, { children: [
|
|
394
|
+
/* @__PURE__ */ r($e, {}),
|
|
395
|
+
/* @__PURE__ */ r(He, {}),
|
|
396
|
+
/* @__PURE__ */ r(Fe, {})
|
|
397
|
+
] });
|
|
398
|
+
}
|
|
399
|
+
process.env.NODE_ENV !== "production" && (ue.displayName = "SlashDialogTrigger");
|
|
400
|
+
function Oe() {
|
|
401
|
+
const { toasts: e } = ie();
|
|
402
|
+
return /* @__PURE__ */ h(Ue, { children: [
|
|
403
|
+
e.map(({ id: i, title: t, description: s, action: l, ...d }) => /* @__PURE__ */ h(ce, { ...d, children: [
|
|
404
|
+
/* @__PURE__ */ h("div", { className: "richtext-grid richtext-gap-1", children: [
|
|
405
|
+
t && /* @__PURE__ */ r(le, { children: t }),
|
|
406
|
+
s && /* @__PURE__ */ r(de, { children: s })
|
|
94
407
|
] }),
|
|
95
|
-
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
] },
|
|
98
|
-
/* @__PURE__ */
|
|
408
|
+
l,
|
|
409
|
+
/* @__PURE__ */ r(se, {})
|
|
410
|
+
] }, i)),
|
|
411
|
+
/* @__PURE__ */ r(ae, {})
|
|
99
412
|
] });
|
|
100
413
|
}
|
|
101
|
-
const
|
|
414
|
+
const qe = `
|
|
102
415
|
.remarkablejames-editor {
|
|
103
416
|
button,
|
|
104
417
|
input:where([type=button]),
|
|
@@ -206,106 +519,106 @@ const Z = `
|
|
|
206
519
|
}
|
|
207
520
|
}
|
|
208
521
|
`;
|
|
209
|
-
function
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}, [
|
|
214
|
-
const
|
|
215
|
-
|
|
522
|
+
function Be({ editor: e }) {
|
|
523
|
+
const i = Te();
|
|
524
|
+
D(() => {
|
|
525
|
+
i(e == null ? void 0 : e.isEditable);
|
|
526
|
+
}, [e == null ? void 0 : e.isEditable]);
|
|
527
|
+
const t = () => {
|
|
528
|
+
i(e == null ? void 0 : e.isEditable);
|
|
216
529
|
};
|
|
217
|
-
return
|
|
218
|
-
|
|
219
|
-
}), [
|
|
530
|
+
return D(() => (e && e.on("update", t), () => {
|
|
531
|
+
e && e.off("update", t);
|
|
532
|
+
}), [e]), /* @__PURE__ */ r(E, {});
|
|
220
533
|
}
|
|
221
|
-
const
|
|
222
|
-
function
|
|
223
|
-
if (!
|
|
534
|
+
const ee = "data-rc-order", te = "data-rc-priority", Qe = "rc-util-key", U = /* @__PURE__ */ new Map();
|
|
535
|
+
function Ye(e, i) {
|
|
536
|
+
if (!e)
|
|
224
537
|
return !1;
|
|
225
|
-
if (
|
|
226
|
-
return
|
|
227
|
-
let
|
|
228
|
-
for (;
|
|
229
|
-
if (
|
|
538
|
+
if (e.contains)
|
|
539
|
+
return e.contains(i);
|
|
540
|
+
let t = i;
|
|
541
|
+
for (; t; ) {
|
|
542
|
+
if (t === e)
|
|
230
543
|
return !0;
|
|
231
|
-
|
|
544
|
+
t = t.parentNode;
|
|
232
545
|
}
|
|
233
546
|
return !1;
|
|
234
547
|
}
|
|
235
|
-
function
|
|
236
|
-
return
|
|
548
|
+
function he({ mark: e } = {}) {
|
|
549
|
+
return e ? e.startsWith("data-") ? e : `data-${e}` : Qe;
|
|
237
550
|
}
|
|
238
|
-
function
|
|
239
|
-
return
|
|
551
|
+
function K(e) {
|
|
552
|
+
return e.attachTo ? e.attachTo : document.querySelector("head") || document.body;
|
|
240
553
|
}
|
|
241
|
-
function
|
|
242
|
-
return
|
|
554
|
+
function Ke(e) {
|
|
555
|
+
return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
|
|
243
556
|
}
|
|
244
|
-
function
|
|
245
|
-
return [...(
|
|
246
|
-
(
|
|
557
|
+
function fe(e) {
|
|
558
|
+
return [...(U.get(e) || e).children].filter(
|
|
559
|
+
(i) => i.tagName === "STYLE"
|
|
247
560
|
);
|
|
248
561
|
}
|
|
249
|
-
function
|
|
250
|
-
const { csp:
|
|
251
|
-
a.setAttribute(
|
|
252
|
-
const
|
|
253
|
-
if (
|
|
254
|
-
if (
|
|
255
|
-
const
|
|
256
|
-
if (!["prepend", "prependQueue"].includes(v.getAttribute(
|
|
562
|
+
function me(e, i = {}) {
|
|
563
|
+
const { csp: t, prepend: s, priority: l = 0 } = i, d = Ke(s), f = d === "prependQueue", a = document.createElement("style");
|
|
564
|
+
a.setAttribute(ee, d), f && l && a.setAttribute(te, `${l}`), t != null && t.nonce && (a.nonce = t == null ? void 0 : t.nonce), a.innerHTML = e;
|
|
565
|
+
const m = K(i), { firstChild: b } = m;
|
|
566
|
+
if (s) {
|
|
567
|
+
if (f) {
|
|
568
|
+
const p = fe(m).filter((v) => {
|
|
569
|
+
if (!["prepend", "prependQueue"].includes(v.getAttribute(ee)))
|
|
257
570
|
return !1;
|
|
258
|
-
const
|
|
259
|
-
return
|
|
571
|
+
const o = Number(v.getAttribute(te) || 0);
|
|
572
|
+
return l >= o;
|
|
260
573
|
});
|
|
261
|
-
if (
|
|
262
|
-
return
|
|
574
|
+
if (p.length > 0)
|
|
575
|
+
return m.insertBefore(a, p.at(-1).nextSibling), a;
|
|
263
576
|
}
|
|
264
|
-
|
|
577
|
+
b.before(a);
|
|
265
578
|
} else
|
|
266
|
-
|
|
579
|
+
m.append(a);
|
|
267
580
|
return a;
|
|
268
581
|
}
|
|
269
|
-
function
|
|
270
|
-
const
|
|
271
|
-
return
|
|
582
|
+
function pe(e, i = {}) {
|
|
583
|
+
const t = K(i);
|
|
584
|
+
return fe(t).find((s) => s.getAttribute(he(i)) === e);
|
|
272
585
|
}
|
|
273
|
-
function
|
|
274
|
-
const
|
|
275
|
-
|
|
586
|
+
function xe(e, i = {}) {
|
|
587
|
+
const t = pe(e, i);
|
|
588
|
+
t && t.remove();
|
|
276
589
|
}
|
|
277
|
-
function
|
|
278
|
-
const
|
|
279
|
-
if (!
|
|
280
|
-
const
|
|
281
|
-
|
|
590
|
+
function Ge(e, i) {
|
|
591
|
+
const t = U.get(e);
|
|
592
|
+
if (!t || !Ye(document, t)) {
|
|
593
|
+
const s = me("", i), { parentNode: l } = s;
|
|
594
|
+
U.set(e, l), s.remove();
|
|
282
595
|
}
|
|
283
596
|
}
|
|
284
|
-
function
|
|
285
|
-
var
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
const
|
|
289
|
-
if (
|
|
290
|
-
return (
|
|
291
|
-
const
|
|
292
|
-
return
|
|
597
|
+
function ge(e, i, t = {}) {
|
|
598
|
+
var f, a, m;
|
|
599
|
+
const s = K(t);
|
|
600
|
+
Ge(s, t);
|
|
601
|
+
const l = pe(i, t);
|
|
602
|
+
if (l)
|
|
603
|
+
return (f = t.csp) != null && f.nonce && l.nonce !== ((a = t.csp) == null ? void 0 : a.nonce) && (l.nonce = (m = t.csp) == null ? void 0 : m.nonce), l.innerHTML !== e && (l.innerHTML = e), l;
|
|
604
|
+
const d = me(e, t);
|
|
605
|
+
return d.setAttribute(he(t), i), d;
|
|
293
606
|
}
|
|
294
|
-
function
|
|
295
|
-
const { theme:
|
|
296
|
-
return
|
|
297
|
-
const
|
|
298
|
-
let
|
|
299
|
-
if (!
|
|
300
|
-
|
|
607
|
+
function We() {
|
|
608
|
+
const { theme: e, color: i, borderRadius: t } = Me();
|
|
609
|
+
return D(() => {
|
|
610
|
+
const s = e || "light", l = i || "default";
|
|
611
|
+
let d = Z[s][l];
|
|
612
|
+
if (!d) {
|
|
613
|
+
d = Z.light.default;
|
|
301
614
|
return;
|
|
302
615
|
}
|
|
303
|
-
return
|
|
616
|
+
return ge(
|
|
304
617
|
`
|
|
305
618
|
.remarkablejames-editor, .remarkablejames-editor *,
|
|
306
619
|
.remarkablejames-editor-theme, .remarkablejames-editor-theme *,
|
|
307
620
|
div[data-richtext-portal], div[data-richtext-portal] * {
|
|
308
|
-
${Object.entries(
|
|
621
|
+
${Object.entries(d).map(([f, a]) => typeof t == "string" && f === "radius" ? `--${f}: ${t};` : `--${f}: ${a};`).join(`
|
|
309
622
|
`)}
|
|
310
623
|
}
|
|
311
624
|
`,
|
|
@@ -314,25 +627,27 @@ function rt() {
|
|
|
314
627
|
priority: 50
|
|
315
628
|
}
|
|
316
629
|
), () => {
|
|
317
|
-
|
|
630
|
+
xe("richtext-theme");
|
|
318
631
|
};
|
|
319
|
-
}, [
|
|
632
|
+
}, [e, i, t]), /* @__PURE__ */ r(E, {});
|
|
320
633
|
}
|
|
321
|
-
function
|
|
322
|
-
const
|
|
323
|
-
return
|
|
324
|
-
|
|
325
|
-
}), []),
|
|
326
|
-
|
|
327
|
-
}, [
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
/* @__PURE__ */
|
|
333
|
-
|
|
634
|
+
function gt({ editor: e, children: i, dark: t }) {
|
|
635
|
+
const s = ye();
|
|
636
|
+
return D(() => (ge(qe, "react-tiptap-reset"), () => {
|
|
637
|
+
xe("react-tiptap-reset");
|
|
638
|
+
}), []), D(() => {
|
|
639
|
+
e && (e.id = s);
|
|
640
|
+
}, [s, e]), D(() => {
|
|
641
|
+
typeof t == "boolean" && je.setTheme(t ? "dark" : "light");
|
|
642
|
+
}, [t]), e ? /* @__PURE__ */ r("div", { className: k("remarkablejames-editor", t && "dark"), children: /* @__PURE__ */ r(Ne, { children: /* @__PURE__ */ h(ve.Provider, { value: { editor: e }, children: [
|
|
643
|
+
/* @__PURE__ */ r(Ce, { delayDuration: 0, disableHoverableContent: !0, children: i }),
|
|
644
|
+
/* @__PURE__ */ r(Be, { editor: e }),
|
|
645
|
+
/* @__PURE__ */ r(ue, {}),
|
|
646
|
+
/* @__PURE__ */ r(We, {}),
|
|
647
|
+
/* @__PURE__ */ r(Oe, {})
|
|
648
|
+
] }) }) }) : /* @__PURE__ */ r(E, {});
|
|
334
649
|
}
|
|
335
650
|
export {
|
|
336
|
-
|
|
337
|
-
|
|
651
|
+
gt as RichTextProvider,
|
|
652
|
+
Ce as TooltipProvider
|
|
338
653
|
};
|