tailwind-styled-v4 5.0.21 → 5.0.23
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/atomic.js.map +1 -1
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.d.mts +1 -1
- package/dist/compiler.d.ts +1 -1
- package/dist/compiler.js +17 -16
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +17 -16
- package/dist/compiler.mjs.map +1 -1
- package/dist/engine.js +24 -18
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +24 -18
- package/dist/engine.mjs.map +1 -1
- package/dist/index.js +23 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -17
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +23 -17
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +23 -17
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.d.mts +101 -3
- package/dist/plugin-api.d.ts +101 -3
- package/dist/plugin.d.mts +5 -3
- package/dist/plugin.d.ts +5 -3
- package/dist/plugin.js +97 -0
- package/dist/plugin.js.map +1 -1
- package/dist/plugin.mjs +77 -1
- package/dist/plugin.mjs.map +1 -1
- package/dist/shared.js +23 -17
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +23 -17
- package/dist/shared.mjs.map +1 -1
- package/dist/turbopackLoader.js +17 -16
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +17 -16
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +23 -17
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +23 -17
- package/dist/vite.mjs.map +1 -1
- package/dist/webpackLoader.js +17 -16
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +17 -16
- package/dist/webpackLoader.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/index-BFqmBxl9.d.mts +0 -102
- package/dist/index-DwNErRJ_.d.ts +0 -102
package/package.json
CHANGED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { C as CompoundCondition, T as TokenMap } from './index-NDINUhLN.mjs';
|
|
2
|
-
|
|
3
|
-
interface TwClassResult {
|
|
4
|
-
css: string;
|
|
5
|
-
classes: string[];
|
|
6
|
-
}
|
|
7
|
-
interface DesignTokens {
|
|
8
|
-
[key: string]: string | number | DesignTokens;
|
|
9
|
-
}
|
|
10
|
-
interface TwPluginOptions {
|
|
11
|
-
classProcessor?: (classes: string[]) => TwClassResult;
|
|
12
|
-
tokens?: DesignTokens;
|
|
13
|
-
debug?: boolean;
|
|
14
|
-
minify?: boolean;
|
|
15
|
-
}
|
|
16
|
-
type VariantResolver = (selector: string) => string;
|
|
17
|
-
interface UtilityDefinition {
|
|
18
|
-
[property: string]: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface ComponentConfig {
|
|
22
|
-
base: string;
|
|
23
|
-
variants: Record<string, Record<string, string>>;
|
|
24
|
-
compoundVariants: Array<{
|
|
25
|
-
class: string;
|
|
26
|
-
} & CompoundCondition>;
|
|
27
|
-
defaultVariants: Record<string, string>;
|
|
28
|
-
}
|
|
29
|
-
interface TransformMeta {
|
|
30
|
-
componentName: string;
|
|
31
|
-
tag: string;
|
|
32
|
-
}
|
|
33
|
-
type TransformFn = (config: ComponentConfig, meta: TransformMeta) => ComponentConfig;
|
|
34
|
-
type CssHook = (css: string) => string;
|
|
35
|
-
interface TwContext {
|
|
36
|
-
addVariant(name: string, resolver: VariantResolver): void;
|
|
37
|
-
addUtility(name: string, styles: UtilityDefinition): void;
|
|
38
|
-
addToken(name: string, value: string): void;
|
|
39
|
-
addTransform(fn: TransformFn): void;
|
|
40
|
-
onGenerateCSS(hook: CssHook): void;
|
|
41
|
-
onBuildEnd(hook: () => void | Promise<void>): void;
|
|
42
|
-
getToken(name: string): string | undefined;
|
|
43
|
-
subscribeTokens(callback: (tokens: TokenMap) => void): () => void;
|
|
44
|
-
readonly config: Record<string, unknown>;
|
|
45
|
-
}
|
|
46
|
-
interface TwPlugin {
|
|
47
|
-
name: string;
|
|
48
|
-
setup(ctx: TwContext): void;
|
|
49
|
-
}
|
|
50
|
-
interface PluginRegistry {
|
|
51
|
-
variants: Map<string, VariantResolver>;
|
|
52
|
-
utilities: Map<string, UtilityDefinition>;
|
|
53
|
-
tokens: Map<string, string>;
|
|
54
|
-
transforms: TransformFn[];
|
|
55
|
-
cssHooks: CssHook[];
|
|
56
|
-
buildHooks: Array<() => void | Promise<void>>;
|
|
57
|
-
plugins: Set<string>;
|
|
58
|
-
}
|
|
59
|
-
interface TokenEngineAPI {
|
|
60
|
-
getToken?: (name: string) => string | undefined;
|
|
61
|
-
getTokens?: () => Record<string, string> | undefined;
|
|
62
|
-
subscribeTokens?: (callback: (tokens: Record<string, string>) => void) => () => void;
|
|
63
|
-
subscribe?: (callback: (tokens: Record<string, string>) => void) => () => void;
|
|
64
|
-
}
|
|
65
|
-
declare function resolveTokenEngine(): TokenEngineAPI | undefined;
|
|
66
|
-
declare function readToken(engine: TokenEngineAPI | undefined, name: string): string | undefined;
|
|
67
|
-
interface TransformContext {
|
|
68
|
-
filename?: string;
|
|
69
|
-
componentName?: string;
|
|
70
|
-
tag?: string;
|
|
71
|
-
}
|
|
72
|
-
interface TwGlobalRegistry {
|
|
73
|
-
transforms: Array<(config: ComponentConfig, ctx: TransformContext) => ComponentConfig>;
|
|
74
|
-
tokens: Record<string, string>;
|
|
75
|
-
variants: Map<string, VariantResolver>;
|
|
76
|
-
}
|
|
77
|
-
declare function getGlobalRegistry(): TwGlobalRegistry;
|
|
78
|
-
declare function registerTransform(transform: (config: ComponentConfig, ctx: TransformContext) => ComponentConfig): void;
|
|
79
|
-
declare function registerToken(name: string, value: string): void;
|
|
80
|
-
declare function createPluginRegistry(): PluginRegistry;
|
|
81
|
-
declare function resetGlobalRegistry(): void;
|
|
82
|
-
declare function createPluginContext(registry: PluginRegistry, config?: Record<string, unknown>): TwContext;
|
|
83
|
-
declare function createTw(config?: Record<string, unknown>): TwContext & {
|
|
84
|
-
registry: {
|
|
85
|
-
plugins: Set<string>;
|
|
86
|
-
variants: Map<string, VariantResolver>;
|
|
87
|
-
utilities: Map<string, UtilityDefinition>;
|
|
88
|
-
tokens: Map<string, string>;
|
|
89
|
-
};
|
|
90
|
-
use: (plugin: TwPlugin) => void;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* Creates a TwContext that writes through to the global (legacy) registry.
|
|
94
|
-
* Used by createTwPlugin() in the plugin package.
|
|
95
|
-
*/
|
|
96
|
-
declare function createGlobalPluginContext(config?: Record<string, unknown>): TwContext;
|
|
97
|
-
declare function use(plugin: TwPlugin): void;
|
|
98
|
-
declare function presetTokens(tokens: Record<string, string>): TwPlugin;
|
|
99
|
-
declare function presetVariants(variants: Record<string, VariantResolver>): TwPlugin;
|
|
100
|
-
declare function presetScrollbar(): TwPlugin;
|
|
101
|
-
|
|
102
|
-
export { type ComponentConfig as C, type DesignTokens as D, type PluginRegistry as P, type TwContext as T, type UtilityDefinition as U, type VariantResolver as V, type TwPluginOptions as a, type CssHook as b, type TokenEngineAPI as c, type TransformContext as d, type TransformFn as e, type TransformMeta as f, type TwClassResult as g, type TwGlobalRegistry as h, type TwPlugin as i, createGlobalPluginContext as j, createPluginContext as k, createPluginRegistry as l, createTw as m, getGlobalRegistry as n, presetTokens as o, presetScrollbar as p, presetVariants as q, readToken as r, registerToken as s, registerTransform as t, resetGlobalRegistry as u, resolveTokenEngine as v, use as w };
|
package/dist/index-DwNErRJ_.d.ts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { C as CompoundCondition, T as TokenMap } from './index-NDINUhLN.js';
|
|
2
|
-
|
|
3
|
-
interface TwClassResult {
|
|
4
|
-
css: string;
|
|
5
|
-
classes: string[];
|
|
6
|
-
}
|
|
7
|
-
interface DesignTokens {
|
|
8
|
-
[key: string]: string | number | DesignTokens;
|
|
9
|
-
}
|
|
10
|
-
interface TwPluginOptions {
|
|
11
|
-
classProcessor?: (classes: string[]) => TwClassResult;
|
|
12
|
-
tokens?: DesignTokens;
|
|
13
|
-
debug?: boolean;
|
|
14
|
-
minify?: boolean;
|
|
15
|
-
}
|
|
16
|
-
type VariantResolver = (selector: string) => string;
|
|
17
|
-
interface UtilityDefinition {
|
|
18
|
-
[property: string]: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface ComponentConfig {
|
|
22
|
-
base: string;
|
|
23
|
-
variants: Record<string, Record<string, string>>;
|
|
24
|
-
compoundVariants: Array<{
|
|
25
|
-
class: string;
|
|
26
|
-
} & CompoundCondition>;
|
|
27
|
-
defaultVariants: Record<string, string>;
|
|
28
|
-
}
|
|
29
|
-
interface TransformMeta {
|
|
30
|
-
componentName: string;
|
|
31
|
-
tag: string;
|
|
32
|
-
}
|
|
33
|
-
type TransformFn = (config: ComponentConfig, meta: TransformMeta) => ComponentConfig;
|
|
34
|
-
type CssHook = (css: string) => string;
|
|
35
|
-
interface TwContext {
|
|
36
|
-
addVariant(name: string, resolver: VariantResolver): void;
|
|
37
|
-
addUtility(name: string, styles: UtilityDefinition): void;
|
|
38
|
-
addToken(name: string, value: string): void;
|
|
39
|
-
addTransform(fn: TransformFn): void;
|
|
40
|
-
onGenerateCSS(hook: CssHook): void;
|
|
41
|
-
onBuildEnd(hook: () => void | Promise<void>): void;
|
|
42
|
-
getToken(name: string): string | undefined;
|
|
43
|
-
subscribeTokens(callback: (tokens: TokenMap) => void): () => void;
|
|
44
|
-
readonly config: Record<string, unknown>;
|
|
45
|
-
}
|
|
46
|
-
interface TwPlugin {
|
|
47
|
-
name: string;
|
|
48
|
-
setup(ctx: TwContext): void;
|
|
49
|
-
}
|
|
50
|
-
interface PluginRegistry {
|
|
51
|
-
variants: Map<string, VariantResolver>;
|
|
52
|
-
utilities: Map<string, UtilityDefinition>;
|
|
53
|
-
tokens: Map<string, string>;
|
|
54
|
-
transforms: TransformFn[];
|
|
55
|
-
cssHooks: CssHook[];
|
|
56
|
-
buildHooks: Array<() => void | Promise<void>>;
|
|
57
|
-
plugins: Set<string>;
|
|
58
|
-
}
|
|
59
|
-
interface TokenEngineAPI {
|
|
60
|
-
getToken?: (name: string) => string | undefined;
|
|
61
|
-
getTokens?: () => Record<string, string> | undefined;
|
|
62
|
-
subscribeTokens?: (callback: (tokens: Record<string, string>) => void) => () => void;
|
|
63
|
-
subscribe?: (callback: (tokens: Record<string, string>) => void) => () => void;
|
|
64
|
-
}
|
|
65
|
-
declare function resolveTokenEngine(): TokenEngineAPI | undefined;
|
|
66
|
-
declare function readToken(engine: TokenEngineAPI | undefined, name: string): string | undefined;
|
|
67
|
-
interface TransformContext {
|
|
68
|
-
filename?: string;
|
|
69
|
-
componentName?: string;
|
|
70
|
-
tag?: string;
|
|
71
|
-
}
|
|
72
|
-
interface TwGlobalRegistry {
|
|
73
|
-
transforms: Array<(config: ComponentConfig, ctx: TransformContext) => ComponentConfig>;
|
|
74
|
-
tokens: Record<string, string>;
|
|
75
|
-
variants: Map<string, VariantResolver>;
|
|
76
|
-
}
|
|
77
|
-
declare function getGlobalRegistry(): TwGlobalRegistry;
|
|
78
|
-
declare function registerTransform(transform: (config: ComponentConfig, ctx: TransformContext) => ComponentConfig): void;
|
|
79
|
-
declare function registerToken(name: string, value: string): void;
|
|
80
|
-
declare function createPluginRegistry(): PluginRegistry;
|
|
81
|
-
declare function resetGlobalRegistry(): void;
|
|
82
|
-
declare function createPluginContext(registry: PluginRegistry, config?: Record<string, unknown>): TwContext;
|
|
83
|
-
declare function createTw(config?: Record<string, unknown>): TwContext & {
|
|
84
|
-
registry: {
|
|
85
|
-
plugins: Set<string>;
|
|
86
|
-
variants: Map<string, VariantResolver>;
|
|
87
|
-
utilities: Map<string, UtilityDefinition>;
|
|
88
|
-
tokens: Map<string, string>;
|
|
89
|
-
};
|
|
90
|
-
use: (plugin: TwPlugin) => void;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* Creates a TwContext that writes through to the global (legacy) registry.
|
|
94
|
-
* Used by createTwPlugin() in the plugin package.
|
|
95
|
-
*/
|
|
96
|
-
declare function createGlobalPluginContext(config?: Record<string, unknown>): TwContext;
|
|
97
|
-
declare function use(plugin: TwPlugin): void;
|
|
98
|
-
declare function presetTokens(tokens: Record<string, string>): TwPlugin;
|
|
99
|
-
declare function presetVariants(variants: Record<string, VariantResolver>): TwPlugin;
|
|
100
|
-
declare function presetScrollbar(): TwPlugin;
|
|
101
|
-
|
|
102
|
-
export { type ComponentConfig as C, type DesignTokens as D, type PluginRegistry as P, type TwContext as T, type UtilityDefinition as U, type VariantResolver as V, type TwPluginOptions as a, type CssHook as b, type TokenEngineAPI as c, type TransformContext as d, type TransformFn as e, type TransformMeta as f, type TwClassResult as g, type TwGlobalRegistry as h, type TwPlugin as i, createGlobalPluginContext as j, createPluginContext as k, createPluginRegistry as l, createTw as m, getGlobalRegistry as n, presetTokens as o, presetScrollbar as p, presetVariants as q, readToken as r, registerToken as s, registerTransform as t, resetGlobalRegistry as u, resolveTokenEngine as v, use as w };
|