Build a context menu, compiling each entry into the function-based shape Foundry's base class expects.
For every entry (via compileMenuEntry): the authored condition
is compiled into Foundry's visible predicate, and when no explicit
callback is supplied a default one is generated that resolves the
context item, builds a SohlActionContext, and invokes the named
functionName on the item's logic object.
The DOM element the menu is bound to.
CSS selector identifying the rows the menu attaches to.
The SoHL entry definitions to display.
Optional context-menu configuration.
StaticcompileCompile a context-menu condition into a predicate suitable for
Foundry's ContextMenu base class.
The condition source to compile.
The entry name, used for error reporting.
Optionalparent: SohlLogicThe owning document's logic, used as the compiled expression's parent (required for string conditions).
A predicate evaluating the condition against a target element.
StaticmakeStaticresolveStaticresolve
SoHL's specialization of Foundry's
ContextMenuUI control.Extends the base context menu to accept SohlContextMenu.Entry definitions whose
conditionmay be a string SafeExpression (compiled to a predicate) and whosecallbackmay be omitted in favour of a named logic method (functionName). The constructor normalizes those entries into the function-based shape Foundry expects, and the class adds custom positioning (_setPosition) plus static helpers for resolving the triggering item/actor from the DOM.Remarks
The Foundry-free entry shape, condition compilation, and DOM resolution helpers live in
importso the logic layer can use them without loading this Foundry-coupled UI class. The static helpers and namespace members here delegate to (and re-export) that module.