footprintjs - v11.2.0
    Preparing search index...

    Interface StructureStageAddedEvent

    Event payload for StructureRecorder.onStageAdded. Fires for every spec node added to the chart, including the seed (added via flowChart() factory) and subflow mount nodes. Excludes synthetic loop-reference nodes (those carry isLoopReference: true on the spec; consumers see them via the separate onLoopEdgeAdded event instead of as fresh stages).

    interface StructureStageAddedEvent {
        isPausable?: boolean;
        name: string;
        spec: FlowChartSpec;
        stageId: string;
        tags?: readonly string[];
        type: NonNullable<
            | "stage"
            | "subflow"
            | "loop"
            | "decider"
            | "fork"
            | "selector"
            | "streaming"
            | undefined,
        >;
    }
    Index
    isPausable?: boolean

    True for nodes added via addPausableFunction() — useful for visualisers that want to mark stages that can pause execution.

    name: string

    Human-readable label for the node.

    Live reference to the full spec node, for handlers that want details beyond the discriminator fields above. MUST NOT be mutated by the handler — readonly is type-level intent; no runtime freeze. See "Spec mutation" in the file header for the trust-model caveats.

    stageId: string

    Stable identifier for this node. AT EVENT FIRE TIME this is the builder's LOCAL form (no subflow prefix — the prefix is applied later by _prefixNodeTree when this builder is mounted as a subflow into a parent).

    Note: spec.id is a LIVE reference. If you read it AFTER this chart has been mounted as a subflow, it may have been rewritten to the FULL prefixed form. Use splitStageId(spec.id) from foottrace to decompose it back into local + subflowPath.

    Correlating with runtime events:

    • Same builder (no mount) → event.stageId === parseRuntimeStageId(runtime).stageId
    • This builder mounted as subflow → use splitStageId on the prefixed form (or parseRuntimeStageId on the full runtimeStageId) before comparing.
    tags?: readonly string[]

    The names declared on the stage AT EVENT FIRE TIME (options.tags lands before this event fires; absent when none — the "absent when empty" law the commit bundle keeps). Names declared afterwards through the .tag(...) cursor door arrive as their own StructureRecorder.onStageTagged event — a recorder that copies fields here instead of holding spec would otherwise never learn of them (9.24.0).

    type: NonNullable<
        | "stage"
        | "subflow"
        | "loop"
        | "decider"
        | "fork"
        | "selector"
        | "streaming"
        | undefined,
    >

    Spec node type. Lets recorders branch on stage vs decider vs fork vs subflow without re-deriving from other fields.