@sakaniui/mcp 0.12.0 → 0.14.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/data/AGENTS.md +14 -0
- package/data/CHANGELOG.md +91 -0
- package/data/dist/emoji-index.json +1 -1
- package/data/dist/icon-index.json +1 -1
- package/data/dist/manifest.json +686 -21
- package/data/package.json +1 -1
- package/package.json +1 -1
package/data/AGENTS.md
CHANGED
|
@@ -213,6 +213,13 @@ lists its other names under `aliases` in `manifest.json`, and `search_components
|
|
|
213
213
|
(it is a custom listbox, not native `<select>`, so the open state matches the design). Combobox: search a
|
|
214
214
|
long list or pick several (multi, with chips). *Why:* choosing the lightest control that fits keeps forms
|
|
215
215
|
fast; don't use a Combobox for four options.
|
|
216
|
+
- **Input / Textarea `variant="ai"`** — The prompt box of an AI product ("Ask anything"): use `Input` for one line and
|
|
217
|
+
`Textarea` when the prompt can run long (it grows with the text up to `maxRows`). Put the buttons in `leading` and
|
|
218
|
+
`trailing` (an attach "+", a mic, a send button that replaces the mic once there is text); they take interactive
|
|
219
|
+
content, unlike `leadingIcon`. A thin ember light sweeps round the border while it is idle and on focus (`glow`:
|
|
220
|
+
`"pulse"` default, `"focus"`, `"off"`); under reduced motion it draws none. *Why:* it reads as the place to talk to the AI,
|
|
221
|
+
not as another form field. *Not for* ordinary forms: use the default variant there, and still give it a label
|
|
222
|
+
(`aria-label` if the design has none).
|
|
216
223
|
- **Checkbox / Radio / Switch** — Checkbox: independent yes/no, or multiple choices. Radio: exactly one of a
|
|
217
224
|
few (give them a shared `name`). Switch: an immediate on/off that takes effect now; a checkbox is for
|
|
218
225
|
things applied on submit.
|
|
@@ -259,6 +266,13 @@ lists its other names under `aliases` in `manifest.json`, and `search_components
|
|
|
259
266
|
colour you want (`theme="dark"` for a dark surface inside a light page); give markers a `label` and
|
|
260
267
|
`onMarkerClick` to make them selectable. Choose Map when people need streets and zoom, MapGlobe when the point
|
|
261
268
|
is global spread.
|
|
269
|
+
- **CommandMenu / CommandMenuTrigger / CommandMenuAnswer** — the ⌘K search and command palette: search pages, people,
|
|
270
|
+
files and actions in one place. Use it instead of building a modal with an `Input` and a list. Pass `groups` of
|
|
271
|
+
`items` and handle `onSelect`; it opens on ⌘K by itself and filters as you type (`filter={false}` for server
|
|
272
|
+
results, with `state="loading"` while you wait). Give every item a `label`, and `shortcut` / `description` / `meta`
|
|
273
|
+
for context. Add `scopes` for tabs, `onAskAI` for ⌘↵, `answer` for an Ask AI answer card, `variant="simple"` for the
|
|
274
|
+
plain version. A `Combobox` is for choosing a value in a form, not for navigating an app. Put a
|
|
275
|
+
`CommandMenuTrigger` in the top bar.
|
|
262
276
|
- **Avatar / AvatarGroup** — Avatar type is inferred: `src` → image, `initials` → initials, else icon.
|
|
263
277
|
Prefer a real image when you have one; initials are the fallback, not the default.
|
|
264
278
|
- **BoardCard / BoardColumn** — kanban pieces. `BoardColumn state="loading"` styles the column; *you* pass
|
package/data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,97 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@sakaniui/react` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.14.0
|
|
6
|
+
|
|
7
|
+
- **New: `variant="ai"` on `Input` and `Textarea`**, the prompt box of an AI product, built from the new *Input AI* and *Textarea AI* sets in
|
|
8
|
+
Figma. Pass `variant="ai"` and the field becomes the "Ask anything" box: a larger 16px field, room for action buttons, and a light that
|
|
9
|
+
sweeps round its border.
|
|
10
|
+
- **Input:** a pill (44 / 56 / 64px for `sm` / `md` / `lg`) with `leading` and `trailing` slots for action buttons, such as an attach
|
|
11
|
+
button, a mic and a send button. Unlike `leadingIcon`, these slots take interactive content.
|
|
12
|
+
- **Textarea:** a 16px-radius box with the field on top and an actions row underneath (`leading` on the left, `trailing` on the
|
|
13
|
+
right). The field grows with what you type, up to `maxRows` lines (8 by default), then scrolls. Focus swaps the border for a static
|
|
14
|
+
1.5px ember gradient, left to right (not for `error` or `disabled`, which keep their own borders).
|
|
15
|
+
- **`glow`:** `"pulse"` (default) sweeps the light every 2.5s while idle and once each time the field takes focus; `"focus"` sweeps
|
|
16
|
+
only on focus; `"off"` draws none. The light is a thin line in an ember gradient (indigo, violet, magenta, red, brand orange,
|
|
17
|
+
amber, pale gold: a cool tail and a hot head) with a faint haze, one lap in about 1.3s, clockwise from the top-left. It follows the
|
|
18
|
+
border's own path at an even speed (CSS `offset-path`), so it works on any box, wide or square. It is hidden under
|
|
19
|
+
`prefers-reduced-motion` and where `offset-path: inset()` is not supported.
|
|
20
|
+
- Light, dark and glass surfaces come from the tokens, with nothing extra to set. The text is `body/md` (16px, weight 500).
|
|
21
|
+
- New tokens: `--color-blue-700` and `--color-violet-500`, the two Figma primitives the ember gradient needs.
|
|
22
|
+
|
|
23
|
+
## 0.13.0
|
|
24
|
+
|
|
25
|
+
- **New: `CommandMenu`**, a ⌘K search and command palette, built from the new *↳ Command Menu* page in Figma. A search field,
|
|
26
|
+
scope tabs with counts, grouped results with the matched letters in the strong weight, a footer of key hints, and the
|
|
27
|
+
states a real search needs. Also **`CommandMenuTrigger`** (the ⌘K pill for a top bar) and **`CommandMenuAnswer`** (an
|
|
28
|
+
answer card with sources, for the Ask AI state).
|
|
29
|
+
- You pass `groups` of `items` (`label`, `description`, `type`, `icon`, `avatar`, `meta`, `shortcut`, `keywords`, `tags`) and
|
|
30
|
+
handle `onSelect`. It filters as you type unless you pass `filter={false}` (server results); `state="loading"` shows
|
|
31
|
+
skeleton rows and `state="error"` an error with `onRetry`.
|
|
32
|
+
- Keyboard: ⌘K / Ctrl K opens and closes it; ↑ ↓ Home End move one gliding highlight; ↵ chooses; ⌘↵ asks AI (with
|
|
33
|
+
`onAskAI`); Tab and Shift Tab switch scope; ⌫ in an empty field removes the last filter token; typing `team:design`
|
|
34
|
+
and a space makes a token (`filterKeys`); esc clears the query, then closes. Focus returns to where it was.
|
|
35
|
+
- No results is never a dead end: `emptyTitle`, `suggestions` ("Did you mean…", "Remove the filter") and `fallbackGroups`
|
|
36
|
+
("Try instead"). `answer` takes an answer card or a Chain of Thought; `renderPreview` adds a detail pane beside the list.
|
|
37
|
+
- The No results illustration is alive: the ghost rows flow up without stopping, the top one fading out under a mask while
|
|
38
|
+
the next fades in at the bottom, and a magnifying lens circles slowly over them, showing the rows magnified and clearer
|
|
39
|
+
under the glass (CSS only, the lens uses two registered `@property` lengths). The lens pops in and the title and chips
|
|
40
|
+
rise in. `prefers-reduced-motion` shows the still stack with the lens at rest, as in Figma.
|
|
41
|
+
- The list opens scrolled to the top when its first row is active, so the empty message is never cut off in a short window.
|
|
42
|
+
- The panel no longer resizes as you search. The list area has a fixed height (444px, the Figma No results body) and scrolls
|
|
43
|
+
inside it, so typing, clearing and switching scope never grow or shrink the panel (it still gives way on a short window;
|
|
44
|
+
`variant="simple"` stays as tall as its rows). With `renderPreview` the detail pane is always part of the layout, so
|
|
45
|
+
the width stays 880px whichever row is active; the pane follows the active row after a 140ms rest (so sweeping the
|
|
46
|
+
pointer or holding an arrow key does not flicker through every row), cross-fades, and shows `previewEmpty` when a row
|
|
47
|
+
has nothing to preview.
|
|
48
|
+
- The row highlight no longer lingers as a grey bar over the No results illustration (or the error and loading states) after
|
|
49
|
+
the results disappear; it fades out and comes back with the next result. The preview pane's empty message is centred.
|
|
50
|
+
- The Preview story's detail pane follows the adjusted Figma Command Preview: who (40px avatar, 16/22 name), the Online and
|
|
51
|
+
location badges, a divider, three icon details, a Recent section with times, and two full-width actions pinned to the
|
|
52
|
+
bottom. The answer card, detail pane and footer take Figma's surface/bg-chrome (bg/canvas in Solid; Glass and Liquid keep
|
|
53
|
+
their own), where they were transparent.
|
|
54
|
+
- The detail pane swaps its content in place when the active row changes (no fade or movement), after a 100ms rest on the
|
|
55
|
+
row so sweeping the pointer or holding an arrow key does not flicker through every row.
|
|
56
|
+
- **Ask AI waits to be asked, thinks, then writes the answer.** In the Ask AI scope an empty field shows suggested questions and
|
|
57
|
+
no answer; the answer slot only fills when a question is submitted (↵ on what you typed or on a suggestion, ⌘↵ anywhere).
|
|
58
|
+
It then plays a live Chain of Thought (steps stream in, the working line shimmers, finishing sweeps the rail), which folds
|
|
59
|
+
shut, and the answer card writes itself in word by word. `CommandMenuAnswer` takes `stream` (plain-string children) and
|
|
60
|
+
`onStreamEnd`; its sources and follow-up arrive once the text is written. With an `answer` set, an empty list is no longer
|
|
61
|
+
the "No results" state. The *Live Ask AI* and *Ask AI empty* stories show the whole flow, and Figma has `State=AI empty`
|
|
62
|
+
and `State=AI thinking`.
|
|
63
|
+
- **A soft light runs around the answer card while it is written.** On the card's 1px border, in the brand colour, from the first
|
|
64
|
+
word until the response has fully arrived (the text, then the sources and the follow-up), then it fades out while still moving.
|
|
65
|
+
Reduced motion shows none.
|
|
66
|
+
- **The AI mark is the SakaniUI arc mark on its own**, a circle with no tile, painted in the text colour (white in dark mode,
|
|
67
|
+
near-black in light), on the answer card and on the "Ask AI" rows, replacing the sparkles icon. `SakaniLogo` takes a `color`.
|
|
68
|
+
- New `previewActions`: buttons pinned to the bottom of the detail pane that stay put while the content above (from
|
|
69
|
+
`renderPreview`) changes from row to row. Pass a node, or a function that reads the previewed row.
|
|
70
|
+
- The Preview layout is narrower: 880px (was 960), with a 300px detail pane (was 320). The Figma Preview state and its
|
|
71
|
+
Command Preview part are resized to match.
|
|
72
|
+
- A person's row matches the Figma Leading slot: the 24px Avatar centred in the 28px slot, and the 8px status dot at (18, 17)
|
|
73
|
+
with an inside 1.5px ring (it sat 3px too far out and its ring rendered 1px).
|
|
74
|
+
- The scope tabs (All, Pages, People…) share one pill that glides to the chosen tab (150ms, the same as the row highlight),
|
|
75
|
+
for a click and for Tab / Shift Tab. It opens in place without sliding in, follows tabs that resize when counts appear, and
|
|
76
|
+
stays still with `prefers-reduced-motion`.
|
|
77
|
+
- The hover highlight now follows its row while something above it opens or closes (a Chain of Thought in the Ask AI answer),
|
|
78
|
+
instead of lagging behind and leaving the row without its hover effect. It is placed every frame for the length of the
|
|
79
|
+
transition, with the glide off (shared `useHoverHighlight`, so every flowing-highlight list gets it).
|
|
80
|
+
- Suggestion chips take `emphasis` (a word set in the strong weight, like "invoice" in "Did you mean invoice?") and `iconPosition="end"`.
|
|
81
|
+
- The error state takes `onRetry` ("Try again") and `onReport` (a quieter "Report" beside it), with `retryLabel` / `reportLabel`.
|
|
82
|
+
Scope counts show only for a finished search, not the idle list, loading or an error.
|
|
83
|
+
- `variant="simple"` is the plain version: the field, one group of rows and the key hints.
|
|
84
|
+
- **Changed: `Kbd`** now matches its Figma master: a flat 20px key cap (surface fill, 1px border, 4px radius, 12px text) with no bottom
|
|
85
|
+
shadow. It was heavier before (subtle fill, 6px radius, a 1px bottom shadow). This applies everywhere `Kbd` is used.
|
|
86
|
+
- Reads the Surface tokens, so it re-skins in Glass and Liquid areas; portals to the body like Modal and keeps the theme
|
|
87
|
+
and surface of where it was opened. Accessible: a dialog with a combobox field, a listbox of options, a live
|
|
88
|
+
region announcing the result count, and reduced motion. Text uses `fg/muted` (the Figma file used `fg/subtle` in a few
|
|
89
|
+
places, which is 2.5:1 on white).
|
|
90
|
+
- **New spacing tokens `--space-28` and `--space-36`**
|
|
91
|
+
- **New spacing tokens `--space-28` and `--space-36`**, matching the Figma Spacing collection (`space/28`, `space/36`), so the
|
|
92
|
+
28px and 36px gaps used in charts, app shells and page covers now come from the scale instead of raw numbers.
|
|
93
|
+
- Manifest: `ChainOfThought.status` no longer reports a default (there is none: no working line unless you pass it), and
|
|
94
|
+
`WorkingIndicator.status` reports its real default, `"working"`.
|
|
95
|
+
|
|
5
96
|
## 0.12.0
|
|
6
97
|
|
|
7
98
|
- **New: `ChainOfThought`**, an AI agent's visible work, built from the new *↳ Chain of Thought* page in Figma.
|