@stamcat/craftsman 0.0.55 → 0.0.56
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/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Breakpoint, LayoutWidthsType } from '../../utilities/types';
|
|
1
|
+
import { Breakpoint, LayoutWidthsType, SerializedStyles } from '../../utilities/types';
|
|
2
2
|
export declare const widths: Record<LayoutWidthsType, string>;
|
|
3
3
|
export declare const media: {
|
|
4
4
|
readonly mobile: string;
|
|
@@ -14,4 +14,4 @@ export declare const media: {
|
|
|
14
14
|
readonly desktopOnly: string;
|
|
15
15
|
};
|
|
16
16
|
export declare const width: (w: LayoutWidthsType, multiplier?: number, px?: boolean) => string;
|
|
17
|
-
export declare const breakpoint: (bp: Breakpoint, styles: string) => string;
|
|
17
|
+
export declare const breakpoint: (bp: Breakpoint, styles: string | SerializedStyles) => string;
|
|
@@ -42,6 +42,9 @@ var n = Object.fromEntries(e.options.map((e) => [e, `var(--w-${e}, ${t[e]}px)`])
|
|
|
42
42
|
return r ? a : `calc(((${i} / 1px) * ${t}) + ((${n.gutter} / 1px) * ${e}))`;
|
|
43
43
|
}
|
|
44
44
|
return r ? t === 1 ? i : `calc(${i} * ${t})` : t === 1 ? `calc(${i} / 1px)` : `calc((${i} / 1px) * ${t})`;
|
|
45
|
-
}, a = (e, t) =>
|
|
45
|
+
}, a = (e, t) => {
|
|
46
|
+
let n = String(t);
|
|
47
|
+
return `@media ${r[e]} { ${typeof t == "string" ? n : t} }`;
|
|
48
|
+
};
|
|
46
49
|
//#endregion
|
|
47
50
|
export { a as breakpoint, r as media, i as width, n as widths };
|
package/src/utilities/types.d.ts
CHANGED
|
@@ -44,6 +44,11 @@ export type LayoutWidthsType = z.infer<typeof LayoutWidthsSchema>;
|
|
|
44
44
|
export type Width = Record<LayoutWidthsType, number>;
|
|
45
45
|
export type Colors = Record<string, string>;
|
|
46
46
|
export type ColorType = "rgba" | "hex";
|
|
47
|
+
export type SerializedStyles = {
|
|
48
|
+
name: string;
|
|
49
|
+
styles: string;
|
|
50
|
+
next?: SerializedStyles;
|
|
51
|
+
};
|
|
47
52
|
export declare const zTextInputExclusions: z.ZodEnum<{
|
|
48
53
|
checkbox: "checkbox";
|
|
49
54
|
radio: "radio";
|