@sakaniui/mcp 0.10.1 → 0.12.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 +27 -3
- package/data/CHANGELOG.md +98 -0
- package/data/dist/emoji-index.json +1 -1
- package/data/dist/icon-index.json +1 -1
- package/data/dist/manifest.json +2044 -81
- package/data/package.json +1 -1
- package/package.json +1 -1
package/data/AGENTS.md
CHANGED
|
@@ -245,6 +245,20 @@ lists its other names under `aliases` in `manifest.json`, and `search_components
|
|
|
245
245
|
row in a list. **Charts** — pick by question: trend over time → Line/Area; compare categories → Bar;
|
|
246
246
|
part of whole → Pie/Donut (few slices only); progress to a target → Radial; compare several measures →
|
|
247
247
|
Radar; drop-off → Funnel; intensity across two dimensions → Heatmap.
|
|
248
|
+
- **Map / MapMarker / MapPopup / MapClusterLayer** — an interactive tile map with no map library. Put `MapMarker`
|
|
249
|
+
(`pin`, `dot`, `cluster`) and `MapPopup` children inside `Map`, placed by `[latitude, longitude]` (latitude
|
|
250
|
+
first). Give every marker a `label`; a marker with `onClick` is a button and `selected` is yours to set. The
|
|
251
|
+
default tiles are OpenStreetMap's, fine for development and light use: for production traffic pass `tileUrl`
|
|
252
|
+
(and `attribution`) from a tile provider. For a live feed keep positions in state and give the markers `glide`
|
|
253
|
+
(about the interval between updates, in ms) so they slide instead of jumping. For more than a few dozen places
|
|
254
|
+
use `MapClusterLayer` (`points`, `renderPoint`) instead of mapping hundreds of `MapMarker`s. Dark mode follows
|
|
255
|
+
`.dark`; `theme="dark"` makes one map dark, `tileUrlDark` supplies a dark tile style. It only draws a map: no
|
|
256
|
+
routing, geocoding or search, and a map is hard to use without a pointer, so list the places beside it.
|
|
257
|
+
**MapGlobe** — a 3D dotted globe for places across the whole world (offices, customers, routes), not for
|
|
258
|
+
navigation: `variant` land or ocean, `markers`, `arcs`. It has no background of its own, so place it on the
|
|
259
|
+
colour you want (`theme="dark"` for a dark surface inside a light page); give markers a `label` and
|
|
260
|
+
`onMarkerClick` to make them selectable. Choose Map when people need streets and zoom, MapGlobe when the point
|
|
261
|
+
is global spread.
|
|
248
262
|
- **Avatar / AvatarGroup** — Avatar type is inferred: `src` → image, `initials` → initials, else icon.
|
|
249
263
|
Prefer a real image when you have one; initials are the fallback, not the default.
|
|
250
264
|
- **BoardCard / BoardColumn** — kanban pieces. `BoardColumn state="loading"` styles the column; *you* pass
|
|
@@ -259,9 +273,19 @@ Many Figma-frame blocks have a fixed design width — put them in a container at
|
|
|
259
273
|
|
|
260
274
|
## 6. Moments an AI product needs (compose these today)
|
|
261
275
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
276
|
+
`ChainOfThought` (with `ChainOfThoughtStep`, `SourceStack` and `WorkingIndicator`) covers showing an agent's
|
|
277
|
+
work. The other moments below have no dedicated component yet: build them from existing parts, and **tell the
|
|
278
|
+
user when you are composing** rather than implying a dedicated component exists.
|
|
279
|
+
|
|
280
|
+
- **Showing the agent's work.** Use `ChainOfThought`: one `ChainOfThoughtStep` per action (an `icon`, a `label`,
|
|
281
|
+
the `query` in monospace, a result `count`, and a `SourceStack` as `sources`). Append a step as the agent starts
|
|
282
|
+
it, mark the active one `status="active"` and finished ones `"done"` (they read muted), and give the container
|
|
283
|
+
`status="working"` with `startedAt` so the timer ticks on its own; switch to `status="done"` and the final
|
|
284
|
+
`elapsed` when the run ends. Give each step a recognisable icon: the site's real logo in its brand colour
|
|
285
|
+
(`icon={sourceLogo('reddit')}`, and the same in the `SourceStack`), or an emoji for steps with no site
|
|
286
|
+
(`EmojiLightBulb` for planning, `EmojiPageFacingUp` for reading). Do not use a generic magnifier for every
|
|
287
|
+
step. It only displays: you stream the steps in. Do not build this from `Stepper` (a
|
|
288
|
+
progress bar for a known sequence) or `ActivityFeed` (a log of past events).
|
|
265
289
|
- **The model isn't sure.** State uncertainty in words next to the claim, not hidden in colour. Use an
|
|
266
290
|
`Alert` (`color="info"` or `"warning"`) or a `Badge` ("Low confidence"). Offer the next step: verify,
|
|
267
291
|
rephrase, or ask for more context.
|
package/data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,104 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@sakaniui/react` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.12.0
|
|
6
|
+
|
|
7
|
+
- **New: `ChainOfThought`**, an AI agent's visible work, built from the new *↳ Chain of Thought* page in Figma.
|
|
8
|
+
A header, steps joined by a tree rail, and a live "Working" line.
|
|
9
|
+
- **`ChainOfThought`**: `title`, `icon`, `open` / `defaultOpen` / `onOpenChange` (the header toggles it, with
|
|
10
|
+
an animated open and close), `status` (`"working"` or `"done"`) with `elapsed` (seconds) or `startedAt`
|
|
11
|
+
(the time then counts up on its own), and `children`.
|
|
12
|
+
- **`SourceLogo`** and **`sourceLogo(name)`**: the real logo of the site a step searched or read, in its brand
|
|
13
|
+
colour, for the `icon` props of a step or a `SourceStack` chip (or `<SourceLogo name="reddit" />` on its own).
|
|
14
|
+
Seventeen sites: Google, X, Reddit, GitHub, LinkedIn, YouTube, Hacker News, Wikipedia, Stack Overflow, Product
|
|
15
|
+
Hunt, Medium, Notion, Substack, arXiv, Bluesky, Perplexity, DuckDuckGo. Black brands draw in the text colour so
|
|
16
|
+
they stay visible in dark mode. Emoji work as step icons too (`icon={EmojiLightBulb}`). A pending step's icon is
|
|
17
|
+
grey until it starts, and the spark that runs into the active step takes the logo's colour.
|
|
18
|
+
- **`ChainOfThoughtStep`**: `status` pending, active (read in full) or done (muted), an `icon`, a `label`, an
|
|
19
|
+
optional monospace `query`, a result `count`, and a `sources` row (add `onSourcesClick` to make it a button
|
|
20
|
+
with a chevron). The rail stops at the last step by itself; screen readers get each step's status.
|
|
21
|
+
- **`SourceStack`**: overlapping site-icon chips from `sources` ({ `label`, `icon` }); three to five read best.
|
|
22
|
+
- **`WorkingIndicator`**: the working line on its own: a living sparkle (in the brand colour, a 1px line) and a shimmering "Working" with the
|
|
23
|
+
elapsed time, or a check and "Worked for 11.2s". The sparkle's three stars move on their own: the big one turns
|
|
24
|
+
a quarter each cycle and breathes while the two small ones twinkle in turn, filling in at their peak, in time with
|
|
25
|
+
the shimmer. Both stop under reduced motion. The Live story has a Dark mode switch.
|
|
26
|
+
- Presentational: you append steps as your agent produces them. Light and dark through the tokens.
|
|
27
|
+
- **Motion**, from the Figma *Chain of Thought · motion* table, reads as ink running down the rail. An appended
|
|
28
|
+
step opens its row while the previous rail flows down into it, turns the corner and the icon lands; the label
|
|
29
|
+
is written in left to right, the query types itself, the count ticks up to its value and the source chips fan
|
|
30
|
+
out. A spark keeps running into the active step and its icon beats as it lands. Results that land later open
|
|
31
|
+
their row instead of jumping in. Finishing sends one sweep down the rail, lighting each icon in turn, and the
|
|
32
|
+
check is drawn when it lands. Opening the panel lets the steps rise in turn. Only what arrives after the first
|
|
33
|
+
render animates, and reduced motion makes all of it instant.
|
|
34
|
+
- Agent contract: the four components are in the manifest with a streaming-run recipe and the aliases *chain of
|
|
35
|
+
thought*, *reasoning steps*, *agent steps*, *tool calls*, *sources*, *favicon stack* and more; the agent guide's
|
|
36
|
+
"moments an AI product needs" now points at `ChainOfThought`.
|
|
37
|
+
|
|
38
|
+
## 0.11.2
|
|
39
|
+
|
|
40
|
+
- **Agent guide:** `AGENTS.md` gains a Map section (when to use `Map` or `MapGlobe`, latitude first, tile providers,
|
|
41
|
+
`glide` for live feeds, `MapClusterLayer` for many places, dark mode, accessibility), served by the MCP
|
|
42
|
+
server's `get_guide`.
|
|
43
|
+
- **MCP server:** `@sakaniui/mcp` 0.11.2 carries the 0.11 reference, so Map and its parts are found even in a
|
|
44
|
+
project that has no `@sakaniui/react` installed (a project that has it was already answered from its own copy).
|
|
45
|
+
- **Fixed: `since` for `MapControlButton` and `MapControls`** was 0.11.1; they shipped in 0.11.0. The release
|
|
46
|
+
history can now name the commit a version was actually published from (`scripts/manifest/releases.json`).
|
|
47
|
+
- No component or API changes.
|
|
48
|
+
|
|
49
|
+
## 0.11.1
|
|
50
|
+
|
|
51
|
+
- **Fixed: `Map` markers on the server.** Rendered before the map is measured, markers and popups were placed
|
|
52
|
+
against a 0x0 map and then jumped, and Next.js logged a hydration warning. They now appear once the map has a
|
|
53
|
+
size. No API changes.
|
|
54
|
+
- **Fixed: `--map-tile-filter` can be set from outside.** It was declared on the map itself, so a value set on a
|
|
55
|
+
wrapper was ignored, and a panel that forces the light tokens inside a dark page still got dark tiles. It now
|
|
56
|
+
falls back to the built-in light or dark filter, so setting `--map-tile-filter` on the map or on any ancestor wins.
|
|
57
|
+
- **Fixed: `tileUrlDark` now reacts to a `.dark` class added or removed on any ancestor**, not only on `<html>`.
|
|
58
|
+
|
|
59
|
+
## 0.11.0
|
|
60
|
+
|
|
61
|
+
- **New: `Map`**, an interactive tile map built from the new *↳ Map* page in Figma, with no map library.
|
|
62
|
+
Tiles are plain images on a Web Mercator grid (OpenStreetMap by default; pass `tileUrl` and `attribution` for
|
|
63
|
+
your own provider). Drag to pan with inertia, scroll or pinch to zoom at the pointer, double-click to zoom in;
|
|
64
|
+
with focus, arrows pan and + / - zoom. Props: `center`, `zoom`, `minZoom`, `maxZoom` (changing `center` or `zoom`
|
|
65
|
+
flies the map there), `onViewChange`, `controls`, `locate` with `onLocate` / `onLocateError`, `height`, `tileUrl`,
|
|
66
|
+
`attribution`. Dark mode inverts and mutes the tiles through `--map-tile-filter`, which you can override.
|
|
67
|
+
- **`MapMarker`**: `pin`, `dot` or `cluster` (with `count`), `selected`, `label`, `onClick`.
|
|
68
|
+
- **`MapPopup`**: a card that opens above a place, with `title`, `description`, `onClose` and `offset`.
|
|
69
|
+
- **Live data:** `glide` (ms) on `MapMarker` and `MapPopup` slides them to each new `position` instead of
|
|
70
|
+
jumping, for markers fed by a WebSocket, server-sent events or polling. It interpolates the place, so it stays
|
|
71
|
+
correct while the map is panned or zoomed, and reduced motion turns it off.
|
|
72
|
+
- **`MapClusterLayer`**: pass `points` and a `renderPoint`; nearby places group into counted cluster markers
|
|
73
|
+
that zoom to their places on click, and only what is in view is rendered (a zoom step takes about 5 ms with
|
|
74
|
+
10,000 places). `radius`, `clusterMaxZoom` and `onClusterClick` tune it.
|
|
75
|
+
- **Dark mode** like the Figma *Dark* example: the map follows a `.dark` class on `<html>` or any ancestor, or
|
|
76
|
+
pass `theme="dark"` to make just that map dark on a light page (tiles, markers, controls and popups all switch).
|
|
77
|
+
The default tiles are darkened to flat near-black land with blue water and roads darker than the land;
|
|
78
|
+
`tileUrlDark` swaps in a provider's own dark tiles instead.
|
|
79
|
+
- **Every Figma variant and state:** `MapMarker` Pin / Dot / Cluster × Default / Hover / Selected (hover works on
|
|
80
|
+
every marker, and the hovered or selected one rises above its neighbours); new `MapControlButton` and
|
|
81
|
+
`MapControls` (Default / Hover / Disabled, with or without the locate button); `MapPopup` gains `pointer`
|
|
82
|
+
(Figma *Show pointer*). `hovered` pins the hover look on markers and control buttons for docs and visual tests.
|
|
83
|
+
- `useMapContext()` gives custom overlays `project`, `zoom`, `flyTo` and `fitBounds`.
|
|
84
|
+
- **New: `MapGlobe`**, a 3D dotted globe (the Figma *Map Globe*), with hover too: markers have Default, Hover
|
|
85
|
+
(soft halo), Selected (larger halo) and Active (pulse) states; hovering one stops the spin and shows its `label`
|
|
86
|
+
in a small card; `onMarkerClick` / `onMarkerHover` report the marker, and labelled markers are reachable with Tab.
|
|
87
|
+
`theme="dark"` makes a globe on a dark surface draw light dots. `variant` "land" dots the continents and "ocean"
|
|
88
|
+
dots the sea; it spins, can be dragged with inertia, and pauses offscreen and under reduced motion. `markers`
|
|
89
|
+
(with `active` pulses) and `arcs` are plain props, so a feed can drive them. It is a canvas with an orthographic
|
|
90
|
+
projection and an 11 KB land mask (Natural Earth, public domain, notice in `THIRD_PARTY_NOTICES.md`), so it adds
|
|
91
|
+
no dependency.
|
|
92
|
+
- Agent contract: `Map`, `MapMarker`, `MapPopup`, `MapClusterLayer` and `MapGlobe` are in the manifest with the
|
|
93
|
+
aliases *google maps*, *leaflet*, *mapbox*, *globe*, *marker clustering* and more, plus recipes for a live feed
|
|
94
|
+
and for clustering.
|
|
95
|
+
|
|
96
|
+
## 0.10.2
|
|
97
|
+
|
|
98
|
+
- **New logo.** The SakaniUI arc mark replaces the orange "S" tile everywhere the library shows its own brand:
|
|
99
|
+
`PlaceholderLogo`'s default mark (now drawn inline in fg/default, so it re-themes), the demo blocks' sidebar
|
|
100
|
+
logos, and the Storybook tab icon. `SidebarHeader` drops its accent tile when the logo is the SakaniUI mark.
|
|
101
|
+
No API changes.
|
|
102
|
+
|
|
5
103
|
## 0.10.1
|
|
6
104
|
|
|
7
105
|
- **New: an agent skill.** `skills/sakaniui/SKILL.md` ships in the package. It triggers when someone asks an
|