@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.
@@ -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 function makeRuntime(options?: RuntimeOptions): Runtime;
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 { e as setParentController, f as retrieveParentControllers, u as setAmbientChildController, t as trackKey, l as bypassReadOnly } from "./Controller-CZ8Djohh.js";
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._markExports(instance, initialExports);
9
- instance.watchExports((exports) => manager._markExports(instance, exports));
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
- function setProxy(controller, { host, key, isReactive: assignedToProp }, initialExports) {
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._markExports(controller, genericHost[key]);
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._markExports(controller, value);
37
+ manager.W(controller, value);
38
38
  }
39
39
  }
40
40
  });
41
41
  }
42
- controller.assignedProperty = assignedToProp ? void 0 : key;
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 function renderElement<Element extends HTMLElement = HTMLElement>(element: JsxNode): Element;
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.124",
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.124",
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",