@arcgis/lumina 4.31.0-next.84

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.
@@ -0,0 +1,52 @@
1
+ import type { Nil } from "@arcgis/components-utils";
2
+ import type { Properties as CssProperties } from "csstype";
3
+ import type { ClassInfo } from "lit-html/directives/class-map.js";
4
+ import type { DirectiveResult } from "lit/directive.js";
5
+ import type { ClassMapDirective } from "lit/directives/class-map.js";
6
+ import type { StyleMapDirective } from "lit/directives/style-map.js";
7
+ /**
8
+ * You likely won't have to import this directly. It will be added during
9
+ * _JSX to lit-html_ conversion.
10
+ *
11
+ * @remarks
12
+ * In JSX we allow both of the following:
13
+ * ```tsx
14
+ * const myString = "foo";
15
+ * const myObject = { foo: true, bar: false };
16
+ * render(<p class={myString} />);
17
+ * render(<p class={myObject} />);
18
+ * ```
19
+ *
20
+ * One of the above needs to call `classMap` directive, the other must not.
21
+ *
22
+ * To keep the build fast, and to guard against types being possibly incorrect,
23
+ * we are not relying on the TypeScript type-checker to check if the provided
24
+ * variable is a string or an object.
25
+ * Instead, if the prop value is a object definition, variable reference,
26
+ * ternary expression or etc, the `safeClassMap` will be called, which will
27
+ * determine at runtime if directive should be called
28
+ */
29
+ export declare const safeClassMap: (parameters: ClassInfo | Nil | string) => DirectiveResult<typeof ClassMapDirective> | Nil | string;
30
+ /**
31
+ * You likely won't have to import this directly. It will be added during
32
+ * _JSX to lit-html_ conversion.
33
+ *
34
+ * @remarks
35
+ * In JSX we allow both of the following:
36
+ * ```tsx
37
+ * const myString = "font-size:'2px'";
38
+ * const myObject = { fontSize: "2px" };
39
+ * render(<p style={myString} />);
40
+ * render(<p style={myObject} />);
41
+ * ```
42
+ *
43
+ * One of the above needs to call `styleMap` directive, the other must not.
44
+ *
45
+ * To keep the build fast, and to guard against types being possibly incorrect,
46
+ * we are not relying on the TypeScript type-checker to check if the provided
47
+ * variable is a string or an object.
48
+ * Instead, if the prop value is a object definition, variable reference,
49
+ * ternary expression or etc, the `safeStyleMap` will be called, which will
50
+ * determine at runtime if directive should be called
51
+ */
52
+ export declare const safeStyleMap: (parameters: CssProperties | Nil | string) => DirectiveResult<typeof StyleMapDirective> | Nil | string;