reactjs-tiptap-editor 0.3.7 → 0.3.9
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-CqlhqVIW.cjs → ActionMenuButton-D96eTByd.cjs} +1 -1
- package/lib/{ActionMenuButton-DXwpQHj4.js → ActionMenuButton-ZOYNohaO.js} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.d.cts +27 -27
- package/lib/Attachment.d.ts +27 -27
- package/lib/Attachment.js +1 -1
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.d.cts +27 -27
- package/lib/Blockquote.d.ts +27 -27
- package/lib/Blockquote.js +1 -1
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +27 -27
- package/lib/Bold.d.ts +27 -27
- package/lib/Bold.js +1 -1
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +27 -27
- package/lib/BulletList.d.ts +27 -27
- package/lib/BulletList.js +1 -1
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +27 -27
- package/lib/Clear.d.ts +27 -27
- package/lib/Clear.js +1 -1
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +27 -27
- package/lib/Code.d.ts +27 -27
- package/lib/Code.js +1 -1
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.d.cts +27 -27
- package/lib/CodeBlock.d.ts +27 -27
- package/lib/CodeBlock.js +1 -1
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +27 -27
- package/lib/CodeView.d.ts +27 -27
- package/lib/CodeView.js +1 -1
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +27 -27
- package/lib/Color.d.ts +27 -27
- package/lib/Color.js +1 -1
- package/lib/Document.d.cts +27 -27
- package/lib/Document.d.ts +27 -27
- package/lib/{Drawer-B6uGc4Ab.js → Drawer-D7VC0bqz.js} +1 -1
- package/lib/{Drawer-DBt_aN5x.cjs → Drawer-hzhjTRvj.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +27 -27
- package/lib/Drawer.d.ts +27 -27
- package/lib/Drawer.js +2 -2
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +27 -27
- package/lib/Emoji.d.ts +27 -27
- package/lib/Emoji.js +1 -1
- package/lib/Excalidraw-C3YArGc8.js +278 -0
- package/lib/Excalidraw-DkpPLrTk.cjs +1 -0
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +27 -27
- package/lib/Excalidraw.d.ts +27 -27
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +27 -27
- package/lib/ExportPdf.d.ts +27 -27
- package/lib/ExportPdf.js +1 -1
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +27 -27
- package/lib/ExportWord.d.ts +27 -27
- package/lib/ExportWord.js +1 -1
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +27 -27
- package/lib/FontFamily.d.ts +27 -27
- package/lib/FontFamily.js +2 -2
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +27 -27
- package/lib/FontSize.d.ts +27 -27
- package/lib/FontSize.js +2 -2
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +27 -27
- package/lib/FormatPainter.d.ts +27 -27
- package/lib/FormatPainter.js +1 -1
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +27 -27
- package/lib/Heading.d.ts +27 -27
- package/lib/Heading.js +2 -2
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +27 -27
- package/lib/Highlight.d.ts +27 -27
- package/lib/Highlight.js +1 -1
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +27 -27
- package/lib/History.d.ts +27 -27
- package/lib/History.js +1 -1
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +27 -27
- package/lib/HorizontalRule.d.ts +27 -27
- package/lib/HorizontalRule.js +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +27 -27
- package/lib/Iframe.d.ts +27 -27
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +27 -27
- package/lib/Image.d.ts +27 -27
- package/lib/Image.js +1 -1
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +27 -27
- package/lib/ImageGif.d.ts +27 -27
- package/lib/ImageGif.js +1 -1
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.d.cts +27 -27
- package/lib/ImportWord.d.ts +27 -27
- package/lib/ImportWord.js +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +27 -27
- package/lib/Indent.d.ts +27 -27
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +27 -27
- package/lib/Italic.d.ts +27 -27
- package/lib/Italic.js +1 -1
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +27 -27
- package/lib/Katex.d.ts +27 -27
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +27 -27
- package/lib/LineHeight.d.ts +27 -27
- package/lib/LineHeight.js +1 -1
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +27 -27
- package/lib/Link.d.ts +27 -27
- package/lib/Link.js +1 -1
- package/lib/ListItem.d.cts +27 -27
- package/lib/ListItem.d.ts +27 -27
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.d.cts +27 -27
- package/lib/Mention.d.ts +27 -27
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.d.cts +27 -27
- package/lib/Mermaid.d.ts +27 -27
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +27 -27
- package/lib/MoreMark.d.ts +27 -27
- package/lib/MoreMark.js +1 -1
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +27 -27
- package/lib/MultiColumn.d.ts +27 -27
- package/lib/MultiColumn.js +1 -1
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +27 -27
- package/lib/OrderedList.d.ts +27 -27
- package/lib/OrderedList.js +1 -1
- package/lib/{RichTextEditor-BfYZYQb9.js → RichTextEditor-CRDKX-F8.js} +11 -11
- package/lib/{RichTextEditor-Db6oQoYY.cjs → RichTextEditor-ymQlnG9m.cjs} +1 -1
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +27 -27
- package/lib/SearchAndReplace.d.ts +27 -27
- package/lib/SearchAndReplace.js +1 -1
- package/lib/Selection.d.cts +27 -27
- package/lib/Selection.d.ts +27 -27
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +27 -27
- package/lib/SlashCommand.d.ts +27 -27
- package/lib/SlashCommand.js +1 -1
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +27 -27
- package/lib/Strike.d.ts +27 -27
- package/lib/Strike.js +1 -1
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +27 -27
- package/lib/SubAndSuperScript.d.ts +27 -27
- package/lib/SubAndSuperScript.js +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.d.cts +27 -27
- package/lib/Table.d.ts +27 -27
- package/lib/Table.js +1 -1
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +27 -27
- package/lib/TableOfContent.d.ts +27 -27
- package/lib/TableOfContent.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +27 -27
- package/lib/TaskList.d.ts +27 -27
- package/lib/TaskList.js +1 -1
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +27 -27
- package/lib/TextAlign.d.ts +27 -27
- package/lib/TextAlign.js +1 -1
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +27 -27
- package/lib/TextBubble.d.ts +27 -27
- package/lib/TextBubble.js +1 -1
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +27 -27
- package/lib/TextDirection.d.ts +27 -27
- package/lib/TextDirection.js +1 -1
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +27 -27
- package/lib/TextUnderline.d.ts +27 -27
- package/lib/TextUnderline.js +1 -1
- package/lib/TrailingNode.d.cts +27 -27
- package/lib/TrailingNode.d.ts +27 -27
- package/lib/{Twitter-DLO12QnF.cjs → Twitter-CMr6GpHp.cjs} +1 -1
- package/lib/{Twitter-CZA9dXpC.js → Twitter-CjAodXzu.js} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +27 -27
- package/lib/Twitter.d.ts +27 -27
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +27 -27
- package/lib/Video.d.ts +27 -27
- package/lib/Video.js +1 -1
- package/lib/bubble-extra.cjs +2 -2
- package/lib/bubble-extra.d.cts +27 -27
- package/lib/bubble-extra.d.ts +27 -27
- package/lib/bubble-extra.js +6 -6
- package/lib/{dom-dataset-DmsCLv1q.cjs → dom-dataset-Cuy-pIfj.cjs} +3 -3
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +27 -27
- package/lib/index.d.ts +27 -27
- package/lib/index.js +2 -2
- package/lib/locale-bundle.d.cts +27 -27
- package/lib/locale-bundle.d.ts +27 -27
- package/lib/{textarea-ILk3QoYy.cjs → textarea-Ci1tHD6V.cjs} +1 -1
- package/lib/{textarea-BUlQB7hI.js → textarea-CtL8w6IS.js} +1 -1
- package/package.json +1 -2
- package/lib/Excalidraw-Bp252YTN.js +0 -651
- package/lib/Excalidraw-CYLyPnI4.cjs +0 -1
package/lib/Katex.d.cts
CHANGED
|
@@ -148,19 +148,15 @@ declare module '@tiptap/core' {
|
|
|
148
148
|
|
|
149
149
|
declare module '@tiptap/core' {
|
|
150
150
|
interface Commands<ReturnType> {
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Add an image gif
|
|
154
|
-
*/
|
|
155
|
-
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
151
|
+
indent: {
|
|
156
152
|
/**
|
|
157
|
-
*
|
|
153
|
+
* Set the indent attribute
|
|
158
154
|
*/
|
|
159
|
-
|
|
155
|
+
indent: () => ReturnType;
|
|
160
156
|
/**
|
|
161
|
-
* Set
|
|
157
|
+
* Set the outdent attribute
|
|
162
158
|
*/
|
|
163
|
-
|
|
159
|
+
outdent: () => ReturnType;
|
|
164
160
|
};
|
|
165
161
|
}
|
|
166
162
|
}
|
|
@@ -168,15 +164,19 @@ declare module '@tiptap/core' {
|
|
|
168
164
|
|
|
169
165
|
declare module '@tiptap/core' {
|
|
170
166
|
interface Commands<ReturnType> {
|
|
171
|
-
|
|
167
|
+
imageGifUpload: {
|
|
172
168
|
/**
|
|
173
|
-
*
|
|
169
|
+
* Add an image gif
|
|
174
170
|
*/
|
|
175
|
-
|
|
171
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
176
172
|
/**
|
|
177
|
-
*
|
|
173
|
+
* Update an image gif
|
|
178
174
|
*/
|
|
179
|
-
|
|
175
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
176
|
+
/**
|
|
177
|
+
* Set image alignment
|
|
178
|
+
*/
|
|
179
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
182
|
}
|
|
@@ -252,15 +252,14 @@ declare module '@tiptap/core' {
|
|
|
252
252
|
|
|
253
253
|
declare module '@tiptap/core' {
|
|
254
254
|
interface Commands<ReturnType> {
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Add an video
|
|
258
|
-
*/
|
|
259
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
255
|
+
twitter: {
|
|
260
256
|
/**
|
|
261
|
-
*
|
|
257
|
+
* Insert a tweet
|
|
258
|
+
* @param options The tweet attributes
|
|
259
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
262
260
|
*/
|
|
263
|
-
|
|
261
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
262
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
264
263
|
};
|
|
265
264
|
}
|
|
266
265
|
}
|
|
@@ -268,14 +267,15 @@ declare module '@tiptap/core' {
|
|
|
268
267
|
|
|
269
268
|
declare module '@tiptap/core' {
|
|
270
269
|
interface Commands<ReturnType> {
|
|
271
|
-
|
|
270
|
+
video: {
|
|
272
271
|
/**
|
|
273
|
-
*
|
|
274
|
-
* @param options The tweet attributes
|
|
275
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
272
|
+
* Add an video
|
|
276
273
|
*/
|
|
277
|
-
|
|
278
|
-
|
|
274
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
275
|
+
/**
|
|
276
|
+
* Update an video
|
|
277
|
+
*/
|
|
278
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
281
|
}
|
package/lib/Katex.d.ts
CHANGED
|
@@ -148,19 +148,15 @@ declare module '@tiptap/core' {
|
|
|
148
148
|
|
|
149
149
|
declare module '@tiptap/core' {
|
|
150
150
|
interface Commands<ReturnType> {
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Add an image gif
|
|
154
|
-
*/
|
|
155
|
-
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
151
|
+
indent: {
|
|
156
152
|
/**
|
|
157
|
-
*
|
|
153
|
+
* Set the indent attribute
|
|
158
154
|
*/
|
|
159
|
-
|
|
155
|
+
indent: () => ReturnType;
|
|
160
156
|
/**
|
|
161
|
-
* Set
|
|
157
|
+
* Set the outdent attribute
|
|
162
158
|
*/
|
|
163
|
-
|
|
159
|
+
outdent: () => ReturnType;
|
|
164
160
|
};
|
|
165
161
|
}
|
|
166
162
|
}
|
|
@@ -168,15 +164,19 @@ declare module '@tiptap/core' {
|
|
|
168
164
|
|
|
169
165
|
declare module '@tiptap/core' {
|
|
170
166
|
interface Commands<ReturnType> {
|
|
171
|
-
|
|
167
|
+
imageGifUpload: {
|
|
172
168
|
/**
|
|
173
|
-
*
|
|
169
|
+
* Add an image gif
|
|
174
170
|
*/
|
|
175
|
-
|
|
171
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
176
172
|
/**
|
|
177
|
-
*
|
|
173
|
+
* Update an image gif
|
|
178
174
|
*/
|
|
179
|
-
|
|
175
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
176
|
+
/**
|
|
177
|
+
* Set image alignment
|
|
178
|
+
*/
|
|
179
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
182
|
}
|
|
@@ -252,15 +252,14 @@ declare module '@tiptap/core' {
|
|
|
252
252
|
|
|
253
253
|
declare module '@tiptap/core' {
|
|
254
254
|
interface Commands<ReturnType> {
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Add an video
|
|
258
|
-
*/
|
|
259
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
255
|
+
twitter: {
|
|
260
256
|
/**
|
|
261
|
-
*
|
|
257
|
+
* Insert a tweet
|
|
258
|
+
* @param options The tweet attributes
|
|
259
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
262
260
|
*/
|
|
263
|
-
|
|
261
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
262
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
264
263
|
};
|
|
265
264
|
}
|
|
266
265
|
}
|
|
@@ -268,14 +267,15 @@ declare module '@tiptap/core' {
|
|
|
268
267
|
|
|
269
268
|
declare module '@tiptap/core' {
|
|
270
269
|
interface Commands<ReturnType> {
|
|
271
|
-
|
|
270
|
+
video: {
|
|
272
271
|
/**
|
|
273
|
-
*
|
|
274
|
-
* @param options The tweet attributes
|
|
275
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
272
|
+
* Add an video
|
|
276
273
|
*/
|
|
277
|
-
|
|
278
|
-
|
|
274
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
275
|
+
/**
|
|
276
|
+
* Update an video
|
|
277
|
+
*/
|
|
278
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
281
|
}
|
package/lib/Katex.js
CHANGED
|
@@ -4,8 +4,8 @@ import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
|
4
4
|
import { useState as T, useCallback as $, useEffect as v, useMemo as c } from "react";
|
|
5
5
|
import x from "katex";
|
|
6
6
|
import { HelpCircle as A } from "lucide-react";
|
|
7
|
-
import { O as S, P as L, m as P, A as C, n as H, L as I, B as M, Q as y } from "./RichTextEditor-
|
|
8
|
-
import { T as K } from "./textarea-
|
|
7
|
+
import { O as S, P as L, m as P, A as C, n as H, L as I, B as M, Q as y } from "./RichTextEditor-CRDKX-F8.js";
|
|
8
|
+
import { T as K } from "./textarea-CtL8w6IS.js";
|
|
9
9
|
import { u as R } from "./index-D-DR0FPY.js";
|
|
10
10
|
function V({ editor: t, ...e }) {
|
|
11
11
|
const { t: a } = R(), o = S(t, h.name, {
|
package/lib/LineHeight.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-CSvnpArE.cjs"),g=require("./index-Dz3YxLE7.cjs"),c=require("react/jsx-runtime"),L=require("react"),u=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-CSvnpArE.cjs"),g=require("./index-Dz3YxLE7.cjs"),c=require("react/jsx-runtime"),L=require("react"),u=require("./RichTextEditor-ymQlnG9m.cjs");function T(e){return Number.parseFloat(e.replace("%",""))/100}function x(e){const{t}=g.useLocale(),[n,r]=L.useState("default");function o(i){i==="default"?e.editor.commands.unsetLineHeight():e.editor.commands.setLineHeight(i),r(i)}const d=L.useMemo(()=>{const s=e.editor.extensionManager.extensions.find(l=>l.name==="lineHeight").options.lineHeights.map(l=>({label:T(l),value:l}));return s.unshift({label:t("editor.default"),value:"default"}),s},[e]);return c.jsxs(u.DropdownMenu,{children:[c.jsx(u.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:c.jsx(u.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:e==null?void 0:e.disabled,icon:"LineHeight",tooltip:e==null?void 0:e.tooltip,children:c.jsx(u.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),c.jsx(u.DropdownMenuContent,{className:"richtext-min-w-24",children:d==null?void 0:d.map((i,h)=>c.jsx(u.DropdownMenuCheckboxItem,{checked:i.value===n,onClick:()=>o(i.value),children:i.label},`lineHeight-${h}`))})]})}const _=["paragraph","heading","list_item","todo_item"];function E(e,t){const{selection:n,doc:r}=e;if(!n||!r||!(n instanceof m.TextSelection||n instanceof m.AllSelection))return e;const{from:o,to:d}=n,i=[],h=t&&t!==g.DEFAULT_LINE_HEIGHT?t:null;if(r.nodesBetween(o,d,(s,l)=>{const a=s.type;return _.includes(a.name)?((s.attrs.lineHeight||null)!==h&&i.push({node:s,pos:l,nodeType:a}),a.name!=="list_item"&&a.name!=="todo_item"):!0}),i.length===0)return e;for(const s of i){const{node:l,pos:a,nodeType:f}=s;let{attrs:H}=l;H={...H,lineHeight:h},e=e.setNodeMarkup(a,f,H,l.marks)}return e}function I(e){return({state:t,dispatch:n})=>{const{selection:r}=t;let{tr:o}=t;return o=o.setSelection(r),o=E(o,e),o.docChanged?(n&&n(o),!0):!1}}const b=m.Extension.create({name:"lineHeight",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["paragraph","heading","list_item","todo_item"],lineHeights:g.DEFAULT_LINE_HEIGHT_LIST,defaultHeight:g.DEFAULT_LINE_HEIGHT,button({editor:t,t:n}){return{component:x,componentProps:{editor:t,tooltip:n("editor.lineheight.tooltip")}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:e=>e.style.lineHeight||this.options.defaultHeight,renderHTML:e=>e.lineHeight===this.options.defaultHeight||!e.lineHeight?{}:{style:`line-height: ${e.lineHeight}`}}}}]},addCommands(){return{setLineHeight:e=>I(e),unsetLineHeight:()=>({commands:e})=>this.options.types.every(t=>e.resetAttributes(t,"lineHeight"))}}});exports.DEFAULT_LINE_HEIGHT_LIST=g.DEFAULT_LINE_HEIGHT_LIST;exports.LineHeight=b;
|
package/lib/LineHeight.d.cts
CHANGED
|
@@ -216,19 +216,15 @@ declare module '@tiptap/core' {
|
|
|
216
216
|
|
|
217
217
|
declare module '@tiptap/core' {
|
|
218
218
|
interface Commands<ReturnType> {
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Add an image gif
|
|
222
|
-
*/
|
|
223
|
-
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
219
|
+
indent: {
|
|
224
220
|
/**
|
|
225
|
-
*
|
|
221
|
+
* Set the indent attribute
|
|
226
222
|
*/
|
|
227
|
-
|
|
223
|
+
indent: () => ReturnType;
|
|
228
224
|
/**
|
|
229
|
-
* Set
|
|
225
|
+
* Set the outdent attribute
|
|
230
226
|
*/
|
|
231
|
-
|
|
227
|
+
outdent: () => ReturnType;
|
|
232
228
|
};
|
|
233
229
|
}
|
|
234
230
|
}
|
|
@@ -236,15 +232,19 @@ declare module '@tiptap/core' {
|
|
|
236
232
|
|
|
237
233
|
declare module '@tiptap/core' {
|
|
238
234
|
interface Commands<ReturnType> {
|
|
239
|
-
|
|
235
|
+
imageGifUpload: {
|
|
240
236
|
/**
|
|
241
|
-
*
|
|
237
|
+
* Add an image gif
|
|
242
238
|
*/
|
|
243
|
-
|
|
239
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
244
240
|
/**
|
|
245
|
-
*
|
|
241
|
+
* Update an image gif
|
|
246
242
|
*/
|
|
247
|
-
|
|
243
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
244
|
+
/**
|
|
245
|
+
* Set image alignment
|
|
246
|
+
*/
|
|
247
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
248
248
|
};
|
|
249
249
|
}
|
|
250
250
|
}
|
|
@@ -320,15 +320,14 @@ declare module '@tiptap/core' {
|
|
|
320
320
|
|
|
321
321
|
declare module '@tiptap/core' {
|
|
322
322
|
interface Commands<ReturnType> {
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Add an video
|
|
326
|
-
*/
|
|
327
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
323
|
+
twitter: {
|
|
328
324
|
/**
|
|
329
|
-
*
|
|
325
|
+
* Insert a tweet
|
|
326
|
+
* @param options The tweet attributes
|
|
327
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
330
328
|
*/
|
|
331
|
-
|
|
329
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
330
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
332
331
|
};
|
|
333
332
|
}
|
|
334
333
|
}
|
|
@@ -336,14 +335,15 @@ declare module '@tiptap/core' {
|
|
|
336
335
|
|
|
337
336
|
declare module '@tiptap/core' {
|
|
338
337
|
interface Commands<ReturnType> {
|
|
339
|
-
|
|
338
|
+
video: {
|
|
340
339
|
/**
|
|
341
|
-
*
|
|
342
|
-
* @param options The tweet attributes
|
|
343
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
340
|
+
* Add an video
|
|
344
341
|
*/
|
|
345
|
-
|
|
346
|
-
|
|
342
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
343
|
+
/**
|
|
344
|
+
* Update an video
|
|
345
|
+
*/
|
|
346
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
349
|
}
|
package/lib/LineHeight.d.ts
CHANGED
|
@@ -216,19 +216,15 @@ declare module '@tiptap/core' {
|
|
|
216
216
|
|
|
217
217
|
declare module '@tiptap/core' {
|
|
218
218
|
interface Commands<ReturnType> {
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Add an image gif
|
|
222
|
-
*/
|
|
223
|
-
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
219
|
+
indent: {
|
|
224
220
|
/**
|
|
225
|
-
*
|
|
221
|
+
* Set the indent attribute
|
|
226
222
|
*/
|
|
227
|
-
|
|
223
|
+
indent: () => ReturnType;
|
|
228
224
|
/**
|
|
229
|
-
* Set
|
|
225
|
+
* Set the outdent attribute
|
|
230
226
|
*/
|
|
231
|
-
|
|
227
|
+
outdent: () => ReturnType;
|
|
232
228
|
};
|
|
233
229
|
}
|
|
234
230
|
}
|
|
@@ -236,15 +232,19 @@ declare module '@tiptap/core' {
|
|
|
236
232
|
|
|
237
233
|
declare module '@tiptap/core' {
|
|
238
234
|
interface Commands<ReturnType> {
|
|
239
|
-
|
|
235
|
+
imageGifUpload: {
|
|
240
236
|
/**
|
|
241
|
-
*
|
|
237
|
+
* Add an image gif
|
|
242
238
|
*/
|
|
243
|
-
|
|
239
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
244
240
|
/**
|
|
245
|
-
*
|
|
241
|
+
* Update an image gif
|
|
246
242
|
*/
|
|
247
|
-
|
|
243
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
244
|
+
/**
|
|
245
|
+
* Set image alignment
|
|
246
|
+
*/
|
|
247
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
248
248
|
};
|
|
249
249
|
}
|
|
250
250
|
}
|
|
@@ -320,15 +320,14 @@ declare module '@tiptap/core' {
|
|
|
320
320
|
|
|
321
321
|
declare module '@tiptap/core' {
|
|
322
322
|
interface Commands<ReturnType> {
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Add an video
|
|
326
|
-
*/
|
|
327
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
323
|
+
twitter: {
|
|
328
324
|
/**
|
|
329
|
-
*
|
|
325
|
+
* Insert a tweet
|
|
326
|
+
* @param options The tweet attributes
|
|
327
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
330
328
|
*/
|
|
331
|
-
|
|
329
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
330
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
332
331
|
};
|
|
333
332
|
}
|
|
334
333
|
}
|
|
@@ -336,14 +335,15 @@ declare module '@tiptap/core' {
|
|
|
336
335
|
|
|
337
336
|
declare module '@tiptap/core' {
|
|
338
337
|
interface Commands<ReturnType> {
|
|
339
|
-
|
|
338
|
+
video: {
|
|
340
339
|
/**
|
|
341
|
-
*
|
|
342
|
-
* @param options The tweet attributes
|
|
343
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
340
|
+
* Add an video
|
|
344
341
|
*/
|
|
345
|
-
|
|
346
|
-
|
|
342
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
343
|
+
/**
|
|
344
|
+
* Update an video
|
|
345
|
+
*/
|
|
346
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
349
|
}
|
package/lib/LineHeight.js
CHANGED
|
@@ -2,7 +2,7 @@ import { T as f, A as H, E as L } from "./index-CXIIg9Sq.js";
|
|
|
2
2
|
import { u as x, j as m, k as T } from "./index-D-DR0FPY.js";
|
|
3
3
|
import { jsxs as b, jsx as h } from "react/jsx-runtime";
|
|
4
4
|
import { useState as p, useMemo as _ } from "react";
|
|
5
|
-
import { D, e as E, A as M, k as w, f as A, h as C } from "./RichTextEditor-
|
|
5
|
+
import { D, e as E, A as M, k as w, f as A, h as C } from "./RichTextEditor-CRDKX-F8.js";
|
|
6
6
|
function y(e) {
|
|
7
7
|
return Number.parseFloat(e.replace("%", "")) / 100;
|
|
8
8
|
}
|
package/lib/Link.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index-CSvnpArE.cjs"),B=require("react/jsx-runtime"),Pe=require("react"),z=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index-CSvnpArE.cjs"),B=require("react/jsx-runtime"),Pe=require("react"),z=require("./RichTextEditor-ymQlnG9m.cjs"),ve="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Ne="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",K=(t,n)=>{for(const e in n)t[e]=n[e];return t},Ft="numeric",Gt="ascii",Qt="alpha",$="asciinumeric",_="alphanumeric",_t="domain",Ee="emoji",Ie="scheme",He="slashscheme",jt="whitespace";function we(t,n){return t in n||(n[t]=[]),n[t]}function j(t,n,e){n[Ft]&&(n[$]=!0,n[_]=!0),n[Gt]&&(n[$]=!0,n[Qt]=!0),n[$]&&(n[_]=!0),n[Qt]&&(n[_]=!0),n[_]&&(n[_t]=!0),n[Ee]&&(n[_t]=!0);for(const o in n){const s=we(o,e);s.indexOf(t)<0&&s.push(t)}}function xe(t,n){const e={};for(const o in n)n[o].indexOf(t)>=0&&(e[o]=!0);return e}function R(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}R.groups={};R.prototype={accepts(){return!!this.t},go(t){const n=this,e=n.j[t];if(e)return e;for(let o=0;o<n.jr.length;o++){const s=n.jr[o][0],i=n.jr[o][1];if(i&&s.test(t))return i}return n.jd},has(t,n=!1){return n?t in this.j:!!this.go(t)},ta(t,n,e,o){for(let s=0;s<t.length;s++)this.tt(t[s],n,e,o)},tr(t,n,e,o){o=o||R.groups;let s;return n&&n.j?s=n:(s=new R(n),e&&o&&j(n,e,o)),this.jr.push([t,s]),s},ts(t,n,e,o){let s=this;const i=t.length;if(!i)return s;for(let a=0;a<i-1;a++)s=s.tt(t[a]);return s.tt(t[i-1],n,e,o)},tt(t,n,e,o){o=o||R.groups;const s=this;if(n&&n.j)return s.j[t]=n,n;const i=n;let a,l=s.go(t);if(l?(a=new R,K(a.j,l.j),a.jr.push.apply(a.jr,l.jr),a.jd=l.jd,a.t=l.t):a=new R,i){if(o)if(a.t&&typeof a.t=="string"){const h=K(xe(a.t,o),e);j(i,h,o)}else e&&j(i,e,o);a.t=i}return s.j[t]=a,a}};const u=(t,n,e,o,s)=>t.ta(n,e,o,s),A=(t,n,e,o,s)=>t.tr(n,e,o,s),ce=(t,n,e,o,s)=>t.ts(n,e,o,s),r=(t,n,e,o,s)=>t.tt(n,e,o,s),H="WORD",$t="UWORD",pe="ASCIINUMERICAL",Ae="ALPHANUMERICAL",Z="LOCALHOST",qt="TLD",Jt="UTLD",it="SCHEME",W="SLASH_SCHEME",Yt="NUM",Vt="WS",Xt="NL",q="OPENBRACE",J="CLOSEBRACE",rt="OPENBRACKET",at="CLOSEBRACKET",lt="OPENPAREN",ct="CLOSEPAREN",ut="OPENANGLEBRACKET",dt="CLOSEANGLEBRACKET",ht="FULLWIDTHLEFTPAREN",ft="FULLWIDTHRIGHTPAREN",gt="LEFTCORNERBRACKET",mt="RIGHTCORNERBRACKET",Et="LEFTWHITECORNERBRACKET",pt="RIGHTWHITECORNERBRACKET",At="FULLWIDTHLESSTHAN",kt="FULLWIDTHGREATERTHAN",Lt="AMPERSAND",Zt="APOSTROPHE",Tt="ASTERISK",x="AT",yt="BACKSLASH",Ct="BACKTICK",Rt="CARET",M="COLON",te="COMMA",bt="DOLLAR",P="DOT",Ot="EQUALS",ee="EXCLAMATION",S="HYPHEN",V="PERCENT",St="PIPE",Pt="PLUS",vt="POUND",Y="QUERY",ne="QUOTE",ke="FULLWIDTHMIDDLEDOT",oe="SEMI",v="SLASH",X="TILDE",Nt="UNDERSCORE",Le="EMOJI",It="SYM";var Te=Object.freeze({__proto__:null,WORD:H,UWORD:$t,ASCIINUMERICAL:pe,ALPHANUMERICAL:Ae,LOCALHOST:Z,TLD:qt,UTLD:Jt,SCHEME:it,SLASH_SCHEME:W,NUM:Yt,WS:Vt,NL:Xt,OPENBRACE:q,CLOSEBRACE:J,OPENBRACKET:rt,CLOSEBRACKET:at,OPENPAREN:lt,CLOSEPAREN:ct,OPENANGLEBRACKET:ut,CLOSEANGLEBRACKET:dt,FULLWIDTHLEFTPAREN:ht,FULLWIDTHRIGHTPAREN:ft,LEFTCORNERBRACKET:gt,RIGHTCORNERBRACKET:mt,LEFTWHITECORNERBRACKET:Et,RIGHTWHITECORNERBRACKET:pt,FULLWIDTHLESSTHAN:At,FULLWIDTHGREATERTHAN:kt,AMPERSAND:Lt,APOSTROPHE:Zt,ASTERISK:Tt,AT:x,BACKSLASH:yt,BACKTICK:Ct,CARET:Rt,COLON:M,COMMA:te,DOLLAR:bt,DOT:P,EQUALS:Ot,EXCLAMATION:ee,HYPHEN:S,PERCENT:V,PIPE:St,PLUS:Pt,POUND:vt,QUERY:Y,QUOTE:ne,FULLWIDTHMIDDLEDOT:ke,SEMI:oe,SLASH:v,TILDE:X,UNDERSCORE:Nt,EMOJI:Le,SYM:It});const N=/[a-z]/,Q=new RegExp("\\p{L}","u"),Ut=new RegExp("\\p{Emoji}","u"),I=/\d/,Bt=/\s/,ue="\r",zt=`
|
|
2
2
|
`,Me="️",De="",Wt="";let nt=null,ot=null;function je(t=[]){const n={};R.groups=n;const e=new R;nt==null&&(nt=de(ve)),ot==null&&(ot=de(Ne)),r(e,"'",Zt),r(e,"{",q),r(e,"}",J),r(e,"[",rt),r(e,"]",at),r(e,"(",lt),r(e,")",ct),r(e,"<",ut),r(e,">",dt),r(e,"(",ht),r(e,")",ft),r(e,"「",gt),r(e,"」",mt),r(e,"『",Et),r(e,"』",pt),r(e,"<",At),r(e,">",kt),r(e,"&",Lt),r(e,"*",Tt),r(e,"@",x),r(e,"`",Ct),r(e,"^",Rt),r(e,":",M),r(e,",",te),r(e,"$",bt),r(e,".",P),r(e,"=",Ot),r(e,"!",ee),r(e,"-",S),r(e,"%",V),r(e,"|",St),r(e,"+",Pt),r(e,"#",vt),r(e,"?",Y),r(e,'"',ne),r(e,"/",v),r(e,";",oe),r(e,"~",X),r(e,"_",Nt),r(e,"\\",yt),r(e,"・",ke);const o=A(e,I,Yt,{[Ft]:!0});A(o,I,o);const s=A(o,N,pe,{[$]:!0}),i=A(o,Q,Ae,{[_]:!0}),a=A(e,N,H,{[Gt]:!0});A(a,I,s),A(a,N,a),A(s,I,s),A(s,N,s);const l=A(e,Q,$t,{[Qt]:!0});A(l,N),A(l,I,i),A(l,Q,l),A(i,I,i),A(i,N),A(i,Q,i);const h=r(e,zt,Xt,{[jt]:!0}),c=r(e,ue,Vt,{[jt]:!0}),f=A(e,Bt,Vt,{[jt]:!0});r(e,Wt,f),r(c,zt,h),r(c,Wt,f),A(c,Bt,f),r(f,ue),r(f,zt),A(f,Bt,f),r(f,Wt,f);const d=A(e,Ut,Le,{[Ee]:!0});r(d,"#"),A(d,Ut,d),r(d,Me,d);const m=r(d,De);r(m,"#"),A(m,Ut,d);const p=[[N,a],[I,s]],b=[[N,null],[Q,l],[I,i]];for(let k=0;k<nt.length;k++)w(e,nt[k],qt,H,p);for(let k=0;k<ot.length;k++)w(e,ot[k],Jt,$t,b);j(qt,{tld:!0,ascii:!0},n),j(Jt,{utld:!0,alpha:!0},n),w(e,"file",it,H,p),w(e,"mailto",it,H,p),w(e,"http",W,H,p),w(e,"https",W,H,p),w(e,"ftp",W,H,p),w(e,"ftps",W,H,p),j(it,{scheme:!0,ascii:!0},n),j(W,{slashscheme:!0,ascii:!0},n),t=t.sort((k,y)=>k[0]>y[0]?1:-1);for(let k=0;k<t.length;k++){const y=t[k][0],T=t[k][1]?{[Ie]:!0}:{[He]:!0};y.indexOf("-")>=0?T[_t]=!0:N.test(y)?I.test(y)?T[$]=!0:T[Gt]=!0:T[Ft]=!0,ce(e,y,y,T)}return ce(e,"localhost",Z,{ascii:!0}),e.jd=new R(It),{start:e,tokens:K({groups:n},Te)}}function ye(t,n){const e=Ue(n.replace(/[A-Z]/g,l=>l.toLowerCase())),o=e.length,s=[];let i=0,a=0;for(;a<o;){let l=t,h=null,c=0,f=null,d=-1,m=-1;for(;a<o&&(h=l.go(e[a]));)l=h,l.accepts()?(d=0,m=0,f=l):d>=0&&(d+=e[a].length,m++),c+=e[a].length,i+=e[a].length,a++;i-=d,a-=m,c-=d,s.push({t:f.t,v:n.slice(i-c,i),s:i-c,e:i})}return s}function Ue(t){const n=[],e=t.length;let o=0;for(;o<e;){let s=t.charCodeAt(o),i,a=s<55296||s>56319||o+1===e||(i=t.charCodeAt(o+1))<56320||i>57343?t[o]:t.slice(o,o+2);n.push(a),o+=a.length}return n}function w(t,n,e,o,s){let i;const a=n.length;for(let l=0;l<a-1;l++){const h=n[l];t.j[h]?i=t.j[h]:(i=new R(o),i.jr=s.slice(),t.j[h]=i),t=i}return i=new R(e),i.jr=s.slice(),t.j[n[a-1]]=i,i}function de(t){const n=[],e=[];let o=0,s="0123456789";for(;o<t.length;){let i=0;for(;s.indexOf(t[o+i])>=0;)i++;if(i>0){n.push(e.join(""));for(let a=parseInt(t.substring(o,o+i),10);a>0;a--)e.pop();o+=i}else e.push(t[o]),o++}return n}const tt={defaultProtocol:"http",events:null,format:he,formatHref:he,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function se(t,n=null){let e=K({},tt);t&&(e=K(e,t instanceof se?t.o:t));const o=e.ignoreTags,s=[];for(let i=0;i<o.length;i++)s.push(o[i].toUpperCase());this.o=e,n&&(this.defaultRender=n),this.ignoreTags=s}se.prototype={o:tt,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,n,e){const o=n!=null;let s=this.o[t];return s&&(typeof s=="object"?(s=e.t in s?s[e.t]:tt[t],typeof s=="function"&&o&&(s=s(n,e))):typeof s=="function"&&o&&(s=s(n,e.t,e)),s)},getObj(t,n,e){let o=this.o[t];return typeof o=="function"&&n!=null&&(o=o(n,e.t,e)),o},render(t){const n=t.render(this);return(this.get("render",null,t)||this.defaultRender)(n,t.t,t)}};function he(t){return t}function Ce(t,n){this.t="token",this.v=t,this.tk=n}Ce.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const n=this.toString(),e=t.get("truncate",n,this),o=t.get("format",n,this);return e&&o.length>e?o.substring(0,e)+"…":o},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=tt.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const n=this,e=this.toHref(t.get("defaultProtocol")),o=t.get("formatHref",e,this),s=t.get("tagName",e,n),i=this.toFormattedString(t),a={},l=t.get("className",e,n),h=t.get("target",e,n),c=t.get("rel",e,n),f=t.getObj("attributes",e,n),d=t.getObj("events",e,n);return a.href=o,l&&(a.class=l),h&&(a.target=h),c&&(a.rel=c),f&&K(a,f),{tagName:s,attributes:a,content:i,eventListeners:d}}};function Ht(t,n){class e extends Ce{constructor(s,i){super(s,i),this.t=t}}for(const o in n)e.prototype[o]=n[o];return e.t=t,e}const fe=Ht("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),ge=Ht("text"),Be=Ht("nl"),st=Ht("url",{isLink:!0,toHref(t=tt.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Z&&t[1].t===M}}),O=t=>new R(t);function ze({groups:t}){const n=t.domain.concat([Lt,Tt,x,yt,Ct,Rt,bt,Ot,S,Yt,V,St,Pt,vt,v,It,X,Nt]),e=[M,te,P,ee,V,Y,ne,oe,ut,dt,q,J,at,rt,lt,ct,ht,ft,gt,mt,Et,pt,At,kt],o=[Lt,Zt,Tt,yt,Ct,Rt,bt,Ot,S,q,J,V,St,Pt,vt,Y,v,It,X,Nt],s=O(),i=r(s,X);u(i,o,i),u(i,t.domain,i);const a=O(),l=O(),h=O();u(s,t.domain,a),u(s,t.scheme,l),u(s,t.slashscheme,h),u(a,o,i),u(a,t.domain,a);const c=r(a,x);r(i,x,c),r(l,x,c),r(h,x,c);const f=r(i,P);u(f,o,i),u(f,t.domain,i);const d=O();u(c,t.domain,d),u(d,t.domain,d);const m=r(d,P);u(m,t.domain,d);const p=O(fe);u(m,t.tld,p),u(m,t.utld,p),r(c,Z,p);const b=r(d,S);r(b,S,b),u(b,t.domain,d),u(p,t.domain,d),r(p,P,m),r(p,S,b);const k=r(p,M);u(k,t.numeric,fe);const y=r(a,S),g=r(a,P);r(y,S,y),u(y,t.domain,a),u(g,o,i),u(g,t.domain,a);const T=O(st);u(g,t.tld,T),u(g,t.utld,T),u(T,t.domain,a),u(T,o,i),r(T,P,g),r(T,S,y),r(T,x,c);const be=r(T,M),re=O(st);u(be,t.numeric,re);const C=O(st),F=O();u(C,n,C),u(C,e,F),u(F,n,C),u(F,e,F),r(T,v,C),r(re,v,C);const wt=r(l,M),Oe=r(h,M),Se=r(Oe,v),xt=r(Se,v);u(l,t.domain,a),r(l,P,g),r(l,S,y),u(h,t.domain,a),r(h,P,g),r(h,S,y),u(wt,t.domain,C),r(wt,v,C),r(wt,Y,C),u(xt,t.domain,C),u(xt,n,C),r(xt,v,C);const ae=[[q,J],[rt,at],[lt,ct],[ut,dt],[ht,ft],[gt,mt],[Et,pt],[At,kt]];for(let Mt=0;Mt<ae.length;Mt++){const[le,Dt]=ae[Mt],et=r(C,le);r(F,le,et),r(et,Dt,C);const U=O(st);u(et,n,U);const G=O();u(et,e),u(U,n,U),u(U,e,G),u(G,n,U),u(G,e,G),r(U,Dt,C),r(G,Dt,C)}return r(s,Z,T),r(s,Xt,Be),{start:s,tokens:Te}}function We(t,n,e){let o=e.length,s=0,i=[],a=[];for(;s<o;){let l=t,h=null,c=null,f=0,d=null,m=-1;for(;s<o&&!(h=l.go(e[s].t));)a.push(e[s++]);for(;s<o&&(c=h||l.go(e[s].t));)h=null,l=c,l.accepts()?(m=0,d=l):m>=0&&m++,s++,f++;if(m<0)s-=f,s<o&&(a.push(e[s]),s++);else{a.length>0&&(i.push(Kt(ge,n,a)),a=[]),s-=m,f-=m;const p=d.t,b=e.slice(s-f,s);i.push(Kt(p,n,b))}}return a.length>0&&i.push(Kt(ge,n,a)),i}function Kt(t,n,e){const o=e[0].s,s=e[e.length-1].e,i=n.slice(o,s);return new t(i,e)}const Ke=typeof console<"u"&&console&&console.warn||(()=>{}),Fe="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",E={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Ge(){return R.groups={},E.scanner=null,E.parser=null,E.tokenQueue=[],E.pluginQueue=[],E.customSchemes=[],E.initialized=!1,E}function me(t,n=!1){if(E.initialized&&Ke(`linkifyjs: already initialized - will not register custom scheme "${t}" ${Fe}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
3
3
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
4
4
|
2. Cannot start or end with "-"
|
package/lib/Link.d.cts
CHANGED
|
@@ -212,19 +212,15 @@ declare module '@tiptap/core' {
|
|
|
212
212
|
|
|
213
213
|
declare module '@tiptap/core' {
|
|
214
214
|
interface Commands<ReturnType> {
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Add an image gif
|
|
218
|
-
*/
|
|
219
|
-
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
215
|
+
indent: {
|
|
220
216
|
/**
|
|
221
|
-
*
|
|
217
|
+
* Set the indent attribute
|
|
222
218
|
*/
|
|
223
|
-
|
|
219
|
+
indent: () => ReturnType;
|
|
224
220
|
/**
|
|
225
|
-
* Set
|
|
221
|
+
* Set the outdent attribute
|
|
226
222
|
*/
|
|
227
|
-
|
|
223
|
+
outdent: () => ReturnType;
|
|
228
224
|
};
|
|
229
225
|
}
|
|
230
226
|
}
|
|
@@ -232,15 +228,19 @@ declare module '@tiptap/core' {
|
|
|
232
228
|
|
|
233
229
|
declare module '@tiptap/core' {
|
|
234
230
|
interface Commands<ReturnType> {
|
|
235
|
-
|
|
231
|
+
imageGifUpload: {
|
|
236
232
|
/**
|
|
237
|
-
*
|
|
233
|
+
* Add an image gif
|
|
238
234
|
*/
|
|
239
|
-
|
|
235
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
240
236
|
/**
|
|
241
|
-
*
|
|
237
|
+
* Update an image gif
|
|
242
238
|
*/
|
|
243
|
-
|
|
239
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
240
|
+
/**
|
|
241
|
+
* Set image alignment
|
|
242
|
+
*/
|
|
243
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
246
|
}
|
|
@@ -316,15 +316,14 @@ declare module '@tiptap/core' {
|
|
|
316
316
|
|
|
317
317
|
declare module '@tiptap/core' {
|
|
318
318
|
interface Commands<ReturnType> {
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Add an video
|
|
322
|
-
*/
|
|
323
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
319
|
+
twitter: {
|
|
324
320
|
/**
|
|
325
|
-
*
|
|
321
|
+
* Insert a tweet
|
|
322
|
+
* @param options The tweet attributes
|
|
323
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
326
324
|
*/
|
|
327
|
-
|
|
325
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
326
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
328
327
|
};
|
|
329
328
|
}
|
|
330
329
|
}
|
|
@@ -332,14 +331,15 @@ declare module '@tiptap/core' {
|
|
|
332
331
|
|
|
333
332
|
declare module '@tiptap/core' {
|
|
334
333
|
interface Commands<ReturnType> {
|
|
335
|
-
|
|
334
|
+
video: {
|
|
336
335
|
/**
|
|
337
|
-
*
|
|
338
|
-
* @param options The tweet attributes
|
|
339
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
336
|
+
* Add an video
|
|
340
337
|
*/
|
|
341
|
-
|
|
342
|
-
|
|
338
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
339
|
+
/**
|
|
340
|
+
* Update an video
|
|
341
|
+
*/
|
|
342
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
345
|
}
|