Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: TypeScript improvements to packages/mermaid/src/rendering-util/rendering-elements #5974

Commits on Oct 17, 2024

  1. refactor: improve types of shapes

    Instead of being a `Record<string, ShapeHandler>`, the type now knows
    every key in the variable.
    aloisklink committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    cfe7cce View commit details
    Browse the repository at this point in the history
  2. refactor: correct shapes types

    All of the shapes in
    `packages/mermaid/src/rendering-util/rendering-elements/shapes/` use
    `D3.Selection`s as input parameters and as return parameters.
    
    Although, for some reason, passing them to roughjs seems to work?
    aloisklink committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    9afb181 View commit details
    Browse the repository at this point in the history
  3. refactor: convert rendering-elements/nodes to TS

    Convert the
    `packages/mermaid/src/rendering-util/rendering-elements/nodes.js`
    file to TypeScript at
    `packages/mermaid/src/rendering-util/rendering-elements/nodes.ts`
    aloisklink committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    b0f4ace View commit details
    Browse the repository at this point in the history
  4. refactor: convert shapes/util.js to TypeScript

    Convert the
    `packages/mermaid/src/rendering-util/rendering-elements/shapes/util.js`
    file to TypeScript at:
    `packages/mermaid/src/rendering-util/rendering-elements/shapes/util.ts`.
    aloisklink committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    62fd359 View commit details
    Browse the repository at this point in the history
  5. refactor: remove some any types from render()

    This let's us confirm that the types we're passing to `insertNode()` are
    valid.
    aloisklink committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    16a5fc0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    606ecf8 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. Configuration menu
    Copy the full SHA
    4bc70b7 View commit details
    Browse the repository at this point in the history
  2. refactor(elk): add LabelData type for layout-elk

    I don't know what exactly the type does or is for, but I've tried to
    type it to what it seems to be.
    aloisklink committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    6cc0132 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2024

  1. refactor: use parseFontSize()

    Handle `NaN` values by using `parseFontSize()`.
    
    Suggested-by: mermaid-js#5974 (comment)
    aloisklink committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    bb97fdb View commit details
    Browse the repository at this point in the history
  2. refactor: move MaybePromise type to src/types.ts

    Suggested-by: mermaid-js#5974 (comment)
    Co-authored-by: Sidharth Vinod <[email protected]>
    aloisklink and sidharthv96 committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    f8746be View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2024

  1. Configuration menu
    Copy the full SHA
    b5cd101 View commit details
    Browse the repository at this point in the history