mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-11 16:33:22 -06:00
Envelopes: commands reject a style, orientation or preserveShape of the wrong type
object.envelope.makeWithWarp, resetWithWarp and options read `style`
and `orientation`, and options read `preserveShape`, as text and
ignored any other value, so `{"style": 5}` kept the default style and
`{"orientation": "diagonal"}` kept the current orientation. They now
return "`style` must be a string" or "`preserveShape` must be a
string" for a value other than text or null, and "`orientation` must
be one of horizontal, vertical" for any other orientation, through
the shared `choice` helper. object.envelope.options checks the warp
keys whatever is selected, so a call with no envelope or only mesh
envelopes selected gets the same errors, an unknown style name
included. Omitted and null values keep today's defaults.
Docs: docs/mcp.md, docs/target-app-parity.md.
This commit is contained in:
@@ -1227,6 +1227,14 @@ in `object.envelope.resetWithMesh`; `antiAlias`, `distortAppearance`, `distortLi
|
||||
`distortPatternFills` in `object.envelope.options`; and `editing` in `object.envelope.editContents`. A null is read as
|
||||
a key left out.
|
||||
|
||||
`object.envelope.makeWithWarp`, `resetWithWarp` and `options` refuse a `style` that is not a string with
|
||||
`` `style` must be a string `` and a name that is no warp style with `` unknown warp style `foo` ``, and an
|
||||
`orientation` other than `horizontal` or `vertical`, a number or `true` included, with
|
||||
`` `orientation` must be one of horizontal, vertical ``. `object.envelope.options` refuses a `preserveShape` that is
|
||||
not a string with `` `preserveShape` must be a string ``, and checks the warp keys when no envelope or only mesh
|
||||
envelopes are selected, too. Each leaves the document, its undo history and the options new envelopes start with as
|
||||
they were. A null is read as a key left out.
|
||||
|
||||
These commands refuse a string, a number or another value that is not true or false with
|
||||
`` `closed` must be true or false ``, naming the key, and leave the document and its undo history as they were:
|
||||
`clockwise` in `shape.spiral`; `closed` in `shape.arc` and `path.create`; `vertical` and `placeholder` in `text.create`
|
||||
|
||||
@@ -1457,6 +1457,8 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
|
||||
- **Blend and envelope options given as text:** `object.blend.make` and `object.blend.options` (`smooth`), `object.blend.spine.moveAnchor` (`independent`) and `reshapeSegment` (`perpendicular`), `object.envelope.makeWithWarp`, `resetWithWarp` and `options` (`horizontal`), `object.envelope.resetWithMesh` (`maintainShape`), `object.envelope.options` (`antiAlias`, `distortAppearance`, `distortLinearGradients`, `distortPatternFills`) and `object.envelope.editContents` (`editing`) refuse a value other than true, false or null, such as `"false"`, and leave the document and its undo history as they were.
|
||||
|
||||
- **Envelope names given as another type:** `object.envelope.makeWithWarp`, `resetWithWarp` and `options` refuse a `style` or `orientation` other than text or null, such as `5`, and an `orientation` other than `horizontal` or `vertical`; `object.envelope.options` refuses such a `preserveShape`. `object.envelope.options` checks the warp keys with no envelope or only mesh envelopes selected, too. Each leaves the document, the options new envelopes get and the undo history as they were.
|
||||
|
||||
- **Exporter plug-ins (G17):** a WebAssembly plug-in of kind `exporter` adds a write-only file format. File › Export › Export As lists it after the built-in formats, with Use Artboards greyed out (the plug-in writes the whole document) and its parameters in a generated dialog once the file is picked; `document.export` writes it by its format id, `plugin.<id>`, or by one of its extensions, and built-in formats keep theirs. The plug-in is given the native file's JSON (large images without their data) and `_context` (`mode`, `extension`, `name`), with 10 G instructions plus 4,000 per byte of input and 300 s, and Background Export's Cancel stops it between two slices of that budget. A decline or invalid output writes nothing; its warnings come back with the export's. Regressions: `crates/engine/tests/plugin_export.rs`, `crates/plugins/tests/abi.rs`, `crates/ui-egui/src/dialogs/tests_plugin_export.rs`. Scores and hours unchanged.
|
||||
|
||||
- **Plug-in parameters as their manifest presents them (G17):** each parameter may have a `label`, a `unit` shown after its value, `help` on its label and a `helpUrl` page opened from a button, a `group` (sections that fold, after the parameters outside any group) and a `visibleWhen` that shows it only while the checkboxes and choices it names have one of the listed values (a hidden parameter still goes to the plug-in). `string` and `numberList` parameters join number, int, bool and choice, and a plug-in declares up to 256 parameters, at most 64 outside groups. The filter, live-effect and exporter dialogs use these keys, and the Appearance panel's effect editor the labels, units, help and conditions; hosts from before them ignore them. Regressions: `crates/plugins/src/dialog.rs`, `crates/plugins/src/manifest.rs`, `crates/ui-egui/src/dialogs/tests_plugin_fields.rs`, `crates/ui-egui/src/panels/appearance.rs`. Scores and hours unchanged.
|
||||
|
||||
Reference in New Issue
Block a user