roastify_move_elements
Move a group of elements together and/or resize elements; commit a new version.
The Designer can move only one layer at a time, so a block of layered content (a spec panel, a logo lockup) drifts out of alignment when its backing shape is moved alone. This relocks that block: name the ids and shift them as one rigid object, and separately re-centre or resize individual rectangles. The store is configuration management: the edit is committed back to the SAME design_id (git tracks the diff). Apply it onto the product with the browser courier.
Nothing is validated against panel bounds here (unlike add_design_element): you are re-aligning existing, deliberately-placed content, so the caller owns the coordinates. The heavy background image is never moved unless you name its id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| npub | No | Required. Your Nostr public key (npub1...) for credit billing. | |
| edits | Yes | A list of geometry edits, each one of: - group shift: {"ids": ["a", "b", ...], "dx": N, "dy": M} — add the same delta to every listed element's x/y (design units; +dy is down, +dx is right). Use this to move a whole block together. - absolute set: {"id": "a", "x": ?, "y": ?, "width": ?, "height": ?, "fontSize": ?, "fill": ?, "stroke": ?, "align": ?, "fontFamily": ?, "z": ?} — set only the keys you include. What the size keys mean depends on the element: on a RECTANGLE/line/image, width and height are the frame and set directly; on a TEXT layer, width is the wrap frame and fontSize the type size (both settable) while height is DERIVED — it re-measures from the reflowed text, and a height you pass for a text layer is ignored. Use fontSize to match one label's size to a peer. align (left|center|right|justify) and fontFamily apply to TEXT only — use them when a repurposed layer still carries a donor's right-align or face (read `fonts` from get_design_text for known families). fill/stroke are colour strings settable on any element — e.g. give a roast-scale dot a dark fill to fill it, or clear the fill to empty it (read each dot's current fill from roastify_get_design_text's `elements`). z reorders paint order in the elements array: an integer index, or "front" / "back". Get element ids and their current geometry from roastify_get_design_text. | |
| label | No | Rename the design (optional). Defaults to keeping its current label. | |
| design_id | Yes | The design to edit, from roastify_list_designs. | |
| dpop_token | No | ||
| version_tag | No | The NEXT semver version (MAJOR.MINOR.PATCH, e.g. 1.3.0, no 'v') — call roastify_list_design_versions and increment. Required; reusing one is refused. | |
| commit_message | No | A specific description of WHAT changed and WHY — a real commit message, not a placeholder like 'save this' or 'update'. Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||