@praxisui/core 9.0.4-rc.42 → 9.0.4-rc.43

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-08-10T19:08:21.527Z",
3
+ "generatedAt": "2026-08-10T20:23:53.082Z",
4
4
  "packageName": "@praxisui/core",
5
- "packageVersion": "9.0.4-rc.42",
5
+ "packageVersion": "9.0.4-rc.43",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 4,
@@ -7453,6 +7453,7 @@ class ComponentMetadataRegistry {
7453
7453
  metadataMap = new Map();
7454
7454
  rawMetadataMap = new Map();
7455
7455
  editorialMetadataMap = new Map();
7456
+ rawEditorialMetadataMap = new Map();
7456
7457
  editorialControlTypeIndex = new Map();
7457
7458
  legacyControlTypeIndex = new Map();
7458
7459
  componentTypeAliases = {
@@ -7468,7 +7469,9 @@ class ComponentMetadataRegistry {
7468
7469
  /** Register a component metadata entry. */
7469
7470
  register(meta) {
7470
7471
  const normalized = this.normalizeMeta(meta);
7471
- if (this.rawMetadataMap.get(normalized.id) === meta) {
7472
+ const existing = this.metadataMap.get(normalized.id);
7473
+ if (this.rawMetadataMap.get(normalized.id) === meta ||
7474
+ (existing && this.isEquivalentRegistration(existing, normalized))) {
7472
7475
  return;
7473
7476
  }
7474
7477
  this.assertCanRegisterMetadata(normalized);
@@ -7482,7 +7485,13 @@ class ComponentMetadataRegistry {
7482
7485
  /** Register an editorial descriptor that can later be resolved by controlType or metadata id. */
7483
7486
  registerEditorial(meta) {
7484
7487
  const normalized = this.normalizeEditorialDescriptor(meta);
7488
+ const existing = this.editorialMetadataMap.get(normalized.componentMetaId);
7489
+ if (this.rawEditorialMetadataMap.get(normalized.componentMetaId) === meta ||
7490
+ (existing && this.isEquivalentRegistration(existing, normalized))) {
7491
+ return;
7492
+ }
7485
7493
  this.assertCanRegisterEditorialMetadata(normalized);
7494
+ this.rawEditorialMetadataMap.set(normalized.componentMetaId, meta);
7486
7495
  this.editorialMetadataMap.set(normalized.componentMetaId, normalized);
7487
7496
  this.editorialControlTypeIndex.set(this.normalizeComponentType(normalized.controlType), normalized.componentMetaId);
7488
7497
  }
@@ -7610,6 +7619,38 @@ class ComponentMetadataRegistry {
7610
7619
  tags: meta.tags?.slice(),
7611
7620
  };
7612
7621
  }
7622
+ isEquivalentRegistration(left, right, propertyKey) {
7623
+ if (Object.is(left, right)) {
7624
+ return true;
7625
+ }
7626
+ if (typeof left !== typeof right || left === null || right === null) {
7627
+ return false;
7628
+ }
7629
+ if (typeof left === 'function' && typeof right === 'function') {
7630
+ if (propertyKey === 'component') {
7631
+ return true;
7632
+ }
7633
+ return Function.prototype.toString.call(left) === Function.prototype.toString.call(right);
7634
+ }
7635
+ if (Array.isArray(left) || Array.isArray(right)) {
7636
+ if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) {
7637
+ return false;
7638
+ }
7639
+ return left.every((value, index) => this.isEquivalentRegistration(value, right[index]));
7640
+ }
7641
+ if (typeof left !== 'object' || typeof right !== 'object') {
7642
+ return false;
7643
+ }
7644
+ const leftRecord = left;
7645
+ const rightRecord = right;
7646
+ const leftKeys = Object.keys(leftRecord);
7647
+ const rightKeys = Object.keys(rightRecord);
7648
+ if (leftKeys.length !== rightKeys.length) {
7649
+ return false;
7650
+ }
7651
+ return leftKeys.every((key) => Object.prototype.hasOwnProperty.call(rightRecord, key) &&
7652
+ this.isEquivalentRegistration(leftRecord[key], rightRecord[key], key));
7653
+ }
7613
7654
  assertCanRegisterMetadata(meta) {
7614
7655
  if (this.metadataMap.has(meta.id)) {
7615
7656
  throw new Error(`Component metadata id collision: ${meta.id}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxisui/core",
3
- "version": "9.0.4-rc.42",
3
+ "version": "9.0.4-rc.43",
4
4
  "description": "Core library for Praxis UI Workspace: types, tokens, services and utilities shared across @praxisui/* packages.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
@@ -9084,6 +9084,7 @@ declare class ComponentMetadataRegistry {
9084
9084
  private readonly metadataMap;
9085
9085
  private readonly rawMetadataMap;
9086
9086
  private readonly editorialMetadataMap;
9087
+ private readonly rawEditorialMetadataMap;
9087
9088
  private readonly editorialControlTypeIndex;
9088
9089
  private readonly legacyControlTypeIndex;
9089
9090
  private readonly componentTypeAliases;
@@ -9109,6 +9110,7 @@ declare class ComponentMetadataRegistry {
9109
9110
  */
9110
9111
  private normalizeMeta;
9111
9112
  private normalizeEditorialDescriptor;
9113
+ private isEquivalentRegistration;
9112
9114
  private assertCanRegisterMetadata;
9113
9115
  private assertCanRegisterEditorialMetadata;
9114
9116
  private resolveEditorialDescriptor;