Hosanna UI API v2.3.0-next
    Preparing search index...

    Interface IViewFragment

    The IViewFragment interface represents a view fragment that can be used to create cells and other views. This is the rehydrated version of a view fragment, containing all necessary data to render the view, including styles and data, which come from the IFragmentStyle stored in the style registry.

    interface IViewFragment {
        $supportsDataMap?: boolean;
        activeShapeStyleKeysById?: Record<string, string>;
        applyEffectStyle?: (
            nodeId: string,
            effectStyleKey: undefined | string,
        ) => void;
        applyShapeStyle?: (nodeId: string, shapeStyleKey: string) => void;
        callbacks?: IViewFragmentCallbackMap;
        compiledConstraintPlan?: ICompiledConstraintPlan;
        compiledDynamicConstraintPlan?: ICompiledConstraintPlan;
        compiledStaticConstraintPlan?: ICompiledConstraintPlan;
        computedValues?: Record<string, ComputedValue>;
        constraintLayoutBindingSignature?: string;
        dataMap: IViewFragmentDataMap;
        dataMapBindingViewIds?: string[];
        dataMapViewsById?: { [key: string]: ISGNNode };
        focusPercent?: number;
        focusStyleTracks?: FragmentFocusStyleTracks;
        hsShapesUnresolved?: boolean;
        id: string;
        lastAppliedLayoutCacheKey?: string;
        refreshEffectStyles?: () => void;
        resolvedStyleGeneration?: number;
        rokuShapeDataGeometryById?: Record<
            string,
            { height?: number; translation?: number[]; width?: number },
        >;
        rokuShapesById?: Record<string, CompiledShapeRoku>;
        rowFocusPercent?: number;
        specificViewCallbacks?: {
            [key: string]: ISpecificViewFragmentCallbackHandler;
        };
        styleKey: string;
        styleLayoutRevision?: number;
        view: ISGNGroup;
        viewsById: { [key: string]: ISGNNode };
        viewStatus: ViewStatus;
    }
    Index

    Properties

    $supportsDataMap?: boolean
    activeShapeStyleKeysById?: Record<string, string>

    Roku: shape style currently rendered by each shape Poster node, set by status updates that swap shapeStyleKey.

    applyEffectStyle?: (nodeId: string, effectStyleKey: undefined | string) => void
    applyShapeStyle?: (nodeId: string, shapeStyleKey: string) => void

    Roku shape bindings update compiled Posters through the fragment provider.

    compiledConstraintPlan?: ICompiledConstraintPlan

    Populated by ViewFragmentProvider when constraints exist; skips repeated ref parsing in hot passes.

    compiledDynamicConstraintPlan?: ICompiledConstraintPlan
    compiledStaticConstraintPlan?: ICompiledConstraintPlan
    computedValues?: Record<string, ComputedValue>
    constraintLayoutBindingSignature?: string
    dataMapBindingViewIds?: string[]

    Shared from the provider's resolved-style cache; avoids rebuilding the data/fn binding-id set per fragment and bind.

    dataMapViewsById?: { [key: string]: ISGNNode }
    focusPercent?: number

    CollectionView-owned item focus from 0 to 1; present only for an opted-in cell fragment.

    focusStyleTracks?: FragmentFocusStyleTracks

    Compiled presentation fields for an opted-in fragment.

    hsShapesUnresolved?: boolean

    Roku: true when this instance was built before its hs_shape styles compiled, so it must be rebuilt (not reused) once they do.

    id: string
    lastAppliedLayoutCacheKey?: string

    Skips layout replay when the pooled instance already has geometry for this cache key.

    refreshEffectStyles?: () => void

    Re-resolve shape-linked Effect radii after fragment geometry changes.

    resolvedStyleGeneration?: number

    Resolved configuration used to build this fragment's nodes and tracks.

    rokuShapeDataGeometryById?: Record<
        string,
        { height?: number; translation?: number[]; width?: number },
    >

    Roku: last data/function-bound logical geometry, before compiled outsets or status overrides.

    rokuShapesById?: Record<string, CompiledShapeRoku>

    Roku shape artifacts for translating data-bound logical geometry to Poster geometry.

    rowFocusPercent?: number

    CollectionView-owned row focus from 0 to 1; present only for an opted-in cell or header fragment.

    specificViewCallbacks?: { [key: string]: ISpecificViewFragmentCallbackHandler }
    styleKey: string
    styleLayoutRevision?: number

    Style/locale revision at which this pooled fragment's SG tree was created.

    view: ISGNGroup
    viewsById: { [key: string]: ISGNNode }
    viewStatus: ViewStatus