@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.
- package/dist/LitElement.d.ts +6 -7
- package/dist/config.js +13 -6
- package/dist/context.d.ts +2 -2
- package/dist/createEvent.d.ts +1 -1
- package/dist/decorators.d.ts +2 -2
- package/dist/devOnlyDetectIncorrectLazyUsages.d.ts +1 -1
- package/dist/hmrSupport.d.ts +1 -1
- package/dist/hmrSupport.js +1 -7
- package/dist/index.d.ts +16 -16
- package/dist/index.js +49 -110
- package/dist/jsx/baseTypes.d.ts +2 -2
- package/dist/jsx/directives.d.ts +7 -7
- package/dist/jsx/generatedTypes.d.ts +6 -10
- package/dist/jsx/types.d.ts +4 -12
- package/dist/lazyLoad.d.ts +4 -4
- package/dist/lifecycleSupport.d.ts +1 -1
- package/dist/runtime.d.ts +2 -2
- package/dist/stencilSsrCompatibility/index.d.ts +2 -6
- package/dist/stencilSsrCompatibility/index.js +2 -3
- package/dist/typings/importMeta.d.ts +2 -2
- package/dist/{chunk-G6X7CCIS.js → utils-bwkfmUnb.js} +13 -44
- package/package.json +3 -3
- package/dist/chunk-PGHUBTOM.js +0 -21
- package/dist/wrappersUtils.test.d.ts +0 -1
package/dist/LitElement.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
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(
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 {
|
|
2
|
-
import { ContextConsumer, ContextProvider,
|
|
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>;
|
package/dist/createEvent.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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
|
package/dist/decorators.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { state } from
|
|
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
|
package/dist/hmrSupport.d.ts
CHANGED
package/dist/hmrSupport.js
CHANGED
|
@@ -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
|
|
2
|
-
export type { EventOptions } from
|
|
3
|
-
export { createEvent } from
|
|
4
|
-
export { state, property, method } from
|
|
5
|
-
export type { DefineCustomElements, LazyLoadOptions, GlobalThisWithPuppeteerEnv } from
|
|
6
|
-
export { makeDefineCustomElements } from
|
|
7
|
-
export { LitElement } from
|
|
8
|
-
export type { PublicLitElement } from
|
|
9
|
-
export type { Runtime, RuntimeOptions, DevOnlyGlobalRuntime, DevOnlyGlobalComponentRefCallback } from
|
|
10
|
-
export { makeRuntime } from
|
|
11
|
-
export type { EventHandler } from
|
|
12
|
-
export * from
|
|
13
|
-
export { safeClassMap, safeStyleMap, directive, live } from
|
|
14
|
-
export { nothing, noChange, setAttribute, stringOrBoolean } from
|
|
15
|
-
export { noShadowRoot } from
|
|
16
|
-
export { makeReactWrapperFactory, getReactWrapperOptions } from
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "
|
|
6
|
-
import "./
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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 =
|
|
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 !==
|
|
90
|
+
const warningsWereCustomized = constructor.enabledWarnings !== LitElement$1.enabledWarnings;
|
|
132
91
|
if (!isOwnComponent && !warningsWereCustomized) {
|
|
133
92
|
constructor.disableWarning?.("change-in-update");
|
|
134
93
|
}
|
|
135
|
-
if (
|
|
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 &
|
|
175
|
-
reflect: !!(flags &
|
|
176
|
-
type: flags &
|
|
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 &
|
|
141
|
+
state: !!(flags & PropertyFlags.STATE),
|
|
183
142
|
// Controllers add this option to Lit
|
|
184
|
-
readOnly: !!(flags &
|
|
185
|
-
noAccessor: !!(flags &
|
|
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
|
-
|
|
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" &&
|
|
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" &&
|
|
306
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv()) {
|
|
355
307
|
globalThis.devOnly$luminaRuntime = runtime;
|
|
356
308
|
}
|
|
357
309
|
return runtime;
|
|
358
310
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
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
|
-
|
|
329
|
+
const stringOrBoolean = {
|
|
389
330
|
toAttribute: (value) => value === true ? "" : value === false ? null : value
|
|
390
331
|
};
|
|
391
|
-
|
|
392
|
-
|
|
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
|
-
|
|
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,
|
package/dist/jsx/baseTypes.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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;
|
package/dist/jsx/directives.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
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
|
package/dist/jsx/types.d.ts
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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.
|
package/dist/lazyLoad.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Deferred } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
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
|
*
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
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(
|
|
10
|
+
readonly hot?: import('vite/types/hot.d.ts').ViteHotContext;
|
|
11
11
|
readonly env: ImportMetaEnv;
|
|
12
|
-
glob: import(
|
|
12
|
+
glob: import('vite/types/importGlob.d.ts').ImportGlobFunction;
|
|
13
13
|
}
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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
|
-
|
|
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
|
-
|
|
130
|
-
|
|
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
|
-
|
|
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
|
-
|
|
422
|
-
|
|
423
|
-
|
|
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.
|
|
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.
|
|
24
|
-
"@arcgis/components-utils": "4.33.0-next.
|
|
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",
|
package/dist/chunk-PGHUBTOM.js
DELETED
|
@@ -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 {};
|