@shell-shock/unified 0.2.20 → 0.2.21
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/dist/html/index.cjs +1 -1
- package/dist/html/index.d.cts +1 -2
- package/dist/html/index.d.cts.map +1 -1
- package/dist/html/index.d.mts +1 -2
- package/dist/html/index.mjs +1 -1
- package/dist/{html-Do2f44ft.mjs → html-Dj8K4rVS.mjs} +2 -2
- package/dist/html-Dj8K4rVS.mjs.map +1 -0
- package/dist/{html-CVnH92tJ.cjs → html-_j-kpL1x.cjs} +3 -3
- package/dist/html-_j-kpL1x.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/markdown/index.cjs +1 -1
- package/dist/markdown/index.d.cts +1 -2
- package/dist/markdown/index.d.cts.map +1 -1
- package/dist/markdown/index.d.mts +1 -2
- package/dist/markdown/index.mjs +1 -1
- package/dist/{markdown-DzvIMrFk.cjs → markdown-C4VphOM_.cjs} +2 -2
- package/dist/markdown-C4VphOM_.cjs.map +1 -0
- package/dist/{markdown-CMEWV1ow.mjs → markdown-D6vaFFBH.mjs} +2 -2
- package/dist/markdown-D6vaFFBH.mjs.map +1 -0
- package/dist/{types-By1HgC_t.d.cts → types-DyNJIT_O.d.cts} +1 -2
- package/dist/types-DyNJIT_O.d.cts.map +1 -0
- package/dist/{types-By1HgC_t.d.mts → types-DyNJIT_O.d.mts} +1 -2
- package/dist/types-DyNJIT_O.d.mts.map +1 -0
- package/package.json +12 -12
- package/dist/html-CVnH92tJ.cjs.map +0 -1
- package/dist/html-Do2f44ft.mjs.map +0 -1
- package/dist/markdown-CMEWV1ow.mjs.map +0 -1
- package/dist/markdown-DzvIMrFk.cjs.map +0 -1
- package/dist/types-By1HgC_t.d.cts.map +0 -1
- package/dist/types-By1HgC_t.d.mts.map +0 -1
package/dist/html/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../html-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../html-_j-kpL1x.cjs");exports.renderHtml=e.t;
|
package/dist/html/index.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/html/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/html/index.ts"],"mappings":";;;;;;;;;iBAiCgB,WAAW,cAAc,UAAS"}
|
package/dist/html/index.d.mts
CHANGED
package/dist/html/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"../html-
|
|
1
|
+
import{t as e}from"../html-Dj8K4rVS.mjs";export{e as renderHtml};
|
|
@@ -10,5 +10,5 @@ import{isSet as e}from"@stryke/type-checks";import{isSetObject as t}from"@stryke
|
|
|
10
10
|
`)),i=n?`${r}\n${n}`.trim():r;return k(e.nodeName,`blockquote(${C(i)})`,1,1)}const L=e=>v(t=>`bold(textColors.heading.${e===1?`primary`:e===2?`secondary`:`tertiary`}(${C(t)}))`,{marginTop:1,marginBottom:1}),Be=L(1),Ve=L(2),He=L(3),Ue=L(4),We=L(5),Ge=L(6);function Ke(e,t){return k(e.nodeName,`divider({ border: "primary" })`,1,1)}function qe(e,t){let n=m(e,`alt`,null),r=m(e,`src`,null),i=n||r?`[Image: ${n||r}]`:`[Image]`;return O(e.nodeName,S(i))}function Je(e,t){let n=(m(e,`type`,`text`)||`text`).toLowerCase(),r=m(e,`value`,``)||``,i=m(e,`placeholder`,``)||``,a=m(e,`checked`,null)!==null;if(n===`hidden`)return null;if(n===`checkbox`)return O(e.nodeName,S(a?`[x]`:`[ ]`));if(n===`radio`)return O(e.nodeName,S(a?`(o)`:`( )`));if([`submit`,`button`,`reset`].includes(n))return O(e.nodeName,`bold(${JSON.stringify(`[ ${r||n} ]`)})`);if(n===`range`){let t=Number.parseFloat(m(e,`max`,`100`)||`100`),n=Number.parseFloat(m(e,`value`,`0`)||`0`),r=A(n,t,10,`=`,`-`);return O(e.nodeName,S(`[${r}] ${Math.round(n)}/${Math.round(t)}`))}return O(e.nodeName,S(`[${r||i}]`))}const Ye=y(e=>`bold(${JSON.stringify(`[ ${String(e??`button`)} ]`)})`),Xe=y(e=>S(e)),Ze=v((e,t)=>{let n=Number.parseInt(m(t,`rows`,`0`)||`0`,10),r=E(t);return r&&(n>1||r.includes(`
|
|
11
11
|
`))?T(r):S(e)});function Qe(e){return(e.childNodes??[]).filter(e=>e.nodeName===`li`)}function R(e,t){let n=Qe(e).map((e,n)=>{let r=D(E(e));return`${t(n)} ${r}`.trimEnd()});return k(e.nodeName,S(n.join(`
|
|
12
12
|
`)),1,1)}function z(e,t){let n=m(e,`type`,`disc`)||`disc`,r=n===`square`?`▪`:n===`circle`?`◦`:`•`;return R(e,()=>r)}function $e(e,t){let n=Number.parseInt(m(e,`start`,`1`)||`1`,10);return R(e,e=>`${n+e}.`)}function B(e,t){let n=D(E(e));return k(e.nodeName,S(n))}const et=y((e,t)=>{let n=ee(t).find(e=>e.startsWith(`message-type-`))?.replace(`message-type-`,``);(!n||!c.includes(n))&&(n=`info`);let r=t.childNodes?.find(e=>e.type===`message-header`||e.type===`message-title`)?.value;return`${n}(${e?`\`${j(e)}\``:`''`}${r?`, \`${j(r)}\``:``})`});function tt(e,t){let n=Number.parseFloat(m(e,`min`,`0`)||`0`),r=Number.parseFloat(m(e,`max`,`1`)||`1`),i=Number.parseFloat(m(e,`value`,String(n))||String(n)),a=Math.max(0,i-n),o=Math.max(1,r-n),s=E(e).trim(),c=Math.round(a/o*100),l=A(a,o,10,`#`,`-`);return O(e.nodeName,S(`${s?`${s} `:``}[${l}] ${c}%`))}function nt(e,t){let n=Number.parseFloat(m(e,`max`,`1`)||`1`),r=Number.parseFloat(m(e,`value`,`0`)||`0`),i=E(e).trim(),a=Math.round(Math.max(0,r)/Math.max(1,n)*100),o=A(r,n,10,`=`,`-`);return O(e.nodeName,S(`${i?`${i} `:``}[${o}] ${a}%`))}const rt=y(e=>S(e)),it=y(e=>`textColors.body.primary(${JSON.stringify(` (${String(e??``)})`)})`),at=b,ot=y(e=>S(e)),st=v(e=>`bold(${C(e)})`);function V(e,t=``){let n=[];for(let r of e.childNodes??[]){if(r.nodeName===`optgroup`){let e=m(r,`label`,``)||D(E(r));n.push(`${t}${e}:`),n.push(...V(r,`${t} `));continue}if(r.nodeName===`option`){let e=m(r,`selected`,null)!==null;n.push(`${t}${e?`*`:`-`} ${D(E(r))}`)}}return n}function ct(e,t){let n=V(e);return k(e.nodeName,S(n.join(`
|
|
13
|
-
`)),1,1)}const lt=y(e=>S(e));function H(e){if(!e?.childNodes)return[];let t=[];for(let n of e.childNodes){if(n.nodeName===`tr`){t.push(n);continue}[`thead`,`tbody`,`tfoot`].includes(n.nodeName??``)&&t.push(...H(n))}return t}function ut(e){return(e.childNodes??[]).filter(e=>[`td`,`th`].includes(e.nodeName??``)).map(e=>D(E(e)))}const dt=v(e=>`italic(${C(e)})`),ft=v(),pt=v(),mt=v(),ht=v(),gt=v(),_t=v(),vt=v(e=>S(e)),U=v(e=>`bold(${C(e)})`);function yt(e,t){let n=H(e).map(ut).filter(e=>e.length>0);return k(e.nodeName,`table(${JSON.stringify(n)})`,1,1)}const W=y(e=>S(e)),G=y(e=>`bold(${C(e)})`),K=y(e=>`italic(${C(e)})`),q=y(e=>`underline(${C(e)})`),J=y(e=>`strikethrough(${C(e)})`),Y=y(e=>w(e))
|
|
14
|
-
//# sourceMappingURL=html-
|
|
13
|
+
`)),1,1)}const lt=y(e=>S(e));function H(e){if(!e?.childNodes)return[];let t=[];for(let n of e.childNodes){if(n.nodeName===`tr`){t.push(n);continue}[`thead`,`tbody`,`tfoot`].includes(n.nodeName??``)&&t.push(...H(n))}return t}function ut(e){return(e.childNodes??[]).filter(e=>[`td`,`th`].includes(e.nodeName??``)).map(e=>D(E(e)))}const dt=v(e=>`italic(${C(e)})`),ft=v(),pt=v(),mt=v(),ht=v(),gt=v(),_t=v(),vt=v(e=>S(e)),U=v(e=>`bold(${C(e)})`);function yt(e,t){let n=H(e).map(ut).filter(e=>e.length>0);return k(e.nodeName,`table(${JSON.stringify(n)})`,1,1)}const W=y(e=>S(e)),G=y(e=>`bold(${C(e)})`),K=y(e=>`italic(${C(e)})`),q=y(e=>`underline(${C(e)})`),J=y(e=>`strikethrough(${C(e)})`),Y=y(e=>w(e)),X={"#document":Ne,"#text":ne,a:re,abbr:x,acronym:ie,address:se,applet:b,area:b,article:me,aside:P,audio:b,b:G,base:b,basefont:b,bdi:W,bdo:W,bgsound:b,big:W,blink:ce,blockquote:Se,body:Fe,bold:G,br:Ce,button:Ye,canvas:b,caption:dt,center:we,cite:K,code:Te,col:gt,colgroup:_t,data:De,datalist:b,dd:Ae,del:J,details:Me,dfn:ae,dialog:xe,div:fe,dl:Oe,dt:ke,em:K,embed:b,fieldset:Le,figcaption:Re,figure:ze,font:W,footer:he,form:F,frame:b,frameset:b,h1:Be,h2:Ve,h3:He,h4:Ue,h5:We,h6:Ge,head:b,header:pe,hgroup:be,hr:Ke,html:Pe,i:K,iframe:b,img:qe,input:Je,ins:q,italic:K,kbd:Y,keygen:b,label:de,legend:Ie,li:B,link:b,main:_e,map:b,mark:y(e=>`underline(bold(${C(e)}))`),marquee:le,math:b,menu:z,menuitem:B,message:et,meta:b,meter:tt,nav:ve,nobr:W,noframes:b,noscript:b,object:b,ol:$e,optgroup:st,option:ot,output:Xe,p:ue,param:b,picture:ye,plaintext:b,portal:b,pre:Ee,progress:nt,q:y(e=>S(`"${String(e??``)}"`)),rp:at,rt:it,ruby:rt,s:J,samp:Y,script:b,section:ge,select:ct,slot:b,small:W,source:b,span:lt,strike:J,strikethrough:J,strong:G,style:b,sub:W,summary:je,sup:W,svg:b,table:yt,tbody:mt,td:vt,template:b,textarea:Ze,tfoot:ht,th:U,thead:pt,time:W,title:b,tr:ft,track:b,tt:Y,u:q,ul:z,underline:q,var:Y,video:b,wbr:b,xmp:b},Z=process.env.CACHE_RENDER!==`false`,Q=new WeakMap,bt=(e,t)=>{if(!Z||!e||typeof e!=`object`)return;let n=Q.get(e);if(n)return n.get(JSON.stringify({lineWidth:t.lineWidth,pre:t.pre,listDepth:t.listDepth,listType:t.listType,depth:t.depth}))},xt=(e,t,n)=>{if(!Z||!e||typeof e!=`object`)return;let r=Q.get(e);if(r||(r=new Map,Q.set(e,r)),r.set(JSON.stringify({lineWidth:t.lineWidth,pre:t.pre,listDepth:t.listDepth,listType:t.listType,depth:t.depth}),n),r.size>10){let e=r.keys().next().value;r.delete(e)}},$=(e,t,n=X.div)=>{if(!e)return null;let r=t.depth??0;if(r>=100)return null;let i={...t,depth:r+1},a=bt(e,i);if(a!==void 0)return a;let o=null;try{o=(X[e.nodeName||`#text`]||n)(e,i),xt(e,i,o)}catch(t){console.error(`Error rendering ${e.nodeName||`text`} tag: `,t),o=null}return o};function St(i,a={}){let o=$(r(i,{sourceCodeLocationInfo:!0}),l(a));return t(o)?n(o.value)?o.value:e(o.value)?String(o.value):JSON.stringify(o):n(o)?o:e(o)?String(o):``}export{St as t};
|
|
14
|
+
//# sourceMappingURL=html-Dj8K4rVS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-Dj8K4rVS.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("@stryke/type-checks"),l=require("@stryke/type-checks/is-set-object"),u=require("@stryke/type-checks/is-set-string"),d=require("parse5"),f=require("he");f=s(f,1);let p=require("normalize-html-whitespace");p=s(p,1);let m=require("wrap-ansi");m=s(m,1);let ee=require("@stryke/type-checks/is-string"),te=require("@shell-shock/plugin-theme/helpers/constants");const ne=e=>({pre:!1,lineWidth:120,fontAttrs:!0,depth:0,asciiMode:!1,...e}),h=e=>{if(e==null)return 0;let t=Number(e);return Number.isFinite(t)?t:0},g=(e,t)=>{if(!e&&!t)return null;if(!e)return t;if(!t)return e;let n=h(e.marginTop),r=h(e.marginBottom),i=h(t.marginTop),a=h(t.marginBottom);if(!t.value)return{marginTop:n,value:e.value,marginBottom:Math.max(r,i,a)};if(!e.value)return{marginTop:Math.max(n,r,i),value:t.value,marginBottom:a};let o=Math.max(r,i);return{marginTop:n,value:`${e.value}${`
|
|
2
2
|
`.repeat(o)}${t.value}`,marginBottom:a}},_=(e,t)=>e==null&&t==null?null:e==null?t:t==null?e:t.value==null?{pre:e.pre,value:e.value,post:e.post??t.pre??t.post??``,type:`inline`,nodeName:e.nodeName}:e.value==null?{pre:e.pre??e.post??t.pre??``,value:t.value,post:t.post,type:`inline`,nodeName:t.nodeName}:e.post==null?t.pre==null?{pre:e.pre,value:`${e.value}${t.value}`,post:t.post,type:`inline`,nodeName:t.nodeName}:{pre:e.pre,value:`${e.value}${t.pre}${t.value}`,post:t.post,type:`inline`,nodeName:t.nodeName}:{pre:e.pre,value:`${e.value}${e.post}${t.value}`,post:t.post,type:`inline`,nodeName:t.nodeName},v=new WeakMap,y=(e,t,n=null)=>{if(!e||typeof e!=`object`||!t||typeof t!=`string`)return n;let r=v.get(e);if(r){let e=r.get(t);if(e!==void 0)return e??n}if(!e.attrs||!Array.isArray(e.attrs)||e.attrs.length===0)return r||(r=new Map,v.set(e,r)),r.set(t,null),n;let i=e.attrs.find(e=>e&&typeof e==`object`&&e.name===t);if(r||(r=new Map,v.set(e,r)),!i||i.value===void 0)return r.set(t,null),n;let a=i.value;return r.set(t,a),a};function re(e){let t=y(e,`class`,null);return t?t.split(/\s+/).map(e=>e.trim()).filter(e=>e.length>0):[]}const b=(e,t)=>(0,m.default)(e,t.lineWidth??80,{trim:!t.pre}),ie=f.default.decode,ae=p.default,x=e=>e?{...e,marginTop:0,marginBottom:0,type:`block`,nodeName:`#blockTag`}:null,oe=(e,t)=>{let n=String(e.value??``);if(t.pre)return{pre:null,value:ie(n),post:null,type:`inline`,nodeName:`#text`};let r=[...(ae(n)||``).replaceAll(`
|
|
3
3
|
`,` `)],i=[` `,`
|
|
4
4
|
`].includes(r[0]??``)?r.shift()??null:null,a=[` `,`
|
|
@@ -10,5 +10,5 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
|
10
10
|
`)),i=n?`${r}\n${n}`.trim():r;return M(e.nodeName,`blockquote(${D(i)})`,1,1)}const R=e=>S(t=>`bold(textColors.heading.${e===1?`primary`:e===2?`secondary`:`tertiary`}(${D(t)}))`,{marginTop:1,marginBottom:1}),qe=R(1),Je=R(2),Ye=R(3),Xe=R(4),Ze=R(5),Qe=R(6);function $e(e,t){return M(e.nodeName,`divider({ border: "primary" })`,1,1)}function et(e,t){let n=y(e,`alt`,null),r=y(e,`src`,null),i=n||r?`[Image: ${n||r}]`:`[Image]`;return j(e.nodeName,E(i))}function tt(e,t){let n=(y(e,`type`,`text`)||`text`).toLowerCase(),r=y(e,`value`,``)||``,i=y(e,`placeholder`,``)||``,a=y(e,`checked`,null)!==null;if(n===`hidden`)return null;if(n===`checkbox`)return j(e.nodeName,E(a?`[x]`:`[ ]`));if(n===`radio`)return j(e.nodeName,E(a?`(o)`:`( )`));if([`submit`,`button`,`reset`].includes(n))return j(e.nodeName,`bold(${JSON.stringify(`[ ${r||n} ]`)})`);if(n===`range`){let t=Number.parseFloat(y(e,`max`,`100`)||`100`),n=Number.parseFloat(y(e,`value`,`0`)||`0`),r=N(n,t,10,`=`,`-`);return j(e.nodeName,E(`[${r}] ${Math.round(n)}/${Math.round(t)}`))}return j(e.nodeName,E(`[${r||i}]`))}const nt=C(e=>`bold(${JSON.stringify(`[ ${String(e??`button`)} ]`)})`),rt=C(e=>E(e)),it=S((e,t)=>{let n=Number.parseInt(y(t,`rows`,`0`)||`0`,10),r=k(t);return r&&(n>1||r.includes(`
|
|
11
11
|
`))?ue(r):E(e)});function at(e){return(e.childNodes??[]).filter(e=>e.nodeName===`li`)}function z(e,t){let n=at(e).map((e,n)=>{let r=A(k(e));return`${t(n)} ${r}`.trimEnd()});return M(e.nodeName,E(n.join(`
|
|
12
12
|
`)),1,1)}function B(e,t){let n=y(e,`type`,`disc`)||`disc`,r=n===`square`?`▪`:n===`circle`?`◦`:`•`;return z(e,()=>r)}function ot(e,t){let n=Number.parseInt(y(e,`start`,`1`)||`1`,10);return z(e,e=>`${n+e}.`)}function V(e,t){let n=A(k(e));return M(e.nodeName,E(n))}const st=C((e,t)=>{let n=re(t).find(e=>e.startsWith(`message-type-`))?.replace(`message-type-`,``);(!n||!te.THEME_MESSAGE_VARIANTS.includes(n))&&(n=`info`);let r=t.childNodes?.find(e=>e.type===`message-header`||e.type===`message-title`)?.value;return`${n}(${e?`\`${P(e)}\``:`''`}${r?`, \`${P(r)}\``:``})`});function ct(e,t){let n=Number.parseFloat(y(e,`min`,`0`)||`0`),r=Number.parseFloat(y(e,`max`,`1`)||`1`),i=Number.parseFloat(y(e,`value`,String(n))||String(n)),a=Math.max(0,i-n),o=Math.max(1,r-n),s=k(e).trim(),c=Math.round(a/o*100),l=N(a,o,10,`#`,`-`);return j(e.nodeName,E(`${s?`${s} `:``}[${l}] ${c}%`))}function lt(e,t){let n=Number.parseFloat(y(e,`max`,`1`)||`1`),r=Number.parseFloat(y(e,`value`,`0`)||`0`),i=k(e).trim(),a=Math.round(Math.max(0,r)/Math.max(1,n)*100),o=N(r,n,10,`=`,`-`);return j(e.nodeName,E(`${i?`${i} `:``}[${o}] ${a}%`))}const ut=C(e=>E(e)),dt=C(e=>`textColors.body.primary(${JSON.stringify(` (${String(e??``)})`)})`),ft=w,pt=C(e=>E(e)),mt=S(e=>`bold(${D(e)})`);function H(e,t=``){let n=[];for(let r of e.childNodes??[]){if(r.nodeName===`optgroup`){let e=y(r,`label`,``)||A(k(r));n.push(`${t}${e}:`),n.push(...H(r,`${t} `));continue}if(r.nodeName===`option`){let e=y(r,`selected`,null)!==null;n.push(`${t}${e?`*`:`-`} ${A(k(r))}`)}}return n}function ht(e,t){let n=H(e);return M(e.nodeName,E(n.join(`
|
|
13
|
-
`)),1,1)}const gt=C(e=>E(e));function U(e){if(!e?.childNodes)return[];let t=[];for(let n of e.childNodes){if(n.nodeName===`tr`){t.push(n);continue}[`thead`,`tbody`,`tfoot`].includes(n.nodeName??``)&&t.push(...U(n))}return t}function _t(e){return(e.childNodes??[]).filter(e=>[`td`,`th`].includes(e.nodeName??``)).map(e=>A(k(e)))}const vt=S(e=>`italic(${D(e)})`),yt=S(),bt=S(),xt=S(),St=S(),Ct=S(),wt=S(),Tt=S(e=>E(e)),Et=S(e=>`bold(${D(e)})`);function Dt(e,t){let n=U(e).map(_t).filter(e=>e.length>0);return M(e.nodeName,`table(${JSON.stringify(n)})`,1,1)}const W=C(e=>E(e)),G=C(e=>`bold(${D(e)})`),K=C(e=>`italic(${D(e)})`),q=C(e=>`underline(${D(e)})`),J=C(e=>`strikethrough(${D(e)})`),Y=C(e=>O(e))
|
|
14
|
-
//# sourceMappingURL=html-
|
|
13
|
+
`)),1,1)}const gt=C(e=>E(e));function U(e){if(!e?.childNodes)return[];let t=[];for(let n of e.childNodes){if(n.nodeName===`tr`){t.push(n);continue}[`thead`,`tbody`,`tfoot`].includes(n.nodeName??``)&&t.push(...U(n))}return t}function _t(e){return(e.childNodes??[]).filter(e=>[`td`,`th`].includes(e.nodeName??``)).map(e=>A(k(e)))}const vt=S(e=>`italic(${D(e)})`),yt=S(),bt=S(),xt=S(),St=S(),Ct=S(),wt=S(),Tt=S(e=>E(e)),Et=S(e=>`bold(${D(e)})`);function Dt(e,t){let n=U(e).map(_t).filter(e=>e.length>0);return M(e.nodeName,`table(${JSON.stringify(n)})`,1,1)}const W=C(e=>E(e)),G=C(e=>`bold(${D(e)})`),K=C(e=>`italic(${D(e)})`),q=C(e=>`underline(${D(e)})`),J=C(e=>`strikethrough(${D(e)})`),Y=C(e=>O(e)),X={"#document":Be,"#text":oe,a:se,abbr:T,acronym:ce,address:fe,applet:w,area:w,article:ye,aside:we,audio:w,b:G,base:w,basefont:w,bdi:W,bdo:W,bgsound:w,big:W,blink:pe,blockquote:ke,body:He,bold:G,br:Ae,button:nt,canvas:w,caption:vt,center:je,cite:K,code:Me,col:Ct,colgroup:wt,data:Pe,datalist:w,dd:Le,del:J,details:ze,dfn:le,dialog:Oe,div:_e,dl:Fe,dt:Ie,em:K,embed:w,fieldset:We,figcaption:Ge,figure:Ke,font:W,footer:be,form:Te,frame:w,frameset:w,h1:qe,h2:Je,h3:Ye,h4:Xe,h5:Ze,h6:Qe,head:w,header:ve,hgroup:De,hr:$e,html:Ve,i:K,iframe:w,img:et,input:tt,ins:q,italic:K,kbd:Y,keygen:w,label:ge,legend:Ue,li:V,link:w,main:Se,map:w,mark:C(e=>`underline(bold(${D(e)}))`),marquee:me,math:w,menu:B,menuitem:V,message:st,meta:w,meter:ct,nav:Ce,nobr:W,noframes:w,noscript:w,object:w,ol:ot,optgroup:mt,option:pt,output:rt,p:he,param:w,picture:Ee,plaintext:w,portal:w,pre:Ne,progress:lt,q:C(e=>E(`"${String(e??``)}"`)),rp:ft,rt:dt,ruby:ut,s:J,samp:Y,script:w,section:xe,select:ht,slot:w,small:W,source:w,span:gt,strike:J,strikethrough:J,strong:G,style:w,sub:W,summary:Re,sup:W,svg:w,table:Dt,tbody:xt,td:Tt,template:w,textarea:it,tfoot:St,th:Et,thead:bt,time:W,title:w,tr:yt,track:w,tt:Y,u:q,ul:B,underline:q,var:Y,video:w,wbr:w,xmp:w},Z=process.env.CACHE_RENDER!==`false`,Q=new WeakMap,Ot=(e,t)=>{if(!Z||!e||typeof e!=`object`)return;let n=Q.get(e);if(n)return n.get(JSON.stringify({lineWidth:t.lineWidth,pre:t.pre,listDepth:t.listDepth,listType:t.listType,depth:t.depth}))},kt=(e,t,n)=>{if(!Z||!e||typeof e!=`object`)return;let r=Q.get(e);if(r||(r=new Map,Q.set(e,r)),r.set(JSON.stringify({lineWidth:t.lineWidth,pre:t.pre,listDepth:t.listDepth,listType:t.listType,depth:t.depth}),n),r.size>10){let e=r.keys().next().value;r.delete(e)}},$=(e,t,n=X.div)=>{if(!e)return null;let r=t.depth??0;if(r>=100)return null;let i={...t,depth:r+1},a=Ot(e,i);if(a!==void 0)return a;let o=null;try{o=(X[e.nodeName||`#text`]||n)(e,i),kt(e,i,o)}catch(t){console.error(`Error rendering ${e.nodeName||`text`} tag: `,t),o=null}return o};function At(e,t={}){let n=$((0,d.parse)(e,{sourceCodeLocationInfo:!0}),ne(t));return(0,l.isSetObject)(n)?(0,u.isSetString)(n.value)?n.value:(0,c.isSet)(n.value)?String(n.value):JSON.stringify(n):(0,u.isSetString)(n)?n:(0,c.isSet)(n)?String(n):``}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return At}});
|
|
14
|
+
//# sourceMappingURL=html-_j-kpL1x.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-_j-kpL1x.cjs","names":[],"sources":[],"mappings":""}
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./html-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./html-_j-kpL1x.cjs"),t=require("./markdown-C4VphOM_.cjs");exports.renderHtml=e.t,exports.renderMarkdown=t.t;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ResolvedOptions, n as MarkdownToken, r as Options, t as MarkdownToHtmlOptions } from "./types-
|
|
1
|
+
import { i as ResolvedOptions, n as MarkdownToken, r as Options, t as MarkdownToHtmlOptions } from "./types-DyNJIT_O.cjs";
|
|
2
2
|
import { renderHtml } from "./html/index.cjs";
|
|
3
3
|
import { renderMarkdown } from "./markdown/index.cjs";
|
|
4
4
|
export { type MarkdownToHtmlOptions, type MarkdownToken, type Options, type ResolvedOptions, renderHtml, renderMarkdown };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ResolvedOptions, n as MarkdownToken, r as Options, t as MarkdownToHtmlOptions } from "./types-
|
|
1
|
+
import { i as ResolvedOptions, n as MarkdownToken, r as Options, t as MarkdownToHtmlOptions } from "./types-DyNJIT_O.mjs";
|
|
2
2
|
import { renderHtml } from "./html/index.mjs";
|
|
3
3
|
import { renderMarkdown } from "./markdown/index.mjs";
|
|
4
4
|
export { type MarkdownToHtmlOptions, type MarkdownToken, type Options, type ResolvedOptions, renderHtml, renderMarkdown };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./html-
|
|
1
|
+
import{t as e}from"./html-Dj8K4rVS.mjs";import{t}from"./markdown-D6vaFFBH.mjs";export{e as renderHtml,t as renderMarkdown};
|
package/dist/markdown/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../markdown-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../markdown-C4VphOM_.cjs");exports.renderMarkdown=e.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/markdown/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/markdown/index.ts"],"mappings":";;;;;;;;;iBA6BgB,eACd,kBACA,UAAS"}
|
package/dist/markdown/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"../markdown-
|
|
1
|
+
import{t as e}from"../markdown-D6vaFFBH.mjs";export{e as renderMarkdown};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./html-
|
|
2
|
-
//# sourceMappingURL=markdown-
|
|
1
|
+
const e=require("./html-_j-kpL1x.cjs");let t=require("@shell-shock/plugin-theme/helpers/constants"),n=require("@mdit/plugin-alert"),r=require("@stryke/string-format"),i=require("markdown-it");i=e.n(i,1);let a=require("markdown-it-abbr");a=e.n(a,1);let o=require("markdown-it-container");o=e.n(o,1);let s=require("markdown-it-deflist");s=e.n(s,1);let c=require("markdown-it-footnote");c=e.n(c,1);let l=require("markdown-it-ins");l=e.n(l,1);let u=require("markdown-it-mark");u=e.n(u,1);let d=require("markdown-it-sub");d=e.n(d,1);let f=require("markdown-it-sup");f=e.n(f,1);let p=require("markdown-it-task-lists");p=e.n(p,1);function m(){let e=(0,i.default)({html:!0,langPrefix:`language-`,linkify:!0}).use(c.default).use(l.default).use(u.default).use(s.default).use(a.default).use(o.default).use(f.default).use(d.default).use(p.default).use(n.alert,{deep:!1,openRender(e,n){let r=e[n],i=`info`;return t.THEME_MESSAGE_VARIANTS.includes(r?.markup)&&(i=r?.markup),`<message class="message-type-${i}">`},closeRender(){return`</message>`},titleRender(e,t){let n=e[t];return`<message-header>${(0,r.titleCase)(n?.content||``)}</message-header>`}});return e.renderer.rules.footnote_anchor=()=>``,e}function h(e,t){return t.parse(e,{})}function g(e,t){return e.map(e=>t.renderer.render([e],t.options,{})).join(``)}function _(e,t={}){let n=m(),r=h(e,n);return t.filter&&(r=t.filter(r)),g(r,n)}function v(t,n={}){return e.t(_(t,n),n)}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return v}});
|
|
2
|
+
//# sourceMappingURL=markdown-C4VphOM_.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-C4VphOM_.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./html-
|
|
2
|
-
//# sourceMappingURL=markdown-
|
|
1
|
+
import{t as e}from"./html-Dj8K4rVS.mjs";import{THEME_MESSAGE_VARIANTS as t}from"@shell-shock/plugin-theme/helpers/constants";import{alert as n}from"@mdit/plugin-alert";import{titleCase as r}from"@stryke/string-format";import i from"markdown-it";import a from"markdown-it-abbr";import o from"markdown-it-container";import s from"markdown-it-deflist";import c from"markdown-it-footnote";import l from"markdown-it-ins";import u from"markdown-it-mark";import d from"markdown-it-sub";import f from"markdown-it-sup";import p from"markdown-it-task-lists";function m(){let e=i({html:!0,langPrefix:`language-`,linkify:!0}).use(c).use(l).use(u).use(s).use(a).use(o).use(f).use(d).use(p).use(n,{deep:!1,openRender(e,n){let r=e[n],i=`info`;return t.includes(r?.markup)&&(i=r?.markup),`<message class="message-type-${i}">`},closeRender(){return`</message>`},titleRender(e,t){let n=e[t];return`<message-header>${r(n?.content||``)}</message-header>`}});return e.renderer.rules.footnote_anchor=()=>``,e}function h(e,t){return t.parse(e,{})}function g(e,t){return e.map(e=>t.renderer.render([e],t.options,{})).join(``)}function _(e,t={}){let n=m(),r=h(e,n);return t.filter&&(r=t.filter(r)),g(r,n)}function v(t,n={}){return e(_(t,n),n)}export{v as t};
|
|
2
|
+
//# sourceMappingURL=markdown-D6vaFFBH.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-D6vaFFBH.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PartialKeys } from "@stryke/types/base";
|
|
2
2
|
import { Token } from "markdown-it/dist/markdown-it.min.js";
|
|
3
|
-
|
|
4
3
|
//#region src/types.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* A type representing a markdown token, which is a fundamental unit of parsed markdown content. This type is based on the Token type from the markdown-it library, and includes properties such as type, tag, content, and children that describe the structure and content of the markdown element represented by the token. Markdown tokens are used during the parsing and rendering process to convert markdown text into HTML or other formats.
|
|
@@ -47,4 +46,4 @@ interface Options extends MarkdownToHtmlOptions {
|
|
|
47
46
|
type ResolvedOptions = PartialKeys<Required<Options>, "filter" | "postProcess">;
|
|
48
47
|
//#endregion
|
|
49
48
|
export { ResolvedOptions as i, MarkdownToken as n, Options as r, MarkdownToHtmlOptions as t };
|
|
50
|
-
//# sourceMappingURL=types-
|
|
49
|
+
//# sourceMappingURL=types-DyNJIT_O.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-DyNJIT_O.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;KAwBY,gBAAgB;UAEX;;;;;;;EAOf,UAAU,QAAQ,oBAAoB;;;;;UAMvB,gBAAgB;;;;EAI/B;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA,eAAe;;KAGL,kBAAkB,YAC5B,SAAS"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PartialKeys } from "@stryke/types/base";
|
|
2
2
|
import { Token } from "markdown-it/dist/markdown-it.min.js";
|
|
3
|
-
|
|
4
3
|
//#region src/types.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* A type representing a markdown token, which is a fundamental unit of parsed markdown content. This type is based on the Token type from the markdown-it library, and includes properties such as type, tag, content, and children that describe the structure and content of the markdown element represented by the token. Markdown tokens are used during the parsing and rendering process to convert markdown text into HTML or other formats.
|
|
@@ -47,4 +46,4 @@ interface Options extends MarkdownToHtmlOptions {
|
|
|
47
46
|
type ResolvedOptions = PartialKeys<Required<Options>, "filter" | "postProcess">;
|
|
48
47
|
//#endregion
|
|
49
48
|
export { ResolvedOptions as i, MarkdownToken as n, Options as r, MarkdownToHtmlOptions as t };
|
|
50
|
-
//# sourceMappingURL=types-
|
|
49
|
+
//# sourceMappingURL=types-DyNJIT_O.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-DyNJIT_O.d.mts","names":[],"sources":["../src/types.ts"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/unified",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.21",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Shell Shock plugin to generate unified built-in modules that display information about the application.",
|
|
6
6
|
"keywords": ["unified", "shell-shock", "powerlines", "storm-software"],
|
|
@@ -58,16 +58,16 @@
|
|
|
58
58
|
"files": ["dist/**/*"],
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@mdit/plugin-alert": "^0.23.2",
|
|
61
|
-
"@shell-shock/core": "0.17.
|
|
62
|
-
"@shell-shock/plugin-theme": "0.4.
|
|
63
|
-
"@stryke/path": "^0.29.
|
|
64
|
-
"@stryke/string-format": "^0.17.
|
|
65
|
-
"@stryke/type-checks": "^0.6.
|
|
66
|
-
"@stryke/types": "^0.12.
|
|
61
|
+
"@shell-shock/core": "0.17.23",
|
|
62
|
+
"@shell-shock/plugin-theme": "0.4.36",
|
|
63
|
+
"@stryke/path": "^0.29.35",
|
|
64
|
+
"@stryke/string-format": "^0.17.50",
|
|
65
|
+
"@stryke/type-checks": "^0.6.41",
|
|
66
|
+
"@stryke/types": "^0.12.36",
|
|
67
67
|
"chalk-string": "^4.0.0",
|
|
68
68
|
"defu": "^6.1.7",
|
|
69
69
|
"he": "^1.2.0",
|
|
70
|
-
"markdown-it": "^14.
|
|
70
|
+
"markdown-it": "^14.3.0",
|
|
71
71
|
"markdown-it-abbr": "^2.0.0",
|
|
72
72
|
"markdown-it-container": "^4.0.0",
|
|
73
73
|
"markdown-it-deflist": "^3.0.1",
|
|
@@ -79,14 +79,14 @@
|
|
|
79
79
|
"markdown-it-task-lists": "^2.1.1",
|
|
80
80
|
"normalize-html-whitespace": "^1.0.0",
|
|
81
81
|
"parse5": "^8.0.1",
|
|
82
|
-
"powerlines": "^0.47.
|
|
82
|
+
"powerlines": "^0.47.210",
|
|
83
83
|
"terminal-size": "^4.0.1",
|
|
84
84
|
"wrap-ansi": "^10.0.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@powerlines/plugin-tsdown": "^0.1.
|
|
88
|
-
"@types/node": "^25.9.
|
|
87
|
+
"@powerlines/plugin-tsdown": "^0.1.611",
|
|
88
|
+
"@types/node": "^25.9.5"
|
|
89
89
|
},
|
|
90
90
|
"publishConfig": { "access": "public" },
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "3227e8ed7b3e816987d4d4f270dfdfceb963c022"
|
|
92
92
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"html-CVnH92tJ.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"html-Do2f44ft.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-CMEWV1ow.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-DzvIMrFk.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-By1HgC_t.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;AAwBA;KAAY,aAAA,GAAgB,KAAK;AAAA,UAEhB,qBAAA;EAFgB;AAAA;AAEjC;;;;EAOE,MAAA,IAAU,MAAA,EAAQ,aAAA,OAAoB,aAAa;AAAA;;;;UAMpC,OAAA,SAAgB,qBAAqB;EAArC;;;EAIf,GAAA;EAJ+B;;;EAS/B,SAAA;EAUA;;;EALA,SAAA;EAe6B;AAAA;AAG/B;EAbE,KAAA;;;;EAKA,SAAA;EAQuC;;;EAHvC,WAAA,IAAe,MAAA;AAAA;AAAA,KAGL,eAAA,GAAkB,WAAA,CAC5B,QAAA,CAAS,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-By1HgC_t.d.mts","names":[],"sources":["../src/types.ts"],"mappings":""}
|