@rokt/dcui-orchestrator 1.2.1-rc.44 → 1.2.1-rc.46
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/components/style-mapper/combiners/escape-css-string.d.ts +17 -0
- package/dist/libraries/dcui-components/src/components/style-mapper/combiners/index.d.ts +1 -0
- 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
package/dist/libraries/dcui-components/src/components/style-mapper/combiners/escape-css-string.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Escapes the characters that can end or escape a double-quoted CSS string:
|
|
3
|
+
* a double quote and a backslash get a backslash in front, and a CSS newline
|
|
4
|
+
* (LF, CR, FF) becomes its hex escape with a space terminator. A value written
|
|
5
|
+
* into url("...") then stays inside the quotes even when the validator in
|
|
6
|
+
* front of it lets one of them through.
|
|
7
|
+
*
|
|
8
|
+
* A colon and a semicolon become their hex escapes too. The css writer
|
|
9
|
+
* (Emotion) scans the whole style string for `label:<name>` and appends the
|
|
10
|
+
* name to the class it inserts, and the rule's own closing `");` ends a
|
|
11
|
+
* label that the value starts (the `")` is read into the name, the `;` ends
|
|
12
|
+
* it), so a label read out of the value would turn that class into a
|
|
13
|
+
* selector list that reaches the host page. The colon is escaped so the word
|
|
14
|
+
* label can never be followed by one, and the semicolon so a raw one cannot
|
|
15
|
+
* end such a label. The browser decodes both back to the same url.
|
|
16
|
+
*/
|
|
17
|
+
export declare function escapeCSSString(value: string): string;
|
|
@@ -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>;
|