Files
vectorcraft/crates/doc/Cargo.toml
T
dotCooCoo 6857811e1f Plug-ins: generators draw generated art objects that keep their parameters
A plug-in of the new kind `generator` draws art from its parameters alone.
plugin.generate runs it and adds its art as a generated art object: a group
that keeps the plug-in's id and name, the parameters and the transform since
the art was drawn. Object › Plug-ins lists each generator, and
Object › Plug-ins › Edit Generated Art… (plugin.editGenerated) runs it again
with changed parameters and replaces the art as one undo step, placed,
stroke-scaled and pattern-transformed as the old art was. Parameters that
change nothing run nothing and make no undo step. Object › Expand makes the
object an ordinary group. plugin.generatedInfo reports an object's plug-in,
parameters and state.

- Given parameters are checked against the manifest: an undeclared name, a
  number outside its range (each number of a numberList too) and text past
  its maxLength are errors. Parameters are capped at 64 KiB of JSON, art at
  16 MiB, and the output is checked before the document changes.
- The native file keeps the plug-in id, name, parameters, transforms, scales
  and a SHA-256 of the art's JSON. Opening a file never runs a plug-in: a
  missing plug-in, a plug-in of another kind, a damaged saved field or a hash
  mismatch keeps the art as the file has it. The open's warnings name the
  plug-in, except for damaged fields, which get one warning that names no
  plug-in. A damaged object stays damaged when saved again.
- plugin.run of a generator is an error naming plugin.generate.
- import_fuzz replaces each saved field with arbitrary JSON.

Docs: docs/plugins.md (Generators), docs/mcp.md, docs/target-app-parity.md.
2026-11-22 12:38:26 -08:00

42 lines
1.5 KiB
TOML

[package]
name = "vectorcraft-doc"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "VectorCraft document model: artboards, layers, objects, appearance (pure data + serde)"
[lints]
workspace = true
[features]
# `vectorcraft_doc::blend::spines_built` for other crates' tests (dev-dependencies only).
spine-count = []
# `vectorcraft_doc::symbols_read` for other crates' tests (dev-dependencies only).
symbol-read-count = []
# `vectorcraft_doc::locked_artboard_measures` for other crates' tests (dev-dependencies only).
locked-artboard-count = []
[dependencies]
vectorcraft-geom = { workspace = true }
vectorcraft-color = { workspace = true }
kurbo = { workspace = true }
image = { workspace = true }
# Image headers (PNG and JPEG sizes, `pixels::header_size`) and CMYK JPEG inks (`cmyk`).
craft-image-codecs = { workspace = true }
tiff = { workspace = true }
# 1-bit TIFFs compressed with CCITT Group 3 (Compression 2 and 3).
craft-stream-codecs = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
# The hash of a generated art object's art, which its file holds (`generated`).
sha2 = { version = "0.10", default-features = false }
thiserror = { workspace = true }
chrono = { workspace = true }
[dev-dependencies]
flate2 = { workspace = true }
# The CMYK JPEG reader `cmyk` had before craft-image-codecs, kept as the reference its inks match.
zune-jpeg = { workspace = true }
jpeg-encoder = { workspace = true }
proptest = { workspace = true }