reactjs-tiptap-editor 1.0.17 → 1.0.18
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-lsIBc9sU.js → ActionMenuButton-BOjCHFTA.js} +6 -6
- package/lib/ActionMenuButton-Df077oOH.cjs +1 -0
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.js +40 -78
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.js +2 -3
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +2 -3
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +2 -3
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +105 -99
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +2 -3
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +2 -3
- package/lib/CodeBlock.cjs +38 -38
- package/lib/CodeBlock.js +1561 -1605
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +2 -2
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +46 -63
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +24 -10
- package/lib/Drawer-DwrlY_lY.cjs +1 -0
- package/lib/Drawer-DxOoRiGQ.js +1099 -0
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +6 -5
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +69 -93
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +99 -110
- package/lib/ExportPdf.cjs +4 -4
- package/lib/ExportPdf.js +4 -13
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +9 -7
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +12 -34
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +12 -27
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +34 -47
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +39 -52
- package/lib/History.cjs +1 -1
- package/lib/History.js +318 -313
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +2 -3
- package/lib/{Iframe-CTajPyzs.js → Iframe-AhNV5WH5.js} +25 -34
- package/lib/Iframe-C6pBw-AF.cjs +1 -0
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +5 -4
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +5 -4
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +63 -91
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +7 -11
- package/lib/{Indent-BGEHlRx_.js → Indent-DZ5PcJA4.js} +3 -7
- package/lib/Indent-Do-X0AsY.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 +2 -3
- package/lib/Katex-CIC9ygbL.cjs +4 -0
- package/lib/{Katex-tMh4bfBb.js → Katex-bIgoenn_.js} +241 -255
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +5 -4
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +13 -21
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/LinkEditBlock-B0ZaACZO.cjs +5 -0
- package/lib/{LinkEditBlock-CA5NhP-m.js → LinkEditBlock-D_cF9fnc.js} +320 -370
- package/lib/MarkdownPaste.cjs +58 -0
- package/lib/MarkdownPaste.js +1656 -0
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.js +22 -17
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.js +118 -142
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +10 -18
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +2 -3
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +68 -133
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +15 -14
- package/lib/{SlashCommandNodeView-CZoM3ZlS.cjs → SlashCommandNodeView-Ba03hlVZ.cjs} +1 -1
- package/lib/{SlashCommandNodeView-DLuqbX2o.js → SlashCommandNodeView-cg0x3NRF.js} +15 -17
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +2 -3
- package/lib/{Table-BC4Lbqzn.js → Table-KqLiT5wG.js} +95 -133
- package/lib/Table-ddU2LSc6.cjs +9 -0
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +2 -3
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +51 -60
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +47 -69
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +2 -3
- package/lib/Twitter-BIiR78Jh.cjs +1 -0
- package/lib/{Twitter-D8Cbgl7g.js → Twitter-C1Lzqc7u.js} +567 -593
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +4 -3
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +3 -3
- package/lib/bubble.cjs +6 -4
- package/lib/bubble.js +3712 -3023
- package/lib/clsx-BWE7vnna.cjs +33 -0
- package/lib/clsx-eGVyq7ot.js +1062 -0
- package/lib/components/ActionButton.d.ts +2 -2
- package/lib/components/ActionMenuButton.d.ts +1 -1
- package/lib/components/Bubble/formatBubble.d.ts +5 -5
- package/lib/components/ui/checkbox.d.ts +1 -1
- package/lib/components/ui/dialog.d.ts +1 -1
- package/lib/components/ui/dropdown-menu.d.ts +1 -1
- package/lib/components/ui/emoji-picker.d.ts +1 -1
- package/lib/components/ui/label.d.ts +1 -1
- package/lib/components/ui/popover.d.ts +1 -1
- package/lib/components/ui/select.d.ts +1 -1
- package/lib/components/ui/separator.d.ts +1 -1
- package/lib/components/ui/switch.d.ts +1 -1
- package/lib/components/ui/tabs.d.ts +1 -1
- package/lib/components/ui/toast.d.ts +1 -1
- package/lib/components/ui/toggle.d.ts +1 -1
- package/lib/components/ui/tooltip.d.ts +1 -1
- package/lib/{delete-node-IyVmiRbI.js → delete-node-eQHsyyhR.js} +3 -1
- package/lib/{dropdown-menu-q6RL_fkA.js → dropdown-menu-CexIkt_V.js} +8 -8
- package/lib/{dropdown-menu-C_F7LEy5.cjs → dropdown-menu-oSKIntXM.cjs} +1 -1
- package/lib/extensions/Blockquote/Blockquote.d.ts +1 -1
- package/lib/extensions/Bold/Bold.d.ts +1 -1
- package/lib/extensions/Code/Code.d.ts +1 -1
- package/lib/extensions/CodeView/CodeView.d.ts +2 -2
- package/lib/extensions/Heading/Heading.d.ts +1 -1
- package/lib/extensions/Highlight/Highlight.d.ts +1 -1
- package/lib/extensions/HorizontalRule/HorizontalRule.d.ts +1 -1
- package/lib/extensions/ImportWord/ImportWord.d.ts +2 -2
- package/lib/extensions/Italic/Italic.d.ts +1 -1
- package/lib/extensions/Link/Link.d.ts +1 -1
- package/lib/extensions/MarkdownPaste/MarkdownPaste.d.ts +5 -0
- package/lib/extensions/MarkdownPaste/index.d.ts +1 -0
- package/lib/extensions/Mermaid/Mermaid.d.ts +1 -1
- package/lib/extensions/MoreMark/MoreMark.d.ts +1 -1
- package/lib/extensions/Strike/Strike.d.ts +1 -1
- package/lib/extensions/Table/Table.d.ts +1 -1
- package/lib/extensions/TextAlign/TextAlign.d.ts +1 -1
- package/lib/extensions/TextUnderline/TextUnderline.d.ts +1 -1
- package/lib/index-BUTn2LY6.cjs +1 -0
- package/lib/{index-C07N8gA1.js → index-BlXGgvT-.js} +21 -18
- package/lib/{index-DqruLhsu.js → index-BnW6t8z6.js} +23 -23
- package/lib/{index-BsFvo9PG.cjs → index-BqL4vAWE.cjs} +1 -1
- package/lib/index-BtxvYLJ1.cjs +12 -0
- package/lib/{index-Do_dsOGB.js → index-C6xmkxrQ.js} +232 -217
- package/lib/index-CJ9pyCM4.cjs +1 -0
- package/lib/{index-neeeY2o7.cjs → index-D0lc95kr.cjs} +3 -3
- package/lib/{index-RcSPeQHn.js → index-DHUN85fV.js} +571 -657
- package/lib/index-DUpSE1Gb.cjs +1 -0
- package/lib/index-D_8P0LE5.js +1362 -0
- package/lib/{index-BDYJ8Ph2.js → index-RIXs7STX.js} +1 -1
- package/lib/index-mfGK4pFo.js +6469 -0
- package/lib/index-zig3Dj7A.cjs +22 -0
- package/lib/index.cjs +1 -1
- package/lib/index.js +26 -34
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.js +1 -1
- package/lib/plugins/image-upload.d.ts +1 -1
- package/lib/popover-BYSZ3zBi.js +24 -0
- package/lib/popover-BcHDZqBt.cjs +1 -0
- package/lib/{renderNodeView-BEkECnnY.js → renderNodeView-BrM5kUj_.js} +2 -2
- package/lib/{renderNodeView-DfLmGrgA.cjs → renderNodeView-D1zydtli.cjs} +1 -1
- package/lib/{select-CmV5uTXr.js → select-C5SHDLFj.js} +8 -5
- package/lib/{select-CYyIeImH.cjs → select-DHjzKkcu.cjs} +1 -1
- package/lib/{separator-BLp6xpSY.cjs → separator-BmixLrnJ.cjs} +1 -1
- package/lib/separator-CFKVxAea.js +293 -0
- package/lib/store/editor.d.ts +1 -1
- package/lib/store/store.d.ts +1 -1
- package/lib/style.css +1 -1
- package/lib/{textarea-Cn75Cm2n.cjs → textarea-CasDcv3u.cjs} +1 -1
- package/lib/{textarea-CkVKMPqK.js → textarea-DNLrJoRl.js} +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.d.ts +3 -3
- package/lib/updatePosition-CBRjbQMH.js +16 -0
- package/lib/updatePosition-CfmY5Trk.cjs +1 -0
- package/lib/utils/columns.d.ts +1 -1
- package/lib/utils/pdf.d.ts +1 -1
- package/lib/utils/utils.d.ts +1 -1
- package/package.json +262 -247
- package/lib/ActionMenuButton-B_E2mbAW.cjs +0 -1
- package/lib/Drawer-DQ4CxBwG.js +0 -1373
- package/lib/Drawer-FUeUKshi.cjs +0 -1
- package/lib/Iframe-EVWXCqe4.cjs +0 -1
- package/lib/Indent-q9cEWAa_.cjs +0 -1
- package/lib/Katex-ClqcEnN_.cjs +0 -4
- package/lib/LinkEditBlock-DZXk4ln_.cjs +0 -5
- package/lib/Table-BmDopO43.cjs +0 -9
- package/lib/Twitter-BbMD3Ybp.cjs +0 -1
- package/lib/clsx-CXbNJWDD.cjs +0 -54
- package/lib/clsx-DaPvp9ji.js +0 -7391
- package/lib/index-BCzvbrf5.cjs +0 -12
- package/lib/index-BnVcq33n.cjs +0 -1
- package/lib/index-CjhjjJsN.cjs +0 -1
- package/lib/index-Cs6cp0Y6.cjs +0 -1
- package/lib/index-Qcl3BG94.js +0 -1351
- package/lib/popover-CtinPbiy.js +0 -24
- package/lib/popover-DIMT3pae.cjs +0 -1
- package/lib/separator-C7luvaG8.js +0 -327
- package/lib/updatePosition-Cjuj2E26.cjs +0 -1
- package/lib/updatePosition-DRmKQBGm.js +0 -16
package/lib/Callout.js
CHANGED
|
@@ -1,21 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { N as D, m as H } from "./index-mfGK4pFo.js";
|
|
2
|
+
import { N as M, c as x, a as B } from "./clsx-eGVyq7ot.js";
|
|
3
|
+
import { h as V, u as P, d as j, D as E, m as R, A as T, n as W, o as F, L as u, j as v, p as U, B as C } from "./index-DHUN85fV.js";
|
|
3
4
|
import { jsx as o, jsxs as l, Fragment as Y } from "react/jsx-runtime";
|
|
4
5
|
import { useState as s } from "react";
|
|
5
6
|
import "./theme.js";
|
|
6
7
|
import { Info as _, Lightbulb as $, AlertCircle as z, TriangleAlert as K, OctagonAlert as q } from "lucide-react";
|
|
7
|
-
import { S as G, a as J, b as Q, c as X, d as Z } from "./select-
|
|
8
|
-
import { u as tt } from "./index-
|
|
8
|
+
import { S as G, a as J, b as Q, c as X, d as Z } from "./select-C5SHDLFj.js";
|
|
9
|
+
import { u as tt } from "./index-BlXGgvT-.js";
|
|
9
10
|
const y = [
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
{
|
|
12
|
+
value: "note",
|
|
13
|
+
label: "Note",
|
|
14
|
+
icon: _,
|
|
15
|
+
color: "#1f6feb",
|
|
16
|
+
background: "#1f6feb1f"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
value: "tip",
|
|
20
|
+
label: "Tip",
|
|
21
|
+
icon: $,
|
|
22
|
+
color: "#238636",
|
|
23
|
+
background: "#2386361f"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
value: "important",
|
|
27
|
+
label: "Important",
|
|
28
|
+
icon: z,
|
|
29
|
+
color: "#ab7df8",
|
|
30
|
+
background: "#ab7df81f"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
value: "warning",
|
|
34
|
+
label: "Warning",
|
|
35
|
+
icon: K,
|
|
36
|
+
color: "#d29922",
|
|
37
|
+
background: "#d299221f"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
value: "caution",
|
|
41
|
+
label: "Caution",
|
|
42
|
+
icon: q,
|
|
43
|
+
color: "#f85149",
|
|
44
|
+
background: "#f851491f"
|
|
45
|
+
}
|
|
15
46
|
];
|
|
16
47
|
function et({ node: t }) {
|
|
17
48
|
const { type: e = "note", title: a = "", body: n = "" } = t.attrs, c = (y.find((d) => d.value === e) || y[0]).icon;
|
|
18
|
-
return /* @__PURE__ */ o(
|
|
49
|
+
return /* @__PURE__ */ o(M, { children: /* @__PURE__ */ l(
|
|
19
50
|
"div",
|
|
20
51
|
{
|
|
21
52
|
className: x(
|
|
@@ -58,102 +89,74 @@ const ot = [
|
|
|
58
89
|
{ value: "caution", label: "Caution", icon: "OctagonAlert" }
|
|
59
90
|
];
|
|
60
91
|
function ht() {
|
|
61
|
-
const { t } = tt(), e = V(), a =
|
|
92
|
+
const { t } = tt(), e = V(), a = P(lt.name), [n, i] = s(!1), [c, d] = s("note"), [h, b] = s(""), [f, g] = s(""), {
|
|
62
93
|
icon: A = void 0,
|
|
63
94
|
tooltip: N = void 0,
|
|
64
95
|
shortcutKeys: L = void 0,
|
|
65
96
|
tooltipOptions: S = {},
|
|
66
|
-
isActive:
|
|
67
|
-
} = (a == null ? void 0 : a.componentProps) ?? {}, { dataState:
|
|
68
|
-
e && (e.chain().focus().setCallout({ type: c, title:
|
|
97
|
+
isActive: I = void 0
|
|
98
|
+
} = (a == null ? void 0 : a.componentProps) ?? {}, { dataState: k, disabled: m } = j(I), w = () => {
|
|
99
|
+
e && (e.chain().focus().setCallout({ type: c, title: h, body: f }).run(), i(!1), d("note"), b(""), g(""));
|
|
69
100
|
}, O = () => {
|
|
70
101
|
m || i(!0);
|
|
71
102
|
};
|
|
72
|
-
return a ? /* @__PURE__ */ l(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
|
|
94
|
-
/* @__PURE__ */ o(u, { children: t("editor.callout.dialog.type") }),
|
|
95
|
-
/* @__PURE__ */ l(
|
|
96
|
-
G,
|
|
97
|
-
{
|
|
98
|
-
onValueChange: d,
|
|
99
|
-
value: c,
|
|
100
|
-
children: [
|
|
101
|
-
/* @__PURE__ */ o(J, { children: /* @__PURE__ */ o(Q, { placeholder: t("editor.callout.dialog.type.placeholder") }) }),
|
|
102
|
-
/* @__PURE__ */ o(X, { children: ot.map((r) => /* @__PURE__ */ o(
|
|
103
|
-
Z,
|
|
104
|
-
{
|
|
105
|
-
value: r.value,
|
|
106
|
-
children: t(`editor.callout.type.${r.value}`)
|
|
107
|
-
},
|
|
108
|
-
r.value
|
|
109
|
-
)) })
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
)
|
|
113
|
-
] }),
|
|
114
|
-
/* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
|
|
115
|
-
/* @__PURE__ */ o(u, { children: t("editor.callout.dialog.title.label") }),
|
|
116
|
-
/* @__PURE__ */ o(
|
|
117
|
-
v,
|
|
118
|
-
{
|
|
119
|
-
onChange: (r) => b(r.target.value),
|
|
120
|
-
placeholder: t("editor.callout.dialog.title.placeholder"),
|
|
121
|
-
value: p
|
|
122
|
-
}
|
|
123
|
-
)
|
|
124
|
-
] }),
|
|
125
|
-
/* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
|
|
126
|
-
/* @__PURE__ */ o(u, { children: t("editor.callout.dialog.body.label") }),
|
|
127
|
-
/* @__PURE__ */ o(
|
|
128
|
-
v,
|
|
129
|
-
{
|
|
130
|
-
onChange: (r) => f(r.target.value),
|
|
131
|
-
placeholder: t("editor.callout.dialog.body.placeholder"),
|
|
132
|
-
value: g
|
|
133
|
-
}
|
|
134
|
-
)
|
|
135
|
-
] })
|
|
136
|
-
] }),
|
|
137
|
-
/* @__PURE__ */ l(U, { children: [
|
|
138
|
-
/* @__PURE__ */ o(
|
|
139
|
-
C,
|
|
140
|
-
{
|
|
141
|
-
onClick: () => i(!1),
|
|
142
|
-
variant: "outline",
|
|
143
|
-
children: t("editor.callout.dialog.button.cancel")
|
|
144
|
-
}
|
|
145
|
-
),
|
|
146
|
-
/* @__PURE__ */ o(C, { onClick: w, children: t("editor.callout.dialog.button.apply") })
|
|
103
|
+
return a ? /* @__PURE__ */ l(E, { onOpenChange: i, open: n, children: [
|
|
104
|
+
/* @__PURE__ */ o(R, { asChild: !0, children: /* @__PURE__ */ o(
|
|
105
|
+
T,
|
|
106
|
+
{
|
|
107
|
+
action: O,
|
|
108
|
+
dataState: k,
|
|
109
|
+
disabled: m,
|
|
110
|
+
icon: A,
|
|
111
|
+
shortcutKeys: L,
|
|
112
|
+
tooltip: N,
|
|
113
|
+
tooltipOptions: S
|
|
114
|
+
}
|
|
115
|
+
) }),
|
|
116
|
+
/* @__PURE__ */ l(W, { children: [
|
|
117
|
+
/* @__PURE__ */ o(F, { children: t("editor.callout.dialog.title") }),
|
|
118
|
+
/* @__PURE__ */ l("div", { className: "richtext-space-y-4 richtext-py-4", children: [
|
|
119
|
+
/* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
|
|
120
|
+
/* @__PURE__ */ o(u, { children: t("editor.callout.dialog.type") }),
|
|
121
|
+
/* @__PURE__ */ l(G, { onValueChange: d, value: c, children: [
|
|
122
|
+
/* @__PURE__ */ o(J, { children: /* @__PURE__ */ o(Q, { placeholder: t("editor.callout.dialog.type.placeholder") }) }),
|
|
123
|
+
/* @__PURE__ */ o(X, { children: ot.map((r) => /* @__PURE__ */ o(Z, { value: r.value, children: t(`editor.callout.type.${r.value}`) }, r.value)) })
|
|
147
124
|
] })
|
|
125
|
+
] }),
|
|
126
|
+
/* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
|
|
127
|
+
/* @__PURE__ */ o(u, { children: t("editor.callout.dialog.title.label") }),
|
|
128
|
+
/* @__PURE__ */ o(
|
|
129
|
+
v,
|
|
130
|
+
{
|
|
131
|
+
onChange: (r) => b(r.target.value),
|
|
132
|
+
placeholder: t("editor.callout.dialog.title.placeholder"),
|
|
133
|
+
value: h
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
] }),
|
|
137
|
+
/* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
|
|
138
|
+
/* @__PURE__ */ o(u, { children: t("editor.callout.dialog.body.label") }),
|
|
139
|
+
/* @__PURE__ */ o(
|
|
140
|
+
v,
|
|
141
|
+
{
|
|
142
|
+
onChange: (r) => g(r.target.value),
|
|
143
|
+
placeholder: t("editor.callout.dialog.body.placeholder"),
|
|
144
|
+
value: f
|
|
145
|
+
}
|
|
146
|
+
)
|
|
148
147
|
] })
|
|
149
|
-
]
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
] }),
|
|
149
|
+
/* @__PURE__ */ l(U, { children: [
|
|
150
|
+
/* @__PURE__ */ o(C, { onClick: () => i(!1), variant: "outline", children: t("editor.callout.dialog.button.cancel") }),
|
|
151
|
+
/* @__PURE__ */ o(C, { onClick: w, children: t("editor.callout.dialog.button.apply") })
|
|
152
|
+
] })
|
|
153
|
+
] })
|
|
154
|
+
] }) : /* @__PURE__ */ o(Y, {});
|
|
152
155
|
}
|
|
153
|
-
function
|
|
156
|
+
function p(t) {
|
|
154
157
|
return (e) => e.getAttribute(t);
|
|
155
158
|
}
|
|
156
|
-
const lt = /* @__PURE__ */
|
|
159
|
+
const lt = /* @__PURE__ */ D.create({
|
|
157
160
|
name: "callout",
|
|
158
161
|
group: "block",
|
|
159
162
|
selectable: !0,
|
|
@@ -184,21 +187,24 @@ const lt = /* @__PURE__ */ H.create({
|
|
|
184
187
|
return [{ tag: "div.callout" }];
|
|
185
188
|
},
|
|
186
189
|
renderHTML({ HTMLAttributes: t }) {
|
|
187
|
-
return [
|
|
190
|
+
return [
|
|
191
|
+
"div",
|
|
192
|
+
H(this.options && this.options.HTMLAttributes || {}, t)
|
|
193
|
+
];
|
|
188
194
|
},
|
|
189
195
|
addAttributes() {
|
|
190
196
|
return {
|
|
191
197
|
type: {
|
|
192
198
|
default: "",
|
|
193
|
-
parseHTML:
|
|
199
|
+
parseHTML: p("type")
|
|
194
200
|
},
|
|
195
201
|
title: {
|
|
196
202
|
default: "",
|
|
197
|
-
parseHTML:
|
|
203
|
+
parseHTML: p("title")
|
|
198
204
|
},
|
|
199
205
|
body: {
|
|
200
206
|
default: "",
|
|
201
|
-
parseHTML:
|
|
207
|
+
parseHTML: p("body")
|
|
202
208
|
}
|
|
203
209
|
};
|
|
204
210
|
},
|
|
@@ -211,7 +217,7 @@ const lt = /* @__PURE__ */ H.create({
|
|
|
211
217
|
};
|
|
212
218
|
},
|
|
213
219
|
addNodeView() {
|
|
214
|
-
return
|
|
220
|
+
return B(et);
|
|
215
221
|
}
|
|
216
222
|
});
|
|
217
223
|
export {
|
package/lib/Clear.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-zig3Dj7A.cjs"),n=require("react/jsx-runtime"),i=require("./index-BUTn2LY6.cjs");function v(){const t=i.useButtonProps(s.name),{icon:e=void 0,tooltip:o=void 0,shortcutKeys:a=void 0,tooltipOptions:u={},action:r=void 0,isActive:l=void 0}=(t==null?void 0:t.componentProps)??{},{disabled:c}=i.useActive(l),d=()=>{c||r&&r()};return t?n.jsx(i.ActionButton,{action:d,disabled:c,icon:e,shortcutKeys:a,tooltip:o,tooltipOptions:u}):n.jsx(n.Fragment,{})}const s=p.Node3.create({name:"clear",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:o})=>({componentProps:{action:()=>e.chain().focus().clearNodes().unsetAllMarks().run(),isActive:()=>e.can().chain().focus().clearNodes().unsetAllMarks().run(),icon:"Eraser",tooltip:o("editor.clear.tooltip")}})}}});exports.Clear=s;exports.RichTextClear=v;
|
package/lib/Clear.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { N as l } from "./
|
|
1
|
+
import { N as l } from "./index-mfGK4pFo.js";
|
|
2
2
|
import { jsx as r, Fragment as p } from "react/jsx-runtime";
|
|
3
|
-
import { u as d, e as m, A as f } from "./index-
|
|
3
|
+
import { u as d, e as m, A as f } from "./index-DHUN85fV.js";
|
|
4
4
|
function x() {
|
|
5
5
|
const o = d(v.name), {
|
|
6
6
|
icon: t = void 0,
|
|
@@ -26,7 +26,6 @@ function x() {
|
|
|
26
26
|
}
|
|
27
27
|
const v = /* @__PURE__ */ l.create({
|
|
28
28
|
name: "clear",
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
30
29
|
//@ts-expect-error
|
|
31
30
|
addOptions() {
|
|
32
31
|
var o;
|
package/lib/Code.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-zig3Dj7A.cjs"),i=require("react/jsx-runtime"),d=require("./index-BUTn2LY6.cjs");require("react");require("./theme.cjs");var h=/(^|[^`])`([^`]+)`(?!`)$/,x=/(^|[^`])`([^`]+)`(?!`)/g,C=o.Mark.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",o.mergeAttributes(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[o.markInputRule({find:h,type:this.type})]},addPasteRules(){return[o.markPasteRule({find:x,type:this.type})]}});function v(){const e=d.useButtonProps(u.name),{icon:t=void 0,tooltip:r=void 0,shortcutKeys:n=void 0,tooltipOptions:c={},action:s=void 0,isActive:p=void 0}=(e==null?void 0:e.componentProps)??{},{dataState:l,disabled:a,update:m}=d.useToggleActive(p),g=()=>{a||s&&(s(),m())};return e?i.jsx(d.ActionButton,{action:g,dataState:l,disabled:a,icon:t,shortcutKeys:n,tooltip:r,tooltipOptions:c}):i.jsx(i.Fragment,{})}const u=C.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:r,extension:n})=>({componentProps:{action:()=>t.commands.toggleCode(),isActive:()=>t.isActive("code"),disabled:!t.can().toggleCode(),icon:"Code",shortcutKeys:n.options.shortcutKeys??["mod","E"],tooltip:r("editor.code.tooltip")}})}}});exports.Code=u;exports.RichTextCode=v;
|
package/lib/Code.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as m,
|
|
1
|
+
import { M as m, f as l, h as g, m as h } from "./index-mfGK4pFo.js";
|
|
2
2
|
import { jsx as a, Fragment as M } from "react/jsx-runtime";
|
|
3
|
-
import { u as v, d as C, A as f } from "./index-
|
|
3
|
+
import { u as v, d as C, A as f } from "./index-DHUN85fV.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "./theme.js";
|
|
6
6
|
var k = /(^|[^`])`([^`]+)`(?!`)$/, x = /(^|[^`])`([^`]+)`(?!`)/g, y = m.create({
|
|
@@ -76,7 +76,6 @@ function L() {
|
|
|
76
76
|
) : /* @__PURE__ */ a(M, {});
|
|
77
77
|
}
|
|
78
78
|
const A = /* @__PURE__ */ y.extend({
|
|
79
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
80
79
|
//@ts-expect-error
|
|
81
80
|
addOptions() {
|
|
82
81
|
var t;
|