Plot 0.9.0
This version of Plot introduces a brand new Component
API that can be used to build HTML components in a very SwiftUI-like way. It also includes a brand new rendering engine, the ability to append values to attributes, and more. All while maintaining complete backward compatibility with the existing API. Check out the "Components" section in the updated README to learn more about the new component-based API.
- Plot now uses Swift 5.4.
- The new
Component
protocol can be used to define HTML<body>
components in a very SwiftUI-like way. Node
is no longer an enum, and is now implemented as a struct instead, for added flexibility. This is the only potentially breaking change in this release, but will only affect API users that have been manually switching onNode
values, which is a highly unlikely scenario.- Values can now be appended to attributes (rather than overwriting them) by setting the
replaceExisting
property onAttribute
tofalse
. - Plot now natively supports the
<small>
element (by @daveverwer). - Attributes can now be attached to the
<hr>
element (by @daveverwer). - The
title
attribute can now be attached to any HTML<body>
element (by @daveverwer). - The
label
attribute can now be attached to the<option>
element (by @mredig). - HTML tables can now be natively grouped using
<thead>
,<tbody>
, and<tfoot>
(by @mredig). - The
<img>
element now natively supports thewidth
andheight
attributes (by @MainasuK). - Brazilian Portuguese has now been added to the
Language
enum (by @ednofedulo).