tailwindcss 4.0.2 → 4.0.3

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/dist/lib.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";var Ir=Object.defineProperty;var zr=(t,r)=>{for(var n in r)Ir(t,n,{get:r[n],enumerable:!0})};var Ye={};zr(Ye,{Features:()=>pe,__unstable__loadDesignSystem:()=>yi,compile:()=>vi,compileAst:()=>Fr,default:()=>Te});var bt="4.0.2";var ye=92,Se=47,Ee=42,Mr=34,Wr=39,Br=58,Re=59,re=10,be=32,Oe=9,wt=123,Ze=125,et=40,kt=41,qr=91,Hr=93,xt=45,Qe=64,Gr=33;function ne(t){t=t.replaceAll(`\r
1
+ "use strict";var Ir=Object.defineProperty;var zr=(t,r)=>{for(var n in r)Ir(t,n,{get:r[n],enumerable:!0})};var Ye={};zr(Ye,{Features:()=>pe,__unstable__loadDesignSystem:()=>yi,compile:()=>vi,compileAst:()=>Fr,default:()=>Te});var bt="4.0.3";var ye=92,Se=47,Ee=42,Mr=34,Wr=39,Br=58,Re=59,re=10,be=32,Oe=9,wt=123,Ze=125,et=40,kt=41,qr=91,Hr=93,xt=45,Qe=64,Gr=33;function ne(t){t=t.replaceAll(`\r
2
2
  `,`
3
- `);let r=[],n=[],e=[],i=null,s=null,l="",f="",d;for(let c=0;c<t.length;c++){let p=t.charCodeAt(c);if(p===ye)l+=t.slice(c,c+2),c+=1;else if(p===Se&&t.charCodeAt(c+1)===Ee){let m=c;for(let y=c+2;y<t.length;y++)if(d=t.charCodeAt(y),d===ye)y+=1;else if(d===Ee&&t.charCodeAt(y+1)===Se){c=y+1;break}let h=t.slice(m,c+1);h.charCodeAt(2)===Gr&&n.push(Ke(h.slice(2,-2)))}else if(p===Wr||p===Mr){let m=c;for(let h=c+1;h<t.length;h++)if(d=t.charCodeAt(h),d===ye)h+=1;else if(d===p){c=h;break}else{if(d===Re&&t.charCodeAt(h+1)===re)throw new Error(`Unterminated string: ${t.slice(m,h+1)+String.fromCharCode(p)}`);if(d===re)throw new Error(`Unterminated string: ${t.slice(m,h)+String.fromCharCode(p)}`)}l+=t.slice(m,c+1)}else{if((p===be||p===re||p===Oe)&&(d=t.charCodeAt(c+1))&&(d===be||d===re||d===Oe))continue;if(p===re){if(l.length===0)continue;d=l.charCodeAt(l.length-1),d!==be&&d!==re&&d!==Oe&&(l+=" ")}else if(p===xt&&t.charCodeAt(c+1)===xt&&l.length===0){let m="",h=c,y=-1;for(let v=c+2;v<t.length;v++)if(d=t.charCodeAt(v),d===ye)v+=1;else if(d===Se&&t.charCodeAt(v+1)===Ee){for(let x=v+2;x<t.length;x++)if(d=t.charCodeAt(x),d===ye)x+=1;else if(d===Ee&&t.charCodeAt(x+1)===Se){v=x+1;break}}else if(y===-1&&d===Br)y=l.length+v-h;else if(d===Re&&m.length===0){l+=t.slice(h,v),c=v;break}else if(d===et)m+=")";else if(d===qr)m+="]";else if(d===wt)m+="}";else if((d===Ze||t.length-1===v)&&m.length===0){c=v-1,l+=t.slice(h,v);break}else(d===kt||d===Hr||d===Ze)&&m.length>0&&t[v]===m[m.length-1]&&(m=m.slice(0,-1));let b=Xe(l,y);if(!b)throw new Error("Invalid custom property, expected a value");i?i.nodes.push(b):r.push(b),l=""}else if(p===Re&&l.charCodeAt(0)===Qe)s=we(l),i?i.nodes.push(s):r.push(s),l="",s=null;else if(p===Re&&f[f.length-1]!==")"){let m=Xe(l);if(!m)throw l.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${l.trim()}\``);i?i.nodes.push(m):r.push(m),l=""}else if(p===wt&&f[f.length-1]!==")")f+="}",s=L(l.trim()),i&&i.nodes.push(s),e.push(i),i=s,l="",s=null;else if(p===Ze&&f[f.length-1]!==")"){if(f==="")throw new Error("Missing opening {");if(f=f.slice(0,-1),l.length>0)if(l.charCodeAt(0)===Qe)s=we(l),i?i.nodes.push(s):r.push(s),l="",s=null;else{let h=l.indexOf(":");if(i){let y=Xe(l,h);if(!y)throw new Error(`Invalid declaration: \`${l.trim()}\``);i.nodes.push(y)}}let m=e.pop()??null;m===null&&i&&r.push(i),i=m,l="",s=null}else if(p===et)f+=")",l+="(";else if(p===kt){if(f[f.length-1]!==")")throw new Error("Missing opening (");f=f.slice(0,-1),l+=")"}else{if(l.length===0&&(p===be||p===re||p===Oe))continue;l+=String.fromCharCode(p)}}}if(l.charCodeAt(0)===Qe&&r.push(we(l)),f.length>0&&i){if(i.kind==="rule")throw new Error(`Missing closing } at ${i.selector}`);if(i.kind==="at-rule")throw new Error(`Missing closing } at ${i.name} ${i.params}`)}return n.length>0?n.concat(r):r}function we(t,r=[]){for(let n=5;n<t.length;n++){let e=t.charCodeAt(n);if(e===be||e===et){let i=t.slice(0,n).trim(),s=t.slice(n).trim();return _(i,s,r)}}return _(t.trim(),"",r)}function Xe(t,r=t.indexOf(":")){if(r===-1)return null;let n=t.indexOf("!important",r+1);return a(t.slice(0,r).trim(),t.slice(r+1,n===-1?t.length:n).trim(),n!==-1)}var Jr=64;function U(t,r=[]){return{kind:"rule",selector:t,nodes:r}}function _(t,r="",n=[]){return{kind:"at-rule",name:t,params:r,nodes:n}}function L(t,r=[]){return t.charCodeAt(0)===Jr?we(t,r):U(t,r)}function a(t,r,n=!1){return{kind:"declaration",property:t,value:r,important:n}}function Ke(t){return{kind:"comment",value:t}}function ie(t,r){return{kind:"context",context:t,nodes:r}}function j(t){return{kind:"at-root",nodes:t}}function D(t,r,n=[],e={}){for(let i=0;i<t.length;i++){let s=t[i],l=n[n.length-1]??null;if(s.kind==="context"){if(D(s.nodes,r,n,{...e,...s.context})===2)return 2;continue}n.push(s);let f=r(s,{parent:l,context:e,path:n,replaceWith(d){Array.isArray(d)?d.length===0?t.splice(i,1):d.length===1?t[i]=d[0]:t.splice(i,1,...d):t[i]=d,i--}})??0;if(n.pop(),f===2)return 2;if(f!==1&&(s.kind==="rule"||s.kind==="at-rule")){n.push(s);let d=D(s.nodes,r,n,e);if(n.pop(),d===2)return 2}}}function Pe(t,r,n=[],e={}){for(let i=0;i<t.length;i++){let s=t[i],l=n[n.length-1]??null;if(s.kind==="rule"||s.kind==="at-rule")n.push(s),Pe(s.nodes,r,n,e),n.pop();else if(s.kind==="context"){Pe(s.nodes,r,n,{...e,...s.context});continue}n.push(s),r(s,{parent:l,context:e,path:n,replaceWith(f){Array.isArray(f)?f.length===0?t.splice(i,1):f.length===1?t[i]=f[0]:t.splice(i,1,...f):t[i]=f,i+=f.length-1}}),n.pop()}}function oe(t){let r=[],n=new Set;function e(s,l,f=0){if(s.kind==="declaration"){if(s.property==="--tw-sort"||s.value===void 0||s.value===null)return;l.push(s)}else if(s.kind==="rule")if(s.selector==="&")for(let d of s.nodes){let c=[];e(d,c,f+1),c.length>0&&l.push(...c)}else{let d={...s,nodes:[]};for(let c of s.nodes)e(c,d.nodes,f+1);d.nodes.length>0&&l.push(d)}else if(s.kind==="at-rule"&&s.name==="@property"&&f===0){if(n.has(s.params))return;n.add(s.params);let d={...s,nodes:[]};for(let c of s.nodes)e(c,d.nodes,f+1);l.push(d)}else if(s.kind==="at-rule"){let d={...s,nodes:[]};for(let c of s.nodes)e(c,d.nodes,f+1);(d.nodes.length>0||d.name==="@layer"||d.name==="@charset"||d.name==="@custom-media"||d.name==="@namespace")&&l.push(d)}else if(s.kind==="at-root")for(let d of s.nodes){let c=[];e(d,c,0);for(let p of c)r.push(p)}else if(s.kind==="context"){if(s.context.reference)return;for(let d of s.nodes)e(d,l,f)}else s.kind==="comment"&&l.push(s)}let i=[];for(let s of t)e(s,i,0);return i.concat(r)}function G(t){function r(e,i=0){let s="",l=" ".repeat(i);if(e.kind==="declaration")s+=`${l}${e.property}: ${e.value}${e.important?" !important":""};
3
+ `);let r=[],n=[],e=[],i=null,s=null,l="",f="",d;for(let c=0;c<t.length;c++){let p=t.charCodeAt(c);if(p===ye)l+=t.slice(c,c+2),c+=1;else if(p===Se&&t.charCodeAt(c+1)===Ee){let m=c;for(let y=c+2;y<t.length;y++)if(d=t.charCodeAt(y),d===ye)y+=1;else if(d===Ee&&t.charCodeAt(y+1)===Se){c=y+1;break}let h=t.slice(m,c+1);h.charCodeAt(2)===Gr&&n.push(Ke(h.slice(2,-2)))}else if(p===Wr||p===Mr){let m=c;for(let h=c+1;h<t.length;h++)if(d=t.charCodeAt(h),d===ye)h+=1;else if(d===p){c=h;break}else{if(d===Re&&t.charCodeAt(h+1)===re)throw new Error(`Unterminated string: ${t.slice(m,h+1)+String.fromCharCode(p)}`);if(d===re)throw new Error(`Unterminated string: ${t.slice(m,h)+String.fromCharCode(p)}`)}l+=t.slice(m,c+1)}else{if((p===be||p===re||p===Oe)&&(d=t.charCodeAt(c+1))&&(d===be||d===re||d===Oe))continue;if(p===re){if(l.length===0)continue;d=l.charCodeAt(l.length-1),d!==be&&d!==re&&d!==Oe&&(l+=" ")}else if(p===xt&&t.charCodeAt(c+1)===xt&&l.length===0){let m="",h=c,y=-1;for(let v=c+2;v<t.length;v++)if(d=t.charCodeAt(v),d===ye)v+=1;else if(d===Se&&t.charCodeAt(v+1)===Ee){for(let x=v+2;x<t.length;x++)if(d=t.charCodeAt(x),d===ye)x+=1;else if(d===Ee&&t.charCodeAt(x+1)===Se){v=x+1;break}}else if(y===-1&&d===Br)y=l.length+v-h;else if(d===Re&&m.length===0){l+=t.slice(h,v),c=v;break}else if(d===et)m+=")";else if(d===qr)m+="]";else if(d===wt)m+="}";else if((d===Ze||t.length-1===v)&&m.length===0){c=v-1,l+=t.slice(h,v);break}else(d===kt||d===Hr||d===Ze)&&m.length>0&&t[v]===m[m.length-1]&&(m=m.slice(0,-1));let b=Xe(l,y);if(!b)throw new Error("Invalid custom property, expected a value");i?i.nodes.push(b):r.push(b),l=""}else if(p===Re&&l.charCodeAt(0)===Qe)s=we(l),i?i.nodes.push(s):r.push(s),l="",s=null;else if(p===Re&&f[f.length-1]!==")"){let m=Xe(l);if(!m)throw l.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${l.trim()}\``);i?i.nodes.push(m):r.push(m),l=""}else if(p===wt&&f[f.length-1]!==")")f+="}",s=L(l.trim()),i&&i.nodes.push(s),e.push(i),i=s,l="",s=null;else if(p===Ze&&f[f.length-1]!==")"){if(f==="")throw new Error("Missing opening {");if(f=f.slice(0,-1),l.length>0)if(l.charCodeAt(0)===Qe)s=we(l),i?i.nodes.push(s):r.push(s),l="",s=null;else{let h=l.indexOf(":");if(i){let y=Xe(l,h);if(!y)throw new Error(`Invalid declaration: \`${l.trim()}\``);i.nodes.push(y)}}let m=e.pop()??null;m===null&&i&&r.push(i),i=m,l="",s=null}else if(p===et)f+=")",l+="(";else if(p===kt){if(f[f.length-1]!==")")throw new Error("Missing opening (");f=f.slice(0,-1),l+=")"}else{if(l.length===0&&(p===be||p===re||p===Oe))continue;l+=String.fromCharCode(p)}}}if(l.charCodeAt(0)===Qe&&r.push(we(l)),f.length>0&&i){if(i.kind==="rule")throw new Error(`Missing closing } at ${i.selector}`);if(i.kind==="at-rule")throw new Error(`Missing closing } at ${i.name} ${i.params}`)}return n.length>0?n.concat(r):r}function we(t,r=[]){for(let n=5;n<t.length;n++){let e=t.charCodeAt(n);if(e===be||e===et){let i=t.slice(0,n).trim(),s=t.slice(n).trim();return _(i,s,r)}}return _(t.trim(),"",r)}function Xe(t,r=t.indexOf(":")){if(r===-1)return null;let n=t.indexOf("!important",r+1);return a(t.slice(0,r).trim(),t.slice(r+1,n===-1?t.length:n).trim(),n!==-1)}var Jr=64;function U(t,r=[]){return{kind:"rule",selector:t,nodes:r}}function _(t,r="",n=[]){return{kind:"at-rule",name:t,params:r,nodes:n}}function L(t,r=[]){return t.charCodeAt(0)===Jr?we(t,r):U(t,r)}function a(t,r,n=!1){return{kind:"declaration",property:t,value:r,important:n}}function Ke(t){return{kind:"comment",value:t}}function ie(t,r){return{kind:"context",context:t,nodes:r}}function j(t){return{kind:"at-root",nodes:t}}function D(t,r,n=[],e={}){for(let i=0;i<t.length;i++){let s=t[i],l=n[n.length-1]??null;if(s.kind==="context"){if(D(s.nodes,r,n,{...e,...s.context})===2)return 2;continue}n.push(s);let f=r(s,{parent:l,context:e,path:n,replaceWith(d){Array.isArray(d)?d.length===0?t.splice(i,1):d.length===1?t[i]=d[0]:t.splice(i,1,...d):t[i]=d,i--}})??0;if(n.pop(),f===2)return 2;if(f!==1&&(s.kind==="rule"||s.kind==="at-rule")){n.push(s);let d=D(s.nodes,r,n,e);if(n.pop(),d===2)return 2}}}function Pe(t,r,n=[],e={}){for(let i=0;i<t.length;i++){let s=t[i],l=n[n.length-1]??null;if(s.kind==="rule"||s.kind==="at-rule")n.push(s),Pe(s.nodes,r,n,e),n.pop();else if(s.kind==="context"){Pe(s.nodes,r,n,{...e,...s.context});continue}n.push(s),r(s,{parent:l,context:e,path:n,replaceWith(f){Array.isArray(f)?f.length===0?t.splice(i,1):f.length===1?t[i]=f[0]:t.splice(i,1,...f):t[i]=f,i+=f.length-1}}),n.pop()}}function oe(t){let r=[],n=new Set;function e(s,l,f=0){if(s.kind==="declaration"){if(s.property==="--tw-sort"||s.value===void 0||s.value===null)return;l.push(s)}else if(s.kind==="rule")if(s.selector==="&")for(let d of s.nodes){let c=[];e(d,c,f+1),c.length>0&&l.push(...c)}else{let d={...s,nodes:[]};for(let c of s.nodes)e(c,d.nodes,f+1);d.nodes.length>0&&l.push(d)}else if(s.kind==="at-rule"&&s.name==="@property"&&f===0){if(n.has(s.params))return;n.add(s.params);let d={...s,nodes:[]};for(let c of s.nodes)e(c,d.nodes,f+1);l.push(d)}else if(s.kind==="at-rule"){let d={...s,nodes:[]};for(let c of s.nodes)e(c,d.nodes,f+1);(d.nodes.length>0||d.name==="@layer"||d.name==="@charset"||d.name==="@custom-media"||d.name==="@namespace"||d.name==="@import")&&l.push(d)}else if(s.kind==="at-root")for(let d of s.nodes){let c=[];e(d,c,0);for(let p of c)r.push(p)}else if(s.kind==="context"){if(s.context.reference)return;for(let d of s.nodes)e(d,l,f)}else s.kind==="comment"&&l.push(s)}let i=[];for(let s of t)e(s,i,0);return i.concat(r)}function G(t){function r(e,i=0){let s="",l=" ".repeat(i);if(e.kind==="declaration")s+=`${l}${e.property}: ${e.value}${e.important?" !important":""};
4
4
  `;else if(e.kind==="rule"){s+=`${l}${e.selector} {
5
5
  `;for(let f of e.nodes)s+=r(f,i+1);s+=`${l}}
6
6
  `}else if(e.kind==="at-rule"){if(e.nodes.length===0)return`${l}${e.name} ${e.params};
package/dist/lib.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import{a as nt,b as _,c as I,d as S,e as Fe,f as oe,g as ke,h as lt}from"./chunk-V2K3XTS4.mjs";import{a as ot}from"./chunk-AZANAYY2.mjs";import{a as xe,b as Ae,c as it}from"./chunk-WZA4AHDT.mjs";var at="4.0.2";var ce=92,Ce=47,$e=42,yr=34,wr=39,br=58,Ve=59,Q=10,de=32,Ne=9,st=123,Ue=125,Me=40,ut=41,kr=91,xr=93,ft=45,Ie=64,Ar=33;function X(t){t=t.replaceAll(`\r
1
+ import{a as nt,b as _,c as I,d as S,e as Fe,f as oe,g as ke,h as lt}from"./chunk-V2K3XTS4.mjs";import{a as ot}from"./chunk-AZANAYY2.mjs";import{a as xe,b as Ae,c as it}from"./chunk-WZA4AHDT.mjs";var at="4.0.3";var ce=92,Ce=47,$e=42,yr=34,wr=39,br=58,Ve=59,Q=10,de=32,Ne=9,st=123,Ue=125,Me=40,ut=41,kr=91,xr=93,ft=45,Ie=64,Ar=33;function X(t){t=t.replaceAll(`\r
2
2
  `,`
3
- `);let r=[],n=[],e=[],o=null,s=null,a="",c="",d;for(let f=0;f<t.length;f++){let p=t.charCodeAt(f);if(p===ce)a+=t.slice(f,f+2),f+=1;else if(p===Ce&&t.charCodeAt(f+1)===$e){let g=f;for(let y=f+2;y<t.length;y++)if(d=t.charCodeAt(y),d===ce)y+=1;else if(d===$e&&t.charCodeAt(y+1)===Ce){f=y+1;break}let h=t.slice(g,f+1);h.charCodeAt(2)===Ar&&n.push(Te(h.slice(2,-2)))}else if(p===wr||p===yr){let g=f;for(let h=f+1;h<t.length;h++)if(d=t.charCodeAt(h),d===ce)h+=1;else if(d===p){f=h;break}else{if(d===Ve&&t.charCodeAt(h+1)===Q)throw new Error(`Unterminated string: ${t.slice(g,h+1)+String.fromCharCode(p)}`);if(d===Q)throw new Error(`Unterminated string: ${t.slice(g,h)+String.fromCharCode(p)}`)}a+=t.slice(g,f+1)}else{if((p===de||p===Q||p===Ne)&&(d=t.charCodeAt(f+1))&&(d===de||d===Q||d===Ne))continue;if(p===Q){if(a.length===0)continue;d=a.charCodeAt(a.length-1),d!==de&&d!==Q&&d!==Ne&&(a+=" ")}else if(p===ft&&t.charCodeAt(f+1)===ft&&a.length===0){let g="",h=f,y=-1;for(let v=f+2;v<t.length;v++)if(d=t.charCodeAt(v),d===ce)v+=1;else if(d===Ce&&t.charCodeAt(v+1)===$e){for(let x=v+2;x<t.length;x++)if(d=t.charCodeAt(x),d===ce)x+=1;else if(d===$e&&t.charCodeAt(x+1)===Ce){v=x+1;break}}else if(y===-1&&d===br)y=a.length+v-h;else if(d===Ve&&g.length===0){a+=t.slice(h,v),f=v;break}else if(d===Me)g+=")";else if(d===kr)g+="]";else if(d===st)g+="}";else if((d===Ue||t.length-1===v)&&g.length===0){f=v-1,a+=t.slice(h,v);break}else(d===ut||d===xr||d===Ue)&&g.length>0&&t[v]===g[g.length-1]&&(g=g.slice(0,-1));let w=ze(a,y);if(!w)throw new Error("Invalid custom property, expected a value");o?o.nodes.push(w):r.push(w),a=""}else if(p===Ve&&a.charCodeAt(0)===Ie)s=pe(a),o?o.nodes.push(s):r.push(s),a="",s=null;else if(p===Ve&&c[c.length-1]!==")"){let g=ze(a);if(!g)throw a.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${a.trim()}\``);o?o.nodes.push(g):r.push(g),a=""}else if(p===st&&c[c.length-1]!==")")c+="}",s=M(a.trim()),o&&o.nodes.push(s),e.push(o),o=s,a="",s=null;else if(p===Ue&&c[c.length-1]!==")"){if(c==="")throw new Error("Missing opening {");if(c=c.slice(0,-1),a.length>0)if(a.charCodeAt(0)===Ie)s=pe(a),o?o.nodes.push(s):r.push(s),a="",s=null;else{let h=a.indexOf(":");if(o){let y=ze(a,h);if(!y)throw new Error(`Invalid declaration: \`${a.trim()}\``);o.nodes.push(y)}}let g=e.pop()??null;g===null&&o&&r.push(o),o=g,a="",s=null}else if(p===Me)c+=")",a+="(";else if(p===ut){if(c[c.length-1]!==")")throw new Error("Missing opening (");c=c.slice(0,-1),a+=")"}else{if(a.length===0&&(p===de||p===Q||p===Ne))continue;a+=String.fromCharCode(p)}}}if(a.charCodeAt(0)===Ie&&r.push(pe(a)),c.length>0&&o){if(o.kind==="rule")throw new Error(`Missing closing } at ${o.selector}`);if(o.kind==="at-rule")throw new Error(`Missing closing } at ${o.name} ${o.params}`)}return n.length>0?n.concat(r):r}function pe(t,r=[]){for(let n=5;n<t.length;n++){let e=t.charCodeAt(n);if(e===de||e===Me){let o=t.slice(0,n).trim(),s=t.slice(n).trim();return O(o,s,r)}}return O(t.trim(),"",r)}function ze(t,r=t.indexOf(":")){if(r===-1)return null;let n=t.indexOf("!important",r+1);return l(t.slice(0,r).trim(),t.slice(r+1,n===-1?t.length:n).trim(),n!==-1)}var Cr=64;function F(t,r=[]){return{kind:"rule",selector:t,nodes:r}}function O(t,r="",n=[]){return{kind:"at-rule",name:t,params:r,nodes:n}}function M(t,r=[]){return t.charCodeAt(0)===Cr?pe(t,r):F(t,r)}function l(t,r,n=!1){return{kind:"declaration",property:t,value:r,important:n}}function Te(t){return{kind:"comment",value:t}}function ee(t,r){return{kind:"context",context:t,nodes:r}}function D(t){return{kind:"at-root",nodes:t}}function j(t,r,n=[],e={}){for(let o=0;o<t.length;o++){let s=t[o],a=n[n.length-1]??null;if(s.kind==="context"){if(j(s.nodes,r,n,{...e,...s.context})===2)return 2;continue}n.push(s);let c=r(s,{parent:a,context:e,path:n,replaceWith(d){Array.isArray(d)?d.length===0?t.splice(o,1):d.length===1?t[o]=d[0]:t.splice(o,1,...d):t[o]=d,o--}})??0;if(n.pop(),c===2)return 2;if(c!==1&&(s.kind==="rule"||s.kind==="at-rule")){n.push(s);let d=j(s.nodes,r,n,e);if(n.pop(),d===2)return 2}}}function Se(t,r,n=[],e={}){for(let o=0;o<t.length;o++){let s=t[o],a=n[n.length-1]??null;if(s.kind==="rule"||s.kind==="at-rule")n.push(s),Se(s.nodes,r,n,e),n.pop();else if(s.kind==="context"){Se(s.nodes,r,n,{...e,...s.context});continue}n.push(s),r(s,{parent:a,context:e,path:n,replaceWith(c){Array.isArray(c)?c.length===0?t.splice(o,1):c.length===1?t[o]=c[0]:t.splice(o,1,...c):t[o]=c,o+=c.length-1}}),n.pop()}}function te(t){let r=[],n=new Set;function e(s,a,c=0){if(s.kind==="declaration"){if(s.property==="--tw-sort"||s.value===void 0||s.value===null)return;a.push(s)}else if(s.kind==="rule")if(s.selector==="&")for(let d of s.nodes){let f=[];e(d,f,c+1),f.length>0&&a.push(...f)}else{let d={...s,nodes:[]};for(let f of s.nodes)e(f,d.nodes,c+1);d.nodes.length>0&&a.push(d)}else if(s.kind==="at-rule"&&s.name==="@property"&&c===0){if(n.has(s.params))return;n.add(s.params);let d={...s,nodes:[]};for(let f of s.nodes)e(f,d.nodes,c+1);a.push(d)}else if(s.kind==="at-rule"){let d={...s,nodes:[]};for(let f of s.nodes)e(f,d.nodes,c+1);(d.nodes.length>0||d.name==="@layer"||d.name==="@charset"||d.name==="@custom-media"||d.name==="@namespace")&&a.push(d)}else if(s.kind==="at-root")for(let d of s.nodes){let f=[];e(d,f,0);for(let p of f)r.push(p)}else if(s.kind==="context"){if(s.context.reference)return;for(let d of s.nodes)e(d,a,c)}else s.kind==="comment"&&a.push(s)}let o=[];for(let s of t)e(s,o,0);return o.concat(r)}function J(t){function r(e,o=0){let s="",a=" ".repeat(o);if(e.kind==="declaration")s+=`${a}${e.property}: ${e.value}${e.important?" !important":""};
3
+ `);let r=[],n=[],e=[],o=null,s=null,a="",c="",d;for(let f=0;f<t.length;f++){let p=t.charCodeAt(f);if(p===ce)a+=t.slice(f,f+2),f+=1;else if(p===Ce&&t.charCodeAt(f+1)===$e){let g=f;for(let y=f+2;y<t.length;y++)if(d=t.charCodeAt(y),d===ce)y+=1;else if(d===$e&&t.charCodeAt(y+1)===Ce){f=y+1;break}let h=t.slice(g,f+1);h.charCodeAt(2)===Ar&&n.push(Te(h.slice(2,-2)))}else if(p===wr||p===yr){let g=f;for(let h=f+1;h<t.length;h++)if(d=t.charCodeAt(h),d===ce)h+=1;else if(d===p){f=h;break}else{if(d===Ve&&t.charCodeAt(h+1)===Q)throw new Error(`Unterminated string: ${t.slice(g,h+1)+String.fromCharCode(p)}`);if(d===Q)throw new Error(`Unterminated string: ${t.slice(g,h)+String.fromCharCode(p)}`)}a+=t.slice(g,f+1)}else{if((p===de||p===Q||p===Ne)&&(d=t.charCodeAt(f+1))&&(d===de||d===Q||d===Ne))continue;if(p===Q){if(a.length===0)continue;d=a.charCodeAt(a.length-1),d!==de&&d!==Q&&d!==Ne&&(a+=" ")}else if(p===ft&&t.charCodeAt(f+1)===ft&&a.length===0){let g="",h=f,y=-1;for(let v=f+2;v<t.length;v++)if(d=t.charCodeAt(v),d===ce)v+=1;else if(d===Ce&&t.charCodeAt(v+1)===$e){for(let x=v+2;x<t.length;x++)if(d=t.charCodeAt(x),d===ce)x+=1;else if(d===$e&&t.charCodeAt(x+1)===Ce){v=x+1;break}}else if(y===-1&&d===br)y=a.length+v-h;else if(d===Ve&&g.length===0){a+=t.slice(h,v),f=v;break}else if(d===Me)g+=")";else if(d===kr)g+="]";else if(d===st)g+="}";else if((d===Ue||t.length-1===v)&&g.length===0){f=v-1,a+=t.slice(h,v);break}else(d===ut||d===xr||d===Ue)&&g.length>0&&t[v]===g[g.length-1]&&(g=g.slice(0,-1));let w=ze(a,y);if(!w)throw new Error("Invalid custom property, expected a value");o?o.nodes.push(w):r.push(w),a=""}else if(p===Ve&&a.charCodeAt(0)===Ie)s=pe(a),o?o.nodes.push(s):r.push(s),a="",s=null;else if(p===Ve&&c[c.length-1]!==")"){let g=ze(a);if(!g)throw a.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${a.trim()}\``);o?o.nodes.push(g):r.push(g),a=""}else if(p===st&&c[c.length-1]!==")")c+="}",s=M(a.trim()),o&&o.nodes.push(s),e.push(o),o=s,a="",s=null;else if(p===Ue&&c[c.length-1]!==")"){if(c==="")throw new Error("Missing opening {");if(c=c.slice(0,-1),a.length>0)if(a.charCodeAt(0)===Ie)s=pe(a),o?o.nodes.push(s):r.push(s),a="",s=null;else{let h=a.indexOf(":");if(o){let y=ze(a,h);if(!y)throw new Error(`Invalid declaration: \`${a.trim()}\``);o.nodes.push(y)}}let g=e.pop()??null;g===null&&o&&r.push(o),o=g,a="",s=null}else if(p===Me)c+=")",a+="(";else if(p===ut){if(c[c.length-1]!==")")throw new Error("Missing opening (");c=c.slice(0,-1),a+=")"}else{if(a.length===0&&(p===de||p===Q||p===Ne))continue;a+=String.fromCharCode(p)}}}if(a.charCodeAt(0)===Ie&&r.push(pe(a)),c.length>0&&o){if(o.kind==="rule")throw new Error(`Missing closing } at ${o.selector}`);if(o.kind==="at-rule")throw new Error(`Missing closing } at ${o.name} ${o.params}`)}return n.length>0?n.concat(r):r}function pe(t,r=[]){for(let n=5;n<t.length;n++){let e=t.charCodeAt(n);if(e===de||e===Me){let o=t.slice(0,n).trim(),s=t.slice(n).trim();return O(o,s,r)}}return O(t.trim(),"",r)}function ze(t,r=t.indexOf(":")){if(r===-1)return null;let n=t.indexOf("!important",r+1);return l(t.slice(0,r).trim(),t.slice(r+1,n===-1?t.length:n).trim(),n!==-1)}var Cr=64;function F(t,r=[]){return{kind:"rule",selector:t,nodes:r}}function O(t,r="",n=[]){return{kind:"at-rule",name:t,params:r,nodes:n}}function M(t,r=[]){return t.charCodeAt(0)===Cr?pe(t,r):F(t,r)}function l(t,r,n=!1){return{kind:"declaration",property:t,value:r,important:n}}function Te(t){return{kind:"comment",value:t}}function ee(t,r){return{kind:"context",context:t,nodes:r}}function D(t){return{kind:"at-root",nodes:t}}function j(t,r,n=[],e={}){for(let o=0;o<t.length;o++){let s=t[o],a=n[n.length-1]??null;if(s.kind==="context"){if(j(s.nodes,r,n,{...e,...s.context})===2)return 2;continue}n.push(s);let c=r(s,{parent:a,context:e,path:n,replaceWith(d){Array.isArray(d)?d.length===0?t.splice(o,1):d.length===1?t[o]=d[0]:t.splice(o,1,...d):t[o]=d,o--}})??0;if(n.pop(),c===2)return 2;if(c!==1&&(s.kind==="rule"||s.kind==="at-rule")){n.push(s);let d=j(s.nodes,r,n,e);if(n.pop(),d===2)return 2}}}function Se(t,r,n=[],e={}){for(let o=0;o<t.length;o++){let s=t[o],a=n[n.length-1]??null;if(s.kind==="rule"||s.kind==="at-rule")n.push(s),Se(s.nodes,r,n,e),n.pop();else if(s.kind==="context"){Se(s.nodes,r,n,{...e,...s.context});continue}n.push(s),r(s,{parent:a,context:e,path:n,replaceWith(c){Array.isArray(c)?c.length===0?t.splice(o,1):c.length===1?t[o]=c[0]:t.splice(o,1,...c):t[o]=c,o+=c.length-1}}),n.pop()}}function te(t){let r=[],n=new Set;function e(s,a,c=0){if(s.kind==="declaration"){if(s.property==="--tw-sort"||s.value===void 0||s.value===null)return;a.push(s)}else if(s.kind==="rule")if(s.selector==="&")for(let d of s.nodes){let f=[];e(d,f,c+1),f.length>0&&a.push(...f)}else{let d={...s,nodes:[]};for(let f of s.nodes)e(f,d.nodes,c+1);d.nodes.length>0&&a.push(d)}else if(s.kind==="at-rule"&&s.name==="@property"&&c===0){if(n.has(s.params))return;n.add(s.params);let d={...s,nodes:[]};for(let f of s.nodes)e(f,d.nodes,c+1);a.push(d)}else if(s.kind==="at-rule"){let d={...s,nodes:[]};for(let f of s.nodes)e(f,d.nodes,c+1);(d.nodes.length>0||d.name==="@layer"||d.name==="@charset"||d.name==="@custom-media"||d.name==="@namespace"||d.name==="@import")&&a.push(d)}else if(s.kind==="at-root")for(let d of s.nodes){let f=[];e(d,f,0);for(let p of f)r.push(p)}else if(s.kind==="context"){if(s.context.reference)return;for(let d of s.nodes)e(d,a,c)}else s.kind==="comment"&&a.push(s)}let o=[];for(let s of t)e(s,o,0);return o.concat(r)}function J(t){function r(e,o=0){let s="",a=" ".repeat(o);if(e.kind==="declaration")s+=`${a}${e.property}: ${e.value}${e.important?" !important":""};
4
4
  `;else if(e.kind==="rule"){s+=`${a}${e.selector} {
5
5
  `;for(let c of e.nodes)s+=r(c,o+1);s+=`${a}}
6
6
  `}else if(e.kind==="at-rule"){if(e.nodes.length===0)return`${a}${e.name} ${e.params};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwindcss",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "A utility-first CSS framework for rapidly building custom user interfaces.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -71,7 +71,7 @@
71
71
  "@types/node": "^20.14.8",
72
72
  "lightningcss": "^1.29.1",
73
73
  "dedent": "1.5.3",
74
- "@tailwindcss/oxide": "^4.0.2"
74
+ "@tailwindcss/oxide": "^4.0.3"
75
75
  },
76
76
  "scripts": {
77
77
  "lint": "tsc --noEmit",