@arcgis/lumina 4.33.0-next.67 → 4.33.0-next.69
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.d.ts +1 -1
- package/dist/index.js +21 -10
- package/dist/jsx/baseTypes.d.ts +11 -7
- package/dist/jsx/directives.d.ts +19 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type { Runtime, RuntimeOptions, DevOnlyGlobalRuntime, DevOnlyGlobalCompon
|
|
|
10
10
|
export { makeRuntime } from './runtime';
|
|
11
11
|
export type { EventHandler } from './jsx/baseTypes';
|
|
12
12
|
export * from './jsx/types';
|
|
13
|
-
export { safeClassMap, safeStyleMap, directive, live } from './jsx/directives';
|
|
13
|
+
export { safeClassMap, safeStyleMap, deferLoad, deferredLoaders, directive, live } from './jsx/directives';
|
|
14
14
|
export { nothing, noChange, setAttribute, stringOrBoolean } from './jsx/utils';
|
|
15
15
|
export { noShadowRoot } from './utils';
|
|
16
16
|
export { makeReactWrapperFactory, getReactWrapperOptions } from './wrappersUtils';
|
package/dist/index.js
CHANGED
|
@@ -5,13 +5,13 @@ import { state } from "@lit/reactive-element/decorators/state.js";
|
|
|
5
5
|
import { property as property$1 } from "@lit/reactive-element/decorators/property.js";
|
|
6
6
|
import { n as noShadowRoot, a as attachToAncestor } from "./utils-GhKD5Lo-.js";
|
|
7
7
|
import { m } from "./utils-GhKD5Lo-.js";
|
|
8
|
-
import { LitElement as LitElement$1, isServer } from "lit";
|
|
8
|
+
import { LitElement as LitElement$1, isServer, noChange as noChange$1 } from "lit";
|
|
9
9
|
import { PropertyFlags } from "./config.js";
|
|
10
10
|
import { classMap } from "lit-html/directives/class-map.js";
|
|
11
11
|
import { styleMap } from "lit/directives/style-map.js";
|
|
12
|
-
import { directive as directive$1 } from "lit-html/directive.js";
|
|
12
|
+
import { directive as directive$1, Directive } from "lit-html/directive.js";
|
|
13
13
|
import { live as live$1 } from "lit-html/directives/live.js";
|
|
14
|
-
import { nothing as nothing$1, noChange as noChange$
|
|
14
|
+
import { nothing as nothing$1, noChange as noChange$2 } from "lit-html";
|
|
15
15
|
function useContextProvider(options) {
|
|
16
16
|
const component = retrieveComponent();
|
|
17
17
|
const controller = new ContextProvider(component.el, options);
|
|
@@ -28,9 +28,7 @@ const createEventFactory = (eventName = "", options = {}, component = retrieveCo
|
|
|
28
28
|
const emitter = {
|
|
29
29
|
emit: (payload) => {
|
|
30
30
|
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv() && !component.el.isConnected) {
|
|
31
|
-
console.warn(
|
|
32
|
-
`Trying to emit an ${eventName} event on a disconnected element ${component.el.tagName.toLowerCase()}`
|
|
33
|
-
);
|
|
31
|
+
console.warn(`Trying to emit an ${eventName} event on a disconnected element ${component.el.localName}`);
|
|
34
32
|
}
|
|
35
33
|
if (eventName === "") {
|
|
36
34
|
keyTrackResolve();
|
|
@@ -83,9 +81,7 @@ class LitElement extends LitElement$1 {
|
|
|
83
81
|
this.shouldUpdate = ourShouldUpdate;
|
|
84
82
|
}
|
|
85
83
|
if (process.env.NODE_ENV !== "production") {
|
|
86
|
-
const isOwnComponent = globalThis.devOnly$ownTagNames?.has(
|
|
87
|
-
this.el.tagName.toLowerCase()
|
|
88
|
-
);
|
|
84
|
+
const isOwnComponent = globalThis.devOnly$ownTagNames?.has(this.el.localName);
|
|
89
85
|
const constructor = this.constructor;
|
|
90
86
|
const warningsWereCustomized = constructor.enabledWarnings !== LitElement$1.enabledWarnings;
|
|
91
87
|
if (!isOwnComponent && !warningsWereCustomized) {
|
|
@@ -315,10 +311,23 @@ const bindProperty = void 0;
|
|
|
315
311
|
const bindEvent = void 0;
|
|
316
312
|
const safeClassMap = (parameters) => typeof parameters === "object" && parameters != null ? classMap(parameters) : parameters;
|
|
317
313
|
const safeStyleMap = (parameters) => typeof parameters === "object" && parameters != null ? styleMap(parameters) : parameters;
|
|
314
|
+
class DeferLoad extends Directive {
|
|
315
|
+
update(part) {
|
|
316
|
+
const tagName = part.element.localName;
|
|
317
|
+
if (!customElements.get(tagName)) {
|
|
318
|
+
void deferredLoaders.get(tagName)?.();
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
render() {
|
|
322
|
+
return noChange$1;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
const deferLoad = /* @__PURE__ */ directive$1(DeferLoad)();
|
|
326
|
+
const deferredLoaders = /* @__PURE__ */ new Map();
|
|
318
327
|
const directive = directive$1;
|
|
319
328
|
const live = live$1;
|
|
320
329
|
const nothing = nothing$1;
|
|
321
|
-
const noChange = noChange$
|
|
330
|
+
const noChange = noChange$2;
|
|
322
331
|
function setAttribute(element, attributeName, value) {
|
|
323
332
|
if (value == null) {
|
|
324
333
|
element.removeAttribute(attributeName);
|
|
@@ -377,6 +386,8 @@ export {
|
|
|
377
386
|
bindEvent,
|
|
378
387
|
bindProperty,
|
|
379
388
|
createEvent,
|
|
389
|
+
deferLoad,
|
|
390
|
+
deferredLoaders,
|
|
380
391
|
directive,
|
|
381
392
|
getReactWrapperOptions,
|
|
382
393
|
live,
|
package/dist/jsx/baseTypes.d.ts
CHANGED
|
@@ -21,15 +21,19 @@ export type EventHandler<E> = {
|
|
|
21
21
|
}["bivarianceHack"];
|
|
22
22
|
export interface CustomAttributes<T = HTMLElement> {
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* At build-time it is translated into the `keyed()` directive:
|
|
27
|
-
* https://lit.dev/docs/templates/directives/#keyed
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* Unlike in React or Stencil, any JavaScript value is acceptable as a key
|
|
24
|
+
* [Documentation](https://qawebgis.esri.com/components/lumina/jsx#key-prop)
|
|
31
25
|
*/
|
|
32
26
|
key?: unknown;
|
|
27
|
+
/**
|
|
28
|
+
* [Documentation](https://qawebgis.esri.com/components/lumina/jsx#refs)
|
|
29
|
+
*/
|
|
33
30
|
ref?: EventHandler<T | undefined> | Ref<T>;
|
|
31
|
+
/**
|
|
32
|
+
* [Documentation](https://qawebgis.esri.com/components/lumina/jsx#lit-directives)
|
|
33
|
+
*/
|
|
34
34
|
directives?: readonly DirectiveResult[];
|
|
35
|
+
/**
|
|
36
|
+
* [Documentation](https://qawebgis.esri.com/components/lumina/jsx#deferring-web-component-load)
|
|
37
|
+
*/
|
|
38
|
+
deferLoad?: true;
|
|
35
39
|
}
|
package/dist/jsx/directives.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ import { ClassInfo } from 'lit-html/directives/class-map.js';
|
|
|
4
4
|
import { DirectiveResult } from 'lit/directive.js';
|
|
5
5
|
import { ClassMapDirective } from 'lit/directives/class-map.js';
|
|
6
6
|
import { StyleMapDirective } from 'lit/directives/style-map.js';
|
|
7
|
-
import { DirectiveClass } from 'lit-html/directive.js';
|
|
7
|
+
import { DirectiveClass, ElementPart, Directive } from 'lit-html/directive.js';
|
|
8
|
+
import { noChange } from 'lit';
|
|
8
9
|
/**
|
|
9
10
|
* You likely won't have to import this directly. It will be added during
|
|
10
11
|
* _JSX to lit-html_ conversion.
|
|
@@ -55,6 +56,22 @@ export declare const safeClassMap: (parameters: ClassInfo | Nil | string) => Dir
|
|
|
55
56
|
* @private
|
|
56
57
|
*/
|
|
57
58
|
export declare const safeStyleMap: (parameters: CssProperties | Nil | string) => DirectiveResult<typeof StyleMapDirective> | Nil | string;
|
|
59
|
+
declare class DeferLoad extends Directive {
|
|
60
|
+
update(part: ElementPart): void;
|
|
61
|
+
render(): typeof noChange;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @private
|
|
65
|
+
* Do not use this directive directly. Use the `deferLoad` JSX prop instead.
|
|
66
|
+
* [Documentation](https://qawebgis.esri.com/components/lumina/jsx#deferring-web-component-load)
|
|
67
|
+
*/
|
|
68
|
+
export declare const deferLoad: DirectiveResult<typeof DeferLoad>;
|
|
69
|
+
/**
|
|
70
|
+
* @private
|
|
71
|
+
* Do not use this directly. Use the `deferLoad` JSX prop instead.
|
|
72
|
+
* [Documentation](https://qawebgis.esri.com/components/lumina/jsx#deferring-web-component-load)
|
|
73
|
+
*/
|
|
74
|
+
export declare const deferredLoaders: Map<string, () => Promise<unknown>>;
|
|
58
75
|
/**
|
|
59
76
|
* Creates a user-facing directive function from a Directive class. This
|
|
60
77
|
* function has the same parameters as the directive's render() method.
|
|
@@ -75,3 +92,4 @@ export declare const directive: <C extends DirectiveClass>(c: C) => (...values:
|
|
|
75
92
|
* "never" to allow it be set as a value for any JSX attribute.
|
|
76
93
|
*/
|
|
77
94
|
export declare const live: (value: unknown) => never;
|
|
95
|
+
export {};
|
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.69",
|
|
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.69",
|
|
24
|
+
"@arcgis/components-utils": "4.33.0-next.69",
|
|
25
25
|
"@lit-labs/ssr": "^3.2.2",
|
|
26
26
|
"@lit-labs/ssr-client": "^1.1.7",
|
|
27
27
|
"@lit/context": "^1.1.3",
|