@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.
@@ -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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cwcss/crosswind",
3
3
  "type": "module",
4
- "version": "0.2.4",
4
+ "version": "0.2.6",
5
5
  "description": "A performant Utility-First CSS framework. Similar to Tailwind or UnoCSS.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",