@arcgis/lumina 4.31.0-next.89 → 4.31.0-next.90

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.
Files changed (2) hide show
  1. package/dist/index.js +32 -16
  2. package/package.json +7 -6
package/dist/index.js CHANGED
@@ -118,14 +118,28 @@ var makeDefineCustomElements = (runtime, structure) => function defineCustomElem
118
118
  Object.entries(structure).forEach(createLazyElement);
119
119
  };
120
120
  function createLazyElement([tagName, [load, compactMeta = ""]]) {
121
- var _a;
122
121
  if (customElements.get(tagName)) {
123
122
  return;
124
123
  }
125
124
  const [compactObservedProps, compactAsyncMethods, compactSyncMethods] = compactMeta.split(lazyMetaGroupJoiner);
126
125
  const observedProps = compactObservedProps ? compactObservedProps?.split(lazyMetaItemJoiner).map(parseCondensedProp) : void 0;
127
126
  const observedProperties = observedProps?.map(([property2]) => property2);
128
- const ProxyClass = (_a = class extends ProxyComponent {
127
+ const ProxyClass = class extends ProxyComponent {
128
+ static {
129
+ this.observedAttributes = observedProps?.map(([, attribute]) => attribute).filter((attribute) => attribute !== "");
130
+ }
131
+ static {
132
+ this._properties = observedProperties;
133
+ }
134
+ static {
135
+ this._asyncMethods = compactAsyncMethods ? compactAsyncMethods?.split(lazyMetaItemJoiner) : void 0;
136
+ }
137
+ static {
138
+ this._syncMethods = compactSyncMethods?.split(lazyMetaItemJoiner);
139
+ }
140
+ static {
141
+ this._name = tagName;
142
+ }
129
143
  constructor() {
130
144
  const isFirstInstanceOfType = !ProxyClass._loadPromise;
131
145
  if (isFirstInstanceOfType) {
@@ -134,7 +148,7 @@ function createLazyElement([tagName, [load, compactMeta = ""]]) {
134
148
  }
135
149
  super();
136
150
  }
137
- }, _a.observedAttributes = observedProps?.map(([, attribute]) => attribute).filter((attribute) => attribute !== ""), _a._properties = observedProperties, _a._asyncMethods = compactAsyncMethods ? compactAsyncMethods?.split(lazyMetaItemJoiner) : void 0, _a._syncMethods = compactSyncMethods?.split(lazyMetaItemJoiner), _a._name = tagName, _a);
151
+ };
138
152
  customElements.define(tagName, ProxyClass);
139
153
  }
140
154
  function parseCondensedProp(propAndAttribute) {
@@ -183,10 +197,13 @@ var ProxyComponent = class extends HtmlElement {
183
197
  void ProxyClass._loadPromise.then(this._initializeComponent.bind(this)).catch(this._postLoaded.reject);
184
198
  }
185
199
  if (process.env.NODE_ENV !== "production") {
186
- ProxyClass._hmrInstances ?? (ProxyClass._hmrInstances = []);
200
+ ProxyClass._hmrInstances ??= [];
187
201
  ProxyClass._hmrInstances.push(new WeakRef(this));
188
202
  }
189
203
  }
204
+ static {
205
+ this.lumina = true;
206
+ }
190
207
  /** @internal */
191
208
  static _initializePrototype() {
192
209
  this._properties?.forEach(this._bindProp, this);
@@ -378,7 +395,6 @@ var ProxyComponent = class extends HtmlElement {
378
395
  }
379
396
  }
380
397
  };
381
- ProxyComponent.lumina = true;
382
398
  function removeAttribute(qualifiedName) {
383
399
  HTMLElement.prototype.removeAttribute.call(this.el, qualifiedName);
384
400
  }
@@ -407,7 +423,7 @@ function handleHmrUpdate(newModules) {
407
423
  }
408
424
  ProxyClass._LitConstructor = void 0;
409
425
  ProxyClass._loadPromise = void 0;
410
- ProxyClass._hmrIndex ?? (ProxyClass._hmrIndex = 0);
426
+ ProxyClass._hmrIndex ??= 0;
411
427
  ProxyClass._hmrIndex += 1;
412
428
  ProxyClass._initializePrototype();
413
429
  ProxyClass._hmrInstances?.forEach((instanceWeakRef) => {
@@ -439,22 +455,21 @@ function reInitialize(instance, newModule) {
439
455
  instance._initializeComponent(newModule);
440
456
  }
441
457
  function handleComponentMetaUpdate(meta) {
442
- var _a, _b, _c;
443
458
  const ProxyClass = customElements.get(meta.tagName);
444
459
  if (ProxyClass === void 0) {
445
460
  return;
446
461
  }
447
462
  const attributes = meta.properties.map(([property2, attribute]) => attribute ?? camelToKebab2(property2)).filter(Boolean);
448
- observedAttributes[_a = meta.tagName] ?? (observedAttributes[_a] = {});
449
- (_b = observedAttributes[meta.tagName]).original ?? (_b.original = new Set(ProxyClass.observedAttributes));
463
+ observedAttributes[meta.tagName] ??= {};
464
+ observedAttributes[meta.tagName].original ??= new Set(ProxyClass.observedAttributes);
450
465
  const originallyObserved = observedAttributes[meta.tagName].original;
451
- (_c = observedAttributes[meta.tagName]).manuallyObserved ?? (_c.manuallyObserved = new Set(
466
+ observedAttributes[meta.tagName].manuallyObserved ??= new Set(
452
467
  /**
453
468
  * Never manually observe attributes that were in the original
454
469
  * observedAttributes as those would be observed by the browser
455
470
  */
456
471
  attributes.filter((attribute) => !originallyObserved.has(attribute))
457
- ));
472
+ );
458
473
  ProxyClass._asyncMethods = meta.asyncMethods;
459
474
  ProxyClass._syncMethods = meta.syncMethods;
460
475
  ProxyClass._properties = meta.properties.map(([name]) => name);
@@ -463,7 +478,7 @@ function handleComponentMetaUpdate(meta) {
463
478
  var observedAttributesSymbol = Symbol.for("@arcgis/lumina:observedAttributes");
464
479
  var globalThisWithObservedAttributes = globalThis;
465
480
  var alreadyHadObservers = observedAttributesSymbol in globalThisWithObservedAttributes;
466
- globalThisWithObservedAttributes[observedAttributesSymbol] ?? (globalThisWithObservedAttributes[observedAttributesSymbol] = {});
481
+ globalThisWithObservedAttributes[observedAttributesSymbol] ??= {};
467
482
  var observedAttributes = globalThisWithObservedAttributes[observedAttributesSymbol];
468
483
  if (!alreadyHadObservers) {
469
484
  const makeObserver = (original) => function observeAttributes(qualifiedName, ...rest) {
@@ -488,7 +503,7 @@ import { Deferred as Deferred2, camelToKebab as camelToKebab3 } from "@arcgis/co
488
503
  import { LitElement as OriginalLitElement, isServer } from "lit";
489
504
  import { useControllerManager } from "@arcgis/components-controllers";
490
505
  var emptyFunction = () => void 0;
491
- var _LitElement = class _LitElement extends OriginalLitElement {
506
+ var LitElement = class _LitElement extends OriginalLitElement {
492
507
  constructor() {
493
508
  super();
494
509
  /**
@@ -593,6 +608,9 @@ var _LitElement = class _LitElement extends OriginalLitElement {
593
608
  ...rest
594
609
  });
595
610
  }
611
+ static {
612
+ this.lumina = true;
613
+ }
596
614
  connectedCallback() {
597
615
  if (this.el.hasAttribute("defer-hydration")) {
598
616
  return;
@@ -689,12 +707,10 @@ var _LitElement = class _LitElement extends OriginalLitElement {
689
707
  return this;
690
708
  }
691
709
  };
692
- _LitElement.lumina = true;
693
- var LitElement = _LitElement;
694
710
  LitElement.createEvent = createEventFactory;
695
711
  if (process.env.NODE_ENV !== "production") {
696
712
  const globalWithLit = globalThis;
697
- globalWithLit.litIssuedWarnings ?? (globalWithLit.litIssuedWarnings = /* @__PURE__ */ new Set());
713
+ globalWithLit.litIssuedWarnings ??= /* @__PURE__ */ new Set();
698
714
  globalWithLit.litIssuedWarnings.add(
699
715
  "Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators See https://lit.dev/msg/no-override-create-property for more information."
700
716
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/lumina",
3
- "version": "4.31.0-next.89",
3
+ "version": "4.31.0-next.90",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -29,20 +29,21 @@
29
29
  "clean": "rimraf ./dist ./build ./turbo ./node_modules"
30
30
  },
31
31
  "dependencies": {
32
- "@arcgis/components-controllers": "4.31.0-next.89",
33
- "@arcgis/components-utils": "4.31.0-next.89",
32
+ "@arcgis/components-controllers": "4.31.0-next.90",
33
+ "@arcgis/components-utils": "4.31.0-next.90",
34
34
  "@lit-labs/ssr": "^3.2.2",
35
35
  "@lit-labs/ssr-client": "^1.1.7",
36
36
  "csstype": "^3.1.3",
37
- "lit": "^3.1.2"
37
+ "lit": "^3.1.2",
38
+ "tslib": "^2.7.0"
38
39
  },
39
40
  "devDependencies": {
40
- "@arcgis/typescript-config": "4.31.0-next.89",
41
+ "@arcgis/typescript-config": "4.31.0-next.90",
41
42
  "@types/node": "^20.2.5",
42
43
  "eslint": "^8.55.0",
43
44
  "rimraf": "^5.0.0",
44
45
  "tsup": "^8.1.0",
45
46
  "typescript": "~5.4.0"
46
47
  },
47
- "gitHead": "2f8663deb210beefea80b8439daec871606f7528"
48
+ "gitHead": "a9a0d57b58ffabca05a7c03a2d0516b7174cf939"
48
49
  }