@arcgis/lumina 4.32.0-next.79 → 4.32.0-next.80
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/{chunk-J3BVM76V.js → chunk-6HCCSL5F.js} +11 -11
- package/dist/hmrSupport.js +1 -1
- package/dist/index.js +10 -10
- package/package.json +3 -3
|
@@ -117,7 +117,7 @@ function createLazyElement([tagName, [load, compactMeta = ""]]) {
|
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
119
|
customElements.define(tagName, ProxyClass);
|
|
120
|
-
if (
|
|
120
|
+
if (process.env.NODE_ENV !== "production") {
|
|
121
121
|
globalThis.devOnly$ownTagNames?.add(tagName);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -151,7 +151,7 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
151
151
|
* Direct offspring that should be awaited before loaded() is emitted
|
|
152
152
|
*/
|
|
153
153
|
this._offspring = [];
|
|
154
|
-
if (
|
|
154
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv()) {
|
|
155
155
|
this._hmrSetProps = /* @__PURE__ */ new Set();
|
|
156
156
|
this._hmrSetAttributes = /* @__PURE__ */ new Set();
|
|
157
157
|
globalThis.devOnly$createdElements ??= [];
|
|
@@ -169,7 +169,7 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
169
169
|
});
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
|
-
if (
|
|
172
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv()) {
|
|
173
173
|
ProxyClass._hmrInstances ??= [];
|
|
174
174
|
ProxyClass._hmrInstances.push(new WeakRef(this));
|
|
175
175
|
Object.defineProperty(this, "_store", {
|
|
@@ -197,7 +197,7 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
197
197
|
},
|
|
198
198
|
set(value) {
|
|
199
199
|
this._store[propName] = value;
|
|
200
|
-
if (
|
|
200
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv()) {
|
|
201
201
|
this._hmrSetProps.add(propName);
|
|
202
202
|
}
|
|
203
203
|
}
|
|
@@ -218,7 +218,7 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
218
218
|
static _bindSync(methodName) {
|
|
219
219
|
defineProperty(this.prototype, methodName, {
|
|
220
220
|
value(...args) {
|
|
221
|
-
if (
|
|
221
|
+
if (process.env.NODE_ENV !== "production" && !this._litElement) {
|
|
222
222
|
const ProxyClass = this.constructor;
|
|
223
223
|
throw new Error(
|
|
224
224
|
`Tried to call method ${methodName}() on <${ProxyClass._name}> component before it's fully loaded. Please do 'await component.componentOnReady();' before calling this method.`
|
|
@@ -279,7 +279,7 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
279
279
|
if (!this._litElement) {
|
|
280
280
|
this._pendingAttributes.push(name);
|
|
281
281
|
}
|
|
282
|
-
if (
|
|
282
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv()) {
|
|
283
283
|
this._hmrSetAttributes.add(name);
|
|
284
284
|
}
|
|
285
285
|
}
|
|
@@ -310,12 +310,12 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
310
310
|
const LitConstructor = Object.values(module).find(
|
|
311
311
|
(LitConstructor2) => LitConstructor2.tagName === tagName
|
|
312
312
|
);
|
|
313
|
-
if (
|
|
313
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv() && !LitConstructor) {
|
|
314
314
|
throw new Error(
|
|
315
315
|
`Unable to find the LitElement class for the "${tagName}" custom element in the lazy-loaded module`
|
|
316
316
|
);
|
|
317
317
|
}
|
|
318
|
-
const lazyTagName =
|
|
318
|
+
const lazyTagName = process.env.NODE_ENV !== "production" && isEsriInternalEnv() ? (ProxyClass._hmrIndex ?? 0) === 0 ? `${tagName}--lazy` : `${tagName}--lazy-${ProxyClass._hmrIndex}` : `${tagName}--lazy`;
|
|
319
319
|
let parentClass = LitConstructor;
|
|
320
320
|
while (parentClass && !Object.hasOwn(parentClass, "lumina")) {
|
|
321
321
|
parentClass = Object.getPrototypeOf(parentClass);
|
|
@@ -336,7 +336,7 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
336
336
|
}
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
|
-
if (
|
|
339
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv()) {
|
|
340
340
|
devOnlyDetectIncorrectLazyUsages(parentClass);
|
|
341
341
|
}
|
|
342
342
|
const isFirstInitialization = !ProxyClass._LitConstructor;
|
|
@@ -347,7 +347,7 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
347
347
|
LitConstructor.lazy = this;
|
|
348
348
|
const litElement = document.createElement(lazyTagName);
|
|
349
349
|
LitConstructor.lazy = void 0;
|
|
350
|
-
if (
|
|
350
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv()) {
|
|
351
351
|
Object.defineProperty(this, "_litElement", {
|
|
352
352
|
value: litElement,
|
|
353
353
|
configurable: true,
|
|
@@ -367,7 +367,7 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
367
367
|
);
|
|
368
368
|
});
|
|
369
369
|
Object.entries(store).forEach(syncLitElement, litElement);
|
|
370
|
-
if (
|
|
370
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv()) {
|
|
371
371
|
const litObserved = LitConstructor.observedAttributes ?? [];
|
|
372
372
|
const lazyObserved = ProxyClass.observedAttributes ?? [];
|
|
373
373
|
const missingFromLazy = litObserved.filter((attribute) => !lazyObserved.includes(attribute));
|
package/dist/hmrSupport.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
attachToAncestor,
|
|
3
3
|
makeDefineCustomElements,
|
|
4
4
|
noShadowRoot
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6HCCSL5F.js";
|
|
6
6
|
import "./chunk-PGHUBTOM.js";
|
|
7
7
|
|
|
8
8
|
// src/context.ts
|
|
@@ -27,14 +27,14 @@ import { isEsriInternalEnv } from "@arcgis/components-utils";
|
|
|
27
27
|
var createEventFactory = (eventName = "", options = {}, component = retrieveComponent2()) => {
|
|
28
28
|
const emitter = {
|
|
29
29
|
emit: (payload) => {
|
|
30
|
-
if (
|
|
30
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv() && !component.el.isConnected) {
|
|
31
31
|
console.warn(
|
|
32
32
|
`Trying to emit an ${eventName} event on a disconnected element ${component.el.tagName.toLowerCase()}`
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
if (eventName === "") {
|
|
36
36
|
keyTrackResolve();
|
|
37
|
-
if (
|
|
37
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv() && eventName === "") {
|
|
38
38
|
throw new Error("Unable to resolve event name from property name");
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -53,7 +53,7 @@ var createEventFactory = (eventName = "", options = {}, component = retrieveComp
|
|
|
53
53
|
trackKey(
|
|
54
54
|
void 0,
|
|
55
55
|
(resolution) => {
|
|
56
|
-
if (
|
|
56
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv() && resolution === void 0) {
|
|
57
57
|
throw new Error(`createEvent must be called in property default value only`);
|
|
58
58
|
}
|
|
59
59
|
eventName = resolution.key;
|
|
@@ -123,7 +123,7 @@ var LitElement = class _LitElement extends OriginalLitElement {
|
|
|
123
123
|
this._originalShouldUpdate = this.shouldUpdate;
|
|
124
124
|
this.shouldUpdate = ourShouldUpdate;
|
|
125
125
|
}
|
|
126
|
-
if (
|
|
126
|
+
if (process.env.NODE_ENV !== "production") {
|
|
127
127
|
const isOwnComponent = globalThis.devOnly$ownTagNames?.has(
|
|
128
128
|
this.el.tagName.toLowerCase()
|
|
129
129
|
);
|
|
@@ -144,7 +144,7 @@ var LitElement = class _LitElement extends OriginalLitElement {
|
|
|
144
144
|
* Customize Lit's default style handling to support non-shadow-root styles
|
|
145
145
|
*/
|
|
146
146
|
static finalizeStyles(styles) {
|
|
147
|
-
if (
|
|
147
|
+
if (process.env.NODE_ENV === "test" && Array.isArray(styles)) {
|
|
148
148
|
styles = styles.filter(Boolean);
|
|
149
149
|
}
|
|
150
150
|
const finalizedStyles = super.finalizeStyles(styles);
|
|
@@ -224,7 +224,7 @@ var LitElement = class _LitElement extends OriginalLitElement {
|
|
|
224
224
|
value: renderRoot
|
|
225
225
|
});
|
|
226
226
|
if (existingShadowRoot) {
|
|
227
|
-
if (
|
|
227
|
+
if (process.env.NODE_ENV === "production") {
|
|
228
228
|
OriginalLitElement.prototype.createRenderRoot.call(this);
|
|
229
229
|
}
|
|
230
230
|
return existingShadowRoot;
|
|
@@ -296,7 +296,7 @@ var LitElement = class _LitElement extends OriginalLitElement {
|
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
LitElement.$createEvent = createEventFactory;
|
|
299
|
-
if (
|
|
299
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv2()) {
|
|
300
300
|
const globalWithLit = globalThis;
|
|
301
301
|
globalWithLit.litIssuedWarnings ??= /* @__PURE__ */ new Set();
|
|
302
302
|
globalWithLit.litIssuedWarnings.add(
|
|
@@ -328,7 +328,7 @@ function makeRuntime(options) {
|
|
|
328
328
|
* For Node.js without a DOM environment, `location?.href` is undefined so
|
|
329
329
|
* all is good.
|
|
330
330
|
*/
|
|
331
|
-
|
|
331
|
+
process.env.NODE_ENV === "test" ? globalThis.location?.href === "about:blank" ? void 0 : globalThis.location?.href || void 0 : globalThis.location?.href || void 0
|
|
332
332
|
).href;
|
|
333
333
|
};
|
|
334
334
|
const runtime = {
|
|
@@ -348,7 +348,7 @@ function makeRuntime(options) {
|
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
350
|
setAssetPath(options.defaultAssetPath);
|
|
351
|
-
if (
|
|
351
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv3()) {
|
|
352
352
|
globalThis.devOnly$luminaRuntime = runtime;
|
|
353
353
|
}
|
|
354
354
|
return runtime;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/lumina",
|
|
3
|
-
"version": "4.32.0-next.
|
|
3
|
+
"version": "4.32.0-next.80",
|
|
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.32.0-next.
|
|
24
|
-
"@arcgis/components-utils": "4.32.0-next.
|
|
23
|
+
"@arcgis/components-controllers": "4.32.0-next.80",
|
|
24
|
+
"@arcgis/components-utils": "4.32.0-next.80",
|
|
25
25
|
"@lit-labs/ssr": "^3.2.2",
|
|
26
26
|
"@lit-labs/ssr-client": "^1.1.7",
|
|
27
27
|
"@lit/context": "^1.1.3",
|