@tailwindcss/browser 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.
@@ -1,6 +1,6 @@
1
- "use strict";(()=>{var $t="4.0.2";var ye=92,Ve=47,Ee=42,Xr=34,eo=39,to=58,Re=59,oe=10,ve=32,Oe=9,Nt=123,Xe=125,rt=40,St=41,ro=91,oo=93,Tt=45,et=64,no=33;function ce(t){t=t.replaceAll(`\r
1
+ "use strict";(()=>{var $t="4.0.3";var ye=92,Ve=47,Ee=42,Xr=34,eo=39,to=58,Re=59,oe=10,ve=32,Oe=9,Nt=123,Xe=125,rt=40,St=41,ro=91,oo=93,Tt=45,et=64,no=33;function ce(t){t=t.replaceAll(`\r
2
2
  `,`
3
- `);let r=[],o=[],e=[],n=null,s=null,l="",d="",f;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===Ve&&t.charCodeAt(c+1)===Ee){let m=c;for(let y=c+2;y<t.length;y++)if(f=t.charCodeAt(y),f===ye)y+=1;else if(f===Ee&&t.charCodeAt(y+1)===Ve){c=y+1;break}let h=t.slice(m,c+1);h.charCodeAt(2)===no&&o.push(Ke(h.slice(2,-2)))}else if(p===eo||p===Xr){let m=c;for(let h=c+1;h<t.length;h++)if(f=t.charCodeAt(h),f===ye)h+=1;else if(f===p){c=h;break}else{if(f===Re&&t.charCodeAt(h+1)===oe)throw new Error(`Unterminated string: ${t.slice(m,h+1)+String.fromCharCode(p)}`);if(f===oe)throw new Error(`Unterminated string: ${t.slice(m,h)+String.fromCharCode(p)}`)}l+=t.slice(m,c+1)}else{if((p===ve||p===oe||p===Oe)&&(f=t.charCodeAt(c+1))&&(f===ve||f===oe||f===Oe))continue;if(p===oe){if(l.length===0)continue;f=l.charCodeAt(l.length-1),f!==ve&&f!==oe&&f!==Oe&&(l+=" ")}else if(p===Tt&&t.charCodeAt(c+1)===Tt&&l.length===0){let m="",h=c,y=-1;for(let b=c+2;b<t.length;b++)if(f=t.charCodeAt(b),f===ye)b+=1;else if(f===Ve&&t.charCodeAt(b+1)===Ee){for(let x=b+2;x<t.length;x++)if(f=t.charCodeAt(x),f===ye)x+=1;else if(f===Ee&&t.charCodeAt(x+1)===Ve){b=x+1;break}}else if(y===-1&&f===to)y=l.length+b-h;else if(f===Re&&m.length===0){l+=t.slice(h,b),c=b;break}else if(f===rt)m+=")";else if(f===ro)m+="]";else if(f===Nt)m+="}";else if((f===Xe||t.length-1===b)&&m.length===0){c=b-1,l+=t.slice(h,b);break}else(f===St||f===oo||f===Xe)&&m.length>0&&t[b]===m[m.length-1]&&(m=m.slice(0,-1));let v=tt(l,y);if(!v)throw new Error("Invalid custom property, expected a value");n?n.nodes.push(v):r.push(v),l=""}else if(p===Re&&l.charCodeAt(0)===et)s=ke(l),n?n.nodes.push(s):r.push(s),l="",s=null;else if(p===Re&&d[d.length-1]!==")"){let m=tt(l);if(!m)throw l.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${l.trim()}\``);n?n.nodes.push(m):r.push(m),l=""}else if(p===Nt&&d[d.length-1]!==")")d+="}",s=L(l.trim()),n&&n.nodes.push(s),e.push(n),n=s,l="",s=null;else if(p===Xe&&d[d.length-1]!==")"){if(d==="")throw new Error("Missing opening {");if(d=d.slice(0,-1),l.length>0)if(l.charCodeAt(0)===et)s=ke(l),n?n.nodes.push(s):r.push(s),l="",s=null;else{let h=l.indexOf(":");if(n){let y=tt(l,h);if(!y)throw new Error(`Invalid declaration: \`${l.trim()}\``);n.nodes.push(y)}}let m=e.pop()??null;m===null&&n&&r.push(n),n=m,l="",s=null}else if(p===rt)d+=")",l+="(";else if(p===St){if(d[d.length-1]!==")")throw new Error("Missing opening (");d=d.slice(0,-1),l+=")"}else{if(l.length===0&&(p===ve||p===oe||p===Oe))continue;l+=String.fromCharCode(p)}}}if(l.charCodeAt(0)===et&&r.push(ke(l)),d.length>0&&n){if(n.kind==="rule")throw new Error(`Missing closing } at ${n.selector}`);if(n.kind==="at-rule")throw new Error(`Missing closing } at ${n.name} ${n.params}`)}return o.length>0?o.concat(r):r}function ke(t,r=[]){for(let o=5;o<t.length;o++){let e=t.charCodeAt(o);if(e===ve||e===rt){let n=t.slice(0,o).trim(),s=t.slice(o).trim();return z(n,s,r)}}return z(t.trim(),"",r)}function tt(t,r=t.indexOf(":")){if(r===-1)return null;let o=t.indexOf("!important",r+1);return a(t.slice(0,r).trim(),t.slice(r+1,o===-1?t.length:o).trim(),o!==-1)}var io=64;function U(t,r=[]){return{kind:"rule",selector:t,nodes:r}}function z(t,r="",o=[]){return{kind:"at-rule",name:t,params:r,nodes:o}}function L(t,r=[]){return t.charCodeAt(0)===io?ke(t,r):U(t,r)}function a(t,r,o=!1){return{kind:"declaration",property:t,value:r,important:o}}function Ke(t){return{kind:"comment",value:t}}function ne(t,r){return{kind:"context",context:t,nodes:r}}function D(t){return{kind:"at-root",nodes:t}}function _(t,r,o=[],e={}){for(let n=0;n<t.length;n++){let s=t[n],l=o[o.length-1]??null;if(s.kind==="context"){if(_(s.nodes,r,o,{...e,...s.context})===2)return 2;continue}o.push(s);let d=r(s,{parent:l,context:e,path:o,replaceWith(f){Array.isArray(f)?f.length===0?t.splice(n,1):f.length===1?t[n]=f[0]:t.splice(n,1,...f):t[n]=f,n--}})??0;if(o.pop(),d===2)return 2;if(d!==1&&(s.kind==="rule"||s.kind==="at-rule")){o.push(s);let f=_(s.nodes,r,o,e);if(o.pop(),f===2)return 2}}}function Pe(t,r,o=[],e={}){for(let n=0;n<t.length;n++){let s=t[n],l=o[o.length-1]??null;if(s.kind==="rule"||s.kind==="at-rule")o.push(s),Pe(s.nodes,r,o,e),o.pop();else if(s.kind==="context"){Pe(s.nodes,r,o,{...e,...s.context});continue}o.push(s),r(s,{parent:l,context:e,path:o,replaceWith(d){Array.isArray(d)?d.length===0?t.splice(n,1):d.length===1?t[n]=d[0]:t.splice(n,1,...d):t[n]=d,n+=d.length-1}}),o.pop()}}function ie(t){let r=[],o=new Set;function e(s,l,d=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 f of s.nodes){let c=[];e(f,c,d+1),c.length>0&&l.push(...c)}else{let f={...s,nodes:[]};for(let c of s.nodes)e(c,f.nodes,d+1);f.nodes.length>0&&l.push(f)}else if(s.kind==="at-rule"&&s.name==="@property"&&d===0){if(o.has(s.params))return;o.add(s.params);let f={...s,nodes:[]};for(let c of s.nodes)e(c,f.nodes,d+1);l.push(f)}else if(s.kind==="at-rule"){let f={...s,nodes:[]};for(let c of s.nodes)e(c,f.nodes,d+1);(f.nodes.length>0||f.name==="@layer"||f.name==="@charset"||f.name==="@custom-media"||f.name==="@namespace")&&l.push(f)}else if(s.kind==="at-root")for(let f of s.nodes){let c=[];e(f,c,0);for(let p of c)r.push(p)}else if(s.kind==="context"){if(s.context.reference)return;for(let f of s.nodes)e(f,l,d)}else s.kind==="comment"&&l.push(s)}let n=[];for(let s of t)e(s,n,0);return n.concat(r)}function Y(t){function r(e,n=0){let s="",l=" ".repeat(n);if(e.kind==="declaration")s+=`${l}${e.property}: ${e.value}${e.important?" !important":""};
3
+ `);let r=[],o=[],e=[],n=null,s=null,l="",d="",f;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===Ve&&t.charCodeAt(c+1)===Ee){let m=c;for(let y=c+2;y<t.length;y++)if(f=t.charCodeAt(y),f===ye)y+=1;else if(f===Ee&&t.charCodeAt(y+1)===Ve){c=y+1;break}let h=t.slice(m,c+1);h.charCodeAt(2)===no&&o.push(Ke(h.slice(2,-2)))}else if(p===eo||p===Xr){let m=c;for(let h=c+1;h<t.length;h++)if(f=t.charCodeAt(h),f===ye)h+=1;else if(f===p){c=h;break}else{if(f===Re&&t.charCodeAt(h+1)===oe)throw new Error(`Unterminated string: ${t.slice(m,h+1)+String.fromCharCode(p)}`);if(f===oe)throw new Error(`Unterminated string: ${t.slice(m,h)+String.fromCharCode(p)}`)}l+=t.slice(m,c+1)}else{if((p===ve||p===oe||p===Oe)&&(f=t.charCodeAt(c+1))&&(f===ve||f===oe||f===Oe))continue;if(p===oe){if(l.length===0)continue;f=l.charCodeAt(l.length-1),f!==ve&&f!==oe&&f!==Oe&&(l+=" ")}else if(p===Tt&&t.charCodeAt(c+1)===Tt&&l.length===0){let m="",h=c,y=-1;for(let b=c+2;b<t.length;b++)if(f=t.charCodeAt(b),f===ye)b+=1;else if(f===Ve&&t.charCodeAt(b+1)===Ee){for(let x=b+2;x<t.length;x++)if(f=t.charCodeAt(x),f===ye)x+=1;else if(f===Ee&&t.charCodeAt(x+1)===Ve){b=x+1;break}}else if(y===-1&&f===to)y=l.length+b-h;else if(f===Re&&m.length===0){l+=t.slice(h,b),c=b;break}else if(f===rt)m+=")";else if(f===ro)m+="]";else if(f===Nt)m+="}";else if((f===Xe||t.length-1===b)&&m.length===0){c=b-1,l+=t.slice(h,b);break}else(f===St||f===oo||f===Xe)&&m.length>0&&t[b]===m[m.length-1]&&(m=m.slice(0,-1));let v=tt(l,y);if(!v)throw new Error("Invalid custom property, expected a value");n?n.nodes.push(v):r.push(v),l=""}else if(p===Re&&l.charCodeAt(0)===et)s=ke(l),n?n.nodes.push(s):r.push(s),l="",s=null;else if(p===Re&&d[d.length-1]!==")"){let m=tt(l);if(!m)throw l.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${l.trim()}\``);n?n.nodes.push(m):r.push(m),l=""}else if(p===Nt&&d[d.length-1]!==")")d+="}",s=L(l.trim()),n&&n.nodes.push(s),e.push(n),n=s,l="",s=null;else if(p===Xe&&d[d.length-1]!==")"){if(d==="")throw new Error("Missing opening {");if(d=d.slice(0,-1),l.length>0)if(l.charCodeAt(0)===et)s=ke(l),n?n.nodes.push(s):r.push(s),l="",s=null;else{let h=l.indexOf(":");if(n){let y=tt(l,h);if(!y)throw new Error(`Invalid declaration: \`${l.trim()}\``);n.nodes.push(y)}}let m=e.pop()??null;m===null&&n&&r.push(n),n=m,l="",s=null}else if(p===rt)d+=")",l+="(";else if(p===St){if(d[d.length-1]!==")")throw new Error("Missing opening (");d=d.slice(0,-1),l+=")"}else{if(l.length===0&&(p===ve||p===oe||p===Oe))continue;l+=String.fromCharCode(p)}}}if(l.charCodeAt(0)===et&&r.push(ke(l)),d.length>0&&n){if(n.kind==="rule")throw new Error(`Missing closing } at ${n.selector}`);if(n.kind==="at-rule")throw new Error(`Missing closing } at ${n.name} ${n.params}`)}return o.length>0?o.concat(r):r}function ke(t,r=[]){for(let o=5;o<t.length;o++){let e=t.charCodeAt(o);if(e===ve||e===rt){let n=t.slice(0,o).trim(),s=t.slice(o).trim();return z(n,s,r)}}return z(t.trim(),"",r)}function tt(t,r=t.indexOf(":")){if(r===-1)return null;let o=t.indexOf("!important",r+1);return a(t.slice(0,r).trim(),t.slice(r+1,o===-1?t.length:o).trim(),o!==-1)}var io=64;function U(t,r=[]){return{kind:"rule",selector:t,nodes:r}}function z(t,r="",o=[]){return{kind:"at-rule",name:t,params:r,nodes:o}}function L(t,r=[]){return t.charCodeAt(0)===io?ke(t,r):U(t,r)}function a(t,r,o=!1){return{kind:"declaration",property:t,value:r,important:o}}function Ke(t){return{kind:"comment",value:t}}function ne(t,r){return{kind:"context",context:t,nodes:r}}function D(t){return{kind:"at-root",nodes:t}}function _(t,r,o=[],e={}){for(let n=0;n<t.length;n++){let s=t[n],l=o[o.length-1]??null;if(s.kind==="context"){if(_(s.nodes,r,o,{...e,...s.context})===2)return 2;continue}o.push(s);let d=r(s,{parent:l,context:e,path:o,replaceWith(f){Array.isArray(f)?f.length===0?t.splice(n,1):f.length===1?t[n]=f[0]:t.splice(n,1,...f):t[n]=f,n--}})??0;if(o.pop(),d===2)return 2;if(d!==1&&(s.kind==="rule"||s.kind==="at-rule")){o.push(s);let f=_(s.nodes,r,o,e);if(o.pop(),f===2)return 2}}}function Pe(t,r,o=[],e={}){for(let n=0;n<t.length;n++){let s=t[n],l=o[o.length-1]??null;if(s.kind==="rule"||s.kind==="at-rule")o.push(s),Pe(s.nodes,r,o,e),o.pop();else if(s.kind==="context"){Pe(s.nodes,r,o,{...e,...s.context});continue}o.push(s),r(s,{parent:l,context:e,path:o,replaceWith(d){Array.isArray(d)?d.length===0?t.splice(n,1):d.length===1?t[n]=d[0]:t.splice(n,1,...d):t[n]=d,n+=d.length-1}}),o.pop()}}function ie(t){let r=[],o=new Set;function e(s,l,d=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 f of s.nodes){let c=[];e(f,c,d+1),c.length>0&&l.push(...c)}else{let f={...s,nodes:[]};for(let c of s.nodes)e(c,f.nodes,d+1);f.nodes.length>0&&l.push(f)}else if(s.kind==="at-rule"&&s.name==="@property"&&d===0){if(o.has(s.params))return;o.add(s.params);let f={...s,nodes:[]};for(let c of s.nodes)e(c,f.nodes,d+1);l.push(f)}else if(s.kind==="at-rule"){let f={...s,nodes:[]};for(let c of s.nodes)e(c,f.nodes,d+1);(f.nodes.length>0||f.name==="@layer"||f.name==="@charset"||f.name==="@custom-media"||f.name==="@namespace"||f.name==="@import")&&l.push(f)}else if(s.kind==="at-root")for(let f of s.nodes){let c=[];e(f,c,0);for(let p of c)r.push(p)}else if(s.kind==="context"){if(s.context.reference)return;for(let f of s.nodes)e(f,l,d)}else s.kind==="comment"&&l.push(s)}let n=[];for(let s of t)e(s,n,0);return n.concat(r)}function Y(t){function r(e,n=0){let s="",l=" ".repeat(n);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 d of e.nodes)s+=r(d,n+1);s+=`${l}}
6
6
  `}else if(e.kind==="at-rule"){if(e.nodes.length===0)return`${l}${e.name} ${e.params};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailwindcss/browser",
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
  "main": "./dist/index.global.js",
@@ -26,7 +26,7 @@
26
26
  "devDependencies": {
27
27
  "h3": "^1.13.1",
28
28
  "listhen": "^1.9.0",
29
- "tailwindcss": "4.0.2"
29
+ "tailwindcss": "4.0.3"
30
30
  },
31
31
  "scripts": {
32
32
  "lint": "tsc --noEmit",