[{"name":"Cartesian","comment":" A module for cartesian structure\n\nThis is an experiment in organizing wiring diagrams\n\nWe're not implementing this paper exactly, but finding some inspiration:\n\nThe Cost of Compositionality: A High-Performance Implementation of String Diagram Composition\n\n<https://arxiv.org/abs/2105.09257>\n\n\n## Types\n\n@docs C, Interface\n\n\n## Usage\n\n@docs before, aside, init, initWith, unit, group, interface, wrap\n\n","unions":[],"aliases":[{"name":"C","comment":" The type of a cartesian structure\n\nThis is not your typical category theory monoidal thing, as we store a recursive structure\n\n","args":["a"],"type":"Internal.Cartesian.C a"},{"name":"Interface","comment":" The Interface type describes the Arity of the cartesian system structure\n","args":[],"type":"Internal.Cartesian.Interface.Interface"}],"values":[{"name":"aside","comment":" Put two structures aside each other\n\nThe structures will be independent\n\nNote the order of arguments are flipped to support this syntax:\n\n    a |> aside b\n\nThis will put `a` 'first'\n\n","type":"Cartesian.C a -> Cartesian.C a -> Cartesian.C a"},{"name":"before","comment":" Put one structure before another\n\nThe structures will be dependent and must match in the interface\n\nNote the order of arguments are flipped to support this syntax:\n\n    a |> before b\n\nThis will put `a` 'first'\n\n","type":"Cartesian.C a -> Cartesian.C a -> Cartesian.C a"},{"name":"group","comment":" Group a structure\n\nThis may be used to group substructures\n\n","type":"Cartesian.C a -> Cartesian.C a"},{"name":"init","comment":" Initialize a simple 1->1 arity morphism with label 'a'\n","type":"a -> Cartesian.C a"},{"name":"initWith","comment":" Initialize a morphism with a given interface and label\n","type":"Basics.Int -> Basics.Int -> a -> Cartesian.C a"},{"name":"interface","comment":" Extract the outermost interface of the structure\n","type":"Cartesian.C a -> Cartesian.Interface"},{"name":"unit","comment":" The unit value\n\nThis is possibly not needed, but we'll start off using it.\n\nThis may disappear later.\n\n","type":"Cartesian.C a"},{"name":"wrap","comment":" Wrap a part of the structure with a label a\n","type":"a -> Cartesian.C a -> Cartesian.C a"}],"binops":[]},{"name":"Cartesian.Layout","comment":" Layout a cartesian structure\n\n\n## Usage\n\n@docs toLayout, toLayoutWithConfig\n\n","unions":[],"aliases":[],"values":[{"name":"toLayout","comment":" Layout a cartesian structure\n\nThis is unfinished, and won't do anything interesting yet.\n\n","type":"Internal.Cartesian.C a -> Internal.Cartesian.Layout.Layout a"},{"name":"toLayoutWithConfig","comment":" Layout with some configuration\n\nThis is unfinished, and won't do anything interesting yet.\n\n","type":"Diagram.Layout.Config.Config a -> Internal.Cartesian.C a -> Internal.Cartesian.Layout.Layout a"}],"binops":[]},{"name":"Cartesian.Svg","comment":" Convert a cartesian structure to Svg\n\n\n## Usage\n\n@docs toSvg, toSvgWith, Styling\n\n","unions":[],"aliases":[{"name":"Styling","comment":" A type for configuring Layout and Svg styling\n","args":["a"],"type":"{ layoutConfig : Diagram.Layout.Config.Config a, svgConfig : Internal.Svg.Config.Config a }"}],"values":[{"name":"toSvg","comment":" Layout a cartesian structure and render to Svg\nThis uses some silly defaults. Use this to do some simple testing.\nOtherwise use the toSvgWith function that lets you control layout and styling\n","type":"Internal.Cartesian.C a -> Svg.Svg msg"},{"name":"toSvgWith","comment":" Layout and render to Svg with Styling\n\nYou supply two configs. One for layout and one for Svg styling.\n\nThe layout styling lets you control, sizes, padding, arrow measurements...\nThe svg styling lets you control fonts, colors, strokes, transparency...\n\n","type":"Cartesian.Svg.Styling a -> Internal.Cartesian.C a -> Svg.Svg msg"}],"binops":[]},{"name":"Diagram.Bound","comment":" Represent the horizontal and vertical ( possibly empty) extents of a two dimensional area.\n\n@docs Bound, init, empty\n\n","unions":[],"aliases":[{"name":"Bound","comment":" The Bound type\n","args":[],"type":"Internal.Bound.Bound"}],"values":[{"name":"empty","comment":" Initialize an empty Bound\n","type":"Diagram.Bound.Bound"},{"name":"init","comment":" Initialize a Bound from an Extent\n","type":"Internal.Extent.Extent -> Diagram.Bound.Bound"}],"binops":[]},{"name":"Diagram.Extent","comment":" Represent the horizontal and vertical extents of a two dimensinal area (also called bounding-box).\n\n@docs Extent, init\n\n","unions":[],"aliases":[{"name":"Extent","comment":" Represent the horizontal and vertical extents of a two dimensinal area\n","args":[],"type":"Internal.Extent.Extent"}],"values":[{"name":"init","comment":" Initialize an Extent from two corners, lo and hi\n","type":"Internal.Vec2.Vec2 -> Internal.Vec2.Vec2 -> Diagram.Extent.Extent"}],"binops":[]},{"name":"Diagram.Layout.Config","comment":" Configuration for Layouts\n\n@docs Config, default, setLeafExtent, setSpacing\n\n","unions":[],"aliases":[{"name":"Config","comment":" The Config type\n","args":["a"],"type":"Internal.Layout.Config.Config a"}],"values":[{"name":"default","comment":" A default Config\n","type":"Diagram.Layout.Config.Config a"},{"name":"setLeafExtent","comment":" Configure a function to compute the extent of a leaf node of a diagram from a value of type 'a'\n","type":"(a -> Internal.Bound.Bound) -> Diagram.Layout.Config.Config a -> Diagram.Layout.Config.Config a"},{"name":"setSpacing","comment":" Configure the spacing between nodes in the diagram\n","type":"Internal.Vec2.Vec2 -> Diagram.Layout.Config.Config a -> Diagram.Layout.Config.Config a"}],"binops":[]},{"name":"Diagram.Svg","comment":" Some helpers for rendering diagrams to SVG\n\n@docs Viewport, view, smallViewport, wideViewport, mediumViewport, largeViewport\n\n","unions":[],"aliases":[{"name":"Viewport","comment":" Placement and dimensions of a Viewport to render SVG inside\n","args":[],"type":"Internal.Svg.Viewport"}],"values":[{"name":"largeViewport","comment":" A larger sized viewport (1024x768)\n","type":"{ width : number, height : number, xMin : number, yMin : number }"},{"name":"mediumViewport","comment":" A medium sized viewport (640x480)\n","type":"{ width : number, height : number, xMin : number, yMin : number }"},{"name":"smallViewport","comment":" A small viewport of 200x200\n","type":"{ width : number, height : number, xMin : number, yMin : number }"},{"name":"view","comment":" Render a list of Svg items in a viewport to Html\n","type":"Diagram.Svg.Viewport -> List.List (Svg.Svg msg) -> Html.Html msg"},{"name":"wideViewport","comment":" A wide but low viewport of 1200x150\n","type":"{ width : number, height : number, xMin : number, yMin : number }"}],"binops":[]},{"name":"Diagram.Svg.Config","comment":" Configure how to convert Layout Labels to Strings for Svg output\n\n@docs Config, forStringLabels, initWithLabelToString, withLabelToString, default\n\n","unions":[],"aliases":[{"name":"Config","comment":" Preliminary way to control how labels turn into String for SVG\n","args":["a"],"type":"Internal.Svg.Config.Config a"}],"values":[{"name":"default","comment":" Simple starting config. All labels will render as a dot\n\nUse the Config modifiers to shape your intended Config\n\n","type":"Diagram.Svg.Config.Config a"},{"name":"forStringLabels","comment":" Simple starting config when labels are already String\n","type":"Diagram.Svg.Config.Config String.String"},{"name":"initWithLabelToString","comment":" Init needs a labelToString function\n","type":"(a -> String.String) -> Diagram.Svg.Config.Config a"},{"name":"withLabelToString","comment":" Simple starting config when labels are already String\n","type":"(a -> String.String) -> Diagram.Svg.Config.Config a -> Diagram.Svg.Config.Config a"}],"binops":[]},{"name":"Diagram.Vec2","comment":" A simple Vec2 type for geometry\n\n@docs Vec2, init, translate\n\n","unions":[],"aliases":[{"name":"Vec2","comment":" A simple Vec2 type\n","args":[],"type":"Internal.Vec2.Vec2"}],"values":[{"name":"init","comment":" Initialize a Vec2 from two floats\n","type":"Basics.Float -> Basics.Float -> Diagram.Vec2.Vec2"},{"name":"translate","comment":" Translate one vector by another (add)\n","type":"Diagram.Vec2.Vec2 -> Diagram.Vec2.Vec2 -> Diagram.Vec2.Vec2"}],"binops":[]}]