@tailwindcss/browser 0.0.0-insiders.e1c084c → 0.0.0-insiders.f237f59

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
- var At="0.0.0-insiders.e1c084c";var ye=92,Ve=47,Ee=42,Qr=34,Xr=39,eo=58,Re=59,oe=10,ve=32,Oe=9,Ct=123,Qe=125,tt=40,$t=41,to=91,ro=93,Nt=45,Xe=64,oo=33;function ce(t){t=t.replaceAll(`\r
1
+ "use strict";(()=>{var At="0.0.0-insiders.f237f59";var ye=92,Ve=47,Ee=42,Qr=34,Xr=39,eo=58,Re=59,oe=10,ve=32,Oe=9,Ct=123,Qe=125,tt=40,$t=41,to=91,ro=93,Nt=45,Xe=64,oo=33;function ce(t){t=t.replaceAll(`\r
2
2
  `,`
3
3
  `);let r=[],o=[],e=[],n=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===Ve&&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)===Ve){c=y+1;break}let h=t.slice(m,c+1);h.charCodeAt(2)===oo&&o.push(Ke(h.slice(2,-2)))}else if(p===Xr||p===Qr){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)===oe)throw new Error(`Unterminated string: ${t.slice(m,h+1)+String.fromCharCode(p)}`);if(d===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)&&(d=t.charCodeAt(c+1))&&(d===ve||d===oe||d===Oe))continue;if(p===oe){if(l.length===0)continue;d=l.charCodeAt(l.length-1),d!==ve&&d!==oe&&d!==Oe&&(l+=" ")}else if(p===Nt&&t.charCodeAt(c+1)===Nt&&l.length===0){let m="",h=c,y=-1;for(let b=c+2;b<t.length;b++)if(d=t.charCodeAt(b),d===ye)b+=1;else if(d===Ve&&t.charCodeAt(b+1)===Ee){for(let x=b+2;x<t.length;x++)if(d=t.charCodeAt(x),d===ye)x+=1;else if(d===Ee&&t.charCodeAt(x+1)===Ve){b=x+1;break}}else if(y===-1&&d===eo)y=l.length+b-h;else if(d===Re&&m.length===0){l+=t.slice(h,b),c=b;break}else if(d===tt)m+=")";else if(d===to)m+="]";else if(d===Ct)m+="}";else if((d===Qe||t.length-1===b)&&m.length===0){c=b-1,l+=t.slice(h,b);break}else(d===$t||d===ro||d===Qe)&&m.length>0&&t[b]===m[m.length-1]&&(m=m.slice(0,-1));let v=et(l,y);n?n.nodes.push(v):r.push(v),l=""}else if(p===Re&&l.charCodeAt(0)===Xe)s=ke(l),n?n.nodes.push(s):r.push(s),l="",s=null;else if(p===Re&&f[f.length-1]!==")"){let m=et(l);n?n.nodes.push(m):r.push(m),l=""}else if(p===Ct&&f[f.length-1]!==")")f+="}",s=L(l.trim()),n&&n.nodes.push(s),e.push(n),n=s,l="",s=null;else if(p===Qe&&f[f.length-1]!==")"){if(f==="")throw new Error("Missing opening {");if(f=f.slice(0,-1),l.length>0)if(l.charCodeAt(0)===Xe)s=ke(l),n?n.nodes.push(s):r.push(s),l="",s=null;else{let h=l.indexOf(":");n&&n.nodes.push(et(l,h))}let m=e.pop()??null;m===null&&n&&r.push(n),n=m,l="",s=null}else if(p===tt)f+=")",l+="(";else if(p===$t){if(f[f.length-1]!==")")throw new Error("Missing opening (");f=f.slice(0,-1),l+=")"}else{if(l.length===0&&(p===ve||p===oe||p===Oe))continue;l+=String.fromCharCode(p)}}}if(l.charCodeAt(0)===Xe&&r.push(ke(l)),f.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===tt){let n=t.slice(0,o).trim(),s=t.slice(o).trim();return P(n,s,r)}}return P(t.trim(),"",r)}function et(t,r=t.indexOf(":")){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 no=64;function U(t,r=[]){return{kind:"rule",selector:t,nodes:r}}function P(t,r="",o=[]){return{kind:"at-rule",name:t,params:r,nodes:o}}function L(t,r=[]){return t.charCodeAt(0)===no?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 f=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--}})??0;if(o.pop(),f===2)return 2;if(f!==1&&(s.kind==="rule"||s.kind==="at-rule")){o.push(s);let d=_(s.nodes,r,o,e);if(o.pop(),d===2)return 2}}}function ze(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),ze(s.nodes,r,o,e),o.pop();else if(s.kind==="context"){ze(s.nodes,r,o,{...e,...s.context});continue}o.push(s),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+=f.length-1}}),o.pop()}}function ie(t){let r=[],o=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),l.push(...c)}else{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"&&s.name==="@property"&&f===0){if(o.has(s.params))return;o.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);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 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} {
@@ -871,4 +871,4 @@ input:where([type='button'], [type='reset'], [type='submit']),
871
871
  }
872
872
  `;var Hr=`@tailwind utilities;
873
873
  `;var Se={index:Wr,preflight:Br,theme:qr,utilities:Hr};var Ye=class{start(r){performance.mark(`${r} (start)`)}end(r,o){performance.mark(`${r} (end)`),performance.measure(r,{start:`${r} (start)`,end:`${r} (end)`,detail:o})}hit(r,o){performance.mark(r,{detail:o})}error(r){throw performance.mark("(error)",{detail:{error:`${r}`}}),r}};console.warn("The browser build of Tailwind CSS should not be used in production. To use Tailwind CSS in production, use the Tailwind CLI, Vite plugin, or PostCSS plugin: https://tailwindcss.com/docs/installation");var Yr="text/tailwindcss",Je,wt=new Set,kt="",xt=document.createElement("style"),Gr=Promise.resolve(),Pn=1,B=new Ye;async function _n(){B.start("Create compiler"),B.start("Reading Stylesheets");let t=document.querySelectorAll(`style[type="${Yr}"]`),r="";for(let o of t)Jr(o),r+=o.textContent+`
874
- `;if(r.includes("@import")||(r=`@import "tailwindcss";${r}`),B.end("Reading Stylesheets",{size:r.length,changed:kt!==r}),kt!==r){kt=r,B.start("Compile CSS");try{Je=await Mr(r,{base:"/",loadStylesheet:Dn,loadModule:Un})}finally{B.end("Compile CSS"),B.end("Create compiler")}wt.clear()}}async function Dn(t,r){function o(){if(t==="tailwindcss")return{base:r,content:Se.index};if(t==="tailwindcss/preflight"||t==="tailwindcss/preflight.css"||t==="./preflight.css")return{base:r,content:Se.preflight};if(t==="tailwindcss/theme"||t==="tailwindcss/theme.css"||t==="./theme.css")return{base:r,content:Se.theme};if(t==="tailwindcss/utilities"||t==="tailwindcss/utilities.css"||t==="./utilities.css")return{base:r,content:Se.utilities};throw new Error(`The browser build does not support @import for "${t}"`)}try{let e=o();return B.hit("Loaded stylesheet",{id:t,base:r,size:e.content.length}),e}catch(e){throw B.hit("Failed to load stylesheet",{id:t,base:r,error:e.message??e}),e}}async function Un(){throw new Error("The browser build does not support plugins or config files.")}async function jn(t){if(!Je)return;let r=new Set;B.start("Collect classes");for(let o of document.querySelectorAll("[class]"))for(let e of o.classList)wt.has(e)||(wt.add(e),r.add(e));B.end("Collect classes",{count:r.size}),!(r.size===0&&t==="incremental")&&(B.start("Build utilities"),xt.textContent=Je.build(Array.from(r)),B.end("Build utilities"))}function Ze(t){async function r(){if(!Je&&t!=="full")return;let o=Pn++;B.start(`Build #${o} (${t})`),t==="full"&&await _n(),B.start("Build"),await jn(t),B.end("Build"),B.end(`Build #${o} (${t})`)}Gr=Gr.then(r).catch(o=>B.error(o))}var Fn=new MutationObserver(()=>Ze("full"));function Jr(t){Fn.observe(t,{attributes:!0,attributeFilter:["type"],characterData:!0,subtree:!0,childList:!0})}new MutationObserver(t=>{let r=0,o=0;for(let e of t){for(let n of e.addedNodes)n.nodeType===Node.ELEMENT_NODE&&n.tagName==="STYLE"&&n.getAttribute("type")===Yr&&(Jr(n),r++);for(let n of e.addedNodes)n.nodeType===1&&n!==xt&&o++;e.type==="attributes"&&o++}if(r>0)return Ze("full");if(o>0)return Ze("incremental")}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"],childList:!0,subtree:!0});Ze("full");document.head.append(xt);
874
+ `;if(r.includes("@import")||(r=`@import "tailwindcss";${r}`),B.end("Reading Stylesheets",{size:r.length,changed:kt!==r}),kt!==r){kt=r,B.start("Compile CSS");try{Je=await Mr(r,{base:"/",loadStylesheet:Dn,loadModule:Un})}finally{B.end("Compile CSS"),B.end("Create compiler")}wt.clear()}}async function Dn(t,r){function o(){if(t==="tailwindcss")return{base:r,content:Se.index};if(t==="tailwindcss/preflight"||t==="tailwindcss/preflight.css"||t==="./preflight.css")return{base:r,content:Se.preflight};if(t==="tailwindcss/theme"||t==="tailwindcss/theme.css"||t==="./theme.css")return{base:r,content:Se.theme};if(t==="tailwindcss/utilities"||t==="tailwindcss/utilities.css"||t==="./utilities.css")return{base:r,content:Se.utilities};throw new Error(`The browser build does not support @import for "${t}"`)}try{let e=o();return B.hit("Loaded stylesheet",{id:t,base:r,size:e.content.length}),e}catch(e){throw B.hit("Failed to load stylesheet",{id:t,base:r,error:e.message??e}),e}}async function Un(){throw new Error("The browser build does not support plugins or config files.")}async function jn(t){if(!Je)return;let r=new Set;B.start("Collect classes");for(let o of document.querySelectorAll("[class]"))for(let e of o.classList)wt.has(e)||(wt.add(e),r.add(e));B.end("Collect classes",{count:r.size}),!(r.size===0&&t==="incremental")&&(B.start("Build utilities"),xt.textContent=Je.build(Array.from(r)),B.end("Build utilities"))}function Ze(t){async function r(){if(!Je&&t!=="full")return;let o=Pn++;B.start(`Build #${o} (${t})`),t==="full"&&await _n(),B.start("Build"),await jn(t),B.end("Build"),B.end(`Build #${o} (${t})`)}Gr=Gr.then(r).catch(o=>B.error(o))}var Fn=new MutationObserver(()=>Ze("full"));function Jr(t){Fn.observe(t,{attributes:!0,attributeFilter:["type"],characterData:!0,subtree:!0,childList:!0})}new MutationObserver(t=>{let r=0,o=0;for(let e of t){for(let n of e.addedNodes)n.nodeType===Node.ELEMENT_NODE&&n.tagName==="STYLE"&&n.getAttribute("type")===Yr&&(Jr(n),r++);for(let n of e.addedNodes)n.nodeType===1&&n!==xt&&o++;e.type==="attributes"&&o++}if(r>0)return Ze("full");if(o>0)return Ze("incremental")}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"],childList:!0,subtree:!0});Ze("full");document.head.append(xt);})();
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@tailwindcss/browser",
3
- "version": "0.0.0-insiders.e1c084c",
3
+ "version": "0.0.0-insiders.f237f59",
4
4
  "description": "A utility-first CSS framework for rapidly building custom user interfaces.",
5
5
  "license": "MIT",
6
- "main": "./dist/index.mjs",
7
- "browser": "./dist/index.mjs",
6
+ "main": "./dist/index.global.js",
7
+ "browser": "./dist/index.global.js",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/tailwindlabs/tailwindcss.git",
@@ -13,7 +13,7 @@
13
13
  "bugs": "https://github.com/tailwindlabs/tailwindcss/issues",
14
14
  "homepage": "https://tailwindcss.com",
15
15
  "exports": {
16
- ".": "./dist/index.mjs",
16
+ ".": "./dist/index.global.js",
17
17
  "./package.json": "./package.json"
18
18
  },
19
19
  "files": [
@@ -26,7 +26,7 @@
26
26
  "devDependencies": {
27
27
  "h3": "^1.13.1",
28
28
  "listhen": "^1.9.0",
29
- "tailwindcss": "0.0.0-insiders.e1c084c"
29
+ "tailwindcss": "0.0.0-insiders.f237f59"
30
30
  },
31
31
  "scripts": {
32
32
  "lint": "tsc --noEmit",