@arcgis/lumina 4.32.0-next.46 → 4.32.0-next.47
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 +8 -0
- package/dist/{chunk-DNENDZQM.js → chunk-X3ERWBSX.js} +3 -0
- package/dist/hmrSupport.js +1 -1
- package/dist/index.js +13 -3
- package/dist/jsx/jsx.d.ts +31 -4
- package/package.json +3 -3
package/dist/LitElement.d.ts
CHANGED
|
@@ -233,4 +233,12 @@ export declare class LitElement extends OriginalLitElement implements ComponentL
|
|
|
233
233
|
type Listener<ThisType, EventType> = ((this: ThisType, event: EventType) => unknown) | {
|
|
234
234
|
handleEvent(event: EventType): unknown;
|
|
235
235
|
};
|
|
236
|
+
/**
|
|
237
|
+
* List of tag names defined by this library.
|
|
238
|
+
*
|
|
239
|
+
* @private
|
|
240
|
+
*/
|
|
241
|
+
export type GlobalThisWithOwnTagNames = typeof globalThis & {
|
|
242
|
+
devOnly$ownTagNames?: Set<string>;
|
|
243
|
+
};
|
|
236
244
|
export {};
|
|
@@ -117,6 +117,9 @@ function createLazyElement([tagName, [load, compactMeta = ""]]) {
|
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
119
|
customElements.define(tagName, ProxyClass);
|
|
120
|
+
if (typeof process === "object" && process.env.NODE_ENV !== "production") {
|
|
121
|
+
globalThis.devOnly$ownTagNames?.add(tagName);
|
|
122
|
+
}
|
|
120
123
|
}
|
|
121
124
|
var defineProperty = Object.defineProperty;
|
|
122
125
|
function parseCondensedProp(propAndAttribute) {
|
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-X3ERWBSX.js";
|
|
6
6
|
import "./chunk-PGHUBTOM.js";
|
|
7
7
|
|
|
8
8
|
// src/context.ts
|
|
@@ -123,8 +123,18 @@ var LitElement = class _LitElement extends OriginalLitElement {
|
|
|
123
123
|
this._originalShouldUpdate = this.shouldUpdate;
|
|
124
124
|
this.shouldUpdate = ourShouldUpdate;
|
|
125
125
|
}
|
|
126
|
-
if (typeof process === "object" && process.env.NODE_ENV !== "production"
|
|
127
|
-
globalThis.devOnly$
|
|
126
|
+
if (typeof process === "object" && process.env.NODE_ENV !== "production") {
|
|
127
|
+
const isOwnComponent = globalThis.devOnly$ownTagNames?.has(
|
|
128
|
+
this.el.tagName.toLowerCase()
|
|
129
|
+
);
|
|
130
|
+
const constructor = this.constructor;
|
|
131
|
+
const warningsWereCustomized = constructor.enabledWarnings !== OriginalLitElement.enabledWarnings;
|
|
132
|
+
if (!isOwnComponent && !warningsWereCustomized) {
|
|
133
|
+
constructor.disableWarning?.("change-in-update");
|
|
134
|
+
}
|
|
135
|
+
if (isEsriInternalEnv2()) {
|
|
136
|
+
globalThis.devOnly$luminaComponentRefCallback?.(this);
|
|
137
|
+
}
|
|
128
138
|
}
|
|
129
139
|
if (isServer) {
|
|
130
140
|
this.el.setAttribute(this.constructor.runtime.hydratedAttribute, "");
|
package/dist/jsx/jsx.d.ts
CHANGED
|
@@ -236,6 +236,12 @@ export interface ImportStencilElements {
|
|
|
236
236
|
* ```
|
|
237
237
|
*
|
|
238
238
|
* @remarks
|
|
239
|
+
* This helper is intended to be used on components defined within the same
|
|
240
|
+
* package. For external components, you can use
|
|
241
|
+
* `HTMLArcgisMapElement["arcgisViewClick"]` directly, without need for
|
|
242
|
+
* `ToEvents<>`.
|
|
243
|
+
*
|
|
244
|
+
* @remarks
|
|
239
245
|
* Alternative implementation of this type that is simpler, and potentially
|
|
240
246
|
* more performant, but looses "go to definition" information.
|
|
241
247
|
*
|
|
@@ -262,6 +268,30 @@ export type ToEvents<Component> = GlobalEventTypes<MaybeEl<Component>> & {
|
|
|
262
268
|
type MaybeEl<Component> = Component extends {
|
|
263
269
|
el: unknown;
|
|
264
270
|
} ? Component["el"] : Component;
|
|
271
|
+
export interface TargetedEvent<Target = EventTarget | null, Payload = void> extends BaseEvent {
|
|
272
|
+
/**
|
|
273
|
+
* Returns any custom data event was created with.
|
|
274
|
+
*
|
|
275
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail)
|
|
276
|
+
*/
|
|
277
|
+
readonly detail: Payload;
|
|
278
|
+
/**
|
|
279
|
+
* Returns the object whose event listener's callback is currently being invoked.
|
|
280
|
+
*
|
|
281
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)
|
|
282
|
+
*/
|
|
283
|
+
readonly currentTarget: Target;
|
|
284
|
+
/**
|
|
285
|
+
* Returns the object to which event is dispatched (its target).
|
|
286
|
+
*
|
|
287
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)
|
|
288
|
+
*/
|
|
289
|
+
readonly target: Target;
|
|
290
|
+
}
|
|
291
|
+
type BaseEvent = Omit<Event, "currentTarget" | "target">;
|
|
292
|
+
export type EventHandler<E> = {
|
|
293
|
+
bivarianceHack(event: E): void;
|
|
294
|
+
}["bivarianceHack"];
|
|
265
295
|
/**
|
|
266
296
|
* From "GlobalEventHandlersCamelCase" extract event names and their payloads.
|
|
267
297
|
* Not using "HTMLElementEventMap" because that map has all events in lowercase.
|
|
@@ -408,9 +438,6 @@ export declare namespace LuminaJsx {
|
|
|
408
438
|
currentTarget: T;
|
|
409
439
|
target: T extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement ? T : DOMElement;
|
|
410
440
|
}) => void;
|
|
411
|
-
type RefCallback<T> = {
|
|
412
|
-
bivarianceHack(instance: T | undefined): void;
|
|
413
|
-
}["bivarianceHack"];
|
|
414
441
|
interface CustomAttributes<T = HTMLElement> {
|
|
415
442
|
/**
|
|
416
443
|
* The `key` is a special attribute that can be set on any element.
|
|
@@ -422,7 +449,7 @@ export declare namespace LuminaJsx {
|
|
|
422
449
|
* Unlike in React or Stencil, any JavaScript value is acceptable as a key
|
|
423
450
|
*/
|
|
424
451
|
key?: unknown;
|
|
425
|
-
ref?:
|
|
452
|
+
ref?: EventHandler<T | undefined> | Ref<T>;
|
|
426
453
|
directives?: readonly DirectiveResult[];
|
|
427
454
|
}
|
|
428
455
|
interface DOMAttributes<T = HTMLElement> extends CustomAttributes<T>, GlobalEventHandlersCamelCase<T> {
|
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.47",
|
|
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.47",
|
|
24
|
+
"@arcgis/components-utils": "4.32.0-next.47",
|
|
25
25
|
"@lit-labs/ssr": "^3.2.2",
|
|
26
26
|
"@lit-labs/ssr-client": "^1.1.7",
|
|
27
27
|
"@lit/context": "^1.1.3",
|