Commit Graph
311 Commits
Author SHA1 Message Date
Dylan M. Taylor 278aba4a14 Merge pull request #1482 from Hamza0101/test/cli-argument-surface
cli: pin the argument surface, and fix the argument bugs pinning it found (photocraft#7071)
2026-11-15 18:49:03 -05:00
Mex 2a11a280f6 cli: report an empty benchmark layout instead of panicking (#2839)
* cli: report an empty benchmark layout instead of panicking

Return a clear error before benchmark work starts when the document contains no spreads.

* test: report a benchmark error for documents with no spreads

Create a structurally valid round-tripped document with no spreads and require bench to exit 1 with the clear error.
2026-11-15 15:39:38 +00:00
Mex ca463bab52 cli: report failures after keep-going scripts (#2836)
* cli: report failures after keep-going scripts

Keep executing requested steps while retaining the first failure in Report, so failed scripts return nonzero before save/export.

* docs: describe first script failure in Report

Describe the first failing step without assuming all callers stop immediately.

* test: cover keep-going failure reporting and output guards

Exercise failures before and after a successful step, preserve the first failure, and require both output paths to remain absent.
2026-11-15 14:59:06 +00:00
jayzed80 b2518507b5 shortcuts: run Option shortcuts on character keys in the app, not the macOS menu bar (#2710) (#2818)
Option, with or without Shift, on a letter, digit, symbol or Space types a
character on macOS, so the window takes the key before the menu bar sees
it. The bar carried such a user shortcut as its key equivalent and the
window's dispatcher left the key to the bar, so the shortcut ran nowhere.
These shortcuts now stay in the app, like modifier-less ones.
2026-11-15 07:26:31 +00:00
aiongg b6952941b3 Web: show a status line when a dropped file can't be read 2026-11-14 06:11:51 +00:00
aiongg 62f70cc03c Merge branch 'pr-2309' into multi-place 2026-11-14 05:49:14 +00:00
aiongg 2ee301bd4b Merge pr-2302 (place cursor queue) into multi-place 2026-11-14 05:49:14 +00:00
aiongg 55a0c7da3d DES-10 T2: port asset byte users to AssetData
Export, import, links, preflight, alpha wrap and the UI read bytes with
AssetData::load; every asset is still embedded.
2026-11-14 05:15:03 +00:00
Dylan M. Taylor 32274e843a Merge codex/designcraft-craft-libs into origin/main: cut over document formats and codecs to craft-libs 2026-11-14 02:13:28 +00:00
Dylan M. Taylor 32c239cacc Use shared image codecs for CLI previews 2026-11-13 01:59:00 -05:00
Dylan M. Taylor 44fd4aec60 Route CLI format dispatch through shared registry 2026-11-13 01:42:51 -05:00
dotCooCoo 630b5dfc43 Paste: images on the system clipboard paste as embedded images (#2204)
Paste ignored a bitmap on the system clipboard: a screenshot or an image
copied in a browser had to be saved and placed. Paste now places it.

- edit.pasteImage {base64, name?, spread?, at?} embeds the image in the
  selected empty frame, or in a new frame centered on `at` at its stored
  resolution (72 ppi when none) and at most 60% of the page width, as
  File > Place sizes it. Save and reopen and IDML export keep the pixels.
  Images over 64 million pixels and names without an image extension are
  refused.
- Ctrl/Cmd+V pastes the image egui delivers with no text, and Edit >
  Paste reads the clipboard's bitmap, or the first image file of a copied
  file list, when there is no text or the text is only an address.
- The menu read waits at most 1.5 s on its own thread, with one read in
  flight at a time.
- With a native menu, objects copied here still paste as objects until
  the pasteboard's change count shows a newer copy.
- ui.paste takes {image} for the control channel.
2026-11-11 20:50:24 -08:00
texjer 39d8469b1f Merge remote-tracking branch 'upstream/main' into HEAD
# Conflicts:
#	crates/engine/src/cmd/file/place.rs
2026-11-10 18:29:09 -05:00
texjer 969eaa0aaf Merge remote-tracking branch 'upstream/main' into HEAD
# Conflicts:
#	crates/ui-egui/src/app/files.rs
#	crates/ui-egui/src/tests.rs
2026-11-09 13:51:45 -05:00
aiongg 49f6b85cb9 Merge pull request #2037 from r31lin/fix/gpu-largest-buffer
Ask the graphics device for the adapter's largest buffer
2026-11-08 16:10:35 -05:00
texjer 37cbfceaaa Merge remote-tracking branch 'upstream/main' into feat/drop-loads-place-cursor
# Conflicts:
#	crates/ui-egui/src/app/file_dialogs.rs
2026-11-05 11:59:37 -05:00
texjer aca5c8b84a Merge remote-tracking branch 'upstream/main' into feat/place-cursor-queue
# Conflicts:
#	crates/ui-egui/src/app/file_dialogs.rs
2026-11-05 11:59:37 -05:00
.CooCoo e16785ea50 Fix CLI build warnings on Windows (#2356) 2026-11-05 09:53:17 -05:00
Hamza 20caa95c49 Merge remote-tracking branch 'origin/main' into test/cli-argument-surface
#1478 brought its argument fixes and their tests to main, in their reviewed form: main's is_subcommand/usage_for, values_present and the two tests are kept, and the branch's earlier copies are dropped. What this branch adds on top stays: the argument-surface tests in tests/it/args.rs and perf's --frames/--chars/--images in the usage.
2026-11-05 14:56:20 +05:00
texjer b458bec4c5 Merge branch 'feat/place-cursor-queue' into feat/drop-loads-place-cursor
# Conflicts:
#	ROADMAP.md
#	crates/ui-egui/src/app/files.rs
2026-11-04 19:56:22 -05:00
texjer ad611c1b6f Merge remote-tracking branch 'upstream/main' into feat/place-cursor-queue
# Conflicts:
#	ROADMAP.md
2026-11-04 19:03:47 -05:00
texjer 93f18aa086 Merge branch 'feat/finder-drop-pointer' into feat/drop-loads-place-cursor
# Conflicts:
#	crates/ui-egui/src/app/input.rs
2026-11-04 13:20:02 -05:00
texjer f02e13318b Place: a drop without pointer events keeps the system pointer of its own input
Review fixes for #2304:
- Each pointer-less drop asks the system where the pointer is when its raw input arrives, and
  converts it with that input's window rect and the UI scale, instead of one sample taken at the
  later UI pass for the whole batch. Drops with pointer events keep their own pointer, and the
  system is still only asked when a drop brought none.
- system_pointer is cfg'd off on wasm with its only caller; Services::pointer's docs say a drop
  without a pointer lands in the middle of the view.
- pointer.rs: the AppKit flip is a pure function with a test, documenting why it flips against
  the main display only (winit's window positions use the same origin).
- Test: a filled compound path takes a dropped image through its ring, not its hole.
2026-11-04 12:06:17 -05:00
aiongg fb630909c4 Merge pull request #2304 from texjer/feat/finder-drop-pointer
Place: a file dragged in from the Finder fills the frame it was dropped on
2026-11-04 11:19:45 -05:00
Hamza ea39c914d2 cli: a missing value stops the line before any export, help wins as a value, and every subcommand's usage lists its options 2026-11-04 13:22:23 +05:00
texjer a10e288a58 Place: dropped images load the place cursor, in the order they came
Split out of #2073. Port of #1307's drops and #1666.

- Several images dropped together load the place cursor in the order they
  came, each run of them where it comes among the other files, after the
  images it already holds; click to place them one by one.
- One image dropped off a frame that takes it loads the place cursor instead
  of being placed at once; on such a frame it still fills it.
- A drop is handled in its order, each file at its own pointer, and a dialog
  (a multi-page PDF's Import Options, an alert) cancels the rest.
- On the web, files dropped together are read as one batch (none if one
  can't be read), and a single dropped image loads the place cursor.
2026-11-03 23:05:47 -05:00
Dylan M. Taylor c4ed9b2210 fix: write screenshots, signing certificates and benchmark files in private temp folders (#2219) 2026-11-03 22:16:28 -05:00
Dylan M. Taylor bcc74f29c9 fix(app): log message line breaks continue the record instead of starting another (#2220) 2026-11-03 22:16:06 -05:00
texjer 4d34f83926 Merge branch 'feat/finder-drop-pointer' into feat/drop-loads-place-cursor
# Conflicts:
#	ROADMAP.md
2026-11-03 21:50:19 -05:00
texjer 8815ef7350 Place: a file dragged in from the Finder fills the frame it was dropped on
Split out of #2073. winit sends no pointer events during a drag from another
application on macOS, so a Finder drop had no pointer and never found the frame
under it. The host now gives the pointer's place on the screen
(`Services::pointer`, `PointerFn`: the system's points before the UI scale,
from `NSEvent.mouseLocation`), and `take_pending_drops` uses it for the files
that came without a pointer, divided by egui's zoom factor and made relative
to the window.
2026-11-03 21:50:08 -05:00
texjer d890289a92 Place: several images load the place cursor, with a thumbnail, count and grid
Split out of #2073. Port of #1307, #1392 (grid) and #1432 (thumbnail and count).

- File › Place takes several files; images load the place cursor in the
  order chosen (`place.load` `files`, `append`), after the ones it holds.
  A multi-page PDF or an alert stops the batch, and a file that can't be
  placed returns its error to `app.placeDialog`.
- Each click places the next image; arrow keys while dragging lay out a
  grid (`place.grid`) and are handled even at a limit; Escape unloads the
  rest (`place.cancel`). Undo of a loaded image's asset cancels the queue.
- The cursor shows how many images are loaded.
- On the web, Place picks several files and the inbox loads consecutive
  images for the same document as one batch.
2026-11-03 21:43:44 -05:00
aiongg b749251694 Merge pull request #1478 from Hamza0101/fix/cli-argument-handling
cli: the three argument bugs photocraft#7071 lists are live here too
2026-11-03 17:01:34 -05:00
aiongg 65c4db30e1 Apply review fixes
- apps/designcraft-cli/src/main.rs
2026-11-03 21:48:08 +00:00
aiongg 61ed22140a Apply review fixes
- apps/designcraft-cli/src/main.rs
2026-11-03 19:41:27 +00:00
aiongg 35a7410481 Merge pull request #2192 2026-11-03 19:07:42 +00:00
aiongg a2d745db00 Apply review fixes
- apps/designcraft/src/main.rs
2026-11-03 13:40:17 +00:00
Hamza 54df0d21b3 Merge remote-tracking branch 'origin/main' into fix/cli-argument-handling
# Conflicts:
#	apps/designcraft-cli/src/main.rs
#	apps/designcraft-cli/tests/it/cli.rs
2026-11-03 13:50:15 +05:00
Hamza 3b2317bcc6 Merge remote-tracking branch 'origin/main' into test/cli-argument-surface
# Conflicts:
#	apps/designcraft-cli/tests/it/cli.rs
2026-11-03 13:46:52 +05:00
Brandon Thomas 1bca5db25b Merge pull request #1792 from marcoarnulfo/feat/thumbnailer
Linux: file managers show a .designcraft file's first page through a freedesktop thumbnailer (#1782)
2026-11-02 23:24:25 -05:00
Brandon Thomas 3a40dc7577 Merge pull request #2158 from Silvertree2010/fix/2116-graphics-fallback-marks-a-workin
Keep the graphics backend when the window closes before its first frame
2026-11-02 23:23:50 -05:00
JonRC 41c59708eb cli: script --export prints the export's warnings, as run does (#2191)
The script command threw away the result of each export, so a PDF with
a drop shadow came out with nothing on stderr, while run --export
printed "warning: 1 object(s) with soft effects ... exported as images".
Each warning an export returns now goes to stderr as "warning: ...".
The JSON report on stdout is unchanged.
2026-11-03 01:05:17 -03:00
FredApps fc47f3156e Merge current main into fix/gnome-window-decorations 2026-11-02 19:10:33 +01:00
NetterSilverandClaude Opus 5.5 a207f13f73 Keep the graphics backend when the window closes before its first frame
Fixes #2116

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 15:47:11 +01:00
Hamza 133e9098e8 cli: validate-pdf's help names --standard
`validate_pdf` accepts `--standard x4|x1a`, and both its own usage string and the
module docs say so, but the line in the global `USAGE` left it off -- and that
line is exactly what `validate-pdf --help` slices out. So the option was
documented everywhere except the one place a user would look (noted in review).

`subcommand_help_names_the_options_that_subcommand_takes` asserts it, checks the
parser and the help agree by refusing an unknown standard, and does the same for
`run --cmd` and `mcp --automation-read-root` so this is about subcommand help
rather than one line.
2026-11-02 17:39:55 +05:00
Hamza 8d17aa1100 test(cli): show that --nope reached the file system, not the parser
The assertion was that the complaint names `--nope`, which a parser rejecting
unknown options would do just as well -- so it did not pin the thing the test is
named for (noted in review).

`validate-pdf --nope` and `validate-pdf nope.pdf` are now compared with the name
taken out, so the shape of the failure has to be the one an ordinary missing path
gets. That holds the behaviour without asserting the operating system's wording
for a missing file, which an earlier round of review rightly took out of here.

Review suggested asserting the JSON report instead. There is none to assert:
`validate-pdf --nope` fails at `std::fs::read`, before any check runs, and
writes nothing to stdout -- which `failed` already requires.

Controlled by adding `o if o.starts_with("--") => return Err(...)` to
`validate_pdf`:

    left:  "designcraft-cli: unknown option <name>\n"
    right: "designcraft-cli: <name>: No such file or directory (os error 2)\n"

The old assertion passes against that left-hand side, since it names `--nope`.
2026-11-02 16:02:59 +05:00
Hamza 4c9e5277f7 cli: subcommand help is for subcommands that exist
`<sub> --help` answered about that subcommand without first asking whether the
subcommand was one, so `designcraft-cli typo --help` printed the whole usage and
succeeded. `typo` on its own was an error and `typo --help` was not, which is
backwards: a script checking the exit status carried straight past a misspelled
command (noted in review).

`is_subcommand` reads the names out of `USAGE` rather than listing them again,
so one added to the usage text cannot be missing here, and `usage_for` now uses
the same line parser instead of its own copy. An unknown name falls through to
the dispatch and fails there, as it already did without `--help`.

Measured over every name the usage lists -- run, commands, describe, script,
app, mcp, perf, bench, validate-pdf, links -- each still answers on stdout and
exits 0, while `typo` and `nonsense` exit 1. The test asserts both halves, so
the check cannot quietly become a block on subcommand help.
2026-11-02 16:00:15 +05:00
aiongg cc3c70d4be Windows: keep the custom title bar window borderless (#2139)
winit 0.30 gives an undecorated window WS_CAPTION and WS_BORDER; on some systems the compositor
reserves that frame, so the content is drawn offset (black bars at the top and left) while the
pointer keeps the client coordinates. A per-frame guard strips the styles again after every
winit flag change and keeps a maximized window clear of the taskbar. Fixes #1295.
2026-11-01 20:39:44 -05:00
NetterSilverandClaude Opus 5.5 52232fc2c7 Read PDF/X output intent and Info as parsed objects in validate-pdf
Fixes #2050

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:47:33 +01:00
MarekSpodBiedry 759ab3ba7c Separate the CJK commands from Insert Math Expression in the Type menu (#2043) 2026-10-30 16:39:22 +01:00
r31linandClaude Opus 5.5 d9a55d19d6 Ask the graphics device for the adapter's largest buffer
egui-wgpu doubles its vertex buffer when a frame outgrows it, and wgpu's
default largest buffer is 256 MiB. Opening a 160-page InDesign catalogue
produced a frame with 137 MB of vertices; egui-wgpu asked for a 275 MB
buffer, the device refused it and the app stopped. The device now takes
the adapter's own largest buffer, as it already did for the texture side
(2047 MiB on DirectX 12 here), and the log says both limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 11:52:42 +01:00