@paroicms/site-generator-plugin 0.2.0 → 0.2.1

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.
@@ -736,7 +736,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
736
736
  stroke: #ffa700;
737
737
  }
738
738
  }
739
- `,x0={spinner:function(n){var t=n.props;return{animationDuration:t.animationDuration}}},Il=et.extend({defaultProps:{__TYPE:"ProgressSpinner",id:null,style:null,className:null,strokeWidth:"2",fill:"none",animationDuration:"2s",children:void 0},css:{classes:S0,styles:b0,inlineStyles:x0}}),Ug=y.memo(y.forwardRef(function(o,n){var t=$n(),i=y.useContext(Wt),a=Il.getProps(o,i),u=y.useRef(null),c=Il.setMetaData({props:a}),d=c.ptm,p=c.cx,h=c.sx,m=c.isUnstyled;kr(Il.css.styles,m,{name:"progressspinner"}),y.useImperativeHandle(n,function(){return{props:a,getElement:function(){return u.current}}});var w=t({id:a.id,ref:u,style:a.style,className:Ue(a.className,p("root")),role:"progressbar","aria-busy":!0},Il.getOtherProps(a),d("root")),S=t({className:p("spinner"),viewBox:"25 25 50 50",style:h("spinner")},d("spinner")),E=t({className:p("circle"),cx:"50",cy:"50",r:"20",fill:a.fill,strokeWidth:a.strokeWidth,strokeMiterlimit:"10"},d("circle"));return y.createElement("div",w,y.createElement("svg",S,y.createElement("circle",E)))}));Ug.displayName="ProgressSpinner";const E0="/api/plugin/site-generator";async function uc(o){try{const n=await fetch(E0,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});return n.ok?n.json():{success:!1,userMessage:`Failed to execute command: ${n.statusText}`}}catch(n){return{success:!1,userMessage:`Communication error: ${n.message}`}}}function C0({generatedSchema:o}){const{t:n}=wa(),[t,i]=y.useState(!1),[a,u]=y.useState(),[c,d]=y.useState(),p=async({withFakeContent:h})=>{i(!0),d(void 0);try{const m=await uc({command:"generateSite",generatedSchema:o,withFakeContent:h});m.success?u(m.result):d(n("errorOccurred",{message:m.userMessage??n("unknownError")}))}finally{i(!1)}};return de.jsx("div",{className:"flex justify-content-center mt-4",children:t?de.jsx(Jo,{className:"w-full max-w-30rem shadow-3 text-center p-4",children:de.jsxs("div",{className:"flex flex-column align-items-center gap-3",children:[de.jsx(Ug,{style:{width:"50px",height:"50px"}}),de.jsx("div",{className:"text-xl",children:n("generatingSite")})]})}):a?de.jsxs(Jo,{className:"w-full max-w-30rem shadow-3 p-0",children:[de.jsxs("div",{className:"bg-green-100 p-3 border-round-top",children:[de.jsx("div",{className:"text-xl font-bold text-green-800 mb-2",children:n("siteGenerated")}),de.jsxs("div",{className:"mb-1",children:[de.jsx("span",{className:"font-bold",children:n("email")})," ",a.account.email]}),a.account.kind==="local"&&de.jsxs("div",{className:"mb-2",children:[de.jsx("span",{className:"font-bold",children:n("password")})," ",a.account.password]})]}),de.jsx("div",{className:"p-4",children:de.jsxs("div",{className:"flex gap-3 justify-content-center",children:[de.jsx(Oi,{label:n("viewSite"),icon:"pi pi-external-link",onClick:()=>window.open(a.url,"_blank"),className:"p-button-raised"}),de.jsx(Oi,{label:n("administration"),icon:"pi pi-cog",onClick:()=>window.open(a.boUrl,"_blank"),severity:"secondary",className:"p-button-raised"})]})})]}):c?de.jsx(Jo,{className:"w-full max-w-30rem shadow-3 bg-red-50 border-red-300",children:de.jsxs("div",{className:"flex align-items-center gap-2",children:[de.jsx("i",{className:"pi pi-exclamation-triangle text-red-500 text-xl"}),de.jsx("span",{className:"text-red-700",children:c})]})}):de.jsxs(Jo,{className:"w-full max-w-30rem shadow-3 p-4",children:[de.jsx("div",{className:"text-xl font-bold mb-3 text-center",children:n("createNewSite")}),de.jsxs("div",{className:"flex flex-column gap-3 md:flex-row justify-content-center",children:[de.jsx(Oi,{onClick:()=>p({withFakeContent:!0}),className:"p-button-raised",icon:"pi pi-file",iconPos:"left",children:n("generateSite")}),de.jsx(Oi,{onClick:()=>p({withFakeContent:!1}),severity:"secondary",className:"p-button-raised",icon:"pi pi-file-o",iconPos:"left",children:n("generateEmptySite")})]})]})})}function jc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ii=jc();function Vg(o){Ii=o}const na={exec:()=>null};function st(o,n=""){let t=typeof o=="string"?o:o.source;const i={replace:(a,u)=>{let c=typeof u=="string"?u:u.source;return c=c.replace(Pn.caret,"$1"),t=t.replace(a,c),i},getRegex:()=>new RegExp(t,n)};return i}const Pn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o=>new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}#`),htmlBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}<(?:[a-z].*>|!--)`,"i")},k0=/^(?:[ \t]*(?:\n|$))+/,O0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,P0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Sa=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,T0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Dc=/(?:[*+-]|\d{1,9}[.)])/,Kg=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wg=st(Kg).replace(/bull/g,Dc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),I0=st(Kg).replace(/bull/g,Dc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Fc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,N0=/^[^\n]+/,zc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,R0=st(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",zc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),L0=st(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Dc).getRegex(),ns="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Mc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,_0=st("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Mc).replace("tag",ns).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gg=st(Fc).replace("hr",Sa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ns).getRegex(),A0=st(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Gg).getRegex(),Hc={blockquote:A0,code:O0,def:R0,fences:P0,heading:T0,hr:Sa,html:_0,lheading:Wg,list:L0,newline:k0,paragraph:Gg,table:na,text:N0},Kp=st("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Sa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ns).getRegex(),$0={...Hc,lheading:I0,table:Kp,paragraph:st(Fc).replace("hr",Sa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Kp).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ns).getRegex()},j0={...Hc,html:st(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Mc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:na,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:st(Fc).replace("hr",Sa).replace("heading",` *#{1,6} *[^
739
+ `,x0={spinner:function(n){var t=n.props;return{animationDuration:t.animationDuration}}},Il=et.extend({defaultProps:{__TYPE:"ProgressSpinner",id:null,style:null,className:null,strokeWidth:"2",fill:"none",animationDuration:"2s",children:void 0},css:{classes:S0,styles:b0,inlineStyles:x0}}),Ug=y.memo(y.forwardRef(function(o,n){var t=$n(),i=y.useContext(Wt),a=Il.getProps(o,i),u=y.useRef(null),c=Il.setMetaData({props:a}),d=c.ptm,p=c.cx,h=c.sx,m=c.isUnstyled;kr(Il.css.styles,m,{name:"progressspinner"}),y.useImperativeHandle(n,function(){return{props:a,getElement:function(){return u.current}}});var w=t({id:a.id,ref:u,style:a.style,className:Ue(a.className,p("root")),role:"progressbar","aria-busy":!0},Il.getOtherProps(a),d("root")),S=t({className:p("spinner"),viewBox:"25 25 50 50",style:h("spinner")},d("spinner")),E=t({className:p("circle"),cx:"50",cy:"50",r:"20",fill:a.fill,strokeWidth:a.strokeWidth,strokeMiterlimit:"10"},d("circle"));return y.createElement("div",w,y.createElement("svg",S,y.createElement("circle",E)))}));Ug.displayName="ProgressSpinner";const E0="/api/plugin/site-generator";async function uc(o){try{const n=await fetch(E0,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});return n.ok?n.json():{success:!1,userMessage:`Failed to execute command: ${n.statusText}`}}catch(n){return{success:!1,userMessage:`Communication error: ${n.message}`}}}function C0({generatedSchema:o}){const{t:n}=wa(),[t,i]=y.useState(!1),[a,u]=y.useState(),[c,d]=y.useState(),p=async({withFakeContent:h})=>{i(!0),d(void 0);try{const m=await uc({command:"generateSite",generatedSchema:o,withFakeContent:h});m.success?u(m.result):d(n("errorOccurred",{message:m.userMessage??n("unknownError")}))}finally{i(!1)}};return de.jsx("div",{className:"flex justify-content-center mt-4",children:t?de.jsx(Jo,{className:"w-full max-w-30rem shadow-3 text-center p-4",children:de.jsxs("div",{className:"flex flex-column align-items-center gap-3",children:[de.jsx(Ug,{style:{width:"50px",height:"50px"}}),de.jsx("div",{className:"text-xl",children:n("generatingSite")})]})}):a?de.jsxs(Jo,{className:"w-full max-w-30rem shadow-3 p-0",children:[de.jsxs("div",{className:"bg-green-100 p-3 border-round-top",children:[de.jsx("div",{className:"text-xl font-bold text-green-800 mb-2",children:n("siteGenerated")}),de.jsxs("div",{className:"mb-1",children:[de.jsx("span",{className:"font-bold",children:n("email")})," ",a.account.email]}),a.account.kind==="local"&&de.jsxs("div",{className:"mb-2",children:[de.jsx("span",{className:"font-bold",children:n("password")})," ",a.account.password]})]}),de.jsx("div",{className:"p-4",children:de.jsxs("div",{className:"flex gap-3 justify-content-center",children:[de.jsx(Oi,{label:n("viewSite"),icon:"pi pi-external-link",onClick:()=>window.open(a.url,"_blank"),severity:"secondary",className:"p-button-raised"}),de.jsx(Oi,{label:n("administration"),icon:"pi pi-cog",onClick:()=>window.open(a.boUrl,"_blank"),className:"p-button-raised"})]})})]}):c?de.jsx(Jo,{className:"w-full max-w-30rem shadow-3 bg-red-50 border-red-300",children:de.jsxs("div",{className:"flex align-items-center gap-2",children:[de.jsx("i",{className:"pi pi-exclamation-triangle text-red-500 text-xl"}),de.jsx("span",{className:"text-red-700",children:c})]})}):de.jsxs(Jo,{className:"w-full max-w-30rem shadow-3 p-4",children:[de.jsx("div",{className:"text-xl font-bold mb-3 text-center",children:n("createNewSite")}),de.jsxs("div",{className:"flex flex-column gap-3 md:flex-row justify-content-center",children:[de.jsx(Oi,{onClick:()=>p({withFakeContent:!0}),className:"p-button-raised",icon:"pi pi-file",iconPos:"left",children:n("generateSite")}),de.jsx(Oi,{onClick:()=>p({withFakeContent:!1}),severity:"secondary",className:"p-button-raised",icon:"pi pi-file-o",iconPos:"left",children:n("generateEmptySite")})]})]})})}function jc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ii=jc();function Vg(o){Ii=o}const na={exec:()=>null};function st(o,n=""){let t=typeof o=="string"?o:o.source;const i={replace:(a,u)=>{let c=typeof u=="string"?u:u.source;return c=c.replace(Pn.caret,"$1"),t=t.replace(a,c),i},getRegex:()=>new RegExp(t,n)};return i}const Pn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o=>new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}#`),htmlBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}<(?:[a-z].*>|!--)`,"i")},k0=/^(?:[ \t]*(?:\n|$))+/,O0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,P0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Sa=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,T0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Dc=/(?:[*+-]|\d{1,9}[.)])/,Kg=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wg=st(Kg).replace(/bull/g,Dc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),I0=st(Kg).replace(/bull/g,Dc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Fc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,N0=/^[^\n]+/,zc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,R0=st(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",zc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),L0=st(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Dc).getRegex(),ns="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Mc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,_0=st("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Mc).replace("tag",ns).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gg=st(Fc).replace("hr",Sa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ns).getRegex(),A0=st(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Gg).getRegex(),Hc={blockquote:A0,code:O0,def:R0,fences:P0,heading:T0,hr:Sa,html:_0,lheading:Wg,list:L0,newline:k0,paragraph:Gg,table:na,text:N0},Kp=st("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Sa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ns).getRegex(),$0={...Hc,lheading:I0,table:Kp,paragraph:st(Fc).replace("hr",Sa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Kp).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ns).getRegex()},j0={...Hc,html:st(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Mc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:na,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:st(Fc).replace("hr",Sa).replace("heading",` *#{1,6} *[^
740
740
  ]`).replace("lheading",Wg).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},D0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,F0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qg=/^( {2,}|\\)\n(?!\s*$)/,z0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,rs=/[\p{P}\p{S}]/u,Bc=/[\s\p{P}\p{S}]/u,Yg=/[^\s\p{P}\p{S}]/u,M0=st(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Bc).getRegex(),Xg=/(?!~)[\p{P}\p{S}]/u,H0=/(?!~)[\s\p{P}\p{S}]/u,B0=/(?:[^\s\p{P}\p{S}]|~)/u,U0=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Zg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,V0=st(Zg,"u").replace(/punct/g,rs).getRegex(),K0=st(Zg,"u").replace(/punct/g,Xg).getRegex(),qg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",W0=st(qg,"gu").replace(/notPunctSpace/g,Yg).replace(/punctSpace/g,Bc).replace(/punct/g,rs).getRegex(),G0=st(qg,"gu").replace(/notPunctSpace/g,B0).replace(/punctSpace/g,H0).replace(/punct/g,Xg).getRegex(),Q0=st("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yg).replace(/punctSpace/g,Bc).replace(/punct/g,rs).getRegex(),Y0=st(/\\(punct)/,"gu").replace(/punct/g,rs).getRegex(),X0=st(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Z0=st(Mc).replace("(?:-->|$)","-->").getRegex(),q0=st("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Z0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Bl=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,J0=st(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Bl).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Jg=st(/^!?\[(label)\]\[(ref)\]/).replace("label",Bl).replace("ref",zc).getRegex(),eh=st(/^!?\[(ref)\](?:\[\])?/).replace("ref",zc).getRegex(),e1=st("reflink|nolink(?!\\()","g").replace("reflink",Jg).replace("nolink",eh).getRegex(),Uc={_backpedal:na,anyPunctuation:Y0,autolink:X0,blockSkip:U0,br:Qg,code:F0,del:na,emStrongLDelim:V0,emStrongRDelimAst:W0,emStrongRDelimUnd:Q0,escape:D0,link:J0,nolink:eh,punctuation:M0,reflink:Jg,reflinkSearch:e1,tag:q0,text:z0,url:na},t1={...Uc,link:st(/^!?\[(label)\]\((.*?)\)/).replace("label",Bl).getRegex(),reflink:st(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Bl).getRegex()},cc={...Uc,emStrongRDelimAst:G0,emStrongLDelim:K0,url:st(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},n1={...cc,br:st(Qg).replace("{2,}","*").getRegex(),text:st(cc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Nl={normal:Hc,gfm:$0,pedantic:j0},Qo={normal:Uc,gfm:cc,breaks:n1,pedantic:t1},r1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Wp=o=>r1[o];function br(o,n){if(n){if(Pn.escapeTest.test(o))return o.replace(Pn.escapeReplace,Wp)}else if(Pn.escapeTestNoEncode.test(o))return o.replace(Pn.escapeReplaceNoEncode,Wp);return o}function Gp(o){try{o=encodeURI(o).replace(Pn.percentDecode,"%")}catch{return null}return o}function Qp(o,n){var u;const t=o.replace(Pn.findPipe,(c,d,p)=>{let h=!1,m=d;for(;--m>=0&&p[m]==="\\";)h=!h;return h?"|":" |"}),i=t.split(Pn.splitPipe);let a=0;if(i[0].trim()||i.shift(),i.length>0&&!((u=i.at(-1))!=null&&u.trim())&&i.pop(),n)if(i.length>n)i.splice(n);else for(;i.length<n;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(Pn.slashPipe,"|");return i}function Yo(o,n,t){const i=o.length;if(i===0)return"";let a=0;for(;a<i&&o.charAt(i-a-1)===n;)a++;return o.slice(0,i-a)}function i1(o,n){if(o.indexOf(n[1])===-1)return-1;let t=0;for(let i=0;i<o.length;i++)if(o[i]==="\\")i++;else if(o[i]===n[0])t++;else if(o[i]===n[1]&&(t--,t<0))return i;return-1}function Yp(o,n,t,i,a){const u=n.href,c=n.title||null,d=o[1].replace(a.other.outputLinkReplace,"$1");if(o[0].charAt(0)!=="!"){i.state.inLink=!0;const p={type:"link",raw:t,href:u,title:c,text:d,tokens:i.inlineTokens(d)};return i.state.inLink=!1,p}return{type:"image",raw:t,href:u,title:c,text:d}}function o1(o,n,t){const i=o.match(t.other.indentCodeCompensation);if(i===null)return n;const a=i[1];return n.split(`
741
741
  `).map(u=>{const c=u.match(t.other.beginningSpace);if(c===null)return u;const[d]=c;return d.length>=a.length?u.slice(a.length):u}).join(`
742
742
  `)}class Ul{constructor(n){dt(this,"options");dt(this,"rules");dt(this,"lexer");this.options=n||Ii}space(n){const t=this.rules.block.newline.exec(n);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(n){const t=this.rules.block.code.exec(n);if(t){const i=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Yo(i,`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/site-generator-plugin",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "ParoiCMS Site Generator Plugin",
5
5
  "keywords": [
6
6
  "paroicms",