nuclo 0.1.56 → 0.1.57
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/nuclo.cjs +1 -1
- package/dist/nuclo.cjs.map +1 -1
- package/dist/nuclo.js +1 -1
- package/dist/nuclo.js.map +1 -1
- package/dist/nuclo.umd.js +1 -1
- package/dist/nuclo.umd.js.map +1 -1
- package/dist/style/cssGenerator.d.ts +4 -2
- package/dist/style/cssGenerator.d.ts.map +1 -1
- package/dist/style/index.d.ts +1 -1
- package/dist/style/index.d.ts.map +1 -1
- package/dist/style/styleQueries.d.ts +8 -0
- package/dist/style/styleQueries.d.ts.map +1 -0
- package/package.json +1 -1
- package/types/features/style.d.ts +42 -4
- package/dist/style/breakpoints.d.ts +0 -7
- package/dist/style/breakpoints.d.ts.map +0 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
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;
|
|
3
4
|
export declare function createCSSClass(className: string, styles: Record<string, string>): void;
|
|
5
|
+
export {};
|
|
4
6
|
//# sourceMappingURL=cssGenerator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cssGenerator.d.ts","sourceRoot":"","sources":["../../src/style/cssGenerator.ts"],"names":[],"mappings":"AACA,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,
|
|
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"}
|
package/dist/style/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { StyleBuilder } from "./styleBuilder";
|
|
2
|
-
export { createBreakpoints } from "./
|
|
2
|
+
export { createStyleQueries, createBreakpoints } 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,iBAAiB,EAAE,MAAM,
|
|
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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AAO,EAEhC,MAAM,GACN,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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;
|
|
6
|
+
export declare const createBreakpoints: typeof createStyleQueries;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=styleQueries.d.ts.map
|
|
@@ -0,0 +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"}
|
package/package.json
CHANGED
|
@@ -7,11 +7,29 @@ declare global {
|
|
|
7
7
|
function createCSSClass(className: string, styles: Record<string, string>): void;
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Creates a
|
|
11
|
-
*
|
|
10
|
+
* Creates a style query class name generator for responsive and conditional styles.
|
|
11
|
+
* Supports @media, @container, @supports queries.
|
|
12
|
+
*
|
|
13
|
+
* Query values should include the at-rule prefix:
|
|
14
|
+
* - "@media (min-width: 768px)" for media queries
|
|
15
|
+
* - "@container (min-width: 400px)" for container queries
|
|
16
|
+
* - "@supports (display: grid)" for feature queries
|
|
17
|
+
*
|
|
18
|
+
* For backward compatibility, values without a prefix are treated as media queries.
|
|
19
|
+
*
|
|
12
20
|
* Supports two signatures:
|
|
13
|
-
* 1. cn(
|
|
14
|
-
* 2. cn(defaultStyles,
|
|
21
|
+
* 1. cn(queryStyles) - Only query-specific styles
|
|
22
|
+
* 2. cn(defaultStyles, queryStyles) - Default styles + query overrides
|
|
23
|
+
*/
|
|
24
|
+
function createStyleQueries<T extends string>(
|
|
25
|
+
queries: Record<T, string>
|
|
26
|
+
): {
|
|
27
|
+
(styles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
|
|
28
|
+
(defaultStyles: StyleBuilder, queryStyles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use createStyleQueries instead. Alias for backward compatibility.
|
|
15
33
|
*/
|
|
16
34
|
function createBreakpoints<T extends string>(
|
|
17
35
|
breakpoints: Record<T, string>
|
|
@@ -1056,3 +1074,23 @@ export function columns(value: string): StyleBuilder;
|
|
|
1056
1074
|
|
|
1057
1075
|
// Interaction
|
|
1058
1076
|
export function cursor(value: string): StyleBuilder;
|
|
1077
|
+
|
|
1078
|
+
// Style queries / breakpoints
|
|
1079
|
+
export function createStyleQueries<T extends string>(
|
|
1080
|
+
queries: Record<T, string>
|
|
1081
|
+
): {
|
|
1082
|
+
(styles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
|
|
1083
|
+
(defaultStyles: StyleBuilder, queryStyles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
|
|
1084
|
+
};
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* @deprecated Use createStyleQueries instead. Alias for backward compatibility.
|
|
1088
|
+
*/
|
|
1089
|
+
export function createBreakpoints<T extends string>(
|
|
1090
|
+
breakpoints: Record<T, string>
|
|
1091
|
+
): {
|
|
1092
|
+
(styles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
|
|
1093
|
+
(defaultStyles: StyleBuilder, breakpointStyles?: Partial<Record<T, StyleBuilder>>): { className: string } | string;
|
|
1094
|
+
};
|
|
1095
|
+
|
|
1096
|
+
export function createCSSClass(className: string, styles: Record<string, string>): void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StyleBuilder } from "./styleBuilder";
|
|
2
|
-
type BreakpointStyles<T extends string> = Partial<Record<T, StyleBuilder>>;
|
|
3
|
-
export declare function createBreakpoints<T extends string>(breakpoints: Record<T, string> | Array<[T, string]>): (defaultStylesOrBreakpoints?: StyleBuilder | BreakpointStyles<T>, breakpointStyles?: BreakpointStyles<T>) => {
|
|
4
|
-
className: string;
|
|
5
|
-
} | string;
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=breakpoints.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../src/style/breakpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAK9C,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;AAI3E,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EACjD,WAAW,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,IAQlD,6BAA6B,YAAY,GAAG,gBAAgB,CAAC,CAAC,CAAC,EAC/D,mBAAmB,gBAAgB,CAAC,CAAC,CAAC,KACpC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAwFjC"}
|