pivotick - v1.5.0
    Preparing search index...

    Interface PluginContext

    The capabilities handed to a plugin's PivotickPlugin.install. Anything registered here is driven by the same lifecycle as the built-in UI and torn down with it.

    interface PluginContext {
        graph: Pivotick;
        keyManager: KeybindingManager;
        layout: Layout | undefined;
        ui: UIManager;
        addElement(element: UIComponent, slot?: HTMLElement): void;
        addKeybinding(binding: Keybinding): void;
        onPhase(phase: UIPhase, callback: () => void): () => void;
    }
    Index

    Methods

    • Add a UI element into the lifecycle. When slot is given the element is mounted into it immediately; it then participates in every subsequent phase (afterMount / graphReady / destroy). Safe to call after the graph is already live — the element is caught up to the current phase.

      Parameters

      Returns void

    • Hook a lifecycle phase. Returns an unsubscribe function.

      Parameters

      Returns () => void

    Properties

    graph: Pivotick
    keyManager: KeybindingManager
    layout: Layout | undefined

    The root DOM scaffold, read live from the UI (never a stale snapshot). It exists in every mode while the UI is alive and is undefined only after the UI is destroyed. Its slots are what vary by mode: canvas and notification always; mainheader / modal / slidePanel in full and light; sidebar in full only; graphnavigation / graphcontrols / graphtoolbar in every mode except static.

    ui: UIManager