Thanks for the kind words everyone. Yes, please send pull requests to the
main repo and I will integrate them.

The short term goal is to make a typed SVG library (as mentioned earlier,
fully typed and documented). Medium-term, I'd like to adopt some sensible
module partitions that help segregate functionality into logical units
(e.g. core graphics, animations, filters). The long term goal is to create
a pleasant and intuitive SVG library, something that will come from seeing
how we all use this in practice.

For instance, one idea I've had is to create core graphics modules that
"assume" a length such as `px` or `em`. I've noticed when I create scalable
vector graphics, I typically measure everything in the same units, so it
doesn't make sense to specify units all over the place.

As an example, right now you need the following `px` helper methods to
express unit of length:

{
    import TypedSvg.Attributes exposing (x, y, width, height, strokeWidth)

    rect
        [ x (px 150)
        , y (px 150)
        , width (px 200)
        , height (px 200)
        , fill Color.black
        , strokeWidth (px 2)
        , stroke <| Color.rgba 90 60 60 0.5
        ]
        []
}

I'd rather be able to forego the `px`:

{
    import TypedSvg.Attributes.InPx exposing (x, y, width, height,
strokeWidth)

    rect
        [ x 150
        , y 150
        , width 200
        , height 200
        , fill Color.black
        , strokeWidth 2
        , stroke <| Color.rgba 90 60 60 0.5
        ]
        []
}

Anyway, just some of my current thinking. Other thoughts and ideas welcome.

Duane


On Mar 31, 2017 12:09 PM, "Nicholas Hollon" <falling.maso...@gmail.com>
wrote:

> This is awesome! Something I've wished for since about 5 minutes after I
> started learning elm-svg.
>
>  Will definitely be adopting it for future projects... possibly sending
> some pull requests along the way.  :-)
>
> On Thursday, March 30, 2017 at 8:35:32 AM UTC-7, Duane Johnson wrote:
>>
>> Hi all,
>>
>> I've been working on a TypedSvg package here:
>>
>> http://package.elm-lang.org/packages/canadaduane/typed-svg/2.0.1
>>
>> Its intent is to replace `elm-lang/svg` with a fully typed and documented
>> SVG package. There's still a lot of work to do (the SVG spec is huge) but
>> I'm pretty happy with the progress that's been made. I'm announcing this
>> now so that if others are interested in a similar package, we can
>> consolidate effort and help one another rather than duplicate effort.
>>
>> Thanks,
>> Duane Johnson
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to