@remarkablejames/editor 0.0.7 → 0.0.8
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/lib/ActionMenuButton-DI9_8wC0.cjs +1 -0
- package/lib/{ActionMenuButton-nxV91Fqo.js → ActionMenuButton-DL05l66z.js} +9 -10
- package/lib/Attachment.cjs +1 -19
- package/lib/Attachment.js +7 -270
- package/lib/Blockquote.cjs +2 -2
- package/lib/Blockquote.js +13 -12
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +11 -10
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +9 -8
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +41 -45
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +13 -14
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +6 -5
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.js +30 -31
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +9 -8
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +18 -19
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +9 -8
- package/lib/Drawer-DEzhWKwY.cjs +2 -0
- package/lib/{Drawer-CF6Z_IA2.js → Drawer-DhM1qM6R.js} +41 -47
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +3 -3
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +14 -15
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +28 -33
- package/lib/ExportPdf.cjs +3 -3
- package/lib/ExportPdf.js +14 -13
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +6 -6
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +7 -6
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +15 -14
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +26 -26
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +22 -23
- package/lib/History.cjs +1 -1
- package/lib/History.js +11 -11
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +10 -9
- package/lib/Iframe-DbYJ82AI.cjs +1 -0
- package/lib/{Iframe-Dfd3LI7b.js → Iframe-yDX_zHls.js} +11 -14
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +3 -3
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +4 -5
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +83 -86
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +26 -28
- package/lib/{Indent-CDVF9DWN.js → Indent-CA46zsbb.js} +31 -30
- package/lib/Indent-CYaCq_Mv.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 +12 -11
- package/lib/Katex-Dh-kTBjf.cjs +4 -0
- package/lib/{Katex-DqhWWAA-.js → Katex-g3ZS3zUf.js} +19 -22
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +19 -20
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/LinkEditBlock-ClqpI1FH.cjs +5 -0
- package/lib/{LinkEditBlock-xP0pGVhB.js → LinkEditBlock-qE5KHPQs.js} +19 -24
- package/lib/Mention.js +3 -3
- package/lib/Mermaid-BmUChJSB.cjs +2 -0
- package/lib/{Mermaid-BJ6ryVdY.js → Mermaid-CefRECZY.js} +45 -48
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +26 -28
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +11 -10
- package/lib/PaywallSeparator.cjs +1 -1
- package/lib/PaywallSeparator.js +9 -9
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +37 -42
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +5 -5
- package/lib/{SlashCommandNodeView-DS9FqMiY.js → SlashCommandNodeView-BsIrWlhS.js} +19 -21
- package/lib/SlashCommandNodeView-DpXsfGmo.cjs +1 -0
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +12 -11
- package/lib/Table-B-0TePQ3.cjs +5 -0
- package/lib/{Table-CcG-JNtV.js → Table-CG0nisk4.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 +12 -11
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +26 -27
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +18 -19
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +9 -8
- package/lib/{Twitter-BIL3o833.js → Twitter-DlGSWdh7.js} +18 -22
- package/lib/Twitter-DvMmVNMF.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +2 -2
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +4 -5
- package/lib/bubble.cjs +3 -3
- package/lib/bubble.js +77 -86
- package/lib/{clsx-m_C5j3RU.js → clsx-BUPZHhq3.js} +24 -24
- package/lib/{dropdown-menu-DWt_xj4h.js → dropdown-menu-D-mNjyKn.js} +1 -1
- package/lib/{dropdown-menu-tUP872Zv.cjs → dropdown-menu-gOopBX-L.cjs} +1 -1
- package/lib/index-CUnpdrCy.cjs +28 -0
- package/lib/index-CelRl0mr.js +5447 -0
- package/lib/{index-C8FjP66D.js → index-D4M4hrH4.js} +1 -1
- package/lib/{index-s3l5RdyW.js → index-DZj2z9_1.js} +1 -1
- package/lib/{index-C1KQsOcg.js → index-Dl3OjzmR.js} +1 -1
- package/lib/{index-B3Ijnbxs.js → index-RkKGy5oa.js} +1 -1
- package/lib/index.cjs +4 -4
- package/lib/index.js +151 -464
- package/lib/{popover-C3A6zzNV.cjs → popover-DEMkixfo.cjs} +1 -1
- package/lib/{popover-BC7FRr8B.js → popover-SMtif0E1.js} +1 -1
- package/lib/{renderNodeView-C_hPIdEs.js → renderNodeView-dj6AaFSX.js} +2 -2
- package/lib/{select-B8HIWDXf.cjs → select-BqlizSg4.cjs} +1 -1
- package/lib/{select-DSKqhVGR.js → select-Dc3RkAhQ.js} +1 -1
- package/lib/{separator-BJWSNjvr.js → separator-DWLSmuSh.js} +12 -13
- package/lib/separator-DuP4NoiV.cjs +1 -0
- package/lib/style.css +1 -1
- package/lib/{textarea-CtVdqwSM.cjs → textarea-C89l2GRG.cjs} +1 -1
- package/lib/{textarea-Ch5w3PiI.js → textarea-DvciwVxS.js} +1 -1
- package/lib/theme.cjs +1 -1
- package/lib/theme.js +18 -18
- package/lib/{updatePosition-DvfTZHcH.js → updatePosition-C294Pixi.js} +2 -2
- package/package.json +1 -1
- package/lib/ActionMenuButton-D9o3Kwmv.cjs +0 -1
- package/lib/Drawer-Bh-y5bs8.cjs +0 -2
- package/lib/Icon-BvGyfX2j.js +0 -15
- package/lib/Icon-wjwoRc9F.cjs +0 -1
- package/lib/Iframe-BbfZKbPY.cjs +0 -1
- package/lib/ImageCropper-CY1ETEjC.cjs +0 -10
- package/lib/ImageCropper-DrSdjo9x.js +0 -979
- package/lib/Indent-Q1VuhSM2.cjs +0 -1
- package/lib/Katex-K1QU2SB2.cjs +0 -4
- package/lib/LinkEditBlock-CBYGLs3J.cjs +0 -5
- package/lib/Mermaid-D3_nLeOW.cjs +0 -2
- package/lib/SlashCommandNodeView-CUJrDQS7.cjs +0 -1
- package/lib/Table-CV6pUoVf.cjs +0 -5
- package/lib/Twitter-BfSTqPDh.cjs +0 -1
- package/lib/Video-DAKr90QL.js +0 -231
- package/lib/Video-HAinT0w6.cjs +0 -1
- package/lib/button-090-I3tp.js +0 -35
- package/lib/button-B4Sz2ZhW.cjs +0 -1
- package/lib/checkbox-BCPsu7yR.cjs +0 -1
- package/lib/checkbox-DiXWHAI0.js +0 -29
- package/lib/dialog-C8J59d2J.cjs +0 -1
- package/lib/dialog-bDkDW-C_.js +0 -95
- package/lib/dom-dataset-BqoJhJXt.cjs +0 -1
- package/lib/dom-dataset-CIEeltF6.js +0 -47
- package/lib/events.constant-Bke62qxm.cjs +0 -1
- package/lib/events.constant-CSWD3-ho.js +0 -72
- package/lib/file-i7e4nQY2.cjs +0 -1
- package/lib/file-jDdkhyj7.js +0 -43
- package/lib/index-BXh8X1ch.cjs +0 -1
- package/lib/index-jMN4V2hr.js +0 -2763
- package/lib/input-C_J-pfTx.js +0 -21
- package/lib/input-DwLo4r7V.cjs +0 -1
- package/lib/isNumber-BTYSVlKo.cjs +0 -1
- package/lib/isNumber-WaBzl_0s.js +0 -15
- package/lib/label-BgIVynq3.cjs +0 -1
- package/lib/label-ClsOg9Hr.js +0 -11
- package/lib/separator-D6ruF682.cjs +0 -1
- package/lib/tabs-D1J1iB7B.js +0 -46
- package/lib/tabs-IEbMQmNX.cjs +0 -1
- package/lib/throttle-CRNq0z-O.js +0 -249
- package/lib/throttle-gTTvqDTW.cjs +0 -1
- package/lib/toggle-C9tcMm1r.cjs +0 -1
- package/lib/toggle-CaSwYCk4.js +0 -89
- package/lib/use-toast-C6zPo25l.cjs +0 -1
- package/lib/use-toast-CEOqhXfx.js +0 -97
- package/lib/useButtonProps-D-ruygH7.js +0 -165
- package/lib/useButtonProps-D9ndBdmA.cjs +0 -1
package/lib/index.js
CHANGED
|
@@ -1,38 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
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,
|
|
1
|
+
import { jsx as i, jsxs as f, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { K as O } from "./clsx-BUPZHhq3.js";
|
|
3
|
+
import * as x from "react";
|
|
4
|
+
import { useEffect as l, useId as z } from "react";
|
|
5
|
+
import { c as u, P as H, r as L, Q, R as _, S as I, U as K } from "./index-CelRl0mr.js";
|
|
6
|
+
import * as c from "@radix-ui/react-toast";
|
|
7
|
+
import { X as Y } from "lucide-react";
|
|
8
|
+
import { useTheme as q, THEME as y, themeActions as B } from "./theme.js";
|
|
9
|
+
const F = c.Provider, T = x.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ i(
|
|
10
|
+
c.Viewport,
|
|
25
11
|
{
|
|
26
|
-
ref:
|
|
27
|
-
className:
|
|
12
|
+
ref: e,
|
|
13
|
+
className: u(
|
|
28
14
|
"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]",
|
|
29
|
-
|
|
15
|
+
t
|
|
30
16
|
),
|
|
31
|
-
...
|
|
17
|
+
...r
|
|
32
18
|
}
|
|
33
19
|
));
|
|
34
|
-
|
|
35
|
-
const
|
|
20
|
+
T.displayName = c.Viewport.displayName;
|
|
21
|
+
const U = H(
|
|
36
22
|
"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",
|
|
37
23
|
{
|
|
38
24
|
variants: {
|
|
@@ -45,373 +31,74 @@ const _e = Le(
|
|
|
45
31
|
variant: "default"
|
|
46
32
|
}
|
|
47
33
|
}
|
|
48
|
-
),
|
|
49
|
-
|
|
34
|
+
), R = x.forwardRef(({ className: t, variant: r, ...e }, n) => /* @__PURE__ */ i(
|
|
35
|
+
c.Root,
|
|
50
36
|
{
|
|
51
|
-
ref:
|
|
52
|
-
className:
|
|
53
|
-
...
|
|
37
|
+
ref: n,
|
|
38
|
+
className: u(U({ variant: r }), t),
|
|
39
|
+
...e
|
|
54
40
|
}
|
|
55
41
|
));
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
|
|
42
|
+
R.displayName = c.Root.displayName;
|
|
43
|
+
const W = x.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ i(
|
|
44
|
+
c.Action,
|
|
59
45
|
{
|
|
60
|
-
ref:
|
|
61
|
-
className:
|
|
46
|
+
ref: e,
|
|
47
|
+
className: u(
|
|
62
48
|
"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",
|
|
63
|
-
|
|
49
|
+
t
|
|
64
50
|
),
|
|
65
|
-
...
|
|
51
|
+
...r
|
|
66
52
|
}
|
|
67
53
|
));
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
|
|
54
|
+
W.displayName = c.Action.displayName;
|
|
55
|
+
const E = x.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ i(
|
|
56
|
+
c.Close,
|
|
71
57
|
{
|
|
72
|
-
ref:
|
|
73
|
-
className:
|
|
58
|
+
ref: e,
|
|
59
|
+
className: u(
|
|
74
60
|
"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",
|
|
75
|
-
|
|
61
|
+
t
|
|
76
62
|
),
|
|
77
63
|
"toast-close": "",
|
|
78
|
-
...
|
|
79
|
-
children: /* @__PURE__ */
|
|
64
|
+
...r,
|
|
65
|
+
children: /* @__PURE__ */ i(Y, { className: "richtext-h-4 richtext-w-4" })
|
|
80
66
|
}
|
|
81
67
|
));
|
|
82
|
-
|
|
83
|
-
const
|
|
84
|
-
|
|
68
|
+
E.displayName = c.Close.displayName;
|
|
69
|
+
const S = x.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ i(
|
|
70
|
+
c.Title,
|
|
85
71
|
{
|
|
86
|
-
ref:
|
|
87
|
-
className:
|
|
88
|
-
...
|
|
72
|
+
ref: e,
|
|
73
|
+
className: u("richtext-text-sm richtext-font-semibold", t),
|
|
74
|
+
...r
|
|
89
75
|
}
|
|
90
76
|
));
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
|
|
77
|
+
S.displayName = c.Title.displayName;
|
|
78
|
+
const C = x.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ i(
|
|
79
|
+
c.Description,
|
|
94
80
|
{
|
|
95
|
-
ref:
|
|
96
|
-
className:
|
|
97
|
-
...
|
|
81
|
+
ref: e,
|
|
82
|
+
className: u("richtext-text-sm richtext-opacity-90", t),
|
|
83
|
+
...r
|
|
98
84
|
}
|
|
99
85
|
));
|
|
100
|
-
|
|
101
|
-
function
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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 })
|
|
86
|
+
C.displayName = c.Description.displayName;
|
|
87
|
+
function X() {
|
|
88
|
+
const { toasts: t } = L();
|
|
89
|
+
return /* @__PURE__ */ f(F, { children: [
|
|
90
|
+
t.map(({ id: r, title: e, description: n, action: o, ...s }) => /* @__PURE__ */ f(R, { ...s, children: [
|
|
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 })
|
|
407
94
|
] }),
|
|
408
|
-
|
|
409
|
-
/* @__PURE__ */
|
|
410
|
-
] },
|
|
411
|
-
/* @__PURE__ */
|
|
95
|
+
o,
|
|
96
|
+
/* @__PURE__ */ i(E, {})
|
|
97
|
+
] }, r)),
|
|
98
|
+
/* @__PURE__ */ i(T, {})
|
|
412
99
|
] });
|
|
413
100
|
}
|
|
414
|
-
const
|
|
101
|
+
const G = `
|
|
415
102
|
.remarkablejames-editor {
|
|
416
103
|
button,
|
|
417
104
|
input:where([type=button]),
|
|
@@ -519,106 +206,106 @@ const qe = `
|
|
|
519
206
|
}
|
|
520
207
|
}
|
|
521
208
|
`;
|
|
522
|
-
function
|
|
523
|
-
const
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
}, [
|
|
527
|
-
const
|
|
528
|
-
|
|
209
|
+
function J({ editor: t }) {
|
|
210
|
+
const r = Q();
|
|
211
|
+
l(() => {
|
|
212
|
+
r(t == null ? void 0 : t.isEditable);
|
|
213
|
+
}, [t == null ? void 0 : t.isEditable]);
|
|
214
|
+
const e = () => {
|
|
215
|
+
r(t == null ? void 0 : t.isEditable);
|
|
529
216
|
};
|
|
530
|
-
return
|
|
531
|
-
|
|
532
|
-
}), [
|
|
217
|
+
return l(() => (t && t.on("update", e), () => {
|
|
218
|
+
t && t.off("update", e);
|
|
219
|
+
}), [t]), /* @__PURE__ */ i(m, {});
|
|
533
220
|
}
|
|
534
|
-
const
|
|
535
|
-
function
|
|
536
|
-
if (!
|
|
221
|
+
const w = "data-rc-order", N = "data-rc-priority", Z = "rc-util-key", p = /* @__PURE__ */ new Map();
|
|
222
|
+
function tt(t, r) {
|
|
223
|
+
if (!t)
|
|
537
224
|
return !1;
|
|
538
|
-
if (
|
|
539
|
-
return
|
|
540
|
-
let
|
|
541
|
-
for (;
|
|
542
|
-
if (
|
|
225
|
+
if (t.contains)
|
|
226
|
+
return t.contains(r);
|
|
227
|
+
let e = r;
|
|
228
|
+
for (; e; ) {
|
|
229
|
+
if (e === t)
|
|
543
230
|
return !0;
|
|
544
|
-
|
|
231
|
+
e = e.parentNode;
|
|
545
232
|
}
|
|
546
233
|
return !1;
|
|
547
234
|
}
|
|
548
|
-
function
|
|
549
|
-
return
|
|
235
|
+
function j({ mark: t } = {}) {
|
|
236
|
+
return t ? t.startsWith("data-") ? t : `data-${t}` : Z;
|
|
550
237
|
}
|
|
551
|
-
function
|
|
552
|
-
return
|
|
238
|
+
function g(t) {
|
|
239
|
+
return t.attachTo ? t.attachTo : document.querySelector("head") || document.body;
|
|
553
240
|
}
|
|
554
|
-
function
|
|
555
|
-
return
|
|
241
|
+
function et(t) {
|
|
242
|
+
return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
|
|
556
243
|
}
|
|
557
|
-
function
|
|
558
|
-
return [...(
|
|
559
|
-
(
|
|
244
|
+
function P(t) {
|
|
245
|
+
return [...(p.get(t) || t).children].filter(
|
|
246
|
+
(r) => r.tagName === "STYLE"
|
|
560
247
|
);
|
|
561
248
|
}
|
|
562
|
-
function
|
|
563
|
-
const { csp:
|
|
564
|
-
a.setAttribute(
|
|
565
|
-
const
|
|
566
|
-
if (
|
|
567
|
-
if (
|
|
568
|
-
const
|
|
569
|
-
if (!["prepend", "prependQueue"].includes(v.getAttribute(
|
|
249
|
+
function A(t, r = {}) {
|
|
250
|
+
const { csp: e, prepend: n, priority: o = 0 } = r, s = et(n), h = s === "prependQueue", a = document.createElement("style");
|
|
251
|
+
a.setAttribute(w, s), h && o && a.setAttribute(N, `${o}`), e != null && e.nonce && (a.nonce = e == null ? void 0 : e.nonce), a.innerHTML = t;
|
|
252
|
+
const d = g(r), { firstChild: V } = d;
|
|
253
|
+
if (n) {
|
|
254
|
+
if (h) {
|
|
255
|
+
const b = P(d).filter((v) => {
|
|
256
|
+
if (!["prepend", "prependQueue"].includes(v.getAttribute(w)))
|
|
570
257
|
return !1;
|
|
571
|
-
const
|
|
572
|
-
return
|
|
258
|
+
const $ = Number(v.getAttribute(N) || 0);
|
|
259
|
+
return o >= $;
|
|
573
260
|
});
|
|
574
|
-
if (
|
|
575
|
-
return
|
|
261
|
+
if (b.length > 0)
|
|
262
|
+
return d.insertBefore(a, b.at(-1).nextSibling), a;
|
|
576
263
|
}
|
|
577
|
-
|
|
264
|
+
V.before(a);
|
|
578
265
|
} else
|
|
579
|
-
|
|
266
|
+
d.append(a);
|
|
580
267
|
return a;
|
|
581
268
|
}
|
|
582
|
-
function
|
|
583
|
-
const
|
|
584
|
-
return
|
|
269
|
+
function M(t, r = {}) {
|
|
270
|
+
const e = g(r);
|
|
271
|
+
return P(e).find((n) => n.getAttribute(j(r)) === t);
|
|
585
272
|
}
|
|
586
|
-
function
|
|
587
|
-
const
|
|
588
|
-
|
|
273
|
+
function k(t, r = {}) {
|
|
274
|
+
const e = M(t, r);
|
|
275
|
+
e && e.remove();
|
|
589
276
|
}
|
|
590
|
-
function
|
|
591
|
-
const
|
|
592
|
-
if (!
|
|
593
|
-
const
|
|
594
|
-
|
|
277
|
+
function rt(t, r) {
|
|
278
|
+
const e = p.get(t);
|
|
279
|
+
if (!e || !tt(document, e)) {
|
|
280
|
+
const n = A("", r), { parentNode: o } = n;
|
|
281
|
+
p.set(t, o), n.remove();
|
|
595
282
|
}
|
|
596
283
|
}
|
|
597
|
-
function
|
|
598
|
-
var
|
|
599
|
-
const
|
|
600
|
-
|
|
601
|
-
const
|
|
602
|
-
if (
|
|
603
|
-
return (
|
|
604
|
-
const
|
|
605
|
-
return
|
|
284
|
+
function D(t, r, e = {}) {
|
|
285
|
+
var h, a, d;
|
|
286
|
+
const n = g(e);
|
|
287
|
+
rt(n, e);
|
|
288
|
+
const o = M(r, e);
|
|
289
|
+
if (o)
|
|
290
|
+
return (h = e.csp) != null && h.nonce && o.nonce !== ((a = e.csp) == null ? void 0 : a.nonce) && (o.nonce = (d = e.csp) == null ? void 0 : d.nonce), o.innerHTML !== t && (o.innerHTML = t), o;
|
|
291
|
+
const s = A(t, e);
|
|
292
|
+
return s.setAttribute(j(e), r), s;
|
|
606
293
|
}
|
|
607
|
-
function
|
|
608
|
-
const { theme:
|
|
609
|
-
return
|
|
610
|
-
const
|
|
611
|
-
let
|
|
612
|
-
if (!
|
|
613
|
-
|
|
294
|
+
function it() {
|
|
295
|
+
const { theme: t, color: r, borderRadius: e } = q();
|
|
296
|
+
return l(() => {
|
|
297
|
+
const n = t || "light", o = r || "default";
|
|
298
|
+
let s = y[n][o];
|
|
299
|
+
if (!s) {
|
|
300
|
+
s = y.light.default;
|
|
614
301
|
return;
|
|
615
302
|
}
|
|
616
|
-
return
|
|
303
|
+
return D(
|
|
617
304
|
`
|
|
618
305
|
.remarkablejames-editor, .remarkablejames-editor *,
|
|
619
306
|
.remarkablejames-editor-theme, .remarkablejames-editor-theme *,
|
|
620
307
|
div[data-richtext-portal], div[data-richtext-portal] * {
|
|
621
|
-
${Object.entries(
|
|
308
|
+
${Object.entries(s).map(([h, a]) => typeof e == "string" && h === "radius" ? `--${h}: ${e};` : `--${h}: ${a};`).join(`
|
|
622
309
|
`)}
|
|
623
310
|
}
|
|
624
311
|
`,
|
|
@@ -627,27 +314,27 @@ function We() {
|
|
|
627
314
|
priority: 50
|
|
628
315
|
}
|
|
629
316
|
), () => {
|
|
630
|
-
|
|
317
|
+
k("richtext-theme");
|
|
631
318
|
};
|
|
632
|
-
}, [
|
|
319
|
+
}, [t, r, e]), /* @__PURE__ */ i(m, {});
|
|
633
320
|
}
|
|
634
|
-
function
|
|
635
|
-
const
|
|
636
|
-
return
|
|
637
|
-
|
|
638
|
-
}), []),
|
|
639
|
-
|
|
640
|
-
}, [
|
|
641
|
-
typeof
|
|
642
|
-
}, [
|
|
643
|
-
/* @__PURE__ */
|
|
644
|
-
/* @__PURE__ */
|
|
645
|
-
/* @__PURE__ */
|
|
646
|
-
/* @__PURE__ */
|
|
647
|
-
/* @__PURE__ */
|
|
648
|
-
] }) }) }) : /* @__PURE__ */
|
|
321
|
+
function dt({ editor: t, children: r, dark: e }) {
|
|
322
|
+
const n = z();
|
|
323
|
+
return l(() => (D(G, "react-tiptap-reset"), () => {
|
|
324
|
+
k("react-tiptap-reset");
|
|
325
|
+
}), []), l(() => {
|
|
326
|
+
t && (t.id = n);
|
|
327
|
+
}, [n, t]), l(() => {
|
|
328
|
+
typeof e == "boolean" && B.setTheme(e ? "dark" : "light");
|
|
329
|
+
}, [e]), t ? /* @__PURE__ */ i("div", { className: u("remarkablejames-editor", e && "dark"), children: /* @__PURE__ */ i(_, { children: /* @__PURE__ */ f(O.Provider, { value: { editor: t }, children: [
|
|
330
|
+
/* @__PURE__ */ i(I, { delayDuration: 0, disableHoverableContent: !0, children: r }),
|
|
331
|
+
/* @__PURE__ */ i(J, { editor: t }),
|
|
332
|
+
/* @__PURE__ */ i(K, {}),
|
|
333
|
+
/* @__PURE__ */ i(it, {}),
|
|
334
|
+
/* @__PURE__ */ i(X, {})
|
|
335
|
+
] }) }) }) : /* @__PURE__ */ i(m, {});
|
|
649
336
|
}
|
|
650
337
|
export {
|
|
651
|
-
|
|
652
|
-
|
|
338
|
+
dt as RichTextProvider,
|
|
339
|
+
I as TooltipProvider
|
|
653
340
|
};
|