Commit Graph
2691 Commits
Author SHA1 Message Date
aiongg 0dc3d45f77 refactor(ui-egui): move page_pointer.rs's tests to page_pointer/tests.rs 2026-10-26 20:51:19 +00:00
aiongg b1761d5bbf refactor(engine): move links.rs's tests to links/tests.rs 2026-10-26 20:51:19 +00:00
aiongg 52f15202ef refactor(ui-egui): move bidi.rs's tests to bidi/tests.rs 2026-10-26 20:51:19 +00:00
aiongg 4739740804 refactor(ui-egui): move combine_grid.rs's tests to combine_grid/tests.rs 2026-10-26 20:51:19 +00:00
aiongg 7d54ae2be3 refactor(ui-egui): move motion.rs's tests to motion/tests.rs 2026-10-26 20:51:19 +00:00
aiongg 0ead57f2b5 refactor(ui-egui): move comments.rs's tests to comments/tests.rs 2026-10-26 20:51:19 +00:00
aiongg f700dc3f2e refactor(export): move pptx.rs's tests to pptx/tests.rs 2026-10-26 20:51:19 +00:00
aiongg 37fa7dca86 refactor(platform): move staging.rs's tests to staging/tests.rs 2026-10-26 20:51:19 +00:00
aiongg d823fbd77a refactor(forms): move af.rs's tests to af/tests.rs 2026-10-26 20:51:19 +00:00
aiongg 701988ecd6 refactor(automation): move lib.rs's tests to tests.rs 2026-10-26 20:51:19 +00:00
aiongg 9d6ae81f0e refactor(ui-egui): move editing.rs's tests to editing/tests.rs 2026-10-26 20:51:19 +00:00
aiongg e0033d3989 refactor(export): move lib.rs's tests to tests.rs 2026-10-26 20:51:19 +00:00
aiongg 79d72038f1 refactor(fonts): move pdf.rs's tests to pdf/tests.rs 2026-10-26 20:51:19 +00:00
aiongg 6d8c0bb8dd refactor(ui-egui): move i18n.rs's tests to i18n/tests.rs 2026-10-26 20:51:19 +00:00
aiongg 38e95285d3 refactor(cos): move document.rs's tests to document/tests.rs 2026-10-26 20:51:19 +00:00
aiongg a892922237 refactor(render): move text.rs's tests to text/tests.rs 2026-10-26 20:51:19 +00:00
aiongg 401397d2be refactor(ui-egui): move canvas.rs's tests to canvas/tests.rs 2026-10-26 20:51:19 +00:00
aiongg dd927f62cb refactor(render): move inspect.rs's tests to inspect/tests.rs 2026-10-26 20:51:19 +00:00
aiongg 2f88c5e192 refactor(render): move raster.rs's tests to raster/tests.rs 2026-10-26 20:51:19 +00:00
aiongg c3f6fa3b8c style(ui-egui): format i18n.rs after the include path update 2026-10-26 20:51:18 +00:00
aiongg d932d3bb3c refactor(ui-egui): move i18n/mod.rs to i18n.rs 2026-10-26 20:51:18 +00:00
aiongg c316328bb0 test: scan source directories recursively 2026-10-26 20:51:18 +00:00
Dylan M. Taylor f94668f1c8 fix(sonar): clear css:S9441 and S3776 in forms actions 2026-10-26 16:01:32 -04:00
Dylan M. Taylor 32a9af4d08 proposal(redact): unlink unused Type 3 glyph programs and fonts on redaction (F-011) 2026-10-26 16:01:29 -04:00
aiongg d28d047a9e Merge pull request #4730 from alehel/refactor/engine-lib-split
refactor(engine): split lib.rs into modules
2026-10-26 14:35:30 -04:00
aiongg 64e0868b84 feat(ui): menus from craft-menu, native on macOS (#4752)
* feat(ui): menus from craft-menu, native on macOS

One menu definition (crates/ui-egui/src/menus.rs) built from the command
registry drives the native macOS menu bar (craft-menu's muda backend) and
an in-window egui bar on Windows, Linux and the web, which takes the place
of the "Menu" button at the start of the top bar.

- File, Edit, View, Sign, Window and Help, with separators and submenus.
  Edit gains Cut, Paste, Delete and Select All (they act as their keys
  do) and a Pages submenu; View gains a Tools submenu built from the All
  tools groups; Sign holds Fill & Sign and the certificate commands;
  Window lists the open documents.
- Toggles are check items and the page layouts, side panels and themes
  radio items, with their state from the app.
- File > Open Recent lists the recent files (file.open_recent with an
  index).
- A menu click and its shortcut run the same dispatch, including the
  form-field deferral (#166) and macOS Cmd+W closing the window (#869).
  Dialogs and the palette grey the menus through craft-menu's gate.
- Quit goes through craft-quit, so the unsaved-changes prompt runs.
- craft-ui, craft-quit, craft-menu and craft-keymap pinned to
  storytold/craft-libs 70ade1fb.

Menu state and dispatch follow #2610 by @hajdukste; the menu tree and the
view and panel items follow #3870 by @RivanJarjes.

* test(ui): the menu model, native dispatch and the in-window bar

- Unit tests for the menu definition: every registry menu command is
  listed once with its registry shortcut; check and radio items follow
  the app; a dialog greys document commands and drops their clicks; the
  recent files and open documents are listed once each; a native menu
  click (through a fake craft-menu backend) runs its command once.
- The kittests that opened the old "Menu" button use the menu bar, and
  the ones that look up a label the bar's titles share (Edit, File,
  Sign) skip the bar.
- The in-window bar takes its titles' width, so the mode tabs, search
  and buttons keep their place in the top bar.
- Edit menu clicks that stand for keys (Copy, Cut, Delete, Select All)
  reach this frame's input from `logic`, where test hosts see them too.

* test(ui): the language switch test opens File in the menu bar

Translated titles and rows carry their mnemonic ("ファイル(F)", "開く(O)…").

* feat(ui): the menu bars run Quit themselves, the bar shrinks to its titles, and AppKit's window list stays off

craft-libs main edc41f6 (craft-libs#354): MenuBarUi runs Quit and Minimize, shrink_to_fit sizes the in-window bar, Key::parse reads the registry's arrow and minus glyphs, and mac::install_with(.., window_list(false)) keeps the Window menu to PdfCraft's own document list.

* fix(ui): the menu command filter is an if, for clippy

* test(ui): drop a needless borrow in the edit-tab helper

* test(ui): two tests follow the menu bar

The tests were wrong, not the app. The Preferences language test clicked the old Menu button; it opens Edit in the menu bar and its Preferences row. The prepare Actions test counted the Edit labels: the narrower menu bar leaves room for the Edit tab, so the rows' Edit buttons come third and fourth.
2026-10-26 00:57:46 -04:00
aiongg 01b696df2c test(ui): CJK interface tests skip without craft-fonts (#4706)
* test(ui): CJK interface tests skip without craft-fonts

* test(ui): a build that requires craft-fonts never skips the CJK interface tests
2026-10-25 23:11:45 -04:00
skylar fc578a0b02 chore(deps): bump 11 safe dependency updates 2026-10-25 16:36:22 -06:00
alehelandClaude Opus 5.5 00596b69a6 refactor(engine): keep the moved docs' intra-doc links resolving (document, fill_sign)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:12:15 +01:00
alehelandClaude Opus 5.5 dc224884cb refactor(engine): gather lib.rs's imports and re-exports under the module list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:10:38 +01:00
alehelandClaude Opus 5.5 51fbed293b refactor(engine): move the test-only hooks to test_hooks.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:09:57 +01:00
alehelandClaude Opus 5.5 8ca4bf641f refactor(engine): move the page filters to page_filter.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:09:38 +01:00
alehelandClaude Opus 5.5 fc6072154d refactor(engine): move the Fill & Sign geometry helpers to fill_sign.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:09:23 +01:00
alehelandClaude Opus 5.5 94b6110819 refactor(engine): move placed pictures and mark sources to pictures.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:09:11 +01:00
alehelandClaude Opus 5.5 8473403a5d refactor(engine): move layer visibility to layers.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:08:38 +01:00
alehelandClaude Opus 5.5 4972a4e1eb refactor(engine): move the bookmark list rows to bookmarks.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:08:14 +01:00
alehelandClaude Opus 5.5 20974e7822 refactor(engine): move the combine and page-source helpers to sources.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:08:01 +01:00
alehelandClaude Opus 5.5 71dccdda50 refactor(engine): move the comment list and summary to comments.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:07:23 +01:00
alehelandClaude Opus 5.5 748b20abb9 refactor(engine): move the XFA form helpers to xfa_form.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:05:58 +01:00
alehelandClaude Opus 5.5 ff361fe138 refactor(engine): move Document and its display helpers to document.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:05:07 +01:00
alehelandClaude Opus 5.5 c4dc7e9126 refactor(engine): keep the moved docs' intra-doc links resolving
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:02:51 +01:00
alehelandClaude Opus 5.5 5b75180759 refactor(engine): move Session and its operations to session.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:02:51 +01:00
alehelandClaude Opus 5.5 f148915730 refactor(engine): move the other crates' re-exports to reexports.rs
The doc comment for SplitPart had drifted above the LabelStyle re-export; it is back on SplitPart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:02:51 +01:00
alehelandClaude Opus 5.5 05098de542 refactor(engine): move the open pipeline to open.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:02:51 +01:00
alehelandClaude Opus 5.5 631fc13f13 refactor(engine): move protection and the security summary to protection.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:02:51 +01:00
alehelandClaude Opus 5.5 58e7e36717 refactor(engine): move the Edit enum, its labels, permission check and runner to edit.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:02:50 +01:00
alehelandClaude Opus 5.5 7e72b583ed refactor(engine): move EditError and SourceProblem to error.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:02:50 +01:00
alehelandClaude Opus 5.5 ecf6231416 refactor(engine): move undo/redo state and labels to history.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:02:50 +01:00
Dylan M. Taylor 833cd63c8a proposal(redact): prevent retention of confidential vector paths behind clipping (F-008) (#4577)
Partial vector redaction previously hid covered areas with clipping
(`clip_out`, `W/W*`) while retaining the complete original drawing instructions
and painting operators in the content stream. This allowed recipients
to recover confidential outlined text or other vector drawings from
supposedly redacted documents.

This change removes vector paths that intersect redaction marks completely
and refuses partial clip retention, ensuring no confidential geometry is
preserved behind clipping. Report counts are updated to record removed paths.
2026-10-25 16:14:06 -04:00
Dylan M. Taylor 86a4120ae0 feat: startup update prompt modal and direct self-updating (#4654)
* feat: startup update prompt modal and direct self-updating

Help ▸ Check for updates and the check at start run through craft-update's Updater, which replaces the old GitHub fetcher and update source. The check at start is opt-in for the desktop app (test harnesses never reach the network), an install holds back while documents are unsaved, and a finished update closes through the app's quit path. craft-update stays out of the wasm build.

Ref: storytold/craft-libs#319

* test(updates): the prompt's buttons are DOWNLOAD and LATER

* build: pin craft-update to craft-libs main (db19c37)

* fix(updates): run the Windows update helper before argument parsing

* fix(updates): point the parity evidence at the current update tests
2026-10-25 16:00:23 -04:00