@alivecss/aliveui 1.0.0
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/README.md +317 -0
- package/dist/cli.js +3811 -0
- package/dist/index.d.mts +42 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +3757 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3717 -0
- package/dist/index.mjs.map +1 -0
- package/dist/runtime.d.mts +27 -0
- package/dist/runtime.d.ts +27 -0
- package/dist/runtime.js +236 -0
- package/dist/runtime.js.map +1 -0
- package/dist/runtime.mjs +205 -0
- package/dist/runtime.mjs.map +1 -0
- package/dist/vite.d.mts +43 -0
- package/dist/vite.d.ts +43 -0
- package/dist/vite.js +3872 -0
- package/dist/vite.js.map +1 -0
- package/dist/vite.mjs +3855 -0
- package/dist/vite.mjs.map +1 -0
- package/package.json +67 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PluginCreator } from 'postcss';
|
|
2
|
+
|
|
3
|
+
type ColorShades = Record<string, string>;
|
|
4
|
+
type ColorScale = Record<string, string | ColorShades>;
|
|
5
|
+
interface AliveUITheme {
|
|
6
|
+
colors: ColorScale;
|
|
7
|
+
spacing: Record<string, string>;
|
|
8
|
+
borderRadius: Record<string, string>;
|
|
9
|
+
fontSize: Record<string, [string, string]>;
|
|
10
|
+
fontWeight: Record<string, string>;
|
|
11
|
+
lineHeight: Record<string, string>;
|
|
12
|
+
screens: Record<string, string>;
|
|
13
|
+
opacity: Record<string, string>;
|
|
14
|
+
zIndex: Record<string, string>;
|
|
15
|
+
boxShadow: Record<string, string>;
|
|
16
|
+
darkMode: 'media' | 'class';
|
|
17
|
+
}
|
|
18
|
+
interface AliveUIConfig {
|
|
19
|
+
content: string[];
|
|
20
|
+
output?: string;
|
|
21
|
+
theme?: DeepPartial<AliveUITheme>;
|
|
22
|
+
}
|
|
23
|
+
interface ResolvedConfig {
|
|
24
|
+
content: string[];
|
|
25
|
+
output: string;
|
|
26
|
+
theme: AliveUITheme;
|
|
27
|
+
}
|
|
28
|
+
type DeepPartial<T> = {
|
|
29
|
+
[K in keyof T]?: T[K] extends Record<string, unknown> ? DeepPartial<T[K]> : T[K];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
declare function resolveConfig(userConfig?: Partial<AliveUIConfig>): ResolvedConfig;
|
|
33
|
+
|
|
34
|
+
declare function generateBase(_config: ResolvedConfig): string;
|
|
35
|
+
|
|
36
|
+
declare function generateUtilities(classes: Set<string>, config: ResolvedConfig): string;
|
|
37
|
+
|
|
38
|
+
declare function scanContent(config: ResolvedConfig): Promise<Set<string>>;
|
|
39
|
+
|
|
40
|
+
declare const aliveui: PluginCreator<Partial<AliveUIConfig>>;
|
|
41
|
+
|
|
42
|
+
export { type AliveUIConfig, type AliveUITheme, aliveui as default, generateBase, generateUtilities, resolveConfig, scanContent };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PluginCreator } from 'postcss';
|
|
2
|
+
|
|
3
|
+
type ColorShades = Record<string, string>;
|
|
4
|
+
type ColorScale = Record<string, string | ColorShades>;
|
|
5
|
+
interface AliveUITheme {
|
|
6
|
+
colors: ColorScale;
|
|
7
|
+
spacing: Record<string, string>;
|
|
8
|
+
borderRadius: Record<string, string>;
|
|
9
|
+
fontSize: Record<string, [string, string]>;
|
|
10
|
+
fontWeight: Record<string, string>;
|
|
11
|
+
lineHeight: Record<string, string>;
|
|
12
|
+
screens: Record<string, string>;
|
|
13
|
+
opacity: Record<string, string>;
|
|
14
|
+
zIndex: Record<string, string>;
|
|
15
|
+
boxShadow: Record<string, string>;
|
|
16
|
+
darkMode: 'media' | 'class';
|
|
17
|
+
}
|
|
18
|
+
interface AliveUIConfig {
|
|
19
|
+
content: string[];
|
|
20
|
+
output?: string;
|
|
21
|
+
theme?: DeepPartial<AliveUITheme>;
|
|
22
|
+
}
|
|
23
|
+
interface ResolvedConfig {
|
|
24
|
+
content: string[];
|
|
25
|
+
output: string;
|
|
26
|
+
theme: AliveUITheme;
|
|
27
|
+
}
|
|
28
|
+
type DeepPartial<T> = {
|
|
29
|
+
[K in keyof T]?: T[K] extends Record<string, unknown> ? DeepPartial<T[K]> : T[K];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
declare function resolveConfig(userConfig?: Partial<AliveUIConfig>): ResolvedConfig;
|
|
33
|
+
|
|
34
|
+
declare function generateBase(_config: ResolvedConfig): string;
|
|
35
|
+
|
|
36
|
+
declare function generateUtilities(classes: Set<string>, config: ResolvedConfig): string;
|
|
37
|
+
|
|
38
|
+
declare function scanContent(config: ResolvedConfig): Promise<Set<string>>;
|
|
39
|
+
|
|
40
|
+
declare const aliveui: PluginCreator<Partial<AliveUIConfig>>;
|
|
41
|
+
|
|
42
|
+
export { type AliveUIConfig, type AliveUITheme, aliveui as default, generateBase, generateUtilities, resolveConfig, scanContent };
|