vernacular-ai/elm-flow-chart/3.0.0

Renamed to skit-ai/elm-flow-chart. That is where the repository lives now. It has not been published as a package under the new name.

Versions published as vernacular-ai/elm-flow-chart still install under that name. 4 versions of 4 come from the new location (see their notes).

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/skit-ai/elm-flow-chart.

What we checked: The repo moved to github.com/skit-ai/elm-flow-chart and tag 3.0.0 is there; its commit 800ffb3eb22a is from 2019-06-07 00:08 UTC, before the version was published (2019-06-07 00:09 UTC); every file Elm uses matches a copy in a Lamdera package cache from 2021-02-13, from before the change; elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip's SHA-1 is not the published one (GitHub's zip no longer comes out byte for byte the same), so the contents were checked instead.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/vernacular-ai/elm-flow-chart/zipball/3.0.0/

FlowChart.Types

Defination

type alias Vector2 =
{ x : Float
, y : Float
}

Vector2 which can represent position or dimension of node, canvas, etc.

    pos = Vector2 10 10
type alias FCNode =
{ id : String
, position : Vector2
, dim : Vector2
, nodeType : String
, ports : List FCPort
}

Represent the data of a single node in flowchart

id = unique identifier for node
position = position of node wrt to position of canvas
dim = width and height of node
nodeType = string identifier used to render html from node map
port = List of ports


    node = FCNode "node-1" (Vector2 20 20) (Vector2 100 100) "default"
        [ FCPort "port-1" Vector2 0 0.42
        , FCPort "port-2" Vector2 0.85 0.42
        ]
type alias FCPort =
{ id : String
, position : Vector2
}

Nodes are connected through links via Ports. Use a value between [0, 1] for port position

    port = FCPort "port-1" Vector2 0 0.42
type alias FCCanvas =
{ nodes : List FCNode
, position : Vector2
, links : List FCLink
, portConfig :
{ portSize : Vector2
, portColor : String
}
, linkConfig :
{ linkSize : Int
, linkColor : String
}
}

Canvas data to initialize the flowchart