@almadar/core 10.77.0 → 10.78.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.
@@ -1,5 +1,5 @@
1
- import { E as EntityField, a as EntityPersistence, R as RelationConfig } from './effect-BHaHSAvM.js';
2
- import { T as TraitEventListener, a as TraitReference } from './trait-DCmf5iRN.js';
1
+ import { E as EntityField, a as EntityPersistence, R as RelationConfig } from './effect-CW3s399G.js';
2
+ import { T as TraitEventListener, a as TraitReference } from './trait-jWk0BInU.js';
3
3
  import { J as JsonValue } from './expression-Fk8bQWef.js';
4
4
 
5
5
  /**
@@ -293,6 +293,21 @@ interface FactoryTraitSignature {
293
293
  * Each entry carries the key name plus the typed declaration lifted
294
294
  * from the source `.lolo` `config { }` block. */
295
295
  overridableConfigKeys: ReadonlyArray<FactoryConfigParam>;
296
+ /**
297
+ * WIRE FORMAT ONLY — indices into `FactorySignatureCatalog.knobDefs`.
298
+ *
299
+ * Measured on the io catalog: 113,848 knob instances but only 16,067
300
+ * DISTINCT ones (the same `align` knob is written out once per Typography
301
+ * trait), so 26.2 MB — 66.3% of the catalog — was byte-identical
302
+ * duplication. When a catalog carries `knobDefs`, each trait serialises
303
+ * these refs INSTEAD of `overridableConfigKeys`, and the loader rehydrates
304
+ * the field from the table before any consumer sees the signature.
305
+ *
306
+ * So this is absent in memory and `overridableConfigKeys` is always
307
+ * populated — no consumer reads this. Rehydration substitutes SHARED
308
+ * references, which is why it cuts heap and not merely disk.
309
+ */
310
+ overridableConfigKeyRefs?: ReadonlyArray<number>;
296
311
  /** Capability tags lifted directly from the source `.lolo` trait's
297
312
  * header annotations. Free-form strings — the translator overlay
298
313
  * matches rules to traits by exact set membership. */
@@ -480,6 +495,30 @@ interface FactorySignatureCatalog {
480
495
  generatedFromStdVersion: string;
481
496
  /** Sorted list of factory signatures. */
482
497
  signatures: ReadonlyArray<FactorySignature>;
498
+ /**
499
+ * Built-in theme keys harvested from `@almadar-ui/themes/*.css`, carried
500
+ * ONCE for the whole catalog rather than per signature.
501
+ *
502
+ * `signatureToParamsSchema` needs them for the `theme` enum but lives here
503
+ * in core, which is UPSTREAM of `@almadar/ui` and so cannot read the CSS
504
+ * itself — the harvester injects them. Catalog-level because the list is
505
+ * a property of the build, not of any one orbital: every signature's
506
+ * `theme` enum was already identical, which is exactly why rabit's
507
+ * `catalogThemeNames` could take "the first hit is canonical" as its rule.
508
+ *
509
+ * Optional so a catalog written before this field still loads; consumers
510
+ * degrade to no theme enum (no constraint) rather than failing.
511
+ */
512
+ themeNames?: ReadonlyArray<string>;
513
+ /**
514
+ * Deduplicated knob table. Each trait's `overridableConfigKeyRefs` indexes
515
+ * into this; the loader rehydrates `overridableConfigKeys` from it, sharing
516
+ * one object per distinct knob across every trait that declares it.
517
+ *
518
+ * Absent on catalogs written before dedupe, in which case traits carry
519
+ * their `overridableConfigKeys` inline as before and no rehydration runs.
520
+ */
521
+ knobDefs?: ReadonlyArray<FactoryConfigParam>;
483
522
  }
484
523
  /**
485
524
  * A single factory invocation, as the typed result of the translator.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/core",
3
- "version": "10.77.0",
3
+ "version": "10.78.0",
4
4
  "description": "Core schema types and definitions for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",