/** * Activity diagram (new syntax) parser. Produces a block tree: * sequences of actions and control structures (if/switch/while/repeat/ * fork/split/partition), plus swimlane assignments. * @module diagrams/activity/parse */ import { LineReader } from "../../syntax/reader.mjs"; export type ArrowStyle = { label: string | null; color: string | null; lineStyle: "solid" | "dashed" | "dotted"; hidden: boolean; }; export type Item = ({ t: "start" | "stop" | "end" | "kill" | "detach" | "break"; lane: string | null; } | { t: "action"; text: string; shape: string; fill: string | null; lane: string | null; stereotypes: string[]; } | { t: "if"; branches: { cond: string; label: string | null; body: Item[]; }[]; elseLabel: string | null; elseBody: Item[] | null; lane: string | null; } | { t: "switch"; test: string; cases: { label: string; body: Item[]; }[]; lane: string | null; } | { t: "while"; cond: string; label: string | null; endLabel: string | null; body: Item[]; backward: Item[]; lane: string | null; } | { t: "repeat"; body: Item[]; cond: string; label: string | null; notLabel: string | null; startLabel: string | null; backward: Item[]; lane: string | null; } | { t: "fork"; kind: "fork" | "split"; merge: boolean; branches: Item[][]; lane: string | null; } | { t: "group"; kind: string; text: string; fill: string | null; body: Item[]; } | { t: "note"; text: string; side: "left" | "right"; fill: string | null; floating: boolean; } | { t: "arrow"; style: ArrowStyle; } | { t: "connector"; text: string; fill: string | null; lane: string | null; }); export type ActivityModel = { meta: import("../../syntax/commons.mjs").DiagramMeta; body: Item[]; lanes: { id: string; label: string; fill: string | null; }[]; }; export type ActivityContext = { reader: LineReader; model: ActivityModel; module: import("../../core/registry.mjs").ModuleContext; lane: string | null; count: number; }; /** * @param {import("../../core/source.mjs").SourceLine[]} lines * @param {import("../../core/registry.mjs").ModuleContext} module * @returns {ActivityModel} */ export declare function parseActivity(lines: import("../../core/source.mjs").SourceLine[], module: import("../../core/registry.mjs").ModuleContext): ActivityModel;