@melodicdev/components 2.0.1 → 2.0.2

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.
@@ -830,10 +830,14 @@ var ComponentBase = class extends HTMLElement {
830
830
  }
831
831
  proto = Object.getPrototypeOf(proto);
832
832
  }
833
+ const getterOnly = [];
833
834
  const filtered = properties.filter((prop) => {
834
835
  if (prop.startsWith("_") || prop === "elementRef" || prop === "constructor") return false;
835
836
  const descriptor = this.getPropertyDescriptor(this._component, prop);
836
- if (descriptor && descriptor.get && !descriptor.set) return false;
837
+ if (descriptor && descriptor.get && !descriptor.set) {
838
+ getterOnly.push(prop);
839
+ return false;
840
+ }
837
841
  const value = this._component[prop];
838
842
  if (isSignal(value)) {
839
843
  this._reactiveSources.push(value);
@@ -885,6 +889,15 @@ var ComponentBase = class extends HTMLElement {
885
889
  configurable: true
886
890
  });
887
891
  }
892
+ for (const prop of getterOnly) {
893
+ if (Object.prototype.hasOwnProperty.call(this, prop)) continue;
894
+ Object.defineProperty(this, prop, {
895
+ get: () => this._component[prop],
896
+ set: () => {},
897
+ enumerable: true,
898
+ configurable: true
899
+ });
900
+ }
888
901
  }
889
902
  getPropertyDescriptor(target, prop) {
890
903
  let current = target;