Compare commits

..
Author SHA1 Message Date
autocraft-bot[bot] 12ff59a960 Merge main (2d9790c3) into the pull request
Resolved the conflicts in flow.rs (fit_height now uses the default branc

Resolved the conflicts in flow.rs (fit_height now uses the default branch's pb.at_margin()) and in layout-parity.md (both sides' entries kept). I carried the PR's abs() handling of the bottom margin into the new leading_floor in page.rs. cargo check passes, the PR's negative-margin test passes, and cargo fmt --check is clean. I did not run the full suite.
2026-12-04 08:54:57 +00:00
RickiNanoandFredApps 2d9790c374 #7887: hovering a tracked change shows its kind, author and time (#7967)
* #7887: hovering a tracked change shows its kind, author and time

Resting the pointer on a tracked insertion, deletion, move or formatting
change shows a tip with what the change is (Inserted, Deleted, Moved to,
Moved from, Formatted), its author and its time. Only changes the page
marks count: none with markup hidden, insertions and deletions while Show
Markup shows them, formatting while it shows formatting. A link's tip
comes first. The time is shown as written in w:date, as Word does, since
a revision has no UTC time beside it.

* #7887: tips for paragraph formatting changes, and in notes and text boxes

The hover tip resolves the story under the pointer as a click does, so a
change in a footnote or text box shows its tip while the caret is in the
body. A paragraph whose own formatting changed while tracking (alignment,
indents) shows a Formatted tip on its text when the character under the
pointer has no change of its own.

* #7887: the link tip looks in the story under the pointer too

A link in a footnote or endnote now shows its tip while the caret is in
the body, so the link's tip still comes before the tracked change tip
there.

* #7887: a change made here shows its time in local time

A change WordCraft makes keeps its UTC time beside the local w:date
(#6876's Revision::date_utc). revision_time now passes it to stamp, as
comment_time does, so the tip shows the user's local time for it. A
change from a file with only a Z date still shows as written.

changes_made_here_show_in_local_time builds the revision through
made_revision, as new_revision does, and reads it at UTC+2: 14:05 for
12:05Z. Without the fix it shows the machine's own wall time instead.
The canvas hover test sets a canned date, so it now clears date_utc
too, as a file's change has none.

* #7887: the tip's time is optional, and a w:date offset is converted (docs)

---------

Co-authored-by: FredApps <[email protected]>
2026-12-04 06:11:22 +01:00
Martin BallandClaude Opus 5.5 17da903053 packaging(linux): riscv64 smoke test sets MALLOC_TRIM_THRESHOLD_ so the CLI doesn't restart under QEMU (#8786)
Since #7914 the CLI restarts itself to set MALLOC_TRIM_THRESHOLD_. Under user-mode
qemu-riscv64 with no binfmt handler the restart can't run the riscv64 binary, glibc's
execvp hands it to /bin/sh, and the release job fails with 'Syntax error: word
unexpected'. Setting the variable skips the restart. Real riscv64 hosts are unaffected.


Claude-Session: https://claude.ai/code/session_01FypgCWNarDG3QfXK2YMzdx

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-12-04 02:27:27 +00:00
autocraft-bot[bot] 500e150132 Merge pull request #8733 2026-12-04 00:42:46 +00:00
autocraft-bot[bot] 416db1b645 Merge pull request #7727 2026-12-04 00:42:46 +00:00
autocraft-bot[bot] a1aa614bf1 Merge main (5073f8e7) into the pull request
Resolved the conflict in crates/ui-egui/Cargo.toml. I kept the pull requ

Resolved the conflict in crates/ui-egui/Cargo.toml. I kept the pull request's `craft-html = { workspace = true }` line and took main's craft-libs pin 5299d8d9 for craft-fonts-build, which matches the workspace pin. Cargo.lock already lists craft-html and craft-fonts-build under wordcraft-ui-egui and has no references to the old d73e274a pin, so I left it alone. No conflict markers remain. I couldn't build or test the result: `cargo check --offline` fails because the egui git dependency can't be checked out without network access.
2026-12-04 00:36:14 +00:00
yoriswind d53ba37903 Web: accept the screenshot helper inline data flag (#8726) 2026-12-03 14:28:42 -08:00
Mauro Mazzieri 48fca374b3 #7108: describe the rule, not measurements 2026-12-03 10:19:54 +01:00
Mauro Mazzieri 5833546550 #7108: Page Setup keeps an exact margin it didn't change
An exact (negative) top or bottom margin the dialog still shows as the
section has it, on a page not turned, is left out of layout.margins, which
keeps a side left out; the fit checks count an exact margin at its size.
Regression test dialogs::tests::page_setup_keeps_an_exact_margin_it_didnt_change;
the parity history row names the existing command test correctly.
2026-12-03 10:00:35 +01:00
Khawar Zamman Wani 5c41ef2f08 Merge PR branch head into rich-clipboard paste fix
# Conflicts:
#	crates/ui-egui/Cargo.toml
2026-12-02 15:41:14 +05:30
FredApps 1955eea91d Merge current main into browser-image paste branch 2026-12-02 08:50:20 +01:00
Khawar Zamman Wani 664980b32b Preserve rich clipboard content during ordinary paste 2026-11-30 09:14:12 +05:30
Khawar Zamman Wani 349556de8a Merge upstream main into clipboard paste fix 2026-11-30 09:13:40 +05:30
FredApps 13dc60f05c Restore picture paste when Ctrl+V has image+HTML and no plain text
The merge of main into this branch dropped the post-fill hook in
commands.rs that pastes a clipboard picture when edit.paste has no
plain text. fill() only auto-inserts a bitmap when the HTML looks like
a single image offer, so a browser image plus fallback HTML failed
mod_v_pastes_rich_only_clipboard_and_preserves_picture_routing.
2026-11-28 07:03:14 +07:00
FredApps 2813a0961d Merge origin/main into fix/2909-browser-image-paste 2026-11-28 05:04:48 +07:00
Khawar Zamman Wani ddeab752da Prefer browser image pixels when the clipboard also offers RTF 2026-11-24 20:45:48 +05:30
Khawar Zamman Wani 81ed00867e Preserve picture-only Paste during equation editing 2026-11-24 18:10:19 +05:30
Khawar Zamman Wani 473942d205 Prefer the bitmap when pasting a browser image (#2909) 2026-11-24 16:59:31 +05:30
Mauro MazzieriandClaude Opus 5.5 5d43bb5414 Merge main into fix/exact-page-margins (#7107)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-21 18:52:08 +01:00
Mauro MazzieriandClaude Opus 5.5 63f5623990 Merge main into fix/exact-page-margins (#7107)
The UI port (#7101) deleted crates/ui-egui/src/canvas/margins.rs: the
ruler's margin handles now come from craft-libs (craft::pages::ui), whose
margin_range clamps a drag against the opposite margin as given. The
ruler fix of this branch (an exact, negative top or bottom margin counts
at its size) moves to rulers.rs: page_edges hands the ruler the top and
bottom margins' sizes, so a drag of the opposite edge keeps an inch of
text and layout.margins accepts it, and the ruler shows the edge where
the layout puts the body. margin_params sends only the moved edge, so an
exact margin stays exact unless it is the one dragged.

The test moves to canvas/tests/markup.rs (the ruler tests on main):
ruler_margin_drags_clamp_against_an_exact_opposite_margin. The old
margin tests in canvas/tests.rs, deleted on main, stay deleted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-21 09:27:40 +01:00
Mauro MazzieriandClaude Opus 5.5 a830b61074 UI: ruler margin drags count an exact opposite margin at its size (#7107)
Dragging the bottom (top) edge on the vertical ruler clamped the margin
against the top (bottom) margin as stored, so an exact, negative one
widened the room: with a 792 pt page and a top margin of -72, dragging
the bottom edge to 72 pt gave a bottom margin of 720, which
layout.margins rejects because the margins' sizes leave no text. The
clamp now takes the opposite top or bottom margin's absolute value, as
layout.margins does, and keeps the inch of text (648 pt here). Positive
margins clamp as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-20 13:42:52 +01:00
mmazzieriandClaude Opus 5.5 b6a4fd1266 layout, engine: a negative top or bottom margin is exact, and the header or footer overlaps the body (#7107)
Word's exact margin (`w:pgMar` `w:top` / `w:bottom` below zero, ECMA-376 §17.6.11; DOC
sprmSDyaTop / sprmSDyaBottom) starts (ends) the body at the margin's size from the page edge
even when the header (footer) is taller: the two overlap instead of the band pushing the text.
WordCraft took the larger of the margin and the header. On the synthetic reproducer (-60 pt
margins, six-line header and footer, 100 body lines) Word lays out 2 pages and WordCraft 3.

Layout:
- `body_top_for` and `PageBuilder::body_bottom` place a negative margin's body at its size and
  leave the header and footer out of it;
- the other places that read the margins as a size (`SectionProps::text_height`,
  margin-relative floats and frames, the continuous views, line fitting at the bottom margin,
  turned sections) take their absolute value.

Page Setup, as measured in Word:
- `layout.margins` keeps the value of a side it is not given, so an exact top or bottom stays
  exact when another margin changes (a negative value given still counts as 0);
- `set_landscape` turns an exact top or bottom into a side at its size;
- `layout.size` checks the room with the margins' sizes.
`layout.pageSetup` still clamps a negative margin to 0 (its documented contract, pinned by
`page_setup_section_is_validated`).

The readers keep the sign with storytold/craft-libs#2516; until the craft-libs pin moves, a DOC
or DOCX reaches the layout with a positive or zero margin. With both changes, on 159 local
DOC/DOCX files 158 PDFs are byte-identical; the one with a negative top margin goes from 7
pages to Word's 6.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-20 08:18:45 +01:00
32 changed files with 848 additions and 268 deletions
Generated
+116 -115
View File
@@ -1173,7 +1173,7 @@ dependencies = [
[[package]]
name = "craft"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"block2 0.6.2",
"craft-appkit",
@@ -1405,7 +1405,7 @@ dependencies = [
[[package]]
name = "craft-doc-binary"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"chrono",
"craft-cfb",
@@ -1422,7 +1422,7 @@ dependencies = [
[[package]]
name = "craft-docpath"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"flate2",
"thiserror 2.0.21",
@@ -3866,7 +3866,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a"
[[package]]
name = "hayro-cmap"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
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=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
dependencies = [
"arrayvec",
"kurbo",
@@ -9118,7 +9118,7 @@ dependencies = [
[[package]]
name = "wordcraft"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"craft",
"craft-nightly",
@@ -9145,7 +9145,7 @@ dependencies = [
[[package]]
name = "wordcraft-cli"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"craft-zip",
"image",
@@ -9163,11 +9163,11 @@ dependencies = [
[[package]]
name = "wordcraft-control-key"
version = "0.20.1"
version = "0.20.0"
[[package]]
name = "wordcraft-doc"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"base64 0.23.1",
"craft-codepage",
@@ -9183,7 +9183,7 @@ dependencies = [
[[package]]
name = "wordcraft-docbin"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"cfb",
"craft-doc-binary",
@@ -9195,7 +9195,7 @@ dependencies = [
[[package]]
name = "wordcraft-docx"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"base64 0.23.1",
"cfb",
@@ -9214,7 +9214,7 @@ dependencies = [
[[package]]
name = "wordcraft-engine"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"cfb",
"chrono",
@@ -9252,7 +9252,7 @@ dependencies = [
[[package]]
name = "wordcraft-fonts"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"brotli-decompressor 5.0.3",
"harfrust 0.13.3",
@@ -9267,7 +9267,7 @@ dependencies = [
[[package]]
name = "wordcraft-formats"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"chardetng",
"chrono",
@@ -9297,7 +9297,7 @@ dependencies = [
[[package]]
name = "wordcraft-geom"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"craft-image-codecs",
"craft-tiff",
@@ -9307,7 +9307,7 @@ dependencies = [
[[package]]
name = "wordcraft-layout"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"craft-metafile",
"craft-proof",
@@ -9327,7 +9327,7 @@ dependencies = [
[[package]]
name = "wordcraft-mcp"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"craft",
"craft-mcp-server",
@@ -9341,7 +9341,7 @@ dependencies = [
[[package]]
name = "wordcraft-pdf"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"chrono",
"craft-metafile",
@@ -9362,7 +9362,7 @@ dependencies = [
[[package]]
name = "wordcraft-render"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"craft-metafile",
"image",
@@ -9376,12 +9376,13 @@ dependencies = [
[[package]]
name = "wordcraft-ui-egui"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"cfb",
"chrono",
"craft",
"craft-fonts-build",
"craft-html",
"craft-ui-test-kit",
"craft-zip",
"eframe",
@@ -9409,7 +9410,7 @@ dependencies = [
[[package]]
name = "wordcraft-validate"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"craft-image-codecs",
"craft-tiff",
@@ -9424,7 +9425,7 @@ dependencies = [
[[package]]
name = "wordcraft-web"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"craft",
"eframe",
@@ -9444,7 +9445,7 @@ dependencies = [
[[package]]
name = "wordcraft-zotero"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"log",
"proptest",
@@ -9662,7 +9663,7 @@ checksum = "9440ea3e5aeabb0ac63af70daf835274065238cdd0cec83418f417eae38bacee"
[[package]]
name = "xtask"
version = "0.20.1"
version = "0.20.0"
dependencies = [
"serde",
"serde_json",
@@ -10052,4 +10053,4 @@ source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f
[[patch.unused]]
name = "hayro"
version = "0.7.1"
source = "git+https://github.com/storytold/craft-libs?rev=ad10c35ae545f0fb816364381a1a8154012b2359#ad10c35ae545f0fb816364381a1a8154012b2359"
source = "git+https://github.com/storytold/craft-libs?rev=5299d8d97dc04648dff735d1bd6f60bd18f10b35#5299d8d97dc04648dff735d1bd6f60bd18f10b35"
+40 -40
View File
@@ -13,7 +13,7 @@ run_slots = 3
test_threads = 4
[workspace.package]
version = "0.20.1"
version = "0.20.0"
edition = "2024"
license = "MIT OR Apache-2.0"
rust-version = "1.95"
@@ -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 = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-ssip = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", 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 = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0", default-features = false }
craft-ui-test-kit = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359" }
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 = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", 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 = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-docx = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-mcp-server = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-rtf = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0", features = ["doc"] }
craft-doc-binary = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-flow = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-odf = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0", features = ["text"] }
craft-markdown = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-html = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0", features = ["flow"] }
craft-latex = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-math = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0", features = ["detect"] }
craft-sheet = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-ods = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-xls = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-xlsx = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", version = "=0.1.0" }
craft-zip = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359", 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,14 +174,14 @@ 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 = "ad10c35ae545f0fb816364381a1a8154012b2359" }
hayro = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359" }
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "ad10c35ae545f0fb816364381a1a8154012b2359" }
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" }
+1
View File
@@ -27,6 +27,7 @@ const POLL_MS: i32 = 16;
pub fn install(ctx: egui::Context) -> Receiver<ControlRequest> {
let (queue, requests) = channel::<ControlRequest>();
let request: Request = Rc::new(move |method, params| {
let params = super::page_params::control_params(&method, params);
let (control, reply) = ControlRequest::new(method, params);
if queue.send(control).is_err() {
return Box::pin(async { json!({"ok": false, "error": "the app is not running"}) });
+2
View File
@@ -23,6 +23,8 @@ mod prefs;
mod api;
#[cfg(target_arch = "wasm32")]
mod host;
#[cfg(any(target_arch = "wasm32", test))]
mod page_params;
#[cfg(target_arch = "wasm32")]
mod web;
+55
View File
@@ -0,0 +1,55 @@
use serde_json::Value;
pub(super) fn control_params(method: &str, mut params: Value) -> Value {
// The page helper asks for inline data. A screenshot without a path already returns it.
if method == "ui.screenshot"
&& let Some(fields) = params.as_object_mut()
&& !fields.contains_key("path")
&& fields.get("data") == Some(&Value::Bool(true))
{
fields.remove("data");
}
params
}
#[cfg(test)]
mod tests {
use craft::automation::screenshot::ScreenshotParams;
use serde_json::json;
use super::control_params;
#[test]
fn page_helper_requests_the_same_capture_as_a_direct_request() {
for (helper, direct) in
[(json!({"data": true}), json!({})), (json!({"data": true, "region": [10, 20, 100, 200]}), json!({"region": [10, 20, 100, 200]}))]
{
let params = control_params("ui.screenshot", helper);
assert_eq!(params, direct);
assert!(ScreenshotParams::from_params(&params).is_ok());
}
}
#[test]
fn page_helper_keeps_screenshot_validation() {
for (input, expected) in [
(json!({"data": true, "region": [100, 200, 10, 20]}), json!({"region": [100, 200, 10, 20]})),
(json!({"data": true, "viewport": "other"}), json!({"viewport": "other"})),
(json!({"data": true, "path": "capture.png"}), json!({"data": true, "path": "capture.png"})),
(json!({"data": true, "path": null}), json!({"data": true, "path": null})),
(json!({"data": false}), json!({"data": false})),
(json!({"data": "true"}), json!({"data": "true"})),
] {
let params = control_params("ui.screenshot", input);
assert_eq!(params, expected);
assert!(ScreenshotParams::from_params(&params).is_err());
}
}
#[test]
fn direct_requests_keep_their_parameters() {
for (method, params) in [("ui.screenshot", json!({"path": "capture.png"})), ("file.new", json!({"data": true}))] {
assert_eq!(control_params(method, params.clone()), params);
}
}
}
+10 -2
View File
@@ -773,6 +773,10 @@ pub struct SectionProps {
pub page_w: f32,
pub page_h: f32,
pub landscape: bool,
/// Top and bottom margins, points. Negative is Word's exact margin (`w:pgMar` `w:top` /
/// `w:bottom` below zero, ECMA-376 §17.6.11; DOC `dyaTop` / `dyaBottom`): the text starts
/// (ends) at the absolute value from the page edge even when the header (footer) is taller,
/// and overlaps it.
pub margin_top: f32,
pub margin_bottom: f32,
pub margin_left: f32,
@@ -912,17 +916,21 @@ impl SectionProps {
pub fn text_width(&self) -> f32 {
(self.page_w - self.margin_left - self.margin_right - self.gutter).max(18.0)
}
/// Height of the text area between the margins, points (a negative, exact margin counts at
/// its size).
pub fn text_height(&self) -> f32 {
(self.page_h - self.margin_top - self.margin_bottom).max(18.0)
(self.page_h - self.margin_top.abs() - self.margin_bottom.abs()).max(18.0)
}
/// Swap to landscape/portrait (keeps margins relative to the paper as Word does: rotates them).
/// An exact (negative) top or bottom turns into a side at its size, as in Word: only the top
/// and bottom can be exact.
pub fn set_landscape(&mut self, on: bool) {
if on == self.landscape {
return;
}
self.landscape = on;
std::mem::swap(&mut self.page_w, &mut self.page_h);
let (t, b, l, r) = (self.margin_top, self.margin_bottom, self.margin_left, self.margin_right);
let (t, b, l, r) = (self.margin_top.abs(), self.margin_bottom.abs(), self.margin_left, self.margin_right);
if on {
self.margin_top = l;
self.margin_bottom = r;
+10 -8
View File
@@ -520,20 +520,22 @@ fn margins(s: &mut Session, v: &Value) -> CmdResult {
None => return Err(CmdError::Params(format!("unknown preset `{x}`"))),
},
None => {
// A negative margin given counts as zero; one left out keeps its value, so an exact
// (negative) top or bottom from the file stays exact when another side changes, as
// in Word.
let c = sect(s);
let given = |k: &str| p::f32(v, k).map(|m| m.max(0.0));
(
p::f32(v, "top").unwrap_or(c.margin_top),
p::f32(v, "bottom").unwrap_or(c.margin_bottom),
p::f32(v, "left").unwrap_or(c.margin_left),
p::f32(v, "right").unwrap_or(c.margin_right),
given("top").unwrap_or(c.margin_top),
given("bottom").unwrap_or(c.margin_bottom),
given("left").unwrap_or(c.margin_left.max(0.0)),
given("right").unwrap_or(c.margin_right.max(0.0)),
)
}
};
// Negative margins count as zero before the fit check, so one can't offset another.
let (t, b, l, r) = (t.max(0.0), b.max(0.0), l.max(0.0), r.max(0.0));
let gutter = p::f32(v, "gutter").map(|g| g.max(0.0));
let cur = sect(s);
if !margins_fit((cur.page_w, cur.page_h), (t, b, l, r), gutter.unwrap_or(cur.gutter)) {
if !margins_fit((cur.page_w, cur.page_h), (t.abs(), b.abs(), l, r), gutter.unwrap_or(cur.gutter)) {
return Err(CmdError::Params("margins leave no room for text".into()));
}
// A preset picks mirrored or not, as does `mirror` (Page Setup's Multiple pages); plain numbers
@@ -588,7 +590,7 @@ fn size(s: &mut Session, v: &Value) -> CmdResult {
sections
.iter()
.find(|(e, _)| *e == block)
.is_none_or(|(_, x)| margins_fit(oriented(x), (x.margin_top, x.margin_bottom, x.margin_left, x.margin_right), x.gutter))
.is_none_or(|(_, x)| margins_fit(oriented(x), (x.margin_top.abs(), x.margin_bottom.abs(), x.margin_left, x.margin_right), x.gutter))
};
if !selected_section_ends(s).into_iter().all(fits) {
return Err(CmdError::Params(MARGINS_DONT_FIT.into()));
+23
View File
@@ -433,3 +433,26 @@ fn page_number_format_keeps_or_clears_the_start() {
assert_eq!(back["pageNumFormat"], "decimal");
assert_eq!(back["pageNumStart"], 1);
}
/// An exact (negative) top or bottom margin survives Margins and Orientation: changing another
/// margin keeps it exact, and turning the page moves its size, as a plain margin, to the side it
/// goes to.
#[test]
fn exact_margins_survive_margins_and_orientation() {
let mut s = doc();
s.doc.last_section.margin_top = -60.0;
s.doc.last_section.margin_bottom = -40.0;
s.run("layout.margins", &json!({"left": 80.0})).unwrap();
let x = &s.doc.last_section;
assert_eq!((x.margin_top, x.margin_bottom, x.margin_left), (-60.0, -40.0, 80.0));
// A negative margin given still counts as zero.
s.run("layout.margins", &json!({"top": -30.0})).unwrap();
assert_eq!((s.doc.last_section.margin_top, s.doc.last_section.margin_bottom), (0.0, -40.0));
s.doc.last_section.margin_top = -60.0;
s.run("layout.orientation", &json!({"value": "landscape"})).unwrap();
let x = &s.doc.last_section;
assert!(x.margin_left >= 0.0 && x.margin_right >= 0.0, "{x:?}");
let mut sides = [x.margin_left, x.margin_right];
sides.sort_by(f32::total_cmp);
assert_eq!(sides, [40.0, 60.0], "the exact margins' sizes go to the sides");
}
+1 -1
View File
@@ -563,7 +563,7 @@ fn box_float_table_rect(
Anchor::Page => Some((0.0, s.page_h)),
Anchor::Margin => {
let mut reference = s.clone();
reference.margin_top = fr.margin_top.unwrap_or(s.margin_top);
reference.margin_top = fr.margin_top.unwrap_or(s.margin_top.abs());
Some((reference.margin_top, reference.text_height()))
}
_ => None,
+3 -3
View File
@@ -82,7 +82,7 @@ pub(crate) fn float_rect(frame: Option<PageFrame>, col: (f32, f32), y0: f32, w:
};
let page_y = |f: &PageFrame| {
let s = f.sect;
let top = f.margin_top.unwrap_or(s.margin_top);
let top = f.margin_top.unwrap_or(s.margin_top.abs());
match float.v_rel {
Anchor::Page => Some((0.0, s.page_h)),
Anchor::Margin => {
@@ -90,8 +90,8 @@ pub(crate) fn float_rect(frame: Option<PageFrame>, col: (f32, f32), y0: f32, w:
reference.margin_top = top;
Some((top, reference.text_height()))
}
Anchor::TopMargin | Anchor::InsideMargin => Some((0.0, s.margin_top)),
Anchor::BottomMargin | Anchor::OutsideMargin => Some((s.page_h - s.margin_bottom, s.margin_bottom)),
Anchor::TopMargin | Anchor::InsideMargin => Some((0.0, s.margin_top.abs())),
Anchor::BottomMargin | Anchor::OutsideMargin => Some((s.page_h - s.margin_bottom.abs(), s.margin_bottom.abs())),
_ => None,
}
};
+11 -3
View File
@@ -386,7 +386,7 @@ impl PageBuilder<'_> {
self.number = self.restart_at.take().unwrap_or_else(|| self.number.saturating_add(1));
let (w, h) = if self.web { (s.page_w, f32::MAX / 4.0) } else { (s.page_w, s.page_h) };
let bottom = self.body_bottom(body_top);
self.leading_floor = (s.page_h - s.margin_bottom).min(self.foot_top);
self.leading_floor = (s.page_h - s.margin_bottom.abs()).min(self.foot_top);
let body = Rect::new(s.margin_left + s.gutter, body_top, s.text_width(), (bottom - body_top).max(36.0));
let mut decor = Vec::new();
if !self.web {
@@ -473,8 +473,12 @@ impl PageBuilder<'_> {
self.bottom >= self.leading_floor - 0.01
}
/// The bottom of the body on a page started with its body at `body_top`: a footer taller than
/// the bottom margin pushes it up (Word: no gap), leaving it at least a little room.
/// the bottom margin pushes it up (Word: no gap), leaving it at least a little room. A
/// negative bottom margin is exact: the body ends at its size and the footer overlaps it.
fn body_bottom(&self, body_top: f32) -> f32 {
if self.sect.margin_bottom < 0.0 {
return self.sect.page_h + self.sect.margin_bottom;
}
// ODF keeps the footer's spacing above a footer too tall for the bottom margin.
let gap = if self.sect.footer_gap.is_finite() { self.sect.footer_gap.clamp(0.0, 1584.0) } else { 0.0 };
(self.sect.page_h - self.sect.margin_bottom).min((self.foot_top - gap).max(body_top + 36.0))
@@ -569,8 +573,12 @@ pub(crate) fn item_bottom(y: f32, para: &ParaLayout, l0: usize, l1: usize) -> Op
Some(y + l.top + l.height - f.top)
}
/// Where body text starts: the top margin, or below the header if it's taller.
/// Where body text starts: the top margin, or below the header if it's taller. A negative top
/// margin is exact (ECMA-376 §17.6.11): the text starts at its size and the header overlaps it.
pub(crate) fn body_top_for(ctx: &mut Ctx, sect: &SectionProps, header: Option<u32>) -> f32 {
if sect.margin_top < 0.0 {
return -sect.margin_top;
}
let Some(id) = header else { return sect.margin_top };
let Some(part) = ctx.doc.parts.get(&id) else { return sect.margin_top };
let blocks = part.blocks.clone();
+2 -2
View File
@@ -291,7 +291,7 @@ fn section_tops(ctx: &mut Ctx, hf: &HfLinks, (si, sect): (usize, &SectionProps),
let (heads, feet) = (hf.heads.set(si), hf.feet.set(si));
let hb = |i: Option<u32>| hf.defining_width(false, si, i);
let fb = |i: Option<u32>| hf.defining_width(true, si, i);
let body = if fixed { sect.margin_top } else { with_pct_base(ctx, hb(heads.default), |c| body_top_for(c, sect, heads.default)) };
let body = if fixed { sect.margin_top.abs() } else { with_pct_base(ctx, hb(heads.default), |c| body_top_for(c, sect, heads.default)) };
let first = if fixed || !sect.title_page { body } else { with_pct_base(ctx, hb(heads.first), |c| body_top_for(c, sect, heads.first)) };
let foot = if fixed { f32::MAX } else { with_pct_base(ctx, fb(feet.default), |c| foot_top_for(c, sect, feet.default)) };
let first_foot = if fixed || !sect.title_page { foot } else { with_pct_base(ctx, fb(feet.first), |c| foot_top_for(c, sect, feet.first)) };
@@ -625,7 +625,7 @@ pub(crate) fn layout_pass(
section_endnotes(&mut ctx, &mut pb, &mut endnotes, (sect, si, block));
}
if pb.pages.is_empty() {
pb.new_page(0, sect_ref.margin_top);
pb.new_page(0, sect_ref.margin_top.abs());
}
// The rest of the endnotes after the last paragraph.
let rest: Vec<u32> = endnotes.into_iter().map(|(id, _)| id).collect();
+1 -1
View File
@@ -395,7 +395,7 @@ fn place_floating_table(ctx: &mut Ctx, pb: &mut PageBuilder, tl: &table::TableLa
// The text a table anchored to it stands in: where the next paragraph starts.
let v_area = match f.v_rel {
Anchor::Page => (0.0, s.page_h),
Anchor::Margin => (s.margin_top, s.text_height()),
Anchor::Margin => (s.margin_top.abs(), s.text_height()),
_ => (pb.y, 0.0),
};
let x = float_table_x(pb, w, f, legacy, ctx.mirror);
+37
View File
@@ -1167,3 +1167,40 @@ fn a_page_reference_into_nested_text_boxes_stops_where_layout_does() {
let output = layout(&d, &mut LayoutCache::new(), &LayoutOptions { output_page_refs: true, ..Default::default() });
assert_eq!(shown_in(&output, 0, StoryRef::Body), ["2", "2", "9"]);
}
/// Word's exact margins: a negative top (bottom) margin starts (ends) the body at its size from
/// the page edge even when the header (footer) is taller, and the two overlap (ECMA-376
/// §17.6.11, `w:pgMar` below zero; DOC `dyaTop` / `dyaBottom`), so the same text fits on fewer
/// pages. Positive margins stay "at least": a taller header or footer pushes the body.
#[test]
fn negative_margins_are_exact_and_let_the_header_and_footer_overlap_the_body() {
crate::test_fonts();
let make = |top: f32, bottom: f32| {
let mut d = Document::from_text(&"Body line\n".repeat(100));
d.last_section.page_w = 595.3;
d.last_section.page_h = 841.9;
d.last_section.margin_top = top;
d.last_section.margin_bottom = bottom;
d.last_section.header = 36.0;
d.last_section.footer = 36.0;
let head = d.add_part(PartKind::Header, paras("Header line", 6));
let foot = d.add_part(PartKind::Footer, paras("Footer line", 6));
d.last_section.headers.default = Some(head);
d.last_section.footers.default = Some(foot);
let l = lay(&d);
let body = extent(&l.pages[0].items, StoryRef::Body).unwrap();
let header = extent(&l.pages[0].header, StoryRef::Part(head)).unwrap();
let footer = extent(&l.pages[0].footer, StoryRef::Part(foot)).unwrap();
(l.pages.len(), body, header, footer)
};
let (pages, body, header, footer) = make(-60.0, -60.0);
assert!(header.1 > 60.0 && footer.0 < 841.9 - 60.0, "the bands reach past the margins: {header:?} {footer:?}");
assert!((body.0 - 60.0).abs() < 0.5, "the body starts at the exact top margin, over the header: {body:?}");
assert!(
body.1 <= 841.9 - 60.0 + 0.01 && body.1 > footer.0,
"the body runs down to the exact bottom margin, over the footer: {body:?} {footer:?}"
);
let (at_least_pages, at_least_body, at_least_header, at_least_footer) = make(60.0, 60.0);
assert!(at_least_body.0 >= at_least_header.1 - 0.01 && at_least_body.1 <= at_least_footer.0 + 0.01, "{at_least_body:?}");
assert!(pages < at_least_pages, "exact margins: {pages} pages, at least: {at_least_pages}");
}
+1 -1
View File
@@ -21,7 +21,7 @@ pub(crate) fn unturned_sect(s: &SectionProps, body_top: f32) -> SectionProps {
v.page_w = s.page_h;
v.page_h = s.page_w;
v.gutter = 0.0;
let (top, right, bottom, left) = (body_top, s.margin_right, s.margin_bottom, s.margin_left + s.gutter);
let (top, right, bottom, left) = (body_top, s.margin_right, s.margin_bottom.abs(), s.margin_left + s.gutter);
// The unturned frame's (u, v) lands at (W - v, u) for `Down` and (v, H - u) for `Up`: its
// top edge is the real right edge (left for `Up`), its left edge the real top (bottom).
match s.text_direction {
+3 -2
View File
@@ -16,7 +16,8 @@ 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 = "ad10c35ae545f0fb816364381a1a8154012b2359" }
craft-html = { workspace = true }
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 +77,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 = "ad10c35ae545f0fb816364381a1a8154012b2359", features = ["subset"] }
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "5299d8d97dc04648dff735d1bd6f60bd18f10b35", features = ["subset"] }
serde_json = { workspace = true }
toml = "1"
+2 -2
View File
@@ -2,8 +2,8 @@ use super::services::Services;
use super::state::{AutoSaveBlock, PromptSave, keeps_everything};
use super::{
DEFAULT_TAB, MAX_DICTIONARY, MAX_RECENT, SaveInFlight, Session, Status, Value, WordApp, applied_font, canvas, chrome, crop, dialogs, documents,
file_dialogs, i18n, json, panes, paste_picture, printing, push_recent_font, read_aloud, recent_fonts_from, ribbon, system_clipboard, table_pen,
theme, updates_ui, window_ui, windows, zotero,
file_dialogs, i18n, json, panes, printing, push_recent_font, read_aloud, recent_fonts_from, ribbon, system_clipboard, table_pen, theme,
updates_ui, window_ui, windows, zotero,
};
use craft::platform::clock::monotonic_ms;
use craft::theme::ComponentSet;
+3 -13
View File
@@ -5,8 +5,8 @@ use craft::quit::{CloseAnswer, CloseScope};
use super::command_board::command_enabled;
use super::{
MAX_RECENT, SaveInFlight, Value, WordApp, applied_font, chrome, crop, dialogs, file_dialogs, i18n, json, keeps_everything, panes, paste_picture,
printing, push_recent_font, system_clipboard, table_pen, theme, zotero,
MAX_RECENT, SaveInFlight, Value, WordApp, applied_font, chrome, crop, dialogs, file_dialogs, i18n, json, keeps_everything, panes, printing,
push_recent_font, system_clipboard, table_pen, theme, zotero,
};
use crate::colors;
@@ -71,21 +71,11 @@ impl WordApp {
// PLAN: assumed shell-w8's `begin_closing(scope, documents, then, params) -> Result<Value, String>` opens the prompt.
return self.begin_closing(CloseScope::Close, vec![self.session.document_id()], id.to_string(), params);
}
// The ribbon and context-menu Paste commands send no text: read the system clipboard's, as
// Ctrl+V's paste event carries it (#584), and its HTML and RTF, which egui's paste event
// doesn't carry (#687).
// All ordinary Paste controls use the same system clipboard formats.
let mut params = params;
if let Some(r) = system_clipboard::fill(self, id, &mut params) {
return r;
}
// Paste without system clipboard text: a picture there is newer than our own copy (copying
// here replaces it with text), so it wins (#45).
if id == "edit.paste"
&& params.get("text").is_none()
&& let Some(r) = paste_picture::paste(self)
{
return r;
}
let applied = applied_font(id, &params);
let previous = std::mem::replace(&mut self.user_origin, true);
let r = self.execute_user(id, params);
+1
View File
@@ -46,6 +46,7 @@ mod navigation;
mod pages;
mod reading;
mod reading_metrics;
mod revision_tip;
pub(crate) mod rulers;
mod source;
mod story;
+15 -2
View File
@@ -9,6 +9,7 @@ use craft::ui::canvas::{CanvasTool, ToolAction, ToolContext, ToolPath, ToolPoint
use craft::ui::primitives::Draw;
use super::links::{field_showing_code, follow_link, is_generated_bookmark_link, link_under};
use super::revision_tip::revision_under;
use super::story::{enters_header_footer, in_text_box, part_kind, text_box_host};
use super::{CanvasState, DocLayout, PartKind, Pos, Pos2, StoryRef, WordApp, json};
use crate::objects::ObjectGesture;
@@ -163,12 +164,23 @@ impl<'a> PageTextTool<'a> {
let (page, x, y) = page_of(self.body.pages, pos)?;
let layout = &*self.layout;
// A linked picture or shape under the pointer comes first: it lies over the text (#5267).
let story = app.session.sel.focus.story;
// The text is the story under the pointer, as for the tracked change tip that follows.
let story = pointer_story(app, layout, page, x, y, app.session.sel.focus.story);
let link = crate::objects::link_at(app, layout, self.body, pos)
.or_else(|| layout.hit(page, x, y, story).and_then(|at| link_under(app, layout, page, x, y, &at)))?;
let target = if is_generated_bookmark_link(&link) { tl!("Current Document").to_string() } else { link };
Some(format!("{target}\n{}", crate::i18n::fmt(tl!("{key}+Click to follow link"), &[("key", self.link_key)])))
}
/// The tip for the tracked change under `pos`: its kind, author and time (#7887).
fn revision_tip(&self, pos: Pos2) -> Option<String> {
let (page, x, y) = page_of(self.body.pages, pos)?;
let layout = &*self.layout;
// The story under the pointer, as a click there takes it: a note or text box over the body.
let story = pointer_story(&*self.app, layout, page, x, y, self.app.session.sel.focus.story);
let at = layout.hit(page, x, y, story)?;
revision_under(&*self.app, layout, page, x, y, &at)
}
}
impl CanvasTool for PageTextTool<'_> {
@@ -249,7 +261,8 @@ impl CanvasTool for PageTextTool<'_> {
fn hover(&mut self, pointer: &ToolPointer, cx: &mut ToolContext<'_>) {
// PLAN: assumed `ToolContext::tip(&mut self, tip: impl Into<Tooltip>)` (canvas-w1, S-L238).
if let Some(tip) = self.link_tip(pointer.pos) {
// A link's tip comes first: following the link is what a click there can do.
if let Some(tip) = self.link_tip(pointer.pos).or_else(|| self.revision_tip(pointer.pos)) {
cx.tip(tip);
}
}
+90
View File
@@ -0,0 +1,90 @@
//! The hover tip on a tracked change (#7887): what kind of change it is, who made it and when.
use super::{DocLayout, Pos, WordApp};
use wordcraft_doc::props::CharProps;
use wordcraft_layout::display::MarkupOptions;
/// The tip for the tracked change under the pointer at (x, y) on `page`, where `pos` is the caret
/// position the point hits: its kind, its author and its time, a line each. Only changes the page
/// marks count: none with markup hidden, insertions, deletions and moves while Show Markup shows
/// them, formatting changes while it shows formatting. As with a link, the point must be on a
/// character, not beside, above or below it: on the changed character itself, or anywhere in the
/// text of a paragraph whose own formatting changed (its alignment, indents…) when the character
/// has no change of its own.
pub(super) fn revision_under(app: &WordApp, layout: &DocLayout, page: usize, x: f32, y: f32, pos: &Pos) -> Option<String> {
let session = &app.session;
if !session.view.show_markup {
return None;
}
let markup = &session.prefs.markup;
let doc = &session.doc;
let para = doc.para_at(pos)?;
let para_change = para.props.fmt_change.as_ref().filter(|_| markup.formatting).map(|c| (c.rev, tl!("Formatted")));
let at = wordcraft_geom::Point::new(x, y);
// The caret falls between characters: the one under the point is on either side of it.
[(pos.off, para.next_boundary(pos.off)), (para.prev_boundary(pos.off), pos.off)].into_iter().filter(|(a, b)| a < b).find_map(|(a, b)| {
let (rev, kind) = change_of(para.props_of_char(a), markup, |i| doc.move_name(Some(i)).is_some()).or(para_change)?;
let rev = doc.revisions.get(usize::try_from(rev).ok()?)?;
let (from, to) = (Pos { off: a, ..pos.clone() }, Pos { off: b, ..pos.clone() });
let hit = layout.selection_rects(doc, &from, &to, page).into_iter().any(|(pi, r)| pi == page && r.contains(at));
hit.then(|| tip(kind, &rev.author, &crate::local_time::revision_time(rev)))
})
}
/// The revision a character's marks point to and what to call it, when the markup shown marks it.
/// A deletion lies over an insertion it removes (inserted, then deleted by someone else): the
/// deletion is the change the page shows.
fn change_of(props: &CharProps, markup: &MarkupOptions, is_move: impl Fn(u32) -> bool) -> Option<(u32, &'static str)> {
if markup.insertions_deletions {
if let Some(i) = props.del {
return Some((i, if is_move(i) { tl!("Moved from") } else { tl!("Deleted") }));
}
if let Some(i) = props.ins {
return Some((i, if is_move(i) { tl!("Moved to") } else { tl!("Inserted") }));
}
}
props.fmt_change.as_ref().filter(|_| markup.formatting).map(|c| (c.rev, tl!("Formatted")))
}
/// The tip's lines: the change's kind, its author (or "Author" when the file names none, as the
/// balloons do) and its time, left out when the file gives none.
fn tip(kind: &str, author: &str, when: &str) -> String {
let author = if author.trim().is_empty() { tl!("Author") } else { author };
let mut lines = vec![kind, author];
if !when.is_empty() {
lines.push(when);
}
lines.join("\n")
}
#[cfg(test)]
mod tests {
use super::*;
use wordcraft_doc::props::PropChange;
/// A deletion over an insertion is the change shown; formatting counts only while the markup
/// shows formatting, and insertions and deletions only while it shows them.
#[test]
fn the_shown_markup_picks_the_change() {
let all = MarkupOptions { insertions_deletions: true, formatting: true, ..Default::default() };
let no_move = |_| false;
let both = CharProps { ins: Some(0), del: Some(1), ..Default::default() };
assert_eq!(change_of(&both, &all, no_move), Some((1, "Deleted")));
assert_eq!(change_of(&both, &all, |i| i == 1), Some((1, "Moved from")));
let inserted = CharProps { ins: Some(2), ..Default::default() };
assert_eq!(change_of(&inserted, &all, no_move), Some((2, "Inserted")));
assert_eq!(change_of(&inserted, &all, |_| true), Some((2, "Moved to")));
let formatted = CharProps { fmt_change: PropChange::boxed(3, CharProps::default()), ..Default::default() };
assert_eq!(change_of(&formatted, &all, no_move), Some((3, "Formatted")));
assert_eq!(change_of(&formatted, &MarkupOptions { formatting: false, ..all.clone() }, no_move), None);
assert_eq!(change_of(&inserted, &MarkupOptions { insertions_deletions: false, ..all.clone() }, no_move), None);
assert_eq!(change_of(&CharProps::default(), &all, no_move), None);
}
/// The tip's lines; an unnamed author reads "Author", and a missing time is left out.
#[test]
fn the_tip_names_kind_author_and_time() {
assert_eq!(tip("Inserted", "Ada", "2026-11-20 14:05"), "Inserted\nAda\n2026-11-20 14:05");
assert_eq!(tip("Deleted", " ", ""), "Deleted\nAuthor");
}
}
+15 -7
View File
@@ -69,12 +69,7 @@ pub(crate) fn page_rulers(app: &mut WordApp, ui: &mut Ui, out: &craft::pages::ui
// A section whose columns `column_drag` refuses shows its gaps without grips.
let gaps_draggable = cg.as_ref().is_none_or(|cg| super::column_ruler::draggable(&cg.sect));
let mut margins = Margins::uniform(0.0);
margins.top = f64::from(sect.margin_top);
margins.bottom = f64::from(sect.margin_bottom);
margins.left = f64::from(sect.margin_left);
margins.right = f64::from(sect.margin_right);
let edges = PageEdges::new(margins);
let edges = page_edges(&sect);
let mirrored = app.session.doc.settings.mirror_margins && page.number.is_multiple_of(2);
let unit = DocUnit::new(unit_kind(app.session.units()), 96.0);
let kind = ruler_align(app.canvas.tab_kind).unwrap_or_default();
@@ -260,8 +255,21 @@ fn indent_params(shown: &RulerValues, v: &RulerValues, col_x: f32, w: f32) -> Op
(!p.is_empty()).then_some(Value::Object(p))
}
/// The page's margins as the ruler shows and clamps them. An exact (negative) top or bottom margin (#7107) counts at
/// its size, where the layout puts the body's edge: it is shown there, and a drag of the opposite edge keeps an inch
/// of text beside it, as `layout.margins` checks it. Only a moved edge is sent back ([`margin_params`]), so the exact
/// margin stays exact unless it is the one dragged.
pub(super) fn page_edges(sect: &wordcraft_doc::section::SectionProps) -> PageEdges {
let mut margins = Margins::uniform(0.0);
margins.top = f64::from(sect.margin_top.abs());
margins.bottom = f64::from(sect.margin_bottom.abs());
margins.left = f64::from(sect.margin_left);
margins.right = f64::from(sect.margin_right);
PageEdges::new(margins)
}
/// `layout.margins` params for the margins `v` moved from `shown`.
fn margin_params(shown: &PageEdges, v: &PageEdges) -> Option<Value> {
pub(super) fn margin_params(shown: &PageEdges, v: &PageEdges) -> Option<Value> {
let (a, b) = (&shown.margins, &v.margins);
let mut p = Map::new();
for (key, was, now) in [("left", a.left, b.left), ("right", a.right, b.right), ("top", a.top, b.top), ("bottom", a.bottom, b.bottom)] {
+124
View File
@@ -137,6 +137,42 @@ fn dragging_the_bottom_margin_on_the_ruler_keeps_the_view_and_follows_the_pointe
assert_eq!(h.state().session.undo_depth(), depth + 1, "one undo step for the drag");
}
/// #7107: an exact (negative) top or bottom margin counts at its size on the vertical ruler, so a
/// drag of the opposite edge keeps an inch of text beside it and `layout.margins` accepts it, and
/// the exact margin, not dragged, stays exact.
#[test]
fn ruler_margin_drags_clamp_against_an_exact_opposite_margin() {
use crate::canvas::rulers::{margin_params, page_edges};
use craft::pages::ui::{MarginEdge, MarginRules, dragged_margin};
let s = wordcraft_doc::section::SectionProps {
page_w: 612.0,
page_h: 792.0,
margin_left: 72.0,
margin_right: 72.0,
margin_top: -72.0,
margin_bottom: -72.0,
gutter: 0.0,
..Default::default()
};
let rules = MarginRules::new((612.0, 792.0), page_edges(&s));
assert_eq!(dragged_margin(MarginEdge::Bottom, 72.0, &rules).points, 792.0 - 72.0 - 72.0);
assert_eq!(dragged_margin(MarginEdge::Top, 720.0, &rules).points, 792.0 - 72.0 - 72.0);
// Through the command: the clamped value fits beside the exact top margin, which stays exact.
let mut app = WordApp::new(wordcraft_engine::Session::new(wordcraft_doc::Document::new()), Default::default());
app.session.doc.last_section.margin_top = -72.0;
let sect = wordcraft_engine::cmd::page::sect(&app.session);
let shown = page_edges(&sect);
let moved = shown.with(dragged_margin(MarginEdge::Bottom, 72.0, &MarginRules::new((f64::from(sect.page_w), f64::from(sect.page_h)), shown)));
let p = margin_params(&shown, &moved).expect("the bottom margin moved");
assert!(p.get("top").is_none(), "the exact top margin is not sent: {p}");
app.run("layout.margins", p).unwrap();
let after = wordcraft_engine::cmd::page::sect(&app.session);
assert_eq!(after.margin_top, -72.0);
assert!(after.page_h - after.margin_top.abs() - after.margin_bottom >= 72.0 - 0.01);
}
/// #1878: in Multiple Pages both rulers belong to the caret's page: the margin splitters of the
/// horizontal ruler lie over that page's width and the vertical ruler's over its height, and
/// they follow the caret to another page of the row and to the next row.
@@ -889,3 +925,91 @@ fn a_right_click_keeps_selected_cells_only_on_them() {
assert_menu(&h, &["Split Cells"], true);
assert_menu(&h, &["Merge Cells"], false);
}
// ---------------------------------------------------------------------------------------
// Tracked change tips
// ---------------------------------------------------------------------------------------
/// #7887: resting the pointer on a tracked insertion shows a tip with the change's kind, its
/// author and its time; beside the change, or with markup hidden, there is none.
#[test]
fn hovering_a_tracked_change_shows_its_author_and_time() {
let mut a = WordApp::new(wordcraft_engine::Session::new(wordcraft_doc::Document::from_text("Plain words here")), Default::default());
a.session.author = "Ada Reviewer".into();
a.run("caret.docStart", json!({})).unwrap();
a.run("review.trackChanges", json!({"value": true})).unwrap();
a.run("text.insert", json!({"text": "Inserted "})).unwrap();
assert_eq!(a.session.doc.revisions.len(), 1, "one tracked insertion");
// A fixed time with no UTC time beside it, as a file's change has, so it shows as written
// whatever the machine's zone (`local_time` covers the changes made here).
a.session.doc.revisions[0].date = "2026-11-20T14:05:00Z".into();
a.session.doc.revisions[0].date_utc = None;
let mut h = window(a);
let point_at = |h: &mut H, off: usize| {
let c = h.state_mut().session.layout().caret(&Pos { story: StoryRef::Body, path: wordcraft_doc::Path::top(0), off }).unwrap();
let at = screen(h, c.x, c.top + c.height / 2.0);
h.event(egui::Event::PointerMoved(at));
super::rest_for_tip(h);
};
let tips = |h: &H| h.query_all_by_label_contains("Inserted Ada Reviewer 2026-11-20 14:05").count();
// Between "Inserted" and its "e", then on "words", which was there before tracking began.
point_at(&mut h, 2);
assert!(tips(&h) > 0, "the inserted text's tip says it was inserted, by whom and when");
point_at(&mut h, "Inserted Plain w".len());
assert_eq!(tips(&h), 0, "text that wasn't changed has no tip");
h.state_mut().session.view.show_markup = false;
point_at(&mut h, 2);
assert_eq!(tips(&h), 0, "with markup hidden the change isn't marked, so it has no tip");
}
/// #7887: a paragraph whose own formatting changed while tracking (here its alignment) shows a
/// Formatted tip on its text, while the markup shows formatting.
#[test]
fn hovering_a_paragraph_with_tracked_formatting_shows_formatted() {
let mut a = WordApp::new(wordcraft_engine::Session::new(wordcraft_doc::Document::from_text("A centred line")), Default::default());
a.session.author = "Ada Reviewer".into();
a.run("review.trackChanges", json!({"value": true})).unwrap();
a.run("para.alignCenter", json!({})).unwrap();
assert!(a.session.doc.body[0].as_para().is_some_and(|p| p.props.fmt_change.is_some()), "the alignment is a tracked change");
let mut h = window(a);
let point_at = |h: &mut H| {
let c = h.state_mut().session.layout().caret(&Pos { story: StoryRef::Body, path: wordcraft_doc::Path::top(0), off: 4 }).unwrap();
let at = screen(h, c.x, c.top + c.height / 2.0);
h.event(egui::Event::PointerMoved(at));
super::rest_for_tip(h);
};
let tips = |h: &H| h.query_all_by_label_contains("Formatted Ada Reviewer").count();
point_at(&mut h);
assert!(tips(&h) > 0, "the paragraph's text shows its formatting change");
h.state_mut().session.prefs.markup.formatting = false;
// The canvas asks for a tip again only when the pointer moves: away to the toggle and back.
h.event(egui::Event::PointerGone);
point_at(&mut h);
assert_eq!(tips(&h), 0, "with formatting markup off the change isn't marked, so it has no tip");
}
/// #7887 review: a link in a footnote shows its tip while the caret is in the body. The hover
/// looks in the story under the pointer, so the link's tip still comes before the tracked
/// change tip there.
#[test]
fn a_footnote_link_shows_its_tip_with_the_caret_in_the_body() {
let mut a = WordApp::new(wordcraft_engine::Session::new(wordcraft_doc::Document::from_text("Body text")), Default::default());
a.run("caret.docEnd", json!({})).unwrap();
a.run("review.trackChanges", json!({"value": true})).unwrap();
a.run("references.footnote", json!({"text": "Note link"})).unwrap();
let note = a.session.sel.focus.story;
let pos = |off: usize| json!({"story": note, "path": [0], "off": off});
a.run("select.range", json!({"anchor": pos(5), "focus": pos(9)})).unwrap();
a.run("insert.link", json!({"url": "https://example.com/note"})).unwrap();
a.run("caret.set", json!({"pos": {"block": 0, "off": 2}})).unwrap();
assert_eq!(a.session.sel.focus.story, StoryRef::Body);
// The whole page in the window, footnote area and all.
a.run("view.zoom", json!({"value": 40})).unwrap();
let mut h = window(a);
let c = h.state_mut().session.layout().caret(&Pos { story: note, path: wordcraft_doc::Path::top(0), off: 7 }).unwrap();
let at = screen(&mut h, c.x, c.top + c.height / 2.0);
h.event(egui::Event::PointerMoved(at));
super::rest_for_tip(&mut h);
assert!(h.query_all_by_label_contains("https://example.com/note").count() > 0, "the footnote's link shows its tip (pointer at {at:?})");
assert_eq!(h.query_all_by_label_contains("Inserted ").count(), 0, "not the tracked insertion's tip");
}
+21 -3
View File
@@ -25,6 +25,10 @@ pub(crate) struct PaperLabels {
/// `layout.size` keeps the section's orientation; `layout.orientation` then turns the page and
/// its margins to what the dialog shows. A size equal to the opened one (either way round,
/// within 0.01 pt) doesn't run `layout.size`.
/// An exact (negative) top or bottom the dialog still shows as the section has it, on a page
/// not turned, is left out of `layout.margins`, which keeps a side left out (a negative given
/// counts as zero): changing another side keeps it exact, as the ruler does. The fit checks
/// count an exact margin at its size.
pub(super) fn page_layout_commands(
app: &WordApp,
(paper, was): ((f32, f32), (f32, f32)),
@@ -33,6 +37,20 @@ pub(super) fn page_layout_commands(
) -> Result<Vec<(String, Value)>, &'static str> {
use wordcraft_engine::cmd::page::{MARGINS_DONT_FIT, margins_fit, sect};
let cur = sect(&app.session);
let kept = |shown: f32, now: f32| landscape == cur.landscape && now < 0.0 && shown == now;
let (keep_top, keep_bottom) = (kept(m.0, cur.margin_top), kept(m.1, cur.margin_bottom));
let sizes = |(t, b, l, r): (f32, f32, f32, f32)| (t.abs(), b.abs(), l, r);
// `layout.margins` with the sides it sets: all but the exact ones kept.
let set_margins = |(t, b, l, r): (f32, f32, f32, f32)| {
let mut v = json!({"top": t, "bottom": b, "left": l, "right": r});
for (keep, k) in [(keep_top, "top"), (keep_bottom, "bottom")] {
if keep && let Some(o) = v.as_object_mut() {
o.remove(k);
}
}
("layout.margins".to_string(), v)
};
let m = sizes(m);
if !margins_fit(paper, m, cur.gutter) {
return Err(MARGINS_DONT_FIT);
}
@@ -41,8 +59,8 @@ pub(super) fn page_layout_commands(
let new_size = (w0 - w1).abs() >= 0.01 || (h0 - h1).abs() >= 0.01;
let size = ("layout.size".to_string(), json!({"width": paper.0, "height": paper.1}));
let orientation = ("layout.orientation".to_string(), json!({"value": if landscape { "landscape" } else { "portrait" }}));
let margins = ("layout.margins".to_string(), json!({"top": m.0, "bottom": m.1, "left": m.2, "right": m.3}));
let old_margins = (cur.margin_top, cur.margin_bottom, cur.margin_left, cur.margin_right);
let margins = set_margins(m);
let old_margins = sizes((cur.margin_top, cur.margin_bottom, cur.margin_left, cur.margin_right));
Ok(if !new_size || margins_fit(turned(cur.landscape, paper), old_margins, cur.gutter) {
let mut v = if new_size { vec![size] } else { Vec::new() };
v.extend([orientation, margins]);
@@ -50,7 +68,7 @@ pub(super) fn page_layout_commands(
} else if margins_fit(turned(landscape, (cur.page_w, cur.page_h)), m, cur.gutter) {
vec![orientation, margins, size]
} else {
vec![orientation, ("layout.margins".to_string(), json!({"top": 0.0, "bottom": 0.0, "left": 0.0, "right": 0.0})), size, margins]
vec![orientation, set_margins((0.0, 0.0, 0.0, 0.0)), size, margins]
})
}
+21
View File
@@ -1140,6 +1140,27 @@ fn page_setup_refuses_margins_that_dont_fit_and_applies_smaller_ones_first() {
assert_eq!((s.page_w.round(), s.page_h.round(), s.margin_left.round(), s.margin_top.round()), (100.0, 500.0, 18.0, 18.0));
}
/// #7108: an exact (negative) top or bottom margin Page Setup's OK didn't change stays exact
/// when another side changes, as with the ruler and `layout.margins`; one changed in the
/// dialog takes the value shown.
#[test]
fn page_setup_keeps_an_exact_margin_it_didnt_change() {
let mut h = app_harness(app_with("Page"));
h.run_steps(2);
let sect = |h: &egui_kittest::Harness<'_, WordApp>| wordcraft_engine::cmd::page::sect(&h.state().session);
{
let x = &mut h.state_mut().session.doc.last_section;
(x.margin_top, x.margin_bottom) = (-60.0, -40.0);
}
page_setup(&mut h, |f| f.margins.left = 80.0);
assert!(!is_open(h.state(), "pageSetup"));
let x = sect(&h);
assert_eq!((x.margin_top, x.margin_bottom, x.margin_left), (-60.0, -40.0, 80.0), "the exact margins kept");
page_setup(&mut h, |f| f.margins.top = 50.0);
let x = sect(&h);
assert_eq!((x.margin_top, x.margin_bottom, x.margin_left), (50.0, -40.0, 80.0), "the changed one set, the other kept");
}
/// #1433: one OK in Page Setup is one undo step, whichever order its commands run in (the
/// size first; the margins first; margins of 0 in between), and Undo restores the section.
#[test]
+3 -19
View File
@@ -1,7 +1,6 @@
// PLAN: the Insert key has no editor input, so the overtype switch is the shortcut layer's (shell-w6).
use craft::behavior::editor::{EditorInput, SurroundingUnit};
use craft::behavior::intent::{EditCommand, Granularity, MoveMods, NavMove};
use craft::platform::clipboard::{HTML, RGBA8, RTF, URI_LIST};
use craft::ui::canvas::ToolPass;
use craft::ui::runtime::commands::{ClipItem, ClipboardHandle};
@@ -633,7 +632,9 @@ fn edit_command(app: &mut WordApp, ctx: &egui::Context, cmd: EditCommand) {
let _ = app.run("edit.copy", json!({}));
}
}
EditCommand::Paste => paste(app, ctx),
EditCommand::Paste => {
let _ = app.run("edit.paste", json!({}));
}
EditCommand::SelectAll => {
let _ = app.run("select.all", json!({}));
}
@@ -650,23 +651,6 @@ fn edit_command(app: &mut WordApp, ctx: &egui::Context, cmd: EditCommand) {
}
}
/// Paste from the clipboard: copied picture files insert as pictures (#45), text, rich text
/// (HTML/RTF) and a clipboard picture go through `edit.paste`.
fn paste(app: &mut WordApp, ctx: &egui::Context) {
let clip = ClipboardHandle::of(ctx);
let text = clip.read_text().ok().flatten();
if text.is_none() && !clip.has(&[RGBA8, URI_LIST, HTML, RTF]) {
return;
}
if let Some(t) = &text
&& crate::paste_picture::paste_named_files(app, t)
{
return;
}
let params = text.map_or_else(|| json!({}), |t| json!({"text": t}));
let _ = app.run("edit.paste", params);
}
/// Escape: the nearest thing that takes it first (a painter, a pen, a table pen, an object, a text
/// box, a header), then Focus or Full Screen.
fn cancel(app: &mut WordApp, ctx: &egui::Context) {
+31 -12
View File
@@ -452,19 +452,33 @@ fn mod_v_released_mod_first_pastes_the_clipboard_picture() {
assert_eq!(body(h.state()), "external");
assert!(is_bold(&mut h), "Mod+V keeps the HTML's formatting");
let mut h = picture_app();
let mut h = alt_frame_app();
let before = h.state().session.doc.clone();
let url = "https://example.test/picture.png";
offer(
&h,
vec![
ClipItem::Image(std::sync::Arc::new(egui::ColorImage::from_rgba_unmultiplied([4, 4], &[200u8; 4 * 4 * 4]))),
ClipItem::Html(format!(r#"<img src="{url}">"#).into()),
ClipItem::Text(url.into()),
],
);
mods_frame(&mut h, ctrl, vec![key_event(Key::ControlLeft, true, ctrl), key_event(Key::V, true, ctrl)]);
mods_frame(&mut h, Modifiers::NONE, vec![key_event(Key::ControlLeft, false, Modifiers::NONE)]);
mods_frame(&mut h, Modifiers::NONE, vec![key_event(Key::V, false, Modifiers::NONE)]);
assert_eq!(pictures(h.state_mut()), 1);
run(&mut h, "edit.undo", json!({}));
assert!(before.same_content(&h.state().session.doc), "one Undo restores the document before paste");
assert_eq!(pictures(h.state_mut()), 0);
// A plain V afterwards is not a paste.
mods_frame(&mut h, Modifiers::NONE, vec![key_event(Key::V, true, Modifiers::NONE)]);
mods_frame(&mut h, Modifiers::NONE, vec![key_event(Key::V, false, Modifiers::NONE)]);
assert_eq!(pictures(h.state_mut()), 1);
assert_eq!(pictures(h.state_mut()), 0);
}
/// #5859: Mod+V admits a rich-only clipboard (HTML or RTF with no plain-text or picture flavor)
/// and still routes an image+HTML clipboard with no plain-text flavor to picture paste.
/// #5859: Mod+V admits a rich-only clipboard (HTML or RTF with no plain-text or picture flavor).
/// With no plain text, a single-image HTML offer pastes its bitmap, while a formatted selection
/// offered beside a bitmap keeps its formatting.
#[test]
fn mod_v_pastes_rich_only_clipboard_and_preserves_picture_routing() {
let ctrl = mod_held();
@@ -483,19 +497,24 @@ fn mod_v_pastes_rich_only_clipboard_and_preserves_picture_routing() {
assert_eq!(body(h.state()), "rtf-only", "Mod+V pastes RTF-only clipboard");
assert!(is_bold(&mut h), "RTF-only paste keeps formatting");
let image = || ClipItem::Image(std::sync::Arc::new(egui::ColorImage::from_rgba_unmultiplied([4, 4], &[200u8; 4 * 4 * 4])));
let img = r#"<img src="https://example.test/picture.png">"#;
let mut h = alt_frame_app();
offer(
&h,
vec![
ClipItem::Image(std::sync::Arc::new(egui::ColorImage::from_rgba_unmultiplied([4, 4], &[200u8; 4 * 4 * 4]))),
ClipItem::Html("<p><b>fallback</b></p>".into()),
],
);
offer(&h, vec![image(), ClipItem::Html(img.into())]);
mods_frame(&mut h, ctrl, vec![key_event(Key::V, true, ctrl)]);
mods_frame(&mut h, Modifiers::NONE, vec![key_event(Key::V, false, Modifiers::NONE)]);
assert_eq!(pictures(h.state_mut()), 1, "image+HTML with no plain text routes to picture paste");
assert_eq!(pictures(h.state_mut()), 1, "a single-image HTML offer with no plain text pastes its bitmap");
assert_eq!(body(h.state()), "", "picture paste does not fall back to HTML text");
let mut h = alt_frame_app();
offer(&h, vec![image(), ClipItem::Html(format!("<p><b>fallback</b>{img}</p>").into())]);
mods_frame(&mut h, ctrl, vec![key_event(Key::V, true, ctrl)]);
mods_frame(&mut h, Modifiers::NONE, vec![key_event(Key::V, false, Modifiers::NONE)]);
assert_eq!(pictures(h.state_mut()), 0, "a formatted selection with no plain text is not replaced by its bitmap");
assert_eq!(body(h.state()), "fallback");
assert!(is_bold(&mut h), "the formatted selection keeps its bold");
let dir = std::env::temp_dir().join(format!("wc-mod-v-uri-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let png = dir.join("clip.png");
+35
View File
@@ -29,6 +29,19 @@ pub(crate) fn comment_time(c: &wordcraft_doc::Comment) -> String {
stamp(&c.date, c.date_utc.as_deref(), offset_minutes)
}
/// A tracked change's time for its hover tip, read as [`comment_time`] reads a comment: the UTC
/// time (`date_utc`, Word's `w16du:dateUtc`, which WordCraft keeps for the changes it makes) wins
/// and shows in local time. Without it (`w:date` only), Word writes local time there with a `Z`
/// it doesn't mean and shows it as written, so it shows as written here too; a time with an
/// offset (`±HH:MM`) is converted. Empty when it isn't a date.
pub(crate) fn revision_time(r: &wordcraft_doc::Revision) -> String {
revision_stamp(r, offset_minutes)
}
fn revision_stamp(r: &wordcraft_doc::Revision, offset: impl Fn(i64) -> i32) -> String {
stamp(&r.date, r.date_utc.as_deref(), offset)
}
fn stamp(date: &str, date_utc: Option<&str>, offset: impl Fn(i64) -> i32) -> String {
let utc = date_utc.and_then(parse).filter(|t| t.timed).map(|t| Time { zone: Some(t.zone.unwrap_or(0)), ..t });
let local_date = || parse(date).map(|t| if date.trim_end().ends_with(['Z', 'z']) { Time { zone: None, ..t } } else { t });
@@ -185,6 +198,28 @@ mod tests {
assert_eq!(stamp("2026-10-12Z", Some("2026-10-12"), |_| -4 * 60), "2026-10-12");
}
/// A change WordCraft makes keeps its UTC time, so its tip shows the user's local time, here
/// two hours east of UTC; a change from a file with only a `Z` date still shows as written
/// (#7887).
#[test]
fn changes_made_here_show_in_local_time() {
let utc_plus_2 = |_: i64| 2 * 60;
let made = wordcraft_engine::cmd::made_revision(wordcraft_doc::RevisionKind::Insert, "Ada".into(), "2026-11-20T12:05:00Z".into());
assert_eq!(revision_stamp(&made, utc_plus_2), "2026-11-20 14:05");
let imported = wordcraft_doc::Revision::new(wordcraft_doc::RevisionKind::Insert, "Ada", "2026-11-20T12:05:00Z");
assert_eq!(revision_stamp(&imported, utc_plus_2), "2026-11-20 12:05");
}
/// A tracked change from a file with only its `w:date` (#7887): shown as written, `Z` or not,
/// as Word shows it.
#[test]
fn revision_times_show_as_written() {
let at = |date: &str| revision_time(&wordcraft_doc::Revision::new(wordcraft_doc::RevisionKind::Insert, "Ada", date));
assert_eq!(at("2026-11-20T14:05:00Z"), "2026-11-20 14:05");
assert_eq!(at("2026-11-20"), "2026-11-20");
assert_eq!(at("not a date"), "");
}
/// Whatever a file holds, a stamp is a date or nothing, never a panic.
#[test]
fn hostile_times_show_nothing() {
+92 -22
View File
@@ -10,6 +10,7 @@ use std::path::{Path, PathBuf};
// PLAN(app-hub): the `craft` facade dependency of ui-egui (`craft::platform` = craft-platform), as in system_clipboard.rs
use craft::platform::clipboard::ClipboardError;
use craft::ui::runtime::commands::ClipboardHandle;
use serde_json::{Value, json};
use crate::{WordApp, system_clipboard};
@@ -77,27 +78,16 @@ fn paste_files(app: &mut WordApp, files: Vec<PathBuf>) -> Option<Result<Value, S
Some(r)
}
/// Paste the picture on the system clipboard: copied picture files, else its bitmap. `None` when
/// there is none (or no clipboard): the caller pastes as usual.
pub(crate) fn paste(app: &mut WordApp) -> Option<Result<Value, String>> {
/// Paste copied picture files, or the bitmap if allowed and there are no copied files.
pub(crate) fn paste(app: &mut WordApp, allow_bitmap: bool) -> Option<Result<Value, String>> {
let clip = system_clipboard::handle(app)?;
let r = match clip.read_files().ok().flatten().filter(|f| !f.is_empty()) {
Some(files) => paste_files(app, files)?,
None => match clip.read_image() {
None if !allow_bitmap => return None,
None => match bitmap_png(&clip) {
Ok(Some(png)) => return Some(insert_bitmap(app, &png)),
Ok(None) => return None,
Ok(Some(image)) => match png_from_rgba(image.width as usize, image.height as usize, image.rgba) {
Ok(png) => app.execute("insert.picture", json!({"data": wordcraft_engine::cmd::insert::base64_encode(&png)})),
Err(e) => {
log::warn!("clipboard picture: {e}");
app.status(e.clone());
Err(e)
}
},
Err(e) => {
let e = match e {
ClipboardError::TooLarge { .. } => "the clipboard picture is too large to paste".to_string(),
e => crate::i18n::fmt(tl!("The picture on the clipboard couldn't be read: {error}"), &[("error", &e.to_string())]),
};
log::warn!("clipboard picture: {e}");
app.status(e.clone());
Err(e)
@@ -109,6 +99,21 @@ pub(crate) fn paste(app: &mut WordApp) -> Option<Result<Value, String>> {
Some(r)
}
/// Encode the bounded native bitmap through the same path for ordinary and mixed clipboard pastes.
pub(crate) fn bitmap_png(clip: &ClipboardHandle) -> Result<Option<Vec<u8>>, String> {
let image = clip.read_image().map_err(|e| match e {
ClipboardError::TooLarge { .. } => "the clipboard picture is too large to paste".to_string(),
e => crate::i18n::fmt(tl!("The picture on the clipboard couldn't be read: {error}"), &[("error", &e.to_string())]),
})?;
image.map(|image| png_from_rgba(image.width as usize, image.height as usize, image.rgba)).transpose()
}
pub(crate) fn insert_bitmap(app: &mut WordApp, png: &[u8]) -> Result<Value, String> {
let r = app.execute("insert.picture", json!({"data": wordcraft_engine::cmd::insert::base64_encode(png)}));
app.select_inserted_picture(&r);
r
}
/// The picture on the system clipboard as PNG (or the first copied picture file's bytes), for
/// Paste Special to offer. `None` when there is none, or it is too large or unreadable.
pub(crate) fn clipboard_png(app: &WordApp) -> Option<Vec<u8>> {
@@ -127,12 +132,6 @@ fn read_picture_file(path: &Path, limit: u64) -> Option<Vec<u8>> {
wordcraft_engine::io::read_regular_file_within(path, limit)
}
/// Paste text naming copied picture files: insert the pictures when the clipboard holds those
/// files. False leaves the text to the usual paste.
pub(crate) fn paste_named_files(app: &mut WordApp, text: &str) -> bool {
names_picture_files(text) && paste(app).is_some()
}
#[cfg(test)]
mod tests {
use super::*;
@@ -189,6 +188,16 @@ mod tests {
assert!(!names_picture_files("see /tmp/b.png") && !names_picture_files("notes.txt") && !names_picture_files(""));
}
#[test]
fn bitmap_only_paste_inserts_a_picture_during_equation_editing() {
let mut app = app_holding(&[rgba8(4, 4, 200)]);
app.run("insert.equation", json!({"linear": "abc"})).unwrap();
assert!(app.session.math.is_some());
app.run("edit.paste", json!({})).unwrap();
let objects = app.session.run("arrange.selectionPane", &json!({})).unwrap();
assert!(objects.as_array().is_some_and(|objects| objects.iter().any(|object| object["kind"] == "picture")));
}
/// Text on the clipboard wins over a picture beside it (#584).
#[test]
fn paste_without_text_reads_the_system_clipboard() {
@@ -203,6 +212,67 @@ mod tests {
assert!(r["formats"].as_array().is_some_and(|f| f.iter().any(|x| x["id"] == "text")), "{r}");
}
#[test]
fn ordinary_paste_prefers_pixels_for_a_single_image_offer() {
use craft::platform::clipboard::HTML;
let url = "https://example.test/picture.png";
let html = format!(r#"<meta http-equiv="content-type" content="text/html; charset=utf-8"><img src="{url}" alt="A &amp; B">"#);
let url_and_alt = format!("{url}\r\nA & B");
for text in [url, "A & B", &url_and_alt] {
let mut app = app_holding(&[Flavor::text(text), Flavor::new(HTML, html.as_bytes().to_vec()), rgba8(4, 4, 200)]);
app.run("edit.paste", json!({})).unwrap();
assert_eq!(pictures(&mut app), 1);
assert!(!app.session.doc.plain_text(wordcraft_doc::StoryRef::Body).contains(text));
app.run("edit.undo", json!({})).unwrap();
assert_eq!(pictures(&mut app), 0);
}
}
#[test]
fn single_image_offer_with_rtf_prefers_readable_pixels() {
use craft::platform::clipboard::{HTML, RGBA8, RTF};
let url = "https://example.test/picture.png";
let html = Flavor::new(HTML, format!(r#"<img src="{url}">"#).into_bytes());
let rtf = Flavor::new(RTF, br"{\rtf1\ansi Image fallback}".to_vec());
let malformed = Flavor::new(RGBA8, vec![1, 0, 0, 0, 1, 0, 0, 0]);
let paste = |bitmap| {
let mut app = app_holding(&[Flavor::text(url), html.clone(), rtf.clone(), bitmap]);
app.run("edit.paste", json!({})).unwrap();
app
};
assert_eq!(pictures(&mut paste(rgba8(4, 4, 200))), 1);
let mut app = paste(malformed);
assert_eq!(pictures(&mut app), 0);
assert_eq!(app.session.doc.plain_text(wordcraft_doc::StoryRef::Body), "Image fallback");
}
#[test]
fn ordinary_paste_preserves_urls_rich_selections_and_unreadable_images() {
use craft::platform::clipboard::{HTML, RGBA8};
let url = "https://example.test/picture.png";
let img = format!(r#"<img src="{url}">"#);
let rich = format!("<p><strong>Caption</strong>{img}</p>");
let good = rgba8(4, 4, 200);
let bad = Flavor::new(RGBA8, vec![1, 0, 0, 0, 1, 0, 0, 0]);
for (markup, bitmap, text, expected) in
[(None, good.clone(), url, url), (Some(rich.as_str()), good, "Caption", "Caption"), (Some(img.as_str()), bad, url, url)]
{
let mut flavors = vec![Flavor::text(text), bitmap];
if let Some(markup) = markup {
flavors.push(Flavor::new(HTML, markup.as_bytes().to_vec()));
}
let mut app = app_holding(&flavors);
app.run("edit.paste", json!({})).unwrap();
assert_eq!(pictures(&mut app), 0);
assert_eq!(app.session.doc.plain_text(wordcraft_doc::StoryRef::Body), expected);
}
}
/// Copied picture files insert as pictures, not as their paths; a folder entry and a
/// non-picture file are skipped, and files that aren't pictures leave Paste to the usual path.
#[test]
+74 -7
View File
@@ -47,30 +47,68 @@ fn read_markup(clip: &ClipboardHandle, mime: &str) -> Option<String> {
Some(String::from_utf8_lossy(&flavor.data).into_owned()).filter(|t| !t.trim().is_empty())
}
/// A browser image copy can carry a source address or the image's alt text alongside the bitmap.
fn single_image_offer(html: &str, text: Option<&str>) -> bool {
use craft_html::{Lexer, Token, unescape};
use wordcraft_engine::cmd::paste::html_fragment;
let fragment = html_fragment(html);
if fragment.len() > 64 << 10 {
return false;
}
let mut image = None;
let wrapper = |name: &str| matches!(name, "html" | "body" | "head" | "div" | "span" | "p");
for token in Lexer::new(fragment) {
match token {
Token::Start(tag) if tag.name == "img" && image.is_none() => {
image = Some((tag.attr("src").unwrap_or_default(), tag.attr("alt").unwrap_or_default()));
}
Token::Start(tag) if wrapper(&tag.name) && tag.attrs.is_empty() => {}
Token::Start(tag) if tag.name == "meta" && tag.attrs.len() == 1 && tag.has("charset") => {}
Token::Start(tag)
if tag.name == "meta"
&& tag.attrs.len() == 2
&& tag.raw_attr("http-equiv").is_some_and(|value| value.eq_ignore_ascii_case("content-type"))
&& tag.has("content") => {}
Token::End(name) if wrapper(&name) => {}
Token::Text(text) if unescape(text).trim().is_empty() => {}
_ => return false,
}
}
let Some((src, alt)) = image else { return false };
let text = text.unwrap_or_default().trim();
let alt = alt.trim();
let src = src.trim();
text.is_empty()
|| text == alt
|| text == src
|| text.split_once('\n').is_some_and(|(address, description)| address.trim() == src && description.trim() == alt)
}
/// Add what the system clipboard holds to a paste command's params: its text (the ribbon and
/// context-menu Paste send none), its HTML and RTF, and for Paste Special its picture. Params a
/// caller already gave are kept. `Some` when the paste was done here instead (copied picture
/// files, which reach us as their paths).
/// caller already gave are kept. `Some` when a picture paste was handled here.
pub(crate) fn fill(app: &mut WordApp, id: &str, params: &mut Value) -> Option<Result<Value, String>> {
if !is_paste(id) {
return None;
}
let clip = handle(app)?;
let o = params.as_object_mut()?;
let explicit = ["text", "html", "rtf", "picture"].iter().any(|k| o.contains_key(*k));
// A caller that captured ownership already (Paste Special's dialog) keeps that value.
if !o.contains_key("privateClipboard") {
let own = app.clipboard_published && clip.holds_ours();
o.insert("privateClipboard".into(), Value::Bool(own));
}
let owned = app.session.clipboard.is_some() && o.get("privateClipboard").and_then(Value::as_bool) == Some(true);
let ordinary = id == "edit.paste" && !explicit && !owned;
if !o.contains_key("text")
&& let Some(text) = clip.read_text().ok().flatten().filter(|t| !t.is_empty())
{
// Picture files copied in a file manager reach us as their paths: paste the pictures,
// as Ctrl+V does.
if id == "edit.paste"
if ordinary
&& app.session.math.is_none()
&& paste_picture::names_picture_files(&text)
&& let Some(r) = paste_picture::paste(app)
&& let Some(r) = paste_picture::paste(app, true)
{
return Some(r);
}
@@ -87,9 +125,29 @@ pub(crate) fn fill(app: &mut WordApp, id: &str, params: &mut Value) -> Option<Re
if let Some(rtf) = read_markup(&clip, RTF) {
o.insert("rtf".into(), Value::String(rtf));
}
if ordinary {
let text = o.get("text").and_then(Value::as_str);
let html = o.get("html").and_then(Value::as_str);
if text.is_none() && html.is_none() && !o.contains_key("rtf") {
return paste_picture::paste(app, true);
}
if text.is_none()
&& app.session.math.is_none()
&& let Some(r) = paste_picture::paste(app, false)
{
return Some(r);
}
if app.session.math.is_none()
&& !cfg!(target_arch = "wasm32")
&& html.is_some_and(|html| single_image_offer(html, text))
&& let Ok(Some(png)) = paste_picture::bitmap_png(&clip)
{
return Some(paste_picture::insert_bitmap(app, &png));
}
}
// Native bitmap/image formats are for other programs. Our own paste keeps the original
// fragment (size, cropping and floating-picture properties), while its owner mark lasts.
if app.session.clipboard.is_some() && o.get("privateClipboard").and_then(Value::as_bool) == Some(true) {
if owned {
o.insert("text".into(), Value::String(app.session.clipboard_text.clone()));
}
if id == "edit.pasteSpecial"
@@ -357,6 +415,15 @@ mod tests {
}
}
#[test]
fn explicit_html_takes_precedence_over_the_system_bitmap() {
let mut a = app_holding(&[rgba8(4, 4, 200)]);
a.run("edit.paste", json!({"html": "<b>explicit</b>"})).unwrap();
assert_eq!(first_para(&a), "explicit");
assert!(bold_at(&a, 0));
assert!(a.session.doc.media.is_empty());
}
/// Paste Special lists a picture on the system clipboard and pastes it.
#[test]
fn paste_special_offers_the_clipboard_picture() {
File diff suppressed because one or more lines are too long
+2 -1
View File
File diff suppressed because one or more lines are too long