pivotick - v1.5.0
    Preparing search index...

    Interface EdgeCreateContext

    interface EdgeCreateContext {
        kind: "edge" | "note-link";
        origin: EdgeCreateOrigin;
        promptData: (options: EdgePromptDataOptions) => Promise<EdgeData | null>;
        promptLabel: (options?: EdgeLabelPromptOptions) => Promise<string | null>;
        source: Note | Node;
        target: Node;
    }
    Index

    Properties

    kind: "edge" | "note-link"

    'edge' for a node→node edge, 'note-link' for a note→node attachment.

    Whether the gesture was click- or drag-to-connect.

    promptData: (options: EdgePromptDataOptions) => Promise<EdgeData | null>

    Prompt the user for a whole data payload via a modal — a declarative form (EdgePromptDataOptions.fields) or custom HTML (EdgePromptDataOptions.render + getValues). Resolves to the collected object, or null if the user cancelled. Feed it straight into the decision — e.g. return { accept: true, data: values }. Modal only (no inline variant).

    promptLabel: (options?: EdgeLabelPromptOptions) => Promise<string | null>

    Prompt the user for a label while the connect gesture is still pending, using either a floating inline input or a modal (per EdgeLabelPromptOptions.mode). Resolves to the entered string, or null if the user cancelled (Esc / closed). The shadow-edge preview stays up while it is open. Typically fed back into the returned decision's data — e.g. return { accept: true, data: { label } }.

    source: Note | Node

    The source of the connection — a Node for an edge, a Note for a note-link.

    target: Node

    The resolved target node.