@almadar/ui 5.9.6 → 5.9.8
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/dist/avl/index.cjs +258 -235
- package/dist/avl/index.js +258 -235
- package/dist/components/index.cjs +230 -230
- package/dist/components/index.js +230 -230
- package/dist/providers/index.cjs +214 -214
- package/dist/providers/index.js +214 -214
- package/dist/runtime/index.cjs +258 -235
- package/dist/runtime/index.js +258 -235
- package/dist/runtime/orbitalsByTrait.d.ts +34 -0
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build the `trait name → owning orbital` map used to form the qualified
|
|
3
|
+
* `UI:<orbital>.<trait>.<event>` bus keys that trait state machines subscribe
|
|
4
|
+
* to. Pure + dependency-free so it can be unit-tested without a React render.
|
|
5
|
+
*
|
|
6
|
+
* Critically, it backfills from the RESOLVED page bindings, not just the source
|
|
7
|
+
* `schema.orbitals[].traits`. An auto-pulled sibling trait (e.g. an embedded
|
|
8
|
+
* `@trait.X` calendar lifted into the orbital by the compiler's sibling-pull)
|
|
9
|
+
* is absent from the source orbital's `traits[]`, so a source-only map misses
|
|
10
|
+
* it — leaving its self-subscription unregistered and its own fetch-success
|
|
11
|
+
* (e.g. `CalendarEventLoaded`) unheard, so the trait sticks in `loading`. A
|
|
12
|
+
* pulled sibling lands in the same orbital as the page that references it, so
|
|
13
|
+
* we backfill from the resolved page's owning orbital. Source-declared mappings
|
|
14
|
+
* win; the IR only fills gaps.
|
|
15
|
+
*/
|
|
16
|
+
export interface OrbitalsByTraitSchema {
|
|
17
|
+
orbitals?: ReadonlyArray<{
|
|
18
|
+
name: string;
|
|
19
|
+
traits?: ReadonlyArray<string | {
|
|
20
|
+
ref?: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
}>;
|
|
23
|
+
pages?: ReadonlyArray<string | {
|
|
24
|
+
path?: string;
|
|
25
|
+
}>;
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
export interface ResolvedPageTraits {
|
|
29
|
+
/** Page route path, matched against the source orbital's page paths. */
|
|
30
|
+
path?: string;
|
|
31
|
+
/** Resolved trait names mounted on the page (includes pulled siblings). */
|
|
32
|
+
traitNames: readonly string[];
|
|
33
|
+
}
|
|
34
|
+
export declare function buildOrbitalsByTrait(schema: OrbitalsByTraitSchema | undefined, resolvedPages?: ReadonlyArray<ResolvedPageTraits>): Record<string, string>;
|