nuclo 0.1.63 → 0.1.65

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,6 +1,6 @@
1
- type AtRuleType = 'media' | 'container' | 'supports' | 'style';
2
- export declare function classExistsInDOM(className: string, condition?: string, atRuleType?: AtRuleType): boolean;
3
- export declare function createCSSClassWithStyles(className: string, styles: Record<string, string>, condition?: string, atRuleType?: AtRuleType): void;
1
+ type AtRuleType = 'media' | 'container' | 'supports' | 'style' | 'pseudo';
2
+ export declare function classExistsInDOM(className: string, condition?: string, atRuleType?: AtRuleType, pseudoClass?: string): boolean;
3
+ export declare function createCSSClassWithStyles(className: string, styles: Record<string, string>, condition?: string, atRuleType?: AtRuleType, pseudoClass?: string): void;
4
4
  export declare function createCSSClass(className: string, styles: Record<string, string>): void;
5
5
  export {};
6
6
  //# sourceMappingURL=cssGenerator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cssGenerator.d.ts","sourceRoot":"","sources":["../../src/style/cssGenerator.ts"],"names":[],"mappings":"AACA,KAAK,UAAU,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,OAAO,CAAC;AAG/D,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,UAAU,GAAE,UAAoB,GAAG,OAAO,CAwCjH;AAGD,wBAAgB,wBAAwB,CACvC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,SAAS,CAAC,EAAE,MAAM,EAClB,UAAU,GAAE,UAAoB,GAC9B,IAAI,CAyIN;AAGD,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAEtF"}
1
+ {"version":3,"file":"cssGenerator.d.ts","sourceRoot":"","sources":["../../src/style/cssGenerator.ts"],"names":[],"mappings":"AACA,KAAK,UAAU,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAG1E,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,UAAU,GAAE,UAAoB,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAoDvI;AAGD,wBAAgB,wBAAwB,CACvC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,SAAS,CAAC,EAAE,MAAM,EAClB,UAAU,GAAE,UAAoB,EAChC,WAAW,CAAC,EAAE,MAAM,GAClB,IAAI,CAyLN;AAGD,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAEtF"}
@@ -1,5 +1,5 @@
1
1
  export { StyleBuilder } from "./styleBuilder";
2
- export { createStyleQueries, createBreakpoints } from "./styleQueries";
2
+ export { createStyleQueries, createBreakpoints, type CSSPseudoClass } from "./styleQueries";
3
3
  export { createCSSClass } from "./cssGenerator";
4
4
  export { display, flex, grid, bg, color, accentColor, fontSize, fontWeight, fontFamily, lineHeight, letterSpacing, textAlign, textDecoration, bold, fontStyle, fontVariant, fontStretch, textTransform, textIndent, textOverflow, textShadow, whiteSpace, wordSpacing, wordWrap, overflowWrap, textAlignLast, textJustify, textDecorationLine, textDecorationColor, textDecorationStyle, textDecorationThickness, textUnderlineOffset, verticalAlign, position, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, margin, marginTop, marginRight, marginBottom, marginLeft, width, height, minWidth, maxWidth, minHeight, maxHeight, boxSizing, top, right, bottom, left, zIndex, flexDirection, alignItems, justifyContent, center, gap, flexWrap, flexGrow, flexShrink, flexBasis, alignSelf, alignContent, justifySelf, justifyItems, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridColumn, gridRow, gridColumnStart, gridColumnEnd, gridRowStart, gridRowEnd, gridArea, gridAutoColumns, gridAutoRows, gridAutoFlow, border, borderTop, borderRight, borderBottom, borderLeft, borderWidth, borderStyle, borderColor, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth, borderTopStyle, borderRightStyle, borderBottomStyle, borderLeftStyle, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, borderTopLeftRadius, borderTopRightRadius, borderBottomLeftRadius, borderBottomRightRadius, outline, outlineWidth, outlineStyle, outlineColor, outlineOffset, backgroundColor, backgroundImage, backgroundRepeat, backgroundPosition, backgroundSize, backgroundAttachment, backgroundClip, backgroundOrigin, boxShadow, opacity, transition, transitionProperty, transitionDuration, transitionTimingFunction, transitionDelay, transform, transformOrigin, transformStyle, perspective, perspectiveOrigin, backfaceVisibility, animation, animationName, animationDuration, animationTimingFunction, animationDelay, animationIterationCount, animationDirection, animationFillMode, animationPlayState, filter, backdropFilter, overflow, overflowX, overflowY, visibility, objectFit, objectPosition, listStyle, listStyleType, listStylePosition, listStyleImage, borderCollapse, borderSpacing, captionSide, emptyCells, tableLayout, content, quotes, counterReset, counterIncrement, appearance, userSelect, pointerEvents, resize, scrollBehavior, clip, clipPath, isolation, mixBlendMode, willChange, contain, pageBreakBefore, pageBreakAfter, pageBreakInside, breakBefore, breakAfter, breakInside, orphans, widows, columnCount, columnFill, columnGap, columnRule, columnRuleColor, columnRuleStyle, columnRuleWidth, columnSpan, columnWidth, columns, cursor, } from "./styleBuilder";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/style/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAA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,YAAY,EAEZ,UAAU,EAEV,OAAO,EAEP,eAAe,EAAE,cAAc,EAAE,eAAe,EAEhD,WAAW,EAAE,UAAU,EAAE,WAAW,EAEpC,OAAO,EAAE,MAAM,EAEf,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAC9C,eAAe,EAAE,eAAe,EAAE,eAAe,EACjD,UAAU,EAAE,WAAW,EAAE,OAAO,EAEhC,MAAM,GACN,MAAM,gBAAgB,CAAC"}
@@ -1,8 +1,14 @@
1
1
  import { StyleBuilder } from "./styleBuilder";
2
- type QueryStyles<T extends string> = Partial<Record<T, StyleBuilder>>;
3
- export declare function createStyleQueries<T extends string>(queries: Record<T, string> | Array<[T, string]>): (defaultStylesOrQueries?: StyleBuilder | QueryStyles<T>, queryStyles?: QueryStyles<T>) => {
4
- className: string;
5
- } | string;
2
+ export type CSSPseudoClass = 'hover' | 'active' | 'focus' | 'focus-visible' | 'focus-within' | 'visited' | 'link' | 'target' | 'root' | 'empty' | 'enabled' | 'disabled' | 'checked' | 'indeterminate' | 'default' | 'required' | 'optional' | 'valid' | 'invalid' | 'in-range' | 'out-of-range' | 'placeholder-shown' | 'autofill' | 'read-only' | 'read-write' | 'first-child' | 'last-child' | 'only-child' | 'first-of-type' | 'last-of-type' | 'only-of-type' | 'nth-child' | 'nth-last-child' | 'nth-of-type' | 'nth-last-of-type' | 'lang' | 'dir' | 'not' | 'is' | 'where' | 'has' | 'any-link' | 'local-link' | 'scope' | 'current' | 'past' | 'future' | 'playing' | 'paused' | 'seeking' | 'muted' | 'volume-locked' | 'buffering' | 'stalled' | 'picture-in-picture' | 'fullscreen' | 'modal' | 'popover-open' | 'user-invalid' | 'user-valid';
3
+ type QueryStyles<T extends string> = Partial<Record<T | CSSPseudoClass, StyleBuilder>>;
4
+ export declare function createStyleQueries<T extends string>(queries: Record<T, string> | Array<[T, string]>): {
5
+ (defaultStyles: StyleBuilder, queryStyles?: QueryStyles<T | CSSPseudoClass>): {
6
+ className: string;
7
+ } | string;
8
+ (queryStyles?: QueryStyles<T | CSSPseudoClass>): {
9
+ className: string;
10
+ } | string;
11
+ };
6
12
  export declare const createBreakpoints: typeof createStyleQueries;
7
13
  export {};
8
14
  //# sourceMappingURL=styleQueries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styleQueries.d.ts","sourceRoot":"","sources":["../../src/style/styleQueries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAK9C,KAAK,WAAW,CAAC,CAAC,SAAS,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;AAmCtE,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAClD,OAAO,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,IAQ9C,yBAAyB,YAAY,GAAG,WAAW,CAAC,CAAC,CAAC,EACtD,cAAc,WAAW,CAAC,CAAC,CAAC,KAC1B;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAwFjC;AAGD,eAAO,MAAM,iBAAiB,2BAAqB,CAAC"}
1
+ {"version":3,"file":"styleQueries.d.ts","sourceRoot":"","sources":["../../src/style/styleQueries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAK9C,MAAM,MAAM,cAAc,GACvB,OAAO,GACP,QAAQ,GACR,OAAO,GACP,eAAe,GACf,cAAc,GACd,SAAS,GACT,MAAM,GACN,QAAQ,GACR,MAAM,GACN,OAAO,GACP,SAAS,GACT,UAAU,GACV,SAAS,GACT,eAAe,GACf,SAAS,GACT,UAAU,GACV,UAAU,GACV,OAAO,GACP,SAAS,GACT,UAAU,GACV,cAAc,GACd,mBAAmB,GACnB,UAAU,GACV,WAAW,GACX,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,eAAe,GACf,cAAc,GACd,cAAc,GACd,WAAW,GACX,gBAAgB,GAChB,aAAa,GACb,kBAAkB,GAClB,MAAM,GACN,KAAK,GACL,KAAK,GACL,IAAI,GACJ,OAAO,GACP,KAAK,GACL,UAAU,GACV,YAAY,GACZ,OAAO,GACP,SAAS,GACT,MAAM,GACN,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,GACP,eAAe,GACf,WAAW,GACX,SAAS,GACT,oBAAoB,GACpB,YAAY,GACZ,OAAO,GACP,cAAc,GACd,cAAc,GACd,YAAY,CAAC;AAmEhB,KAAK,WAAW,CAAC,CAAC,SAAS,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,cAAc,EAAE,YAAY,CAAC,CAAC,CAAC;AA2DvF,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAClD,OAAO,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAC7C;IACF,CAAC,aAAa,EAAE,YAAY,EAAE,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC,GAAG,cAAc,CAAC,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC;IAC7G,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC,GAAG,cAAc,CAAC,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC;CAChF,CAkJA;AAGD,eAAO,MAAM,iBAAiB,2BAAqB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuclo",
3
3
  "private": false,
4
- "version": "0.1.63",
4
+ "version": "0.1.65",
5
5
  "type": "module",
6
6
  "main": "./dist/nuclo.cjs",
7
7
  "module": "./dist/nuclo.js",
@@ -100,6 +100,72 @@ import type {
100
100
  ClipRuleValue,
101
101
  } from "../../src/style/cssPropertyTypes";
102
102
 
103
+ /**
104
+ * Comprehensive list of CSS pseudo-classes that are automatically available
105
+ * in createStyleQueries without needing to define them.
106
+ */
107
+ export type CSSPseudoClass =
108
+ | 'hover'
109
+ | 'active'
110
+ | 'focus'
111
+ | 'focus-visible'
112
+ | 'focus-within'
113
+ | 'visited'
114
+ | 'link'
115
+ | 'target'
116
+ | 'root'
117
+ | 'empty'
118
+ | 'enabled'
119
+ | 'disabled'
120
+ | 'checked'
121
+ | 'indeterminate'
122
+ | 'default'
123
+ | 'required'
124
+ | 'optional'
125
+ | 'valid'
126
+ | 'invalid'
127
+ | 'in-range'
128
+ | 'out-of-range'
129
+ | 'placeholder-shown'
130
+ | 'autofill'
131
+ | 'read-only'
132
+ | 'read-write'
133
+ | 'first-child'
134
+ | 'last-child'
135
+ | 'only-child'
136
+ | 'first-of-type'
137
+ | 'last-of-type'
138
+ | 'only-of-type'
139
+ | 'nth-child'
140
+ | 'nth-last-child'
141
+ | 'nth-of-type'
142
+ | 'nth-last-of-type'
143
+ | 'lang'
144
+ | 'dir'
145
+ | 'not'
146
+ | 'is'
147
+ | 'where'
148
+ | 'has'
149
+ | 'any-link'
150
+ | 'local-link'
151
+ | 'scope'
152
+ | 'current'
153
+ | 'past'
154
+ | 'future'
155
+ | 'playing'
156
+ | 'paused'
157
+ | 'seeking'
158
+ | 'muted'
159
+ | 'volume-locked'
160
+ | 'buffering'
161
+ | 'stalled'
162
+ | 'picture-in-picture'
163
+ | 'fullscreen'
164
+ | 'modal'
165
+ | 'popover-open'
166
+ | 'user-invalid'
167
+ | 'user-valid';
168
+
103
169
  /**
104
170
  * Creates a CSS class with the given styles and injects it into the document
105
171
  */
@@ -108,7 +174,7 @@ declare global {
108
174
 
109
175
  /**
110
176
  * Creates a style query class name generator for responsive and conditional styles.
111
- * Supports @media, @container, @supports queries.
177
+ * Supports @media, @container, @supports queries, and automatically includes all CSS pseudo-classes.
112
178
  *
113
179
  * Query values should include the at-rule prefix:
114
180
  * - "@media (min-width: 768px)" for media queries
@@ -117,25 +183,44 @@ declare global {
117
183
  *
118
184
  * For backward compatibility, values without a prefix are treated as media queries.
119
185
  *
186
+ * Pseudo-classes (hover, focus, active, etc.) are automatically available and don't need to be defined:
187
+ * ```ts
188
+ * const cn = createStyleQueries({
189
+ * small: "@media (min-width: 341px)",
190
+ * medium: "@media (min-width: 601px)",
191
+ * large: "@media (min-width: 1025px)",
192
+ * });
193
+ *
194
+ * const s = {
195
+ * navLink: cn(
196
+ * color("gray").fontSize("14px").transition("all 0.2s"),
197
+ * {
198
+ * medium: fontSize("15px"),
199
+ * hover: color("blue") // hover is automatically available!
200
+ * }
201
+ * )
202
+ * };
203
+ * ```
204
+ *
120
205
  * Supports two signatures:
121
206
  * 1. cn(queryStyles) - Only query-specific styles
122
207
  * 2. cn(defaultStyles, queryStyles) - Default styles + query overrides
123
208
  */
124
209
  function createStyleQueries<T extends string>(
125
- queries: Record<T, string>
210
+ queries: Record<T, string> | Array<[T, string]>
126
211
  ): {
127
- (styles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
128
- (defaultStyles: StyleBuilder, queryStyles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
212
+ (defaultStyles: StyleBuilder, queryStyles?: Partial<Record<T | CSSPseudoClass, StyleBuilder>>): { className: string } | string;
213
+ (queryStyles?: Partial<Record<T | CSSPseudoClass, StyleBuilder>>): { className: string } | string;
129
214
  };
130
215
 
131
216
  /**
132
217
  * @deprecated Use createStyleQueries instead. Alias for backward compatibility.
133
218
  */
134
219
  function createBreakpoints<T extends string>(
135
- breakpoints: Record<T, string>
220
+ breakpoints: Record<T, string> | Array<[T, string]>
136
221
  ): {
137
- (styles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
138
- (defaultStyles: StyleBuilder, breakpointStyles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
222
+ (defaultStyles: StyleBuilder, breakpointStyles?: Partial<Record<T | CSSPseudoClass, StyleBuilder>>): { className: string } | string;
223
+ (breakpointStyles?: Partial<Record<T | CSSPseudoClass, StyleBuilder>>): { className: string } | string;
139
224
  };
140
225
 
141
226
  /**
@@ -1841,20 +1926,20 @@ export function gridGap(value: CSSLengthValue): StyleBuilder;
1841
1926
 
1842
1927
  // Style queries / breakpoints
1843
1928
  export function createStyleQueries<T extends string>(
1844
- queries: Record<T, string>
1929
+ queries: Record<T, string> | Array<[T, string]>
1845
1930
  ): {
1846
- (styles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
1847
- (defaultStyles: StyleBuilder, queryStyles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
1931
+ (defaultStyles: StyleBuilder, queryStyles?: Partial<Record<T | CSSPseudoClass, StyleBuilder>>): { className: string } | string;
1932
+ (queryStyles?: Partial<Record<T | CSSPseudoClass, StyleBuilder>>): { className: string } | string;
1848
1933
  };
1849
1934
 
1850
1935
  /**
1851
1936
  * @deprecated Use createStyleQueries instead. Alias for backward compatibility.
1852
1937
  */
1853
1938
  export function createBreakpoints<T extends string>(
1854
- breakpoints: Record<T, string>
1939
+ breakpoints: Record<T, string> | Array<[T, string]>
1855
1940
  ): {
1856
- (styles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
1857
- (defaultStyles: StyleBuilder, breakpointStyles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
1941
+ (defaultStyles: StyleBuilder, breakpointStyles?: Partial<Record<T | CSSPseudoClass, StyleBuilder>>): { className: string } | string;
1942
+ (breakpointStyles?: Partial<Record<T | CSSPseudoClass, StyleBuilder>>): { className: string } | string;
1858
1943
  };
1859
1944
 
1860
1945
  export function createCSSClass(className: string, styles: Record<string, string>): void;