@sakaniui/react 0.10.0 → 0.10.1
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/CHANGELOG.md +8 -0
- package/README.md +3 -0
- package/dist/emoji-index.json +1 -1
- package/dist/icon-index.json +1 -1
- package/dist/manifest.json +2 -2
- package/package.json +2 -1
- package/skills/sakaniui/SKILL.md +60 -0
package/dist/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 6,
|
|
3
3
|
"name": "@sakaniui/react",
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.1",
|
|
5
5
|
"description": "Machine-readable contract of the SakaniUI React library, generated from its TypeScript source.",
|
|
6
6
|
"docs": "https://www.sakaniui.com",
|
|
7
7
|
"guide": "https://www.sakaniui.com/llms-full.txt",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@sakaniui/react/emoji": "Fluent Emoji (full colour): EmojiName, one module each (1594 emoji, 311 with skin tones)."
|
|
25
25
|
},
|
|
26
26
|
"conventions": {
|
|
27
|
-
"version": "This manifest describes @sakaniui/react@0.10.
|
|
27
|
+
"version": "This manifest describes @sakaniui/react@0.10.1. Each component has `since`, the first release that contained it; a prop added later has its own `since`, and a value added later is listed in the prop's `valuesSince`. If the project has an older version installed, anything newer than that does not exist there.",
|
|
28
28
|
"acceptsNativeProps": "Components forward native HTML attributes (className, style, aria-*, event handlers) to their root element unless a prop says otherwise; only the props that are specific to SakaniUI are listed here.",
|
|
29
29
|
"accessibleName": "When `contract.requiresAccessibleName` is true, a required prop (aria-label, aria-labelledby or an alt text) is the only thing that names the control or image. Do not omit it.",
|
|
30
30
|
"tokens": "Use only the token names listed under `tokens`. Colour tokens follow the theme (the `.dark` class flips them); do not hard-code colours.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sakaniui/react",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "SakaniUI — token-driven React components and blocks with light & dark modes, plus built-in glass and Apple-style liquid glass surfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"dist",
|
|
41
41
|
"bin",
|
|
42
42
|
"AGENTS.md",
|
|
43
|
+
"skills",
|
|
43
44
|
"CHANGELOG.md",
|
|
44
45
|
"THIRD_PARTY_NOTICES.md"
|
|
45
46
|
],
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sakaniui
|
|
3
|
+
description: Build and edit UI with SakaniUI (@sakaniui/react), a React design system with components, blocks, icons, emoji, design tokens, dark mode and glass surfaces. Use whenever the user asks for a screen, page, form, dashboard, modal, table or any interface in a project that depends on @sakaniui/react, or when they mention SakaniUI, Sakani UI or its MCP server, or ask for an icon or emoji from it.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SakaniUI
|
|
7
|
+
|
|
8
|
+
SakaniUI (`@sakaniui/react`) is a token-driven React design system. It ships its own machine-readable
|
|
9
|
+
contract, so look things up instead of writing them from memory. This skill only tells you where to look.
|
|
10
|
+
|
|
11
|
+
## 1. Find the contract
|
|
12
|
+
|
|
13
|
+
Use the first source that is available.
|
|
14
|
+
|
|
15
|
+
1. **MCP server** (`sakaniui`), if its tools are connected: `search_components`, `get_component`,
|
|
16
|
+
`search_icons`, `search_emoji`, `check_code`, `check_usage`, `get_tokens`, `get_guide`,
|
|
17
|
+
`check_compatibility`, `get_changelog`. If it is not connected, tell the user it is one command
|
|
18
|
+
(`claude mcp add sakaniui -- npx -y @sakaniui/mcp`) and carry on with the sources below.
|
|
19
|
+
2. **The installed package**: `node_modules/@sakaniui/react/dist/manifest.json` (every component, prop, type,
|
|
20
|
+
default, required prop and token) and `node_modules/@sakaniui/react/AGENTS.md` (why, and when not to use
|
|
21
|
+
a component). They match the installed version exactly.
|
|
22
|
+
3. **The web**: https://www.sakaniui.com/llms.txt and https://www.sakaniui.com/llms-full.txt.
|
|
23
|
+
|
|
24
|
+
If a component, prop, value or token is not in the manifest, it does not exist. Do not invent it.
|
|
25
|
+
|
|
26
|
+
## 2. Workflow
|
|
27
|
+
|
|
28
|
+
1. **Check the project.** Read `package.json` for `@sakaniui/react` and its version. If it is missing, install
|
|
29
|
+
it (`npm install @sakaniui/react`). If the project is older than a component you want, run
|
|
30
|
+
`check_compatibility` or compare `since` in the manifest, and say so rather than using it.
|
|
31
|
+
2. **Check the setup.** Both stylesheets must be imported once at the app root, or everything renders unstyled:
|
|
32
|
+
```tsx
|
|
33
|
+
import '@sakaniui/react/tokens.css';
|
|
34
|
+
import '@sakaniui/react/style.css';
|
|
35
|
+
```
|
|
36
|
+
3. **Find the component.** Search by the name you would normally use (dialog, snackbar, navbar, date picker);
|
|
37
|
+
the server maps it to the real one. Start from the component's `example`, not from memory.
|
|
38
|
+
4. **Icons and emoji: look them up, never guess.** Icons are `IconTrash` from `@sakaniui/react/icons`, passed as
|
|
39
|
+
`icon={IconTrash}`. Emoji are `EmojiRocket` from `@sakaniui/react/emoji`. Use `search_icons` and
|
|
40
|
+
`search_emoji`, or `dist/icon-index.json` and `dist/emoji-index.json` in the package.
|
|
41
|
+
5. **Style with tokens.** Use `var(--color-…)` and the other CSS variables from `get_tokens`, not hex values,
|
|
42
|
+
pixel literals or utility classes the project may not have. Dark mode is `className="dark"` on a container;
|
|
43
|
+
glass is `data-surface="glass" | "liquid"`. Do not write per-component dark styles.
|
|
44
|
+
6. **Check before you answer.** Run `check_code` on every snippet. Without the server, confirm each prop and
|
|
45
|
+
token against the manifest and set every `contract.requiredProps` entry.
|
|
46
|
+
|
|
47
|
+
## 3. Rules that are easy to get wrong
|
|
48
|
+
|
|
49
|
+
- One `primary` Button per view. No hand-styled `<button>` where `Button` fits.
|
|
50
|
+
- An icon-only control needs its accessible name (`aria-label`); do not drop it.
|
|
51
|
+
- Object props (`columns`, `items`, `options`, `plans`) take objects with exactly the fields in the prop's
|
|
52
|
+
`shape`.
|
|
53
|
+
- Behaviour the system does not supply (data fetching, routing, validation rules) is yours to write. Say
|
|
54
|
+
where you composed something the system does not provide.
|
|
55
|
+
- When nothing fits, read `get_guide` (or section 3 of `AGENTS.md`) before building a one-off.
|
|
56
|
+
|
|
57
|
+
## 4. Before you finish
|
|
58
|
+
|
|
59
|
+
Both stylesheets imported once, tokens instead of literals, every icon-only control named, every prop and token
|
|
60
|
+
present in the manifest, and the result looks right inside `className="dark"`.
|