@unocss/runtime 0.14.0 → 0.15.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 +4 -4
- package/core.global.js +2 -2
- package/mini.global.js +3 -0
- package/package.json +6 -6
- package/uno.global.js +4 -4
package/mini.global.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(()=>{var Jt=Object.defineProperty,te=Object.defineProperties;var ee=Object.getOwnPropertyDescriptors;var lt=Object.getOwnPropertySymbols;var re=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var ft=(t,e,r)=>e in t?Jt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$=(t,e)=>{for(var r in e||(e={}))re.call(e,r)&&ft(t,r,e[r]);if(lt)for(var r of lt(e))ne.call(e,r)&&ft(t,r,e[r]);return t},S=(t,e)=>te(t,ee(e));var Z={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},light:{50:"#fdfdfd",100:"#fcfcfc",200:"#fafafa",300:"#f8f9fa",400:"#f6f6f6",500:"#f2f2f2",600:"#f1f3f5",700:"#e9ecef",800:"#dee2e6",900:"#dde1e3"},dark:{50:"#4a4a4a",100:"#3c3c3c",200:"#323232",300:"#2d2d2d",400:"#222222",500:"#1f1f1f",600:"#1c1c1e",700:"#1b1b1b",800:"#181818",900:"#0f0f0f"},get lightblue(){return this.sky},get lightBlue(){return this.sky},get warmgray(){return this.stone},get warmGray(){return this.stone},get truegray(){return this.neutral},get trueGray(){return this.neutral},get coolgray(){return this.gray},get coolGray(){return this.gray},get bluegray(){return this.slate},get blueGray(){return this.slate}};Object.values(Z).forEach(t=>{typeof t!="string"&&(t.DEFAULT=t.DEFAULT||t[400],Object.keys(t).forEach(e=>{let r=+e/100;r===Math.round(r)&&(t[r]=t[e])}))});var oe={sans:["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'].join(","),serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"].join(","),mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"].join(",")},ie={xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},se={DEFAULT:"1.5rem",xs:"0.5rem",sm:"1rem",md:"1.5rem",lg:"2rem",xl:"2.5rem","2xl":"3rem","3xl":"4rem"},ae={DEFAULT:"1.5rem",none:"0",sm:"thin",md:"medium",lg:"thick"},ce={DEFAULT:"0px 0px 1px rgb(0 0 0/20%), 0px 0px 1px rgb(1 0 5/10%)",sm:"1px 1px 3px rgb(36 37 47 / 25%)",md:"0px 1px 2px rgb(30 29 39 / 19%), 1px 2px 4px rgb(54 64 147 / 18%)",lg:"3px 3px 6px rgb(0 0 0 / 26%), 0 0 5px rgb(15 3 86 / 22%)",xl:"1px 1px 3px rgb(0 0 0 / 29%), 2px 4px 7px rgb(73 64 125 / 35%)",none:"none"},le={none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},ut={tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},fe=ut,ue={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},de={DEFAULT:"0.25rem",none:"0px",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},pe={DEFAULT:"0 1px 3px 0 rgba(var(--un-shadow-color), 0.1), 0 1px 2px 0 rgba(var(--un-shadow-color), 0.06)",sm:"0 1px 2px 0 rgba(var(--un-shadow-color), 0.05)",md:"0 4px 6px -1px rgba(var(--un-shadow-color), 0.1), 0 2px 4px -1px rgba(var(--un-shadow-color), 0.06)",lg:"0 10px 15px -3px rgba(var(--un-shadow-color), 0.1), 0 4px 6px -2px rgba(var(--un-shadow-color), 0.05)",xl:"0 20px 25px -5px rgba(var(--un-shadow-color), 0.1), 0 10px 10px -5px rgba(var(--un-shadow-color), 0.04)","2xl":"25px 50px -12px rgba(var(--un-shadow-color), 0.25)",inner:"inset 0 2px 4px 0 rgba(var(--un-shadow-color), 0.06)",none:"none"},me={DEFAULT:"8px","0":"0",sm:"4px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},ge={DEFAULT:["0 1px 2px rgba(0, 0, 0, 0.1)","0 1px 1px rgba(0, 0, 0, 0.06)"],sm:"0 1px 1px rgba(0,0,0,0.05)",md:["0 4px 3px rgba(0, 0, 0, 0.07)","0 2px 2px rgba(0, 0, 0, 0.06)"],lg:["0 10px 8px rgba(0, 0, 0, 0.04)","0 4px 3px rgba(0, 0, 0, 0.1)"],xl:["0 20px 13px rgba(0, 0, 0, 0.03)","0 8px 5px rgba(0, 0, 0, 0.08)"],"2xl":"0 25px 25px rgba(0, 0, 0, 0.15)",none:"0 0 #0000"},L={xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",min:"min-content",max:"max-content",prose:"65ch"},he=S($({auto:"auto"},L),{screen:"100vw"}),dt=S($({none:"none"},L),{screen:"100vw"}),be=S($({auto:"auto"},L),{screen:"100vh"}),pt=S($({none:"none"},L),{screen:"100vh"}),mt={width:he,height:be,maxWidth:dt,maxHeight:pt,minWidth:dt,minHeight:pt,colors:Z,fontFamily:oe,fontSize:ie,breakpoints:ue,borderRadius:de,lineHeight:le,letterSpacing:ut,wordSpacing:fe,boxShadow:pe,textIndent:se,textShadow:ce,textStrokeWidth:ae,blur:me,dropShadow:ge};function xe(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===44){o+="\\2c ";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var K=xe;function P(t){return(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function gt(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>P(e)):[t]:[P(t)]}function ye(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}function W(t){return t==null?"":ye(t).map(([e,r])=>r!=null?`${e}:${r};`:void 0).filter(Boolean).join("")}function Q(t){return t&&typeof t=="object"&&!Array.isArray(t)}function X(t,e){let r=t,n=e;if(Array.isArray(r)&&Array.isArray(n))return[...r,...n];if(Array.isArray(r))return[...r];let o=$({},r);return Q(r)&&Q(n)&&Object.keys(n).forEach(i=>{Q(n[i])?i in r?o[i]=X(r[i],n[i]):Object.assign(o,{[i]:n[i]}):Object.assign(o,{[i]:n[i]})}),o}function ht(t){return typeof t[0]=="string"}function bt(t){return typeof t[0]=="string"}function k(t=[]){return Array.isArray(t)?t:[t]}function B(t){return Array.from(new Set(t))}var we=/^#?([\da-f]+)$/i;function xt(t=""){let[,e]=t.match(we)||[];if(!!e)switch(e.length){case 3:case 4:let r=Array.from(e,o=>Number.parseInt(o,16)).map(o=>o<<4|o);return e.length===3||(r[3]=Math.round(r[3]/255*100)/100),r;case 6:case 8:let n=Number.parseInt(e,16);return e.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255,Math.round((n&255)/255*100)/100]}}var $e=/^\[(.+?)~?="(.*)"\]$/,ve=/(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-?]/;function yt(t){return t.match($e)}function O(t=""){return ve.test(t)}function wt(t){return typeof t=="function"?{match:t}:t}function J(t){return t.length===3}function $t(t){return t!=null}var tt=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.has(r)||o.set(r,n),o.get(r)}set(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.set(r,n),this}has(e,r){var n;return(n=this._map.get(e))==null?void 0:n.has(r)}delete(e,r){var n;return((n=this._map.get(e))==null?void 0:n.delete(r))||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>e(i,r,o)))}};var Se=/([!\w+:_/-]+?)([:-])\(((?:[!\w\s:/\\,%#.$-]|\[.*?\])*?)\)/gm;function vt(t){let e=[],r;for(;r=Se.exec(t);){let o=r.index,i=o+r[0].length,[,s,a,c]=r,d=c.split(/\s/g).map(m=>m.replace(/^(!?)(.*)/,`$1${s}${a}$2`)).join(" ");e.unshift([o,i,d])}let n=t;return e.forEach(([o,i,s])=>{n=n.slice(0,o)+s+n.slice(i)}),n}var St=new Set;function kt(t){St.has(t)||(console.warn("[unocss]",t),St.add(t))}var I={name:"split",order:0,extract({code:t}){return new Set(t.split(/[\s'"`;>=]+/g).filter(O))}};function ke(t){return k(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var Ce={shortcuts:-1,default:0};function et(t={},e={}){let r=Object.assign({},e,t),n=(r.presets||[]).flatMap(k),o=[...n.filter(f=>f.enforce==="pre"),...n.filter(f=>!f.enforce),...n.filter(f=>f.enforce==="post")],i=Object.assign(Ce,...n.map(f=>f.layers),t.layers);function s(f){return B([...o.flatMap(g=>k(g[f]||[])),...k(r[f]||[])])}let a=s("extractors");a.length||a.push(I),a.sort((f,g)=>(f.order||0)-(g.order||0));let c=s("rules"),d={},m=c.length;c.forEach((f,g)=>{ht(f)&&(d[f[0]]=[g,f[1],f[2]],delete c[g])});let b=[...o.map(f=>f.theme||{}),r.theme||{}].reduce((f,g)=>X(f,g),{});return S($({mergeSelectors:!0,warn:!0,blocklist:[],safelist:[],sortLayers:f=>f},r),{presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:i,theme:b,rulesSize:m,rulesDynamic:c,rulesStaticMap:d,preflights:s("preflights"),variants:s("variants").map(wt),shortcuts:ke(s("shortcuts")),extractors:a})}var Ct="0.15.0";var At=class{constructor(e={},r={}){this.userConfig=e;this.defaults=r;this.config=et(e,r)}version=Ct;_cache=new Map;config;blocked=new Set;parentOrders=new Map;setConfig(e,r){!e||(r&&(this.defaults=r),this.userConfig=e,this.config=et(e,this.defaults),this.blocked.clear(),this.parentOrders.clear(),this._cache.clear())}async applyExtractors(e,r,n=new Set){let o={get original(){return e},code:e,id:r};for(let i of this.config.extractors){let s=await i.extract(o);s==null||s.forEach(a=>n.add(a))}return n}async generate(e,{id:r,scope:n,preflights:o=!0,safelist:i=!0,minify:s=!1}={}){let a=typeof e=="string"?await this.applyExtractors(e,r):e;i&&this.config.safelist.forEach(u=>a.add(u));let c=s?"":`
|
|
2
|
+
`,d=new Set(["default"]),m=new Set,b=new Map,f=(u,h)=>{var p;this._cache.set(u,h),m.add(u);for(let x of h){let E=x[3]||"";b.has(E)||b.set(E,[]),b.get(E).push(x),((p=x[4])==null?void 0:p.layer)&&d.add(x[4].layer)}},g=u=>{this.blocked.add(u),this._cache.set(u,null)};await Promise.all(Array.from(a).map(async u=>{var F;if(m.has(u)||this.blocked.has(u))return;if(this._cache.has(u)){let y=this._cache.get(u);y&&f(u,y);return}let h=u;if(this.config.preprocess&&(h=this.config.preprocess(u)),this.isBlocked(h))return g(h);let p=this.matchVariants(u,h);if(!p||this.isBlocked(p[1]))return g(u);let x={rawSelector:u,currentSelector:p[1],theme:this.config.theme,generator:this,variantHandlers:p[2],constructCSS:(...y)=>this.constructCustomCSS(x,...y)},E=this.expandShortcut(p[1],x);if(E){let y=await this.stringifyShortcuts(p,x,E[0],E[1]);if(y==null?void 0:y.length)return f(u,y)}else{let y=(F=await this.parseUtil(p,x))==null?void 0:F.map(w=>this.stringifyUtil(w)).filter($t);if(y==null?void 0:y.length)return f(u,y)}this._cache.set(u,null)})),o&&this.config.preflights.forEach(u=>{u.layer&&d.add(u.layer)});let A={},U=this.config.sortLayers(Array.from(d).sort((u,h)=>{var p,x;return((p=this.config.layers[u])!=null?p:0)-((x=this.config.layers[h])!=null?x:0)||u.localeCompare(h)})),R=u=>{if(A[u])return A[u];let h=Array.from(b).sort((p,x)=>(this.parentOrders.get(p[0])||0)-(this.parentOrders.get(x[0])||0)).map(([p,x])=>{let E=x.length,F=x.filter(w=>{var j;return(((j=w[4])==null?void 0:j.layer)||"default")===u}).sort((w,j)=>{var N;return w[0]-j[0]||((N=w[1])==null?void 0:N.localeCompare(j[1]||""))||0}).map(w=>[w[1]?je(w[1],n):w[1],w[2]]);if(!F.length)return;let y=F.reverse().map(([w,j],N)=>{if(w&&this.config.mergeSelectors)for(let Y=N+1;Y<E;Y++){let T=F[Y];if(T&&T[0]&&T[1]===j)return T[0]=`${T[0]},${w}`,null}return w?`${w}{${j}}`:j}).filter(Boolean).reverse().join(c);return p?`${p}{${c}${y}${c}}`:y}).filter(Boolean).join(c);return o&&(h=[...this.config.preflights.filter(p=>(p.layer||"default")===u).map(p=>p.getCSS()).filter(Boolean),h].join(c)),A[u]=!s&&h?`/* layer: ${u} */${c}${h}`:h},v=(u=U,h)=>u.filter(p=>!(h==null?void 0:h.includes(p))).map(p=>R(p)||"").filter(Boolean).join(c);return{get css(){return v()},layers:U,getLayers:v,getLayer:R,matched:m}}matchVariants(e,r){let n=new Set,o=[],i=r||e,s=!1;for(;;){s=!1;for(let a of this.config.variants){if(!a.multiPass&&n.has(a))continue;let c=a.match(i,e,this.config.theme);if(!!c&&(typeof c=="string"&&(c={matcher:c}),c)){i=c.matcher,Array.isArray(c.parent)&&this.parentOrders.set(c.parent[0],c.parent[1]),o.push(c),n.add(a),s=!0;break}}if(!s)break;if(o.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,i,o]}applyVariants(e,r=e[4],n=e[1]){let o=r.reduce((i,s)=>{var a;return((a=s.body)==null?void 0:a.call(s,i))||i},e[2]);return[r.reduce((i,s)=>{var a;return((a=s.selector)==null?void 0:a.call(s,i,o))||i},ze(n)),o,r.reduce((i,s)=>Array.isArray(s.parent)?s.parent[0]:s.parent||i,void 0)]}constructCustomCSS(e,r,n){r=P(r);let[o,i,s]=this.applyVariants([0,n||e.rawSelector,r,void 0,e.variantHandlers]),a=`${o}{${W(i)}}`;return s?`${s}{${a}}`:a}async parseUtil(e,r,n=!1){var m,b;let[o,i,s]=typeof e=="string"?this.matchVariants(e):e,a=this.config.rulesStaticMap[i];if(a&&a[1]&&(n||!((m=a[2])==null?void 0:m.internal)))return[[a[0],o,P(a[1]),a[2],s]];r.variantHandlers=s;let{rulesDynamic:c,rulesSize:d}=this.config;for(let f=d;f>=0;f--){let g=c[f];if(!g||((b=g[2])==null?void 0:b.internal)&&!n)continue;let[A,U,R]=g,v=i.match(A);if(!v)continue;let u=await U(v,r);if(!u)continue;if(typeof u=="string")return[[f,u,R]];let h=gt(u).filter(p=>p.length);if(h.length)return h.map(p=>[f,o,p,R,s])}}stringifyUtil(e){if(!e)return;if(J(e))return[e[0],void 0,e[1],void 0,e[2]];let[r,n,o]=this.applyVariants(e),i=W(n);if(!!i)return[e[0],r,i,o,e[3]]}expandShortcut(e,r,n=3){if(n===0)return;let o,i;for(let s of this.config.shortcuts)if(bt(s)){if(s[0]===e){o=o||s[2],i=s[1];break}}else{let a=e.match(s[0]);if(a&&(i=s[1](a,r)),i){o=o||s[2];break}}if(typeof i=="string"&&(i=vt(i).split(/\s+/g)),!!i)return[i.flatMap(s=>{var a;return((a=this.expandShortcut(s,r,n-1))==null?void 0:a[0])||[s]}),o]}async stringifyShortcuts(e,r,n,o={layer:this.config.shortcutsLayer}){let i=new tt,s=(await Promise.all(B(n).map(async d=>{let m=await this.parseUtil(d,r,!0);return m||kt(`unmatched utility "${d}" in shortcut "${e[1]}"`),m||[]}))).flat(1).filter(Boolean).sort((d,m)=>d[0]-m[0]),[a,,c]=e;for(let d of s){if(J(d))continue;let[m,b,f]=this.applyVariants(d,[...d[4],...c],a),g=i.getFallback(m,f,[[],d[0]]);g[0].push(...b),d[0]>g[1]&&(g[1]=d[0])}return i.map(([d,m],b,f)=>{let g=W(d);if(g)return[m,b,g,f,o]}).filter(Boolean)}isBlocked(e){return!e||this.config.blocklist.some(r=>typeof r=="string"?r===e:r.test(e))}};function Et(t,e){return new At(t,e)}var jt=/ \$\$ /,Ee=t=>t.match(jt);function je(t,e){return Ee(t)?t.replace(jt,e?` ${e} `:" "):e?`${e} ${t}`:t}function ze(t){return t.startsWith("[")?t.replace(/^\[(.+?)(~?=)"(.*)"\]$/,(e,r,n,o)=>`[${K(r)}${n}"${K(o)}"]`):`.${K(t)}`}var M={l:["-left"],r:["-right"],t:["-top"],b:["-bottom"],s:["-inline-start"],e:["-inline-end"],x:["-left","-right"],y:["-top","-bottom"],"":[""],a:[""]},rt={t:["-top-left","-top-right"],r:["-top-right","-bottom-right"],b:["-bottom-left","-bottom-right"],l:["-bottom-left","-top-left"],tl:["-top-left"],lt:["-top-left"],tr:["-top-right"],rt:["-top-right"],bl:["-bottom-left"],lb:["-bottom-left"],br:["-bottom-right"],rb:["-bottom-right"],"":[""]},nt={x:["-x"],y:["-y"],z:["-z"],"":["-x","-y"]},zt=/^(-?[0-9.]+)(px|pt|pc|rem|em|%|vh|vw|in|cm|mm|ex|ch|vmin|vmax)?$/i,Re=/^(-?[0-9.]+)$/i;function Ue(t){if(t==="auto"||t==="a")return"auto";let e=t.match(zt);if(!e)return;let[,r,n]=e;if(n)return t;let o=parseFloat(r);if(!Number.isNaN(o))return`${o/4}rem`}function Fe(t){let e=t.match(zt);if(!e)return;let[,r,n]=e;if(n)return t;let o=parseFloat(r);if(!Number.isNaN(o))return`${o}px`}function Me(t){if(!Re.test(t))return;let e=parseFloat(t);if(!Number.isNaN(e))return e}function _e(t){t.endsWith("%")&&(t=t.slice(0,-1));let e=parseFloat(t);if(!Number.isNaN(e))return`${e/100}`}function Te(t){if(t==="full")return"100%";let[e,r]=t.split("/"),n=parseFloat(e)/parseFloat(r);if(!Number.isNaN(n))return`${n*100}%`}function Pe(t){if(t&&t[0]==="["&&t[t.length-1]==="]")return t.slice(1,-1).replace(/_/g," ").replace(/calc\((.*)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function Oe(t){if(t.startsWith("$"))return`var(--${t.slice(1)})`}function Ve(t){let e=Number(t.replace(/(s|ms)$/,""));if(!isNaN(e))return/ms|s$/.test(t)?t:`${t}ms`}function De(t){if(["inherit","initial","unset"].includes(t))return t}var Rt={__proto__:null,rem:Ue,px:Fe,number:Me,percent:_e,fraction:Te,bracket:Pe,cssvar:Oe,time:Ve,global:De},Ne=Object.keys(Rt),l=function(t){var r;let e=((r=this.__options)==null?void 0:r.sequence)||[];this.__options.sequence=[];for(let n of e){let o=Rt[n](t);if(o!=null)return o}};function Le(t,e){return t.__options||(t.__options={sequence:[]}),t.__options.sequence.push(e),t}Ne.forEach(t=>{Object.defineProperty(l,t,{enumerable:!0,get(){return Le(this,t)}})});function Ut(t){return t.charAt(0).toUpperCase()+t.slice(1)}var ot="$$no-pseudo",V=Object.fromEntries(["active","checked","default","empty","enabled","disabled","first-of-type",["first","first-child"],"focus-visible","focus-within","focus","hover","indeterminate","invalid","last-of-type",["last","last-child"],"link","only-child","only-of-type","optional","placeholder-shown","read-only","read-write","required","root","target","valid","visited",["even-of-type","nth-of-type(even)"],["even","nth-child(even)"],["odd-of-type","nth-of-type(odd)"],["odd","nth-child(odd)"]].map(k)),Ke=["before","after","first-letter","first-line","selection"],We=new RegExp(`^(${Ke.join("|")})[:-]`),G=Object.keys(V).join("|"),Be=new RegExp(`^(${G})[:-]`),Ie=new RegExp(`^not-(${G})[:-]`),Ge=new RegExp(`^group-(${G})[:-]`),qe=new RegExp(`^peer-(${G})[:-]`),Ft=t=>{let e=t.match(We);if(e)return{matcher:t.slice(e[1].length+1),selector:(r,n)=>D(n)&&`${r}::${e[1]}`}};function D(t){return!t.find(e=>e[0]===ot)||void 0}var Mt={match:t=>{let e=t.match(Be);if(e){let r=V[e[1]]||e[1];return{matcher:t.slice(e[1].length+1),selector:(n,o)=>D(o)&&`${n}:${r}`}}if(e=t.match(Ie),e){let r=V[e[1]]||e[1];return{matcher:t.slice(e[1].length+5),selector:(n,o)=>D(o)&&`${n}:not(:${r})`}}if(e=t.match(Ge),e){let r=V[e[1]]||e[1];return{matcher:t.slice(e[1].length+7),selector:(n,o)=>D(o)&&n.includes(".group:")?n.replace(/\.group:/,`.group:${r}:`):`.group:${r} ${n}`}}if(e=t.match(qe),e){let r=V[e[1]]||e[1];return{matcher:t.slice(e[1].length+6),selector:(n,o)=>D(o)&&n.includes(".peer:")?n.replace(/\.peer:/,`.peer:${r}:`):`.peer:${r} ~ ${n}`}}},multiPass:!0};var He={mid:"middle",base:"baseline",btm:"bottom"},Ye=[[/^(?:vertical|align|v)-(baseline|top|bottom|middle|text-top|text-bottom|mid|base|btm)$/,([,t])=>({"vertical-align":He[t]||t})]],Ze=[["text-center",{"text-align":"center"}],["text-left",{"text-align":"left"}],["text-right",{"text-align":"right"}],["text-justify",{"text-align":"justify"}]],_t=(t,e)=>{var c;let[r,n]=t.split(/(?:\/|:)/),[o,i="DEFAULT"]=r.replace(/([a-z])([0-9])/g,"$1-$2").split(/-/g);if(!o)return;let s,a=l.bracket(r)||r;if(a.startsWith("#")&&(s=a.slice(1)),a.startsWith("hex-")&&(s=a.slice(4)),!s){let d=(c=e.colors)==null?void 0:c[o];typeof d=="string"?s=d:i&&d&&(s=d[i])}return{opacity:n,name:o,no:i,color:s,rgba:xt(s)}},C=(t,e)=>([,r],{theme:n})=>{let o=_t(r,n);if(!o)return;let{opacity:i,color:s,rgba:a}=o;if(!s)return;let c=i?i[0]==="["?l.bracket.percent(i):parseFloat(i)/100:a==null?void 0:a[3];return a?c!=null&&!Number.isNaN(c)?(a[3]=typeof c=="string"&&!c.includes("%")?parseFloat(c):c,{[t]:`rgba(${a.join(",")})`}):{[`--un-${e}-opacity`]:1,[t]:`rgba(${a.slice(0,3).join(",")},var(--un-${e}-opacity))`}:{[t]:s.replace("%alpha",`${c||1}`)}},Qe=[[/^op(?:acity)?-?(.+)$/,([,t])=>({opacity:l.bracket.percent.cssvar(t)})]],Xe=[[/^(?:text|color|c)-(.+)$/,C("color","text")],[/^(?:text|color|c)-op(?:acity)?-?(.+)$/m,([,t])=>({"--un-text-opacity":l.bracket.percent.cssvar(t)})]],Je=[[/^underline-(.+)$/,(t,e)=>{let r=C("text-decoration-color","line")(t,e);if(r)return $({"-webkit-text-decoration-color":r["text-decoration-color"]},r)}],[/^underline-op(?:acity)?-?(.+)$/m,([,t])=>({"--un-line-opacity":l.bracket.percent(t)})]],tr=[[/^text-stroke-(.+)$/,C("-webkit-text-stroke-color","text-stroke")],[/^text-stroke-op(?:acity)?-?(.+)$/m,([,t])=>({"--un-text-stroke-opacity":l.bracket.percent(t)})]],er=[[/^bg-(.+)$/,C("background-color","bg")],[/^bg-op(?:acity)?-?(.+)$/m,([,t])=>({"--un-bg-opacity":l.bracket.percent(t)})]],rr=[[/^(?:border|b)-(.+)$/,C("border-color","border")],[/^(?:border|b)-op(?:acity)?-?(.+)$/m,([,t])=>({"--un-border-opacity":l.bracket.percent(t)})]],nr=[[/^ring-(.+)$/,C("--un-ring-color","ring")],[/^ring-op(?:acity)?-?(.+)$/m,([,t])=>({"--un-ring-opacity":l.bracket.percent(t)})]],or=[[/^ring-offset-(.+)$/,C("--un-ring-offset-color","ring-offset")],[/^ring-offset-op(?:acity)?-?(.+)$/m,([,t])=>({"--un-ring-offset-opacity":l.bracket.percent(t)})]],ir=[["fill-none",{fill:"none"}],[/^fill-(.+)$/,C("fill","fill")],[/^fill-op(?:acity)?-?(.+)$/m,([,t])=>({"--un-fill-opacity":l.bracket.percent(t)})]],sr=["none","auto","dotted","dashed","solid","double","groove","ridge","inset","outset","inherit","initial","revert","unset"],ar=t=>{let e=["width","offset"].find(n=>t.startsWith(n))||"width",r=l.bracket.fraction.rem(t.replace(/^(offset\-|width\-)/,""));if(r)return{[`outline-${e}`]:r}},cr=[["outline-none",{outline:"2px solid transparent","outline-offset":"2px"}],["outline",{"outline-style":"solid"}],[/^outline-(.+)$/,(t,e)=>{let[,r]=t;if(r==="none")return{outline:"2px solid transparent","outline-offset":"2px"};if(sr.includes(r))return{"outline-style":r};let n=ar(r);if(n)return n;let o=C("outline-color","outline-color")([t[0],t[1].replace(/^color-/,"")],e);if(o)return o}]],lr=[["appearance-none",{appearance:"none","-webkit-appearance":"none"}]],fr=[[/^placeholder-opacity-(\d+)$/,([,t])=>({"placeholder-opacity":l.bracket.percent(t)})],[/^placeholder-(?!opacity)(.+)$/,(t,e)=>(t[1]=t[1].replace(/^color-/,""),C("placeholder-color","placeholder-color")(t,e))]],ur=[[/^border$/,it],[/^(?:border|b)(?:-([^-]+))?$/,it],[/^(?:border|b)(?:-([^-]+))?(?:-([^-]+))?$/,it]],dr=[[/^(?:border-)?(?:rounded|rd)$/,st],[/^(?:border-)?(?:rounded|rd)(?:-([^-]+))?$/,st],[/^(?:border-)?(?:rounded|rd)(?:-([^-]+))?(?:-([^-]+))?$/,st]],pr=[["border-solid",{"border-style":"solid"}],["border-dashed",{"border-style":"dashed"}],["border-dotted",{"border-style":"dotted"}],["border-double",{"border-style":"double"}],["border-none",{"border-style":"none"}]],mr=[ur,rr,pr,dr].flat(1);function it([,t,e]){let[r,n="1"]=M[t]?[t,e]:["",t],o=l.bracket.px(n);if(o!=null)return[...M[r].map(i=>[`border${i}-width`,o]),["border-style","solid"]]}function st([,t,e],{theme:r}){var s;let[n,o="DEFAULT"]=rt[t]?[t,e]:["",t],i=((s=r.borderRadius)==null?void 0:s[o])||l.bracket.fraction.rem(o);if(i!=null)return rt[n].map(a=>[`border${a}-radius`,i])}var gr=["color","border-color","background-color","flex-grow","flex","flex-shrink","caret-color","font","gap","opacity","visibility","z-index","font-weight","zoom","text-shadow","transform","box-shadow"],hr=["backround-position","left","right","top","bottom","object-position"],br=["max-height","min-height","max-width","min-width","height","width","border-width","margin","padding","outline-width","outline-offset","font-size","line-height","text-indent","vertical-align","border-spacing","letter-spacing","word-spacing"],xr=["all","none"],yr=["stroke","filter","backdrop-filter","fill","mask","mask-size","mask-border","clip-path","clip"],Tt=[...gr,...hr,...br,...yr],wr=Tt.join(", "),Pt=t=>{if(!(t&&![...Tt,...xr].includes(t)))return t||wr},$r=[[/^transition(?:-([a-z-]+))?(?:-(\d+))?$/,([,t,e="150"])=>{let r=Pt(t);if(!!r)return{"transition-property":r,"transition-timing-function":"cubic-bezier(0.4, 0, 0.2, 1)","transition-duration":`${e}ms`}}],[/^duration-(\d+)$/,([,t="150"])=>({"transition-duration":`${t}ms`})],["ease",{"transition-timing-function":"cubic-bezier(0.4, 0, 0.2, 1)"}],["ease-in",{"transition-timing-function":"cubic-bezier(0.4, 0, 1, 1)"}],["ease-out",{"transition-timing-function":"cubic-bezier(0, 0, 0.2, 1)"}],["ease-in-out",{"transition-timing-function":"cubic-bezier(0.4, 0, 0.2, 1)"}],[/^transition-delay-(\d+)$/,([,t])=>({"transition-delay":`${t}ms`})],[/^transition-duration-(\d+)$/,([,t])=>({"transition-duration":`${t}ms`})],[/^(?:transition-)?property-([a-z-]+)$/,([,t])=>{let e=Pt(t);if(e)return{"transition-property":e}}]],vr=[["flex-col",{"flex-direction":"column"}],["flex-col-reverse",{"flex-direction":"column-reverse"}],["flex-row",{"flex-direction":"row"}],["flex-row-reverse",{"flex-direction":"row-reverse"}],["flex-wrap",{"flex-wrap":"wrap"}],["flex-wrap-reverse",{"flex-wrap":"wrap-reverse"}],["flex-nowrap",{"flex-wrap":"nowrap"}],["flex-1",{flex:"1 1 0%"}],["flex-auto",{flex:"1 1 auto"}],["flex-initial",{flex:"0 1 auto"}],["flex-none",{flex:"none"}],[/^flex-\[(.+)\]$/,([,t])=>({flex:t})],["flex-grow",{"flex-grow":1}],["flex-grow-0",{"flex-grow":0}],["flex-shrink",{"flex-shrink":1}],["flex-shrink-0",{"flex-shrink":0}],["flex",{display:"flex"}],["inline-flex",{display:"inline-flex"}],["flex-inline",{display:"inline-flex"}]],Sr=[[/^font-(\w+)$/,([,t],{theme:e})=>{var n;let r=(n=e.fontFamily)==null?void 0:n[t];if(r)return{"font-family":r}}]],kr={thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},Cr=[[/^text-([^-]+)$/,([,t="base"],{theme:e})=>{var n;let r=k(((n=e.fontSize)==null?void 0:n[t])||l.bracket.rem(t));if(r==null?void 0:r[0]){let[o,i="1"]=r;return{"font-size":o,"line-height":i}}}]],Ar=[[/^(?:font|fw)-?([^-]+)$/,([,t])=>{let e=kr[t]||l.number(t);if(e)return{"font-weight":e}}]],Er=[[/^(?:leading|lh)-([^-]+)$/,([,t],{theme:e})=>{var n;let r=((n=e.lineHeight)==null?void 0:n[t])||l.bracket.rem(t);if(r!==null)return{"line-height":r}}]],jr=[[/^tracking-([^-]+)$/,([,t],{theme:e})=>{var n;let r=((n=e.letterSpacing)==null?void 0:n[t])||l.bracket.rem(t);if(r!==null)return{"letter-spacing":r}}]],zr=[[/^word-spacing-([^-]+)$/,([,t],{theme:e})=>{var n;let r=((n=e.wordSpacing)==null?void 0:n[t])||l.bracket.rem(t);if(r!==null)return{"word-spacing":r}}]],Rr=[[/^tab-?([^-]*)$/,([,t])=>{t=t||"4";let e=l.bracket.global.number(t);if(e!==null)return{"-moz-tab-size":e,"-o-tab-size":e,"tab-size":e}}]],Ur=[[/^underline-([^-]+)$/,([,t])=>{let e=t==="auto"?t:l.bracket.px(t);if(e!=null)return{"text-decoration-thickness":e}}]],Fr=[[/^underline-offset-([^-]+)$/,([,t])=>{let e=t==="auto"?t:l.bracket.px(t);if(e!=null)return{"text-underline-offset":e}}]],Mr=[[/^indent(?:-(.+))?$/,([,t],{theme:e})=>{var n;let r=((n=e.textIndent)==null?void 0:n[t||"DEFAULT"])||l.bracket.cssvar.fraction.rem(t);if(r!=null)return{"text-indent":r}}]],_r=[[/^text-stroke(?:-(.+))?$/,([,t],{theme:e})=>{var n;let r=((n=e.textStrokeWidth)==null?void 0:n[t||"DEFAULT"])||l.bracket.cssvar.px(t);if(r!=null)return{"-webkit-text-stroke-width":r}}]],Tr=[[/^text-shadow(?:-(.+))?$/,([,t],{theme:e})=>{var n;let r=((n=e.textShadow)==null?void 0:n[t||"DEFAULT"])||l.bracket.cssvar(t);if(r!=null)return{"text-shadow":r}}]],Pr=[Sr,Cr,Ar].flat(1),Or=[[/^(?:flex-|grid-)?gap-([^-]+)$/,([,t])=>{let e=l.bracket.rem(t);if(e!=null)return{"grid-gap":e,gap:e}}],[/^(?:flex-|grid-)?gap-x-([^-]+)$/,([,t])=>{let e=l.bracket.rem(t);if(e!=null)return{"grid-column-gap":e,"column-gap":e}}],[/^(?:flex-|grid-)?gap-y-([^-]+)$/,([,t])=>{let e=l.bracket.rem(t);if(e!=null)return{"grid-row-gap":e,"row-gap":e}}]],Vr=(t,e)=>{var r;return k(((r=e.fontSize)==null?void 0:r[t])||l.bracket.rem(t))[0]},Ot=(t,e)=>t==="min"?"min-content":t==="max"?"max-content":t==="fr"?"minmax(0,1fr)":Vr(t,e),Dr=[["grid",{display:"grid"}],["inline-grid",{display:"inline-grid"}],[/^grid-cols-minmax-([\w.-]+)$/,([,t])=>({"grid-template-columns":`repeat(auto-fill, minmax(${t}, 1fr))`})],[/^grid-rows-minmax-([\w.-]+)$/,([,t])=>({"grid-template-rows":`repeat(auto-fill, minmax(${t}, 1fr))`})],[/^grid-cols-(\d+)$/,([,t])=>({"grid-template-columns":`repeat(${t},minmax(0,1fr))`})],[/^grid-rows-(\d+)$/,([,t])=>({"grid-template-rows":`repeat(${t},minmax(0,1fr))`})],[/^grid-cols-\[(.+)\]$/,([,t])=>({"grid-template-columns":t.replace(/,/g," ")})],[/^grid-rows-\[(.+)\]$/,([,t])=>({"grid-template-rows":t.replace(/,/g," ")})],[/^(?:grid-)?(row|col)-(.+)$/,([,t,e])=>{var i;let r=t==="row"?"grid-row":"grid-column",n=l.bracket(e);if(n)return{[r]:n};let o=e.split("-");if(o.length===1&&o[0]==="auto")return{[r]:o[0]};if(o[0]==="span"){if(o[1]==="full")return{[r]:"1/-1"};if(n=(i=l.number.bracket(o[1]))==null?void 0:i.toString().replace(/_/g," "),n)return{[r]:`span ${n}/span ${n}`}}}],[/^(?:grid-)?auto-flow-([\w.-]+)$/,([,t])=>({"grid-auto-flow":`${t.replace("col","column").split("-").join(" ")}`})],[/^(?:grid-)?row-start-([\w.-]+)$/,([,t])=>({"grid-row-start":`${t}`})],[/^(?:grid-)?row-end-([\w.-]+)$/,([,t])=>({"grid-row-end":`${t}`})],[/^(?:grid-)?col-start-([\w.-]+)$/,([,t])=>({"grid-column-start":`${t}`})],[/^(?:grid-)?col-end-([\w.]+)$/,([,t])=>({"grid-column-end":`${t}`})],[/^(?:grid-)?auto-rows-([\w.-]+)$/,([,t],{theme:e})=>({"grid-auto-rows":`${Ot(t,e)}`})],[/^(?:grid-)?auto-cols-([\w.-]+)$/,([,t],{theme:e})=>({"grid-auto-columns":`${Ot(t,e)}`})]],Vt=["auto","hidden","visible","scroll"],Nr=[[/^(?:overflow|of)-(.+)$/,([,t])=>Vt.includes(t)?{overflow:t}:void 0],[/^(?:overflow|of)-([xy])-(.+)$/,([,t,e])=>Vt.includes(e)?{[`overflow-${t}`]:e}:void 0]],Dt=[["relative",{position:"relative"}],["absolute",{position:"absolute"}],["fixed",{position:"fixed"}],["sticky",{position:"sticky"}],["static",{position:"static"}]],Lr=[["justify-start",{"justify-content":"flex-start"}],["justify-end",{"justify-content":"flex-end"}],["justify-center",{"justify-content":"center"}],["justify-between",{"justify-content":"space-between"}],["justify-around",{"justify-content":"space-around"}],["justify-evenly",{"justify-content":"space-evenly"}]],Kr=[[/^order-(.+)$/,([,t])=>({order:{first:"-9999",last:"9999",none:"0"}[t]||l.bracket.number(t)})]],q=["auto","start","end","center","stretch"],Wr=q.map(t=>[`justify-items-${t}`,{"justify-items":t}]),Br=q.map(t=>[`justify-self-${t}`,{"justify-self":t}]),Ir=[["content-start",{"align-content":"flex-start"}],["content-end",{"align-content":"flex-end"}],["content-center",{"align-content":"center"}],["content-between",{"align-content":"space-between"}],["content-around",{"align-content":"space-around"}],["content-evenly",{"align-content":"space-evenly"}]],Gr=[["items-start",{"align-items":"flex-start"}],["items-end",{"align-items":"flex-end"}],["items-center",{"align-items":"center"}],["items-baseline",{"align-items":"baseline"}],["items-stretch",{"align-items":"stretch"}]],qr=[["self-auto",{"align-self":"auto"}],["self-start",{"align-self":"flex-start"}],["self-end",{"align-self":"flex-end"}],["self-center",{"align-self":"center"}],["self-stretch",{"align-items":"stretch"}]],Hr=[["place-content-start",{"place-content":"start"}],["place-content-end",{"place-content":"end"}],["place-content-center",{"place-content":"center"}],["place-content-between",{"place-content":"space-between"}],["place-content-around",{"place-content":"space-around"}],["place-content-evenly",{"place-content":"space-evenly"}],["place-content-stretch",{"place-content":"stretch"}]],Yr=q.map(t=>[`place-items-${t}`,{"place-items":t}]),Zr=q.map(t=>[`place-self-${t}`,{"place-self":t}]);function Nt(t){var e;return(e={auto:"auto",full:"100%"}[t])!=null?e:l.bracket.fraction.cssvar.rem(t)}var Qr=[[/^(top|left|right|bottom|inset)-(.+)$/,([,t,e])=>({[t]:Nt(e)})],[/^inset-([xy])-(.+)$/,([,t,e])=>{let r=Nt(e);if(r!=null&&t in M)return M[t].map(n=>[n.slice(1),r])}]],Xr=[[/^float-(left|right|none)$/,([,t])=>({float:t})],[/^clear-(left|right|both|none)$/,([,t])=>({clear:t})]],Jr=[["z-auto",{"z-index":"auto"}],[/^z-([^-]+)$/,([,t])=>({"z-index":l.number(t)})]],tn=[[/^box-(border|content)$/,([,t])=>({"box-sizing":`${t}-box`})]],en=[[/^ring-?(.*)$/,([,t])=>{let e=l.px(t||"1");if(e)return{"--un-ring-inset":"var(--un-empty, )","--un-ring-offset-width":"0px","--un-ring-offset-color":"#fff","--un-ring-color":"rgba(59, 130, 246, .5)","--un-ring-offset-shadow":"var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color)","--un-ring-shadow":`var(--un-ring-inset) 0 0 0 calc(${e} + var(--un-ring-offset-width)) var(--un-ring-color)`,"-webkit-box-shadow":"var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow, 0 0 #0000);","box-shadow":"var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow, 0 0 #0000);"}}],[/^ring-offset-?(.*)$/,([,t])=>{let e=l.px(t||"1");if(e)return{"--un-ring-offset-width":e}}],["ring-inset",{"--un-ring-inset":"inset"}],...nr,...or],rn=(t,e)=>{let r=_t(t,e);if(!r)return;let{color:n,rgba:o}=r;if(!!n)return o?{"--un-shadow-color":`${o.slice(0,3).join(",")}`}:{"--un-shadow-color":n}},nn=[[/^shadow-?(.*)$/,([,t],{theme:e})=>{var o;let r=(o=e==null?void 0:e.boxShadow)==null?void 0:o[t||"DEFAULT"];if(r)return{"--un-shadow-color":"0,0,0","--un-shadow":r,"box-shadow":"var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow)"};let n=rn(t,e);if(n)return n}]];function Lt(t,e){return`${t?`${t}-`:""}${e==="h"?"height":"width"}`}function on(t,e,r,n){var i;let o=`${e==="h"?"height":"width"}`;return t&&(o=`${t}${Ut(o)}`),(i=r[o])==null?void 0:i[n]}var sn=[[/^(?:(min|max)-)?(w|h)-(.+)$/,([,t,e,r],{theme:n})=>{let o=on(t,e,n,r)||l.bracket.cssvar.fraction.rem(r);if(o!=null)return{[Lt(t,e)]:o}}],[/^(?:(min|max)-)?(w)-screen-(.+)$/,([,t,e,r],{theme:n})=>{var i;let o=(i=n.breakpoints)==null?void 0:i[r];if(o!=null)return{[Lt(t,e)]:o}}]],an=[["aspect-ratio-auto",{"aspect-ratio":"auto"}],[/^aspect-ratio-(.+)$/,([,t])=>{let e=(/^\d+\/\d+$/.test(t)?t:null)||l.bracket.cssvar.number(t);if(e!=null)return{"aspect-ratio":e}}]],_=t=>([e,r,n])=>{let o=l.bracket.rem.fraction.cssvar(n);if(o)return M[r].map(i=>[t+i,o])},cn=[[/^pa?()-?(-?.+)$/,_("padding")],[/^p-?([xy])-?(-?.+)$/,_("padding")],[/^p-?([rltbse])-?(-?.+)$/,_("padding")]],ln=[[/^ma?()-?(-?.+)$/,_("margin")],[/^m-?([xy])-?(-?.+)$/,_("margin")],[/^m-?([rltbse])-?(-?.+)$/,_("margin")]];var fn=[["inline",{display:"inline"}],["block",{display:"block"}],["inline-block",{display:"inline-block"}],["contents",{display:"contents"}],["flow-root",{display:"flow-root"}],["list-item",{display:"list-item"}],["hidden",{display:"none"}]],un=[["visible",{visibility:"visible"}],["invisible",{visibility:"hidden"}],["backface-visible",{"backface-visibility":"visible"}],["backface-hidden",{"backface-visibility":"hidden"}]],dn=[[/^cursor-(.+)$/,([,t])=>({cursor:t})]],pn=[["pointer-events-none",{"pointer-events":"none"}],["pointer-events-auto",{"pointer-events":"auto"}]],mn=[["resize-none",{resize:"none"}],["resize-x",{resize:"horizontal"}],["resize-y",{resize:"vertical"}],["resize",{resize:"both"}]],gn=[[/^select-(none|text|all|auto)$/,([,t])=>({"user-select":t})]],hn=[[/^(?:whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap)$/,([,t])=>({"white-space":t})]],bn=[["content-empty",{content:'""'}]],xn=[["break-normal",{"overflow-wrap":"normal","word-break":"normal"}],["break-word",{"overflow-wrap":"break-word"}],["break-all",{"word-break":"break-all"}]],yn=[["truncate",{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}],["text-ellipsis",{"text-overflow":"ellipsis"}],["text-clip",{"text-overflow":"clip"}]],wn=[["case-upper",{"text-transform":"uppercase"}],["case-lower",{"text-transform":"lowercase"}],["case-capital",{"text-transform":"capitalize"}],["case-normal",{"text-transform":"none"}]],$n=[["underline",{"text-decoration":"underline"}],["line-through",{"text-decoration":"line-through"}],["no-underline",{"text-decoration":"none"}]],vn=[["underline-solid",{"text-decoration-style":"solid"}],["underline-double",{"text-decoration-style":"double"}],["underline-dotted",{"text-decoration-style":"dotted"}],["underline-dashed",{"text-decoration-style":"dashed"}]],Sn=[["italic",{"font-style":"italic"}],["not-italic",{"font-style":"normal"}]],kn=[["antialiased",{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","font-smoothing":"grayscale"}],["subpixel-antialiased",{"-webkit-font-smoothing":"auto","-moz-osx-font-smoothing":"auto","font-smoothing":"auto"}]],H={"--un-rotate":0,"--un-scale-x":1,"--un-scale-y":1,"--un-scale-z":1,"--un-skew-x":0,"--un-skew-y":0,"--un-translate-x":0,"--un-translate-y":0,"--un-translate-z":0,transform:"rotate(var(--un-rotate)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z))",[ot]:""},Cn=[["transform",H],[/^preserve-(3d|flat)$/,([,t])=>({"transform-style":t==="3d"?`preserve-${t}`:t})],[/^translate()-([^-]+)$/,Kt],[/^translate-([xyz])-([^-]+)$/,Kt],[/^scale()-([^-]+)$/,Wt],[/^scale-([xyz])-([^-]+)$/,Wt],[/^rotate-([^-]+)(?:deg)?$/,An],["origin-center",{"transform-origin":"center"}],["origin-top",{"transform-origin":"top"}],["origin-top-right",{"transform-origin":"top right"}],["origin-right",{"transform-origin":"right"}],["origin-bottom-right",{"transform-origin":"bottom right"}],["origin-bottom",{"transform-origin":"bottom"}],["origin-bottom-left",{"transform-origin":"bottom left"}],["origin-left",{"transform-origin":"left"}],["origin-top-left",{"transform-origin":"top left"}]];function Kt([,t,e]){let r=l.bracket.fraction.rem(e);if(r!=null)return[H,[...nt[t].map(n=>[`--un-translate${n}`,r])]]}function Wt([,t,e]){let r=l.bracket.fraction.percent(e);if(r!=null)return[H,[...nt[t].map(n=>[`--un-scale${n}`,r])]]}function An([,t]){let e=l.bracket.number(t);if(e!=null)return[H,{"--un-rotate":`${e}deg`}]}var En={visible:"visibility",select:"user-select",vertical:"vertical-align",backface:"backface-visibility",whitespace:"white-space",break:"word-break",color:"color",case:"text-transform",write:"writing-mode","write-orient":"text-orientation",origin:"transform-origin",bg:"background-color","bg-blend":"background-blend-mode","bg-clip":"-webkit-background-clip","bg-gradient":"linear-gradient","bg-origin-border":"background-origin","bg-position":"background-position","bg-repeat":"background-repeat","bg-size":"background-size","bg-opacity":"background-opacity",tab:"tab-size",underline:"text-decoration-thickness","underline-offset":"text-underline-offset",text:"color","grid-cols":"grid-template-columns","grid-rows":"grid-template-rows","auto-flow":"grid-auto-flow","row-start":"grid-row-start","row-end":"grid-row-end",justify:"justify-content",content:"align-content",items:"align-items",self:"align-self",object:"object-fit","mix-blend":"mix-blend-mode","animate-speed":"animation-speed"},jn=[[/^(.+)-\$(.+)$/,([,t,e])=>{let r=En[t];if(r)return{[r]:`var(--${e})`}}]],zn=[[/^(where|\?)$/,(t,{constructCSS:e,generator:r})=>{if(r.config.envMode==="dev")return`@keyframes __un_qm{0%{box-shadow:inset 4px 4px #ff1e90, inset -4px -4px #ff1e90}100%{box-shadow:inset 8px 8px #3399ff, inset -8px -8px #3399ff}}
|
|
3
|
+
${e({animation:"__un_qm 0.5s ease-in-out alternate infinite"})}`}]],Bt=[jn,cn,ln,fn,Qe,er,ir,mr,bn,Pr,Rr,Mr,yn,$n,vn,Je,Ur,Fr,_r,tr,Tr,wn,Ze,Xe,Sn,kn,nn,en,vr,Dr,Or,Dt,sn,an,dn,un,pn,mn,Ye,gn,hn,xn,jr,zr,Er,Nr,cr,lr,fr,Dt,Kr,Lr,Wr,Br,Ir,Gr,qr,Hr,Yr,Zr,Qr,Xr,Jr,tn,$r,Cn,zn].flat(1);var z=(t,e)=>{let r=t.length+1,n=new RegExp(`^${t}[:-]`);return o=>o.match(n)?{matcher:o.slice(r),selector:e}:void 0};var at={},Rn=(t,e,r)=>{let n=Object.entries(r.breakpoints||{}).map(([o,i],s)=>[o,i,s]);for(let[o,i,s]of n){at[o]||(at[o]=new RegExp(`^((?:[a|l]t-)?${o}[:-])`));let a=t.match(at[o]);if(!a)continue;let[,c]=a,d="min",m=parseInt(i);c.startsWith("lt-")&&(d="max",m=-m);let b=t.slice(c.length);if(b!=="container")return c.startsWith("at-")&&s<n.length-1?{matcher:b,parent:[`@media (min-width: ${i}) and (max-width: ${n[s+1][1]})`,m]}:{matcher:b,parent:[`@media (${d}-width: ${i})`,m]}}},Un=[z("children",t=>`${t} > *`),z("all",t=>`${t} *`),z("next",t=>`${t}+*`)],It=[z("dark",t=>`.dark $$ ${t}`),z("light",t=>`.light $$ ${t}`)],Gt=[t=>{let e=z("dark")(t);if(e)return S($({},e),{parent:"@media (prefers-color-scheme: dark)"});let r=z("light")(t);if(r)return S($({},r),{parent:"@media (prefers-color-scheme: light)"})}],Fn={match(t){if(t.startsWith("!"))return{matcher:t.slice(1),body:e=>(e.forEach(r=>{r[1]&&(r[1]+=" !important")}),e)}}},Mn={match(t){if(t.startsWith("-"))return{matcher:t.slice(1),body:e=>(e.forEach(r=>{var n,o;r[0].startsWith("--un-scale")||((n=r[1])==null?void 0:n.toString())==="0"||(r[1]=(o=r[1])==null?void 0:o.toString().replace(/[0-9.]+(?:[a-z]+|%)?/,i=>`-${i}`))}),e)}}},_n=t=>{if(/^space-?([xy])-?(-?.+)$/.test(t)||/^divide-/.test(t))return{matcher:t,selector:e=>`${e}>:not([hidden])~:not([hidden])`}},qt=[_n,Mn,Fn,Rn,...Un,Mt,Ft];var Ht=(t={})=>({name:"@unocss/preset-mini",theme:mt,rules:Bt,variants:[...qt,...t.dark==="media"?Gt:It],options:t});var Tn=["v-bind:",":"],Yt=/[\s'"`;]+/g,Pn=/<\w[\w:\.$-]*\s((?:'[\s\S]*?'|"[\s\S]*?"|`[\s\S]*?`|\{[\s\S]*?\}|[\s\S]*?)*?)>/g,On=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-]+)(?:=(["'])([^\2]+?)\2)?/g,Zt=t=>({name:"attributify",extract({code:e}){let r=Array.from(e.matchAll(Pn)).flatMap(n=>Array.from((n[1]||"").matchAll(On))).flatMap(([,n,o,i])=>{var s;if((s=t==null?void 0:t.ignoreAttributes)==null?void 0:s.includes(n))return[];for(let a of Tn)if(n.startsWith(a)){n=n.slice(a.length);break}return i?["class","className"].includes(n)?i.split(Yt).filter(O):i.split(Yt).filter(Boolean).map(a=>`[${n}~="${a}"]`):O(n)&&(t==null?void 0:t.nonValuedAttribute)!==!1?[`[${n}=""]`]:[]});return new Set(r)}});var Vn=/^(.+\:\!?)?(.*?)$/,Qt=(t={})=>{var r;let e=(r=t.prefix)!=null?r:"un-";return n=>{let o=yt(n);if(!o)return;let i=o[1];if(i.startsWith(e))i=i.slice(e.length);else if(t.prefixedOnly)return;let s=o[2],[,a="",c=s]=s.match(Vn)||[];return c==="~"||!c?`${a}${i}`:`${a}${i}-${c}`}};var Dn=t=>{let e=[Qt(t)],r=[Zt(t)];return(t==null?void 0:t.strict)||r.unshift(I),{name:"@unocss/preset-attributify",variants:e,extractors:r,options:t}},Xt=Dn;function ct(t={}){var r;if(typeof window=="undefined")return;Object.assign(t,(r=window.__unocss)==null?void 0:r.runtime),t.initializeAt==="immediate"?e():window.addEventListener("load",e);function e(){let n=document.createElement("style");document.head.appendChild(n);let o=Et(window.__unocss||{},t.defaults),i=new Set,s;function a(){s!=null&&clearTimeout(s),s=setTimeout(c,0)}async function c(){let f=await o.generate(i);n.innerHTML=f.css}async function d(f){await o.applyExtractors(f,void 0,i),a()}function m(){d(document.body.outerHTML)}new MutationObserver(f=>{f.forEach(g=>{let A=g.target;if(A===n)return;let U=Array.from(A.attributes).map(v=>v.value?`${v.name}="${v.value}"`:v.name).join(" "),R=`<${A.tagName.toLowerCase()} ${U}>`;d(R)})}).observe(document.documentElement||document.body,{childList:!0,subtree:!0,attributes:!0}),m()}}ct({defaults:{presets:[Ht(),Xt()]}});})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "CSS-in-JS Runtime for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@unocss/core": "0.
|
|
38
|
-
"@unocss/preset-attributify": "0.
|
|
39
|
-
"@unocss/preset-uno": "0.
|
|
37
|
+
"@unocss/core": "0.15.0",
|
|
38
|
+
"@unocss/preset-attributify": "0.15.0",
|
|
39
|
+
"@unocss/preset-uno": "0.15.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "pnpm run build:node && pnpm run build:cdn",
|
|
43
43
|
"build:cdn": "tsup src/cdn/*.ts --format iife --minify --out-dir .",
|
|
44
44
|
"build:node": "tsup src/index.ts --format esm,cjs --dts",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
45
|
+
"watch": "pnpm run build:node -- --watch src & pnpm run build:cdn -- --watch src",
|
|
46
|
+
"dev": "nr watch & live-server --open=/play"
|
|
47
47
|
}
|
|
48
48
|
}
|