pivotick - v3.0.0
    Preparing search index...

    Interface Editors

    interface Editors {
        deletion?: { enabled?: boolean };
        edgeCreator?: { enabled?: boolean };
        edgeEditor?: {
            enabled?: boolean;
            fields?: FieldConfig[];
            labelPrompt?: EdgeLabelPromptMode;
            render?: (session: EdgeEditSession) => HTMLDivElement;
        };
        nodeCreator?: { enabled?: boolean };
        nodeEditor?: {
            enabled?: boolean;
            fields?: FieldConfig[];
            render?: (session: NodeEditSession) => void;
        };
    }
    Index

    Properties

    deletion?: { enabled?: boolean }

    Deleting graph elements from the UI — the sidebar bulk-action Delete button and the node / edge / note context-menu delete entries. Every one of them is gated by InterractionCallbacks.onBeforeDelete; this switch decides whether they are shown in the first place.

    Type Declaration

    • Optionalenabled?: boolean

      Offer the delete affordances at all. false removes them, which is what a read-only integration wants — cleaner than vetoing every click.

      true
      
    edgeCreator?: { enabled?: boolean }

    Interactive edge creation — the Create ▸ Add edge tool (drag-to-connect and click-click alike) and the node context-menu's "Connect to…". What the new edge carries, and whether it is allowed, is decided by InterractionCallbacks.onBeforeEdgeCreate.

    Type Declaration

    • Optionalenabled?: boolean

      Offer the connect affordances at all. false removes them, so a graph whose relations come only from the backend never arms a connect session.

      true
      
    edgeEditor?: {
        enabled?: boolean;
        fields?: FieldConfig[];
        labelPrompt?: EdgeLabelPromptMode;
        render?: (session: EdgeEditSession) => HTMLDivElement;
    }

    Type Declaration

    • Optionalenabled?: boolean

      Offer the edge editor at all. false hides the "Edit Edge" context-menu entry.

      true
      
    • Optionalfields?: FieldConfig[]

      Optional field list for the edge edit modal. Inferred from the edge's data when undefined.

      undefined
      
    • OptionallabelPrompt?: EdgeLabelPromptMode

      When set, every interactive edge create prompts the end-user for a label (stored on the new edge's data.label) using the chosen UI — no callback needed. An onBeforeEdgeCreate hook, if present, takes over and this is ignored (the hook can prompt itself via ctx.promptLabel).

      undefined
      
    • Optionalrender?: (session: EdgeEditSession) => HTMLDivElement

      Optional custom body renderer for the edge edit modal — the static twin of InterractionCallbacks.onEdgeEdit. A custom body owns the draft: mutate session.draft as the user types.

      undefined
      
    nodeCreator?: { enabled?: boolean }

    Interactive node creation — the Create ▸ Add node tool and the canvas context-menu's "Add Node Here". What the new node carries is decided by InterractionCallbacks.onBeforeNodeCreate.

    Type Declaration

    • Optionalenabled?: boolean

      Offer the create-node affordances at all.

      true
      
    nodeEditor?: {
        enabled?: boolean;
        fields?: FieldConfig[];
        render?: (session: NodeEditSession) => void;
    }

    Type Declaration

    • Optionalenabled?: boolean

      Offer the node editor at all. false hides the Create ▸ Edit node tool — a consumer whose backend forbids edits removes the affordance rather than vetoing every commit.

      true
      
    • Optionalfields?: FieldConfig[]

      Optional custom field generator. Inferred if undefined

      undefined
      
    • Optionalrender?: (session: NodeEditSession) => void

      Optional custom modal renderer. Leave undefined for default edition modal

      undefined