@unocss/runtime 66.3.2 → 66.4.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.
@@ -1 +1 @@
1
- "use strict";(()=>{var a="__TAGIFY__",m=/<([\w:-]+)/g;function f(t){let{prefix:r="",excludedTags:i=["b",/^h\d+$/,"table"]}=t;return{name:"tagify",extract({code:n}){return Array.from(n.matchAll(m)).filter(({1:e})=>{for(let o of i)if(typeof o=="string"){if(e===o)return!1}else if(o.test(e))return!1;return e.startsWith(r)}).map(([,e])=>`${a}${e}`)}}}function p(t){let{extraProperties:r}=t,i=`${a}${t.prefix??""}`;return{name:"tagify",match(n){if(!n.startsWith(i))return;let e=n.slice(i.length),o={matcher:e,selector:s=>s.slice(a.length+1)};return r&&(typeof r=="function"?o.body=s=>[...s,...Object.entries(r(e)??{})]:o.body=s=>[...s,...Object.entries(r)]),o}}}var y=(t={})=>{let{defaultExtractor:r=!0}=t,i=[p(t)],n=[f(t)];return{name:"@unocss/preset-tagify",variants:i,extractors:n,extractorDefault:r?void 0:!1}},c=y;window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},{presetTagify:t=>c(t)});})();
1
+ "use strict";(()=>{var a="__TAGIFY__",m=/<([\w:-]+)/g;function f(t){let{prefix:e="",excludedTags:i=["b",/^h\d+$/,"table"]}=t;return{name:"tagify",extract({code:n}){return Array.from(n.matchAll(m)).filter(({1:r})=>{for(let o of i)if(typeof o=="string"){if(r===o)return!1}else if(o.lastIndex=0,o.test(r))return!1;return r.startsWith(e)}).map(([,r])=>`${a}${r}`)}}}function p(t){let{extraProperties:e}=t,i=`${a}${t.prefix??""}`;return{name:"tagify",match(n){if(!n.startsWith(i))return;let r=n.slice(i.length),o={matcher:r,selector:s=>s.slice(a.length+1)};return e&&(typeof e=="function"?o.body=s=>[...s,...Object.entries(e(r)??{})]:o.body=s=>[...s,...Object.entries(e)]),o}}}var y=(t={})=>{let{defaultExtractor:e=!0}=t,i=[p(t)],n=[f(t)];return{name:"@unocss/preset-tagify",variants:i,extractors:n,extractorDefault:e?void 0:!1}},c=y;window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},{presetTagify:t=>c(t)});})();
@@ -1 +1 @@
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 v=/^\[(.+?)(~?=)"(.*)"\]$/;function R(e){return v.test(e)?e.replace(v,(o,r,t,n)=>`[${d(r)}${t}"${d(n)}"]`):`.${d(e)}`}var M=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"];var C=["%alpha","<alpha-value>"],te=new RegExp(C.map(e=>T(e)).join("|"),"g");var re=new RegExp(`^(${M.join("|")})\\((.+)\\)$`,"i");function b(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(b(e.theme),l),compatibility:r,important:n===!0}:{escapedSelector:s,selectorName:t,preflights:b(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(R(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 C)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)});})();
1
+ "use strict";(()=>{function T(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function A(t){let o=t.length,n=-1,e,r="",a=t.charCodeAt(0);for(;++n<o;){if(e=t.charCodeAt(n),e===0){r+="\uFFFD";continue}if(e===37){r+="\\%";continue}if(e===44){r+="\\,";continue}if(e>=1&&e<=31||e===127||n===0&&e>=48&&e<=57||n===1&&e>=48&&e<=57&&a===45){r+=`\\${e.toString(16)} `;continue}if(n===0&&o===1&&e===45){r+=`\\${t.charAt(n)}`;continue}if(e>=128||e===45||e===95||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122){r+=t.charAt(n);continue}r+=`\\${t.charAt(n)}`}return r}var d=A;function y(t){return t&&typeof t=="object"&&!Array.isArray(t)}function S(t,o,n=!1){let e=t,r=o;if(Array.isArray(r))return n&&Array.isArray(r)?[...e,...r]:[...r];let a={...e};return y(e)&&y(r)&&Object.keys(r).forEach(s=>{y(e[s])&&y(r[s])||Array.isArray(e[s])&&Array.isArray(r[s])?a[s]=S(e[s],r[s],n):Object.assign(a,{[s]:r[s]})}),a}var v=/^\[(.+?)(~?=)"(.*)"\]$/;function R(t){return v.test(t)?t.replace(v,(o,n,e,r)=>`[${d(n)}${e}"${d(r)}"]`):`.${d(t)}`}var M=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"];var C=["%alpha","<alpha-value>"],te=new RegExp(C.map(t=>T(t)).join("|"),"g");var ne=new RegExp(`^(${M.join("|")})\\((.+)\\)$`,"i");function b(t){let{theme:o,generator:n}=t,r=n.config.presets.some(a=>a.name==="@unocss/preset-wind4")?"font":"fontFamily";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":o[r]?.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(t){for(let[o,...n]of P)if(o===t)return n.length>0?n:[o]}function E(t){let o="",{escapedSelector:n,selectorName:e,preflights:r,compatibility:a,important:s}=t,l=a?.noColonNot||a?.noColonWhere;for(let p in r){let u=r[p],f=`:not(:where(.not-${e},.not-${e} *))`,h=p.split(",").map(i=>{let c=i.match(/:[():\-\w]+$/g);if(c){let m=c[0];return i=i.replace(m,""),n.map(g=>l?`${g} ${i}${m}`:`${g} :where(${i})${f}${m}`).join(",")}return null}).filter(i=>i);h.length?o+=h.join(","):o+=n.map(i=>l?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(t,o){let{compatibility:n,selectorName:e,important:r=!1}=o,a=typeof o?.cssExtend=="function"?o.cssExtend(t.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 r=="string"&&(s=s.map(l=>n?.noColonIs?`${r} ${l}`:`:is(${r}) ${l}`)),E(a?{escapedSelector:s,selectorName:e,preflights:S(b(t),a),compatibility:n,important:r===!0}:{escapedSelector:s,selectorName:e,preflights:b(t),compatibility:n,important:r===!0})}var U=t=>{t?.className&&console.warn('[unocss:preset-typography] "className" is deprecated. Please use "selectorName" instead.');let o=new Set,n=t?.selectorName||t?.className||"prose",e=new RegExp(`^${n}$`),r=new RegExp(`^${n}-([-\\w]+)$`),a=new RegExp(`^${n}-invert$`),s=t?.compatibility?.noColonNot||t?.compatibility?.noColonWhere;return{name:"@unocss/preset-typography",enforce:"post",layers:{typography:-20},rules:[[e,(l,{rawSelector:p})=>(o.add(R(p)),{color:"var(--un-prose-body)","max-width":"65ch"}),{layer:"typography"}],[r,([,l],{theme:p})=>{let u=p.colors?.[l];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 C)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"}],[a,()=>({"--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:l=>{if(l.startsWith(`${n}-`)){let p=new RegExp(`^${n}-(\\w+)[:-].+$`),u=l.match(p)?.[1];if(u){let f=x(u);if(f?.length)return{matcher:l.slice(n.length+u.length+2),selector:h=>{let i=`:not(:where(.not-${n},.not-${n} *))`;return s?f.map(m=>`${h} ${m}`).join(","):`${h} :is(:where(${f})${i})`}}}}}}],preflights:[{layer:"typography",getCSS:l=>{if(o.size>0)return V(l,{escapedSelectors:o,...t,selectorName:n})}}]}},k=U;window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},{presetTypography:t=>k(t)});})();