@devalok/shilp-sutra 0.46.0 → 0.47.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/AGENTS.md +13 -1
- package/MIGRATION.md +10 -0
- package/docs/recipes/install-tanstack-start.md +91 -44
- package/llms.txt +1 -1
- package/mcp-manifest.json +45 -2
- package/mcp-manifest.schema.json +6 -0
- package/package.json +2 -2
- package/scripts/welcome.mjs +4 -2
- package/skill/SKILL.md +1 -1
- package/skill/references/components.md +1 -1
- package/skill/references/setup-tanstack-start.md +91 -44
package/AGENTS.md
CHANGED
|
@@ -20,12 +20,24 @@ If you are a human, read [README.md](./README.md) instead.
|
|
|
20
20
|
|
|
21
21
|
## How to get details, in priority order
|
|
22
22
|
|
|
23
|
-
1. **shilp-sutra MCP**
|
|
23
|
+
1. **shilp-sutra MCP** — version-exact answers as JSON, cheapest on context. Hosted at `https://shilp-sutra.devalok.in/mcp` (connect it if it isn't already; it beats reading the frozen docs in `node_modules`). Reference tools: `find_component(query)`, `get_component(name, sections?)`, `get_tokens(category)`, `get_setup(framework)`, `upgrade(from, to)`, `search_docs(query)`. Setup tools: `detect_framework(packageJson)`, `preflight(framework, imports)`, `validate_snippet(code)`, `verify_setup(...)`, `report_issue(...)`. Always pass the consumer's installed version (from `node_modules/@devalok/shilp-sutra/package.json`) as `version`.
|
|
24
24
|
2. **`packages/core/llms.txt`** — the ~3K-token router: what exists + where to get detail. Load this by default; it is deliberately tiny.
|
|
25
25
|
3. **`packages/core/docs/components/<tier>/<name>.md`** — single-component doc (~3K tokens: props, examples, composability, gotchas). Read ONLY the components you're using — never bulk-read the directory or concatenate these.
|
|
26
26
|
4. **`packages/core/mcp-manifest.json`** — everything machine-readable (props, tokens, composition; react-docgen shape). Prefer targeted reads over prose when you need structured data without the MCP.
|
|
27
27
|
5. **`packages/core/docs/recipes/<framework>.md`** — copy-paste install + setup for the user's framework.
|
|
28
28
|
6. **`packages/core/docs/recipes/upgrading.md`** + **`MIGRATION.md`** — read BOTH before any version bump. See the hard constraint below.
|
|
29
|
+
|
|
30
|
+
### Setting up in a new project (do this in order)
|
|
31
|
+
|
|
32
|
+
If the MCP is connected, run the setup sequence instead of guessing — it closes the four traps that break agent-driven installs (peer-dep cliffs, silent TW4 dead classes, wrong recipe, mis-wired CSS/config):
|
|
33
|
+
|
|
34
|
+
1. `detect_framework(packageJson)` → the right recipe id + package manager (don't assume App Router, or that `create-remix` still makes Remix).
|
|
35
|
+
2. `get_setup(recipe)` → the full, version-live recipe. Follow every step.
|
|
36
|
+
3. `preflight(framework, imports)` → the exact install for the OPTIONAL peer deps your imports need. Run BEFORE first import or the build fails with `Failed to resolve import`.
|
|
37
|
+
4. `validate_snippet(code)` → run on each file BEFORE writing it. Catches bare `shadow`, `-surface-N`, `bg-gradient-to-*`, removed Button variants, invalid enum props — the dead classes fail silently (no error, no style).
|
|
38
|
+
5. `verify_setup(globalsCss, nextConfig, imports, installedDeps)` → confirm CSS imports + order, `transpilePackages`, and peer coverage after wiring.
|
|
39
|
+
|
|
40
|
+
Without the MCP, the same information is in `docs/recipes/` (per-framework §2a lists optional peers) and the `@devalok/eslint-plugin-shilp-sutra` plugin catches the dead classes at lint time.
|
|
29
41
|
7. **`node_modules/@devalok/shilp-sutra/BREAKING.json`** — machine-readable manifest of every breaking change per version (moves, type narrowings, removals, renames). Read this programmatically when planning an upgrade — schema in `BREAKING.schema.json`. Lets you answer "does my code import any of these moved symbols?" without parsing CHANGELOG prose.
|
|
30
42
|
|
|
31
43
|
(`llms-full.txt` and `llms-quick.txt` were removed in 0.45 — the router + per-component docs + manifest replaced them. Do not look for them.)
|
package/MIGRATION.md
CHANGED
|
@@ -4,6 +4,16 @@ This page indexes all breaking changes across `@devalok/shilp-sutra` versions. F
|
|
|
4
4
|
|
|
5
5
|
> **Upgrading from < 0.36?** Start here, then read each intermediate version section. Breaking changes stack — skipping versions means stacking migrations.
|
|
6
6
|
|
|
7
|
+
## v0.47.0 — MCP setup-journey tools + manifest `peers` (additive)
|
|
8
|
+
|
|
9
|
+
**Nothing breaks. No migration required.** Everything in 0.47.0 is additive.
|
|
10
|
+
|
|
11
|
+
- **`mcp-manifest.json` gains a `peers` field** — components that import optional peer dependencies (data-table, charts, date-picker, rich-text-editor, input-otp, file-preview, markdown-viewer) now list them in a structured `peers: [...]` array. Purely additive to the manifest; existing readers ignore unknown fields. Manifest format version bumped 1.0.0 → 1.1.0.
|
|
12
|
+
- **Hosted MCP gains four setup tools** — `preflight`, `validate_snippet`, `detect_framework`, `verify_setup`. Nothing to install; they run on the hosted server. If your AI agent connects the MCP, it can now resolve peer installs, lint snippets for TW4 dead classes before writing, detect the right recipe, and verify wiring.
|
|
13
|
+
- **AGENTS.md** adds a "Setting up in a new project" sequence and the hosted MCP URL.
|
|
14
|
+
- **TanStack Start install recipe rewritten** for the current `@tanstack/react-start` Vite-plugin setup (the old recipe targeted the retired Vinxi `@tanstack/start`). If you set up TanStack Start against the old recipe, re-check against `docs/recipes/install-tanstack-start.md`.
|
|
15
|
+
- **npm `homepage`** now points at the marketing site instead of Storybook.
|
|
16
|
+
|
|
7
17
|
## v0.46.0 — Manrope display font, design system owns heading typography
|
|
8
18
|
|
|
9
19
|
Nothing breaks at the TypeScript level. One visual behavior change to check after upgrade.
|
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
# Install: TanStack Start
|
|
2
2
|
|
|
3
|
-
> Setup recipe for adding `@devalok/shilp-sutra` to a TanStack Start project (the React full-stack framework built on
|
|
3
|
+
> Setup recipe for adding `@devalok/shilp-sutra` to a TanStack Start project (the React full-stack framework built on Vite).
|
|
4
|
+
|
|
5
|
+
> **Updated 2026-07-10 for the Vite-plugin era.** TanStack Start moved off Vinxi: the package is now `@tanstack/react-start` (not `@tanstack/start`), config lives in `vite.config.ts` (not `app.config.ts`), and the app root is `src/` (not `app/`). If you are on an old Vinxi-based project (`app.config.ts`, `@tanstack/start`), migrate to the Vite plugin first — see the TanStack Start docs.
|
|
4
6
|
|
|
5
7
|
## 1. Detect
|
|
6
8
|
|
|
7
9
|
You are in this recipe if:
|
|
8
10
|
|
|
9
|
-
- `package.json` lists `"@tanstack/start"` and `"@tanstack/react-router"`
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
11
|
+
- `package.json` lists `"@tanstack/react-start"` and `"@tanstack/react-router"`
|
|
12
|
+
- `vite.config.{ts,js}` exists and uses the `tanstackStart` plugin from `@tanstack/react-start/plugin/vite`
|
|
13
|
+
- `src/router.tsx` and `src/routes/__root.tsx` exist (a `src/routeTree.gen.ts` is generated on first run)
|
|
14
|
+
|
|
15
|
+
If instead you see `app.config.ts` + `@tanstack/start`, that is the legacy Vinxi setup — this recipe does not apply until you migrate.
|
|
12
16
|
|
|
13
17
|
## 2. Install
|
|
14
18
|
|
|
15
19
|
```bash
|
|
20
|
+
# pnpm
|
|
16
21
|
pnpm add @devalok/shilp-sutra framer-motion
|
|
17
22
|
pnpm add -D tailwindcss@^4 @tailwindcss/vite
|
|
23
|
+
|
|
24
|
+
# npm
|
|
25
|
+
npm install @devalok/shilp-sutra framer-motion
|
|
26
|
+
npm install -D tailwindcss@^4 @tailwindcss/vite
|
|
18
27
|
```
|
|
19
28
|
|
|
20
29
|
Optional:
|
|
@@ -38,39 +47,79 @@ Some components ship hard peers as optional. **Install BEFORE first import** or
|
|
|
38
47
|
| `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter` |
|
|
39
48
|
| Any `Icon` / `IconButton` with Tabler icons | `pnpm add @tabler/icons-react` |
|
|
40
49
|
|
|
41
|
-
## 3. Wire Tailwind 4 in `
|
|
50
|
+
## 3. Wire Tailwind 4 in `vite.config.ts`
|
|
51
|
+
|
|
52
|
+
Add `@tailwindcss/vite` to the existing plugins array. `tanstackStart()` must come before `viteReact()`; `tailwindcss()` can go first so tokens are processed early.
|
|
42
53
|
|
|
43
54
|
```ts
|
|
44
|
-
import { defineConfig } from "
|
|
55
|
+
import { defineConfig } from "vite";
|
|
56
|
+
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
|
|
57
|
+
import viteReact from "@vitejs/plugin-react";
|
|
45
58
|
import tailwindcss from "@tailwindcss/vite";
|
|
46
59
|
|
|
47
60
|
export default defineConfig({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
61
|
+
plugins: [
|
|
62
|
+
tailwindcss(),
|
|
63
|
+
tanstackStart(),
|
|
64
|
+
viteReact(),
|
|
65
|
+
],
|
|
51
66
|
});
|
|
52
67
|
```
|
|
53
68
|
|
|
69
|
+
Do **not** add a `tailwind.config.{ts,js}` — Tailwind 4 is CSS-first.
|
|
70
|
+
|
|
54
71
|
## 4. Wire tokens
|
|
55
72
|
|
|
56
|
-
Create `
|
|
73
|
+
Create `src/styles/globals.css`:
|
|
57
74
|
|
|
58
75
|
```css
|
|
59
76
|
@import "tailwindcss";
|
|
60
77
|
@import "@devalok/shilp-sutra/css";
|
|
61
78
|
```
|
|
62
79
|
|
|
63
|
-
|
|
80
|
+
Wire it as an asset-URL stylesheet from the root route's `head` (the TanStack Start idiom — the `?url` suffix emits the file as an asset instead of inlining it):
|
|
64
81
|
|
|
65
82
|
```tsx
|
|
66
|
-
|
|
67
|
-
|
|
83
|
+
// src/routes/__root.tsx
|
|
84
|
+
import {
|
|
85
|
+
createRootRoute,
|
|
86
|
+
HeadContent,
|
|
87
|
+
Outlet,
|
|
88
|
+
Scripts,
|
|
89
|
+
} from "@tanstack/react-router";
|
|
90
|
+
import globalsCss from "../styles/globals.css?url";
|
|
68
91
|
|
|
69
|
-
|
|
92
|
+
export const Route = createRootRoute({
|
|
93
|
+
head: () => ({
|
|
94
|
+
meta: [
|
|
95
|
+
{ charSet: "utf-8" },
|
|
96
|
+
{ name: "viewport", content: "width=device-width, initial-scale=1" },
|
|
97
|
+
],
|
|
98
|
+
links: [{ rel: "stylesheet", href: globalsCss }],
|
|
99
|
+
}),
|
|
100
|
+
component: RootComponent,
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
function RootComponent() {
|
|
104
|
+
return (
|
|
105
|
+
<html lang="en" suppressHydrationWarning>
|
|
106
|
+
<head>
|
|
107
|
+
<HeadContent />
|
|
108
|
+
</head>
|
|
109
|
+
<body>
|
|
110
|
+
<Outlet />
|
|
111
|
+
<Scripts />
|
|
112
|
+
</body>
|
|
113
|
+
</html>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
```
|
|
70
117
|
|
|
71
118
|
## 5. Theme toggle
|
|
72
119
|
|
|
73
|
-
|
|
120
|
+
Add a pre-hydration bootstrap so there is no flash of the wrong theme. The cleanest place is a `scripts` entry on the root route (runs before hydration); a static `public/theme-bootstrap.js` referenced from `<head>` also works and is CSP-friendly.
|
|
121
|
+
|
|
122
|
+
Static-asset approach — create `public/theme-bootstrap.js`:
|
|
74
123
|
|
|
75
124
|
```js
|
|
76
125
|
(function () {
|
|
@@ -84,44 +133,36 @@ Create `public/theme-bootstrap.js` (a static asset served verbatim):
|
|
|
84
133
|
})();
|
|
85
134
|
```
|
|
86
135
|
|
|
87
|
-
Reference it from `
|
|
136
|
+
Reference it from the root route's `head` scripts:
|
|
88
137
|
|
|
89
138
|
```tsx
|
|
90
|
-
import { createRootRoute, Outlet } from "@tanstack/react-router";
|
|
91
|
-
|
|
92
139
|
export const Route = createRootRoute({
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<body>
|
|
99
|
-
<Outlet />
|
|
100
|
-
</body>
|
|
101
|
-
</html>
|
|
102
|
-
),
|
|
140
|
+
head: () => ({
|
|
141
|
+
// ...meta, links as above...
|
|
142
|
+
scripts: [{ src: "/theme-bootstrap.js" }],
|
|
143
|
+
}),
|
|
144
|
+
component: RootComponent,
|
|
103
145
|
});
|
|
104
146
|
```
|
|
105
147
|
|
|
106
|
-
For runtime toggling, use the `useColorMode` hook — see [install-vite.md § 5](./install-vite.md#5-theme-toggle-no-next-themes-here).
|
|
148
|
+
For runtime toggling inside components, use the `useColorMode` hook — see [install-vite.md § 5](./install-vite.md#5-theme-toggle-no-next-themes-here).
|
|
107
149
|
|
|
108
150
|
## 6. Toaster (optional)
|
|
109
151
|
|
|
110
|
-
Mount in `__root.tsx` next to `<Outlet />`:
|
|
152
|
+
Mount once in `__root.tsx`'s `RootComponent`, next to `<Outlet />`:
|
|
111
153
|
|
|
112
154
|
```tsx
|
|
113
155
|
import { Toaster } from "@devalok/shilp-sutra/ui/toaster";
|
|
114
156
|
|
|
115
157
|
// inside <body>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
</>
|
|
158
|
+
<Outlet />
|
|
159
|
+
<Toaster />
|
|
160
|
+
<Scripts />
|
|
120
161
|
```
|
|
121
162
|
|
|
122
163
|
## 7. Verify
|
|
123
164
|
|
|
124
|
-
Create or replace `
|
|
165
|
+
Create or replace `src/routes/index.tsx`:
|
|
125
166
|
|
|
126
167
|
```tsx
|
|
127
168
|
import { createFileRoute } from "@tanstack/react-router";
|
|
@@ -130,7 +171,11 @@ import { Stack } from "@devalok/shilp-sutra/ui/stack";
|
|
|
130
171
|
import { Text } from "@devalok/shilp-sutra/ui/text";
|
|
131
172
|
|
|
132
173
|
export const Route = createFileRoute("/")({
|
|
133
|
-
component:
|
|
174
|
+
component: Home,
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
function Home() {
|
|
178
|
+
return (
|
|
134
179
|
<Stack className="p-ds-08" gap="ds-04">
|
|
135
180
|
<Text variant="heading-2xl">Hello, Shilp Sutra</Text>
|
|
136
181
|
<Stack direction="row" gap="ds-03">
|
|
@@ -138,21 +183,23 @@ export const Route = createFileRoute("/")({
|
|
|
138
183
|
<Button variant="soft">Soft</Button>
|
|
139
184
|
</Stack>
|
|
140
185
|
</Stack>
|
|
141
|
-
)
|
|
142
|
-
}
|
|
186
|
+
);
|
|
187
|
+
}
|
|
143
188
|
```
|
|
144
189
|
|
|
145
|
-
Run `pnpm dev` and open the URL.
|
|
190
|
+
Run `pnpm dev` and open the printed URL. Expected output matches [Next App Router § 7](./install-next-app-router.md#7-verify-the-install).
|
|
146
191
|
|
|
147
192
|
## 8. TanStack Start specifics
|
|
148
193
|
|
|
194
|
+
- **No `transpilePackages` equivalent — and you do not need one.** TanStack Start's Vite resolves `@devalok/shilp-sutra` from `node_modules` as native ESM.
|
|
149
195
|
- **Server functions** (`createServerFn`) — do not import shilp-sutra components inside server functions; they run server-only.
|
|
150
|
-
- **Streaming SSR** is the default.
|
|
196
|
+
- **Streaming SSR** is the default. Shilp Sutra components SSR cleanly (no client-only side effects at module top-level).
|
|
151
197
|
- **`framer-motion` SSR** — animations gracefully degrade on the initial render.
|
|
152
|
-
- **
|
|
198
|
+
- **`routeTree.gen.ts` is generated** — do not edit it by hand; it regenerates on dev/build.
|
|
153
199
|
|
|
154
200
|
## 9. What NOT to do
|
|
155
201
|
|
|
156
|
-
- ❌ Add `tailwind.config.{ts,js}` — Tailwind 4 is CSS-first.
|
|
157
|
-
- ❌
|
|
158
|
-
- ❌
|
|
202
|
+
- ❌ Add a `tailwind.config.{ts,js}` — Tailwind 4 is CSS-first.
|
|
203
|
+
- ❌ Use `@tanstack/start` / `app.config.ts` / `@tanstack/start/config` — that is the retired Vinxi setup. Current TanStack Start is `@tanstack/react-start` + `vite.config.ts`.
|
|
204
|
+
- ❌ Mount `<Toaster />` inside route components — it lives once at the `__root`.
|
|
205
|
+
- ❌ Mix `@tailwindcss/postcss` and `@tailwindcss/vite` — pick the Vite plugin.
|
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @devalok/shilp-sutra
|
|
2
2
|
|
|
3
|
-
> Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.
|
|
3
|
+
> Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.47.0.
|
|
4
4
|
> Built on the same primitives as shadcn/ui but with DIFFERENT prop APIs — never guess from shadcn knowledge; verify every prop.
|
|
5
5
|
> This file is a ROUTER: it tells you what exists and where to get details. Do not look for prop tables here — fetch them per component (MCP tool or per-component doc file below).
|
|
6
6
|
|
package/mcp-manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./mcp-manifest.schema.json",
|
|
3
|
-
"manifestVersion": "1.
|
|
3
|
+
"manifestVersion": "1.1.0",
|
|
4
4
|
"package": "@devalok/shilp-sutra",
|
|
5
|
-
"packageVersion": "0.
|
|
5
|
+
"packageVersion": "0.47.0",
|
|
6
6
|
"components": {
|
|
7
7
|
"accordion": {
|
|
8
8
|
"displayName": "Accordion",
|
|
@@ -1780,6 +1780,17 @@
|
|
|
1780
1780
|
"version": "0.1.0",
|
|
1781
1781
|
"summary": "**Added** Initial release"
|
|
1782
1782
|
}
|
|
1783
|
+
],
|
|
1784
|
+
"peers": [
|
|
1785
|
+
"d3-array",
|
|
1786
|
+
"d3-axis",
|
|
1787
|
+
"d3-format",
|
|
1788
|
+
"d3-interpolate",
|
|
1789
|
+
"d3-scale",
|
|
1790
|
+
"d3-selection",
|
|
1791
|
+
"d3-shape",
|
|
1792
|
+
"d3-time-format",
|
|
1793
|
+
"d3-transition"
|
|
1783
1794
|
]
|
|
1784
1795
|
},
|
|
1785
1796
|
"chat": {
|
|
@@ -2787,6 +2798,10 @@
|
|
|
2787
2798
|
"version": "0.1.0",
|
|
2788
2799
|
"summary": "**Added** Initial release"
|
|
2789
2800
|
}
|
|
2801
|
+
],
|
|
2802
|
+
"peers": [
|
|
2803
|
+
"@tanstack/react-table",
|
|
2804
|
+
"@tanstack/react-virtual"
|
|
2790
2805
|
]
|
|
2791
2806
|
},
|
|
2792
2807
|
"data-table-body": {
|
|
@@ -3001,6 +3016,10 @@
|
|
|
3001
3016
|
"version": "0.1.0",
|
|
3002
3017
|
"summary": "**Added** Initial release"
|
|
3003
3018
|
}
|
|
3019
|
+
],
|
|
3020
|
+
"peers": [
|
|
3021
|
+
"@tanstack/react-table",
|
|
3022
|
+
"@tanstack/react-virtual"
|
|
3004
3023
|
]
|
|
3005
3024
|
},
|
|
3006
3025
|
"devalok-grain": {
|
|
@@ -4038,6 +4057,9 @@
|
|
|
4038
4057
|
"version": "0.1.0",
|
|
4039
4058
|
"summary": "**Added** Initial release"
|
|
4040
4059
|
}
|
|
4060
|
+
],
|
|
4061
|
+
"peers": [
|
|
4062
|
+
"input-otp"
|
|
4041
4063
|
]
|
|
4042
4064
|
},
|
|
4043
4065
|
"label": {
|
|
@@ -8587,6 +8609,9 @@
|
|
|
8587
8609
|
"version": "0.1.0",
|
|
8588
8610
|
"summary": "**Added** Initial release"
|
|
8589
8611
|
}
|
|
8612
|
+
],
|
|
8613
|
+
"peers": [
|
|
8614
|
+
"date-fns"
|
|
8590
8615
|
]
|
|
8591
8616
|
},
|
|
8592
8617
|
"deadline-indicator": {
|
|
@@ -9037,6 +9062,10 @@
|
|
|
9037
9062
|
"All types have error fallback with download link",
|
|
9038
9063
|
"Embed URLs auto-converted to embed format",
|
|
9039
9064
|
"Audio player doesn't show separate Download button (integrated in card)"
|
|
9065
|
+
],
|
|
9066
|
+
"peers": [
|
|
9067
|
+
"react-pdf",
|
|
9068
|
+
"react-zoom-pan-pinch"
|
|
9040
9069
|
]
|
|
9041
9070
|
},
|
|
9042
9071
|
"filter-bar": {
|
|
@@ -9487,6 +9516,10 @@
|
|
|
9487
9516
|
"GFM (tables, strikethrough, task lists) is supported via `remark-gfm`",
|
|
9488
9517
|
"Raw HTML is stripped by default — only enable `allowHtml` for trusted content",
|
|
9489
9518
|
"Links open in a new tab by default (`target=\"_blank\"` with `rel=\"noopener noreferrer\"`)"
|
|
9519
|
+
],
|
|
9520
|
+
"peers": [
|
|
9521
|
+
"react-markdown",
|
|
9522
|
+
"react-syntax-highlighter"
|
|
9490
9523
|
]
|
|
9491
9524
|
},
|
|
9492
9525
|
"master-detail": {
|
|
@@ -10192,6 +10225,11 @@
|
|
|
10192
10225
|
"version": "0.32.0",
|
|
10193
10226
|
"summary": "Initial release"
|
|
10194
10227
|
}
|
|
10228
|
+
],
|
|
10229
|
+
"peers": [
|
|
10230
|
+
"@tiptap/react",
|
|
10231
|
+
"@tiptap/starter-kit",
|
|
10232
|
+
"@tiptap/extension-placeholder"
|
|
10195
10233
|
]
|
|
10196
10234
|
},
|
|
10197
10235
|
"rich-text-editor": {
|
|
@@ -10333,6 +10371,11 @@
|
|
|
10333
10371
|
"version": "0.1.1",
|
|
10334
10372
|
"summary": "**Fixed** Added content sync effect so editor updates when `content` prop changes externally"
|
|
10335
10373
|
}
|
|
10374
|
+
],
|
|
10375
|
+
"peers": [
|
|
10376
|
+
"@tiptap/react",
|
|
10377
|
+
"@tiptap/starter-kit",
|
|
10378
|
+
"@tiptap/extension-placeholder"
|
|
10336
10379
|
]
|
|
10337
10380
|
},
|
|
10338
10381
|
"schedule-view": {
|
package/mcp-manifest.schema.json
CHANGED
|
@@ -81,6 +81,12 @@
|
|
|
81
81
|
"items": { "type": "string" },
|
|
82
82
|
"description": "Known-misuse bullets, verbatim, DO-NOT phrasing preferred."
|
|
83
83
|
},
|
|
84
|
+
"peers": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": { "type": "string" },
|
|
87
|
+
"description": "Optional peer dependencies this component imports. Absent for core components (no extra install). Importing the component without these installed fails the build with 'Failed to resolve import'. Mirrors the recipe optional-peer table; read by the MCP preflight/verify_setup tools.",
|
|
88
|
+
"examples": [["@tanstack/react-table", "@tanstack/react-virtual"]]
|
|
89
|
+
},
|
|
84
90
|
"changes": {
|
|
85
91
|
"type": "array",
|
|
86
92
|
"items": {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devalok/shilp-sutra",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"description": "Devalok Design System — accessible React components, OKLCH design tokens, and Tailwind 4 CSS-first setup. Ships with AI-agent setup recipes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Devalok Design & Strategy Studios <shilp-sutra@devalok.in>",
|
|
7
|
-
"homepage": "https://
|
|
7
|
+
"homepage": "https://shilp-sutra.devalok.in",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/devalok-design/shilp-sutra",
|
package/scripts/welcome.mjs
CHANGED
|
@@ -173,7 +173,7 @@ function buildFullBanner(version, prevVersion) {
|
|
|
173
173
|
lines.push(row(` ${colour('+ docs/recipes/upgrading.md (safe-upgrade procedure)', DIM)}`))
|
|
174
174
|
} else {
|
|
175
175
|
lines.push(row(` ${colour('✦', PINK)} ${colour('@devalok/shilp-sutra', BOLD)} ${version}`))
|
|
176
|
-
lines.push(row(` ${colour('Tailwind 4 design system ·
|
|
176
|
+
lines.push(row(` ${colour('Tailwind 4 design system · 120+ components · RSC-safe', DIM)}`))
|
|
177
177
|
}
|
|
178
178
|
lines.push(colour(EMPTY, PINK_DIM))
|
|
179
179
|
lines.push(row(` ${colour('▸', PINK)} Setup recipe (pick your framework):`))
|
|
@@ -183,7 +183,9 @@ function buildFullBanner(version, prevVersion) {
|
|
|
183
183
|
lines.push(row(` ${colour('https://shilp-sutra.devalok.in/themer', DIM)}`))
|
|
184
184
|
lines.push(colour(EMPTY, PINK_DIM))
|
|
185
185
|
lines.push(row(` ${colour('▸', PINK)} Wire your AI agent (Claude Code / Cursor / Codex):`))
|
|
186
|
-
lines.push(row(` ${colour('
|
|
186
|
+
lines.push(row(` ${colour('connect the live docs MCP → https://shilp-sutra.devalok.in/mcp', DIM)}`))
|
|
187
|
+
lines.push(row(` ${colour('(version-exact setup + peer preflight; beats guessing)', DIM)}`))
|
|
188
|
+
lines.push(row(` ${colour('or copy the skill: cp -r node_modules/@devalok/shilp-sutra/skill \\', DIM)}`))
|
|
187
189
|
lines.push(row(` ${colour('~/.claude/skills/shilp-sutra', DIM)}`))
|
|
188
190
|
lines.push(colour(EMPTY, PINK_DIM))
|
|
189
191
|
lines.push(row(` ${colour('Disable this banner: SHILP_SUTRA_NO_WELCOME=1', DIM)}`))
|
package/skill/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: shilp-sutra
|
|
|
3
3
|
description: Add, configure, and use components from Devalok's shilp-sutra design system (@devalok/shilp-sutra) — a Tailwind 4 + React 19 + CVA library with 110+ accessible components, OKLCH design tokens, framer-motion animations, and per-component RSC-safe entry points. Use this skill whenever the user mentions shilp-sutra, Devalok, the @devalok npm scope, or asks to install/add/style/theme UI in any React project that already depends on the package — even if they don't name it explicitly. Use it instead of generic shadcn/ui, MUI, or Chakra knowledge when shilp-sutra is in the project. Covers Next.js (App + Pages), Vite, Astro, Remix, TanStack Start setup playbooks; component API and variant reference; brand token customization; Server Component import patterns; and a troubleshoot tree for the thirteen most common breakages.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "0.47.0"
|
|
7
7
|
author: Devalok Design & Strategy Studios
|
|
8
8
|
homepage: https://github.com/devalok-design/shilp-sutra
|
|
9
9
|
npm: https://www.npmjs.com/package/@devalok/shilp-sutra
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# @devalok/shilp-sutra
|
|
4
4
|
|
|
5
|
-
> Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.
|
|
5
|
+
> Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.47.0.
|
|
6
6
|
> Built on the same primitives as shadcn/ui but with DIFFERENT prop APIs — never guess from shadcn knowledge; verify every prop.
|
|
7
7
|
> This file is a ROUTER: it tells you what exists and where to get details. Do not look for prop tables here — fetch them per component (MCP tool or per-component doc file below).
|
|
8
8
|
|
|
@@ -2,21 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
# Install: TanStack Start
|
|
4
4
|
|
|
5
|
-
> Setup recipe for adding `@devalok/shilp-sutra` to a TanStack Start project (the React full-stack framework built on
|
|
5
|
+
> Setup recipe for adding `@devalok/shilp-sutra` to a TanStack Start project (the React full-stack framework built on Vite).
|
|
6
|
+
|
|
7
|
+
> **Updated 2026-07-10 for the Vite-plugin era.** TanStack Start moved off Vinxi: the package is now `@tanstack/react-start` (not `@tanstack/start`), config lives in `vite.config.ts` (not `app.config.ts`), and the app root is `src/` (not `app/`). If you are on an old Vinxi-based project (`app.config.ts`, `@tanstack/start`), migrate to the Vite plugin first — see the TanStack Start docs.
|
|
6
8
|
|
|
7
9
|
## 1. Detect
|
|
8
10
|
|
|
9
11
|
You are in this recipe if:
|
|
10
12
|
|
|
11
|
-
- `package.json` lists `"@tanstack/start"` and `"@tanstack/react-router"`
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
13
|
+
- `package.json` lists `"@tanstack/react-start"` and `"@tanstack/react-router"`
|
|
14
|
+
- `vite.config.{ts,js}` exists and uses the `tanstackStart` plugin from `@tanstack/react-start/plugin/vite`
|
|
15
|
+
- `src/router.tsx` and `src/routes/__root.tsx` exist (a `src/routeTree.gen.ts` is generated on first run)
|
|
16
|
+
|
|
17
|
+
If instead you see `app.config.ts` + `@tanstack/start`, that is the legacy Vinxi setup — this recipe does not apply until you migrate.
|
|
14
18
|
|
|
15
19
|
## 2. Install
|
|
16
20
|
|
|
17
21
|
```bash
|
|
22
|
+
# pnpm
|
|
18
23
|
pnpm add @devalok/shilp-sutra framer-motion
|
|
19
24
|
pnpm add -D tailwindcss@^4 @tailwindcss/vite
|
|
25
|
+
|
|
26
|
+
# npm
|
|
27
|
+
npm install @devalok/shilp-sutra framer-motion
|
|
28
|
+
npm install -D tailwindcss@^4 @tailwindcss/vite
|
|
20
29
|
```
|
|
21
30
|
|
|
22
31
|
Optional:
|
|
@@ -40,39 +49,79 @@ Some components ship hard peers as optional. **Install BEFORE first import** or
|
|
|
40
49
|
| `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter` |
|
|
41
50
|
| Any `Icon` / `IconButton` with Tabler icons | `pnpm add @tabler/icons-react` |
|
|
42
51
|
|
|
43
|
-
## 3. Wire Tailwind 4 in `
|
|
52
|
+
## 3. Wire Tailwind 4 in `vite.config.ts`
|
|
53
|
+
|
|
54
|
+
Add `@tailwindcss/vite` to the existing plugins array. `tanstackStart()` must come before `viteReact()`; `tailwindcss()` can go first so tokens are processed early.
|
|
44
55
|
|
|
45
56
|
```ts
|
|
46
|
-
import { defineConfig } from "
|
|
57
|
+
import { defineConfig } from "vite";
|
|
58
|
+
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
|
|
59
|
+
import viteReact from "@vitejs/plugin-react";
|
|
47
60
|
import tailwindcss from "@tailwindcss/vite";
|
|
48
61
|
|
|
49
62
|
export default defineConfig({
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
63
|
+
plugins: [
|
|
64
|
+
tailwindcss(),
|
|
65
|
+
tanstackStart(),
|
|
66
|
+
viteReact(),
|
|
67
|
+
],
|
|
53
68
|
});
|
|
54
69
|
```
|
|
55
70
|
|
|
71
|
+
Do **not** add a `tailwind.config.{ts,js}` — Tailwind 4 is CSS-first.
|
|
72
|
+
|
|
56
73
|
## 4. Wire tokens
|
|
57
74
|
|
|
58
|
-
Create `
|
|
75
|
+
Create `src/styles/globals.css`:
|
|
59
76
|
|
|
60
77
|
```css
|
|
61
78
|
@import "tailwindcss";
|
|
62
79
|
@import "@devalok/shilp-sutra/css";
|
|
63
80
|
```
|
|
64
81
|
|
|
65
|
-
|
|
82
|
+
Wire it as an asset-URL stylesheet from the root route's `head` (the TanStack Start idiom — the `?url` suffix emits the file as an asset instead of inlining it):
|
|
66
83
|
|
|
67
84
|
```tsx
|
|
68
|
-
|
|
69
|
-
|
|
85
|
+
// src/routes/__root.tsx
|
|
86
|
+
import {
|
|
87
|
+
createRootRoute,
|
|
88
|
+
HeadContent,
|
|
89
|
+
Outlet,
|
|
90
|
+
Scripts,
|
|
91
|
+
} from "@tanstack/react-router";
|
|
92
|
+
import globalsCss from "../styles/globals.css?url";
|
|
70
93
|
|
|
71
|
-
|
|
94
|
+
export const Route = createRootRoute({
|
|
95
|
+
head: () => ({
|
|
96
|
+
meta: [
|
|
97
|
+
{ charSet: "utf-8" },
|
|
98
|
+
{ name: "viewport", content: "width=device-width, initial-scale=1" },
|
|
99
|
+
],
|
|
100
|
+
links: [{ rel: "stylesheet", href: globalsCss }],
|
|
101
|
+
}),
|
|
102
|
+
component: RootComponent,
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
function RootComponent() {
|
|
106
|
+
return (
|
|
107
|
+
<html lang="en" suppressHydrationWarning>
|
|
108
|
+
<head>
|
|
109
|
+
<HeadContent />
|
|
110
|
+
</head>
|
|
111
|
+
<body>
|
|
112
|
+
<Outlet />
|
|
113
|
+
<Scripts />
|
|
114
|
+
</body>
|
|
115
|
+
</html>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
```
|
|
72
119
|
|
|
73
120
|
## 5. Theme toggle
|
|
74
121
|
|
|
75
|
-
|
|
122
|
+
Add a pre-hydration bootstrap so there is no flash of the wrong theme. The cleanest place is a `scripts` entry on the root route (runs before hydration); a static `public/theme-bootstrap.js` referenced from `<head>` also works and is CSP-friendly.
|
|
123
|
+
|
|
124
|
+
Static-asset approach — create `public/theme-bootstrap.js`:
|
|
76
125
|
|
|
77
126
|
```js
|
|
78
127
|
(function () {
|
|
@@ -86,44 +135,36 @@ Create `public/theme-bootstrap.js` (a static asset served verbatim):
|
|
|
86
135
|
})();
|
|
87
136
|
```
|
|
88
137
|
|
|
89
|
-
Reference it from `
|
|
138
|
+
Reference it from the root route's `head` scripts:
|
|
90
139
|
|
|
91
140
|
```tsx
|
|
92
|
-
import { createRootRoute, Outlet } from "@tanstack/react-router";
|
|
93
|
-
|
|
94
141
|
export const Route = createRootRoute({
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<body>
|
|
101
|
-
<Outlet />
|
|
102
|
-
</body>
|
|
103
|
-
</html>
|
|
104
|
-
),
|
|
142
|
+
head: () => ({
|
|
143
|
+
// ...meta, links as above...
|
|
144
|
+
scripts: [{ src: "/theme-bootstrap.js" }],
|
|
145
|
+
}),
|
|
146
|
+
component: RootComponent,
|
|
105
147
|
});
|
|
106
148
|
```
|
|
107
149
|
|
|
108
|
-
For runtime toggling, use the `useColorMode` hook — see [install-vite.md § 5](./install-vite.md#5-theme-toggle-no-next-themes-here).
|
|
150
|
+
For runtime toggling inside components, use the `useColorMode` hook — see [install-vite.md § 5](./install-vite.md#5-theme-toggle-no-next-themes-here).
|
|
109
151
|
|
|
110
152
|
## 6. Toaster (optional)
|
|
111
153
|
|
|
112
|
-
Mount in `__root.tsx` next to `<Outlet />`:
|
|
154
|
+
Mount once in `__root.tsx`'s `RootComponent`, next to `<Outlet />`:
|
|
113
155
|
|
|
114
156
|
```tsx
|
|
115
157
|
import { Toaster } from "@devalok/shilp-sutra/ui/toaster";
|
|
116
158
|
|
|
117
159
|
// inside <body>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
</>
|
|
160
|
+
<Outlet />
|
|
161
|
+
<Toaster />
|
|
162
|
+
<Scripts />
|
|
122
163
|
```
|
|
123
164
|
|
|
124
165
|
## 7. Verify
|
|
125
166
|
|
|
126
|
-
Create or replace `
|
|
167
|
+
Create or replace `src/routes/index.tsx`:
|
|
127
168
|
|
|
128
169
|
```tsx
|
|
129
170
|
import { createFileRoute } from "@tanstack/react-router";
|
|
@@ -132,7 +173,11 @@ import { Stack } from "@devalok/shilp-sutra/ui/stack";
|
|
|
132
173
|
import { Text } from "@devalok/shilp-sutra/ui/text";
|
|
133
174
|
|
|
134
175
|
export const Route = createFileRoute("/")({
|
|
135
|
-
component:
|
|
176
|
+
component: Home,
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
function Home() {
|
|
180
|
+
return (
|
|
136
181
|
<Stack className="p-ds-08" gap="ds-04">
|
|
137
182
|
<Text variant="heading-2xl">Hello, Shilp Sutra</Text>
|
|
138
183
|
<Stack direction="row" gap="ds-03">
|
|
@@ -140,21 +185,23 @@ export const Route = createFileRoute("/")({
|
|
|
140
185
|
<Button variant="soft">Soft</Button>
|
|
141
186
|
</Stack>
|
|
142
187
|
</Stack>
|
|
143
|
-
)
|
|
144
|
-
}
|
|
188
|
+
);
|
|
189
|
+
}
|
|
145
190
|
```
|
|
146
191
|
|
|
147
|
-
Run `pnpm dev` and open the URL.
|
|
192
|
+
Run `pnpm dev` and open the printed URL. Expected output matches [Next App Router § 7](./install-next-app-router.md#7-verify-the-install).
|
|
148
193
|
|
|
149
194
|
## 8. TanStack Start specifics
|
|
150
195
|
|
|
196
|
+
- **No `transpilePackages` equivalent — and you do not need one.** TanStack Start's Vite resolves `@devalok/shilp-sutra` from `node_modules` as native ESM.
|
|
151
197
|
- **Server functions** (`createServerFn`) — do not import shilp-sutra components inside server functions; they run server-only.
|
|
152
|
-
- **Streaming SSR** is the default.
|
|
198
|
+
- **Streaming SSR** is the default. Shilp Sutra components SSR cleanly (no client-only side effects at module top-level).
|
|
153
199
|
- **`framer-motion` SSR** — animations gracefully degrade on the initial render.
|
|
154
|
-
- **
|
|
200
|
+
- **`routeTree.gen.ts` is generated** — do not edit it by hand; it regenerates on dev/build.
|
|
155
201
|
|
|
156
202
|
## 9. What NOT to do
|
|
157
203
|
|
|
158
|
-
- ❌ Add `tailwind.config.{ts,js}` — Tailwind 4 is CSS-first.
|
|
159
|
-
- ❌
|
|
160
|
-
- ❌
|
|
204
|
+
- ❌ Add a `tailwind.config.{ts,js}` — Tailwind 4 is CSS-first.
|
|
205
|
+
- ❌ Use `@tanstack/start` / `app.config.ts` / `@tanstack/start/config` — that is the retired Vinxi setup. Current TanStack Start is `@tanstack/react-start` + `vite.config.ts`.
|
|
206
|
+
- ❌ Mount `<Toaster />` inside route components — it lives once at the `__root`.
|
|
207
|
+
- ❌ Mix `@tailwindcss/postcss` and `@tailwindcss/vite` — pick the Vite plugin.
|