tailwindcss 4.0.0-alpha.2 → 4.0.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2PMIOWFK.mjs +1 -0
- package/dist/colors.d.mts +295 -0
- package/dist/colors.d.ts +295 -0
- package/dist/colors.js +1 -0
- package/dist/colors.mjs +1 -0
- package/dist/default-theme.d.mts +1146 -0
- package/dist/default-theme.d.ts +1146 -0
- package/dist/default-theme.js +1 -0
- package/dist/default-theme.mjs +1 -0
- package/dist/lib.d.mts +219 -122
- package/dist/lib.d.ts +219 -122
- package/dist/lib.js +24 -11
- package/dist/lib.mjs +24 -11
- package/dist/plugin.d.mts +76 -0
- package/dist/plugin.d.ts +76 -0
- package/dist/plugin.js +1 -0
- package/dist/plugin.mjs +1 -0
- package/dist/resolve-config-C9L_YGHi.d.mts +22 -0
- package/dist/resolve-config-C9L_YGHi.d.ts +22 -0
- package/index.css +825 -3
- package/package.json +30 -8
- package/preflight.css +22 -51
- package/theme.css +16 -10
@@ -0,0 +1,76 @@
|
|
1
|
+
import { P as PluginUtils, N as NamedUtilityValue } from './resolve-config-C9L_YGHi.mjs';
|
2
|
+
|
3
|
+
type ResolvableTo<T> = T | ((utils: PluginUtils) => T);
|
4
|
+
type ThemeValue = ResolvableTo<Record<string, unknown>> | null | undefined;
|
5
|
+
type ThemeConfig = Record<string, ThemeValue> & {
|
6
|
+
extend?: Record<string, ThemeValue>;
|
7
|
+
};
|
8
|
+
type ContentFile = string | {
|
9
|
+
raw: string;
|
10
|
+
extension?: string;
|
11
|
+
};
|
12
|
+
type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]];
|
13
|
+
interface UserConfig {
|
14
|
+
presets?: UserConfig[];
|
15
|
+
theme?: ThemeConfig;
|
16
|
+
plugins?: Plugin[];
|
17
|
+
}
|
18
|
+
interface UserConfig {
|
19
|
+
content?: ContentFile[] | {
|
20
|
+
files: ContentFile[];
|
21
|
+
};
|
22
|
+
}
|
23
|
+
interface UserConfig {
|
24
|
+
darkMode?: DarkModeStrategy;
|
25
|
+
}
|
26
|
+
|
27
|
+
type Config = UserConfig;
|
28
|
+
type PluginFn = (api: PluginAPI) => void;
|
29
|
+
type PluginWithConfig = {
|
30
|
+
handler: PluginFn;
|
31
|
+
config?: UserConfig;
|
32
|
+
};
|
33
|
+
type PluginWithOptions<T> = {
|
34
|
+
(options?: T): PluginWithConfig;
|
35
|
+
__isOptionsFunction: true;
|
36
|
+
};
|
37
|
+
type Plugin = PluginFn | PluginWithConfig | PluginWithOptions<any>;
|
38
|
+
type PluginAPI = {
|
39
|
+
addBase(base: CssInJs): void;
|
40
|
+
addVariant(name: string, variant: string | string[] | CssInJs): void;
|
41
|
+
addUtilities(utilities: Record<string, CssInJs | CssInJs[]> | Record<string, CssInJs | CssInJs[]>[], options?: {}): void;
|
42
|
+
matchUtilities(utilities: Record<string, (value: string, extra: {
|
43
|
+
modifier: string | null;
|
44
|
+
}) => CssInJs | CssInJs[]>, options?: Partial<{
|
45
|
+
type: string | string[];
|
46
|
+
supportsNegativeValues: boolean;
|
47
|
+
values: Record<string, string> & {
|
48
|
+
__BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined;
|
49
|
+
};
|
50
|
+
modifiers: 'any' | Record<string, string>;
|
51
|
+
}>): void;
|
52
|
+
addComponents(utilities: Record<string, CssInJs> | Record<string, CssInJs>[], options?: {}): void;
|
53
|
+
matchComponents(utilities: Record<string, (value: string, extra: {
|
54
|
+
modifier: string | null;
|
55
|
+
}) => CssInJs>, options?: Partial<{
|
56
|
+
type: string | string[];
|
57
|
+
supportsNegativeValues: boolean;
|
58
|
+
values: Record<string, string> & {
|
59
|
+
__BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined;
|
60
|
+
};
|
61
|
+
modifiers: 'any' | Record<string, string>;
|
62
|
+
}>): void;
|
63
|
+
theme(path: string, defaultValue?: any): any;
|
64
|
+
config(path: string, defaultValue?: any): any;
|
65
|
+
prefix(className: string): string;
|
66
|
+
};
|
67
|
+
type CssInJs = {
|
68
|
+
[key: string]: string | string[] | CssInJs | CssInJs[];
|
69
|
+
};
|
70
|
+
|
71
|
+
declare function createPlugin(handler: PluginFn, config?: Partial<Config>): PluginWithConfig;
|
72
|
+
declare namespace createPlugin {
|
73
|
+
var withOptions: <T>(pluginFunction: (options?: T) => PluginFn, configFunction?: (options?: T) => Partial<Config>) => PluginWithOptions<T>;
|
74
|
+
}
|
75
|
+
|
76
|
+
export { createPlugin as default };
|
package/dist/plugin.d.ts
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
import { P as PluginUtils, N as NamedUtilityValue } from './resolve-config-C9L_YGHi.js';
|
2
|
+
|
3
|
+
type ResolvableTo<T> = T | ((utils: PluginUtils) => T);
|
4
|
+
type ThemeValue = ResolvableTo<Record<string, unknown>> | null | undefined;
|
5
|
+
type ThemeConfig = Record<string, ThemeValue> & {
|
6
|
+
extend?: Record<string, ThemeValue>;
|
7
|
+
};
|
8
|
+
type ContentFile = string | {
|
9
|
+
raw: string;
|
10
|
+
extension?: string;
|
11
|
+
};
|
12
|
+
type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]];
|
13
|
+
interface UserConfig {
|
14
|
+
presets?: UserConfig[];
|
15
|
+
theme?: ThemeConfig;
|
16
|
+
plugins?: Plugin[];
|
17
|
+
}
|
18
|
+
interface UserConfig {
|
19
|
+
content?: ContentFile[] | {
|
20
|
+
files: ContentFile[];
|
21
|
+
};
|
22
|
+
}
|
23
|
+
interface UserConfig {
|
24
|
+
darkMode?: DarkModeStrategy;
|
25
|
+
}
|
26
|
+
|
27
|
+
type Config = UserConfig;
|
28
|
+
type PluginFn = (api: PluginAPI) => void;
|
29
|
+
type PluginWithConfig = {
|
30
|
+
handler: PluginFn;
|
31
|
+
config?: UserConfig;
|
32
|
+
};
|
33
|
+
type PluginWithOptions<T> = {
|
34
|
+
(options?: T): PluginWithConfig;
|
35
|
+
__isOptionsFunction: true;
|
36
|
+
};
|
37
|
+
type Plugin = PluginFn | PluginWithConfig | PluginWithOptions<any>;
|
38
|
+
type PluginAPI = {
|
39
|
+
addBase(base: CssInJs): void;
|
40
|
+
addVariant(name: string, variant: string | string[] | CssInJs): void;
|
41
|
+
addUtilities(utilities: Record<string, CssInJs | CssInJs[]> | Record<string, CssInJs | CssInJs[]>[], options?: {}): void;
|
42
|
+
matchUtilities(utilities: Record<string, (value: string, extra: {
|
43
|
+
modifier: string | null;
|
44
|
+
}) => CssInJs | CssInJs[]>, options?: Partial<{
|
45
|
+
type: string | string[];
|
46
|
+
supportsNegativeValues: boolean;
|
47
|
+
values: Record<string, string> & {
|
48
|
+
__BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined;
|
49
|
+
};
|
50
|
+
modifiers: 'any' | Record<string, string>;
|
51
|
+
}>): void;
|
52
|
+
addComponents(utilities: Record<string, CssInJs> | Record<string, CssInJs>[], options?: {}): void;
|
53
|
+
matchComponents(utilities: Record<string, (value: string, extra: {
|
54
|
+
modifier: string | null;
|
55
|
+
}) => CssInJs>, options?: Partial<{
|
56
|
+
type: string | string[];
|
57
|
+
supportsNegativeValues: boolean;
|
58
|
+
values: Record<string, string> & {
|
59
|
+
__BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined;
|
60
|
+
};
|
61
|
+
modifiers: 'any' | Record<string, string>;
|
62
|
+
}>): void;
|
63
|
+
theme(path: string, defaultValue?: any): any;
|
64
|
+
config(path: string, defaultValue?: any): any;
|
65
|
+
prefix(className: string): string;
|
66
|
+
};
|
67
|
+
type CssInJs = {
|
68
|
+
[key: string]: string | string[] | CssInJs | CssInJs[];
|
69
|
+
};
|
70
|
+
|
71
|
+
declare function createPlugin(handler: PluginFn, config?: Partial<Config>): PluginWithConfig;
|
72
|
+
declare namespace createPlugin {
|
73
|
+
var withOptions: <T>(pluginFunction: (options?: T) => PluginFn, configFunction?: (options?: T) => Partial<Config>) => PluginWithOptions<T>;
|
74
|
+
}
|
75
|
+
|
76
|
+
export { createPlugin as default };
|
package/dist/plugin.js
ADDED
@@ -0,0 +1 @@
|
|
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;
|
package/dist/plugin.mjs
ADDED
@@ -0,0 +1 @@
|
|
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};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
type NamedUtilityValue = {
|
2
|
+
kind: 'named';
|
3
|
+
/**
|
4
|
+
* bg-red-500
|
5
|
+
* ^^^^^^^
|
6
|
+
*
|
7
|
+
* w-1/2
|
8
|
+
* ^
|
9
|
+
*/
|
10
|
+
value: string;
|
11
|
+
/**
|
12
|
+
* w-1/2
|
13
|
+
* ^^^
|
14
|
+
*/
|
15
|
+
fraction: string | null;
|
16
|
+
};
|
17
|
+
|
18
|
+
interface PluginUtils {
|
19
|
+
theme(keypath: string, defaultValue?: any): any;
|
20
|
+
}
|
21
|
+
|
22
|
+
export type { NamedUtilityValue as N, PluginUtils as P };
|
@@ -0,0 +1,22 @@
|
|
1
|
+
type NamedUtilityValue = {
|
2
|
+
kind: 'named';
|
3
|
+
/**
|
4
|
+
* bg-red-500
|
5
|
+
* ^^^^^^^
|
6
|
+
*
|
7
|
+
* w-1/2
|
8
|
+
* ^
|
9
|
+
*/
|
10
|
+
value: string;
|
11
|
+
/**
|
12
|
+
* w-1/2
|
13
|
+
* ^^^
|
14
|
+
*/
|
15
|
+
fraction: string | null;
|
16
|
+
};
|
17
|
+
|
18
|
+
interface PluginUtils {
|
19
|
+
theme(keypath: string, defaultValue?: any): any;
|
20
|
+
}
|
21
|
+
|
22
|
+
export type { NamedUtilityValue as N, PluginUtils as P };
|