Constructs a new BaseAggregateView instance.
Private_Tracks which stack views have already been the visible top at least once in this controller.
Keys combine _hid and id (see navStackTopSeenKeyForView); entries are removed when a view leaves
the stack so instance-pool reuse with a stable _hid still yields First on a fresh push.
Private_Consumed by transitionToView to set AggregateViewTransition.navDirection. 'forward' for push/replace, 'backward' for pop/reset.
Private_Consumed by transitionToView to set AggregateViewTransition.navStackDepthForPolicy.
OptionalactiveIf present, an animation currently targeting this view (or its subviews).
IHosannaView
OptionalaudioThis hint can be used in conjunction with the audio guide item
OptionalaudioIndicates whether the element can receive focus.
These are the children that are rendered on screen in the tree structure of the view
Indicdates whether the view is a focus group which means it can have a focused child Otherwise it will be focused itself
PrivatecurrentThe current transition being used for the view.
The currently visible view.
OptionalcustomOptionalfocusedOptionalinitialIndicates whether auto-focus is enabled for the view.
Indicates whether the element is currently focused.
Indicates whether the view is managing visibility callbacks.
Indicates this is a NavController.
If true, this view has been presented in an AggregateViewController
Automatic keyboard avoidance opt-out. When a software keyboard appears, the framework translates the visible screen to keep the editing input in view; set 'none' on the screen or the input to disable. Plain field (not reactive) — checked at keyboard-show time.
Callback invoked when the last view is removed from the stack.
OptionalonOptionalonOptionalparentThe parent focusable element, if any.
Indicates whether the view should be removed from the aggregate view.
These are the children that were created in getViews, in a flat strcuture - it contains EVERYTHING that we declared.
A temporary transition for the view.
Specifies the key used to determine the transition style for the view. This string can be used to select or identify different animation or transition effects when navigating between views or states within the application.
OptionalviewThe screen's view model: behaviour that lives outside the view.
A plain property, so this.viewModel is an ordinary read. See createViewModel.
The IHosannaView subclass that created us in getViews
This is a virtual stack, showing you what's in the NavController - however, the navController, only shows one view at a time (or 2 if you are in a transition).
Indicates whether the navigatable entity is visible.
Gets the number of views in the stack.
Transition state for the aggregate view.
Transition state for the aggregate view.
Children
OptionalmountTarget: IHosannaView<ViewState>View Creation
Convenience: animate logical properties across this view's subtree.
Animation specification mapping view IDs to their target property values
Animation duration in milliseconds
OptionalonCompleted: () => voidOptional callback invoked when animation completes
Optionaloptions: Partial<AnimationOptions>Extra animation options; duration and useCurrentState here are ignored (see HosannaViewAnimator.animateViews).
OptionalnextState: NavControllerStateObserves the current viewModel. Called by the framework; safe to call again.
Builds the view and attaches it to the view owner.
OptionalmountTarget: IHosannaView<ViewState>The target to mount the view.
The built view or undefined.
PrivateclearOptionaloptions: IScreenDismissOptionsOptionalargs: Record<string, unknown>OptionalcancellationToken: HsCancellationTokenOptionaltaskId: stringAsync Support
Optionalargs: Record<string, unknown>Optionalcallback: AsyncCommandEventCallbackOptionaltaskId: stringResolves the next focusable element in the given direction.
The event containing details about the focus transition.
The next focusable element, or undefined if none exists.
Default animation provider mapping for simple properties. By default, maps 'opacity' to the base renderer's 'opacity' field. Views can override to provide richer mappings.
Audio guide support
Measurement
Rendererers
Aggregate views only hibernate the currently visible view — not all children. Hidden views in the stack (NavController) or inactive tabs (TabController) must stay as-is; waking them all at once corrupts the hierarchy.
Hides the specified navigatable view.
The view to hide.
The view to be added as a subview.
index of the child in the parent view, -1 means add to end
InternalReconcile remaining presentation after an explicit value cancels a transition.
Focus
PrivatenavStable key for _navScreenTopSeen: combines instance id (_hid) and logical id so pooled instances
and duplicate logical ids are not conflated; hibernation does not change these fields.
Called when this view becomes the visible top again after having been covered by another screen on the same NavController (same transition finish as onAppear, immediately after it).
Prefer overriding onDidReappearInAggregateView; default implementation chains from it.
DO NOT CALL THIS METHOD DIRECTLY DO NOT OVERRIDE IT
Called after the navigatable entity has been added to an aggregate view.
The aggregate view to which the entity has been added.
Called when this view becomes the visible top of its owning NavController stack for the first time (after onDidAddToAggregateView). Default implementation delegates to onAppear and onFirstAppear.
The aggregate view (e.g. NavController) whose transition finished.
Called when this view becomes the visible top again after having been covered by another screen on the same NavController. Default implementation delegates to onAppear and onAppearAgain.
The aggregate view (e.g. NavController) whose transition finished.
Called after the navigatable entity has been removed from an aggregate view.
The aggregate view from which the entity has been removed.
Called when this view is hidden during an aggregate transition or via BaseAggregateView.hideView.
Default implementation delegates to onDisappear.
The aggregate view from which this view is disappearing.
Called when this view becomes the visible top of a NavController stack for the first time for that controller (same transition finish as onAppear, immediately after it).
Prefer overriding onDidAppearInAggregateView; default implementation chains from it.
Called when the view gains focus.
Called when the NavController is mounted.
The parent view to mount into.
The index at which to mount.
Called when a transition removes a view.
The transition that removed the view.
Called before the navigatable entity is added to an aggregate view.
The aggregate view to which the entity will be added.
This method is called before applying state changes to the view. It is used to perform any necessary preparations before the state changes are applied.
Called before the navigatable entity is removed from an aggregate view.
The aggregate view from which the entity will be removed.
Called by InstancePool.get() before a pooled instance is handed out. Restores the view to a construction-equivalent state so that stale lifecycle data (focus, viewStatus, old text, dirty flags, etc.) from the previous owner does not bleed into the new one.
Class-default
values (captured on first construction into the
InstancePool per-class-name registry) are placed into pendingState
with state left empty — matching a freshly-constructed view. This guarantees that every subsequent
setField call (in applyInitialState) detects a difference
against the empty state and pushes the value into pendingState,
so applyLayoutStateToNativeRenderer applies ALL layout props
(opacity, visible, translation, …) to the newly-acquired renderer
even when the logical value equals the class default.
Pops the current view off the stack.
Whether the transition should be animated.
The view that was popped off the stack.
Presents a new screen in the navigation stack or as a dialog.
The screen to be presented, represented by a ViewStruct<ViewState>.
Optionaloptions: IScreenPresentationOptionsOptional presentation options.
If true, the screen will be presented as a dialog.
If true, the screen transition will be animated.
App-config style key selecting the transition type and options.
Pushes a new view onto the stack.
The view to be pushed onto the stack.
Whether the transition should be animated.
IReusable implementation
Replaces the current view with a new view.
The new view to replace the current view.
Whether the transition should be animated.
The view that was replaced.
Sets which direct child this composite prefers on the next focus cascade, or moves focus to that child if this view is already in the focus chain.
First / Last: first or last direct child in children order with canReceiveFocus && visible.Default: clears focusedChildId only (next cascade uses getInitialFocusId()); does not call setFocus.Specific: same behavior as setFocusedSubview for a known child id.OptionalchildId: stringResets the stack to a new state.
The index of the last screen to pop - by default it will clear all screens (0).
The new first screen to be pushed onto the stack.
Whether the transition should be animated.
true if the reset ran; false if the operation was skipped (e.g. a transition is already in progress).
Changes the visual z-order of a child by moving it to a new index. Higher indices render on top. Updates both the children array and the renderer. Requires removeChild before insertChild because the SG node's insertChild always adds (splices in) and does not move; calling it on an already-present child would duplicate.
Assignment to an @observable field: observe the new object, then store it.
Navigatable View
Optionaloptions: INavigationPresentationOptionsPresents passive toast content through the app-owned ToastManager.
Optionaloptions: ToastOptionsTransitions to the specified navigatable view.
The view to transition to.
Whether the transition should be animated.
Wakes up the view and its subviews by reserving native renderers and setting the view phase to Mounted.
NavControllerView manages a stack of navigatable views and transitions between them.
Remarks
Example