@arcgis/lumina 4.32.0-next.21 → 4.32.0-next.23

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.
@@ -13,4 +13,5 @@ export declare class PublicLitElement extends HTMLElement {
13
13
  * });
14
14
  */
15
15
  componentOnReady(): Promise<this>;
16
+ private el;
16
17
  }
@@ -0,0 +1,424 @@
1
+ import {
2
+ lazyMetaGroupJoiner,
3
+ lazyMetaItemJoiner,
4
+ lazyMetaSubItemJoiner
5
+ } from "./chunk-PGHUBTOM.js";
6
+
7
+ // src/lazyLoad.ts
8
+ import { Deferred, camelToKebab } from "@arcgis/components-utils";
9
+
10
+ // src/devOnlyDetectIncorrectLazyUsages.ts
11
+ function devOnlyDetectIncorrectLazyUsages(LitClass) {
12
+ const genericPrototype = LitClass.prototype;
13
+ const descriptor = Object.getOwnPropertyDescriptor(genericPrototype, "innerText");
14
+ if (descriptor !== void 0 && descriptor.get === descriptor.set) {
15
+ return;
16
+ }
17
+ const allowList = /* @__PURE__ */ new Set([
18
+ // We shouldn't be overwriting this property
19
+ "constructor",
20
+ // Called by Lit - we proxy it to this.el in ProxyComponent
21
+ "setAttribute",
22
+ // Called by Lit SSR - we proxy it to this.el in ProxyComponent
23
+ "removeAttribute",
24
+ // Called by Lit - we proxy it to this.el in ProxyComponent
25
+ "isConnected",
26
+ // Called by Lit, but only in dev mode for warnings, so we don't have to proxy.
27
+ "localName",
28
+ // Called by Lit Context - we proxy it to this.el in ProxyComponent.
29
+ // Interestingly, they never call removeEventListener.
30
+ "addEventListener"
31
+ ]);
32
+ const customErrorMessages = {
33
+ addEventListener: "use this.listen() or this.el.addEventListener()"
34
+ };
35
+ Object.entries({
36
+ ...Object.getOwnPropertyDescriptors(HTMLElement.prototype),
37
+ ...Object.getOwnPropertyDescriptors(Element.prototype),
38
+ ...Object.getOwnPropertyDescriptors(Node.prototype),
39
+ ...Object.getOwnPropertyDescriptors(EventTarget.prototype)
40
+ }).forEach(([key, value]) => {
41
+ if (allowList.has(key)) {
42
+ return;
43
+ }
44
+ const callback = (...args) => {
45
+ if (key === "hasAttribute" && args[0] === "defer-hydration") {
46
+ return false;
47
+ }
48
+ throw new Error(
49
+ `You should not be trying to access this.${key} directly as it won't work correctly in lazy-builds. Instead, ${customErrorMessages[key] ?? `use this.el.${key}`}`
50
+ );
51
+ };
52
+ if (typeof value.value === "function") {
53
+ genericPrototype[key] = callback;
54
+ } else {
55
+ Object.defineProperty(genericPrototype, key, { get: callback, set: callback });
56
+ }
57
+ });
58
+ }
59
+
60
+ // src/lifecycleSupport.ts
61
+ function attachToAncestor(child) {
62
+ let ancestor = child;
63
+ while (ancestor = ancestor.parentNode ?? ancestor.host) {
64
+ if (ancestor?.constructor?.lumina) {
65
+ const litParent = ancestor;
66
+ if (!litParent.manager?.loadedCalled) {
67
+ litParent._offspring.push(child);
68
+ }
69
+ return litParent._postLoad.promise;
70
+ }
71
+ }
72
+ return false;
73
+ }
74
+
75
+ // src/lazyLoad.ts
76
+ var makeDefineCustomElements = (runtime, structure) => function defineCustomElements(windowOrOptions, options) {
77
+ if (!globalThis.customElements) {
78
+ return;
79
+ }
80
+ const resolvedOptions = options ?? windowOrOptions ?? {};
81
+ const resourcesUrl = resolvedOptions.resourcesUrl;
82
+ if (resourcesUrl) {
83
+ runtime.setAssetPath(resourcesUrl);
84
+ }
85
+ Object.entries(structure).forEach(createLazyElement);
86
+ };
87
+ function createLazyElement([tagName, [load, compactMeta = ""]]) {
88
+ if (customElements.get(tagName)) {
89
+ return;
90
+ }
91
+ const [compactObservedProps, compactAsyncMethods, compactSyncMethods] = compactMeta.split(lazyMetaGroupJoiner);
92
+ const observedProps = compactObservedProps ? compactObservedProps?.split(lazyMetaItemJoiner).map(parseCondensedProp) : void 0;
93
+ const observedProperties = observedProps?.map(([property]) => property);
94
+ const ProxyClass = class extends ProxyComponent {
95
+ static {
96
+ this.observedAttributes = observedProps?.map(([, attribute]) => attribute).filter((attribute) => attribute !== "");
97
+ }
98
+ static {
99
+ this._properties = observedProperties;
100
+ }
101
+ static {
102
+ this._asyncMethods = compactAsyncMethods ? compactAsyncMethods?.split(lazyMetaItemJoiner) : void 0;
103
+ }
104
+ static {
105
+ this._syncMethods = compactSyncMethods?.split(lazyMetaItemJoiner);
106
+ }
107
+ static {
108
+ this._name = tagName;
109
+ }
110
+ constructor() {
111
+ const isFirstInstanceOfType = !ProxyClass._loadPromise;
112
+ if (isFirstInstanceOfType) {
113
+ ProxyClass._loadPromise = load();
114
+ ProxyClass._initializePrototype();
115
+ }
116
+ super();
117
+ }
118
+ };
119
+ customElements.define(tagName, ProxyClass);
120
+ }
121
+ var defineProperty = Object.defineProperty;
122
+ function parseCondensedProp(propAndAttribute) {
123
+ const name = propAndAttribute.split(lazyMetaSubItemJoiner);
124
+ return name.length === 1 ? [name[0], camelToKebab(name[0])] : name;
125
+ }
126
+ var HtmlElement = globalThis.HTMLElement ?? parseCondensedProp;
127
+ var ProxyComponent = class extends HtmlElement {
128
+ constructor() {
129
+ super();
130
+ /** @internal */
131
+ this._store = {};
132
+ /**
133
+ * If attributeChangedCallback() is called before the LitElement is loaded,
134
+ * store the attributes here, and replay later
135
+ */
136
+ this._pendingAttributes = [];
137
+ /**
138
+ * Resolved once LitElement's load() is complete.
139
+ * Not read inside of this class, but needed for LitElement to determine if
140
+ * it's closest ancestor finished load()
141
+ */
142
+ this._postLoad = new Deferred();
143
+ /**
144
+ * Resolved once LitElement's loaded() is complete
145
+ */
146
+ this._postLoaded = new Deferred();
147
+ /**
148
+ * Direct offspring that should be awaited before loaded() is emitted
149
+ */
150
+ this._offspring = [];
151
+ if (process.env.NODE_ENV !== "production") {
152
+ this._hmrSetProps = /* @__PURE__ */ new Set();
153
+ this._hmrSetAttributes = /* @__PURE__ */ new Set();
154
+ globalThis.devOnly$createdElements ??= [];
155
+ globalThis.devOnly$createdElements.push(new WeakRef(this));
156
+ }
157
+ this._saveInstanceProperties();
158
+ const ProxyClass = this.constructor;
159
+ if (ProxyClass._LitConstructor) {
160
+ this._initializeComponent({ a: ProxyClass._LitConstructor });
161
+ } else {
162
+ void ProxyClass._loadPromise.then(this._initializeComponent.bind(this)).catch((error) => {
163
+ this._postLoaded.reject(error);
164
+ setTimeout(() => {
165
+ throw error;
166
+ });
167
+ });
168
+ }
169
+ if (process.env.NODE_ENV !== "production") {
170
+ ProxyClass._hmrInstances ??= [];
171
+ ProxyClass._hmrInstances.push(new WeakRef(this));
172
+ Object.defineProperty(this, "_store", {
173
+ value: this._store,
174
+ enumerable: false,
175
+ configurable: true
176
+ });
177
+ }
178
+ }
179
+ static {
180
+ this.lumina = true;
181
+ }
182
+ /** @internal */
183
+ static _initializePrototype() {
184
+ this._properties?.forEach(this._bindProp, this);
185
+ this._asyncMethods?.forEach(this._bindAsync, this);
186
+ this._syncMethods?.forEach(this._bindSync, this);
187
+ }
188
+ static _bindProp(propName) {
189
+ defineProperty(this.prototype, propName, {
190
+ configurable: true,
191
+ enumerable: true,
192
+ get() {
193
+ return this._store[propName];
194
+ },
195
+ set(value) {
196
+ this._store[propName] = value;
197
+ if (process.env.NODE_ENV !== "production") {
198
+ this._hmrSetProps.add(propName);
199
+ }
200
+ }
201
+ });
202
+ }
203
+ static _bindAsync(methodName) {
204
+ defineProperty(this.prototype, methodName, {
205
+ async value(...args) {
206
+ if (!this._litElement) {
207
+ await this._postLoaded.promise;
208
+ }
209
+ const genericLitElement = this._litElement;
210
+ return await genericLitElement[methodName](...args);
211
+ },
212
+ configurable: true
213
+ });
214
+ }
215
+ static _bindSync(methodName) {
216
+ defineProperty(this.prototype, methodName, {
217
+ value(...args) {
218
+ if (process.env.NODE_ENV === "development" && !this._litElement) {
219
+ const ProxyClass = this.constructor;
220
+ throw new Error(
221
+ `Tried to call method ${methodName}() on <${ProxyClass._name}> component before it's fully loaded. Please do 'await component.componentOnReady();' before calling this method.`
222
+ );
223
+ }
224
+ const genericLitElement = this._litElement;
225
+ return genericLitElement[methodName](...args);
226
+ },
227
+ configurable: true
228
+ });
229
+ }
230
+ get manager() {
231
+ return this._litElement?.manager;
232
+ }
233
+ /**
234
+ * Until the custom element is registered on the page, an instance of that
235
+ * element can be constructed and some properties on that instance set.
236
+ *
237
+ * These properties are set before the element prototype is set to this proxy
238
+ * class and thus none of our getters/setters are yet registered - such
239
+ * properties will be set by JavaScript on the instance directly.
240
+ *
241
+ * Once element is registered, the properties set in the meanwhile will shadow
242
+ * the getter/setters, and thus break reactivity. The fix is to delete these
243
+ * properties from the instance, and re-apply them once accessors are set.
244
+ *
245
+ * @example
246
+ * ```ts
247
+ * import { defineCustomElements } from '@arcgis/map-components';
248
+ * const map = document.createElement('arcgis-map');
249
+ * // This will shadow the getter/setters
250
+ * map.itemId = '...';
251
+ * // This finally defines the custom elements and sets the property accessors
252
+ * defineCustomElements();
253
+ * ```
254
+ *
255
+ * @remarks
256
+ * This is an equivalent of the __saveInstanceProperties method in Lit's
257
+ * ReactiveElement. Lit takes care of this on LitElement, but we have to take
258
+ * care of this on the lazy proxy
259
+ */
260
+ _saveInstanceProperties() {
261
+ const ProxyClass = this.constructor;
262
+ const genericThis = this;
263
+ ProxyClass._properties?.forEach((propName) => {
264
+ if (Object.hasOwn(this, propName)) {
265
+ this._store[propName] = genericThis[propName];
266
+ delete genericThis[propName];
267
+ }
268
+ });
269
+ }
270
+ /*
271
+ * This method must be statically present rather than added later, or else,
272
+ * browsers won't call it. Same for connected and disconnected callbacks.
273
+ */
274
+ attributeChangedCallback(name, oldValue, newValue) {
275
+ this._litElement?.attributeChangedCallback(name, oldValue, newValue);
276
+ if (!this._litElement) {
277
+ this._pendingAttributes.push(name);
278
+ }
279
+ if (process.env.NODE_ENV !== "production") {
280
+ this._hmrSetAttributes.add(name);
281
+ }
282
+ }
283
+ connectedCallback() {
284
+ if (this._litElement) {
285
+ this._litElement.connectedCallback?.();
286
+ } else {
287
+ queueMicrotask(() => {
288
+ this._ancestorLoad = attachToAncestor(this);
289
+ });
290
+ }
291
+ }
292
+ disconnectedCallback() {
293
+ this._litElement?.disconnectedCallback?.();
294
+ }
295
+ /**
296
+ * Create a promise that resolves once component is fully loaded
297
+ */
298
+ async componentOnReady() {
299
+ await this._postLoaded.promise;
300
+ return this;
301
+ }
302
+ /** @internal */
303
+ _initializeComponent(module) {
304
+ const ProxyClass = this.constructor;
305
+ const tagName = ProxyClass._name;
306
+ const store = this._store;
307
+ if (process.env.NODE_ENV !== "production") {
308
+ Object.entries(module).forEach(([name, LitConstructor2]) => {
309
+ if (name !== "exportsForTests" && typeof LitConstructor2 !== "function" || typeof LitConstructor2.tagName !== "string") {
310
+ console.warn(
311
+ `Found non-component export "${name}" in the file for the "${tagName}" component. This will interfere with hot module replacement. Please move "${name}" into a separate file.`
312
+ );
313
+ }
314
+ });
315
+ }
316
+ const LitConstructor = Object.values(module).find(
317
+ (LitConstructor2) => LitConstructor2.tagName === tagName
318
+ );
319
+ if (process.env.NODE_ENV !== "production" && !LitConstructor) {
320
+ throw new Error(
321
+ `Unable to find the LitElement class for the "${tagName}" custom element in the lazy-loaded module`
322
+ );
323
+ }
324
+ const lazyTagName = process.env.NODE_ENV === "production" ? `${tagName}--lazy` : (ProxyClass._hmrIndex ?? 0) === 0 ? `${tagName}--lazy` : `${tagName}--lazy-${ProxyClass._hmrIndex}`;
325
+ let parentClass = LitConstructor;
326
+ while (parentClass && !Object.hasOwn(parentClass, "lumina")) {
327
+ parentClass = Object.getPrototypeOf(parentClass);
328
+ }
329
+ const litElementPrototype = parentClass.prototype;
330
+ const elementPrototype = Element.prototype;
331
+ const alreadyPatched = Object.hasOwn(litElementPrototype, "isConnected");
332
+ if (!alreadyPatched) {
333
+ litElementPrototype.setAttribute = function(qualifiedName, value) {
334
+ elementPrototype.setAttribute.call(this.el, qualifiedName, value);
335
+ };
336
+ litElementPrototype.removeAttribute = function(qualifiedName) {
337
+ elementPrototype.removeAttribute.call(this.el, qualifiedName);
338
+ };
339
+ defineProperty(litElementPrototype, "isConnected", {
340
+ get() {
341
+ return Reflect.get(elementPrototype, "isConnected", this.el);
342
+ }
343
+ });
344
+ }
345
+ if (process.env.NODE_ENV !== "production") {
346
+ devOnlyDetectIncorrectLazyUsages(parentClass);
347
+ }
348
+ const isFirstInitialization = !ProxyClass._LitConstructor;
349
+ if (isFirstInitialization) {
350
+ ProxyClass._LitConstructor = LitConstructor;
351
+ customElements.define(lazyTagName, LitConstructor);
352
+ }
353
+ LitConstructor.lazy = this;
354
+ const litElement = document.createElement(lazyTagName);
355
+ LitConstructor.lazy = void 0;
356
+ if (process.env.NODE_ENV !== "production") {
357
+ Object.defineProperty(this, "_litElement", {
358
+ value: litElement,
359
+ configurable: true,
360
+ enumerable: false
361
+ });
362
+ } else {
363
+ this._litElement = litElement;
364
+ }
365
+ this._store = litElement;
366
+ this._pendingAttributes.forEach((name) => {
367
+ const value = this.getAttribute(name);
368
+ litElement.attributeChangedCallback(
369
+ name,
370
+ // Lit doesn't look at this value, thus even if attribute already exists, that's ok
371
+ null,
372
+ value
373
+ );
374
+ });
375
+ Object.entries(store).forEach(syncLitElement, litElement);
376
+ if (process.env.NODE_ENV !== "production") {
377
+ const litObserved = LitConstructor.observedAttributes ?? [];
378
+ const lazyObserved = ProxyClass.observedAttributes ?? [];
379
+ const missingFromLazy = litObserved.filter((attribute) => !lazyObserved.includes(attribute));
380
+ const missingFromLit = lazyObserved.filter((attribute) => !litObserved.includes(attribute));
381
+ if (missingFromLazy.length > 0) {
382
+ console.warn(
383
+ `The following attributes on <${ProxyClass._name}> are present on the Lit element, but are missing from the lazy proxy component: ${missingFromLazy.join(", ")}. This either indicates a bug in Lumina, or you are creating the attribute dynamically in a way that compiler cannot infer statically. For these attributes, lazy-loading version of your component won't work correctly, thus this must be resolved`
384
+ );
385
+ }
386
+ if (missingFromLit.length > 0) {
387
+ console.warn(
388
+ `The following attributes on <${ProxyClass._name}> are defined on the lazy proxy component, but not on the actual Lit element: ${missingFromLit.join(", ")}. This either indicates a bug in Lumina, or you are creating the attribute dynamically in a way that compiler cannot infer statically. This is a non-critical issue, but does indicate that something is going wrong and should be fixed`
389
+ );
390
+ }
391
+ }
392
+ const isStillConnected = this.isConnected;
393
+ if (isStillConnected || this._ancestorLoad) {
394
+ litElement.connectedCallback?.();
395
+ if (!isStillConnected) {
396
+ litElement.disconnectedCallback();
397
+ }
398
+ }
399
+ }
400
+ /**
401
+ * Implemented on the proxy for compatibility with Lit Context.
402
+ */
403
+ addController() {
404
+ }
405
+ /**
406
+ * Implemented on the proxy for compatibility with Lit Context.
407
+ */
408
+ requestUpdate() {
409
+ this._litElement?.requestUpdate();
410
+ }
411
+ };
412
+ function syncLitElement([key, value]) {
413
+ this[key] = value;
414
+ }
415
+
416
+ // src/utils.ts
417
+ var noShadowRoot = {};
418
+
419
+ export {
420
+ attachToAncestor,
421
+ makeDefineCustomElements,
422
+ ProxyComponent,
423
+ noShadowRoot
424
+ };
@@ -5,8 +5,11 @@ import type { ModuleNamespace } from "vite/types/hot.js";
5
5
  * @remarks
6
6
  * You should not need to call this function directly - it will be inserted
7
7
  * automatically when running in serve mode.
8
+ *
9
+ * @private
8
10
  */
9
11
  export declare function handleHmrUpdate(newModules: (ModuleNamespace | undefined)[]): void;
12
+ /** @private */
10
13
  export type HmrComponentMeta = {
11
14
  readonly tagName: string;
12
15
  /**
@@ -25,5 +28,7 @@ export type HmrComponentMeta = {
25
28
  * @remarks
26
29
  * You should not need to call this function directly - it will be inserted
27
30
  * automatically when running in serve mode.
31
+ *
32
+ * @private
28
33
  */
29
34
  export declare function handleComponentMetaUpdate(meta: HmrComponentMeta): void;
@@ -0,0 +1,121 @@
1
+ import {
2
+ ProxyComponent,
3
+ noShadowRoot
4
+ } from "./chunk-PEVP6JYY.js";
5
+ import "./chunk-PGHUBTOM.js";
6
+
7
+ // src/hmrSupport.ts
8
+ import { camelToKebab } from "@arcgis/components-utils";
9
+ function handleHmrUpdate(newModules) {
10
+ newModules.forEach((newModule) => {
11
+ if (newModule === void 0) {
12
+ return;
13
+ }
14
+ Object.values(newModule).forEach((exported) => {
15
+ if (typeof exported !== "function" || typeof exported.tagName !== "string") {
16
+ return;
17
+ }
18
+ const LitConstructor = exported;
19
+ const ProxyClass = customElements.get(LitConstructor.tagName);
20
+ if (ProxyClass === void 0) {
21
+ throw new Error(`Failed to find custom element proxy for tag name: ${LitConstructor.tagName}`);
22
+ }
23
+ ProxyClass._LitConstructor = void 0;
24
+ ProxyClass._loadPromise = void 0;
25
+ ProxyClass._hmrIndex ??= 0;
26
+ ProxyClass._hmrIndex += 1;
27
+ ProxyClass._initializePrototype();
28
+ ProxyClass._hmrInstances?.forEach((instanceWeakRef) => {
29
+ const instance = instanceWeakRef.deref();
30
+ if (instance === void 0) {
31
+ return;
32
+ }
33
+ if (instance._litElement === void 0) {
34
+ void ProxyClass._loadPromise.then(() => reInitialize(instance, newModule));
35
+ } else {
36
+ reInitialize(instance, newModule);
37
+ }
38
+ });
39
+ return;
40
+ });
41
+ });
42
+ }
43
+ function reInitialize(instance, newModule) {
44
+ const PreviousLitConstructor = instance._litElement.constructor;
45
+ const isShadowRoot = PreviousLitConstructor.shadowRootOptions !== noShadowRoot;
46
+ if (!isShadowRoot) {
47
+ const root = instance.getRootNode() ?? document;
48
+ if ("adoptedStyleSheets" in root) {
49
+ const rootStyles = Array.from(root.adoptedStyleSheets);
50
+ PreviousLitConstructor.elementStyles.forEach((style) => {
51
+ const styleSheet = "styleSheet" in style ? style.styleSheet : style;
52
+ const index = rootStyles.lastIndexOf(styleSheet);
53
+ if (index > -1) {
54
+ rootStyles.splice(index, 1);
55
+ }
56
+ });
57
+ root.adoptedStyleSheets = rootStyles;
58
+ }
59
+ }
60
+ const properties = PreviousLitConstructor.elementProperties;
61
+ const preservedProperties = Array.from(properties.entries()).filter(
62
+ ([propertyName, descriptor]) => typeof propertyName === "string" && (instance._hmrSetProps.has(propertyName) || typeof descriptor.attribute === "string" && instance._hmrSetAttributes.has(descriptor.attribute))
63
+ ).map(([key]) => [key, instance[key]]);
64
+ instance._store = Object.fromEntries(preservedProperties);
65
+ const isConnected = instance.isConnected;
66
+ if (isConnected) {
67
+ instance._litElement.disconnectedCallback();
68
+ }
69
+ instance._initializeComponent(newModule);
70
+ }
71
+ function handleComponentMetaUpdate(meta) {
72
+ const ProxyClass = customElements.get(meta.tagName);
73
+ if (ProxyClass === void 0) {
74
+ return;
75
+ }
76
+ const attributes = meta.properties.map(([property, attribute]) => attribute ?? camelToKebab(property)).filter(Boolean);
77
+ const observedAttributes = initializeAttributeObserver();
78
+ observedAttributes[meta.tagName] ??= {};
79
+ observedAttributes[meta.tagName].original ??= new Set(ProxyClass.observedAttributes);
80
+ const originallyObserved = observedAttributes[meta.tagName].original;
81
+ observedAttributes[meta.tagName].manuallyObserved = new Set(
82
+ /**
83
+ * Never manually observe attributes that were in the original
84
+ * observedAttributes as those would be observed by the browser
85
+ */
86
+ attributes.filter((attribute) => !originallyObserved.has(attribute))
87
+ );
88
+ ProxyClass._asyncMethods = meta.asyncMethods;
89
+ ProxyClass._syncMethods = meta.syncMethods;
90
+ ProxyClass._properties = meta.properties.map(([name]) => name);
91
+ ProxyClass.observedAttributes = attributes;
92
+ }
93
+ function initializeAttributeObserver() {
94
+ const observedAttributesSymbol = Symbol.for("@arcgis/lumina:observedAttributes");
95
+ const globalThisWithObservedAttributes = globalThis;
96
+ const alreadyHadObservers = observedAttributesSymbol in globalThisWithObservedAttributes;
97
+ globalThisWithObservedAttributes[observedAttributesSymbol] ??= {};
98
+ const observedAttributes = globalThisWithObservedAttributes[observedAttributesSymbol];
99
+ if (!alreadyHadObservers) {
100
+ const makeObserver = (original) => function observeAttributes(qualifiedName, ...rest) {
101
+ const observed = observedAttributes[this.tagName.toLowerCase()]?.manuallyObserved;
102
+ if (observed?.has(qualifiedName)) {
103
+ const oldValue = this.getAttribute(qualifiedName);
104
+ const returns = original.call(this, qualifiedName, ...rest);
105
+ const newValue = this.getAttribute(qualifiedName);
106
+ this.attributeChangedCallback(qualifiedName, oldValue, newValue);
107
+ return returns;
108
+ } else {
109
+ return original.call(this, qualifiedName, ...rest);
110
+ }
111
+ };
112
+ ProxyComponent.prototype.setAttribute = makeObserver(ProxyComponent.prototype.setAttribute);
113
+ ProxyComponent.prototype.toggleAttribute = makeObserver(ProxyComponent.prototype.toggleAttribute);
114
+ ProxyComponent.prototype.removeAttribute = makeObserver(ProxyComponent.prototype.removeAttribute);
115
+ }
116
+ return observedAttributes;
117
+ }
118
+ export {
119
+ handleComponentMetaUpdate,
120
+ handleHmrUpdate
121
+ };
package/dist/index.d.ts CHANGED
@@ -2,8 +2,6 @@ export { useContextProvider, useContextConsumer } from "./context";
2
2
  export type { EventOptions } from "./createEvent";
3
3
  export { createEvent } from "./createEvent";
4
4
  export { state, property, method } from "./decorators";
5
- export type { HmrComponentMeta } from "./hmrSupport";
6
- export { handleComponentMetaUpdate, handleHmrUpdate } from "./hmrSupport";
7
5
  export type { DefineCustomElements, LazyLoadOptions, GlobalThisWithPuppeteerEnv } from "./lazyLoad";
8
6
  export { makeDefineCustomElements } from "./lazyLoad";
9
7
  export { LitElement } from "./LitElement";