A DSL for writing type-safe HTML, XML and RSS in Swift.
twitter:site
meta tag added by @harrydayexe in https://github.com/JohnSundell/Plot/pull/92
Aside
HTML component added by @Vithanco in https://github.com/JohnSundell/Plot/pull/93
<time>
element added by @harrydayexe in https://github.com/JohnSundell/Plot/pull/86
This new version of Plot makes the library fully compatible with the Open Graph protocol, and includes neat new extensions added by the community.
crossorigin
link attribute by @davidrothera in https://github.com/JohnSundell/Plot/pull/87
<dl>
with <div>
wrapped groups by @nkalvi in https://github.com/JohnSundell/Plot/pull/89
This new release of Plot is long overdue (very sorry about that!) and includes some great new features added by the community:
EnvironmentValue
by @jordanekay in https://github.com/JohnSundell/Plot/pull/83
type
attribute to PictureSourceContext
by @fishcharlie in https://github.com/JohnSundell/Plot/pull/76
HTMLAnchorRelationship
enum with RawRepresentable
struct by @emorydunn in https://github.com/JohnSundell/Plot/pull/75
swift
by @ptrkstr in https://github.com/JohnSundell/Plot/pull/74
dir
HTML attribute by @alobaili in https://github.com/JohnSundell/Plot/pull/72
viewport-fit
to viewport meta tag by @hallee in https://github.com/JohnSundell/Plot/pull/41
object
tag by @AlexLike in https://github.com/JohnSundell/Plot/pull/39
This release fixes two compatibility issues with Swift 5.6 and Xcode 13.3:
HTMLAnchorTarget.self
has been replaced with .current
, since using self
for enum case names now yields a compiler warning. Backward compatibility for .self
is still maintained through a deprecated computed property, but all Plot users who are using HTMLAnchorTarget.self
within their code bases are encouraged to switch to .current
as soon as possible.EnvironmentKey
with an optional Value
type has been fixed.description
using Plot nodes, which are then converted into HTML (by @daveverwer).title
and spellcheck
attributes can now be natively attached to any HTML element (by @daveverwer).type
attribute is now natively supported for HTML <button>
elements (by @daveverwer).This release also contains documentation fixes by @omaralbeik.
This release fixes a minor regression for documents rendered with indentation, in that text nodes would always be rendered on a new line. The previous (0.8.0 and earlier) rendering behavior has now been restored, and purely Text
-based components now also get this inline rendering behavior as well.
When appending attributes (such as a class
) to a custom component that uses a ComponentGroup
as its body
, those attributes are now appended individually to each of the group's members.
content
namespace of generated RSS feeds now points to the correct URL (by @mwermeester).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.
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 on Node
values, which is a highly unlikely scenario.replaceExisting
property on Attribute
to false
.<small>
element (by @daveverwer).<hr>
element (by @daveverwer).title
attribute can now be attached to any HTML <body>
element (by @daveverwer).label
attribute can now be attached to the <option>
element (by @mredig).<thead>
, <tbody>
, and <tfoot>
(by @mredig).<img>
element now natively supports the width
and height
attributes (by @MainasuK).Language
enum (by @ednofedulo).onclick
attribute (by @8W9aG).novalidate
attribute (by @julianschiavo).<input>
elements now support the placeholder
attribute (by @julianschiavo).aria-hidden
accessibility attribute is now natively supported (by @julianschiavo).<aside>
element is now natively supported (by @l1ghthouse).<input>
) can now appear anywhere within a page's <body>
.This release also includes documentation additions by @BastianInuk.