Added new_site as a raw tailwind+html site; initialized npm modules; demo template

This commit is contained in:
2025-02-10 07:08:13 +01:00
parent 20316167ce
commit 17b3c9e9e9
306 changed files with 70895 additions and 0 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,295 @@
declare const _default: {
inherit: string;
current: string;
transparent: string;
black: string;
white: string;
slate: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
gray: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
zinc: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
neutral: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
stone: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
red: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
orange: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
amber: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
yellow: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
lime: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
green: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
emerald: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
teal: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
cyan: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
sky: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
blue: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
indigo: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
violet: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
purple: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
fuchsia: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
pink: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
rose: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
};
export { _default as _ };

295
new_site/node_modules/tailwindcss/dist/colors.d.mts generated vendored Normal file
View File

@@ -0,0 +1,295 @@
declare const _default: {
inherit: string;
current: string;
transparent: string;
black: string;
white: string;
slate: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
gray: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
zinc: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
neutral: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
stone: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
red: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
orange: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
amber: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
yellow: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
lime: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
green: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
emerald: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
teal: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
cyan: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
sky: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
blue: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
indigo: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
violet: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
purple: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
fuchsia: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
pink: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
rose: {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
};
};
export { _default as default };

5
new_site/node_modules/tailwindcss/dist/colors.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import { _ as _default } from './colors-b_6i0Oi7.js';
export { _default as default };

1
new_site/node_modules/tailwindcss/dist/colors.js generated vendored Normal file

File diff suppressed because one or more lines are too long

1
new_site/node_modules/tailwindcss/dist/colors.mjs generated vendored Normal file
View File

@@ -0,0 +1 @@
import{a}from"./chunk-AZANAYY2.mjs";export{a as default};

File diff suppressed because it is too large Load Diff

1147
new_site/node_modules/tailwindcss/dist/default-theme.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{h as a}from"./chunk-V2K3XTS4.mjs";import"./chunk-AZANAYY2.mjs";export{a as default};

View File

@@ -0,0 +1,6 @@
type Colors = {
[key: string | number]: string | Colors;
};
declare function flattenColorPalette(colors: Colors): Record<string, string>;
export { flattenColorPalette as default };

View File

@@ -0,0 +1,6 @@
type Colors = {
[key: string | number]: string | Colors;
};
declare function flattenColorPalette(colors: Colors): Record<string, string>;
export { flattenColorPalette as default };

View File

@@ -0,0 +1 @@
"use strict";function i(r){let n={};for(let[e,t]of Object.entries(r??{}))if(e!=="__CSS_VALUES__")if(typeof t=="object"&&t!==null)for(let[s,l]of Object.entries(i(t)))n[`${e}${s==="DEFAULT"?"":`-${s}`}`]=l;else n[e]=t;if("__CSS_VALUES__"in r)for(let[e,t]of Object.entries(r.__CSS_VALUES__))Number(t)&4||(n[e]=r[e]);return n}module.exports=i;

View File

@@ -0,0 +1 @@
import"./chunk-N4FJXYNV.mjs";function i(r){let n={};for(let[e,t]of Object.entries(r??{}))if(e!=="__CSS_VALUES__")if(typeof t=="object"&&t!==null)for(let[o,f]of Object.entries(i(t)))n[`${e}${o==="DEFAULT"?"":`-${o}`}`]=f;else n[e]=t;if("__CSS_VALUES__"in r)for(let[e,t]of Object.entries(r.__CSS_VALUES__))Number(t)&4||(n[e]=r[e]);return n}export{i as default};

260
new_site/node_modules/tailwindcss/dist/lib.d.mts generated vendored Normal file
View File

@@ -0,0 +1,260 @@
import { U as UserConfig, P as Plugin } from './types-BTRmm49E.mjs';
import { V as Variant, C as Candidate } from './resolve-config-QUZ9b-Gn.mjs';
import './colors.mjs';
declare const enum ThemeOptions {
NONE = 0,
INLINE = 1,
REFERENCE = 2,
DEFAULT = 4,
STATIC = 8,
USED = 16
}
declare class Theme {
#private;
private values;
private keyframes;
prefix: string | null;
constructor(values?: Map<string, {
value: string;
options: ThemeOptions;
}>, keyframes?: Set<AtRule>);
add(key: string, value: string, options?: ThemeOptions): void;
keysInNamespaces(themeKeys: Iterable<ThemeKey>): string[];
get(themeKeys: ThemeKey[]): string | null;
hasDefault(key: string): boolean;
getOptions(key: string): ThemeOptions;
entries(): IterableIterator<[string, {
value: string;
options: ThemeOptions;
}]> | [string, {
value: string;
options: ThemeOptions;
}][];
clearNamespace(namespace: string, clearOptions: ThemeOptions): void;
markUsedVariable(themeKey: string): void;
resolve(candidateValue: string | null, themeKeys: ThemeKey[]): string | null;
resolveValue(candidateValue: string | null, themeKeys: ThemeKey[]): string | null;
resolveWith(candidateValue: string, themeKeys: ThemeKey[], nestedKeys?: `--${string}`[]): [string, Record<string, string>] | null;
namespace(namespace: string): Map<string | null, string>;
addKeyframes(value: AtRule): void;
getKeyframes(): AtRule[];
}
type ThemeKey = `--${string}`;
type VariantFn<T extends Variant['kind']> = (rule: Rule, variant: Extract<Variant, {
kind: T;
}>) => null | void;
type CompareFn = (a: Variant, z: Variant) => number;
declare const enum Compounds {
Never = 0,
AtRules = 1,
StyleRules = 2
}
declare class Variants {
compareFns: Map<number, CompareFn>;
variants: Map<string, {
kind: Variant["kind"];
order: number;
applyFn: VariantFn<any>;
compoundsWith: Compounds;
compounds: Compounds;
}>;
private completions;
/**
* Registering a group of variants should result in the same sort number for
* all the variants. This is to ensure that the variants are applied in the
* correct order.
*/
private groupOrder;
/**
* Keep track of the last sort order instead of using the size of the map to
* avoid unnecessarily skipping order numbers.
*/
private lastOrder;
static(name: string, applyFn: VariantFn<'static'>, { compounds, order }?: {
compounds?: Compounds;
order?: number;
}): void;
fromAst(name: string, ast: AstNode[]): void;
functional(name: string, applyFn: VariantFn<'functional'>, { compounds, order }?: {
compounds?: Compounds;
order?: number;
}): void;
compound(name: string, compoundsWith: Compounds, applyFn: VariantFn<'compound'>, { compounds, order }?: {
compounds?: Compounds;
order?: number;
}): void;
group(fn: () => void, compareFn?: CompareFn): void;
has(name: string): boolean;
get(name: string): {
kind: Variant["kind"];
order: number;
applyFn: VariantFn<any>;
compoundsWith: Compounds;
compounds: Compounds;
} | undefined;
kind(name: string): "arbitrary" | "static" | "functional" | "compound";
compoundsWith(parent: string, child: string | Variant): boolean;
suggest(name: string, suggestions: () => string[]): void;
getCompletions(name: string): string[];
compare(a: Variant | null, z: Variant | null): number;
keys(): IterableIterator<string>;
entries(): IterableIterator<[string, {
kind: Variant["kind"];
order: number;
applyFn: VariantFn<any>;
compoundsWith: Compounds;
compounds: Compounds;
}]>;
private set;
private nextOrder;
}
declare function compileAstNodes(candidate: Candidate, designSystem: DesignSystem): {
node: AstNode;
propertySort: number[];
}[];
interface ClassMetadata {
modifiers: string[];
}
type ClassEntry = [string, ClassMetadata];
interface SelectorOptions {
modifier?: string;
value?: string;
}
interface VariantEntry {
name: string;
isArbitrary: boolean;
values: string[];
hasDash: boolean;
selectors: (options: SelectorOptions) => string[];
}
type CompileFn<T extends Candidate['kind']> = (value: Extract<Candidate, {
kind: T;
}>) => AstNode[] | undefined | null;
interface SuggestionGroup {
supportsNegative?: boolean;
values: (string | null)[];
modifiers: string[];
}
type UtilityOptions = {
types: string[];
};
type Utility = {
kind: 'static' | 'functional';
compileFn: CompileFn<any>;
options?: UtilityOptions;
};
declare class Utilities {
private utilities;
private completions;
static(name: string, compileFn: CompileFn<'static'>): void;
functional(name: string, compileFn: CompileFn<'functional'>, options?: UtilityOptions): void;
has(name: string, kind: 'static' | 'functional'): boolean;
get(name: string): Utility[];
getCompletions(name: string): SuggestionGroup[];
suggest(name: string, groups: () => SuggestionGroup[]): void;
keys(kind: 'static' | 'functional'): string[];
}
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): ReturnType<typeof compileAstNodes>;
getVariantOrder(): Map<Variant, number>;
resolveThemeValue(path: string): string | undefined;
trackUsedVariables(raw: string): void;
candidatesToCss(classes: string[]): (string | null)[];
};
type StyleRule = {
kind: 'rule';
selector: string;
nodes: AstNode[];
};
type AtRule = {
kind: 'at-rule';
name: string;
params: string;
nodes: AstNode[];
};
type Declaration = {
kind: 'declaration';
property: string;
value: string | undefined;
important: boolean;
};
type Comment = {
kind: 'comment';
value: string;
};
type Context = {
kind: 'context';
context: Record<string, string | boolean>;
nodes: AstNode[];
};
type AtRoot = {
kind: 'at-root';
nodes: AstNode[];
};
type Rule = StyleRule | AtRule;
type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot;
type Config = UserConfig;
type CompileOptions = {
base?: string;
loadModule?: (id: string, base: string, resourceHint: 'plugin' | 'config') => Promise<{
module: Plugin | Config;
base: string;
}>;
loadStylesheet?: (id: string, base: string) => Promise<{
content: string;
base: string;
}>;
};
type Root = null | 'none' | {
base: string;
pattern: string;
};
declare const enum Features {
None = 0,
AtApply = 1,
AtImport = 2,
JsPluginCompat = 4,
ThemeFunction = 8,
Utilities = 16,
Variants = 32
}
declare function compileAst(input: AstNode[], opts?: CompileOptions): Promise<{
globs: {
base: string;
pattern: string;
}[];
root: Root;
features: Features;
build(candidates: string[]): AstNode[];
}>;
declare function compile(css: string, opts?: CompileOptions): Promise<{
globs: {
base: string;
pattern: string;
}[];
root: Root;
features: Features;
build(candidates: string[]): string;
}>;
declare function __unstable__loadDesignSystem(css: string, opts?: CompileOptions): Promise<DesignSystem>;
declare function postcssPluginWarning(): void;
export { type Config, Features, __unstable__loadDesignSystem, compile, compileAst, postcssPluginWarning as default };

3
new_site/node_modules/tailwindcss/dist/lib.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
declare function postcssPluginWarning(): void;
export { postcssPluginWarning as default };

33
new_site/node_modules/tailwindcss/dist/lib.js generated vendored Normal file

File diff suppressed because one or more lines are too long

24
new_site/node_modules/tailwindcss/dist/lib.mjs generated vendored Normal file

File diff suppressed because one or more lines are too long

10
new_site/node_modules/tailwindcss/dist/plugin.d.mts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import { a as PluginFn, C as Config, b as PluginWithConfig, c as PluginWithOptions } from './types-BTRmm49E.mjs';
import './resolve-config-QUZ9b-Gn.mjs';
import './colors.mjs';
declare function createPlugin(handler: PluginFn, config?: Partial<Config>): PluginWithConfig;
declare namespace createPlugin {
var withOptions: <T>(pluginFunction: (options?: T) => PluginFn, configFunction?: (options?: T) => Partial<Config>) => PluginWithOptions<T>;
}
export { createPlugin as default };

104
new_site/node_modules/tailwindcss/dist/plugin.d.ts generated vendored Normal file
View File

@@ -0,0 +1,104 @@
import { P as PluginUtils, N as NamedUtilityValue } from './resolve-config-BIFUA2FY.js';
import './colors-b_6i0Oi7.js';
type ResolvableTo<T> = T | ((utils: PluginUtils) => T);
type ThemeValue = ResolvableTo<Record<string, unknown>> | null | undefined;
type ThemeConfig = Record<string, ThemeValue> & {
extend?: Record<string, ThemeValue>;
};
type ContentFile = string | {
raw: string;
extension?: string;
};
type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]];
interface UserConfig {
presets?: UserConfig[];
theme?: ThemeConfig;
plugins?: Plugin[];
}
interface UserConfig {
content?: ContentFile[] | {
relative?: boolean;
files: ContentFile[];
};
}
interface UserConfig {
darkMode?: DarkModeStrategy;
}
interface UserConfig {
prefix?: string;
}
interface UserConfig {
blocklist?: string[];
}
interface UserConfig {
important?: boolean | string;
}
interface UserConfig {
future?: 'all' | Record<string, boolean>;
}
type Config = UserConfig;
type PluginFn = (api: PluginAPI) => void;
type PluginWithConfig = {
handler: PluginFn;
config?: UserConfig;
/** @internal */
reference?: boolean;
};
type PluginWithOptions<T> = {
(options?: T): PluginWithConfig;
__isOptionsFunction: true;
};
type Plugin = PluginFn | PluginWithConfig | PluginWithOptions<any>;
type PluginAPI = {
addBase(base: CssInJs): void;
addVariant(name: string, variant: string | string[] | CssInJs): void;
matchVariant<T = string>(name: string, cb: (value: T | string, extra: {
modifier: string | null;
}) => string | string[], options?: {
values?: Record<string, T>;
sort?(a: {
value: T | string;
modifier: string | null;
}, b: {
value: T | string;
modifier: string | null;
}): number;
}): void;
addUtilities(utilities: Record<string, CssInJs | CssInJs[]> | Record<string, CssInJs | CssInJs[]>[], options?: {}): void;
matchUtilities(utilities: Record<string, (value: string, extra: {
modifier: string | null;
}) => CssInJs | CssInJs[]>, options?: Partial<{
type: string | string[];
supportsNegativeValues: boolean;
values: Record<string, string> & {
__BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined;
};
modifiers: 'any' | Record<string, string>;
}>): void;
addComponents(utilities: Record<string, CssInJs> | Record<string, CssInJs>[], options?: {}): void;
matchComponents(utilities: Record<string, (value: string, extra: {
modifier: string | null;
}) => CssInJs>, options?: Partial<{
type: string | string[];
supportsNegativeValues: boolean;
values: Record<string, string> & {
__BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined;
};
modifiers: 'any' | Record<string, string>;
}>): void;
theme(path: string, defaultValue?: any): any;
config(path?: string, defaultValue?: any): any;
prefix(className: string): string;
};
type CssInJs = {
[key: string]: string | string[] | CssInJs | CssInJs[];
};
declare function createPlugin(handler: PluginFn, config?: Partial<Config>): PluginWithConfig;
declare namespace createPlugin {
var withOptions: <T>(pluginFunction: (options?: T) => PluginFn, configFunction?: (options?: T) => Partial<Config>) => PluginWithOptions<T>;
}
export { createPlugin as default };

1
new_site/node_modules/tailwindcss/dist/plugin.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";function u(i,n){return{handler:i,config:n}}u.withOptions=function(i,n=()=>({})){function t(o){return{handler:i(o),config:n(o)}}return t.__isOptionsFunction=!0,t};var g=u;module.exports=g;

1
new_site/node_modules/tailwindcss/dist/plugin.mjs generated vendored Normal file
View File

@@ -0,0 +1 @@
function u(n,i){return{handler:n,config:i}}u.withOptions=function(n,i=()=>({})){function t(o){return{handler:n(o),config:i(o)}}return t.__isOptionsFunction=!0,t};var g=u;export{g as default};

View File

@@ -0,0 +1,29 @@
import { _ as _default } from './colors-b_6i0Oi7.js';
type NamedUtilityValue = {
kind: 'named';
/**
* ```
* bg-red-500
* ^^^^^^^
*
* w-1/2
* ^
* ```
*/
value: string;
/**
* ```
* w-1/2
* ^^^
* ```
*/
fraction: string | null;
};
type PluginUtils = {
theme: (keypath: string, defaultValue?: any) => any;
colors: typeof _default;
};
export type { NamedUtilityValue as N, PluginUtils as P };

View File

@@ -0,0 +1,190 @@
import _default from './colors.mjs';
type ArbitraryUtilityValue = {
kind: 'arbitrary';
/**
* ```
* bg-[color:var(--my-color)]
* ^^^^^
*
* bg-(color:--my-color)
* ^^^^^
* ```
*/
dataType: string | null;
/**
* ```
* bg-[#0088cc]
* ^^^^^^^
*
* bg-[var(--my_variable)]
* ^^^^^^^^^^^^^^^^^^
*
* bg-(--my_variable)
* ^^^^^^^^^^^^^^
* ```
*/
value: string;
};
type NamedUtilityValue = {
kind: 'named';
/**
* ```
* bg-red-500
* ^^^^^^^
*
* w-1/2
* ^
* ```
*/
value: string;
/**
* ```
* w-1/2
* ^^^
* ```
*/
fraction: string | null;
};
type ArbitraryModifier = {
kind: 'arbitrary';
/**
* ```
* bg-red-500/[50%]
* ^^^
* ```
*/
value: string;
};
type NamedModifier = {
kind: 'named';
/**
* ```
* bg-red-500/50
* ^^
* ```
*/
value: string;
};
type ArbitraryVariantValue = {
kind: 'arbitrary';
value: string;
};
type NamedVariantValue = {
kind: 'named';
value: string;
};
type Variant =
/**
* Arbitrary variants are variants that take a selector and generate a variant
* on the fly.
*
* E.g.: `[&_p]`
*/
{
kind: 'arbitrary';
selector: string;
relative: boolean;
}
/**
* Static variants are variants that don't take any arguments.
*
* E.g.: `hover`
*/
| {
kind: 'static';
root: string;
}
/**
* Functional variants are variants that can take an argument. The argument is
* either a named variant value or an arbitrary variant value.
*
* E.g.:
*
* - `aria-disabled`
* - `aria-[disabled]`
* - `@container-size` -> @container, with named value `size`
* - `@container-[inline-size]` -> @container, with arbitrary variant value `inline-size`
* - `@container` -> @container, with no value
*/
| {
kind: 'functional';
root: string;
value: ArbitraryVariantValue | NamedVariantValue | null;
modifier: ArbitraryModifier | NamedModifier | null;
}
/**
* Compound variants are variants that take another variant as an argument.
*
* E.g.:
*
* - `has-[&_p]`
* - `group-*`
* - `peer-*`
*/
| {
kind: 'compound';
root: string;
modifier: ArbitraryModifier | NamedModifier | null;
variant: Variant;
};
type Candidate =
/**
* Arbitrary candidates are candidates that register utilities on the fly with
* a property and a value.
*
* E.g.:
*
* - `[color:red]`
* - `[color:red]/50`
* - `[color:red]/50!`
*/
{
kind: 'arbitrary';
property: string;
value: string;
modifier: ArbitraryModifier | NamedModifier | null;
variants: Variant[];
important: boolean;
raw: string;
}
/**
* Static candidates are candidates that don't take any arguments.
*
* E.g.:
*
* - `underline`
* - `box-border`
*/
| {
kind: 'static';
root: string;
variants: Variant[];
important: boolean;
raw: string;
}
/**
* Functional candidates are candidates that can take an argument.
*
* E.g.:
*
* - `bg-red-500`
* - `bg-[#0088cc]`
* - `w-1/2`
*/
| {
kind: 'functional';
root: string;
value: ArbitraryUtilityValue | NamedUtilityValue | null;
modifier: ArbitraryModifier | NamedModifier | null;
variants: Variant[];
important: boolean;
raw: string;
};
type PluginUtils = {
theme: (keypath: string, defaultValue?: any) => any;
colors: typeof _default;
};
export type { Candidate as C, NamedUtilityValue as N, PluginUtils as P, Variant as V };

View File

@@ -0,0 +1,98 @@
import { N as NamedUtilityValue, P as PluginUtils } from './resolve-config-QUZ9b-Gn.mjs';
type Config = UserConfig;
type PluginFn = (api: PluginAPI) => void;
type PluginWithConfig = {
handler: PluginFn;
config?: UserConfig;
/** @internal */
reference?: boolean;
};
type PluginWithOptions<T> = {
(options?: T): PluginWithConfig;
__isOptionsFunction: true;
};
type Plugin = PluginFn | PluginWithConfig | PluginWithOptions<any>;
type PluginAPI = {
addBase(base: CssInJs): void;
addVariant(name: string, variant: string | string[] | CssInJs): void;
matchVariant<T = string>(name: string, cb: (value: T | string, extra: {
modifier: string | null;
}) => string | string[], options?: {
values?: Record<string, T>;
sort?(a: {
value: T | string;
modifier: string | null;
}, b: {
value: T | string;
modifier: string | null;
}): number;
}): void;
addUtilities(utilities: Record<string, CssInJs | CssInJs[]> | Record<string, CssInJs | CssInJs[]>[], options?: {}): void;
matchUtilities(utilities: Record<string, (value: string, extra: {
modifier: string | null;
}) => CssInJs | CssInJs[]>, options?: Partial<{
type: string | string[];
supportsNegativeValues: boolean;
values: Record<string, string> & {
__BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined;
};
modifiers: 'any' | Record<string, string>;
}>): void;
addComponents(utilities: Record<string, CssInJs> | Record<string, CssInJs>[], options?: {}): void;
matchComponents(utilities: Record<string, (value: string, extra: {
modifier: string | null;
}) => CssInJs>, options?: Partial<{
type: string | string[];
supportsNegativeValues: boolean;
values: Record<string, string> & {
__BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined;
};
modifiers: 'any' | Record<string, string>;
}>): void;
theme(path: string, defaultValue?: any): any;
config(path?: string, defaultValue?: any): any;
prefix(className: string): string;
};
type CssInJs = {
[key: string]: string | string[] | CssInJs | CssInJs[];
};
type ResolvableTo<T> = T | ((utils: PluginUtils) => T);
type ThemeValue = ResolvableTo<Record<string, unknown>> | null | undefined;
type ThemeConfig = Record<string, ThemeValue> & {
extend?: Record<string, ThemeValue>;
};
type ContentFile = string | {
raw: string;
extension?: string;
};
type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]];
interface UserConfig {
presets?: UserConfig[];
theme?: ThemeConfig;
plugins?: Plugin[];
}
interface UserConfig {
content?: ContentFile[] | {
relative?: boolean;
files: ContentFile[];
};
}
interface UserConfig {
darkMode?: DarkModeStrategy;
}
interface UserConfig {
prefix?: string;
}
interface UserConfig {
blocklist?: string[];
}
interface UserConfig {
important?: boolean | string;
}
interface UserConfig {
future?: 'all' | Record<string, boolean>;
}
export type { Config as C, Plugin as P, UserConfig as U, PluginFn as a, PluginWithConfig as b, PluginWithOptions as c };