1// @tiptap/[email protected] downloaded from https://ga.jspm.io/npm:@tiptap/[email protected]/dist/index.js 2 3import{textInputRule as e,Extension as t}from"@tiptap/core";const n=t=>e({find:/--$/,replace:t==null?`â`:t}),r=t=>e({find:/\.\.\.$/,replace:t==null?`â¦`:t}),i=t=>e({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:t==null?`â`:t}),a=t=>e({find:/"$/,replace:t==null?`â`:t}),o=t=>e({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:t==null?`â`:t}),s=t=>e({find:/'$/,replace:t==null?`â`:t}),c=t=>e({find:/<-$/,replace:t==null?`â`:t}),l=t=>e({find:/->$/,replace:t==null?`â`:t}),u=t=>e({find:/\(c\)$/,replace:t==null?`©`:t}),d=t=>e({find:/\(tm\)$/,replace:t==null?`â¢`:t}),f=t=>e({find:/\(sm\)$/,replace:t==null?`â `:t}),p=t=>e({find:/\(r\)$/,replace:t==null?`®`:t}),m=t=>e({find:/(?:^|\s)(1\/2)\s$/,replace:t==null?`½`:t}),h=t=>e({find:/\+\/-$/,replace:t==null?`±`:t}),g=t=>e({find:/!=$/,replace:t==null?`â `:t}),_=t=>e({find:/<<$/,replace:t==null?`«`:t}),v=t=>e({find:/>>$/,replace:t==null?`»`:t}),y=t=>e({find:/\d+\s?([*x])\s?\d+$/,replace:t==null?`Ã`:t}),b=t=>e({find:/\^2$/,replace:t==null?`²`:t}),x=t=>e({find:/\^3$/,replace:t==null?`³`:t}),S=t=>e({find:/(?:^|\s)(1\/4)\s$/,replace:t==null?`¼`:t}),C=t=>e({find:/(?:^|\s)(3\/4)\s$/,replace:t==null?`¾`:t}),w=t.create({name:`typography`,addOptions(){return{closeDoubleQuote:`â`,closeSingleQuote:`â`,copyright:`©`,ellipsis:`â¦`,emDash:`â`,laquo:`«`,leftArrow:`â`,multiplication:`Ã`,notEqual:`â `,oneHalf:`½`,oneQuarter:`¼`,openDoubleQuote:`â`,openSingleQuote:`â`,plusMinus:`±`,raquo:`»`,registeredTrademark:`®`,rightArrow:`â`,servicemark:`â `,superscriptThree:`³`,superscriptTwo:`²`,threeQuarters:`¾`,trademark:`â¢`}},addInputRules(){var e,t;let w=[];this.options.emDash!==!1&&w.push(n(this.options.emDash)),this.options.ellipsis!==!1&&w.push(r(this.options.ellipsis));let T=this.editor.options.textDirection===`rtl`;if((e=this.options.doubleQuotes)!=null&&e.rtl){let{open:e,close:t}=this.options.doubleQuotes.rtl;w.push(i(e)),w.push(a(t))}else T?(w.push(i(`â`)),w.push(a(`â`))):(this.options.openDoubleQuote!==!1&&w.push(i(this.options.openDoubleQuote)),this.options.closeDoubleQuote!==!1&&w.push(a(this.options.closeDoubleQuote)));if((t=this.options.singleQuotes)!=null&&t.rtl){let{open:e,close:t}=this.options.singleQuotes.rtl;w.push(o(e)),w.push(s(t))}else T?(w.push(o(`â`)),w.push(s(`â`))):(this.options.openSingleQuote!==!1&&w.push(o(this.options.openSingleQuote)),this.options.closeSingleQuote!==!1&&w.push(s(this.options.closeSingleQuote)));return this.options.leftArrow!==!1&&w.push(c(this.options.leftArrow)),this.options.rightArrow!==!1&&w.push(l(this.options.rightArrow)),this.options.copyright!==!1&&w.push(u(this.options.copyright)),this.options.trademark!==!1&&w.push(d(this.options.trademark)),this.options.servicemark!==!1&&w.push(f(this.options.servicemark)),this.options.registeredTrademark!==!1&&w.push(p(this.options.registeredTrademark)),this.options.oneHalf!==!1&&w.push(m(this.options.oneHalf)),this.options.plusMinus!==!1&&w.push(h(this.options.plusMinus)),this.options.notEqual!==!1&&w.push(g(this.options.notEqual)),this.options.laquo!==!1&&w.push(_(this.options.laquo)),this.options.raquo!==!1&&w.push(v(this.options.raquo)),this.options.multiplication!==!1&&w.push(y(this.options.multiplication)),this.options.superscriptTwo!==!1&&w.push(b(this.options.superscriptTwo)),this.options.superscriptThree!==!1&&w.push(x(this.options.superscriptThree)),this.options.oneQuarter!==!1&&w.push(S(this.options.oneQuarter)),this.options.threeQuarters!==!1&&w.push(C(this.options.threeQuarters)),w}});var T=w;export{w as Typography,a as closeDoubleQuote,s as closeSingleQuote,u as copyright,T as default,r as ellipsis,n as emDash,_ as laquo,c as leftArrow,y as multiplication,g as notEqual,m as oneHalf,S as oneQuarter,i as openDoubleQuote,o as openSingleQuote,h as plusMinus,v as raquo,p as registeredTrademark,l as rightArrow,f as servicemark,x as superscriptThree,b as superscriptTwo,C as threeQuarters,d as trademark}; 4
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.