@arcgis/lumina 4.33.0-next.124 → 4.33.0-next.125
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/{Controller-CZ8Djohh.js → Controller-B3mB4uaz.js} +173 -211
- package/dist/LitElement.d.ts +20 -18
- package/dist/config.d.ts +7 -9
- package/dist/config.js +15 -12
- package/dist/context.d.ts +2 -2
- package/dist/controllers/Controller.d.ts +4 -10
- package/dist/controllers/ControllerInternals.d.ts +7 -13
- package/dist/controllers/ControllerManager.d.ts +6 -21
- package/dist/controllers/accessor/index.d.ts +1 -1
- package/dist/controllers/accessor/index.js +175 -211
- package/dist/controllers/accessor/reEmitEvent.d.ts +1 -1
- package/dist/controllers/accessor/useAccessor.d.ts +29 -32
- package/dist/controllers/index.d.ts +2 -2
- package/dist/controllers/index.js +42 -39
- package/dist/controllers/trackKey.d.ts +1 -1
- package/dist/controllers/trackPropKey.d.ts +1 -1
- package/dist/controllers/trackPropertyKey.d.ts +2 -2
- package/dist/controllers/types.d.ts +30 -0
- package/dist/controllers/utils.d.ts +7 -9
- package/dist/hmrSupport.js +22 -22
- package/dist/index.d.ts +1 -1
- package/dist/index.js +160 -192
- package/dist/{utils-BdB9g3GU.js → lazyLoad-DcVuFccH.js} +173 -185
- package/dist/lazyLoad.d.ts +22 -67
- package/dist/lifecycleSupport.d.ts +1 -1
- package/dist/makeRuntime.d.ts +23 -1
- package/dist/{proxyExports-CK5BLFLO.js → proxyExports-DQobuu44.js} +8 -8
- package/dist/render.d.ts +1 -1
- package/dist/utils.d.ts +8 -0
- package/package.json +2 -2
package/dist/makeRuntime.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSSResult } from 'lit';
|
|
2
2
|
import { LitElement } from './LitElement';
|
|
3
|
+
import { AccessorObservableLike } from './controllers/types';
|
|
3
4
|
/**
|
|
4
5
|
* `@arcgis/lumina` package may be bundled once but used by multiple packages with
|
|
5
6
|
* different configuration options. For that reason, the configuration options
|
|
@@ -53,6 +54,27 @@ export type Runtime = RuntimeOptions & {
|
|
|
53
54
|
* ```
|
|
54
55
|
*/
|
|
55
56
|
readonly customElement: (tagName: string, component: typeof LitElement) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Short for trackAccess. A reference to JS API's accessor's trackAccess
|
|
59
|
+
* function to mark an observable as accessed.
|
|
60
|
+
* Used in the getter for each property in component packages that use @arcgis/core.
|
|
61
|
+
*
|
|
62
|
+
* @private
|
|
63
|
+
*/
|
|
64
|
+
t?: (observable: AccessorObservableLike) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Short for createObservable. A callback to create a JS API Accessor's
|
|
67
|
+
* SimpleObservable. Such observable will be created for each property in
|
|
68
|
+
* component packages that use @arcgis/core to bring reactiveUtils integration.
|
|
69
|
+
* @private
|
|
70
|
+
*/
|
|
71
|
+
o?: () => AccessorObservableLike;
|
|
72
|
+
/**
|
|
73
|
+
* In CDN build, we can only import @arcgis/core async, so the lazy loader will need
|
|
74
|
+
* to await this promise before beginning hydration so that the reactiveUtils
|
|
75
|
+
* integration modules had time to load.
|
|
76
|
+
*/
|
|
77
|
+
p?: Promise<void>;
|
|
56
78
|
};
|
|
57
79
|
export type RuntimeOptions = {
|
|
58
80
|
/**
|
|
@@ -88,7 +110,7 @@ export type RuntimeOptions = {
|
|
|
88
110
|
* The options object will be provided by Lumina compiler at build-time.
|
|
89
111
|
* It should not be specified in the source code.
|
|
90
112
|
*/
|
|
91
|
-
export declare
|
|
113
|
+
export declare const makeRuntime: (options?: RuntimeOptions) => Runtime;
|
|
92
114
|
/**
|
|
93
115
|
* Exposing the reference to the runtime globally when in tests or development.
|
|
94
116
|
* This is primarily for usage by dynamically created components in tests
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as setParentController, e as retrieveParentControllers, o as setAmbientChildController, t as trackKey, h as bypassReadOnly } from "./Controller-B3mB4uaz.js";
|
|
2
2
|
const proxyExports = (Class) => (...args) => {
|
|
3
3
|
const ambientControllers = retrieveParentControllers();
|
|
4
4
|
const instance = new Class(...args);
|
|
5
5
|
const initialExports = instance.exports;
|
|
6
6
|
setParentController(ambientControllers.at(-1));
|
|
7
7
|
const manager = instance.component.manager;
|
|
8
|
-
manager.
|
|
9
|
-
instance.watchExports(
|
|
8
|
+
manager.W(instance, initialExports);
|
|
9
|
+
instance.watchExports(manager.W.bind(manager, instance));
|
|
10
10
|
setAmbientChildController(instance);
|
|
11
11
|
const hostCandidates = [instance.component, ...ambientControllers].reverse();
|
|
12
12
|
return trackKey(
|
|
@@ -15,7 +15,7 @@ const proxyExports = (Class) => (...args) => {
|
|
|
15
15
|
initialExports
|
|
16
16
|
);
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
const setProxy = (controller, { host, key, isReactive: assignedToProp }, initialExports) => {
|
|
19
19
|
const genericHost = host;
|
|
20
20
|
const controllerValueChanged = genericHost[key] !== controller.exports;
|
|
21
21
|
const hostValueChanged = genericHost[key] !== initialExports;
|
|
@@ -28,18 +28,18 @@ function setProxy(controller, { host, key, isReactive: assignedToProp }, initial
|
|
|
28
28
|
if (assignedToProp) {
|
|
29
29
|
const manager = controller.component.manager;
|
|
30
30
|
if (hostValueChanged) {
|
|
31
|
-
manager.
|
|
31
|
+
manager.W(controller, genericHost[key]);
|
|
32
32
|
}
|
|
33
33
|
controller.onUpdate((changes) => {
|
|
34
34
|
if (changes.has(key)) {
|
|
35
35
|
const value = genericHost[key];
|
|
36
36
|
if (value !== controller.exports) {
|
|
37
|
-
manager.
|
|
37
|
+
manager.W(controller, value);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
controller.
|
|
42
|
+
controller.O = assignedToProp ? void 0 : key;
|
|
43
43
|
}
|
|
44
44
|
const isReadOnly = controller.component.constructor.elementProperties.get(key)?.readOnly;
|
|
45
45
|
controller.watchExports(() => {
|
|
@@ -54,7 +54,7 @@ function setProxy(controller, { host, key, isReactive: assignedToProp }, initial
|
|
|
54
54
|
genericHost[key] = controller.exports;
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
}
|
|
57
|
+
};
|
|
58
58
|
export {
|
|
59
59
|
proxyExports as p
|
|
60
60
|
};
|
package/dist/render.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import { JsxNode } from './jsx/types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Retrieve an HTML element to be manually appended to an existing component.
|
|
4
4
|
*/
|
|
5
|
-
export declare
|
|
5
|
+
export declare const renderElement: <Element extends HTMLElement = HTMLElement>(element: JsxNode) => Element;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { LitElement } from './LitElement';
|
|
2
|
+
import { Runtime } from './makeRuntime';
|
|
1
3
|
/**
|
|
2
4
|
* Add this static property to your component to disable shadow root.
|
|
3
5
|
*
|
|
@@ -18,3 +20,9 @@ export declare const noShadowRoot: ShadowRootInit;
|
|
|
18
20
|
* attachShadow() since we use this exact empty object as a magic value to opt
|
|
19
21
|
* out of shadow root.
|
|
20
22
|
*/
|
|
23
|
+
export declare function emptyFunction(): undefined;
|
|
24
|
+
/** @private */
|
|
25
|
+
export declare const devOnly$getLitElementTagNameAndRuntime: ((componentClass: typeof LitElement) => {
|
|
26
|
+
tagName: string;
|
|
27
|
+
runtime: Runtime;
|
|
28
|
+
}) | undefined;
|
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.125",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@arcgis/components-utils": "4.33.0-next.
|
|
25
|
+
"@arcgis/components-utils": "4.33.0-next.125",
|
|
26
26
|
"@lit-labs/ssr": "^3.2.2",
|
|
27
27
|
"@lit-labs/ssr-client": "^1.1.7",
|
|
28
28
|
"@lit/context": "^1.1.5",
|