@arcgis/lumina 4.32.0-next.51 → 4.32.0-next.54
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/index.js +21 -1
- package/dist/jsx/jsx.d.ts +7 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -309,7 +309,27 @@ import { isEsriInternalEnv as isEsriInternalEnv3 } from "@arcgis/components-util
|
|
|
309
309
|
function makeRuntime(options) {
|
|
310
310
|
let assetPath;
|
|
311
311
|
const setAssetPath = (path) => {
|
|
312
|
-
assetPath = new URL(
|
|
312
|
+
assetPath = new URL(
|
|
313
|
+
path,
|
|
314
|
+
/**
|
|
315
|
+
* setAssetPath() is called in global scope whenever Lumina runtime is
|
|
316
|
+
* imported. Thus we need to carefully handle different environments.
|
|
317
|
+
*
|
|
318
|
+
* Need `|| undefined` because Stencil's unit tests mock-dock defines
|
|
319
|
+
* `location.href` as empty string, which crashes `new URL()`. Stencil's
|
|
320
|
+
* test environment does not define `NODE_ENV` by default, so we have to
|
|
321
|
+
* add a few bytes to production.
|
|
322
|
+
*
|
|
323
|
+
* For happy-dom and jsdom, we are assuming that `NODE_ENV` is set.
|
|
324
|
+
* Depending on configuration, `location?.href` is either undefined (not
|
|
325
|
+
* an exception) or `about:blank` (an exception - thus handling that case
|
|
326
|
+
* explicitly).
|
|
327
|
+
*
|
|
328
|
+
* For Node.js without a DOM environment, `location?.href` is undefined so
|
|
329
|
+
* all is good.
|
|
330
|
+
*/
|
|
331
|
+
typeof process === "object" && process.env.NODE_ENV === "test" ? globalThis.location?.href === "about:blank" ? void 0 : globalThis.location?.href || void 0 : globalThis.location?.href || void 0
|
|
332
|
+
).href;
|
|
313
333
|
};
|
|
314
334
|
const runtime = {
|
|
315
335
|
...options,
|
package/dist/jsx/jsx.d.ts
CHANGED
|
@@ -260,7 +260,7 @@ export interface ImportStencilElements {
|
|
|
260
260
|
* - https://github.com/microsoft/TypeScript/issues/50715
|
|
261
261
|
*/
|
|
262
262
|
export type ToEvents<Component> = GlobalEventTypes<MaybeEl<Component>> & {
|
|
263
|
-
[Key in keyof Component as ListenerToPayloadType<Component[Key]> extends
|
|
263
|
+
[Key in keyof Component as ListenerToPayloadType<Component[Key]> extends BaseEvent ? Key : never]-?: ListenerToPayloadType<Component[Key]> & {
|
|
264
264
|
currentTarget: MaybeEl<Component>;
|
|
265
265
|
target: MaybeEl<Component>;
|
|
266
266
|
};
|
|
@@ -288,7 +288,10 @@ export interface TargetedEvent<Target = EventTarget | null, Payload = void> exte
|
|
|
288
288
|
*/
|
|
289
289
|
readonly target: Target;
|
|
290
290
|
}
|
|
291
|
-
|
|
291
|
+
interface BaseEvent extends Omit<Event, "currentTarget" | "target"> {
|
|
292
|
+
/** @deprecated */
|
|
293
|
+
initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: any): void;
|
|
294
|
+
}
|
|
292
295
|
export type EventHandler<E> = {
|
|
293
296
|
bivarianceHack(event: E): void;
|
|
294
297
|
}["bivarianceHack"];
|
|
@@ -301,7 +304,7 @@ type GlobalEventTypes<Target = HTMLElement> = {
|
|
|
301
304
|
};
|
|
302
305
|
type ListenerToPayloadType<Listener> = unknown extends Listener ? void : Listener extends {
|
|
303
306
|
emit: (...rest: never[]) => infer PayloadType;
|
|
304
|
-
} ? PayloadType : Listener extends
|
|
307
|
+
} ? PayloadType : Listener extends BaseEvent ? Listener : void;
|
|
305
308
|
/**
|
|
306
309
|
* Defined Lumina custom elements. This interface is used only for internal
|
|
307
310
|
* type-checking only.
|
|
@@ -900,6 +903,7 @@ export declare namespace LuminaJsx {
|
|
|
900
903
|
autofocus?: boolean;
|
|
901
904
|
dir?: HTMLDir;
|
|
902
905
|
draggable?: boolean;
|
|
906
|
+
enterKeyHint?: string;
|
|
903
907
|
hidden?: boolean | "hidden" | "until-found";
|
|
904
908
|
id?: string;
|
|
905
909
|
inert?: boolean;
|
|
@@ -1088,7 +1092,6 @@ export declare namespace LuminaJsx {
|
|
|
1088
1092
|
capture?: boolean | string;
|
|
1089
1093
|
checked?: boolean;
|
|
1090
1094
|
disabled?: boolean;
|
|
1091
|
-
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
1092
1095
|
form?: string;
|
|
1093
1096
|
height?: number | string;
|
|
1094
1097
|
incremental?: boolean;
|
|
@@ -1405,7 +1408,6 @@ export declare namespace LuminaJsx {
|
|
|
1405
1408
|
cols?: number | string;
|
|
1406
1409
|
dirname?: string;
|
|
1407
1410
|
disabled?: boolean;
|
|
1408
|
-
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
1409
1411
|
form?: string;
|
|
1410
1412
|
name?: string;
|
|
1411
1413
|
placeholder?: string;
|
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.54",
|
|
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.54",
|
|
24
|
+
"@arcgis/components-utils": "4.32.0-next.54",
|
|
25
25
|
"@lit-labs/ssr": "^3.2.2",
|
|
26
26
|
"@lit-labs/ssr-client": "^1.1.7",
|
|
27
27
|
"@lit/context": "^1.1.3",
|