Skip to content

Releases: diaryx-org/leaf

v0.5.1

Choose a tag to compare

@adammharris adammharris released this 04 Oct 15:29
v0.5.1

Breaking

  • deps — take resvg-uniffi from git, and stop publishing to crates.io (b0f551d)

Added

  • leaf-swift — force-click Look Up on the Mac, laid over the word as drawn (5f35912)
  • leaf-swift — answer the rest of Cocoa's standard key bindings on the Mac (8eef0ce)
  • leaf-swift — Edit ▸ Speech and the Substitutions panel on the Mac (73b2f22)
  • leaf-swift — read the Mac editor by visual line, range and style for VoiceOver (4a5d8aa)
  • leaf-swift — find dates, addresses, numbers and URLs under a force click on the Mac (dcf247d)
  • leaf-swift — give Mac input methods real attributes, clauses and line geometry (ba456b2)
  • leaf-swift — drag a picture out of the Mac editor as its file (b57827c)

Fixed

  • leaf-core — find the word at an offset among drawn glyphs in WYSIWYG (81f3a65)
  • leaf-swift — put visualLine's doc comment back on visualLine (4dbc578)
  • leaf-swift — break a kill chain on a kill elsewhere, and carry the mark through edits (bdf2488)
  • leaf-swift — frame an empty accessibility range as the caret, and keep VoiceOver's text (b9c7bb1)
  • leaf-swift — look up only what a click is on, and claim a force click only for a peek (ed4a855)
  • leaf-swift — write a detected date's calendar file only when it is added (a9c10fc)
  • leaf-swift — judge a marked clause thick by its line style, not its whole bitmask (2d4f8b1)
  • leaf-swift — answer a force click from its pressure, since AppKit never sends quickLook for one (a66f85d)
  • leaf-swift — look up a force-clicked date a word at a time, since Look Up never answers the phrase (2325e9c)

Behavioural changes

  • leaf-core, leaf-ffi, leaf-ratatui, leaf-math, leaf-raster and leaf-tui get no new versions on crates.io after 0.5.0; depend on them from git, branch = "main".

  • on macOS a force click or three-finger tap looks up the selection or the word under the pointer, or peeks the footnote or previewable link there, instead of doing nothing.

  • the macOS context menu offers Look Up for the word under the click when nothing is selected, and Look Up's highlight is drawn in the word's own font on its baseline.

  • on macOS ⌘⌫, ⌃K, ⌃Y, ⌃T, ⌃⌫, ⌃A/⌃E, page and scroll keys, the emacs mark commands and Edit ▸ Transformations now act in the editor instead of beeping.

  • on macOS Edit ▸ Speech ▸ Start/Stop Speaking and Edit ▸ Substitutions ▸ Show Substitutions are enabled and work in the editor.

  • on macOS accessibilityInsertionPointLineNumber is the caret's visual line rather than its core row, and the editor posts value- and selection-changed accessibility notifications.

  • on macOS a force click on a detected date, address, phone number or URL looks up the whole phrase, and the context menu over one offers Call, Show in Maps, Open URL, New Email or Add to Calendar.

  • on macOS a multi-clause IME composition is underlined per clause (thick for the active one), and firstRect(forCharacterRange:) returns the range's first full line with a matching actualRange instead of one character's box.

  • on macOS dragging a loaded picture out of the editor to the Finder or another app delivers the image file (or a promised one for a data: image), with the block's markup still offered as text.

  • on macOS a force click on the editor now looks up the word, selection or detected data under the pointer, or peeks the footnote or link there, where before it did nothing.

  • on macOS a force click on a detected date looks up the word under the pointer rather than the whole date.


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

v0.5.0

Choose a tag to compare

@adammharris adammharris released this 03 Oct 16:23
v0.5.0

Breaking

  • deps — move to twig 4 (2cc655e)

Added

  • leaf-core — insert a link with a label of its own (d3266bc)

Behavioural changes

  • Doc::set_block(BlockKind::Heading(_)) over a
    Markdown paragraph of several lines writes one heading with its lines
    joined by spaces (a\nb becomes ## a b), where it made a heading of
    the first line and left the rest a paragraph. A paragraph holding a
    hard break is refused, and the refusal lands in status.

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

v0.4.13

Choose a tag to compare

@adammharris adammharris released this 02 Oct 03:42
v0.4.13

Added

  • leaf-editor — open a new document in a page-shaped window (ce61060)

Fixed

  • leaf-editor — reopen a document's window at the size and place it was left (95e6ed0)
  • leaf-swift — open a relative link as the file beside the document (362e6c6)
  • leaf-swift — bound formula, table, image and page work that could crash or stall (8281ca4)
  • leaf-ratatui — keep the view in place when the terminal is resized (b505f3a)
  • leaf-swift — play audio in a strip that fits its box, not AVKit's video player (a81f75d)
  • leaf-swift — take the keyboard inset again when the frame or safe area moves (0bf687c)

Behavioural changes

  • LeafUI's fallback now opens a relative link destination as a file beside the document, and beeps for a missing file.

  • an on-screen image box shows its plain fill until its pixels finish decoding, then repaints.

  • setting pageSetup to non-finite, negative or zero-sized values stores the sanitized setup, which is what reading it back returns.

  • a formula larger than 16,384pt either way falls back to core's glyphs instead of drawing.

  • after a resize render keeps the caret's screen line (or the top text, if the caret was out of view) instead of the row number.

  • an activated audio box plays in leaf's own strip instead of AVKit's player, on iOS and macOS.

  • a play badge on a chip with no picture is drawn in the theme's handle colour, not translucent black.

  • on iOS the editor's bottom content inset follows later changes to its frame and safe area while a keyboard is up, rather than holding the value computed at the keyboard notification.


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

v0.4.12

Choose a tag to compare

@adammharris adammharris released this 30 Sep 22:56
v0.4.12

Breaking

  • leaf-swift — require macOS 13, the floor the linked Rust library already had (664bffc)

Added

  • leaf-core — insert a host's directive, and reserve rows for its drawing (ffdd8b2)
  • leaf-ffi,leaf-wasm — export insert_directive, set_directive_rows and the directives capability (c27d753)
  • leaf-ratatui — draw a host's directives and offer its catalogue rows (2151531)
  • leaf-tui — an Embed palette row and the embed drawn as a card (54721f9)
  • leaf-web — draw a host's directives through a hook, and insert them from its catalogue (0a02aa2)
  • leaf-swift — draw a leaf directive with a view the host supplies (cabc9d1)
  • leaf-swift — offer a host's directives in Insert (ecd69f2)
  • leaf-editor — draw ::embed as a titled card and offer Insert ▸ Embed… (5bf7847)
  • leaf-compose — draw a leaf directive with a composable the host supplies (2fbb408)
  • leaf-compose — offer a host's directives in the formatting bar's Insert menu (f7ef085)
  • leaf-android — draw ::embed as a titled card and offer Insert ▸ Embed… (65cbd0c)
  • xtask — package a signed, notarised Leaf.app in a .dmg (3205fba)

Fixed

  • leaf-editor — install committed Package.resolved in Xcode Cloud post-clone (0f60f78)
  • leaf-core — text typed at a leaf directive's stops opens a paragraph beside it (36a466b)
  • leaf-tui — leave an embed too narrow for its card to the placeholder (79c256e)
  • leaf-editor — raise the Mac app's deployment target to macOS 13 (1dd6b60)

Behavioural changes

  • a djot ::: name fence under an attribute line carrying classes is now named by the fence's word, not by the first class, which it used to be.

  • a selection endpoint on the surface past the last row, when that row is a picture or formula, now maps to the row's far caret stop rather than to column 2.

  • In the rendered view, text typed or pasted at either caret stop of a block leaf directive now opens a paragraph above or below it instead of joining the directive's source line.

  • In the rendered view, Backspace past a block leaf directive or Delete in front of one removes the whole directive (one undo step); the key aimed away from it moves the caret over it and deletes nothing, where both used to delete one byte of its markup.

  • In djot, typing in front of a block picture or directive that has a {...} attribute line now opens the paragraph above the attribute line, and deleting the block removes that line with it.

  • LeafFFI/LeafUI now require macOS 13; an app targeting macOS 12 no longer resolves the package.


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

v0.4.11

Choose a tag to compare

@adammharris adammharris released this 30 Sep 17:24
v0.4.11

Added

  • leaf-core — replace the source under an open editor, keeping the caret (fa015d2)

Fixed

  • leaf-swift — never answer a line walk with a range that ends where it began (55c5370)

Behavioural changes

  • LeafTextView's tokenizer returns nil for rangeEnclosingPosition(_:with: .line, inDirection:) at the end of the document reading forward and at its start reading backward, and at any other line edge returns the adjacent line in the reading direction instead of the line the position ends or starts.

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

v0.4.10

Choose a tag to compare

@adammharris adammharris released this 30 Sep 05:42
v0.4.10

Added

  • leaf-core — mark the source a slow write read as saved, not the buffer (9c3d2e4)

Fixed

  • leaf-swift — focus a pushed editor once it lands, and never stretch its text mid-animation (eb7e7c2)

Behavioural changes

  • on iOS, LeafEditor takes focus (and raises the keyboard) when its controller appears, after any push or column slide that brings it, rather than one run-loop turn after it is built. The text view's contents are pinned top-left instead of scaled while its bounds animate.

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

v0.4.9

Choose a tag to compare

@adammharris adammharris released this 29 Sep 15:51
v0.4.9

Added

  • leaf-android — follow a link from the editor, and take focus on request (7fcea51)
  • leaf-android — land on the place a link names (dc91c86)
  • leaf-android — a block image draws its picture (918a4f1)

Fixed

  • leaf-android — the text menu leaves with the editor (dc96a4b)

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

v0.4.8

Choose a tag to compare

@adammharris adammharris released this 28 Sep 22:22
v0.4.8

Fixed

  • leaf-swift — a link peek whose view has left its window shows nothing, not an exception (84a6dca)
  • leaf-swift — a footnote peek is not re-raised under a reader who has moved into it (991a574)

Behavioural changes

  • on macOS, a link or citation peek whose anchor view is no longer in a window when the host answers onPeekLink shows nothing, where NSPopover raised NSInvalidArgumentException (which AppKit logged and swallowed); a citation's peek that arrives after its footnote peek was re-raised is dropped instead of anchored to the old note.

  • on macOS, moving the pointer from a footnote reference into its peek no longer rebuilds the peek a moment later, and a rest over a link or reference the pointer only crossed on the way no longer raises a peek.


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

v0.4.7

Choose a tag to compare

@adammharris adammharris released this 26 Sep 18:15
v0.4.7

Breaking

  • deps — uniffi 0.32, and the Kotlin binding as UniFFI writes it (18128dc)

Added

  • leaf-android — a Jetpack Compose editor and app over the UniFFI binding (11f7e09)

Behavioural changes

  • in Kotlin, LeafException.Parse and LeafException.Math
    carry their text as reason, and their message is UniFFI's
    reason=… summary rather than the bare text. Swift keeps message.

  • the generated Swift objects are handle-based —
    init(unsafeFromHandle:), NoHandle, uniffiCloneHandle() replace the
    raw-pointer spellings — and protocols and records conform to Sendable.


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

v0.4.6

Choose a tag to compare

@adammharris adammharris released this 24 Sep 19:20
v0.4.6

Added

  • leaf-ffi — DocView says whether the caret stands in a block quote (9885d0d)
  • leaf-swift — a shorter iOS row, and Block Quote as a toggle over the style (dadce90)

Fixed

  • leaf-core — a code block in a list item wears one marker, and a quoted fence draws no row (f2d1c91)
  • a list item's later rows line up under its first, and a code block's tint starts past the bullet (2e27114)
  • leaf-core — Code Block toggles inside a list item, on twig 3.11.0 (3c736fc)

Behavioural changes

  • the Swift DocView memberwise initializer takes a new blockquote: argument between codeBlock: and task:, so a host building a DocView by hand must pass it.

  • LeafFormattingToolbar's iOS accessory row no longer shows Underline or Checklist.

  • the Style key reads “H1 / “Body / “Code (an opening quote mark in front) with the caret inside a block quote, where it read the bare name.

  • Block Quote in the Style menu and the Format menu is a toggle, ticked inside a quote, and disabled where the format has no block quote, where it was an always-enabled plain command.

  • the visual map draws a fenced code block inside a list item with the item's marker on its first row only and the item's indent on the rest, where every row carried the marker.

  • the visual map draws no row for the closing fence of a code block inside a block quote, where it drew an empty gutter row; > lines the writer added under the fence still draw.

  • the visual map's glyphs for a list item's or footnote definition's later-row indent are the marker's characters (•, 1., ☐, [1]) with Role::ListIndent, where they were spaces with Role::Body; a frontend drawing Glyph::ch must draw Glyph::drawn instead or show the marker on every row.

  • leaf-ffi and leaf-wasm runs carry the role string "list-indent" for that indent, where they carried the body role.

  • LeafUI draws a code block's background from the end of the row's prefix (past a list marker or quote gutter), where it filled from the margin, and a code row's list marker is 4pt wider.

  • Doc::toggle_code_block inside a Markdown or Djot list item fences the item's block at its content column (- item becomes "- \n item\n \n") and unfences it back, where it left the source unchanged and set a "code block:" status.


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