Skip to content

Instantly share code, notes, and snippets.

@Karan-Palan
Created April 2, 2024 16:54
Show Gist options
  • Save Karan-Palan/867d4e454f24ad4b9770eabe271594c6 to your computer and use it in GitHub Desktop.
Save Karan-Palan/867d4e454f24ad4b9770eabe271594c6 to your computer and use it in GitHub Desktop.
  1. Type Definitions:

    • TBrickKind: Specifies whether a brick is an instruction or an argument.
    • TBrickType: Specifies the type of a brick, such as data, expression, statement, or block.
    • TBrickArgDataType: Specifies the data type returned by an argument brick.
    • TBrickExtent: Defines the bounding box dimensions of a brick.
    • TBrickCoords: Defines the position coordinates of a brick.
    • TBrickColor: Defines the color property of a brick.
  2. Interfaces:

    • IBrickStyle: Defines the style properties of a generic brick, including background color, foreground color, outline, and scale.
    • IBrickArgs: Specifies the arguments for a brick.
    • IBrickArgsState: Defines the state properties associated with bricks that can take arguments.
    • IBrick: Defines a generic brick with properties like UUID, name, kind, type, label, glyph, and methods to retrieve SVG path and bounding box information.
    • IBrickArgument: Extends IBrick and adds properties specific to argument bricks, such as data type and notch bounding box.
    • IBrickInstruction: Extends IBrick, IBrickArgs, and IBrickArgsState to define properties specific to instruction bricks, including connection rules and notch bounding boxes.
    • IBrickData: Extends IBrickArgument and adds properties specific to data bricks, such as dynamic value and input mode.
    • IBrickExpression: Extends IBrickArgument, reserving space for future properties.
    • IBrickStatement: Extends IBrickInstruction, reserving space for future properties.
    • IBrickBlock: Extends IBrickInstruction and adds properties specific to block bricks, including nested bounding box information and collapse state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment