* engine: arrange.align and arrange.distribute refuse values they do not name
arrange.align took an `edge` it did not know as a no-op that still
reported its shapes as edited, aligned left when `edge` was left out
(the spec does not mark it optional), and read any `to` other than
exactly "slide" as the selection. arrange.distribute distributed
vertically for any `dir` starting with "v" and horizontally for any
other, and also read any `to` other than "slide" as the selection.
`edge` must now be left, center, right, top, middle or bottom, `to`
slide or selection, and `dir` horizontal or vertical. Anything else, or
a missing `edge`, is refused with the accepted values and nothing moves.
A missing `to` or `dir` keeps its default.
Test: align_and_distribute_refuse_values_they_do_not_name.
* engine: arrange.align and arrange.distribute refuse a dir or to that is not a string
`align_to` and `distribute` read `to` and `dir` through `str_param`, which
returns None for a value that is present but not a string, the same as for a
missing one. So `{"dir": 123}` distributed horizontally, and
`{"edge": "left", "to": false}` aligned to each command's default reference,
moving the selected shapes instead of failing.
Both now match on `p.get(..).map(Value::as_str)`: a missing field keeps its
default (horizontal for `dir`, each command's own rule for `to`), the named
strings work as before, and anything else, null included, is refused with the
accepted values.
The new test `align_and_distribute_refuse_dir_and_to_that_are_not_strings`
sends null, 123, false, {} and [] as `dir` to arrange.distribute and as `to`
to both commands, in a fresh three-shape session each time, and checks the
error, the revision and every shape's box.
Keep both sets of import state: the rollback's kept-chart key log and main's
chart decode budget (rejected_kept, chart_decode_bytes). A capture refused by
the retained-byte check records no key; chart decode work stays charged across
a rollback.
Pin craft-mime to 254e9a40, the craft-libs main revision craft-deckcraft-format
already uses; craft-mime and craft-codepage are unchanged since 0325b2d7.
* Native format: golden package bytes and load results before the move to craft-libs
A deck that reaches every kind of member (stored and deflated media, linked media
without bytes, stored and deflated chart parts, a NaN) is saved with a fixed
generator. Its bytes, the presentation and media loaded from them, and the damage
report for a copy missing two members are golden files written by the current
code. `save_as` names the generator so the bytes don't change with the version.
* Native format: the .deckcraft package layer comes from craft-deckcraft-format
The mimetype and legacy type, sniffing, the presentation.json envelope, the
NaN-safe writer (finite.rs, deleted), the null-number manifest reader, member
names, the stored-or-deflated choice, bounded and budget-charged member reads
and the format limits now come from craft-deckcraft-format
(storytold/craft-libs#1748), pinned at its PR tip. The presentation mapping
stays here: which media and chart parts become members, the load loop over
them, repair and sanitising, and outline/RTF.
The golden tests from the previous commit pass unchanged: the saved bytes, the
loaded presentation and the damage report are the same. The crate no longer
depends on serde, serde_json or thiserror; zip is a test dependency.
Part of storytold/craft-libs#778.
* ATTRIBUTION: the native format golden deck
* Native format: pin craft-deckcraft-format to the craft-libs merge commit 254e9a40 (storytold/craft-libs#1748)
Keep outline parser and formatting policy local. Preserve exact escaping with explicit compatibility policy and exhaustive scalar/byte oracles. Original text writer and preserved oracle by Nikita Rakitin (beb883d0).
Co-authored-by: Nikita Rakitin <nnnrrr93@gmail.com>
* fix: reject incomplete Base64 character tails
Reject a final six-bit fragment that cannot form a byte while preserving existing accepted encoding forms.
* fix: reject Base64 data after padding
Track padding before accumulator updates and cover the reviewed Zg==A case while retaining whitespace and repeated padding.
Count an escaped RTF control symbol as one Unicode fallback character and keep parser positions at UTF-8 boundaries. Extend the parser regressions for escaped fallback sequences.
Keep chart labels such as 999.94 in ##0.0E+00 at 999.9E+00 until the full mantissa actually rounds past its available digits. Add regression coverage for widths, signs, small values, carries and decimal localization.
* DOC2: correct the control method reference
Updated descriptions for various UI commands and actions, including clarifications on parameters and behaviors.
* DOC2: clarify text replacement and slide-show key limits
* DOC2: describe the grid shortcut restriction
* Naming: use Diagram and Decorative Text for own features
* test(naming): guard neutral display labels
* test(ui): handle escaped literals in feature-name guard
---------
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
* M1951: document the PPTX slide-list import limit
* M1951: expose the slide-list limit in public API docs
---------
Co-authored-by: cloutier <1014864+cloutier@users.noreply.github.com>