@unocss/runtime 0.64.1 → 0.65.0-beta.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.
- package/attributify.global.js +7 -7
- package/core.global.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/full.global.js +9 -9
- package/mini.global.js +10 -10
- package/package.json +4 -4
- package/preset-attributify.global.js +1 -1
- package/preset-icons.global.js +3 -3
- package/preset-mini.global.js +6 -6
- package/preset-typography.global.js +1 -1
- package/preset-uno.global.js +10 -10
- package/preset-wind.global.js +10 -10
- package/uno.global.js +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{function $(t){let a=t.length,
|
|
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)});})();
|