Web2PrintArtworkAttributeController
You get this controller when useAttribute(...) resolves a Web2Print artwork attribute. An artwork attribute is backed by value entities that each carry print material metadata; you select one by its cid.
import { useAttribute } from "@expivi/product-configurator";
const attribute = useAttribute(configurator, attributeCid);
Selecting an artwork
Pass the value entity's cid to setValue(...). The controller copies the entity's material metadata into the configured value.
const artwork = attribute.allValues[0];
attribute.setValue(artwork.cid);
API
This controller adds no new public members. Its type-specific behavior lives in the overridden setValue(...)/parse(...):
setValue(cid)selects the artwork value entity whosecidmatches and carries its material metadata into the configured value:materialId,materialName, andsku(alongside the sharedvalue).parse(data)restores the selection by matching the first serialized value'sidagainst the available artwork values.
For all other members, see the Common Attribute API.