asma-types 2.4.0 → 2.5.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/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/interfaces/breakpoints.d.ts +66 -0
- package/lib/interfaces/breakpoints.d.ts.map +1 -0
- package/lib/interfaces/breakpoints.js +70 -0
- package/lib/interfaces/breakpoints.js.map +1 -0
- package/package.json +4 -2
package/lib/index.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export type { IFeedBack, ISaveToDataBase } from './interfaces/api/advoca/ISaveTo
|
|
|
3
3
|
export * from './interfaces/jwtClaims.js';
|
|
4
4
|
export * from './interfaces/enums.js';
|
|
5
5
|
export * from './interfaces/artifactEnums.js';
|
|
6
|
+
export * from './interfaces/breakpoints.js';
|
|
6
7
|
export * from './utilities/index.js';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AACrF,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAA;AAC5F,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,sBAAsB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AACrF,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAA;AAC5F,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sBAAsB,CAAA"}
|
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,sBAAsB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breakpoints module — single source of truth for TypeScript consumers.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* Layout ranges:
|
|
6
|
+
* - mobile: `<= 743px`
|
|
7
|
+
* - tablet: `744px - 1023px`
|
|
8
|
+
* - tablet-desktop: `1024px - 1279px`
|
|
9
|
+
* - desktop: `>= 1280px`
|
|
10
|
+
*
|
|
11
|
+
* SCSS in `asma-ui-core/src/styles/_breakpoints.scss` mirrors these values
|
|
12
|
+
* manually because SCSS cannot import TypeScript. If you change values here,
|
|
13
|
+
* update the SCSS file too.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { breakpoints, twScreens, mediaQueries } from 'asma-types'
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @see asma-ui-core/src/styles/_breakpoints.scss
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Numeric breakpoint values.
|
|
24
|
+
*
|
|
25
|
+
* @property tablet - Minimum width for tablet view.
|
|
26
|
+
* @property tabletDesktop - Minimum width for tablet-desktop view.
|
|
27
|
+
* @property desktop - Minimum width for desktop view.
|
|
28
|
+
*/
|
|
29
|
+
export declare const breakpoints: {
|
|
30
|
+
readonly tablet: 744;
|
|
31
|
+
readonly tabletDesktop: 1024;
|
|
32
|
+
readonly desktop: 1280;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Tailwind `screens` configuration.
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* Passed directly into `theme.extend.screens` in `tailwind.config.ts`.
|
|
39
|
+
*/
|
|
40
|
+
export declare const twScreens: {
|
|
41
|
+
readonly tablet: "744px";
|
|
42
|
+
readonly 'tablet-desktop': "1024px";
|
|
43
|
+
readonly desktop: "1280px";
|
|
44
|
+
readonly 'max-mobile': {
|
|
45
|
+
readonly max: `${number}px`;
|
|
46
|
+
};
|
|
47
|
+
readonly 'max-tablet': {
|
|
48
|
+
readonly max: `${number}px`;
|
|
49
|
+
};
|
|
50
|
+
readonly 'max-tablet-desktop': {
|
|
51
|
+
readonly max: `${number}px`;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* CSS media queries for runtime responsive checks.
|
|
56
|
+
*
|
|
57
|
+
* @remarks
|
|
58
|
+
* Passed directly into `useMediaQuery()` implementations.
|
|
59
|
+
*/
|
|
60
|
+
export declare const mediaQueries: {
|
|
61
|
+
readonly mobile: `(max-width: ${number}px)`;
|
|
62
|
+
readonly tablet: `(min-width: 744px) and (max-width: ${number}px)`;
|
|
63
|
+
readonly tabletDesktop: `(min-width: 1024px) and (max-width: ${number}px)`;
|
|
64
|
+
readonly desktop: "(min-width: 1280px)";
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=breakpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../src/interfaces/breakpoints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;;;CAId,CAAA;AAWV;;;;;GAKG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;CASZ,CAAA;AAEV;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;CAKf,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breakpoints module — single source of truth for TypeScript consumers.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* Layout ranges:
|
|
6
|
+
* - mobile: `<= 743px`
|
|
7
|
+
* - tablet: `744px - 1023px`
|
|
8
|
+
* - tablet-desktop: `1024px - 1279px`
|
|
9
|
+
* - desktop: `>= 1280px`
|
|
10
|
+
*
|
|
11
|
+
* SCSS in `asma-ui-core/src/styles/_breakpoints.scss` mirrors these values
|
|
12
|
+
* manually because SCSS cannot import TypeScript. If you change values here,
|
|
13
|
+
* update the SCSS file too.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { breakpoints, twScreens, mediaQueries } from 'asma-types'
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @see asma-ui-core/src/styles/_breakpoints.scss
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Numeric breakpoint values.
|
|
24
|
+
*
|
|
25
|
+
* @property tablet - Minimum width for tablet view.
|
|
26
|
+
* @property tabletDesktop - Minimum width for tablet-desktop view.
|
|
27
|
+
* @property desktop - Minimum width for desktop view.
|
|
28
|
+
*/
|
|
29
|
+
export const breakpoints = {
|
|
30
|
+
tablet: 744,
|
|
31
|
+
tabletDesktop: 1024,
|
|
32
|
+
desktop: 1280,
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Derived ceiling values for max-width checks.
|
|
36
|
+
*/
|
|
37
|
+
const ceilings = {
|
|
38
|
+
mobile: breakpoints.tablet - 1,
|
|
39
|
+
tablet: breakpoints.tabletDesktop - 1,
|
|
40
|
+
tabletDesktop: breakpoints.desktop - 1,
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Tailwind `screens` configuration.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* Passed directly into `theme.extend.screens` in `tailwind.config.ts`.
|
|
47
|
+
*/
|
|
48
|
+
export const twScreens = {
|
|
49
|
+
// min-width (mobile-first)
|
|
50
|
+
tablet: `${breakpoints.tablet}px`,
|
|
51
|
+
'tablet-desktop': `${breakpoints.tabletDesktop}px`,
|
|
52
|
+
desktop: `${breakpoints.desktop}px`,
|
|
53
|
+
// max-width (targeting mobile / compact)
|
|
54
|
+
'max-mobile': { max: `${ceilings.mobile}px` },
|
|
55
|
+
'max-tablet': { max: `${ceilings.tablet}px` },
|
|
56
|
+
'max-tablet-desktop': { max: `${ceilings.tabletDesktop}px` },
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* CSS media queries for runtime responsive checks.
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* Passed directly into `useMediaQuery()` implementations.
|
|
63
|
+
*/
|
|
64
|
+
export const mediaQueries = {
|
|
65
|
+
mobile: `(max-width: ${ceilings.mobile}px)`,
|
|
66
|
+
tablet: `(min-width: ${breakpoints.tablet}px) and (max-width: ${ceilings.tablet}px)`,
|
|
67
|
+
tabletDesktop: `(min-width: ${breakpoints.tabletDesktop}px) and (max-width: ${ceilings.tabletDesktop}px)`,
|
|
68
|
+
desktop: `(min-width: ${breakpoints.desktop}px)`,
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=breakpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breakpoints.js","sourceRoot":"","sources":["../../src/interfaces/breakpoints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,MAAM,EAAE,GAAG;IACX,aAAa,EAAE,IAAI;I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|
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
13
|
"import": "./lib/index.js",
|
|
14
|
-
"
|
|
14
|
+
"require": "./lib/index.js",
|
|
15
|
+
"types": "./lib/index.d.ts",
|
|
16
|
+
"default": "./lib/index.js"
|
|
15
17
|
}
|
|
16
18
|
},
|
|
17
19
|
"author": "ie",
|