reactjs-tiptap-editor 0.3.2 → 0.3.3
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-LnZiD_hs.cjs → ActionMenuButton-D5CqiauP.cjs} +1 -1
- package/lib/{ActionMenuButton-X9t23Kr1.js → ActionMenuButton-DJQVpcjj.js} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.d.cts +8 -8
- package/lib/Attachment.d.ts +8 -8
- package/lib/Attachment.js +1 -1
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.d.cts +8 -8
- package/lib/Blockquote.d.ts +8 -8
- package/lib/Blockquote.js +1 -1
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +8 -8
- package/lib/Bold.d.ts +8 -8
- package/lib/Bold.js +1 -1
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +8 -8
- package/lib/BulletList.d.ts +8 -8
- package/lib/BulletList.js +1 -1
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +8 -8
- package/lib/Clear.d.ts +8 -8
- package/lib/Clear.js +1 -1
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +8 -8
- package/lib/Code.d.ts +8 -8
- package/lib/Code.js +1 -1
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.d.cts +8 -8
- package/lib/CodeBlock.d.ts +8 -8
- package/lib/CodeBlock.js +1 -1
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +8 -8
- package/lib/Color.d.ts +8 -8
- package/lib/Color.js +1 -1
- package/lib/Document.d.cts +8 -8
- package/lib/Document.d.ts +8 -8
- package/lib/{Drawer-CqizRDVf.js → Drawer-82lBASmO.js} +1 -1
- package/lib/{Drawer-BbWFl6BS.cjs → Drawer-DLV1rOAE.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +8 -8
- package/lib/Drawer.d.ts +8 -8
- package/lib/Drawer.js +2 -2
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +8 -8
- package/lib/Emoji.d.ts +8 -8
- package/lib/Emoji.js +1 -1
- package/lib/{Excalidraw-7uXZDsmD.cjs → Excalidraw-BuGGHrVK.cjs} +1 -1
- package/lib/{Excalidraw-XwpYLfpI.js → Excalidraw-CsD-4eCA.js} +1 -1
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +8 -8
- package/lib/Excalidraw.d.ts +8 -8
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +8 -8
- package/lib/ExportPdf.d.ts +8 -8
- package/lib/ExportPdf.js +1 -1
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +8 -8
- package/lib/ExportWord.d.ts +8 -8
- package/lib/ExportWord.js +1 -1
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +8 -8
- package/lib/FontFamily.d.ts +8 -8
- package/lib/FontFamily.js +2 -2
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +8 -8
- package/lib/FontSize.d.ts +8 -8
- package/lib/FontSize.js +2 -2
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +8 -8
- package/lib/FormatPainter.d.ts +8 -8
- package/lib/FormatPainter.js +1 -1
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +8 -8
- package/lib/Heading.d.ts +8 -8
- package/lib/Heading.js +2 -2
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +8 -8
- package/lib/Highlight.d.ts +8 -8
- package/lib/Highlight.js +1 -1
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +8 -8
- package/lib/History.d.ts +8 -8
- package/lib/History.js +1 -1
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +8 -8
- package/lib/HorizontalRule.d.ts +8 -8
- package/lib/HorizontalRule.js +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +8 -8
- package/lib/Iframe.d.ts +8 -8
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +8 -8
- package/lib/Image.d.ts +8 -8
- package/lib/Image.js +1 -1
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +8 -8
- package/lib/ImageGif.d.ts +8 -8
- package/lib/ImageGif.js +1 -1
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.d.cts +8 -8
- package/lib/ImportWord.d.ts +8 -8
- package/lib/ImportWord.js +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +8 -8
- package/lib/Indent.d.ts +8 -8
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +8 -8
- package/lib/Italic.d.ts +8 -8
- package/lib/Italic.js +1 -1
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +8 -8
- package/lib/Katex.d.ts +8 -8
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +8 -8
- package/lib/LineHeight.d.ts +8 -8
- package/lib/LineHeight.js +1 -1
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +8 -8
- package/lib/Link.d.ts +8 -8
- package/lib/Link.js +1 -1
- package/lib/ListItem.d.cts +8 -8
- package/lib/ListItem.d.ts +8 -8
- package/lib/Mention.d.cts +8 -8
- package/lib/Mention.d.ts +8 -8
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.d.cts +8 -8
- package/lib/Mermaid.d.ts +8 -8
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +8 -8
- package/lib/MoreMark.d.ts +8 -8
- package/lib/MoreMark.js +1 -1
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +8 -8
- package/lib/MultiColumn.d.ts +8 -8
- package/lib/MultiColumn.js +1 -1
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +8 -8
- package/lib/OrderedList.d.ts +8 -8
- package/lib/OrderedList.js +1 -1
- package/lib/{RichTextEditor-BhzFkRcp.js → RichTextEditor-BwuyWeH3.js} +437 -425
- package/lib/{RichTextEditor-BulGh0GP.cjs → RichTextEditor-NfX6yV6A.cjs} +4 -4
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +8 -8
- package/lib/SearchAndReplace.d.ts +8 -8
- package/lib/SearchAndReplace.js +1 -1
- package/lib/Selection.d.cts +8 -8
- package/lib/Selection.d.ts +8 -8
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +8 -8
- package/lib/SlashCommand.d.ts +8 -8
- package/lib/SlashCommand.js +1 -1
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +8 -8
- package/lib/Strike.d.ts +8 -8
- package/lib/Strike.js +1 -1
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +8 -8
- package/lib/SubAndSuperScript.d.ts +8 -8
- package/lib/SubAndSuperScript.js +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.d.cts +8 -8
- package/lib/Table.d.ts +8 -8
- package/lib/Table.js +1 -1
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +8 -8
- package/lib/TableOfContent.d.ts +8 -8
- package/lib/TableOfContent.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +8 -8
- package/lib/TaskList.d.ts +8 -8
- package/lib/TaskList.js +1 -1
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +8 -8
- package/lib/TextAlign.d.ts +8 -8
- package/lib/TextAlign.js +1 -1
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +8 -8
- package/lib/TextBubble.d.ts +8 -8
- package/lib/TextBubble.js +1 -1
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +8 -8
- package/lib/TextDirection.d.ts +8 -8
- package/lib/TextDirection.js +1 -1
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +8 -8
- package/lib/TextUnderline.d.ts +8 -8
- package/lib/TextUnderline.js +1 -1
- package/lib/TrailingNode.d.cts +8 -8
- package/lib/TrailingNode.d.ts +8 -8
- package/lib/{Twitter-CzT2PGy6.js → Twitter-Bstfoi9X.js} +1 -1
- package/lib/{Twitter-R32iSHHD.cjs → Twitter-D41ISCsH.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +8 -8
- package/lib/Twitter.d.ts +8 -8
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +15 -8
- package/lib/Video.d.ts +15 -8
- package/lib/Video.js +1 -1
- package/lib/bubble-extra.cjs +1 -1
- package/lib/bubble-extra.d.cts +8 -8
- package/lib/bubble-extra.d.ts +8 -8
- package/lib/bubble-extra.js +5 -5
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +8 -8
- package/lib/index.d.ts +8 -8
- package/lib/index.js +2 -2
- package/lib/locale-bundle.d.cts +8 -8
- package/lib/locale-bundle.d.ts +8 -8
- package/lib/{textarea-BIWEJWC6.js → textarea-CfH4-Iyy.js} +1 -1
- package/lib/{textarea-BMlBzzR0.cjs → textarea-ZGJkH6ji.cjs} +1 -1
- package/package.json +1 -1
package/lib/Katex.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-COecBbaE.cjs"),f=require("./dom-dataset-CAXnsjYE.cjs"),n=require("react/jsx-runtime"),c=require("react"),b=require("katex"),j=require("lucide-react"),u=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-COecBbaE.cjs"),f=require("./dom-dataset-CAXnsjYE.cjs"),n=require("react/jsx-runtime"),c=require("react"),b=require("katex"),j=require("lucide-react"),u=require("./RichTextEditor-NfX6yV6A.cjs"),w=require("./textarea-ZGJkH6ji.cjs"),k=require("./index-LbrE7K9i.cjs");function $({editor:e,...t}){const{t:s}=k.useLocale(),o=u.useAttributes(e,x.name,{text:"",defaultShowPicker:!1}),{text:i,defaultShowPicker:r}=o,[a,d]=c.useState(""),g=c.useCallback(()=>{e.chain().focus().setKatex({text:a}).run(),d("")},[e,a]);c.useEffect(()=>{r&&e.chain().updateAttributes(x.name,{defaultShowPicker:!1}).focus().run()},[e,r]);const h=c.useMemo(()=>{try{return b.renderToString(`${a}`)}catch{return a}},[a]),m=c.useMemo(()=>`${a}`.trim()?n.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:h||""}}):null,[a,h]);return n.jsxs(u.Popover,{modal:!0,children:[n.jsx(u.PopoverTrigger,{asChild:!0,children:n.jsx(u.ActionButton,{icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip})}),n.jsxs(u.PopoverContent,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:[n.jsx(u.Label,{className:"richtext-mb-[6px]",children:s("editor.formula.dialog.text")}),n.jsx("div",{className:"richtext-mb-[16px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:n.jsx("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm",children:n.jsx(w.Textarea,{autoFocus:!0,className:"richtext-w-full",defaultValue:i,onChange:p=>d(p.target.value),placeholder:"Text",required:!0,rows:3,value:a})})}),m&&n.jsx("div",{className:"richtext-my-[10px] richtext-max-w-[286px] richtext-overflow-auto richtext-whitespace-nowrap richtext-rounded-[6px] !richtext-border richtext-p-[10px]",children:m}),n.jsxs("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]",children:[n.jsx(u.Button,{className:"richtext-flex-1",onClick:g,children:"Submit"}),n.jsx("a",{href:"https://katex.org/docs/supported",rel:"noreferrer noopener",target:"_blank",children:n.jsx(j.HelpCircle,{size:16})})]})]})]})}function T(e,t=1){let s=0,o=0,i=0;if(e.startsWith("rgb")){const r=e.replace(/\s/g,"").match(/rgb\((.*)\)$/)[1].split(",");s=+r[0],o=+r[1],i=+r[2]}else if(e.startsWith("#")){let r=e.replace("#","");r.length===3&&(r=`${r[0]}${r[0]}${r[1]}${r[1]}${r[2]}${r[2]}`),s=Number.parseInt(r.substring(0,2),16),o=Number.parseInt(r.substring(2,4),16),i=Number.parseInt(r.substring(4,6),16)}else return e;return t>1&&t<=100&&(t=t/100),`rgba(${s},${o},${i},${t})`}function v({node:e}){const t=u.useTheme(),{text:s}=e.attrs,o=c.useMemo(()=>{const a="rgb(254, 242, 237)";return t==="dark"?T(a,.75):a},[t]),i=c.useMemo(()=>{try{return b.renderToString(`${s}`)}catch{return s}},[s]),r=c.useMemo(()=>s.trim()?n.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:i}}):n.jsx("span",{contentEditable:!1,children:"Not enter a formula"}),[s,i]);return n.jsx(f.NodeViewWrapper,{style:{display:"inline-block",backgroundColor:o},as:"span",children:r})}function N(e){return t=>t.getAttribute(e)}const x=l.Node.create({name:"katex",group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){return{HTMLAttributes:{class:"katex"},button:({editor:e,t})=>({component:$,componentProps:{editor:e,action:()=>!0,isActive:()=>!1,disabled:!1,icon:"KatexIcon",tooltip:t("editor.katex.tooltip")}})}},addAttributes(){return{text:{default:"",parseHTML:N("text")},defaultShowPicker:{default:!1}}},parseHTML(){return[{tag:"span.katex"}]},renderHTML({HTMLAttributes:e}){return["span",l.mergeAttributes(this.options&&this.options.HTMLAttributes||{},e)]},addCommands(){return{setKatex:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[l.nodeInputRule({find:/^\$katex\$$/,type:this.type,getAttributes:()=>({defaultShowPicker:!0})})]},addNodeView(){return f.ReactNodeViewRenderer(v)}});exports.Katex=x;
|
package/lib/Katex.d.cts
CHANGED
|
@@ -34,9 +34,11 @@ declare module '@tiptap/core' {
|
|
|
34
34
|
|
|
35
35
|
declare module '@tiptap/core' {
|
|
36
36
|
interface Commands<ReturnType> {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
emoji: {
|
|
38
|
+
setEmoji: (emoji: {
|
|
39
|
+
name: string;
|
|
40
|
+
emoji: string;
|
|
41
|
+
}) => ReturnType;
|
|
40
42
|
};
|
|
41
43
|
}
|
|
42
44
|
}
|
|
@@ -44,11 +46,9 @@ declare module '@tiptap/core' {
|
|
|
44
46
|
|
|
45
47
|
declare module '@tiptap/core' {
|
|
46
48
|
interface Commands<ReturnType> {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
emoji: string;
|
|
51
|
-
}) => ReturnType;
|
|
49
|
+
drawer: {
|
|
50
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
51
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
}
|
package/lib/Katex.d.ts
CHANGED
|
@@ -34,9 +34,11 @@ declare module '@tiptap/core' {
|
|
|
34
34
|
|
|
35
35
|
declare module '@tiptap/core' {
|
|
36
36
|
interface Commands<ReturnType> {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
emoji: {
|
|
38
|
+
setEmoji: (emoji: {
|
|
39
|
+
name: string;
|
|
40
|
+
emoji: string;
|
|
41
|
+
}) => ReturnType;
|
|
40
42
|
};
|
|
41
43
|
}
|
|
42
44
|
}
|
|
@@ -44,11 +46,9 @@ declare module '@tiptap/core' {
|
|
|
44
46
|
|
|
45
47
|
declare module '@tiptap/core' {
|
|
46
48
|
interface Commands<ReturnType> {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
emoji: string;
|
|
51
|
-
}) => ReturnType;
|
|
49
|
+
drawer: {
|
|
50
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
51
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
}
|
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-BwuyWeH3.js";
|
|
8
|
+
import { T as K } from "./textarea-CfH4-Iyy.js";
|
|
9
9
|
import { u as R } from "./index-D9llIWB5.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-COecBbaE.cjs"),g=require("./index-LbrE7K9i.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-COecBbaE.cjs"),g=require("./index-LbrE7K9i.cjs"),c=require("react/jsx-runtime"),L=require("react"),u=require("./RichTextEditor-NfX6yV6A.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
|
@@ -102,9 +102,11 @@ declare module '@tiptap/core' {
|
|
|
102
102
|
|
|
103
103
|
declare module '@tiptap/core' {
|
|
104
104
|
interface Commands<ReturnType> {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
emoji: {
|
|
106
|
+
setEmoji: (emoji: {
|
|
107
|
+
name: string;
|
|
108
|
+
emoji: string;
|
|
109
|
+
}) => ReturnType;
|
|
108
110
|
};
|
|
109
111
|
}
|
|
110
112
|
}
|
|
@@ -112,11 +114,9 @@ declare module '@tiptap/core' {
|
|
|
112
114
|
|
|
113
115
|
declare module '@tiptap/core' {
|
|
114
116
|
interface Commands<ReturnType> {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
emoji: string;
|
|
119
|
-
}) => ReturnType;
|
|
117
|
+
drawer: {
|
|
118
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
119
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
122
|
}
|
package/lib/LineHeight.d.ts
CHANGED
|
@@ -102,9 +102,11 @@ declare module '@tiptap/core' {
|
|
|
102
102
|
|
|
103
103
|
declare module '@tiptap/core' {
|
|
104
104
|
interface Commands<ReturnType> {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
emoji: {
|
|
106
|
+
setEmoji: (emoji: {
|
|
107
|
+
name: string;
|
|
108
|
+
emoji: string;
|
|
109
|
+
}) => ReturnType;
|
|
108
110
|
};
|
|
109
111
|
}
|
|
110
112
|
}
|
|
@@ -112,11 +114,9 @@ declare module '@tiptap/core' {
|
|
|
112
114
|
|
|
113
115
|
declare module '@tiptap/core' {
|
|
114
116
|
interface Commands<ReturnType> {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
emoji: string;
|
|
119
|
-
}) => ReturnType;
|
|
117
|
+
drawer: {
|
|
118
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
119
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
122
|
}
|
package/lib/LineHeight.js
CHANGED
|
@@ -2,7 +2,7 @@ import { T as f, A as H, E as L } from "./index-Drmyqk9P.js";
|
|
|
2
2
|
import { u as x, h as m, i as T } from "./index-D9llIWB5.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-BwuyWeH3.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-COecBbaE.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-COecBbaE.cjs"),B=require("react/jsx-runtime"),Pe=require("react"),z=require("./RichTextEditor-NfX6yV6A.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
|
@@ -98,9 +98,11 @@ declare module '@tiptap/core' {
|
|
|
98
98
|
|
|
99
99
|
declare module '@tiptap/core' {
|
|
100
100
|
interface Commands<ReturnType> {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
emoji: {
|
|
102
|
+
setEmoji: (emoji: {
|
|
103
|
+
name: string;
|
|
104
|
+
emoji: string;
|
|
105
|
+
}) => ReturnType;
|
|
104
106
|
};
|
|
105
107
|
}
|
|
106
108
|
}
|
|
@@ -108,11 +110,9 @@ declare module '@tiptap/core' {
|
|
|
108
110
|
|
|
109
111
|
declare module '@tiptap/core' {
|
|
110
112
|
interface Commands<ReturnType> {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
emoji: string;
|
|
115
|
-
}) => ReturnType;
|
|
113
|
+
drawer: {
|
|
114
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
115
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
}
|
package/lib/Link.d.ts
CHANGED
|
@@ -98,9 +98,11 @@ declare module '@tiptap/core' {
|
|
|
98
98
|
|
|
99
99
|
declare module '@tiptap/core' {
|
|
100
100
|
interface Commands<ReturnType> {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
emoji: {
|
|
102
|
+
setEmoji: (emoji: {
|
|
103
|
+
name: string;
|
|
104
|
+
emoji: string;
|
|
105
|
+
}) => ReturnType;
|
|
104
106
|
};
|
|
105
107
|
}
|
|
106
108
|
}
|
|
@@ -108,11 +110,9 @@ declare module '@tiptap/core' {
|
|
|
108
110
|
|
|
109
111
|
declare module '@tiptap/core' {
|
|
110
112
|
interface Commands<ReturnType> {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
emoji: string;
|
|
115
|
-
}) => ReturnType;
|
|
113
|
+
drawer: {
|
|
114
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
115
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
}
|
package/lib/Link.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M as ve, c as Ne, m as Ft, P as Nt, a as Yt, o as Ie, q as He, r as we, s as xe, u as Me, v as De, T as Ue } from "./index-Drmyqk9P.js";
|
|
2
2
|
import { jsxs as je, jsx as F } from "react/jsx-runtime";
|
|
3
3
|
import { useState as Be } from "react";
|
|
4
|
-
import { P as ze, m as We, A as Fe, k as Ke, n as Ge, R as Qe } from "./RichTextEditor-
|
|
4
|
+
import { P as ze, m as We, A as Fe, k as Ke, n as Ge, R as Qe } from "./RichTextEditor-BwuyWeH3.js";
|
|
5
5
|
const _e = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", $e = "ελ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", B = (t, n) => {
|
|
6
6
|
for (const e in n)
|
|
7
7
|
t[e] = n[e];
|
package/lib/ListItem.d.cts
CHANGED
|
@@ -24,9 +24,11 @@ declare module '@tiptap/core' {
|
|
|
24
24
|
|
|
25
25
|
declare module '@tiptap/core' {
|
|
26
26
|
interface Commands<ReturnType> {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
emoji: {
|
|
28
|
+
setEmoji: (emoji: {
|
|
29
|
+
name: string;
|
|
30
|
+
emoji: string;
|
|
31
|
+
}) => ReturnType;
|
|
30
32
|
};
|
|
31
33
|
}
|
|
32
34
|
}
|
|
@@ -34,11 +36,9 @@ declare module '@tiptap/core' {
|
|
|
34
36
|
|
|
35
37
|
declare module '@tiptap/core' {
|
|
36
38
|
interface Commands<ReturnType> {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
emoji: string;
|
|
41
|
-
}) => ReturnType;
|
|
39
|
+
drawer: {
|
|
40
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
41
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
}
|
package/lib/ListItem.d.ts
CHANGED
|
@@ -24,9 +24,11 @@ declare module '@tiptap/core' {
|
|
|
24
24
|
|
|
25
25
|
declare module '@tiptap/core' {
|
|
26
26
|
interface Commands<ReturnType> {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
emoji: {
|
|
28
|
+
setEmoji: (emoji: {
|
|
29
|
+
name: string;
|
|
30
|
+
emoji: string;
|
|
31
|
+
}) => ReturnType;
|
|
30
32
|
};
|
|
31
33
|
}
|
|
32
34
|
}
|
|
@@ -34,11 +36,9 @@ declare module '@tiptap/core' {
|
|
|
34
36
|
|
|
35
37
|
declare module '@tiptap/core' {
|
|
36
38
|
interface Commands<ReturnType> {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
emoji: string;
|
|
41
|
-
}) => ReturnType;
|
|
39
|
+
drawer: {
|
|
40
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
41
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
}
|
package/lib/Mention.d.cts
CHANGED
|
@@ -27,9 +27,11 @@ declare module '@tiptap/core' {
|
|
|
27
27
|
|
|
28
28
|
declare module '@tiptap/core' {
|
|
29
29
|
interface Commands<ReturnType> {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
emoji: {
|
|
31
|
+
setEmoji: (emoji: {
|
|
32
|
+
name: string;
|
|
33
|
+
emoji: string;
|
|
34
|
+
}) => ReturnType;
|
|
33
35
|
};
|
|
34
36
|
}
|
|
35
37
|
}
|
|
@@ -37,11 +39,9 @@ declare module '@tiptap/core' {
|
|
|
37
39
|
|
|
38
40
|
declare module '@tiptap/core' {
|
|
39
41
|
interface Commands<ReturnType> {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
emoji: string;
|
|
44
|
-
}) => ReturnType;
|
|
42
|
+
drawer: {
|
|
43
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
44
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
}
|
package/lib/Mention.d.ts
CHANGED
|
@@ -27,9 +27,11 @@ declare module '@tiptap/core' {
|
|
|
27
27
|
|
|
28
28
|
declare module '@tiptap/core' {
|
|
29
29
|
interface Commands<ReturnType> {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
emoji: {
|
|
31
|
+
setEmoji: (emoji: {
|
|
32
|
+
name: string;
|
|
33
|
+
emoji: string;
|
|
34
|
+
}) => ReturnType;
|
|
33
35
|
};
|
|
34
36
|
}
|
|
35
37
|
}
|
|
@@ -37,11 +39,9 @@ declare module '@tiptap/core' {
|
|
|
37
39
|
|
|
38
40
|
declare module '@tiptap/core' {
|
|
39
41
|
interface Commands<ReturnType> {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
emoji: string;
|
|
44
|
-
}) => ReturnType;
|
|
42
|
+
drawer: {
|
|
43
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
44
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
}
|
package/lib/Mermaid.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var W=Object.create;var G=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var J=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of U(e))!Y.call(t,l)&&l!==r&&G(t,l,{get:()=>e[l],enumerable:!(a=X(e,l))||a.enumerable});return t};var K=(t,e,r)=>(r=t!=null?W(Z(t)):{},J(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./index-COecBbaE.cjs"),u=require("./RichTextEditor-
|
|
1
|
+
"use strict";var W=Object.create;var G=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var J=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of U(e))!Y.call(t,l)&&l!==r&&G(t,l,{get:()=>e[l],enumerable:!(a=X(e,l))||a.enumerable});return t};var K=(t,e,r)=>(r=t!=null?W(Z(t)):{},J(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./index-COecBbaE.cjs"),u=require("./RichTextEditor-NfX6yV6A.cjs"),F=require("./dom-dataset-CAXnsjYE.cjs"),o=require("react/jsx-runtime"),s=require("react"),P=require("./shortId-Bfj8TyNr.cjs"),Q=require("./textarea-ZGJkH6ji.cjs"),S=require("./index-LbrE7K9i.cjs"),$=`graph TB
|
|
2
2
|
a-->b`,ee=({editor:t,upload:e})=>{const[r,a]=s.useState($),[l,v]=s.useState(""),[T,y]=s.useState(!1),A=s.useRef(null),[d,h]=s.useState(null),E=s.useCallback(c=>{c&&import("mermaid").then(x=>{h(x.default)})},[]),I=async c=>{try{const{svg:x}=await d.render("mermaid-svg",c);v(x)}catch{v("")}},L=()=>{d.initialize({darkMode:!1,startOnLoad:!1,fontSize:12,theme:"base"}),I(r)};s.useEffect(()=>{d&&T&&L()},[d,T]),s.useEffect(()=>{d&&T&&I(r)},[d&&r]);const R=async()=>{if(r!==""){if(r){const c=A.current.querySelector("svg"),{width:x,height:j}=c.getBoundingClientRect(),_=`mermaid-${P.shortId()}.svg`;let M=P.i(c.outerHTML);if(e){console.log({src:M});const H=u.dataURLtoFile(M,_);M=await e(H)}t==null||t.chain().focus().setMermaid({type:"mermaid",src:M,alt:encodeURIComponent(r),width:x,height:j},!!r).run()}y(!1)}};return o.jsxs(u.Dialog,{onOpenChange:y,open:T,children:[o.jsx(u.DialogTrigger,{asChild:!0,children:o.jsx(u.ActionButton,{action:()=>y(!0),icon:"Mermaid",tooltip:"Mermaid"})}),o.jsxs(u.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[o.jsx(u.DialogTitle,{children:"Mermaid"}),o.jsx("div",{ref:E,style:{height:"100%",border:"1px solid hsl(var(--border))"},children:o.jsxs("div",{className:"richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]",children:[o.jsx(Q.Textarea,{autoFocus:!0,className:"richtext-flex-1",defaultValue:$,onChange:c=>a(c.target.value),placeholder:"Text",required:!0,rows:10,value:r,style:{color:"hsl(var(--richtext-foreground))"}}),o.jsx("div",{className:"richtext-flex richtext-flex-1 richtext-items-center richtext-justify-center richtext-rounded-[10px] richtext-p-[10px]",dangerouslySetInnerHTML:{__html:l},ref:A,style:{height:"100%",borderWidth:1,minHeight:500,background:"#fff"}})]})}),o.jsx(u.DialogFooter,{children:o.jsx(u.Button,{onClick:R,type:"button",children:"Save changes"})})]})]})},O={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function te({editor:t,node:e,updateAttributes:r,getPos:a,selected:l}){const[v,T]=s.useState({width:S.IMAGE_MAX_SIZE,height:S.IMAGE_MAX_SIZE}),[y,A]=s.useState({width:0,height:0}),[d]=s.useState([O.TOP_LEFT,O.TOP_RIGHT,O.BOTTOM_LEFT,O.BOTTOM_RIGHT]),[h,E]=s.useState(!1),[I,L]=s.useState({x:0,y:0,w:0,h:0,dir:""}),{align:R}=e==null?void 0:e.attrs,c=s.useMemo(()=>{const{src:i,alt:m,width:f,height:b}=e==null?void 0:e.attrs,w=q.isNumber(f)?`${f}px`:f,n=q.isNumber(b)?`${b}px`:b;return{src:i||void 0,alt:m||void 0,style:{width:w||void 0,height:n||void 0}}},[e==null?void 0:e.attrs]),x=s.useMemo(()=>{const{style:{width:i}}=c;return{width:i==="100%"?i:void 0}},[c]);function j(i){A({width:i.target.width,height:i.target.height})}function _(){t.commands.setNodeSelection(a())}const M=s.useCallback(u.throttle(()=>{const{width:i}=getComputedStyle(t.view.dom);T(m=>({...m,width:Number.parseInt(i,10)}))},S.IMAGE_THROTTLE_WAIT_TIME),[t]);function H(i,m){i.preventDefault(),i.stopPropagation();const f=y.width,b=y.height,w=f/b;let n=Number(e.attrs.width),p=Number(e.attrs.height);const g=v.width;n&&!p?(n=n>g?g:n,p=Math.round(n/w)):p&&!n?(n=Math.round(p*w),n=n>g?g:n):!n&&!p?(n=f>g?g:f,p=Math.round(n/w)):n=n>g?g:n,E(!0),L({x:i.clientX,y:i.clientY,w:n,h:p,dir:m})}const N=s.useCallback(u.throttle(i=>{if(i.preventDefault(),i.stopPropagation(),!h)return;const{x:m,w:f,dir:b}=I,w=(i.clientX-m)*(/l/.test(b)?-1:1),{width:n,height:p}=e==null?void 0:e.attrs,g=n/p,B=u.clamp(f+w,S.IMAGE_MIN_SIZE,v.width),V=Math.round(B/g);r({width:B,height:V})},S.IMAGE_THROTTLE_WAIT_TIME),[h,I,v,r,e==null?void 0:e.attrs]),C=s.useCallback(i=>{i.preventDefault(),i.stopPropagation(),h&&(L({x:0,y:0,w:0,h:0,dir:""}),E(!1),_())},[h,_]),D=s.useCallback(()=>{document==null||document.addEventListener("mousemove",N,!0),document==null||document.addEventListener("mouseup",C,!0)},[N,C]),z=s.useCallback(()=>{document==null||document.removeEventListener("mousemove",N,!0),document==null||document.removeEventListener("mouseup",C,!0)},[N,C]);s.useEffect(()=>(h?D():z(),()=>{z()}),[h,D,z]);const k=s.useMemo(()=>new ResizeObserver(()=>M()),[M]);return s.useEffect(()=>(k.observe(t.view.dom),()=>{k.disconnect()}),[t.view.dom,k]),o.jsx(F.NodeViewWrapper,{className:"image-view",style:{...x,width:"100%",textAlign:R},children:o.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:{...x,background:"#fff"},className:`image-view__body ${l?"image-view__body--focused":""} ${h?"image-view__body--resizing":""}`,children:[o.jsx("img",{alt:c.alt,className:"image-view__body__image block",height:"auto",onClick:_,onLoad:j,src:c.src,style:c.style}),t.view.editable&&(l||h)&&o.jsx("div",{className:"image-resizer",children:d==null?void 0:d.map(i=>o.jsx("span",{className:`image-resizer__handler image-resizer__handler--${i}`,onMouseDown:m=>H(m,i)},`image-dir-${i}`))})]})})}const re=u.Image.extend({name:"mermaid",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),inline:!1,content:"",marks:"",group:"block",draggable:!1,selectable:!0,atom:!0,HTMLAttributes:{class:"mermaid"},button:({editor:e,t:r,extension:a})=>{var l;return{component:ee,componentProps:{action:()=>!0,isActive:()=>!1,disabled:!1,editor:e,icon:"Mermaid",tooltip:r("editor.mermaid.tooltip"),upload:(l=a==null?void 0:a.options)==null?void 0:l.upload}}}}},addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),width:{default:null,parseHTML:e=>{const r=e.querySelector("img"),a=r==null?void 0:r.getAttribute("width");return a?Number.parseInt(a,10):320},renderHTML:e=>({width:e.width})},height:{default:null,parseHTML:e=>{const r=e.querySelector("img"),a=r==null?void 0:r.getAttribute("height");return a?Number.parseInt(a,10):212},renderHTML:e=>({height:e.height})},align:{default:"center",parseHTML:e=>e.getAttribute("align"),renderHTML:e=>({align:e.align})}}},addNodeView(){return F.ReactNodeViewRenderer(te)},addCommands(){return{setMermaid:(t,e)=>({commands:r,editor:a})=>e?r.insertContent({type:this.name,attrs:t}):r.insertContentAt(a.state.selection.anchor,{type:this.name,attrs:t}),setAlignImageMermaid:t=>({commands:e})=>e.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:t}){const{align:e}=t;return["div",{style:e?`text-align: ${e};`:"",class:"imageMermaid"},["img",q.mergeAttributes(this.options.HTMLAttributes,t)]]},parseHTML(){return[{tag:"div[class=imageMermaid]",getAttrs:t=>{const e=t.querySelector("img"),r=e==null?void 0:e.getAttribute("width"),a=e==null?void 0:e.getAttribute("height");return{src:e==null?void 0:e.getAttribute("src"),alt:e==null?void 0:e.getAttribute("alt"),width:r?Number.parseInt(r,10):null,height:a?Number.parseInt(a,10):null,align:(e==null?void 0:e.getAttribute("align"))||t.style.textAlign||null}}}]}});exports.Mermaid=re;
|
package/lib/Mermaid.d.cts
CHANGED
|
@@ -99,9 +99,11 @@ declare module '@tiptap/core' {
|
|
|
99
99
|
|
|
100
100
|
declare module '@tiptap/core' {
|
|
101
101
|
interface Commands<ReturnType> {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
emoji: {
|
|
103
|
+
setEmoji: (emoji: {
|
|
104
|
+
name: string;
|
|
105
|
+
emoji: string;
|
|
106
|
+
}) => ReturnType;
|
|
105
107
|
};
|
|
106
108
|
}
|
|
107
109
|
}
|
|
@@ -109,11 +111,9 @@ declare module '@tiptap/core' {
|
|
|
109
111
|
|
|
110
112
|
declare module '@tiptap/core' {
|
|
111
113
|
interface Commands<ReturnType> {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
emoji: string;
|
|
116
|
-
}) => ReturnType;
|
|
114
|
+
drawer: {
|
|
115
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
116
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
}
|
package/lib/Mermaid.d.ts
CHANGED
|
@@ -99,9 +99,11 @@ declare module '@tiptap/core' {
|
|
|
99
99
|
|
|
100
100
|
declare module '@tiptap/core' {
|
|
101
101
|
interface Commands<ReturnType> {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
emoji: {
|
|
103
|
+
setEmoji: (emoji: {
|
|
104
|
+
name: string;
|
|
105
|
+
emoji: string;
|
|
106
|
+
}) => ReturnType;
|
|
105
107
|
};
|
|
106
108
|
}
|
|
107
109
|
}
|
|
@@ -109,11 +111,9 @@ declare module '@tiptap/core' {
|
|
|
109
111
|
|
|
110
112
|
declare module '@tiptap/core' {
|
|
111
113
|
interface Commands<ReturnType> {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
emoji: string;
|
|
116
|
-
}) => ReturnType;
|
|
114
|
+
drawer: {
|
|
115
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
116
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
}
|
package/lib/Mermaid.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { g as $, m as X } from "./index-Drmyqk9P.js";
|
|
2
|
-
import { w as Z, x as J, A as K, y as Y, z as Q, F as tt, B as et, G as rt, J as V, K as it, N as at } from "./RichTextEditor-
|
|
2
|
+
import { w as Z, x as J, A as K, y as Y, z as Q, F as tt, B as et, G as rt, J as V, K as it, N as at } from "./RichTextEditor-BwuyWeH3.js";
|
|
3
3
|
import { N as st, R as nt } from "./dom-dataset-CJ7GyQ2E.js";
|
|
4
4
|
import { jsxs as C, jsx as o } from "react/jsx-runtime";
|
|
5
5
|
import { useState as g, useRef as ot, useCallback as y, useEffect as E, useMemo as D } from "react";
|
|
6
6
|
import { s as lt, i as ct } from "./shortId-WJVkrvml.js";
|
|
7
|
-
import { T as dt } from "./textarea-
|
|
7
|
+
import { T as dt } from "./textarea-CfH4-Iyy.js";
|
|
8
8
|
import { I as q, j as ht, k as W } from "./index-D9llIWB5.js";
|
|
9
9
|
const j = `graph TB
|
|
10
10
|
a-->b`, ut = ({ editor: r, upload: t }) => {
|
package/lib/MoreMark.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-COecBbaE.cjs"),l=require("./index-ClFtfQ0J.cjs"),c=require("react/jsx-runtime"),x=require("react"),s=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-COecBbaE.cjs"),l=require("./index-ClFtfQ0J.cjs"),c=require("react/jsx-runtime"),x=require("react"),s=require("./RichTextEditor-NfX6yV6A.cjs");function b(t){var n;const i=x.useMemo(()=>{var r;const e=(r=t==null?void 0:t.items)==null?void 0:r.find(u=>u.isActive());return e&&!e.default?{...e,icon:e!=null&&e.icon?e==null?void 0:e.icon:t==null?void 0:t.icon}:{title:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return c.jsxs(s.DropdownMenu,{children:[c.jsx(s.DropdownMenuTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:c.jsx(s.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:c.jsx(s.MenuDown,{className:"richtext-size-3 richtext-text-gray-500"})})}),c.jsx(s.DropdownMenuContent,{className:"w-full",children:(n=t==null?void 0:t.items)==null?void 0:n.map((e,o)=>c.jsxs(s.DropdownMenuCheckboxItem,{checked:i.title===e.title,className:"richtext-flex richtext-items-center richtext-gap-3",onClick:e.action,children:[c.jsx(s.IconComponent,{name:e==null?void 0:e.icon}),c.jsx("span",{className:"richtext-ml-1",children:e.title}),!!(e!=null&&e.shortcutKeys)&&c.jsx("span",{className:"richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",children:s.getShortcutKeys(e.shortcutKeys)})]},`more-mark-${o}`))})]})}const m=h.Extension.create({name:"moreMark",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:i,extension:n,t:e}){const o=n.options.subscript,r=n.options.superscript,u={action:()=>i.commands.toggleSubscript(),isActive:()=>i.isActive("subscript")||!1,disabled:!i.can().toggleSubscript(),icon:"Subscript",title:e("editor.subscript.tooltip"),shortcutKeys:["mod","."]},d={action:()=>i.commands.toggleSuperscript(),isActive:()=>i.isActive("superscript")||!1,disabled:!i.can().toggleSuperscript(),icon:"Superscript",title:e("editor.superscript.tooltip"),shortcutKeys:["mod",","]},a=[];return o!==!1&&a.push(u),r!==!1&&a.push(d),{component:b,componentProps:{icon:"Type",tooltip:e("editor.moremark"),disabled:!i.isEditable,items:a}}}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(l.Subscript.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(l.Superscript.configure(this.options.superscript)),t}});exports.MoreMark=m;
|
package/lib/MoreMark.d.cts
CHANGED
|
@@ -110,9 +110,11 @@ declare module '@tiptap/core' {
|
|
|
110
110
|
|
|
111
111
|
declare module '@tiptap/core' {
|
|
112
112
|
interface Commands<ReturnType> {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
emoji: {
|
|
114
|
+
setEmoji: (emoji: {
|
|
115
|
+
name: string;
|
|
116
|
+
emoji: string;
|
|
117
|
+
}) => ReturnType;
|
|
116
118
|
};
|
|
117
119
|
}
|
|
118
120
|
}
|
|
@@ -120,11 +122,9 @@ declare module '@tiptap/core' {
|
|
|
120
122
|
|
|
121
123
|
declare module '@tiptap/core' {
|
|
122
124
|
interface Commands<ReturnType> {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
emoji: string;
|
|
127
|
-
}) => ReturnType;
|
|
125
|
+
drawer: {
|
|
126
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
127
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
}
|