@arcgis/lumina 4.33.0-next.61 → 4.33.0-next.63

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.
@@ -1,9 +1,8 @@
1
- import type { CSSResultGroup, CSSResultOrNative, PropertyValues } from "lit";
2
- import { LitElement as OriginalLitElement } from "lit";
3
- import type { LuminaPropertyDeclaration } from "@arcgis/components-controllers";
4
- import type { Runtime } from "./runtime";
5
- import type { ProxyComponent } from "./lazyLoad";
6
- import type { ToElement } from "./jsx/types";
1
+ import { CSSResultGroup, CSSResultOrNative, PropertyValues, LitElement as OriginalLitElement } from 'lit';
2
+ import { LuminaPropertyDeclaration } from '@arcgis/components-controllers';
3
+ import { Runtime } from './runtime';
4
+ import { ProxyComponent } from './lazyLoad';
5
+ import { ToElement } from './jsx/types';
7
6
  type ComponentLifecycle = {
8
7
  connectedCallback?: () => void;
9
8
  disconnectedCallback?: () => void;
@@ -83,7 +82,7 @@ export declare class LitElement extends OriginalLitElement implements ComponentL
83
82
  * Controller Manager orchestrates all controllers used by this component,
84
83
  * connecting their lifecycle hooks and providing context information.
85
84
  */
86
- manager: import("@arcgis/components-controllers").ControllerManager<never>;
85
+ manager: import('@arcgis/components-controllers').ControllerManager<never>;
87
86
  /**
88
87
  * Map with keys for any properties that have changed since the last
89
88
  * update cycle with previous values.
package/dist/config.js CHANGED
@@ -1,9 +1,16 @@
1
- import {
2
- PropertyFlags,
3
- lazyMetaGroupJoiner,
4
- lazyMetaItemJoiner,
5
- lazyMetaSubItemJoiner
6
- } from "./chunk-PGHUBTOM.js";
1
+ const lazyMetaGroupJoiner = ";";
2
+ const lazyMetaItemJoiner = ",";
3
+ const lazyMetaSubItemJoiner = ":";
4
+ var PropertyFlags = /* @__PURE__ */ ((PropertyFlags2) => {
5
+ PropertyFlags2[PropertyFlags2["ATTRIBUTE"] = 1] = "ATTRIBUTE";
6
+ PropertyFlags2[PropertyFlags2["REFLECT"] = 2] = "REFLECT";
7
+ PropertyFlags2[PropertyFlags2["BOOLEAN"] = 4] = "BOOLEAN";
8
+ PropertyFlags2[PropertyFlags2["NUMBER"] = 8] = "NUMBER";
9
+ PropertyFlags2[PropertyFlags2["STATE"] = 16] = "STATE";
10
+ PropertyFlags2[PropertyFlags2["READ_ONLY"] = 32] = "READ_ONLY";
11
+ PropertyFlags2[PropertyFlags2["NO_ACCESSOR"] = 64] = "NO_ACCESSOR";
12
+ return PropertyFlags2;
13
+ })(PropertyFlags || {});
7
14
  export {
8
15
  PropertyFlags,
9
16
  lazyMetaGroupJoiner,
package/dist/context.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { type ControllerHost } from "@arcgis/components-controllers";
2
- import { ContextConsumer, ContextProvider, type Context, type ContextType } from "@lit/context";
1
+ import { ControllerHost } from '@arcgis/components-controllers';
2
+ import { ContextConsumer, ContextProvider, Context, ContextType } from '@lit/context';
3
3
  interface ContextProviderOptions<C extends Context<unknown, unknown>> {
4
4
  context: C;
5
5
  initialValue?: ContextType<C>;
@@ -1,4 +1,4 @@
1
- import type { BaseComponent, EventEmitter } from "@arcgis/components-controllers";
1
+ import { BaseComponent, EventEmitter } from '@arcgis/components-controllers';
2
2
  /**
3
3
  * While these defaults don't match DOM defaults (all false), they match
4
4
  * Stencil and Shoelace defaults. Also, they make more sense for our
@@ -1,5 +1,5 @@
1
- import type { LuminaPropertyDeclaration } from "@arcgis/components-controllers";
2
- export { state } from "@lit/reactive-element/decorators/state.js";
1
+ import { LuminaPropertyDeclaration } from '@arcgis/components-controllers';
2
+ export { state } from '@lit/reactive-element/decorators/state.js';
3
3
  /**
4
4
  * A class field or accessor decorator which creates a reactive property that
5
5
  * reflects a corresponding attribute value. When a decorated property is set
@@ -1,4 +1,4 @@
1
- import type { LitElement } from "./LitElement";
1
+ import { LitElement } from './LitElement';
2
2
  /**
3
3
  * When in lazy-build, the actual Lit element is never attached to the DOM.
4
4
  * Instead, a proxy element is present and should be used for all DOM actions.
@@ -1,4 +1,4 @@
1
- import type { ModuleNamespace } from "vite/types/hot.js";
1
+ import { ModuleNamespace } from 'vite/types/hot.js';
2
2
  /**
3
3
  * Update web component proxies when a module is updated.
4
4
  *
@@ -1,10 +1,4 @@
1
- import {
2
- ProxyComponent,
3
- noShadowRoot
4
- } from "./chunk-G6X7CCIS.js";
5
- import "./chunk-PGHUBTOM.js";
6
-
7
- // src/hmrSupport.ts
1
+ import { n as noShadowRoot, P as ProxyComponent } from "./utils-bwkfmUnb.js";
8
2
  import { camelToKebab } from "@arcgis/components-utils";
9
3
  function handleHmrUpdate(newModules) {
10
4
  newModules.forEach((newModule) => {
package/dist/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
- export { useContextProvider, useContextConsumer } from "./context";
2
- export type { EventOptions } from "./createEvent";
3
- export { createEvent } from "./createEvent";
4
- export { state, property, method } from "./decorators";
5
- export type { DefineCustomElements, LazyLoadOptions, GlobalThisWithPuppeteerEnv } from "./lazyLoad";
6
- export { makeDefineCustomElements } from "./lazyLoad";
7
- export { LitElement } from "./LitElement";
8
- export type { PublicLitElement } from "./PublicLitElement";
9
- export type { Runtime, RuntimeOptions, DevOnlyGlobalRuntime, DevOnlyGlobalComponentRefCallback } from "./runtime";
10
- export { makeRuntime } from "./runtime";
11
- export type { EventHandler } from "./jsx/baseTypes";
12
- export * from "./jsx/types";
13
- export { safeClassMap, safeStyleMap, directive, live } from "./jsx/directives";
14
- export { nothing, noChange, setAttribute, stringOrBoolean } from "./jsx/utils";
15
- export { noShadowRoot } from "./utils";
16
- export { makeReactWrapperFactory, getReactWrapperOptions } from "./wrappersUtils";
1
+ export { useContextProvider, useContextConsumer } from './context';
2
+ export type { EventOptions } from './createEvent';
3
+ export { createEvent } from './createEvent';
4
+ export { state, property, method } from './decorators';
5
+ export type { DefineCustomElements, LazyLoadOptions, GlobalThisWithPuppeteerEnv } from './lazyLoad';
6
+ export { makeDefineCustomElements } from './lazyLoad';
7
+ export { LitElement } from './LitElement';
8
+ export type { PublicLitElement } from './PublicLitElement';
9
+ export type { Runtime, RuntimeOptions, DevOnlyGlobalRuntime, DevOnlyGlobalComponentRefCallback } from './runtime';
10
+ export { makeRuntime } from './runtime';
11
+ export type { EventHandler } from './jsx/baseTypes';
12
+ export * from './jsx/types';
13
+ export { safeClassMap, safeStyleMap, directive, live } from './jsx/directives';
14
+ export { nothing, noChange, setAttribute, stringOrBoolean } from './jsx/utils';
15
+ export { noShadowRoot } from './utils';
16
+ export { makeReactWrapperFactory, getReactWrapperOptions } from './wrappersUtils';
package/dist/index.js CHANGED
@@ -1,13 +1,17 @@
1
- import {
2
- attachToAncestor,
3
- makeDefineCustomElements,
4
- noShadowRoot
5
- } from "./chunk-G6X7CCIS.js";
6
- import "./chunk-PGHUBTOM.js";
7
-
8
- // src/context.ts
9
- import { retrieveComponent } from "@arcgis/components-controllers";
10
- import { ContextConsumer, ContextProvider } from "@lit/context";
1
+ import { retrieveComponent, trackKey, keyTrackResolve, useControllerManager } from "@arcgis/components-controllers";
2
+ import { ContextProvider, ContextConsumer } from "@lit/context";
3
+ import { isEsriInternalEnv, Deferred, camelToKebab } from "@arcgis/components-utils";
4
+ import { state } from "@lit/reactive-element/decorators/state.js";
5
+ import { property as property$1 } from "@lit/reactive-element/decorators/property.js";
6
+ import { n as noShadowRoot, a as attachToAncestor } from "./utils-bwkfmUnb.js";
7
+ import { m } from "./utils-bwkfmUnb.js";
8
+ import { LitElement as LitElement$1, isServer } from "lit";
9
+ import { PropertyFlags } from "./config.js";
10
+ import { classMap } from "lit-html/directives/class-map.js";
11
+ import { styleMap } from "lit/directives/style-map.js";
12
+ import { directive as directive$1 } from "lit-html/directive.js";
13
+ import { live as live$1 } from "lit-html/directives/live.js";
14
+ import { nothing as nothing$1, noChange as noChange$1 } from "lit-html";
11
15
  function useContextProvider(options) {
12
16
  const component = retrieveComponent();
13
17
  const controller = new ContextProvider(component.el, options);
@@ -20,11 +24,7 @@ function useContextConsumer(options) {
20
24
  component.addController(controller);
21
25
  return controller;
22
26
  }
23
-
24
- // src/createEvent.ts
25
- import { retrieveComponent as retrieveComponent2, keyTrackResolve, trackKey } from "@arcgis/components-controllers";
26
- import { isEsriInternalEnv } from "@arcgis/components-utils";
27
- var createEventFactory = (eventName = "", options = {}, component = retrieveComponent2()) => {
27
+ const createEventFactory = (eventName = "", options = {}, component = retrieveComponent()) => {
28
28
  const emitter = {
29
29
  emit: (payload) => {
30
30
  if (process.env.NODE_ENV !== "production" && isEsriInternalEnv() && !component.el.isConnected) {
@@ -63,62 +63,21 @@ var createEventFactory = (eventName = "", options = {}, component = retrieveComp
63
63
  }
64
64
  return emitter;
65
65
  };
66
- var createEvent = createEventFactory.bind(null, "");
67
-
68
- // src/decorators.ts
69
- import { state } from "@lit/reactive-element/decorators/state.js";
70
- import { property as litProperty } from "@lit/reactive-element/decorators/property.js";
71
- var property = litProperty;
72
- var method = void 0;
73
-
74
- // src/LitElement.ts
75
- import { Deferred, camelToKebab, isEsriInternalEnv as isEsriInternalEnv2 } from "@arcgis/components-utils";
76
- import { LitElement as OriginalLitElement, isServer } from "lit";
77
- import { useControllerManager } from "@arcgis/components-controllers";
78
- var emptyFunction = () => void 0;
79
- var LitElement = class _LitElement extends OriginalLitElement {
66
+ const createEvent = createEventFactory.bind(null, "");
67
+ const property = property$1;
68
+ const method = void 0;
69
+ const emptyFunction = () => void 0;
70
+ class LitElement extends LitElement$1 {
80
71
  constructor() {
81
72
  super();
82
- /**
83
- * In lazy build, the actual DOM element differs from the class instance:
84
- * - "this.el" is a proxy custom element - it's physically present in the DOM
85
- * even before the Lit component is loaded.
86
- * - "this" is the actual Lit component - in case of Lazy builds, it's
87
- * never directly attached to the DOM. Instead, all interactions with the
88
- * proxy are forwarded to the actual Lit component. And, when Lit wants to
89
- * render, it renders into the shadow root of the proxy.
90
- *
91
- * "this.el" should be used instead of "this" for all things involving the
92
- * DOM (addEventListener, querySelector, children, setAttribute,
93
- * MutationObserver, etc...)
94
- *
95
- * @example
96
- * ```ts
97
- * // Generally, you shouldn't have to write logic specific to lazy or non-lazy
98
- * // build, but if you have to, you can detect if you are in a lazy build like so:
99
- * const isLazy = this.el !== this;
100
- * ```
101
- */
102
73
  this.el = this.constructor.lazy ?? this;
103
- /**
104
- * Controller Manager orchestrates all controllers used by this component,
105
- * connecting their lifecycle hooks and providing context information.
106
- */
107
74
  this.manager = useControllerManager(this);
108
- /** @internal */
109
75
  this._postLoad = this.constructor.lazy?._postLoad ?? new Deferred();
110
- /**
111
- * Direct offspring that should be awaited before loaded() is emitted.
112
- *
113
- * `attachToAncestor()` will add elements to this array
114
- *
115
- * @internal
116
- */
117
76
  this._offspring = this.constructor.lazy?._offspring ?? [];
118
77
  this._postLoaded = this.constructor.lazy?._postLoaded ?? new Deferred();
119
78
  this._enableUpdating = this.enableUpdating;
120
79
  this.enableUpdating = emptyFunction;
121
- const ourShouldUpdate = _LitElement.prototype.shouldUpdate;
80
+ const ourShouldUpdate = LitElement.prototype.shouldUpdate;
122
81
  if (this.shouldUpdate !== ourShouldUpdate) {
123
82
  this._originalShouldUpdate = this.shouldUpdate;
124
83
  this.shouldUpdate = ourShouldUpdate;
@@ -128,11 +87,11 @@ var LitElement = class _LitElement extends OriginalLitElement {
128
87
  this.el.tagName.toLowerCase()
129
88
  );
130
89
  const constructor = this.constructor;
131
- const warningsWereCustomized = constructor.enabledWarnings !== OriginalLitElement.enabledWarnings;
90
+ const warningsWereCustomized = constructor.enabledWarnings !== LitElement$1.enabledWarnings;
132
91
  if (!isOwnComponent && !warningsWereCustomized) {
133
92
  constructor.disableWarning?.("change-in-update");
134
93
  }
135
- if (isEsriInternalEnv2()) {
94
+ if (isEsriInternalEnv()) {
136
95
  globalThis.devOnly$luminaComponentRefCallback?.(this);
137
96
  }
138
97
  }
@@ -171,18 +130,18 @@ var LitElement = class _LitElement extends OriginalLitElement {
171
130
  *
172
131
  * Thus, overwriting Lit's default behavior to use kebab-case:
173
132
  */
174
- attribute: !!(flags & 1 /* ATTRIBUTE */) && typeof name === "string" ? camelToKebab(name) : false,
175
- reflect: !!(flags & 2 /* REFLECT */),
176
- type: flags & 4 /* BOOLEAN */ ? Boolean : flags & 8 /* NUMBER */ ? Number : void 0,
133
+ attribute: !!(flags & PropertyFlags.ATTRIBUTE) && typeof name === "string" ? camelToKebab(name) : false,
134
+ reflect: !!(flags & PropertyFlags.REFLECT),
135
+ type: flags & PropertyFlags.BOOLEAN ? Boolean : flags & PropertyFlags.NUMBER ? Number : void 0,
177
136
  /**
178
137
  * At the moment in Lit, state:true just means attribute:false, so this
179
138
  * line is technically redundant, but let's keep it here just in case Lit
180
139
  * will add more meaning to state:true in the future.
181
140
  */
182
- state: !!(flags & 16 /* STATE */),
141
+ state: !!(flags & PropertyFlags.STATE),
183
142
  // Controllers add this option to Lit
184
- readOnly: !!(flags & 32 /* READ_ONLY */),
185
- noAccessor: !!(flags & 64 /* NO_ACCESSOR */),
143
+ readOnly: !!(flags & PropertyFlags.READ_ONLY),
144
+ noAccessor: !!(flags & PropertyFlags.NO_ACCESSOR),
186
145
  ...rest
187
146
  });
188
147
  }
@@ -219,13 +178,9 @@ var LitElement = class _LitElement extends OriginalLitElement {
219
178
  const options = Class.shadowRootOptions;
220
179
  const useLightDom = options === noShadowRoot;
221
180
  const renderRoot = existingShadowRoot ?? (useLightDom ? this.el : this.el.attachShadow(options));
222
- Object.defineProperty(this, "shadowRoot", {
223
- // Create shadow root on the proxy instance, to make Lit render content there
224
- value: renderRoot
225
- });
226
181
  if (existingShadowRoot) {
227
182
  if (process.env.NODE_ENV === "production") {
228
- OriginalLitElement.prototype.createRenderRoot.call(this);
183
+ LitElement$1.prototype.createRenderRoot.call(this);
229
184
  }
230
185
  return existingShadowRoot;
231
186
  }
@@ -297,18 +252,15 @@ var LitElement = class _LitElement extends OriginalLitElement {
297
252
  await this._postLoaded.promise;
298
253
  return this;
299
254
  }
300
- };
255
+ }
301
256
  LitElement.$createEvent = createEventFactory;
302
- if (process.env.NODE_ENV !== "production" && isEsriInternalEnv2()) {
257
+ if (process.env.NODE_ENV !== "production" && isEsriInternalEnv()) {
303
258
  const globalWithLit = globalThis;
304
259
  globalWithLit.litIssuedWarnings ??= /* @__PURE__ */ new Set();
305
260
  globalWithLit.litIssuedWarnings.add(
306
261
  "Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators See https://lit.dev/msg/no-override-create-property for more information."
307
262
  );
308
263
  }
309
-
310
- // src/runtime.ts
311
- import { isEsriInternalEnv as isEsriInternalEnv3 } from "@arcgis/components-utils";
312
264
  function makeRuntime(options) {
313
265
  let assetPath;
314
266
  const setAssetPath = (path) => {
@@ -351,33 +303,22 @@ function makeRuntime(options) {
351
303
  }
352
304
  };
353
305
  setAssetPath(options.defaultAssetPath);
354
- if (process.env.NODE_ENV !== "production" && isEsriInternalEnv3()) {
306
+ if (process.env.NODE_ENV !== "production" && isEsriInternalEnv()) {
355
307
  globalThis.devOnly$luminaRuntime = runtime;
356
308
  }
357
309
  return runtime;
358
310
  }
359
-
360
- // src/jsx/types.ts
361
- var Fragment = void 0;
362
- var bindAttribute = void 0;
363
- var bindBooleanAttribute = void 0;
364
- var bindProperty = void 0;
365
- var bindEvent = void 0;
366
-
367
- // src/jsx/directives.ts
368
- import { classMap } from "lit-html/directives/class-map.js";
369
- import { styleMap } from "lit/directives/style-map.js";
370
- import { directive as litDirective } from "lit-html/directive.js";
371
- import { live as litLive } from "lit-html/directives/live.js";
372
- var safeClassMap = (parameters) => typeof parameters === "object" && parameters != null ? classMap(parameters) : parameters;
373
- var safeStyleMap = (parameters) => typeof parameters === "object" && parameters != null ? styleMap(parameters) : parameters;
374
- var directive = litDirective;
375
- var live = litLive;
376
-
377
- // src/jsx/utils.ts
378
- import { noChange as litNoChange, nothing as litNothing } from "lit-html";
379
- var nothing = litNothing;
380
- var noChange = litNoChange;
311
+ const Fragment = void 0;
312
+ const bindAttribute = void 0;
313
+ const bindBooleanAttribute = void 0;
314
+ const bindProperty = void 0;
315
+ const bindEvent = void 0;
316
+ const safeClassMap = (parameters) => typeof parameters === "object" && parameters != null ? classMap(parameters) : parameters;
317
+ const safeStyleMap = (parameters) => typeof parameters === "object" && parameters != null ? styleMap(parameters) : parameters;
318
+ const directive = directive$1;
319
+ const live = live$1;
320
+ const nothing = nothing$1;
321
+ const noChange = noChange$1;
381
322
  function setAttribute(element, attributeName, value) {
382
323
  if (value == null) {
383
324
  element.removeAttribute(attributeName);
@@ -385,13 +326,11 @@ function setAttribute(element, attributeName, value) {
385
326
  element.setAttribute(attributeName, value);
386
327
  }
387
328
  }
388
- var stringOrBoolean = {
329
+ const stringOrBoolean = {
389
330
  toAttribute: (value) => value === true ? "" : value === false ? null : value
390
331
  };
391
-
392
- // src/wrappersUtils.ts
393
- var emptyObject = {};
394
- var makeReactWrapperFactory = (react, createComponent) => (options) => {
332
+ const emptyObject = {};
333
+ const makeReactWrapperFactory = (react, createComponent) => (options) => {
395
334
  const tagName = options.tagName;
396
335
  let customElementPrototype = emptyObject;
397
336
  const elementClass = {
@@ -429,7 +368,7 @@ var makeReactWrapperFactory = (react, createComponent) => (options) => {
429
368
  customElementPrototype = void 0;
430
369
  return result;
431
370
  };
432
- var getReactWrapperOptions = (tagNameAndElement, events) => ({ tagName: tagNameAndElement, events });
371
+ const getReactWrapperOptions = (tagNameAndElement, events) => ({ tagName: tagNameAndElement, events });
433
372
  export {
434
373
  Fragment,
435
374
  LitElement,
@@ -441,7 +380,7 @@ export {
441
380
  directive,
442
381
  getReactWrapperOptions,
443
382
  live,
444
- makeDefineCustomElements,
383
+ m as makeDefineCustomElements,
445
384
  makeReactWrapperFactory,
446
385
  makeRuntime,
447
386
  method,
@@ -1,5 +1,5 @@
1
- import type { DirectiveResult } from "lit-html/directive.js";
2
- import type { Ref } from "lit-html/directives/ref.js";
1
+ import { DirectiveResult } from 'lit-html/directive.js';
2
+ import { Ref } from 'lit-html/directives/ref.js';
3
3
  export type EventHandlerUnion<T, E extends Event> = (e: E & {
4
4
  currentTarget: T;
5
5
  target: Element;
@@ -1,10 +1,10 @@
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
- import type { DirectiveClass } from "lit-html/directive.js";
1
+ import { Nil } from '@arcgis/components-utils';
2
+ import { Properties as CssProperties } from 'csstype';
3
+ import { ClassInfo } from 'lit-html/directives/class-map.js';
4
+ import { DirectiveResult } from 'lit/directive.js';
5
+ import { ClassMapDirective } from 'lit/directives/class-map.js';
6
+ import { StyleMapDirective } from 'lit/directives/style-map.js';
7
+ import { DirectiveClass } from 'lit-html/directive.js';
8
8
  /**
9
9
  * You likely won't have to import this directly. It will be added during
10
10
  * _JSX to lit-html_ conversion.
@@ -1,13 +1,9 @@
1
- /**
2
- * Parts of this file are auto-generated or auto-updated by the `generate-jsx-types`
3
- * script.
4
- */
5
- import type { DirectiveResult } from "lit/directive.js";
6
- import type { ClassInfo, ClassMapDirective } from "lit/directives/class-map.js";
7
- import type { StyleMapDirective } from "lit/directives/style-map.js";
8
- import type { ChangeEventHandlerUnion, CustomAttributes, EventHandlerUnion, FocusEventHandlerUnion, InputEventHandlerUnion } from "./baseTypes";
9
- import type { JsxNode } from "./types";
10
- import type { Properties as CssProperties } from "csstype";
1
+ import { DirectiveResult } from 'lit/directive.js';
2
+ import { ClassInfo, ClassMapDirective } from 'lit/directives/class-map.js';
3
+ import { StyleMapDirective } from 'lit/directives/style-map.js';
4
+ import { ChangeEventHandlerUnion, CustomAttributes, EventHandlerUnion, FocusEventHandlerUnion, InputEventHandlerUnion } from './baseTypes';
5
+ import { JsxNode } from './types';
6
+ import { Properties as CssProperties } from 'csstype';
11
7
  /**
12
8
  * Some attributes accepts numbers as a number or as a string, while also
13
9
  * accepting "inherit". Define the type as `number | string | "inherit"` rather
@@ -1,15 +1,7 @@
1
- /**
2
- * This reference directive is removed by tsup at compile time. It is only
3
- * needed to correctly type-check this package. For consumers of this package,
4
- * they should have an `./src/lumina.ts` file like so:
5
- * ```ts
6
- * /// <reference types="@arcgis/lumina/typings" />
7
- * ```
8
- */
9
- import type { TemplateResult } from "lit-html";
10
- import type { DirectiveResult } from "lit-html/directive.js";
11
- import type { HTMLElementTags, HTMLAttributes, GlobalEventHandlersCamelCase, SvgElementTags, DOMAttributes, AriaAttributes } from "./generatedTypes";
12
- import type { CustomAttributes } from "./baseTypes";
1
+ import { TemplateResult } from 'lit-html';
2
+ import { DirectiveResult } from 'lit-html/directive.js';
3
+ import { HTMLElementTags, HTMLAttributes, GlobalEventHandlersCamelCase, SvgElementTags, DOMAttributes, AriaAttributes } from './generatedTypes';
4
+ import { CustomAttributes } from './baseTypes';
13
5
  /**
14
6
  * The "h" namespace is used to import JSX types for elements and attributes.
15
7
  * It is imported in order to avoid conflicting global JSX issues.
@@ -1,7 +1,7 @@
1
- import { Deferred } from "@arcgis/components-utils";
2
- import type { LitElement } from "./LitElement";
3
- import type { Runtime } from "./runtime";
4
- import type { ControllerManager } from "@arcgis/components-controllers";
1
+ import { Deferred } from '@arcgis/components-utils';
2
+ import { LitElement } from './LitElement';
3
+ import { Runtime } from './runtime';
4
+ import { ControllerManager } from '@arcgis/components-controllers';
5
5
  /**
6
6
  * Defines lazy-loading proxy components for all web components in this package.
7
7
  *
@@ -1,4 +1,4 @@
1
- import type { ProxyComponent } from "./lazyLoad";
1
+ import { ProxyComponent } from './lazyLoad';
2
2
  /**
3
3
  * If there is a parent component, tell it to await it's loaded() until we
4
4
  * completed load().
package/dist/runtime.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { CSSResult } from "lit";
2
- import type { LitElement } from "./LitElement";
1
+ import { CSSResult } from 'lit';
2
+ import { LitElement } from './LitElement';
3
3
  /**
4
4
  * `@arcgis/lumina` package may be bundled once but used by multiple packages with
5
5
  * different configuration options. For that reason, the configuration options
@@ -1,9 +1,5 @@
1
- /**
2
- * Lots of silencing of ESLint in this file to be compatible with Stencil's
3
- * unsafe typings.
4
- */
5
- import { type RenderInfo } from "@lit-labs/ssr/lib/render.js";
6
- import type { Readable } from "node:stream";
1
+ import { RenderInfo } from '@lit-labs/ssr/lib/render.js';
2
+ import { Readable } from 'node:stream';
7
3
  /**
8
4
  * @deprecated
9
5
  * Use `render` from `@lit-labs/ssr` instead.
@@ -1,11 +1,10 @@
1
- // src/stencilSsrCompatibility/index.ts
2
1
  import { getWindow } from "@lit-labs/ssr/lib/dom-shim.js";
3
2
  import { render } from "@lit-labs/ssr/lib/render.js";
4
3
  import { html } from "@lit-labs/ssr/lib/server-template.js";
5
- import { unsafeStatic, withStatic } from "lit-html/static.js";
4
+ import { withStatic, unsafeStatic } from "lit-html/static.js";
6
5
  import { collectResult } from "@lit-labs/ssr/lib/render-result.js";
7
6
  import { RenderResultReadable } from "@lit-labs/ssr/lib/render-result-readable.js";
8
- var staticHtml = withStatic(html);
7
+ const staticHtml = withStatic(html);
9
8
  function createWindowFromHtml(templateHtml, uniqueId = Math.random().toString()) {
10
9
  const window = getWindow({ includeJSBuiltIns: true });
11
10
  window.document.defaultView = window;
@@ -7,7 +7,7 @@ interface ImportMetaEnv {
7
7
  }
8
8
  interface ImportMeta {
9
9
  url: string;
10
- readonly hot?: import("vite/types/hot.d.ts").ViteHotContext;
10
+ readonly hot?: import('vite/types/hot.d.ts').ViteHotContext;
11
11
  readonly env: ImportMetaEnv;
12
- glob: import("vite/types/importGlob.d.ts").ImportGlobFunction;
12
+ glob: import('vite/types/importGlob.d.ts').ImportGlobFunction;
13
13
  }
@@ -1,13 +1,5 @@
1
- import {
2
- lazyMetaGroupJoiner,
3
- lazyMetaItemJoiner,
4
- lazyMetaSubItemJoiner
5
- } from "./chunk-PGHUBTOM.js";
6
-
7
- // src/lazyLoad.ts
8
- import { Deferred, camelToKebab, isEsriInternalEnv } from "@arcgis/components-utils";
9
-
10
- // src/devOnlyDetectIncorrectLazyUsages.ts
1
+ import { Deferred, isEsriInternalEnv, camelToKebab } from "@arcgis/components-utils";
2
+ import { lazyMetaSubItemJoiner, lazyMetaGroupJoiner, lazyMetaItemJoiner } from "./config.js";
11
3
  function devOnlyDetectIncorrectLazyUsages(LitClass) {
12
4
  const genericPrototype = LitClass.prototype;
13
5
  const descriptor = Object.getOwnPropertyDescriptor(genericPrototype, "innerText");
@@ -56,8 +48,6 @@ function devOnlyDetectIncorrectLazyUsages(LitClass) {
56
48
  }
57
49
  });
58
50
  }
59
-
60
- // src/lifecycleSupport.ts
61
51
  function attachToAncestor(child) {
62
52
  let ancestor = child;
63
53
  while (ancestor = ancestor.parentNode ?? ancestor.host) {
@@ -71,9 +61,7 @@ function attachToAncestor(child) {
71
61
  }
72
62
  return false;
73
63
  }
74
-
75
- // src/lazyLoad.ts
76
- var makeDefineCustomElements = (runtime, structure) => function defineCustomElements(windowOrOptions, options) {
64
+ const makeDefineCustomElements = (runtime, structure) => function defineCustomElements(windowOrOptions, options) {
77
65
  if (!globalThis.customElements) {
78
66
  return;
79
67
  }
@@ -121,35 +109,19 @@ function createLazyElement([tagName, [load, compactMeta = ""]]) {
121
109
  globalThis.devOnly$ownTagNames?.add(tagName);
122
110
  }
123
111
  }
124
- var defineProperty = Object.defineProperty;
112
+ const defineProperty = Object.defineProperty;
125
113
  function parseCondensedProp(propAndAttribute) {
126
114
  const name = propAndAttribute.split(lazyMetaSubItemJoiner);
127
115
  return name.length === 1 ? [name[0], camelToKebab(name[0])] : name;
128
116
  }
129
- var HtmlElement = globalThis.HTMLElement ?? parseCondensedProp;
130
- var ProxyComponent = class extends HtmlElement {
117
+ const HtmlElement = globalThis.HTMLElement ?? parseCondensedProp;
118
+ class ProxyComponent extends HtmlElement {
131
119
  constructor() {
132
120
  super();
133
- /** @internal */
134
121
  this._store = {};
135
- /**
136
- * If attributeChangedCallback() is called before the LitElement is loaded,
137
- * store the attributes here, and replay later
138
- */
139
122
  this._pendingAttributes = [];
140
- /**
141
- * Resolved once LitElement's load() is complete.
142
- * Not read inside of this class, but needed for LitElement to determine if
143
- * it's closest ancestor finished load()
144
- */
145
123
  this._postLoad = new Deferred();
146
- /**
147
- * Resolved once LitElement's loaded() is complete
148
- */
149
124
  this._postLoaded = new Deferred();
150
- /**
151
- * Direct offspring that should be awaited before loaded() is emitted
152
- */
153
125
  this._offspring = [];
154
126
  if (process.env.NODE_ENV !== "production" && isEsriInternalEnv()) {
155
127
  this._hmrSetProps = /* @__PURE__ */ new Set();
@@ -384,7 +356,7 @@ var ProxyComponent = class extends HtmlElement {
384
356
  requestUpdate() {
385
357
  this._litElement?.requestUpdate();
386
358
  }
387
- };
359
+ }
388
360
  function syncLitElement([key, value]) {
389
361
  this[key] = value;
390
362
  }
@@ -409,17 +381,14 @@ function patchLitElement(parentClass) {
409
381
  devOnlyDetectIncorrectLazyUsages(parentClass);
410
382
  }
411
383
  }
412
- var awaitTopLevelPolyfill = async (module) => {
384
+ const awaitTopLevelPolyfill = async (module) => {
413
385
  await module.$$;
414
386
  return module;
415
387
  };
416
-
417
- // src/utils.ts
418
- var noShadowRoot = {};
419
-
388
+ const noShadowRoot = {};
420
389
  export {
421
- attachToAncestor,
422
- makeDefineCustomElements,
423
- ProxyComponent,
424
- noShadowRoot
390
+ ProxyComponent as P,
391
+ attachToAncestor as a,
392
+ makeDefineCustomElements as m,
393
+ noShadowRoot as n
425
394
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/lumina",
3
- "version": "4.33.0-next.61",
3
+ "version": "4.33.0-next.63",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -20,8 +20,8 @@
20
20
  ],
21
21
  "license": "SEE LICENSE IN LICENSE.md",
22
22
  "dependencies": {
23
- "@arcgis/components-controllers": "4.33.0-next.61",
24
- "@arcgis/components-utils": "4.33.0-next.61",
23
+ "@arcgis/components-controllers": "4.33.0-next.63",
24
+ "@arcgis/components-utils": "4.33.0-next.63",
25
25
  "@lit-labs/ssr": "^3.2.2",
26
26
  "@lit-labs/ssr-client": "^1.1.7",
27
27
  "@lit/context": "^1.1.3",
@@ -1,21 +0,0 @@
1
- // src/config.ts
2
- var lazyMetaGroupJoiner = ";";
3
- var lazyMetaItemJoiner = ",";
4
- var lazyMetaSubItemJoiner = ":";
5
- var PropertyFlags = /* @__PURE__ */ ((PropertyFlags2) => {
6
- PropertyFlags2[PropertyFlags2["ATTRIBUTE"] = 1] = "ATTRIBUTE";
7
- PropertyFlags2[PropertyFlags2["REFLECT"] = 2] = "REFLECT";
8
- PropertyFlags2[PropertyFlags2["BOOLEAN"] = 4] = "BOOLEAN";
9
- PropertyFlags2[PropertyFlags2["NUMBER"] = 8] = "NUMBER";
10
- PropertyFlags2[PropertyFlags2["STATE"] = 16] = "STATE";
11
- PropertyFlags2[PropertyFlags2["READ_ONLY"] = 32] = "READ_ONLY";
12
- PropertyFlags2[PropertyFlags2["NO_ACCESSOR"] = 64] = "NO_ACCESSOR";
13
- return PropertyFlags2;
14
- })(PropertyFlags || {});
15
-
16
- export {
17
- lazyMetaGroupJoiner,
18
- lazyMetaItemJoiner,
19
- lazyMetaSubItemJoiner,
20
- PropertyFlags
21
- };
@@ -1 +0,0 @@
1
- export {};