the latest code
This commit is contained in:
1 parent
d28bc1ed43
commit
9bbb24a52b
12226 files changed
+1455579
-21
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.
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
<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 feature ideas:
|
||||
|
||||
[Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions)
|
||||
|
||||
## 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**.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { ResolveHook } from 'node:module';
|
||||
|
||||
declare let resolve: ResolveHook;
|
||||
|
||||
export { resolve };
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{isBuiltin as i}from"module";var o=async(a,e,u)=>{let r=await u(a,e);if(r.url===import.meta.url||i(r.url)||!e.parentURL)return r;let t=new URL(e.parentURL).searchParams.get("id");if(t===null)return r;let l=new URL(r.url);return l.searchParams.set("id",t),{...r,url:`${l}`}};export{o as resolve};
|
||||
+255
@@ -0,0 +1,255 @@
|
||||
import { AstNode as AstNode$1 } from './ast';
|
||||
import { Candidate, Variant } from './candidate';
|
||||
import { compileAstNodes } from './compile';
|
||||
import { ClassEntry, VariantEntry, CanonicalizeOptions } from './intellisense';
|
||||
import { Theme } from './theme';
|
||||
import { Utilities } from './utilities';
|
||||
import { Variants } from './variants';
|
||||
import * as tailwindcss from 'tailwindcss';
|
||||
import { Polyfills, Features } from 'tailwindcss';
|
||||
export { Features, Polyfills } from 'tailwindcss';
|
||||
|
||||
declare const DEBUG: boolean;
|
||||
|
||||
declare const env_DEBUG: typeof DEBUG;
|
||||
declare namespace env {
|
||||
export { env_DEBUG as DEBUG };
|
||||
}
|
||||
|
||||
declare const enum CompileAstFlags {
|
||||
None = 0,
|
||||
RespectImportant = 1
|
||||
}
|
||||
type DesignSystem = {
|
||||
theme: Theme;
|
||||
utilities: Utilities;
|
||||
variants: Variants;
|
||||
invalidCandidates: Set<string>;
|
||||
important: boolean;
|
||||
getClassOrder(classes: string[]): [string, bigint | null][];
|
||||
getClassList(): ClassEntry[];
|
||||
getVariants(): VariantEntry[];
|
||||
parseCandidate(candidate: string): Readonly<Candidate>[];
|
||||
parseVariant(variant: string): Readonly<Variant> | null;
|
||||
compileAstNodes(candidate: Candidate, flags?: CompileAstFlags): ReturnType<typeof compileAstNodes>;
|
||||
printCandidate(candidate: Candidate): string;
|
||||
printVariant(variant: Variant): string;
|
||||
getVariantOrder(): Map<Variant, number>;
|
||||
resolveThemeValue(path: string, forceInline?: boolean): string | undefined;
|
||||
trackUsedVariables(raw: string): void;
|
||||
canonicalizeCandidates(candidates: string[], options?: CanonicalizeOptions): string[];
|
||||
candidatesToCss(classes: string[]): (string | null)[];
|
||||
candidatesToAst(classes: string[]): AstNode$1[][];
|
||||
storage: Record<symbol, unknown>;
|
||||
};
|
||||
|
||||
/**
|
||||
* The source code for one or more nodes in the AST
|
||||
*
|
||||
* This generally corresponds to a stylesheet
|
||||
*/
|
||||
interface Source {
|
||||
/**
|
||||
* The path to the file that contains the referenced source code
|
||||
*
|
||||
* If this references the *output* source code, this is `null`.
|
||||
*/
|
||||
file: string | null;
|
||||
/**
|
||||
* The referenced source code
|
||||
*/
|
||||
code: string;
|
||||
}
|
||||
/**
|
||||
* The file and offsets within it that this node covers
|
||||
*
|
||||
* This can represent either:
|
||||
* - A location in the original CSS which caused this node to be created
|
||||
* - A location in the output CSS where this node resides
|
||||
*/
|
||||
type SourceLocation = [source: Source, start: number, end: number];
|
||||
|
||||
/**
|
||||
* Line offset tables are the key to generating our source maps. They allow us
|
||||
* to store indexes with our AST nodes and later convert them into positions as
|
||||
* when given the source that the indexes refer to.
|
||||
*/
|
||||
/**
|
||||
* A position in source code
|
||||
*
|
||||
* https://tc39.es/ecma426/#sec-position-record-type
|
||||
*/
|
||||
interface Position {
|
||||
/** The line number, one-based */
|
||||
line: number;
|
||||
/** The column/character number, one-based */
|
||||
column: number;
|
||||
}
|
||||
|
||||
interface OriginalPosition extends Position {
|
||||
source: DecodedSource;
|
||||
}
|
||||
/**
|
||||
* A "decoded" sourcemap
|
||||
*
|
||||
* @see https://tc39.es/ecma426/#decoded-source-map-record
|
||||
*/
|
||||
interface DecodedSourceMap {
|
||||
file: string | null;
|
||||
sources: DecodedSource[];
|
||||
mappings: DecodedMapping[];
|
||||
}
|
||||
/**
|
||||
* A "decoded" source
|
||||
*
|
||||
* @see https://tc39.es/ecma426/#decoded-source-record
|
||||
*/
|
||||
interface DecodedSource {
|
||||
url: string | null;
|
||||
content: string | null;
|
||||
ignore: boolean;
|
||||
}
|
||||
/**
|
||||
* A "decoded" mapping
|
||||
*
|
||||
* @see https://tc39.es/ecma426/#decoded-mapping-record
|
||||
*/
|
||||
interface DecodedMapping {
|
||||
originalPosition: OriginalPosition | null;
|
||||
generatedPosition: Position;
|
||||
name: string | null;
|
||||
}
|
||||
|
||||
type StyleRule = {
|
||||
kind: 'rule';
|
||||
selector: string;
|
||||
nodes: AstNode[];
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type AtRule = {
|
||||
kind: 'at-rule';
|
||||
name: string;
|
||||
params: string;
|
||||
nodes: AstNode[];
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type Declaration = {
|
||||
kind: 'declaration';
|
||||
property: string;
|
||||
value: string | undefined;
|
||||
important: boolean;
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type Comment = {
|
||||
kind: 'comment';
|
||||
value: string;
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type Context = {
|
||||
kind: 'context';
|
||||
context: Record<string, string | boolean>;
|
||||
nodes: AstNode[];
|
||||
src?: undefined;
|
||||
dst?: undefined;
|
||||
};
|
||||
type AtRoot = {
|
||||
kind: 'at-root';
|
||||
nodes: AstNode[];
|
||||
src?: undefined;
|
||||
dst?: undefined;
|
||||
};
|
||||
type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot;
|
||||
|
||||
type Resolver = (id: string, base: string) => Promise<string | false | undefined>;
|
||||
interface CompileOptions {
|
||||
base: string;
|
||||
from?: string;
|
||||
onDependency: (path: string) => void;
|
||||
shouldRewriteUrls?: boolean;
|
||||
polyfills?: Polyfills;
|
||||
customCssResolver?: Resolver;
|
||||
customJsResolver?: Resolver;
|
||||
}
|
||||
declare function compileAst(ast: AstNode[], options: CompileOptions): Promise<{
|
||||
sources: {
|
||||
base: string;
|
||||
pattern: string;
|
||||
negated: boolean;
|
||||
}[];
|
||||
root: "none" | {
|
||||
base: string;
|
||||
pattern: string;
|
||||
} | null;
|
||||
features: Features;
|
||||
build(candidates: string[]): AstNode[];
|
||||
}>;
|
||||
declare function compile(css: string, options: CompileOptions): Promise<{
|
||||
sources: {
|
||||
base: string;
|
||||
pattern: string;
|
||||
negated: boolean;
|
||||
}[];
|
||||
root: "none" | {
|
||||
base: string;
|
||||
pattern: string;
|
||||
} | null;
|
||||
features: Features;
|
||||
build(candidates: string[]): string;
|
||||
buildSourceMap(): tailwindcss.DecodedSourceMap;
|
||||
}>;
|
||||
declare function __unstable__loadDesignSystem(css: string, { base }: {
|
||||
base: string;
|
||||
}): Promise<DesignSystem>;
|
||||
declare function loadModule(id: string, base: string, onDependency: (path: string) => void, customJsResolver?: Resolver): Promise<{
|
||||
path: string;
|
||||
base: string;
|
||||
module: any;
|
||||
}>;
|
||||
|
||||
declare class Instrumentation implements Disposable {
|
||||
#private;
|
||||
private defaultFlush;
|
||||
constructor(defaultFlush?: (message: string) => undefined);
|
||||
hit(label: string): void;
|
||||
start(label: string): void;
|
||||
end(label: string): void;
|
||||
reset(): void;
|
||||
report(flush?: (message: string) => undefined): void;
|
||||
[Symbol.dispose](): void;
|
||||
}
|
||||
|
||||
declare function normalizePath(originalPath: string): string;
|
||||
|
||||
interface OptimizeOptions {
|
||||
/**
|
||||
* The file being transformed
|
||||
*/
|
||||
file?: string;
|
||||
/**
|
||||
* Enabled minified output
|
||||
*/
|
||||
minify?: boolean;
|
||||
/**
|
||||
* The output source map before optimization
|
||||
*
|
||||
* If omitted a resulting source map will not be available
|
||||
*/
|
||||
map?: string;
|
||||
}
|
||||
interface TransformResult {
|
||||
code: string;
|
||||
map: string | undefined;
|
||||
}
|
||||
declare function optimize(input: string, { file, minify, map }?: OptimizeOptions): TransformResult;
|
||||
|
||||
interface SourceMap {
|
||||
readonly raw: string;
|
||||
readonly inline: string;
|
||||
}
|
||||
declare function toSourceMap(map: DecodedSourceMap | string): SourceMap;
|
||||
|
||||
export { type CompileOptions, type DecodedSource, type DecodedSourceMap, Instrumentation, type OptimizeOptions, type Resolver, type SourceMap, type TransformResult, __unstable__loadDesignSystem, compile, compileAst, env, loadModule, normalizePath, optimize, toSourceMap };
|
||||
+255
@@ -0,0 +1,255 @@
|
||||
import { AstNode as AstNode$1 } from './ast';
|
||||
import { Candidate, Variant } from './candidate';
|
||||
import { compileAstNodes } from './compile';
|
||||
import { ClassEntry, VariantEntry, CanonicalizeOptions } from './intellisense';
|
||||
import { Theme } from './theme';
|
||||
import { Utilities } from './utilities';
|
||||
import { Variants } from './variants';
|
||||
import * as tailwindcss from 'tailwindcss';
|
||||
import { Polyfills, Features } from 'tailwindcss';
|
||||
export { Features, Polyfills } from 'tailwindcss';
|
||||
|
||||
declare const DEBUG: boolean;
|
||||
|
||||
declare const env_DEBUG: typeof DEBUG;
|
||||
declare namespace env {
|
||||
export { env_DEBUG as DEBUG };
|
||||
}
|
||||
|
||||
declare const enum CompileAstFlags {
|
||||
None = 0,
|
||||
RespectImportant = 1
|
||||
}
|
||||
type DesignSystem = {
|
||||
theme: Theme;
|
||||
utilities: Utilities;
|
||||
variants: Variants;
|
||||
invalidCandidates: Set<string>;
|
||||
important: boolean;
|
||||
getClassOrder(classes: string[]): [string, bigint | null][];
|
||||
getClassList(): ClassEntry[];
|
||||
getVariants(): VariantEntry[];
|
||||
parseCandidate(candidate: string): Readonly<Candidate>[];
|
||||
parseVariant(variant: string): Readonly<Variant> | null;
|
||||
compileAstNodes(candidate: Candidate, flags?: CompileAstFlags): ReturnType<typeof compileAstNodes>;
|
||||
printCandidate(candidate: Candidate): string;
|
||||
printVariant(variant: Variant): string;
|
||||
getVariantOrder(): Map<Variant, number>;
|
||||
resolveThemeValue(path: string, forceInline?: boolean): string | undefined;
|
||||
trackUsedVariables(raw: string): void;
|
||||
canonicalizeCandidates(candidates: string[], options?: CanonicalizeOptions): string[];
|
||||
candidatesToCss(classes: string[]): (string | null)[];
|
||||
candidatesToAst(classes: string[]): AstNode$1[][];
|
||||
storage: Record<symbol, unknown>;
|
||||
};
|
||||
|
||||
/**
|
||||
* The source code for one or more nodes in the AST
|
||||
*
|
||||
* This generally corresponds to a stylesheet
|
||||
*/
|
||||
interface Source {
|
||||
/**
|
||||
* The path to the file that contains the referenced source code
|
||||
*
|
||||
* If this references the *output* source code, this is `null`.
|
||||
*/
|
||||
file: string | null;
|
||||
/**
|
||||
* The referenced source code
|
||||
*/
|
||||
code: string;
|
||||
}
|
||||
/**
|
||||
* The file and offsets within it that this node covers
|
||||
*
|
||||
* This can represent either:
|
||||
* - A location in the original CSS which caused this node to be created
|
||||
* - A location in the output CSS where this node resides
|
||||
*/
|
||||
type SourceLocation = [source: Source, start: number, end: number];
|
||||
|
||||
/**
|
||||
* Line offset tables are the key to generating our source maps. They allow us
|
||||
* to store indexes with our AST nodes and later convert them into positions as
|
||||
* when given the source that the indexes refer to.
|
||||
*/
|
||||
/**
|
||||
* A position in source code
|
||||
*
|
||||
* https://tc39.es/ecma426/#sec-position-record-type
|
||||
*/
|
||||
interface Position {
|
||||
/** The line number, one-based */
|
||||
line: number;
|
||||
/** The column/character number, one-based */
|
||||
column: number;
|
||||
}
|
||||
|
||||
interface OriginalPosition extends Position {
|
||||
source: DecodedSource;
|
||||
}
|
||||
/**
|
||||
* A "decoded" sourcemap
|
||||
*
|
||||
* @see https://tc39.es/ecma426/#decoded-source-map-record
|
||||
*/
|
||||
interface DecodedSourceMap {
|
||||
file: string | null;
|
||||
sources: DecodedSource[];
|
||||
mappings: DecodedMapping[];
|
||||
}
|
||||
/**
|
||||
* A "decoded" source
|
||||
*
|
||||
* @see https://tc39.es/ecma426/#decoded-source-record
|
||||
*/
|
||||
interface DecodedSource {
|
||||
url: string | null;
|
||||
content: string | null;
|
||||
ignore: boolean;
|
||||
}
|
||||
/**
|
||||
* A "decoded" mapping
|
||||
*
|
||||
* @see https://tc39.es/ecma426/#decoded-mapping-record
|
||||
*/
|
||||
interface DecodedMapping {
|
||||
originalPosition: OriginalPosition | null;
|
||||
generatedPosition: Position;
|
||||
name: string | null;
|
||||
}
|
||||
|
||||
type StyleRule = {
|
||||
kind: 'rule';
|
||||
selector: string;
|
||||
nodes: AstNode[];
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type AtRule = {
|
||||
kind: 'at-rule';
|
||||
name: string;
|
||||
params: string;
|
||||
nodes: AstNode[];
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type Declaration = {
|
||||
kind: 'declaration';
|
||||
property: string;
|
||||
value: string | undefined;
|
||||
important: boolean;
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type Comment = {
|
||||
kind: 'comment';
|
||||
value: string;
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type Context = {
|
||||
kind: 'context';
|
||||
context: Record<string, string | boolean>;
|
||||
nodes: AstNode[];
|
||||
src?: undefined;
|
||||
dst?: undefined;
|
||||
};
|
||||
type AtRoot = {
|
||||
kind: 'at-root';
|
||||
nodes: AstNode[];
|
||||
src?: undefined;
|
||||
dst?: undefined;
|
||||
};
|
||||
type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot;
|
||||
|
||||
type Resolver = (id: string, base: string) => Promise<string | false | undefined>;
|
||||
interface CompileOptions {
|
||||
base: string;
|
||||
from?: string;
|
||||
onDependency: (path: string) => void;
|
||||
shouldRewriteUrls?: boolean;
|
||||
polyfills?: Polyfills;
|
||||
customCssResolver?: Resolver;
|
||||
customJsResolver?: Resolver;
|
||||
}
|
||||
declare function compileAst(ast: AstNode[], options: CompileOptions): Promise<{
|
||||
sources: {
|
||||
base: string;
|
||||
pattern: string;
|
||||
negated: boolean;
|
||||
}[];
|
||||
root: "none" | {
|
||||
base: string;
|
||||
pattern: string;
|
||||
} | null;
|
||||
features: Features;
|
||||
build(candidates: string[]): AstNode[];
|
||||
}>;
|
||||
declare function compile(css: string, options: CompileOptions): Promise<{
|
||||
sources: {
|
||||
base: string;
|
||||
pattern: string;
|
||||
negated: boolean;
|
||||
}[];
|
||||
root: "none" | {
|
||||
base: string;
|
||||
pattern: string;
|
||||
} | null;
|
||||
features: Features;
|
||||
build(candidates: string[]): string;
|
||||
buildSourceMap(): tailwindcss.DecodedSourceMap;
|
||||
}>;
|
||||
declare function __unstable__loadDesignSystem(css: string, { base }: {
|
||||
base: string;
|
||||
}): Promise<DesignSystem>;
|
||||
declare function loadModule(id: string, base: string, onDependency: (path: string) => void, customJsResolver?: Resolver): Promise<{
|
||||
path: string;
|
||||
base: string;
|
||||
module: any;
|
||||
}>;
|
||||
|
||||
declare class Instrumentation implements Disposable {
|
||||
#private;
|
||||
private defaultFlush;
|
||||
constructor(defaultFlush?: (message: string) => undefined);
|
||||
hit(label: string): void;
|
||||
start(label: string): void;
|
||||
end(label: string): void;
|
||||
reset(): void;
|
||||
report(flush?: (message: string) => undefined): void;
|
||||
[Symbol.dispose](): void;
|
||||
}
|
||||
|
||||
declare function normalizePath(originalPath: string): string;
|
||||
|
||||
interface OptimizeOptions {
|
||||
/**
|
||||
* The file being transformed
|
||||
*/
|
||||
file?: string;
|
||||
/**
|
||||
* Enabled minified output
|
||||
*/
|
||||
minify?: boolean;
|
||||
/**
|
||||
* The output source map before optimization
|
||||
*
|
||||
* If omitted a resulting source map will not be available
|
||||
*/
|
||||
map?: string;
|
||||
}
|
||||
interface TransformResult {
|
||||
code: string;
|
||||
map: string | undefined;
|
||||
}
|
||||
declare function optimize(input: string, { file, minify, map }?: OptimizeOptions): TransformResult;
|
||||
|
||||
interface SourceMap {
|
||||
readonly raw: string;
|
||||
readonly inline: string;
|
||||
}
|
||||
declare function toSourceMap(map: DecodedSourceMap | string): SourceMap;
|
||||
|
||||
export { type CompileOptions, type DecodedSource, type DecodedSourceMap, Instrumentation, type OptimizeOptions, type Resolver, type SourceMap, type TransformResult, __unstable__loadDesignSystem, compile, compileAst, env, loadModule, normalizePath, optimize, toSourceMap };
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
"use strict";var It=Object.create;var ne=Object.defineProperty;var Dt=Object.getOwnPropertyDescriptor;var Ut=Object.getOwnPropertyNames;var Lt=Object.getPrototypeOf,Kt=Object.prototype.hasOwnProperty;var Le=(e,r)=>{for(var t in r)ne(e,t,{get:r[t],enumerable:!0})},Ke=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Ut(r))!Kt.call(e,o)&&o!==t&&ne(e,o,{get:()=>r[o],enumerable:!(i=Dt(r,o))||i.enumerable});return e};var T=(e,r,t)=>(t=e!=null?It(Lt(e)):{},Ke(r||!e||!e.__esModule?ne(t,"default",{value:e,enumerable:!0}):t,e)),zt=e=>Ke(ne({},"__esModule",{value:!0}),e);var ci={};Le(ci,{Features:()=>O.Features,Instrumentation:()=>Ue,Polyfills:()=>O.Polyfills,__unstable__loadDesignSystem:()=>ti,compile:()=>ei,compileAst:()=>Xr,env:()=>oe,loadModule:()=>Ie,normalizePath:()=>me,optimize:()=>li,toSourceMap:()=>fi});module.exports=zt(ci);var Pt=T(require("module")),_t=require("url");var oe={};Le(oe,{DEBUG:()=>ve});var ve=Mt(process.env.DEBUG);function Mt(e){if(typeof e=="boolean")return e;if(e===void 0)return!1;if(e==="true"||e==="1")return!0;if(e==="false"||e==="0")return!1;if(e==="*")return!0;let r=e.split(",").map(t=>t.split(":")[0]);return r.includes("-tailwindcss")?!1:!!r.includes("tailwindcss")}var j=T(require("enhanced-resolve")),St=require("jiti"),ge=T(require("fs")),_e=T(require("fs/promises")),re=T(require("path")),Oe=require("url"),O=require("tailwindcss");var ae=T(require("fs/promises")),B=T(require("path")),Ft=[/import[\s\S]*?['"](.{3,}?)['"]/gi,/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/require\(['"`](.+)['"`]\)/gi],jt=[".js",".cjs",".mjs"],Wt=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],Bt=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];async function Yt(e,r){for(let t of r){let i=`${e}${t}`;if((await ae.default.stat(i).catch(()=>null))?.isFile())return i}for(let t of r){let i=`${e}/index${t}`;if(await ae.default.access(i).then(()=>!0,()=>!1))return i}return null}async function ze(e,r,t,i){let o=jt.includes(i)?Wt:Bt,a=await Yt(B.default.resolve(t,r),o);if(a===null||e.has(a))return;e.add(a),t=B.default.dirname(a),i=B.default.extname(a);let n=await ae.default.readFile(a,"utf-8"),s=[];for(let l of Ft)for(let u of n.matchAll(l))u[1].startsWith(".")&&s.push(ze(e,u[1],t,i));await Promise.all(s)}async function Me(e){let r=new Set;return await ze(r,e,B.default.dirname(e),B.default.extname(e)),Array.from(r)}var Ve=T(require("path"));function Y(e){return{kind:"word",value:e}}function Gt(e,r){return{kind:"function",value:e,nodes:r}}function Ht(e){return{kind:"separator",value:e}}function S(e){let r="";for(let t of e)switch(t.kind){case"word":case"separator":{r+=t.value;break}case"function":r+=t.value+"("+S(t.nodes)+")"}return r}var Fe=92,qt=41,je=58,We=44,Zt=34,Be=61,Ye=62,Ge=60,He=10,Qt=40,Jt=39,Xt=47,qe=32,Ze=9;function A(e){e=e.replaceAll(`\r
|
||||
`,`
|
||||
`);let r=[],t=[],i=null,o="",a;for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);switch(s){case Fe:{o+=e[n]+e[n+1],n++;break}case Xt:{if(o.length>0){let u=Y(o);i?i.nodes.push(u):r.push(u),o=""}let l=Y(e[n]);i?i.nodes.push(l):r.push(l);break}case je:case We:case Be:case Ye:case Ge:case He:case qe:case Ze:{if(o.length>0){let c=Y(o);i?i.nodes.push(c):r.push(c),o=""}let l=n,u=n+1;for(;u<e.length&&(a=e.charCodeAt(u),!(a!==je&&a!==We&&a!==Be&&a!==Ye&&a!==Ge&&a!==He&&a!==qe&&a!==Ze));u++);n=u-1;let p=Ht(e.slice(l,u));i?i.nodes.push(p):r.push(p);break}case Jt:case Zt:{let l=n;for(let u=n+1;u<e.length;u++)if(a=e.charCodeAt(u),a===Fe)u+=1;else if(a===s){n=u;break}o+=e.slice(l,n+1);break}case Qt:{let l=Gt(o,[]);o="",i?i.nodes.push(l):r.push(l),t.push(l),i=l;break}case qt:{let l=t.pop();if(o.length>0){let u=Y(o);l?.nodes.push(u),o=""}t.length>0?i=t[t.length-1]:i=null;break}default:o+=String.fromCharCode(s)}}return o.length>0&&r.push(Y(o)),r}var g=class extends Map{constructor(t){super();this.factory=t}get(t){let i=super.get(t);return i===void 0&&(i=this.factory(t,this),this.set(t,i)),i}};var yi=new Uint8Array(256);var le=new Uint8Array(256);function y(e,r){let t=0,i=[],o=0,a=e.length,n=r.charCodeAt(0);for(let s=0;s<a;s++){let l=e.charCodeAt(s);if(t===0&&l===n){i.push(e.slice(o,s)),o=s+1;continue}switch(l){case 92:s+=1;break;case 39:case 34:for(;++s<a;){let u=e.charCodeAt(s);if(u===92){s+=1;continue}if(u===l)break}break;case 40:le[t]=41,t++;break;case 91:le[t]=93,t++;break;case 123:le[t]=125,t++;break;case 93:case 125:case 41:t>0&&l===le[t-1]&&t--;break}}return i.push(e.slice(o)),i}var we=(n=>(n[n.Continue=0]="Continue",n[n.Skip=1]="Skip",n[n.Stop=2]="Stop",n[n.Replace=3]="Replace",n[n.ReplaceSkip=4]="ReplaceSkip",n[n.ReplaceStop=5]="ReplaceStop",n))(we||{}),w={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 v(e,r){typeof r=="function"?Qe(e,r):Qe(e,r.enter,r.exit)}function Qe(e,r=()=>w.Continue,t=()=>w.Continue){let i=[[e,0,null]],o={parent:null,depth:0,path(){let a=[];for(let n=1;n<i.length;n++){let s=i[n][2];s&&a.push(s)}return a}};for(;i.length>0;){let a=i.length-1,n=i[a],s=n[0],l=n[1],u=n[2];if(l>=s.length){i.pop();continue}if(o.parent=u,o.depth=a,l>=0){let m=s[l],d=r(m,o)??w.Continue;switch(d.kind){case 0:{m.nodes&&m.nodes.length>0&&i.push([m.nodes,0,m]),n[1]=~l;continue}case 2:return;case 1:{n[1]=~l;continue}case 3:{s.splice(l,1,...d.nodes);continue}case 5:{s.splice(l,1,...d.nodes);return}case 4:{s.splice(l,1,...d.nodes),n[1]+=d.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${we[d.kind]??`Unknown(${d.kind})`}\` in enter.`)}}let p=~l,c=s[p],f=t(c,o)??w.Continue;switch(f.kind){case 0:n[1]=p+1;continue;case 2:return;case 3:{s.splice(p,1,...f.nodes),n[1]=p+f.nodes.length;continue}case 5:{s.splice(p,1,...f.nodes);return}case 4:{s.splice(p,1,...f.nodes),n[1]=p+f.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${we[f.kind]??`Unknown(${f.kind})`}\` in exit.`)}}}var Vi=new g(e=>{let r=A(e),t=new Set;return v(r,(i,o)=>{let a=o.parent===null?r:o.parent.nodes??[];if(i.kind==="word"&&(i.value==="+"||i.value==="-"||i.value==="*"||i.value==="/")){let n=a.indexOf(i)??-1;if(n===-1)return;let s=a[n-1];if(s?.kind!=="separator"||s.value!==" ")return;let l=a[n+1];if(l?.kind!=="separator"||l.value!==" ")return;t.add(s),t.add(l)}else i.kind==="separator"&&i.value.length>0&&i.value.trim()===""?(a[0]===i||a[a.length-1]===i)&&t.add(i):i.kind==="separator"&&i.value.trim()===","&&(i.value=",")}),t.size>0&&v(r,i=>{if(t.has(i))return t.delete(i),w.ReplaceSkip([])}),ye(r),S(r)});var Ri=new g(e=>{let r=A(e);return r.length===3&&r[0].kind==="word"&&r[0].value==="&"&&r[1].kind==="separator"&&r[1].value===":"&&r[2].kind==="function"&&r[2].value==="is"?S(r[2].nodes):e});function ye(e){for(let r of e)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=G(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=G(r.value);for(let t=0;t<r.nodes.length;t++)ye([r.nodes[t]]);break}r.value=G(r.value),ye(r.nodes);break}case"separator":r.value=G(r.value);break;case"word":{(r.value[0]!=="-"||r.value[1]!=="-")&&(r.value=G(r.value));break}default:er(r)}}var Oi=new g(e=>{let r=A(e);return r.length===1&&r[0].kind==="function"&&r[0].value==="var"});function er(e){throw new Error(`Unexpected value: ${e}`)}function G(e){return e.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}var tr=process.env.FEATURES_ENV!=="stable";var _=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,Fi=new RegExp(`^${_.source}$`);var ji=new RegExp(`^${_.source}%$`);var Wi=new RegExp(`^${_.source}s*/s*${_.source}$`);var rr=["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"],Bi=new RegELine truncated
|
||||
`,r){t+=u.length;let p=t;t+=n.property.length,t+=2,t+=n.value?.length??0,n.important&&(t+=11);let c=t;t+=2,n.dst=[i,p,c]}}else if(n.kind==="rule"){if(l+=`${u}${n.selector} {
|
||||
`,r){t+=u.length;let p=t;t+=n.selector.length,t+=1;let c=t;n.dst=[i,p,c],t+=2}for(let p of n.nodes)l+=o(p,s+1);l+=`${u}}
|
||||
`,r&&(t+=u.length,t+=2)}else if(n.kind==="at-rule"){if(n.nodes.length===0){let p=`${u}${n.name} ${n.params};
|
||||
`;if(r){t+=u.length;let c=t;t+=n.name.length,t+=1,t+=n.params.length;let f=t;t+=2,n.dst=[i,c,f]}return p}if(l+=`${u}${n.name}${n.params?` ${n.params} `:" "}{
|
||||
`,r){t+=u.length;let p=t;t+=n.name.length,n.params&&(t+=1,t+=n.params.length),t+=1;let c=t;n.dst=[i,p,c],t+=2}for(let p of n.nodes)l+=o(p,s+1);l+=`${u}}
|
||||
`,r&&(t+=u.length,t+=2)}else if(n.kind==="comment"){if(l+=`${u}/*${n.value}*/
|
||||
`,r){t+=u.length;let p=t;t+=2+n.value.length+2;let c=t;n.dst=[i,p,c],t+=1}}else if(n.kind==="context"||n.kind==="at-root")return"";return l}let a="";for(let n of e)a+=o(n,0);return i.code=a,a}function Lr(e,r){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var t=e.length;if(t<=1)return e;var i="";if(t>4&&e[3]==="\\"){var o=e[2];(o==="?"||o===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),i="//")}var a=e.split(/[/\\]+/);return r!==!1&&a[a.length-1]===""&&a.pop(),i+a.join("/")}function me(e){let r=Lr(e);return e.startsWith("\\\\")&&r.startsWith("/")&&!r.startsWith("//")?`/${r}`:r}var Re=/(?<!@import\s+)(?<=^|[^\w\-\u0080-\uffff])url\((\s*('[^']+'|"[^"]+")\s*|[^'")]+)\)/,vt=/(?<=image-set\()((?:[\w-]{1,256}\([^)]*\)|[^)])*)(?=\))/,Kr=/(?:gradient|element|cross-fade|image)\(/,zr=/^\s*data:/i,Mr=/^([a-z]+:)?\/\//,Fr=/^[A-Z_][.\w-]*\(/i,jr=/(?:^|\s)(?<url>[\w-]+\([^)]*\)|"[^"]*"|'[^']*'|[^,]\S*[^,])\s*(?:\s(?<descriptor>\w[^,]+))?(?:,|$)/g,Wr=/(?<!\\)"/g,Br=/(?: |\\t|\\n|\\f|\\r)+/g,Yr=e=>zr.test(e),Gr=e=>Mr.test(e);async function wt({css:e,base:r,root:t}){if(!e.includes("url(")&&!e.includes("image-set("))return e;let i=te(e),o=[];function a(n){if(n[0]==="/")return n;let s=Ve.posix.join(me(r),n),l=Ve.posix.relative(me(t),s);return l.startsWith(".")||(l="./"+l),l}return v(i,n=>{if(n.kind!=="declaration"||!n.value)return;let s=Re.test(n.value),l=vt.test(n.value);if(s||l){let u=l?Hr:yt;o.push(u(n.value,a).then(p=>{n.value=p}))}}),o.length&&await Promise.all(o),M(i)}function yt(e,r){return bt(e,Re,async t=>{let[i,o]=t;return await kt(o.trim(),i,r)})}async function Hr(e,r){return await bt(e,vt,async t=>{let[,i]=t;return await Zr(i,async({url:a})=>Re.test(a)?await yt(a,r):Kr.test(a)?a:await kt(a,a,r))})}async function kt(e,r,t,i="url"){let o="",a=e[0];if((a==='"'||a==="'")&&(o=a,e=e.slice(1,-1)),qr(e))return r;let n=await t(e);return o===""&&n!==encodeURI(n)&&(o='"'),o==="'"&&n.includes("'")&&(o='"'),o==='"'&&n.includes('"')&&(n=n.replace(Wr,'\\"')),`${i}(${o}${n}${o})`}function qr(e,r){return Gr(e)||Yr(e)||!e[0].match(/[\.a-zA-Z0-9_]/)||Fr.test(e)}function Zr(e,r){return Promise.all(Qr(e).map(async({url:t,descriptor:i})=>({url:await r({url:t,descriptor:i}),descriptor:i}))).then(Jr)}function Qr(e){let r=e.trim().replace(Br," ").replace(/\r?\n/,"").replace(/,\s+/,", ").replaceAll(/\s+/g," ").matchAll(jr);return Array.from(r,({groups:t})=>({url:t?.url?.trim()??"",descriptor:t?.descriptor?.trim()??""})).filter(({url:t})=>!!t)}function Jr(e){return e.map(({url:r,descriptor:t})=>r+(t?` ${t}`:"")).join(", ")}async function bt(e,r,t){let i,o=e,a="";for(;i=r.exec(o);)a+=o.slice(0,i.index),a+=await t(i),o=o.slice(i.index+i[0].length);return a+=o,a}var ai={};function $t({base:e,from:r,polyfills:t,onDependency:i,shouldRewriteUrls:o,customCssResolver:a,customJsResolver:n}){return{base:e,polyfills:t,from:r,async loadModule(s,l){return Ie(s,l,i,n)},async loadStylesheet(s,l){let u=await Et(s,l,i,a);return o&&(u.content=await wt({css:u.content,root:e,base:u.base})),u}}}async function Tt(e){if(e.root&&e.root!=="none"){let r=/[*{]/,t=[];for(let o of e.root.pattern.split("/")){if(r.test(o))break;t.push(o)}if(!await _e.default.stat(re.default.resolve(e.root.base,t.join("/"))).then(o=>o.isDirectory()).catch(()=>!1))throw new Error(`The \`source(${e.root.pattern})\` does not exist or is not a directory.`)}}async function Xr(e,r){let t=await(0,O.compileAst)(e,$t(r));return await Tt(t),t}async function ei(e,r){let t=await(0,O.compile)(e,$t(r));return await Tt(t),t}async function ti(e,{base:r}){return(0,O.__unstable__loadDesignSystem)(e,{base:r,async loadModule(t,i){return Ie(t,i,()=>{})},async loadStylesheet(t,i){return Et(t,i,()=>{})}})}async function Ie(e,r,t,i){if(e[0]!=="."){let s=await Ct(e,r,i);if(!s)throw new Error(`Could not resolve '${e}' from '${r}'`);let l=await At((0,Oe.pathToFileURL)(s).href);return{path:s,base:re.default.dirname(s),module:l.default??l}}let o=await Ct(e,r,i);if(!o)throw new Error(`Could not resolve '${e}' from '${r}'`);let[a,n]=await Promise.all([At((0,Oe.pathToFileURL)(o).href+"?id="+Date.now()),Me(o)]);for(let s of n)t(s);return{path:o,base:re.default.dirname(o),module:a.default??a}}async function Et(e,r,t,i){let o=await ii(e,r,i);if(!o)throw new Error(`Could not resolve '${e}' from '${r}'`);t(o);let a=await _e.default.readFile(o,"utf-8");return{path:o,base:re.default.dirname(o),content:a}}var xt=null;async function At(e){if(typeof globalThis.__tw_load=="function"){let r=await globalThis.__tw_load(e);if(r)return r}try{return await import(e)}catch{return xt??=(0,St.createJiti)(ai.url,{moduleCache:!1,fsCache:!1}),await xt.import(e)}}var De=["node_modules",...process.env.NODE_PATH?[process.env.NODE_PATH]:[]],ri=j.default.ResolverFactory.createResolver({fileSystem:new j.default.CachedInputFileSystem(ge.default,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"],modules:De});async function ii(e,r,t){if(typeof globalThiLine truncated
|
||||
`)){this.defaultFlush=r}#r=new g(()=>({value:0}));#t=new g(()=>({value:0n}));#e=[];hit(r){this.#r.get(r).value++}start(r){let t=this.#e.map(o=>o.label).join("//"),i=`${t}${t.length===0?"":"//"}${r}`;this.#r.get(i).value++,this.#t.get(i),this.#e.push({id:i,label:r,namespace:t,value:process.hrtime.bigint()})}end(r){let t=process.hrtime.bigint();if(this.#e[this.#e.length-1].label!==r)throw new Error(`Mismatched timer label: \`${r}\`, expected \`${this.#e[this.#e.length-1].label}\``);let i=this.#e.pop(),o=t-i.value;this.#t.get(i.id).value+=o}reset(){this.#r.clear(),this.#t.clear(),this.#e.splice(0)}report(r=this.defaultFlush){let t=[],i=!1;for(let n=this.#e.length-1;n>=0;n--)this.end(this.#e[n].label);for(let[n,{value:s}]of this.#r.entries()){if(this.#t.has(n))continue;t.length===0&&(i=!0,t.push("Hits:"));let l=n.split("//").length;t.push(`${" ".repeat(l)}${n} ${he(Nt(`\xD7 ${s}`))}`)}this.#t.size>0&&i&&t.push(`
|
||||
Timers:`);let o=-1/0,a=new Map;for(let[n,{value:s}]of this.#t){let l=`${(Number(s)/1e6).toFixed(2)}ms`;a.set(n,l),o=Math.max(o,l.length)}for(let n of this.#t.keys()){let s=n.split("//").length;t.push(`${he(`[${a.get(n).padStart(o," ")}]`)}${" ".repeat(s-1)}${s===1?" ":he(" \u21B3 ")}${n.split("//").pop()} ${this.#r.get(n).value===1?"":he(Nt(`\xD7 ${this.#r.get(n).value}`))}`.trimEnd())}r(`
|
||||
${t.join(`
|
||||
`)}
|
||||
`),this.reset()}[Symbol.dispose](){ve&&this.report()}};function he(e){return`\x1B[2m${e}\x1B[22m`}function Nt(e){return`\x1B[34m${e}\x1B[39m`}var Vt=T(require("@jridgewell/remapping")),U=require("lightningcss"),Rt=T(require("magic-string"));function li(e,{file:r="input.css",minify:t=!1,map:i}={}){function o(l,u){return(0,U.transform)({filename:r,code:l,minify:t,sourceMap:typeof u<"u",inputSourceMap:u,drafts:{customMedia:!0},nonStandard:{deepSelectorCombinator:!0},include:U.Features.Nesting|U.Features.MediaQueries,exclude:U.Features.LogicalProperties|U.Features.DirSelector|U.Features.LightDark,targets:{safari:16<<16|1024,ios_saf:16<<16|1024,firefox:8388608,chrome:7274496},errorRecovery:!0})}let a=o(Buffer.from(e),i);if(i=a.map?.toString(),a.warnings=a.warnings.filter(l=>!/'(deep|slotted|global)' is not recognized as a valid pseudo-/.test(l.message)),a.warnings.length>0){let l=e.split(`
|
||||
`),u=[`Found ${a.warnings.length} ${a.warnings.length===1?"warning":"warnings"} while optimizing generated CSS:`];for(let[p,c]of a.warnings.entries()){u.push(""),a.warnings.length>1&&u.push(`Issue #${p+1}:`);let f=2,m=Math.max(0,c.loc.line-f-1),d=Math.min(l.length,c.loc.line+f),x=l.slice(m,d).map((h,L)=>m+L+1===c.loc.line?`${ie("\u2502")} ${h}`:ie(`\u2502 ${h}`));x.splice(c.loc.line-m,0,`${ie("\u2506")}${" ".repeat(c.loc.column-1)} ${si(`${ie("^--")} ${c.message}`)}`,`${ie("\u2506")}`),u.push(...x)}u.push(""),console.warn(u.join(`
|
||||
`))}a=o(a.code,i),i=a.map?.toString();let n=a.code.toString(),s=new Rt.default(n);if(s.replaceAll("@media not (","@media not all and ("),i!==void 0&&s.hasChanged()){let l=s.generateMap({source:"original",hires:"boundary"}).toString();i=(0,Vt.default)([l,i],()=>null).toString()}return n=s.toString(),{code:n,map:i}}function ie(e){return`\x1B[2m${e}\x1B[22m`}function si(e){return`\x1B[33m${e}\x1B[39m`}var Ot=require("source-map-js");function ui(e){let r=new Ot.SourceMapGenerator,t=1,i=new g(o=>({url:o?.url??`<unknown ${t++}>`,content:o?.content??"<none>"}));for(let o of e.mappings){let a=i.get(o.originalPosition?.source??null);r.addMapping({generated:o.generatedPosition,original:o.originalPosition,source:a.url,name:o.name}),r.setSourceContent(a.url,a.content)}return r.toString()}function fi(e){let r=typeof e=="string"?e:ui(e);return{raw:r,get inline(){let t="";return t+="/*# sourceMappingURL=data:application/json;base64,",t+=Buffer.from(r,"utf-8").toString("base64"),t+=` */
|
||||
`,t}}}process.versions.bun||Pt.register?.((0,_t.pathToFileURL)(require.resolve("@tailwindcss/node/esm-cache-loader")));0&&(module.exports={Features,Instrumentation,Polyfills,__unstable__loadDesignSystem,compile,compileAst,env,loadModule,normalizePath,optimize,toSourceMap});
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
var St=Object.defineProperty;var $t=(e,r)=>{for(var t in r)St(e,t,{get:r[t],enumerable:!0})};import*as ce from"module";import{pathToFileURL as Xr}from"url";var pe={};$t(pe,{DEBUG:()=>fe});var fe=Tt(process.env.DEBUG);function Tt(e){if(typeof e=="boolean")return e;if(e===void 0)return!1;if(e==="true"||e==="1")return!0;if(e==="false"||e==="0")return!1;if(e==="*")return!0;let r=e.split(",").map(t=>t.split(":")[0]);return r.includes("-tailwindcss")?!1:!!r.includes("tailwindcss")}import F from"enhanced-resolve";import{createJiti as Kr}from"jiti";import Ve from"fs";import wt from"fs/promises";import se from"path";import{pathToFileURL as mt}from"url";import{__unstable__loadDesignSystem as zr,compile as Mr,compileAst as Fr,Features as ru,Polyfills as iu}from"tailwindcss";import de from"fs/promises";import j from"path";var Et=[/import[\s\S]*?['"](.{3,}?)['"]/gi,/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/require\(['"`](.+)['"`]\)/gi],Nt=[".js",".cjs",".mjs"],Vt=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],Rt=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];async function Ot(e,r){for(let t of r){let i=`${e}${t}`;if((await de.stat(i).catch(()=>null))?.isFile())return i}for(let t of r){let i=`${e}/index${t}`;if(await de.access(i).then(()=>!0,()=>!1))return i}return null}async function Oe(e,r,t,i){let o=Nt.includes(i)?Vt:Rt,a=await Ot(j.resolve(t,r),o);if(a===null||e.has(a))return;e.add(a),t=j.dirname(a),i=j.extname(a);let n=await de.readFile(a,"utf-8"),s=[];for(let l of Et)for(let u of n.matchAll(l))u[1].startsWith(".")&&s.push(Oe(e,u[1],t,i));await Promise.all(s)}async function Pe(e){let r=new Set;return await Oe(r,e,j.dirname(e),j.extname(e)),Array.from(r)}import*as Te from"path";function M(e){return{kind:"word",value:e}}function Pt(e,r){return{kind:"function",value:e,nodes:r}}function _t(e){return{kind:"separator",value:e}}function S(e){let r="";for(let t of e)switch(t.kind){case"word":case"separator":{r+=t.value;break}case"function":r+=t.value+"("+S(t.nodes)+")"}return r}var _e=92,It=41,Ie=58,De=44,Dt=34,Ue=61,Le=62,Ke=60,ze=10,Ut=40,Lt=39,Kt=47,Me=32,Fe=9;function A(e){e=e.replaceAll(`\r
|
||||
`,`
|
||||
`);let r=[],t=[],i=null,o="",a;for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);switch(s){case _e:{o+=e[n]+e[n+1],n++;break}case Kt:{if(o.length>0){let u=M(o);i?i.nodes.push(u):r.push(u),o=""}let l=M(e[n]);i?i.nodes.push(l):r.push(l);break}case Ie:case De:case Ue:case Le:case Ke:case ze:case Me:case Fe:{if(o.length>0){let f=M(o);i?i.nodes.push(f):r.push(f),o=""}let l=n,u=n+1;for(;u<e.length&&(a=e.charCodeAt(u),!(a!==Ie&&a!==De&&a!==Ue&&a!==Le&&a!==Ke&&a!==ze&&a!==Me&&a!==Fe));u++);n=u-1;let p=_t(e.slice(l,u));i?i.nodes.push(p):r.push(p);break}case Lt:case Dt:{let l=n;for(let u=n+1;u<e.length;u++)if(a=e.charCodeAt(u),a===_e)u+=1;else if(a===s){n=u;break}o+=e.slice(l,n+1);break}case Ut:{let l=Pt(o,[]);o="",i?i.nodes.push(l):r.push(l),t.push(l),i=l;break}case It:{let l=t.pop();if(o.length>0){let u=M(o);l?.nodes.push(u),o=""}t.length>0?i=t[t.length-1]:i=null;break}default:o+=String.fromCharCode(s)}}return o.length>0&&r.push(M(o)),r}var g=class extends Map{constructor(t){super();this.factory=t}get(t){let i=super.get(t);return i===void 0&&(i=this.factory(t,this),this.set(t,i)),i}};var ui=new Uint8Array(256);var te=new Uint8Array(256);function y(e,r){let t=0,i=[],o=0,a=e.length,n=r.charCodeAt(0);for(let s=0;s<a;s++){let l=e.charCodeAt(s);if(t===0&&l===n){i.push(e.slice(o,s)),o=s+1;continue}switch(l){case 92:s+=1;break;case 39:case 34:for(;++s<a;){let u=e.charCodeAt(s);if(u===92){s+=1;continue}if(u===l)break}break;case 40:te[t]=41,t++;break;case 91:te[t]=93,t++;break;case 123:te[t]=125,t++;break;case 93:case 125:case 41:t>0&&l===te[t-1]&&t--;break}}return i.push(e.slice(o)),i}var me=(n=>(n[n.Continue=0]="Continue",n[n.Skip=1]="Skip",n[n.Stop=2]="Stop",n[n.Replace=3]="Replace",n[n.ReplaceSkip=4]="ReplaceSkip",n[n.ReplaceStop=5]="ReplaceStop",n))(me||{}),w={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 v(e,r){typeof r=="function"?je(e,r):je(e,r.enter,r.exit)}function je(e,r=()=>w.Continue,t=()=>w.Continue){let i=[[e,0,null]],o={parent:null,depth:0,path(){let a=[];for(let n=1;n<i.length;n++){let s=i[n][2];s&&a.push(s)}return a}};for(;i.length>0;){let a=i.length-1,n=i[a],s=n[0],l=n[1],u=n[2];if(l>=s.length){i.pop();continue}if(o.parent=u,o.depth=a,l>=0){let m=s[l],d=r(m,o)??w.Continue;switch(d.kind){case 0:{m.nodes&&m.nodes.length>0&&i.push([m.nodes,0,m]),n[1]=~l;continue}case 2:return;case 1:{n[1]=~l;continue}case 3:{s.splice(l,1,...d.nodes);continue}case 5:{s.splice(l,1,...d.nodes);return}case 4:{s.splice(l,1,...d.nodes),n[1]+=d.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${me[d.kind]??`Unknown(${d.kind})`}\` in enter.`)}}let p=~l,f=s[p],c=t(f,o)??w.Continue;switch(c.kind){case 0:n[1]=p+1;continue;case 2:return;case 3:{s.splice(p,1,...c.nodes),n[1]=p+c.nodes.length;continue}case 5:{s.splice(p,1,...c.nodes);return}case 4:{s.splice(p,1,...c.nodes),n[1]=p+c.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${me[c.kind]??`Unknown(${c.kind})`}\` in exit.`)}}}var ki=new g(e=>{let r=A(e),t=new Set;return v(r,(i,o)=>{let a=o.parent===null?r:o.parent.nodes??[];if(i.kind==="word"&&(i.value==="+"||i.value==="-"||i.value==="*"||i.value==="/")){let n=a.indexOf(i)??-1;if(n===-1)return;let s=a[n-1];if(s?.kind!=="separator"||s.value!==" ")return;let l=a[n+1];if(l?.kind!=="separator"||l.value!==" ")return;t.add(s),t.add(l)}else i.kind==="separator"&&i.value.length>0&&i.value.trim()===""?(a[0]===i||a[a.length-1]===i)&&t.add(i):i.kind==="separator"&&i.value.trim()===","&&(i.value=",")}),t.size>0&&v(r,i=>{if(t.has(i))return t.delete(i),w.ReplaceSkip([])}),ge(r),S(r)});var bi=new g(e=>{let r=A(e);return r.length===3&&r[0].kind==="word"&&r[0].value==="&"&&r[1].kind==="separator"&&r[1].value===":"&&r[2].kind==="function"&&r[2].value==="is"?S(r[2].nodes):e});function ge(e){for(let r of e)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=W(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=W(r.value);for(let t=0;t<r.nodes.length;t++)ge([r.nodes[t]]);break}r.value=W(r.value),ge(r.nodes);break}case"separator":r.value=W(r.value);break;case"word":{(r.value[0]!=="-"||r.value[1]!=="-")&&(r.value=W(r.value));break}default:zt(r)}}var xi=new g(e=>{let r=A(e);return r.length===1&&r[0].kind==="function"&&r[0].value==="var"});function zt(e){throw new Error(`Unexpected value: ${e}`)}function W(e){return e.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}var Mt=process.env.FEATURES_ENV!=="stable";var O=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,Oi=new RegExp(`^${O.source}$`);var Pi=new RegExp(`^${O.source}%$`);var _i=new RegExp(`^${O.source}s*/s*${O.source}$`);var Ft=["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"],Ii=new RegELine truncated
|
||||
`,r){t+=u.length;let p=t;t+=n.property.length,t+=2,t+=n.value?.length??0,n.important&&(t+=11);let f=t;t+=2,n.dst=[i,p,f]}}else if(n.kind==="rule"){if(l+=`${u}${n.selector} {
|
||||
`,r){t+=u.length;let p=t;t+=n.selector.length,t+=1;let f=t;n.dst=[i,p,f],t+=2}for(let p of n.nodes)l+=o(p,s+1);l+=`${u}}
|
||||
`,r&&(t+=u.length,t+=2)}else if(n.kind==="at-rule"){if(n.nodes.length===0){let p=`${u}${n.name} ${n.params};
|
||||
`;if(r){t+=u.length;let f=t;t+=n.name.length,t+=1,t+=n.params.length;let c=t;t+=2,n.dst=[i,f,c]}return p}if(l+=`${u}${n.name}${n.params?` ${n.params} `:" "}{
|
||||
`,r){t+=u.length;let p=t;t+=n.name.length,n.params&&(t+=1,t+=n.params.length),t+=1;let f=t;n.dst=[i,p,f],t+=2}for(let p of n.nodes)l+=o(p,s+1);l+=`${u}}
|
||||
`,r&&(t+=u.length,t+=2)}else if(n.kind==="comment"){if(l+=`${u}/*${n.value}*/
|
||||
`,r){t+=u.length;let p=t;t+=2+n.value.length+2;let f=t;n.dst=[i,p,f],t+=1}}else if(n.kind==="context"||n.kind==="at-root")return"";return l}let a="";for(let n of e)a+=o(n,0);return i.code=a,a}function Cr(e,r){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var t=e.length;if(t<=1)return e;var i="";if(t>4&&e[3]==="\\"){var o=e[2];(o==="?"||o===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),i="//")}var a=e.split(/[/\\]+/);return r!==!1&&a[a.length-1]===""&&a.pop(),i+a.join("/")}function $e(e){let r=Cr(e);return e.startsWith("\\\\")&&r.startsWith("/")&&!r.startsWith("//")?`/${r}`:r}var Ee=/(?<!@import\s+)(?<=^|[^\w\-\u0080-\uffff])url\((\s*('[^']+'|"[^"]+")\s*|[^'")]+)\)/,ut=/(?<=image-set\()((?:[\w-]{1,256}\([^)]*\)|[^)])*)(?=\))/,Sr=/(?:gradient|element|cross-fade|image)\(/,$r=/^\s*data:/i,Tr=/^([a-z]+:)?\/\//,Er=/^[A-Z_][.\w-]*\(/i,Nr=/(?:^|\s)(?<url>[\w-]+\([^)]*\)|"[^"]*"|'[^']*'|[^,]\S*[^,])\s*(?:\s(?<descriptor>\w[^,]+))?(?:,|$)/g,Vr=/(?<!\\)"/g,Rr=/(?: |\\t|\\n|\\f|\\r)+/g,Or=e=>$r.test(e),Pr=e=>Tr.test(e);async function ct({css:e,base:r,root:t}){if(!e.includes("url(")&&!e.includes("image-set("))return e;let i=J(e),o=[];function a(n){if(n[0]==="/")return n;let s=Te.posix.join($e(r),n),l=Te.posix.relative($e(t),s);return l.startsWith(".")||(l="./"+l),l}return v(i,n=>{if(n.kind!=="declaration"||!n.value)return;let s=Ee.test(n.value),l=ut.test(n.value);if(s||l){let u=l?_r:ft;o.push(u(n.value,a).then(p=>{n.value=p}))}}),o.length&&await Promise.all(o),L(i)}function ft(e,r){return dt(e,Ee,async t=>{let[i,o]=t;return await pt(o.trim(),i,r)})}async function _r(e,r){return await dt(e,ut,async t=>{let[,i]=t;return await Dr(i,async({url:a})=>Ee.test(a)?await ft(a,r):Sr.test(a)?a:await pt(a,a,r))})}async function pt(e,r,t,i="url"){let o="",a=e[0];if((a==='"'||a==="'")&&(o=a,e=e.slice(1,-1)),Ir(e))return r;let n=await t(e);return o===""&&n!==encodeURI(n)&&(o='"'),o==="'"&&n.includes("'")&&(o='"'),o==='"'&&n.includes('"')&&(n=n.replace(Vr,'\\"')),`${i}(${o}${n}${o})`}function Ir(e,r){return Pr(e)||Or(e)||!e[0].match(/[\.a-zA-Z0-9_]/)||Er.test(e)}function Dr(e,r){return Promise.all(Ur(e).map(async({url:t,descriptor:i})=>({url:await r({url:t,descriptor:i}),descriptor:i}))).then(Lr)}function Ur(e){let r=e.trim().replace(Rr," ").replace(/\r?\n/,"").replace(/,\s+/,", ").replaceAll(/\s+/g," ").matchAll(Nr);return Array.from(r,({groups:t})=>({url:t?.url?.trim()??"",descriptor:t?.descriptor?.trim()??""})).filter(({url:t})=>!!t)}function Lr(e){return e.map(({url:r,descriptor:t})=>r+(t?` ${t}`:"")).join(", ")}async function dt(e,r,t){let i,o=e,a="";for(;i=r.exec(o);)a+=o.slice(0,i.index),a+=await t(i),o=o.slice(i.index+i[0].length);return a+=o,a}function yt({base:e,from:r,polyfills:t,onDependency:i,shouldRewriteUrls:o,customCssResolver:a,customJsResolver:n}){return{base:e,polyfills:t,from:r,async loadModule(s,l){return bt(s,l,i,n)},async loadStylesheet(s,l){let u=await xt(s,l,i,a);return o&&(u.content=await ct({css:u.content,root:e,base:u.base})),u}}}async function kt(e){if(e.root&&e.root!=="none"){let r=/[*{]/,t=[];for(let o of e.root.pattern.split("/")){if(r.test(o))break;t.push(o)}if(!await wt.stat(se.resolve(e.root.base,t.join("/"))).then(o=>o.isDirectory()).catch(()=>!1))throw new Error(`The \`source(${e.root.pattern})\` does not exist or is not a directory.`)}}async function au(e,r){let t=await Fr(e,yt(r));return await kt(t),t}async function lu(e,r){let t=await Mr(e,yt(r));return await kt(t),t}async function su(e,{base:r}){return zr(e,{base:r,async loadModule(t,i){return bt(t,i,()=>{})},async loadStylesheet(t,i){return xt(t,i,()=>{})}})}async function bt(e,r,t,i){if(e[0]!=="."){let s=await vt(e,r,i);if(!s)throw new Error(`Could not resolve '${e}' from '${r}'`);let l=await ht(mt(s).href);return{path:s,base:se.dirname(s),module:l.default??l}}let o=await vt(e,r,i);if(!o)throw new Error(`Could not resolve '${e}' from '${r}'`);let[a,n]=await Promise.all([ht(mt(o).href+"?id="+Date.now()),Pe(o)]);for(let s of n)t(s);return{path:o,base:se.dirname(o),module:a.default??a}}async function xt(e,r,t,i){let o=await Wr(e,r,i);if(!o)throw new Error(`Could not resolve '${e}' from '${r}'`);t(o);let a=await wt.readFile(o,"utf-8");return{path:o,base:se.dirname(o),content:a}}var gt=null;async function ht(e){if(typeof globalThis.__tw_load=="function"){let r=await globalThis.__tw_load(e);if(r)return r}try{return await import(e)}catch{return gt??=Kr(import.meta.url,{moduleCache:!1,fsCache:!1}),await gt.import(e)}}var Re=["node_modules",...process.env.NODE_PATH?[process.env.NODE_PATH]:[]],jr=F.ResolverFactory.createResolver({fileSystem:new F.CachedInputFileSystem(Ve,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"],modules:Re});async function Wr(e,r,t){if(typeof globalThis.__tw_resolve=="function"){let i=globalThis.__tw_resolve(e,r);if(i)return Promise.resolve(i)}if(t){let i=await t(e,r);if(i)return i}return Ne(jr,e,r)}var Br=F.ResolverFactory.creLine truncated
|
||||
`)){this.defaultFlush=r}#r=new g(()=>({value:0}));#t=new g(()=>({value:0n}));#e=[];hit(r){this.#r.get(r).value++}start(r){let t=this.#e.map(o=>o.label).join("//"),i=`${t}${t.length===0?"":"//"}${r}`;this.#r.get(i).value++,this.#t.get(i),this.#e.push({id:i,label:r,namespace:t,value:process.hrtime.bigint()})}end(r){let t=process.hrtime.bigint();if(this.#e[this.#e.length-1].label!==r)throw new Error(`Mismatched timer label: \`${r}\`, expected \`${this.#e[this.#e.length-1].label}\``);let i=this.#e.pop(),o=t-i.value;this.#t.get(i.id).value+=o}reset(){this.#r.clear(),this.#t.clear(),this.#e.splice(0)}report(r=this.defaultFlush){let t=[],i=!1;for(let n=this.#e.length-1;n>=0;n--)this.end(this.#e[n].label);for(let[n,{value:s}]of this.#r.entries()){if(this.#t.has(n))continue;t.length===0&&(i=!0,t.push("Hits:"));let l=n.split("//").length;t.push(`${" ".repeat(l)}${n} ${ue(Ct(`\xD7 ${s}`))}`)}this.#t.size>0&&i&&t.push(`
|
||||
Timers:`);let o=-1/0,a=new Map;for(let[n,{value:s}]of this.#t){let l=`${(Number(s)/1e6).toFixed(2)}ms`;a.set(n,l),o=Math.max(o,l.length)}for(let n of this.#t.keys()){let s=n.split("//").length;t.push(`${ue(`[${a.get(n).padStart(o," ")}]`)}${" ".repeat(s-1)}${s===1?" ":ue(" \u21B3 ")}${n.split("//").pop()} ${this.#r.get(n).value===1?"":ue(Ct(`\xD7 ${this.#r.get(n).value}`))}`.trimEnd())}r(`
|
||||
${t.join(`
|
||||
`)}
|
||||
`),this.reset()}[Symbol.dispose](){fe&&this.report()}};function ue(e){return`\x1B[2m${e}\x1B[22m`}function Ct(e){return`\x1B[34m${e}\x1B[39m`}import Gr from"@jridgewell/remapping";import{Features as X,transform as Hr}from"lightningcss";import qr from"magic-string";function gu(e,{file:r="input.css",minify:t=!1,map:i}={}){function o(l,u){return Hr({filename:r,code:l,minify:t,sourceMap:typeof u<"u",inputSourceMap:u,drafts:{customMedia:!0},nonStandard:{deepSelectorCombinator:!0},include:X.Nesting|X.MediaQueries,exclude:X.LogicalProperties|X.DirSelector|X.LightDark,targets:{safari:16<<16|1024,ios_saf:16<<16|1024,firefox:8388608,chrome:7274496},errorRecovery:!0})}let a=o(Buffer.from(e),i);if(i=a.map?.toString(),a.warnings=a.warnings.filter(l=>!/'(deep|slotted|global)' is not recognized as a valid pseudo-/.test(l.message)),a.warnings.length>0){let l=e.split(`
|
||||
`),u=[`Found ${a.warnings.length} ${a.warnings.length===1?"warning":"warnings"} while optimizing generated CSS:`];for(let[p,f]of a.warnings.entries()){u.push(""),a.warnings.length>1&&u.push(`Issue #${p+1}:`);let c=2,m=Math.max(0,f.loc.line-c-1),d=Math.min(l.length,f.loc.line+c),x=l.slice(m,d).map((h,I)=>m+I+1===f.loc.line?`${ee("\u2502")} ${h}`:ee(`\u2502 ${h}`));x.splice(f.loc.line-m,0,`${ee("\u2506")}${" ".repeat(f.loc.column-1)} ${Zr(`${ee("^--")} ${f.message}`)}`,`${ee("\u2506")}`),u.push(...x)}u.push(""),console.warn(u.join(`
|
||||
`))}a=o(a.code,i),i=a.map?.toString();let n=a.code.toString(),s=new qr(n);if(s.replaceAll("@media not (","@media not all and ("),i!==void 0&&s.hasChanged()){let l=s.generateMap({source:"original",hires:"boundary"}).toString();i=Gr([l,i],()=>null).toString()}return n=s.toString(),{code:n,map:i}}function ee(e){return`\x1B[2m${e}\x1B[22m`}function Zr(e){return`\x1B[33m${e}\x1B[39m`}import{SourceMapGenerator as Qr}from"source-map-js";function Jr(e){let r=new Qr,t=1,i=new g(o=>({url:o?.url??`<unknown ${t++}>`,content:o?.content??"<none>"}));for(let o of e.mappings){let a=i.get(o.originalPosition?.source??null);r.addMapping({generated:o.generatedPosition,original:o.originalPosition,source:a.url,name:o.name}),r.setSourceContent(a.url,a.content)}return r.toString()}function yu(e){let r=typeof e=="string"?e:Jr(e);return{raw:r,get inline(){let t="";return t+="/*# sourceMappingURL=data:application/json;base64,",t+=Buffer.from(r,"utf-8").toString("base64"),t+=` */
|
||||
`,t}}}if(!process.versions.bun){let e=ce.createRequire(import.meta.url);ce.register?.(Xr(e.resolve("@tailwindcss/node/esm-cache-loader")))}export{ru as Features,At as Instrumentation,iu as Polyfills,su as __unstable__loadDesignSystem,lu as compile,au as compileAst,pe as env,bt as loadModule,$e as normalizePath,gu as optimize,yu as toSourceMap};
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
declare function clearRequireCache(files: string[]): void;
|
||||
|
||||
export { clearRequireCache };
|
||||
+1
@@ -0,0 +1 @@
|
||||
"use strict";var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var n=(r,e)=>{for(var t in e)i(r,t,{get:e[t],enumerable:!0})},u=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of f(e))!l.call(r,c)&&c!==t&&i(r,c,{get:()=>e[c],enumerable:!(o=a(e,c))||o.enumerable});return r};var h=r=>u(i({},"__esModule",{value:!0}),r);var d={};n(d,{clearRequireCache:()=>q});module.exports=h(d);function q(r){for(let e of r)delete require.cache[e]}0&&(module.exports={clearRequireCache});
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "@tailwindcss/node",
|
||||
"version": "4.1.18",
|
||||
"description": "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-node"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"./require-cache": {
|
||||
"types": "./dist/require-cache.d.ts",
|
||||
"default": "./dist/require-cache.js"
|
||||
},
|
||||
"./esm-cache-loader": {
|
||||
"types": "./dist/esm-cache.loader.d.mts",
|
||||
"default": "./dist/esm-cache.loader.mjs"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@jridgewell/remapping": "^2.3.4",
|
||||
"enhanced-resolve": "^5.18.3",
|
||||
"jiti": "^2.6.1",
|
||||
"lightningcss": "1.30.2",
|
||||
"magic-string": "^0.30.21",
|
||||
"source-map-js": "^1.2.1",
|
||||
"tailwindcss": "4.1.18"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsup-node",
|
||||
"dev": "pnpm run build -- --watch"
|
||||
}
|
||||
}
|
||||
+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.
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# `@tailwindcss/oxide-win32-x64-msvc`
|
||||
|
||||
This is the **x86_64-pc-windows-msvc** binary for `@tailwindcss/oxide`
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "@tailwindcss/oxide-win32-x64-msvc",
|
||||
"version": "4.1.18",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",
|
||||
"directory": "crates/node/npm/win32-x64-msvc"
|
||||
},
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"main": "tailwindcss-oxide.win32-x64-msvc.node",
|
||||
"files": [
|
||||
"tailwindcss-oxide.win32-x64-msvc.node"
|
||||
],
|
||||
"publishConfig": {
|
||||
"provenance": true,
|
||||
"access": "public"
|
||||
},
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
}
|
||||
Generated
Vendored
BIN
Binary file not shown.
+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.
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
/* auto-generated by NAPI-RS */
|
||||
/* eslint-disable */
|
||||
export declare class Scanner {
|
||||
constructor(opts: ScannerOptions)
|
||||
scan(): Array<string>
|
||||
scanFiles(input: Array<ChangedContent>): Array<string>
|
||||
getCandidatesWithPositions(input: ChangedContent): Array<CandidateWithPosition>
|
||||
get files(): Array<string>
|
||||
get globs(): Array<GlobEntry>
|
||||
get normalizedSources(): Array<GlobEntry>
|
||||
}
|
||||
|
||||
export interface CandidateWithPosition {
|
||||
/** The candidate string */
|
||||
candidate: string
|
||||
/** The position of the candidate inside the content file */
|
||||
position: number
|
||||
}
|
||||
|
||||
export interface ChangedContent {
|
||||
/** File path to the changed file */
|
||||
file?: string
|
||||
/** Contents of the changed file */
|
||||
content?: string
|
||||
/** File extension */
|
||||
extension: string
|
||||
}
|
||||
|
||||
export interface GlobEntry {
|
||||
/** Base path of the glob */
|
||||
base: string
|
||||
/** Glob pattern */
|
||||
pattern: string
|
||||
}
|
||||
|
||||
export interface ScannerOptions {
|
||||
/** Glob sources */
|
||||
sources?: Array<SourceEntry>
|
||||
}
|
||||
|
||||
export interface SourceEntry {
|
||||
/** Base path of the glob */
|
||||
base: string
|
||||
/** Glob pattern */
|
||||
pattern: string
|
||||
/** Negated flag */
|
||||
negated: boolean
|
||||
}
|
||||
+575
@@ -0,0 +1,575 @@
|
||||
// prettier-ignore
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
/* auto-generated by NAPI-RS */
|
||||
|
||||
const { readFileSync } = require('node:fs')
|
||||
let nativeBinding = null
|
||||
const loadErrors = []
|
||||
|
||||
const isMusl = () => {
|
||||
let musl = false
|
||||
if (process.platform === 'linux') {
|
||||
musl = isMuslFromFilesystem()
|
||||
if (musl === null) {
|
||||
musl = isMuslFromReport()
|
||||
}
|
||||
if (musl === null) {
|
||||
musl = isMuslFromChildProcess()
|
||||
}
|
||||
}
|
||||
return musl
|
||||
}
|
||||
|
||||
const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
|
||||
|
||||
const isMuslFromFilesystem = () => {
|
||||
try {
|
||||
return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
const isMuslFromReport = () => {
|
||||
let report = null
|
||||
if (typeof process.report?.getReport === 'function') {
|
||||
process.report.excludeNetwork = true
|
||||
report = process.report.getReport()
|
||||
}
|
||||
if (!report) {
|
||||
return null
|
||||
}
|
||||
if (report.header && report.header.glibcVersionRuntime) {
|
||||
return false
|
||||
}
|
||||
if (Array.isArray(report.sharedObjects)) {
|
||||
if (report.sharedObjects.some(isFileMusl)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const isMuslFromChildProcess = () => {
|
||||
try {
|
||||
return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
|
||||
} catch (e) {
|
||||
// If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
function requireNative() {
|
||||
if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
|
||||
try {
|
||||
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
|
||||
} catch (err) {
|
||||
loadErrors.push(err)
|
||||
}
|
||||
} else if (process.platform === 'android') {
|
||||
if (process.arch === 'arm64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.android-arm64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-android-arm64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-android-arm64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 'arm') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.android-arm-eabi.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-android-arm-eabi')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-android-arm-eabi/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
|
||||
}
|
||||
} else if (process.platform === 'win32') {
|
||||
if (process.arch === 'x64') {
|
||||
if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.win32-x64-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-win32-x64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.win32-x64-msvc.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-win32-x64-msvc')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-msvc/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
}
|
||||
} else if (process.arch === 'ia32') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.win32-ia32-msvc.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-win32-ia32-msvc')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-win32-ia32-msvc/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 'arm64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.win32-arm64-msvc.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-win32-arm64-msvc')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-win32-arm64-msvc/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
|
||||
}
|
||||
} else if (process.platform === 'darwin') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.darwin-universal.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-darwin-universal')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-darwin-universal/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
if (process.arch === 'x64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.darwin-x64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-darwin-x64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-darwin-x64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 'arm64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.darwin-arm64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-darwin-arm64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-darwin-arm64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
|
||||
}
|
||||
} else if (process.platform === 'freebsd') {
|
||||
if (process.arch === 'x64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.freebsd-x64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-freebsd-x64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-x64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 'arm64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.freebsd-arm64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-freebsd-arm64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-arm64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
|
||||
}
|
||||
} else if (process.platform === 'linux') {
|
||||
if (process.arch === 'x64') {
|
||||
if (isMusl()) {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-x64-musl.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-x64-musl')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-musl/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-x64-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-x64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
}
|
||||
} else if (process.arch === 'arm64') {
|
||||
if (isMusl()) {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-arm64-musl.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-arm64-musl')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-musl/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-arm64-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-arm64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
}
|
||||
} else if (process.arch === 'arm') {
|
||||
if (isMusl()) {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-arm-musleabihf.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-arm-musleabihf')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-musleabihf/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-arm-gnueabihf.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-arm-gnueabihf')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-gnueabihf/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
}
|
||||
} else if (process.arch === 'loong64') {
|
||||
if (isMusl()) {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-loong64-musl.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-loong64-musl')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-musl/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-loong64-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-loong64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
}
|
||||
} else if (process.arch === 'riscv64') {
|
||||
if (isMusl()) {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-riscv64-musl.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-riscv64-musl')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-musl/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-riscv64-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-riscv64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
}
|
||||
} else if (process.arch === 'ppc64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-ppc64-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-ppc64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-ppc64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 's390x') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-s390x-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-s390x-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-s390x-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
|
||||
}
|
||||
} else if (process.platform === 'openharmony') {
|
||||
if (process.arch === 'arm64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.openharmony-arm64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-openharmony-arm64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 'x64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.openharmony-x64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-openharmony-x64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-x64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 'arm') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.openharmony-arm.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-openharmony-arm')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`))
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
|
||||
}
|
||||
}
|
||||
|
||||
nativeBinding = requireNative()
|
||||
|
||||
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
||||
let wasiBinding = null
|
||||
let wasiBindingError = null
|
||||
try {
|
||||
wasiBinding = require('./tailwindcss-oxide.wasi.cjs')
|
||||
nativeBinding = wasiBinding
|
||||
} catch (err) {
|
||||
if (process.env.NAPI_RS_FORCE_WASI) {
|
||||
wasiBindingError = err
|
||||
}
|
||||
}
|
||||
if (!nativeBinding) {
|
||||
try {
|
||||
wasiBinding = require('@tailwindcss/oxide-wasm32-wasi')
|
||||
nativeBinding = wasiBinding
|
||||
} catch (err) {
|
||||
if (process.env.NAPI_RS_FORCE_WASI) {
|
||||
wasiBindingError.cause = err
|
||||
loadErrors.push(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) {
|
||||
const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error')
|
||||
error.cause = wasiBindingError
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
if (!nativeBinding) {
|
||||
if (loadErrors.length > 0) {
|
||||
throw new Error(
|
||||
`Cannot find native binding. ` +
|
||||
`npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
|
||||
'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
|
||||
{
|
||||
cause: loadErrors.reduce((err, cur) => {
|
||||
cur.cause = err
|
||||
return cur
|
||||
}),
|
||||
},
|
||||
)
|
||||
}
|
||||
throw new Error(`Failed to load native binding`)
|
||||
}
|
||||
|
||||
module.exports = nativeBinding
|
||||
module.exports.Scanner = nativeBinding.Scanner
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"name": "@tailwindcss/oxide",
|
||||
"version": "4.1.18",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",
|
||||
"directory": "crates/node"
|
||||
},
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"napi": {
|
||||
"binaryName": "tailwindcss-oxide",
|
||||
"packageName": "@tailwindcss/oxide",
|
||||
"targets": [
|
||||
"armv7-linux-androideabi",
|
||||
"aarch64-linux-android",
|
||||
"aarch64-apple-darwin",
|
||||
"aarch64-unknown-linux-gnu",
|
||||
"aarch64-unknown-linux-musl",
|
||||
"armv7-unknown-linux-gnueabihf",
|
||||
"x86_64-unknown-linux-musl",
|
||||
"x86_64-unknown-freebsd",
|
||||
"i686-pc-windows-msvc",
|
||||
"aarch64-pc-windows-msvc",
|
||||
"wasm32-wasip1-threads"
|
||||
],
|
||||
"wasm": {
|
||||
"initialMemory": 16384,
|
||||
"browser": {
|
||||
"fs": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "^3.4.1",
|
||||
"@napi-rs/wasm-runtime": "^1.1.0",
|
||||
"emnapi": "1.7.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"publishConfig": {
|
||||
"provenance": true,
|
||||
"access": "public"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@tailwindcss/oxide-darwin-arm64": "4.1.18",
|
||||
"@tailwindcss/oxide-darwin-x64": "4.1.18",
|
||||
"@tailwindcss/oxide-freebsd-x64": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-arm64-musl": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-arm64-gnu": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-x64-gnu": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-x64-musl": "4.1.18",
|
||||
"@tailwindcss/oxide-wasm32-wasi": "4.1.18",
|
||||
"@tailwindcss/oxide-win32-arm64-msvc": "4.1.18",
|
||||
"@tailwindcss/oxide-win32-x64-msvc": "4.1.18",
|
||||
"@tailwindcss/oxide-android-arm64": "4.1.18"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "pnpm run build:platform && pnpm run build:wasm",
|
||||
"build:platform": "napi build --platform --release",
|
||||
"postbuild:platform": "node ./scripts/move-artifacts.mjs",
|
||||
"build:wasm": "napi build --release --target wasm32-wasip1-threads",
|
||||
"postbuild:wasm": "node ./scripts/move-artifacts.mjs",
|
||||
"dev": "cargo watch --quiet --shell 'npm run build'",
|
||||
"build:debug": "napi build --platform",
|
||||
"version": "napi version"
|
||||
}
|
||||
}
|
||||
+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.
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
<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 feature ideas:
|
||||
|
||||
[Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions)
|
||||
|
||||
## 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**.
|
||||
|
||||
---
|
||||
|
||||
## `@tailwindcss/vite` plugin API
|
||||
|
||||
### Enabling or disabling Lightning CSS
|
||||
|
||||
By default, this plugin detects whether or not the CSS is being built for production by checking the `NODE_ENV` environment variable. When building for production Lightning CSS will be enabled otherwise it is disabled.
|
||||
|
||||
If you want to always enable or disable Lightning CSS the `optimize` option may be used:
|
||||
|
||||
```js
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
tailwindcss({
|
||||
// Disable Lightning CSS optimization
|
||||
optimize: false,
|
||||
}),
|
||||
],
|
||||
})
|
||||
```
|
||||
|
||||
It's also possible to keep Lightning CSS enabled but disable minification:
|
||||
|
||||
```js
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
tailwindcss({
|
||||
// Enable Lightning CSS but disable minification
|
||||
optimize: { minify: false },
|
||||
}),
|
||||
],
|
||||
})
|
||||
```
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import { Plugin } from 'vite';
|
||||
|
||||
type PluginOptions = {
|
||||
/**
|
||||
* Optimize and minify the output CSS.
|
||||
*/
|
||||
optimize?: boolean | {
|
||||
minify?: boolean;
|
||||
};
|
||||
};
|
||||
declare function tailwindcss(opts?: PluginOptions): Plugin[];
|
||||
|
||||
export { type PluginOptions, tailwindcss as default };
|
||||
+1
@@ -0,0 +1 @@
|
||||
var z=(r,s)=>(s=Symbol[r])?s:Symbol.for("Symbol."+r),O=r=>{throw TypeError(r)};var w=(r,s,e)=>{if(s!=null){typeof s!="object"&&typeof s!="function"&&O("Object expected");var t,d;e&&(t=s[z("asyncDispose")]),t===void 0&&(t=s[z("dispose")],e&&(d=t)),typeof t!="function"&&O("Object not disposable"),d&&(t=function(){try{d.call(this)}catch(f){return Promise.reject(f)}}),r.push([e,t,s])}else e&&r.push([e]);return s},P=(r,s,e)=>{var t=typeof SuppressedError=="function"?SuppressedError:function(u,g,n,l){return l=Error(n),l.name="SuppressedError",l.error=u,l.suppressed=g,l},d=u=>s=e?new t(u,s,"An error was suppressed during disposal"):(e=!0,u),f=u=>{for(;u=r.pop();)try{var g=u[1]&&u[1].call(u[2]);if(u[0])return Promise.resolve(g).then(f,n=>(d(n),f()))}catch(n){d(n)}if(e)throw s};return f()};import{compile as J,env as $,Features as b,Instrumentation as _,normalizePath as U,optimize as j,toSourceMap as A}from"@tailwindcss/node";import{clearRequireCache as K}from"@tailwindcss/node/require-cache";import{Scanner as T}from"@tailwindcss/oxide";import C from"fs/promises";import h from"path";import*as D from"vite";var c=$.DEBUG,x=/[?&](?:worker|sharedworker|raw|url)\b/,M=/\?commonjs-proxy/,B=/[?&]index\=\d+\.css$/;function q(r={}){let s=[],e=null,t=new E(n=>new Map),d=!1,f=!0,u=!0;function g(n,l){let i,a;if(n){let o=D.createIdResolver(n.config,{...n.config.resolve,extensions:[".css"],mainFields:["style"],conditions:["style","development|production"],tryIndex:!1,preferRelative:!0}),p=D.createIdResolver(n.config,n.config.resolve);i=(m,v)=>o(n,m,v,!0),a=(m,v)=>p(n,m,v,!0)}else{let o=e.createResolver({...e.resolve,extensions:[".css"],mainFields:["style"],conditions:["style","development|production"],tryIndex:!1,preferRelative:!0}),p=e.createResolver(e.resolve);i=(m,v)=>o(m,v,!0,d),a=(m,v)=>p(m,v,!0,d)}return new F(l,e.root,e?.css.devSourcemap??!1,i,a)}return[{name:"@tailwindcss/vite:scan",enforce:"pre",configureServer(n){s.push(n)},async configResolved(n){e=n,d=e.build.ssr!==!1&&e.build.ssr!==void 0,r.optimize!==void 0&&(f=r.optimize!==!1),u=f&&e.build.cssMinify!==!1,typeof r.optimize=="object"&&(u=r.optimize.minify!==!1)}},{name:"@tailwindcss/vite:generate:serve",apply:"serve",enforce:"pre",transform:{filter:{id:{exclude:[/\/\.vite\//,x,M],include:[/\.css(?:\?.*)?$/,/&lang\.css/,B]}},async handler(n,l){var m=[];try{if(!V(l))return;let i=w(m,new _);c&&i.start("[@tailwindcss/vite] Generate CSS (serve)");let a=t.get(this.environment?.name??"default");let o=a.get(l);o||(o??=g(this.environment??null,l),a.set(l,o));let p=await o.generate(n,R=>this.addWatchFile(R),i);if(!p)return a.delete(l),n;c&&i.end("[@tailwindcss/vite] Generate CSS (serve)");return p}catch(v){var S=v,y=!0}finally{P(m,S,y)}}}},{name:"@tailwindcss/vite:generate:build",apply:"build",enforce:"pre",transform:{filter:{id:{exclude:[/\/\.vite\//,x,M],include:[/\.css(?:\?.*)?$/,/&lang\.css/,B]}},async handler(n,l){var m=[];try{if(!V(l))return;let i=w(m,new _);c&&i.start("[@tailwindcss/vite] Generate CSS (build)");let a=t.get(this.environment?.name??"default");let o=a.get(l);o||(o??=g(this.environment??null,l),a.set(l,o));let p=await o.generate(n,R=>this.addWatchFile(R),i);if(!p)return a.delete(l),n;c&&i.end("[@tailwindcss/vite] Generate CSS (build)");f&&(c&&i.start("[@tailwindcss/vite] Optimize CSS"),p=j(p.code,{minify:u,map:p.map}),c&&i.end("[@tailwindcss/vite] Optimize CSS"));return p}catch(v){var S=v,y=!0}finally{P(m,S,y)}}}}]}function k(r){let[s]=r.split("?",2);return h.extname(s).slice(1)}function V(r){return r.includes("/.vite/")||x.test(r)||M.test(r)?!1:k(r)==="css"||r.includes("&lang.css")||r.match(B)}function G(r){return h.resolve(r.replace(/\?.*$/,""))}var E=class extends Map{constructor(e){super();this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e,this),this.set(e,t)),t}},F=class{constructor(s,e,t,d,f){this.id=s;this.base=e;this.enableSourceMaps=t;this.customCssResolver=d;this.customJsResolver=f}compiler;scanner;candidates=new Set;buildDependencies=new Map;async generate(s,e,t){let d=G(this.id);function f(i){i!==d&&(/[\#\?].*\.svg$/.test(i)||e(i))}let u=this.requiresBuild(),g=h.dirname(h.resolve(d));if(!this.compiler||!this.scanner||await u){K(Array.from(this.buildDependencies.keys())),this.buildDependencies.clear(),this.addBuildDependency(G(d)),c&&t.start("Setup compiler");let i=[];this.compiler=await J(s,{from:this.enableSourceMaps?this.id:void 0,base:g,shouldRewriteUrls:!0,onDependency:o=>{f(o),i.push(this.addBuildDependency(o))},customCssResolver:this.customCssResolver,customJsResolver:this.customJsResolver}),await Promise.all(i),c&&t.end("Setup compiler"),c&&t.start("Setup scanner");let a=(this.compiler.root==="none"?[]:this.compiler.root===null?[{base:this.base,pattern:"**/*",negated:!1}]:[{...this.compiler.root,negated:!1}]).concat(this.compiler.sources);this.scanner=new T({sources:a}),c&&t.end("Setup scanner")}else for(let i of this.buildDependencies.keys())f(i);if(!(this.compiler.features&(b.AtApply|b.JsPluginCompat|b.ThemeFunLine truncated
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "@tailwindcss/vite",
|
||||
"version": "4.1.18",
|
||||
"description": "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-vite"
|
||||
},
|
||||
"bugs": "https://github.com/tailwindlabs/tailwindcss/issues",
|
||||
"homepage": "https://tailwindcss.com",
|
||||
"files": [
|
||||
"dist/"
|
||||
],
|
||||
"publishConfig": {
|
||||
"provenance": true,
|
||||
"access": "public"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@tailwindcss/node": "4.1.18",
|
||||
"tailwindcss": "4.1.18",
|
||||
"@tailwindcss/oxide": "4.1.18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.19.0",
|
||||
"vite": "^7.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vite": "^5.2.0 || ^6 || ^7"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsup-node",
|
||||
"dev": "pnpm run build -- --watch"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user