me dejaron cocinar demaciado
This commit is contained in:
1 parent
bd510cb94b
commit
07727cee79
5655 files changed
+293183
No files matched your search
+21
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Tailwind Labs, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<p align="center">
|
||||
<a href="https://tailwindcss.com" target="_blank">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-dark.svg">
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg">
|
||||
<img alt="Tailwind CSS" src="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg" width="350" height="70" style="max-width: 100%;">
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
A utility-first CSS framework for rapidly building custom user interfaces.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/tailwindlabs/tailwindcss/actions"><img src="https://img.shields.io/github/actions/workflow/status/tailwindlabs/tailwindcss/ci.yml?branch=next" alt="Build Status"></a>
|
||||
<a href="https://www.npmjs.com/package/tailwindcss"><img src="https://img.shields.io/npm/dt/tailwindcss.svg" alt="Total Downloads"></a>
|
||||
<a href="https://github.com/tailwindcss/tailwindcss/releases"><img src="https://img.shields.io/npm/v/tailwindcss.svg" alt="Latest Release"></a>
|
||||
<a href="https://github.com/tailwindcss/tailwindcss/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/tailwindcss.svg" alt="License"></a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## Documentation
|
||||
|
||||
For full documentation, visit [tailwindcss.com](https://tailwindcss.com).
|
||||
|
||||
## Community
|
||||
|
||||
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
|
||||
|
||||
[Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions)
|
||||
|
||||
For chatting with others using the framework:
|
||||
|
||||
[Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe)
|
||||
|
||||
## Contributing
|
||||
|
||||
If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/next/.github/CONTRIBUTING.md) **before submitting a pull request**.
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import { PluginCreator } from 'postcss';
|
||||
|
||||
type PluginOptions = {
|
||||
base?: string;
|
||||
optimize?: boolean | {
|
||||
minify?: boolean;
|
||||
};
|
||||
};
|
||||
declare const _default: PluginCreator<PluginOptions>;
|
||||
|
||||
export { type PluginOptions, _default as default };
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import { PluginCreator } from 'postcss';
|
||||
|
||||
type PluginOptions = {
|
||||
base?: string;
|
||||
optimize?: boolean | {
|
||||
minify?: boolean;
|
||||
};
|
||||
};
|
||||
declare const _default: PluginCreator<PluginOptions>;
|
||||
|
||||
export = _default;
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
"use strict";var je=Object.create;var ue=Object.defineProperty;var Me=Object.getOwnPropertyDescriptor;var We=Object.getOwnPropertyNames;var Be=Object.getPrototypeOf,He=Object.prototype.hasOwnProperty;var ae=(e,o)=>(o=Symbol[e])?o:Symbol.for("Symbol."+e),se=e=>{throw TypeError(e)};var qe=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of We(o))!He.call(e,n)&&n!==r&&ue(e,n,{get:()=>o[n],enumerable:!(t=Me(o,n))||t.enumerable});return e};var O=(e,o,r)=>(r=e!=null?je(Be(e)):{},qe(o||!e||!e.__esModule?ue(r,"default",{value:e,enumerable:!0}):r,e));var fe=(e,o,r)=>{if(o!=null){typeof o!="object"&&typeof o!="function"&&se("Object expected");var t,n;r&&(t=o[ae("asyncDispose")]),t===void 0&&(t=o[ae("dispose")],r&&(n=t)),typeof t!="function"&&se("Object not disposable"),n&&(t=function(){try{n.call(this)}catch(i){return Promise.reject(i)}}),e.push([r,t,o])}else r&&e.push([r]);return o},ce=(e,o,r)=>{var t=typeof SuppressedError=="function"?SuppressedError:function(l,s,a,c){return c=Error(a),c.name="SuppressedError",c.error=l,c.suppressed=s,c},n=l=>o=r?new t(l,o,"An error was suppressed during disposal"):(r=!0,l),i=l=>{for(;l=e.pop();)try{var s=l[1]&&l[1].call(l[2]);if(l[0])return Promise.resolve(s).then(i,a=>(n(a),i()))}catch(a){n(a)}if(r)throw o};return i()};var Oe=O(require("@alloc/quick-lru")),d=require("@tailwindcss/node"),_e=require("@tailwindcss/node/require-cache"),Ke=require("@tailwindcss/oxide"),Ue=O(require("fs")),y=O(require("path")),G=O(require("postcss"));function Y(e){return{kind:"word",value:e}}function Ge(e,o){return{kind:"function",value:e,nodes:o}}function Ye(e){return{kind:"separator",value:e}}function _(e,o,r=null){for(let t=0;t<e.length;t++){let n=e[t],i=!1,l=0,s=o(n,{parent:r,replaceWith(a){i||(i=!0,Array.isArray(a)?a.length===0?(e.splice(t,1),l=0):a.length===1?(e[t]=a[0],l=1):(e.splice(t,1,...a),l=a.length):e[t]=a)}})??0;if(i){s===0?t--:t+=l-1;continue}if(s===2)return 2;if(s!==1&&n.kind==="function"&&_(n.nodes,o,n)===2)return 2}}function V(e){let o="";for(let r of e)switch(r.kind){case"word":case"separator":{o+=r.value;break}case"function":o+=r.value+"("+V(r.nodes)+")"}return o}var pe=92,Je=41,de=58,me=44,Qe=34,ge=61,he=62,ve=60,we=10,Ze=40,Xe=39,ke=47,ye=32,be=9;function E(e){e=e.replaceAll(`\r
|
||||
`,`
|
||||
`);let o=[],r=[],t=null,n="",i;for(let l=0;l<e.length;l++){let s=e.charCodeAt(l);switch(s){case pe:{n+=e[l]+e[l+1],l++;break}case de:case me:case ge:case he:case ve:case we:case ke:case ye:case be:{if(n.length>0){let b=Y(n);t?t.nodes.push(b):o.push(b),n=""}let a=l,c=l+1;for(;c<e.length&&(i=e.charCodeAt(c),!(i!==de&&i!==me&&i!==ge&&i!==he&&i!==ve&&i!==we&&i!==ke&&i!==ye&&i!==be));c++);l=c-1;let $=Ye(e.slice(a,c));t?t.nodes.push($):o.push($);break}case Xe:case Qe:{let a=l;for(let c=l+1;c<e.length;c++)if(i=e.charCodeAt(c),i===pe)c+=1;else if(i===s){l=c;break}n+=e.slice(a,l+1);break}case Ze:{let a=Ge(n,[]);n="",t?t.nodes.push(a):o.push(a),r.push(a),t=a;break}case Je:{let a=r.pop();if(n.length>0){let c=Y(n);a.nodes.push(c),n=""}r.length>0?t=r[r.length-1]:t=null;break}default:n+=String.fromCharCode(s)}}return n.length>0&&o.push(Y(n)),o}var et=["anchor-size"],_t=new RegExp(`(${et.join("|")})\\(`,"g");var It=new Uint8Array(256);var W=new Uint8Array(256);function m(e,o){let r=0,t=[],n=0,i=e.length,l=o.charCodeAt(0);for(let s=0;s<i;s++){let a=e.charCodeAt(s);if(r===0&&a===l){t.push(e.slice(n,s)),n=s+1;continue}switch(a){case 92:s+=1;break;case 39:case 34:for(;++s<i;){let c=e.charCodeAt(s);if(c===92){s+=1;continue}if(c===a)break}break;case 40:W[r]=41,r++;break;case 91:W[r]=93,r++;break;case 123:W[r]=125,r++;break;case 93:case 125:case 41:r>0&&a===W[r-1]&&r--;break}}return t.push(e.slice(n)),t}var A=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,rr=new RegExp(`^${A.source}$`);var ir=new RegExp(`^${A.source}%$`);var nr=new RegExp(`^${A.source}s*/s*${A.source}$`);var tt=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],or=new RegExp(`^${A.source}(${tt.join("|")})$`);var rt=["deg","rad","grad","turn"],lr=new RegExp(`^${A.source}(${rt.join("|")})$`);var ar=new RegExp(`^${A.source} +${A.source} +${A.source}$`);function w(e){let o=Number(e);return Number.isInteger(o)&&o>=0&&String(o)===String(e)}function I(e,o){if(o===null)return e;let r=Number(o);return Number.isNaN(r)||(o=`${r*100}%`),`color-mix(in oklab, ${e} ${o}, transparent)`}var ot={"--alpha":lt,"--spacing":at,"--theme":st,theme:ut};function lt(e,o,r,...t){let[n,i]=m(r,"/").map(l=>l.trim());if(!n||!i)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${i||"50%"})\``);if(t.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${i||"50%"})\``);return I(n,i)}function at(e,o,r,...t){if(!r)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(t.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${t.length+1}.`);let n=e.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${r})`}function st(e,o,r,...t){if(!r.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;r.endsWith(" inline")&&(n=!0,r=r.slice(0,-7)),o.kind==="at-rule"&&(n=!0);let i=e.resolveThemeValue(r,n);if(!i){if(t.length>0)return t.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${r})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(t.length===0)return i;let l=t.join(", ");if(l==="initial")return i;if(i==="initial")return l;if(i.startsWith("var(")||i.startsWith("theme(")||i.startsWith("--theme(")){let s=E(i);return ct(s,l),V(s)}return i}function ut(e,o,r,...t){r=ft(r);let n=e.resolveThemeValue(r);if(!n&&t.length>0)return t.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${r})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var Sr=new RegExp(Object.keys(ot).map(e=>`${e}\\(`).join("|"));function ft(e){if(e[0]!=="'"&&e[0]!=='"')return e;let o="",r=e[0];for(let t=1;t<e.length-1;t++){let n=e[t],i=e[t+1];n==="\\"&&(i===r||i==="\\")?(o+=i,t++):o+=n}return o}function ct(e,o){_(e,r=>{if(r.kind==="function"&&!(r.value!=="var"&&r.value!=="theme"&&r.value!=="--theme"))if(r.nodes.length===1)r.nodes.push({kind:"word",value:`, ${o}`});else{let t=r.nodes[r.nodes.length-1];t.kind==="word"&&t.value==="initial"&&(t.value=o)}})}var vt=32;var wt=40;function Se(e,o=[]){for(let r=5;r<e.length;r++){let t=e.charCodeAt(r);if(t===vt||t===wt){let n=e.slice(0,r).trim(),i=e.slice(r).trim();return g(n,i,o)}}return g(e.trim(),"",o)}var ee={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0Line truncated
|
||||
`;else if(t.kind==="rule"){i+=`${l}${t.selector} {
|
||||
`;for(let s of t.nodes)i+=o(s,n+1);i+=`${l}}
|
||||
`}else if(t.kind==="at-rule"){if(t.nodes.length===0)return`${l}${t.name} ${t.params};
|
||||
`;i+=`${l}${t.name}${t.params?` ${t.params} `:" "}{
|
||||
`;for(let s of t.nodes)i+=o(s,n+1);i+=`${l}}
|
||||
`}else if(t.kind==="comment")i+=`${l}/*${t.value}*/
|
||||
`;else if(t.kind==="context"||t.kind==="at-root")return"";return i}let r="";for(let t of e){let n=o(t);n!==""&&(r+=n)}return r}var z=O(require("postcss"));var Vt=33;function Re(e,o){let r=z.default.root();r.source=o;function t(n,i){if(n.kind==="declaration"){let l=z.default.decl({prop:n.property,value:n.value??"",important:n.important});l.source=o,i.append(l)}else if(n.kind==="rule"){let l=z.default.rule({selector:n.selector});l.source=o,l.raws.semicolon=!0,i.append(l);for(let s of n.nodes)t(s,l)}else if(n.kind==="at-rule"){let l=z.default.atRule({name:n.name.slice(1),params:n.params});l.source=o,l.raws.semicolon=!0,i.append(l);for(let s of n.nodes)t(s,l)}else if(n.kind==="comment"){let l=z.default.comment({text:n.value});l.raws.left="",l.raws.right="",l.source=o,i.append(l)}else n.kind==="at-root"||n.kind}for(let n of e)t(n,r);return r}function Pe(e){function o(t,n){if(t.type==="decl")n.push(x(t.prop,t.value,t.important));else if(t.type==="rule"){let i=C(t.selector);t.each(l=>o(l,i.nodes)),n.push(i)}else if(t.type==="atrule"){let i=g(`@${t.name}`,t.params);t.each(l=>o(l,i.nodes)),n.push(i)}else if(t.type==="comment"){if(t.text.charCodeAt(0)!==Vt)return;n.push(H(t.text))}}let r=[];return e.each(t=>o(t,r)),r}var ie=require("@tailwindcss/node"),L=O(require("path")),te="'",re='"';function ne(){let e=new WeakSet;function o(r){let t=r.root().source?.input.file;if(!t)return;let n=r.source?.input.file;if(!n||e.has(r))return;let i=r.params[0],l=i[0]===re&&i[i.length-1]===re?re:i[0]===te&&i[i.length-1]===te?te:null;if(!l)return;let s=r.params.slice(1,-1),a="";if(s.startsWith("!")&&(s=s.slice(1),a="!"),!s.startsWith("./")&&!s.startsWith("../"))return;let c=L.default.posix.join((0,ie.normalizePath)(L.default.dirname(n)),s),$=L.default.posix.dirname((0,ie.normalizePath)(t)),b=L.default.posix.relative($,c);b.startsWith(".")||(b="./"+b),r.params=l+a+b+l,e.add(r)}return{postcssPlugin:"tailwindcss-postcss-fix-relative-paths",Once(r){r.walkAtRules(/source|plugin|config/,o)}}}var u=d.env.DEBUG,oe=new Oe.default({maxSize:50});function Et(e,o){let r=`${e}:${o.base??""}:${JSON.stringify(o.optimize)}`;if(oe.has(r))return oe.get(r);let t={mtimes:new Map,compiler:null,scanner:null,tailwindCssAst:[],cachedPostCssAst:G.default.root(),optimizedPostCssAst:G.default.root(),fullRebuildPaths:[]};return oe.set(r,t),t}function Rt(e={}){let o=e.base??process.cwd(),r=e.optimize??process.env.NODE_ENV==="production";return{postcssPlugin:"@tailwindcss/postcss",plugins:[ne(),{postcssPlugin:"tailwindcss",async Once(t,{result:n}){var le=[];try{let i=fe(le,new d.Instrumentation);let l=n.opts.from??"";let s=l.endsWith(".module.css");u&&i.start(`[@tailwindcss/postcss] ${(0,y.relative)(o,l)}`);{u&&i.start("Quick bail check");let h=!0;if(t.walkAtRules(f=>{if(f.name==="import"||f.name==="reference"||f.name==="theme"||f.name==="variant"||f.name==="config"||f.name==="plugin"||f.name==="apply"||f.name==="tailwind")return h=!1,!1}),h)return;u&&i.end("Quick bail check")}let a=Et(l,e);let c=y.default.dirname(y.default.resolve(l));async function $(){u&&i.start("Setup compiler"),a.fullRebuildPaths.length>0&&!b&&(0,_e.clearRequireCache)(a.fullRebuildPaths),a.fullRebuildPaths=[],u&&i.start("PostCSS AST -> Tailwind CSS AST");let h=Pe(t);u&&i.end("PostCSS AST -> Tailwind CSS AST"),u&&i.start("Create compiler");let f=await(0,d.compileAst)(h,{base:c,shouldRewriteUrls:!0,onDependency:v=>{a.fullRebuildPaths.push(v)},polyfills:s?d.Polyfills.All^d.Polyfills.AtProperty:d.Polyfills.All});return u&&i.end("Create compiler"),u&&i.end("Setup compiler"),f}let b=a.compiler===null;a.compiler??=$();if((await a.compiler).features===d.Features.None)return;let j="incremental";u&&i.start("Register full rebuild paths");{for(let f of a.fullRebuildPaths)n.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:y.default.resolve(f),parent:n.opts.from});let h=n.messages.flatMap(f=>f.type!=="dependency"?[]:f.file);h.push(l);for(let f of h){let v=Ue.default.statSync(f,{throwIfNoEntry:!1})?.mtimeMs??null;if(v===null){f===l&&(j="full");continue}a.mtimes.get(f)!==v&&(j="full",a.mtimes.set(f,v))}}u&&i.end("Register full rebuild paths");j==="full"&&!b&&(a.compiler=$());let T=await a.compiler;if(a.scanner===null||j==="full"){u&&i.start("Setup scanner");let h=(T.root==="none"?[]:T.root===null?[{base:o,pattern:"**/*",negated:!1}]:[{...T.root,negated:!1}]).concat(T.sources);a.scanner=new Ke.Scanner({sources:h}),u&&i.end("Setup scanner")}u&&i.start("Scan for candidates");let ze=T.features&d.Features.Utilities?a.scanner.scan():[];u&&i.end("Scan for candidates");if(T.features&d.Features.Utilities){u&&i.start("Register dependency messages");let h=y.default.resolve(o,l);for(let f of a.scanner.files){let v=y.default.resolve(f);v!==h&&n.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:v,parent:n.opts.from})}for(let{base:f,pattern:v}of a.scanner.globs)v==="*"&&o===f||(v===""?n.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:y.default.resolve(f),parent:n.opt
Line truncated
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
var le=(e,o)=>(o=Symbol[e])?o:Symbol.for("Symbol."+e),ae=e=>{throw TypeError(e)};var se=(e,o,i)=>{if(o!=null){typeof o!="object"&&typeof o!="function"&&ae("Object expected");var t,n;i&&(t=o[le("asyncDispose")]),t===void 0&&(t=o[le("dispose")],i&&(n=t)),typeof t!="function"&&ae("Object not disposable"),n&&(t=function(){try{n.call(this)}catch(r){return Promise.reject(r)}}),e.push([i,t,o])}else i&&e.push([i]);return o},ue=(e,o,i)=>{var t=typeof SuppressedError=="function"?SuppressedError:function(l,s,a,c){return c=Error(a),c.name="SuppressedError",c.error=l,c.suppressed=s,c},n=l=>o=i?new t(l,o,"An error was suppressed during disposal"):(i=!0,l),r=l=>{for(;l=e.pop();)try{var s=l[1]&&l[1].call(l[2]);if(l[0])return Promise.resolve(s).then(r,a=>(n(a),r()))}catch(a){n(a)}if(i)throw o};return r()};import kt from"@alloc/quick-lru";import{compileAst as yt,env as bt,Features as te,Instrumentation as xt,optimize as At,Polyfills as re}from"@tailwindcss/node";import{clearRequireCache as Ct}from"@tailwindcss/node/require-cache";import{Scanner as Nt}from"@tailwindcss/oxide";import St from"node:fs";import R,{relative as Pe}from"node:path";import ne from"postcss";function H(e){return{kind:"word",value:e}}function De(e,o){return{kind:"function",value:e,nodes:o}}function ze(e){return{kind:"separator",value:e}}function P(e,o,i=null){for(let t=0;t<e.length;t++){let n=e[t],r=!1,l=0,s=o(n,{parent:i,replaceWith(a){r||(r=!0,Array.isArray(a)?a.length===0?(e.splice(t,1),l=0):a.length===1?(e[t]=a[0],l=1):(e.splice(t,1,...a),l=a.length):e[t]=a)}})??0;if(r){s===0?t--:t+=l-1;continue}if(s===2)return 2;if(s!==1&&n.kind==="function"&&P(n.nodes,o,n)===2)return 2}}function $(e){let o="";for(let i of e)switch(i.kind){case"word":case"separator":{o+=i.value;break}case"function":o+=i.value+"("+$(i.nodes)+")"}return o}var fe=92,Ie=41,ce=58,pe=44,Fe=34,de=61,me=62,ge=60,he=10,Le=40,je=39,ve=47,we=32,ke=9;function T(e){e=e.replaceAll(`\r
|
||||
`,`
|
||||
`);let o=[],i=[],t=null,n="",r;for(let l=0;l<e.length;l++){let s=e.charCodeAt(l);switch(s){case fe:{n+=e[l]+e[l+1],l++;break}case ce:case pe:case de:case me:case ge:case he:case ve:case we:case ke:{if(n.length>0){let k=H(n);t?t.nodes.push(k):o.push(k),n=""}let a=l,c=l+1;for(;c<e.length&&(r=e.charCodeAt(c),!(r!==ce&&r!==pe&&r!==de&&r!==me&&r!==ge&&r!==he&&r!==ve&&r!==we&&r!==ke));c++);l=c-1;let N=ze(e.slice(a,c));t?t.nodes.push(N):o.push(N);break}case je:case Fe:{let a=l;for(let c=l+1;c<e.length;c++)if(r=e.charCodeAt(c),r===fe)c+=1;else if(r===s){l=c;break}n+=e.slice(a,l+1);break}case Le:{let a=De(n,[]);n="",t?t.nodes.push(a):o.push(a),i.push(a),t=a;break}case Ie:{let a=i.pop();if(n.length>0){let c=H(n);a.nodes.push(c),n=""}i.length>0?t=i[i.length-1]:t=null;break}default:n+=String.fromCharCode(s)}}return n.length>0&&o.push(H(n)),o}var Me=["anchor-size"],Rt=new RegExp(`(${Me.join("|")})\\(`,"g");var Ut=new Uint8Array(256);var L=new Uint8Array(256);function d(e,o){let i=0,t=[],n=0,r=e.length,l=o.charCodeAt(0);for(let s=0;s<r;s++){let a=e.charCodeAt(s);if(i===0&&a===l){t.push(e.slice(n,s)),n=s+1;continue}switch(a){case 92:s+=1;break;case 39:case 34:for(;++s<r;){let c=e.charCodeAt(s);if(c===92){s+=1;continue}if(c===a)break}break;case 40:L[i]=41,i++;break;case 91:L[i]=93,i++;break;case 123:L[i]=125,i++;break;case 93:case 125:case 41:i>0&&a===L[i-1]&&i--;break}}return t.push(e.slice(n)),t}var b=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,Xt=new RegExp(`^${b.source}$`);var er=new RegExp(`^${b.source}%$`);var tr=new RegExp(`^${b.source}s*/s*${b.source}$`);var We=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],rr=new RegExp(`^${b.source}(${We.join("|")})$`);var Be=["deg","rad","grad","turn"],ir=new RegExp(`^${b.source}(${Be.join("|")})$`);var nr=new RegExp(`^${b.source} +${b.source} +${b.source}$`);function v(e){let o=Number(e);return Number.isInteger(o)&&o>=0&&String(o)===String(e)}function U(e,o){if(o===null)return e;let i=Number(o);return Number.isNaN(i)||(o=`${i*100}%`),`color-mix(in oklab, ${e} ${o}, transparent)`}var Ge={"--alpha":Ye,"--spacing":Je,"--theme":Qe,theme:Ze};function Ye(e,o,i,...t){let[n,r]=d(i,"/").map(l=>l.trim());if(!n||!r)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${r||"50%"})\``);if(t.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${r||"50%"})\``);return U(n,r)}function Je(e,o,i,...t){if(!i)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(t.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${t.length+1}.`);let n=e.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${i})`}function Qe(e,o,i,...t){if(!i.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;i.endsWith(" inline")&&(n=!0,i=i.slice(0,-7)),o.kind==="at-rule"&&(n=!0);let r=e.resolveThemeValue(i,n);if(!r){if(t.length>0)return t.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(t.length===0)return r;let l=t.join(", ");if(l==="initial")return r;if(r==="initial")return l;if(r.startsWith("var(")||r.startsWith("theme(")||r.startsWith("--theme(")){let s=T(r);return et(s,l),$(s)}return r}function Ze(e,o,i,...t){i=Xe(i);let n=e.resolveThemeValue(i);if(!n&&t.length>0)return t.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var Ar=new RegExp(Object.keys(Ge).map(e=>`${e}\\(`).join("|"));function Xe(e){if(e[0]!=="'"&&e[0]!=='"')return e;let o="",i=e[0];for(let t=1;t<e.length-1;t++){let n=e[t],r=e[t+1];n==="\\"&&(r===i||r==="\\")?(o+=r,t++):o+=n}return o}function et(e,o){P(e,i=>{if(i.kind==="function"&&!(i.value!=="var"&&i.value!=="theme"&&i.value!=="--theme"))if(i.nodes.length===1)i.nodes.push({kind:"word",value:`, ${o}`});else{let t=i.nodes[i.nodes.length-1];t.kind==="word"&&t.value==="initial"&&(t.value=o)}})}var lt=32;var at=40;function Ce(e,o=[]){for(let i=5;i<e.length;i++){let t=e.charCodeAt(i);if(t===lt||t===at){let n=e.slice(0,i).trim(),r=e.slice(i).trim();return m(n,r,o)}}return m(e.trim(),"",o)}var Q={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.Line truncated
|
||||
`;else if(t.kind==="rule"){r+=`${l}${t.selector} {
|
||||
`;for(let s of t.nodes)r+=o(s,n+1);r+=`${l}}
|
||||
`}else if(t.kind==="at-rule"){if(t.nodes.length===0)return`${l}${t.name} ${t.params};
|
||||
`;r+=`${l}${t.name}${t.params?` ${t.params} `:" "}{
|
||||
`;for(let s of t.nodes)r+=o(s,n+1);r+=`${l}}
|
||||
`}else if(t.kind==="comment")r+=`${l}/*${t.value}*/
|
||||
`;else if(t.kind==="context"||t.kind==="at-root")return"";return r}let i="";for(let t of e){let n=o(t);n!==""&&(i+=n)}return i}import z from"postcss";var wt=33;function Ve(e,o){let i=z.root();i.source=o;function t(n,r){if(n.kind==="declaration"){let l=z.decl({prop:n.property,value:n.value??"",important:n.important});l.source=o,r.append(l)}else if(n.kind==="rule"){let l=z.rule({selector:n.selector});l.source=o,l.raws.semicolon=!0,r.append(l);for(let s of n.nodes)t(s,l)}else if(n.kind==="at-rule"){let l=z.atRule({name:n.name.slice(1),params:n.params});l.source=o,l.raws.semicolon=!0,r.append(l);for(let s of n.nodes)t(s,l)}else if(n.kind==="comment"){let l=z.comment({text:n.value});l.raws.left="",l.raws.right="",l.source=o,r.append(l)}else n.kind==="at-root"||n.kind}for(let n of e)t(n,i);return i}function Ee(e){function o(t,n){if(t.type==="decl")n.push(y(t.prop,t.value,t.important));else if(t.type==="rule"){let r=x(t.selector);t.each(l=>o(l,r.nodes)),n.push(r)}else if(t.type==="atrule"){let r=m(`@${t.name}`,t.params);t.each(l=>o(l,r.nodes)),n.push(r)}else if(t.type==="comment"){if(t.text.charCodeAt(0)!==wt)return;n.push(M(t.text))}}let i=[];return e.each(t=>o(t,i)),i}import{normalizePath as Re}from"@tailwindcss/node";import B from"node:path";var Z="'",X='"';function ee(){let e=new WeakSet;function o(i){let t=i.root().source?.input.file;if(!t)return;let n=i.source?.input.file;if(!n||e.has(i))return;let r=i.params[0],l=r[0]===X&&r[r.length-1]===X?X:r[0]===Z&&r[r.length-1]===Z?Z:null;if(!l)return;let s=i.params.slice(1,-1),a="";if(s.startsWith("!")&&(s=s.slice(1),a="!"),!s.startsWith("./")&&!s.startsWith("../"))return;let c=B.posix.join(Re(B.dirname(n)),s),N=B.posix.dirname(Re(t)),k=B.posix.relative(N,c);k.startsWith(".")||(k="./"+k),i.params=l+a+k+l,e.add(i)}return{postcssPlugin:"tailwindcss-postcss-fix-relative-paths",Once(i){i.walkAtRules(/source|plugin|config/,o)}}}var u=bt.DEBUG,ie=new kt({maxSize:50});function $t(e,o){let i=`${e}:${o.base??""}:${JSON.stringify(o.optimize)}`;if(ie.has(i))return ie.get(i);let t={mtimes:new Map,compiler:null,scanner:null,tailwindCssAst:[],cachedPostCssAst:ne.root(),optimizedPostCssAst:ne.root(),fullRebuildPaths:[]};return ie.set(i,t),t}function Tt(e={}){let o=e.base??process.cwd(),i=e.optimize??process.env.NODE_ENV==="production";return{postcssPlugin:"@tailwindcss/postcss",plugins:[ee(),{postcssPlugin:"tailwindcss",async Once(t,{result:n}){var oe=[];try{let r=se(oe,new xt);let l=n.opts.from??"";let s=l.endsWith(".module.css");u&&r.start(`[@tailwindcss/postcss] ${Pe(o,l)}`);{u&&r.start("Quick bail check");let g=!0;if(t.walkAtRules(f=>{if(f.name==="import"||f.name==="reference"||f.name==="theme"||f.name==="variant"||f.name==="config"||f.name==="plugin"||f.name==="apply"||f.name==="tailwind")return g=!1,!1}),g)return;u&&r.end("Quick bail check")}let a=$t(l,e);let c=R.dirname(R.resolve(l));async function N(){u&&r.start("Setup compiler"),a.fullRebuildPaths.length>0&&!k&&Ct(a.fullRebuildPaths),a.fullRebuildPaths=[],u&&r.start("PostCSS AST -> Tailwind CSS AST");let g=Ee(t);u&&r.end("PostCSS AST -> Tailwind CSS AST"),u&&r.start("Create compiler");let f=await yt(g,{base:c,shouldRewriteUrls:!0,onDependency:h=>{a.fullRebuildPaths.push(h)},polyfills:s?re.All^re.AtProperty:re.All});return u&&r.end("Create compiler"),u&&r.end("Setup compiler"),f}let k=a.compiler===null;a.compiler??=N();if((await a.compiler).features===te.None)return;let I="incremental";u&&r.start("Register full rebuild paths");{for(let f of a.fullRebuildPaths)n.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:R.resolve(f),parent:n.opts.from});let g=n.messages.flatMap(f=>f.type!=="dependency"?[]:f.file);g.push(l);for(let f of g){let h=St.statSync(f,{throwIfNoEntry:!1})?.mtimeMs??null;if(h===null){f===l&&(I="full");continue}a.mtimes.get(f)!==h&&(I="full",a.mtimes.set(f,h))}}u&&r.end("Register full rebuild paths");I==="full"&&!k&&(a.compiler=N());let S=await a.compiler;if(a.scanner===null||I==="full"){u&&r.start("Setup scanner");let g=(S.root==="none"?[]:S.root===null?[{base:o,pattern:"**/*",negated:!1}]:[{...S.root,negated:!1}]).concat(S.sources);a.scanner=new Nt({sources:g}),u&&r.end("Setup scanner")}u&&r.start("Scan for candidates");let Oe=S.features&te.Utilities?a.scanner.scan():[];u&&r.end("Scan for candidates");if(S.features&te.Utilities){u&&r.start("Register dependency messages");let g=R.resolve(o,l);for(let f of a.scanner.files){let h=R.resolve(f);h!==g&&n.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:h,parent:n.opts.from})}for(let{base:f,pattern:h}of a.scanner.globs)h==="*"&&o===f||(h===""?n.messages.push({type:"dependency",plugin:"@tailwindcss/postcss",file:R.resolve(f),parent:n.opts.from}):n.messages.push({type:"dir-dependency",plugin:"@tailwindcss/postcss",dir:R.resolve(f),glob:h,parent:n.opts.from}));u&&r.end("Register dependency messages")}u&&r.start("Build utilities");let F=S.build(Oe);u&&r.end("Build utilities");if(a.tailwindCssAst!==F)if(i){u&&r.start("Optimization"),u&
Line truncated
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "@tailwindcss/postcss",
|
||||
"version": "4.1.3",
|
||||
"description": "PostCSS plugin for Tailwind CSS, a utility-first CSS framework for rapidly building custom user interfaces",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tailwindlabs/tailwindcss.git",
|
||||
"directory": "packages/@tailwindcss-postcss"
|
||||
},
|
||||
"bugs": "https://github.com/tailwindlabs/tailwindcss/issues",
|
||||
"homepage": "https://tailwindcss.com",
|
||||
"files": [
|
||||
"dist/"
|
||||
],
|
||||
"publishConfig": {
|
||||
"provenance": true,
|
||||
"access": "public"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@alloc/quick-lru": "^5.2.0",
|
||||
"postcss": "^8.4.41",
|
||||
"@tailwindcss/node": "4.1.3",
|
||||
"@tailwindcss/oxide": "4.1.3",
|
||||
"tailwindcss": "4.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.14.8",
|
||||
"@types/postcss-import": "14.0.3",
|
||||
"dedent": "1.5.3",
|
||||
"postcss-import": "^16.1.0",
|
||||
"internal-example-plugin": "0.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "tsc --noEmit",
|
||||
"build": "tsup-node",
|
||||
"dev": "pnpm run build -- --watch"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user