@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,48 +1,6 @@
1
- import { ProxyComponent } from './lazyLoad.ts';
2
- import { LitElement } from './LitElement.ts';
3
- /**
4
- * Web platform allows custom elements to define these methods to handle the
5
- * corresponding form events. For performance reasons, the engines require that
6
- * these methods are present when the customElements.define() is called - it
7
- * means that we need to include them in the lazy proxy as well.
8
- *
9
- * The lazy proxy today only creates the methods proxies the first time a proxy
10
- * element of that tag name is created, which is too late.
11
- *
12
- * We could update the proxy to define the method proxies right away. Some cons
13
- * with that:
14
- * - In lazy builds, most components are never loaded, so I want to keep the
15
- * per-proxy overhead minimal.
16
- * - To handle this form event, the component would need to define a
17
- * corresponding method with a \@method() decorator (to ensure it is present
18
- * on the proxy), and the method needs to be async (so that the lazy proxy
19
- * knows to await component loading before calling the method)
20
- * - If you forget to add \@method(), lazy proxy won't proxy this method. If
21
- * you forget to make it async, lazy proxy will error if the component is
22
- * not loaded yet. These are not obvious constraints from lazy-loading, and
23
- * do not match the examples online/copilot. We may need lint rules about
24
- * this.
25
- * - Such API is not composable - if the method needs to be present on the
26
- * component, it is hard for a controller to handle it, creating wiring
27
- * boilerplate.
28
- *
29
- * To address these concerns, the proxy does the following:
30
- * - Always define these methods on the prototype (harmless for
31
- * non-form-associated components). The methods are created once, so no
32
- * per-proxy overhead.
33
- * - The proxy waits for component to be loaded. This avoids a race condition of
34
- * event being emitted before the constructor is lazy-loaded, and keeps timing
35
- * consistent with non-lazy builds.
36
- * - The proxy will emit a corresponding event on itself. The component or any
37
- * controller can choose to listen to these events. The event does not bubble
38
- * and does not compose, so will have minimum visibility outside the component.
39
- * - To keep the non-lazy behavior aligned, we also emit such events on itself
40
- * in non-lazy builds.
41
- */
42
1
  export interface FormAssociatedEvents {
43
- luminaFormAssociatedCallback: CustomEvent<readonly [form: HTMLFormElement | null]>;
44
- luminaFormDisabledCallback: CustomEvent<readonly [disabled: boolean]>;
45
- luminaFormResetCallback: CustomEvent<readonly []>;
46
- luminaFormStateRestoreCallback: CustomEvent<readonly [state: unknown, mode: "autocomplete" | "restore"]>;
47
- }
48
- export declare function proxyFormMethodsToEvents(constructor: typeof LitElement | typeof ProxyComponent): void;
2
+ luminaFormAssociatedCallback: CustomEvent<readonly [form: HTMLFormElement | null]>;
3
+ luminaFormDisabledCallback: CustomEvent<readonly [disabled: boolean]>;
4
+ luminaFormResetCallback: CustomEvent<readonly []>;
5
+ luminaFormStateRestoreCallback: CustomEvent<readonly [state: unknown, mode: "autocomplete" | "restore"]>;
6
+ }
@@ -1,13 +1,21 @@
1
- interface ImportMetaEnv {
2
- [key: string]: any;
3
- BASE_URL: string;
4
- MODE: string;
5
- DEV: boolean;
6
- PROD: boolean;
7
- }
8
- interface ImportMeta {
1
+
2
+
3
+ /** @public */
4
+ declare global {
5
+ interface ImportMeta {
9
6
  url: string;
10
- readonly hot?: import('vite/types/hot.d.ts').ViteHotContext;
7
+
8
+ readonly hot?: import("vite/types/hot.d.ts").ViteHotContext;
9
+
11
10
  readonly env: ImportMetaEnv;
12
- glob: import('vite/types/importGlob.d.ts').ImportGlobFunction;
11
+
12
+ glob: import("vite/types/importGlob.d.ts").ImportGlobFunction;
13
+ }
13
14
  }
15
+
16
+ export type ImportMetaEnv = { [key: string]: any; } & {
17
+ BASE_URL: string;
18
+ MODE: string;
19
+ DEV: boolean;
20
+ PROD: boolean;
21
+ };
@@ -1,4 +1,6 @@
1
- /// <reference path="jsxGlobals.d.ts" preserve="true" />
2
- /// <reference path="loadLitCss.d.ts" preserve="true" />
3
- /// <reference path="viteEnv.d.ts" preserve="true" />
4
- /// <reference path="importMeta.d.ts" preserve="true" />
1
+ /// <reference path="./loadLitCss.d.ts" preserve="true" />
2
+ /// <reference path="./viteEnv.d.ts" preserve="true" />
3
+ /// <reference path="./importMeta.d.ts" preserve="true" />
4
+
5
+ export type * from "./jsxGlobals.js";
6
+
@@ -3,30 +3,42 @@
3
3
  * referenced in public types of your package to not pollute the global types
4
4
  * namespace
5
5
  */
6
+
7
+ /**
8
+ * This file is used for internal type checking only. It should not be
9
+ * referenced in public types of your package to not pollute the global types
10
+ * namespace
11
+ *
12
+ * @public
13
+ */
6
14
  declare global {
7
- /**
8
- * This interface will be extended in each source file that defines a LitElement.
9
- *
10
- * @example
11
- * ```ts
12
- * declare global {
13
- * interface DeclareElements {
14
- * "arcgis-root": ArcgisRoot;
15
- * }
16
- * }
17
- * ```
18
- */
19
- export interface DeclareElements {
20
- }
21
- type ReMappedDeclareElements = {
22
- [TagName in keyof DeclareElements]: DeclareElements[TagName]["el"];
23
- };
24
- interface HTMLElementTagNameMap extends ReMappedDeclareElements {
25
- }
26
- }
27
- export interface DeclareElements extends globalThis.DeclareElements {
15
+ /**
16
+ * This interface will be extended in each source file that defines a LitElement.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * declare global {
21
+ * interface DeclareElements {
22
+ * "arcgis-root": ArcgisRoot;
23
+ * }
24
+ * }
25
+ * ```
26
+ */
27
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
28
+ export interface DeclareElements {}
29
+
30
+ type ReMappedDeclareElements = {
31
+ [TagName in keyof DeclareElements]: DeclareElements[TagName]["el"];
32
+ };
33
+
34
+ interface HTMLElementTagNameMap extends ReMappedDeclareElements {}
28
35
  }
36
+
37
+
38
+
29
39
  /**
40
+ * @public
41
+ * @privateRemarks
30
42
  * In the component files, we declare "DeclareElements" interface on the
31
43
  * `declare global` namespace as it's shorter than writing
32
44
  * `declare module "@arcgis/lumina"`. However, we want to avoid polluting
@@ -34,6 +46,7 @@ export interface DeclareElements extends globalThis.DeclareElements {
34
46
  * extend the namespaced DeclareElements based on the global DeclareElements.
35
47
  */
36
48
  declare module "../jsx/types.ts" {
37
- interface DeclareElements extends globalThis.DeclareElements {
38
- }
49
+ export interface DeclareElements extends globalThis.DeclareElements {}
39
50
  }
51
+
52
+ export interface DeclareElements extends globalThis.DeclareElements {}
@@ -4,59 +4,80 @@
4
4
  *
5
5
  * @see `@arcgis/lumina-compiler/plugins/loadLitCss.ts`
6
6
  */
7
+
8
+ /**
9
+ * Tell TypeScript that .css imports will be replaced by Lit's CSSResult at
10
+ * build-time.
11
+ *
12
+ * @public
13
+ * @see `@arcgis/lumina-compiler/plugins/loadLitCss.ts`
14
+ */
7
15
  declare module "*.css" {
8
- import type { CSSResult } from "lit";
9
- export const styles: CSSResult & {
10
- get styleSheet(): CSSStyleSheet;
11
- };
12
- export default styles;
16
+ import type { CSSResult } from "lit";
17
+ export const styles: CSSResult & { get styleSheet(): CSSStyleSheet };
18
+ export default styles;
13
19
  }
20
+
21
+
22
+
23
+ /** @public */
14
24
  declare module "*.scss" {
15
- import type { CSSResult } from "lit";
16
- export const styles: CSSResult & {
17
- get styleSheet(): CSSStyleSheet;
18
- };
19
- export default styles;
25
+ import type { CSSResult } from "lit";
26
+ export const styles: CSSResult & { get styleSheet(): CSSStyleSheet };
27
+ export default styles;
20
28
  }
29
+
30
+
31
+
32
+ /** @public */
21
33
  declare module "*.sass" {
22
- import type { CSSResult } from "lit";
23
- export const styles: CSSResult & {
24
- get styleSheet(): CSSStyleSheet;
25
- };
26
- export default styles;
34
+ import type { CSSResult } from "lit";
35
+ export const styles: CSSResult & { get styleSheet(): CSSStyleSheet };
36
+ export default styles;
27
37
  }
38
+
39
+
40
+
41
+ /** @public */
28
42
  declare module "*.less" {
29
- import type { CSSResult } from "lit";
30
- export const styles: CSSResult & {
31
- get styleSheet(): CSSStyleSheet;
32
- };
33
- export default styles;
43
+ import type { CSSResult } from "lit";
44
+ export const styles: CSSResult & { get styleSheet(): CSSStyleSheet };
45
+ export default styles;
34
46
  }
47
+
48
+
49
+
50
+ /** @public */
35
51
  declare module "*.styl" {
36
- import type { CSSResult } from "lit";
37
- export const styles: CSSResult & {
38
- get styleSheet(): CSSStyleSheet;
39
- };
40
- export default styles;
52
+ import type { CSSResult } from "lit";
53
+ export const styles: CSSResult & { get styleSheet(): CSSStyleSheet };
54
+ export default styles;
41
55
  }
56
+
57
+
58
+
59
+ /** @public */
42
60
  declare module "*.stylus" {
43
- import type { CSSResult } from "lit";
44
- export const styles: CSSResult & {
45
- get styleSheet(): CSSStyleSheet;
46
- };
47
- export default styles;
61
+ import type { CSSResult } from "lit";
62
+ export const styles: CSSResult & { get styleSheet(): CSSStyleSheet };
63
+ export default styles;
48
64
  }
65
+
66
+
67
+
68
+ /** @public */
49
69
  declare module "*.pcss" {
50
- import type { CSSResult } from "lit";
51
- export const styles: CSSResult & {
52
- get styleSheet(): CSSStyleSheet;
53
- };
54
- export default styles;
70
+ import type { CSSResult } from "lit";
71
+ export const styles: CSSResult & { get styleSheet(): CSSStyleSheet };
72
+ export default styles;
55
73
  }
74
+
75
+
76
+
77
+ /** @public */
56
78
  declare module "*.sss" {
57
- import type { CSSResult } from "lit";
58
- export const styles: CSSResult & {
59
- get styleSheet(): CSSStyleSheet;
60
- };
61
- export default styles;
79
+ import type { CSSResult } from "lit";
80
+ export const styles: CSSResult & { get styleSheet(): CSSStyleSheet };
81
+ export default styles;
62
82
  }
83
+
@@ -2,47 +2,81 @@
2
2
  * The following are a subset of types from vite/client.d.ts
3
3
  * Removed the types related to static assets since we handle assets differently
4
4
  */
5
+
6
+ // TEST: add a canary test for when this file get's out of date with Vite
7
+
8
+ /**
9
+ * The following are a subset of types from vite/client.d.ts
10
+ * Removed the types related to static assets since we handle assets differently
11
+ *
12
+ * @public
13
+ */
5
14
  declare module "*.wasm?init" {
6
- const initWasm: (options?: WebAssembly.Imports) => Promise<WebAssembly.Instance>;
7
- export default initWasm;
15
+ const initWasm: (options?: WebAssembly.Imports) => Promise<WebAssembly.Instance>;
16
+ export default initWasm;
8
17
  }
18
+
19
+
20
+
21
+ /** @public */
9
22
  declare module "*?worker" {
10
- const workerConstructor: new (options?: {
11
- name?: string;
12
- }) => Worker;
13
- export default workerConstructor;
23
+ const workerConstructor: new (options?: { name?: string }) => Worker;
24
+ export default workerConstructor;
14
25
  }
26
+
27
+
28
+
29
+ /** @public */
15
30
  declare module "*?worker&inline" {
16
- const workerConstructor: new (options?: {
17
- name?: string;
18
- }) => Worker;
19
- export default workerConstructor;
31
+ const workerConstructor: new (options?: { name?: string }) => Worker;
32
+ export default workerConstructor;
20
33
  }
34
+
35
+
36
+
37
+ /** @public */
21
38
  declare module "*?worker&url" {
22
- const src: string;
23
- export default src;
39
+ const src: string;
40
+ export default src;
24
41
  }
42
+
43
+
44
+
45
+ /** @public */
25
46
  declare module "*?sharedworker" {
26
- const sharedWorkerConstructor: new (options?: {
27
- name?: string;
28
- }) => SharedWorker;
29
- export default sharedWorkerConstructor;
47
+ const sharedWorkerConstructor: new (options?: { name?: string }) => SharedWorker;
48
+ export default sharedWorkerConstructor;
30
49
  }
50
+
51
+
52
+
53
+ /** @public */
31
54
  declare module "*?sharedworker&inline" {
32
- const sharedWorkerConstructor: new (options?: {
33
- name?: string;
34
- }) => SharedWorker;
35
- export default sharedWorkerConstructor;
55
+ const sharedWorkerConstructor: new (options?: { name?: string }) => SharedWorker;
56
+ export default sharedWorkerConstructor;
36
57
  }
58
+
59
+
60
+
61
+ /** @public */
37
62
  declare module "*?sharedworker&url" {
38
- const src: string;
39
- export default src;
63
+ const src: string;
64
+ export default src;
40
65
  }
66
+
67
+
68
+
69
+ /** @public */
41
70
  declare module "*?raw" {
42
- const src: string;
43
- export default src;
71
+ const src: string;
72
+ export default src;
44
73
  }
74
+
75
+
76
+
77
+ /** @public */
45
78
  declare module "*?inline" {
46
- const src: string;
47
- export default src;
79
+ const src: string;
80
+ export default src;
48
81
  }
82
+
@@ -1,35 +1,31 @@
1
- import { ModuleNamespace } from 'vite/types/hot.js';
2
- /**
3
- * Update web component proxies when a module is updated.
4
- *
5
- * @remarks
6
- * You should not need to call this function directly - it will be inserted
7
- * automatically when running in serve mode.
8
- *
9
- * @private
10
- */
11
- export declare function handleHmrUpdate(newModules: (ModuleNamespace | undefined)[]): void;
12
- /** @private */
1
+ /** @internal */
13
2
  export type HmrComponentMeta = {
14
- readonly tagName: string;
15
- /**
16
- * 2nd tuple element ("attribute") is missing when attribute name can be
17
- * trivially inferred from the property name (using camelToKebab()).
18
- * If 2nd tuple element is empty string, it means the property does not have
19
- * an attribute.
20
- */
21
- readonly properties: (readonly [property: string, attribute: string] | readonly [property: string])[];
22
- readonly asyncMethods: readonly string[];
23
- readonly syncMethods: readonly string[];
24
- readonly formAssociated: boolean;
3
+ /** @internal */
4
+ readonly tagName: string;
5
+ /**
6
+ * 2nd tuple element ("attribute") is missing when attribute name can be
7
+ * trivially inferred from the property name (using camelToKebab()).
8
+ * If 2nd tuple element is empty string, it means the property does not have
9
+ * an attribute.
10
+ *
11
+ * @internal
12
+ */
13
+ readonly properties: (readonly [property: string, attribute: string] | readonly [property: string])[];
14
+ /** @internal */
15
+ readonly asyncMethods: readonly string[];
16
+ /** @internal */
17
+ readonly syncMethods: readonly string[];
18
+ /** @internal */
19
+ readonly formAssociated: boolean;
25
20
  };
21
+
26
22
  /**
27
- * Update lazy component meta
23
+ * Update lazy component meta.
28
24
  *
29
- * @remarks
30
- * You should not need to call this function directly - it will be inserted
25
+ * You should not need to call this function directly - it will be called
31
26
  * automatically when running in serve mode.
32
27
  *
33
- * @private
28
+ * @param meta
29
+ * @internal
34
30
  */
35
- export declare function handleComponentMetaUpdate(meta: HmrComponentMeta): void;
31
+ export function handleComponentMetaUpdate(meta: HmrComponentMeta): void;
package/dist/index.d.ts CHANGED
@@ -1,16 +1,17 @@
1
- export type { EventEmitter, EventOptions } from './createEvent.ts';
2
- export { createEvent } from './createEvent.ts';
3
- export { state, property, method } from './decorators.ts';
4
- export type { DefineCustomElements, LazyLoadOptions, GlobalThisWithPuppeteerEnv } from './lazyLoad.ts';
5
- export { makeDefineCustomElements } from './lazyLoad.ts';
6
- export { LitElement, disableReactiveUtilsIntegration } from './LitElement.ts';
7
- export type { PublicLitElement } from './PublicLitElement.ts';
8
- export type { Runtime, RuntimeOptions, DevOnlyGlobalRuntime, DevOnlyGlobalComponentRefCallback, } from './makeRuntime.ts';
9
- export { makeRuntime } from './makeRuntime.ts';
10
- export type { EventHandler } from './jsx/baseTypes.ts';
11
- export * from './jsx/types.ts';
12
- export { safeClassMap, safeStyleMap, deferLoad, deferredLoaders, stabilizedRef, directive, live, } from './jsx/directives.ts';
13
- export { nothing, noChange, setAttribute, stringOrBoolean } from './jsx/utils.ts';
14
- export { noShadowRoot, devOnly$getLitElementTagNameAndRuntime } from './utils.ts';
15
- export { makeReactWrapperFactory, getReactWrapperOptions } from './wrappersUtils.ts';
16
- export { renderElement } from './render.ts';
1
+ export { type EventEmitter, type EventOptions } from "./createEvent.js";
2
+ export { createEvent } from "./createEvent.js";
3
+ export { state, property, method } from "./decorators.js";
4
+ export { type DefineCustomElements, type LazyLoadOptions, type GlobalThisWithPuppeteerEnv } from "./lazyLoad.js";
5
+ export { makeDefineCustomElements } from "./lazyLoad.js";
6
+ export { LitElement, disableReactiveUtilsIntegration } from "./LitElement.js";
7
+ export { type PublicLitElement } from "./PublicLitElement.js";
8
+ export { type Runtime, type RuntimeOptions, type DevOnlyGlobalRuntime, type DevOnlyGlobalComponentRefCallback } from "./makeRuntime.js";
9
+ export { makeRuntime } from "./makeRuntime.js";
10
+ export { type EventHandler } from "./jsx/baseTypes.js";
11
+ export * from "./jsx/types.js";
12
+ export { safeClassMap, safeStyleMap, deferLoad, deferredLoaders, stabilizedRef, directive, live } from "./jsx/directives.js";
13
+ export { nothing, noChange, setAttribute, stringOrBoolean } from "./jsx/utils.js";
14
+ export { noShadowRoot, devOnly$getLitElementTagNameAndRuntime } from "./utils.js";
15
+ export { makeReactWrapperFactory, getReactWrapperOptions } from "./wrappersUtils.js";
16
+ export { renderElement } from "./render.js";
17
+
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { p as propertyTrackResolve } from "./Controller-Cer_6Z29.js";
2
- import { c } from "./Controller-Cer_6Z29.js";
1
+ import { p as propertyTrackResolve } from "./GenericController-C8NSb50b.js";
2
+ import { c } from "./GenericController-C8NSb50b.js";
3
3
  import { state } from "lit/decorators/state.js";
4
4
  import { property as property$1 } from "lit/decorators/property.js";
5
5
  import { e as emptyFunction, n as noShadowRoot, p as proxyFormMethodsToEvents, a as attachToAncestor } from "./lazyLoad-B5Rj3U_I.js";
@@ -9,7 +9,7 @@ import { camelToKebab } from "@arcgis/toolkit/string";
9
9
  import { Deferred } from "@arcgis/toolkit/promise";
10
10
  import { LitElement as LitElement$1, isServer, notEqual, noChange as noChange$1, nothing as nothing$1, render } from "lit";
11
11
  import { c as controllerSymbol, s as shouldBypassReadOnly } from "./ControllerInternals-CeDntN3G.js";
12
- import { C as ControllerManager, a as autoDestroyDisabledPropName } from "./ControllerManager-DpJfvft9.js";
12
+ import { C as ControllerManager, a as autoDestroyDisabledPropName } from "./ControllerManager-4cSEnB5Y.js";
13
13
  import { propertyFlagAttribute, propertyFlagUseDefault, propertyFlagNoAccessor, propertyFlagReadOnly, propertyFlagState, propertyFlagBoolean, propertyFlagNumber, propertyFlagReflect } from "./config.js";
14
14
  import { classMap } from "lit/directives/class-map.js";
15
15
  import { styleMap } from "lit/directives/style-map.js";
@@ -19,6 +19,12 @@ import { ref } from "lit/directives/ref.js";
19
19
  const property = property$1;
20
20
  const method = void 0;
21
21
  class LitElement extends LitElement$1 {
22
+ /**
23
+ * @internal
24
+ * @privateRemarks
25
+ * The constructor needs to be public for compatibility with TypeScript's
26
+ * CustomElementConstructor DOM type.
27
+ */
22
28
  constructor() {
23
29
  super();
24
30
  this.M = [];
@@ -171,8 +177,6 @@ class LitElement extends LitElement$1 {
171
177
  /**
172
178
  * The JS API's Accessor observables. This is used to integrate with the JS
173
179
  * API's reactivity system.
174
- *
175
- * @private
176
180
  */
177
181
  #observables;
178
182
  #originalShouldUpdate;
@@ -181,7 +185,8 @@ class LitElement extends LitElement$1 {
181
185
  #trackingTarget;
182
186
  #elementInternals;
183
187
  /**
184
- * @see [MDN ElementInternals](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)
188
+ * @public
189
+ * @see [MDN ElementInternals](https://developer.mozilla.org/docs/Web/API/ElementInternals)
185
190
  */
186
191
  get elementInternals() {
187
192
  this.#elementInternals ??= this.el.attachInternals();
@@ -327,6 +332,13 @@ class LitElement extends LitElement$1 {
327
332
  return () => this.el.removeEventListener(name, boundListener, options);
328
333
  });
329
334
  }
335
+ /**
336
+ * @public
337
+ * @param target
338
+ * @param name
339
+ * @param listener
340
+ * @param options
341
+ */
330
342
  listenOn(target, name, listener, options) {
331
343
  const boundListener = listener?.bind(this) ?? listener;
332
344
  this.manager.onLifecycle(() => {
@@ -337,12 +349,15 @@ class LitElement extends LitElement$1 {
337
349
  /**
338
350
  * Creates a promise that resolves once the component is fully loaded.
339
351
  *
352
+ * @public
340
353
  * @example
354
+ * ```js
341
355
  * const map = document.createElement('arcgis-map');
342
356
  * document.body.append(map);
343
357
  * map.componentOnReady().then(() => {
344
358
  * console.log('Map is ready to go!');
345
359
  * });
360
+ * ```
346
361
  */
347
362
  async componentOnReady() {
348
363
  await this.#postLoadedDeferred.promise;
@@ -352,10 +367,12 @@ class LitElement extends LitElement$1 {
352
367
  * Adds a controller to the host, which connects the controller's lifecycle
353
368
  * methods to the host's lifecycle.
354
369
  *
355
- * @remarks
356
370
  * Even though Lit's LitElement already has addController,
357
371
  * we overwrite it with a compatible version to have more control over
358
372
  * timing, and to add support for load/loaded lifecycle hooks.
373
+ *
374
+ * @public
375
+ * @param controller
359
376
  */
360
377
  addController(controller) {
361
378
  this.M.push(controller);
@@ -365,6 +382,9 @@ class LitElement extends LitElement$1 {
365
382
  }
366
383
  /**
367
384
  * Removes a controller from the host.
385
+ *
386
+ * @public
387
+ * @param controller
368
388
  */
369
389
  removeController(controller) {
370
390
  this.M.splice(this.M.indexOf(controller), 1);
@@ -1,39 +1,39 @@
1
- import { DirectiveResult } from 'lit/directive.js';
2
- import { Ref } from 'lit/directives/ref.js';
3
- export type EventHandlerUnion<T, E extends Event> = (e: E & {
1
+ import type { DirectiveResult } from "lit/directive.js";
2
+ import type { Ref } from "lit/directives/ref.js";
3
+
4
+ /** @param event */
5
+ export type EventHandlerUnion<T, E extends Event> = (event: E & {
4
6
  currentTarget: T;
5
7
  target: Element;
6
8
  }) => void;
7
- export type InputEventHandlerUnion<T, E extends InputEvent> = (e: E & {
9
+
10
+ /** @param event */
11
+ export type InputEventHandlerUnion<T, E extends InputEvent> = (event: E & {
8
12
  currentTarget: T;
9
13
  target: T extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement ? T : Element;
10
14
  }) => void;
11
- export type ChangeEventHandlerUnion<T, E extends Event> = (e: E & {
15
+
16
+ /** @param event */
17
+ export type ChangeEventHandlerUnion<T, E extends Event> = (event: E & {
12
18
  currentTarget: T;
13
19
  target: T extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement ? T : Element;
14
20
  }) => void;
15
- export type FocusEventHandlerUnion<T, E extends FocusEvent> = (e: E & {
21
+
22
+ /** @param event */
23
+ export type FocusEventHandlerUnion<T, E extends FocusEvent> = (event: E & {
16
24
  currentTarget: T;
17
25
  target: T extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement ? T : Element;
18
26
  }) => void;
19
- export type EventHandler<E> = {
20
- bivarianceHack(event: E): void;
21
- }["bivarianceHack"];
27
+
28
+ export type EventHandler<E> = { bivarianceHack(event: E): void; }["bivarianceHack"];
29
+
22
30
  export interface CustomAttributes<T = HTMLElement> {
23
- /**
24
- * [Documentation](https://webgis.esri.com/references/lumina/jsx#key-prop)
25
- */
26
- key?: unknown;
27
- /**
28
- * [Documentation](https://webgis.esri.com/references/lumina/jsx#refs)
29
- */
30
- ref?: EventHandler<T | undefined> | Ref<T>;
31
- /**
32
- * [Documentation](https://webgis.esri.com/references/lumina/jsx#lit-directives)
33
- */
34
- directives?: readonly DirectiveResult[];
35
- /**
36
- * [Documentation](https://webgis.esri.com/references/lumina/jsx#deferring-web-component-load)
37
- */
38
- deferLoad?: true;
39
- }
31
+ /** @see [Documentation](https://webgis.esri.com/references/lumina/jsx#key-prop) */
32
+ key?: unknown;
33
+ /** @see [Documentation](https://webgis.esri.com/references/lumina/jsx#refs) */
34
+ ref?: EventHandler<T | undefined> | Ref<T>;
35
+ /** @see [Documentation](https://webgis.esri.com/references/lumina/jsx#lit-directives) */
36
+ directives?: readonly DirectiveResult[];
37
+ /** @see [Documentation](https://webgis.esri.com/references/lumina/jsx#deferring-web-component-load) */
38
+ deferLoad?: true;
39
+ }