JohnSundell Plot Versions Save

A DSL for writing type-safe HTML, XML and RSS in Swift.

0.14.0

1 year ago

0.13.0

1 year ago

This new version of Plot makes the library fully compatible with the Open Graph protocol, and includes neat new extensions added by the community.

0.12.0

1 year ago

This new release of Plot is long overdue (very sorry about that!) and includes some great new features added by the community:

0.11.0

2 years ago

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.
  • A compiler error that could be triggered by using a custom EnvironmentKey with an optional Value type has been fixed.

0.10.0

2 years ago
  • You can now define an RSS item's description using Plot nodes, which are then converted into HTML (by @daveverwer).
  • The title and spellcheck attributes can now be natively attached to any HTML element (by @daveverwer).
  • The type attribute is now natively supported for HTML <button> elements (by @daveverwer).
  • The rendering of boolean HTML attributes has been optimized, and are now often rendered without any value, further minimizing the overall footprint of the HTML that Plot generates (by @daveverwer).

This release also contains documentation fixes by @omaralbeik.

0.9.3

2 years ago

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.

0.9.2

2 years ago

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.

0.9.1

2 years ago
  • The content namespace of generated RSS feeds now points to the correct URL (by @mwermeester).
  • You can now append attributes to custom component wrappers, and they will be added to the component's underlying element.
  • Appending an empty attribute to a component no longer causes additional whitespace to be rendered.

0.9.0

2 years ago

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 on Node values, which is a highly unlikely scenario.
  • Values can now be appended to attributes (rather than overwriting them) by setting the replaceExisting property on Attribute to false.
  • 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 the width and height attributes (by @MainasuK).
  • Brazilian Portuguese has now been added to the Language enum (by @ednofedulo).

0.8.0

4 years ago
  • All HTML body elements now support the onclick attribute (by @8W9aG).
  • HTML forms now support the novalidate attribute (by @julianschiavo).
  • HTML <input> elements now support the placeholder attribute (by @julianschiavo).
  • The HTML aria-hidden accessibility attribute is now natively supported (by @julianschiavo).
  • The HTML <aside> element is now natively supported (by @l1ghthouse).
  • HTML body and form elements can now be freely mixed, and elements that typically appear within a form (such as <input>) can now appear anywhere within a page's <body>.

This release also includes documentation additions by @BastianInuk.