@samatawy/diagrams
    Preparing search index...

    Class SheetRepository

    Index

    Constructors

    Properties

    spec_sheets: SpecSheet[] = []

    Accessors

    • get sheetNames(): { id: string; name: string }[]

      Returns ids and names for all available sheets.

      Returns { id: string; name: string }[]

      Array of selectable sheet metadata.

    Methods

    • Removes a sheet from the repository by id.

      Parameters

      • sheet_id: string

        Identifier of the sheet to remove.

      Returns void

    • Clones a source sheet into a new reusable sheet id and name.

      Parameters

      • source_sheet_id: string

        Existing sheet id to clone from.

      • sheet_id: string

        Target id for the published sheet.

      • name: string

        Target display name for the published sheet.

      • Optionaldescription: string

        Optional description override.

      Returns SpecSheet

      The newly published sheet.

    • Builds a diagram-scoped custom sheet id.

      Parameters

      • owner_id: string

        Diagram identifier that owns the custom sheet.

      Returns string

      Custom sheet id.

    • Checks whether a sheet id follows the custom-sheet naming convention.

      Parameters

      • Optionalsheet_id: string

        Sheet id to test.

      Returns boolean

      True when the id is custom-scoped; otherwise false.

    • Lists class names defined in a sheet.

      Parameters

      • sheet_id: string

        Sheet identifier.

      Returns string[]

      Class name list.

    • Applies diagram-level and node-level styles from a sheet.

      Parameters

      • diagram: Diagram

        Target diagram.

      • sheet_id: string

        Source sheet identifier.

      Returns void

    • Applies the computed style of a sheet to a single node.

      Parameters

      • node: INode

        Target node.

      • sheet_id: string

        Source sheet identifier.

      Returns void

    • Inserts or updates a type style in a sheet.

      Parameters

      • type_name: string

        Node type key.

      • style: NodeStyle

        Style payload.

      • sheet_id: string

        Target sheet identifier.

      Returns void

    • Inserts or updates a class style in a sheet.

      Parameters

      • style_class: string

        Style class key.

      • style: NodeStyle

        Style payload.

      • sheet_id: string

        Target sheet identifier.

      Returns void

    • Renames a class style key inside a sheet.

      Parameters

      • old_name: string

        Existing class key.

      • new_name: string

        Replacement class key.

      • sheet_id: string

        Target sheet identifier.

      Returns void