@sakaniui/mcp 0.17.3 → 0.18.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 CHANGED
@@ -270,7 +270,14 @@ lists its other names under `aliases` in `manifest.json`, and `search_components
270
270
  navigation: `variant` land or ocean, `markers`, `arcs`. It has no background of its own, so place it on the
271
271
  colour you want (`theme="dark"` for a dark surface inside a light page); give markers a `label` and
272
272
  `onMarkerClick` to make them selectable. Choose Map when people need streets and zoom, MapGlobe when the point
273
- is global spread.
273
+ is global spread. A marker can carry data: `size` ("sm" | "md" | "lg", bigger = more), `rank` (a numbered chip that
274
+ matches a list beside the globe) and `status="watch"` (a dashed amber ring, so a warning is not only a colour).
275
+ Change `center` and the globe turns to face the new place; `zoom` scales it; `renderMarkerCard` puts your own card
276
+ on the hovered or selected marker (`cardPlacement="side"` puts it beside the marker). `markerScale={1}` keeps the
277
+ markers at design size on a small globe.
278
+ **Flag** — a country flag (`country="JP"`, an ISO alpha-2 code; 16px beside text, 32px beside a heading). Not an emoji:
279
+ it is the Figma flag artwork, so use it instead of a flag emoji. Only the flags the library uses are imported; any other
280
+ code draws a neutral placeholder. Put the country's name in text beside it.
274
281
  - **CommandMenu / CommandMenuTrigger / CommandMenuAnswer** — the ⌘K search and command palette: search pages, people,
275
282
  files and actions in one place. Use it instead of building a modal with an `Input` and a list. Pass `groups` of
276
283
  `items` and handle `onSelect`; it opens on ⌘K by itself and filters as you type (`filter={false}` for server
@@ -289,6 +296,10 @@ lists its other names under `aliases` in `manifest.json`, and `search_components
289
296
  Blocks (`CRMDashboardBlock`, `DataTableBlock`, `KanbanBoardBlock`, `LoginBlock`, …) are composed
290
297
  screens, not primitives. Use one when it matches the screen you are building; otherwise compose primitives.
291
298
  Many Figma-frame blocks have a fixed design width — put them in a container at least that wide or scale them.
299
+ `LiveMapBlock` is a live payments map (a dotted globe with ranked, sized dots, a ranked city list that becomes a
300
+ city's detail, region filters, a metric switch and a replay of the day). Use it for "where is the money coming from"
301
+ screens; pass your own `cities`, `hourly` and `totals` (the default is sample data), and `state="loading"` or
302
+ `"empty"` for those states. Below 720px of its own width it becomes the phone layout with the list as a bottom sheet.
292
303
 
293
304
  ## 6. Moments an AI product needs (compose these today)
294
305
 
package/data/CHANGELOG.md CHANGED
@@ -2,6 +2,44 @@
2
2
 
3
3
  All notable changes to `@sakaniui/react` are documented here.
4
4
 
5
+ ## 0.18.0
6
+
7
+ ### Map Globe: markers that carry data, a globe that follows
8
+
9
+ All additions are optional; a globe that uses none of them draws and behaves as before.
10
+
11
+ - **`MapGlobeMarker.size`** (`"sm"` | `"md"` | `"lg"`, default `"sm"`): the dot, its ring and its halo scale 1x, 1.6x and 2.3x, so a marker can show a value (Figma Map Globe Marker, Size).
12
+ - **`MapGlobeMarker.rank`**: a numbered chip beside the marker that matches the rank in a list next to the globe (Rank=Number).
13
+ - **`MapGlobeMarker.status="watch"`**: a dashed amber ring (`--color-warning-solid`), so a warning is never carried by colour alone (Status=Watch).
14
+ - **`center` is reactive.** When it changes after mount the globe turns to face the new place, the short way round, over about 0.9s, then pauses its spin for a moment; dragging cancels it. Under reduced motion it jumps.
15
+ - **`zoom`** (default `1`, `0.7` to `2.2`): scales the sphere, easing between values.
16
+ - **`renderMarkerCard(index, marker)`**: your own card, kept on the hovered marker (or the selected one) as the globe turns, above it or below when there is no room, and hidden while the marker is on the far side. It never takes the pointer. Replaces the small text label.
17
+ - **Arrow keys** move between the markers' keyboard buttons.
18
+ - New type export `MapGlobeMarkerSize`.
19
+ - **`cardPlacement`** (`"above"` | `"side"`, default `"above"`): `renderMarkerCard` can sit beside the marker, on the side with room, instead of above it.
20
+ - **`MapControlButton` takes `pressed`** (a toggle that is on: a bg/muted fill and `aria-pressed`) and `title`. Figma's Map Control Button set has a matching `Pressed` state.
21
+ - **`markerScale`**: how big the markers are drawn (dots, rings, halos and rank chips together). It follows the globe's size by default; pass `1` to keep the design size on a small globe, so the rank numbers stay readable on a phone.
22
+ - A marker pinned with `hovered` now shows its `renderMarkerCard` too. Markers stay solid until the very edge of the disc instead of fading a little early, and the rank chip is Geist Regular 10px as in Figma.
23
+
24
+ ### New component: `Flag`
25
+
26
+ A country flag from the Figma "Flags" set: `<Flag country="JP" />`, by ISO 3166-1 alpha-2 code, a 16 x 16 box (Figma uses 16 beside text and 32 beside a heading; pass `size`). Decorative unless you pass `label`: put the country's name in text beside it. The flags the library uses are imported (GB, SG, JP, IN, AU); a country whose artwork is not imported yet draws a neutral placeholder of the same shape, so a row of flags never shifts. Each further flag is added by dropping its exported SVG markup into `src/components/Flag/flags.ts`.
27
+
28
+ ### New block: Live Map (`LiveMapBlock`)
29
+
30
+ A live payments map from the Figma "Live Map" set (Device x State). A dotted globe whose dots are sized by the metric and ranked, a ranked list of cities that turns into a city's detail when you pick one, region filters, a Revenue / Payments / Approval rate switch, a hover card (with the city's `Flag`), a legend, zoom buttons, and a playback row (Replay today, Pause, the volume by hour, a UTC clock). A rotate button in the map controls stops and restarts the globe's slow spin. Under 720px of its own width it is the phone layout, with the list as a bottom sheet. States: `default`, `loading` (skeletons), `empty` (no payments yet today). It is a composition example: the data is plain props (`cities`, `regions`, `hourly`, `totals`, `insight`) with the Figma block's figures as the default, and it is built from Map Globe, Flag, Segmented control, Filter chip, Tabs, Badge, Button, Icon button and Location dot. Each city's `country` is its two-letter code, which shows as its flag in the list, the hover card, the city detail and the phone rows.
31
+
32
+ ```tsx
33
+ import { LiveMapBlock } from '@sakaniui/react/blocks';
34
+ <LiveMapBlock cities={cities} onViewCity={(city) => router.push(`/payments?city=${city.id}`)} />
35
+ ```
36
+
37
+ ### Fixed
38
+
39
+ - **`Button` is the same height with an icon as without one.** A 16px (or 18px) icon was taller than the label's 14px line, so every `sm` button with an icon was 34px tall (Figma: 32) and `md` 38px (Figma: 36). The icon now overflows its box evenly and the button keeps its size.
40
+ - **`FilterChip` is 26px tall**, as in Figma (4px + an 18px line + 4px, with the 1px stroke inside). It was 28px, and 2 to 4px wider.
41
+ - **The active `SidebarItem` has no hover state.** It is where you are, not something to point at, so the pointer no longer changes it. The "Active - Indicator" item keeps shadow/xs under the pointer (it used to strengthen to shadow/sm), the "Active - Default" item keeps its bg/subtle tint (it used to lighten toward bg/canvas, expanded only), and the Sidebar's gliding hover highlight skips the active item (`data-hover-item="off"`, also on the active `SidebarSubItem`). Every other item still reacts as before. The Figma Sidebar Item set no longer has the three "Active Hover" variants either. Nothing to change in your code; blocks that use `SidebarItem` (the CRM dashboard, the chat and AI chat blocks) follow automatically.
42
+
5
43
  ## 0.17.3
6
44
 
7
45
  - **Marketing and commerce blocks keep their Figma padding at every width above a phone.** In 0.16.0 their side padding followed the *viewport* (`clamp(16px, 4vw, 48px)`), so a block shown at its full Figma width in a window under about 1200px had less padding than the design (40px at 1000px). The padding is now Figma's (48px; 64px above and below the centred hero) at any width, and tightens to 16px only on a phone-sized viewport (640px and under). Applies to `HeroBlock`, `FeatureGridBlock`, `LogoCloudBlock`, `CtaBannerBlock`, `PricingTableBlock`, `TestimonialBlock`, `FaqBlock`, `BlogListingBlock`, `CareersBlock`, `TeamSectionBlock`, `ProductDetailBlock`, `ProductGridBlock`, `CheckoutFlowBlock` and `DataTableBlock`.