import { d as SDCPN } from "./sdcpn-CayOVwJM.js";
import { z } from "zod";

//#region src/schemas/entity-schemas.d.ts
declare const placeSchema: z.ZodObject<{
  id: z.ZodString;
  name: z.ZodString;
  colorId: z.ZodNullable<z.ZodString>;
  dynamicsEnabled: z.ZodBoolean;
  differentialEquationId: z.ZodNullable<z.ZodString>;
  visualizerCode: z.ZodOptional<z.ZodString>;
  showAsInitialState: z.ZodOptional<z.ZodBoolean>;
  x: z.ZodNumber;
  y: z.ZodNumber;
}, z.core.$strict>;
declare const transitionSchema: z.ZodObject<{
  id: z.ZodString;
  name: z.ZodString;
  inputArcs: z.ZodArray<z.ZodObject<{
    placeId: z.ZodString;
    weight: z.ZodNumber;
    type: z.ZodEnum<{
      inhibitor: "inhibitor";
      standard: "standard";
    }>;
  }, z.core.$strict>>;
  outputArcs: z.ZodArray<z.ZodObject<{
    placeId: z.ZodString;
    weight: z.ZodNumber;
  }, z.core.$strict>>;
  lambdaType: z.ZodEnum<{
    predicate: "predicate";
    stochastic: "stochastic";
  }>;
  lambdaCode: z.ZodString;
  transitionKernelCode: z.ZodString;
  x: z.ZodNumber;
  y: z.ZodNumber;
}, z.core.$strict>;
declare const colorSchema: z.ZodObject<{
  id: z.ZodString;
  name: z.ZodString;
  iconSlug: z.ZodString;
  displayColor: z.ZodString;
  elements: z.ZodArray<z.ZodObject<{
    elementId: z.ZodString;
    name: z.ZodString;
    type: z.ZodEnum<{
      boolean: "boolean";
      integer: "integer";
      real: "real";
    }>;
  }, z.core.$strict>>;
}, z.core.$strict>;
declare const differentialEquationSchema: z.ZodObject<{
  id: z.ZodString;
  name: z.ZodString;
  colorId: z.ZodNullable<z.ZodString>;
  code: z.ZodString;
}, z.core.$strict>;
declare const parameterSchema: z.ZodObject<{
  id: z.ZodString;
  name: z.ZodString;
  variableName: z.ZodString;
  type: z.ZodEnum<{
    boolean: "boolean";
    integer: "integer";
    real: "real";
  }>;
  defaultValue: z.ZodString;
}, z.core.$strict>;
//#endregion
//#region src/schemas/metric-schema.d.ts
declare const metricSchema: z.ZodObject<{
  id: z.ZodString;
  name: z.ZodString;
  description: z.ZodOptional<z.ZodString>;
  code: z.ZodString;
}, z.core.$strict>;
//#endregion
//#region src/schemas/scenario-schema.d.ts
declare const scenarioSchema: z.ZodObject<{
  id: z.ZodString;
  name: z.ZodString;
  description: z.ZodOptional<z.ZodString>;
  scenarioParameters: z.ZodArray<z.ZodObject<{
    type: z.ZodEnum<{
      boolean: "boolean";
      integer: "integer";
      ratio: "ratio";
      real: "real";
    }>;
    identifier: z.ZodString;
    default: z.ZodNumber;
  }, z.core.$strict>>;
  parameterOverrides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
  initialState: z.ZodDiscriminatedUnion<[z.ZodObject<{
    type: z.ZodLiteral<"per_place">;
    content: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodArray<z.ZodNumber>>]>>;
  }, z.core.$strict>, z.ZodObject<{
    type: z.ZodLiteral<"code">;
    content: z.ZodString;
  }, z.core.$strict>], "type">;
}, z.core.$strict>;
//#endregion
//#region src/action-schemas.d.ts
declare const mutationActionInputSchemas: {
  readonly addPlace: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    colorId: z.ZodNullable<z.ZodString>;
    dynamicsEnabled: z.ZodBoolean;
    differentialEquationId: z.ZodNullable<z.ZodString>;
    visualizerCode: z.ZodOptional<z.ZodString>;
    showAsInitialState: z.ZodOptional<z.ZodBoolean>;
    x: z.ZodNumber;
    y: z.ZodNumber;
  }, z.core.$strict>;
  readonly updatePlace: z.ZodObject<{
    placeId: z.ZodString;
    update: z.ZodObject<{
      name: z.ZodOptional<z.ZodString>;
      colorId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
      dynamicsEnabled: z.ZodOptional<z.ZodBoolean>;
      differentialEquationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
      visualizerCode: z.ZodOptional<z.ZodOptional<z.ZodString>>;
      showAsInitialState: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
    }, z.core.$strict>;
  }, z.core.$strict>;
  readonly updatePlacePosition: z.ZodObject<{
    placeId: z.ZodString;
    position: z.ZodObject<{
      x: z.ZodNumber;
      y: z.ZodNumber;
    }, z.core.$strict>;
  }, z.core.$strict>;
  readonly removePlace: z.ZodObject<{
    placeId: z.ZodString;
  }, z.core.$strict>;
  readonly addTransition: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    inputArcs: z.ZodArray<z.ZodObject<{
      placeId: z.ZodString;
      weight: z.ZodNumber;
      type: z.ZodEnum<{
        inhibitor: "inhibitor";
        standard: "standard";
      }>;
    }, z.core.$strict>>;
    outputArcs: z.ZodArray<z.ZodObject<{
      placeId: z.ZodString;
      weight: z.ZodNumber;
    }, z.core.$strict>>;
    lambdaType: z.ZodEnum<{
      predicate: "predicate";
      stochastic: "stochastic";
    }>;
    lambdaCode: z.ZodString;
    transitionKernelCode: z.ZodString;
    x: z.ZodNumber;
    y: z.ZodNumber;
  }, z.core.$strict>;
  readonly updateTransition: z.ZodObject<{
    transitionId: z.ZodString;
    update: z.ZodObject<{
      name: z.ZodOptional<z.ZodString>;
      lambdaType: z.ZodOptional<z.ZodEnum<{
        predicate: "predicate";
        stochastic: "stochastic";
      }>>;
      lambdaCode: z.ZodOptional<z.ZodString>;
      transitionKernelCode: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
  }, z.core.$strict>;
  readonly updateTransitionPosition: z.ZodObject<{
    transitionId: z.ZodString;
    position: z.ZodObject<{
      x: z.ZodNumber;
      y: z.ZodNumber;
    }, z.core.$strict>;
  }, z.core.$strict>;
  readonly removeTransition: z.ZodObject<{
    transitionId: z.ZodString;
  }, z.core.$strict>;
  readonly addArc: z.ZodObject<{
    transitionId: z.ZodString;
    arcDirection: z.ZodEnum<{
      input: "input";
      output: "output";
    }>;
    placeId: z.ZodString;
    weight: z.ZodNumber;
  }, z.core.$strict>;
  readonly removeArc: z.ZodObject<{
    transitionId: z.ZodString;
    arcDirection: z.ZodEnum<{
      input: "input";
      output: "output";
    }>;
    placeId: z.ZodString;
  }, z.core.$strict>;
  readonly updateArcWeight: z.ZodObject<{
    transitionId: z.ZodString;
    arcDirection: z.ZodEnum<{
      input: "input";
      output: "output";
    }>;
    placeId: z.ZodString;
    weight: z.ZodNumber;
  }, z.core.$strict>;
  readonly updateArcType: z.ZodObject<{
    transitionId: z.ZodString;
    placeId: z.ZodString;
    type: z.ZodEnum<{
      inhibitor: "inhibitor";
      standard: "standard";
    }>;
  }, z.core.$strict>;
  readonly updateArcPlace: z.ZodObject<{
    transitionId: z.ZodString;
    arcDirection: z.ZodEnum<{
      input: "input";
      output: "output";
    }>;
    oldPlaceId: z.ZodString;
    newPlaceId: z.ZodString;
  }, z.core.$strict>;
  readonly addType: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    iconSlug: z.ZodString;
    displayColor: z.ZodString;
    elements: z.ZodArray<z.ZodObject<{
      elementId: z.ZodString;
      name: z.ZodString;
      type: z.ZodEnum<{
        boolean: "boolean";
        integer: "integer";
        real: "real";
      }>;
    }, z.core.$strict>>;
  }, z.core.$strict>;
  readonly updateType: z.ZodObject<{
    typeId: z.ZodString;
    update: z.ZodObject<{
      name: z.ZodOptional<z.ZodString>;
      iconSlug: z.ZodOptional<z.ZodString>;
      displayColor: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
  }, z.core.$strict>;
  readonly removeType: z.ZodObject<{
    typeId: z.ZodString;
  }, z.core.$strict>;
  readonly addTypeElement: z.ZodObject<{
    typeId: z.ZodString;
    element: z.ZodObject<{
      elementId: z.ZodString;
      name: z.ZodString;
      type: z.ZodEnum<{
        boolean: "boolean";
        integer: "integer";
        real: "real";
      }>;
    }, z.core.$strict>;
  }, z.core.$strict>;
  readonly updateTypeElement: z.ZodObject<{
    typeId: z.ZodString;
    elementId: z.ZodString;
    update: z.ZodObject<{
      name: z.ZodOptional<z.ZodString>;
      type: z.ZodOptional<z.ZodEnum<{
        boolean: "boolean";
        integer: "integer";
        real: "real";
      }>>;
    }, z.core.$strict>;
  }, z.core.$strict>;
  readonly removeTypeElement: z.ZodObject<{
    typeId: z.ZodString;
    elementId: z.ZodString;
  }, z.core.$strict>;
  readonly moveTypeElement: z.ZodObject<{
    typeId: z.ZodString;
    elementId: z.ZodString;
    toIndex: z.ZodNumber;
  }, z.core.$strict>;
  readonly addDifferentialEquation: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    colorId: z.ZodNullable<z.ZodString>;
    code: z.ZodString;
  }, z.core.$strict>;
  readonly updateDifferentialEquation: z.ZodObject<{
    equationId: z.ZodString;
    update: z.ZodObject<{
      name: z.ZodOptional<z.ZodString>;
      colorId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
      code: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
  }, z.core.$strict>;
  readonly removeDifferentialEquation: z.ZodObject<{
    equationId: z.ZodString;
  }, z.core.$strict>;
  readonly addParameter: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    variableName: z.ZodString;
    type: z.ZodEnum<{
      boolean: "boolean";
      integer: "integer";
      real: "real";
    }>;
    defaultValue: z.ZodString;
  }, z.core.$strict>;
  readonly updateParameter: z.ZodObject<{
    parameterId: z.ZodString;
    update: z.ZodObject<{
      name: z.ZodOptional<z.ZodString>;
      variableName: z.ZodOptional<z.ZodString>;
      type: z.ZodOptional<z.ZodEnum<{
        boolean: "boolean";
        integer: "integer";
        real: "real";
      }>>;
      defaultValue: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
  }, z.core.$strict>;
  readonly removeParameter: z.ZodObject<{
    parameterId: z.ZodString;
  }, z.core.$strict>;
  readonly addScenario: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    scenarioParameters: z.ZodArray<z.ZodObject<{
      type: z.ZodEnum<{
        boolean: "boolean";
        integer: "integer";
        ratio: "ratio";
        real: "real";
      }>;
      identifier: z.ZodString;
      default: z.ZodNumber;
    }, z.core.$strict>>;
    parameterOverrides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    initialState: z.ZodDiscriminatedUnion<[z.ZodObject<{
      type: z.ZodLiteral<"per_place">;
      content: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodArray<z.ZodNumber>>]>>;
    }, z.core.$strict>, z.ZodObject<{
      type: z.ZodLiteral<"code">;
      content: z.ZodString;
    }, z.core.$strict>], "type">;
  }, z.core.$strict>;
  readonly updateScenario: z.ZodObject<{
    scenarioId: z.ZodString;
    update: z.ZodObject<{
      name: z.ZodOptional<z.ZodString>;
      description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
      scenarioParameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
        type: z.ZodEnum<{
          boolean: "boolean";
          integer: "integer";
          ratio: "ratio";
          real: "real";
        }>;
        identifier: z.ZodString;
        default: z.ZodNumber;
      }, z.core.$strict>>>;
      parameterOverrides: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>>;
      initialState: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"per_place">;
        content: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodArray<z.ZodNumber>>]>>;
      }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"code">;
        content: z.ZodString;
      }, z.core.$strict>], "type">>;
    }, z.core.$strict>;
  }, z.core.$strict>;
  readonly removeScenario: z.ZodObject<{
    scenarioId: z.ZodString;
  }, z.core.$strict>;
  readonly addMetric: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    code: z.ZodString;
  }, z.core.$strict>;
  readonly updateMetric: z.ZodObject<{
    metricId: z.ZodString;
    update: z.ZodObject<{
      name: z.ZodOptional<z.ZodString>;
      description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
      code: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
  }, z.core.$strict>;
  readonly removeMetric: z.ZodObject<{
    metricId: z.ZodString;
  }, z.core.$strict>;
  readonly deleteItemsByIds: z.ZodObject<{
    items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
      type: z.ZodLiteral<"place">;
      id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
      type: z.ZodLiteral<"transition">;
      id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
      type: z.ZodLiteral<"arc">;
      id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
      type: z.ZodLiteral<"type">;
      id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
      type: z.ZodLiteral<"differentialEquation">;
      id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
      type: z.ZodLiteral<"parameter">;
      id: z.ZodString;
    }, z.core.$strict>], "type">>;
  }, z.core.$strict>;
  readonly commitNodePositions: z.ZodObject<{
    commits: z.ZodArray<z.ZodObject<{
      id: z.ZodString;
      itemType: z.ZodEnum<{
        place: "place";
        transition: "transition";
      }>;
      position: z.ZodObject<{
        x: z.ZodNumber;
        y: z.ZodNumber;
      }, z.core.$strict>;
    }, z.core.$strict>>;
  }, z.core.$strict>;
};
type MutationActionName = keyof typeof mutationActionInputSchemas;
type MutationActionInput<Name extends MutationActionName> = z.infer<(typeof mutationActionInputSchemas)[Name]>;
//#endregion
//#region src/actions.d.ts
type MutationHelperFunctions = { [Name in keyof typeof mutationActionInputSchemas]: (input: MutationActionInput<Name>) => void };
declare function createPetrinautActions(mutate: (fn: (sdcpn: SDCPN) => void) => void): MutationHelperFunctions;
//#endregion
//#region src/clipboard/types.d.ts
declare const CLIPBOARD_FORMAT_VERSION = 1;
declare const clipboardPayloadSchema: z.ZodObject<{
  format: z.ZodLiteral<"petrinaut-sdcpn">;
  version: z.ZodNumber;
  documentId: z.ZodNullable<z.ZodString>;
  data: z.ZodObject<{
    places: z.ZodArray<z.ZodObject<{
      colorId: z.ZodNullable<z.ZodString>;
      dynamicsEnabled: z.ZodBoolean;
      differentialEquationId: z.ZodNullable<z.ZodString>;
      visualizerCode: z.ZodOptional<z.ZodString>;
      x: z.ZodNumber;
      y: z.ZodNumber;
      id: z.ZodString;
      name: z.ZodString;
    }, z.core.$strip>>;
    transitions: z.ZodArray<z.ZodObject<{
      lambdaType: z.ZodEnum<{
        predicate: "predicate";
        stochastic: "stochastic";
      }>;
      lambdaCode: z.ZodString;
      transitionKernelCode: z.ZodString;
      x: z.ZodNumber;
      y: z.ZodNumber;
      id: z.ZodString;
      name: z.ZodString;
      inputArcs: z.ZodArray<z.ZodObject<{
        placeId: z.ZodString;
        weight: z.ZodNumber;
        type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
          inhibitor: "inhibitor";
          standard: "standard";
        }>>>;
      }, z.core.$strip>>;
      outputArcs: z.ZodArray<z.ZodObject<{
        placeId: z.ZodString;
        weight: z.ZodNumber;
      }, z.core.$strip>>;
    }, z.core.$strip>>;
    types: z.ZodArray<z.ZodObject<{
      iconSlug: z.ZodString;
      displayColor: z.ZodString;
      id: z.ZodString;
      name: z.ZodString;
      elements: z.ZodArray<z.ZodObject<{
        type: z.ZodEnum<{
          boolean: "boolean";
          integer: "integer";
          real: "real";
        }>;
        elementId: z.ZodString;
        name: z.ZodString;
      }, z.core.$strip>>;
    }, z.core.$strip>>;
    differentialEquations: z.ZodArray<z.ZodObject<{
      code: z.ZodString;
      id: z.ZodString;
      name: z.ZodString;
      colorId: z.ZodNullable<z.ZodString>;
    }, z.core.$strip>>;
    parameters: z.ZodArray<z.ZodObject<{
      variableName: z.ZodString;
      type: z.ZodEnum<{
        boolean: "boolean";
        integer: "integer";
        real: "real";
      }>;
      defaultValue: z.ZodString;
      id: z.ZodString;
      name: z.ZodString;
    }, z.core.$strip>>;
  }, z.core.$strip>;
}, z.core.$strip>;
/**
 * The clipboard payload format for petrinaut copy/paste.
 * Derived from {@link clipboardPayloadSchema}.
 */
type ClipboardPayload = z.infer<typeof clipboardPayloadSchema>;
//#endregion
//#region src/commands.d.ts
type ApplyClipboardPasteResult = {
  newItemIds: Array<{
    type: string;
    id: string;
  }>;
};
type ApplyAutoLayoutResult = {
  /** Number of place/transition positions actually changed by the run. */commitCount: number;
};
/**
 * Composite operations the host can invoke. These wrap multiple atomic
 * mutations in a single `mutate(...)` so they produce one Automerge change
 * (and one undo entry).
 *
 * Commands are intentionally NOT part of `instance.mutations` — the AI tool
 * bundle is derived from `mutationActionInputSchemas` and never auto-exposes
 * commands. AI-callable commands must be added explicitly to
 * `aiCommandActionInputSchemas` and routed through the AI dispatcher.
 */
type CommandHelperFunctions = {
  /**
   * Paste a clipboard payload into the document, generating fresh IDs for
   * each item and deduplicating names. Returns the IDs of the newly created
   * items so the caller can update selection.
   */
  applyClipboardPaste: (input: {
    payload: ClipboardPayload;
  }) => ApplyClipboardPasteResult;
  /**
   * Reposition every place and transition using the ELK layered layout. Runs
   * unconditionally — the caller is responsible for confirming with the user
   * when applicable (e.g. the AI dispatcher prompts via an interactive chat
   * widget when `askUserFirst: true`).
   */
  applyAutoLayout: () => Promise<ApplyAutoLayoutResult>;
};
declare function createPetrinautCommands(mutate: (fn: (sdcpn: SDCPN) => void) => void, read: () => SDCPN): CommandHelperFunctions;
//#endregion
//#region src/handle.d.ts
type DocumentId = string;
type DocHandleState = "loading" | "ready" | "deleted" | "unavailable";
type PetrinautPatch = {
  op: "add" | "remove" | "replace";
  path: (string | number)[];
  value?: unknown;
};
type DocChangeEvent = {
  next: SDCPN;
  patches?: PetrinautPatch[];
  source?: "local" | "remote";
};
type ReadableStore<T> = {
  get(): T;
  subscribe(listener: (value: T) => void): () => void;
};
type HistoryEntry = {
  timestamp: string;
};
interface PetrinautHistory {
  /** Apply the most recent inverse patches. Returns true if anything was undone. */
  undo(): boolean;
  /** Re-apply the most recently undone patches. Returns true if anything was redone. */
  redo(): boolean;
  /** Jump to an arbitrary point in history. Returns true if the index changed. */
  goToIndex(index: number): boolean;
  /** Drop the entire history. */
  clear(): void;
  readonly canUndo: ReadableStore<boolean>;
  readonly canRedo: ReadableStore<boolean>;
  /**
   * Ordered timestamps of the history checkpoints. Index 0 is the initial
   * state; index N is the state after the Nth mutation.
   */
  readonly entries: ReadableStore<readonly HistoryEntry[]>;
  /** Position of the current state within {@link entries}. */
  readonly currentIndex: ReadableStore<number>;
}
interface PetrinautDocHandle {
  readonly id: DocumentId;
  readonly state: ReadableStore<DocHandleState>;
  whenReady(): Promise<void>;
  doc(): SDCPN | undefined;
  change(fn: (draft: SDCPN) => void): void;
  subscribe(listener: (event: DocChangeEvent) => void): () => void;
  /**
   * Optional. Present on handles that track local history (Immer-backed,
   * Automerge-backed, …). Read-only mirror handles omit it.
   */
  readonly history?: PetrinautHistory;
}
type CreateJsonDocHandleOptions = {
  id?: DocumentId;
  initial: SDCPN;
  /**
   * Maximum number of history checkpoints retained. Older entries are dropped
   * once the limit is exceeded. Pass `0` to disable history entirely.
   * @default 50
   */
  historyLimit?: number;
};
declare function createJsonDocHandle(opts: CreateJsonDocHandleOptions): PetrinautDocHandle;
//#endregion
//#region src/instance.d.ts
type EventStream<T> = {
  subscribe(listener: (event: T) => void): () => void;
};
type PetrinautMutations = MutationHelperFunctions;
type PetrinautCommands = CommandHelperFunctions;
/**
 * The live document instance. Owns the handle, mutations, commands, and
 * patch stream.
 *
 * Mutations and commands are namespaced:
 *
 * - `instance.mutations` — atomic, schema-driven operations keyed by
 *   `mutationActionInputSchemas`. This is the AI-safe surface; the AI tool
 *   bundle is derived from these schemas.
 * - `instance.commands` — composite host operations (clipboard paste,
 *   auto-layout). Only the subset registered in `aiCommandActionInputSchemas`
 *   is exposed to the AI.
 *
 * There is no top-level `mutate` escape hatch — every write must flow
 * through a typed helper so it is schema-validated.
 *
 * **Simulation does not live here.** A simulation runs against a frozen SDCPN
 * snapshot and has no need for the live document. To run one, call
 * {@link createSimulation} directly with `instance.handle.doc()` (or any other
 * SDCPN value). The host owns the simulation's lifecycle.
 */
type Petrinaut = {
  readonly handle: PetrinautDocHandle; /** Current SDCPN snapshot store. Falls back to an empty SDCPN until the handle is ready. */
  readonly definition: ReadableStore<SDCPN>; /** Patch event stream. Only fires for handles that produce patches. */
  readonly patches: EventStream<PetrinautPatch[]>; /** Atomic, schema-driven mutations. */
  readonly mutations: PetrinautMutations; /** Composite host operations (clipboard paste, auto-layout, ...). */
  readonly commands: PetrinautCommands;
  readonly readonly: boolean;
  dispose(this: void): void;
};
type CreatePetrinautConfig = {
  document: PetrinautDocHandle;
  readonly?: boolean;
};
declare function createPetrinaut(config: CreatePetrinautConfig): Petrinaut;
//#endregion
export { metricSchema as A, clipboardPayloadSchema as C, MutationActionName as D, MutationActionInput as E, transitionSchema as F, differentialEquationSchema as M, parameterSchema as N, mutationActionInputSchemas as O, placeSchema as P, ClipboardPayload as S, createPetrinautActions as T, ApplyAutoLayoutResult as _, PetrinautMutations as a, createPetrinautCommands as b, DocChangeEvent as c, HistoryEntry as d, PetrinautDocHandle as f, createJsonDocHandle as g, ReadableStore as h, PetrinautCommands as i, colorSchema as j, scenarioSchema as k, DocHandleState as l, PetrinautPatch as m, EventStream as n, createPetrinaut as o, PetrinautHistory as p, Petrinaut as r, CreateJsonDocHandleOptions as s, CreatePetrinautConfig as t, DocumentId as u, ApplyClipboardPasteResult as v, MutationHelperFunctions as w, CLIPBOARD_FORMAT_VERSION as x, CommandHelperFunctions as y };
//# sourceMappingURL=instance-CBnoTOa_.d.ts.map