figura-cli 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "figura-cli",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "Command-line client for the Figura visualization SaaS",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -2,7 +2,7 @@
2
2
  name: fig
3
3
  description: "Mock up a screen as an on-brand, shareable HTML fig via your Figura team — render a UI state in seconds before writing the real code. Use when asked to visualize a screen, mock a UI, or 'make a fig'. iPhone-framed by default; browser frame for web/desktop."
4
4
  argument-hint: '<what to visualize>'
5
- allowed-tools: 'mcp__figura__figura_whoami, mcp__figura__figura_fig_scaffold, mcp__figura__figura_generate_fig, mcp__figura__figura_create_fig, mcp__figura__figura_revise_fig, mcp__figura__figura_publish_fig, mcp__figura__figura_commit_fig, Bash(figura *), Bash(bunx figura-cli *)'
5
+ allowed-tools: 'mcp__figura__figura_whoami, mcp__figura__figura_fig_scaffold, mcp__figura__figura_fig_devices, mcp__figura__figura_generate_fig, mcp__figura__figura_create_fig, mcp__figura__figura_revise_fig, mcp__figura__figura_publish_fig, mcp__figura__figura_commit_fig, Bash(figura *), Bash(bunx figura-cli *)'
6
6
  ---
7
7
 
8
8
  # /fig — figure it out before you build it
@@ -316,26 +316,23 @@ with two things you do **not** hand-write:
316
316
  search and the self-improving loop. Artifact-descriptive only — no team/brand
317
317
  ids (the block is served on the public link).
318
318
 
319
- So when you **hand-build** a fig (the default path), do your part of the contract:
320
-
321
- - **Bare mobile screen and ONLY then:** when the fig's HTML *is* one raw app
322
- screen (no masthead, no state pills, no hand-drawn `.fig-device` frames — the
323
- Figura viewer draws the iPhone shell around it), size the body to the exact
324
- logical screen and emit `<meta name="figura:artboard" content="WxH">` matching
325
- it (iPhone portrait `393x852` / landscape `852x393`). For OS-chrome insets
326
- prefer `var(--fig-safe-top, 59px)` / `.fig-safe-top` over hardcoded pixels —
327
- the stamp fills the value, the fallback keeps you correct if the kit is absent.
328
- - **A document-style fig NEVER gets an artboard.** The artboard meta is the
329
- viewer's opt-in signal for "size me to exactly WxH and wrap me in a device
330
- shell" stamped on an overview focus redesign page (or any compare /
331
- variations document with its own masthead, pills, or hand-drawn device
332
- frames), it crams the whole document into a phone frame. A document fig
333
- renders full-page precisely because it carries NO artboard meta, even when
334
- every screen it depicts is a mobile app.
335
- - **Always:** emit `<meta name="figura:context" content="...">` (design intent).
336
- - **Optional but valued:** if the fig grounds a specific feature or flag, emit
337
- `<meta name="figura:feature" content="<flag-or-slug>">` so it links back to the
338
- feature it depicts.
319
+ So when you **hand-build** a fig (the default path), you do your part of the
320
+ contract — but the exact rules are **fetched, not restated here**: the
321
+ presentation model (frameless single vs canvas composition), when to emit or
322
+ omit the whole-fig `<meta name="figura:artboard">`, the `.fig-device` /
323
+ `data-device` frame markup (and NOT authoring its CSS Figura stamps the bezel,
324
+ Dynamic Island, and safe-area insets), the `figura:context` / `figura:feature`
325
+ metas, and the valid devices all live in the canonical scaffold.
326
+
327
+ - **`figura_fig_scaffold`** (CLI: `figura fig scaffold`) is authoritative for the
328
+ presentation model, the frame markup, and the output contract. Fetch it and
329
+ follow it verbatim (step 2 above) do NOT restate design/format rules from
330
+ memory. A bundled skill can pin stale; the scaffold is always current.
331
+ - **`figura_fig_devices`** (CLI: `figura fig devices`) is the full valid-
332
+ `data-device` catalog every framed-device id + its geometry (logical dims,
333
+ safe-area insets, cutout, corner radius). Pick a real id from it for a canvas
334
+ composition's `<div class="fig-device" data-device="…">`; an unknown id
335
+ silently gets no frame.
339
336
 
340
337
  ## Notes
341
338