@arcgis/lumina 5.2.0-next.12 → 5.2.0-next.121
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/LICENSE.md +4 -2
- package/README.md +2 -2
- package/dist/{ControllerInternals-CeDntN3G.js → ControllerInternals-DBoubTn4.js} +9 -9
- package/dist/{ControllerManager-4cSEnB5Y.js → ControllerManager-CXEWZVTX.js} +12 -11
- package/dist/{GenericController-C8NSb50b.js → GenericController-Ko6PTuJs.js} +11 -11
- package/dist/LitElement.d.ts +3 -0
- package/dist/context.js +1 -1
- package/dist/controllers/accessor/index.d.ts +35 -5
- package/dist/controllers/accessor/index.js +48 -40
- package/dist/controllers/accessor/useAccessor.d.ts +1 -1
- package/dist/controllers/index.js +11 -11
- package/dist/controllers/useDirection.d.ts +1 -1
- package/dist/controllers/useT9n.d.ts +4 -3
- package/dist/hmrSupport.js +1 -1
- package/dist/index.js +7 -7
- package/dist/jsx/directives.d.ts +2 -2
- package/dist/jsx/generatedTypes.d.ts +3 -3
- package/dist/jsx/types.d.ts +10 -1
- package/dist/{lazyLoad-B5Rj3U_I.js → lazyLoad-ki2r1z-R.js} +11 -1
- package/dist/{proxyExports-ZRLty8oJ.js → proxyExports-D-G9Eby6.js} +2 -2
- package/dist/utils/cssSyntax.d.ts +8 -0
- package/package.json +6 -3
package/LICENSE.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# Licensing
|
|
2
2
|
|
|
3
|
-
COPYRIGHT
|
|
3
|
+
COPYRIGHT Esri
|
|
4
4
|
|
|
5
5
|
All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
|
|
6
6
|
|
|
7
|
-
This material is licensed for use under the
|
|
7
|
+
This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement.
|
|
8
8
|
You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
|
|
9
9
|
|
|
10
|
+
See use restrictions at https://www.esri.com/content/dam/esrisites/en-us/media/legal/ma-full/ma-full.pdf.
|
|
11
|
+
|
|
10
12
|
For additional information, contact:
|
|
11
13
|
Environmental Systems Research Institute, Inc.
|
|
12
14
|
Attn: Contracts and Legal Services Department
|
package/README.md
CHANGED
|
@@ -8,5 +8,5 @@ It is not intended to be used directly, but rather used as a dependency by other
|
|
|
8
8
|
|
|
9
9
|
## License
|
|
10
10
|
|
|
11
|
-
This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.
|
|
12
|
-
For third party notices, see https://js.arcgis.com/5.
|
|
11
|
+
This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.2/LICENSE.txt.
|
|
12
|
+
For third party notices, see https://js.arcgis.com/5.2/third-party-notices.txt.
|
|
@@ -74,7 +74,7 @@ const use = async (value, watchExports) => {
|
|
|
74
74
|
throw new Error(`The controller must implement watchExports method to support watching exports`);
|
|
75
75
|
}
|
|
76
76
|
const unsubscribe = controller.watchExports(
|
|
77
|
-
(exports
|
|
77
|
+
(exports) => watchExports(exports, unsubscribe)
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
return controller.exports;
|
|
@@ -114,18 +114,18 @@ const bypassReadOnly = (callback) => {
|
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
116
|
export {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
setParentController as a,
|
|
118
|
+
retrieveParentControllers as b,
|
|
119
|
+
bypassReadOnly as c,
|
|
120
|
+
controllerSymbol as d,
|
|
121
|
+
isController as e,
|
|
122
|
+
setAmbientChildController as f,
|
|
123
123
|
getControllersCount as g,
|
|
124
|
-
|
|
124
|
+
shouldBypassReadOnly as h,
|
|
125
125
|
isPromise as i,
|
|
126
126
|
useRef as j,
|
|
127
127
|
useRefSync as k,
|
|
128
128
|
retrieveComponent as r,
|
|
129
|
-
|
|
129
|
+
setAmbientComponent as s,
|
|
130
130
|
use as u
|
|
131
131
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { safeCall, isEsriInternalEnv } from "@arcgis/toolkit/error";
|
|
2
|
-
import { G as GenericController, p as propertyTrackResolve } from "./GenericController-
|
|
2
|
+
import { G as GenericController, p as propertyTrackResolve } from "./GenericController-Ko6PTuJs.js";
|
|
3
3
|
import { nothing, LitElement as LitElement$1 } from "lit";
|
|
4
4
|
import { devToolsAwareTimeout } from "@arcgis/toolkit/promise";
|
|
5
|
-
import { a as setAmbientComponent } from "./ControllerInternals-
|
|
5
|
+
import { a as setParentController, s as setAmbientComponent } from "./ControllerInternals-DBoubTn4.js";
|
|
6
6
|
class ControllerManager extends GenericController {
|
|
7
7
|
/**
|
|
8
8
|
* @public
|
|
@@ -79,6 +79,7 @@ class ControllerManager extends GenericController {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
queueMicrotask(() => this.R = true);
|
|
82
|
+
setParentController(void 0);
|
|
82
83
|
setAmbientComponent(component);
|
|
83
84
|
}
|
|
84
85
|
#autoDestroyTimeout;
|
|
@@ -88,7 +89,7 @@ class ControllerManager extends GenericController {
|
|
|
88
89
|
* @privateRemarks
|
|
89
90
|
* Keeping this method async needlessly for now to avoid a breaking change if
|
|
90
91
|
* we would need to make it async in the future.
|
|
91
|
-
* Related: https://devtopia.esri.com/WebGIS/
|
|
92
|
+
* Related: https://devtopia.esri.com/WebGIS/webgis-sdk/pull/15301#issuecomment-6321306
|
|
92
93
|
*/
|
|
93
94
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
94
95
|
async destroy() {
|
|
@@ -137,14 +138,14 @@ class ControllerManager extends GenericController {
|
|
|
137
138
|
* Associate an exports object with a controller for reverse lookup in
|
|
138
139
|
* controller.use
|
|
139
140
|
*/
|
|
140
|
-
W(controller, exports
|
|
141
|
-
if (typeof exports
|
|
142
|
-
this.#exportsStore.set(exports
|
|
141
|
+
W(controller, exports) {
|
|
142
|
+
if (typeof exports === "object" && exports !== null || typeof exports === "function") {
|
|
143
|
+
this.#exportsStore.set(exports, controller);
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
|
-
X(exports
|
|
146
|
-
if (typeof exports
|
|
147
|
-
return this.#exportsStore.get(exports
|
|
146
|
+
X(exports) {
|
|
147
|
+
if (typeof exports === "object" && exports !== null || typeof exports === "function") {
|
|
148
|
+
return this.#exportsStore.get(exports);
|
|
148
149
|
} else {
|
|
149
150
|
return void 0;
|
|
150
151
|
}
|
|
@@ -183,7 +184,7 @@ function setAutoDestroyOnDisconnectTimeout(timeout) {
|
|
|
183
184
|
}
|
|
184
185
|
export {
|
|
185
186
|
ControllerManager as C,
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
autoDestroyOnDisconnectTimeout as a,
|
|
188
|
+
autoDestroyDisabledPropName as b,
|
|
188
189
|
setAutoDestroyOnDisconnectTimeout as s
|
|
189
190
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { safeCall, isEsriInternalEnv, safeAsyncCall } from "@arcgis/toolkit/error";
|
|
2
|
-
import { r as retrieveComponent,
|
|
2
|
+
import { r as retrieveComponent, b as retrieveParentControllers, a as setParentController, s as setAmbientComponent, u as use, j as useRef, k as useRefSync, d as controllerSymbol } from "./ControllerInternals-DBoubTn4.js";
|
|
3
3
|
import { nothing } from "lit";
|
|
4
4
|
import { Deferred } from "@arcgis/toolkit/promise";
|
|
5
5
|
import { rethrowError } from "@arcgis/toolkit/log";
|
|
@@ -217,19 +217,19 @@ class Controller {
|
|
|
217
217
|
get exports() {
|
|
218
218
|
return this.#exports;
|
|
219
219
|
}
|
|
220
|
-
set exports(exports
|
|
220
|
+
set exports(exports) {
|
|
221
221
|
const oldExports = this.#exports;
|
|
222
|
-
if (oldExports !== exports
|
|
223
|
-
this.#exports = exports
|
|
222
|
+
if (oldExports !== exports) {
|
|
223
|
+
this.#exports = exports;
|
|
224
224
|
this.#exportWatchers.forEach(safeCall);
|
|
225
225
|
if (this.connectedCalled && this.O !== false) {
|
|
226
226
|
this.#component.requestUpdate(this.O, oldExports);
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
this.P.resolve(exports
|
|
229
|
+
this.P.resolve(exports);
|
|
230
230
|
}
|
|
231
|
-
setProvisionalExports(exports
|
|
232
|
-
this.#exports = proxy ? makeProvisionalValue(exports
|
|
231
|
+
setProvisionalExports(exports, proxy = true) {
|
|
232
|
+
this.#exports = proxy ? makeProvisionalValue(exports) : exports;
|
|
233
233
|
this.#exportWatchers.forEach(safeCall);
|
|
234
234
|
}
|
|
235
235
|
#exportWatchers;
|
|
@@ -489,10 +489,10 @@ const GenericController = Controller;
|
|
|
489
489
|
export {
|
|
490
490
|
Controller as C,
|
|
491
491
|
GenericController as G,
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
492
|
+
trackKey as a,
|
|
493
|
+
createEvent as b,
|
|
494
|
+
createEventFactory as c,
|
|
495
495
|
trackPropertyKey as d,
|
|
496
496
|
propertyTrackResolve as p,
|
|
497
|
-
|
|
497
|
+
trackPropKey as t
|
|
498
498
|
};
|
package/dist/LitElement.d.ts
CHANGED
|
@@ -29,6 +29,9 @@ export class LitElement extends OriginalLitElement {
|
|
|
29
29
|
static readonly lumina: true;
|
|
30
30
|
/** @internal */
|
|
31
31
|
constructor();
|
|
32
|
+
readonly "@cssParts": Record<never, HTMLElement | undefined>;
|
|
33
|
+
readonly "@cssStates": Record<never, boolean>;
|
|
34
|
+
readonly "@slots": Record<never, Node | Node[] | undefined>;
|
|
32
35
|
/**
|
|
33
36
|
* In lazy build, the actual DOM element differs from the class instance:
|
|
34
37
|
* - "this.el" is a proxy custom element - it's physically present in the DOM
|
package/dist/context.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContextConsumer, ContextProvider } from "@lit/context";
|
|
2
|
-
import { r as retrieveComponent } from "./ControllerInternals-
|
|
2
|
+
import { r as retrieveComponent } from "./ControllerInternals-DBoubTn4.js";
|
|
3
3
|
const useContextProvider = (options) => {
|
|
4
4
|
const component = retrieveComponent();
|
|
5
5
|
const controller = new ContextProvider(component.el, options);
|
|
@@ -1,6 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { createStore, createLegacyStore } from "./store.js";
|
|
5
|
-
export { type ObservableMap } from "./store.js";
|
|
1
|
+
import type { reEmitEvent as reEmitEventAliased } from "./reEmitEvent.js";
|
|
2
|
+
import type { createLegacyStore as createLegacyStoreAliased, createStore as createStoreAliased, ObservableMap as ObservableMapAliased } from "./store.js";
|
|
3
|
+
import type { AccessorController as AccessorControllerAliased, getAccessorControllerBoundProperties as getAccessorControllerBoundPropertiesAliased, makeAccessorController as makeAccessorControllerAliased, makeBinderProxy as makeBinderProxyAliased, reCreateAccessor as reCreateAccessorAliased, AccessorControllerRequires as AccessorControllerRequiresAliased } from "./useAccessor.js";
|
|
6
4
|
|
|
5
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/reEmitEvent" instead. Refactor using `@arcgis/codemod`. */
|
|
6
|
+
export const reEmitEvent: typeof reEmitEventAliased;
|
|
7
|
+
|
|
8
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
9
|
+
export const makeAccessorController: typeof makeAccessorControllerAliased;
|
|
10
|
+
|
|
11
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
12
|
+
export const AccessorController: typeof AccessorControllerAliased;
|
|
13
|
+
|
|
14
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
15
|
+
export type AccessorController<Props, Accessor extends InstanceType<typeof AccessorControllerAliased>["exports"], ExtraRequires = Record<never, never>> = AccessorControllerAliased<Props, Accessor, ExtraRequires>;
|
|
16
|
+
|
|
17
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
18
|
+
export const reCreateAccessor: typeof reCreateAccessorAliased;
|
|
19
|
+
|
|
20
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
21
|
+
export const makeBinderProxy: typeof makeBinderProxyAliased;
|
|
22
|
+
|
|
23
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
24
|
+
export const getAccessorControllerBoundProperties: typeof getAccessorControllerBoundPropertiesAliased;
|
|
25
|
+
|
|
26
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
27
|
+
export type AccessorControllerRequires<Props, Accessor extends InstanceType<typeof AccessorControllerAliased>["exports"], OmitProps extends string = never> = AccessorControllerRequiresAliased<Props, Accessor, OmitProps>;
|
|
28
|
+
|
|
29
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/store" instead. Refactor using `@arcgis/codemod`. */
|
|
30
|
+
export const createStore: typeof createStoreAliased;
|
|
31
|
+
|
|
32
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/store" instead. Refactor using `@arcgis/codemod`. */
|
|
33
|
+
export const createLegacyStore: typeof createLegacyStoreAliased;
|
|
34
|
+
|
|
35
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/store" instead. Refactor using `@arcgis/codemod`. */
|
|
36
|
+
export type ObservableMap<T> = ObservableMapAliased<T>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { isEsriInternalEnv } from "@arcgis/toolkit/error";
|
|
2
|
-
import { r as retrieveComponent } from "../../ControllerInternals-
|
|
2
|
+
import { r as retrieveComponent } from "../../ControllerInternals-DBoubTn4.js";
|
|
3
3
|
import { on, watch } from "@arcgis/core/core/reactiveUtils.js";
|
|
4
|
-
import {
|
|
5
|
-
import { p as proxyExports } from "../../proxyExports-ZRLty8oJ.js";
|
|
6
|
-
import { createObservable, trackAccess } from "@arcgis/core/applications/Components/reactiveUtils.js";
|
|
4
|
+
import { c as createEventFactory, G as GenericController, t as trackPropKey, a as trackKey } from "../../GenericController-Ko6PTuJs.js";
|
|
7
5
|
import { property, subclass } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
8
6
|
import Accessor from "@arcgis/core/core/Accessor.js";
|
|
9
|
-
|
|
7
|
+
import { p as proxyExports } from "../../proxyExports-D-G9Eby6.js";
|
|
8
|
+
import { createObservable, trackAccess } from "@arcgis/core/applications/Components/reactiveUtils.js";
|
|
9
|
+
const reEmitEvent$1 = (getEventedAccessor, eventName) => {
|
|
10
10
|
const component = retrieveComponent();
|
|
11
11
|
const manager = component.manager;
|
|
12
12
|
manager.onLoaded(() => manager.onLifecycle(() => on(getEventedAccessor, eventName, emitter.emit)));
|
|
@@ -18,8 +18,34 @@ const reEmitEvent = (getEventedAccessor, eventName) => {
|
|
|
18
18
|
}
|
|
19
19
|
return emitter;
|
|
20
20
|
};
|
|
21
|
-
const
|
|
22
|
-
class
|
|
21
|
+
const createStore$1 = (initializer) => {
|
|
22
|
+
const SubClass = class extends Accessor {
|
|
23
|
+
};
|
|
24
|
+
const defaultValues = typeof initializer === "function" ? initializer() : initializer;
|
|
25
|
+
const descriptors = Object.getOwnPropertyDescriptors(defaultValues);
|
|
26
|
+
for (const [key, descriptor] of Object.entries(descriptors)) {
|
|
27
|
+
Object.defineProperty(SubClass.prototype, key, descriptor);
|
|
28
|
+
property()(SubClass.prototype, key);
|
|
29
|
+
}
|
|
30
|
+
const State = subclass()(SubClass);
|
|
31
|
+
return new State();
|
|
32
|
+
};
|
|
33
|
+
const createLegacyStore$1 = (defaultState) => {
|
|
34
|
+
const defaultValues = typeof defaultState === "function" ? defaultState() : defaultState;
|
|
35
|
+
const state = createStore$1(defaultValues);
|
|
36
|
+
return {
|
|
37
|
+
state,
|
|
38
|
+
get: (propName) => state[propName],
|
|
39
|
+
set: (propName, value) => state.set(propName, value),
|
|
40
|
+
onChange: (propName, callback) => watch(
|
|
41
|
+
() => state[propName],
|
|
42
|
+
(newValue) => callback(newValue),
|
|
43
|
+
{ sync: true }
|
|
44
|
+
).remove
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
const makeAccessorController$1 = (createInstance, _options) => (component) => proxy(component, createInstance);
|
|
48
|
+
let AccessorController$1 = class AccessorController extends GenericController {
|
|
23
49
|
/**
|
|
24
50
|
* @public
|
|
25
51
|
* @param component
|
|
@@ -34,7 +60,7 @@ class AccessorController extends GenericController {
|
|
|
34
60
|
that.#createInstance = createInstance;
|
|
35
61
|
that.Z();
|
|
36
62
|
that.setProvisionalExports(
|
|
37
|
-
makeBinderProxy(
|
|
63
|
+
makeBinderProxy$1(
|
|
38
64
|
component,
|
|
39
65
|
new WeakRef(that),
|
|
40
66
|
component.M.length - 1,
|
|
@@ -115,9 +141,9 @@ class AccessorController extends GenericController {
|
|
|
115
141
|
this.instance.destroy?.();
|
|
116
142
|
}
|
|
117
143
|
}
|
|
118
|
-
}
|
|
119
|
-
const proxy = proxyExports(AccessorController);
|
|
120
|
-
const makeBinderProxy = (component, accessorControllerRef, accessorControllerIndex, instance, boundProperties) => new Proxy(instance, {
|
|
144
|
+
};
|
|
145
|
+
const proxy = proxyExports(AccessorController$1);
|
|
146
|
+
const makeBinderProxy$1 = (component, accessorControllerRef, accessorControllerIndex, instance, boundProperties) => new Proxy(instance, {
|
|
121
147
|
get: (target, propertyName) => {
|
|
122
148
|
const value = target[propertyName];
|
|
123
149
|
if (
|
|
@@ -221,8 +247,8 @@ const bindPropToProperty = (descriptor, accessorControllerIndex, propertyName, s
|
|
|
221
247
|
}
|
|
222
248
|
};
|
|
223
249
|
};
|
|
224
|
-
const getAccessorControllerBoundProperties = (controller) => controller.Y;
|
|
225
|
-
const reCreateAccessor = (instance, component) => {
|
|
250
|
+
const getAccessorControllerBoundProperties$1 = (controller) => controller.Y;
|
|
251
|
+
const reCreateAccessor$1 = (instance, component) => {
|
|
226
252
|
const accessorController = component.manager.useRefSync(instance);
|
|
227
253
|
accessorController?.hostDestroy();
|
|
228
254
|
accessorController?.Z();
|
|
@@ -231,34 +257,16 @@ const reCreateAccessor = (instance, component) => {
|
|
|
231
257
|
console.error("Unable to resolve the useAccessor controller from the provided value");
|
|
232
258
|
}
|
|
233
259
|
};
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
const State = subclass()(SubClass);
|
|
244
|
-
return new State();
|
|
245
|
-
};
|
|
246
|
-
const createLegacyStore = (defaultState) => {
|
|
247
|
-
const defaultValues = typeof defaultState === "function" ? defaultState() : defaultState;
|
|
248
|
-
const state = createStore(defaultValues);
|
|
249
|
-
return {
|
|
250
|
-
state,
|
|
251
|
-
get: (propName) => state[propName],
|
|
252
|
-
set: (propName, value) => state.set(propName, value),
|
|
253
|
-
onChange: (propName, callback) => watch(
|
|
254
|
-
() => state[propName],
|
|
255
|
-
(newValue) => callback(newValue),
|
|
256
|
-
{ sync: true }
|
|
257
|
-
).remove
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
+
const reEmitEvent = reEmitEvent$1;
|
|
261
|
+
const makeAccessorController = makeAccessorController$1;
|
|
262
|
+
const AccessorController2 = AccessorController$1;
|
|
263
|
+
const reCreateAccessor = reCreateAccessor$1;
|
|
264
|
+
const makeBinderProxy = makeBinderProxy$1;
|
|
265
|
+
const getAccessorControllerBoundProperties = getAccessorControllerBoundProperties$1;
|
|
266
|
+
const createStore = createStore$1;
|
|
267
|
+
const createLegacyStore = createLegacyStore$1;
|
|
260
268
|
export {
|
|
261
|
-
AccessorController,
|
|
269
|
+
AccessorController2 as AccessorController,
|
|
262
270
|
createLegacyStore,
|
|
263
271
|
createStore,
|
|
264
272
|
getAccessorControllerBoundProperties,
|
|
@@ -16,7 +16,7 @@ export type AccessorControllerRequires<Props, Accessor extends coreAccessor, Omi
|
|
|
16
16
|
* be "any". In such cases, all accessor properties are assumed to be required
|
|
17
17
|
* for binding. We add a few exceptions for well known built-in properties
|
|
18
18
|
*/
|
|
19
|
-
export type AlwaysOmit = "addHandles" | "declaredClass" | "destroyed" | "hasHandles" | "initialized" | "removeHandles" | "set" | "watch";
|
|
19
|
+
export type AlwaysOmit = typeof Symbol.dispose | "addHandles" | "declaredClass" | "destroyed" | "hasHandles" | "initialized" | "removeHandles" | "set" | "watch";
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Given an Accessor class, create a controller that will do two-way binding of
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { C as Controller,
|
|
2
|
-
import { G, p,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { p as proxyExports } from "../proxyExports-
|
|
1
|
+
import { C as Controller, b as createEvent, a as trackKey, c as createEventFactory } from "../GenericController-Ko6PTuJs.js";
|
|
2
|
+
import { G, p, t, d } from "../GenericController-Ko6PTuJs.js";
|
|
3
|
+
import { s as setAmbientComponent, i as isPromise, a as setParentController, b as retrieveParentControllers, r as retrieveComponent } from "../ControllerInternals-DBoubTn4.js";
|
|
4
|
+
import { c, d as d2, g, e } from "../ControllerInternals-DBoubTn4.js";
|
|
5
|
+
import { p as proxyExports } from "../proxyExports-D-G9Eby6.js";
|
|
6
6
|
import { isServer } from "lit";
|
|
7
7
|
import { isEsriInternalEnv } from "@arcgis/toolkit/error";
|
|
8
8
|
import { observeAncestorsMutation, getElementAttribute } from "@arcgis/toolkit/dom";
|
|
9
|
-
import { getElementLocale, startLocaleObserver } from "@arcgis/toolkit/intl";
|
|
10
|
-
import { s as setAutoDestroyOnDisconnectTimeout,
|
|
9
|
+
import { getElementLocale, startLocaleObserver } from "@arcgis/toolkit/intl/dom";
|
|
10
|
+
import { s as setAutoDestroyOnDisconnectTimeout, a as autoDestroyOnDisconnectTimeout } from "../ControllerManager-CXEWZVTX.js";
|
|
11
11
|
const makeController = (constructor) => proxy(void 0, constructor);
|
|
12
12
|
const makeGenericController = (constructor) => (component) => proxy(
|
|
13
13
|
component,
|
|
@@ -304,11 +304,11 @@ const exportsForTests = {
|
|
|
304
304
|
export {
|
|
305
305
|
Controller,
|
|
306
306
|
G as GenericController,
|
|
307
|
-
|
|
308
|
-
|
|
307
|
+
c as bypassReadOnly,
|
|
308
|
+
d2 as controllerSymbol,
|
|
309
309
|
exportsForTests,
|
|
310
310
|
g as getControllersCount,
|
|
311
|
-
|
|
311
|
+
e as isController,
|
|
312
312
|
load,
|
|
313
313
|
makeController,
|
|
314
314
|
makeGenericController,
|
|
@@ -318,7 +318,7 @@ export {
|
|
|
318
318
|
retrieveComponent,
|
|
319
319
|
toFunction,
|
|
320
320
|
trackKey,
|
|
321
|
-
|
|
321
|
+
t as trackPropKey,
|
|
322
322
|
d as trackPropertyKey,
|
|
323
323
|
useDirection,
|
|
324
324
|
useMedia,
|
|
@@ -5,6 +5,6 @@ export type Direction = "ltr" | "rtl";
|
|
|
5
5
|
* Watches for changes to "dir" and will re-render your component if needed.
|
|
6
6
|
*
|
|
7
7
|
* @see https://webgis.esri.com/references/lumina/controllers/useDirection
|
|
8
|
-
* @see [Design decisions](https://devtopia.esri.com/WebGIS/
|
|
8
|
+
* @see [Design decisions](https://devtopia.esri.com/WebGIS/webgis-sdk/discussions/987)
|
|
9
9
|
*/
|
|
10
10
|
export function useDirection(): Direction;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { GenericT9nStrings
|
|
1
|
+
import type { GenericT9nStrings } from "@arcgis/toolkit/intl";
|
|
2
|
+
import type { LocaleObserverResult } from "@arcgis/toolkit/intl/dom";
|
|
2
3
|
|
|
3
4
|
export type T9nMeta<T9nStrings extends GenericT9nStrings> = {
|
|
4
5
|
_lang: LocaleObserverResult["lang"];
|
|
@@ -48,7 +49,7 @@ export interface UseT9n {
|
|
|
48
49
|
*
|
|
49
50
|
* @param getAssetPath
|
|
50
51
|
* @see [Documentation](https://webgis.esri.com/references/lumina/controllers/useT9n)
|
|
51
|
-
* @see [Design decisions 1](https://devtopia.esri.com/WebGIS/
|
|
52
|
-
* @see [Design decisions 2](https://devtopia.esri.com/WebGIS/
|
|
52
|
+
* @see [Design decisions 1](https://devtopia.esri.com/WebGIS/webgis-sdk/discussions/969)
|
|
53
|
+
* @see [Design decisions 2](https://devtopia.esri.com/WebGIS/webgis-sdk/discussions/987)
|
|
53
54
|
*/
|
|
54
55
|
export function makeT9nController(getAssetPath: (path: string) => string): UseT9n;
|
package/dist/hmrSupport.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as ProxyComponent, n as noShadowRoot } from "./lazyLoad-
|
|
1
|
+
import { P as ProxyComponent, n as noShadowRoot } from "./lazyLoad-ki2r1z-R.js";
|
|
2
2
|
import { camelToKebab } from "@arcgis/toolkit/string";
|
|
3
3
|
function handleHmrUpdate(newModules) {
|
|
4
4
|
newModules.forEach((newModule) => {
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { p as propertyTrackResolve } from "./GenericController-
|
|
2
|
-
import {
|
|
1
|
+
import { p as propertyTrackResolve } from "./GenericController-Ko6PTuJs.js";
|
|
2
|
+
import { b } from "./GenericController-Ko6PTuJs.js";
|
|
3
3
|
import { state } from "lit/decorators/state.js";
|
|
4
4
|
import { property as property$1 } from "lit/decorators/property.js";
|
|
5
|
-
import { e as emptyFunction, n as noShadowRoot, p as proxyFormMethodsToEvents, a as attachToAncestor } from "./lazyLoad-
|
|
6
|
-
import { d, m } from "./lazyLoad-
|
|
5
|
+
import { e as emptyFunction, n as noShadowRoot, p as proxyFormMethodsToEvents, a as attachToAncestor } from "./lazyLoad-ki2r1z-R.js";
|
|
6
|
+
import { d, m } from "./lazyLoad-ki2r1z-R.js";
|
|
7
7
|
import { isEsriInternalEnv, safeAsyncCall, safeCall } from "@arcgis/toolkit/error";
|
|
8
8
|
import { camelToKebab } from "@arcgis/toolkit/string";
|
|
9
9
|
import { Deferred } from "@arcgis/toolkit/promise";
|
|
10
10
|
import { LitElement as LitElement$1, isServer, notEqual, noChange as noChange$1, nothing as nothing$1, render } from "lit";
|
|
11
|
-
import {
|
|
12
|
-
import { C as ControllerManager,
|
|
11
|
+
import { h as shouldBypassReadOnly, d as controllerSymbol } from "./ControllerInternals-DBoubTn4.js";
|
|
12
|
+
import { C as ControllerManager, b as autoDestroyDisabledPropName } from "./ControllerManager-CXEWZVTX.js";
|
|
13
13
|
import { propertyFlagAttribute, propertyFlagUseDefault, propertyFlagNoAccessor, propertyFlagReadOnly, propertyFlagState, propertyFlagBoolean, propertyFlagNumber, propertyFlagReflect } from "./config.js";
|
|
14
14
|
import { classMap } from "lit/directives/class-map.js";
|
|
15
15
|
import { styleMap } from "lit/directives/style-map.js";
|
|
@@ -557,7 +557,7 @@ export {
|
|
|
557
557
|
bindBooleanAttribute,
|
|
558
558
|
bindEvent,
|
|
559
559
|
bindProperty,
|
|
560
|
-
|
|
560
|
+
b as createEvent,
|
|
561
561
|
deferLoad,
|
|
562
562
|
deferredLoaders,
|
|
563
563
|
d as devOnly$getLitElementTagNameAndRuntime,
|
package/dist/jsx/directives.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StandardProperties } from "csstype";
|
|
2
2
|
import type { ClassInfo, ClassMapDirective } from "lit/directives/class-map.js";
|
|
3
3
|
import type { DirectiveResult, DirectiveClass } from "lit/directive.js";
|
|
4
4
|
import type { StyleMapDirective } from "lit/directives/style-map.js";
|
|
@@ -54,7 +54,7 @@ export function safeClassMap(parameters: ClassInfo | null | undefined | string):
|
|
|
54
54
|
* @param parameters
|
|
55
55
|
* @internal
|
|
56
56
|
*/
|
|
57
|
-
export function safeStyleMap(parameters:
|
|
57
|
+
export function safeStyleMap(parameters: null | undefined | StandardProperties | string): DirectiveResult<typeof StyleMapDirective> | null | undefined | string;
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* Do not use this directive directly. Use the `deferLoad` JSX prop instead.
|
|
@@ -3,7 +3,7 @@ import type { ClassInfo, ClassMapDirective } from "lit/directives/class-map.js";
|
|
|
3
3
|
import type { StyleMapDirective } from "lit/directives/style-map.js";
|
|
4
4
|
import type { ChangeEventHandlerUnion, CustomAttributes, EventHandlerUnion, FocusEventHandlerUnion, InputEventHandlerUnion } from "./baseTypes.js";
|
|
5
5
|
import type { JsxNode } from "./types.js";
|
|
6
|
-
import type {
|
|
6
|
+
import type { StandardProperties } from "csstype";
|
|
7
7
|
|
|
8
8
|
export type HtmlAutocapitalize = "characters" | "none" | "off" | "on" | "sentences" | "words";
|
|
9
9
|
|
|
@@ -501,7 +501,7 @@ export interface HTMLAttributes<T = HTMLElement> extends AriaAttributes, DOMAttr
|
|
|
501
501
|
*/
|
|
502
502
|
spellcheck?: boolean;
|
|
503
503
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) */
|
|
504
|
-
style?:
|
|
504
|
+
style?: DirectiveResult<typeof StyleMapDirective> | StandardProperties | string;
|
|
505
505
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex) */
|
|
506
506
|
tabIndex?: number | string;
|
|
507
507
|
/**
|
|
@@ -2279,7 +2279,7 @@ export interface SvgCoreAttributes<T> extends AriaAttributes, DOMAttributes<T> {
|
|
|
2279
2279
|
}
|
|
2280
2280
|
|
|
2281
2281
|
export interface SvgStylableAttributes {
|
|
2282
|
-
style?:
|
|
2282
|
+
style?: DirectiveResult<typeof StyleMapDirective> | StandardProperties | string;
|
|
2283
2283
|
}
|
|
2284
2284
|
|
|
2285
2285
|
export interface SvgTransformableAttributes {
|
package/dist/jsx/types.d.ts
CHANGED
|
@@ -70,7 +70,8 @@ export declare namespace LuminaJsx {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
export interface IntrinsicElements
|
|
73
|
-
extends
|
|
73
|
+
extends
|
|
74
|
+
HTMLElementTags,
|
|
74
75
|
SvgElementTags,
|
|
75
76
|
ReMappedComponents<DeclareElements>,
|
|
76
77
|
ReMapStencilComponents<ImportStencilElements> {}
|
|
@@ -322,6 +323,14 @@ export type RemapEvents<Component extends { el: unknown; }> = {
|
|
|
322
323
|
*/
|
|
323
324
|
export interface ImportStencilElements {}
|
|
324
325
|
|
|
326
|
+
/** @internal */
|
|
327
|
+
export interface DeclareCssProperties {}
|
|
328
|
+
|
|
329
|
+
/** @internal */
|
|
330
|
+
export type NormalizedDeclaredCssProperties = {
|
|
331
|
+
[key in keyof DeclareCssProperties]?: number | string;
|
|
332
|
+
};
|
|
333
|
+
|
|
325
334
|
/**
|
|
326
335
|
* Get the type of all events for a given component. Includes native DOM events
|
|
327
336
|
* and custom events.
|
|
@@ -215,7 +215,7 @@ class ProxyComponent extends HtmlElement {
|
|
|
215
215
|
/**
|
|
216
216
|
* "$$" is our top-level await polyfill due to broken top-level await
|
|
217
217
|
* support in Safari. Only applies in CDN build.
|
|
218
|
-
* See https://devtopia.esri.com/WebGIS/
|
|
218
|
+
* See https://devtopia.esri.com/WebGIS/webgis-sdk/issues/3933
|
|
219
219
|
* and https://bugs.webkit.org/show_bug.cgi?id=242740
|
|
220
220
|
*/
|
|
221
221
|
await (module.default?.then(
|
|
@@ -408,9 +408,15 @@ const patchLitElement = (parentClass) => {
|
|
|
408
408
|
const alreadyPatched = Object.hasOwn(litElementPrototype, "isConnected");
|
|
409
409
|
if (!alreadyPatched) {
|
|
410
410
|
litElementPrototype.setAttribute = function(qualifiedName, value) {
|
|
411
|
+
if (process.env.NODE_ENV !== "production" && isStaleHmrComponent(this)) {
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
411
414
|
elementPrototype.setAttribute.call(this.el, qualifiedName, value);
|
|
412
415
|
};
|
|
413
416
|
litElementPrototype.removeAttribute = function(qualifiedName) {
|
|
417
|
+
if (process.env.NODE_ENV !== "production" && isStaleHmrComponent(this)) {
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
414
420
|
elementPrototype.removeAttribute.call(this.el, qualifiedName);
|
|
415
421
|
};
|
|
416
422
|
litElementPrototype.hasAttribute = function(qualifiedName) {
|
|
@@ -426,6 +432,10 @@ const patchLitElement = (parentClass) => {
|
|
|
426
432
|
devOnlyDetectIncorrectLazyUsages(parentClass);
|
|
427
433
|
}
|
|
428
434
|
};
|
|
435
|
+
function isStaleHmrComponent(component) {
|
|
436
|
+
const currentComponent = "$component" in component.el ? component.el.$component : void 0;
|
|
437
|
+
return isEsriInternalEnv() && currentComponent !== void 0 && currentComponent !== component;
|
|
438
|
+
}
|
|
429
439
|
export {
|
|
430
440
|
ProxyComponent as P,
|
|
431
441
|
attachToAncestor as a,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as setParentController, f as setAmbientChildController, b as retrieveParentControllers, c as bypassReadOnly } from "./ControllerInternals-DBoubTn4.js";
|
|
2
|
+
import { a as trackKey } from "./GenericController-Ko6PTuJs.js";
|
|
3
3
|
const proxyExports = (Class) => (...args) => {
|
|
4
4
|
const ambientControllers = retrieveParentControllers();
|
|
5
5
|
const instance = new Class(...args);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A helper for documenting the accepted syntax for a CSS property.
|
|
3
|
+
*
|
|
4
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@property/syntax
|
|
5
|
+
*/
|
|
6
|
+
export type CssSyntax<Syntax extends CssSyntaxUnion, Multiplier extends "" | "#" | "+" = ""> = `<${Syntax}>${Multiplier}`;
|
|
7
|
+
|
|
8
|
+
export type CssSyntaxUnion = "absolute-size" | "alpha-value" | "angle-percentage" | "angle" | "axis" | "baseline-position" | "basic-shape" | "blend-mode" | "box-edge" | "calc-keyword" | "calc-sum" | "color-interpolation-method" | "color" | "content-distribution" | "content-position" | "corner-shape-value" | "custom-ident" | "dashed-function" | "dashed-ident" | "dimension" | "display-box" | "display-inside" | "display-internal" | "display-legacy" | "display-listitem" | "display-outside" | "easing-function" | "filter-function" | "flex" | "frequency-percentage" | "frequency" | "generic-family" | "gradient" | "hex-color" | "hue-interpolation-method" | "hue" | "ident" | "image" | "integer" | "length-percentage" | "length" | "line-style" | "line-width" | "named-color" | "number" | "overflow-position" | "overflow" | "percentage" | "position-area" | "position" | "ratio" | "relative-size" | "resolution" | "rule-list" | "self-position" | "shape" | "string" | "system-color" | "text-edge" | "time-percentage" | "time" | "timeline-range-name" | "transform-function" | "url";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/lumina",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.121",
|
|
4
4
|
"description": "Runtime for WebGIS SDK web components",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"./PublicLitElement": {
|
|
25
25
|
"types": "./dist/PublicLitElement.d.ts"
|
|
26
26
|
},
|
|
27
|
+
"./utils/cssSyntax": {
|
|
28
|
+
"types": "./dist/utils/cssSyntax.d.ts"
|
|
29
|
+
},
|
|
27
30
|
"./controllers": "./dist/controllers/index.js",
|
|
28
31
|
"./controllers/accessor": "./dist/controllers/accessor/index.js",
|
|
29
32
|
"./package.json": "./package.json"
|
|
@@ -33,9 +36,9 @@
|
|
|
33
36
|
],
|
|
34
37
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
35
38
|
"dependencies": {
|
|
39
|
+
"@arcgis/toolkit": "~5.2.0-next.121",
|
|
36
40
|
"csstype": "^3.1.3",
|
|
37
|
-
"tslib": "^2.8.1"
|
|
38
|
-
"@arcgis/toolkit": "~5.2.0-next.12"
|
|
41
|
+
"tslib": "^2.8.1"
|
|
39
42
|
},
|
|
40
43
|
"peerDependencies": {
|
|
41
44
|
"@lit/context": "^1.1.6",
|