@unocss/runtime 0.65.0 → 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.
- package/attributify.global.js +10 -10
- package/core.global.js +2 -2
- package/full.global.js +10 -10
- package/mini.global.js +10 -10
- package/package.json +6 -5
- package/preset-icons.global.js +4 -4
- package/preset-mini.global.js +7 -7
- package/preset-typography.global.js +1 -1
- package/preset-uno.global.js +8 -8
- package/preset-wind.global.js +8 -8
- package/uno.global.js +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{function
|
|
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)});})();
|