@almadar/core 10.53.0 → 10.54.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,6 +1,6 @@
1
- import { E as EntityField, a as EntityPersistence, R as RelationConfig } from './effect-CqTo1gAF.js';
2
- import { T as TraitEventListener, a as TraitReference } from './trait-CnbGhs6A.js';
3
- import { J as JsonValue } from './expression-Yf7qvvOs.js';
1
+ import { E as EntityField, a as EntityPersistence, R as RelationConfig } from './effect-BlFO53UR.js';
2
+ import { T as TraitEventListener, a as TraitReference } from './trait-RzDL-lSo.js';
3
+ import { J as JsonValue } from './expression-Fk8bQWef.js';
4
4
 
5
5
  /**
6
6
  * Cross-cutting presentation knobs that don't live per orbital
@@ -284,6 +284,13 @@ interface FactoryTraitSignature {
284
284
  * header annotations. Free-form strings — the translator overlay
285
285
  * matches rules to traits by exact set membership. */
286
286
  capabilities: ReadonlyArray<string>;
287
+ /** The entity this trait is bound to at THIS call site — the `.orb`
288
+ * `TraitReference.linkedEntity` / inline `Trait.linkedEntity` (the same
289
+ * field a `traitOverrides.<name>.linkedEntity` rebind ultimately writes).
290
+ * Absent for a bare string ref, whose binding lives on the referenced
291
+ * atom's own signature entry in the same catalog. Read directly off the
292
+ * trait node — no inference. */
293
+ linkedEntity?: string;
287
294
  /** `true` when the source trait's entity binding was authored
288
295
  * `-> @rebindable Entity`. Only then may a consumer rebind it via
289
296
  * `traitOverrides.<name>.linkedEntity`; rabit enum-constrains that
@@ -466,6 +473,16 @@ interface FactoryCallSiteParams {
466
473
  collection?: string;
467
474
  /** Per-page path overrides keyed by `signature.pages[i].name`. */
468
475
  pagePaths?: Readonly<Record<string, string>>;
476
+ /**
477
+ * Theme name (a `data-theme` key from the built-in `@almadar-ui/themes/`
478
+ * registry) stamped onto `Orbital.theme` post-factory. Plan-level and
479
+ * uniform — the coordinator decides it once and threads the same value
480
+ * to every orbital; the per-orbital subagent does not independently pick.
481
+ * Applied post-`dispatchOrbitalFactoryMerged` via `applyOrbitalTheme`,
482
+ * exactly as `pagePaths`/`pages` are applied post-factory, so the factory's
483
+ * typed guard never sees it.
484
+ */
485
+ theme?: string;
469
486
  /** Trait-level overrides keyed by `signature.traits[i].name`. Each value
470
487
  * is a {@link TraitOverlayEntry} — the canonical override surface that
471
488
  * admits the full documented set (`config`, `linkedEntity`, `events`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/core",
3
- "version": "10.53.0",
3
+ "version": "10.54.0",
4
4
  "description": "Core schema types and definitions for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -106,6 +106,18 @@ export const BINDING_DOCS = {
106
106
  examples: ['@callsitePayload.error', '@callsitePayload.row'],
107
107
  requiresPath: true,
108
108
  },
109
+ pages: {
110
+ description:
111
+ 'Render-resolved schema sigil — the host orbital\'s pages as a NavItem[] array (href = page.path, label = page.name). Substituted from the OrbitalSchema before codegen; never survives as a live binding.',
112
+ examples: ['@pages'],
113
+ requiresPath: false,
114
+ },
115
+ currentTheme: {
116
+ description:
117
+ 'Render-resolved schema sigil — the host orbital\'s active data-theme key, derived from Orbital.theme. Substituted from the OrbitalSchema before codegen; never survives as a live binding.',
118
+ examples: ['@currentTheme'],
119
+ requiresPath: false,
120
+ },
109
121
  } as const;
110
122
 
111
123
  /**
@@ -118,7 +130,7 @@ export const BINDING_CONTEXT_RULES = {
118
130
  'Guards can access entity fields, event payload, current state, time, the call-site trait config (@config.X), and the authenticated user context (@user.id, @user.role) for ownership / role gates. Config access lets atoms write mode-aware guards — e.g. std-modal\'s OPEN can require @payload.row only when @config.mode equals "edit", letting create-mode legitimately fire OPEN with no row. Like effects, @config.X is substituted at molecule/organism inline time with the literal call-site value; at atom-scope validate, @config is allowed-but-unresolved.',
119
131
  },
120
132
  effect: {
121
- allowed: ['entity', 'payload', 'state', 'now', 'trait', 'config', 'user', 'callsitePayload'] as const,
133
+ allowed: ['entity', 'payload', 'state', 'now', 'trait', 'config', 'user', 'callsitePayload', 'pages', 'currentTheme'] as const,
122
134
  description:
123
135
  'Effects can access and modify entity fields, use payload data, embed another trait\'s live frame via @trait.X inside render-ui children, read trait config values (@config.X) for atoms parameterized by their call-site, and read the authenticated user context (@user.id, @user.role). At molecule/organism inline time, @config.X is substituted with the literal value from the call-site config block; at atom-scope validate, @config is allowed-but-unresolved. @callsitePayload.X is the call-site-captured event payload emitted by the compiler\'s inline-trait hoisting (a hoisted render block that captured @payload); it is resolved at the composing effect by the runtime BindingResolver.',
124
136
  },