@codeleap/styles 7.2.3-next.1 → 7.3.0-next.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.
@@ -1 +1 @@
1
- {"version":3,"file":"defaultVariants.d.ts","sourceRoot":"","sources":["../../src/variants/defaultVariants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4HlB,CAAA;AAEV,2EAA2E;AAC3E,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,OAAO,eAAe,EAAE,IAAI,CAAC,CAAA"}
1
+ {"version":3,"file":"defaultVariants.d.ts","sourceRoot":"","sources":["../../src/variants/defaultVariants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgKlB,CAAA;AAEV,2EAA2E;AAC3E,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,OAAO,eAAe,EAAE,IAAI,CAAC,CAAA"}
@@ -11,125 +11,162 @@
11
11
  * - `'visibility:hidden'` / `'display:none'` — use quoted keys in style arrays.
12
12
  */
13
13
  export const defaultVariants = {
14
+ // Sets display: block
14
15
  block: {
15
16
  display: 'block',
16
17
  },
18
+ // Sets flex: 1; fills available space in a flex parent. Does not create a flex container — pair with `row` or `column`.
17
19
  grow: {
18
20
  flex: 1,
19
21
  },
22
+ // position: absolute
20
23
  absolute: {
21
24
  position: 'absolute',
22
25
  },
26
+ // position: relative
23
27
  relative: {
24
28
  position: 'relative',
25
29
  },
30
+ // position: fixed; element is removed from flow and positioned relative to the viewport
26
31
  fixed: {
27
32
  position: 'fixed',
28
33
  },
34
+ // position: sticky; element scrolls normally until it reaches its offset, then sticks
29
35
  sticky: {
30
36
  position: 'sticky',
31
37
  },
38
+ // Pins left and right edges to 0; use with `absolute` or `fixed`
32
39
  insetX: {
33
40
  left: 0,
34
41
  right: 0,
35
42
  },
43
+ // Pins top and bottom edges to 0; use with `absolute` or `fixed`
36
44
  insetY: {
37
45
  top: 0,
38
46
  bottom: 0,
39
47
  },
48
+ // 100% width and height
40
49
  full: {
41
50
  width: '100%',
42
51
  height: '100%',
43
52
  },
53
+ // Prevents text and flex-item wrapping (white-space: nowrap)
44
54
  noWrap: {
45
55
  whiteSpace: 'nowrap',
46
56
  },
57
+ // 100% width
47
58
  fullWidth: {
48
59
  width: '100%',
49
60
  },
61
+ // 100% height
50
62
  fullHeight: {
51
63
  height: '100%',
52
64
  },
65
+ // Pins all four edges to 0; use with `absolute` or `fixed` to fill a positioned ancestor
53
66
  inset: {
54
67
  top: 0,
55
68
  bottom: 0,
56
69
  left: 0,
57
70
  right: 0,
58
71
  },
72
+ // Flex row with vertically centered children (alignItems: center)
59
73
  centerRow: {
60
74
  display: 'flex',
61
75
  flexDirection: 'row',
62
76
  alignItems: 'center',
63
77
  },
78
+ // Flex row container
64
79
  row: {
65
80
  display: 'flex',
66
81
  flexDirection: 'row',
67
82
  },
83
+ // Flex column container
68
84
  column: {
69
85
  display: 'flex',
70
86
  flexDirection: 'column',
71
87
  },
88
+ // Centers children on both axes; requires the element to already be a flex container
72
89
  centerChildren: {
73
90
  alignItems: 'center',
74
91
  justifyContent: 'center',
75
92
  },
93
+ // alignItems: flex-start
76
94
  alignStart: {
77
95
  alignItems: 'flex-start',
78
96
  },
97
+ // alignItems: flex-end
79
98
  alignEnd: {
80
99
  alignItems: 'flex-end',
81
100
  },
101
+ // alignItems: center
82
102
  alignCenter: {
83
103
  alignItems: 'center',
84
104
  },
105
+ // alignItems: stretch
85
106
  alignStretch: {
86
107
  alignItems: 'stretch',
87
108
  },
109
+ // alignSelf: center — centers this element within its flex parent's cross axis
88
110
  alignSelfCenter: {
89
111
  alignSelf: 'center',
90
112
  },
113
+ // alignSelf: flex-start
91
114
  alignSelfStart: {
92
115
  alignSelf: 'flex-start',
93
116
  },
117
+ // alignSelf: stretch
94
118
  alignSelfStretch: {
95
119
  alignSelf: 'stretch',
96
120
  },
121
+ // alignSelf: flex-end
97
122
  alignSelfEnd: {
98
123
  alignSelf: 'flex-end',
99
124
  },
125
+ // justifyContent: flex-start
100
126
  justifyStart: {
101
127
  justifyContent: 'flex-start',
102
128
  },
129
+ // justifyContent: flex-end
103
130
  justifyEnd: {
104
131
  justifyContent: 'flex-end',
105
132
  },
133
+ // justifyContent: center
106
134
  justifyCenter: {
107
135
  justifyContent: 'center',
108
136
  },
137
+ // justifyContent: space-between
109
138
  justifySpaceBetween: {
110
139
  justifyContent: 'space-between',
111
140
  },
141
+ // justifyContent: space-around
112
142
  justifySpaceAround: {
113
143
  justifyContent: 'space-around',
114
144
  },
145
+ // textAlign: right
115
146
  textRight: {
116
147
  textAlign: 'right',
117
148
  },
149
+ // textAlign: left
118
150
  textLeft: {
119
151
  textAlign: 'left',
120
152
  },
153
+ // textAlign: center
121
154
  textCenter: {
122
155
  textAlign: 'center',
123
156
  },
157
+ // Allows flex items to wrap onto multiple lines
124
158
  flexWrap: {
125
159
  flexWrap: 'wrap',
126
160
  },
161
+ // Hides the element while preserving its layout space
127
162
  'visibility:hidden': {
128
163
  visibility: 'hidden'
129
164
  },
165
+ // Restores visibility of a hidden element
130
166
  'visibility:visible': {
131
167
  visibility: 'visible'
132
168
  },
169
+ // Removes the element from layout entirely (no space preserved)
133
170
  'display:none': {
134
171
  display: 'none'
135
172
  }
@@ -1 +1 @@
1
- {"version":3,"file":"defaultVariants.js","sourceRoot":"","sources":["../../src/variants/defaultVariants.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,KAAK,EAAE;QACL,OAAO,EAAE,OAAO;KACjB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;KACR;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,UAAU;KACrB;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,UAAU;KACrB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;KAClB;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,QAAQ;KACnB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;KACT;IACD,MAAM,EAAE;QACN,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,CAAC;KACV;IAED,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;KACf;IACD,MAAM,EAAE;QACN,UAAU,EAAE,QAAQ;KACrB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,MAAM;KACd;IACD,UAAU,EAAE;QACV,MAAM,EAAE,MAAM;KACf;IACD,KAAK,EAAE;QACL,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;KACT;IACD,SAAS,EAAE;QACT,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;KACrB;IACD,GAAG,EAAE;QACH,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,KAAK;KACrB;IACD,MAAM,EAAE;QACN,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;KACxB;IACD,cAAc,EAAE;QACd,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,UAAU,EAAE;QACV,UAAU,EAAE,YAAY;KACzB;IACD,QAAQ,EAAE;QACR,UAAU,EAAE,UAAU;KACvB;IACD,WAAW,EAAE;QACX,UAAU,EAAE,QAAQ;KACrB;IACD,YAAY,EAAE;QACZ,UAAU,EAAE,SAAS;KACtB;IACD,eAAe,EAAE;QACf,SAAS,EAAE,QAAQ;KACpB;IACD,cAAc,EAAE;QACd,SAAS,EAAE,YAAY;KACxB;IACD,gBAAgB,EAAE;QAChB,SAAS,EAAE,SAAS;KACrB;IACD,YAAY,EAAE;QACZ,SAAS,EAAE,UAAU;KACtB;IACD,YAAY,EAAE;QACZ,cAAc,EAAE,YAAY;KAC7B;IACD,UAAU,EAAE;QACV,cAAc,EAAE,UAAU;KAC3B;IACD,aAAa,EAAE;QACb,cAAc,EAAE,QAAQ;KACzB;IACD,mBAAmB,EAAE;QACnB,cAAc,EAAE,eAAe;KAChC;IACD,kBAAkB,EAAE;QAClB,cAAc,EAAE,cAAc;KAC/B;IACD,SAAS,EAAE;QACT,SAAS,EAAE,OAAO;KACnB;IACD,QAAQ,EAAE;QACR,SAAS,EAAE,MAAM;KAClB;IACD,UAAU,EAAE;QACV,SAAS,EAAE,QAAQ;KACpB;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM;KACjB;IACD,mBAAmB,EAAE;QACnB,UAAU,EAAE,QAAQ;KACrB;IACD,oBAAoB,EAAE;QACpB,UAAU,EAAE,SAAS;KACtB;IACD,cAAc,EAAE;QACd,OAAO,EAAC,MAAM;KACf;CACO,CAAA"}
1
+ {"version":3,"file":"defaultVariants.js","sourceRoot":"","sources":["../../src/variants/defaultVariants.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,sBAAsB;IACtB,KAAK,EAAE;QACL,OAAO,EAAE,OAAO;KACjB;IACD,wHAAwH;IACxH,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;KACR;IACD,qBAAqB;IACrB,QAAQ,EAAE;QACR,QAAQ,EAAE,UAAU;KACrB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IACrB,WAAW,EAAE;QACX,UAAU,EAAE,QAAQ;KACrB;IACD,sBAAsB;IACtB,YAAY,EAAE;QACZ,UAAU,EAAE,SAAS;KACtB;IACD,+EAA+E;IAC/E,eAAe,EAAE;QACf,SAAS,EAAE,QAAQ;KACpB;IACD,wBAAwB;IACxB,cAAc,EAAE;QACd,SAAS,EAAE,YAAY;KACxB;IACD,qBAAqB;IACrB,gBAAgB,EAAE;QAChB,SAAS,EAAE,SAAS;KACrB;IACD,sBAAsB;IACtB,YAAY,EAAE;QACZ,SAAS,EAAE,UAAU;KACtB;IACD,6BAA6B;IAC7B,YAAY,EAAE;QACZ,cAAc,EAAE,YAAY;KAC7B;IACD,2BAA2B;IAC3B,UAAU,EAAE;QACV,cAAc,EAAE,UAAU;KAC3B;IACD,yBAAyB;IACzB,aAAa,EAAE;QACb,cAAc,EAAE,QAAQ;KACzB;IACD,gCAAgC;IAChC,mBAAmB,EAAE;QACnB,cAAc,EAAE,eAAe;KAChC;IACD,+BAA+B;IAC/B,kBAAkB,EAAE;QAClB,cAAc,EAAE,cAAc;KAC/B;IACD,mBAAmB;IACnB,SAAS,EAAE;QACT,SAAS,EAAE,OAAO;KACnB;IACD,kBAAkB;IAClB,QAAQ,EAAE;QACR,SAAS,EAAE,MAAM;KAClB;IACD,oBAAoB;IACpB,UAAU,EAAE;QACV,SAAS,EAAE,QAAQ;KACpB;IACD,gDAAgD;IAChD,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM;KACjB;IACD,sDAAsD;IACtD,mBAAmB,EAAE;QACnB,UAAU,EAAE,QAAQ;KACrB;IACD,0CAA0C;IAC1C,oBAAoB,EAAE;QACpB,UAAU,EAAE,SAAS;KACtB;IACD,gEAAgE;IAChE,cAAc,EAAE;QACd,OAAO,EAAC,MAAM;KACf;CACO,CAAA"}
@@ -39,5 +39,11 @@ export declare const createDynamicVariants: () => Record<string, any>;
39
39
  * Created once at module load; re-creation would lose the closed-over variant map.
40
40
  */
41
41
  export declare const dynamicVariants: Record<string, any>;
42
+ /**
43
+ * Human-readable descriptions for each dynamic variant prefix.
44
+ * Used by tooling (e.g. `codeleap list-variants`) to surface documentation
45
+ * for coding agents without requiring runtime execution of the variant registry.
46
+ */
47
+ export declare const dynamicVariantDescriptions: Record<string, string>;
42
48
  export {};
43
49
  //# sourceMappingURL=dynamicVariants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dynamicVariants.d.ts","sourceRoot":"","sources":["../../src/variants/dynamicVariants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAY,MAAM,EAAU,MAAM,UAAU,CAAA;AAG3E,2FAA2F;AAC3F,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAA;AAEjD,+EAA+E;AAC/E,eAAO,MAAM,aAAa,uCAAwC,CAAA;AAElE,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,4BAA6B,CAAA;AAC1D,kFAAkF;AAClF,eAAO,MAAM,gBAAgB,4BAA6B,CAAA;AAC1D,wEAAwE;AACxE,eAAO,MAAM,eAAe,iDAA0D,CAAA;AACtF,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,uCAAwC,CAAA;AAErE,qEAAqE;AACrE,eAAO,MAAM,WAAW,yDAMd,CAAA;AAEV,uFAAuF;AACvF,MAAM,MAAM,KAAK,GACb,MAAM,GACN,EAAE,CAAA;AAEN,KAAK,gBAAgB,CACnB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,MAAM,IACJ;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,GAAG,KAAK;CAAE,CAAC,MAAM,CAAC,CAAC,CAAA;AAKhE,KAAK,KAAK,GAAG,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;AAE9C,KAAK,KAAK,GAAG,MAAM,MAAM,CAAA;AAEzB;;;;;GAKG;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AM,MAAM,aAAa,EAAE,GAC3B,SAAS,KAAK,EAAE,GAChB,QAAQ,KAAK,EAAE,CAAA;AAEjB;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,2BA8EjC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,qBAA0B,CAAA;AAEtD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkC7D,CAAA"}
@@ -86,4 +86,44 @@ export const createDynamicVariants = () => {
86
86
  * Created once at module load; re-creation would lose the closed-over variant map.
87
87
  */
88
88
  export const dynamicVariants = createDynamicVariants();
89
+ /**
90
+ * Human-readable descriptions for each dynamic variant prefix.
91
+ * Used by tooling (e.g. `codeleap list-variants`) to surface documentation
92
+ * for coding agents without requiring runtime execution of the variant registry.
93
+ */
94
+ export const dynamicVariantDescriptions = {
95
+ // Color
96
+ color: 'Sets the text/icon color from the theme color palette (e.g. color:primary)',
97
+ backgroundColor: 'Sets backgroundColor from the theme color palette (e.g. backgroundColor:primary)',
98
+ bg: 'Shorthand for backgroundColor from the theme color palette (e.g. bg:primary)',
99
+ // Sizing
100
+ size: 'Sets equal width and height from the theme size scale (e.g. size:size24)',
101
+ // Border radius
102
+ borderRadius: 'Sets borderRadius on all corners from the theme radius scale (e.g. borderRadius:radius8)',
103
+ br: 'Shorthand for borderRadius from the theme radius scale (e.g. br:radius8)',
104
+ borderTopRadius: 'Sets border radius on both top corners',
105
+ borderBottomRadius: 'Sets border radius on both bottom corners',
106
+ borderLeftRadius: 'Sets border radius on both left corners',
107
+ borderRightRadius: 'Sets border radius on both right corners',
108
+ borderTopLeftRadius: 'Sets border-top-left-radius from the theme radius scale',
109
+ borderTopRightRadius: 'Sets border-top-right-radius from the theme radius scale',
110
+ borderBottomLeftRadius: 'Sets border-bottom-left-radius from the theme radius scale',
111
+ borderBottomRightRadius: 'Sets border-bottom-right-radius from the theme radius scale',
112
+ // Border color
113
+ borderColor: 'Sets border color on all sides from the theme color palette',
114
+ borderTopColor: 'Sets borderTopColor from the theme color palette',
115
+ borderBottomColor: 'Sets borderBottomColor from the theme color palette',
116
+ borderLeftColor: 'Sets borderLeftColor from the theme color palette',
117
+ borderRightColor: 'Sets borderRightColor from the theme color palette',
118
+ // Border width
119
+ borderWidth: 'Sets border width on all sides',
120
+ borderTopWidth: 'Sets borderTopWidth',
121
+ borderBottomWidth: 'Sets borderBottomWidth',
122
+ borderLeftWidth: 'Sets borderLeftWidth',
123
+ borderRightWidth: 'Sets borderRightWidth',
124
+ // Misc
125
+ cursor: 'Sets the CSS cursor property (e.g. cursor:pointer, cursor:not-allowed)',
126
+ effect: 'Applies a named shadow or blur effect from the theme effects scale',
127
+ scale: 'Applies a CSS transform scale (e.g. scale:0.95)',
128
+ };
89
129
  //# sourceMappingURL=dynamicVariants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dynamicVariants.js","sourceRoot":"","sources":["../../src/variants/dynamicVariants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAKrC,+EAA+E;AAC/E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAU,CAAA;AAElE,oFAAoF;AACpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAA;AAC1D,kFAAkF;AAClF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAU,CAAA;AAC1D,wEAAwE;AACxE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,EAAE,CAAU,CAAA;AACtF,0DAA0D;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAA;AAErE,qEAAqE;AACrE,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,aAAa;IACb,MAAM;IACN,SAA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AAM,eAAe,GAAG,qBAAqB,EAAE,CAAA;AAEtD;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAA2B;IAChE,QAAQ;IACR,KAAK,EAAE,4EAA4E;IACnF,eAAe,EAAE,kFAAkF;IACnG,EAAE,EAAE,8EAA8E;IAClF,SAAS;IACT,IAAI,EAAE,0EAA0E;IAChF,gBAAgB;IAChB,YAAY,EAAE,0FAA0F;IACxG,EAAE,EAAE,0EAA0E;IAC9E,eAAe,EAAE,wCAAwC;IACzD,kBAAkB,EAAE,2CAA2C;IAC/D,gBAAgB,EAAE,yCAAyC;IAC3D,iBAAiB,EAAE,0CAA0C;IAC7D,mBAAmB,EAAE,yDAAyD;IAC9E,oBAAoB,EAAE,0DAA0D;IAChF,sBAAsB,EAAE,4DAA4D;IACpF,uBAAuB,EAAE,6DAA6D;IACtF,eAAe;IACf,WAAW,EAAE,6DAA6D;IAC1E,cAAc,EAAE,kDAAkD;IAClE,iBAAiB,EAAE,qDAAqD;IACxE,eAAe,EAAE,mDAAmD;IACpE,gBAAgB,EAAE,oDAAoD;IACtE,eAAe;IACf,WAAW,EAAE,gCAAgC;IAC7C,cAAc,EAAE,qBAAqB;IACrC,iBAAiB,EAAE,wBAAwB;IAC3C,eAAe,EAAE,sBAAsB;IACvC,gBAAgB,EAAE,uBAAuB;IACzC,OAAO;IACP,MAAM,EAAE,wEAAwE;IAChF,MAAM,EAAE,oEAAoE;IAC5E,KAAK,EAAE,iDAAiD;CACzD,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeleap/styles",
3
- "version": "7.2.3-next.1",
3
+ "version": "7.3.0-next.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -23,7 +23,7 @@
23
23
  "directory": "packages/styles"
24
24
  },
25
25
  "devDependencies": {
26
- "@codeleap/config": "7.2.3-next.1",
26
+ "@codeleap/config": "7.3.0-next.0",
27
27
  "ts-node-dev": "^1.1.8"
28
28
  },
29
29
  "scripts": {
@@ -13,126 +13,162 @@ import { ICSS } from '../types'
13
13
  * - `'visibility:hidden'` / `'display:none'` — use quoted keys in style arrays.
14
14
  */
15
15
  export const defaultVariants = {
16
+ // Sets display: block
16
17
  block: {
17
18
  display: 'block',
18
19
  },
20
+ // Sets flex: 1; fills available space in a flex parent. Does not create a flex container — pair with `row` or `column`.
19
21
  grow: {
20
22
  flex: 1,
21
23
  },
24
+ // position: absolute
22
25
  absolute: {
23
26
  position: 'absolute',
24
27
  },
28
+ // position: relative
25
29
  relative: {
26
30
  position: 'relative',
27
31
  },
32
+ // position: fixed; element is removed from flow and positioned relative to the viewport
28
33
  fixed: {
29
34
  position: 'fixed',
30
35
  },
36
+ // position: sticky; element scrolls normally until it reaches its offset, then sticks
31
37
  sticky: {
32
38
  position: 'sticky',
33
39
  },
40
+ // Pins left and right edges to 0; use with `absolute` or `fixed`
34
41
  insetX: {
35
42
  left: 0,
36
43
  right: 0,
37
44
  },
45
+ // Pins top and bottom edges to 0; use with `absolute` or `fixed`
38
46
  insetY: {
39
47
  top: 0,
40
48
  bottom: 0,
41
49
  },
42
-
50
+ // 100% width and height
43
51
  full: {
44
52
  width: '100%',
45
53
  height: '100%',
46
54
  },
55
+ // Prevents text and flex-item wrapping (white-space: nowrap)
47
56
  noWrap: {
48
57
  whiteSpace: 'nowrap',
49
58
  },
59
+ // 100% width
50
60
  fullWidth: {
51
61
  width: '100%',
52
62
  },
63
+ // 100% height
53
64
  fullHeight: {
54
65
  height: '100%',
55
66
  },
67
+ // Pins all four edges to 0; use with `absolute` or `fixed` to fill a positioned ancestor
56
68
  inset: {
57
69
  top: 0,
58
70
  bottom: 0,
59
71
  left: 0,
60
72
  right: 0,
61
73
  },
74
+ // Flex row with vertically centered children (alignItems: center)
62
75
  centerRow: {
63
76
  display: 'flex',
64
77
  flexDirection: 'row',
65
78
  alignItems: 'center',
66
79
  },
80
+ // Flex row container
67
81
  row: {
68
82
  display: 'flex',
69
83
  flexDirection: 'row',
70
84
  },
85
+ // Flex column container
71
86
  column: {
72
87
  display: 'flex',
73
88
  flexDirection: 'column',
74
89
  },
90
+ // Centers children on both axes; requires the element to already be a flex container
75
91
  centerChildren: {
76
92
  alignItems: 'center',
77
93
  justifyContent: 'center',
78
94
  },
95
+ // alignItems: flex-start
79
96
  alignStart: {
80
97
  alignItems: 'flex-start',
81
98
  },
99
+ // alignItems: flex-end
82
100
  alignEnd: {
83
101
  alignItems: 'flex-end',
84
102
  },
103
+ // alignItems: center
85
104
  alignCenter: {
86
105
  alignItems: 'center',
87
106
  },
107
+ // alignItems: stretch
88
108
  alignStretch: {
89
109
  alignItems: 'stretch',
90
110
  },
111
+ // alignSelf: center — centers this element within its flex parent's cross axis
91
112
  alignSelfCenter: {
92
113
  alignSelf: 'center',
93
114
  },
115
+ // alignSelf: flex-start
94
116
  alignSelfStart: {
95
117
  alignSelf: 'flex-start',
96
118
  },
119
+ // alignSelf: stretch
97
120
  alignSelfStretch: {
98
121
  alignSelf: 'stretch',
99
122
  },
123
+ // alignSelf: flex-end
100
124
  alignSelfEnd: {
101
125
  alignSelf: 'flex-end',
102
126
  },
127
+ // justifyContent: flex-start
103
128
  justifyStart: {
104
129
  justifyContent: 'flex-start',
105
130
  },
131
+ // justifyContent: flex-end
106
132
  justifyEnd: {
107
133
  justifyContent: 'flex-end',
108
134
  },
135
+ // justifyContent: center
109
136
  justifyCenter: {
110
137
  justifyContent: 'center',
111
138
  },
139
+ // justifyContent: space-between
112
140
  justifySpaceBetween: {
113
141
  justifyContent: 'space-between',
114
142
  },
143
+ // justifyContent: space-around
115
144
  justifySpaceAround: {
116
145
  justifyContent: 'space-around',
117
146
  },
147
+ // textAlign: right
118
148
  textRight: {
119
149
  textAlign: 'right',
120
150
  },
151
+ // textAlign: left
121
152
  textLeft: {
122
153
  textAlign: 'left',
123
154
  },
155
+ // textAlign: center
124
156
  textCenter: {
125
157
  textAlign: 'center',
126
158
  },
159
+ // Allows flex items to wrap onto multiple lines
127
160
  flexWrap: {
128
161
  flexWrap: 'wrap',
129
162
  },
163
+ // Hides the element while preserving its layout space
130
164
  'visibility:hidden': {
131
165
  visibility: 'hidden'
132
166
  },
167
+ // Restores visibility of a hidden element
133
168
  'visibility:visible': {
134
169
  visibility: 'visible'
135
170
  },
171
+ // Removes the element from layout entirely (no space preserved)
136
172
  'display:none': {
137
173
  display:'none'
138
174
  }
@@ -153,3 +153,44 @@ export const createDynamicVariants = () => {
153
153
  * Created once at module load; re-creation would lose the closed-over variant map.
154
154
  */
155
155
  export const dynamicVariants = createDynamicVariants()
156
+
157
+ /**
158
+ * Human-readable descriptions for each dynamic variant prefix.
159
+ * Used by tooling (e.g. `codeleap list-variants`) to surface documentation
160
+ * for coding agents without requiring runtime execution of the variant registry.
161
+ */
162
+ export const dynamicVariantDescriptions: Record<string, string> = {
163
+ // Color
164
+ color: 'Sets the text/icon color from the theme color palette (e.g. color:primary)',
165
+ backgroundColor: 'Sets backgroundColor from the theme color palette (e.g. backgroundColor:primary)',
166
+ bg: 'Shorthand for backgroundColor from the theme color palette (e.g. bg:primary)',
167
+ // Sizing
168
+ size: 'Sets equal width and height from the theme size scale (e.g. size:size24)',
169
+ // Border radius
170
+ borderRadius: 'Sets borderRadius on all corners from the theme radius scale (e.g. borderRadius:radius8)',
171
+ br: 'Shorthand for borderRadius from the theme radius scale (e.g. br:radius8)',
172
+ borderTopRadius: 'Sets border radius on both top corners',
173
+ borderBottomRadius: 'Sets border radius on both bottom corners',
174
+ borderLeftRadius: 'Sets border radius on both left corners',
175
+ borderRightRadius: 'Sets border radius on both right corners',
176
+ borderTopLeftRadius: 'Sets border-top-left-radius from the theme radius scale',
177
+ borderTopRightRadius: 'Sets border-top-right-radius from the theme radius scale',
178
+ borderBottomLeftRadius: 'Sets border-bottom-left-radius from the theme radius scale',
179
+ borderBottomRightRadius: 'Sets border-bottom-right-radius from the theme radius scale',
180
+ // Border color
181
+ borderColor: 'Sets border color on all sides from the theme color palette',
182
+ borderTopColor: 'Sets borderTopColor from the theme color palette',
183
+ borderBottomColor: 'Sets borderBottomColor from the theme color palette',
184
+ borderLeftColor: 'Sets borderLeftColor from the theme color palette',
185
+ borderRightColor: 'Sets borderRightColor from the theme color palette',
186
+ // Border width
187
+ borderWidth: 'Sets border width on all sides',
188
+ borderTopWidth: 'Sets borderTopWidth',
189
+ borderBottomWidth: 'Sets borderBottomWidth',
190
+ borderLeftWidth: 'Sets borderLeftWidth',
191
+ borderRightWidth: 'Sets borderRightWidth',
192
+ // Misc
193
+ cursor: 'Sets the CSS cursor property (e.g. cursor:pointer, cursor:not-allowed)',
194
+ effect: 'Applies a named shadow or blur effect from the theme effects scale',
195
+ scale: 'Applies a CSS transform scale (e.g. scale:0.95)',
196
+ }
@@ -1,70 +1,262 @@
1
1
  {
2
2
  "static": [
3
- "block",
4
- "grow",
5
- "absolute",
6
- "relative",
7
- "fixed",
8
- "sticky",
9
- "insetX",
10
- "insetY",
11
- "full",
12
- "noWrap",
13
- "fullWidth",
14
- "fullHeight",
15
- "inset",
16
- "centerRow",
17
- "row",
18
- "column",
19
- "centerChildren",
20
- "alignStart",
21
- "alignEnd",
22
- "alignCenter",
23
- "alignStretch",
24
- "alignSelfCenter",
25
- "alignSelfStart",
26
- "alignSelfStretch",
27
- "alignSelfEnd",
28
- "justifyStart",
29
- "justifyEnd",
30
- "justifyCenter",
31
- "justifySpaceBetween",
32
- "justifySpaceAround",
33
- "textRight",
34
- "textLeft",
35
- "textCenter",
36
- "flexWrap",
37
- "visibility:hidden",
38
- "visibility:visible",
39
- "display:none"
3
+ {
4
+ "name": "block",
5
+ "description": "Sets display: block"
6
+ },
7
+ {
8
+ "name": "grow",
9
+ "description": "Sets flex: 1; fills available space in a flex parent. Does not create a flex container — pair with `row` or `column`."
10
+ },
11
+ {
12
+ "name": "absolute",
13
+ "description": "position: absolute"
14
+ },
15
+ {
16
+ "name": "relative",
17
+ "description": "position: relative"
18
+ },
19
+ {
20
+ "name": "fixed",
21
+ "description": "position: fixed; element is removed from flow and positioned relative to the viewport"
22
+ },
23
+ {
24
+ "name": "sticky",
25
+ "description": "position: sticky; element scrolls normally until it reaches its offset, then sticks"
26
+ },
27
+ {
28
+ "name": "insetX",
29
+ "description": "Pins left and right edges to 0; use with `absolute` or `fixed`"
30
+ },
31
+ {
32
+ "name": "insetY",
33
+ "description": "Pins top and bottom edges to 0; use with `absolute` or `fixed`"
34
+ },
35
+ {
36
+ "name": "full",
37
+ "description": "100% width and height"
38
+ },
39
+ {
40
+ "name": "noWrap",
41
+ "description": "Prevents text and flex-item wrapping (white-space: nowrap)"
42
+ },
43
+ {
44
+ "name": "fullWidth",
45
+ "description": "100% width"
46
+ },
47
+ {
48
+ "name": "fullHeight",
49
+ "description": "100% height"
50
+ },
51
+ {
52
+ "name": "inset",
53
+ "description": "Pins all four edges to 0; use with `absolute` or `fixed` to fill a positioned ancestor"
54
+ },
55
+ {
56
+ "name": "centerRow",
57
+ "description": "Flex row with vertically centered children (alignItems: center)"
58
+ },
59
+ {
60
+ "name": "row",
61
+ "description": "Flex row container"
62
+ },
63
+ {
64
+ "name": "column",
65
+ "description": "Flex column container"
66
+ },
67
+ {
68
+ "name": "centerChildren",
69
+ "description": "Centers children on both axes; requires the element to already be a flex container"
70
+ },
71
+ {
72
+ "name": "alignStart",
73
+ "description": "alignItems: flex-start"
74
+ },
75
+ {
76
+ "name": "alignEnd",
77
+ "description": "alignItems: flex-end"
78
+ },
79
+ {
80
+ "name": "alignCenter",
81
+ "description": "alignItems: center"
82
+ },
83
+ {
84
+ "name": "alignStretch",
85
+ "description": "alignItems: stretch"
86
+ },
87
+ {
88
+ "name": "alignSelfCenter",
89
+ "description": "alignSelf: center — centers this element within its flex parent's cross axis"
90
+ },
91
+ {
92
+ "name": "alignSelfStart",
93
+ "description": "alignSelf: flex-start"
94
+ },
95
+ {
96
+ "name": "alignSelfStretch",
97
+ "description": "alignSelf: stretch"
98
+ },
99
+ {
100
+ "name": "alignSelfEnd",
101
+ "description": "alignSelf: flex-end"
102
+ },
103
+ {
104
+ "name": "justifyStart",
105
+ "description": "justifyContent: flex-start"
106
+ },
107
+ {
108
+ "name": "justifyEnd",
109
+ "description": "justifyContent: flex-end"
110
+ },
111
+ {
112
+ "name": "justifyCenter",
113
+ "description": "justifyContent: center"
114
+ },
115
+ {
116
+ "name": "justifySpaceBetween",
117
+ "description": "justifyContent: space-between"
118
+ },
119
+ {
120
+ "name": "justifySpaceAround",
121
+ "description": "justifyContent: space-around"
122
+ },
123
+ {
124
+ "name": "textRight",
125
+ "description": "textAlign: right"
126
+ },
127
+ {
128
+ "name": "textLeft",
129
+ "description": "textAlign: left"
130
+ },
131
+ {
132
+ "name": "textCenter",
133
+ "description": "textAlign: center"
134
+ },
135
+ {
136
+ "name": "flexWrap",
137
+ "description": "Allows flex items to wrap onto multiple lines"
138
+ },
139
+ {
140
+ "name": "visibility:hidden",
141
+ "description": "Hides the element while preserving its layout space"
142
+ },
143
+ {
144
+ "name": "visibility:visible",
145
+ "description": "Restores visibility of a hidden element"
146
+ },
147
+ {
148
+ "name": "display:none",
149
+ "description": "Removes the element from layout entirely (no space preserved)"
150
+ }
40
151
  ],
41
152
  "dynamicPrefixes": [
42
- "backgroundColor",
43
- "color",
44
- "borderBottomLeftRadius",
45
- "borderBottomRightRadius",
46
- "borderBottomColor",
47
- "borderBottomRadius",
48
- "borderBottomWidth",
49
- "borderTopLeftRadius",
50
- "borderTopRightRadius",
51
- "borderTopColor",
52
- "borderTopRadius",
53
- "borderTopWidth",
54
- "borderLeftColor",
55
- "borderLeftRadius",
56
- "borderLeftWidth",
57
- "borderRightColor",
58
- "borderRightRadius",
59
- "borderRightWidth",
60
- "borderColor",
61
- "borderRadius",
62
- "borderWidth",
63
- "cursor",
64
- "bg",
65
- "effect",
66
- "scale",
67
- "br",
68
- "size"
153
+ {
154
+ "name": "backgroundColor",
155
+ "description": "Sets backgroundColor from the theme color palette (e.g. backgroundColor:primary)"
156
+ },
157
+ {
158
+ "name": "color",
159
+ "description": "Sets the text/icon color from the theme color palette (e.g. color:primary)"
160
+ },
161
+ {
162
+ "name": "borderBottomLeftRadius",
163
+ "description": "Sets border-bottom-left-radius from the theme radius scale"
164
+ },
165
+ {
166
+ "name": "borderBottomRightRadius",
167
+ "description": "Sets border-bottom-right-radius from the theme radius scale"
168
+ },
169
+ {
170
+ "name": "borderBottomColor",
171
+ "description": "Sets borderBottomColor from the theme color palette"
172
+ },
173
+ {
174
+ "name": "borderBottomRadius",
175
+ "description": "Sets border radius on both bottom corners"
176
+ },
177
+ {
178
+ "name": "borderBottomWidth",
179
+ "description": "Sets borderBottomWidth"
180
+ },
181
+ {
182
+ "name": "borderTopLeftRadius",
183
+ "description": "Sets border-top-left-radius from the theme radius scale"
184
+ },
185
+ {
186
+ "name": "borderTopRightRadius",
187
+ "description": "Sets border-top-right-radius from the theme radius scale"
188
+ },
189
+ {
190
+ "name": "borderTopColor",
191
+ "description": "Sets borderTopColor from the theme color palette"
192
+ },
193
+ {
194
+ "name": "borderTopRadius",
195
+ "description": "Sets border radius on both top corners"
196
+ },
197
+ {
198
+ "name": "borderTopWidth",
199
+ "description": "Sets borderTopWidth"
200
+ },
201
+ {
202
+ "name": "borderLeftColor",
203
+ "description": "Sets borderLeftColor from the theme color palette"
204
+ },
205
+ {
206
+ "name": "borderLeftRadius",
207
+ "description": "Sets border radius on both left corners"
208
+ },
209
+ {
210
+ "name": "borderLeftWidth",
211
+ "description": "Sets borderLeftWidth"
212
+ },
213
+ {
214
+ "name": "borderRightColor",
215
+ "description": "Sets borderRightColor from the theme color palette"
216
+ },
217
+ {
218
+ "name": "borderRightRadius",
219
+ "description": "Sets border radius on both right corners"
220
+ },
221
+ {
222
+ "name": "borderRightWidth",
223
+ "description": "Sets borderRightWidth"
224
+ },
225
+ {
226
+ "name": "borderColor",
227
+ "description": "Sets border color on all sides from the theme color palette"
228
+ },
229
+ {
230
+ "name": "borderRadius",
231
+ "description": "Sets borderRadius on all corners from the theme radius scale (e.g. borderRadius:radius8)"
232
+ },
233
+ {
234
+ "name": "borderWidth",
235
+ "description": "Sets border width on all sides"
236
+ },
237
+ {
238
+ "name": "cursor",
239
+ "description": "Sets the CSS cursor property (e.g. cursor:pointer, cursor:not-allowed)"
240
+ },
241
+ {
242
+ "name": "bg",
243
+ "description": "Shorthand for backgroundColor from the theme color palette (e.g. bg:primary)"
244
+ },
245
+ {
246
+ "name": "effect",
247
+ "description": "Applies a named shadow or blur effect from the theme effects scale"
248
+ },
249
+ {
250
+ "name": "scale",
251
+ "description": "Applies a CSS transform scale (e.g. scale:0.95)"
252
+ },
253
+ {
254
+ "name": "br",
255
+ "description": "Shorthand for borderRadius from the theme radius scale (e.g. br:radius8)"
256
+ },
257
+ {
258
+ "name": "size",
259
+ "description": "Sets equal width and height from the theme size scale (e.g. size:size24)"
260
+ }
69
261
  ]
70
262
  }