@arcgis/lumina 4.34.0-next.14 → 4.34.0-next.140

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Licensing
2
2
 
3
- COPYRIGHT © 2025 Esri
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
 
package/README.md CHANGED
@@ -8,14 +8,6 @@ It is not intended to be used directly, but rather used as a dependency by other
8
8
 
9
9
  ## License
10
10
 
11
- COPYRIGHT © 2025 Esri
11
+ COPYRIGHT © Esri
12
12
 
13
- All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
14
-
15
- This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement. You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
16
-
17
- See use restrictions at <http://www.esri.com/legal/pdfs/mla_e204_e300/english>
18
-
19
- For additional information, contact: Environmental Systems Research Institute, Inc. Attn: Contracts and Legal Services Department 380 New York Street Redlands, California, USA 92373 USA
20
-
21
- email: contracts@esri.com
13
+ This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package.
@@ -1,126 +1,12 @@
1
- import { isEsriInternalEnv, safeCall, Deferred, safeAsyncCall } from "@arcgis/components-utils";
1
+ import { safeCall, isEsriInternalEnv, safeAsyncCall } from "@arcgis/toolkit/error";
2
+ import { r as retrieveComponent, d as retrieveParentControllers, b as setParentController, s as setAmbientComponent, u as use, k as useRef, l as useRefSync, c as controllerSymbol } from "./ControllerInternals-CWQrfEA8.js";
2
3
  import { nothing } from "lit";
3
- const controllerSymbol = Symbol.for("controller");
4
- const isController = (value) => typeof value === "object" && value !== null && (controllerSymbol in value || "hostConnected" in value || "hostDisconnected" in value || "hostUpdate" in value || "hostUpdated" in value);
5
- const isPromise = (arg) => typeof arg?.then === "function";
6
- const getControllersCount = (component) => component.M.length;
7
- let ambientComponent;
8
- const setAmbientComponent = (component) => {
9
- if (ambientComponent === component) {
10
- return;
11
- }
12
- ambientComponent = component;
13
- queueMicrotask(() => ambientComponent === component ? ambientComponent = void 0 : 0);
14
- };
15
- const retrieveComponent = (name) => {
16
- if (process.env.NODE_ENV !== "production" && ambientComponent === void 0) {
17
- throw new Error(
18
- [
19
- `Unable to find out which component ${name || "this"} controller `,
20
- "belongs to. Possible causes:\n",
21
- "- You might have multiple versions of ",
22
- "@arcgis/lumina package installed\n",
23
- ...isEsriInternalEnv() ? [
24
- "- You tried to create controller outside the component. If so, ",
25
- "please wrap your controller definition in an arrow function (like",
26
- "`const myController = ()=>makeController(...);`) and call that",
27
- "function inside the component (`my = myController();`), or ",
28
- "define your controller using makeGenericController/GenericController ",
29
- "instead.\n",
30
- "- You tried to create a controller inside an async function. ",
31
- "This is allowed without calling controller.use(). Make sure you ",
32
- "use it like `await controller.use(useController())`."
33
- ] : []
34
- ].join("")
35
- );
36
- }
37
- return ambientComponent;
38
- };
39
- let ambientControllers = [];
40
- const setParentController = (controller) => {
41
- if (controller === void 0) {
42
- ambientControllers = [];
43
- return;
44
- }
45
- const index = ambientControllers.indexOf(controller);
46
- ambientControllers = index === -1 ? [...ambientControllers, controller] : ambientControllers.slice(0, index + 1);
47
- queueMicrotask(() => ambientControllers = []);
48
- };
49
- const retrieveParentControllers = () => ambientControllers;
50
- let ambientChildController;
51
- const setAmbientChildController = (controller) => {
52
- if (ambientChildController === controller) {
53
- return;
54
- }
55
- ambientChildController = controller;
56
- queueMicrotask(() => ambientChildController === controller ? ambientChildController = void 0 : 0);
57
- };
58
- const retrieveAmbientChildController = () => {
59
- const controller = ambientChildController;
60
- ambientChildController = void 0;
61
- return controller;
62
- };
63
- const use = async (value, watchExports) => {
64
- const controller = useRefSync(value);
65
- if (controller === void 0) {
66
- if (process.env.NODE_ENV !== "production" && isEsriInternalEnv() && typeof watchExports === "function") {
67
- throw new Error(
68
- `Unable to resolve a controller from the provided value, so can't watch it's exports. The value you passed is not a controller and not a controller exports. If your controller exports a literal value, try making your controller export an object instead`
69
- );
70
- }
71
- return value;
72
- }
73
- await controller.ready;
74
- if (typeof watchExports === "function") {
75
- if (process.env.NODE_ENV !== "production" && isEsriInternalEnv() && controller.watchExports === void 0) {
76
- throw new Error(`The controller must implement watchExports method to support watching exports`);
77
- }
78
- const unsubscribe = controller.watchExports(
79
- (exports) => watchExports(exports, unsubscribe)
80
- );
81
- }
82
- return controller.exports;
83
- };
84
- const useRef = async (value) => {
85
- const controller = useRefSync(value);
86
- if (process.env.NODE_ENV !== "production" && isEsriInternalEnv() && controller === void 0) {
87
- throw new Error(
88
- `Unable to resolve a controller from the provided value. The value you passed is not a controller and not a controller exports. If your controller exports a literal value, try making your controller export an object instead`
89
- );
90
- }
91
- await controller.ready;
92
- return controller;
93
- };
94
- const useRefSync = (value) => {
95
- const component = retrieveComponent();
96
- const controller = component.manager.X(value);
97
- if (controller !== void 0) {
98
- return controller;
99
- }
100
- if (isController(value)) {
101
- return value;
102
- }
103
- const ambientChildController2 = retrieveAmbientChildController();
104
- if (ambientChildController2 !== void 0) {
105
- return ambientChildController2;
106
- }
107
- return void 0;
108
- };
109
- let shouldBypassReadOnly = false;
110
- const bypassReadOnly = (callback) => {
111
- shouldBypassReadOnly = true;
112
- try {
113
- return callback();
114
- } finally {
115
- shouldBypassReadOnly = false;
116
- }
117
- };
118
- const bypassSetter = bypassReadOnly;
4
+ import { Deferred } from "@arcgis/toolkit/promise";
119
5
  const trackPropertyKey = (object, onResolved, defaultValue) => {
120
6
  const keys = Object.keys(object);
121
7
  const keyCount = keys.length;
122
8
  if (keyTrackMap === void 0) {
123
- queueMicrotask(keyTrackResolve);
9
+ queueMicrotask(propertyTrackResolve);
124
10
  }
125
11
  keyTrackMap ??= /* @__PURE__ */ new Map();
126
12
  let pendingTrackers = keyTrackMap.get(object);
@@ -147,7 +33,7 @@ const trackPropertyKey = (object, onResolved, defaultValue) => {
147
33
  return defaultValue;
148
34
  };
149
35
  let keyTrackMap = void 0;
150
- const keyTrackResolve = () => {
36
+ const propertyTrackResolve = () => {
151
37
  keyTrackMap?.forEach(({ callbacks }, object) => {
152
38
  const keys = Object.keys(object);
153
39
  callbacks.forEach((commit) => commit(keys));
@@ -207,7 +93,7 @@ const createEventFactory = (eventName = "", options = {}, component = retrieveCo
207
93
  console.warn(`Trying to emit an ${eventName} event on a disconnected element ${component.el.localName}`);
208
94
  }
209
95
  if (eventName === "") {
210
- keyTrackResolve();
96
+ propertyTrackResolve();
211
97
  if (process.env.NODE_ENV !== "production" && isEsriInternalEnv() && eventName === "") {
212
98
  throw new Error("Unable to resolve event name from property name");
213
99
  }
@@ -566,22 +452,10 @@ const accessBeforeLoad = process.env.NODE_ENV !== "production" && isEsriInternal
566
452
  export {
567
453
  Controller as C,
568
454
  GenericController as G,
569
- shouldBypassReadOnly as a,
570
- createEvent as b,
571
- controllerSymbol as c,
572
- setParentController as d,
573
- retrieveParentControllers as e,
574
- createEventFactory as f,
575
- bypassSetter as g,
576
- bypassReadOnly as h,
577
- isPromise as i,
578
- trackPropertyKey as j,
579
- keyTrackResolve as k,
580
- trackPropKey as l,
581
- isController as m,
582
- getControllersCount as n,
583
- setAmbientChildController as o,
584
- retrieveComponent as r,
585
- setAmbientComponent as s,
455
+ createEventFactory as a,
456
+ trackPropertyKey as b,
457
+ createEvent as c,
458
+ trackPropKey as d,
459
+ propertyTrackResolve as p,
586
460
  trackKey as t
587
461
  };
@@ -0,0 +1,133 @@
1
+ import { isEsriInternalEnv } from "@arcgis/toolkit/error";
2
+ const controllerSymbol = Symbol.for("controller");
3
+ const isController = (value) => typeof value === "object" && value !== null && (controllerSymbol in value || "hostConnected" in value || "hostDisconnected" in value || "hostUpdate" in value || "hostUpdated" in value);
4
+ const isPromise = (arg) => typeof arg?.then === "function";
5
+ const getControllersCount = (component) => component.M.length;
6
+ let ambientComponent;
7
+ const setAmbientComponent = (component) => {
8
+ if (ambientComponent === component) {
9
+ return;
10
+ }
11
+ ambientComponent = component;
12
+ queueMicrotask(() => ambientComponent === component ? ambientComponent = void 0 : 0);
13
+ };
14
+ const retrieveComponent = (name) => {
15
+ if (process.env.NODE_ENV !== "production" && ambientComponent === void 0) {
16
+ throw new Error(
17
+ [
18
+ `Unable to find out which component ${name || "this"} controller `,
19
+ "belongs to. Possible causes:\n",
20
+ "- You might have multiple versions of ",
21
+ "@arcgis/lumina package installed\n",
22
+ ...isEsriInternalEnv() ? [
23
+ "- You tried to create controller outside the component (in ",
24
+ "non-component class or in global scope).",
25
+ "- You accidentally defined the controller using const a = ",
26
+ "makeController(...); rather than const a = () => ",
27
+ "makeController(...);",
28
+ "- You tried to create a controller inside an async function. ",
29
+ "This is not allowed without calling controller.use(). Make ",
30
+ "sure you use it like `await controller.use(useController())`."
31
+ ] : []
32
+ ].join("")
33
+ );
34
+ }
35
+ return ambientComponent;
36
+ };
37
+ let ambientControllers = [];
38
+ const setParentController = (controller) => {
39
+ if (controller === void 0) {
40
+ ambientControllers = [];
41
+ return;
42
+ }
43
+ const index = ambientControllers.indexOf(controller);
44
+ ambientControllers = index === -1 ? [...ambientControllers, controller] : ambientControllers.slice(0, index + 1);
45
+ queueMicrotask(() => ambientControllers = []);
46
+ };
47
+ const retrieveParentControllers = () => ambientControllers;
48
+ let ambientChildController;
49
+ const setAmbientChildController = (controller) => {
50
+ if (ambientChildController === controller) {
51
+ return;
52
+ }
53
+ ambientChildController = controller;
54
+ queueMicrotask(() => ambientChildController === controller ? ambientChildController = void 0 : 0);
55
+ };
56
+ const retrieveAmbientChildController = () => {
57
+ const controller = ambientChildController;
58
+ ambientChildController = void 0;
59
+ return controller;
60
+ };
61
+ const use = async (value, watchExports) => {
62
+ const controller = useRefSync(value);
63
+ if (controller === void 0) {
64
+ if (process.env.NODE_ENV !== "production" && isEsriInternalEnv() && typeof watchExports === "function") {
65
+ throw new Error(
66
+ `Unable to resolve a controller from the provided value, so can't watch it's exports. The value you passed is not a controller and not a controller exports. If your controller exports a literal value, try making your controller export an object instead`
67
+ );
68
+ }
69
+ return value;
70
+ }
71
+ await controller.ready;
72
+ if (typeof watchExports === "function") {
73
+ if (process.env.NODE_ENV !== "production" && isEsriInternalEnv() && controller.watchExports === void 0) {
74
+ throw new Error(`The controller must implement watchExports method to support watching exports`);
75
+ }
76
+ const unsubscribe = controller.watchExports(
77
+ (exports) => watchExports(exports, unsubscribe)
78
+ );
79
+ }
80
+ return controller.exports;
81
+ };
82
+ const useRef = async (value) => {
83
+ const controller = useRefSync(value);
84
+ if (process.env.NODE_ENV !== "production" && isEsriInternalEnv() && controller === void 0) {
85
+ throw new Error(
86
+ `Unable to resolve a controller from the provided value. The value you passed is not a controller and not a controller exports. If your controller exports a literal value, try making your controller export an object instead`
87
+ );
88
+ }
89
+ await controller.ready;
90
+ return controller;
91
+ };
92
+ const useRefSync = (value) => {
93
+ const component = retrieveComponent();
94
+ const controller = component.manager.X(value);
95
+ if (controller !== void 0) {
96
+ return controller;
97
+ }
98
+ if (isController(value)) {
99
+ return value;
100
+ }
101
+ const ambientChildController2 = retrieveAmbientChildController();
102
+ if (ambientChildController2 !== void 0) {
103
+ return ambientChildController2;
104
+ }
105
+ return void 0;
106
+ };
107
+ let shouldBypassReadOnly = false;
108
+ const bypassReadOnly = (callback) => {
109
+ shouldBypassReadOnly = true;
110
+ try {
111
+ return callback();
112
+ } finally {
113
+ shouldBypassReadOnly = false;
114
+ }
115
+ };
116
+ const bypassSetter = bypassReadOnly;
117
+ export {
118
+ shouldBypassReadOnly as a,
119
+ setParentController as b,
120
+ controllerSymbol as c,
121
+ retrieveParentControllers as d,
122
+ bypassSetter as e,
123
+ bypassReadOnly as f,
124
+ isController as g,
125
+ getControllersCount as h,
126
+ isPromise as i,
127
+ setAmbientChildController as j,
128
+ useRef as k,
129
+ useRefSync as l,
130
+ retrieveComponent as r,
131
+ setAmbientComponent as s,
132
+ use as u
133
+ };
@@ -252,4 +252,23 @@ type Listener<ThisType, EventType> = ((this: ThisType, event: EventType) => unkn
252
252
  export type GlobalThisWithOwnTagNames = typeof globalThis & {
253
253
  devOnly$ownTagNames?: Set<string>;
254
254
  };
255
+ /**
256
+ * Lumina tracks accesses to JSAPI Accessor properties during render() and
257
+ * automatically re-renders the component when any tracked property changes.
258
+ *
259
+ * If your render() has imperative rendering logic or relies on specific render()
260
+ * call timing, you can temporarily disable this reactiveUtils integration to
261
+ * give you time to complete the migration and refactor the code.
262
+ *
263
+ * @deprecated Use this as a **temporary** workaround only.
264
+ * @example
265
+ * ```ts
266
+ * import { disableReactiveUtilsIntegration } from "@arcgis/lumina";
267
+ * class MyComponent extends LitElement {
268
+ * // ...
269
+ * }
270
+ * disableReactiveUtilsIntegration(MyComponent);
271
+ * ```
272
+ */
273
+ export declare function disableReactiveUtilsIntegration(componentClass: typeof LitElement): void;
255
274
  export {};
@@ -0,0 +1,18 @@
1
+ import { ContextProvider, ContextConsumer } from "@lit/context";
2
+ import { r as retrieveComponent } from "./ControllerInternals-CWQrfEA8.js";
3
+ const useContextProvider = (options) => {
4
+ const component = retrieveComponent();
5
+ const controller = new ContextProvider(component.el, options);
6
+ component.addController(controller);
7
+ return controller;
8
+ };
9
+ const useContextConsumer = (options) => {
10
+ const component = retrieveComponent();
11
+ const controller = new ContextConsumer(component.el, options);
12
+ component.addController(controller);
13
+ return controller;
14
+ };
15
+ export {
16
+ useContextConsumer,
17
+ useContextProvider
18
+ };
@@ -1,4 +1,4 @@
1
- import { Deferred } from '@arcgis/components-utils';
1
+ import { Deferred } from '@arcgis/toolkit/promise';
2
2
  import { BaseController, ControllerLifecycleMethods, controllerSymbol } from './types';
3
3
  import { use, useRef, useRefSync } from './ControllerInternals';
4
4
  import { PropertyValues } from 'lit';
@@ -8,8 +8,6 @@ import { LitElement } from '../LitElement';
8
8
  * Defining controller using makeController() function is more succinct for smaller
9
9
  * controllers. For controllers that need to declare several methods, or need
10
10
  * more flexibility, this class may be used
11
- *
12
- * See ./examples.tsx for many example controllers and their usages.
13
11
  */
14
12
  export declare abstract class Controller<Exports = never> implements BaseController {
15
13
  #private;
@@ -42,7 +42,7 @@ type InferController<ControllerOrExports> = ControllerOrExports extends BaseCont
42
42
  watchExports?: Controller["watchExports"];
43
43
  } : Controller<ControllerOrExports>;
44
44
  /**
45
- * If controller never sets it's exports, then it's default exports is "this".
45
+ * If controller never sets its exports, then its default exports is "this".
46
46
  * This allows usage of controller.use with controllers that don't have exports
47
47
  */
48
48
  type NotNever<T extends {
@@ -1,7 +1,8 @@
1
- import { isEsriInternalEnv } from "@arcgis/components-utils";
2
- import { r as retrieveComponent, f as createEventFactory, G as GenericController, l as trackPropKey, t as trackKey } from "../../Controller-BQOv8BAL.js";
1
+ import { isEsriInternalEnv } from "@arcgis/toolkit/error";
2
+ import { r as retrieveComponent } from "../../ControllerInternals-CWQrfEA8.js";
3
3
  import { on, watch } from "@arcgis/core/core/reactiveUtils.js";
4
- import { p as proxyExports } from "../../proxyExports-Cdzj7WL_.js";
4
+ import { a as createEventFactory, G as GenericController, d as trackPropKey, t as trackKey } from "../../Controller-ftAEcdmI.js";
5
+ import { p as proxyExports } from "../../proxyExports-D906TEtL.js";
5
6
  import { createObservable, trackAccess } from "@arcgis/core/applications/Components/reactiveUtils.js";
6
7
  import { property, subclass } from "@arcgis/core/core/accessorSupport/decorators.js";
7
8
  import Accessor from "@arcgis/core/core/Accessor.js";
@@ -22,6 +23,7 @@ class AccessorController extends GenericController {
22
23
  constructor(component, createInstance) {
23
24
  super(component);
24
25
  this.Y = /* @__PURE__ */ new Map();
26
+ this.A = void 0;
25
27
  this.#exportsObservable = createObservable();
26
28
  const that = this;
27
29
  that.#createInstance = createInstance;
@@ -107,9 +109,12 @@ const makeBinderProxy = (component, accessorControllerRef, accessorControllerInd
107
109
  ) {
108
110
  return value;
109
111
  }
112
+ const accessorController = component.M[accessorControllerIndex];
113
+ accessorController.A = propertyName;
110
114
  return trackKey(
111
115
  component,
112
116
  (resolved) => {
117
+ accessorController.A = void 0;
113
118
  if (resolved !== void 0) {
114
119
  const propName = resolved.key;
115
120
  boundProperties.set(propertyName, propName);
@@ -120,15 +125,15 @@ const makeBinderProxy = (component, accessorControllerRef, accessorControllerInd
120
125
  if (!(propertyName in instance)) {
121
126
  throw new Error(`"${propertyName}" does not exist on the accessor instance`);
122
127
  }
123
- const accessorController = component.M[accessorControllerIndex];
128
+ const accessorController2 = component.M[accessorControllerIndex];
124
129
  if (descriptor.i !== void 0 && descriptor.i !== accessorControllerIndex) {
125
- console.error(component.M[descriptor.i], accessorController);
130
+ console.error(component.M[descriptor.i], accessorController2);
126
131
  throw Error(
127
132
  `Expected property "${propName}" to be bound to the controller at index ${descriptor.i}, but tried to bind it to a controller at index ${accessorControllerIndex}. Double check whether you are calling useAccessor() conditionally in a way that is not supported.`
128
133
  );
129
134
  }
130
- if (accessorController !== accessorControllerRef.deref()) {
131
- console.error(accessorController);
135
+ if (accessorController2 !== accessorControllerRef.deref()) {
136
+ console.error(accessorController2);
132
137
  throw Error(
133
138
  `Expected controller at index ${accessorControllerIndex} to be instance of useAccessor but it is not.`
134
139
  );
@@ -156,13 +161,6 @@ const makeBinderProxy = (component, accessorControllerRef, accessorControllerInd
156
161
  },
157
162
  value
158
163
  );
159
- },
160
- set(_target, propertyName, newValue) {
161
- if (boundProperties.has(propertyName) || // But some properties may be never bound, yet set in the constructor - let them through
162
- newValue !== (instance[propertyName] ?? void 0)) {
163
- instance[propertyName] = newValue;
164
- }
165
- return true;
166
164
  }
167
165
  });
168
166
  const watchBoundProperty = (controllerRef, descriptor, propertyName, propName, shouldFlipBoolean, _handle) => _handle = watch(
@@ -199,7 +197,10 @@ const bindPropToProperty = (descriptor, accessorControllerIndex, propertyName, s
199
197
  return shouldFlipBoolean ? !value : value;
200
198
  };
201
199
  descriptor.d.set = function(newValue) {
202
- this.M[accessorControllerIndex].exports[propertyName] = shouldFlipBoolean ? !newValue : newValue;
200
+ const accessorController = this.M[accessorControllerIndex];
201
+ if (accessorController.A !== propertyName) {
202
+ accessorController.exports[propertyName] = shouldFlipBoolean ? !newValue : newValue;
203
+ }
203
204
  };
204
205
  };
205
206
  const getAccessorControllerBoundProperties = (controller) => controller.Y;
@@ -212,10 +213,15 @@ const reCreateAccessor = (instance, component) => {
212
213
  console.error("Unable to resolve the useAccessor controller from the provided value");
213
214
  }
214
215
  };
215
- const createStore = (defaultValues) => {
216
+ const createStore = (initializer) => {
216
217
  const SubClass = class extends Accessor {
217
218
  };
218
- Object.entries(defaultValues).forEach(([name, value]) => property({ value })(SubClass.prototype, name));
219
+ const defaultValues = typeof initializer === "function" ? initializer() : initializer;
220
+ const descriptors = Object.getOwnPropertyDescriptors(defaultValues);
221
+ for (const [key, descriptor] of Object.entries(descriptors)) {
222
+ Object.defineProperty(SubClass.prototype, key, descriptor);
223
+ property()(SubClass.prototype, key);
224
+ }
219
225
  const State = subclass()(SubClass);
220
226
  return new State();
221
227
  };
@@ -2,9 +2,9 @@ import { default as Accessor } from '@arcgis/core/core/Accessor.js';
2
2
  /**
3
3
  * See https://qawebgis.esri.com/components/lumina/controllers/useAccessor#createstore-utility
4
4
  */
5
- export declare const createStore: <T extends Record<string, unknown>>(defaultValues: T | (() => T)) => __esri.Accessor & T;
5
+ export declare const createStore: <T extends object>(initializer: T | (() => T)) => __esri.Accessor & T;
6
6
  /** @deprecated Use {@link createStore} instead */
7
- export declare const createLegacyStore: <T extends Record<string, unknown>>(defaultState: T | (() => T)) => ObservableMap<T>;
7
+ export declare const createLegacyStore: <T extends object>(defaultState: T | (() => T)) => ObservableMap<T>;
8
8
  /** @deprecated Use {@link createStore} instead */
9
9
  export type ObservableMap<T> = {
10
10
  state: Accessor & T;
@@ -1,4 +1,4 @@
1
- import { Controller, GenericController } from '../Controller';
1
+ import { GenericController } from '../Controller';
2
2
  import { LitElement } from '../../LitElement';
3
3
  type Requires<Props, Accessor extends __esri.Accessor, OmitProps extends string = never> = LitElement & Omit<Pick<Accessor, keyof Accessor & keyof Props>, AlwaysOmit | OmitProps> & {
4
4
  autoDestroyDisabled: boolean;
@@ -46,6 +46,8 @@ export declare class AccessorController<Props, Accessor extends __esri.Accessor,
46
46
  * @private
47
47
  */
48
48
  _boundAccessorProperties: Map<string & keyof Accessor, string>;
49
+ /** @private */
50
+ _currentlyBindingPropertyName?: string;
49
51
  /**
50
52
  * (development only) Allow these props to mismatch the name of the Accessor's
51
53
  * property to avoid collisions
@@ -61,8 +63,11 @@ export declare class AccessorController<Props, Accessor extends __esri.Accessor,
61
63
  hostConnected(): void;
62
64
  hostDestroy(): void;
63
65
  }
64
- export declare const makeBinderProxy: (component: LitElement, accessorControllerRef: WeakRef<Pick<Controller<__esri.Accessor>, "component" | "exports"> & {
65
- constructor: (typeof __esri.Accessor)["constructor"] & {
66
+ type MinimalAccessorController = Pick<AccessorController<never, __esri.Accessor>, "_currentlyBindingPropertyName" | "exports"> & {
67
+ component: LitElement;
68
+ };
69
+ export declare const makeBinderProxy: (component: LitElement, accessorControllerRef: WeakRef<MinimalAccessorController & {
70
+ constructor: MinimalAccessorController["constructor"] & {
66
71
  devOnly$allowedPropNameMismatches?: ReadonlySet<string>;
67
72
  };
68
73
  }>, accessorControllerIndex: number, instance: __esri.Accessor, boundProperties: Map<string, string>) => unknown;
@@ -3,7 +3,7 @@ export type { GenericControllerType } from './Controller';
3
3
  export { Controller, GenericController } from './Controller';
4
4
  export type { ControllerManager } from './ControllerManager';
5
5
  export { retrieveComponent, bypassSetter, bypassReadOnly } from './ControllerInternals';
6
- export { trackPropertyKey, keyTrackResolve } from './trackPropertyKey';
6
+ export { trackPropertyKey, propertyTrackResolve } from './trackPropertyKey';
7
7
  export { trackPropKey } from './trackPropKey';
8
8
  export { trackKey } from './trackKey';
9
9
  export { makeController, makeGenericController } from './functional';
@@ -22,3 +22,7 @@ export { isController, getControllersCount } from './utils';
22
22
  * @deprecated import from "@arcgis/lumina" instead
23
23
  */
24
24
  export type EventEmitter<T = undefined> = _EventEmitter<T>;
25
+ /**
26
+ * @deprecated Let us know if someone is using this
27
+ */
28
+ export declare const keyTrackResolve: () => void;
@@ -1,14 +1,18 @@
1
- import { C as Controller, s as setAmbientComponent, i as isPromise, d as setParentController, e as retrieveParentControllers, t as trackKey, r as retrieveComponent, f as createEventFactory } from "../Controller-BQOv8BAL.js";
2
- import { G, h, g, c, n, m, k, l, j } from "../Controller-BQOv8BAL.js";
3
- import { p as proxyExports } from "../proxyExports-Cdzj7WL_.js";
1
+ import { C as Controller, t as trackKey, a as createEventFactory, p as propertyTrackResolve } from "../Controller-ftAEcdmI.js";
2
+ import { G, d, b } from "../Controller-ftAEcdmI.js";
3
+ import { s as setAmbientComponent, i as isPromise, b as setParentController, d as retrieveParentControllers, r as retrieveComponent } from "../ControllerInternals-CWQrfEA8.js";
4
+ import { f, e, c, h, g } from "../ControllerInternals-CWQrfEA8.js";
5
+ import { p as proxyExports } from "../proxyExports-D906TEtL.js";
4
6
  import { isServer } from "lit";
5
- import { observeAncestorsMutation, isEsriInternalEnv, getElementAttribute, getElementLocales, startLocaleObserver } from "@arcgis/components-utils";
7
+ import { isEsriInternalEnv } from "@arcgis/toolkit/error";
8
+ import { observeAncestorsMutation, getElementAttribute } from "@arcgis/toolkit/dom";
9
+ import { getElementLocale, startLocaleObserver } from "@arcgis/toolkit/intl";
6
10
  const makeController = (constructor) => proxy(void 0, constructor);
7
11
  const makeGenericController = (constructor) => (component) => proxy(
8
12
  component,
9
13
  /**
10
14
  * GenericController is identical to Controller, in all except for typing.
11
- * So dying a type-cast here so as not to needlessly add one more object
15
+ * So doing a type-cast here so as not to needlessly add one more object
12
16
  * to the prototype chain
13
17
  */
14
18
  constructor
@@ -127,7 +131,7 @@ const useDirection = () => makeController((component, controller) => {
127
131
  (resolved) => {
128
132
  if (resolved?.key === "dir") {
129
133
  throw new Error(
130
- `Do not assign this controller to a prop called \`dir\` as that will overwrite the \`dir\` attribute on the host element - component should not be setting the \`dir\` attribute on itself. Instead, assign this controller to a property called \`direction\`.`
134
+ "Do not assign this controller to a prop called `dir` as that will overwrite the HTMLElement's built-in `dir` attribute - component should not be setting the `dir` attribute on itself. Instead, assign this controller to a property called `direction`."
131
135
  );
132
136
  }
133
137
  },
@@ -139,7 +143,7 @@ const useDirection = () => makeController((component, controller) => {
139
143
  const makeT9nController = (getAssetPath) => (options = {}) => (
140
144
  // eslint-disable-next-line @typescript-eslint/promise-function-async
141
145
  makeController((component, controller) => {
142
- const locale = getElementLocales(component.el);
146
+ const locale = getElementLocale(component.el);
143
147
  const pending = { ["_lang"]: locale.lang, ["_t9nLocale"]: locale.t9nLocale, ["_loading"]: true };
144
148
  const componentWithOverrides = component;
145
149
  controller.onLifecycle(
@@ -244,25 +248,27 @@ const propertyChangeController = (...toWatch) => {
244
248
  }
245
249
  return eventEmitter;
246
250
  };
251
+ const keyTrackResolve = propertyTrackResolve;
247
252
  export {
248
253
  Controller,
249
254
  G as GenericController,
250
- h as bypassReadOnly,
251
- g as bypassSetter,
255
+ f as bypassReadOnly,
256
+ e as bypassSetter,
252
257
  c as controllerSymbol,
253
- n as getControllersCount,
254
- m as isController,
255
- k as keyTrackResolve,
258
+ h as getControllersCount,
259
+ g as isController,
260
+ keyTrackResolve,
256
261
  load,
257
262
  makeController,
258
263
  makeGenericController,
259
264
  makeT9nController,
265
+ propertyTrackResolve,
260
266
  proxyExports,
261
267
  retrieveComponent,
262
268
  toFunction,
263
269
  trackKey,
264
- l as trackPropKey,
265
- j as trackPropertyKey,
270
+ d as trackPropKey,
271
+ b as trackPropertyKey,
266
272
  useDirection,
267
273
  useMedia,
268
274
  usePropertyChange,
@@ -26,4 +26,4 @@ export declare const trackPropertyKey: <T>(object: BaseController | LitElement,
26
26
  * property you are trying to resolve had it's default value set, thus after
27
27
  * constructor. At the start of connectedCallback is a perfect place.
28
28
  */
29
- export declare const keyTrackResolve: () => void;
29
+ export declare const propertyTrackResolve: () => void;
@@ -1,4 +1,4 @@
1
- import { IHandle } from '@arcgis/components-utils';
1
+ import { IHandle } from '@arcgis/toolkit/type';
2
2
  import { ReactiveControllerHost, ReactiveController, PropertyDeclaration, PropertyValues } from 'lit';
3
3
  import { LitElement } from '../LitElement';
4
4
  export type TrackKeyResolution = {