reactjs-tiptap-editor 0.3.31 → 0.4.0
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/README.md +8 -2
- package/lib/{ActionMenuButton-BCgqJsST.cjs → ActionMenuButton-CYdM1xx5.cjs} +1 -1
- package/lib/{ActionMenuButton-D97K0UWT.js → ActionMenuButton-DKRF6oa0.js} +1 -1
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.d.cts +39 -43
- package/lib/Attachment.d.ts +39 -43
- package/lib/Attachment.js +7 -6
- package/lib/BaseKit.cjs +3 -0
- package/lib/BaseKit.d.cts +481 -0
- package/lib/BaseKit.d.ts +481 -0
- package/lib/BaseKit.js +132 -0
- package/lib/Blockquote.cjs +5 -1
- package/lib/Blockquote.d.cts +39 -43
- package/lib/Blockquote.d.ts +39 -43
- package/lib/Blockquote.js +33 -17
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +39 -43
- package/lib/Bold.d.ts +39 -43
- package/lib/Bold.js +23 -16
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +40 -44
- package/lib/BulletList.d.ts +40 -44
- package/lib/BulletList.js +11 -57
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +39 -43
- package/lib/Clear.d.ts +39 -43
- package/lib/Clear.js +4 -2
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +39 -43
- package/lib/Code.d.ts +39 -43
- package/lib/Code.js +29 -25
- package/lib/CodeBlock.cjs +2 -2
- package/lib/CodeBlock.d.cts +39 -43
- package/lib/CodeBlock.d.ts +39 -43
- package/lib/CodeBlock.js +3 -3
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +39 -43
- package/lib/CodeView.d.ts +39 -43
- package/lib/CodeView.js +3 -2
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +40 -44
- package/lib/Color.d.ts +40 -44
- package/lib/Color.js +42 -74
- package/lib/Document.cjs +1 -1
- package/lib/Document.d.cts +39 -43
- package/lib/Document.d.ts +39 -43
- package/lib/Document.js +4 -8
- package/lib/{Drawer-BHkje8ys.js → Drawer-CaAfmqNo.js} +37 -35
- package/lib/{Drawer-5Q_-WRhc.cjs → Drawer-CdvCMSzN.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +39 -43
- package/lib/Drawer.d.ts +39 -43
- package/lib/Drawer.js +4 -4
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +42 -44
- package/lib/Emoji.d.ts +42 -44
- package/lib/Emoji.js +19793 -182
- package/lib/{Excalidraw-GUVW-IqC.cjs → Excalidraw-BbMQhNvs.cjs} +1 -1
- package/lib/{Excalidraw-CG498239.js → Excalidraw-CVWz2Vyn.js} +20 -20
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +39 -43
- package/lib/Excalidraw.d.ts +39 -43
- package/lib/Excalidraw.js +3 -3
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +39 -43
- package/lib/ExportPdf.d.ts +39 -43
- package/lib/ExportPdf.js +4 -2
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +39 -43
- package/lib/ExportWord.d.ts +39 -43
- package/lib/ExportWord.js +22 -51
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +40 -44
- package/lib/FontFamily.d.ts +40 -44
- package/lib/FontFamily.js +44 -73
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +39 -43
- package/lib/FontSize.d.ts +39 -43
- package/lib/FontSize.js +7 -5
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +39 -43
- package/lib/FormatPainter.d.ts +39 -43
- package/lib/FormatPainter.js +4 -2
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +39 -43
- package/lib/Heading.d.ts +39 -43
- package/lib/Heading.js +71 -60
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +39 -43
- package/lib/Highlight.d.ts +39 -43
- package/lib/Highlight.js +5 -4
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +41 -45
- package/lib/History.d.ts +41 -45
- package/lib/History.js +39 -403
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +39 -43
- package/lib/HorizontalRule.d.ts +39 -43
- package/lib/HorizontalRule.js +16 -65
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +39 -43
- package/lib/Iframe.d.ts +39 -43
- package/lib/Iframe.js +4 -4
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +39 -43
- package/lib/Image.d.ts +39 -43
- package/lib/Image.js +3 -3
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +39 -43
- package/lib/ImageGif.d.ts +39 -43
- package/lib/ImageGif.js +5 -5
- package/lib/ImportWord.cjs +72 -72
- package/lib/ImportWord.d.cts +39 -43
- package/lib/ImportWord.d.ts +39 -43
- package/lib/ImportWord.js +5652 -5615
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +39 -43
- package/lib/Indent.d.ts +39 -43
- package/lib/Indent.js +4 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +39 -43
- package/lib/Italic.d.ts +39 -43
- package/lib/Italic.js +20 -14
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +39 -43
- package/lib/Katex.d.ts +39 -43
- package/lib/Katex.js +12 -12
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +39 -43
- package/lib/LineHeight.d.ts +39 -43
- package/lib/LineHeight.js +5 -3
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +39 -43
- package/lib/Link.d.ts +39 -43
- package/lib/Link.js +4 -4
- package/lib/ListItem.cjs +1 -1
- package/lib/ListItem.d.cts +44 -44
- package/lib/ListItem.d.ts +44 -44
- package/lib/ListItem.js +4 -30
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.d.cts +39 -43
- package/lib/Mention.d.ts +39 -43
- package/lib/Mention.js +161 -132
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.d.cts +39 -43
- package/lib/Mermaid.d.ts +39 -43
- package/lib/Mermaid.js +50 -48
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +39 -43
- package/lib/MoreMark.d.ts +39 -43
- package/lib/MoreMark.js +5 -3
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +39 -43
- package/lib/MultiColumn.d.ts +39 -43
- package/lib/MultiColumn.js +2 -2
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +40 -44
- package/lib/OrderedList.d.ts +40 -44
- package/lib/OrderedList.js +11 -75
- package/lib/RichTextEditor-CxvwGvQG.cjs +142 -0
- package/lib/RichTextEditor-DGcKEUGr.js +22166 -0
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +52 -126
- package/lib/SearchAndReplace.d.ts +52 -126
- package/lib/SearchAndReplace.js +204 -192
- package/lib/Selection.cjs +1 -1
- package/lib/Selection.d.cts +39 -43
- package/lib/Selection.d.ts +39 -43
- package/lib/Selection.js +1 -1
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +39 -43
- package/lib/SlashCommand.d.ts +39 -43
- package/lib/SlashCommand.js +177 -222
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +39 -43
- package/lib/Strike.d.ts +39 -43
- package/lib/Strike.js +20 -14
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +39 -43
- package/lib/SubAndSuperScript.d.ts +39 -43
- package/lib/SubAndSuperScript.js +5 -3
- package/lib/Table.cjs +8 -10
- package/lib/Table.d.cts +42 -46
- package/lib/Table.d.ts +42 -46
- package/lib/Table.js +382 -2022
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +39 -43
- package/lib/TableOfContent.d.ts +39 -43
- package/lib/TableOfContent.js +5 -5
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +41 -45
- package/lib/TaskList.d.ts +41 -45
- package/lib/TaskList.js +12 -154
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +39 -43
- package/lib/TextAlign.d.ts +39 -43
- package/lib/TextAlign.js +11 -9
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +39 -43
- package/lib/TextBubble.d.ts +39 -43
- package/lib/TextBubble.js +5 -3
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +39 -43
- package/lib/TextDirection.d.ts +39 -43
- package/lib/TextDirection.js +2 -3
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +39 -43
- package/lib/TextUnderline.d.ts +39 -43
- package/lib/TextUnderline.js +40 -12
- package/lib/TrailingNode.cjs +1 -1
- package/lib/TrailingNode.d.cts +39 -43
- package/lib/TrailingNode.d.ts +39 -43
- package/lib/TrailingNode.js +1 -1
- package/lib/Twitter-BFULyqdR.js +1628 -0
- package/lib/Twitter-Cutpkh3h.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +39 -43
- package/lib/Twitter.d.ts +39 -43
- package/lib/Twitter.js +3 -3
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +39 -43
- package/lib/Video.d.ts +39 -43
- package/lib/Video.js +3 -3
- package/lib/bubble-extra.cjs +2 -2
- package/lib/bubble-extra.d.cts +39 -43
- package/lib/bubble-extra.d.ts +39 -43
- package/lib/bubble-extra.js +200 -192
- package/lib/dom-dataset-_6-diIRQ.cjs +33 -0
- package/lib/dom-dataset-lYeH6gfI.js +2361 -0
- package/lib/index-5iBZLua9.cjs +12 -0
- package/lib/index-6D1J-A-o.cjs +1 -0
- package/lib/index-B96Cclrj.cjs +3 -0
- package/lib/index-BBz7Nmv9.js +55 -0
- package/lib/index-BeCTd5v2.cjs +1 -0
- package/lib/index-ByurDDMv.js +237 -0
- package/lib/index-CUogRI7j.cjs +1 -0
- package/lib/index-Ch6dBBad.js +709 -0
- package/lib/index-DF2Lp4HZ.cjs +100 -0
- package/lib/{index-LUL9mqY4.js → index-D_L6n8O8.js} +4 -4
- package/lib/index-Dbvi-Bvh.cjs +1 -0
- package/lib/index-DpCrt7xs.cjs +1 -0
- package/lib/index-DsAX1Vq8.cjs +1 -0
- package/lib/index-Dy4DlW9o.js +12 -0
- package/lib/index-J3jHHZ4d.js +200 -0
- package/lib/{index-CsK90iVd.js → index-LmrOdnen.js} +302 -389
- package/lib/index-VvXaaKe3.js +898 -0
- package/lib/index-kbO3iWqL.js +13432 -0
- package/lib/index.cjs +1 -2
- package/lib/index.d.cts +40 -243
- package/lib/index.d.ts +40 -243
- package/lib/index.js +2 -588
- package/lib/jsx-runtime-CT7Pcg-t.js +13 -0
- package/lib/jsx-runtime-C_NLcKys.cjs +1 -0
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +39 -43
- package/lib/locale-bundle.d.ts +39 -43
- package/lib/locale-bundle.js +1 -1
- package/lib/style.css +1 -1
- package/lib/{textarea-DdH64g04.cjs → textarea-DFo_aXnj.cjs} +1 -1
- package/lib/{textarea-CktfkXNe.js → textarea-aPtytkDx.js} +1 -1
- package/package.json +76 -70
- package/lib/RichTextEditor-DWlLqTl9.cjs +0 -140
- package/lib/RichTextEditor-KP2Rgcqe.js +0 -12751
- package/lib/Twitter-99ivY5qv.js +0 -1744
- package/lib/Twitter-BvfvUtNT.cjs +0 -17
- package/lib/dom-dataset-Byuf1YmW.cjs +0 -33
- package/lib/dom-dataset-Di3tIRrR.js +0 -1031
- package/lib/index-BI-IcZcN.cjs +0 -1
- package/lib/index-ByRfqzMr.cjs +0 -89
- package/lib/index-C1fzuXpN.js +0 -46
- package/lib/index-CbQQFj2T.js +0 -133
- package/lib/index-DI9T3iLd.js +0 -12354
- package/lib/index-D_A0TBRA.cjs +0 -1
- package/lib/index-DclQSrIx.cjs +0 -1
- package/lib/index-Z4b9rzn-.cjs +0 -1
package/lib/SearchAndReplace.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-DF2Lp4HZ.cjs"),r=require("react/jsx-runtime"),f=require("react"),u=require("./RichTextEditor-CxvwGvQG.cjs"),L=require("./index-6D1J-A-o.cjs");function B({editor:e,...t}){const{t:s}=L.useLocale(),[n,i]=f.useState(!1),[a,c]=f.useState(""),[o,h]=f.useState(""),[l,g]=f.useState(!1),[d,m]=f.useState(""),R=()=>{var x,I,T,C;m(`${((I=(x=e==null?void 0:e.storage)==null?void 0:x.searchAndReplace)==null?void 0:I.resultIndex)+1}/${(C=(T=e==null?void 0:e.storage)==null?void 0:T.searchAndReplace)==null?void 0:C.results.length}`)};f.useEffect(()=>{e&&R()},[e]);const A=(x=!1)=>{e&&(x&&e.commands.resetIndex(),e.commands.setSearchTerm(a),e.commands.setReplaceTerm(o),e.commands.setCaseSensitive(l),R())},v=()=>{if(!e)return;const{results:x,resultIndex:I}=e.storage.searchAndReplace,T=x[I];if(!T)return;e.commands.setTextSelection(T);const{node:C}=e.view.domAtPos(e.state.selection.anchor);C instanceof HTMLElement&&C.scrollIntoView({behavior:"smooth",block:"center"}),R()};f.useEffect(()=>{a.trim()||j(),a.trim()&&A(!0)},[a]),f.useEffect(()=>{o.trim()&&A()},[o]),f.useEffect(()=>{A(!0)},[l]);const b=()=>{e==null||e.commands.replace(),v()},y=()=>{e==null||e.commands.nextSearchResult(),v()},P=()=>{e==null||e.commands.previousSearchResult(),v()},j=()=>{c(""),h(""),e.commands.resetIndex(),R()},k=()=>{e==null||e.commands.replaceAll(),m("0/0")};return r.jsxs(u.Popover,{onOpenChange:i,open:n,children:[r.jsx(u.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:r.jsx(u.ActionButton,{disabled:t==null?void 0:t.disabled,isActive:t==null?void 0:t.isActive,tooltip:t==null?void 0:t.tooltip,tooltipOptions:t==null?void 0:t.tooltipOptions,children:r.jsx(u.IconComponent,{name:t==null?void 0:t.icon})})}),r.jsxs(u.PopoverContent,{align:"start",className:"richtext-w-full",hideWhenDetached:!0,side:"bottom",children:[r.jsxs("div",{className:"richtext-mb-[6px] richtext-flex richtext-items-center richtext-justify-between",children:[r.jsx(u.Label,{children:s("editor.search.dialog.text")}),r.jsx("span",{className:"richtext-font-semibold",children:d})]}),r.jsxs("div",{className:"richtext-mb-[10px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:[r.jsx(u.Input,{autoFocus:!0,className:"richtext-w-full",onChange:x=>c(x.target.value),placeholder:"Text",required:!0,type:"text",value:a}),r.jsx(u.Button,{className:"richtext-flex-1",onClick:P,children:r.jsx(u.IconComponent,{name:"ChevronUp"})}),r.jsx(u.Button,{className:"richtext-flex-1",onClick:y,children:r.jsx(u.IconComponent,{name:"ChevronDown"})}),r.jsx(u.Button,{className:"richtext-flex-1",onClick:j,children:"Clear"})]}),r.jsx(u.Label,{className:"richtext-mb-[6px]",children:s("editor.replace.dialog.text")}),r.jsx("div",{className:"richtext-mb-[5px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:r.jsx("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center",children:r.jsx(u.Input,{className:"richtext-w-80",onChange:x=>h(x.target.value),placeholder:"Text",required:!0,type:"text",value:o})})}),r.jsxs("div",{className:"richtext-mb-[10px] richtext-flex richtext-items-center richtext-space-x-2",children:[r.jsx(u.Switch,{checked:l,onCheckedChange:x=>{g(x),e.commands.setCaseSensitive(x)}}),r.jsx(u.Label,{children:s("editor.replace.caseSensitive")})]}),r.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:[r.jsx(u.Button,{className:"richtext-flex-1",onClick:b,children:s("editor.replace.dialog.text")}),r.jsx(u.Button,{className:"richtext-flex-1",onClick:k,children:s("editor.replaceAll.dialog.text")})]})]})]})}const S=(e,t)=>t(e.tr);function $(e,t,s){return RegExp(t?e.replace(/[$()*+.?[\\\]^{|}]/g,String.raw`\$&`):e,s?"gu":"gui")}function q(e,t,s,n){const i=[],a=[];let c=[],o=0;if(!t)return{decorationsToReturn:p.DecorationSet.empty,results:[]};e==null||e.descendants((h,l)=>{h.isText?c[o]?c[o]={text:c[o].text+h.text,pos:c[o].pos}:c[o]={text:`${h.text}`,pos:l}:o+=1}),c=c.filter(Boolean);for(const h of c){const{text:l,pos:g}=h,d=Array.from(l.matchAll(t)).filter(([m])=>m.trim());for(const m of d){if(m[0]==="")break;m.index!==void 0&&a.push({from:g+m.index,to:g+m.index+m[0].length})}}for(const[h,l]of a.entries()){const g=h===n?`${s} ${s}-current`:s,d=p.Decoration.inline(l.from,l.to,{class:g});i.push(d)}return{decorationsToReturn:p.DecorationSet.create(e,i),results:a}}function N(e,t,{state:s,dispatch:n}){if(!t[0])return;const{from:a,to:c}=t[0];n&&n(s.tr.insertText(e,a,c))}function D(e,t,s,n){const i=t+1;if(!n[i])return null;const{from:a,to:c}=n[t],o=c-a-e.length+s,{from:h,to:l}=n[i];return n[i]={to:l-o,from:h-o},[o,n]}function E(e,t,{tr:s,dispatch:n}){let i=0,a=t.slice();if(a.length!==0){for(let c=0;c<a.length;c+=1){const{from:o,to:h}=a[c];s.insertText(e,o,h);const l=D(e,c,i,a);l&&(i=l[0],a=l[1])}n(s)}}const w=new p.PluginKey("searchAndReplacePlugin"),O=p.Extension.create({name:"searchAndReplace",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),searchTerm:"",replaceTerm:"",results:[],searchResultClass:"search-result",searchResultCurrentClass:"search-result-current",caseSensitive:!1,disableRegex:!0,onChange:()=>{},button:({editor:t,t:s})=>({component:B,componentProps:{action:()=>{},icon:"SearchAndReplace",tooltip:s("editor.searchAndReplace.tooltip"),isActive:()=>!1,disabled:!1,editor:t}})}},addStorage(){return{searchTerm:"",replaceTerm:"",results:[],lastSearchTerm:"",caseSensitive:!1,lastCaseSensitive:!1,resultIndex:0,lastResultIndex:0}},addCommands(){return{setSearchTerm:e=>({editor:t,state:s,dispatch:n})=>(t.storage.searchAndReplace.searchTerm=e,S(s,n),!1),setReplaceTerm:e=>({editor:t,state:s,dispatch:n})=>(t.storage.searchAndReplace.replaceTerm=e,S(s,n),!1),setCaseSensitive:e=>({editor:t,state:s,dispatch:n})=>(t.storage.searchAndReplace.caseSensitive=e,S(s,n),!1),resetIndex:()=>({editor:e,state:t,dispatch:s})=>(e.storage.searchAndReplace.resultIndex=0,S(t,s),!1),nextSearchResult:()=>({editor:e})=>{const{results:t,resultIndex:s}=e.storage.searchAndReplace,n=s+1;return t[n]?e.storage.searchAndReplace.resultIndex=n:e.storage.searchAndReplace.resultIndex=0,!1},previousSearchResult:()=>({editor:e})=>{const{results:t,resultIndex:s}=e.storage.searchAndReplace,n=s-1;return t[n]?e.storage.searchAndReplace.resultIndex=n:e.storage.searchAndReplace.resultIndex=t.length-1,!1},replace:()=>({editor:e,state:t,dispatch:s})=>{const{replaceTerm:n,results:i,resultIndex:a}=e.storage.searchAndReplace,c=i[a];return c?(N(n,[c],{state:t,dispatch:s}),e.storage.searchAndReplace.results.splice(a,1)):(N(n,i,{state:t,dispatch:s}),e.storage.searchAndReplace.results.shift()),S(t,s),!1},replaceAll:()=>({editor:e,tr:t,state:s,dispatch:n})=>{const{replaceTerm:i,results:a}=e.storage.searchAndReplace;return E(i,a,{tr:t,dispatch:n}),e.storage.searchAndReplace.resultIndex=0,e.storage.searchAndReplace.results=[],S(s,n),!1}}},addProseMirrorPlugins(){const e=this.editor,{searchResultClass:t,disableRegex:s}=this.options,n=c=>e.storage.searchAndReplace.lastSearchTerm=c,i=c=>e.storage.searchAndReplace.lastCaseSensitive=c,a=c=>e.storage.searchAndReplace.lastResultIndex=c;return[new p.Plugin({key:w,state:{init:()=>p.DecorationSet.empty,apply({doc:c,docChanged:o},h){const{searchTerm:l,lastSearchTerm:g,caseSensitive:d,lastCaseSensitive:m,resultIndex:R,lastResultIndex:A}=e.storage.searchAndReplace;if(!o&&g===l&&m===d&&A===R)return h;if(n(l),i(d),a(R),!l)return e.storage.searchAndReplace.results=[],p.DecorationSet.empty;const{decorationsToReturn:v,results:b}=q(c,$(l,s,d),t,R);return e.storage.searchAndReplace.results=b,v}},props:{decorations(c){return this.getState(c)}}})]}});exports.SearchAndReplace=O;exports.searchAndReplacePluginKey=w;
|
|
@@ -1,95 +1,25 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/react';
|
|
2
1
|
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { PluginKey } from '@tiptap/pm/state';
|
|
3
|
+
import { Range as Range_2 } from '@tiptap/core';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
* Represents the ButtonView function.
|
|
6
|
-
*/
|
|
7
|
-
declare type ButtonView<T = any> = (options: ButtonViewParams<T>) => ButtonViewReturn | ButtonViewReturn[];
|
|
5
|
+
export declare const SearchAndReplace: Extension<SearchAndReplaceOptions, SearchAndReplaceStorage>;
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
declare interface ButtonViewParams<T = any> {
|
|
13
|
-
/** Editor object */
|
|
14
|
-
editor: Editor;
|
|
15
|
-
/** Extension object */
|
|
16
|
-
extension: Extension<T>;
|
|
17
|
-
/** Translation function */
|
|
18
|
-
t: (path: string) => string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Represents the return value for the ButtonView component.
|
|
23
|
-
*/
|
|
24
|
-
declare interface ButtonViewReturn {
|
|
25
|
-
/** Component */
|
|
26
|
-
component: unknown;
|
|
27
|
-
/** Component props */
|
|
28
|
-
componentProps: ButtonViewReturnComponentProps;
|
|
29
|
-
/** Component slots */
|
|
30
|
-
componentSlots?: ButtonViewReturnComponentSlots;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Represents the props for the ButtonView component.
|
|
35
|
-
*/
|
|
36
|
-
declare interface ButtonViewReturnComponentProps {
|
|
37
|
-
/** Method triggered when action is performed */
|
|
38
|
-
action?: (value?: any) => void;
|
|
39
|
-
/** Whether it is in the active state */
|
|
40
|
-
isActive?: () => boolean;
|
|
41
|
-
/** Button icon */
|
|
42
|
-
icon?: any;
|
|
43
|
-
/** Text displayed on hover */
|
|
44
|
-
tooltip?: string;
|
|
45
|
-
[x: string]: any;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Represents the slots for the ButtonView component.
|
|
50
|
-
*/
|
|
51
|
-
declare interface ButtonViewReturnComponentSlots {
|
|
52
|
-
/** Dialog slot */
|
|
53
|
-
dialog: () => any;
|
|
54
|
-
[x: string]: () => any;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Represents the general options for Tiptap extensions.
|
|
59
|
-
*/
|
|
60
|
-
declare interface GeneralOptions<T> {
|
|
61
|
-
/** Enabled divider */
|
|
62
|
-
divider: boolean;
|
|
63
|
-
/** Enabled spacer */
|
|
64
|
-
spacer: boolean;
|
|
65
|
-
/** Button view function */
|
|
66
|
-
button: ButtonView<T>;
|
|
67
|
-
/** Show on Toolbar */
|
|
68
|
-
toolbar?: boolean;
|
|
69
|
-
/** Shortcut keys override */
|
|
70
|
-
shortcutKeys?: string[] | string[][];
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
declare interface Result {
|
|
74
|
-
from: number;
|
|
75
|
-
to: number;
|
|
7
|
+
export declare interface SearchAndReplaceOptions {
|
|
8
|
+
searchResultClass: string;
|
|
9
|
+
disableRegex: boolean;
|
|
76
10
|
}
|
|
77
11
|
|
|
78
|
-
export declare const
|
|
12
|
+
export declare const searchAndReplacePluginKey: PluginKey<any>;
|
|
79
13
|
|
|
80
|
-
declare interface
|
|
14
|
+
export declare interface SearchAndReplaceStorage {
|
|
81
15
|
searchTerm: string;
|
|
82
16
|
replaceTerm: string;
|
|
83
|
-
|
|
84
|
-
|
|
17
|
+
results: Range_2[];
|
|
18
|
+
lastSearchTerm: string;
|
|
85
19
|
caseSensitive: boolean;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
declare interface SearchStorage {
|
|
91
|
-
results: Result[];
|
|
92
|
-
currentIndex: number;
|
|
20
|
+
lastCaseSensitive: boolean;
|
|
21
|
+
resultIndex: number;
|
|
22
|
+
lastResultIndex: number;
|
|
93
23
|
}
|
|
94
24
|
|
|
95
25
|
export { }
|
|
@@ -127,9 +57,8 @@ declare module '@tiptap/core' {
|
|
|
127
57
|
|
|
128
58
|
declare module '@tiptap/core' {
|
|
129
59
|
interface Commands<ReturnType> {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
60
|
+
excalidraw: {
|
|
61
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
133
62
|
};
|
|
134
63
|
}
|
|
135
64
|
}
|
|
@@ -137,11 +66,9 @@ declare module '@tiptap/core' {
|
|
|
137
66
|
|
|
138
67
|
declare module '@tiptap/core' {
|
|
139
68
|
interface Commands<ReturnType> {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
emoji: string;
|
|
144
|
-
}) => ReturnType;
|
|
69
|
+
drawer: {
|
|
70
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
71
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
145
72
|
};
|
|
146
73
|
}
|
|
147
74
|
}
|
|
@@ -149,8 +76,8 @@ declare module '@tiptap/core' {
|
|
|
149
76
|
|
|
150
77
|
declare module '@tiptap/core' {
|
|
151
78
|
interface Commands<ReturnType> {
|
|
152
|
-
|
|
153
|
-
|
|
79
|
+
exportPdf: {
|
|
80
|
+
exportToPdf: () => ReturnType;
|
|
154
81
|
};
|
|
155
82
|
}
|
|
156
83
|
}
|
|
@@ -158,8 +85,8 @@ declare module '@tiptap/core' {
|
|
|
158
85
|
|
|
159
86
|
declare module '@tiptap/core' {
|
|
160
87
|
interface Commands<ReturnType> {
|
|
161
|
-
|
|
162
|
-
|
|
88
|
+
exportWord: {
|
|
89
|
+
exportToWord: () => ReturnType;
|
|
163
90
|
};
|
|
164
91
|
}
|
|
165
92
|
}
|
|
@@ -167,8 +94,8 @@ declare module '@tiptap/core' {
|
|
|
167
94
|
|
|
168
95
|
declare module '@tiptap/core' {
|
|
169
96
|
interface Commands<ReturnType> {
|
|
170
|
-
|
|
171
|
-
|
|
97
|
+
painter: {
|
|
98
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
172
99
|
};
|
|
173
100
|
}
|
|
174
101
|
}
|
|
@@ -192,15 +119,6 @@ declare module '@tiptap/core' {
|
|
|
192
119
|
}
|
|
193
120
|
|
|
194
121
|
|
|
195
|
-
declare module '@tiptap/core' {
|
|
196
|
-
interface Commands<ReturnType> {
|
|
197
|
-
painter: {
|
|
198
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
204
122
|
declare module '@tiptap/core' {
|
|
205
123
|
interface Commands<ReturnType> {
|
|
206
124
|
iframe: {
|
|
@@ -256,6 +174,15 @@ declare module '@tiptap/core' {
|
|
|
256
174
|
}
|
|
257
175
|
|
|
258
176
|
|
|
177
|
+
declare module '@tiptap/core' {
|
|
178
|
+
interface Commands<ReturnType> {
|
|
179
|
+
katex: {
|
|
180
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
|
|
259
186
|
declare module '@tiptap/core' {
|
|
260
187
|
interface Commands<ReturnType> {
|
|
261
188
|
indent: {
|
|
@@ -274,8 +201,9 @@ declare module '@tiptap/core' {
|
|
|
274
201
|
|
|
275
202
|
declare module '@tiptap/core' {
|
|
276
203
|
interface Commands<ReturnType> {
|
|
277
|
-
|
|
278
|
-
|
|
204
|
+
lineHeight: {
|
|
205
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
206
|
+
unsetLineHeight: () => ReturnType;
|
|
279
207
|
};
|
|
280
208
|
}
|
|
281
209
|
}
|
|
@@ -283,9 +211,13 @@ declare module '@tiptap/core' {
|
|
|
283
211
|
|
|
284
212
|
declare module '@tiptap/core' {
|
|
285
213
|
interface Commands<ReturnType> {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
214
|
+
columns: {
|
|
215
|
+
insertColumns: (attrs?: {
|
|
216
|
+
cols: number;
|
|
217
|
+
}) => ReturnType;
|
|
218
|
+
addColBefore: () => ReturnType;
|
|
219
|
+
addColAfter: () => ReturnType;
|
|
220
|
+
deleteCol: () => ReturnType;
|
|
289
221
|
};
|
|
290
222
|
}
|
|
291
223
|
}
|
|
@@ -303,13 +235,9 @@ declare module '@tiptap/core' {
|
|
|
303
235
|
|
|
304
236
|
declare module '@tiptap/core' {
|
|
305
237
|
interface Commands<ReturnType> {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
}) => ReturnType;
|
|
310
|
-
addColBefore: () => ReturnType;
|
|
311
|
-
addColAfter: () => ReturnType;
|
|
312
|
-
deleteCol: () => ReturnType;
|
|
238
|
+
tableOfContents: {
|
|
239
|
+
setTableOfContents: () => ReturnType;
|
|
240
|
+
removeTableOfContents: () => ReturnType;
|
|
313
241
|
};
|
|
314
242
|
}
|
|
315
243
|
}
|
|
@@ -320,22 +248,20 @@ declare module '@tiptap/core' {
|
|
|
320
248
|
search: {
|
|
321
249
|
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
322
250
|
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
251
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
252
|
+
resetIndex: () => ReturnType;
|
|
253
|
+
nextSearchResult: () => ReturnType;
|
|
254
|
+
previousSearchResult: () => ReturnType;
|
|
323
255
|
replace: () => ReturnType;
|
|
324
256
|
replaceAll: () => ReturnType;
|
|
325
|
-
goToPrevSearchResult: () => void;
|
|
326
|
-
goToNextSearchResult: () => void;
|
|
327
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
328
257
|
};
|
|
329
258
|
}
|
|
330
259
|
}
|
|
331
260
|
|
|
332
261
|
|
|
333
262
|
declare module '@tiptap/core' {
|
|
334
|
-
interface
|
|
335
|
-
|
|
336
|
-
setTableOfContents: () => ReturnType;
|
|
337
|
-
removeTableOfContents: () => ReturnType;
|
|
338
|
-
};
|
|
263
|
+
interface Storage {
|
|
264
|
+
searchAndReplace: SearchAndReplaceStorage;
|
|
339
265
|
}
|
|
340
266
|
}
|
|
341
267
|
|
|
@@ -1,95 +1,25 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/react';
|
|
2
1
|
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { PluginKey } from '@tiptap/pm/state';
|
|
3
|
+
import { Range as Range_2 } from '@tiptap/core';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
* Represents the ButtonView function.
|
|
6
|
-
*/
|
|
7
|
-
declare type ButtonView<T = any> = (options: ButtonViewParams<T>) => ButtonViewReturn | ButtonViewReturn[];
|
|
5
|
+
export declare const SearchAndReplace: Extension<SearchAndReplaceOptions, SearchAndReplaceStorage>;
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
declare interface ButtonViewParams<T = any> {
|
|
13
|
-
/** Editor object */
|
|
14
|
-
editor: Editor;
|
|
15
|
-
/** Extension object */
|
|
16
|
-
extension: Extension<T>;
|
|
17
|
-
/** Translation function */
|
|
18
|
-
t: (path: string) => string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Represents the return value for the ButtonView component.
|
|
23
|
-
*/
|
|
24
|
-
declare interface ButtonViewReturn {
|
|
25
|
-
/** Component */
|
|
26
|
-
component: unknown;
|
|
27
|
-
/** Component props */
|
|
28
|
-
componentProps: ButtonViewReturnComponentProps;
|
|
29
|
-
/** Component slots */
|
|
30
|
-
componentSlots?: ButtonViewReturnComponentSlots;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Represents the props for the ButtonView component.
|
|
35
|
-
*/
|
|
36
|
-
declare interface ButtonViewReturnComponentProps {
|
|
37
|
-
/** Method triggered when action is performed */
|
|
38
|
-
action?: (value?: any) => void;
|
|
39
|
-
/** Whether it is in the active state */
|
|
40
|
-
isActive?: () => boolean;
|
|
41
|
-
/** Button icon */
|
|
42
|
-
icon?: any;
|
|
43
|
-
/** Text displayed on hover */
|
|
44
|
-
tooltip?: string;
|
|
45
|
-
[x: string]: any;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Represents the slots for the ButtonView component.
|
|
50
|
-
*/
|
|
51
|
-
declare interface ButtonViewReturnComponentSlots {
|
|
52
|
-
/** Dialog slot */
|
|
53
|
-
dialog: () => any;
|
|
54
|
-
[x: string]: () => any;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Represents the general options for Tiptap extensions.
|
|
59
|
-
*/
|
|
60
|
-
declare interface GeneralOptions<T> {
|
|
61
|
-
/** Enabled divider */
|
|
62
|
-
divider: boolean;
|
|
63
|
-
/** Enabled spacer */
|
|
64
|
-
spacer: boolean;
|
|
65
|
-
/** Button view function */
|
|
66
|
-
button: ButtonView<T>;
|
|
67
|
-
/** Show on Toolbar */
|
|
68
|
-
toolbar?: boolean;
|
|
69
|
-
/** Shortcut keys override */
|
|
70
|
-
shortcutKeys?: string[] | string[][];
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
declare interface Result {
|
|
74
|
-
from: number;
|
|
75
|
-
to: number;
|
|
7
|
+
export declare interface SearchAndReplaceOptions {
|
|
8
|
+
searchResultClass: string;
|
|
9
|
+
disableRegex: boolean;
|
|
76
10
|
}
|
|
77
11
|
|
|
78
|
-
export declare const
|
|
12
|
+
export declare const searchAndReplacePluginKey: PluginKey<any>;
|
|
79
13
|
|
|
80
|
-
declare interface
|
|
14
|
+
export declare interface SearchAndReplaceStorage {
|
|
81
15
|
searchTerm: string;
|
|
82
16
|
replaceTerm: string;
|
|
83
|
-
|
|
84
|
-
|
|
17
|
+
results: Range_2[];
|
|
18
|
+
lastSearchTerm: string;
|
|
85
19
|
caseSensitive: boolean;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
declare interface SearchStorage {
|
|
91
|
-
results: Result[];
|
|
92
|
-
currentIndex: number;
|
|
20
|
+
lastCaseSensitive: boolean;
|
|
21
|
+
resultIndex: number;
|
|
22
|
+
lastResultIndex: number;
|
|
93
23
|
}
|
|
94
24
|
|
|
95
25
|
export { }
|
|
@@ -127,9 +57,8 @@ declare module '@tiptap/core' {
|
|
|
127
57
|
|
|
128
58
|
declare module '@tiptap/core' {
|
|
129
59
|
interface Commands<ReturnType> {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
60
|
+
excalidraw: {
|
|
61
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
133
62
|
};
|
|
134
63
|
}
|
|
135
64
|
}
|
|
@@ -137,11 +66,9 @@ declare module '@tiptap/core' {
|
|
|
137
66
|
|
|
138
67
|
declare module '@tiptap/core' {
|
|
139
68
|
interface Commands<ReturnType> {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
emoji: string;
|
|
144
|
-
}) => ReturnType;
|
|
69
|
+
drawer: {
|
|
70
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
71
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
145
72
|
};
|
|
146
73
|
}
|
|
147
74
|
}
|
|
@@ -149,8 +76,8 @@ declare module '@tiptap/core' {
|
|
|
149
76
|
|
|
150
77
|
declare module '@tiptap/core' {
|
|
151
78
|
interface Commands<ReturnType> {
|
|
152
|
-
|
|
153
|
-
|
|
79
|
+
exportPdf: {
|
|
80
|
+
exportToPdf: () => ReturnType;
|
|
154
81
|
};
|
|
155
82
|
}
|
|
156
83
|
}
|
|
@@ -158,8 +85,8 @@ declare module '@tiptap/core' {
|
|
|
158
85
|
|
|
159
86
|
declare module '@tiptap/core' {
|
|
160
87
|
interface Commands<ReturnType> {
|
|
161
|
-
|
|
162
|
-
|
|
88
|
+
exportWord: {
|
|
89
|
+
exportToWord: () => ReturnType;
|
|
163
90
|
};
|
|
164
91
|
}
|
|
165
92
|
}
|
|
@@ -167,8 +94,8 @@ declare module '@tiptap/core' {
|
|
|
167
94
|
|
|
168
95
|
declare module '@tiptap/core' {
|
|
169
96
|
interface Commands<ReturnType> {
|
|
170
|
-
|
|
171
|
-
|
|
97
|
+
painter: {
|
|
98
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
172
99
|
};
|
|
173
100
|
}
|
|
174
101
|
}
|
|
@@ -192,15 +119,6 @@ declare module '@tiptap/core' {
|
|
|
192
119
|
}
|
|
193
120
|
|
|
194
121
|
|
|
195
|
-
declare module '@tiptap/core' {
|
|
196
|
-
interface Commands<ReturnType> {
|
|
197
|
-
painter: {
|
|
198
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
204
122
|
declare module '@tiptap/core' {
|
|
205
123
|
interface Commands<ReturnType> {
|
|
206
124
|
iframe: {
|
|
@@ -256,6 +174,15 @@ declare module '@tiptap/core' {
|
|
|
256
174
|
}
|
|
257
175
|
|
|
258
176
|
|
|
177
|
+
declare module '@tiptap/core' {
|
|
178
|
+
interface Commands<ReturnType> {
|
|
179
|
+
katex: {
|
|
180
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
|
|
259
186
|
declare module '@tiptap/core' {
|
|
260
187
|
interface Commands<ReturnType> {
|
|
261
188
|
indent: {
|
|
@@ -274,8 +201,9 @@ declare module '@tiptap/core' {
|
|
|
274
201
|
|
|
275
202
|
declare module '@tiptap/core' {
|
|
276
203
|
interface Commands<ReturnType> {
|
|
277
|
-
|
|
278
|
-
|
|
204
|
+
lineHeight: {
|
|
205
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
206
|
+
unsetLineHeight: () => ReturnType;
|
|
279
207
|
};
|
|
280
208
|
}
|
|
281
209
|
}
|
|
@@ -283,9 +211,13 @@ declare module '@tiptap/core' {
|
|
|
283
211
|
|
|
284
212
|
declare module '@tiptap/core' {
|
|
285
213
|
interface Commands<ReturnType> {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
214
|
+
columns: {
|
|
215
|
+
insertColumns: (attrs?: {
|
|
216
|
+
cols: number;
|
|
217
|
+
}) => ReturnType;
|
|
218
|
+
addColBefore: () => ReturnType;
|
|
219
|
+
addColAfter: () => ReturnType;
|
|
220
|
+
deleteCol: () => ReturnType;
|
|
289
221
|
};
|
|
290
222
|
}
|
|
291
223
|
}
|
|
@@ -303,13 +235,9 @@ declare module '@tiptap/core' {
|
|
|
303
235
|
|
|
304
236
|
declare module '@tiptap/core' {
|
|
305
237
|
interface Commands<ReturnType> {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
}) => ReturnType;
|
|
310
|
-
addColBefore: () => ReturnType;
|
|
311
|
-
addColAfter: () => ReturnType;
|
|
312
|
-
deleteCol: () => ReturnType;
|
|
238
|
+
tableOfContents: {
|
|
239
|
+
setTableOfContents: () => ReturnType;
|
|
240
|
+
removeTableOfContents: () => ReturnType;
|
|
313
241
|
};
|
|
314
242
|
}
|
|
315
243
|
}
|
|
@@ -320,22 +248,20 @@ declare module '@tiptap/core' {
|
|
|
320
248
|
search: {
|
|
321
249
|
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
322
250
|
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
251
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
252
|
+
resetIndex: () => ReturnType;
|
|
253
|
+
nextSearchResult: () => ReturnType;
|
|
254
|
+
previousSearchResult: () => ReturnType;
|
|
323
255
|
replace: () => ReturnType;
|
|
324
256
|
replaceAll: () => ReturnType;
|
|
325
|
-
goToPrevSearchResult: () => void;
|
|
326
|
-
goToNextSearchResult: () => void;
|
|
327
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
328
257
|
};
|
|
329
258
|
}
|
|
330
259
|
}
|
|
331
260
|
|
|
332
261
|
|
|
333
262
|
declare module '@tiptap/core' {
|
|
334
|
-
interface
|
|
335
|
-
|
|
336
|
-
setTableOfContents: () => ReturnType;
|
|
337
|
-
removeTableOfContents: () => ReturnType;
|
|
338
|
-
};
|
|
263
|
+
interface Storage {
|
|
264
|
+
searchAndReplace: SearchAndReplaceStorage;
|
|
339
265
|
}
|
|
340
266
|
}
|
|
341
267
|
|