@cwcss/crosswind 0.1.6 → 0.2.1
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 +483 -277
- package/dist/bin/cli.js +13838 -0
- package/dist/build.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/generator.d.ts +4 -24
- package/dist/index.d.ts +1 -1
- package/dist/parser.d.ts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/preflight-forms.d.ts +2 -1
- package/dist/preflight.d.ts +2 -1
- package/dist/rules.d.ts +13 -1
- package/dist/scanner.d.ts +1 -4
- package/dist/{index.js → src/index.js} +1951 -2674
- package/dist/types.d.ts +11 -2
- package/package.json +2 -16
- package/dist/rules-advanced.d.ts +0 -27
- package/dist/rules-effects.d.ts +0 -25
- package/dist/rules-forms.d.ts +0 -7
- package/dist/rules-grid.d.ts +0 -13
- package/dist/rules-interactivity.d.ts +0 -41
- package/dist/rules-layout.d.ts +0 -26
- package/dist/rules-transforms.d.ts +0 -33
- package/dist/rules-typography.d.ts +0 -41
- package/dist/transformer-compile-class.d.ts +0 -37
package/dist/types.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare interface VariantConfig {
|
|
|
50
50
|
'active': boolean
|
|
51
51
|
'disabled': boolean
|
|
52
52
|
'dark': boolean
|
|
53
|
+
'light': boolean
|
|
53
54
|
'group': boolean
|
|
54
55
|
'peer': boolean
|
|
55
56
|
'before': boolean
|
|
@@ -82,7 +83,15 @@ export declare interface VariantConfig {
|
|
|
82
83
|
'indeterminate': boolean
|
|
83
84
|
'default': boolean
|
|
84
85
|
'optional': boolean
|
|
86
|
+
'aria': boolean
|
|
87
|
+
'data': boolean
|
|
88
|
+
'has': boolean
|
|
89
|
+
'not': boolean
|
|
90
|
+
'supports': boolean
|
|
85
91
|
'print': boolean
|
|
92
|
+
'landscape': boolean
|
|
93
|
+
'portrait': boolean
|
|
94
|
+
'forced-colors': boolean
|
|
86
95
|
'rtl': boolean
|
|
87
96
|
'ltr': boolean
|
|
88
97
|
'motion-safe': boolean
|
|
@@ -121,8 +130,8 @@ export declare interface Preset {
|
|
|
121
130
|
variants?: Partial<VariantConfig>
|
|
122
131
|
preflights?: Preflight[]
|
|
123
132
|
}
|
|
124
|
-
export type CustomRule = [RegExp, (
|
|
133
|
+
export type CustomRule = [RegExp, (_match: RegExpMatchArray) => Record<string, string> | undefined];
|
|
125
134
|
declare type DeepPartial<T> = {
|
|
126
135
|
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]
|
|
127
136
|
}
|
|
128
|
-
export type CrosswindOptions = DeepPartial<CrosswindConfig
|
|
137
|
+
export type CrosswindOptions = DeepPartial<CrosswindConfig>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cwcss/crosswind",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1
|
|
4
|
+
"version": "0.2.1",
|
|
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",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"module": "./dist/index.js",
|
|
38
38
|
"types": "./dist/index.d.ts",
|
|
39
39
|
"bin": {
|
|
40
|
-
"crosswind": "./dist/
|
|
40
|
+
"crosswind": "./dist/cli.js"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"README.md",
|
|
@@ -72,21 +72,7 @@
|
|
|
72
72
|
"@stacksjs/clapp": "^0.2.0",
|
|
73
73
|
"bunfig": "^0.15.0"
|
|
74
74
|
},
|
|
75
|
-
"overrides": {
|
|
76
|
-
"unconfig": "0.3.10"
|
|
77
|
-
},
|
|
78
75
|
"lint-staged": {
|
|
79
76
|
"*.{js,ts}": "bunx --bun pickier run --mode lint --fix"
|
|
80
|
-
},
|
|
81
|
-
"devDependencies": {
|
|
82
|
-
"@tailwindcss/node": "^4.1.14",
|
|
83
|
-
"@tailwindcss/postcss": "^4.1",
|
|
84
|
-
"@tailwindcss/vite": "^4.1",
|
|
85
|
-
"@unocss/core": "^66.5.4",
|
|
86
|
-
"@unocss/preset-wind": "^66.5.4",
|
|
87
|
-
"mitata": "^1.0.34",
|
|
88
|
-
"postcss": "^8.5.6",
|
|
89
|
-
"tailwindcss": "^3",
|
|
90
|
-
"tailwindcss-v4": "npm:tailwindcss@^4"
|
|
91
77
|
}
|
|
92
78
|
}
|
package/dist/rules-advanced.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// Advanced utilities
|
|
2
|
-
// Min/Max sizing
|
|
3
|
-
export declare const minMaxSizingRule: UtilityRule;
|
|
4
|
-
// Ring utilities
|
|
5
|
-
export declare const ringRule: UtilityRule;
|
|
6
|
-
// Border opacity utility
|
|
7
|
-
export declare const borderOpacityRule: UtilityRule;
|
|
8
|
-
// Space utilities (child spacing)
|
|
9
|
-
export declare const spaceRule: UtilityRule;
|
|
10
|
-
// Border style utilities
|
|
11
|
-
export declare const borderStyleRule: UtilityRule;
|
|
12
|
-
// Divide utilities (borders between children)
|
|
13
|
-
export declare const divideRule: UtilityRule;
|
|
14
|
-
// Gradient color stops
|
|
15
|
-
export declare const gradientStopsRule: UtilityRule;
|
|
16
|
-
// Flex order
|
|
17
|
-
export declare const flexOrderRule: UtilityRule;
|
|
18
|
-
// Flex basis
|
|
19
|
-
export declare const flexBasisRule: UtilityRule;
|
|
20
|
-
// Justify/Align self
|
|
21
|
-
export declare const justifySelfRule: UtilityRule;
|
|
22
|
-
export declare const alignSelfRule: UtilityRule;
|
|
23
|
-
// Container utility with responsive max-widths
|
|
24
|
-
export declare const containerRule: UtilityRule;
|
|
25
|
-
// Arbitrary properties
|
|
26
|
-
export declare const arbitraryPropertyRule: UtilityRule;
|
|
27
|
-
export declare const advancedRules: UtilityRule[];
|
package/dist/rules-effects.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// =============================================================================
|
|
2
|
-
// Backgrounds, Borders, Effects utilities
|
|
3
|
-
// =============================================================================
|
|
4
|
-
// Background utilities
|
|
5
|
-
export declare const backgroundAttachmentRule: UtilityRule;
|
|
6
|
-
export declare const backgroundClipRule: UtilityRule;
|
|
7
|
-
export declare const backgroundImageRule: UtilityRule;
|
|
8
|
-
export declare const backgroundOriginRule: UtilityRule;
|
|
9
|
-
export declare const backgroundPositionRule: UtilityRule;
|
|
10
|
-
export declare const backgroundRepeatRule: UtilityRule;
|
|
11
|
-
export declare const backgroundSizeRule: UtilityRule;
|
|
12
|
-
// Border utilities
|
|
13
|
-
export declare const borderStyleRule: UtilityRule;
|
|
14
|
-
export declare const outlineRule: UtilityRule;
|
|
15
|
-
// Effect utilities
|
|
16
|
-
export declare const boxShadowThemeRule: UtilityRule;
|
|
17
|
-
// Shadow color utilities (shadow-{color}, shadow-{color}/{opacity})
|
|
18
|
-
export declare const shadowColorRule: UtilityRule;
|
|
19
|
-
export declare const textShadowRule: UtilityRule;
|
|
20
|
-
export declare const opacityRule: UtilityRule;
|
|
21
|
-
export declare const mixBlendModeRule: UtilityRule;
|
|
22
|
-
export declare const backgroundBlendModeRule: UtilityRule;
|
|
23
|
-
// Mask utilities
|
|
24
|
-
export declare const maskRule: UtilityRule;
|
|
25
|
-
export declare const effectsRules: UtilityRule[];
|
package/dist/rules-forms.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const formInputRule: UtilityRule;
|
|
2
|
-
export declare const formTextareaRule: UtilityRule;
|
|
3
|
-
export declare const formSelectRule: UtilityRule;
|
|
4
|
-
export declare const formMultiselectRule: UtilityRule;
|
|
5
|
-
export declare const formCheckboxRule: UtilityRule;
|
|
6
|
-
export declare const formRadioRule: UtilityRule;
|
|
7
|
-
export declare const formsRules: UtilityRule[];
|
package/dist/rules-grid.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Grid utilities
|
|
2
|
-
export declare const gridTemplateColumnsRule: UtilityRule;
|
|
3
|
-
export declare const gridColumnRule: UtilityRule;
|
|
4
|
-
export declare const gridTemplateRowsRule: UtilityRule;
|
|
5
|
-
export declare const gridRowRule: UtilityRule;
|
|
6
|
-
export declare const gridAutoFlowRule: UtilityRule;
|
|
7
|
-
export declare const gridAutoColumnsRule: UtilityRule;
|
|
8
|
-
export declare const gridAutoRowsRule: UtilityRule;
|
|
9
|
-
export declare const gapRule: UtilityRule;
|
|
10
|
-
export declare const placeContentRule: UtilityRule;
|
|
11
|
-
export declare const placeItemsRule: UtilityRule;
|
|
12
|
-
export declare const placeSelfRule: UtilityRule;
|
|
13
|
-
export declare const gridRules: UtilityRule[];
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// Filters, Tables, Interactivity, SVG, Accessibility utilities
|
|
2
|
-
// Filter utilities
|
|
3
|
-
export declare const filterRule: UtilityRule;
|
|
4
|
-
export declare const backdropFilterRule: UtilityRule;
|
|
5
|
-
// Table utilities
|
|
6
|
-
export declare const borderCollapseRule: UtilityRule;
|
|
7
|
-
export declare const borderSpacingRule: UtilityRule;
|
|
8
|
-
export declare const tableLayoutRule: UtilityRule;
|
|
9
|
-
export declare const captionSideRule: UtilityRule;
|
|
10
|
-
// Interactivity utilities
|
|
11
|
-
export declare const accentColorRule: UtilityRule;
|
|
12
|
-
export declare const appearanceRule: UtilityRule;
|
|
13
|
-
export declare const caretColorRule: UtilityRule;
|
|
14
|
-
export declare const colorSchemeRule: UtilityRule;
|
|
15
|
-
export declare const fieldSizingRule: UtilityRule;
|
|
16
|
-
export declare const cursorRule: UtilityRule;
|
|
17
|
-
export declare const pointerEventsRule: UtilityRule;
|
|
18
|
-
export declare const resizeRule: UtilityRule;
|
|
19
|
-
export declare const scrollBehaviorRule: UtilityRule;
|
|
20
|
-
export declare const scrollMarginRule: UtilityRule;
|
|
21
|
-
export declare const scrollPaddingRule: UtilityRule;
|
|
22
|
-
export declare const scrollSnapRule: UtilityRule;
|
|
23
|
-
export declare const touchActionRule: UtilityRule;
|
|
24
|
-
export declare const userSelectRule: UtilityRule;
|
|
25
|
-
export declare const willChangeRule: UtilityRule;
|
|
26
|
-
// SVG utilities
|
|
27
|
-
export declare const fillRule: UtilityRule;
|
|
28
|
-
export declare const strokeRule: UtilityRule;
|
|
29
|
-
export declare const strokeWidthRule: UtilityRule;
|
|
30
|
-
// SVG stroke-dasharray
|
|
31
|
-
export declare const strokeDasharrayRule: UtilityRule;
|
|
32
|
-
// SVG stroke-dashoffset
|
|
33
|
-
export declare const strokeDashoffsetRule: UtilityRule;
|
|
34
|
-
// SVG stroke-linecap
|
|
35
|
-
export declare const strokeLinecapRule: UtilityRule;
|
|
36
|
-
// SVG stroke-linejoin
|
|
37
|
-
export declare const strokeLinejoinRule: UtilityRule;
|
|
38
|
-
// Accessibility
|
|
39
|
-
export declare const screenReaderRule: UtilityRule;
|
|
40
|
-
export declare const forcedColorAdjustRule: UtilityRule;
|
|
41
|
-
export declare const interactivityRules: UtilityRule[];
|
package/dist/rules-layout.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Layout utilities
|
|
2
|
-
export declare const aspectRatioRule: UtilityRule;
|
|
3
|
-
export declare const columnsRule: UtilityRule;
|
|
4
|
-
// Column fill
|
|
5
|
-
export declare const columnFillRule: UtilityRule;
|
|
6
|
-
// Column gap (different from grid gap)
|
|
7
|
-
export declare const columnGapRule: UtilityRule;
|
|
8
|
-
// Column rule (border between columns)
|
|
9
|
-
export declare const columnRuleRule: UtilityRule;
|
|
10
|
-
// Column span
|
|
11
|
-
export declare const columnSpanRule: UtilityRule;
|
|
12
|
-
export declare const breakRule: UtilityRule;
|
|
13
|
-
export declare const boxDecorationRule: UtilityRule;
|
|
14
|
-
export declare const boxSizingRule: UtilityRule;
|
|
15
|
-
export declare const floatRule: UtilityRule;
|
|
16
|
-
export declare const clearRule: UtilityRule;
|
|
17
|
-
export declare const isolationRule: UtilityRule;
|
|
18
|
-
export declare const objectFitRule: UtilityRule;
|
|
19
|
-
export declare const objectPositionRule: UtilityRule;
|
|
20
|
-
export declare const overflowRule: UtilityRule;
|
|
21
|
-
export declare const overscrollRule: UtilityRule;
|
|
22
|
-
export declare const positionRule: UtilityRule;
|
|
23
|
-
export declare const insetRule: UtilityRule;
|
|
24
|
-
export declare const visibilityRule: UtilityRule;
|
|
25
|
-
export declare const zIndexRule: UtilityRule;
|
|
26
|
-
export declare const layoutRules: UtilityRule[];
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// Transform, Transition, Animation utilities
|
|
2
|
-
export declare const transformRule: UtilityRule;
|
|
3
|
-
export declare const scaleRule: UtilityRule;
|
|
4
|
-
export declare const rotateRule: UtilityRule;
|
|
5
|
-
export declare const translateRule: UtilityRule;
|
|
6
|
-
export declare const skewRule: UtilityRule;
|
|
7
|
-
export declare const transformOriginRule: UtilityRule;
|
|
8
|
-
export declare const perspectiveRule: UtilityRule;
|
|
9
|
-
export declare const perspectiveOriginRule: UtilityRule;
|
|
10
|
-
export declare const backfaceVisibilityRule: UtilityRule;
|
|
11
|
-
export declare const transformStyleRule: UtilityRule;
|
|
12
|
-
// Transition utilities
|
|
13
|
-
export declare const transitionPropertyRule: UtilityRule;
|
|
14
|
-
export declare const transitionDurationRule: UtilityRule;
|
|
15
|
-
export declare const transitionTimingRule: UtilityRule;
|
|
16
|
-
export declare const transitionDelayRule: UtilityRule;
|
|
17
|
-
export declare const transitionBehaviorRule: UtilityRule;
|
|
18
|
-
export declare const animationRule: UtilityRule;
|
|
19
|
-
// Animation play state
|
|
20
|
-
export declare const animationPlayStateRule: UtilityRule;
|
|
21
|
-
// Animation direction
|
|
22
|
-
export declare const animationDirectionRule: UtilityRule;
|
|
23
|
-
// Animation fill mode
|
|
24
|
-
export declare const animationFillModeRule: UtilityRule;
|
|
25
|
-
// Animation iteration count
|
|
26
|
-
export declare const animationIterationRule: UtilityRule;
|
|
27
|
-
// Animation duration
|
|
28
|
-
export declare const animationDurationRule: UtilityRule;
|
|
29
|
-
// Animation delay
|
|
30
|
-
export declare const animationDelayRule: UtilityRule;
|
|
31
|
-
// Animation timing function
|
|
32
|
-
export declare const animationTimingRule: UtilityRule;
|
|
33
|
-
export declare const transformsRules: UtilityRule[];
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// Typography utilities
|
|
2
|
-
export declare const fontFamilyRule: UtilityRule;
|
|
3
|
-
export declare const fontSmoothingRule: UtilityRule;
|
|
4
|
-
export declare const fontStyleRule: UtilityRule;
|
|
5
|
-
export declare const fontStretchRule: UtilityRule;
|
|
6
|
-
export declare const fontVariantNumericRule: UtilityRule;
|
|
7
|
-
export declare const letterSpacingRule: UtilityRule;
|
|
8
|
-
export declare const lineClampRule: UtilityRule;
|
|
9
|
-
export declare const listStyleImageRule: UtilityRule;
|
|
10
|
-
export declare const listStylePositionRule: UtilityRule;
|
|
11
|
-
export declare const listStyleTypeRule: UtilityRule;
|
|
12
|
-
export declare const textDecorationRule: UtilityRule;
|
|
13
|
-
export declare const underlineOffsetRule: UtilityRule;
|
|
14
|
-
export declare const textTransformRule: UtilityRule;
|
|
15
|
-
export declare const textOverflowRule: UtilityRule;
|
|
16
|
-
export declare const textWrapRule: UtilityRule;
|
|
17
|
-
export declare const textIndentRule: UtilityRule;
|
|
18
|
-
export declare const verticalAlignRule: UtilityRule;
|
|
19
|
-
export declare const whiteSpaceRule: UtilityRule;
|
|
20
|
-
export declare const wordBreakRule: UtilityRule;
|
|
21
|
-
export declare const overflowWrapRule: UtilityRule;
|
|
22
|
-
export declare const hyphensRule: UtilityRule;
|
|
23
|
-
export declare const contentRule: UtilityRule;
|
|
24
|
-
export declare const lineHeightRule: UtilityRule;
|
|
25
|
-
// Writing mode
|
|
26
|
-
export declare const writingModeRule: UtilityRule;
|
|
27
|
-
// Text orientation
|
|
28
|
-
export declare const textOrientationRule: UtilityRule;
|
|
29
|
-
// Direction (ltr/rtl)
|
|
30
|
-
export declare const directionRule: UtilityRule;
|
|
31
|
-
// Text emphasis
|
|
32
|
-
export declare const textEmphasisRule: UtilityRule;
|
|
33
|
-
// Text emphasis color
|
|
34
|
-
export declare const textEmphasisColorRule: UtilityRule;
|
|
35
|
-
// Word spacing
|
|
36
|
-
export declare const wordSpacingRule: UtilityRule;
|
|
37
|
-
// Font variant caps
|
|
38
|
-
export declare const fontVariantCapsRule: UtilityRule;
|
|
39
|
-
// Font variant ligatures
|
|
40
|
-
export declare const fontVariantLigaturesRule: UtilityRule;
|
|
41
|
-
export declare const typographyRules: UtilityRule[];
|
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
private compiledClasses: any;
|
|
25
|
-
private classNameMap: any;
|
|
26
|
-
private options: CompileClassOptions;
|
|
27
|
-
constructor(options?: CompileClassOptions);
|
|
28
|
-
processFile(content: string): { content: string, hasChanges: boolean };
|
|
29
|
-
getCompiledClasses(): Map<string, { className: string, utilities: string[] }>;
|
|
30
|
-
generateCSS(config: CrosswindConfig, generator: any): string;
|
|
31
|
-
reset(): void;
|
|
32
|
-
getStats(): {
|
|
33
|
-
totalGroups: number
|
|
34
|
-
totalUtilities: number
|
|
35
|
-
averageUtilitiesPerGroup: number
|
|
36
|
-
};
|
|
37
|
-
}
|