Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Leafdown uses lightweight [Keep a Changelog](https://keepachangelog.com/en/1.1.0

### Changed

- Edit standalone images and links whose complete label is one image through the same in-document Markdown source projection as other inline objects. The projected source appears in a regular one-line lane immediately before the still-rendered image, distinguishes pointer entry from directional keyboard entry, exits cleanly past either source edge, shares document selection, clipboard, history, and dirty-state behavior, reads edited description Markdown through the parser, and keeps the authored target when a rendered image is moved. Unavailable-image placeholders stay one line tall and leave their target path to the source projection.
- Keep local SVG images visible in rendered Markdown, and give tiny or transparent images a non-collapsing editor surface so they can still be selected without enlarging their authored pixels.
- Rebuild the welcome screen as a launcher. `New document` joins `Open file` and `Open folder`, so the fastest way to start writing is no longer the least visible one, and each of the three names its keyboard shortcut the way the menus do. A recent item is listed by its own name with the folder holding it beside it, where the row used to be the full path cut off at the end, which is where the file name is. The recent lists stay away entirely until there is a recent item to list. `Clear recent items` is a small action under the lists it clears instead of a full-size button in the row beside `Open file`.
- Show the article navigator only while a folder context is open. Without one it had nothing to list and stood beside the welcome screen repeating what that screen already said, so the document surface now spans the workspace instead. `Toggle sidebar` is unavailable until a folder opens, in the View menu and in the titlebar alike, and leaves the sidebar visibility setting as it found it, so a sidebar hidden before one folder closed is still hidden when the next one opens.
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ A restructure reads canonical content, so it finalizes an active projection befo

A change that reaches the projected range without passing through the engine's edit path is an unauthored write; composition input is the path that produces one. The engine keeps an unauthored write out of native history, where it would replay against coordinates the commit discards, and otherwise treats it as the content change it is: the document becomes dirty and projection-local history can step back over it.

Object adapters own target discovery, source generation, validation, rehydration, presentation spans, and selection mapping. Ownership precedence is logical link, qualifying marked fragment, standalone footnote reference, preserved character reference, then escaped literal run. Adapters that cannot preserve a semantic mapping fall back to literal text.
Object adapters own target discovery, source generation, validation, rehydration, presentation spans, and selection mapping. Ownership precedence is logical link, qualifying marked fragment, standalone image, standalone footnote reference, preserved character reference, then escaped literal run. Adapters that cannot preserve a semantic mapping fall back to literal text.

A boundary adapter is asked before that precedence and claims only a caret two objects meet on, finding each side by putting the same precedence to a position inside it, on a state carrying no plugins so the probe cannot project what it is reading. Its target is the run the pair spells, and it commits by reading that run as the file would rather than by committing each side on its own, because the position the two meet on belongs to neither: a character written there would otherwise have to join one object, which would stop that object spelling itself and discard it. Reading the run whole also decides the seam without a rule of its own, since the file already says what the characters between two objects mean. Where one object owns the caret outright, precedence answers as it did.

An adapter may declare that its session is finished while the caret is still inside it, rather than on the caret leaving. The commit is dispatched on its own rather than appended to the edit that completed it, because native history drops a transaction appended to one that opted out of it and a projected edit always opts out. What the commit produces then projects in the session's place, so the caret keeps its position.

The escape adapter owns no object of its own. Its target is a run of literal text the object adapters can convert, its source is what the serializer writes for that run on its own, and its commit is the object the edited run spells, so it reads the same validation the object adapters already own rather than repeating it. Its targets carry no mark, which is where the object adapters find theirs, so precedence between them never has to be resolved.

Marker presentation remains separate from projection lifecycle. Decorations style active source, while projected Markdown remains document text rather than widget or NodeView input state.
Marker presentation remains separate from projection lifecycle. Decorations style active source, while projected Markdown remains document text rather than widget or NodeView input state. A standalone image, or a logical link whose complete label is one image, inserts its source immediately before the original image node rather than replacing it for the duration of the session. The projected text remains the session's editable range, while the retained image stays outside that range and keeps its NodeView and decoded media. Pointer entry is carried through any restore and commit transactions separately from directional keyboard entry, so clicking can target the alt text without turning keyboard traversal over the retained node into another entry. Finalization removes the temporary source and, for an edit, replaces the retained original with the parsed result through the same two-phase history path used by other projections. Links with mixed or multiple label nodes keep the ordinary source-only link projection because their semantic target is the complete label rather than one retained image.

## Backend Responsibilities

Expand Down
Loading