@arcgis/lumina 4.32.0-next.21 → 4.32.0-next.22

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.
@@ -2,7 +2,6 @@ import { Deferred } from "@arcgis/components-utils";
2
2
  import type { LitElement } from "./LitElement";
3
3
  import type { Runtime } from "./runtime";
4
4
  import type { ControllerManager } from "@arcgis/components-controllers";
5
- import type { PublicLitElement } from "./PublicLitElement";
6
5
  /**
7
6
  * Defines lazy-loading proxy components for all web components in this package.
8
7
  *
@@ -16,6 +15,9 @@ export interface DefineCustomElements {
16
15
  export type LazyLoadOptions = {
17
16
  readonly resourcesUrl?: string;
18
17
  };
18
+ interface CommonInterface extends HTMLElement {
19
+ componentOnReady: () => Promise<this>;
20
+ }
19
21
  export declare const makeDefineCustomElements: (runtime: Runtime, structure: Readonly<Record<string, CompactMeta>>) => DefineCustomElements;
20
22
  /**
21
23
  * Use compact meta to reduce bundle size (otherwise, it would be ~65kb for
@@ -106,7 +108,7 @@ export declare abstract class ProxyComponent extends HtmlElement {
106
108
  /**
107
109
  * Direct offspring that should be awaited before loaded() is emitted
108
110
  */
109
- _offspring: (PublicLitElement & {
111
+ _offspring: (CommonInterface & {
110
112
  manager?: LitElement["manager"];
111
113
  })[];
112
114
  /**
@@ -162,6 +164,7 @@ export declare abstract class ProxyComponent extends HtmlElement {
162
164
  */
163
165
  requestUpdate(): void;
164
166
  }
167
+ /** @private */
165
168
  export type GlobalThisWithPuppeteerEnv = typeof globalThis & {
166
169
  devOnly$createdElements?: WeakRef<ProxyComponent>[];
167
170
  };
package/dist/runtime.d.ts CHANGED
@@ -92,6 +92,8 @@ export declare function makeRuntime(options?: RuntimeOptions): Runtime;
92
92
  /**
93
93
  * Exposing the reference to the runtime globally when in tests or development.
94
94
  * This is primarily for usage by dynamically created components in tests
95
+ *
96
+ * @private
95
97
  */
96
98
  export type DevOnlyGlobalRuntime = typeof globalThis & {
97
99
  devOnly$luminaRuntime?: Runtime;
@@ -99,6 +101,8 @@ export type DevOnlyGlobalRuntime = typeof globalThis & {
99
101
  /**
100
102
  * Called from the component constructor when in development or test mode.
101
103
  * Used primarily by mount to get a reference to the rendered component.
104
+ *
105
+ * @private
102
106
  */
103
107
  export type DevOnlyGlobalComponentRefCallback = typeof globalThis & {
104
108
  devOnly$luminaComponentRefCallback?: (component: LitElement) => void;
@@ -1,4 +1,8 @@
1
- export {};
1
+ /**
2
+ * This file is used for internal type checking only. It should not be
3
+ * referenced in public types of your package to not pollute the global types
4
+ * namespace
5
+ */
2
6
  declare global {
3
7
  /**
4
8
  * This interface will be extended in each source file that defines a LitElement.
@@ -19,23 +23,17 @@ declare global {
19
23
  };
20
24
  interface HTMLElementTagNameMap extends ReMappedDeclareElements {
21
25
  }
22
- /**
23
- * Extend this interface with Stencil web components that you wish to use
24
- * in Lit
25
- *
26
- * @example
27
- * ```ts
28
- * import type { JSX as CalciteJSX } from "@esri/calcite-components/dist/types/components";
29
- * import type { JSX as CommonComponentsJsx } from "@arcgis/common-components/dist/types/components";
30
- *
31
- * declare global {
32
- * interface ImportStencilElements
33
- * extends CalciteJSX.IntrinsicElements,
34
- * CommonComponentsJsx.IntrinsicElements {
35
- * }
36
- * }
37
- * ```
38
- */
39
- export interface ImportStencilElements {
26
+ }
27
+ export interface DeclareElements extends globalThis.DeclareElements {
28
+ }
29
+ /**
30
+ * In the component files, we declare "DeclareElements" interface on the
31
+ * `declare global` namespace as it's shorter than writing
32
+ * `declare module "@arcgis/lumina"`. However, we want to avoid polluting
33
+ * global typings with this interface - thus we use namespace merging to
34
+ * extend the namespaced DeclareElements based on the global DeclareElements.
35
+ */
36
+ declare module "../jsx/jsx" {
37
+ interface DeclareElements extends globalThis.DeclareElements {
40
38
  }
41
39
  }
@@ -5,5 +5,7 @@
5
5
  * Because the custom element may not yet be defined in global scope when
6
6
  * `createPrototypeProxy()` is called, this small proxy delays retrieving the custom
7
7
  * element prototype until it is actually needed, and caches the result for future calls.
8
+ *
9
+ * @private
8
10
  */
9
11
  export declare function createPrototypeProxy<T extends HTMLElement>(tagName: string): new () => T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/lumina",
3
- "version": "4.32.0-next.21",
3
+ "version": "4.32.0-next.22",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -8,6 +8,7 @@
8
8
  "exports": {
9
9
  ".": "./dist/index.js",
10
10
  "./config": "./dist/config.js",
11
+ "./hmrSupport": "./dist/hmrSupport.js",
11
12
  "./stencilSsrCompatibility": "./dist/stencilSsrCompatibility/index.js",
12
13
  "./typings": {
13
14
  "types": "./dist/typings/index.d.ts"
@@ -19,8 +20,8 @@
19
20
  ],
20
21
  "license": "SEE LICENSE IN LICENSE.md",
21
22
  "dependencies": {
22
- "@arcgis/components-controllers": "4.32.0-next.21",
23
- "@arcgis/components-utils": "4.32.0-next.21",
23
+ "@arcgis/components-controllers": "4.32.0-next.22",
24
+ "@arcgis/components-utils": "4.32.0-next.22",
24
25
  "@lit-labs/ssr": "^3.2.2",
25
26
  "@lit-labs/ssr-client": "^1.1.7",
26
27
  "@lit/context": "^1.1.3",