Compare commits

...
Author SHA1 Message Date
Martin BallandClaude Opus 5.5 4622fef6ce Repin craft-libs to 5299d8d9 (windowless root support, IconPicker previews, CellGrid fix) (#8699)
* Repin craft-libs to 5299d8d9 (windowless root support, IconPicker previews, CellGrid fix)

craft-libs d73e274a -> 5299d8d9 (every craft-libs rev, craft-nightly and the
patches), egui 07c20531 -> 399fc6e0, winit 0dfcec0e -> 3fd7ae64, the revs
craft-libs main builds with. Cargo.lock updated for those packages only.

Adapt to the hosted unsaved-changes question: the dialog host takes
HostedUnsavedChangesDialog, not UnsavedChangesDialog.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FypgCWNarDG3QfXK2YMzdx

* fix(comments): selecting a comment card no longer opens its message for edit

craft-libs now hides a card's Reply button and reply box while one of its
messages is in the editor. focus_balloon opened the lead message's edit on
every selection, so Reply was never reachable. As in Word, selecting a card
selects it and its anchor; editing starts on a double click in a message or
the message menu's Edit, and Reply stays available.

Tests that typed straight after clicking a balloon now open the edit as the
card's Edit does (click_balloon); the reply test only selects the card.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FypgCWNarDG3QfXK2YMzdx

* fix(comments): a double click on the selected comment card opens its edit

Selecting a card no longer opens its message for edit (that hid Reply), so
craft-libs' CommentBalloons left no way to start an edit. A double click on
the selected card's own text now opens message 0 for editing, as in the
comments pane. Keyboard path (Enter/F2) is not added here.

Tests open the edit with that double click instead of setting state.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FypgCWNarDG3QfXK2YMzdx

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-12-03 22:27:58 +00:00
autocraft-bot[bot] af4cacc45f Merge pull request #8637 2026-12-03 19:02:47 +00:00
autocraft-bot[bot] 8d75a12b48 Merge pull request #4207 2026-12-03 19:02:47 +00:00
autocraft-bot[bot] ba179cb3d1 Merge pull request #8643 2026-12-03 19:02:47 +00:00
autocraft-bot[bot] 6d27b1a4a1 Merge pull request #8644 2026-12-03 19:02:47 +00:00
autocraft-bot[bot] faf55fad76 Merge pull request #8629 2026-12-03 19:02:47 +00:00
autocraft-bot[bot] 6d2f0d7759 All three failing checks (ubuntu gate, Windows and macOS Print) fail on
All three failing checks (ubuntu gate, Windows and macOS Print) fail on one test, the_autosave_knob_sits_right_when_on_and_mirrors_right_to_left (chrome/tests.rs:812). Cause: the test sets session.path and autosave_path to fake a file saved here, then toggles file.autosave on, off and on again. Turning it off clears autosave_path, and turning it on again needs the file to count as read from disk (read_from == session.path, per autosave_switch_block). The test never set read_from, so the second 'on' returned the NotSavedHere refusal. A real save sets both fields (note_file_on_disk), so the test setup was wrong, not the code. Fix: the test now also sets a.read_from = Some(path); its assertions are unchanged. The failing test passes in the pod, cargo fmt --check is clean, and clippy on wordcraft-ui-egui --all-targets is clean apart from an existing unused-dependency warning (egui_extras). I did not run the full suite.
2026-12-03 18:36:52 +00:00
yoriswind 95388461a7 Layout: import Pos in the grid kerning regression 2026-12-03 10:18:59 -08:00
batistalucasv 53b22e61f2 Layout: anchor space-before Top-and-Bottom band to first line's original top 2026-12-03 15:10:13 -03:00
batistalucasv f641b83a2f layout: filter Top-and-Bottom exclusions by applied space before 2026-12-03 15:08:49 -03:00
yoriswind 9964e4e88c Layout: fit kerned characters into exact grid cells 2026-12-03 09:58:16 -08:00
batistalucasv 54cf516adf Fields: CREATEDATE inserted into an opened file without a creation date shows today (#8612)
Fixes #8612. When update_fields_in evaluates CREATEDATE for an opened file whose creation date is empty or unreadable, it now preserves only non-empty cached results and formats today's date when the field's result is empty (such as right after insert.field).
2026-12-03 14:44:57 -03:00
autocraft-bot[bot] a6d1534889 Part 1: the Outline view fuzz in outline_level_changes_are_undoable (c
Part 1: the Outline view fuzz in `outline_level_changes_are_undoable` (crates/engine/src/tests.rs) now keeps the `Session::run` result instead of discarding it. It builds the registry once and asserts `!caught_panic(&reg, &r)`, with the command id, the junk input and the result in the failure message. The message format matches the one in `hostile_params_never_panic`. `cargo fmt --check` and `cargo clippy` on `wordcraft-engine` are clean. `outline_level_changes_are_undoable` and `caught_panic_flags_a_command_that_panics` both pass. I did not run the full engine test suite.
2026-12-03 05:35:02 +00:00
FredApps 869160692f Merge origin/main into fix/fuzz-panics-autosave 2026-11-28 10:16:45 +07:00
VoiceLessQ 3b73a84082 AutoSave: the switch shows a document opened from bytes as blocked
The title bar lifted NotSavedHere whatever read_from said, while set_autosave refused unless the document was read from its path, so the switch of a document opened from bytes looked available and a click did nothing. Both now use autosave_switch_block: the switch shows the block and offers Save As. file.autosave also puts a refusal on the status line, as other commands do, instead of returning early without it.
2026-11-03 17:51:02 -02:00
VoiceLessQ 1603a5f34f AutoSave: only an open that read a file records it
file.open with a null path only asks for the Open picker, and its
result has no alreadyOpen, so the check recorded the shown document's
path as read from disk: a document opened from bytes then passed the
AutoSave switch's check. The path must now be a string and alreadyOpen
false. A data value that isn't a string is ignored by the engine,
which reads the file from disk, so it no longer clears the record.
2026-10-29 16:25:01 -02:00
VoiceLessQ d5239891f6 AutoSave: switching it off holds for that document
The AutoSave preference is shared by all documents, but each keeps its
own go-ahead (the file it may write). Switching AutoSave off cleared
only the preference, so turning it on in another document brought it
back for the first one too, which then wrote its file with its switch
showing off. Switching off now also withdraws the document's go-ahead.
Turning it back on covers the same file again without a save, since
the document was read from or saved to it.
2026-10-29 15:30:43 -02:00
VoiceLessQ 9c7ec843b6 AutoSave: the switch covers only a file the document was read from
file.open with data only names the file (the bytes come with the call),
but the name becomes the document's path, and since #3307 the AutoSave
switch gave the go-ahead to write it. A control-channel caller could
open any bytes under the name of an existing .docx, and turning AutoSave
on then wrote over that file. The window now notes, per document, the
file it was read from or saved to, and the switch's go-ahead needs the
path to be that file. A document opened from bytes still gets AutoSave
after an explicit save.
2026-10-29 15:30:34 -02:00
VoiceLessQ 777fedb14a Engine tests: the fuzz also fails on a panic in a command another ran
Review of #4207. Commands run other commands through Session::run
(outline.promote runs para.promote), and the inner guard names the inner
command: "para.promote panicked: ...". run_junk only looked for the
fuzzed command's own id, so such a panic passed. caught_panic now takes
any registered command's id before " panicked: "; an error that only
echoes those words (developer.control quoting its input) still doesn't
count.
2026-10-29 14:23:50 -02:00
VoiceLessQ 02de1488cb Merge origin/main 2026-10-29 14:21:19 -02:00
VoiceLessQ 9c05751014 Merge origin/main
Main split lib.rs and chrome.rs, so the AutoSave changes now live in app/files.rs, state.rs, tests.rs and chrome/tests.rs.
2026-10-27 16:39:42 -02:00
VoiceLessQ 6d51d93bb6 AutoSave: a value that isn't true or false is an error (#3307)
`file.autosave` read `value` with as_bool and toggled when that gave nothing. Since the switch can now turn AutoSave on for a file only opened here, `{"value":"false"}` on such a file turned it on and gave AutoSave the go-ahead to rewrite it. A missing value still toggles; anything other than a bool is now refused, the way the focus ribbon and other ui commands already do it. Found in review.

Test: turning_autosave_on_covers_a_file_only_opened_here sends "false" as a string and checks AutoSave stays off; it fails with the old parsing.
2026-10-24 21:28:50 -01:00
VoiceLessQ fe69231544 AutoSave: the switch turns it on for a file you opened (#3307)
Opening a saved .docx greyed the AutoSave switch out. Clicking it asked
for Save As, so a file you work on every day needed a save before each
session's AutoSave would cover it.

The rule behind it stays. #151 stopped AutoSave from rewriting a file
that was only opened, because a save drops what the readers don't model
(content controls, charts, SmartArt), and that loss should follow the
user's own choice. Clicking the switch is such a choice.

So a file opened in this window now shows the switch off, not greyed
out, and clicking it (or file.autosave from a script) turns AutoSave on
for that file. Opening alone never rewrites anything. The browser and
lossy-format blocks are unchanged.

Tests: turning_autosave_on_covers_a_file_only_opened_here (open, type,
nothing written; switch on, file written) and
clicking_autosave_on_an_opened_file_turns_it_on (the real title bar,
no Save As). Dropping the go-ahead in set_autosave fails both; keeping
the switch greyed fails the second.
2026-10-24 21:00:37 -01:00
VoiceLessQ dd20b23d4d Engine tests: the command fuzz fails on a panic Session::run caught
hostile_params_never_panic runs every command with junk parameters, but
it threw the result away. Session::run turns a panic inside a command
into Err(Failed("<id> panicked: ...")) and restores the document, so a
command that panicked on junk passed the test: the one check the
never-crash rule points to could not see the panics it exists for. The
Outline view fuzz in outline_level_changes_are_undoable had the same gap.

Both now go through run_junk, which fails on that error. Today no command
panics there (611 commands, 8 junk inputs each), so nothing else changes.

Tests: making edit.repeat panic on null params fails the fuzz with
"edit.repeat panicked: mutation"; before this change the same mutation
passed.
2026-10-24 21:00:37 -01:00
25 changed files with 703 additions and 256 deletions
Generated
+112 -126
View File
@@ -1173,7 +1173,7 @@ dependencies = [
[[package]]
name = "craft"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-automation",
"craft-behavior",
@@ -1214,7 +1214,7 @@ dependencies = [
[[package]]
name = "craft-appkit"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"block2 0.6.2",
"objc2 0.6.5",
@@ -1226,7 +1226,7 @@ dependencies = [
[[package]]
name = "craft-atomic"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"rustix 1.1.6",
]
@@ -1234,7 +1234,7 @@ dependencies = [
[[package]]
name = "craft-automation"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"base64 0.23.1",
"craft-behavior",
@@ -1259,7 +1259,7 @@ dependencies = [
[[package]]
name = "craft-behavior"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"accesskit",
"bitflags 2.13.2",
@@ -1277,7 +1277,7 @@ dependencies = [
[[package]]
name = "craft-browse"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-docpath",
@@ -1295,12 +1295,12 @@ dependencies = [
[[package]]
name = "craft-cfb"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
[[package]]
name = "craft-cloud-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"egui",
]
@@ -1308,7 +1308,7 @@ dependencies = [
[[package]]
name = "craft-cms"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"md-5",
"rayon",
@@ -1317,12 +1317,12 @@ dependencies = [
[[package]]
name = "craft-codepage"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
[[package]]
name = "craft-color"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"serde",
]
@@ -1330,7 +1330,7 @@ dependencies = [
[[package]]
name = "craft-color-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-cms",
@@ -1350,7 +1350,7 @@ dependencies = [
[[package]]
name = "craft-control"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-control-protocol",
"craft-platform",
@@ -1361,7 +1361,7 @@ dependencies = [
[[package]]
name = "craft-control-protocol"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"getrandom 0.3.4",
"serde_json",
@@ -1371,7 +1371,7 @@ dependencies = [
[[package]]
name = "craft-dds"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"rayon",
]
@@ -1379,7 +1379,7 @@ dependencies = [
[[package]]
name = "craft-dialogs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"block2 0.6.2",
"craft-appkit",
@@ -1405,24 +1405,24 @@ dependencies = [
[[package]]
name = "craft-doc-binary"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"chrono",
"craft-cfb",
"craft-codepage",
"craft-offcrypto",
"craft-wordmodel",
"image",
"log",
"md4",
"miniz_oxide 0.9.1",
"sha1 0.11.0",
"thiserror 2.0.21",
]
[[package]]
name = "craft-docpath"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"serde",
]
@@ -1430,7 +1430,7 @@ dependencies = [
[[package]]
name = "craft-docx"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"base64 0.23.1",
"chrono",
@@ -1450,7 +1450,7 @@ dependencies = [
[[package]]
name = "craft-draw"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-color-ui",
@@ -1469,7 +1469,7 @@ dependencies = [
[[package]]
name = "craft-drawingml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"chrono",
"craft-xml",
@@ -1481,7 +1481,7 @@ dependencies = [
[[package]]
name = "craft-flow"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-wordmodel",
"image",
@@ -1491,7 +1491,7 @@ dependencies = [
[[package]]
name = "craft-font-catalog"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"fontique",
"harfrust 0.13.3",
@@ -1506,7 +1506,7 @@ dependencies = [
[[package]]
name = "craft-font-manager"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-font-catalog",
@@ -1525,7 +1525,7 @@ dependencies = [
[[package]]
name = "craft-font-os-windows"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"windows-registry",
"windows-sys 0.61.2",
@@ -1534,7 +1534,7 @@ dependencies = [
[[package]]
name = "craft-font-store"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"cap-primitives",
"craft-atomic",
@@ -1557,7 +1557,7 @@ dependencies = [
[[package]]
name = "craft-font-subset"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"brotli 9.1.3",
"harfbuzz-subset-sys",
@@ -1570,7 +1570,7 @@ dependencies = [
[[package]]
name = "craft-fonts-build"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-font-subset",
]
@@ -1578,7 +1578,7 @@ dependencies = [
[[package]]
name = "craft-gpu"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"egui-wgpu",
"log",
@@ -1590,7 +1590,7 @@ dependencies = [
[[package]]
name = "craft-host"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"bitflags 2.13.2",
"craft-i18n",
@@ -1603,7 +1603,7 @@ dependencies = [
[[package]]
name = "craft-html"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-codepage",
"craft-flow",
@@ -1616,7 +1616,7 @@ dependencies = [
[[package]]
name = "craft-i18n"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"brotli 9.1.3",
"brotli-decompressor 6.3.1",
@@ -1646,7 +1646,7 @@ dependencies = [
[[package]]
name = "craft-image-codecs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-dds",
"craft-jpeg",
@@ -1673,7 +1673,7 @@ dependencies = [
[[package]]
name = "craft-imaging"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-color-ui",
@@ -1691,7 +1691,7 @@ dependencies = [
[[package]]
name = "craft-jpeg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"thiserror 2.0.21",
]
@@ -1699,7 +1699,7 @@ dependencies = [
[[package]]
name = "craft-keymap"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-host",
"craft-i18n",
@@ -1714,7 +1714,7 @@ dependencies = [
[[package]]
name = "craft-latex"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-flow",
"craft-math",
@@ -1725,7 +1725,7 @@ dependencies = [
[[package]]
name = "craft-markdown"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-flow",
"craft-html",
@@ -1735,7 +1735,7 @@ dependencies = [
[[package]]
name = "craft-math"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-xml",
"roxmltree",
@@ -1745,7 +1745,7 @@ dependencies = [
[[package]]
name = "craft-mcp-server"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"serde_json",
]
@@ -1753,7 +1753,7 @@ dependencies = [
[[package]]
name = "craft-menu"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-host",
@@ -1771,7 +1771,7 @@ dependencies = [
[[package]]
name = "craft-metadata"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"brotli-decompressor 6.3.1",
"chrono",
@@ -1783,7 +1783,7 @@ dependencies = [
[[package]]
name = "craft-metafile"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"encoding_rs",
"image",
@@ -1794,7 +1794,7 @@ dependencies = [
[[package]]
name = "craft-mime"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"chardetng",
"chrono",
@@ -1805,7 +1805,7 @@ dependencies = [
[[package]]
name = "craft-nightly"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"uds_windows",
"winsafe",
@@ -1814,7 +1814,7 @@ dependencies = [
[[package]]
name = "craft-odf"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"aes",
"base64 0.23.1",
@@ -1840,7 +1840,7 @@ dependencies = [
[[package]]
name = "craft-ods"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-odf",
"craft-sheet",
@@ -1851,7 +1851,7 @@ dependencies = [
[[package]]
name = "craft-offcrypto"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"aes",
"base64 0.23.1",
@@ -1868,7 +1868,7 @@ dependencies = [
[[package]]
name = "craft-opc"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-xml",
"craft-zip",
@@ -1879,7 +1879,7 @@ dependencies = [
[[package]]
name = "craft-pages"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -1895,7 +1895,7 @@ dependencies = [
[[package]]
name = "craft-pdf"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"krilla",
"serde",
@@ -1905,7 +1905,7 @@ dependencies = [
[[package]]
name = "craft-platform"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"arboard",
"async-channel",
@@ -1943,7 +1943,7 @@ dependencies = [
[[package]]
name = "craft-print"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-host",
@@ -1967,7 +1967,7 @@ dependencies = [
[[package]]
name = "craft-proof"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"log",
"miniz_oxide 0.9.1",
@@ -1978,7 +1978,7 @@ dependencies = [
[[package]]
name = "craft-quit"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"dispatch2",
"egui",
@@ -1991,7 +1991,7 @@ dependencies = [
[[package]]
name = "craft-review"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"base64 0.23.1",
"craft-behavior",
@@ -2010,7 +2010,7 @@ dependencies = [
[[package]]
name = "craft-rtf"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-codepage",
"craft-flow",
@@ -2023,7 +2023,7 @@ dependencies = [
[[package]]
name = "craft-settings"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-atomic",
"craft-host",
@@ -2040,17 +2040,17 @@ dependencies = [
[[package]]
name = "craft-sheet"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
[[package]]
name = "craft-ssip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
[[package]]
name = "craft-svg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-xml",
"flate2",
@@ -2067,7 +2067,7 @@ dependencies = [
[[package]]
name = "craft-table"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -2079,7 +2079,7 @@ dependencies = [
[[package]]
name = "craft-text"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2103,7 +2103,7 @@ dependencies = [
[[package]]
name = "craft-theme"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"bitflags 2.13.2",
"craft-tracked",
@@ -2118,7 +2118,7 @@ dependencies = [
[[package]]
name = "craft-theme-store"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-atomic",
"craft-behavior",
@@ -2133,7 +2133,7 @@ dependencies = [
[[package]]
name = "craft-tiff"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"serde",
"thiserror 2.0.21",
@@ -2143,7 +2143,7 @@ dependencies = [
[[package]]
name = "craft-time"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"serde",
"thiserror 2.0.21",
@@ -2152,7 +2152,7 @@ dependencies = [
[[package]]
name = "craft-timeline"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -2167,12 +2167,12 @@ dependencies = [
[[package]]
name = "craft-tracked"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
[[package]]
name = "craft-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-cloud-ui",
"craft-ui-canvas",
@@ -2186,7 +2186,7 @@ dependencies = [
[[package]]
name = "craft-ui-canvas"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-font-catalog",
@@ -2203,7 +2203,7 @@ dependencies = [
[[package]]
name = "craft-ui-contract"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"accesskit",
"craft-behavior",
@@ -2241,7 +2241,7 @@ dependencies = [
[[package]]
name = "craft-ui-macros"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -2252,7 +2252,7 @@ dependencies = [
[[package]]
name = "craft-ui-panels"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2270,7 +2270,7 @@ dependencies = [
[[package]]
name = "craft-ui-patterns"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2291,7 +2291,7 @@ dependencies = [
[[package]]
name = "craft-ui-shell"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2312,7 +2312,7 @@ dependencies = [
[[package]]
name = "craft-ui-test-kit"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2323,7 +2323,7 @@ dependencies = [
[[package]]
name = "craft-ui-widgets"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2342,7 +2342,7 @@ dependencies = [
[[package]]
name = "craft-update"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"base64 0.22.1",
"chrono",
@@ -2374,7 +2374,7 @@ dependencies = [
[[package]]
name = "craft-web-api"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"js-sys",
"serde_json",
@@ -2385,7 +2385,7 @@ dependencies = [
[[package]]
name = "craft-web-host"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-host",
"craft-platform",
@@ -2397,7 +2397,7 @@ dependencies = [
[[package]]
name = "craft-win32"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"winsafe",
]
@@ -2405,7 +2405,7 @@ dependencies = [
[[package]]
name = "craft-window"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-appkit",
"craft-atomic",
@@ -2437,7 +2437,7 @@ dependencies = [
[[package]]
name = "craft-wordmodel"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"base64 0.23.1",
"craft-math",
@@ -2451,7 +2451,7 @@ dependencies = [
[[package]]
name = "craft-xls"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-cfb",
"craft-sheet",
@@ -2464,7 +2464,7 @@ dependencies = [
[[package]]
name = "craft-xlsx"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"craft-drawingml",
"craft-opc",
@@ -2476,7 +2476,7 @@ dependencies = [
[[package]]
name = "craft-xml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"quick-xml 0.41.0",
"serde",
@@ -2486,7 +2486,7 @@ dependencies = [
[[package]]
name = "craft-zip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"flate2",
"thiserror 2.0.21",
@@ -2842,7 +2842,7 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]]
name = "ecolor"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
dependencies = [
"bytemuck",
"emath",
@@ -2875,7 +2875,7 @@ dependencies = [
[[package]]
name = "eframe"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
dependencies = [
"ahash",
"bytemuck",
@@ -2910,7 +2910,7 @@ dependencies = [
[[package]]
name = "egui"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
dependencies = [
"accesskit",
"ahash",
@@ -2929,7 +2929,7 @@ dependencies = [
[[package]]
name = "egui-wgpu"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
dependencies = [
"ahash",
"bytemuck",
@@ -2948,7 +2948,7 @@ dependencies = [
[[package]]
name = "egui-winit"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
dependencies = [
"accesskit_winit",
"arboard",
@@ -2974,7 +2974,7 @@ dependencies = [
[[package]]
name = "egui_extras"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
dependencies = [
"ahash",
"egui",
@@ -2987,7 +2987,7 @@ dependencies = [
[[package]]
name = "egui_glow"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
dependencies = [
"bytemuck",
"egui",
@@ -3000,7 +3000,7 @@ dependencies = [
[[package]]
name = "egui_kittest"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
dependencies = [
"dify",
"eframe",
@@ -3026,7 +3026,7 @@ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
[[package]]
name = "emath"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
dependencies = [
"bytemuck",
]
@@ -3107,7 +3107,7 @@ dependencies = [
[[package]]
name = "epaint"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
dependencies = [
"ahash",
"bytemuck",
@@ -3133,7 +3133,7 @@ dependencies = [
[[package]]
name = "epaint_default_fonts"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
dependencies = [
"brotli 9.1.3",
"brotli-decompressor 6.3.1",
@@ -3866,7 +3866,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a"
[[package]]
name = "hayro-cmap"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"brotli 8.0.4",
"hayro-postscript",
@@ -3875,7 +3875,7 @@ dependencies = [
[[package]]
name = "hayro-interpret"
version = "0.7.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"bitflags 2.13.2",
"hayro-cmap",
@@ -3893,7 +3893,7 @@ dependencies = [
[[package]]
name = "hayro-jbig2"
version = "0.3.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"fearless_simd",
"hayro-ccitt",
@@ -3911,12 +3911,12 @@ dependencies = [
[[package]]
name = "hayro-postscript"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
[[package]]
name = "hayro-syntax"
version = "0.7.2"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"flate2",
"hayro-ccitt",
@@ -4645,7 +4645,7 @@ dependencies = [
[[package]]
name = "krilla"
version = "0.8.2"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"base64 0.22.1",
"bumpalo",
@@ -4784,7 +4784,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4"
[[package]]
name = "linesweeper"
version = "0.5.0"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"arrayvec",
"kurbo",
@@ -8454,19 +8454,6 @@ dependencies = [
"wayland-scanner",
]
[[package]]
name = "wayland-protocols-plasma"
version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91"
dependencies = [
"bitflags 2.13.2",
"wayland-backend",
"wayland-client",
"wayland-protocols",
"wayland-scanner",
]
[[package]]
name = "wayland-protocols-wlr"
version = "0.3.12"
@@ -8991,7 +8978,7 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winit"
version = "0.30.13"
source = "git+https://github.com/storytold/winit.git?rev=0dfcec0eb62fda5904137a63a6dd0c3d83295f45#0dfcec0eb62fda5904137a63a6dd0c3d83295f45"
source = "git+https://github.com/storytold/winit.git?rev=3fd7ae64762f82a73b78bd24f453f82c4291067d#3fd7ae64762f82a73b78bd24f453f82c4291067d"
dependencies = [
"ahash",
"android-activity",
@@ -9030,7 +9017,6 @@ dependencies = [
"wayland-backend",
"wayland-client",
"wayland-protocols",
"wayland-protocols-plasma",
"web-sys",
"web-time",
"windows-sys 0.52.0",
@@ -10051,19 +10037,19 @@ dependencies = [
[[patch.unused]]
name = "egui_demo_lib"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
[[patch.unused]]
name = "egui_inspection"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
[[patch.unused]]
name = "egui_system_font_provider"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
[[patch.unused]]
name = "hayro"
version = "0.7.1"
source = "git+https://github.com/storytold/craft-libs?rev=d73e274a01408ef433a291a667e6014937d72165#d73e274a01408ef433a291a667e6014937d72165"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
+54 -54
View File
@@ -37,22 +37,22 @@ wordcraft-pdf = { path = "crates/pdf" }
# reads the ca-valencia pack), #589 (French elision suggestions first), #497 (flag-based
# compounding), #496 (review follow-ups, en-AU) and the merged #482–#490/#495 stack; the font
# store's `language-pack` kind is #486 (CP4.1).
wordcraft-proof = { package = "craft-proof", git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-ssip = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
wordcraft-proof = { package = "craft-proof", git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-ssip = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
wordcraft-engine = { path = "crates/engine" }
wordcraft-mcp = { path = "crates/mcp" }
wordcraft-zotero = { path = "crates/zotero" }
wordcraft-control-key = { path = "crates/control-key" }
wordcraft-ui-egui = { path = "crates/ui-egui" }
wordcraft-validate = { path = "crates/validate" }
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0", default-features = false }
craft-ui-test-kit = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165" }
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0", default-features = false }
craft-ui-test-kit = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35" }
# foundation
kurbo = { version = "0.13", features = ["serde"] }
@@ -85,28 +85,28 @@ wuff = "0.2.9"
brotli-decompressor = "5"
vello_cpu = "0.2"
image = { version = "0.25", default-features = false }
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0", default-features = false, features = ["write"] }
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0", default-features = false, features = ["write"] }
craft-wordmodel = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-docx = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-mcp-server = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-rtf = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0", features = ["doc"] }
craft-doc-binary = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-flow = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-odf = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0", features = ["text"] }
craft-markdown = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-html = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0", features = ["flow"] }
craft-latex = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-math = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0", features = ["detect"] }
craft-sheet = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-ods = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-xls = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-xlsx = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-zip = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", version = "=0.1.0" }
craft-wordmodel = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-docx = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-mcp-server = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-rtf = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0", features = ["doc"] }
craft-doc-binary = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-flow = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-odf = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0", features = ["text"] }
craft-markdown = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-html = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0", features = ["flow"] }
craft-latex = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-math = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0", features = ["detect"] }
craft-sheet = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-ods = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-xls = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-xlsx = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
craft-zip = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", version = "=0.1.0" }
# zlib streams (compressed metafile pictures in `.doc` drawings); already in the lock as a dependency of other crates.
miniz_oxide = "0.9"
cfb = "0.15"
@@ -174,27 +174,27 @@ debug = 0
# The framework's patches, which Cargo does not carry over to dependents: its vendored crates from craft-libs,
# and the egui and winit forks it builds with.
[patch.crates-io]
krilla = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165" }
hayro = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165" }
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165" }
ecolor = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
emath = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
epaint = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui-winit = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui_glow = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui_extras = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui_system_font_provider = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
eframe = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui_demo_lib = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui_inspection = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
winit = { git = "https://github.com/storytold/winit.git", rev = "0dfcec0eb62fda5904137a63a6dd0c3d83295f45" }
krilla = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35" }
hayro = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35" }
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35" }
ecolor = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
emath = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
epaint = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
egui = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
egui-winit = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
egui_glow = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
egui_extras = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
egui_system_font_provider = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
eframe = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
egui_demo_lib = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
egui_inspection = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
winit = { git = "https://github.com/storytold/winit.git", rev = "3fd7ae64762f82a73b78bd24f453f82c4291067d" }
+9 -6
View File
@@ -402,7 +402,7 @@ pub fn update_fields_in(s: &mut Session, all: bool) -> Result<(), CmdError> {
}
let mut updates: Vec<(usize, String)> = Vec::new();
for (k, o) in p.objects.iter().enumerate() {
let InlineObject::Field { instr, locked: false, .. } = o else { continue };
let InlineObject::Field { instr, result, locked: false, .. } = o else { continue };
// A table formula reads the cells around its own cell again.
if instr.trim_start().starts_with('=') {
if let Some((tp, r, c)) = path.cell()
@@ -425,12 +425,15 @@ pub fn update_fields_in(s: &mut Session, all: bool) -> Result<(), CmdError> {
let created = s.doc.core.created.trim();
// CREATEDATE shows when the document was created (ECMA-376 §17.16.5.11). A new
// document, never saved, has no creation date yet and saving stamps now. A
// file opened without one, or with one that can't be read, keeps the result
// it has.
let text = if name != "CREATEDATE" || (created.is_empty() && s.path.is_none()) {
crate::cmd::insert::format_date_in(&pic, lang.as_deref())
} else if let Some((unix, offset)) = created_at(created) {
// file opened without one, or with one that can't be read, keeps any result
// it already has; when inserted with none, it shows today's date (the date
// a save would stamp).
let text = if name == "CREATEDATE"
&& let Some((unix, offset)) = created_at(created)
{
crate::cmd::insert::format_date_at_in(&pic, lang.as_deref(), unix, offset)
} else if name != "CREATEDATE" || result.is_empty() || (created.is_empty() && s.path.is_none()) {
crate::cmd::insert::format_date_in(&pic, lang.as_deref())
} else {
continue;
};
+20
View File
@@ -556,6 +556,26 @@ fn createdate_without_a_readable_creation_date() {
assert_eq!(fields(&s)[0].1, crate::cmd::insert::format_date("yyyy-MM"));
}
/// Inserting CREATEDATE into an opened file that has no creation date (plain text, Markdown, or a
/// DOCX without `dcterms:created`) shows today's date rather than an empty result, while an
/// existing field with a cached result keeps it.
#[test]
fn createdate_inserted_into_opened_file_without_creation_date() {
let mut s = Session::new(wordcraft_doc::Document::from_text("Notes"));
s.path = Some(std::env::temp_dir().join("notes.txt"));
s.doc.core.created.clear();
s.run("insert.field", &json!({"instr": r#"CREATEDATE \@ "yyyy-MM""#, "result": "2019-05"})).unwrap();
s.run("insert.field", &json!({"instr": r#"CREATEDATE \@ "yyyy-MM""#})).unwrap();
let expected = crate::cmd::insert::format_date("yyyy-MM");
let results: Vec<String> = fields(&s).into_iter().map(|f| f.1).collect();
assert_eq!(results, ["2019-05".to_string(), expected.clone()]);
// An unreadable creation date behaves the same way: cached results stay, empty ones fill in.
s.doc.core.created = "sometime in May".into();
s.run("insert.field", &json!({"instr": r#"CREATEDATE \@ "yyyy-MM""#})).unwrap();
let results: Vec<String> = fields(&s).into_iter().map(|f| f.1).collect();
assert_eq!(results, ["2019-05".to_string(), expected.clone(), expected]);
}
#[test]
fn toc_tabs_ignore_nonentries() {
let mut s = Session::new(wordcraft_doc::Document::from_text("Before\nContents\nOld\t9\nAfter"));
+4 -2
View File
@@ -12675,10 +12675,12 @@ fn outline_level_changes_are_undoable() {
assert!(s.run("outline.level", &json!({"level": 12})).is_err());
assert!(s.run("outline.level", &json!({})).is_err());
// Every outline command survives junk parameters in Outline view.
for spec in cmd::registry().all().iter().filter(|c| c.id.starts_with("outline.")) {
let reg = cmd::registry();
for spec in reg.all().iter().filter(|c| c.id.starts_with("outline.")) {
for j in [json!(null), json!({"block": 99999, "level": "x", "value": 5}), json!({"block": -1, "level": 0})] {
let mut s = outline_doc();
let _ = s.run(spec.id, &j);
let r = s.run(spec.id, &j);
assert!(!caught_panic(&reg, &r), "{} panicked on {j}: {r:?}", spec.id);
let _ = s.layout();
}
}
+1 -1
View File
@@ -363,7 +363,7 @@ pub(crate) fn layout_box(ctx: &mut Ctx, input: BoxInput<'_>) -> BoxLayout {
}
floats.insert(oi, r);
}
let rel = rel_exclusions(&excl, 0.0, y);
let rel = rel_exclusions(&excl, 0.0, y, applied);
if !rel.is_empty() {
pl = ctx.para_labelled(p, width, table, &rel, applied, label);
}
+11 -8
View File
@@ -219,8 +219,10 @@ pub(crate) fn wrap_area(r: Rect, float: &Float, outline: Option<&[(f32, f32)]>)
Some((Rect::new(r.x - side, r.y - top, r.w + side * 2.0, r.h + top + bottom), float.wrap == Wrap::TopAndBottom, None, float.wrap_text, false))
}
/// Wrap areas relative to a paragraph whose column starts at `x0` and whose top is `y0`.
pub(crate) fn rel_exclusions(excl: &[WrapArea], x0: f32, y0: f32) -> Vec<para::Exclusion> {
/// Wrap areas relative to a paragraph whose column starts at `x0` and whose top is `y0`, with
/// `space_before` the space before it that the flow laid out above it.
pub(crate) fn rel_exclusions(excl: &[WrapArea], x0: f32, y0: f32, space_before: f32) -> Vec<para::Exclusion> {
let before = if space_before > 0.0 { space_before } else { 0.0 };
excl.iter()
.map(|(r, tb, c, side, table)| para::Exclusion {
top: r.y - y0,
@@ -232,10 +234,11 @@ pub(crate) fn rel_exclusions(excl: &[WrapArea], x0: f32, y0: f32) -> Vec<para::E
side: *side,
table: *table,
})
// Top-and-Bottom areas above the first line can still take room: they sit in the
// paragraph's space before, which Word lays out again below them (#7143). Side-wrapping
// areas there are above the text and take no room, as before.
.filter(|e| e.bottom > 0.0 || e.top_bottom)
// Top-and-Bottom areas ending within the paragraph's applied space before can still take
// room, with that space laid out again below them (#7143). Any ending at or above it
// (like side-wrapping areas above the first line) cannot reach the paragraph and is
// dropped so paragraphs below keep empty exclusions and hit the cache (#8613).
.filter(|e| e.bottom > 0.0 || (e.top_bottom && e.bottom > -before))
.collect()
}
@@ -528,7 +531,7 @@ fn anchor_floats_but(
}
}
}
let rel = rel_exclusions(&body_wraps(ctx, pb), col_x, y0);
let rel = rel_exclusions(&body_wraps(ctx, pb), col_x, y0, before);
let pl = ctx.para_labelled(p, width, None, &rel, before, label.clone());
(rects, pl, rel)
}
@@ -864,7 +867,7 @@ pub(crate) fn place_objects(ctx: &mut Ctx, req: &ObjectPlacement) -> (Vec<Placed
/// touch its lines and are left out.
pub(crate) fn continued_exclusions(rel: &[para::Exclusion], excl: &[WrapArea], x0: f32, y: f32, t: f32, width: f32) -> Vec<para::Exclusion> {
let before = rel.iter().filter(|e| e.top < t).map(|e| para::Exclusion { bottom: e.bottom.min(t), ..e.clone() });
let here = rel_exclusions(excl, x0, y - t)
let here = rel_exclusions(excl, x0, y - t, 0.0)
.into_iter()
.filter(|e| e.bottom > t && e.right > -width && e.left < 2.0 * width)
.map(|e| if e.top < t && e.contour.is_none() { para::Exclusion { top: t, ..e } } else { e });
+2
View File
@@ -70,6 +70,8 @@ pub(super) fn snap_chars(b: &mut Builder, text: &str, grid: &Grid) {
g.dx += shift;
}
c.adv = adv;
// The snapped advance no longer includes the shaped kerning adjustment.
c.kern = 0.0;
}
}
+5 -5
View File
@@ -268,13 +268,13 @@ impl<'e> Breaker<'e> {
let lo = self.row_left(pl);
// A Top-and-Bottom object ending in the paragraph's space before (or reaching into
// its first line) is a block the first line must start below, with that space before
// laid out again under it (#7143). Exclusions are relative to the first line, so look
// `space_before` above it too: the space the flow actually laid out, so an object
// above a gap that collapsing, contextual spacing or a page top removed takes no
// room, while the part of a merged gap that was laid out still does.
// laid out again under it (#7143). Exclusions are relative to the first line's
// original top (0), so keep the band anchored there (`[-before, est_h]`) even after
// `row_spans` or `skip_row` moves `self.top` down past a side-wrapping object (#8614):
// only the space the flow actually laid out above 0 holds a space-before obstruction.
if self.first && self.space_before > 0.0 {
let before = self.space_before;
let row = (self.top - before, self.est_h + before, self.table_h);
let row = (-before, self.est_h + before, self.table_h);
if let Some(below) = self
.exclusions
.iter()
+142
View File
@@ -8896,6 +8896,73 @@ fn moved_kept_paragraph_lays_out_no_space_before_under_an_object_at_its_top() {
assert!((top - bottom).abs() < 0.01, "the first line {top} starts at the rule's bottom {bottom}, with no space before laid out above it");
}
/// #8614: when a side-wrapping object pushes the first line down before it is placed, the
/// space-before Top-and-Bottom band must stay anchored to the first line's original top (0), not
/// shift down with `self.top` into the paragraph's area and re-apply `space_before` below a
/// Top-and-Bottom object ending there.
#[test]
fn side_wrapping_push_does_not_shift_space_before_band_into_para_area() {
crate::test_fonts();
use wordcraft_doc::para::{Anchor, Float, Wrap};
use wordcraft_doc::props::LineSpacing;
const BEFORE: f32 = 12.0;
let build = |with_top_bottom: bool| {
let mut d = Document::from_text("Anchor line.\nProbe line with several words in it.");
for block in &mut d.body {
if let wordcraft_doc::Block::Para(p) = Arc::make_mut(block) {
p.props.space_before = Some(0.0);
p.props.space_after = Some(0.0);
p.props.line_spacing = Some(LineSpacing::Exactly(14.0));
}
}
if let Some(wordcraft_doc::Block::Para(p)) = d.body.get_mut(1).map(Arc::make_mut) {
p.props.space_before = Some(BEFORE);
}
let plain = lay(&d);
let top_of = |l: &DocLayout, block: u32| {
l.pages[0]
.items
.iter()
.find_map(|i| match i {
Placed::Lines { story: StoryRef::Body, path, y, .. } if path.0 == [block] => Some(*y),
_ => None,
})
.unwrap()
};
let anchor_y = top_of(&plain, 0);
let probe_y = top_of(&plain, 1);
// Full-width side-wrapping object starting at the probe's original top and extending 30 pt
// down, pushing the probe's first line to probe_y + 30.
let side = Float { wrap: Wrap::Square, h_rel: Anchor::Column, v_rel: Anchor::Paragraph, y: probe_y - anchor_y, ..Default::default() };
d.insert_object(&Pos::body(0, 0), rect_shape(500.0, 30.0, side), &Default::default()).unwrap();
if with_top_bottom {
// Top-and-Bottom object inside the side-wrapped vertical span (18..22 pt below probe_y),
// below the original first line [0, 14] and above the Square object's bottom (30).
let tb = Float {
wrap: Wrap::TopAndBottom,
h_rel: Anchor::Column,
v_rel: Anchor::Paragraph,
y: probe_y + 18.0 - anchor_y,
..Default::default()
};
d.insert_object(&Pos::body(0, 0), rect_shape(144.0, 4.0, tb), &Default::default()).unwrap();
}
let l = lay(&d);
top_of(&l, 1)
};
let plain_wrap_top = build(false);
let with_tb_top = build(true);
assert!(
(with_tb_top - plain_wrap_top).abs() < 0.01,
"probe first line {with_tb_top} must stay at plain-wrap position {plain_wrap_top} without re-applying space_before"
);
}
#[test]
fn float_follows_its_paragraph_to_the_next_page() {
crate::test_fonts();
@@ -19652,3 +19719,78 @@ fn evict_unused_caps_stale_entries_across_repeated_edits() {
assert!(c.len() <= base + 1025, "stale cache entries must be bounded (got {}, base {base})", c.len());
}
}
/// #8613: a Top-and-Bottom object ending above a paragraph's applied space before cannot affect
/// it, so paragraphs below keep empty exclusions and hit the cache when shifted vertically, and
/// paragraphs below it in a box are not laid out twice.
#[test]
fn top_and_bottom_float_above_space_before_keeps_cache_hits_on_shift() {
crate::test_fonts();
use wordcraft_doc::para::{Anchor, Float, Wrap};
use wordcraft_doc::props::LineSpacing;
let mut d = Document::from_text(&"line\n".repeat(12));
for block in &mut d.body {
if let wordcraft_doc::Block::Para(p) = Arc::make_mut(block) {
p.props.line_spacing = Some(LineSpacing::Exactly(12.0));
p.props.space_before = Some(0.0);
p.props.space_after = Some(0.0);
}
}
if let Some(wordcraft_doc::Block::Para(p)) = d.body.get_mut(4).map(Arc::make_mut) {
p.props.space_before = Some(12.0);
}
let f = Float { wrap: Wrap::TopAndBottom, h_rel: Anchor::Column, v_rel: Anchor::Paragraph, ..Default::default() };
d.insert_object(&Pos::body(0, 0), rect_shape(144.0, 10.0, f), &Default::default()).unwrap();
let mut c = LayoutCache::new();
let before = layout(&d, &mut c, &LayoutOptions::default());
let y_before = before.caret(&Pos::body(6, 0)).unwrap().top;
let misses = c.misses;
d.insert_text(&Pos::body(2, 0), &"word ".repeat(30), &Default::default()).unwrap();
let after = layout(&d, &mut c, &LayoutOptions::default());
let y_after = after.caret(&Pos::body(6, 0)).unwrap().top;
assert!(y_after > y_before + 10.0, "paragraphs below shifted down ({y_before} -> {y_after})");
assert_eq!(c.misses, misses + 1, "only the edited paragraph should miss the cache");
}
/// #8613: in table cells and other boxes, paragraphs below a Top-and-Bottom float (and clear of
/// its space-before band) get empty exclusions, so they are laid out once and hit the cache when
/// shifted vertically.
#[test]
fn top_and_bottom_float_in_cell_keeps_cache_hits_on_shift() {
crate::test_fonts();
use wordcraft_doc::para::{Anchor, Float, Wrap};
use wordcraft_doc::props::LineSpacing;
let mut d = Document::new();
let mut t = Table::new(1, 1, 468.0);
t.props.fixed = true;
t.rows[0].cells[0].blocks = (0..6)
.map(|i| {
let mut p = Paragraph::with_text(&format!("cell line {i}"), Default::default());
p.props.line_spacing = Some(LineSpacing::Exactly(12.0));
p.props.space_before = Some(0.0);
p.props.space_after = Some(0.0);
wordcraft_doc::para_block(p)
})
.collect();
d.body = vec![Arc::new(wordcraft_doc::Block::Table(t))];
let cell_pos = |para: usize| Pos { story: StoryRef::Body, path: Path(vec![0, 0, 0, para as u32]), off: 0 };
let f = Float { wrap: Wrap::TopAndBottom, h_rel: Anchor::Column, v_rel: Anchor::Paragraph, ..Default::default() };
d.insert_object(&cell_pos(0), rect_shape(100.0, 10.0, f), &Default::default()).unwrap();
let mut c = LayoutCache::new();
let before = layout(&d, &mut c, &LayoutOptions::default());
let y_before = before.caret(&cell_pos(4)).unwrap().top;
// Paragraph 0 holds the float so it lays out twice; paragraphs 1..6 sit below it and lay out once each.
assert_eq!(c.misses, 7, "paragraphs below the float should be laid out only once");
let misses = c.misses;
d.insert_text(&cell_pos(1), &"word ".repeat(30), &Default::default()).unwrap();
let after = layout(&d, &mut c, &LayoutOptions::default());
let y_after = after.caret(&cell_pos(4)).unwrap().top;
assert!(y_after > y_before + 10.0, "cell paragraphs below shifted down ({y_before} -> {y_after})");
assert_eq!(c.misses, misses + 1, "only the edited cell paragraph should miss the cache");
}
+37
View File
@@ -3,6 +3,7 @@
#[allow(unused_imports)]
use crate::*;
use wordcraft_doc::Pos;
use wordcraft_doc::props::LineSpacing;
use wordcraft_doc::section::{DocGrid, DocGridType};
@@ -97,3 +98,39 @@ fn character_grid_places_east_asian_text_on_the_pitch() {
}
}
}
#[test]
fn an_exact_character_grid_line_fits_all_its_cells_with_kerning() {
crate::test_fonts();
let text = "AVAVAVAVAVAVAVAVAVAV";
let mut grid = with_grid(text, DocGridType::SnapToChars, 0);
let styles = std::sync::Arc::make_mut(&mut grid.styles);
styles.default_chr.font = Some("Inter".into());
styles.default_chr.kern = Some(1.0);
let set_width = |doc: &mut Document, width: f32| {
let indent = doc.last_section.text_width() - width;
doc.format_paragraphs(&Pos::body(0, 0), &Pos::body(0, 0), &|p| p.indent_right = Some(indent)).unwrap();
};
// In proportional text the fifth letter still needs its unkerned width at a line break.
let mut plain = grid.clone();
plain.last_section.doc_grid = None;
let wide = lay(&plain);
let para = wide.pages[0].items.iter().find_map(|it| if let Placed::Lines { para, .. } = it { Some(para) } else { None }).unwrap();
let paired: f32 = para.clusters[..5].iter().map(|c| c.adv).sum();
let kern = para.clusters[4].kern;
assert!(kern < -0.02, "the test font must kern the pair across the break");
set_width(&mut plain, paired - kern / 2.0);
assert_eq!(super::body_lines(&lay(&plain), text)[0], "AVAV");
let size = para::Grid::of(&grid, &grid.last_section).font_size;
grid.last_section.doc_grid.as_mut().unwrap().char_space = DocGrid::char_space_for(20.0, size);
let pitch = grid.last_section.grid_char_pitch(size).unwrap();
set_width(&mut grid, 5.0 * pitch);
for kern in [0.0, 1.0] {
std::sync::Arc::make_mut(&mut grid.styles).default_chr.kern = Some(kern);
let got = super::body_lines(&lay(&grid), text);
assert_eq!(got[0], "AVAVA", "kerning threshold {kern}: {got:?}");
}
}
+2 -2
View File
@@ -16,7 +16,7 @@ craft = { workspace = true, features = [
"color", "color-ui", "control", "draw", "font-manager", "gpu", "menu", "pages", "print", "review", "table", "text",
"text-find", "web-api", "web-host", "window",
] }
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165" }
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35" }
wordcraft-geom = { workspace = true, features = ["image"] }
wordcraft-doc = { workspace = true }
wordcraft-fonts = { workspace = true }
@@ -76,7 +76,7 @@ craft-ui-test-kit = { workspace = true }
craft = { workspace = true, features = ["ui-testing"] }
[build-dependencies]
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "d73e274a01408ef433a291a667e6014937d72165", features = ["subset"] }
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", features = ["subset"] }
serde_json = { workspace = true }
toml = "1"
+1
View File
@@ -133,6 +133,7 @@ impl WordApp {
user_origin: false,
read_aloud_error: None,
autosave_path: None,
read_from: None,
saves_in_flight: Vec::new(),
fallback_chooser: false,
font_generation: wordcraft_fonts::FontDb::global().generation(),
+29 -8
View File
@@ -176,7 +176,11 @@ impl WordApp {
return Err(e.into());
}
if id == "file.autosave" {
return self.set_autosave(&params);
let r = self.set_autosave(&params);
if let Err(e) = &r {
self.status(e.clone());
}
return r;
}
if let Some(r) = table_pen::toggle(self, id, &params) {
return r;
@@ -326,13 +330,8 @@ impl WordApp {
self.recovery_seen = true;
self.sync_document();
}
// An explicit save to the document's own file lets AutoSave keep writing there.
if let Ok(v) = &r
&& matches!(id, "file.save" | "file.saveAs")
&& v.get("saved").and_then(Value::as_bool) == Some(true)
&& v.get("path").and_then(Value::as_str).map(std::path::Path::new) == self.session.path.as_deref()
{
self.autosave_path = self.session.path.clone();
if let Ok(v) = &r {
self.note_file_on_disk(id, &params, v);
}
// A Markdown file edited in the formatted view was written out again, not kept as it was.
if let Ok(v) = &r
@@ -349,6 +348,9 @@ impl WordApp {
if self.autosave_path.as_ref() == Some(&old) {
self.autosave_path = self.session.path.clone();
}
if self.read_from.as_ref() == Some(&old) {
self.read_from = self.session.path.clone();
}
let old = old.to_string_lossy();
self.ui.recent.retain(|r| *r != old);
}
@@ -434,6 +436,25 @@ impl WordApp {
r
}
/// Which file on disk the document is in, after `file.save`, `file.saveAs` or `file.open`.
fn note_file_on_disk(&mut self, id: &str, params: &Value, v: &Value) {
// An explicit save to the document's own file lets AutoSave keep writing there.
if matches!(id, "file.save" | "file.saveAs")
&& v.get("saved").and_then(Value::as_bool) == Some(true)
&& v.get("path").and_then(Value::as_str).map(std::path::Path::new) == self.session.path.as_deref()
{
self.autosave_path = self.session.path.clone();
self.read_from = self.session.path.clone();
}
// A file read from disk may have AutoSave turned on for it; one opened from bytes only
// names a file it never read.
// `file.open` without a path only asks for the picker, and `data` that isn't a string is
// ignored (the file is read from disk).
if id == "file.open" && params.get("path").and_then(Value::as_str).is_some() && v.get("alreadyOpen").and_then(Value::as_bool) == Some(false) {
self.read_from = if params.get("data").and_then(Value::as_str).is_some() { None } else { self.session.path.clone() };
}
}
fn after_command(&mut self, id: &str) {
self.canvas.glide.restart(craft::platform::clock::monotonic_ms());
if id == "view.outline" {
+25 -7
View File
@@ -1,7 +1,7 @@
use craft::host::{PickId, Picked};
use craft::platform::open::{DroppedFile, Intake};
use craft::quit::{CloseAnswer, CloseGuard, CloseScope, GuardStep};
use craft::ui::dialog::{DialogId, DialogResult, UnsavedChangesDialog};
use craft::ui::dialog::{DialogId, DialogResult, HostedUnsavedChangesDialog, UnsavedChangesDialog};
use craft::ui::shell::embed::CloseDecision;
use super::{AutoSaveBlock, PromptSave, Value, WordApp, file_dialogs, i18n, json, keeps_everything, panes, printing};
@@ -151,7 +151,7 @@ impl WordApp {
dialog = dialog.reason(reason);
}
// PLAN: assumed `WordApp::dialog_host: DialogHost`, the shown window's
let id = self.dialog_host.open(dialog);
let id = self.dialog_host.open(HostedUnsavedChangesDialog::new(dialog));
if let Some(closing) = self.closing.as_mut() {
closing.prompt = Some(id);
closing.window = self.windows.shown();
@@ -246,7 +246,7 @@ impl WordApp {
let ctx = self.ctx.clone().unwrap_or_default();
if let Some(host) = self.window_dialog_host_mut(window) {
host.cancel_by_id(&ctx, id);
let _ = host.take_by_id::<UnsavedChangesDialog>(id);
let _ = host.take_by_id::<HostedUnsavedChangesDialog>(id);
}
}
@@ -262,7 +262,7 @@ impl WordApp {
/// from `logic`.
pub(crate) fn pump_close_prompt(&mut self) {
let Some((window, id)) = self.closing.as_ref().and_then(|c| c.prompt.map(|id| (c.window, id))) else { return };
let Some(result) = self.window_dialog_host_mut(window).and_then(|host| host.take_by_id::<UnsavedChangesDialog>(id)) else { return };
let Some(result) = self.window_dialog_host_mut(window).and_then(|host| host.take_by_id::<HostedUnsavedChangesDialog>(id)) else { return };
if let Some(ctx) = self.ctx.as_ref() {
crate::dialogs::chrome::forget_nudge(ctx, id);
}
@@ -684,13 +684,31 @@ impl WordApp {
self.autosave && self.autosave_block().is_none()
}
/// What the AutoSave switch can't lift: [`Self::autosave_block`], less a file read from disk
/// here, which the switch turns on (#3307). A document opened from bytes stays blocked.
pub fn autosave_switch_block(&self) -> Option<AutoSaveBlock> {
self.autosave_block().filter(|b| *b != AutoSaveBlock::NotSavedHere || self.read_from != self.session.path)
}
/// `file.autosave` (the AutoSave switch, and scripts): `value` turns AutoSave on or off;
/// without it, it toggles what the switch shows. Turning it on for a document AutoSave can't
/// cover is an error that says why, instead of a switch that is on but saves nothing (#196).
/// Turning it on for a file only opened here is the go-ahead a save gives (#3307), when the
/// document was read from that file; turning it off withdraws the go-ahead for this document.
pub(super) fn set_autosave(&mut self, params: &Value) -> Result<Value, String> {
let on = params.get("value").and_then(Value::as_bool).unwrap_or(!self.autosaves());
if on && let Some(block) = self.autosave_block() {
return Err(block.reason());
let on = match params.get("value") {
None => !self.autosaves(),
Some(Value::Bool(on)) => *on,
Some(_) => return Err("`value` must be true or false".into()),
};
if on && self.autosave_block().is_some() {
if let Some(block) = self.autosave_switch_block() {
return Err(block.reason());
}
self.autosave_path = self.session.path.clone();
}
if !on {
self.autosave_path = None;
}
self.autosave = on;
self.session.autosave = on;
+25 -13
View File
@@ -30,7 +30,7 @@ struct BalloonItems {
}
/// Comment balloons in the markup area right of each page, joined to their anchors, with each comment's replies in
/// its card. Clicking a card selects it, like Word: its text becomes editable in place, with Reply, Resolve and
/// its card. Clicking a card selects it, like Word: a double click makes its text editable in place, with Reply, Resolve and
/// Delete (the same commands as the Comments pane).
pub(crate) fn balloons(app: &mut WordApp, ui: &mut Ui, out: &craft::pages::ui::PageViewOutput, layout: &DocLayout) {
app.canvas.balloon_rects.clear();
@@ -63,6 +63,26 @@ pub(crate) fn balloons(app: &mut WordApp, ui: &mut Ui, out: &craft::pages::ui::P
for edit in shown.edits {
apply(app, &cards, edit);
}
open_edit_on_double_click(app, ui);
}
/// A double click on the selected card's own text opens its comment for editing, as craft's comments pane does. A click
/// that lands in a field or on a button (Reply, Resolve, the menu) is not one.
// lean: mouse only; a keyboard path (Enter/F2 on the selected card) is a follow-up.
fn open_edit_on_double_click(app: &mut WordApp, ui: &Ui) {
let Some(id) = app.canvas.selected_balloon() else { return };
if app.canvas.comments.editing.is_some() || ui.ctx().egui_wants_keyboard_input() {
return;
}
let at = ui.input(|i| i.pointer.button_double_clicked(egui::PointerButton::Primary).then(|| i.pointer.interact_pos())).flatten();
let Some(at) = at else { return };
let on_card = app.canvas.balloon_rects.iter().any(|(i, r)| *i == id && r.contains(at));
if !on_card || !crate::app::command_board::command_enabled(app, "review.editComment") {
return;
}
let Some(c) = app.session.doc.comments.get(&id) else { return };
let text = app.session.doc.plain_text(StoryRef::Part(c.part));
app.canvas.comments.edit(thread_id(id), 0, text);
}
/// Applies what a card reported through the commands the Comments pane uses.
@@ -243,25 +263,17 @@ fn write_back(app: &mut WordApp, id: u32) {
let _ = crate::panes::commit_reply(app, id);
}
/// Makes comment `id` the selected card with its own text open for editing, writing back the draft of the one edited
/// before. The card selects itself on a click; this opens its edit so the field has the keyboard.
/// Makes comment `id` the selected card, writing back the draft of the one edited before. As in Word, selecting a card
/// puts no message into edit (that hides its Reply); an edit starts on a double click on the selected card.
fn focus_balloon(app: &mut WordApp, id: u32) {
let before = app.canvas.comments.editing.as_ref().and_then(|(t, ..)| app_id(*t)).filter(|b| *b != id);
if let Some(before) = before {
write_back(app, before);
}
// Where comments can't change (a read-only document) the card is selected with no edit open: nothing is typed.
let editable = crate::app::command_board::command_enabled(app, "review.editComment");
let text = app.session.doc.comments.get(&id).filter(|_| editable).map(|c| app.session.doc.plain_text(StoryRef::Part(c.part)));
let thread = thread_id(id);
let comments = &mut app.canvas.comments;
comments.selected = craft::behavior::Selection::single(thread);
if comments.editing.as_ref().is_none_or(|(t, ..)| *t != thread) {
comments.editing = text.map(|t| (thread, 0, t));
}
app.canvas.comments.selected = craft::behavior::Selection::single(thread_id(id));
}
/// Select a comment's balloon (its text gets the keyboard), writing back any edit in the one selected before.
/// Select a comment's balloon (no edit opens), writing back any edit in the one selected before.
pub fn select_balloon(app: &mut WordApp, id: u32) {
if app.canvas.selected_balloon() == Some(id) {
return;
+44 -13
View File
@@ -46,6 +46,20 @@ fn click_at(h: &mut H, at: Pos2) {
steps(h, 3);
}
/// A primary double click at `at`: two clicks a few frames apart, inside egui's double click delay.
fn double_click_at(h: &mut H, at: Pos2) {
// Let the click before it age out, or the pair would count as a triple click.
steps(h, 40);
h.event(egui::Event::PointerMoved(at));
for _ in 0..2 {
h.event(button(at, egui::PointerButton::Primary, true));
h.app_frame();
h.event(button(at, egui::PointerButton::Primary, false));
h.app_frame();
}
steps(h, 3);
}
/// A primary drag from `from` to `to` in six moves.
fn drag_between(h: &mut H, from: Pos2, to: Pos2) {
h.event(egui::Event::PointerMoved(from));
@@ -195,7 +209,7 @@ fn ruler_tab_stops_are_set_moved_and_cleared_with_the_pointer() {
let step = 4.5_f32;
let near = |stops: &[(f32, TabAlign)], want: f32| stops.len() == 1 && stops[0].1 == TabAlign::Center && (stops[0].0 - want).abs() <= step;
// Lets the double-click time pass before the next press.
let settle = |h: &mut H| steps(h, 30);
let settle = |h: &mut H| steps(h, 40);
let stops = |h: &H| {
let s = &h.state().session;
let para = s.doc.para_at(&s.sel.focus).expect("a paragraph");
@@ -253,19 +267,27 @@ fn comment_harness() -> (H, u32) {
a.run("select.text", json!({"text": "text"})).unwrap();
let id = a.run("review.newComment", json!({"text": "Original"})).unwrap()["id"].as_u64().unwrap() as u32;
a.run("view.commentsPane", json!({"value": false})).unwrap();
(window(a), id)
(window_dt(a, Some(1.0 / 60.0)), id)
}
/// Click comment `id`'s balloon (from no selected balloon): the card is selected and its own
/// edit has the keyboard in its field.
/// Click comment `id`'s balloon (from no selected balloon): the card is selected with no edit open (as in Word), then
/// a double click opens its message for editing, and takes the keyboard in its field.
fn click_balloon(h: &mut H, id: u32) {
h.state_mut().canvas.comments.selected = craft::behavior::Selection::default();
steps(h, 2);
let card = h.state().canvas.balloon_rects.iter().find(|(i, _)| *i == id).map(|(_, r)| *r).expect("the comment has a balloon");
click_at(h, card.left_top() + vec2(30.0, 8.0));
assert_eq!(h.state().canvas.selected_balloon(), Some(id), "the click selected the balloon");
// The selected card opens its own edit, a framework text field, which takes the keyboard by a click in it
// (none opens where comments can't change).
select_balloon_card(h, id);
open_edit(h, id);
}
/// Double-clicks comment `id`'s card to open message 0 for editing, unless a draft is already open (a refused one
/// is kept), and clicks into its field. Nothing opens where comments can't change.
fn open_edit(h: &mut H, id: u32) {
if crate::app::command_board::command_enabled(h.state(), "review.editComment") {
if h.state().canvas.comments.editing.is_none() {
let card = h.state().canvas.balloon_rects.iter().find(|(i, _)| *i == id).map(|(_, r)| *r).expect("the comment has a balloon");
double_click_at(h, card.left_top() + vec2(30.0, 8.0));
assert!(h.state().canvas.comments.editing.is_some(), "a double click on the card opens its edit");
}
steps(h, 2);
}
use egui::accesskit::Role;
let field = h
.query_by_role_and_label(Role::MultilineTextInput, "Edit")
@@ -277,6 +299,15 @@ fn click_balloon(h: &mut H, id: u32) {
}
}
/// Clicks comment `id`'s card (from no selected balloon): it is selected with no edit open, so Reply shows.
fn select_balloon_card(h: &mut H, id: u32) {
h.state_mut().canvas.comments.selected = craft::behavior::Selection::default();
steps(h, 2);
let card = h.state().canvas.balloon_rects.iter().find(|(i, _)| *i == id).map(|(_, r)| *r).expect("the comment has a balloon");
click_at(h, card.left_top() + vec2(30.0, 8.0));
assert_eq!(h.state().canvas.selected_balloon(), Some(id), "the click selected the balloon");
}
/// Types `text` into the field that has the keyboard.
fn type_in(h: &mut H, text: &str) {
h.event(egui::Event::Text(text.into()));
@@ -327,7 +358,7 @@ fn an_empty_comment_balloon_deletes() {
}
let id = a.run("review.newComment", json!({})).unwrap()["id"].as_u64().unwrap() as u32;
a.run("view.commentsPane", json!({"value": false})).unwrap();
let mut h = window(a);
let mut h = window_dt(a, Some(1.0 / 60.0));
click_balloon(&mut h, id);
let resolve = h.get_by_label("Resolve").rect().center();
click_at(&mut h, resolve);
@@ -382,7 +413,7 @@ fn a_refused_comment_edit_keeps_the_draft() {
#[test]
fn replying_to_a_comment_from_its_balloon_posts_the_reply() {
let (mut h, id) = comment_harness();
click_balloon(&mut h, id);
select_balloon_card(&mut h, id);
h.get_by_label("Reply").click();
steps(&mut h, 3);
type_in(&mut h, "A reply");
+66 -6
View File
@@ -76,16 +76,43 @@ fn new_app() -> WordApp {
WordApp::new(wordcraft_engine::Session::new(wordcraft_doc::Document::new()), crate::Services::default())
}
/// A saved .docx (so AutoSave can cover it) in the harness.
fn autosave_harness() -> (egui_kittest::Harness<'static, WordApp>, std::path::PathBuf) {
let dir = std::env::temp_dir().join(format!("wordcraft-ui-autosave-label-{}", std::process::id()));
/// How [`autosave_harness`] has the saved file in its window.
#[derive(Debug, PartialEq)]
enum Reopen {
/// The window that saved it.
No,
/// Opened in a fresh window, read from disk.
FromDisk,
/// Opened in a fresh window from its bytes, which only names the file.
FromBytes,
}
/// A saved .docx (so AutoSave can cover it), or the same file opened in a fresh window as
/// `reopen` says, with the title bar drawn over it. `files` answers a later Save As pick.
fn autosave_harness(
reopen: Reopen,
files: &std::sync::Arc<craft::host::ScriptedFiles>,
) -> (egui_kittest::Harness<'static, WordApp>, std::path::PathBuf) {
let dir = std::env::temp_dir().join(format!("wordcraft-ui-autosave-label-{}-{reopen:?}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("draft.docx");
let mut a = new_app();
let mut a = WordApp::new(wordcraft_engine::Session::new(wordcraft_doc::Document::new()), crate::Services::default())
.with_host(std::sync::Arc::new(craft::host::Host::builder(crate::APP).files(files.clone()).build()));
a.run("text.insert", json!({"text": "Hello"})).unwrap();
a.run("file.save", json!({"path": path.to_string_lossy()})).unwrap();
assert!(a.autosaves(), "a saved .docx is covered by AutoSave");
if reopen != Reopen::No {
a = WordApp::new(wordcraft_engine::Session::new(wordcraft_doc::Document::new()), crate::Services::default())
.with_host(std::sync::Arc::new(craft::host::Host::builder(crate::APP).files(files.clone()).build()));
if reopen == Reopen::FromBytes {
let data = wordcraft_engine::cmd::insert::base64_encode(&std::fs::read(&path).unwrap());
a.execute("file.open", json!({"path": path.to_string_lossy(), "data": data})).unwrap();
} else {
a.run("file.open", json!({"path": path.to_string_lossy()})).unwrap();
}
assert!(!a.autosaves(), "an opened file waits for the user's go-ahead");
}
let h = harness(a);
(h, dir)
}
@@ -93,7 +120,8 @@ fn autosave_harness() -> (egui_kittest::Harness<'static, WordApp>, std::path::Pa
/// #3370: clicking the AutoSave switch label toggles AutoSave on and off.
#[test]
fn clicking_the_autosave_label_toggles_autosave() {
let (mut h, dir) = autosave_harness();
let files = std::sync::Arc::new(craft::host::ScriptedFiles::new());
let (mut h, dir) = autosave_harness(Reopen::No, &files);
assert!(h.state().autosaves());
h.get_by_label("AutoSave").click();
crate::test_harness::frames(&mut h, 2);
@@ -104,6 +132,35 @@ fn clicking_the_autosave_label_toggles_autosave() {
let _ = std::fs::remove_dir_all(&dir);
}
/// #3307: a file opened, not saved, in this window had the switch greyed out, and clicking it
/// asked for Save As. Clicking it now turns AutoSave on for that file.
#[test]
fn clicking_autosave_on_an_opened_file_turns_it_on() {
let files = std::sync::Arc::new(craft::host::ScriptedFiles::new());
let (mut h, dir) = autosave_harness(Reopen::FromDisk, &files);
h.get_by_label("AutoSave").click();
crate::test_harness::frames(&mut h, 2);
assert!(h.state().autosaves(), "the switch turned AutoSave on");
assert!(h.state().dialog_host.is_empty() && h.state().file_dialog.is_none(), "without Save As");
let _ = std::fs::remove_dir_all(&dir);
}
/// A document opened from bytes only names its file, so the switch can't hand that file to
/// AutoSave: it shows the block and clicking it asks for Save As, after which AutoSave is on.
#[test]
fn clicking_autosave_on_a_document_opened_from_bytes_asks_for_save_as() {
let files = std::sync::Arc::new(craft::host::ScriptedFiles::new());
let (mut h, dir) = autosave_harness(Reopen::FromBytes, &files);
assert_eq!(h.state().autosave_switch_block(), Some(crate::AutoSaveBlock::NotSavedHere));
let copy = dir.join("copy.docx");
files.queue(craft::host::Picked::Paths(vec![copy.clone()]));
h.get_by_label("AutoSave").click();
crate::test_harness::frames(&mut h, 2);
assert!(copy.is_file(), "Save As saved a copy");
assert!(h.state().autosaves(), "AutoSave covers the copy");
let _ = std::fs::remove_dir_all(&dir);
}
/// #701: the arrow beside Undo lists the session's undo steps, newest first; clicking the third
/// row undoes three steps at once.
#[test]
@@ -744,8 +801,11 @@ fn the_autosave_knob_sits_right_when_on_and_mirrors_right_to_left() {
a.ui.language = "en".into();
// Mark the document as saved here without touching disk (`session.dirty` stays false).
let path = std::path::PathBuf::from("draft.docx");
// A save to the document's own file records both (`note_file_on_disk`): the file is read
// from disk, so the switch can be turned on again after it has been turned off.
a.session.path = Some(path.clone());
a.autosave_path = Some(path);
a.autosave_path = Some(path.clone());
a.read_from = Some(path);
let mut h = harness(a);
// Arabic UI labels draw even when built without `CRAFT_FONTS_DIR` (embedded Arabic faces).
+2 -1
View File
@@ -104,7 +104,8 @@ fn leading(app: &mut WordApp, ui: &mut Ui) -> Option<egui::Rect> {
/// The AutoSave switch: off and with the reason as its tooltip when AutoSave can't cover the document (#196,
/// #176); a click then offers Save As where that helps. Returns the rect it took.
fn autosave(app: &mut WordApp, ui: &mut Ui) -> egui::Rect {
let block = app.autosave_block();
// A file read from disk here is off, not blocked: the switch turns it on (#3307).
let block = app.autosave_switch_block();
let on = app.autosaves() && block.is_none();
let tip = block.as_ref().map_or_else(|| tl!("AutoSave saves every change to the file (needs a saved document)").to_string(), |b| b.reason());
// The small switch, as the old title bar drew it.
+8 -1
View File
@@ -20,6 +20,8 @@ use crate::{WordApp, panes};
pub(crate) struct Parked {
/// [`WordApp`]'s `autosave_path`: the file AutoSave writes this document to.
autosave_path: Option<std::path::PathBuf>,
/// [`WordApp`]'s `read_from`: the file on disk this document was read from or saved to.
read_from: Option<std::path::PathBuf>,
/// The comment panel's selection and the comment and reply text typed in this document and not
/// yet written to it.
comments: craft::review::ui::CommentsPanelState,
@@ -102,7 +104,11 @@ impl WordApp {
if from == to {
return false;
}
let leaving = Parked { autosave_path: self.autosave_path.take(), comments: std::mem::take(&mut self.canvas.comments) };
let leaving = Parked {
autosave_path: self.autosave_path.take(),
read_from: self.read_from.take(),
comments: std::mem::take(&mut self.canvas.comments),
};
if self.session.is_open(from) {
self.parked.insert(from, leaving);
}
@@ -110,6 +116,7 @@ impl WordApp {
let seen = back.is_some();
let back = back.unwrap_or_default();
self.autosave_path = back.autosave_path;
self.read_from = back.read_from;
self.canvas.comments = back.comments;
let session = &self.session;
self.parked.retain(|d, _| session.is_open(*d));
+3
View File
@@ -509,6 +509,9 @@ pub struct WordApp {
/// there. A file that was merely opened isn't rewritten until the user saves it: saving drops
/// whatever WordCraft can't represent (content controls, charts, macros…).
autosave_path: Option<std::path::PathBuf>,
/// The file on disk the document was read from or saved to. A document opened from bytes
/// (`file.open` with `data`) only names a file, so the AutoSave switch can't cover it.
read_from: Option<std::path::PathBuf>,
/// Web: saves the browser's picker hasn't finished yet (#1315).
saves_in_flight: Vec<SaveInFlight>,
/// The Save Changes prompt this window is running and the command it holds back.
+1 -1
View File
@@ -20,7 +20,7 @@ pub enum AutoSaveBlock {
Unsaved,
/// A file in a format that can't keep everything (Markdown, plain text, HTML…), by file name.
Format { name: String },
/// A file that was opened but not yet saved in this session.
/// A file that was opened but not yet saved in this session; the switch shows off and lifts it.
NotSavedHere,
}
+98 -1
View File
@@ -1539,7 +1539,11 @@ fn prompt_message(a: &WordApp) -> Option<String> {
fn prompt(a: &WordApp) -> Option<&'static str> {
// The close operation is the app's, the question is the drawn window's: a prompt asked in the window of a document
// that another window replaced is no longer the question this window asks.
if a.closing.as_ref().and_then(|c| c.prompt).is_some_and(|id| a.dialog_host.get_by_id::<craft::ui::dialog::UnsavedChangesDialog>(id).is_some()) {
if a.closing
.as_ref()
.and_then(|c| c.prompt)
.is_some_and(|id| a.dialog_host.get_by_id::<craft::ui::dialog::HostedUnsavedChangesDialog>(id).is_some())
{
return Some("saveChanges");
}
let (key, _) = open_dialog(a)?;
@@ -3247,6 +3251,99 @@ fn autosave_is_unavailable_in_the_browser() {
assert!(err.contains("browser"), "{err}");
}
/// #3307: an opened file isn't rewritten until the user says so, but the switch says so
/// without Save As: turning it on lets AutoSave write the file.
#[test]
fn turning_autosave_on_covers_a_file_only_opened_here() {
let dir = scratch("autosave-opened");
let path = dir.join("report.docx");
let mut a = typed();
a.run("file.save", json!({"path": path.to_string_lossy()})).unwrap();
let mut b = app();
b.run("file.open", json!({"path": path.to_string_lossy()})).unwrap();
assert_eq!(b.autosave_block(), Some(AutoSaveBlock::NotSavedHere));
assert_eq!(b.autosave_switch_block(), None, "the switch lifts it itself");
b.run("text.insert", json!({"text": "Opened "})).unwrap();
b.autosave_tick(monotonic_ms() + 10_000.0);
assert!(b.session.dirty, "opening alone never rewrites the file");
assert!(b.run("file.autosave", json!({"value": "false"})).is_err());
assert!(!b.autosaves(), "a value that isn't a bool grants nothing");
assert_eq!(b.run("file.autosave", json!({})).unwrap(), json!({"value": true}));
assert!(b.autosaves());
b.autosave_tick(monotonic_ms() + 20_000.0);
assert!(!b.session.dirty, "AutoSave wrote the opened file");
assert!(b.run("file.autosave", json!({"value": false})).is_ok());
assert!(!b.autosaves());
let _ = std::fs::remove_dir_all(&dir);
}
/// `file.open` with `data` only names the file: the switch mustn't let AutoSave write a file of
/// that name, which may hold something else entirely.
#[test]
fn the_autosave_switch_refuses_a_document_opened_from_bytes() {
let dir = scratch("autosave-bytes");
let path = dir.join("other.docx");
let mut a = typed();
a.run("file.save", json!({"path": path.to_string_lossy()})).unwrap();
let on_disk = std::fs::read(&path).unwrap();
let files = Arc::new(ScriptedFiles::new());
let mut b = app_with_files(files.clone());
let data = wordcraft_engine::cmd::insert::base64_encode(&on_disk);
b.execute("file.open", json!({"path": path.to_string_lossy(), "data": data})).unwrap();
assert_eq!(b.autosave_block(), Some(AutoSaveBlock::NotSavedHere));
assert_eq!(b.autosave_switch_block(), Some(AutoSaveBlock::NotSavedHere), "the switch shows the block");
assert!(b.run("file.autosave", json!({"value": true})).is_err());
b.status = None;
let err = b.run("file.autosave", json!({})).unwrap_err();
assert_eq!(status_text(&b), Some(err.as_str()), "the status bar says why");
b.run("text.insert", json!({"text": "Bytes "})).unwrap();
b.autosave_tick(monotonic_ms() + 10_000.0);
assert!(b.session.dirty);
assert_eq!(std::fs::read(&path).unwrap(), on_disk, "the named file is untouched");
// Open without a path only asks for the picker: it isn't a read of the shown file.
script_pick(&files, None);
b.run("file.open", json!({"path": null})).unwrap();
assert!(b.run("file.autosave", json!({"value": true})).is_err(), "the picker request grants nothing");
// A `data` that isn't a string is ignored and the file is read from disk.
let mut c = app();
c.run("file.open", json!({"path": path.to_string_lossy(), "data": null})).unwrap();
assert!(c.run("file.autosave", json!({"value": true})).is_ok(), "read from disk");
// Saving is still the way: then AutoSave covers the file.
b.run("file.save", json!({})).unwrap();
assert!(b.autosaves());
let _ = std::fs::remove_dir_all(&dir);
}
/// AutoSave turned off in one document stays off there when another document turns it on: the
/// preference is shared, but each document's go-ahead is its own.
#[test]
fn autosave_turned_off_stays_off_when_another_document_turns_it_on() {
let dir = scratch("autosave-two");
let (first_path, second_path) = (dir.join("first.docx"), dir.join("second.docx"));
let mut c = typed();
c.run("file.save", json!({"path": second_path.to_string_lossy()})).unwrap();
let mut a = typed();
a.run("file.save", json!({"path": first_path.to_string_lossy()})).unwrap();
let first = a.session.document_id();
let saved = std::fs::read(&first_path).unwrap();
assert!(a.autosaves());
a.run("file.autosave", json!({"value": false})).unwrap();
a.run("file.open", json!({"path": second_path.to_string_lossy()})).unwrap();
assert_ne!(a.session.document_id(), first, "the second file opens beside the first");
a.run("file.autosave", json!({"value": true})).unwrap();
assert!(a.autosaves());
a.show_document(first).unwrap();
assert!(!a.autosaves(), "the first document's switch is still off");
a.run("text.insert", json!({"text": "Later "})).unwrap();
a.autosave_tick(monotonic_ms() + 10_000.0);
assert!(a.session.dirty);
assert_eq!(std::fs::read(&first_path).unwrap(), saved, "the first file is untouched");
// Turned back on, it covers the file it was saved to without another save.
a.run("file.autosave", json!({"value": true})).unwrap();
assert!(a.autosaves());
let _ = std::fs::remove_dir_all(&dir);
}
/// Cancelling the Open picker (Mod+O) left the document as it was but turned AutoSave off.
#[test]
fn cancelling_open_keeps_autosave() {
+1
View File
@@ -186,6 +186,7 @@ impl WordApp {
clipboard_published: _,
// Per document: the shown document's, swapped with `parked` on a document switch.
autosave_path: _,
read_from: _,
parked: _,
// Per window.
ui,
+1 -1
View File
@@ -350,7 +350,7 @@ fn parked_prompt_answer(answer: craft::quit::CloseAnswer, name: &str, saved_text
rig.frame(&mut a);
assert!(a.enter_window(first), "the recorded prompt owner remains open");
let id = a.closing.as_ref().unwrap().prompt.unwrap();
a.dialog_host.get_mut_by_id::<craft::ui::dialog::UnsavedChangesDialog>(id).unwrap().set_answer(answer);
a.dialog_host.get_mut_by_id::<craft::ui::dialog::HostedUnsavedChangesDialog>(id).unwrap().set_answer(answer);
assert!(a.dialog_host.confirm_by_id(&rig.ctx(), id));
a.show_window(second);
rig.frames(&mut a, 3);