@speclynx/apidom-parser-adapter-json-schema-yaml-2020-12 2.10.2 → 2.11.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.11.0](https://github.com/speclynx/apidom/compare/v2.10.3...v2.11.0) (2026-02-12)
7
+
8
+ **Note:** Version bump only for package @speclynx/apidom-parser-adapter-json-schema-yaml-2020-12
9
+
10
+ ## [2.10.3](https://github.com/speclynx/apidom/compare/v2.10.2...v2.10.3) (2026-02-10)
11
+
12
+ **Note:** Version bump only for package @speclynx/apidom-parser-adapter-json-schema-yaml-2020-12
13
+
6
14
  ## [2.10.2](https://github.com/speclynx/apidom/compare/v2.10.1...v2.10.2) (2026-02-08)
7
15
 
8
16
  **Note:** Version bump only for package @speclynx/apidom-parser-adapter-json-schema-yaml-2020-12
@@ -32440,7 +32440,13 @@ class Element {
32440
32440
 
32441
32441
  /** Unique identifier for this element. */
32442
32442
  get id() {
32443
- return this.getMetaProperty('id', '');
32443
+ if (this.isFrozen) {
32444
+ return this.getMetaProperty('id', '');
32445
+ }
32446
+ if (!this.hasMetaProperty('id')) {
32447
+ this.setMetaProperty('id', '');
32448
+ }
32449
+ return this.meta.get('id');
32444
32450
  }
32445
32451
  set id(value) {
32446
32452
  this.setMetaProperty('id', value);
@@ -32448,7 +32454,13 @@ class Element {
32448
32454
 
32449
32455
  /** CSS-like class names. */
32450
32456
  get classes() {
32451
- return this.getMetaProperty('classes', []);
32457
+ if (this.isFrozen) {
32458
+ return this.getMetaProperty('classes', []);
32459
+ }
32460
+ if (!this.hasMetaProperty('classes')) {
32461
+ this.setMetaProperty('classes', []);
32462
+ }
32463
+ return this.meta.get('classes');
32452
32464
  }
32453
32465
  set classes(value) {
32454
32466
  this.setMetaProperty('classes', value);
@@ -32456,7 +32468,13 @@ class Element {
32456
32468
 
32457
32469
  /** Hyperlinks associated with this element. */
32458
32470
  get links() {
32459
- return this.getMetaProperty('links', []);
32471
+ if (this.isFrozen) {
32472
+ return this.getMetaProperty('links', []);
32473
+ }
32474
+ if (!this.hasMetaProperty('links')) {
32475
+ this.setMetaProperty('links', []);
32476
+ }
32477
+ return this.meta.get('links');
32460
32478
  }
32461
32479
  set links(value) {
32462
32480
  this.setMetaProperty('links', value);
@@ -32607,16 +32625,26 @@ class Element {
32607
32625
  }
32608
32626
 
32609
32627
  /**
32610
- * Gets a meta property, creating it with default value if not present.
32628
+ * Gets a meta property.
32629
+ *
32630
+ * When the property doesn't exist:
32631
+ * - With defaultValue: returns a new refracted element instance (not cached)
32632
+ * - Without defaultValue: returns undefined
32633
+ *
32634
+ * Note: Each call with a default creates a new instance. Use setMetaProperty
32635
+ * first if you need reference equality across multiple accesses.
32611
32636
  */
32637
+
32612
32638
  getMetaProperty(name, defaultValue) {
32613
- if (!this.meta.hasKey(name)) {
32614
- if (this.isFrozen) {
32615
- const element = this.refract(defaultValue);
32639
+ if (!this.hasMetaProperty(name)) {
32640
+ if (defaultValue === undefined) {
32641
+ return undefined;
32642
+ }
32643
+ const element = this.refract(defaultValue);
32644
+ if (element && this.isFrozen) {
32616
32645
  element.freeze();
32617
- return element;
32618
32646
  }
32619
- this.meta.set(name, defaultValue);
32647
+ return element;
32620
32648
  }
32621
32649
  return this.meta.get(name);
32622
32650
  }