@unocss/runtime 0.65.1 → 0.65.2

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.
@@ -1 +1 @@
1
- "use strict";(()=>{function $(t){let a=t.length,s=-1,e,r="",l=t.charCodeAt(0);for(;++s<a;){if(e=t.charCodeAt(s),e===0){r+="\uFFFD";continue}if(e===37){r+="\\%";continue}if(e===44){r+="\\,";continue}if(e>=1&&e<=31||e===127||s===0&&e>=48&&e<=57||s===1&&e>=48&&e<=57&&l===45){r+=`\\${e.toString(16)} `;continue}if(s===0&&a===1&&e===45){r+=`\\${t.charAt(s)}`;continue}if(e>=128||e===45||e===95||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122){r+=t.charAt(s);continue}r+=`\\${t.charAt(s)}`}return r}var h=$;function m(t){return t&&typeof t=="object"&&!Array.isArray(t)}function g(t,a,s=!1){let e=t,r=a;if(Array.isArray(r))return s&&Array.isArray(r)?[...e,...r]:[...r];let l={...e};return m(e)&&m(r)&&Object.keys(r).forEach(i=>{m(e[i])&&m(r[i])||Array.isArray(e[i])&&Array.isArray(r[i])?l[i]=g(e[i],r[i],s):Object.assign(l,{[i]:r[i]})}),l}var b=/^\[(.+?)(~?=)"(.*)"\]$/;function C(t){return b.test(t)?t.replace(b,(a,s,e,r)=>`[${h(s)}${e}"${h(r)}"]`):`.${h(t)}`}function y(t){return{"h1,h2,h3,h4,h5,h6":{color:"var(--un-prose-headings)","font-weight":"600","line-height":1.25},a:{color:"var(--un-prose-links)","text-decoration":"underline","font-weight":"500"},"a code":{color:"var(--un-prose-links)"},"p,ul,ol,pre":{margin:"1em 0","line-height":1.75},blockquote:{margin:"1em 0","padding-left":"1em","font-style":"italic","border-left":".25em solid var(--un-prose-borders)"},h1:{margin:"1rem 0","font-size":"2.25em"},h2:{margin:"1.75em 0 .5em","font-size":"1.75em"},h3:{margin:"1.5em 0 .5em","font-size":"1.375em"},h4:{margin:"1em 0","font-size":"1.125em"},"img,video":{"max-width":"100%"},"figure,picture":{margin:"1em 0"},figcaption:{color:"var(--un-prose-captions)","font-size":".875em"},code:{color:"var(--un-prose-code)","font-size":".875em","font-weight":600,"font-family":t.fontFamily?.mono},":not(pre) > code::before,:not(pre) > code::after":{content:'"`"'},pre:{padding:"1.25rem 1.5rem","overflow-x":"auto","border-radius":".375rem"},"pre,code":{"white-space":"pre","word-spacing":"normal","word-break":"normal","word-wrap":"normal","-moz-tab-size":4,"-o-tab-size":4,"tab-size":4,"-webkit-hyphens":"none","-moz-hyphens":"none",hyphens:"none",background:"transparent"},"pre code":{"font-weight":"inherit"},"ol,ul":{"padding-left":"1.25em"},ol:{"list-style-type":"decimal"},'ol[type="A"]':{"list-style-type":"upper-alpha"},'ol[type="a"]':{"list-style-type":"lower-alpha"},'ol[type="A" s]':{"list-style-type":"upper-alpha"},'ol[type="a" s]':{"list-style-type":"lower-alpha"},'ol[type="I"]':{"list-style-type":"upper-roman"},'ol[type="i"]':{"list-style-type":"lower-roman"},'ol[type="I" s]':{"list-style-type":"upper-roman"},'ol[type="i" s]':{"list-style-type":"lower-roman"},'ol[type="1"]':{"list-style-type":"decimal"},ul:{"list-style-type":"disc"},"ol > li::marker,ul > li::marker,summary::marker":{color:"var(--un-prose-lists)"},hr:{margin:"2em 0",border:"1px solid var(--un-prose-hr)"},table:{display:"block",margin:"1em 0","border-collapse":"collapse","overflow-x":"auto"},"tr:nth-child(2n)":{background:"var(--un-prose-bg-soft)"},"td,th":{border:"1px solid var(--un-prose-borders)",padding:".625em 1em"},abbr:{cursor:"help"},kbd:{color:"var(--un-prose-code)",border:"1px solid",padding:".25rem .5rem","font-size":".875em","border-radius":".25rem"},details:{margin:"1em 0",padding:"1.25rem 1.5rem",background:"var(--un-prose-bg-soft)"},summary:{cursor:"pointer","font-weight":"600"}}}function x(t){let a="",{escapedSelector:s,selectorName:e,preflights:r,compatibility:l}=t,i=l?.noColonNot||l?.noColonWhere;for(let u in r){let f=r[u],n=`:not(:where(.not-${e},.not-${e} *))`,o=u.split(",").map(c=>{let p=c.match(/:[():\-\w]+$/g);if(p){let d=p[0];return c=c.replace(d,""),s.map(S=>i?`${S} ${c}${d}`:`${S} :where(${c})${n}${d}`).join(",")}return null}).filter(c=>c);o.length?a+=o.join(","):a+=s.map(c=>i?u.split(",").map(p=>`${c} ${p}`).join(","):`${c} :where(${u})${n}`).join(","),a+="{";for(let c in f){let p=f[c];a+=`${c}:${p};`}a+="}"}return a}function w(t,a){let{escapedSelectors:s,selectorName:e,cssExtend:r,compatibility:l}=a,i=Array.from(s);return!i[i.length-1].startsWith(".")&&!l?.noColonIs&&(i=[`:is(${i[i.length-1]},.${e})`]),x(r?{escapedSelector:i,selectorName:e,preflights:g(y(t.theme),r),compatibility:l}:{escapedSelector:i,selectorName:e,preflights:y(t.theme),compatibility:l})}var v=t=>{t?.className&&console.warn('[unocss:preset-typography] "className" is deprecated. Use "selectorName" instead.');let a=new Set,s=t?.selectorName||t?.className||"prose",e=new RegExp(`^${s}$`),r=new RegExp(`^${s}-([-\\w]+)$`),l=new RegExp(`^${s}-invert$`),i=t?.compatibility;return{name:"@unocss/preset-typography",enforce:"post",layers:{typography:-20},rules:[[e,(u,{rawSelector:f})=>(a.add(C(f)),{color:"var(--un-prose-body)","max-width":"65ch"}),{layer:"typography"}],[r,([,u],{theme:f})=>{let n=f.colors?.[u];if(n==null)return;let o=typeof n=="object"?n:{};return{"--un-prose-body":o[700]??n,"--un-prose-headings":o[900]??n,"--un-prose-links":o[900]??n,"--un-prose-lists":o[400]??n,"--un-prose-hr":o[200]??n,"--un-prose-captions":o[500]??n,"--un-prose-code":o[900]??n,"--un-prose-borders":o[200]??n,"--un-prose-bg-soft":o[100]??n,"--un-prose-invert-body":o[200]??n,"--un-prose-invert-headings":o[100]??n,"--un-prose-invert-links":o[100]??n,"--un-prose-invert-lists":o[500]??n,"--un-prose-invert-hr":o[700]??n,"--un-prose-invert-captions":o[400]??n,"--un-prose-invert-code":o[100]??n,"--un-prose-invert-borders":o[700]??n,"--un-prose-invert-bg-soft":o[800]??n}},{layer:"typography"}],[l,()=>({"--un-prose-body":"var(--un-prose-invert-body)","--un-prose-headings":"var(--un-prose-invert-headings)","--un-prose-links":"var(--un-prose-invert-links)","--un-prose-lists":"var(--un-prose-invert-lists)","--un-prose-hr":"var(--un-prose-invert-hr)","--un-prose-captions":"var(--un-prose-invert-captions)","--un-prose-code":"var(--un-prose-invert-code)","--un-prose-borders":"var(--un-prose-invert-borders)","--un-prose-bg-soft":"var(--un-prose-invert-bg-soft)"}),{layer:"typography"}]],preflights:[{layer:"typography",getCSS:u=>{if(a.size>0){let f=typeof t?.cssExtend=="function"?t.cssExtend(u.theme):t?.cssExtend;return w(u,{escapedSelectors:a,selectorName:s,cssExtend:f,compatibility:i})}}}]}},T=v;window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},{presetTypography:t=>T(t)});})();
1
+ "use strict";(()=>{function v(r){let o=r.length,n=-1,e,t="",l=r.charCodeAt(0);for(;++n<o;){if(e=r.charCodeAt(n),e===0){t+="\uFFFD";continue}if(e===37){t+="\\%";continue}if(e===44){t+="\\,";continue}if(e>=1&&e<=31||e===127||n===0&&e>=48&&e<=57||n===1&&e>=48&&e<=57&&l===45){t+=`\\${e.toString(16)} `;continue}if(n===0&&o===1&&e===45){t+=`\\${r.charAt(n)}`;continue}if(e>=128||e===45||e===95||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122){t+=r.charAt(n);continue}t+=`\\${r.charAt(n)}`}return t}var p=v;function h(r){return r&&typeof r=="object"&&!Array.isArray(r)}function d(r,o,n=!1){let e=r,t=o;if(Array.isArray(t))return n&&Array.isArray(t)?[...e,...t]:[...t];let l={...e};return h(e)&&h(t)&&Object.keys(t).forEach(s=>{h(e[s])&&h(t[s])||Array.isArray(e[s])&&Array.isArray(t[s])?l[s]=d(e[s],t[s],n):Object.assign(l,{[s]:t[s]})}),l}var C=/^\[(.+?)(~?=)"(.*)"\]$/;function x(r){return C.test(r)?r.replace(C,(o,n,e,t)=>`[${p(n)}${e}"${p(t)}"]`):`.${p(r)}`}function g(r){return{"h1,h2,h3,h4,h5,h6":{color:"var(--un-prose-headings)","font-weight":"600","line-height":1.25},a:{color:"var(--un-prose-links)","text-decoration":"underline","font-weight":"500"},"a code":{color:"var(--un-prose-links)"},"p,ul,ol,pre":{margin:"1em 0","line-height":1.75},blockquote:{margin:"1em 0","padding-left":"1em","font-style":"italic","border-left":".25em solid var(--un-prose-borders)"},h1:{margin:"1rem 0","font-size":"2.25em"},h2:{margin:"1.75em 0 .5em","font-size":"1.75em"},h3:{margin:"1.5em 0 .5em","font-size":"1.375em"},h4:{margin:"1em 0","font-size":"1.125em"},"img,video":{"max-width":"100%"},"figure,picture":{margin:"1em 0"},figcaption:{color:"var(--un-prose-captions)","font-size":".875em"},code:{color:"var(--un-prose-code)","font-size":".875em","font-weight":600,"font-family":r.fontFamily?.mono},":not(pre) > code::before,:not(pre) > code::after":{content:'"`"'},pre:{padding:"1.25rem 1.5rem","overflow-x":"auto","border-radius":".375rem"},"pre,code":{"white-space":"pre","word-spacing":"normal","word-break":"normal","word-wrap":"normal","-moz-tab-size":4,"-o-tab-size":4,"tab-size":4,"-webkit-hyphens":"none","-moz-hyphens":"none",hyphens:"none",background:"transparent"},"pre code":{"font-weight":"inherit"},"ol,ul":{"padding-left":"1.25em"},ol:{"list-style-type":"decimal"},'ol[type="A"]':{"list-style-type":"upper-alpha"},'ol[type="a"]':{"list-style-type":"lower-alpha"},'ol[type="A" s]':{"list-style-type":"upper-alpha"},'ol[type="a" s]':{"list-style-type":"lower-alpha"},'ol[type="I"]':{"list-style-type":"upper-roman"},'ol[type="i"]':{"list-style-type":"lower-roman"},'ol[type="I" s]':{"list-style-type":"upper-roman"},'ol[type="i" s]':{"list-style-type":"lower-roman"},'ol[type="1"]':{"list-style-type":"decimal"},ul:{"list-style-type":"disc"},"ol > li::marker,ul > li::marker,summary::marker":{color:"var(--un-prose-lists)"},hr:{margin:"2em 0",border:"1px solid var(--un-prose-hr)"},table:{display:"block",margin:"1em 0","border-collapse":"collapse","overflow-x":"auto"},"tr:nth-child(2n)":{background:"var(--un-prose-bg-soft)"},"td,th":{border:"1px solid var(--un-prose-borders)",padding:".625em 1em"},abbr:{cursor:"help"},kbd:{color:"var(--un-prose-code)",border:"1px solid",padding:".25rem .5rem","font-size":".875em","border-radius":".25rem"},details:{margin:"1em 0",padding:"1.25rem 1.5rem",background:"var(--un-prose-bg-soft)"},summary:{cursor:"pointer","font-weight":"600"}}}function w(r){let o="",{escapedSelector:n,selectorName:e,preflights:t,compatibility:l,important:s}=r,u=l?.noColonNot||l?.noColonWhere;for(let i in t){let a=t[i],y=`:not(:where(.not-${e},.not-${e} *))`,S=i.split(",").map(c=>{let f=c.match(/:[():\-\w]+$/g);if(f){let m=f[0];return c=c.replace(m,""),n.map(b=>u?`${b} ${c}${m}`:`${b} :where(${c})${y}${m}`).join(",")}return null}).filter(c=>c);S.length?o+=S.join(","):o+=n.map(c=>u?i.split(",").map(f=>`${c} ${f}`).join(","):`${c} :where(${i})${y}`).join(","),o+="{";for(let c in a){let f=a[c];o+=`${c}:${f}${s?" !important":""};`}o+="}"}return o}function T(r,o){let{compatibility:n,selectorName:e,important:t=!1}=o,l=typeof o?.cssExtend=="function"?o.cssExtend(r.theme):o?.cssExtend,s=Array.from(o.escapedSelectors);return!s[s.length-1].startsWith(".")&&!n?.noColonIs&&(s=[`:is(${s[s.length-1]},.${o.selectorName})`]),typeof t=="string"&&(s=s.map(u=>n?.noColonIs?`${t} ${u}`:`:is(${t}) ${u}`)),w(l?{escapedSelector:s,selectorName:e,preflights:d(g(r.theme),l),compatibility:n,important:t===!0}:{escapedSelector:s,selectorName:e,preflights:g(r.theme),compatibility:n,important:t===!0})}var R=r=>{r?.className&&console.warn('[unocss:preset-typography] "className" is deprecated. Please use "selectorName" instead.');let o=new Set,n=r?.selectorName||r?.className||"prose",e=new RegExp(`^${n}$`),t=new RegExp(`^${n}-([-\\w]+)$`),l=new RegExp(`^${n}-invert$`);return{name:"@unocss/preset-typography",enforce:"post",layers:{typography:-20},rules:[[e,(s,{rawSelector:u})=>(o.add(x(u)),{color:"var(--un-prose-body)","max-width":"65ch"}),{layer:"typography"}],[t,([,s],{theme:u})=>{let i=u.colors?.[s];if(i==null)return;let a=typeof i=="object"?i:{};return{"--un-prose-body":a[700]??i,"--un-prose-headings":a[900]??i,"--un-prose-links":a[900]??i,"--un-prose-lists":a[400]??i,"--un-prose-hr":a[200]??i,"--un-prose-captions":a[500]??i,"--un-prose-code":a[900]??i,"--un-prose-borders":a[200]??i,"--un-prose-bg-soft":a[100]??i,"--un-prose-invert-body":a[200]??i,"--un-prose-invert-headings":a[100]??i,"--un-prose-invert-links":a[100]??i,"--un-prose-invert-lists":a[500]??i,"--un-prose-invert-hr":a[700]??i,"--un-prose-invert-captions":a[400]??i,"--un-prose-invert-code":a[100]??i,"--un-prose-invert-borders":a[700]??i,"--un-prose-invert-bg-soft":a[800]??i}},{layer:"typography"}],[l,()=>({"--un-prose-body":"var(--un-prose-invert-body)","--un-prose-headings":"var(--un-prose-invert-headings)","--un-prose-links":"var(--un-prose-invert-links)","--un-prose-lists":"var(--un-prose-invert-lists)","--un-prose-hr":"var(--un-prose-invert-hr)","--un-prose-captions":"var(--un-prose-invert-captions)","--un-prose-code":"var(--un-prose-invert-code)","--un-prose-borders":"var(--un-prose-invert-borders)","--un-prose-bg-soft":"var(--un-prose-invert-bg-soft)"}),{layer:"typography"}]],preflights:[{layer:"typography",getCSS:s=>{if(o.size>0)return T(s,{escapedSelectors:o,...r,selectorName:n})}}]}},$=R;window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},{presetTypography:r=>$(r)});})();