Expand description
The artwork family: the emitters that place a picked image file, and the payload op that carries its bytes into the log beside the reference.
An asset payload is content-addressed and create-only, so the only question an emitter has to answer is whether the document already holds the hash — if it does, the bytes are already there and identical, and the reference alone is the whole edit.
Structs§
- NewImage
- One image the gesture placed: where it goes, and in whose scope.
Enums§
- Placement
- How the picked image was sized. A drag gives its own box; a click has none, so the box comes from the image’s intrinsic size — the painter’s measurement, which is why it arrives as a parameter rather than being read here.
Constants§
- DEFAULT_
IMAGE_ 🔒CELLS - A click-placed image spans this many cells on its longer side.
- ICON_
SIDE 🔒 - A fresh icon’s square side, as a fraction of its block’s shorter side.
Functions§
- default_
icon_ 🔒box - delete_
icon - Inventory row “Delete Icon”: the block survives and its icon value goes back to the model’s zero (null hash, empty box). An icon has no id of its own, so there is no lifecycle op to write here.
- image
- Inventory row “New Image”: place a picked file as free-floating artwork. Its box is the one float geometry the document stores — unsnapped, so the image keeps the aspect the drag or the file gave it.
- push_
payload 🔒 - The payload rider: the create-only asset op, pushed only where the document does not already hold the hash. Content addressing makes the non-edit filter exact — the same hash is the same bytes, so a second copy could only ever say what the first already said.
- set_
icon - Inventory row “Set Block Icon”: attach — or replace — a block’s
foreground artwork. The icon is one atomic value, so the picture and
the box it sits in are written whole; the default box is a square
ICON_SIDEof the block’s shorter side, centered.