Commit Graph
1054 Commits
Author SHA1 Message Date
Brandon Thomas d4a65a5ea5 Merge PR #688
# Conflicts:
#	crates/engine/src/cmd/paths.rs
2026-10-14 22:56:29 -04:00
Brandon ThomasandClaude Opus 5.5 8a98451d2d fix(flex): flex.reorder clamps a huge by instead of overflowing (#973)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:49:37 -04:00
Brandon Thomas f726d40ff4 Merge PR #787
# Conflicts:
#	crates/engine/src/cmd/export.rs
#	crates/epub/src/lib.rs
2026-10-14 22:46:55 -04:00
Brandon Thomas aa979dab79 Merge PR #785
# Conflicts:
#	crates/engine/src/cmd/export.rs
#	crates/epub/src/lib.rs
2026-10-14 22:45:44 -04:00
Brandon Thomas 9ee2eb2c7a Merge PR #791
# Conflicts:
#	crates/epub/src/lib.rs
2026-10-14 22:41:18 -04:00
Brandon Thomas ee498ac68f Merge PR #973
# Conflicts:
#	crates/ui-egui/src/i18n.rs
#	crates/ui-egui/src/i18n/ar.rs
#	crates/ui-egui/src/i18n/it.rs
#	crates/ui-egui/src/i18n/ja.rs
#	crates/ui-egui/src/i18n/pt_br.rs
#	crates/ui-egui/src/i18n/uk.rs
#	crates/ui-egui/src/panels/properties.rs
2026-10-14 22:38:58 -04:00
Brandon Thomas f9b4660ca2 Merge PR #976
# Conflicts:
#	crates/engine/src/tests.rs
2026-10-14 22:33:58 -04:00
Brandon Thomas 290ea6c19c Merge PR #824
# Conflicts:
#	contributors/people.toml
2026-10-14 22:33:53 -04:00
Brandon Thomas ed3acb0f82 Merge PR #979 2026-10-14 22:05:13 -04:00
Brandon Thomas 35563d0f2f Merge PR #978 2026-10-14 22:05:13 -04:00
Brandon Thomas 7a23e00482 Merge PR #967 2026-10-14 22:05:13 -04:00
Brandon Thomas fddb3538fa Merge PR #966 2026-10-14 22:05:13 -04:00
Brandon Thomas 774b07b238 Merge PR #965 2026-10-14 22:05:13 -04:00
Brandon Thomas c5ea51ec4d Merge PR #964 2026-10-14 22:05:13 -04:00
Brandon Thomas 88fee015ce Merge PR #958 2026-10-14 22:05:13 -04:00
Brandon Thomas 528ae789b1 Merge PR #954 2026-10-14 22:05:13 -04:00
Brandon Thomas 2e5e3c4000 Merge PR #951 2026-10-14 22:05:13 -04:00
Brandon Thomas 6c2064ae48 Merge PR #949 2026-10-14 22:05:12 -04:00
Brandon Thomas 79a5c52e9d Merge PR #933 2026-10-14 22:05:12 -04:00
Brandon Thomas 452b0920e6 Merge PR #917 2026-10-14 22:05:12 -04:00
Brandon Thomas 7f9598558d Merge PR #914 2026-10-14 22:05:12 -04:00
Brandon Thomas b14b1fd805 Merge PR #913 2026-10-14 22:05:12 -04:00
Brandon Thomas f4333338b3 Merge PR #889 2026-10-14 22:05:12 -04:00
Brandon Thomas 411ef4c454 Merge PR #881 2026-10-14 22:05:12 -04:00
Brandon Thomas 3549d76594 Merge PR #819 2026-10-14 22:05:12 -04:00
Brandon Thomas ebb2322671 Merge PR #812 2026-10-14 22:05:11 -04:00
Brandon Thomas a593ae07af Merge PR #795 2026-10-14 22:05:11 -04:00
Brandon Thomas a666a9f00a Merge PR #793 2026-10-14 22:05:11 -04:00
Brandon Thomas 4bd1fbab37 Merge PR #765 2026-10-14 22:05:11 -04:00
Brandon Thomas 9f5e8cebf1 Merge PR #760 2026-10-14 22:05:11 -04:00
Brandon Thomas 02dd8ade8d Merge PR #704 2026-10-14 22:05:11 -04:00
Brandon Thomas 412ce96ff0 Merge PR #691 2026-10-14 22:05:11 -04:00
Brandon Thomas 3cdda36680 Merge PR #657 2026-10-14 22:05:11 -04:00
Brandon Thomas 4cd3a8fa5e Merge PR #648 2026-10-14 22:05:11 -04:00
Brandon Thomas e26147470b Merge PR #606 2026-10-14 22:05:10 -04:00
Brandon Thomas 0e63dcad11 Merge PR #604 2026-10-14 22:05:10 -04:00
Brandon Thomas c5643529af Merge PR #599 2026-10-14 22:05:10 -04:00
Brandon Thomas b379a5f0a5 Merge PR #577 2026-10-14 22:05:10 -04:00
Brandon Thomas 0c3e140be3 Merge PR #567 2026-10-14 22:05:10 -04:00
Brandon Thomas f268e17986 Merge PR #559 2026-10-14 22:05:10 -04:00
Davit Matchakhelidze 9792aa025e Merge upstream main into ka-language 2026-10-15 03:38:25 +04:00
moppeeerandClaude Opus 5.5 89f6adb6fb Find Font: a style that differs only in spacing isn't missing
Montilla Design's Flex Layout file names its body face "Regular " (with a
trailing space, as the designer's copy of Articulat CF did). Face lookup
already ignores spacing and case, so the text is drawn in Regular, but
font.list (Find Font) compared names exactly and reported the style
missing. It now uses the lookup's comparison (designcraft_fonts::same_style).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 01:25:04 +02:00
moppeeerandClaude Opus 5.5 6fe0770f47 Flex Layout: containers that lay out their objects, as InDesign 2026's
A Flex Layout container is a frame holding its objects as nested items
(as Edit › Paste Into makes), with a `flex` record: direction, wrap,
justification, cross-axis alignment, Fixed/Auto width and height, padding
and horizontal/vertical spacing. designcraft_doc::flex lays the objects
out (a Flexbox subset: lines, justification, alignment, Auto sizing), and
the engine runs it after every edit, so the container keeps its objects
in place whatever changes.

Commands: flex.add (Add to Flex Layout; detects aligned objects: their
direction, Auto size, Space Between at their own spacing, as InDesign
does), flex.convert (a group or rectangle frame), flex.remove (objects
stay, grouped), flex.set (every panel setting, plus the alignment grid
cell), flex.reorder. Resizing a container by its handles or W/H changes
its box and makes that side Fixed instead of scaling its objects;
dragging an object inside one drops it in the nearest place.

UI: Object › Flex Layout (Add to, Convert to, Remove, Show Flex Controls),
a Flex Layout panel (Window › Panels) laid out as InDesign's (Create Flex
Layout; alignment grid, W/H with Auto/Fixed; justification menu, four
directions, wrap; padding with the link button; spacing, greyed as
InDesign does when the justification works it out or nothing wraps), and
the same section in Properties. Icons are new drawings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 01:20:50 +02:00
moppeeerandClaude Opus 5.5 d52ef6b6b9 A line is set when its baseline fits in the frame, as in InDesign
InDesign sets a text line when its baseline fits in the frame; the
descenders may hang below the frame's bottom. DesignCraft required the
baseline plus the descent to fit, so a frame sized to a heading's caps
oversets: Zero2Graphic's magazine tutorial draws 2.7682 cm frames for
103 pt headings (control bar, 4:12–5:44), and all three were overset.

The keep-lines IDML fixture's frames are now 236 pt tall, so they hold the
same 19 lines under either rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 00:18:55 +02:00
midasmatterhorn e8dd2636f5 guard: restore the whole command transaction on a panic
The guard restored only the active document's content and selection, so a
command that edited through a nested successful command and then panicked
left the nested edit's undo entry (and no redo) behind, and a command that
opened or switched documents restored nothing at all. The guard now
snapshots every open document with its history and selection, the active
index and the journal, and restores them on a panic.

Regression tests: a nested edit followed by a panic leaves the history and
redo exactly as they were, and a command that opens a second document and
panics leaves only the original open.
2026-10-15 00:01:55 +03:00
midasmatterhorn a393ab2018 script.run: roll a failed script back instead of stranding its edits
A script whose later step failed kept the successful prefix in the document
but truncated the prefix's undo entries (and returned before the command's
aggregate undo entry was recorded), so the edits could not be undone at all.
A failed script now restores the document, selection and history from before
it started: all-or-nothing.

Regression test: frame.create followed by an unknown command is an error, the
document has no frame, nothing is left to undo, and the next edit undoes
normally. The one-undo-step success path still holds.
2026-10-14 23:57:21 +03:00
midasmatterhorn 59bdb371ff dtd: cap parameter-entity expansion instead of trusting a pass count
parse() expanded parameter entities with up to eight passes of whole-string
replacement, each pass cloning the text and re-inserting the entities'
original values. A pass count is not an output bound: a few hundred bytes of
nested entities inflate multiplicatively (a 449-byte DTD reaches ~4 MB here,
and larger chains would go to gigabytes), so a small file could exhaust
memory and CPU. Expansion now stops once it has added more than 1 MiB over
the input.

Regression test: a nested-entity DTD under 500 bytes is rejected with the
budget error, and a small inline entity still parses.
2026-10-14 23:54:04 +03:00
midasmatterhorn 7a1ba45d18 layout.section: keep the settings the command does not name
The command removed the section at a nonzero start with retain() and only then
looked it up to keep its properties, so the lookup always fell back to the
defaults: editing one field (a marker, a start number) silently reset the
style, prefix, include-prefix flag and start number. The existing section is
now read before the list is rebuilt.

Regression test: a Roman-numbered page-2 section with prefix A- and marker
First, then marker Second keeps startNumber, style, prefix and includePrefix.
2026-10-14 23:47:55 +03:00
moppeeerandClaude Opus 5.5 017b925189 Placeholder paragraphs as short as InDesign's (2 to 5 sentences)
Measured in Zero2Graphic's video: InDesign's placeholder paragraphs run 5,
10 (at 18 pt), 6 and 8 lines in a 5.9 cm column, about 2, 2, 3 and 3 of
DesignCraft's filler sentences. The rhythm started 3, 4, 2, 5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:31:32 +02:00
moppeeerandClaude Opus 5.5 a948ab2884 Pathfinder panel laid out as InDesign's, with Join Path and Convert Point
The panel was a row of text buttons (Add, Subtract, …, Make Compound,
Release). InDesign's has four rows of icon buttons: Paths (Join, Open,
Close, Reverse), Pathfinder, Convert Shape and Convert Point. The icons are
new drawings in icons.rs. Two engine commands back the rows that had none:
path.join (close an open path, or join two open paths at their nearest
ends) and path.convertPoints (plain, corner, smooth, symmetrical, on the
selected points or whole paths).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:13:49 +02:00