@rokt/dcui-orchestrator 1.2.1-rc.45 → 1.2.1-rc.47
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/index.cjs +30 -30
- package/dist/index.js +30 -30
- package/dist/libraries/dcui-components/src/utils/responsive-css.d.ts +9 -0
- package/dist/libraries/layout-renderer-utils/src/reducers/breakpoint/coerce-breakpoints.d.ts +19 -0
- package/dist/libraries/layout-renderer-utils/src/reducers/breakpoint/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A breakpoint width is written into CSS text, a media query or a class name,
|
|
3
|
+
* so only a finite, non-negative number is interpolated. The store replaces
|
|
4
|
+
* every other layout value before it arrives here; this is the second check,
|
|
5
|
+
* for a width that reaches the style mapper another way. A value that is not
|
|
6
|
+
* a width gets a form that matches nothing, never a rule that applies
|
|
7
|
+
* everywhere.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isBreakpointWidth(width: unknown): width is number;
|
|
1
10
|
export declare function getBreakpointCSSClass(width?: number): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A layout's breakpoint widths end up in CSS text: the saga builds a matchMedia
|
|
3
|
+
* query from each one, and the style mapper writes each into a media query or
|
|
4
|
+
* a class name. Only a finite, non-negative number is a width there. Any other
|
|
5
|
+
* value becomes INVALID_BREAKPOINT_WIDTH, which the saga and the style mapper
|
|
6
|
+
* skip, so its styles never apply, as the browser dropped the malformed rule
|
|
7
|
+
* before. A key is never dropped: the style mapper pairs an element's style
|
|
8
|
+
* blocks with the breakpoints by position, so a missing key would move every
|
|
9
|
+
* later block onto the wrong width.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Not a width. No media query is registered for it, no style rule is written
|
|
13
|
+
* for it, and every comparison with it is false, so a breakpoint that carries
|
|
14
|
+
* it is never active and never styles anything.
|
|
15
|
+
*/
|
|
16
|
+
export declare const INVALID_BREAKPOINT_WIDTH: number;
|
|
17
|
+
export declare function isBreakpointWidth(value: unknown): value is number;
|
|
18
|
+
export declare function coerceBreakpointWidth(value: unknown): number;
|
|
19
|
+
export declare function coerceBreakpoints(breakpoints: unknown): Record<string, number>;
|