reactjs-tiptap-editor-pro 0.2.39 → 0.2.40
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/{ColorPicker-DGbrNkQ-.cjs → ColorPicker-CvEUnlMl.cjs} +1 -1
- package/lib/{ColorPicker-BGCCdXrc.js → ColorPicker-DXWTenTy.js} +1 -1
- package/lib/extension-bundle.cjs +1 -1
- package/lib/extension-bundle.d.cts +71 -71
- package/lib/extension-bundle.d.ts +71 -71
- package/lib/extension-bundle.js +2 -2
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +71 -71
- package/lib/index.d.ts +71 -71
- package/lib/index.js +1 -1
- package/lib/locale-bundle.d.cts +71 -71
- package/lib/locale-bundle.d.ts +71 -71
- package/package.json +1 -1
|
@@ -20194,7 +20194,7 @@ function dA({
|
|
|
20194
20194
|
}
|
|
20195
20195
|
const nT = st.create({
|
|
20196
20196
|
name: "tableCell",
|
|
20197
|
-
content: "block
|
|
20197
|
+
content: "block*",
|
|
20198
20198
|
// TODO: Do not allow table in table
|
|
20199
20199
|
tableRole: "cell",
|
|
20200
20200
|
isolating: !0,
|
package/lib/extension-bundle.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./ColorPicker-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./ColorPicker-CvEUnlMl.cjs"),On=require("shiki"),O=require("react/jsx-runtime"),pe=require("react"),Ce=require("./locale-bundle-PAhriAQT.cjs"),$e=require("lucide-react"),Id=require("@radix-ui/react-select"),Wd=require("@radix-ui/react-slot"),no=require("tippy.js"),io=require("scroll-into-view-if-needed"),Jt=require("frimousse"),Uu=require("docx"),Ut=require("prosemirror-docx");function Eu(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const an=Eu(pe),Me=Eu(Id),ro=pe.forwardRef(({asChild:e,...t},n)=>{var a;const i=T.icons[t.icon],r=e?Wd.Slot:T.Button;return O.jsxs(T.Tooltip,{children:[O.jsx(T.TooltipTrigger,{asChild:!0,children:O.jsx(r,{className:"h-[32px] min-w-24 overflow-hidden px-[5px] py-0",disabled:t==null?void 0:t.disabled,ref:n,variant:"ghost",...t,children:O.jsxs("div",{className:"flex h-full items-center font-normal",children:[(t==null?void 0:t.title)&&O.jsx("div",{className:"grow truncate text-left text-sm",children:t==null?void 0:t.title}),i&&O.jsx(i,{className:"ml-1 size-3 shrink-0 text-zinc-500"})]})})}),O.jsx(T.TooltipContent,{children:O.jsxs("div",{className:"flex max-w-24 flex-col items-center text-center",children:[(t==null?void 0:t.tooltip)&&O.jsx("div",{children:t==null?void 0:t.tooltip}),O.jsx("div",{className:"flex",children:!!((a=t==null?void 0:t.shortcutKeys)!=null&&a.length)&&O.jsx("span",{children:T.getShortcutKeys(t==null?void 0:t.shortcutKeys)})})]})})]})}),Od=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Md=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Pd=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,jd=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,qd=T.Mark.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[T.markInputRule({find:Od,type:this.type}),T.markInputRule({find:Pd,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:Md,type:this.type}),T.markPasteRule({find:jd,type:this.type})]}}),Hd=qd.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleBold(),isActive:()=>t.isActive("bold")||!1,disabled:!t.can().toggleBold(),icon:"Bold",shortcutKeys:["mod","B"],tooltip:n("editor.bold.tooltip")}})}}}),zd=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Xd=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Vd=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,$d=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Kd=T.Mark.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[T.markInputRule({find:zd,type:this.type}),T.markInputRule({find:Vd,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:Xd,type:this.type}),T.markPasteRule({find:$d,type:this.type})]}}),Gd=Kd.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:n}){return{component:T.ActionButton,componentProps:{action:()=>t.commands.toggleItalic(),isActive:()=>t.isActive("italic")||!1,disabled:!t.can().toggleItalic(),shortcutKeys:["mod","I"],icon:"Italic",tooltip:n("editor.italic.tooltip")}}}}}}),Zd=T.Mark.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Yd=Zd.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:n}){return{component:T.ActionButton,componentProps:{action:()=>t.commands.toggleUnderline(),isActive:()=>t.isActive("underline")||!1,disabled:!t.can().toggleUnderline(),icon:"Underline",shortcutKeys:["mod","U"],tooltip:n("editor.underline.tooltip")}}}}}}),Qd=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Jd=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,eh=T.Mark.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[T.markInputRule({find:Qd,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:Jd,type:this.type})]}}),th=eh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleStrike(),isActive:()=>t.isActive("strike")||!1,disabled:!t.can().toggleStrike(),icon:"Strikethrough",shortcutKeys:["shift","mod","S"],tooltip:n("editor.strike.tooltip")}})}}}),nh=/(^|[^`])`([^`]+)`(?!`)/,ih=/(^|[^`])`([^`]+)`(?!`)/g,rh=T.Mark.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[T.markInputRule({find:nh,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:ih,type:this.type})]}}),ah=rh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleCode(),isActive:()=>t.isActive("code")||!1,disabled:!t.can().toggleCode(),icon:"Code",shortcutKeys:["mod","E"],tooltip:n("editor.code.tooltip")}})}}}),oh=/^```([a-z]+)?[\s\n]$/,sh=/^~~~([a-z]+)?[\s\n]$/,ch=T.Node.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,a=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return a||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",T.mergeAttributes(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:i,empty:r}=n;if(!r||i.parent.type!==this.type)return!1;const a=i.parentOffset===i.parent.nodeSize-2,o=i.parent.textContent.endsWith(`
|
|
2
2
|
|
|
3
3
|
`);return!a||!o?!1:e.chain().command(({tr:s})=>(s.delete(i.pos-2,i.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:i}=t,{$from:r,empty:a}=n;if(!a||r.parent.type!==this.type||!(r.parentOffset===r.parent.nodeSize-2))return!1;const s=r.after();return s===void 0?!1:i.nodeAt(s)?e.commands.command(({tr:u})=>(u.setSelection(T.Selection.near(i.resolve(s))),!0)):e.commands.exitCode()}}},addInputRules(){return[T.textblockTypeInputRule({find:oh,type:this.type,getAttributes:e=>({language:e[1]})}),T.textblockTypeInputRule({find:sh,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new T.Plugin({key:new T.PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),i=t.clipboardData.getData("vscode-editor-data"),r=i?JSON.parse(i):void 0,a=r==null?void 0:r.mode;if(!n||!a)return!1;const{tr:o,schema:s}=e.state,c=s.text(n.replace(/\r\n?/g,`
|
|
4
4
|
`));return o.replaceSelectionWith(this.type.create({language:a},c)),o.selection.$from.parent.type!==this.type&&o.setSelection(T.TextSelection.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),e.dispatch(o),!0}}})]}});let mt,Tn;const Gr=new Set,Zr=new Set;function uh(){return mt}function lh(e){if(!mt&&!Tn){const t=e.themes.filter(i=>!!i&&i in On.bundledThemes),n=e.languages.filter(i=>!!i&&i in On.bundledLanguages);return Tn=On.createHighlighter({themes:t,langs:n}).then(i=>{mt=i}),Tn}if(Tn)return Tn}async function Au(e){return mt&&!mt.getLoadedThemes().includes(e)&&!Zr.has(e)&&e in On.bundledThemes?(Zr.add(e),await mt.loadTheme(e),Zr.delete(e),!0):!1}async function Cu(e){return mt&&!mt.getLoadedLanguages().includes(e)&&!Gr.has(e)&&e in On.bundledLanguages?(Gr.add(e),await mt.loadLanguage(e),Gr.delete(e),!0):!1}async function dh({doc:e,name:t,defaultTheme:n,defaultLanguage:i}){const r=T.findChildren(e,s=>s.type.name===t),a=[...r.map(s=>s.node.attrs.theme),n],o=[...r.map(s=>s.node.attrs.language),i];mt?await Promise.all([...a.flatMap(s=>Au(s)),...o.flatMap(s=>!!s&&Cu(s))]):await lh({languages:o,themes:a})}function us({doc:e,name:t,defaultTheme:n,defaultLanguage:i}){const r=[];return T.findChildren(e,o=>o.type.name===t).forEach(o=>{let s=o.pos+1,c=o.node.attrs.language||i;const u=o.node.attrs.theme||n,l=uh();if(!l)return;l.getLoadedLanguages().includes(c)||(c="plaintext");const f=l.getLoadedThemes().includes(u)?u:l.getLoadedThemes()[0],g=l.codeToTokensBase(o.node.textContent,{lang:c,theme:f});for(const d of g){for(const x of d){const m=s+x.content.length,h=T.Decoration.inline(s,m,{style:`color: ${x.color}`});r.push(h),s=m}s+=1}}),T.DecorationSet.create(e,r)}function hh({name:e,defaultLanguage:t,defaultTheme:n}){const i=new T.Plugin({key:new T.PluginKey("shiki"),view(r){class a{constructor(){this.initDecorations()}update(){this.checkUndecoratedBlocks()}destroy(){}async initDecorations(){const s=r.state.doc;await dh({doc:s,name:e,defaultLanguage:t,defaultTheme:n});const c=r.state.tr.setMeta("shikiPluginForceDecoration",!0);r.dispatch(c)}async checkUndecoratedBlocks(){const s=T.findChildren(r.state.doc,l=>l.type.name===e);if((await Promise.all(s.flatMap(l=>[Au(l.node.attrs.theme),Cu(l.node.attrs.language)]))).includes(!0)){const l=r.state.tr.setMeta("shikiPluginForceDecoration",!0);r.dispatch(l)}}}return new a},state:{init:(r,{doc:a})=>us({doc:a,name:e,defaultLanguage:t,defaultTheme:n}),apply:(r,a,o,s)=>{const c=o.selection.$head.parent.type.name,u=s.selection.$head.parent.type.name,l=T.findChildren(o.doc,d=>d.type.name===e),f=T.findChildren(s.doc,d=>d.type.name===e),g=r.docChanged&&([c,u].includes(e)||f.length!==l.length||r.steps.some(d=>d.from!==void 0&&d.to!==void 0&&l.some(x=>x.pos>=d.from&&x.pos+x.node.nodeSize<=d.to)));return r.getMeta("shikiPluginForceDecoration")||g?us({doc:r.doc,name:e,defaultLanguage:t,defaultTheme:n}):a.map(r.mapping,r.doc)}},props:{decorations(r){return i.getState(r)}}});return i}function fh({action:e,languages:t,...n}){const i=a=>{e(a)},r=pe.useMemo(()=>t==null?void 0:t.map(a=>({title:Ce.MAP_LANGUAGE_CODE_LABELS[a]||a,language:a})),[t]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{disabled:n==null?void 0:n.disabled,asChild:!0,children:O.jsx(T.ActionButton,{tooltip:n==null?void 0:n.tooltip,disabled:n==null?void 0:n.disabled,icon:n==null?void 0:n.icon})}),O.jsx(T.DropdownMenuContent,{className:"w-full !max-h-[180px] !overflow-y-scroll",children:r==null?void 0:r.map(a=>O.jsx(T.DropdownMenuItem,{onClick:()=>i(a.language),children:O.jsx("div",{className:"h-full ml-1",children:a.title})},`codeblock-${a.title}`))})]})}const gh=Me.Root,ph=Me.Value,ku=an.forwardRef(({className:e,children:t,...n},i)=>O.jsxs(Me.Trigger,{ref:i,className:T.cn("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,O.jsx(Me.Icon,{asChild:!0,children:O.jsx($e.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ku.displayName=Me.Trigger.displayName;const Fu=an.forwardRef(({className:e,...t},n)=>O.jsx(Me.ScrollUpButton,{ref:n,className:T.cn("flex cursor-default items-center justify-center py-1",e),...t,children:O.jsx($e.ChevronUp,{className:"h-4 w-4"})}));Fu.displayName=Me.ScrollUpButton.displayName;const Su=an.forwardRef(({className:e,...t},n)=>O.jsx(Me.ScrollDownButton,{ref:n,className:T.cn("flex cursor-default items-center justify-center py-1",e),...t,children:O.jsx($e.ChevronDown,{className:"h-4 w-4"})}));Su.displayName=Me.ScrollDownButton.displayName;const Bu=an.forwardRef(({className:e,children:t,position:n="popper",...i},r)=>O.jsx(Me.Portal,{children:O.jsxs(Me.Content,{ref:r,className:T.cn("relative z-50 max-h-60 overflow-y-auto min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...i,children:[O.jsx(Fu,{}),O.jsx(Me.Viewport,{className:T.cn("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),O.jsx(Su,{})]})}));Bu.displayName=Me.Content.displayName;const mh=an.forwardRef(({className:e,...t},n)=>O.jsx(Me.Label,{ref:n,className:T.cn("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));mh.displayName=Me.Label.displayName;const Xa=an.forwardRef(({className:e,children:t,...n},i)=>O.jsxs(Me.Item,{ref:i,className:T.cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[O.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:O.jsx(Me.ItemIndicator,{children:O.jsx($e.Check,{className:"h-4 w-4"})})}),O.jsx(Me.ItemText,{children:t})]}));Xa.displayName=Me.Item.displayName;const bh=an.forwardRef(({className:e,...t},n)=>O.jsx(Me.Separator,{ref:n,className:T.cn("-mx-1 my-1 h-px bg-muted",e),...t}));bh.displayName=Me.Separator.displayName;function yh(){const[e,t]=pe.useState(!1);return{isCopied:e,copyToClipboard:async i=>{try{await navigator.clipboard.writeText(i),t(!0),setTimeout(()=>t(!1),2e3)}catch(r){console.error("Failed to copy text: ",r),t(!1)}}}}const xh="_wrap_fsdar_1",Dh="_maxHeight_fsdar_10",vh="_btnCopy_fsdar_13",_h="_btnDelete_fsdar_14",wh="_blockInfo_fsdar_18",Th="_blockInfoEditable_fsdar_28",Uh="_selectLang_fsdar_32",Eh="_copied_fsdar_58",Ft={wrap:xh,maxHeight:Dh,btnCopy:vh,btnDelete:_h,blockInfo:wh,blockInfoEditable:Th,selectLang:Uh,copied:Eh};function Ah({editor:e,node:{attrs:t},updateAttributes:n,extension:i}){var g,d;const{isCopied:r,copyToClipboard:a}=yh(),o=pe.useMemo(()=>{var x;return(x=i.options.languages)!=null&&x.length?i.options.languages:Ce.DEFAULT_LANGUAGE_CODE_BLOCK},[i.options.languages]),s=T.useEditableEditor(),c=(d=(g=e==null?void 0:e.options)==null?void 0:g.editorProps)==null?void 0:d.print,{language:u}=t,l=pe.useRef(null),f=pe.useCallback(()=>T.deleteNode(Nu.name,e),[e]);return O.jsxs(T.NodeViewWrapper,{className:T.clsx(Ft.wrap,!c&&Ft.maxHeight,"render-wrapper"),children:[O.jsxs("div",{className:T.clsx(Ft.blockInfo,{[Ft.blockInfoEditable]:!s}),children:[O.jsx("span",{className:T.clsx(Ft.btnCopy,r&&Ft.copied),onClick:()=>a(l.current.innerText),children:r?O.jsx($e.CopyCheck,{size:16}):O.jsx($e.Copy,{size:16})}),O.jsx("span",{className:Ft.btnDelete,onClick:f,children:O.jsx(T.IconComponent,{name:"Trash2"})}),O.jsx("div",{className:Ft.selectLang,children:O.jsxs(gh,{defaultValue:u||"auto",disabled:!s,onValueChange:x=>n({language:x}),children:[O.jsx(ku,{children:O.jsx(ph,{placeholder:"Language"})}),O.jsxs(Bu,{className:"max-h-60 overflow-y-auto",children:[O.jsx(Xa,{value:"auto",children:"Auto"}),o.map((x,m)=>O.jsx(Xa,{value:x,children:x.charAt(0).toUpperCase()+x.slice(1)},`code-lang-${m}`))]})]})})]}),O.jsx("pre",{ref:l,children:O.jsx(T.NodeViewContent,{as:"code"})})]})}const Nu=ch.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),languages:[],button:({editor:t,t:n,extension:i})=>{var a,o,s;const r=(o=(a=i==null?void 0:i.options)==null?void 0:a.languages)!=null&&o.length?(s=i==null?void 0:i.options)==null?void 0:s.languages:Ce.DEFAULT_LANGUAGE_CODE_BLOCK;return{component:fh,componentProps:{action:(c="js")=>t.commands.setCodeBlock({language:c}),isActive:()=>t.isActive("codeBlock")||!1,disabled:!t.can().toggleCodeBlock(),icon:"Code2",tooltip:n("editor.codeblock.tooltip"),languages:r}}}}},addNodeView(){return T.ReactNodeViewRenderer(Ah)},addProseMirrorPlugins(){var e;return[...((e=this.parent)==null?void 0:e.call(this))||[],hh({name:this.name,defaultLanguage:null,defaultTheme:this.options.defaultTheme})]}}),Ch=e=>{if(!e.children.length)return;const t=e.querySelectorAll("span");t&&t.forEach(n=>{var i,r;const a=n.getAttribute("style"),o=(r=(i=n.parentElement)===null||i===void 0?void 0:i.closest("span"))===null||r===void 0?void 0:r.getAttribute("style");n.setAttribute("style",`${o};${a}`)})},kh=T.Mark.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Ch(e),{}):!1}]},renderHTML({HTMLAttributes:e}){return["span",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:e})=>{const{selection:t}=e;return e.doc.nodesBetween(t.from,t.to,(n,i)=>{if(n.isTextblock)return!0;n.marks.filter(r=>r.type===this.type).some(r=>Object.values(r.attrs).some(a=>!!a))||e.removeMark(i,i+n.nodeSize,this.type)}),!0}}}}),Fh=T.Extension.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:e=>e.style.fontFamily,renderHTML:e=>e.fontFamily?{style:`font-family: ${e.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:e=>({chain:t})=>t().setMark("textStyle",{fontFamily:e}).run(),unsetFontFamily:()=>({chain:e})=>e().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}});function Sh(e){var r,a,o;const{t,lang:n}=Ce.useLocale(),i=pe.useMemo(()=>{var u;const s=(u=e==null?void 0:e.items)==null?void 0:u.find(l=>l.isActive());return s&&!s.default?{...s}:{title:e.tooltip,font:t("editor.fontFamily.default.tooltip"),isActive:()=>!1,disabled:!1,action:()=>e.editor.chain().focus().unsetFontFamily().run()}},[t,n,e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(ro,{disabled:e==null?void 0:e.disabled,icon:"MenuDown",title:((r=i==null?void 0:i.font)==null?void 0:r.length)>7?`${(a=i==null?void 0:i.font)==null?void 0:a.slice(0,6)}...`:i==null?void 0:i.font,tooltip:e==null?void 0:e.tooltip})}),O.jsx(T.DropdownMenuContent,{className:"w-full",children:(o=e==null?void 0:e.items)==null?void 0:o.map((s,c)=>{const u=s.font===t("editor.fontFamily.default.tooltip")?{}:{fontFamily:s.font};return O.jsxs(pe.Fragment,{children:[O.jsx(T.DropdownMenuCheckboxItem,{checked:(i==null?void 0:i.font)===s.font,onClick:s.action,children:O.jsx("div",{className:"ml-1 h-full",style:u,children:s.font})}),s.font===t("editor.fontFamily.default.tooltip")&&O.jsx(T.DropdownMenuSeparator,{})]},`font-family-${c}`)})})]})}const Bh=Fh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),fontFamilyList:Ce.DEFAULT_FONT_FAMILY_LIST,button({editor:t,extension:n,t:i}){var u;const{extensions:r=[]}=t.extensionManager??[],a=T.ensureNameValueOptions(((u=n==null?void 0:n.options)==null?void 0:u.fontFamilyList)||[]),o=r.find(l=>l.name==="base-kit"),s=a.map(l=>({action:()=>{t.chain().focus().setFontFamily(l.value).run()},isActive:()=>t.isActive("textStyle",{fontFamily:l.value})||!1,disabled:!t.can().setFontFamily(l.value),title:l.name,font:l.value}));o&&o.options.textStyle!==!1&&s.unshift({action:()=>t.chain().focus().unsetFontFamily().run(),isActive:()=>!1,disabled:!1,font:i("editor.fontFamily.default.tooltip"),title:i("editor.fontFamily.tooltip")});const c=s.filter(l=>l.disabled).length===s.length;return{component:Sh,componentProps:{tooltip:i("editor.fontFamily.tooltip"),disabled:c,items:s,editor:t}}}}}}),Nh=T.Node.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,T.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>T.textblockTypeInputRule({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});function Lh(e){var n;const t=pe.useMemo(()=>{var a;const i=(a=e==null?void 0:e.items)==null?void 0:a.find(o=>o.isActive());return i&&!i.default?{...i}:{title:e.tooltip,level:0,isActive:()=>!1}},[e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(ro,{disabled:e==null?void 0:e.disabled,icon:"MenuDown",title:t==null?void 0:t.title,tooltip:e==null?void 0:e.tooltip})}),O.jsx(T.DropdownMenuContent,{className:"w-full",children:(n=e==null?void 0:e.items)==null?void 0:n.map((i,r)=>{var a,o;return O.jsxs(pe.Fragment,{children:[O.jsxs(T.DropdownMenuCheckboxItem,{checked:(t==null?void 0:t.title)===i.title,onClick:i.action,children:[O.jsx("div",{className:`heading- ml-1 h-full${i.level}`,children:i.title}),!!((a=i==null?void 0:i.shortcutKeys)!=null&&a.length)&&O.jsx(T.DropdownMenuShortcut,{className:"pl-4",children:(o=i==null?void 0:i.shortcutKeys)==null?void 0:o.map(s=>T.getShortcutKey(s)).join(" ")})]}),i.level===0&&O.jsx(T.DropdownMenuSeparator,{})]},`heading-k-${r}`)})})]})}const Rh=Nh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),levels:[1,2,3,4,5,6],button({editor:t,extension:n,t:i}){var u;const{extensions:r=[]}=t.extensionManager??[],a=((u=n.options)==null?void 0:u.levels)||[],o=r.find(l=>l.name==="base-kit"),s=a.map(l=>({action:()=>t.commands.toggleHeading({level:l}),isActive:()=>t.isActive("heading",{level:l})||!1,disabled:!t.can().toggleHeading({level:l}),title:i(`editor.heading.h${l}.tooltip`),level:l,shortcutKeys:["alt","mod",`${l}`]}));o&&o.options.paragraph!==!1&&s.unshift({action:()=>t.commands.setParagraph(),isActive:()=>t.isActive("paragraph")||!1,disabled:!t.can().setParagraph(),level:0,title:i("editor.paragraph.tooltip"),shortcutKeys:["alt","mod","0"]});const c=s.filter(l=>l.disabled).length===s.length;return{component:Lh,componentProps:{tooltip:i("editor.heading.tooltip"),disabled:c,items:s,editor:t}}}}}}),Ih=T.Extension.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>{const t=e.style.textAlign;return this.options.alignments.includes(t)?t:this.options.defaultAlignment},renderHTML:e=>e.textAlign?{style:`text-align: ${e.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.map(n=>t.updateAttributes(n,{textAlign:e})).every(n=>n):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.map(t=>e.resetAttributes(t,"textAlign")).every(t=>t)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});function Wh(e){var n;const t=pe.useMemo(()=>{var a;const i=(a=e==null?void 0:e.items)==null?void 0:a.find(o=>o.isActive());return i&&!i.default?{...i,icon:i.icon?i.icon:e.icon}:{title:e==null?void 0:e.tooltip,icon:e.icon,isActive:()=>!1}},[e]);return O.jsxs(T.Popover,{modal:!0,children:[O.jsx(T.PopoverTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(T.ActionButton,{customClass:"!w-12 h-12",disabled:e==null?void 0:e.disabled,icon:e==null?void 0:e.icon,tooltip:e==null?void 0:e.tooltip,children:O.jsx(T.IconComponent,{className:"ml-1 size-3 text-zinc-500",name:"MenuDown"})})}),O.jsx(T.PopoverContent,{align:"start",className:"flex w-full min-w-4 flex-row gap-1 !p-[4px]",side:"bottom",children:(n=e==null?void 0:e.items)==null?void 0:n.map((i,r)=>{var a,o;return O.jsxs(T.Tooltip,{children:[O.jsx(T.TooltipTrigger,{asChild:!0,children:O.jsx(T.Toggle,{className:"size-7 p-1","data-state":t.title===i.title?"on":"off",onClick:i==null?void 0:i.action,pressed:t.title===i.title,size:"sm",children:(i==null?void 0:i.icon)&&O.jsx(T.IconComponent,{name:i.icon})})}),O.jsxs(T.TooltipContent,{className:"flex flex-col items-center",children:[O.jsx("span",{children:i.title}),!!((a=i.shortcutKeys)!=null&&a.length)&&O.jsx("span",{children:(o=i.shortcutKeys)==null?void 0:o.map(s=>T.getShortcutKey(s)).join(" ")})]})]},`text-align-${r}`)})})]})}const Oh=Ih.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["heading","paragraph","list_item","title"],button({editor:t,extension:n,t:i}){var u;const r=((u=n.options)==null?void 0:u.alignments)||[],a={left:["mod","Shift","L"],center:["mod","Shift","E"],right:["mod","Shift","R"],justify:["mod","Shift","J"]},o={left:"AlignLeft",center:"AlignCenter",right:"AlignRight",justify:"AlignJustify"},s=r.map(l=>{var f,g,d;return{title:i(`editor.textalign.${l}.tooltip`),icon:o[l],shortcutKeys:a[l],isActive:()=>t.isActive({textAlign:l})||!1,action:()=>{var x,m;return(m=(x=t.commands)==null?void 0:x.setTextAlign)==null?void 0:m.call(x,l)},disabled:!((d=(g=(f=t==null?void 0:t.can)==null?void 0:f.call(t))==null?void 0:g.setTextAlign)!=null&&d.call(g,l))}}),c=s.filter(l=>l.disabled).length===s.length;return{component:Wh,componentProps:{icon:"AlignJustify",tooltip:i("editor.textalign.tooltip"),disabled:c,items:s}}}}}});function Mh(e){var r;const{t}=Ce.useLocale(),n=pe.useRef(null),i=pe.useMemo(()=>{const a=(e.items||[]).find(s=>s.isActive());return a||{title:t("editor.fontSize.default.tooltip"),isActive:()=>!1}},[e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx("div",{ref:n,children:O.jsx(ro,{disabled:e==null?void 0:e.disabled,icon:"MenuDown",title:i==null?void 0:i.title,tooltip:`${e==null?void 0:e.tooltip}`})})}),O.jsx(T.DropdownMenuContent,{container:n.current,className:"max-h-[40vh] w-32 overflow-y-auto",children:(r=e==null?void 0:e.items)==null?void 0:r.map((a,o)=>O.jsx(T.DropdownMenuCheckboxItem,{checked:i.title===a.title,onClick:a.action,children:O.jsx("div",{className:"ml-1 h-full",children:a.title})},`font-size-${o}`))})]})}const Ph=T.Extension.create({name:"fontSize",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["textStyle"],fontSizes:[...Ce.DEFAULT_FONT_SIZE_LIST],button({editor:t,extension:n,t:i}){var c;const r=T.ensureNameValueOptions(((c=n.options)==null?void 0:c.fontSizes)||Ce.DEFAULT_FONT_SIZE_VALUE),a=T.ensureNameValueOptions([Ce.DEFAULT_FONT_SIZE_VALUE])[0],o=r.map(u=>({title:u.value===a.value?i("editor.fontSize.default.tooltip"):String(u.name),isActive:()=>{const{fontSize:l}=t.getAttributes("textStyle");return u.value===a.value&&l===void 0?!0:t.isActive({fontSize:String(u.value)})||!1},action:()=>{if(u.value===a.value){t.commands.unsetFontSize();return}t.commands.setFontSize(String(u.value))},disabled:!t.can().setFontSize(String(u.value)),divider:u.value===a.value||!1,default:u.value===a.value||!1})),s=o.filter(u=>u.disabled).length===o.length;return{component:Mh,componentProps:{editor:t,tooltip:i("editor.fontSize.tooltip"),disabled:s,items:o,maxHeight:280}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:e=>e.style.fontSize.replaceAll(/["']+/g,""),renderHTML:e=>e.fontSize?{style:`font-size: ${e.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:e=>({chain:t})=>t().setMark("textStyle",{fontSize:e}).run(),unsetFontSize:()=>({chain:e})=>e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),jh=T.Extension.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return(t=e.style.color)===null||t===void 0?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands(){return{setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}});function qh({fill:e}){return O.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 240 240",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:O.jsx("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",children:O.jsx("g",{transform:"translate(0.000000, 0.500000)",children:O.jsxs("g",{transform:"translate(39.000000, 17.353553)",children:[O.jsx("path",{d:"M11,201.146447 L167,201.146447 C173.075132,201.146447 178,206.071314 178,212.146447 C178,218.221579 173.075132,223.146447 167,223.146447 L11,223.146447 C4.92486775,223.146447 7.43989126e-16,218.221579 0,212.146447 C-7.43989126e-16,206.071314 4.92486775,201.146447 11,201.146447 Z",id:"矩形",fill:e||"#DF2A3F",fillRule:"evenodd"}),O.jsx("path",{d:"M72.3425855,16.8295583 C75.799482,7.50883712 86.1577877,2.75526801 95.4785089,6.21216449 C100.284516,7.99463061 104.096358,11.7387855 105.968745,16.4968188 L106.112518,16.8745422 L159.385152,161.694068 C161.291848,166.877345 158.635655,172.624903 153.452378,174.531599 C148.358469,176.405421 142.719567,173.872338 140.716873,168.864661 L140.614848,168.598825 L89.211,28.86 L37.3759214,168.623816 C35.4885354,173.712715 29.8981043,176.351047 24.7909589,174.617647 L24.5226307,174.522368 C19.4337312,172.634982 16.7953993,167.044551 18.5287999,161.937406 L18.6240786,161.669077 L72.3425855,16.8295583 Z",id:"路径-21",fill:"currentColor",fillRule:"nonzero"}),O.jsx("path",{d:"M121,103.146447 C126.522847,103.146447 131,107.623599 131,113.146447 C131,118.575687 126.673329,122.994378 121.279905,123.142605 L121,123.146447 L55,123.146447 C49.4771525,123.146447 45,118.669294 45,113.146447 C45,107.717207 49.3266708,103.298515 54.7200952,103.150288 L55,103.146447 L121,103.146447 Z",id:"路径-22",fill:"currentColor",fillRule:"nonzero"})]})})})})}function Hh(e){const[t,n]=pe.useState(void 0);function i(o){var s;(s=e.action)==null||s.call(e,o)}function r(){var o;(o=e.action)==null||o.call(e,t)}const a=pe.useCallback(T.debounce(o=>{n(o)},350),[]);return O.jsxs("div",{className:"flex items-center h-[32px]",children:[O.jsx(T.ActionButton,{tooltip:e==null?void 0:e.tooltip,disabled:e==null?void 0:e.disabled,action:r,children:O.jsx("span",{className:"flex items-center justify-center text-sm",children:O.jsx(qh,{fill:t})})}),O.jsx(T.ColorPicker,{selectedColor:t,setSelectedColor:a,onChange:i,disabled:e==null?void 0:e.disabled,colors:e==null?void 0:e.colors,defaultColor:e==null?void 0:e.defaultColor,children:O.jsx(T.Button,{variant:"ghost",size:"icon",className:"r!ichtext-h-[32px] !w-3",disabled:e==null?void 0:e.disabled,children:O.jsx(T.IconComponent,{className:"!w-3 !h-3 text-zinc-500",name:"MenuDown"})})})]})}const zh=jh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:n,extension:i}){return{component:Hh,componentProps:{colors:i.options.colors,defaultColor:i.options.defaultColor,action:r=>{r===void 0&&t.chain().focus().unsetColor().run(),typeof r=="string"&&t.chain().focus().setColor(r).run()},isActive:()=>{const{color:r}=t.getAttributes("textStyle");return r&&t.isActive({color:r})||!1},editor:t,disabled:!t.can().setColor(""),tooltip:n("editor.color.tooltip")}}}}}}),Xh=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Vh=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,$h=T.Mark.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[T.markInputRule({find:Xh,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:Vh,type:this.type})]}}),Kh=$h.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),multicolor:!0,button:({editor:t,t:n})=>({component:T.HighlightActionButton,componentProps:{action:i=>{typeof i=="string"&&t.chain().focus().setHighlight({color:i}).run(),i===void 0&&t.chain().focus().unsetHighlight().run()},editor:t,isActive:()=>t.isActive("highlight")||!1,disabled:!t.can().setHighlight(),shortcutKeys:["⇧","mod","H"],tooltip:n("editor.highlight.tooltip")}})}}}),Gh="listItem",ls="textStyle",ds=/^\s*([-+*])\s$/,Zh=T.Node.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Gh,this.editor.getAttributes(ls)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=T.wrappingInputRule({find:ds,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=T.wrappingInputRule({find:ds,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(ls),editor:this.editor})),[e]}}),Yh=Zh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleBulletList(),isActive:()=>t.isActive("bulletList")||!1,disabled:!1,shortcutKeys:["shift","mod","8"],icon:"List",tooltip:n("editor.bulletlist.tooltip")}})}}}),Qh=T.Node.create({name:"clear",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.chain().focus().clearNodes().unsetAllMarks().run(),disabled:!t.can().chain().focus().clearNodes().unsetAllMarks().run(),icon:"Eraser",tooltip:n("editor.clear.tooltip")}})}}}),Jh="listItem",hs="textStyle",fs=/^(\d+)\.\s$/,ef=T.Node.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",T.mergeAttributes(this.options.HTMLAttributes,n),0]:["ol",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Jh,this.editor.getAttributes(hs)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=T.wrappingInputRule({find:fs,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=T.wrappingInputRule({find:fs,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(hs)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),tf=ef.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleOrderedList(),isActive:()=>t.isActive("orderedList")||!1,disabled:!1,icon:"ListOrdered",shortcutKeys:["mod","shift","7"],tooltip:n("editor.orderedlist.tooltip")}})}}}),nf=/^\s*(\[([( |x])?\])\s$/,rf=T.Node.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{const t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",T.mergeAttributes(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:i})=>{const r=document.createElement("li"),a=document.createElement("label"),o=document.createElement("span"),s=document.createElement("input"),c=document.createElement("div");return a.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",u=>u.preventDefault()),s.addEventListener("change",u=>{if(!i.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}const{checked:l}=u.target;i.isEditable&&typeof n=="function"&&i.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{const g=n();if(typeof g!="number")return!1;const d=f.doc.nodeAt(g);return f.setNodeMarkup(g,void 0,{...d==null?void 0:d.attrs,checked:l}),!0}).run(),!i.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,l)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,l])=>{r.setAttribute(u,l)}),r.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),r.append(a,c),Object.entries(t).forEach(([u,l])=>{r.setAttribute(u,l)}),{dom:r,contentDOM:c,update:u=>u.type!==this.type?!1:(r.dataset.checked=u.attrs.checked,s.checked=u.attrs.checked,!0)}}},addInputRules(){return[T.wrappingInputRule({find:nf,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),af=T.Node.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",T.mergeAttributes(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),of=af.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"task-list"},taskItem:{HTMLAttributes:{class:"task-list-item"}},button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleTaskList(),isActive:()=>t.isActive("taskList")||!1,disabled:!1,icon:"ListTodo",shortcutKeys:["shift","mod","9"],tooltip:n("editor.tasklist.tooltip")}})}},addExtensions(){return[rf.configure(this.options.taskItem)]}}),sf=/^\s*>\s$/,cf=T.Node.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[T.wrappingInputRule({find:sf,type:this.type})]}}),uf=cf.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"blockquote"},button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleBlockquote(),isActive:()=>t.isActive("blockquote")||!1,disabled:!t.can().toggleBlockquote(),icon:"TextQuote",shortcutKeys:["shift","mod","B"],tooltip:n("editor.blockquote.tooltip")}})}}}),lf="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",df="ελ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",bn=(e,t)=>{for(const n in t)e[n]=t[n];return e},Va="numeric",$a="ascii",Ka="alpha",Mn="asciinumeric",Wn="alphanumeric",Ga="domain",Lu="emoji",hf="scheme",ff="slashscheme",Yr="whitespace";function gf(e,t){return e in t||(t[e]=[]),t[e]}function en(e,t,n){t[Va]&&(t[Mn]=!0,t[Wn]=!0),t[$a]&&(t[Mn]=!0,t[Ka]=!0),t[Mn]&&(t[Wn]=!0),t[Ka]&&(t[Wn]=!0),t[Wn]&&(t[Ga]=!0),t[Lu]&&(t[Ga]=!0);for(const i in t){const r=gf(i,n);r.indexOf(e)<0&&r.push(e)}}function pf(e,t){const n={};for(const i in t)t[i].indexOf(e)>=0&&(n[i]=!0);return n}function Ze(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Ze.groups={};Ze.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let i=0;i<t.jr.length;i++){const r=t.jr[i][0],a=t.jr[i][1];if(a&&r.test(e))return a}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,i){for(let r=0;r<e.length;r++)this.tt(e[r],t,n,i)},tr(e,t,n,i){i=i||Ze.groups;let r;return t&&t.j?r=t:(r=new Ze(t),n&&i&&en(t,n,i)),this.jr.push([e,r]),r},ts(e,t,n,i){let r=this;const a=e.length;if(!a)return r;for(let o=0;o<a-1;o++)r=r.tt(e[o]);return r.tt(e[a-1],t,n,i)},tt(e,t,n,i){i=i||Ze.groups;const r=this;if(t&&t.j)return r.j[e]=t,t;const a=t;let o,s=r.go(e);if(s?(o=new Ze,bn(o.j,s.j),o.jr.push.apply(o.jr,s.jr),o.jd=s.jd,o.t=s.t):o=new Ze,a){if(i)if(o.t&&typeof o.t=="string"){const c=bn(pf(o.t,i),n);en(a,c,i)}else n&&en(a,n,i);o.t=a}return r.j[e]=o,o}};const Ee=(e,t,n,i,r)=>e.ta(t,n,i,r),We=(e,t,n,i,r)=>e.tr(t,n,i,r),gs=(e,t,n,i,r)=>e.ts(t,n,i,r),le=(e,t,n,i,r)=>e.tt(t,n,i,r),Tt="WORD",Za="UWORD",Ru="ASCIINUMERICAL",Iu="ALPHANUMERICAL",Xn="LOCALHOST",Ya="TLD",Qa="UTLD",wi="SCHEME",gn="SLASH_SCHEME",ao="NUM",Ja="WS",oo="NL",Pn="OPENBRACE",jn="CLOSEBRACE",Vi="OPENBRACKET",$i="CLOSEBRACKET",Ki="OPENPAREN",Gi="CLOSEPAREN",Zi="OPENANGLEBRACKET",Yi="CLOSEANGLEBRACKET",Qi="FULLWIDTHLEFTPAREN",Ji="FULLWIDTHRIGHTPAREN",er="LEFTCORNERBRACKET",tr="RIGHTCORNERBRACKET",nr="LEFTWHITECORNERBRACKET",ir="RIGHTWHITECORNERBRACKET",rr="FULLWIDTHLESSTHAN",ar="FULLWIDTHGREATERTHAN",or="AMPERSAND",so="APOSTROPHE",sr="ASTERISK",Lt="AT",cr="BACKSLASH",ur="BACKTICK",lr="CARET",It="COLON",co="COMMA",dr="DOLLAR",ft="DOT",hr="EQUALS",uo="EXCLAMATION",rt="HYPHEN",qn="PERCENT",fr="PIPE",gr="PLUS",pr="POUND",Hn="QUERY",lo="QUOTE",Wu="FULLWIDTHMIDDLEDOT",ho="SEMI",gt="SLASH",zn="TILDE",mr="UNDERSCORE",Ou="EMOJI",br="SYM";var Mu=Object.freeze({__proto__:null,WORD:Tt,UWORD:Za,ASCIINUMERICAL:Ru,ALPHANUMERICAL:Iu,LOCALHOST:Xn,TLD:Ya,UTLD:Qa,SCHEME:wi,SLASH_SCHEME:gn,NUM:ao,WS:Ja,NL:oo,OPENBRACE:Pn,CLOSEBRACE:jn,OPENBRACKET:Vi,CLOSEBRACKET:$i,OPENPAREN:Ki,CLOSEPAREN:Gi,OPENANGLEBRACKET:Zi,CLOSEANGLEBRACKET:Yi,FULLWIDTHLEFTPAREN:Qi,FULLWIDTHRIGHTPAREN:Ji,LEFTCORNERBRACKET:er,RIGHTCORNERBRACKET:tr,LEFTWHITECORNERBRACKET:nr,RIGHTWHITECORNERBRACKET:ir,FULLWIDTHLESSTHAN:rr,FULLWIDTHGREATERTHAN:ar,AMPERSAND:or,APOSTROPHE:so,ASTERISK:sr,AT:Lt,BACKSLASH:cr,BACKTICK:ur,CARET:lr,COLON:It,COMMA:co,DOLLAR:dr,DOT:ft,EQUALS:hr,EXCLAMATION:uo,HYPHEN:rt,PERCENT:qn,PIPE:fr,PLUS:gr,POUND:pr,QUERY:Hn,QUOTE:lo,FULLWIDTHMIDDLEDOT:Wu,SEMI:ho,SLASH:gt,TILDE:zn,UNDERSCORE:mr,EMOJI:Ou,SYM:br});const Dt=/[a-z]/,Un=new RegExp("\\p{L}","u"),Qr=new RegExp("\\p{Emoji}","u"),vt=/\d/,Jr=/\s/,ps="\r",ea=`
|
|
@@ -725,9 +725,15 @@ declare module '@tiptap/core' {
|
|
|
725
725
|
|
|
726
726
|
declare module '@tiptap/core' {
|
|
727
727
|
interface Commands<ReturnType> {
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
728
|
+
indent: {
|
|
729
|
+
/**
|
|
730
|
+
* Set the indent attribute
|
|
731
|
+
*/
|
|
732
|
+
indent: () => ReturnType;
|
|
733
|
+
/**
|
|
734
|
+
* Set the outdent attribute
|
|
735
|
+
*/
|
|
736
|
+
outdent: () => ReturnType;
|
|
731
737
|
};
|
|
732
738
|
}
|
|
733
739
|
}
|
|
@@ -735,14 +741,9 @@ declare module '@tiptap/core' {
|
|
|
735
741
|
|
|
736
742
|
declare module '@tiptap/core' {
|
|
737
743
|
interface Commands<ReturnType> {
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
*/
|
|
742
|
-
setIframe: (options: {
|
|
743
|
-
src: string;
|
|
744
|
-
service: string;
|
|
745
|
-
}) => ReturnType;
|
|
744
|
+
lineHeight: {
|
|
745
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
746
|
+
unsetLineHeight: () => ReturnType;
|
|
746
747
|
};
|
|
747
748
|
}
|
|
748
749
|
}
|
|
@@ -750,8 +751,9 @@ declare module '@tiptap/core' {
|
|
|
750
751
|
|
|
751
752
|
declare module '@tiptap/core' {
|
|
752
753
|
interface Commands<ReturnType> {
|
|
753
|
-
|
|
754
|
-
|
|
754
|
+
tableCellBackground: {
|
|
755
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
756
|
+
unsetTableCellBackground: () => ReturnType;
|
|
755
757
|
};
|
|
756
758
|
}
|
|
757
759
|
}
|
|
@@ -774,9 +776,28 @@ declare module '@tiptap/core' {
|
|
|
774
776
|
|
|
775
777
|
declare module '@tiptap/core' {
|
|
776
778
|
interface Commands<ReturnType> {
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
779
|
+
painter: {
|
|
780
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
declare module '@tiptap/core' {
|
|
787
|
+
interface Commands<ReturnType> {
|
|
788
|
+
imageUpload: {
|
|
789
|
+
/**
|
|
790
|
+
* Add an image
|
|
791
|
+
*/
|
|
792
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
793
|
+
/**
|
|
794
|
+
* Update an image
|
|
795
|
+
*/
|
|
796
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
797
|
+
/**
|
|
798
|
+
* Set image alignment
|
|
799
|
+
*/
|
|
800
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
780
801
|
};
|
|
781
802
|
}
|
|
782
803
|
}
|
|
@@ -796,8 +817,14 @@ declare module '@tiptap/core' {
|
|
|
796
817
|
|
|
797
818
|
declare module '@tiptap/core' {
|
|
798
819
|
interface Commands<ReturnType> {
|
|
799
|
-
|
|
800
|
-
|
|
820
|
+
iframe: {
|
|
821
|
+
/**
|
|
822
|
+
* Add an iframe
|
|
823
|
+
*/
|
|
824
|
+
setIframe: (options: {
|
|
825
|
+
src: string;
|
|
826
|
+
service: string;
|
|
827
|
+
}) => ReturnType;
|
|
801
828
|
};
|
|
802
829
|
}
|
|
803
830
|
}
|
|
@@ -805,19 +832,9 @@ declare module '@tiptap/core' {
|
|
|
805
832
|
|
|
806
833
|
declare module '@tiptap/core' {
|
|
807
834
|
interface Commands<ReturnType> {
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
*/
|
|
812
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
813
|
-
/**
|
|
814
|
-
* Update an image
|
|
815
|
-
*/
|
|
816
|
-
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
817
|
-
/**
|
|
818
|
-
* Set image alignment
|
|
819
|
-
*/
|
|
820
|
-
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
835
|
+
tableOfContents: {
|
|
836
|
+
setTableOfContents: () => ReturnType;
|
|
837
|
+
removeTableOfContents: () => ReturnType;
|
|
821
838
|
};
|
|
822
839
|
}
|
|
823
840
|
}
|
|
@@ -839,15 +856,17 @@ declare module '@tiptap/core' {
|
|
|
839
856
|
|
|
840
857
|
declare module '@tiptap/core' {
|
|
841
858
|
interface Commands<ReturnType> {
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
859
|
+
katex: {
|
|
860
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
declare module '@tiptap/core' {
|
|
867
|
+
interface Commands<ReturnType> {
|
|
868
|
+
exportWord: {
|
|
869
|
+
exportToWord: () => ReturnType;
|
|
851
870
|
};
|
|
852
871
|
}
|
|
853
872
|
}
|
|
@@ -873,35 +892,6 @@ declare module '@tiptap/core' {
|
|
|
873
892
|
}
|
|
874
893
|
|
|
875
894
|
|
|
876
|
-
declare module '@tiptap/core' {
|
|
877
|
-
interface Commands<ReturnType> {
|
|
878
|
-
drawer: {
|
|
879
|
-
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
880
|
-
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
881
|
-
};
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
declare module '@tiptap/core' {
|
|
887
|
-
interface Commands<ReturnType> {
|
|
888
|
-
tableOfContents: {
|
|
889
|
-
setTableOfContents: () => ReturnType;
|
|
890
|
-
removeTableOfContents: () => ReturnType;
|
|
891
|
-
};
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
declare module '@tiptap/core' {
|
|
897
|
-
interface Commands<ReturnType> {
|
|
898
|
-
attachment: {
|
|
899
|
-
setAttachment: (attrs?: unknown) => ReturnType;
|
|
900
|
-
};
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
|
|
905
895
|
declare module '@tiptap/core' {
|
|
906
896
|
interface Commands<ReturnType> {
|
|
907
897
|
twitter: {
|
|
@@ -929,8 +919,18 @@ declare module '@tiptap/core' {
|
|
|
929
919
|
|
|
930
920
|
declare module '@tiptap/core' {
|
|
931
921
|
interface Commands<ReturnType> {
|
|
932
|
-
|
|
933
|
-
|
|
922
|
+
attachment: {
|
|
923
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
924
|
+
};
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
declare module '@tiptap/core' {
|
|
930
|
+
interface Commands<ReturnType> {
|
|
931
|
+
drawer: {
|
|
932
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
933
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
934
934
|
};
|
|
935
935
|
}
|
|
936
936
|
}
|
|
@@ -725,9 +725,15 @@ declare module '@tiptap/core' {
|
|
|
725
725
|
|
|
726
726
|
declare module '@tiptap/core' {
|
|
727
727
|
interface Commands<ReturnType> {
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
728
|
+
indent: {
|
|
729
|
+
/**
|
|
730
|
+
* Set the indent attribute
|
|
731
|
+
*/
|
|
732
|
+
indent: () => ReturnType;
|
|
733
|
+
/**
|
|
734
|
+
* Set the outdent attribute
|
|
735
|
+
*/
|
|
736
|
+
outdent: () => ReturnType;
|
|
731
737
|
};
|
|
732
738
|
}
|
|
733
739
|
}
|
|
@@ -735,14 +741,9 @@ declare module '@tiptap/core' {
|
|
|
735
741
|
|
|
736
742
|
declare module '@tiptap/core' {
|
|
737
743
|
interface Commands<ReturnType> {
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
*/
|
|
742
|
-
setIframe: (options: {
|
|
743
|
-
src: string;
|
|
744
|
-
service: string;
|
|
745
|
-
}) => ReturnType;
|
|
744
|
+
lineHeight: {
|
|
745
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
746
|
+
unsetLineHeight: () => ReturnType;
|
|
746
747
|
};
|
|
747
748
|
}
|
|
748
749
|
}
|
|
@@ -750,8 +751,9 @@ declare module '@tiptap/core' {
|
|
|
750
751
|
|
|
751
752
|
declare module '@tiptap/core' {
|
|
752
753
|
interface Commands<ReturnType> {
|
|
753
|
-
|
|
754
|
-
|
|
754
|
+
tableCellBackground: {
|
|
755
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
756
|
+
unsetTableCellBackground: () => ReturnType;
|
|
755
757
|
};
|
|
756
758
|
}
|
|
757
759
|
}
|
|
@@ -774,9 +776,28 @@ declare module '@tiptap/core' {
|
|
|
774
776
|
|
|
775
777
|
declare module '@tiptap/core' {
|
|
776
778
|
interface Commands<ReturnType> {
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
779
|
+
painter: {
|
|
780
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
declare module '@tiptap/core' {
|
|
787
|
+
interface Commands<ReturnType> {
|
|
788
|
+
imageUpload: {
|
|
789
|
+
/**
|
|
790
|
+
* Add an image
|
|
791
|
+
*/
|
|
792
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
793
|
+
/**
|
|
794
|
+
* Update an image
|
|
795
|
+
*/
|
|
796
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
797
|
+
/**
|
|
798
|
+
* Set image alignment
|
|
799
|
+
*/
|
|
800
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
780
801
|
};
|
|
781
802
|
}
|
|
782
803
|
}
|
|
@@ -796,8 +817,14 @@ declare module '@tiptap/core' {
|
|
|
796
817
|
|
|
797
818
|
declare module '@tiptap/core' {
|
|
798
819
|
interface Commands<ReturnType> {
|
|
799
|
-
|
|
800
|
-
|
|
820
|
+
iframe: {
|
|
821
|
+
/**
|
|
822
|
+
* Add an iframe
|
|
823
|
+
*/
|
|
824
|
+
setIframe: (options: {
|
|
825
|
+
src: string;
|
|
826
|
+
service: string;
|
|
827
|
+
}) => ReturnType;
|
|
801
828
|
};
|
|
802
829
|
}
|
|
803
830
|
}
|
|
@@ -805,19 +832,9 @@ declare module '@tiptap/core' {
|
|
|
805
832
|
|
|
806
833
|
declare module '@tiptap/core' {
|
|
807
834
|
interface Commands<ReturnType> {
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
*/
|
|
812
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
813
|
-
/**
|
|
814
|
-
* Update an image
|
|
815
|
-
*/
|
|
816
|
-
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
817
|
-
/**
|
|
818
|
-
* Set image alignment
|
|
819
|
-
*/
|
|
820
|
-
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
835
|
+
tableOfContents: {
|
|
836
|
+
setTableOfContents: () => ReturnType;
|
|
837
|
+
removeTableOfContents: () => ReturnType;
|
|
821
838
|
};
|
|
822
839
|
}
|
|
823
840
|
}
|
|
@@ -839,15 +856,17 @@ declare module '@tiptap/core' {
|
|
|
839
856
|
|
|
840
857
|
declare module '@tiptap/core' {
|
|
841
858
|
interface Commands<ReturnType> {
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
859
|
+
katex: {
|
|
860
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
declare module '@tiptap/core' {
|
|
867
|
+
interface Commands<ReturnType> {
|
|
868
|
+
exportWord: {
|
|
869
|
+
exportToWord: () => ReturnType;
|
|
851
870
|
};
|
|
852
871
|
}
|
|
853
872
|
}
|
|
@@ -873,35 +892,6 @@ declare module '@tiptap/core' {
|
|
|
873
892
|
}
|
|
874
893
|
|
|
875
894
|
|
|
876
|
-
declare module '@tiptap/core' {
|
|
877
|
-
interface Commands<ReturnType> {
|
|
878
|
-
drawer: {
|
|
879
|
-
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
880
|
-
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
881
|
-
};
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
declare module '@tiptap/core' {
|
|
887
|
-
interface Commands<ReturnType> {
|
|
888
|
-
tableOfContents: {
|
|
889
|
-
setTableOfContents: () => ReturnType;
|
|
890
|
-
removeTableOfContents: () => ReturnType;
|
|
891
|
-
};
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
declare module '@tiptap/core' {
|
|
897
|
-
interface Commands<ReturnType> {
|
|
898
|
-
attachment: {
|
|
899
|
-
setAttachment: (attrs?: unknown) => ReturnType;
|
|
900
|
-
};
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
|
|
905
895
|
declare module '@tiptap/core' {
|
|
906
896
|
interface Commands<ReturnType> {
|
|
907
897
|
twitter: {
|
|
@@ -929,8 +919,18 @@ declare module '@tiptap/core' {
|
|
|
929
919
|
|
|
930
920
|
declare module '@tiptap/core' {
|
|
931
921
|
interface Commands<ReturnType> {
|
|
932
|
-
|
|
933
|
-
|
|
922
|
+
attachment: {
|
|
923
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
924
|
+
};
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
declare module '@tiptap/core' {
|
|
930
|
+
interface Commands<ReturnType> {
|
|
931
|
+
drawer: {
|
|
932
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
933
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
934
934
|
};
|
|
935
935
|
}
|
|
936
936
|
}
|
package/lib/extension-bundle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Y as aa, Z as oa, B as _n, av as Xo, _ as sa, aw as $o, ax as Ct, ay as tn, az as An, aA as Fe, A as Ce, aB as $e, U as Ze, R as Ve, a9 as Jt, aC as Bo, Q as xi, aD as fi, aE as Et, aF as Pt, X as kn, $ as Fn, a0 as Sn, a1 as Hh, d as nt, aG as Vo, x as jh, aH as gi, aI as yt, W as st, aJ as Xh, aK as Ko, aL as Ne, aM as Zn, a2 as Fd, aN as Lo, aO as $h, aP as Go, P as Fi, q as Si, v as Bi, aQ as Zo, V as Vh, aR as Kh, aa as Gh, aS as jn, aT as Zh, aU as Yh, aV as Qh, aW as Jh, aX as ef, ae as tf, aY as nf, aZ as rf, a_ as af, a$ as Yo, b0 as of, b1 as sf, b2 as cf, b3 as uc, b4 as Sd, b5 as uf, b6 as df, b7 as lf, b8 as hf, ag as ff, b9 as gf, ba as dc, a7 as Oi, bb as pf, bc as mf, bd as xn, an as Mt, E as bf, be as yf, af as Df, bf as Qo, am as lc, L as Na, I as hc, bg as vf, bh as xf, bi as _f, bj as Qt, bk as wf, ah as Tf, as as Uf, bl as Ot, bm as Ef, bn as Af, bo as Cf, bp as kf, bq as Ff, br as Bd } from "./ColorPicker-
|
|
2
|
-
import { n as wy, w as Ty, G as Uy, K as Ey, M as Ay, bs as Cy, z as ky } from "./ColorPicker-
|
|
1
|
+
import { Y as aa, Z as oa, B as _n, av as Xo, _ as sa, aw as $o, ax as Ct, ay as tn, az as An, aA as Fe, A as Ce, aB as $e, U as Ze, R as Ve, a9 as Jt, aC as Bo, Q as xi, aD as fi, aE as Et, aF as Pt, X as kn, $ as Fn, a0 as Sn, a1 as Hh, d as nt, aG as Vo, x as jh, aH as gi, aI as yt, W as st, aJ as Xh, aK as Ko, aL as Ne, aM as Zn, a2 as Fd, aN as Lo, aO as $h, aP as Go, P as Fi, q as Si, v as Bi, aQ as Zo, V as Vh, aR as Kh, aa as Gh, aS as jn, aT as Zh, aU as Yh, aV as Qh, aW as Jh, aX as ef, ae as tf, aY as nf, aZ as rf, a_ as af, a$ as Yo, b0 as of, b1 as sf, b2 as cf, b3 as uc, b4 as Sd, b5 as uf, b6 as df, b7 as lf, b8 as hf, ag as ff, b9 as gf, ba as dc, a7 as Oi, bb as pf, bc as mf, bd as xn, an as Mt, E as bf, be as yf, af as Df, bf as Qo, am as lc, L as Na, I as hc, bg as vf, bh as xf, bi as _f, bj as Qt, bk as wf, ah as Tf, as as Uf, bl as Ot, bm as Ef, bn as Af, bo as Cf, bp as kf, bq as Ff, br as Bd } from "./ColorPicker-DXWTenTy.js";
|
|
2
|
+
import { n as wy, w as Ty, G as Uy, K as Ey, M as Ay, bs as Cy, z as ky } from "./ColorPicker-DXWTenTy.js";
|
|
3
3
|
import { bundledThemes as Ld, bundledLanguages as Nd, createHighlighter as Sf } from "shiki";
|
|
4
4
|
import { jsxs as be, jsx as G, Fragment as ca } from "react/jsx-runtime";
|
|
5
5
|
import * as Bn from "react";
|