tailwindcss 4.0.0-alpha.19 → 4.0.0-alpha.20
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/colors.d.mts +295 -0
- package/dist/colors.d.ts +2 -0
- package/dist/colors.js +1 -0
- package/dist/colors.mjs +1 -0
- package/dist/default-theme.d.mts +770 -0
- package/dist/default-theme.d.ts +2 -0
- package/dist/default-theme.js +1 -0
- package/dist/default-theme.mjs +1 -0
- package/dist/lib.d.mts +65 -19
- package/dist/lib.d.ts +65 -19
- package/dist/lib.js +11 -9
- package/dist/lib.mjs +11 -9
- package/dist/plugin.d.mts +67 -0
- package/dist/plugin.d.ts +2 -0
- package/dist/plugin.js +1 -0
- package/dist/plugin.mjs +1 -0
- package/dist/types-InlknEYy.d.mts +14 -0
- package/package.json +14 -2
@@ -0,0 +1,67 @@
|
|
1
|
+
import { U as UserConfig } from './types-InlknEYy.mjs';
|
2
|
+
|
3
|
+
type NamedUtilityValue = {
|
4
|
+
kind: 'named';
|
5
|
+
/**
|
6
|
+
* bg-red-500
|
7
|
+
* ^^^^^^^
|
8
|
+
*
|
9
|
+
* w-1/2
|
10
|
+
* ^
|
11
|
+
*/
|
12
|
+
value: string;
|
13
|
+
/**
|
14
|
+
* w-1/2
|
15
|
+
* ^^^
|
16
|
+
*/
|
17
|
+
fraction: string | null;
|
18
|
+
};
|
19
|
+
|
20
|
+
type Config = UserConfig;
|
21
|
+
type PluginFn = (api: PluginAPI) => void;
|
22
|
+
type PluginWithConfig = {
|
23
|
+
handler: PluginFn;
|
24
|
+
config?: UserConfig;
|
25
|
+
};
|
26
|
+
type PluginWithOptions<T> = {
|
27
|
+
(options?: T): PluginWithConfig;
|
28
|
+
__isOptionsFunction: true;
|
29
|
+
};
|
30
|
+
type PluginAPI = {
|
31
|
+
addBase(base: CssInJs): void;
|
32
|
+
addVariant(name: string, variant: string | string[] | CssInJs): void;
|
33
|
+
addUtilities(utilities: Record<string, CssInJs | CssInJs[]> | Record<string, CssInJs | CssInJs[]>[], options?: {}): void;
|
34
|
+
matchUtilities(utilities: Record<string, (value: string, extra: {
|
35
|
+
modifier: string | null;
|
36
|
+
}) => CssInJs | CssInJs[]>, options?: Partial<{
|
37
|
+
type: string | string[];
|
38
|
+
supportsNegativeValues: boolean;
|
39
|
+
values: Record<string, string> & {
|
40
|
+
__BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined;
|
41
|
+
};
|
42
|
+
modifiers: 'any' | Record<string, string>;
|
43
|
+
}>): void;
|
44
|
+
addComponents(utilities: Record<string, CssInJs> | Record<string, CssInJs>[], options?: {}): void;
|
45
|
+
matchComponents(utilities: Record<string, (value: string, extra: {
|
46
|
+
modifier: string | null;
|
47
|
+
}) => CssInJs>, options?: Partial<{
|
48
|
+
type: string | string[];
|
49
|
+
supportsNegativeValues: boolean;
|
50
|
+
values: Record<string, string> & {
|
51
|
+
__BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined;
|
52
|
+
};
|
53
|
+
modifiers: 'any' | Record<string, string>;
|
54
|
+
}>): void;
|
55
|
+
theme(path: string, defaultValue?: any): any;
|
56
|
+
prefix(className: string): string;
|
57
|
+
};
|
58
|
+
type CssInJs = {
|
59
|
+
[key: string]: string | CssInJs | CssInJs[];
|
60
|
+
};
|
61
|
+
|
62
|
+
declare function createPlugin(handler: PluginFn, config?: Partial<Config>): PluginWithConfig;
|
63
|
+
declare namespace createPlugin {
|
64
|
+
var withOptions: <T>(pluginFunction: (options?: T) => PluginFn, configFunction?: (options?: T) => Partial<Config>) => PluginWithOptions<T>;
|
65
|
+
}
|
66
|
+
|
67
|
+
export { createPlugin as default };
|
package/dist/plugin.d.ts
ADDED
package/dist/plugin.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";var g=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var P=(n,i)=>()=>(n&&(i=n(n=0)),i);var a=(n,i)=>{for(var t in i)g(n,t,{get:i[t],enumerable:!0})},c=(n,i,t,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let u of p(i))!s.call(n,u)&&u!==t&&g(n,u,{get:()=>i[u],enumerable:!(o=f(i,u))||o.enumerable});return n};var h=n=>c(g({},"__esModule",{value:!0}),n);var l={};a(l,{default:()=>C});function r(n,i){return{handler:n,config:i}}var C,e=P(()=>{"use strict";r.withOptions=function(n,i=()=>({})){function t(o){return{handler:n(o),config:i(o)}}return t.__isOptionsFunction=!0,t};C=r});module.exports=(e(),h(l)).default;
|
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,14 @@
|
|
1
|
+
interface PluginUtils {
|
2
|
+
theme(keypath: string, defaultValue?: any): any;
|
3
|
+
}
|
4
|
+
|
5
|
+
type ResolvableTo<T> = T | ((utils: PluginUtils) => T);
|
6
|
+
interface UserConfig {
|
7
|
+
theme?: ThemeConfig;
|
8
|
+
}
|
9
|
+
type ThemeValue = ResolvableTo<Record<string, unknown>> | null | undefined;
|
10
|
+
type ThemeConfig = Record<string, ThemeValue> & {
|
11
|
+
extend?: Record<string, ThemeValue>;
|
12
|
+
};
|
13
|
+
|
14
|
+
export type { ThemeValue as T, UserConfig as U };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "tailwindcss",
|
3
|
-
"version": "4.0.0-alpha.
|
3
|
+
"version": "4.0.0-alpha.20",
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
5
5
|
"license": "MIT",
|
6
6
|
"repository": {
|
@@ -17,6 +17,18 @@
|
|
17
17
|
"require": "./dist/lib.js",
|
18
18
|
"import": "./dist/lib.mjs"
|
19
19
|
},
|
20
|
+
"./plugin": {
|
21
|
+
"require": "./dist/plugin.js",
|
22
|
+
"import": "./dist/plugin.mjs"
|
23
|
+
},
|
24
|
+
"./defaultTheme": {
|
25
|
+
"require": "./dist/default-theme.js",
|
26
|
+
"import": "./dist/default-theme.mjs"
|
27
|
+
},
|
28
|
+
"./colors": {
|
29
|
+
"require": "./dist/colors.js",
|
30
|
+
"import": "./dist/colors.mjs"
|
31
|
+
},
|
20
32
|
"./package.json": "./package.json",
|
21
33
|
"./index.css": "./index.css",
|
22
34
|
"./index": "./index.css",
|
@@ -42,7 +54,7 @@
|
|
42
54
|
"devDependencies": {
|
43
55
|
"@types/node": "^20.14.8",
|
44
56
|
"lightningcss": "^1.26.0",
|
45
|
-
"@tailwindcss/oxide": "4.0.0-alpha.
|
57
|
+
"@tailwindcss/oxide": "4.0.0-alpha.20"
|
46
58
|
},
|
47
59
|
"scripts": {
|
48
60
|
"lint": "tsc --noEmit",
|