@arcgis/lumina 4.32.0-next.1 → 4.32.0-next.10
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 +3 -0
- package/dist/createEvent.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +26 -53
- package/dist/jsx/directives.d.ts +0 -8
- package/dist/jsx/jsx.d.ts +8 -6
- package/dist/lazyLoad.d.ts +5 -2
- package/dist/runtime.d.ts +3 -3
- package/dist/{stencil-ssr-compatibility → stencilSsrCompatibility}/index.js +1 -1
- package/package.json +7 -26
- /package/dist/{stencil-ssr-compatibility → stencilSsrCompatibility}/index.d.ts +0 -0
package/dist/LitElement.d.ts
CHANGED
|
@@ -36,6 +36,9 @@ export declare class LitElement extends OriginalLitElement implements ComponentL
|
|
|
36
36
|
/** @internal */
|
|
37
37
|
static runtime: Runtime;
|
|
38
38
|
static tagName: string;
|
|
39
|
+
/**
|
|
40
|
+
* Customize Lit's default style handling to support non-shadow-root styles
|
|
41
|
+
*/
|
|
39
42
|
static finalizeStyles(styles?: CSSResultGroup): CSSResultOrNative[];
|
|
40
43
|
static createProperty(name: PropertyKey,
|
|
41
44
|
/**
|
package/dist/createEvent.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EventEmitter } from "@arcgis/components-controllers";
|
|
1
|
+
import type { BaseComponent, EventEmitter } from "@arcgis/components-controllers";
|
|
2
2
|
export type EventOptions = {
|
|
3
3
|
/**
|
|
4
4
|
* A Boolean indicating whether the event bubbles up through the DOM or not.
|
|
@@ -22,7 +22,7 @@ export type EventOptions = {
|
|
|
22
22
|
*/
|
|
23
23
|
composed?: boolean;
|
|
24
24
|
};
|
|
25
|
-
export declare const createEventFactory: <T = undefined>(eventName?: string, options?: EventOptions, component?:
|
|
25
|
+
export declare const createEventFactory: <T = undefined>(eventName?: string, options?: EventOptions, component?: BaseComponent) => EventEmitter<T>;
|
|
26
26
|
/**
|
|
27
27
|
* Creates an event emitter.
|
|
28
28
|
* Events emitted by your component will be included in the documentation.
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type { PublicLitElement } from "./PublicLitElement";
|
|
|
10
10
|
export type { Runtime, RuntimeOptions, DevOnlyGlobalRuntime, DevOnlyGlobalComponentRefCallback } from "./runtime";
|
|
11
11
|
export { makeRuntime } from "./runtime";
|
|
12
12
|
export * from "./jsx/jsx";
|
|
13
|
-
export { safeClassMap, safeStyleMap, directive,
|
|
13
|
+
export { safeClassMap, safeStyleMap, directive, live } from "./jsx/directives";
|
|
14
14
|
export { nothing, noChange, setAttribute, stringOrBoolean } from "./jsx/utils";
|
|
15
15
|
export { noShadowRoot } from "./utils";
|
|
16
16
|
export { createPrototypeProxy } from "./wrappersUtils";
|
package/dist/index.js
CHANGED
|
@@ -8,19 +8,20 @@ import {
|
|
|
8
8
|
} from "./chunk-CH52Q2MB.js";
|
|
9
9
|
|
|
10
10
|
// src/createEvent.ts
|
|
11
|
-
import { retrieveComponent, trackPropertyKey } from "@arcgis/components-controllers";
|
|
11
|
+
import { retrieveComponent, trackPropertyKey, keyTrackResolve } from "@arcgis/components-controllers";
|
|
12
12
|
var createEventFactory = (eventName = "", options = {}, component = retrieveComponent()) => {
|
|
13
13
|
const emitter = {
|
|
14
14
|
emit: (payload) => {
|
|
15
|
-
if (process.env.NODE_ENV !== "production") {
|
|
16
|
-
|
|
15
|
+
if (process.env.NODE_ENV !== "production" && !component.el.isConnected) {
|
|
16
|
+
console.warn(
|
|
17
|
+
`Trying to emit an ${eventName} event on a disconnected element ${component.el.tagName.toLowerCase()}`
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
if (eventName === "") {
|
|
21
|
+
keyTrackResolve();
|
|
22
|
+
if (process.env.NODE_ENV !== "production" && eventName === "") {
|
|
17
23
|
throw new Error("Unable to resolve event name from property name");
|
|
18
24
|
}
|
|
19
|
-
if (!component.el.isConnected) {
|
|
20
|
-
console.warn(
|
|
21
|
-
`Trying to emit an ${eventName} event on a disconnected element ${component.el.tagName.toLowerCase()}`
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
25
|
}
|
|
25
26
|
const event = new CustomEvent(eventName, {
|
|
26
27
|
detail: payload,
|
|
@@ -211,8 +212,10 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
211
212
|
this._initializeComponent({ a: ProxyClass._LitConstructor });
|
|
212
213
|
} else {
|
|
213
214
|
void ProxyClass._loadPromise.then(this._initializeComponent.bind(this)).catch((error) => {
|
|
214
|
-
console.error(error);
|
|
215
215
|
this._postLoaded.reject(error);
|
|
216
|
+
setTimeout(() => {
|
|
217
|
+
throw error;
|
|
218
|
+
});
|
|
216
219
|
});
|
|
217
220
|
}
|
|
218
221
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -346,7 +349,7 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
346
349
|
*/
|
|
347
350
|
async componentOnReady() {
|
|
348
351
|
await this._postLoaded.promise;
|
|
349
|
-
return this
|
|
352
|
+
return this;
|
|
350
353
|
}
|
|
351
354
|
/** @internal */
|
|
352
355
|
_initializeComponent(module) {
|
|
@@ -597,6 +600,9 @@ var LitElement = class _LitElement extends OriginalLitElement {
|
|
|
597
600
|
this.el.setAttribute(this.constructor.runtime.hydratedAttribute, "");
|
|
598
601
|
}
|
|
599
602
|
}
|
|
603
|
+
/**
|
|
604
|
+
* Customize Lit's default style handling to support non-shadow-root styles
|
|
605
|
+
*/
|
|
600
606
|
static finalizeStyles(styles) {
|
|
601
607
|
if (process.env.NODE_ENV === "test" && Array.isArray(styles)) {
|
|
602
608
|
styles = styles.filter(Boolean);
|
|
@@ -654,8 +660,10 @@ var LitElement = class _LitElement extends OriginalLitElement {
|
|
|
654
660
|
queueMicrotask(
|
|
655
661
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises, @typescript-eslint/promise-function-async
|
|
656
662
|
() => this._load().catch((error) => {
|
|
657
|
-
console.error(error);
|
|
658
663
|
this._postLoaded.reject(error);
|
|
664
|
+
setTimeout(() => {
|
|
665
|
+
throw error;
|
|
666
|
+
});
|
|
659
667
|
})
|
|
660
668
|
);
|
|
661
669
|
}
|
|
@@ -682,11 +690,13 @@ var LitElement = class _LitElement extends OriginalLitElement {
|
|
|
682
690
|
}
|
|
683
691
|
return existingShadowRoot;
|
|
684
692
|
}
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
693
|
+
if (this.isConnected) {
|
|
694
|
+
const domRoot = renderRoot.getRootNode();
|
|
695
|
+
domRoot.adoptedStyleSheets = [
|
|
696
|
+
...domRoot.adoptedStyleSheets,
|
|
697
|
+
...Class.elementStyles.map((stylesheet) => "styleSheet" in stylesheet ? stylesheet.styleSheet : stylesheet)
|
|
698
|
+
];
|
|
699
|
+
}
|
|
690
700
|
return renderRoot;
|
|
691
701
|
}
|
|
692
702
|
/** Do asynchronous component load */
|
|
@@ -794,47 +804,11 @@ var bindEvent = void 0;
|
|
|
794
804
|
// src/jsx/directives.ts
|
|
795
805
|
import { classMap } from "lit-html/directives/class-map.js";
|
|
796
806
|
import { styleMap } from "lit/directives/style-map.js";
|
|
797
|
-
import { Directive } from "lit-html/directive.js";
|
|
798
807
|
import { directive as litDirective } from "lit-html/directive.js";
|
|
799
808
|
import { live as litLive } from "lit-html/directives/live.js";
|
|
800
809
|
var safeClassMap = (parameters) => typeof parameters === "object" && parameters != null ? classMap(parameters) : parameters;
|
|
801
810
|
var safeStyleMap = (parameters) => typeof parameters === "object" && parameters != null ? styleMap(parameters) : parameters;
|
|
802
811
|
var directive = litDirective;
|
|
803
|
-
var DynamicHtmlValueDirective = class extends Directive {
|
|
804
|
-
update(part, [prop, value]) {
|
|
805
|
-
if (process.env.NODE_ENV !== "production") {
|
|
806
|
-
if (part.type !== 6) {
|
|
807
|
-
throw new Error("DynamicHtmlValueDirective can only be used in the element part position");
|
|
808
|
-
}
|
|
809
|
-
if (prop !== "value" && prop !== "defaultValue") {
|
|
810
|
-
throw new Error('Expected the first argument to DynamicHtmlValueDirective to be "value" or "defaultValue"');
|
|
811
|
-
}
|
|
812
|
-
if (typeof value === "object" && value != null) {
|
|
813
|
-
if ("_$litDirective$" in value) {
|
|
814
|
-
throw new Error(
|
|
815
|
-
"Directive is not supported as a value for the `value` or `defaultValue` prop when the tag name is dynamic."
|
|
816
|
-
);
|
|
817
|
-
} else {
|
|
818
|
-
throw new Error(
|
|
819
|
-
`Tried to set an object as the value/defaultValue prop in a <${part.element.tagName}> element.`
|
|
820
|
-
);
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
const element = part.element;
|
|
825
|
-
const tagName = element.tagName;
|
|
826
|
-
if (prop === "value" ? tagName === "INPUT" : tagName === "BUTTON" || tagName === "DATA") {
|
|
827
|
-
if (element[prop] !== value) {
|
|
828
|
-
element[prop] = value;
|
|
829
|
-
}
|
|
830
|
-
} else if (value != null) {
|
|
831
|
-
element.setAttribute("value", value);
|
|
832
|
-
} else {
|
|
833
|
-
element.removeAttribute("value");
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
};
|
|
837
|
-
var dynamicValueDirective = directive(DynamicHtmlValueDirective);
|
|
838
812
|
var live = litLive;
|
|
839
813
|
|
|
840
814
|
// src/jsx/utils.ts
|
|
@@ -881,7 +855,6 @@ export {
|
|
|
881
855
|
createEvent,
|
|
882
856
|
createPrototypeProxy,
|
|
883
857
|
directive,
|
|
884
|
-
dynamicValueDirective,
|
|
885
858
|
handleComponentMetaUpdate,
|
|
886
859
|
handleHmrUpdate,
|
|
887
860
|
live,
|
package/dist/jsx/directives.d.ts
CHANGED
|
@@ -60,14 +60,6 @@ export declare const safeStyleMap: (parameters: CssProperties | Nil | string) =>
|
|
|
60
60
|
* "never" to allow it be set as a value for any JSX attribute.
|
|
61
61
|
*/
|
|
62
62
|
export declare const directive: <C extends DirectiveClass>(c: C) => (...values: Parameters<InstanceType<C>["render"]>) => never;
|
|
63
|
-
/**
|
|
64
|
-
* Do not import this directly. It will be inserted automatically by JSX to
|
|
65
|
-
* lit-html transformer when you are setting "value" or "defaultValue" JSX prop
|
|
66
|
-
* in an element with dynamic tag name.
|
|
67
|
-
*
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
|
-
export declare const dynamicValueDirective: (...values: never) => never;
|
|
71
63
|
/**
|
|
72
64
|
* Checks binding values against live DOM values, instead of previously bound
|
|
73
65
|
* values, when determining whether to update the value.
|
package/dist/jsx/jsx.d.ts
CHANGED
|
@@ -1293,6 +1293,8 @@ export declare namespace LuminaJsx {
|
|
|
1293
1293
|
form?: string;
|
|
1294
1294
|
for?: string;
|
|
1295
1295
|
name?: string;
|
|
1296
|
+
value?: string | number;
|
|
1297
|
+
defaultValue?: string | number;
|
|
1296
1298
|
}
|
|
1297
1299
|
interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1298
1300
|
max?: number | string;
|
|
@@ -1862,7 +1864,7 @@ export declare namespace LuminaJsx {
|
|
|
1862
1864
|
base: BaseHTMLAttributes<HTMLBaseElement>;
|
|
1863
1865
|
bdi: HTMLAttributes;
|
|
1864
1866
|
bdo: HTMLAttributes;
|
|
1865
|
-
blockquote: BlockquoteHTMLAttributes<
|
|
1867
|
+
blockquote: BlockquoteHTMLAttributes<HTMLQuoteElement>;
|
|
1866
1868
|
body: HTMLAttributes<HTMLBodyElement>;
|
|
1867
1869
|
br: HTMLAttributes<HTMLBRElement>;
|
|
1868
1870
|
button: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
@@ -1872,7 +1874,7 @@ export declare namespace LuminaJsx {
|
|
|
1872
1874
|
code: HTMLAttributes;
|
|
1873
1875
|
col: ColHTMLAttributes<HTMLTableColElement>;
|
|
1874
1876
|
colgroup: ColgroupHTMLAttributes<HTMLTableColElement>;
|
|
1875
|
-
data: DataHTMLAttributes<
|
|
1877
|
+
data: DataHTMLAttributes<HTMLDataElement>;
|
|
1876
1878
|
datalist: HTMLAttributes<HTMLDataListElement>;
|
|
1877
1879
|
dd: HTMLAttributes;
|
|
1878
1880
|
del: HTMLAttributes;
|
|
@@ -1914,16 +1916,16 @@ export declare namespace LuminaJsx {
|
|
|
1914
1916
|
map: MapHTMLAttributes<HTMLMapElement>;
|
|
1915
1917
|
math: MathMLAttributes;
|
|
1916
1918
|
mark: HTMLAttributes;
|
|
1917
|
-
menu: MenuHTMLAttributes<
|
|
1919
|
+
menu: MenuHTMLAttributes<HTMLMenuElement>;
|
|
1918
1920
|
meta: MetaHTMLAttributes<HTMLMetaElement>;
|
|
1919
|
-
meter: MeterHTMLAttributes<
|
|
1921
|
+
meter: MeterHTMLAttributes<HTMLMeterElement>;
|
|
1920
1922
|
nav: HTMLAttributes;
|
|
1921
1923
|
noscript: HTMLAttributes;
|
|
1922
1924
|
object: ObjectHTMLAttributes<HTMLObjectElement>;
|
|
1923
1925
|
ol: OlHTMLAttributes<HTMLOListElement>;
|
|
1924
1926
|
optgroup: OptgroupHTMLAttributes<HTMLOptGroupElement>;
|
|
1925
1927
|
option: OptionHTMLAttributes<HTMLOptionElement>;
|
|
1926
|
-
output: OutputHTMLAttributes<
|
|
1928
|
+
output: OutputHTMLAttributes<HTMLOutputElement>;
|
|
1927
1929
|
p: HTMLAttributes<HTMLParagraphElement>;
|
|
1928
1930
|
picture: HTMLAttributes;
|
|
1929
1931
|
pre: HTMLAttributes<HTMLPreElement>;
|
|
@@ -1961,7 +1963,7 @@ export declare namespace LuminaJsx {
|
|
|
1961
1963
|
tfoot: HTMLAttributes<HTMLTableSectionElement>;
|
|
1962
1964
|
th: ThHTMLAttributes<HTMLTableCellElement>;
|
|
1963
1965
|
thead: HTMLAttributes<HTMLTableSectionElement>;
|
|
1964
|
-
time: TimeHTMLAttributes<
|
|
1966
|
+
time: TimeHTMLAttributes<HTMLTimeElement>;
|
|
1965
1967
|
title: HTMLAttributes<HTMLTitleElement>;
|
|
1966
1968
|
tr: HTMLAttributes<HTMLTableRowElement>;
|
|
1967
1969
|
track: TrackHTMLAttributes<HTMLTrackElement>;
|
package/dist/lazyLoad.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Deferred } from "@arcgis/components-utils";
|
|
|
2
2
|
import type { LitElement } from "./LitElement";
|
|
3
3
|
import type { Runtime } from "./runtime";
|
|
4
4
|
import type { ControllerManager } from "@arcgis/components-controllers";
|
|
5
|
+
import type { PublicLitElement } from "./PublicLitElement";
|
|
5
6
|
/**
|
|
6
7
|
* Defines lazy-loading proxy components for all web components in this package.
|
|
7
8
|
*
|
|
@@ -105,7 +106,9 @@ export declare abstract class ProxyComponent extends HtmlElement {
|
|
|
105
106
|
/**
|
|
106
107
|
* Direct offspring that should be awaited before loaded() is emitted
|
|
107
108
|
*/
|
|
108
|
-
_offspring: (
|
|
109
|
+
_offspring: (PublicLitElement & {
|
|
110
|
+
manager?: LitElement["manager"];
|
|
111
|
+
})[];
|
|
109
112
|
/**
|
|
110
113
|
* Promise that resolves once parent's load() completed. False if there is no
|
|
111
114
|
* parent
|
|
@@ -147,7 +150,7 @@ export declare abstract class ProxyComponent extends HtmlElement {
|
|
|
147
150
|
/**
|
|
148
151
|
* Create a promise that resolves once component is fully loaded
|
|
149
152
|
*/
|
|
150
|
-
componentOnReady(): Promise<
|
|
153
|
+
componentOnReady(): Promise<this>;
|
|
151
154
|
/** @internal */
|
|
152
155
|
_initializeComponent(module: Record<string, typeof LitElement>): void;
|
|
153
156
|
}
|
package/dist/runtime.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { LitElement } from "./LitElement";
|
|
|
8
8
|
export type Runtime = RuntimeOptions & {
|
|
9
9
|
/**
|
|
10
10
|
* Get the base path to where the package assets can be found.
|
|
11
|
-
* By default, the package asset path is set to
|
|
11
|
+
* By default, the package asset path is set to `https://js.arcgis.com/<simplified-package-name>/<released-verion>/`.
|
|
12
12
|
* We are hosting our assets on a CDN (Content Delivery Network) to ensure fast and reliable access.
|
|
13
13
|
* It is CORS-enabled, so you can load the assets from any domain.
|
|
14
14
|
* Use "setAssetPath(path)" if the path needs to be customized.
|
|
@@ -18,8 +18,8 @@ export type Runtime = RuntimeOptions & {
|
|
|
18
18
|
* Used to manually set the base path where package assets (like localization
|
|
19
19
|
* and icons) can be found.
|
|
20
20
|
*
|
|
21
|
-
* By default, the package asset path is set to
|
|
22
|
-
* For example,
|
|
21
|
+
* By default, the package asset path is set to `https://js.arcgis.com/<simplified-package-name>/<released-verion>/`.
|
|
22
|
+
* For example, `https://js.arcgis.com/map-components/4.30/`.
|
|
23
23
|
* We are hosting our assets on a CDN (Content Delivery Network) to ensure fast and reliable access.
|
|
24
24
|
* It is CORS-enabled, so you can load the assets from any domain.
|
|
25
25
|
* This is the recommended way to load the assets and avoid bundling them with your application.
|
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.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./dist/index.js",
|
|
10
10
|
"./config": "./dist/config.js",
|
|
11
|
-
"./
|
|
11
|
+
"./stencilSsrCompatibility": "./dist/stencilSsrCompatibility/index.js",
|
|
12
12
|
"./typings": {
|
|
13
13
|
"types": "./dist/typings/index.d.ts"
|
|
14
14
|
},
|
|
@@ -17,33 +17,14 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
"dist/"
|
|
19
19
|
],
|
|
20
|
-
"publishConfig": {
|
|
21
|
-
"registry": "https://registry.npmjs.org/",
|
|
22
|
-
"access": "public"
|
|
23
|
-
},
|
|
24
20
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "tsup",
|
|
27
|
-
"build:dev": "tsup --sourcemap",
|
|
28
|
-
"watch": "yarn build:dev --watch",
|
|
29
|
-
"clean": "rimraf ./dist ./build ./turbo ./node_modules"
|
|
30
|
-
},
|
|
31
21
|
"dependencies": {
|
|
32
|
-
"@arcgis/components-controllers": "4.32.0-next.
|
|
33
|
-
"@arcgis/components-utils": "4.32.0-next.
|
|
22
|
+
"@arcgis/components-controllers": "4.32.0-next.10",
|
|
23
|
+
"@arcgis/components-utils": "4.32.0-next.10",
|
|
34
24
|
"@lit-labs/ssr": "^3.2.2",
|
|
35
25
|
"@lit-labs/ssr-client": "^1.1.7",
|
|
36
26
|
"csstype": "^3.1.3",
|
|
37
|
-
"lit": "^3.
|
|
27
|
+
"lit": "^3.2.0",
|
|
38
28
|
"tslib": "^2.7.0"
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
"@arcgis/typescript-config": "4.32.0-next.1",
|
|
42
|
-
"@types/node": "^20.2.5",
|
|
43
|
-
"eslint": "^8.55.0",
|
|
44
|
-
"rimraf": "^5.0.0",
|
|
45
|
-
"tsup": "^8.3.0",
|
|
46
|
-
"typescript": "~5.4.0"
|
|
47
|
-
},
|
|
48
|
-
"gitHead": "e5c61e5426551da5fa01c269b3b138133e620ca0"
|
|
49
|
-
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
File without changes
|