@cwcss/crosswind 0.2.4 → 0.2.6
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-g6748chn.js +468 -0
- package/dist/cli.js +48 -31
- package/dist/index.js +1 -1
- package/dist/rules-advanced.d.ts +28 -0
- package/dist/rules-effects.d.ts +26 -0
- package/dist/rules-forms.d.ts +8 -0
- package/dist/rules-grid.d.ts +14 -0
- package/dist/rules-icons.d.ts +2 -0
- package/dist/rules-interactivity.d.ts +41 -0
- package/dist/rules-layout.d.ts +27 -0
- package/dist/rules-transforms.d.ts +34 -0
- package/dist/rules-typography.d.ts +42 -0
- package/dist/transformer-compile-class.d.ts +34 -0
- package/dist/types.d.ts +12 -0
- package/package.json +1 -1
- package/dist/chunk-k9ke1f7b.js +0 -438
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CrosswindConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Extract compile class markers from content
|
|
4
|
+
*/
|
|
5
|
+
export declare function extractCompileClasses(content: string, options?: CompileClassOptions): Map<string, string[]>;
|
|
6
|
+
/**
|
|
7
|
+
* Transform content by replacing compile markers with generated class names
|
|
8
|
+
*/
|
|
9
|
+
export declare function transformContent(content: string, compiledClassMap: Map<string, string>, options?: CompileClassOptions): string;
|
|
10
|
+
/**
|
|
11
|
+
* Generate class names for compiled classes
|
|
12
|
+
*/
|
|
13
|
+
export declare function generateCompiledClassNames(compiledClasses: Map<string, string[]>, options?: CompileClassOptions): Map<string, string>;
|
|
14
|
+
export declare interface CompileClassOptions {
|
|
15
|
+
trigger?: string
|
|
16
|
+
classPrefix?: string
|
|
17
|
+
hashFn?: (content: string) => string
|
|
18
|
+
layer?: string
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Main transformer class
|
|
22
|
+
*/
|
|
23
|
+
export declare class CompileClassTransformer {
|
|
24
|
+
constructor(options?: CompileClassOptions);
|
|
25
|
+
processFile(content: string): { content: string, hasChanges: boolean };
|
|
26
|
+
getCompiledClasses(): Map<string, { className: string, utilities: string[] }>;
|
|
27
|
+
generateCSS(config: CrosswindConfig, generator: any): string;
|
|
28
|
+
reset(): void;
|
|
29
|
+
getStats(): {
|
|
30
|
+
totalGroups: number
|
|
31
|
+
totalUtilities: number
|
|
32
|
+
averageUtilitiesPerGroup: number
|
|
33
|
+
};
|
|
34
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -14,6 +14,16 @@ export declare interface BracketSyntaxConfig {
|
|
|
14
14
|
colonSyntax?: boolean
|
|
15
15
|
aliases?: Record<string, string>
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Web-font loading. Crosswind maps `font-*` utilities to family stacks, but it
|
|
19
|
+
* never loaded the actual font files — declare them here and crosswind emits the
|
|
20
|
+
* `@import` / `@font-face` so the fonts render with zero extra wiring.
|
|
21
|
+
*/
|
|
22
|
+
export declare interface FontConfig {
|
|
23
|
+
google?: string[]
|
|
24
|
+
display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional'
|
|
25
|
+
faces?: string[]
|
|
26
|
+
}
|
|
17
27
|
export declare interface CrosswindConfig {
|
|
18
28
|
content: string[]
|
|
19
29
|
output: string
|
|
@@ -21,6 +31,7 @@ export declare interface CrosswindConfig {
|
|
|
21
31
|
watch: boolean
|
|
22
32
|
verbose?: boolean
|
|
23
33
|
theme: Theme
|
|
34
|
+
fonts?: FontConfig
|
|
24
35
|
shortcuts: Record<string, string | string[]>
|
|
25
36
|
rules: CustomRule[]
|
|
26
37
|
variants: VariantConfig
|
|
@@ -38,6 +49,7 @@ export declare interface Theme {
|
|
|
38
49
|
spacing: Record<string, string>
|
|
39
50
|
fontSize: Record<string, [string, { lineHeight: string }]>
|
|
40
51
|
fontFamily: Record<string, string[]>
|
|
52
|
+
lineHeight?: Record<string, string>
|
|
41
53
|
screens: Record<string, string>
|
|
42
54
|
borderRadius: Record<string, string>
|
|
43
55
|
boxShadow: Record<string, string>
|
package/package.json
CHANGED