@almadar/ui 5.121.3 → 5.121.4
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 +330 -67
- package/dist/avl/index.js +332 -69
- package/dist/components/index.cjs +159 -45
- package/dist/components/index.d.cts +25 -5
- package/dist/components/index.d.ts +25 -5
- package/dist/components/index.js +159 -47
- package/dist/hooks/index.cjs +31 -10
- package/dist/hooks/index.d.cts +17 -1
- package/dist/hooks/index.d.ts +17 -1
- package/dist/hooks/index.js +31 -12
- package/dist/lib/drawable/three/index.cjs +19 -10
- package/dist/lib/drawable/three/index.js +20 -11
- package/dist/lib/index.cjs +41 -13
- package/dist/lib/index.js +41 -13
- package/dist/marketing/index.cjs +29 -14
- package/dist/marketing/index.js +29 -14
- package/dist/providers/index.cjs +204 -63
- package/dist/providers/index.d.cts +33 -4
- package/dist/providers/index.d.ts +33 -4
- package/dist/providers/index.js +204 -64
- package/dist/runtime/index.cjs +330 -67
- package/dist/runtime/index.d.cts +0 -14
- package/dist/runtime/index.d.ts +0 -14
- package/dist/runtime/index.js +333 -70
- package/package.json +2 -2
- package/tailwind-preset.cjs +56 -0
- package/themes/_base.css +19 -0
|
@@ -257,6 +257,18 @@ declare namespace OrbitalProvider {
|
|
|
257
257
|
* path's codegen wraps each trait view with the same provider so both
|
|
258
258
|
* paths share the qualification contract.
|
|
259
259
|
*
|
|
260
|
+
* ## Embedded-trait emit bubbling (R-EMBEDDED-EMIT-BUBBLE)
|
|
261
|
+
*
|
|
262
|
+
* Providers NEST: when a trait's `render-ui` embeds another trait
|
|
263
|
+
* (`@trait.X` / inline `<External.Trait …/>`), the embedded view is
|
|
264
|
+
* rendered inside the host's subtree AND wraps itself in its own
|
|
265
|
+
* provider. The context therefore carries the full scope CHAIN
|
|
266
|
+
* (innermost-first), not a single scope. `useEventBus` fans every
|
|
267
|
+
* `UI:*` emit out to each scope on the chain so the host trait's
|
|
268
|
+
* subscribers hear emits from the embedded trait — a button authored
|
|
269
|
+
* as `<UiButton.traits.ButtonRender action={CREATE}/>` inside a host
|
|
270
|
+
* dispatches on the host's qualified key, not only the hoisted atom's.
|
|
271
|
+
*
|
|
260
272
|
* @packageDocumentation
|
|
261
273
|
*/
|
|
262
274
|
|
|
@@ -266,6 +278,13 @@ interface TraitScope {
|
|
|
266
278
|
/** Trait name within the orbital (e.g. `"ContactBrowse"`). */
|
|
267
279
|
trait: string;
|
|
268
280
|
}
|
|
281
|
+
/**
|
|
282
|
+
* Scope chain, innermost-first. `chain[0]` is the trait whose subtree
|
|
283
|
+
* the caller renders inside; `chain[1..]` are its host ancestors (the
|
|
284
|
+
* traits whose `render-ui` embedded it, outermost last). An empty
|
|
285
|
+
* chain means the caller is outside any `TraitScopeProvider`.
|
|
286
|
+
*/
|
|
287
|
+
type TraitScopeChain = readonly TraitScope[];
|
|
269
288
|
interface TraitScopeProviderProps {
|
|
270
289
|
orbital: string;
|
|
271
290
|
trait: string;
|
|
@@ -275,12 +294,22 @@ interface TraitScopeProviderProps {
|
|
|
275
294
|
* Wrap a trait's rendered subtree to qualify bare `UI:*` emits with the
|
|
276
295
|
* trait's scope. Mount this at the slot-content boundary in runtime
|
|
277
296
|
* mode (UISlotRenderer) and at each generated trait view's outermost
|
|
278
|
-
* element in compiled mode (orbital-shell-typescript codegen).
|
|
297
|
+
* element in compiled mode (orbital-shell-typescript codegen). Nesting
|
|
298
|
+
* is preserved: a provider prepends itself to the parent chain so
|
|
299
|
+
* embedded-trait emits can bubble to their host.
|
|
279
300
|
*/
|
|
280
301
|
declare function TraitScopeProvider({ orbital, trait, children, }: TraitScopeProviderProps): React__default.ReactElement;
|
|
281
302
|
/**
|
|
282
|
-
* Read the
|
|
283
|
-
* any `TraitScopeProvider` (e.g. Storybook, design-system
|
|
303
|
+
* Read the full trait-scope chain, innermost-first. Empty when called
|
|
304
|
+
* outside any `TraitScopeProvider` (e.g. Storybook, design-system
|
|
305
|
+
* catalog). `useEventBus` uses this to fan embedded-trait emits out to
|
|
306
|
+
* every host ancestor.
|
|
307
|
+
*/
|
|
308
|
+
declare function useTraitScopeChain(): TraitScopeChain;
|
|
309
|
+
/**
|
|
310
|
+
* Read the innermost (nearest) trait scope. Returns `null` when called
|
|
311
|
+
* outside any `TraitScopeProvider`. Kept for callers that only need the
|
|
312
|
+
* immediate scope.
|
|
284
313
|
*/
|
|
285
314
|
declare function useTraitScope(): TraitScope | null;
|
|
286
315
|
|
|
@@ -425,4 +454,4 @@ declare function useOfflineMode(): OfflineModeContextValue;
|
|
|
425
454
|
*/
|
|
426
455
|
declare function useOptionalOfflineMode(): OfflineModeContextValue | null;
|
|
427
456
|
|
|
428
|
-
export { EventBusContext, EventBusProvider, type OfflineModeContextValue, OfflineModeProvider, type OfflineModeProviderProps, OrbitalProvider, type OrbitalProviderProps, SelectionContext, type SelectionContextType, SelectionProvider, type TraitScope, TraitScopeProvider, type TraitScopeProviderProps, UIThemeDefinition, VerificationProvider, type VerificationProviderProps, useOfflineMode, useOptionalOfflineMode, useSelection, useSelectionOptional, useTraitScope };
|
|
457
|
+
export { EventBusContext, EventBusProvider, type OfflineModeContextValue, OfflineModeProvider, type OfflineModeProviderProps, OrbitalProvider, type OrbitalProviderProps, SelectionContext, type SelectionContextType, SelectionProvider, type TraitScope, TraitScopeProvider, type TraitScopeProviderProps, UIThemeDefinition, VerificationProvider, type VerificationProviderProps, useOfflineMode, useOptionalOfflineMode, useSelection, useSelectionOptional, useTraitScope, useTraitScopeChain };
|
|
@@ -257,6 +257,18 @@ declare namespace OrbitalProvider {
|
|
|
257
257
|
* path's codegen wraps each trait view with the same provider so both
|
|
258
258
|
* paths share the qualification contract.
|
|
259
259
|
*
|
|
260
|
+
* ## Embedded-trait emit bubbling (R-EMBEDDED-EMIT-BUBBLE)
|
|
261
|
+
*
|
|
262
|
+
* Providers NEST: when a trait's `render-ui` embeds another trait
|
|
263
|
+
* (`@trait.X` / inline `<External.Trait …/>`), the embedded view is
|
|
264
|
+
* rendered inside the host's subtree AND wraps itself in its own
|
|
265
|
+
* provider. The context therefore carries the full scope CHAIN
|
|
266
|
+
* (innermost-first), not a single scope. `useEventBus` fans every
|
|
267
|
+
* `UI:*` emit out to each scope on the chain so the host trait's
|
|
268
|
+
* subscribers hear emits from the embedded trait — a button authored
|
|
269
|
+
* as `<UiButton.traits.ButtonRender action={CREATE}/>` inside a host
|
|
270
|
+
* dispatches on the host's qualified key, not only the hoisted atom's.
|
|
271
|
+
*
|
|
260
272
|
* @packageDocumentation
|
|
261
273
|
*/
|
|
262
274
|
|
|
@@ -266,6 +278,13 @@ interface TraitScope {
|
|
|
266
278
|
/** Trait name within the orbital (e.g. `"ContactBrowse"`). */
|
|
267
279
|
trait: string;
|
|
268
280
|
}
|
|
281
|
+
/**
|
|
282
|
+
* Scope chain, innermost-first. `chain[0]` is the trait whose subtree
|
|
283
|
+
* the caller renders inside; `chain[1..]` are its host ancestors (the
|
|
284
|
+
* traits whose `render-ui` embedded it, outermost last). An empty
|
|
285
|
+
* chain means the caller is outside any `TraitScopeProvider`.
|
|
286
|
+
*/
|
|
287
|
+
type TraitScopeChain = readonly TraitScope[];
|
|
269
288
|
interface TraitScopeProviderProps {
|
|
270
289
|
orbital: string;
|
|
271
290
|
trait: string;
|
|
@@ -275,12 +294,22 @@ interface TraitScopeProviderProps {
|
|
|
275
294
|
* Wrap a trait's rendered subtree to qualify bare `UI:*` emits with the
|
|
276
295
|
* trait's scope. Mount this at the slot-content boundary in runtime
|
|
277
296
|
* mode (UISlotRenderer) and at each generated trait view's outermost
|
|
278
|
-
* element in compiled mode (orbital-shell-typescript codegen).
|
|
297
|
+
* element in compiled mode (orbital-shell-typescript codegen). Nesting
|
|
298
|
+
* is preserved: a provider prepends itself to the parent chain so
|
|
299
|
+
* embedded-trait emits can bubble to their host.
|
|
279
300
|
*/
|
|
280
301
|
declare function TraitScopeProvider({ orbital, trait, children, }: TraitScopeProviderProps): React__default.ReactElement;
|
|
281
302
|
/**
|
|
282
|
-
* Read the
|
|
283
|
-
* any `TraitScopeProvider` (e.g. Storybook, design-system
|
|
303
|
+
* Read the full trait-scope chain, innermost-first. Empty when called
|
|
304
|
+
* outside any `TraitScopeProvider` (e.g. Storybook, design-system
|
|
305
|
+
* catalog). `useEventBus` uses this to fan embedded-trait emits out to
|
|
306
|
+
* every host ancestor.
|
|
307
|
+
*/
|
|
308
|
+
declare function useTraitScopeChain(): TraitScopeChain;
|
|
309
|
+
/**
|
|
310
|
+
* Read the innermost (nearest) trait scope. Returns `null` when called
|
|
311
|
+
* outside any `TraitScopeProvider`. Kept for callers that only need the
|
|
312
|
+
* immediate scope.
|
|
284
313
|
*/
|
|
285
314
|
declare function useTraitScope(): TraitScope | null;
|
|
286
315
|
|
|
@@ -425,4 +454,4 @@ declare function useOfflineMode(): OfflineModeContextValue;
|
|
|
425
454
|
*/
|
|
426
455
|
declare function useOptionalOfflineMode(): OfflineModeContextValue | null;
|
|
427
456
|
|
|
428
|
-
export { EventBusContext, EventBusProvider, type OfflineModeContextValue, OfflineModeProvider, type OfflineModeProviderProps, OrbitalProvider, type OrbitalProviderProps, SelectionContext, type SelectionContextType, SelectionProvider, type TraitScope, TraitScopeProvider, type TraitScopeProviderProps, UIThemeDefinition, VerificationProvider, type VerificationProviderProps, useOfflineMode, useOptionalOfflineMode, useSelection, useSelectionOptional, useTraitScope };
|
|
457
|
+
export { EventBusContext, EventBusProvider, type OfflineModeContextValue, OfflineModeProvider, type OfflineModeProviderProps, OrbitalProvider, type OrbitalProviderProps, SelectionContext, type SelectionContextType, SelectionProvider, type TraitScope, TraitScopeProvider, type TraitScopeProviderProps, UIThemeDefinition, VerificationProvider, type VerificationProviderProps, useOfflineMode, useOptionalOfflineMode, useSelection, useSelectionOptional, useTraitScope, useTraitScopeChain };
|