figura-cli 0.12.0 → 0.13.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.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Command-line client for the Figura visualization SaaS",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -74,13 +74,19 @@ greenfield.
74
74
  fetched design system. **Follow that design system verbatim; never invent brand
75
75
  values.** `figura_create_fig` returns a shareable `figura.so/f/<id>` link.
76
76
 
77
- 3. **Shortcutlet Figura render it.** Call **`figura_generate_fig`** with a
77
+ 3. **Server render the user's call, never yours.** Figura can also render the
78
+ fig server-side against the team brand: **`figura_generate_fig`** with a
78
79
  natural-language brief (same `area` / `orientation` / `mode` / `title` /
79
- `publish: true`) when you'd rather not hand-build. Figura renders it server-side
80
- against the team brand. This is **billed** (a `403` means no active
81
- subscription); pass **`fidelity: 'high'`** to render on the better model (the
82
- default `'fast'` is a lighter modelfine for rough states, weaker on brand).
83
- For best fidelity, prefer the hand-built path above.
80
+ `publish: true`). Use it only when the **user explicitly asks** for a server
81
+ render ("let Figura render it", headless/CI flows with no local model) — or
82
+ when you've offered both paths and they picked this one. It runs as an
83
+ **async job the tool polls for you** expect ~30–90s before the landed fig
84
+ returns; don't re-call while one is in flight. Unlike the default path, this
85
+ **spends the team's Figura credits** (a `403` means no active subscription).
86
+ Pass **`fidelity: 'high'`** to render on the better model (the default
87
+ `'fast'` is lighter — fine for rough states, weaker on brand). Never pick
88
+ this path on your own to save effort: it costs credits and hand-built figs
89
+ track the brand better.
84
90
 
85
91
  4. **Review** the returned link, share it, move on.
86
92
 
@@ -114,12 +120,45 @@ CSS-only radio tabs, since figs carry no `<script>`:
114
120
  width into scrollable overflow; scale minis with `transform` in
115
121
  fixed-aspect wrappers instead), and screenshot each state to check no
116
122
  annotation chip covers the content it annotates.
123
+ When you write the fig's HTML out to render/screenshot it, save it to a
124
+ **deterministic**, project-scoped path — the repo's `.figura/figs/` (already
125
+ gitignored), or `~/.figura/figs/` outside a bound repo — never `/tmp` or
126
+ `mktemp`. A stable path means a rerun overwrites the same file instead of
127
+ littering volatile temp locations, and matches where `figura fig open` writes
128
+ (`<repo>/.figura/figs/figura-fig-<id>.html`).
117
129
 
118
130
  A **wipe-slider** stays the narrow tool for exactly two states of the same
119
131
  layout with pixel-level tweaks. Never ship a squeezed side-by-side as the
120
132
  *only* view of desktop frames, and never a full-frame toggle as the only
121
133
  view of many variations — each is one half of the pair above.
122
134
 
135
+ ## Metadata & geometry — stamped for you
136
+
137
+ Every landed fig is **auto-stamped server-side** (on `create` and `generate`)
138
+ with two things you do **not** hand-write:
139
+
140
+ - A **device kit** `<style>` — the target's hard geometry as CSS custom
141
+ properties from the one source of truth: `--fig-artboard-w/h` and
142
+ `--fig-safe-top/right/bottom/left`, plus `.fig-safe` / `.fig-safe-top` /
143
+ `.fig-safe-bottom` helpers. Only mobile figs with a fixed artboard get it.
144
+ - A **machine-readable manifest** — `<script type="application/fig+json"
145
+ id="fig-manifest">` describing the artifact (target, geometry, generator,
146
+ intent, feature, external deps, and objective fidelity `checks`). It powers fig
147
+ search and the self-improving loop. Artifact-descriptive only — no team/brand
148
+ ids (the block is served on the public link).
149
+
150
+ So when you **hand-build** a fig (the default path), do your part of the contract:
151
+
152
+ - **Mobile:** size the body to the exact logical screen and emit
153
+ `<meta name="figura:artboard" content="WxH">` matching it (iPhone portrait
154
+ `393x852` / landscape `852x393`). For OS-chrome insets prefer
155
+ `var(--fig-safe-top, 59px)` / `.fig-safe-top` over hardcoded pixels — the stamp
156
+ fills the value, the fallback keeps you correct if the kit is absent.
157
+ - **Always:** emit `<meta name="figura:context" content="...">` (design intent).
158
+ - **Optional but valued:** if the fig grounds a specific feature or flag, emit
159
+ `<meta name="figura:feature" content="<flag-or-slug>">` so it links back to the
160
+ feature it depicts.
161
+
123
162
  ## Notes
124
163
 
125
164
  - **MCP unavailable** (headless / cron, or no interactive auth): fall back to the
@@ -42,40 +42,39 @@ CONVENTIONS (hard rules found in the repo)
42
42
  - e.g. aspect ratios, chrome shape (pill/capsule), "never use <X>", dark-first, etc.
43
43
  ```
44
44
 
45
- ## Worked example (Pano — abridged)
45
+ ## Worked example (fictional brand "Ledgerline" — abridged)
46
46
 
47
47
  ```
48
- PANO BRAND GROUND-TRUTH (locked):
48
+ LEDGERLINE BRAND GROUND-TRUTH (locked):
49
49
 
50
- WHAT PANO IS
51
- - A landscape creator-cinema iOS app. Films are always landscape, 2:1, never portrait.
52
- - Voice, not text. Tagline: "Go wide."
50
+ WHAT LEDGERLINE IS
51
+ - A calm B2B invoicing web app. Dense tables, quiet confidence, desktop-first.
52
+ - Numbers first. Tagline: "Books, balanced."
53
53
 
54
54
  COLORS (use ONLY these)
55
- - #DD5325 Vermillion — primary brand accent; record/active state; gradient start.
56
- - #2A6F84 Teal — secondary accent; pro/expert affordances; gradient end.
57
- - #E2E2DC Paperforeground text + light surfaces (a cool gray; never warm cream).
58
- - #0A0A0A Ground — near-black base background.
55
+ - #1F6F54 Fern — primary brand accent; primary actions; gradient start.
56
+ - #C9A227 Brass — secondary accent; highlights + paid states; gradient end.
57
+ - #F4F2EC Bonelight surfaces + foreground on dark (a warm off-white).
58
+ - #101312 Ink — near-black base background.
59
59
 
60
60
  THE BRAND GRADIENT
61
- - EXACTLY one: linear-gradient(90deg, #DD5325, #2A6F84). Wordmark/hero accents only.
61
+ - EXACTLY one: linear-gradient(90deg, #1F6F54, #C9A227). Wordmark/hero accents only.
62
62
 
63
63
  TYPE
64
- - Display: Clash Display — stack 'Clash Display', system-ui, sans-serif. Medium at display size.
64
+ - Display: Fraunces — stack 'Fraunces', Georgia, serif. Semibold at display size.
65
65
  - Body: Inter — stack Inter, -apple-system, 'SF Pro Text', system-ui, sans-serif.
66
- - Mono: JetBrains Mono — hex values, timecode, numerics.
66
+ - Mono: JetBrains Mono — amounts, invoice ids, dates.
67
67
  - Scale: 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 48.
68
68
 
69
69
  SPACING / RADIUS
70
70
  - 4-based scale: 4 8 12 16 20 24 32 40 48 64. Radius: sm 4, md 8, lg 12, full 999.
71
71
 
72
72
  ICON LANGUAGE
73
- - SF Symbols by name (mic.fill, waveform, play.fill, chevron.right). Inline stroke SVG. NEVER emoji.
73
+ - Inline stroke SVG (receipt, arrow-right, check-circle). NEVER emoji.
74
74
 
75
75
  VOICE
76
- - "Vertical was a phase." "Stories went sideways." "Turn your phone." "Go sideways."
77
- - Terse, sideways, confident — never salesy.
76
+ - "Every cent, accounted." "Close the month, not your eyes." Terse, dry, precise — never salesy.
78
77
 
79
78
  CONVENTIONS
80
- - Films always 2:1 landscape. Chrome is pill/capsule (border-radius 999). Dark-first. Never iOS "Liquid Glass".
79
+ - Tables are the hero. Chrome is squared (radius md, never pill). Light-first with a dark ledger mode.
81
80
  ```