@arcgis/lumina 5.2.0-next.2 → 5.2.0-next.21

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.
Files changed (58) hide show
  1. package/dist/{ControllerManager-DpJfvft9.js → ControllerManager-4cSEnB5Y.js} +12 -8
  2. package/dist/{Controller-Cer_6Z29.js → GenericController-C8NSb50b.js} +59 -23
  3. package/dist/LitElement.d.ts +179 -250
  4. package/dist/PublicLitElement.d.ts +64 -30
  5. package/dist/config.d.ts +22 -16
  6. package/dist/context.d.ts +24 -24
  7. package/dist/controllers/Controller.d.ts +106 -139
  8. package/dist/controllers/ControllerInternals.d.ts +33 -25
  9. package/dist/controllers/ControllerManager.d.ts +40 -61
  10. package/dist/controllers/GenericController.d.ts +26 -0
  11. package/dist/controllers/accessor/index.d.ts +6 -4
  12. package/dist/controllers/accessor/index.js +23 -5
  13. package/dist/controllers/accessor/reEmitEvent.d.ts +6 -3
  14. package/dist/controllers/accessor/store.d.ts +21 -14
  15. package/dist/controllers/accessor/useAccessor.d.ts +86 -68
  16. package/dist/controllers/functional.d.ts +11 -4
  17. package/dist/controllers/index.d.ts +35 -36
  18. package/dist/controllers/index.js +5 -7
  19. package/dist/controllers/load.d.ts +3 -2
  20. package/dist/controllers/proxyExports.d.ts +6 -5
  21. package/dist/controllers/toFunction.d.ts +4 -2
  22. package/dist/controllers/trackKey.d.ts +9 -4
  23. package/dist/controllers/trackPropKey.d.ts +8 -2
  24. package/dist/controllers/trackPropertyKey.d.ts +11 -6
  25. package/dist/controllers/types.d.ts +99 -170
  26. package/dist/controllers/useDirection.d.ts +5 -6
  27. package/dist/controllers/useMedia.d.ts +3 -2
  28. package/dist/controllers/usePropertyChange.d.ts +9 -10
  29. package/dist/controllers/useSlottableRequest.d.ts +15 -10
  30. package/dist/controllers/useT9n.d.ts +44 -38
  31. package/dist/controllers/useWatchAttributes.d.ts +6 -3
  32. package/dist/controllers/utils.d.ts +13 -5
  33. package/dist/createEvent.d.ts +32 -32
  34. package/dist/decorators.d.ts +16 -9
  35. package/dist/formAssociatedUtils.d.ts +5 -47
  36. package/dist/globalTypes/importMeta.d.ts +18 -10
  37. package/dist/globalTypes/index.d.ts +6 -4
  38. package/dist/globalTypes/jsxGlobals.d.ts +36 -23
  39. package/dist/globalTypes/loadLitCss.d.ts +61 -40
  40. package/dist/globalTypes/viteEnv.d.ts +60 -26
  41. package/dist/hmrSupport.d.ts +24 -28
  42. package/dist/index.d.ts +17 -16
  43. package/dist/index.js +27 -7
  44. package/dist/jsx/baseTypes.d.ts +26 -26
  45. package/dist/jsx/directives.d.ts +30 -42
  46. package/dist/jsx/generatedTypes.d.ts +3002 -2923
  47. package/dist/jsx/types.d.ts +214 -171
  48. package/dist/jsx/utils.d.ts +19 -14
  49. package/dist/lazyLoad.d.ts +31 -110
  50. package/dist/makeRuntime.d.ts +104 -127
  51. package/dist/{proxyExports-BkN6hND0.js → proxyExports-ZRLty8oJ.js} +1 -1
  52. package/dist/render.d.ts +4 -2
  53. package/dist/utils.d.ts +9 -14
  54. package/dist/wrappersUtils.d.ts +25 -26
  55. package/package.json +7 -4
  56. package/dist/devOnlyDetectIncorrectLazyUsages.d.ts +0 -14
  57. package/dist/lifecycleSupport.d.ts +0 -8
  58. package/dist/tests/wrappersUtils.typeTest.d.ts +0 -1
@@ -1,16 +1,13 @@
1
- import { nil } from '@arcgis/toolkit/type';
2
- import { Properties as CssProperties } from 'csstype';
3
- import { ClassInfo, ClassMapDirective } from 'lit/directives/class-map.js';
4
- import { DirectiveResult, DirectiveClass, ElementPart, PartInfo, Directive } from 'lit/directive.js';
5
- import { StyleMapDirective } from 'lit/directives/style-map.js';
6
- import { noChange } from 'lit';
7
- import { CustomAttributes } from './baseTypes.ts';
8
- import { RefDirective } from 'lit/directives/ref.js';
1
+ import type { Properties as CssProperties } from "csstype";
2
+ import type { ClassInfo, ClassMapDirective } from "lit/directives/class-map.js";
3
+ import type { DirectiveResult, DirectiveClass } from "lit/directive.js";
4
+ import type { StyleMapDirective } from "lit/directives/style-map.js";
5
+ import type { CustomAttributes } from "./baseTypes.js";
6
+
9
7
  /**
10
8
  * You likely won't have to import this directly. It will be added during
11
9
  * _JSX to lit-html_ conversion.
12
10
  *
13
- * @remarks
14
11
  * In JSX we allow both of the following:
15
12
  * ```tsx
16
13
  * const myString = "foo";
@@ -28,14 +25,15 @@ import { RefDirective } from 'lit/directives/ref.js';
28
25
  * ternary expression or etc, the `safeClassMap` will be called, which will
29
26
  * determine at runtime if directive should be called
30
27
  *
31
- * @private
28
+ * @param parameters
29
+ * @internal
32
30
  */
33
- export declare const safeClassMap: (parameters: ClassInfo | nil | string) => DirectiveResult<typeof ClassMapDirective> | nil | string;
31
+ export function safeClassMap(parameters: ClassInfo | null | undefined | string): DirectiveResult<typeof ClassMapDirective> | null | undefined | string;
32
+
34
33
  /**
35
34
  * You likely won't have to import this directly. It will be added during
36
35
  * _JSX to lit-html_ conversion.
37
36
  *
38
- * @remarks
39
37
  * In JSX we allow both of the following:
40
38
  * ```tsx
41
39
  * const myString = "font-size:'2px'";
@@ -53,30 +51,27 @@ export declare const safeClassMap: (parameters: ClassInfo | nil | string) => Dir
53
51
  * ternary expression or etc, the `safeStyleMap` will be called, which will
54
52
  * determine at runtime if directive should be called
55
53
  *
56
- * @private
54
+ * @param parameters
55
+ * @internal
57
56
  */
58
- export declare const safeStyleMap: (parameters: CssProperties | nil | string) => DirectiveResult<typeof StyleMapDirective> | nil | string;
59
- declare class DeferLoad extends Directive {
60
- update(part: ElementPart): void;
61
- render(): typeof noChange;
62
- }
57
+ export function safeStyleMap(parameters: CssProperties | null | undefined | string): DirectiveResult<typeof StyleMapDirective> | null | undefined | string;
58
+
63
59
  /**
64
- * @private
65
60
  * Do not use this directive directly. Use the `deferLoad` JSX prop instead.
66
61
  * [Documentation](https://webgis.esri.com/references/lumina/jsx#deferring-web-component-load)
62
+ *
63
+ * @internal
67
64
  */
68
- export declare const deferLoad: DirectiveResult<typeof DeferLoad>;
65
+ export const deferLoad: DirectiveResult;
66
+
69
67
  /**
70
- * @private
71
68
  * Do not use this directly. Use the `deferLoad` JSX prop instead.
72
69
  * [Documentation](https://webgis.esri.com/references/lumina/jsx#deferring-web-component-load)
70
+ *
71
+ * @internal
73
72
  */
74
- export declare const deferredLoaders: Map<string, () => Promise<unknown>>;
75
- declare class StabilizedRef extends Directive {
76
- #private;
77
- constructor(partInfo: PartInfo);
78
- render(refValue: CustomAttributes<Element>["ref"]): DirectiveResult<typeof RefDirective>;
79
- }
73
+ export const deferredLoaders: Map<string, () => Promise<unknown>>;
74
+
80
75
  /**
81
76
  * Because of how Lit's ref() works, there are two requirements on ref
82
77
  * function:
@@ -89,34 +84,27 @@ declare class StabilizedRef extends Directive {
89
84
  * The `stabilizedRef` directive resolves both of these requirements by creating
90
85
  * a stable wrapper function for the ref callback.
91
86
  *
92
- * @private
93
- * Lumina will insert this directive automatically when the `ref` JSX prop is
94
- * authored in a way that clearly creates a new function on each render:
95
- * ```tsx
96
- * <my-component ref={(el) => this.myComponent = el} />
97
- * <my-component ref={this.callback.bind(this, index)} />
98
- * ```
99
87
  * @deprecated See https://discord.com/channels/1012791295170859069/1047015641225371718
88
+ * @internal
100
89
  */
101
- export declare const stabilizedRef: <T extends Element>(refValue: CustomAttributes<T>["ref"]) => DirectiveResult<typeof StabilizedRef>;
90
+ export const stabilizedRef: <T extends Element>(refValue: CustomAttributes<T>["ref"]) => DirectiveResult;
91
+
102
92
  /**
103
93
  * Creates a user-facing directive function from a Directive class. This
104
94
  * function has the same parameters as the directive's render() method.
105
95
  *
106
- * @remarks
107
96
  * This is equivalent to Lit's native "directive()", but has return type
108
97
  * "never" to allow it be set as a value for any JSX attribute.
109
98
  */
110
- export declare const directive: <C extends DirectiveClass>(c: C) => (...values: Parameters<InstanceType<C>["render"]>) => never;
99
+ export const directive: <C extends DirectiveClass>(c: C) => (...values: Parameters<InstanceType<C>["render"]>) => never;
100
+
111
101
  /**
112
102
  * Checks binding values against live DOM values, instead of previously bound
113
103
  * values, when determining whether to update the value.
114
104
  *
115
- * @see https://lit.dev/docs/templates/directives/#live
116
- *
117
- * @remarks
118
105
  * This is equivalent to Lit's native "directive()", but has return type
119
106
  * "never" to allow it be set as a value for any JSX attribute.
107
+ *
108
+ * @see https://lit.dev/docs/templates/directives/#live
120
109
  */
121
- export declare const live: (value: unknown) => never;
122
- export {};
110
+ export const live: (value: unknown) => never;