reactjs-tiptap-editor 0.3.27 → 0.3.29
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-fkh63F_R.cjs → ActionMenuButton-5Y8QcYxD.cjs} +1 -1
- package/lib/{ActionMenuButton-D3nLtawn.js → ActionMenuButton-Cs9DM_16.js} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.d.cts +6 -4
- package/lib/Attachment.d.ts +6 -4
- package/lib/Attachment.js +1 -1
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.d.cts +6 -4
- package/lib/Blockquote.d.ts +6 -4
- package/lib/Blockquote.js +10 -10
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +6 -4
- package/lib/Bold.d.ts +6 -4
- package/lib/Bold.js +10 -10
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +6 -4
- package/lib/BulletList.d.ts +6 -4
- package/lib/BulletList.js +10 -10
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +6 -4
- package/lib/Clear.d.ts +6 -4
- package/lib/Clear.js +1 -1
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +6 -4
- package/lib/Code.d.ts +6 -4
- package/lib/Code.js +21 -21
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.d.cts +6 -4
- package/lib/CodeBlock.d.ts +6 -4
- package/lib/CodeBlock.js +1 -1
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +6 -4
- package/lib/CodeView.d.ts +6 -4
- package/lib/CodeView.js +1 -1
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +6 -4
- package/lib/Color.d.ts +6 -4
- package/lib/Color.js +1 -1
- package/lib/Document.d.cts +4 -4
- package/lib/Document.d.ts +4 -4
- package/lib/{Drawer-BBVUujX4.js → Drawer-BCmNLh31.js} +1 -1
- package/lib/{Drawer-DetzmUvQ.cjs → Drawer-DCAp7eZF.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +6 -4
- package/lib/Drawer.d.ts +6 -4
- package/lib/Drawer.js +2 -2
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +4 -4
- package/lib/Emoji.d.ts +4 -4
- package/lib/Emoji.js +1 -1
- package/lib/{Excalidraw-DVnwdz-w.cjs → Excalidraw-BI50RQL-.cjs} +1 -1
- package/lib/{Excalidraw-BVdio4hk.js → Excalidraw-CYPcjYZB.js} +1 -1
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +4 -4
- package/lib/Excalidraw.d.ts +4 -4
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +6 -4
- package/lib/ExportPdf.d.ts +6 -4
- package/lib/ExportPdf.js +1 -1
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +6 -4
- package/lib/ExportWord.d.ts +6 -4
- package/lib/ExportWord.js +1 -1
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +6 -4
- package/lib/FontFamily.d.ts +6 -4
- package/lib/FontFamily.js +2 -2
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +6 -4
- package/lib/FontSize.d.ts +6 -4
- package/lib/FontSize.js +2 -2
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +6 -4
- package/lib/FormatPainter.d.ts +6 -4
- package/lib/FormatPainter.js +1 -1
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +6 -4
- package/lib/Heading.d.ts +6 -4
- package/lib/Heading.js +71 -68
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +10 -4
- package/lib/Highlight.d.ts +10 -4
- package/lib/Highlight.js +14 -13
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +6 -4
- package/lib/History.d.ts +6 -4
- package/lib/History.js +163 -160
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +6 -4
- package/lib/HorizontalRule.d.ts +6 -4
- package/lib/HorizontalRule.js +14 -14
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +4 -4
- package/lib/Iframe.d.ts +4 -4
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +6 -4
- package/lib/Image.d.ts +6 -4
- package/lib/Image.js +1 -1
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +7 -6
- package/lib/ImageGif.d.ts +7 -6
- package/lib/ImageGif.js +1 -1
- package/lib/ImportWord.cjs +2 -2
- package/lib/ImportWord.d.cts +6 -4
- package/lib/ImportWord.d.ts +6 -4
- package/lib/ImportWord.js +2 -2
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +6 -4
- package/lib/Indent.d.ts +6 -4
- package/lib/Indent.js +12 -11
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +6 -4
- package/lib/Italic.d.ts +6 -4
- package/lib/Italic.js +13 -13
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +4 -4
- package/lib/Katex.d.ts +4 -4
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +6 -4
- package/lib/LineHeight.d.ts +6 -4
- package/lib/LineHeight.js +1 -1
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +6 -4
- package/lib/Link.d.ts +6 -4
- package/lib/Link.js +1 -1
- package/lib/ListItem.d.cts +4 -4
- package/lib/ListItem.d.ts +4 -4
- package/lib/Mention.d.cts +4 -4
- package/lib/Mention.d.ts +4 -4
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.d.cts +6 -4
- package/lib/Mermaid.d.ts +6 -4
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +6 -4
- package/lib/MoreMark.d.ts +6 -4
- package/lib/MoreMark.js +46 -45
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +4 -4
- package/lib/MultiColumn.d.ts +4 -4
- package/lib/MultiColumn.js +1 -1
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +6 -4
- package/lib/OrderedList.d.ts +6 -4
- package/lib/OrderedList.js +9 -9
- package/lib/{RichTextEditor-DoMu_nCj.cjs → RichTextEditor-DsUcQSbm.cjs} +7 -7
- package/lib/{RichTextEditor-BJWhWz4z.js → RichTextEditor-e6q30rbV.js} +1691 -1672
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +6 -4
- package/lib/SearchAndReplace.d.ts +6 -4
- package/lib/SearchAndReplace.js +1 -1
- package/lib/Selection.d.cts +4 -4
- package/lib/Selection.d.ts +4 -4
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +4 -4
- package/lib/SlashCommand.d.ts +4 -4
- package/lib/SlashCommand.js +1 -1
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +6 -4
- package/lib/Strike.d.ts +6 -4
- package/lib/Strike.js +13 -13
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +6 -4
- package/lib/SubAndSuperScript.d.ts +6 -4
- package/lib/SubAndSuperScript.js +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.d.cts +6 -4
- package/lib/Table.d.ts +6 -4
- package/lib/Table.js +1 -1
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +4 -4
- package/lib/TableOfContent.d.ts +4 -4
- package/lib/TableOfContent.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +6 -4
- package/lib/TaskList.d.ts +6 -4
- package/lib/TaskList.js +15 -15
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +6 -4
- package/lib/TextAlign.d.ts +6 -4
- package/lib/TextAlign.js +41 -41
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +6 -4
- package/lib/TextBubble.d.ts +6 -4
- package/lib/TextBubble.js +1 -1
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +4 -4
- package/lib/TextDirection.d.ts +4 -4
- package/lib/TextDirection.js +1 -1
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +6 -4
- package/lib/TextUnderline.d.ts +6 -4
- package/lib/TextUnderline.js +8 -8
- package/lib/TrailingNode.d.cts +4 -4
- package/lib/TrailingNode.d.ts +4 -4
- package/lib/{Twitter--OkCPska.cjs → Twitter-D2Osj8qP.cjs} +1 -1
- package/lib/{Twitter-CXwmqolk.js → Twitter-Wb7cD3M-.js} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +4 -4
- package/lib/Twitter.d.ts +4 -4
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +6 -4
- package/lib/Video.d.ts +6 -4
- package/lib/Video.js +1 -1
- package/lib/bubble-extra.cjs +1 -1
- package/lib/bubble-extra.d.cts +4 -4
- package/lib/bubble-extra.d.ts +4 -4
- package/lib/bubble-extra.js +5 -5
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +23 -17
- package/lib/index.d.ts +23 -17
- package/lib/index.js +2 -2
- package/lib/locale-bundle.d.cts +4 -4
- package/lib/locale-bundle.d.ts +4 -4
- package/lib/{textarea-DkVc2MIQ.cjs → textarea-BVbzd9-k.cjs} +1 -1
- package/lib/{textarea-HW9QlrCS.js → textarea-Csmx5x-_.js} +1 -1
- package/package.json +1 -1
package/lib/TextAlign.d.ts
CHANGED
|
@@ -69,6 +69,8 @@ declare interface GeneralOptions<T> {
|
|
|
69
69
|
button: ButtonView<T>;
|
|
70
70
|
/** Show on Toolbar */
|
|
71
71
|
toolbar?: boolean;
|
|
72
|
+
/** Shortcut keys override */
|
|
73
|
+
shortcutKeys?: string[] | string[][];
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
export declare const TextAlign: Extension<TextAlignOptions, any>;
|
|
@@ -142,8 +144,8 @@ declare module '@tiptap/core' {
|
|
|
142
144
|
|
|
143
145
|
declare module '@tiptap/core' {
|
|
144
146
|
interface Commands<ReturnType> {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
+
exportPdf: {
|
|
148
|
+
exportToPdf: () => ReturnType;
|
|
147
149
|
};
|
|
148
150
|
}
|
|
149
151
|
}
|
|
@@ -151,8 +153,8 @@ declare module '@tiptap/core' {
|
|
|
151
153
|
|
|
152
154
|
declare module '@tiptap/core' {
|
|
153
155
|
interface Commands<ReturnType> {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
+
excalidraw: {
|
|
157
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
156
158
|
};
|
|
157
159
|
}
|
|
158
160
|
}
|
package/lib/TextAlign.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { P as
|
|
5
|
-
const
|
|
1
|
+
import { E as K } from "./index-DI9T3iLd.js";
|
|
2
|
+
import { jsxs as u, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as S } from "react";
|
|
4
|
+
import { P as C, m as j, A as w, k as v, n as P, T as z, a as L, r as N, b as $, s as E } from "./RichTextEditor-e6q30rbV.js";
|
|
5
|
+
const J = K.create({
|
|
6
6
|
name: "textAlign",
|
|
7
7
|
addOptions() {
|
|
8
8
|
return {
|
|
@@ -44,11 +44,11 @@ const L = y.create({
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
function
|
|
47
|
+
function B(t) {
|
|
48
48
|
var n;
|
|
49
|
-
const e =
|
|
50
|
-
var
|
|
51
|
-
const i = (
|
|
49
|
+
const e = S(() => {
|
|
50
|
+
var o;
|
|
51
|
+
const i = (o = t == null ? void 0 : t.items) == null ? void 0 : o.find((c) => c.isActive());
|
|
52
52
|
return i && !i.default ? {
|
|
53
53
|
...i,
|
|
54
54
|
icon: i.icon ? i.icon : t.icon
|
|
@@ -58,21 +58,21 @@ function N(t) {
|
|
|
58
58
|
isActive: () => !1
|
|
59
59
|
};
|
|
60
60
|
}, [t]);
|
|
61
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ u(C, { modal: !0, children: [
|
|
62
62
|
/* @__PURE__ */ l(
|
|
63
|
-
|
|
63
|
+
j,
|
|
64
64
|
{
|
|
65
65
|
asChild: !0,
|
|
66
66
|
disabled: t == null ? void 0 : t.disabled,
|
|
67
67
|
children: /* @__PURE__ */ l(
|
|
68
|
-
|
|
68
|
+
w,
|
|
69
69
|
{
|
|
70
70
|
customClass: "!richtext-w-12 richtext-h-12",
|
|
71
71
|
disabled: t == null ? void 0 : t.disabled,
|
|
72
72
|
icon: t == null ? void 0 : t.icon,
|
|
73
73
|
tooltip: t == null ? void 0 : t.tooltip,
|
|
74
74
|
children: /* @__PURE__ */ l(
|
|
75
|
-
|
|
75
|
+
v,
|
|
76
76
|
{
|
|
77
77
|
className: "richtext-ml-1 richtext-size-3 richtext-text-zinc-500",
|
|
78
78
|
name: "MenuDown"
|
|
@@ -83,28 +83,28 @@ function N(t) {
|
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
85
|
/* @__PURE__ */ l(
|
|
86
|
-
|
|
86
|
+
P,
|
|
87
87
|
{
|
|
88
88
|
align: "start",
|
|
89
89
|
className: "richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",
|
|
90
90
|
side: "bottom",
|
|
91
91
|
children: (n = t == null ? void 0 : t.items) == null ? void 0 : n.map((i, r) => {
|
|
92
|
-
var
|
|
93
|
-
return /* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */ l(
|
|
95
|
-
|
|
92
|
+
var o, c;
|
|
93
|
+
return /* @__PURE__ */ u(z, { children: [
|
|
94
|
+
/* @__PURE__ */ l(L, { asChild: !0, children: /* @__PURE__ */ l(
|
|
95
|
+
N,
|
|
96
96
|
{
|
|
97
97
|
className: "richtext-size-7 richtext-p-1",
|
|
98
98
|
"data-state": e.title === i.title ? "on" : "off",
|
|
99
99
|
onClick: i == null ? void 0 : i.action,
|
|
100
100
|
pressed: e.title === i.title,
|
|
101
101
|
size: "sm",
|
|
102
|
-
children: (i == null ? void 0 : i.icon) && /* @__PURE__ */ l(
|
|
102
|
+
children: (i == null ? void 0 : i.icon) && /* @__PURE__ */ l(v, { name: i.icon })
|
|
103
103
|
}
|
|
104
104
|
) }),
|
|
105
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ u($, { className: "richtext-flex richtext-flex-col richtext-items-center", children: [
|
|
106
106
|
/* @__PURE__ */ l("span", { children: i.title }),
|
|
107
|
-
!!((
|
|
107
|
+
!!((o = i.shortcutKeys) != null && o.length) && /* @__PURE__ */ l("span", { children: (c = i.shortcutKeys) == null ? void 0 : c.map((a) => E(a)).join(" ") })
|
|
108
108
|
] })
|
|
109
109
|
] }, `text-align-${r}`);
|
|
110
110
|
})
|
|
@@ -112,7 +112,7 @@ function N(t) {
|
|
|
112
112
|
)
|
|
113
113
|
] });
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const G = /* @__PURE__ */ J.extend({
|
|
116
116
|
addOptions() {
|
|
117
117
|
var t;
|
|
118
118
|
return {
|
|
@@ -123,38 +123,38 @@ const H = /* @__PURE__ */ L.extend({
|
|
|
123
123
|
extension: n,
|
|
124
124
|
t: i
|
|
125
125
|
}) {
|
|
126
|
-
var
|
|
127
|
-
const r = ((
|
|
128
|
-
left: ["mod", "Shift", "L"],
|
|
129
|
-
center: ["mod", "Shift", "E"],
|
|
130
|
-
right: ["mod", "Shift", "R"],
|
|
131
|
-
justify: ["mod", "Shift", "J"]
|
|
132
|
-
},
|
|
126
|
+
var g, x, f, m, A;
|
|
127
|
+
const r = ((g = n.options) == null ? void 0 : g.alignments) || [], o = {
|
|
128
|
+
left: ((x = n.options.shortcutKeys) == null ? void 0 : x[0]) ?? ["mod", "Shift", "L"],
|
|
129
|
+
center: ((f = n.options.shortcutKeys) == null ? void 0 : f[1]) ?? ["mod", "Shift", "E"],
|
|
130
|
+
right: ((m = n.options.shortcutKeys) == null ? void 0 : m[2]) ?? ["mod", "Shift", "R"],
|
|
131
|
+
justify: ((A = n.options.shortcutKeys) == null ? void 0 : A[3]) ?? ["mod", "Shift", "J"]
|
|
132
|
+
}, c = {
|
|
133
133
|
left: "AlignLeft",
|
|
134
134
|
center: "AlignCenter",
|
|
135
135
|
right: "AlignRight",
|
|
136
136
|
justify: "AlignJustify"
|
|
137
|
-
},
|
|
138
|
-
var
|
|
137
|
+
}, a = r.map((s) => {
|
|
138
|
+
var y, h, T;
|
|
139
139
|
return {
|
|
140
140
|
title: i(`editor.textalign.${s}.tooltip`),
|
|
141
|
-
icon:
|
|
142
|
-
shortcutKeys:
|
|
141
|
+
icon: c[s],
|
|
142
|
+
shortcutKeys: o[s],
|
|
143
143
|
isActive: () => e.isActive({ textAlign: s }) || !1,
|
|
144
144
|
action: () => {
|
|
145
|
-
var d,
|
|
146
|
-
return (
|
|
145
|
+
var d, b;
|
|
146
|
+
return (b = (d = e.commands) == null ? void 0 : d.setTextAlign) == null ? void 0 : b.call(d, s);
|
|
147
147
|
},
|
|
148
|
-
disabled: !((
|
|
148
|
+
disabled: !((T = (h = (y = e == null ? void 0 : e.can) == null ? void 0 : y.call(e)) == null ? void 0 : h.setTextAlign) != null && T.call(h, s))
|
|
149
149
|
};
|
|
150
|
-
}),
|
|
150
|
+
}), M = a.filter((s) => s.disabled).length === a.length;
|
|
151
151
|
return {
|
|
152
|
-
component:
|
|
152
|
+
component: B,
|
|
153
153
|
componentProps: {
|
|
154
154
|
icon: "AlignJustify",
|
|
155
155
|
tooltip: i("editor.textalign.tooltip"),
|
|
156
|
-
disabled:
|
|
157
|
-
items:
|
|
156
|
+
disabled: M,
|
|
157
|
+
items: a
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
160
|
}
|
|
@@ -162,5 +162,5 @@ const H = /* @__PURE__ */ L.extend({
|
|
|
162
162
|
}
|
|
163
163
|
});
|
|
164
164
|
export {
|
|
165
|
-
|
|
165
|
+
G as TextAlign
|
|
166
166
|
};
|
package/lib/TextBubble.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./index-ByRfqzMr.cjs"),t=require("react/jsx-runtime"),l=require("react"),x=require("lucide-react"),n=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./index-ByRfqzMr.cjs"),t=require("react/jsx-runtime"),l=require("react"),x=require("lucide-react"),n=require("./RichTextEditor-DsUcQSbm.cjs"),g=require("./index-D_A0TBRA.cjs");function b(e){const{t:i}=g.useLocale(),c=l.useMemo(()=>[{name:"paragraph",label:i("editor.paragraph.tooltip"),iconName:"Heading1",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:i("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:i("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:i("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:i("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:i("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:i("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:i("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()}],[e.editor,i]),a=l.useMemo(()=>c.findLast(o=>o.isActive())??{label:"Empty"},[c]);return t.jsxs(n.DropdownMenu,{children:[t.jsx(n.DropdownMenuTrigger,{asChild:!0,children:t.jsxs(n.Button,{className:"richtext-flex richtext-h-[32px] richtext-gap-1 richtext-px-1.5",variant:"ghost",children:[t.jsxs("span",{className:"richtext-whitespace-nowrap richtext-text-sm richtext-font-normal",children:[" ",a==null?void 0:a.label]}),t.jsx(x.ChevronDown,{className:"richtext-size-4"})]})}),t.jsx(n.DropdownMenuContent,{align:"start",className:"richtext-w-full richtext-p-1",hideWhenDetached:!0,sideOffset:5,children:c.map((o,d)=>{var r;const u=n.icons[o.iconName];return t.jsx(n.DropdownMenuCheckboxItem,{checked:((r=o.isActive)==null?void 0:r.call(o))||!1,className:"richtext-cursor-pointer",onClick:()=>o.action(),children:t.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2 richtext-px-2",children:[t.jsx(u,{className:"richtext-h3 richtext-w-3"}),t.jsxs("span",{children:[" ",o.label]})]})},`text-bubble-${d}`)})})]})}const s=h.Extension.create({name:"text-bubble",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),toolbar:!1,button:()=>({component:b,componentProps:{}})}}});exports.TextBubble=s;exports.default=s;
|
package/lib/TextBubble.d.cts
CHANGED
|
@@ -66,6 +66,8 @@ declare interface GeneralOptions<T> {
|
|
|
66
66
|
button: ButtonView<T>;
|
|
67
67
|
/** Show on Toolbar */
|
|
68
68
|
toolbar?: boolean;
|
|
69
|
+
/** Shortcut keys override */
|
|
70
|
+
shortcutKeys?: string[] | string[][];
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
declare const TextBubble: Extension<TextBubbleOptions, any>;
|
|
@@ -132,8 +134,8 @@ declare module '@tiptap/core' {
|
|
|
132
134
|
|
|
133
135
|
declare module '@tiptap/core' {
|
|
134
136
|
interface Commands<ReturnType> {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
+
exportPdf: {
|
|
138
|
+
exportToPdf: () => ReturnType;
|
|
137
139
|
};
|
|
138
140
|
}
|
|
139
141
|
}
|
|
@@ -141,8 +143,8 @@ declare module '@tiptap/core' {
|
|
|
141
143
|
|
|
142
144
|
declare module '@tiptap/core' {
|
|
143
145
|
interface Commands<ReturnType> {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
+
excalidraw: {
|
|
147
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
146
148
|
};
|
|
147
149
|
}
|
|
148
150
|
}
|
package/lib/TextBubble.d.ts
CHANGED
|
@@ -66,6 +66,8 @@ declare interface GeneralOptions<T> {
|
|
|
66
66
|
button: ButtonView<T>;
|
|
67
67
|
/** Show on Toolbar */
|
|
68
68
|
toolbar?: boolean;
|
|
69
|
+
/** Shortcut keys override */
|
|
70
|
+
shortcutKeys?: string[] | string[][];
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
declare const TextBubble: Extension<TextBubbleOptions, any>;
|
|
@@ -132,8 +134,8 @@ declare module '@tiptap/core' {
|
|
|
132
134
|
|
|
133
135
|
declare module '@tiptap/core' {
|
|
134
136
|
interface Commands<ReturnType> {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
+
exportPdf: {
|
|
138
|
+
exportToPdf: () => ReturnType;
|
|
137
139
|
};
|
|
138
140
|
}
|
|
139
141
|
}
|
|
@@ -141,8 +143,8 @@ declare module '@tiptap/core' {
|
|
|
141
143
|
|
|
142
144
|
declare module '@tiptap/core' {
|
|
143
145
|
interface Commands<ReturnType> {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
+
excalidraw: {
|
|
147
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
146
148
|
};
|
|
147
149
|
}
|
|
148
150
|
}
|
package/lib/TextBubble.js
CHANGED
|
@@ -2,7 +2,7 @@ import { E as h } from "./index-DI9T3iLd.js";
|
|
|
2
2
|
import { jsxs as o, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo as l } from "react";
|
|
4
4
|
import { ChevronDown as u } from "lucide-react";
|
|
5
|
-
import { D as m, e as g, B as x, f as b, i as v, h as f } from "./RichTextEditor-
|
|
5
|
+
import { D as m, e as g, B as x, f as b, i as v, h as f } from "./RichTextEditor-e6q30rbV.js";
|
|
6
6
|
import { u as N } from "./index-CsK90iVd.js";
|
|
7
7
|
function A(e) {
|
|
8
8
|
const { t } = N(), c = l(() => [
|
package/lib/TextDirection.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index-ByRfqzMr.cjs"),i=require("react/jsx-runtime"),g=require("react"),n=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index-ByRfqzMr.cjs"),i=require("react/jsx-runtime"),g=require("react"),n=require("./RichTextEditor-DsUcQSbm.cjs");function m(t){var s;const c=g.useMemo(()=>{var r;const e=(r=t==null?void 0:t.items)==null?void 0:r.find(o=>o.isActive());return e&&!e.default?{...e,icon:e.icon?e.icon:t.icon}:{title:t==null?void 0:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return i.jsxs(n.Popover,{modal:!0,children:[i.jsx(n.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:i.jsx(n.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:t==null?void 0:t.disabled,icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,children:i.jsx(n.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),i.jsx(n.PopoverContent,{align:"start",className:"richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",side:"bottom",children:(s=t==null?void 0:t.items)==null?void 0:s.map((e,a)=>{var r,o;return i.jsxs(n.Tooltip,{children:[i.jsx(n.TooltipTrigger,{asChild:!0,children:i.jsx(n.Toggle,{className:"richtext-size-7 richtext-p-1","data-state":c.title===e.title?"on":"off",onClick:e==null?void 0:e.action,pressed:c.title===e.title,size:"sm",children:(e==null?void 0:e.icon)&&i.jsx(n.IconComponent,{name:e.icon})})}),i.jsxs(n.TooltipContent,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[i.jsx("span",{children:e.title}),!!((r=e.shortcutKeys)!=null&&r.length)&&i.jsx("span",{children:(o=e.shortcutKeys)==null?void 0:o.map(x=>n.getShortcutKey(x)).join(" ")})]})]},`text-align-${a}`)})})]})}const j=b.Extension.create({name:"text-direction",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph"],directions:["auto","ltr","rtl"],defaultDirection:"auto",button({editor:c,extension:s,t:e}){var h;const a=((h=s.options)==null?void 0:h.directions)||[],r={auto:"TextDirection",ltr:"LeftToRight",rtl:"RightToLeft"},o=a.map(l=>({title:e(`editor.textDirection.${l}.tooltip`),icon:r[l],isActive:()=>!1,action:()=>{var d,f,u,T;if(l==="auto"){(f=(d=c.commands)==null?void 0:d.unsetTextDirection)==null||f.call(d);return}(T=(u=c.commands)==null?void 0:u.setTextDirection)==null||T.call(u,l)},disabled:!1})),x=o.filter(l=>l.disabled).length===o.length;return{component:m,componentProps:{icon:"TextDirection",tooltip:e("editor.textDirection.tooltip"),disabled:x,items:o}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{dir:{default:this.options.defaultDirection,parseHTML:t=>t.attributes.dir&&this.options.directions.includes(t.attributes.dir)?t.attributes.dir.value:this.options.defaultDirection,renderHTML:t=>({dir:t.dir})}}}]},addCommands(){return{setTextDirection:t=>({commands:c})=>this.options.directions.includes(t)?this.options.types.every(s=>c.updateAttributes(s,{dir:t})):!1,unsetTextDirection:()=>({commands:t})=>this.options.types.every(c=>t.resetAttributes(c,"dir"))}}});exports.TextDirection=j;
|
package/lib/TextDirection.d.cts
CHANGED
|
@@ -59,8 +59,8 @@ declare module '@tiptap/core' {
|
|
|
59
59
|
|
|
60
60
|
declare module '@tiptap/core' {
|
|
61
61
|
interface Commands<ReturnType> {
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
exportPdf: {
|
|
63
|
+
exportToPdf: () => ReturnType;
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -68,8 +68,8 @@ declare module '@tiptap/core' {
|
|
|
68
68
|
|
|
69
69
|
declare module '@tiptap/core' {
|
|
70
70
|
interface Commands<ReturnType> {
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
excalidraw: {
|
|
72
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
}
|
package/lib/TextDirection.d.ts
CHANGED
|
@@ -59,8 +59,8 @@ declare module '@tiptap/core' {
|
|
|
59
59
|
|
|
60
60
|
declare module '@tiptap/core' {
|
|
61
61
|
interface Commands<ReturnType> {
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
exportPdf: {
|
|
63
|
+
exportToPdf: () => ReturnType;
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -68,8 +68,8 @@ declare module '@tiptap/core' {
|
|
|
68
68
|
|
|
69
69
|
declare module '@tiptap/core' {
|
|
70
70
|
interface Commands<ReturnType> {
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
excalidraw: {
|
|
72
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
}
|
package/lib/TextDirection.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as b } from "./index-DI9T3iLd.js";
|
|
2
2
|
import { jsxs as h, jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo as g } from "react";
|
|
4
|
-
import { P as D, m as v, A as y, k as T, n as A, T as C, a as w, r as M, b as P, s as z } from "./RichTextEditor-
|
|
4
|
+
import { P as D, m as v, A as y, k as T, n as A, T as C, a as w, r as M, b as P, s as z } from "./RichTextEditor-e6q30rbV.js";
|
|
5
5
|
function L(t) {
|
|
6
6
|
var c;
|
|
7
7
|
const i = g(() => {
|
package/lib/TextUnderline.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-ByRfqzMr.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-ByRfqzMr.cjs"),o=require("./RichTextEditor-DsUcQSbm.cjs"),s=n.Mark.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",n.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),d=s.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:r,extension:i}){return{component:o.ActionButton,componentProps:{action:()=>t.commands.toggleUnderline(),isActive:()=>t.isActive("underline")||!1,disabled:!1,icon:"Underline",shortcutKeys:i.options.shortcutKeys??["mod","U"],tooltip:r("editor.underline.tooltip")}}}}}});exports.TextUnderline=d;
|
package/lib/TextUnderline.d.cts
CHANGED
|
@@ -68,6 +68,8 @@ declare interface GeneralOptions<T> {
|
|
|
68
68
|
button: ButtonView<T>;
|
|
69
69
|
/** Show on Toolbar */
|
|
70
70
|
toolbar?: boolean;
|
|
71
|
+
/** Shortcut keys override */
|
|
72
|
+
shortcutKeys?: string[] | string[][];
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
export declare const TextUnderline: Mark<UnderlineOptions, any>;
|
|
@@ -132,8 +134,8 @@ declare module '@tiptap/core' {
|
|
|
132
134
|
|
|
133
135
|
declare module '@tiptap/core' {
|
|
134
136
|
interface Commands<ReturnType> {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
+
exportPdf: {
|
|
138
|
+
exportToPdf: () => ReturnType;
|
|
137
139
|
};
|
|
138
140
|
}
|
|
139
141
|
}
|
|
@@ -141,8 +143,8 @@ declare module '@tiptap/core' {
|
|
|
141
143
|
|
|
142
144
|
declare module '@tiptap/core' {
|
|
143
145
|
interface Commands<ReturnType> {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
+
excalidraw: {
|
|
147
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
146
148
|
};
|
|
147
149
|
}
|
|
148
150
|
}
|
package/lib/TextUnderline.d.ts
CHANGED
|
@@ -68,6 +68,8 @@ declare interface GeneralOptions<T> {
|
|
|
68
68
|
button: ButtonView<T>;
|
|
69
69
|
/** Show on Toolbar */
|
|
70
70
|
toolbar?: boolean;
|
|
71
|
+
/** Shortcut keys override */
|
|
72
|
+
shortcutKeys?: string[] | string[][];
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
export declare const TextUnderline: Mark<UnderlineOptions, any>;
|
|
@@ -132,8 +134,8 @@ declare module '@tiptap/core' {
|
|
|
132
134
|
|
|
133
135
|
declare module '@tiptap/core' {
|
|
134
136
|
interface Commands<ReturnType> {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
+
exportPdf: {
|
|
138
|
+
exportToPdf: () => ReturnType;
|
|
137
139
|
};
|
|
138
140
|
}
|
|
139
141
|
}
|
|
@@ -141,8 +143,8 @@ declare module '@tiptap/core' {
|
|
|
141
143
|
|
|
142
144
|
declare module '@tiptap/core' {
|
|
143
145
|
interface Commands<ReturnType> {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
+
excalidraw: {
|
|
147
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
146
148
|
};
|
|
147
149
|
}
|
|
148
150
|
}
|
package/lib/TextUnderline.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as
|
|
2
|
-
import { A as i } from "./RichTextEditor-
|
|
3
|
-
const
|
|
1
|
+
import { M as o, m as s } from "./index-DI9T3iLd.js";
|
|
2
|
+
import { A as i } from "./RichTextEditor-e6q30rbV.js";
|
|
3
|
+
const d = o.create({
|
|
4
4
|
name: "underline",
|
|
5
5
|
addOptions() {
|
|
6
6
|
return {
|
|
@@ -20,7 +20,7 @@ const s = r.create({
|
|
|
20
20
|
];
|
|
21
21
|
},
|
|
22
22
|
renderHTML({ HTMLAttributes: e }) {
|
|
23
|
-
return ["u",
|
|
23
|
+
return ["u", s(this.options.HTMLAttributes, e), 0];
|
|
24
24
|
},
|
|
25
25
|
addCommands() {
|
|
26
26
|
return {
|
|
@@ -35,12 +35,12 @@ const s = r.create({
|
|
|
35
35
|
"Mod-U": () => this.editor.commands.toggleUnderline()
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
}),
|
|
38
|
+
}), l = /* @__PURE__ */ d.extend({
|
|
39
39
|
addOptions() {
|
|
40
40
|
var e;
|
|
41
41
|
return {
|
|
42
42
|
...(e = this.parent) == null ? void 0 : e.call(this),
|
|
43
|
-
button({ editor: t, t: n }) {
|
|
43
|
+
button({ editor: t, t: n, extension: r }) {
|
|
44
44
|
return {
|
|
45
45
|
component: i,
|
|
46
46
|
componentProps: {
|
|
@@ -48,7 +48,7 @@ const s = r.create({
|
|
|
48
48
|
isActive: () => t.isActive("underline") || !1,
|
|
49
49
|
disabled: !1,
|
|
50
50
|
icon: "Underline",
|
|
51
|
-
shortcutKeys: ["mod", "U"],
|
|
51
|
+
shortcutKeys: r.options.shortcutKeys ?? ["mod", "U"],
|
|
52
52
|
tooltip: n("editor.underline.tooltip")
|
|
53
53
|
}
|
|
54
54
|
};
|
|
@@ -57,5 +57,5 @@ const s = r.create({
|
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
export {
|
|
60
|
-
|
|
60
|
+
l as TextUnderline
|
|
61
61
|
};
|
package/lib/TrailingNode.d.cts
CHANGED
|
@@ -69,8 +69,8 @@ declare module '@tiptap/core' {
|
|
|
69
69
|
|
|
70
70
|
declare module '@tiptap/core' {
|
|
71
71
|
interface Commands<ReturnType> {
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
exportPdf: {
|
|
73
|
+
exportToPdf: () => ReturnType;
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -78,8 +78,8 @@ declare module '@tiptap/core' {
|
|
|
78
78
|
|
|
79
79
|
declare module '@tiptap/core' {
|
|
80
80
|
interface Commands<ReturnType> {
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
excalidraw: {
|
|
82
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
}
|
package/lib/TrailingNode.d.ts
CHANGED
|
@@ -69,8 +69,8 @@ declare module '@tiptap/core' {
|
|
|
69
69
|
|
|
70
70
|
declare module '@tiptap/core' {
|
|
71
71
|
interface Commands<ReturnType> {
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
exportPdf: {
|
|
73
|
+
exportToPdf: () => ReturnType;
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -78,8 +78,8 @@ declare module '@tiptap/core' {
|
|
|
78
78
|
|
|
79
79
|
declare module '@tiptap/core' {
|
|
80
80
|
interface Commands<ReturnType> {
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
excalidraw: {
|
|
82
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
}
|