Skip to content

v0.1.7

Choose a tag to compare

@adammharris adammharris released this 06 Sep 16:41
· 315 commits to main since this release
v0.1.7
d0a13cf

Added

  • core — take twig 3.3.1, and write the highlight and the strikethrough Markdown already read (893a297)
  • swift — colour a highlight from the toolbar, and everything under it that had to exist first (e685372)
  • tui — the highlight's colours, under Format and in the palette — and the compound moves into core (de95804)
  • web — a highlight's colour, from the editor's API to the demo's picker (f6fe368)

Behavioural changes

  • leaf_core::Capabilities for a Markdown document reports
    mark: true and strike: true, where mark was false. Doc::supports and
    Doc::toggle follow: InlineKind::Mark writes ==x== and
    InlineKind::Delete writes ~~x~~ instead of setting a "not supported in
    markdown" status. A toolbar driven by the record — the TUI menu and palette,
    the web data-cap attributes, the Swift Capabilities struct — un-dims
    those two buttons with no change of its own.

  • Doc::supports and Capabilities::of now answer for a
    document parsed with leaf's parse_extensions, not for twig's default
    options. Only the two flags above differ today, but a caller reading these as
    a fact about the bare format is reading them wrong: they are a fact about the
    document leaf actually builds.

  • leaf_core::Capabilities gains mark_color, and
    leaf_ffi::Capabilities / leaf-wasm's CapabilitiesView gain the same field.
    Rust code constructing a Capabilities literal must add it; the two bindings
    hand out records, so a frontend only sees a new field.

  • DocView gains mark_color in both bindings — a
    MarkColor? in Swift, a colour name or null in JS. A Swift host building a
    DocView or a LeafUI.EditorState by hand gets a defaulted parameter and
    compiles unchanged.

  • LeafEditorModel.highlight(_:) (Swift) is now one undo step
    rather than two when it both highlights and colours a selection. A host that
    called undo() twice to reverse one press will now undo the edit before it.

  • leaf_core::Doc gains highlight, and both bindings gain a
    highlight method beside set_mark_color. Nothing existing changes shape.

  • EditorState (leaf-web) gains markColor and
    hasSelection. A host destructuring the state is unaffected; one comparing
    whole state objects will see them differ where they used to match.


Every change in this release and the ones before it: docs/CHANGELOG.md.