Skip to content

Design

Version: v1 Scope: per-tenant Owning service: studio-design-library

A Design represents a single published, immutable label layout created in the Pricer Studio designer. It records which ESL types the design targets, the pixel dimensions it was built for, the palette it uses, and the locations in Large File Storage (LFS) where the source JSON and the PNG preview/thumbnail live. Because designs are published snapshots, a new version of a design is a new record with a new ID rather than an in-place update.

ID pattern

t/{tenantid}/designs/{designid}

Segment Meaning
t/{tenantid} Tenant scope — designs from different tenants never mix
designs Fixed collection name
{designid} Opaque identifier assigned by studio-design-library at publish time

Schema

Field Type Description
id string Full resource name following the ID pattern above
display_name string Human-readable label shown in the Studio UI
compatible_esltype_ids repeated string ESL type resource names (format: esltypes/<esltype-id>) that this design can be rendered on. Must be lexicographically ordered.
width_pixels uint32 Rendered width in pixels after rotation has been applied
height_pixels uint32 Rendered height in pixels after rotation has been applied
rotation Rotation enum Whether the design source was rotated before rendering (see enum below)
color_space ColorSpace enum Deprecated — use palette_id instead
json_file_path string LFS path to the Studio JSON source file. Format: designer/t/<tenant-id>/jsondesigns/<sha256>.json. The SHA-256 of the file content is used as the filename, making the path content-addressed. The JSON must contain the SVG Base64 but should not contain the preview Base64.
preview_file_path string LFS path to the PNG thumbnail. Format: designer/t/<tenant-id>/designpreviews/<sha256>.png
palette_id string Palette resource name used during design, e.g. palettes/BWRY. Replaces the deprecated color_space field.
tags repeated string Free-form tags for categorisation and filtering in the Studio library

Rotation enum

Value Meaning
NONE (0) No rotation applied
CW_90 (1) Source was rotated 90 degrees clockwise before rendering

ColorSpace enum (deprecated)

Value Meaning
COLOR_SPACE_UNSPECIFIED (0) Default / unset
BW (1) Black & White
BWY (2) Black, White, Yellow
BWR (3) Black, White, Red
BWRY (4) Black, White, Red, Yellow

Use palette_id instead. ColorSpace is retained only for backward compatibility with older records.

LFS paths

Both json_file_path and preview_file_path are content-addressed: the filename is the SHA-256 hex digest of the file's binary content. This means re-publishing a design with identical content produces the same path, and any change produces a new path. Consumers that cache LFS files can use the path as a stable cache key.

Consumed by

Service Why
studio-renderer Fetches the JSON source from LFS to render the design onto an ESL image
Studio UI Displays display_name, preview_file_path thumbnail, and compatible ESL type information in the design library
  • canvasdesign — canvas-aware counterpart; targets multi-panel Canvastype setups instead of individual ESL types
  • palette — defines the exact RGB colors referenced by palette_id
  • font — fonts embedded in the JSON source are resolved from the tenant's font catalogue