figura-cli 0.23.1 → 0.23.2
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/dist/index.js +150 -148
- package/dist/mcp.js +31 -31
- package/package.json +1 -1
- package/skills/fig/SKILL.md +36 -11
- package/skills/skills.json +8 -2
package/package.json
CHANGED
package/skills/fig/SKILL.md
CHANGED
|
@@ -143,6 +143,19 @@ so you hand it the studied structure in the brief (see step 3, "Server render").
|
|
|
143
143
|
in that screen's `css`.
|
|
144
144
|
- Plus `area`, `title`, `orientation`, and a real `description`.
|
|
145
145
|
|
|
146
|
+
**Small screens are the SERVER's job — with one exception that is yours.**
|
|
147
|
+
Below a catalog-derived breakpoint every multi-frame layout (`compare`,
|
|
148
|
+
`variations`, `overview-focus`) restructures itself: ONE frame at a time, as
|
|
149
|
+
large as fits (never under 0.72 scale), behind a sticky bottom switcher, with
|
|
150
|
+
the Overview grid dropped. You do not write a media query, a toggle, or a
|
|
151
|
+
scale for this, and there is nothing to remember — it is emitted for you.
|
|
152
|
+
What the server CANNOT do is name the frames: **each screen's `label` IS the
|
|
153
|
+
switcher button**, so `label: 'Empty state'` / `'After save'` works and a
|
|
154
|
+
missing label degrades to `1`, `2`, `3`. Give every screen a short, distinct,
|
|
155
|
+
thumb-sized label. Design each screen's CONTENT to survive a 0.72 scale too —
|
|
156
|
+
~11px is the floor for body copy at that scale, so 10px annotations are yours
|
|
157
|
+
to avoid.
|
|
158
|
+
|
|
146
159
|
This uses the caller's own Claude — no extra cost. Follow the scaffold's brand
|
|
147
160
|
values verbatim; never invent brand values or restate design rules from memory.
|
|
148
161
|
**Fallback if the scaffold fetch fails** (older engine/CLI): fetch just the
|
|
@@ -272,7 +285,7 @@ pattern must be hand-authored — plain CSS-only radio tabs, binary, no library:
|
|
|
272
285
|
|
|
273
286
|
**★ FOCUS IS THE DEFAULT VIEW.** The fig opens on ONE full-size frame with state
|
|
274
287
|
pills — on desktop AND mobile. Overview is the *alternative*, behind the second
|
|
275
|
-
tab. Never open a redesign fig on the scaled grid: `layout: 'variations'` (a
|
|
288
|
+
tab, and on a phone it is dropped entirely: there the pills ARE the interface. Never open a redesign fig on the scaled grid: `layout: 'variations'` (a
|
|
276
289
|
scan-only grid at the kit's `--fig-scale:0.34`) is NOT a redesign presentation —
|
|
277
290
|
using it for one shipped a 4-state fig as 134px phones with ~3px annotation
|
|
278
291
|
chips. A Focus-only fig is **complete on its own**; add Overview only when there
|
|
@@ -283,6 +296,10 @@ are enough states that scanning them at once genuinely helps.
|
|
|
283
296
|
reads as spot-the-difference. This is where the context lives, pinned on the
|
|
284
297
|
frame as annotation chips: what's broken today, what each variation improves,
|
|
285
298
|
what it trades away. Open on the first pill = the honest current state.
|
|
299
|
+
- **Never put annotation chips inside a clipping box.** `position:absolute`
|
|
300
|
+
cannot escape an ancestor's `overflow:hidden`, so a chip that straddles a
|
|
301
|
+
rounded-corner frame ships sliced. Hang chips off a positioned wrapper as
|
|
302
|
+
siblings of the frame, anchored to grow away from its edge.
|
|
286
303
|
- **Overview — side by side (alternative).** Every state at once: the honest
|
|
287
304
|
current state first, then each variation, as scaled-down frames in a grid.
|
|
288
305
|
Under each: a status chip and ONE condensed context line (`+ / –`). This view
|
|
@@ -315,16 +332,24 @@ are enough states that scanning them at once genuinely helps.
|
|
|
315
332
|
giving it dimensions. It checks every injected component (device frame,
|
|
316
333
|
status bar, control bar, browser chrome), cross-checks the manifest's
|
|
317
334
|
`components` array, and reports the fig's own `frameKit` / `complete` /
|
|
318
|
-
`doubleFramed` checks; `--json` for machine output.
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
335
|
+
`doubleFramed` checks; `--json` for machine output. This is the check that
|
|
336
|
+
*proves* a frame renders. These are static checks over the served bytes —
|
|
337
|
+
`verify` reads markup and CSS, it lays nothing out, so it cannot see
|
|
338
|
+
overflow or a clipped chip.
|
|
339
|
+
3. **Screenshot THAT yourself** — layout is nothing `verify` reports. Take the
|
|
340
|
+
printed served HTML, saved to a deterministic project-scoped path (the
|
|
341
|
+
repo's `.figura/figs/` (gitignored), or `~/.figura/figs/` outside a bound
|
|
342
|
+
repo, never `/tmp`/`mktemp`), and render it at a few viewport widths.
|
|
343
|
+
`document.scrollWidth` must equal the viewport in every view and state
|
|
344
|
+
(sideways scroll = broken), no annotation chip may cover the content it
|
|
345
|
+
annotates, and no chip may be cut by a clipping ancestor: walk each chip's
|
|
346
|
+
ancestors up to `<html>` and, wherever computed `overflow` is
|
|
347
|
+
`hidden`/`clip`, assert the chip's rect stays inside that ancestor's box —
|
|
348
|
+
the viewport box for `<body>`/`<html>`, whose overflow propagates there.
|
|
349
|
+
Comparing a chip to the frame's rect alone misses the vertical escape, and
|
|
350
|
+
no rect test sees a rounded clip, which is why the authoring rule above is
|
|
351
|
+
the real guarantee. `figura fig open <id> --local` writes the same served
|
|
352
|
+
bytes to `<repo>/.figura/figs/figura-fig-<id>.html`.
|
|
328
353
|
|
|
329
354
|
A **wipe-slider** stays the narrow tool for exactly two states of the same
|
|
330
355
|
layout with pixel-level tweaks. Never ship a squeezed side-by-side as the
|
package/skills/skills.json
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "Skill version manifest (#752) — the source of truth for each Figura skill's OWN version line, DECOUPLED from the figura-cli package version. A release bumps the version here when a skill's content changes, then regenerates the engine seed (bun packages/core/scripts/build-skill-seed.mjs) and re-seeds. Version is a date tag (YYYY.MM.DD[.n]); releasedAt is ISO-8601. The CLI/MCP stamp this version into .figura-version at install; the engine seeds the registry from it.",
|
|
3
3
|
"skills": {
|
|
4
|
-
"fig": {
|
|
5
|
-
|
|
4
|
+
"fig": {
|
|
5
|
+
"version": "2026.08.04",
|
|
6
|
+
"releasedAt": "2026-08-04T17:44:19.938Z"
|
|
7
|
+
},
|
|
8
|
+
"figura-brand": {
|
|
9
|
+
"version": "2026.07.26",
|
|
10
|
+
"releasedAt": "2026-07-26T00:00:00.000Z"
|
|
11
|
+
}
|
|
6
12
|
}
|
|
7
13
|
}
|