tailwindcss 4.2.3 → 4.2.4
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,4 +1,4 @@
|
|
|
1
|
-
import{a as lr,b as L,c as H,d as ar,e as I,f as Nt,g as ee,h as nt,i as sr}from"./chunk-TDNFF6A4.mjs";import{a as or}from"./chunk-X4GG3EDV.mjs";var ur="4.2.
|
|
1
|
+
import{a as lr,b as L,c as H,d as ar,e as I,f as Nt,g as ee,h as nt,i as sr}from"./chunk-TDNFF6A4.mjs";import{a as or}from"./chunk-X4GG3EDV.mjs";var ur="4.2.4";function lt(t){let r=[0];for(let n=0;n<t.length;n++)t.charCodeAt(n)===10&&r.push(n+1);function i(n){let o=0,l=r.length;for(;l>0;){let u=(l|0)>>1,f=o+u;r[f]<=n?(o=f+1,l=l-u-1):l=u}o-=1;let c=n-r[o];return{line:o+1,column:c}}function e({line:n,column:o}){n-=1,n=Math.min(Math.max(n,0),r.length-1);let l=r[n],c=r[n+1]??l;return Math.min(Math.max(l+o,0),c)}return{find:i,findOffset:e}}var Be=92,at=47,ot=42,fr=34,cr=39,en=58,st=59,fe=10,ut=13,Ye=32,Ge=9,pr=123,Et=125,Pt=40,dr=41,tn=91,rn=93,mr=45,Rt=64,nn=33,ce=class t extends Error{loc;constructor(r,i){if(i){let e=i[0],n=lt(e.code).find(i[1]);r=`${e.file}:${n.line}:${n.column+1}: ${r}`}super(r),this.name="CssSyntaxError",this.loc=i,Error.captureStackTrace&&Error.captureStackTrace(this,t)}};function Te(t,r){let i=r?.from?{file:r.from,code:t}:null;t[0]==="\uFEFF"&&(t=" "+t.slice(1));let e=[],n=[],o=[],l=null,c=null,u="",f="",m=0,d;for(let p=0;p<t.length;p++){let v=t.charCodeAt(p);if(!(v===ut&&(d=t.charCodeAt(p+1),d===fe)))if(v===Be)u===""&&(m=p),u+=t.slice(p,p+2),p+=1;else if(v===at&&t.charCodeAt(p+1)===ot){let h=p;for(let b=p+2;b<t.length;b++)if(d=t.charCodeAt(b),d===Be)b+=1;else if(d===ot&&t.charCodeAt(b+1)===at){p=b+1;break}let y=t.slice(h,p+1);if(y.charCodeAt(2)===nn){let b=ft(y.slice(2,-2));n.push(b),i&&(b.src=[i,h,p+1],b.dst=[i,h,p+1])}}else if(v===cr||v===fr){let h=gr(t,p,v,i);u+=t.slice(p,h+1),p=h}else{if((v===Ye||v===fe||v===Ge)&&(d=t.charCodeAt(p+1))&&(d===Ye||d===fe||d===Ge||d===ut&&(d=t.charCodeAt(p+2))&&d==fe))continue;if(v===fe){if(u.length===0)continue;d=u.charCodeAt(u.length-1),d!==Ye&&d!==fe&&d!==Ge&&(u+=" ")}else if(v===mr&&t.charCodeAt(p+1)===mr&&u.length===0){let h="",y=p,b=-1;for(let A=p+2;A<t.length;A++)if(d=t.charCodeAt(A),d===Be)A+=1;else if(d===cr||d===fr)A=gr(t,A,d,i);else if(d===at&&t.charCodeAt(A+1)===ot){for(let k=A+2;k<t.length;k++)if(d=t.charCodeAt(k),d===Be)k+=1;else if(d===ot&&t.charCodeAt(k+1)===at){A=k+1;break}}else if(b===-1&&d===en)b=u.length+A-y;else if(d===st&&h.length===0){u+=t.slice(y,A),p=A;break}else if(d===Pt)h+=")";else if(d===tn)h+="]";else if(d===pr)h+="}";else if((d===Et||t.length-1===A)&&h.length===0){p=A-1,u+=t.slice(y,A);break}else(d===dr||d===rn||d===Et)&&h.length>0&&t[A]===h[h.length-1]&&(h=h.slice(0,-1));let T=Ot(u,b);if(!T)throw new ce("Invalid custom property, expected a value",i?[i,y,p]:null);i&&(T.src=[i,y,p],T.dst=[i,y,p]),l?l.nodes.push(T):e.push(T),u=""}else if(v===st&&u.charCodeAt(0)===Rt)c=qe(u),i&&(c.src=[i,m,p],c.dst=[i,m,p]),l?l.nodes.push(c):e.push(c),u="",c=null;else if(v===st&&f[f.length-1]!==")"){let h=Ot(u);if(!h){if(u.length===0)continue;throw new ce(`Invalid declaration: \`${u.trim()}\``,i?[i,m,p]:null)}i&&(h.src=[i,m,p],h.dst=[i,m,p]),l?l.nodes.push(h):e.push(h),u=""}else if(v===pr&&f[f.length-1]!==")")f+="}",c=J(u.trim()),i&&(c.src=[i,m,p],c.dst=[i,m,p]),l&&l.nodes.push(c),o.push(l),l=c,u="",c=null;else if(v===Et&&f[f.length-1]!==")"){if(f==="")throw new ce("Missing opening {",i?[i,p,p]:null);if(f=f.slice(0,-1),u.length>0)if(u.charCodeAt(0)===Rt)c=qe(u),i&&(c.src=[i,m,p],c.dst=[i,m,p]),l?l.nodes.push(c):e.push(c),u="",c=null;else{let y=u.indexOf(":");if(l){let b=Ot(u,y);if(!b)throw new ce(`Invalid declaration: \`${u.trim()}\``,i?[i,m,p]:null);i&&(b.src=[i,m,p],b.dst=[i,m,p]),l.nodes.push(b)}}let h=o.pop()??null;h===null&&l&&e.push(l),l=h,u="",c=null}else if(v===Pt)f+=")",u+="(";else if(v===dr){if(f[f.length-1]!==")")throw new ce("Missing opening (",i?[i,p,p]:null);f=f.slice(0,-1),u+=")"}else{if(u.length===0&&(v===Ye||v===fe||v===Ge))continue;u===""&&(m=p),u+=String.fromCharCode(v)}}}if(u.charCodeAt(0)===Rt){let p=qe(u);i&&(p.src=[i,m,t.length],p.dst=[i,m,t.length]),e.push(p)}if(f.length>0&&l){if(l.kind==="rule")throw new ce(`Missing closing } at ${l.selector}`,l.src?[l.src[0],l.src[1],l.src[1]]:null);if(l.kind==="at-rule")throw new ce(`Missing closing } at ${l.name} ${l.params}`,l.src?[l.src[0],l.src[1],l.src[1]]:null)}return n.length>0?n.concat(e):e}function qe(t,r=[]){let i=t,e="";for(let n=5;n<t.length;n++){let o=t.charCodeAt(n);if(o===Ye||o===Ge||o===Pt){i=t.slice(0,n),e=t.slice(n);break}}return W(i.trim(),e.trim(),r)}function Ot(t,r=t.indexOf(":")){if(r===-1)return null;let i=t.indexOf("!important",r+1);return a(t.slice(0,r).trim(),t.slice(r+1,i===-1?t.length:i).trim(),i!==-1)}function gr(t,r,i,e=null){let n;for(let o=r+1;o<t.length;o++)if(n=t.charCodeAt(o),n===Be)o+=1;else{if(n===i)return o;if(n===st&&(t.charCodeAt(o+1)===fe||t.charCodeAt(o+1)===ut&&t.charCodeAt(o+2)===fe))throw new ce(`Unterminated string: ${t.slice(r,o+1)+String.fromCharCode(i)}`,e?[e,r,o+1]:null);if(n===fe||n===ut&&t.charCodeAt(o+1)===fe)throw new ce(`Unterminated string: ${t.slice(r,o)+String.fromCharCode(i)}`,e?[e,r,o+1]:null)}return r}function xe(t){if(arguments.length===0)throw new TypeError("`CSS.escape` requires an argument.");let r=String(t),i=r.length,e=-1,n,o="",l=r.charCodeAt(0);if(i===1&&l===45)return"\\"+r;for(;++e<i;){if(n=r.charCodeAt(e),n===0){o+="\uFFFD";continue}if(n>=1&&n<=31||n===127||e===0&&n>=48&&n<=57||e===1&&n>=48&&n<=57&&l===45){o+="\\"+n.toString(16)+" ";continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=r.charAt(e);continue}o+="\\"+r.charAt(e)}return o}function ye(t){return t.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,r=>{if(r.length<=2)return r[1];let i=Number.parseInt(r.slice(1).trim(),16);return i===0||i>1114111||i>=55296&&i<=57343?"\uFFFD":String.fromCodePoint(i)})}var vr=new Map([["--font",["--font-weight","--font-size"]],["--inset",["--inset-shadow","--inset-ring"]],["--text",["--text-color","--text-decoration-color","--text-decoration-thickness","--text-indent","--text-shadow","--text-underline-offset"]],["--grid-column",["--grid-column-start","--grid-column-end"]],["--grid-row",["--grid-row-start","--grid-row-end"]]]);function hr(t,r){return(vr.get(r)??[]).some(i=>t===i||t.startsWith(`${i}-`))}var ct=class{constructor(r=new Map,i=new Set([])){this.values=r;this.keyframes=i}prefix=null;get size(){return this.values.size}add(r,i,e=0,n){if(r.endsWith("-*")){if(i!=="initial")throw new Error(`Invalid theme value \`${i}\` for namespace \`${r}\``);r==="--*"?this.values.clear():this.clearNamespace(r.slice(0,-2),0)}if(e&4){let o=this.values.get(r);if(o&&!(o.options&4))return}i==="initial"?this.values.delete(r):this.values.set(r,{value:i,options:e,src:n})}keysInNamespaces(r){let i=[];for(let e of r){let n=`${e}-`;for(let o of this.values.keys())o.startsWith(n)&&o.indexOf("--",2)===-1&&(hr(o,e)||i.push(o.slice(n.length)))}return i}get(r){for(let i of r){let e=this.values.get(i);if(e)return e.value}return null}hasDefault(r){return(this.getOptions(r)&4)===4}getOptions(r){return r=ye(this.#r(r)),this.values.get(r)?.options??0}entries(){return this.prefix?Array.from(this.values,r=>(r[0]=this.prefixKey(r[0]),r)):this.values.entries()}prefixKey(r){return this.prefix?`--${this.prefix}-${r.slice(2)}`:r}#r(r){return this.prefix?`--${r.slice(3+this.prefix.length)}`:r}clearNamespace(r,i){let e=vr.get(r)??[];e:for(let n of this.values.keys())if(n.startsWith(r)){if(i!==0&&(this.getOptions(n)&i)!==i)continue;for(let o of e)if(n.startsWith(o))continue e;this.values.delete(n)}}#e(r,i){for(let e of i){let n=r!==null?`${e}-${r}`:e;if(!this.values.has(n))if(r!==null&&r.includes(".")){if(n=`${e}-${r.replaceAll(".","_")}`,!this.values.has(n))continue}else continue;if(!hr(n,e))return n}return null}#t(r){let i=this.values.get(r);if(!i)return null;let e=null;return i.options&2&&(e=i.value),`var(${xe(this.prefixKey(r))}${e?`, ${e}`:""})`}markUsedVariable(r){let i=ye(this.#r(r)),e=this.values.get(i);if(!e)return!1;let n=e.options&16;return e.options|=16,!n}resolve(r,i,e=0){let n=this.#e(r,i);if(!n)return null;let o=this.values.get(n);return(e|o.options)&1?o.value:this.#t(n)}resolveValue(r,i){let e=this.#e(r,i);return e?this.values.get(e).value:null}resolveWith(r,i,e=[]){let n=this.#e(r,i);if(!n)return null;let o={};for(let c of e){let u=`${n}${c}`,f=this.values.get(u);f&&(f.options&1?o[c]=f.value:o[c]=this.#t(u))}let l=this.values.get(n);return l.options&1?[l.value,o]:[this.#t(n),o]}namespace(r){let i=new Map,e=`${r}-`;for(let[n,o]of this.values)n===r?i.set(null,o.value):n.startsWith(`${e}-`)?i.set(n.slice(r.length),o.value):n.startsWith(e)&&i.set(n.slice(e.length),o.value);return i}addKeyframes(r){this.keyframes.add(r)}getKeyframes(){return Array.from(this.keyframes)}};var z=class extends Map{constructor(i){super();this.factory=i}get(i){let e=super.get(i);return e===void 0&&(e=this.factory(i,this),this.set(i,e)),e}};function ne(t){return{kind:"word",value:t}}function ln(t,r){return{kind:"function",value:t,nodes:r}}function an(t){return{kind:"separator",value:t}}function Y(t){let r="";for(let i of t)switch(i.kind){case"word":case"separator":{r+=i.value;break}case"function":r+=i.value+"("+Y(i.nodes)+")"}return r}var wr=92,on=41,yr=58,kr=44,sn=34,br=61,xr=62,Ar=60,Cr=10,un=40,fn=39,cn=47,$r=32,Sr=9;function F(t){t=t.replaceAll(`\r
|
|
2
2
|
`,`
|
|
3
3
|
`);let r=[],i=[],e=null,n="",o;for(let l=0;l<t.length;l++){let c=t.charCodeAt(l);switch(c){case wr:{n+=t[l]+t[l+1],l++;break}case cn:{if(n.length>0){let f=ne(n);e?e.nodes.push(f):r.push(f),n=""}let u=ne(t[l]);e?e.nodes.push(u):r.push(u);break}case yr:case kr:case br:case xr:case Ar:case Cr:case $r:case Sr:{if(n.length>0){let d=ne(n);e?e.nodes.push(d):r.push(d),n=""}let u=l,f=l+1;for(;f<t.length&&(o=t.charCodeAt(f),!(o!==yr&&o!==kr&&o!==br&&o!==xr&&o!==Ar&&o!==Cr&&o!==$r&&o!==Sr));f++);l=f-1;let m=an(t.slice(u,f));e?e.nodes.push(m):r.push(m);break}case fn:case sn:{let u=l;for(let f=l+1;f<t.length;f++)if(o=t.charCodeAt(f),o===wr)f+=1;else if(o===c){l=f;break}n+=t.slice(u,l+1);break}case un:{let u=ln(n,[]);n="",e?e.nodes.push(u):r.push(u),i.push(u),e=u;break}case on:{let u=i.pop();if(n.length>0){let f=ne(n);u?.nodes.push(f),n=""}i.length>0?e=i[i.length-1]:e=null;break}default:n+=String.fromCharCode(c)}}return n.length>0&&r.push(ne(n)),r}var _t=(l=>(l[l.Continue=0]="Continue",l[l.Skip=1]="Skip",l[l.Stop=2]="Stop",l[l.Replace=3]="Replace",l[l.ReplaceSkip=4]="ReplaceSkip",l[l.ReplaceStop=5]="ReplaceStop",l))(_t||{}),R={Continue:{kind:0},Skip:{kind:1},Stop:{kind:2},Replace:t=>({kind:3,nodes:Array.isArray(t)?t:[t]}),ReplaceSkip:t=>({kind:4,nodes:Array.isArray(t)?t:[t]}),ReplaceStop:t=>({kind:5,nodes:Array.isArray(t)?t:[t]})};function _(t,r){typeof r=="function"?Vr(t,r):Vr(t,r.enter,r.exit)}function Vr(t,r=()=>R.Continue,i=()=>R.Continue){let e={value:[t,0,null],prev:null},n={parent:null,depth:0,path(){let o=[],l=e;for(;l;){let c=l.value[2];c&&o.push(c),l=l.prev}return o.reverse(),o}};for(;e!==null;){let o=e.value,l=o[0],c=o[1],u=o[2];if(c>=l.length){e=e.prev,n.depth-=1;continue}if(n.parent=u,c>=0){let p=l[c],v=r(p,n)??R.Continue;switch(v.kind){case 0:{p.nodes&&p.nodes.length>0&&(n.depth+=1,e={value:[p.nodes,0,p],prev:e}),o[1]=~c;continue}case 2:return;case 1:{o[1]=~c;continue}case 3:{l.splice(c,1,...v.nodes);continue}case 5:{l.splice(c,1,...v.nodes);return}case 4:{l.splice(c,1,...v.nodes),o[1]+=v.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${_t[v.kind]??`Unknown(${v.kind})`}\` in enter.`)}}let f=~c,m=l[f],d=i(m,n)??R.Continue;switch(d.kind){case 0:o[1]=f+1;continue;case 2:return;case 3:{l.splice(f,1,...d.nodes),o[1]=f+d.nodes.length;continue}case 5:{l.splice(f,1,...d.nodes);return}case 4:{l.splice(f,1,...d.nodes),o[1]=f+d.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${_t[d.kind]??`Unknown(${d.kind})`}\` in exit.`)}}}function pt(t){let r=[];return _(F(t),i=>{if(!(i.kind!=="function"||i.value!=="var"))return _(i.nodes,e=>{e.kind!=="word"||e.value[0]!=="-"||e.value[1]!=="-"||r.push(e.value)}),R.Skip}),r}var pn=64;function q(t,r=[]){return{kind:"rule",selector:t,nodes:r}}function W(t,r="",i=[]){return{kind:"at-rule",name:t,params:r,nodes:i}}function J(t,r=[]){return t.charCodeAt(0)===pn?qe(t,r):q(t,r)}function a(t,r,i=!1){return{kind:"declaration",property:t,value:r,important:i}}function ft(t){return{kind:"comment",value:t}}function ge(t,r){return{kind:"context",context:t,nodes:r}}function B(t){return{kind:"at-root",nodes:t}}function te(t){switch(t.kind){case"rule":return{kind:t.kind,selector:t.selector,nodes:t.nodes.map(te),src:t.src,dst:t.dst};case"at-rule":return{kind:t.kind,name:t.name,params:t.params,nodes:t.nodes.map(te),src:t.src,dst:t.dst};case"at-root":return{kind:t.kind,nodes:t.nodes.map(te),src:t.src,dst:t.dst};case"context":return{kind:t.kind,context:{...t.context},nodes:t.nodes.map(te),src:t.src,dst:t.dst};case"declaration":return{kind:t.kind,property:t.property,value:t.value,important:t.important,src:t.src,dst:t.dst};case"comment":return{kind:t.kind,value:t.value,src:t.src,dst:t.dst};default:throw new Error(`Unknown node kind: ${t.kind}`)}}function He(t){return{depth:t.depth,get context(){let r={};for(let i of t.path())i.kind==="context"&&Object.assign(r,i.context);return Object.defineProperty(this,"context",{value:r}),r},get parent(){let r=this.path().pop()??null;return Object.defineProperty(this,"parent",{value:r}),r},path(){return t.path().filter(r=>r.kind!=="context")}}}function Ne(t,r,i=3){let e=[],n=new Set,o=new z(()=>new Set),l=new z(()=>new Set),c=new Set,u=new Set,f=[],m=[],d=new z(()=>new Set);function p(h,y,b={},T=0){if(h.kind==="declaration"){if(h.property==="--tw-sort"||h.value===void 0||h.value===null)return;if(b.theme&&h.property[0]==="-"&&h.property[1]==="-"){if(h.value==="initial"){h.value=void 0;return}b.keyframes||o.get(y).add(h)}if(h.value.includes("var("))if(b.theme&&h.property[0]==="-"&&h.property[1]==="-")for(let A of pt(h.value))d.get(A).add(h.property);else r.trackUsedVariables(h.value);if(h.property==="animation")for(let A of Tr(h.value))u.add(A);i&2&&h.value.includes("color-mix(")&&!b.supportsColorMix&&!b.keyframes&&l.get(y).add(h),y.push(h)}else if(h.kind==="rule"){let A=[];for(let N of h.nodes)p(N,A,b,T+1);let k={},D=new Set;for(let N of A){if(N.kind!=="declaration")continue;let E=`${N.property}:${N.value}:${N.important}`;k[E]??=[],k[E].push(N)}for(let N in k)for(let E=0;E<k[N].length-1;++E)D.add(k[N][E]);if(D.size>0&&(A=A.filter(N=>!D.has(N))),A.length===0)return;h.selector==="&"?y.push(...A):y.push({...h,nodes:A})}else if(h.kind==="at-rule"&&h.name==="@property"&&T===0){if(n.has(h.params))return;if(i&1){let k=h.params,D=null,N=!1;for(let U of h.nodes)U.kind==="declaration"&&(U.property==="initial-value"?D=U.value:U.property==="inherits"&&(N=U.value==="true"));let E=a(k,D??"initial");E.src=h.src,N?f.push(E):m.push(E)}n.add(h.params);let A={...h,nodes:[]};for(let k of h.nodes)p(k,A.nodes,b,T+1);y.push(A)}else if(h.kind==="at-rule"){h.name==="@keyframes"?b={...b,keyframes:!0}:h.name==="@supports"&&h.params.includes("color-mix(")&&(b={...b,supportsColorMix:!0});let A={...h,nodes:[]};for(let k of h.nodes)p(k,A.nodes,b,T+1);h.name==="@keyframes"&&b.theme&&c.add(A),(A.nodes.length>0||A.name==="@layer"||A.name==="@charset"||A.name==="@custom-media"||A.name==="@namespace"||A.name==="@import")&&y.push(A)}else if(h.kind==="at-root")for(let A of h.nodes){let k=[];p(A,k,b,0);for(let D of k)e.push(D)}else if(h.kind==="context"){if(h.context.reference)return;for(let A of h.nodes)p(A,y,{...b,...h.context},T)}else h.kind==="comment"&&y.push(h)}let v=[];for(let h of t)p(h,v,{},0);e:for(let[h,y]of o)for(let b of y){if(Nr(b.property,r.theme,d)){if(b.property.startsWith(r.theme.prefixKey("--animate-")))for(let k of Tr(b.value))u.add(k);continue}let A=h.indexOf(b);if(h.splice(A,1),h.length===0){let k=dn(v,D=>D.kind==="rule"&&D.nodes===h);if(!k||k.length===0)continue e;k.unshift({kind:"at-root",nodes:v});do{let D=k.pop();if(!D)break;let N=k[k.length-1];if(!N||N.kind!=="at-root"&&N.kind!=="at-rule")break;let E=N.nodes.indexOf(D);if(E===-1)break;N.nodes.splice(E,1)}while(!0);continue e}}for(let h of c)if(!u.has(h.params)){let y=e.indexOf(h);e.splice(y,1)}if(v=v.concat(e),i&2)for(let[h,y]of l)for(let b of y){let T=h.indexOf(b);if(T===-1||b.value==null)continue;let A=F(b.value),k=!1;if(_(A,E=>{if(E.kind!=="function"||E.value!=="color-mix")return;let U=!1,P=!1;if(_(E.nodes,j=>{if(j.kind=="word"&&j.value.toLowerCase()==="currentcolor"){P=!0,k=!0;return}let G=j,Z=null,se=new Set;do{if(G.kind!=="function"||G.value!=="var")return;let ue=G.nodes[0];if(!ue||ue.kind!=="word")return;let s=ue.value;if(se.has(s)){U=!0;return}if(se.add(s),k=!0,Z=r.theme.resolveValue(null,[ue.value]),!Z){U=!0;return}if(Z.toLowerCase()==="currentcolor"){P=!0;return}Z.startsWith("var(")?G=F(Z)[0]:G=null}while(G);return R.Replace({kind:"word",value:Z})}),U||P){let j=E.nodes.findIndex(Z=>Z.kind==="separator"&&Z.value.trim().includes(","));if(j===-1)return;let G=E.nodes.length>j?E.nodes[j+1]:null;return G?R.Replace(G):void 0}else if(k){let j=E.nodes[2];j.kind==="word"&&(j.value==="oklab"||j.value==="oklch"||j.value==="lab"||j.value==="lch")&&(j.value="srgb")}}),!k)continue;let D={...b,value:Y(A)},N=J("@supports (color: color-mix(in lab, red, red))",[b]);N.src=b.src,h.splice(T,1,D,N)}if(i&1){let h=[];if(f.length>0){let y=J(":root, :host",f);y.src=f[0].src,h.push(y)}if(m.length>0){let y=J("*, ::before, ::after, ::backdrop",m);y.src=m[0].src,h.push(y)}if(h.length>0){let y=v.findIndex(A=>!(A.kind==="comment"||A.kind==="at-rule"&&(A.name==="@charset"||A.name==="@import"))),b=W("@layer","properties",[]);b.src=h[0].src,v.splice(y<0?v.length:y,0,b);let T=J("@layer properties",[W("@supports","((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))",h)]);T.src=h[0].src,T.nodes[0].src=h[0].src,v.push(T)}}return v}function ie(t,r){let i=0,e={file:null,code:""};function n(l,c=0){let u="",f=" ".repeat(c);if(l.kind==="declaration"){if(u+=`${f}${l.property}: ${l.value}${l.important?" !important":""};
|
|
4
4
|
`,r){i+=f.length;let m=i;i+=l.property.length,i+=2,i+=l.value?.length??0,l.important&&(i+=11);let d=i;i+=2,l.dst=[e,m,d]}}else if(l.kind==="rule"){if(u+=`${f}${l.selector} {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-3IR7ZFJX.mjs";import"./chunk-TDNFF6A4.mjs";import"./chunk-X4GG3EDV.mjs";function i(r){let n={};for(let[e,t]of Object.entries(r??{}))if(e!=="__CSS_VALUES__")if(typeof t=="object"&&t!==null)for(let[o,f]of Object.entries(i(t)))n[`${e}${o==="DEFAULT"?"":`-${o}`}`]=f;else n[e]=t;if("__CSS_VALUES__"in r)for(let[e,t]of Object.entries(r.__CSS_VALUES__))(Number(t)&4)===0&&(n[e]=r[e]);return n}export{i as default};
|
package/dist/lib.d.mts
CHANGED
|
@@ -99,7 +99,7 @@ declare class Variants {
|
|
|
99
99
|
compoundsWith: Compounds;
|
|
100
100
|
compounds: Compounds;
|
|
101
101
|
} | undefined;
|
|
102
|
-
kind(name: string): "
|
|
102
|
+
kind(name: string): "static" | "arbitrary" | "functional" | "compound";
|
|
103
103
|
compoundsWith(parent: string, child: string | Variant): boolean;
|
|
104
104
|
suggest(name: string, suggestions: () => string[]): void;
|
|
105
105
|
getCompletions(name: string): string[];
|
package/dist/lib.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var wn=Object.defineProperty;var bn=(e,r)=>{for(var i in r)wn(e,i,{get:r[i],enumerable:!0})};var Kt={};bn(Kt,{Features:()=>Ie,Polyfills:()=>bt,__unstable__loadDesignSystem:()=>pa,compile:()=>fa,compileAst:()=>kn,default:()=>ft});var wr="4.2.
|
|
1
|
+
"use strict";var wn=Object.defineProperty;var bn=(e,r)=>{for(var i in r)wn(e,i,{get:r[i],enumerable:!0})};var Kt={};bn(Kt,{Features:()=>Ie,Polyfills:()=>bt,__unstable__loadDesignSystem:()=>pa,compile:()=>fa,compileAst:()=>kn,default:()=>ft});var wr="4.2.4";function pt(e){let r=[0];for(let n=0;n<e.length;n++)e.charCodeAt(n)===10&&r.push(n+1);function i(n){let a=0,o=r.length;for(;o>0;){let u=(o|0)>>1,c=a+u;r[c]<=n?(a=c+1,o=o-u-1):o=u}a-=1;let f=n-r[a];return{line:a+1,column:f}}function t({line:n,column:a}){n-=1,n=Math.min(Math.max(n,0),r.length-1);let o=r[n],f=r[n+1]??o;return Math.min(Math.max(o+a,0),f)}return{find:i,findOffset:t}}var Qe=92,dt=47,mt=42,br=34,yr=39,xn=58,gt=59,fe=10,ht=13,Je=32,Xe=9,xr=123,jt=125,Bt=40,Ar=41,An=91,Cn=93,Cr=45,Ft=64,Sn=33,pe=class e extends Error{loc;constructor(r,i){if(i){let t=i[0],n=pt(t.code).find(i[1]);r=`${t.file}:${n.line}:${n.column+1}: ${r}`}super(r),this.name="CssSyntaxError",this.loc=i,Error.captureStackTrace&&Error.captureStackTrace(this,e)}};function Oe(e,r){let i=r?.from?{file:r.from,code:e}:null;e[0]==="\uFEFF"&&(e=" "+e.slice(1));let t=[],n=[],a=[],o=null,f=null,u="",c="",m=0,d;for(let p=0;p<e.length;p++){let v=e.charCodeAt(p);if(!(v===ht&&(d=e.charCodeAt(p+1),d===fe)))if(v===Qe)u===""&&(m=p),u+=e.slice(p,p+2),p+=1;else if(v===dt&&e.charCodeAt(p+1)===mt){let h=p;for(let y=p+2;y<e.length;y++)if(d=e.charCodeAt(y),d===Qe)y+=1;else if(d===mt&&e.charCodeAt(y+1)===dt){p=y+1;break}let w=e.slice(h,p+1);if(w.charCodeAt(2)===Sn){let y=vt(w.slice(2,-2));n.push(y),i&&(y.src=[i,h,p+1],y.dst=[i,h,p+1])}}else if(v===yr||v===br){let h=Sr(e,p,v,i);u+=e.slice(p,h+1),p=h}else{if((v===Je||v===fe||v===Xe)&&(d=e.charCodeAt(p+1))&&(d===Je||d===fe||d===Xe||d===ht&&(d=e.charCodeAt(p+2))&&d==fe))continue;if(v===fe){if(u.length===0)continue;d=u.charCodeAt(u.length-1),d!==Je&&d!==fe&&d!==Xe&&(u+=" ")}else if(v===Cr&&e.charCodeAt(p+1)===Cr&&u.length===0){let h="",w=p,y=-1;for(let A=p+2;A<e.length;A++)if(d=e.charCodeAt(A),d===Qe)A+=1;else if(d===yr||d===br)A=Sr(e,A,d,i);else if(d===dt&&e.charCodeAt(A+1)===mt){for(let b=A+2;b<e.length;b++)if(d=e.charCodeAt(b),d===Qe)b+=1;else if(d===mt&&e.charCodeAt(b+1)===dt){A=b+1;break}}else if(y===-1&&d===xn)y=u.length+A-w;else if(d===gt&&h.length===0){u+=e.slice(w,A),p=A;break}else if(d===Bt)h+=")";else if(d===An)h+="]";else if(d===xr)h+="}";else if((d===jt||e.length-1===A)&&h.length===0){p=A-1,u+=e.slice(w,A);break}else(d===Ar||d===Cn||d===jt)&&h.length>0&&e[A]===h[h.length-1]&&(h=h.slice(0,-1));let V=Wt(u,y);if(!V)throw new pe("Invalid custom property, expected a value",i?[i,w,p]:null);i&&(V.src=[i,w,p],V.dst=[i,w,p]),o?o.nodes.push(V):t.push(V),u=""}else if(v===gt&&u.charCodeAt(0)===Ft)f=et(u),i&&(f.src=[i,m,p],f.dst=[i,m,p]),o?o.nodes.push(f):t.push(f),u="",f=null;else if(v===gt&&c[c.length-1]!==")"){let h=Wt(u);if(!h){if(u.length===0)continue;throw new pe(`Invalid declaration: \`${u.trim()}\``,i?[i,m,p]:null)}i&&(h.src=[i,m,p],h.dst=[i,m,p]),o?o.nodes.push(h):t.push(h),u=""}else if(v===xr&&c[c.length-1]!==")")c+="}",f=Z(u.trim()),i&&(f.src=[i,m,p],f.dst=[i,m,p]),o&&o.nodes.push(f),a.push(o),o=f,u="",f=null;else if(v===jt&&c[c.length-1]!==")"){if(c==="")throw new pe("Missing opening {",i?[i,p,p]:null);if(c=c.slice(0,-1),u.length>0)if(u.charCodeAt(0)===Ft)f=et(u),i&&(f.src=[i,m,p],f.dst=[i,m,p]),o?o.nodes.push(f):t.push(f),u="",f=null;else{let w=u.indexOf(":");if(o){let y=Wt(u,w);if(!y)throw new pe(`Invalid declaration: \`${u.trim()}\``,i?[i,m,p]:null);i&&(y.src=[i,m,p],y.dst=[i,m,p]),o.nodes.push(y)}}let h=a.pop()??null;h===null&&o&&t.push(o),o=h,u="",f=null}else if(v===Bt)c+=")",u+="(";else if(v===Ar){if(c[c.length-1]!==")")throw new pe("Missing opening (",i?[i,p,p]:null);c=c.slice(0,-1),u+=")"}else{if(u.length===0&&(v===Je||v===fe||v===Xe))continue;u===""&&(m=p),u+=String.fromCharCode(v)}}}if(u.charCodeAt(0)===Ft){let p=et(u);i&&(p.src=[i,m,e.length],p.dst=[i,m,e.length]),t.push(p)}if(c.length>0&&o){if(o.kind==="rule")throw new pe(`Missing closing } at ${o.selector}`,o.src?[o.src[0],o.src[1],o.src[1]]:null);if(o.kind==="at-rule")throw new pe(`Missing closing } at ${o.name} ${o.params}`,o.src?[o.src[0],o.src[1],o.src[1]]:null)}return n.length>0?n.concat(t):t}function et(e,r=[]){let i=e,t="";for(let n=5;n<e.length;n++){let a=e.charCodeAt(n);if(a===Je||a===Xe||a===Bt){i=e.slice(0,n),t=e.slice(n);break}}return W(i.trim(),t.trim(),r)}function Wt(e,r=e.indexOf(":")){if(r===-1)return null;let i=e.indexOf("!important",r+1);return l(e.slice(0,r).trim(),e.slice(r+1,i===-1?e.length:i).trim(),i!==-1)}function Sr(e,r,i,t=null){let n;for(let a=r+1;a<e.length;a++)if(n=e.charCodeAt(a),n===Qe)a+=1;else{if(n===i)return a;if(n===gt&&(e.charCodeAt(a+1)===fe||e.charCodeAt(a+1)===ht&&e.charCodeAt(a+2)===fe))throw new pe(`Unterminated string: ${e.slice(r,a+1)+String.fromCharCode(i)}`,t?[t,r,a+1]:null);if(n===fe||n===ht&&e.charCodeAt(a+1)===fe)throw new pe(`Unterminated string: ${e.slice(r,a)+String.fromCharCode(i)}`,t?[t,r,a+1]:null)}return r}function Se(e){if(arguments.length===0)throw new TypeError("`CSS.escape` requires an argument.");let r=String(e),i=r.length,t=-1,n,a="",o=r.charCodeAt(0);if(i===1&&o===45)return"\\"+r;for(;++t<i;){if(n=r.charCodeAt(t),n===0){a+="\uFFFD";continue}if(n>=1&&n<=31||n===127||t===0&&n>=48&&n<=57||t===1&&n>=48&&n<=57&&o===45){a+="\\"+n.toString(16)+" ";continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){a+=r.charAt(t);continue}a+="\\"+r.charAt(t)}return a}function ye(e){return e.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,r=>{if(r.length<=2)return r[1];let i=Number.parseInt(r.slice(1).trim(),16);return i===0||i>1114111||i>=55296&&i<=57343?"\uFFFD":String.fromCodePoint(i)})}var Tr=new Map([["--font",["--font-weight","--font-size"]],["--inset",["--inset-shadow","--inset-ring"]],["--text",["--text-color","--text-decoration-color","--text-decoration-thickness","--text-indent","--text-shadow","--text-underline-offset"]],["--grid-column",["--grid-column-start","--grid-column-end"]],["--grid-row",["--grid-row-start","--grid-row-end"]]]);function $r(e,r){return(Tr.get(r)??[]).some(i=>e===i||e.startsWith(`${i}-`))}var kt=class{constructor(r=new Map,i=new Set([])){this.values=r;this.keyframes=i}prefix=null;get size(){return this.values.size}add(r,i,t=0,n){if(r.endsWith("-*")){if(i!=="initial")throw new Error(`Invalid theme value \`${i}\` for namespace \`${r}\``);r==="--*"?this.values.clear():this.clearNamespace(r.slice(0,-2),0)}if(t&4){let a=this.values.get(r);if(a&&!(a.options&4))return}i==="initial"?this.values.delete(r):this.values.set(r,{value:i,options:t,src:n})}keysInNamespaces(r){let i=[];for(let t of r){let n=`${t}-`;for(let a of this.values.keys())a.startsWith(n)&&a.indexOf("--",2)===-1&&($r(a,t)||i.push(a.slice(n.length)))}return i}get(r){for(let i of r){let t=this.values.get(i);if(t)return t.value}return null}hasDefault(r){return(this.getOptions(r)&4)===4}getOptions(r){return r=ye(this.#r(r)),this.values.get(r)?.options??0}entries(){return this.prefix?Array.from(this.values,r=>(r[0]=this.prefixKey(r[0]),r)):this.values.entries()}prefixKey(r){return this.prefix?`--${this.prefix}-${r.slice(2)}`:r}#r(r){return this.prefix?`--${r.slice(3+this.prefix.length)}`:r}clearNamespace(r,i){let t=Tr.get(r)??[];e:for(let n of this.values.keys())if(n.startsWith(r)){if(i!==0&&(this.getOptions(n)&i)!==i)continue;for(let a of t)if(n.startsWith(a))continue e;this.values.delete(n)}}#e(r,i){for(let t of i){let n=r!==null?`${t}-${r}`:t;if(!this.values.has(n))if(r!==null&&r.includes(".")){if(n=`${t}-${r.replaceAll(".","_")}`,!this.values.has(n))continue}else continue;if(!$r(n,t))return n}return null}#t(r){let i=this.values.get(r);if(!i)return null;let t=null;return i.options&2&&(t=i.value),`var(${Se(this.prefixKey(r))}${t?`, ${t}`:""})`}markUsedVariable(r){let i=ye(this.#r(r)),t=this.values.get(i);if(!t)return!1;let n=t.options&16;return t.options|=16,!n}resolve(r,i,t=0){let n=this.#e(r,i);if(!n)return null;let a=this.values.get(n);return(t|a.options)&1?a.value:this.#t(n)}resolveValue(r,i){let t=this.#e(r,i);return t?this.values.get(t).value:null}resolveWith(r,i,t=[]){let n=this.#e(r,i);if(!n)return null;let a={};for(let f of t){let u=`${n}${f}`,c=this.values.get(u);c&&(c.options&1?a[f]=c.value:a[f]=this.#t(u))}let o=this.values.get(n);return o.options&1?[o.value,a]:[this.#t(n),a]}namespace(r){let i=new Map,t=`${r}-`;for(let[n,a]of this.values)n===r?i.set(null,a.value):n.startsWith(`${t}-`)?i.set(n.slice(r.length),a.value):n.startsWith(t)&&i.set(n.slice(t.length),a.value);return i}addKeyframes(r){this.keyframes.add(r)}getKeyframes(){return Array.from(this.keyframes)}};var z=class extends Map{constructor(i){super();this.factory=i}get(i){let t=super.get(i);return t===void 0&&(t=this.factory(i,this),this.set(i,t)),t}};function oe(e){return{kind:"word",value:e}}function $n(e,r){return{kind:"function",value:e,nodes:r}}function Tn(e){return{kind:"separator",value:e}}function Y(e){let r="";for(let i of e)switch(i.kind){case"word":case"separator":{r+=i.value;break}case"function":r+=i.value+"("+Y(i.nodes)+")"}return r}var Vr=92,Vn=41,Er=58,Nr=44,En=34,Rr=61,Or=62,Pr=60,_r=10,Nn=40,Rn=39,On=47,Ir=32,Dr=9;function F(e){e=e.replaceAll(`\r
|
|
2
2
|
`,`
|
|
3
3
|
`);let r=[],i=[],t=null,n="",a;for(let o=0;o<e.length;o++){let f=e.charCodeAt(o);switch(f){case Vr:{n+=e[o]+e[o+1],o++;break}case On:{if(n.length>0){let c=oe(n);t?t.nodes.push(c):r.push(c),n=""}let u=oe(e[o]);t?t.nodes.push(u):r.push(u);break}case Er:case Nr:case Rr:case Or:case Pr:case _r:case Ir:case Dr:{if(n.length>0){let d=oe(n);t?t.nodes.push(d):r.push(d),n=""}let u=o,c=o+1;for(;c<e.length&&(a=e.charCodeAt(c),!(a!==Er&&a!==Nr&&a!==Rr&&a!==Or&&a!==Pr&&a!==_r&&a!==Ir&&a!==Dr));c++);o=c-1;let m=Tn(e.slice(u,c));t?t.nodes.push(m):r.push(m);break}case Rn:case En:{let u=o;for(let c=o+1;c<e.length;c++)if(a=e.charCodeAt(c),a===Vr)c+=1;else if(a===f){o=c;break}n+=e.slice(u,o+1);break}case Nn:{let u=$n(n,[]);n="",t?t.nodes.push(u):r.push(u),i.push(u),t=u;break}case Vn:{let u=i.pop();if(n.length>0){let c=oe(n);u?.nodes.push(c),n=""}i.length>0?t=i[i.length-1]:t=null;break}default:n+=String.fromCharCode(f)}}return n.length>0&&r.push(oe(n)),r}var qt=(o=>(o[o.Continue=0]="Continue",o[o.Skip=1]="Skip",o[o.Stop=2]="Stop",o[o.Replace=3]="Replace",o[o.ReplaceSkip=4]="ReplaceSkip",o[o.ReplaceStop=5]="ReplaceStop",o))(qt||{}),R={Continue:{kind:0},Skip:{kind:1},Stop:{kind:2},Replace:e=>({kind:3,nodes:Array.isArray(e)?e:[e]}),ReplaceSkip:e=>({kind:4,nodes:Array.isArray(e)?e:[e]}),ReplaceStop:e=>({kind:5,nodes:Array.isArray(e)?e:[e]})};function I(e,r){typeof r=="function"?Ur(e,r):Ur(e,r.enter,r.exit)}function Ur(e,r=()=>R.Continue,i=()=>R.Continue){let t={value:[e,0,null],prev:null},n={parent:null,depth:0,path(){let a=[],o=t;for(;o;){let f=o.value[2];f&&a.push(f),o=o.prev}return a.reverse(),a}};for(;t!==null;){let a=t.value,o=a[0],f=a[1],u=a[2];if(f>=o.length){t=t.prev,n.depth-=1;continue}if(n.parent=u,f>=0){let p=o[f],v=r(p,n)??R.Continue;switch(v.kind){case 0:{p.nodes&&p.nodes.length>0&&(n.depth+=1,t={value:[p.nodes,0,p],prev:t}),a[1]=~f;continue}case 2:return;case 1:{a[1]=~f;continue}case 3:{o.splice(f,1,...v.nodes);continue}case 5:{o.splice(f,1,...v.nodes);return}case 4:{o.splice(f,1,...v.nodes),a[1]+=v.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${qt[v.kind]??`Unknown(${v.kind})`}\` in enter.`)}}let c=~f,m=o[c],d=i(m,n)??R.Continue;switch(d.kind){case 0:a[1]=c+1;continue;case 2:return;case 3:{o.splice(c,1,...d.nodes),a[1]=c+d.nodes.length;continue}case 5:{o.splice(c,1,...d.nodes);return}case 4:{o.splice(c,1,...d.nodes),a[1]=c+d.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${qt[d.kind]??`Unknown(${d.kind})`}\` in exit.`)}}}function wt(e){let r=[];return I(F(e),i=>{if(!(i.kind!=="function"||i.value!=="var"))return I(i.nodes,t=>{t.kind!=="word"||t.value[0]!=="-"||t.value[1]!=="-"||r.push(t.value)}),R.Skip}),r}var Pn=64;function G(e,r=[]){return{kind:"rule",selector:e,nodes:r}}function W(e,r="",i=[]){return{kind:"at-rule",name:e,params:r,nodes:i}}function Z(e,r=[]){return e.charCodeAt(0)===Pn?et(e,r):G(e,r)}function l(e,r,i=!1){return{kind:"declaration",property:e,value:r,important:i}}function vt(e){return{kind:"comment",value:e}}function ve(e,r){return{kind:"context",context:e,nodes:r}}function B(e){return{kind:"at-root",nodes:e}}function te(e){switch(e.kind){case"rule":return{kind:e.kind,selector:e.selector,nodes:e.nodes.map(te),src:e.src,dst:e.dst};case"at-rule":return{kind:e.kind,name:e.name,params:e.params,nodes:e.nodes.map(te),src:e.src,dst:e.dst};case"at-root":return{kind:e.kind,nodes:e.nodes.map(te),src:e.src,dst:e.dst};case"context":return{kind:e.kind,context:{...e.context},nodes:e.nodes.map(te),src:e.src,dst:e.dst};case"declaration":return{kind:e.kind,property:e.property,value:e.value,important:e.important,src:e.src,dst:e.dst};case"comment":return{kind:e.kind,value:e.value,src:e.src,dst:e.dst};default:throw new Error(`Unknown node kind: ${e.kind}`)}}function rt(e){return{depth:e.depth,get context(){let r={};for(let i of e.path())i.kind==="context"&&Object.assign(r,i.context);return Object.defineProperty(this,"context",{value:r}),r},get parent(){let r=this.path().pop()??null;return Object.defineProperty(this,"parent",{value:r}),r},path(){return e.path().filter(r=>r.kind!=="context")}}}function Pe(e,r,i=3){let t=[],n=new Set,a=new z(()=>new Set),o=new z(()=>new Set),f=new Set,u=new Set,c=[],m=[],d=new z(()=>new Set);function p(h,w,y={},V=0){if(h.kind==="declaration"){if(h.property==="--tw-sort"||h.value===void 0||h.value===null)return;if(y.theme&&h.property[0]==="-"&&h.property[1]==="-"){if(h.value==="initial"){h.value=void 0;return}y.keyframes||a.get(w).add(h)}if(h.value.includes("var("))if(y.theme&&h.property[0]==="-"&&h.property[1]==="-")for(let A of wt(h.value))d.get(A).add(h.property);else r.trackUsedVariables(h.value);if(h.property==="animation")for(let A of Lr(h.value))u.add(A);i&2&&h.value.includes("color-mix(")&&!y.supportsColorMix&&!y.keyframes&&o.get(w).add(h),w.push(h)}else if(h.kind==="rule"){let A=[];for(let E of h.nodes)p(E,A,y,V+1);let b={},D=new Set;for(let E of A){if(E.kind!=="declaration")continue;let N=`${E.property}:${E.value}:${E.important}`;b[N]??=[],b[N].push(E)}for(let E in b)for(let N=0;N<b[E].length-1;++N)D.add(b[E][N]);if(D.size>0&&(A=A.filter(E=>!D.has(E))),A.length===0)return;h.selector==="&"?w.push(...A):w.push({...h,nodes:A})}else if(h.kind==="at-rule"&&h.name==="@property"&&V===0){if(n.has(h.params))return;if(i&1){let b=h.params,D=null,E=!1;for(let L of h.nodes)L.kind==="declaration"&&(L.property==="initial-value"?D=L.value:L.property==="inherits"&&(E=L.value==="true"));let N=l(b,D??"initial");N.src=h.src,E?c.push(N):m.push(N)}n.add(h.params);let A={...h,nodes:[]};for(let b of h.nodes)p(b,A.nodes,y,V+1);w.push(A)}else if(h.kind==="at-rule"){h.name==="@keyframes"?y={...y,keyframes:!0}:h.name==="@supports"&&h.params.includes("color-mix(")&&(y={...y,supportsColorMix:!0});let A={...h,nodes:[]};for(let b of h.nodes)p(b,A.nodes,y,V+1);h.name==="@keyframes"&&y.theme&&f.add(A),(A.nodes.length>0||A.name==="@layer"||A.name==="@charset"||A.name==="@custom-media"||A.name==="@namespace"||A.name==="@import")&&w.push(A)}else if(h.kind==="at-root")for(let A of h.nodes){let b=[];p(A,b,y,0);for(let D of b)t.push(D)}else if(h.kind==="context"){if(h.context.reference)return;for(let A of h.nodes)p(A,w,{...y,...h.context},V)}else h.kind==="comment"&&w.push(h)}let v=[];for(let h of e)p(h,v,{},0);e:for(let[h,w]of a)for(let y of w){if(zr(y.property,r.theme,d)){if(y.property.startsWith(r.theme.prefixKey("--animate-")))for(let b of Lr(y.value))u.add(b);continue}let A=h.indexOf(y);if(h.splice(A,1),h.length===0){let b=_n(v,D=>D.kind==="rule"&&D.nodes===h);if(!b||b.length===0)continue e;b.unshift({kind:"at-root",nodes:v});do{let D=b.pop();if(!D)break;let E=b[b.length-1];if(!E||E.kind!=="at-root"&&E.kind!=="at-rule")break;let N=E.nodes.indexOf(D);if(N===-1)break;E.nodes.splice(N,1)}while(!0);continue e}}for(let h of f)if(!u.has(h.params)){let w=t.indexOf(h);t.splice(w,1)}if(v=v.concat(t),i&2)for(let[h,w]of o)for(let y of w){let V=h.indexOf(y);if(V===-1||y.value==null)continue;let A=F(y.value),b=!1;if(I(A,N=>{if(N.kind!=="function"||N.value!=="color-mix")return;let L=!1,_=!1;if(I(N.nodes,M=>{if(M.kind=="word"&&M.value.toLowerCase()==="currentcolor"){_=!0,b=!0;return}let q=M,H=null,ue=new Set;do{if(q.kind!=="function"||q.value!=="var")return;let ce=q.nodes[0];if(!ce||ce.kind!=="word")return;let s=ce.value;if(ue.has(s)){L=!0;return}if(ue.add(s),b=!0,H=r.theme.resolveValue(null,[ce.value]),!H){L=!0;return}if(H.toLowerCase()==="currentcolor"){_=!0;return}H.startsWith("var(")?q=F(H)[0]:q=null}while(q);return R.Replace({kind:"word",value:H})}),L||_){let M=N.nodes.findIndex(H=>H.kind==="separator"&&H.value.trim().includes(","));if(M===-1)return;let q=N.nodes.length>M?N.nodes[M+1]:null;return q?R.Replace(q):void 0}else if(b){let M=N.nodes[2];M.kind==="word"&&(M.value==="oklab"||M.value==="oklch"||M.value==="lab"||M.value==="lch")&&(M.value="srgb")}}),!b)continue;let D={...y,value:Y(A)},E=Z("@supports (color: color-mix(in lab, red, red))",[y]);E.src=y.src,h.splice(V,1,D,E)}if(i&1){let h=[];if(c.length>0){let w=Z(":root, :host",c);w.src=c[0].src,h.push(w)}if(m.length>0){let w=Z("*, ::before, ::after, ::backdrop",m);w.src=m[0].src,h.push(w)}if(h.length>0){let w=v.findIndex(A=>!(A.kind==="comment"||A.kind==="at-rule"&&(A.name==="@charset"||A.name==="@import"))),y=W("@layer","properties",[]);y.src=h[0].src,v.splice(w<0?v.length:w,0,y);let V=Z("@layer properties",[W("@supports","((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))",h)]);V.src=h[0].src,V.nodes[0].src=h[0].src,v.push(V)}}return v}function ne(e,r){let i=0,t={file:null,code:""};function n(o,f=0){let u="",c=" ".repeat(f);if(o.kind==="declaration"){if(u+=`${c}${o.property}: ${o.value}${o.important?" !important":""};
|
|
4
4
|
`,r){i+=c.length;let m=i;i+=o.property.length,i+=2,i+=o.value?.length??0,o.important&&(i+=11);let d=i;i+=2,o.dst=[t,m,d]}}else if(o.kind==="rule"){if(u+=`${c}${o.selector} {
|
package/dist/lib.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f}from"./chunk-3IR7ZFJX.mjs";import"./chunk-TDNFF6A4.mjs";import"./chunk-X4GG3EDV.mjs";export{b as Features,a as Polyfills,e as __unstable__loadDesignSystem,d as compile,c as compileAst,f as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.4",
|
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"lightningcss": "1.32.0",
|
|
79
79
|
"magic-string": "^0.30.21",
|
|
80
80
|
"source-map-js": "^1.2.1",
|
|
81
|
-
"@tailwindcss/oxide": "^4.2.
|
|
81
|
+
"@tailwindcss/oxide": "^4.2.4"
|
|
82
82
|
},
|
|
83
83
|
"scripts": {
|
|
84
84
|
"lint": "tsc --noEmit",
|