@remarkablejames/editor 0.0.4 → 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.
- package/lib/{ActionMenuButton-BUtJUsfO.js → ActionMenuButton-CpmEfz31.js} +1 -1
- package/lib/{ActionMenuButton-M55VtCZ5.cjs → ActionMenuButton-NfiUDE60.cjs} +1 -1
- package/lib/Attachment.cjs +1 -19
- package/lib/Attachment.js +6 -305
- package/lib/Blockquote.cjs +2 -2
- package/lib/Blockquote.js +2 -2
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +2 -2
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +2 -2
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +17 -18
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +2 -2
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +2 -2
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.js +32 -33
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +2 -2
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +3 -3
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +2 -2
- package/lib/{Drawer-mlmJ2nCT.js → Drawer-CayP4Ww4.js} +16 -16
- package/lib/{Drawer-CdQBnwUs.cjs → Drawer-DlgdaO_B.cjs} +2 -2
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +3 -3
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +12 -12
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +29 -30
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +2 -2
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +2 -2
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +5 -5
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +5 -5
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +10 -10
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +3 -3
- package/lib/History.cjs +1 -1
- package/lib/History.js +3 -3
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +2 -2
- package/lib/{Iframe-CYgR99Ny.js → Iframe-C6Sb97KS.js} +4 -5
- package/lib/Iframe-CANdxSpV.cjs +1 -0
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +3 -3
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +4 -4
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +24 -24
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +14 -14
- package/lib/{Indent-BMz2ILRl.js → Indent-CcFe8py3.js} +2 -2
- package/lib/{Indent-BAcoFdaq.cjs → Indent-DuB2U6Cs.cjs} +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +2 -2
- package/lib/{Katex-DOlb4iTP.js → Katex-Bp6AnIUF.js} +64 -65
- package/lib/Katex-DFU1unCm.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 +4 -4
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/{LinkEditBlock-xnokk4G7.js → LinkEditBlock-BiHumIJR.js} +8 -8
- package/lib/{LinkEditBlock-Cqs5RxjV.cjs → LinkEditBlock-C2zX0WVK.cjs} +1 -1
- package/lib/Mention.js +3 -3
- package/lib/Mermaid-B8lQSOGn.cjs +2 -0
- package/lib/{Mermaid-Bs3pIGc6.js → Mermaid-Dlx0XTJj.js} +23 -24
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +3 -3
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +2 -2
- package/lib/PaywallSeparator.cjs +1 -0
- package/lib/PaywallSeparator.js +140 -0
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +8 -8
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +6 -6
- package/lib/SlashCommandNodeView-BfWNWGRr.cjs +1 -0
- package/lib/{SlashCommandNodeView-CYcf7mVz.js → SlashCommandNodeView-DzmsYaNc.js} +73 -57
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +2 -2
- package/lib/{Table-dlXTKKwJ.cjs → Table-BfM6ywrZ.cjs} +1 -1
- package/lib/{Table-bz1Wcojf.js → Table-IH34r4jd.js} +5 -5
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +2 -2
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +3 -3
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +3 -3
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +2 -2
- package/lib/{Twitter-CNTXzgt0.js → Twitter-FVQKPaq6.js} +8 -8
- package/lib/{Twitter-DhEnGg6P.cjs → Twitter-axcoCgD7.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +2 -2
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +5 -5
- package/lib/bubble.cjs +3 -3
- package/lib/bubble.js +84 -86
- package/lib/{clsx-CDyrfCnw.js → clsx-BUPZHhq3.js} +2 -2
- package/lib/components/SlashDialogTrigger/RenderDialogUploadAttachment.d.ts +1 -0
- package/lib/{dropdown-menu-BuSlU2uN.js → dropdown-menu-Ce2TorkG.js} +1 -1
- package/lib/{dropdown-menu-CfWNst4v.cjs → dropdown-menu-DirUyRAI.cjs} +1 -1
- package/lib/extensions/Attachment/Attachment.d.ts +17 -6
- package/lib/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.d.ts +1 -1
- package/lib/extensions/PaywallSeparator/PaywallSeparator.d.ts +35 -0
- package/lib/extensions/PaywallSeparator/components/PaywallIcon.d.ts +2 -0
- package/lib/extensions/PaywallSeparator/components/PaywallSeparatorView.d.ts +17 -0
- package/lib/extensions/PaywallSeparator/components/RichTextPaywallSeparator.d.ts +1 -0
- package/lib/extensions/PaywallSeparator/components/index.d.ts +2 -0
- package/lib/extensions/PaywallSeparator/index.d.ts +1 -0
- package/lib/{index-DZfkCNKr.js → index-BGd2HiwP.js} +50 -20
- package/lib/index-BynXHtjJ.cjs +28 -0
- package/lib/{index-8B00E8e4.js → index-CnKgiZFQ.js} +1766 -1245
- package/lib/{index-CsSfYR30.js → index-D4M4hrH4.js} +1 -1
- package/lib/{index-DjDf4BK8.js → index-DZj2z9_1.js} +1 -1
- package/lib/index-DgOXAdKt.cjs +1 -0
- package/lib/{index-C1WCZhyA.js → index-Dl3OjzmR.js} +1 -1
- package/lib/{index-C-tDsIKJ.js → index-RkKGy5oa.js} +1 -1
- package/lib/index.cjs +3 -3
- package/lib/index.js +19 -19
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.js +1 -1
- package/lib/locales/en.d.ts +5 -0
- package/lib/locales/fi.d.ts +5 -0
- package/lib/locales/hu.d.ts +5 -0
- package/lib/locales/index.d.ts +30 -0
- package/lib/locales/pt-br.d.ts +5 -0
- package/lib/locales/vi.d.ts +5 -0
- package/lib/locales/zh-cn.d.ts +5 -0
- package/lib/{popover-51mwx3UY.cjs → popover-BdLwAlrM.cjs} +1 -1
- package/lib/{popover-DMPRgXD3.js → popover-BzJyaFvy.js} +1 -1
- package/lib/{renderNodeView-BJSrgyGj.js → renderNodeView-dj6AaFSX.js} +2 -2
- package/lib/{separator-kB9YUfeO.cjs → separator-CoQaQmFK.cjs} +1 -1
- package/lib/{separator-CpqX9KQC.js → separator-D-fyzbfx.js} +14 -14
- package/lib/style.css +1 -1
- package/lib/types.d.ts +5 -5
- package/lib/{updatePosition-e90ZrFWW.js → updatePosition-C294Pixi.js} +2 -2
- package/lib/utils/customEvents/events.constant.d.ts +1 -0
- package/package.json +14 -1
- package/lib/Iframe-B_a_AoZc.cjs +0 -1
- package/lib/Katex-bIhj82VV.cjs +0 -4
- package/lib/Mermaid-DiOdgQv1.cjs +0 -2
- package/lib/SlashCommandNodeView-CLimjqhb.cjs +0 -1
- package/lib/dom-dataset-BqoJhJXt.cjs +0 -1
- package/lib/dom-dataset-CIEeltF6.js +0 -47
- package/lib/index-BrxL7y9p.cjs +0 -1
- package/lib/index-Bt9LiArC.cjs +0 -10
- package/lib/select-B7v1Scb-.cjs +0 -1
- package/lib/select-BxFDMaZi.js +0 -120
- package/lib/textarea-C5DsgzSy.js +0 -20
- package/lib/textarea-bQSzjqg3.cjs +0 -1
package/lib/bubble.js
CHANGED
|
@@ -1,46 +1,44 @@
|
|
|
1
1
|
import { jsx as f, Fragment as I, jsxs as x } from "react/jsx-runtime";
|
|
2
|
-
import { a0 as Gr, d as ws, E as Ce, a1 as Jr, a2 as qr, a3 as bs, a4 as _e, a5 as Xr, Q as ti, O as xs, v as Me, F as Re, T as ei, A as Zr, u as Qr, a6 as to, a7 as eo } from "./clsx-
|
|
3
|
-
import { f as ys, s as Ss, o as ks, a as vs, b as Cs, d as _s, h as Es, e as Ts, c as ni } from "./index-
|
|
2
|
+
import { a0 as Gr, d as ws, E as Ce, a1 as Jr, a2 as qr, a3 as bs, a4 as _e, a5 as Xr, Q as ti, O as xs, v as Me, F as Re, T as ei, A as Zr, u as Qr, a6 as to, a7 as eo } from "./clsx-BUPZHhq3.js";
|
|
3
|
+
import { f as ys, s as Ss, o as ks, a as vs, b as Cs, d as _s, h as Es, e as Ts, c as ni } from "./index-D4M4hrH4.js";
|
|
4
4
|
import { Plugin as Ee, PluginKey as ne, NodeSelection as no, TextSelection as io, SelectionRange as so, Selection as ro } from "@tiptap/pm/state";
|
|
5
|
-
import { C as oo, T as lo } from "./Table-
|
|
5
|
+
import { C as oo, T as lo } from "./Table-IH34r4jd.js";
|
|
6
6
|
import Ds, { useRef as Xt, useEffect as pt, useState as F, useCallback as M, useMemo as yt, Fragment as ii } from "react";
|
|
7
7
|
import { createPortal as As } from "react-dom";
|
|
8
|
-
import {
|
|
9
|
-
import { S as mo, a as wo, b as bo, c as xo, d as yo } from "./select-BxFDMaZi.js";
|
|
8
|
+
import { G as Z, h as W, D as ln, m as cn, A as y, n as an, o as hn, L as Tt, S as co, p as ao, q as ho, r as uo, s as fo, j as jt, t as dn, B as Bt, $ as po, v as go, E as mo, z as wo, a0 as bo, U as Ei, y as xo, a1 as yo, I as tt } from "./index-CnKgiZFQ.js";
|
|
10
9
|
import { Callout as Ne } from "./Callout.js";
|
|
11
|
-
import { u as ie, K as Un, s as So } from "./Katex-
|
|
12
|
-
import { u as Y, n as Ye, V as
|
|
10
|
+
import { u as ie, K as Un, s as So } from "./Katex-Bp6AnIUF.js";
|
|
11
|
+
import { u as Y, n as Ye, V as Ti } from "./index-BGd2HiwP.js";
|
|
13
12
|
import { d as se } from "./delete-node-eQHsyyhR.js";
|
|
14
|
-
import { MultipleColumnNode as
|
|
13
|
+
import { MultipleColumnNode as Di } from "./Column.js";
|
|
15
14
|
import "./theme.js";
|
|
16
|
-
import {
|
|
15
|
+
import { S as Dt } from "./separator-D-fyzbfx.js";
|
|
16
|
+
import { C as ko, s as vo, i as Co, D as vn } from "./Drawer-CayP4Ww4.js";
|
|
17
17
|
import { Editor as _o, makeDropdownToolbar as Eo } from "easydrawer";
|
|
18
|
-
import {
|
|
19
|
-
import { P as Is, a as Os, b as Ms } from "./popover-DMPRgXD3.js";
|
|
18
|
+
import { P as Is, a as Os, b as Ms } from "./popover-BzJyaFvy.js";
|
|
20
19
|
import { Excalidraw as ce } from "./Excalidraw.js";
|
|
21
|
-
import { I as ae, g as To } from "./Iframe-
|
|
20
|
+
import { I as ae, g as To } from "./Iframe-C6Sb97KS.js";
|
|
22
21
|
import Do from "katex";
|
|
23
|
-
import { Pencil as Ao, Trash2 as Io, Check as
|
|
24
|
-
import {
|
|
25
|
-
import { L as Ii, a as Oo, R as Mo } from "./LinkEditBlock-xnokk4G7.js";
|
|
22
|
+
import { Pencil as Ao, Trash2 as Io, Check as Ai } from "lucide-react";
|
|
23
|
+
import { L as Ii, a as Oo, R as Mo } from "./LinkEditBlock-BiHumIJR.js";
|
|
26
24
|
import { ImageGif as Ro } from "./ImageGif.js";
|
|
27
|
-
import { M as Rs, E as No } from "./Mermaid-
|
|
25
|
+
import { M as Rs, E as No } from "./Mermaid-Dlx0XTJj.js";
|
|
28
26
|
import { RichTextBold as Uo } from "./Bold.js";
|
|
29
27
|
import { RichTextCode as Lo } from "./Code.js";
|
|
30
|
-
import "./index-
|
|
28
|
+
import "./index-Dl3OjzmR.js";
|
|
31
29
|
import { RichTextColor as Po } from "./Color.js";
|
|
32
30
|
import { RichTextHighlight as Bo } from "./Highlight.js";
|
|
33
31
|
import { RichTextItalic as Vo } from "./Italic.js";
|
|
34
|
-
import { r as Ho } from "./SlashCommandNodeView-
|
|
32
|
+
import { r as Ho } from "./SlashCommandNodeView-DzmsYaNc.js";
|
|
35
33
|
import { RichTextStrike as $o } from "./Strike.js";
|
|
36
34
|
import { RichTextAlign as Fo, TextAlign as zo } from "./TextAlign.js";
|
|
37
35
|
import { RichTextUnderline as Wo } from "./TextUnderline.js";
|
|
38
|
-
import { T as Oi, F as Ko } from "./Twitter-
|
|
36
|
+
import { T as Oi, F as Ko } from "./Twitter-FVQKPaq6.js";
|
|
39
37
|
import { DecorationSet as Mi, Decoration as jo } from "@tiptap/pm/view";
|
|
40
38
|
import { NodeRange as Yo } from "@tiptap/pm/model";
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
39
|
+
import { D as Go, a as Jo, b as qo, f as mt, d as Xo, g as Ri, h as Ni, i as Ui, j as Li } from "./dropdown-menu-Ce2TorkG.js";
|
|
40
|
+
import { Clear as Zo } from "./Clear.js";
|
|
41
|
+
import { I as Qo, a as Pi, s as Bi } from "./Indent-CcFe8py3.js";
|
|
44
42
|
function tl(e, t) {
|
|
45
43
|
const n = Math.min(e.top, t.top), i = Math.max(e.bottom, t.bottom), s = Math.min(e.left, t.left), o = Math.max(e.right, t.right) - s, l = i - n, c = s, a = n;
|
|
46
44
|
return new DOMRect(c, a, o, l);
|
|
@@ -458,7 +456,7 @@ const il = [
|
|
|
458
456
|
{ value: "warning", label: "Warning", icon: "TriangleAlert" },
|
|
459
457
|
{ value: "caution", label: "Caution", icon: "OctagonAlert" }
|
|
460
458
|
];
|
|
461
|
-
function
|
|
459
|
+
function Yd() {
|
|
462
460
|
const e = Z(), t = W(), { t: n } = Y(), { type: i, title: s, body: r } = ie(t, Ne.name, {
|
|
463
461
|
type: "note",
|
|
464
462
|
title: "",
|
|
@@ -493,15 +491,15 @@ function Jd() {
|
|
|
493
491
|
/* @__PURE__ */ x("div", { className: "richtext-space-y-4 richtext-py-4", children: [
|
|
494
492
|
/* @__PURE__ */ x("div", { className: "richtext-space-y-2", children: [
|
|
495
493
|
/* @__PURE__ */ f(Tt, { children: n("editor.callout.dialog.type") }),
|
|
496
|
-
/* @__PURE__ */ x(
|
|
497
|
-
/* @__PURE__ */ f(
|
|
498
|
-
|
|
494
|
+
/* @__PURE__ */ x(co, { onValueChange: a, value: c, children: [
|
|
495
|
+
/* @__PURE__ */ f(ao, { children: /* @__PURE__ */ f(
|
|
496
|
+
ho,
|
|
499
497
|
{
|
|
500
498
|
className: "richtext-text-accent",
|
|
501
499
|
placeholder: n("editor.callout.dialog.type.placeholder")
|
|
502
500
|
}
|
|
503
501
|
) }),
|
|
504
|
-
/* @__PURE__ */ f(
|
|
502
|
+
/* @__PURE__ */ f(uo, { children: il.map((_) => /* @__PURE__ */ f(fo, { value: _.value, children: n(`editor.callout.type.${_.value}`) }, _.value)) })
|
|
505
503
|
] })
|
|
506
504
|
] }),
|
|
507
505
|
/* @__PURE__ */ x("div", { className: "richtext-space-y-2", children: [
|
|
@@ -540,8 +538,8 @@ function Jd() {
|
|
|
540
538
|
}
|
|
541
539
|
) : /* @__PURE__ */ f(I, {});
|
|
542
540
|
}
|
|
543
|
-
function
|
|
544
|
-
const e = Z(), t = W(), { t: n } = Y(), i = M(() => t.isActive(
|
|
541
|
+
function Gd() {
|
|
542
|
+
const e = Z(), t = W(), { t: n } = Y(), i = M(() => t.isActive(Di.name), [t]), s = M(() => se(Di.name, t), [t]), r = M(() => t.chain().focus().addColBefore().run(), [t]), o = M(() => t.chain().focus().addColAfter().run(), [t]), l = M(() => t.chain().focus().deleteCol().run(), [t]);
|
|
545
543
|
return e ? /* @__PURE__ */ f(
|
|
546
544
|
Q,
|
|
547
545
|
{
|
|
@@ -744,8 +742,8 @@ function dl(e, t) {
|
|
|
744
742
|
componentProps: {
|
|
745
743
|
tooltip: t(`editor.${s.replace("-", ".")}.tooltip`),
|
|
746
744
|
icon: i[r],
|
|
747
|
-
action: () => e.commands.updateVideo({ width:
|
|
748
|
-
isActive: () => e.isActive("video", { width:
|
|
745
|
+
action: () => e.commands.updateVideo({ width: Ti[s] }),
|
|
746
|
+
isActive: () => e.isActive("video", { width: Ti[s] })
|
|
749
747
|
}
|
|
750
748
|
}));
|
|
751
749
|
}
|
|
@@ -903,7 +901,7 @@ function wl({ editor: e, attrs: t, extension: n }) {
|
|
|
903
901
|
const D = r.current.toSVG(), S = D.outerHTML, k = `drawer-${vo()}.svg`;
|
|
904
902
|
let N = Co(D.outerHTML);
|
|
905
903
|
if (a) {
|
|
906
|
-
const H =
|
|
904
|
+
const H = po(N, k);
|
|
907
905
|
N = await a(H);
|
|
908
906
|
}
|
|
909
907
|
e == null || e.chain().focus().setDrawer(
|
|
@@ -1012,8 +1010,8 @@ function bl({ item: e, disabled: t, editor: n }) {
|
|
|
1012
1010
|
}
|
|
1013
1011
|
) }) : /* @__PURE__ */ f(I, {});
|
|
1014
1012
|
}
|
|
1015
|
-
function
|
|
1016
|
-
const { lang: e, t } = Y(), n = Z(), i = W(), s = ie(i, vn.name), r =
|
|
1013
|
+
function Jd() {
|
|
1014
|
+
const { lang: e, t } = Y(), n = Z(), i = W(), s = ie(i, vn.name), r = go(vn.name), o = ({ editor: c }) => {
|
|
1017
1015
|
const { selection: a } = c.view.state, { $from: h, to: d } = a;
|
|
1018
1016
|
let u = !1;
|
|
1019
1017
|
return c.view.state.doc.nodesBetween(h.pos, d, (p) => {
|
|
@@ -1103,7 +1101,7 @@ function xl(e) {
|
|
|
1103
1101
|
s.disconnect();
|
|
1104
1102
|
}), { width: Ut.get("width") };
|
|
1105
1103
|
}
|
|
1106
|
-
function
|
|
1104
|
+
function qd() {
|
|
1107
1105
|
const e = Z(), t = W(), { t: n } = Y(), { width: i } = xl(t), s = ie(t, ce.name, {
|
|
1108
1106
|
defaultShowPicker: !1,
|
|
1109
1107
|
createUser: "",
|
|
@@ -1115,8 +1113,8 @@ function Zd() {
|
|
|
1115
1113
|
},
|
|
1116
1114
|
[t]
|
|
1117
1115
|
), h = M(() => {
|
|
1118
|
-
const p =
|
|
1119
|
-
|
|
1116
|
+
const p = mo.EXCALIDRAW(t.id);
|
|
1117
|
+
wo(p, s);
|
|
1120
1118
|
}, [t, s]), d = M(() => t.isActive(ce.name), [t]), u = M(() => se(ce.name, t), [t]);
|
|
1121
1119
|
return pt(() => {
|
|
1122
1120
|
r && (h(), t.chain().updateAttributes(ce.name, { defaultShowPicker: !1 }).focus().run());
|
|
@@ -1135,7 +1133,7 @@ function Zd() {
|
|
|
1135
1133
|
}
|
|
1136
1134
|
) : /* @__PURE__ */ f(I, {});
|
|
1137
1135
|
}
|
|
1138
|
-
function
|
|
1136
|
+
function Xd() {
|
|
1139
1137
|
const e = Z(), t = W(), { t: n } = Y(), { width: i, height: s, src: r } = ie(t, ae.name, {
|
|
1140
1138
|
width: 0,
|
|
1141
1139
|
height: 0,
|
|
@@ -1181,7 +1179,7 @@ function Qd() {
|
|
|
1181
1179
|
/* @__PURE__ */ x(ln, { onOpenChange: l, open: o, children: [
|
|
1182
1180
|
/* @__PURE__ */ f(cn, { asChild: !0, children: /* @__PURE__ */ f(y, { icon: "Pencil", tooltip: "Open Edit Link" }) }),
|
|
1183
1181
|
/* @__PURE__ */ x(an, { children: [
|
|
1184
|
-
/* @__PURE__ */ f(
|
|
1182
|
+
/* @__PURE__ */ f(bo, { children: /* @__PURE__ */ f(hn, { children: "Edit Link Iframe" }) }),
|
|
1185
1183
|
/* @__PURE__ */ f(
|
|
1186
1184
|
jt,
|
|
1187
1185
|
{
|
|
@@ -1234,7 +1232,7 @@ function yl({ children: e, visible: t, toggleVisible: n }) {
|
|
|
1234
1232
|
/* @__PURE__ */ x("div", { className: "richtext-flex-1", children: [
|
|
1235
1233
|
/* @__PURE__ */ f(Tt, { className: "mb-[6px]", children: "Expression" }),
|
|
1236
1234
|
/* @__PURE__ */ f(
|
|
1237
|
-
|
|
1235
|
+
Ei,
|
|
1238
1236
|
{
|
|
1239
1237
|
autoFocus: !0,
|
|
1240
1238
|
className: "richtext-mb-[10px]",
|
|
@@ -1250,7 +1248,7 @@ function yl({ children: e, visible: t, toggleVisible: n }) {
|
|
|
1250
1248
|
),
|
|
1251
1249
|
/* @__PURE__ */ f(Tt, { className: "mb-[6px]", children: "Macros" }),
|
|
1252
1250
|
/* @__PURE__ */ f(
|
|
1253
|
-
|
|
1251
|
+
Ei,
|
|
1254
1252
|
{
|
|
1255
1253
|
onChange: (m) => d(m.target.value),
|
|
1256
1254
|
placeholder: "Macros",
|
|
@@ -1280,7 +1278,7 @@ function yl({ children: e, visible: t, toggleVisible: n }) {
|
|
|
1280
1278
|
] })
|
|
1281
1279
|
] });
|
|
1282
1280
|
}
|
|
1283
|
-
function
|
|
1281
|
+
function Zd() {
|
|
1284
1282
|
const e = Z(), t = W(), [n, i] = F(!1), s = M(() => t.isActive(Un.name), [t]), r = M(() => se(Un.name, t), [t]);
|
|
1285
1283
|
return e ? /* @__PURE__ */ f(
|
|
1286
1284
|
Q,
|
|
@@ -1335,7 +1333,7 @@ function Sl(e) {
|
|
|
1335
1333
|
)
|
|
1336
1334
|
] });
|
|
1337
1335
|
}
|
|
1338
|
-
function
|
|
1336
|
+
function Qd() {
|
|
1339
1337
|
const e = Z(), t = W(), [n, i] = F(!1), s = ie(t, Ii.name), r = s == null ? void 0 : s.href, o = M(({ editor: h }) => h.isActive(Ii.name), []), l = (h, d, u) => {
|
|
1340
1338
|
const p = t.state.selection, { from: g } = p, m = (d == null ? void 0 : d.length) ?? 0, w = g + m;
|
|
1341
1339
|
t.chain().extendMarkRange("link").insertContent({
|
|
@@ -1395,15 +1393,15 @@ function si({ item: e, disabled: t, editor: n }) {
|
|
|
1395
1393
|
) }) : /* @__PURE__ */ f(I, {});
|
|
1396
1394
|
}
|
|
1397
1395
|
function kl(e) {
|
|
1398
|
-
return e.type.name ===
|
|
1396
|
+
return e.type.name === xo.name;
|
|
1399
1397
|
}
|
|
1400
1398
|
function vl(e) {
|
|
1401
1399
|
return e.type.name === Ro.name;
|
|
1402
1400
|
}
|
|
1403
1401
|
function Cl(e) {
|
|
1404
|
-
return e.type.name ===
|
|
1402
|
+
return e.type.name === yo.name;
|
|
1405
1403
|
}
|
|
1406
|
-
function
|
|
1404
|
+
function tu() {
|
|
1407
1405
|
const { lang: e, t } = Y(), n = Z(), i = W(), s = ({ editor: o }) => {
|
|
1408
1406
|
const { selection: l } = o.view.state, { $from: c, to: a } = l;
|
|
1409
1407
|
let h = !1;
|
|
@@ -1423,7 +1421,7 @@ function nu() {
|
|
|
1423
1421
|
}
|
|
1424
1422
|
) : /* @__PURE__ */ f(I, {});
|
|
1425
1423
|
}
|
|
1426
|
-
function
|
|
1424
|
+
function eu() {
|
|
1427
1425
|
const { lang: e, t } = Y(), n = Z(), i = W(), s = ({ editor: o }) => {
|
|
1428
1426
|
const { selection: l } = o.view.state, { $from: c, to: a } = l;
|
|
1429
1427
|
let h = !1;
|
|
@@ -1443,7 +1441,7 @@ function iu() {
|
|
|
1443
1441
|
}
|
|
1444
1442
|
) : /* @__PURE__ */ f(I, {});
|
|
1445
1443
|
}
|
|
1446
|
-
function
|
|
1444
|
+
function nu() {
|
|
1447
1445
|
const { t: e } = Y(), t = Z(), n = W(), i = ({ editor: r }) => {
|
|
1448
1446
|
const { selection: o } = r.view.state, { $from: l, to: c } = o;
|
|
1449
1447
|
let a = !1;
|
|
@@ -1492,7 +1490,7 @@ function El(e) {
|
|
|
1492
1490
|
return r = { node: o, pos: l }, !1;
|
|
1493
1491
|
}), r;
|
|
1494
1492
|
}
|
|
1495
|
-
function
|
|
1493
|
+
function iu() {
|
|
1496
1494
|
const { lang: e, t } = Y(), n = W(), i = ({ editor: r }) => {
|
|
1497
1495
|
if (!r.isEditable)
|
|
1498
1496
|
return !1;
|
|
@@ -1536,7 +1534,7 @@ function ru() {
|
|
|
1536
1534
|
}
|
|
1537
1535
|
) : /* @__PURE__ */ f(I, {});
|
|
1538
1536
|
}
|
|
1539
|
-
function
|
|
1537
|
+
function su({ hiddenActions: e = [] }) {
|
|
1540
1538
|
var m, w, b, _, V, E, P, D, S, k, N, H, nt, Rt, Nt, v, gt, Oe;
|
|
1541
1539
|
const { t } = Y(), n = Z(), i = W(), s = ({ editor: Kt }) => Xr(Kt.view.state, lo.name), r = (Kt) => e.includes(Kt);
|
|
1542
1540
|
function o() {
|
|
@@ -1740,8 +1738,8 @@ function Tl() {
|
|
|
1740
1738
|
},
|
|
1741
1739
|
children: [
|
|
1742
1740
|
/* @__PURE__ */ x("div", { className: "!richtext-min-w-[20px]", children: [
|
|
1743
|
-
l && /* @__PURE__ */ f(
|
|
1744
|
-
!r && o.label === e("editor.paragraph.tooltip") && !l && /* @__PURE__ */ f(
|
|
1741
|
+
l && /* @__PURE__ */ f(Ai, { size: 16 }),
|
|
1742
|
+
!r && o.label === e("editor.paragraph.tooltip") && !l && /* @__PURE__ */ f(Ai, { size: 16 })
|
|
1745
1743
|
] }),
|
|
1746
1744
|
/* @__PURE__ */ x("div", { className: "richtext-flex richtext-items-center richtext-gap-1", children: [
|
|
1747
1745
|
o.iconName && /* @__PURE__ */ f(
|
|
@@ -1790,7 +1788,7 @@ function Dl() {
|
|
|
1790
1788
|
/* @__PURE__ */ f(Fo, {})
|
|
1791
1789
|
] });
|
|
1792
1790
|
}
|
|
1793
|
-
function
|
|
1791
|
+
function ru({ buttonBubble: e }) {
|
|
1794
1792
|
const t = W(), n = Z(), i = ({ editor: s }) => {
|
|
1795
1793
|
const { selection: r } = s.view.state, { $from: o, to: l } = r;
|
|
1796
1794
|
return o.pos === l ? !1 : r instanceof io;
|
|
@@ -1806,7 +1804,7 @@ function lu({ buttonBubble: e }) {
|
|
|
1806
1804
|
}
|
|
1807
1805
|
) : /* @__PURE__ */ f(I, {});
|
|
1808
1806
|
}
|
|
1809
|
-
function
|
|
1807
|
+
function ou() {
|
|
1810
1808
|
const { t: e } = Y(), t = Z(), n = W(), [i, s] = F(!1), r = M(({ editor: c }) => c.isActive(Oi.name), []), o = (c) => {
|
|
1811
1809
|
n.commands.updateTweet({ src: c }), s(!1);
|
|
1812
1810
|
}, l = M(() => se(Oi.name, n), [n]);
|
|
@@ -9306,14 +9304,14 @@ var sd = (e) => {
|
|
|
9306
9304
|
}
|
|
9307
9305
|
);
|
|
9308
9306
|
}, rd = sd;
|
|
9309
|
-
function
|
|
9307
|
+
function cu() {
|
|
9310
9308
|
var D, S, k, N, H, nt, Rt, Nt;
|
|
9311
9309
|
const e = W(), t = Z(), { t: n } = Y(), [i, s] = F(null), [r, o] = F(-1), [l, c] = F(!1), a = (S = (D = e == null ? void 0 : e.extensionManager) == null ? void 0 : D.extensions) == null ? void 0 : S.some(
|
|
9312
9310
|
(v) => (v == null ? void 0 : v.name) === zo.name
|
|
9313
9311
|
), h = (N = (k = e == null ? void 0 : e.extensionManager) == null ? void 0 : k.extensions) == null ? void 0 : N.some(
|
|
9314
|
-
(v) => (v == null ? void 0 : v.name) ===
|
|
9312
|
+
(v) => (v == null ? void 0 : v.name) === Qo.name
|
|
9315
9313
|
), d = (nt = (H = e == null ? void 0 : e.extensionManager) == null ? void 0 : H.extensions) == null ? void 0 : nt.some(
|
|
9316
|
-
(v) => (v == null ? void 0 : v.name) ===
|
|
9314
|
+
(v) => (v == null ? void 0 : v.name) === Zo.name
|
|
9317
9315
|
);
|
|
9318
9316
|
function u() {
|
|
9319
9317
|
const v = e.chain();
|
|
@@ -9331,11 +9329,11 @@ function hu() {
|
|
|
9331
9329
|
e.commands.setTextAlign(v);
|
|
9332
9330
|
}
|
|
9333
9331
|
function w() {
|
|
9334
|
-
const v =
|
|
9332
|
+
const v = Bi(e.state.tr, r, 1);
|
|
9335
9333
|
v.setMeta("hideDragHandle", !0), e.view.dispatch && e.view.dispatch(v);
|
|
9336
9334
|
}
|
|
9337
9335
|
function b() {
|
|
9338
|
-
const v =
|
|
9336
|
+
const v = Bi(e.state.tr, r, -1);
|
|
9339
9337
|
e.view.dispatch && e.view.dispatch(v);
|
|
9340
9338
|
}
|
|
9341
9339
|
function _() {
|
|
@@ -9384,10 +9382,10 @@ function hu() {
|
|
|
9384
9382
|
}
|
|
9385
9383
|
}
|
|
9386
9384
|
),
|
|
9387
|
-
/* @__PURE__ */ x(
|
|
9388
|
-
/* @__PURE__ */ f(
|
|
9385
|
+
/* @__PURE__ */ x(Go, { onOpenChange: P, open: l, children: [
|
|
9386
|
+
/* @__PURE__ */ f(Jo, { className: "richtext-pointer-events-none" }),
|
|
9389
9387
|
/* @__PURE__ */ x(
|
|
9390
|
-
|
|
9388
|
+
qo,
|
|
9391
9389
|
{
|
|
9392
9390
|
align: "start",
|
|
9393
9391
|
className: "richtext-w-48",
|
|
@@ -9432,13 +9430,13 @@ function hu() {
|
|
|
9432
9430
|
/* @__PURE__ */ f(tt, { name: "Copy" }),
|
|
9433
9431
|
/* @__PURE__ */ f("span", { children: n("editor.copy") })
|
|
9434
9432
|
] }),
|
|
9435
|
-
a || h ? /* @__PURE__ */ f(
|
|
9436
|
-
a ? /* @__PURE__ */ x(
|
|
9437
|
-
/* @__PURE__ */ x(
|
|
9433
|
+
a || h ? /* @__PURE__ */ f(Xo, {}) : null,
|
|
9434
|
+
a ? /* @__PURE__ */ x(Ri, { children: [
|
|
9435
|
+
/* @__PURE__ */ x(Ni, { className: "richtext-flex richtext-gap-3", children: [
|
|
9438
9436
|
/* @__PURE__ */ f(tt, { name: "AlignCenter" }),
|
|
9439
9437
|
/* @__PURE__ */ f("span", { children: n("editor.textalign.tooltip") })
|
|
9440
9438
|
] }),
|
|
9441
|
-
/* @__PURE__ */ f(
|
|
9439
|
+
/* @__PURE__ */ f(Ui, { children: /* @__PURE__ */ x(Li, { children: [
|
|
9442
9440
|
/* @__PURE__ */ x(
|
|
9443
9441
|
mt,
|
|
9444
9442
|
{
|
|
@@ -9474,17 +9472,17 @@ function hu() {
|
|
|
9474
9472
|
)
|
|
9475
9473
|
] }) })
|
|
9476
9474
|
] }) : null,
|
|
9477
|
-
h ? /* @__PURE__ */ x(
|
|
9478
|
-
/* @__PURE__ */ x(
|
|
9475
|
+
h ? /* @__PURE__ */ x(Ri, { children: [
|
|
9476
|
+
/* @__PURE__ */ x(Ni, { className: "richtext-flex richtext-gap-3", children: [
|
|
9479
9477
|
/* @__PURE__ */ f(tt, { name: "IndentIncrease" }),
|
|
9480
9478
|
/* @__PURE__ */ f("span", { children: n("editor.indent") })
|
|
9481
9479
|
] }),
|
|
9482
|
-
/* @__PURE__ */ f(
|
|
9480
|
+
/* @__PURE__ */ f(Ui, { children: /* @__PURE__ */ x(Li, { children: [
|
|
9483
9481
|
/* @__PURE__ */ x(
|
|
9484
9482
|
mt,
|
|
9485
9483
|
{
|
|
9486
9484
|
className: "richtext-flex richtext-gap-3",
|
|
9487
|
-
disabled: ((Rt = i == null ? void 0 : i.attrs) == null ? void 0 : Rt.indent) >=
|
|
9485
|
+
disabled: ((Rt = i == null ? void 0 : i.attrs) == null ? void 0 : Rt.indent) >= Pi.max,
|
|
9488
9486
|
onClick: w,
|
|
9489
9487
|
children: [
|
|
9490
9488
|
/* @__PURE__ */ f(tt, { name: "IndentIncrease" }),
|
|
@@ -9496,7 +9494,7 @@ function hu() {
|
|
|
9496
9494
|
mt,
|
|
9497
9495
|
{
|
|
9498
9496
|
className: "richtext-flex richtext-gap-3",
|
|
9499
|
-
disabled: ((Nt = i == null ? void 0 : i.attrs) == null ? void 0 : Nt.indent) <=
|
|
9497
|
+
disabled: ((Nt = i == null ? void 0 : i.attrs) == null ? void 0 : Nt.indent) <= Pi.min,
|
|
9500
9498
|
onClick: b,
|
|
9501
9499
|
children: [
|
|
9502
9500
|
/* @__PURE__ */ f(tt, { name: "IndentDecrease" }),
|
|
@@ -9515,19 +9513,19 @@ function hu() {
|
|
|
9515
9513
|
);
|
|
9516
9514
|
}
|
|
9517
9515
|
export {
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
|
|
9516
|
+
Yd as RichTextBubbleCallout,
|
|
9517
|
+
Gd as RichTextBubbleColumns,
|
|
9518
|
+
Jd as RichTextBubbleDrawer,
|
|
9519
|
+
qd as RichTextBubbleExcalidraw,
|
|
9520
|
+
Xd as RichTextBubbleIframe,
|
|
9521
|
+
tu as RichTextBubbleImage,
|
|
9522
|
+
eu as RichTextBubbleImageGif,
|
|
9523
|
+
Zd as RichTextBubbleKatex,
|
|
9524
|
+
Qd as RichTextBubbleLink,
|
|
9525
|
+
cu as RichTextBubbleMenuDragHandle,
|
|
9526
|
+
iu as RichTextBubbleMermaid,
|
|
9527
|
+
su as RichTextBubbleTable,
|
|
9528
|
+
ru as RichTextBubbleText,
|
|
9529
|
+
ou as RichTextBubbleTwitter,
|
|
9530
|
+
nu as RichTextBubbleVideo
|
|
9533
9531
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function RenderDialogUploadAttachment(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { jsx as c, jsxs as x } from "react/jsx-runtime";
|
|
|
2
2
|
import * as t from "@radix-ui/react-dropdown-menu";
|
|
3
3
|
import { ChevronRight as d, Check as h, Circle as l } from "lucide-react";
|
|
4
4
|
import * as s from "react";
|
|
5
|
-
import { c as o } from "./index-
|
|
5
|
+
import { c as o } from "./index-CnKgiZFQ.js";
|
|
6
6
|
const R = t.Root, I = t.Trigger, S = t.Portal, C = t.Sub, m = s.forwardRef(({ className: e, inset: r, children: i, ...a }, n) => /* @__PURE__ */ x(
|
|
7
7
|
t.SubTrigger,
|
|
8
8
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),w=require("@radix-ui/react-dropdown-menu"),d=require("lucide-react"),g=require("react"),a=require("./index-
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),w=require("@radix-ui/react-dropdown-menu"),d=require("lucide-react"),g=require("react"),a=require("./index-BynXHtjJ.cjs");function x(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return r.default=t,Object.freeze(r)}const e=x(w),n=x(g),y=e.Root,N=e.Trigger,D=e.Portal,M=e.Sub,h=n.forwardRef(({className:t,inset:r,children:i,...o},s)=>c.jsxs(e.SubTrigger,{ref:s,className:a.cn("richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none focus:richtext-bg-accent data-[state=open]:richtext-bg-accent",r&&"richtext-pl-8",t),...o,children:[i,c.jsx(d.ChevronRight,{className:"richtext-ml-auto richtext-size-4"})]}));h.displayName=e.SubTrigger.displayName;const l=n.forwardRef(({className:t,...r},i)=>c.jsx(e.SubContent,{"data-richtext-portal":!0,ref:i,className:a.cn("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border !richtext-border-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-lg 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),...r}));l.displayName=e.SubContent.displayName;const u=n.forwardRef(({className:t,sideOffset:r=4,...i},o)=>c.jsx(e.Portal,{"data-richtext-portal":!0,children:c.jsx(e.Content,{"data-richtext-portal":!0,ref:o,sideOffset:r,className:a.cn("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border !richtext-border-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t),...i})}));u.displayName=e.Content.displayName;const p=n.forwardRef(({className:t,inset:r,...i},o)=>c.jsx(e.Item,{ref:o,className:a.cn("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",r&&"richtext-pl-8",t),...i}));p.displayName=e.Item.displayName;const m=n.forwardRef(({className:t,children:r,checked:i,...o},s)=>c.jsxs(e.CheckboxItem,{checked:i,ref:s,className:a.cn("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t),...o,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:c.jsx(e.ItemIndicator,{children:c.jsx(d.Check,{className:"richtext-size-4"})})}),r]}));m.displayName=e.CheckboxItem.displayName;const j=n.forwardRef(({className:t,children:r,...i},o)=>c.jsxs(e.RadioItem,{ref:o,className:a.cn("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t),...i,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:c.jsx(e.ItemIndicator,{children:c.jsx(d.Circle,{className:"richtext-size-2 richtext-fill-current"})})}),r]}));j.displayName=e.RadioItem.displayName;const S=n.forwardRef(({className:t,inset:r,...i},o)=>c.jsx(e.Label,{ref:o,className:a.cn("richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",r&&"richtext-pl-8",t),...i}));S.displayName=e.Label.displayName;const f=n.forwardRef(({className:t,...r},i)=>c.jsx(e.Separator,{className:a.cn("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",t),ref:i,...r}));f.displayName=e.Separator.displayName;function b({className:t,...r}){return c.jsx("span",{className:a.cn("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",t),...r})}b.displayName="DropdownMenuShortcut";exports.DropdownMenu=y;exports.DropdownMenuCheckboxItem=m;exports.DropdownMenuContent=u;exports.DropdownMenuItem=p;exports.DropdownMenuPortal=D;exports.DropdownMenuSeparator=f;exports.DropdownMenuShortcut=b;exports.DropdownMenuSub=M;exports.DropdownMenuSubContent=l;exports.DropdownMenuSubTrigger=h;exports.DropdownMenuTrigger=N;
|
|
@@ -3,21 +3,32 @@ import { GeneralOptions } from '../../types';
|
|
|
3
3
|
declare module "@tiptap/core" {
|
|
4
4
|
interface Commands<ReturnType> {
|
|
5
5
|
attachment: {
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Insert a fully-resolved attachment node.
|
|
8
|
+
* All attrs (id, fileName, fileSize, fileType, fileExt) must be provided
|
|
9
|
+
* — the node is never inserted in an "empty / pending" state any more.
|
|
10
|
+
*/
|
|
11
|
+
setAttachment: (attrs: {
|
|
12
|
+
id: string;
|
|
13
|
+
fileName: string;
|
|
14
|
+
fileSize: number;
|
|
15
|
+
fileType: string;
|
|
16
|
+
fileExt: string;
|
|
17
|
+
}) => ReturnType;
|
|
7
18
|
};
|
|
8
19
|
}
|
|
9
20
|
}
|
|
10
21
|
export interface AttachmentOptions extends GeneralOptions<AttachmentOptions> {
|
|
11
22
|
/**
|
|
12
|
-
* Called when the user picks a file
|
|
13
|
-
*
|
|
14
|
-
*
|
|
23
|
+
* Called when the user picks a file inside the attachment dialog.
|
|
24
|
+
* Must resolve to the UUID / primary key your backend assigned to the
|
|
25
|
+
* uploaded asset. This id is the only value stored on the node.
|
|
15
26
|
*/
|
|
16
27
|
upload?: (file: File) => Promise<string>;
|
|
17
28
|
/**
|
|
18
29
|
* Called when the user clicks the download button on an attachment.
|
|
19
|
-
* Receives the node's metadata so your app can fetch a signed /
|
|
20
|
-
* download URL on demand and open it.
|
|
30
|
+
* Receives the node's metadata so your app can fetch a signed /
|
|
31
|
+
* authenticated download URL on demand and open it.
|
|
21
32
|
*
|
|
22
33
|
* This callback is REQUIRED for downloads to work — there is no URL stored
|
|
23
34
|
* on the node, so no automatic browser fallback is possible.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function NodeViewAttachment({ editor, node,
|
|
1
|
+
export declare function NodeViewAttachment({ editor, node, deleteNode, extension, }: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
import { GeneralOptions } from '../../types';
|
|
3
|
+
export * from './components/RichTextPaywallSeparator';
|
|
4
|
+
/**
|
|
5
|
+
* Options for the PaywallSeparator extension
|
|
6
|
+
*/
|
|
7
|
+
export interface PaywallSeparatorOptions extends GeneralOptions<PaywallSeparatorOptions> {
|
|
8
|
+
/** HTML attributes to apply to the paywall separator */
|
|
9
|
+
HTMLAttributes: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
declare module "@tiptap/core" {
|
|
12
|
+
interface Commands<ReturnType> {
|
|
13
|
+
paywallSeparator: {
|
|
14
|
+
/**
|
|
15
|
+
* Insert a paywall separator at the current selection
|
|
16
|
+
* Only one paywall separator is allowed per document
|
|
17
|
+
*/
|
|
18
|
+
insertPaywall: () => ReturnType;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* PaywallSeparator extension for TipTap editor
|
|
24
|
+
*
|
|
25
|
+
* Creates a block-level node that acts as a paywall separator, similar to Patreon's paywall line.
|
|
26
|
+
* The separator visually divides free content from premium content.
|
|
27
|
+
*
|
|
28
|
+
* Features:
|
|
29
|
+
* - Block-level node that can be inserted anywhere in the document
|
|
30
|
+
* - Prevents multiple paywall separators in a single document
|
|
31
|
+
* - Serializes to HTML as `<hr data-paywall="true" />`
|
|
32
|
+
* - Custom NodeView with visual overlay for content creators
|
|
33
|
+
* - Draggable and insertable via commands
|
|
34
|
+
*/
|
|
35
|
+
export declare const PaywallSeparator: Node<PaywallSeparatorOptions, any>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { NodeViewProps } from '@tiptap/react';
|
|
3
|
+
/**
|
|
4
|
+
* PaywallSeparatorView - React NodeView component for the paywall separator
|
|
5
|
+
*
|
|
6
|
+
* In EDITOR mode (editable: true):
|
|
7
|
+
* Renders a styled separator line with a centered "Paywall" badge so
|
|
8
|
+
* content creators can see exactly where the paywall boundary sits.
|
|
9
|
+
* Vertical padding lives on the NodeViewWrapper itself — not on a child —
|
|
10
|
+
* so the DragHandle extension anchors to the same element whose height
|
|
11
|
+
* matches the visible content, keeping the grip icon perfectly centred.
|
|
12
|
+
*
|
|
13
|
+
* In PREVIEW / READ-ONLY mode (editable: false):
|
|
14
|
+
* Renders nothing at all — the node is intentionally invisible to viewers.
|
|
15
|
+
*/
|
|
16
|
+
declare const PaywallSeparatorView: React.FC<NodeViewProps>;
|
|
17
|
+
export default PaywallSeparatorView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function RichTextPaywallSeparator(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaywallSeparator';
|