@unocss/runtime 66.1.4 → 66.2.0
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 +9 -9
- package/core.global.js +1 -1
- package/full.global.js +9 -9
- package/mini.global.js +10 -10
- package/package.json +4 -4
- package/preset-mini.global.js +10 -10
- package/preset-typography.global.js +1 -1
- package/preset-uno.global.js +8 -8
- package/preset-web-fonts.global.js +9 -9
- package/preset-wind.global.js +8 -8
- package/uno.global.js +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{function T(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function A(e){let o=e.length,
|
|
1
|
+
"use strict";(()=>{function T(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function A(e){let o=e.length,r=-1,t,n="",l=e.charCodeAt(0);for(;++r<o;){if(t=e.charCodeAt(r),t===0){n+="\uFFFD";continue}if(t===37){n+="\\%";continue}if(t===44){n+="\\,";continue}if(t>=1&&t<=31||t===127||r===0&&t>=48&&t<=57||r===1&&t>=48&&t<=57&&l===45){n+=`\\${t.toString(16)} `;continue}if(r===0&&o===1&&t===45){n+=`\\${e.charAt(r)}`;continue}if(t>=128||t===45||t===95||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122){n+=e.charAt(r);continue}n+=`\\${e.charAt(r)}`}return n}var d=A;function y(e){return e&&typeof e=="object"&&!Array.isArray(e)}function S(e,o,r=!1){let t=e,n=o;if(Array.isArray(n))return r&&Array.isArray(n)?[...t,...n]:[...n];let l={...t};return y(t)&&y(n)&&Object.keys(n).forEach(s=>{y(t[s])&&y(n[s])||Array.isArray(t[s])&&Array.isArray(n[s])?l[s]=S(t[s],n[s],r):Object.assign(l,{[s]:n[s]})}),l}var R=/^\[(.+?)(~?=)"(.*)"\]$/;function v(e){return R.test(e)?e.replace(R,(o,r,t,n)=>`[${d(r)}${t}"${d(n)}"]`):`.${d(e)}`}var M=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"];var b=["%alpha","<alpha-value>"],te=new RegExp(b.map(e=>T(e)).join("|"),"g");var re=new RegExp(`^(${M.join("|")})\\((.+)\\)$`,"i");function C(e){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":e.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"}}}var P=[["headings","h1","h2","h3","h4","h5","h6","th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["kbd"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"]];function x(e){for(let[o,...r]of P)if(o===e)return r.length>0?r:[o]}function E(e){let o="",{escapedSelector:r,selectorName:t,preflights:n,compatibility:l,important:s}=e,a=l?.noColonNot||l?.noColonWhere;for(let p in n){let u=n[p],f=`:not(:where(.not-${t},.not-${t} *))`,h=p.split(",").map(i=>{let c=i.match(/:[():\-\w]+$/g);if(c){let m=c[0];return i=i.replace(m,""),r.map(g=>a?`${g} ${i}${m}`:`${g} :where(${i})${f}${m}`).join(",")}return null}).filter(i=>i);h.length?o+=h.join(","):o+=r.map(i=>a?p.split(",").map(c=>`${i} ${c}`).join(","):`${i} :where(${p})${f}`).join(","),o+="{";for(let i in u){let c=u[i];o+=`${i}:${c}${s?" !important":""};`}o+="}"}return o}function V(e,o){let{compatibility:r,selectorName:t,important:n=!1}=o,l=typeof o?.cssExtend=="function"?o.cssExtend(e.theme):o?.cssExtend,s=Array.from(o.escapedSelectors);return!s[s.length-1].startsWith(".")&&!r?.noColonIs&&(s=[`:is(${s[s.length-1]},.${o.selectorName})`]),typeof n=="string"&&(s=s.map(a=>r?.noColonIs?`${n} ${a}`:`:is(${n}) ${a}`)),E(l?{escapedSelector:s,selectorName:t,preflights:S(C(e.theme),l),compatibility:r,important:n===!0}:{escapedSelector:s,selectorName:t,preflights:C(e.theme),compatibility:r,important:n===!0})}var U=e=>{e?.className&&console.warn('[unocss:preset-typography] "className" is deprecated. Please use "selectorName" instead.');let o=new Set,r=e?.selectorName||e?.className||"prose",t=new RegExp(`^${r}$`),n=new RegExp(`^${r}-([-\\w]+)$`),l=new RegExp(`^${r}-invert$`),s=e?.compatibility?.noColonNot||e?.compatibility?.noColonWhere;return{name:"@unocss/preset-typography",enforce:"post",layers:{typography:-20},rules:[[t,(a,{rawSelector:p})=>(o.add(v(p)),{color:"var(--un-prose-body)","max-width":"65ch"}),{layer:"typography"}],[n,([,a],{theme:p})=>{let u=p.colors?.[a];if(u==null)return;let f=typeof u=="object"?u:{},h={body:700,headings:900,links:900,lists:400,hr:200,captions:500,code:900,borders:200,"bg-soft":100,"invert-body":200,"invert-headings":100,"invert-links":100,"invert-lists":500,"invert-hr":700,"invert-captions":400,"invert-code":100,"invert-borders":700,"invert-bg-soft":800},i={};for(let c in h){let m=h[c],g=f[m]??u,$=!1;for(let w of b)if(g.includes(w)){$=!0,i[`--un-prose-${c}-opacity`]=1,i[`--un-prose-${c}`]=g.replace(w,`var(--un-prose-${c}-opacity)`);break}$||(i[`--un-prose-${c}`]=g)}return 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"}]],variants:[{name:"typography element modifiers",match:a=>{if(a.startsWith(`${r}-`)){let p=new RegExp(`^${r}-(\\w+)[:-].+$`),u=a.match(p)?.[1];if(u){let f=x(u);if(f?.length)return{matcher:a.slice(r.length+u.length+2),selector:h=>{let i=`:not(:where(.not-${r},.not-${r} *))`;return s?f.map(m=>`${h} ${m}`).join(","):`${h} :is(:where(${f})${i})`}}}}}}],preflights:[{layer:"typography",getCSS:a=>{if(o.size>0)return V(a,{escapedSelectors:o,...e,selectorName:r})}}]}},k=U;window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},{presetTypography:e=>k(e)});})();
|