• Build the lazy evaluation context for a context-menu condition.

    • target is always the HTMLElement the menu was triggered on.
    • itemLogic is the logic layer of the nearest ancestor row's data-item-id item resolved on the owning actor (or undefined if not found).
    • actorLogic is the logic layer of the nearest ancestor row's data-actor-id actor (or undefined).

    Conditions bind the logic layer, not the raw documents — the logic object is the stable, computed view authors write against (matching the action trigger/visibility and Active Effect predicate conventions). The resolved row may not be an item/actor row, so itemLogic/actorLogic can be absent — authors guard with defined(...).

    itemLogic and actorLogic are getters, so the DOM walk and lookup happen only when the condition actually references them.

    Parameters

    • target: HTMLElement

      The HTMLElement the context menu was opened on.

    Returns Record<string, unknown>

    A context object with target, itemLogic, and actorLogic bindings.