Documentation is work in progress and not completeEditor
FlashCC/The canvas/Section 4 of 29

The data model

Doc, Slide and Layer in artboard pixels — array order is z-order, and framework and styleId are stamped once so analytics can attribute performance.

Doc  { version: 3, id, name, width, height, palette[], media[],
       group?, framework?, styleId?, archived?, slides[], createdAt, updatedAt }
Slide{ id, name, background, gradient?, layers[] }
Layer{ id, name, kind, x, y, w, h, rotation, opacity, visible, locked,
       fill, gradient?, stroke, strokeWidth, radius, …kind-specific }

LayerKind is text | rect | ellipse | triangle | line | icon | image.

  • •Coordinates are artboard pixels. A layer at x: 540 is at 540. Not fractions, not percentages.
  • •Array order is z-order, index 0 at the back.

framework and styleId are stamped once at generation and never re-derived. They exist so analytics can attribute performance to how a carousel was built — a post cannot tell you that Problem → Solution outperforms unless something remembered which one it was.

Defaults worth knowing

ThingDefault
Text layer"Type something", sans, 64px, weight 600, line-height 1.2, align left, valign top
Iconglyph star, stroke = fill, strokeWidth 2, fill: "none"
Lineh: 8, radius: 4 — forced, overriding whatever height you passed
Imagefit: "cover"
Slidebackground #12161c
Doc1080×1350, one slide

Ids and font fallback

uid(prefix) is ${prefix}_${Date.now().toString(36)}${seq.toString(36)} with a module-level counter. Unique per process, not globally — two tabs can collide.

fontStack(id) checks uploaded faces before built-ins and falls back to FONTS[0], so an unknown id silently becomes Sans rather than undefined.