HOC SiteDocumentation

SVG canvas

Decoration and visibility use Decoration & visibility (BlockShell).

Layered SVG artboard with place/interact tools. Each layer can store per-element Authored fill/stroke paints (elementPaints keyed by stamped id), including hover and group-hover. Multi-select on the canvas applies the same colors to every selected part; interactions still attach links to stamped targets.

Fields

layers

SVG layers with src/markup, transform, and optional elementPaints Authored fill/stroke (legacy fillLight/fillDark strings still work for resting).

Use Interact mode, select parts (Shift/Cmd multi-select), then set Fill/Stroke (and hover) in SVG colors. Group-hover via Authored opaque keys. Paints cascade into nested stamped children that do not have their own paint entry.

layout

artboard

fitMode

Artboard fitting: adaptive scales to the container, free keeps the authored artboard and allows pan/zoom.

layout: {
  artboard: {
    fitMode: [{ if: "*", is: "adaptive" }]
  }
}

Default props

{
  "layers": [],
  "interactions": [],
  "shell": {
    "visibility": [
      {
        "if": "*",
        "is": true
      }
    ],
    "anchor": {
      "anchorId": [
        {
          "if": "*",
          "is": ""
        }
      ],
      "anchorKey": [
        {
          "if": "*",
          "is": ""
        }
      ]
    },
    "pointerEvents": [
      {
        "if": "*",
        "is": "auto"
      }
    ]
  },
  "layout": {
    "artboard": {
      "fitMode": [
        {
          "if": "*",
          "is": "adaptive"
        }
      ],
      "width": [
        {
          "if": "*",
          "is": 800
        }
      ],
      "height": [
        {
          "if": "*",
          "is": 500
        }
      ],
      "initialZoom": [
        {
          "if": "*",
          "is": 1
        }
      ]
    }
  }
}