@devalok/shilp-sutra 0.47.0 → 0.48.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.
Files changed (53) hide show
  1. package/AGENTS.md +36 -12
  2. package/BREAKING.json +46 -0
  3. package/MIGRATION.md +35 -0
  4. package/dist/_chunks/emoji-suggestion.js +124 -0
  5. package/dist/_chunks/emoji-suggestion.js.map +1 -0
  6. package/dist/_chunks/emoji.js +1115 -0
  7. package/dist/_chunks/emoji.js.map +1 -0
  8. package/dist/_chunks/tiptap.js.map +1 -1
  9. package/dist/composed/emoji-picker.d.ts +19 -9
  10. package/dist/composed/emoji-picker.d.ts.map +1 -1
  11. package/dist/composed/emoji-picker.js +87 -68
  12. package/dist/composed/emoji-picker.js.map +1 -1
  13. package/dist/composed/extensions/emoji-data.d.ts +1 -14
  14. package/dist/composed/extensions/emoji-data.d.ts.map +1 -1
  15. package/dist/composed/extensions/emoji-node.d.ts +0 -3
  16. package/dist/composed/extensions/emoji-node.d.ts.map +1 -1
  17. package/dist/composed/extensions/emoji-node.js +9 -34
  18. package/dist/composed/extensions/emoji-node.js.map +1 -1
  19. package/dist/composed/extensions/emoji-suggestion.d.ts +2 -2
  20. package/dist/composed/extensions/emoji-suggestion.d.ts.map +1 -1
  21. package/dist/composed/extensions/emoji-suggestion.js +2 -116
  22. package/dist/composed/rich-chat-input.d.ts.map +1 -1
  23. package/dist/composed/rich-chat-input.js +554 -575
  24. package/dist/composed/rich-chat-input.js.map +1 -1
  25. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  26. package/dist/composed/rich-text-editor.js +167 -190
  27. package/dist/composed/rich-text-editor.js.map +1 -1
  28. package/docs/components/composed/emoji-picker.md +19 -17
  29. package/docs/components/composed/rich-text-editor.md +1 -1
  30. package/docs/components/ui/table-row-link.md +1 -1
  31. package/docs/recipes/index.md +1 -1
  32. package/docs/recipes/install-astro.md +15 -12
  33. package/docs/recipes/install-next-app-router.md +20 -12
  34. package/docs/recipes/install-next-pages.md +3 -1
  35. package/docs/recipes/install-remix.md +16 -13
  36. package/docs/recipes/install-tanstack-start.md +19 -12
  37. package/docs/recipes/install-vite.md +18 -15
  38. package/docs/recipes/troubleshoot.md +7 -8
  39. package/llms.txt +2 -2
  40. package/mcp-manifest.json +29 -66
  41. package/package.json +6 -9
  42. package/skill/SKILL.md +1 -1
  43. package/skill/references/components.md +2 -2
  44. package/skill/references/setup-astro.md +15 -12
  45. package/skill/references/setup-next-app-router.md +20 -12
  46. package/skill/references/setup-next-pages.md +3 -1
  47. package/skill/references/setup-remix.md +16 -13
  48. package/skill/references/setup-tanstack-start.md +19 -12
  49. package/skill/references/setup-vite.md +18 -15
  50. package/skill/references/troubleshoot.md +7 -8
  51. package/dist/_chunks/emoji-data.js +0 -45
  52. package/dist/_chunks/emoji-data.js.map +0 -1
  53. package/dist/composed/extensions/emoji-suggestion.js.map +0 -1
@@ -95,26 +95,25 @@ Add:
95
95
  transpilePackages: ["@devalok/shilp-sutra"],
96
96
  ```
97
97
 
98
- ## Symptom: Build error `Cannot find module 'sonner' / 'input-otp' / 'date-fns' / '@tiptap/react' / 'react-pdf' / 'react-markdown' / '@emoji-mart/react'`
98
+ ## Symptom: Build error `Cannot find module 'sonner' / 'input-otp' / 'date-fns' / 'react-pdf' / 'react-markdown'` OR (on Vite 8) a runtime `Could not resolve "…"` from a green build
99
99
 
100
- **Diagnosis:** an optional peer dependency is missing. Each component below has a peer it pulls only when imported. Install the matching peer (always BEFORE the first import):
100
+ **Diagnosis:** an optional peer dependency is missing. Each component below has a peer it pulls only when imported. Install the matching peer (always BEFORE the first import). On Vite 8 / Rolldown this does **not** fail the build — it throws at runtime — so run the MCP `verify_setup` tool to catch it early.
101
101
 
102
102
  | You imported (per-component subpath) | Install |
103
103
  |--------------------------------------|-----------------------------------------------------------------------------------------------|
104
104
  | `…/ui/toaster` or `…/ui/toast` | `pnpm add sonner` |
105
105
  | `…/ui/input-otp` | `pnpm add input-otp` |
106
- | `…/composed/date-picker` | `pnpm add date-fns` |
107
- | `…/composed/emoji-picker` | `pnpm add @emoji-mart/data @emoji-mart/react` |
108
- | `…/composed/extensions/emoji-node` or `…/extensions/emoji-suggestion` | `pnpm add @tiptap/react @tiptap/starter-kit @tiptap/extension-placeholder` |
109
- | `…/composed/rich-text-editor` | `pnpm add @tiptap/react @tiptap/starter-kit @tiptap/extension-placeholder` |
110
- | `…/composed/rich-chat-input` | `pnpm add @tiptap/react @tiptap/starter-kit @tiptap/extension-placeholder` |
106
+ | `…/composed/date-picker` or `…/composed/schedule-view` | `pnpm add date-fns` |
107
+ | `…/ui/data-table` or `…/ui/data-table-toolbar` | `pnpm add @tanstack/react-table @tanstack/react-virtual` |
111
108
  | `…/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
112
109
  | `…/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
113
110
  | `…/ai/block-renderer`, `…/ai/blocks/text`, `…/ai/blocks/error` | `pnpm add react-markdown remark-gfm` |
114
- | Any `…/ui/charts/*` | `pnpm add d3-array d3-axis d3-format d3-interpolate d3-scale d3-selection d3-shape d3-time-format d3-transition` |
111
+ | Any `…/ui/charts/*` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
115
112
 
116
113
  These ship as **optional** peers so consumers who never render the matching component don't pay the install cost. Once you import the component, the peer becomes required. Each affected component's JSDoc carries the same install hint — hover the import in your editor to see it inline.
117
114
 
115
+ **No longer peers (bundled since the frimousse migration):** the emoji picker (`…/composed/emoji-picker`) and the rich-text editors (`…/composed/rich-text-editor`, `…/composed/rich-chat-input`) bundle their dependencies (frimousse, `@emoji-mart/data`, TipTap) into a lazy chunk — you do **not** install anything for them. `@tabler/icons-react` is a required peer that most package managers auto-install.
116
+
118
117
  **Catch this at edit time, not build time:** install `@devalok/eslint-plugin-shilp-sutra` (`pnpm add -D @devalok/eslint-plugin-shilp-sutra`, then `shilpSutra.configs['flat/recommended']`). Its `prefer-per-component-import` rule flags peer-cliff symbols imported from a barrel and autofixes the path — surfacing the cliff in your editor before the bundler ever fails.
119
118
 
120
119
  For the full table in your framework's install recipe, see `install-<framework>.md → §2a. Optional peer dependencies`.
package/llms.txt CHANGED
@@ -1,12 +1,12 @@
1
1
  # @devalok/shilp-sutra
2
2
 
3
- > Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.47.0.
3
+ > Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.48.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
 
7
7
  ## How to get component details (in priority order)
8
8
 
9
- 1. **shilp-sutra MCP** (if connected): `get_component(name)` — version-exact props/variants/examples/composition as JSON. Also: `find_component(query)`, `get_tokens(category)`, `get_setup(framework)`, `upgrade(from, to)`, `search_docs(query)`. Pass your installed version (`node_modules/@devalok/shilp-sutra/package.json`) as `version` on every call.
9
+ 1. **shilp-sutra MCP** (if connected): `get_component(name)` — version-exact props/variants/examples/composition as JSON. Also: `find_component(query)`, `get_tokens(category)`, `get_setup(framework)`, `upgrade(from, to)`, `search_docs(query)`. **Setting up in a project?** `detect_framework(packageJson)` → `get_setup(framework)` → `preflight(framework, imports)` (peer installs) → `validate_snippet(code)` before writing → `verify_setup(...)`. Pass your installed version (`node_modules/@devalok/shilp-sutra/package.json`) as `version` on every call.
10
10
  Connect: `claude mcp add --transport http shilp-sutra https://shilp-sutra.devalok.in/mcp`
11
11
  2. **No MCP?** Read the single per-component file linked in the index below (`node_modules/@devalok/shilp-sutra/docs/components/...`, ~3K tokens each). Read only the components you need — never bulk-read the directory.
12
12
  3. **Machine-readable everything**: `mcp-manifest.json` at the package root (all props/tokens/composition as JSON, react-docgen shape). Prefer targeted reads of it over any prose.
package/mcp-manifest.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "./mcp-manifest.schema.json",
3
3
  "manifestVersion": "1.1.0",
4
4
  "package": "@devalok/shilp-sutra",
5
- "packageVersion": "0.47.0",
5
+ "packageVersion": "0.48.0",
6
6
  "components": {
7
7
  "accordion": {
8
8
  "displayName": "Accordion",
@@ -1782,15 +1782,10 @@
1782
1782
  }
1783
1783
  ],
1784
1784
  "peers": [
1785
- "d3-array",
1786
1785
  "d3-axis",
1787
- "d3-format",
1788
- "d3-interpolate",
1789
1786
  "d3-scale",
1790
1787
  "d3-selection",
1791
- "d3-shape",
1792
- "d3-time-format",
1793
- "d3-transition"
1788
+ "d3-shape"
1794
1789
  ]
1795
1790
  },
1796
1791
  "chat": {
@@ -3018,8 +3013,7 @@
3018
3013
  }
3019
3014
  ],
3020
3015
  "peers": [
3021
- "@tanstack/react-table",
3022
- "@tanstack/react-virtual"
3016
+ "@tanstack/react-table"
3023
3017
  ]
3024
3018
  },
3025
3019
  "devalok-grain": {
@@ -6745,7 +6739,7 @@
6745
6739
  },
6746
6740
  "docPath": "docs/components/ui/table-row-link.md",
6747
6741
  "examples": [
6748
- "<TableRow>\n <TableCell className=\"relative\">\n <TableRowLink href={`/projects/${id}`}>{name}</TableRowLink>\n </TableCell>\n <TableCell><Badge color=\"success\">Active</Badge></TableCell>\n <TableCell>\n <TableRowActions>\n <IconButton className=\"relative z-[1]\" size=\"xs\" variant=\"ghost\" aria-label={`Actions for ${name}`} icon={<IconDots />} />\n </TableRowActions>\n </TableCell>\n</TableRow>"
6742
+ "<TableRow>\n <TableCell className=\"relative\">\n <TableRowLink href={`/projects/${id}`}>{name}</TableRowLink>\n </TableCell>\n <TableCell><Badge color=\"success\">Active</Badge></TableCell>\n <TableCell>\n <TableRowActions>\n <IconButton className=\"relative z-[1]\" size=\"sm\" variant=\"ghost\" aria-label={`Actions for ${name}`} icon={<IconDots />} />\n </TableRowActions>\n </TableCell>\n</TableRow>"
6749
6743
  ],
6750
6744
  "gotchas": [
6751
6745
  "The stretched overlay blocks text selection inside the row — use `stretch={false}` (GitHub-style title link) when row text must stay selectable",
@@ -7069,6 +7063,9 @@
7069
7063
  "version": "0.1.0",
7070
7064
  "summary": "**Added** Initial release"
7071
7065
  }
7066
+ ],
7067
+ "peers": [
7068
+ "sonner"
7072
7069
  ]
7073
7070
  },
7074
7071
  "toaster": {
@@ -7146,6 +7143,9 @@
7146
7143
  "version": "0.1.0",
7147
7144
  "summary": "**Added** Initial release"
7148
7145
  }
7146
+ ],
7147
+ "peers": [
7148
+ "sonner"
7149
7149
  ]
7150
7150
  },
7151
7151
  "toggle": {
@@ -8704,41 +8704,12 @@
8704
8704
  },
8705
8705
  "required": false
8706
8706
  },
8707
- "theme": {
8708
- "type": {
8709
- "name": "enum",
8710
- "value": [
8711
- "auto",
8712
- "light",
8713
- "dark"
8714
- ]
8715
- },
8716
- "required": false,
8717
- "defaultValue": "auto"
8718
- },
8719
- "previewPosition": {
8720
- "type": {
8721
- "name": "enum",
8722
- "value": [
8723
- "top",
8724
- "bottom",
8725
- "none"
8726
- ]
8727
- },
8728
- "required": false,
8729
- "defaultValue": "none"
8730
- },
8731
- "skinTonePosition": {
8707
+ "emojibaseUrl": {
8732
8708
  "type": {
8733
- "name": "enum",
8734
- "value": [
8735
- "search",
8736
- "preview",
8737
- "none"
8738
- ]
8709
+ "name": "string"
8739
8710
  },
8740
8711
  "required": false,
8741
- "defaultValue": "search"
8712
+ "description": "base URL for the emoji dataset; default = frimousse's jsdelivr CDN"
8742
8713
  },
8743
8714
  "className": {
8744
8715
  "type": {
@@ -8788,32 +8759,30 @@
8788
8759
  "composition": {
8789
8760
  "notes": [
8790
8761
  "**Two exports:** `EmojiPicker` (inline grid, no trigger) and `EmojiPickerPopover` (trigger + popover wrapper). Use EmojiPickerPopover 95% of the time — trigger-on-click is the standard UX.",
8791
- "**Wraps @emoji-mart/react**, lazy-loaded with a Skeleton placeholder while the ~200KB bundle fetches. Don't pre-import unless you need it eagerly.",
8762
+ "**Built on frimousse**, bundled and lazy-loaded (own `emoji` chunk, incl. the dataset). Needs no consumer peer install and no React-19 peer workaround. Don't pre-import unless you need it eagerly.",
8763
+ "**Native emoji only.** Each platform renders its own glyphs. Theme follows the surrounding `.dark` class via DS tokens automatically — no theme prop.",
8764
+ "**Built-in footer:** a live preview of the hovered/active emoji (frimousse `ActiveEmoji`) plus a skin-tone selector (`SkinToneSelector`) — no props needed.",
8765
+ "**Dataset source / CSP:** frimousse fetches the emoji dataset from jsdelivr at runtime. To remove the CDN dependency (strict CSP, offline, air-gapped), copy `node_modules/emojibase-data` into your app's `public/emojibase` and pass `emojibaseUrl=\"/emojibase\"`.",
8792
8766
  "**Trigger composition:** EmojiPickerPopover's `children` is the trigger — wrap any Button/IconButton. Typical pairing is an icon-only IconButton with a 😀 label.",
8793
- "**TipTap integration:** Use `createEmojiSuggestion(set?)` factory to create a TipTap suggestion plugin that opens the picker on typing `:emoji`. Works with RichChatInput and RichTextEditor.",
8794
- "**Theme matching:** `theme=\"auto\"` reads the `.dark` class on `<html>` — matches the DS dark mode toggle automatically. Override with explicit light/dark.",
8795
- "**Emoji sets:** Pass `set=\"apple\" | \"google\" | ...` for consistent cross-platform emoji art (defaults to native OS glyphs)."
8767
+ "**TipTap integration:** Use `createEmojiSuggestion()` (from `./extensions/emoji-suggestion`) to open a `:shortcode:` suggestion list. Works with RichChatInput and RichTextEditor."
8796
8768
  ]
8797
8769
  },
8798
8770
  "docPath": "docs/components/composed/emoji-picker.md",
8799
8771
  "defaults": {
8800
- "theme": "auto",
8801
- "previewPosition": "none",
8802
- "skinTonePosition": "search",
8803
8772
  "align": "start"
8804
8773
  },
8805
8774
  "examples": [
8806
- "<EmojiPickerPopover onSelect={(emoji) => insertEmoji(emoji.native)}>\n <Button variant=\"ghost\" size=\"icon-sm\">😀</Button>\n</EmojiPickerPopover>\n\n<EmojiPicker onSelect={handleEmoji} theme=\"dark\" />"
8775
+ "<EmojiPickerPopover onSelect={(emoji) => insertEmoji(emoji.native)}>\n <Button variant=\"ghost\" size=\"icon-sm\">😀</Button>\n</EmojiPickerPopover>\n\n<EmojiPicker onSelect={handleEmoji} />"
8807
8776
  ],
8808
8777
  "gotchas": [
8809
- "Wraps `@emoji-mart/react` which is lazy-loaded shows a Skeleton placeholder while loading",
8810
- "`theme=\"auto\"` reads the `.dark` class on `<html>` to pick light/dark",
8811
- "EmojiPickerPopover auto-closes after selection"
8778
+ "Client-only (fetches its emoji dataset on first open) not server-safe.",
8779
+ "EmojiPickerPopover auto-closes after selection.",
8780
+ "The `set` / `theme` / `previewPosition` / `skinTonePosition` props are deprecated no-ops kept for source compatibility; the picker is native-only."
8812
8781
  ],
8813
8782
  "changes": [
8814
8783
  {
8815
8784
  "version": "0.33.0",
8816
- "summary": "**Added** `set` prop on EmojiPicker and EmojiPickerPopover — `EmojiSet` type: 'native' | 'apple' | 'google' | 'twitter' | 'facebook'"
8785
+ "summary": "**Added** `EmojiNode` TipTap extension and `createEmojiSuggestion()` factory."
8817
8786
  }
8818
8787
  ]
8819
8788
  },
@@ -9519,7 +9488,8 @@
9519
9488
  ],
9520
9489
  "peers": [
9521
9490
  "react-markdown",
9522
- "react-syntax-highlighter"
9491
+ "react-syntax-highlighter",
9492
+ "remark-gfm"
9523
9493
  ]
9524
9494
  },
9525
9495
  "master-detail": {
@@ -10225,11 +10195,6 @@
10225
10195
  "version": "0.32.0",
10226
10196
  "summary": "Initial release"
10227
10197
  }
10228
- ],
10229
- "peers": [
10230
- "@tiptap/react",
10231
- "@tiptap/starter-kit",
10232
- "@tiptap/extension-placeholder"
10233
10198
  ]
10234
10199
  },
10235
10200
  "rich-text-editor": {
@@ -10337,7 +10302,7 @@
10337
10302
  ],
10338
10303
  "gotchas": [
10339
10304
  "Tiptap is bundled — no need to install `@tiptap/*` packages separately",
10340
- "Emoji picker requires `@emoji-mart/react` + `@emoji-mart/data` peers",
10305
+ "Emoji picker (frimousse) + its dataset are bundled too — no emoji peers to install (native-only since the frimousse migration)",
10341
10306
  "Images without `onImageUpload` are stored as base64 in HTML — large images bloat content",
10342
10307
  "Mention rendering in viewer always works (no mention props needed, just the HTML)",
10343
10308
  "Features: bold, italic, underline, strikethrough, highlight, headings, blockquote, lists, task lists, code, links, images, file attachments, mentions, emoji, text alignment, horizontal rule"
@@ -10371,11 +10336,6 @@
10371
10336
  "version": "0.1.1",
10372
10337
  "summary": "**Fixed** Added content sync effect so editor updates when `content` prop changes externally"
10373
10338
  }
10374
- ],
10375
- "peers": [
10376
- "@tiptap/react",
10377
- "@tiptap/starter-kit",
10378
- "@tiptap/extension-placeholder"
10379
10339
  ]
10380
10340
  },
10381
10341
  "schedule-view": {
@@ -10476,6 +10436,9 @@
10476
10436
  "version": "0.1.0",
10477
10437
  "summary": "**Added** Initial release"
10478
10438
  }
10439
+ ],
10440
+ "peers": [
10441
+ "date-fns"
10479
10442
  ]
10480
10443
  },
10481
10444
  "simple-tooltip": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devalok/shilp-sutra",
3
- "version": "0.47.0",
3
+ "version": "0.48.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>",
@@ -52,8 +52,10 @@
52
52
  "provenance": true
53
53
  },
54
54
  "dependencies": {
55
+ "@emoji-mart/data": "^1.2.1",
55
56
  "class-variance-authority": "^0.7.1",
56
57
  "clsx": "^2.1.1",
58
+ "frimousse": "^0.3.0",
57
59
  "tw-animate-css": "^1.4.0",
58
60
  "use-sync-external-store": "^1.5.0"
59
61
  },
@@ -839,8 +841,6 @@
839
841
  ]
840
842
  },
841
843
  "peerDependencies": {
842
- "@emoji-mart/data": "^1.0.0",
843
- "@emoji-mart/react": "^1.0.0",
844
844
  "@tabler/icons-react": "^3.0.0",
845
845
  "@tanstack/react-table": "^8.0.0",
846
846
  "@tanstack/react-virtual": "^3.0.0",
@@ -873,12 +873,6 @@
873
873
  "@tanstack/react-virtual": {
874
874
  "optional": true
875
875
  },
876
- "@emoji-mart/data": {
877
- "optional": true
878
- },
879
- "@emoji-mart/react": {
880
- "optional": true
881
- },
882
876
  "d3-array": {
883
877
  "optional": true
884
878
  },
@@ -985,6 +979,9 @@
985
979
  "build:tokens": "node scripts/copy-tokens.mjs",
986
980
  "build:docs": "node scripts/build-component-docs.mjs",
987
981
  "build:docs:check": "node scripts/build-component-docs.mjs --check",
982
+ "peers:check": "node scripts/derive-peer-map.mjs --check",
983
+ "smoke:cold": "node scripts/cold-install-smoke.mjs",
984
+ "smoke:cold:next": "node scripts/cold-install-smoke.mjs --framework next-app-router",
988
985
  "typecheck": "tsc --noEmit",
989
986
  "lint": "eslint src/",
990
987
  "test": "vitest run",
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.47.0"
6
+ version: "0.48.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,13 +2,13 @@
2
2
 
3
3
  # @devalok/shilp-sutra
4
4
 
5
- > Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.47.0.
5
+ > Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.48.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
 
9
9
  ## How to get component details (in priority order)
10
10
 
11
- 1. **shilp-sutra MCP** (if connected): `get_component(name)` — version-exact props/variants/examples/composition as JSON. Also: `find_component(query)`, `get_tokens(category)`, `get_setup(framework)`, `upgrade(from, to)`, `search_docs(query)`. Pass your installed version (`node_modules/@devalok/shilp-sutra/package.json`) as `version` on every call.
11
+ 1. **shilp-sutra MCP** (if connected): `get_component(name)` — version-exact props/variants/examples/composition as JSON. Also: `find_component(query)`, `get_tokens(category)`, `get_setup(framework)`, `upgrade(from, to)`, `search_docs(query)`. **Setting up in a project?** `detect_framework(packageJson)` → `get_setup(framework)` → `preflight(framework, imports)` (peer installs) → `validate_snippet(code)` before writing → `verify_setup(...)`. Pass your installed version (`node_modules/@devalok/shilp-sutra/package.json`) as `version` on every call.
12
12
  Connect: `claude mcp add --transport http shilp-sutra https://shilp-sutra.devalok.in/mcp`
13
13
  2. **No MCP?** Read the single per-component file linked in the index below (`node_modules/@devalok/shilp-sutra/docs/components/...`, ~3K tokens each). Read only the components you need — never bulk-read the directory.
14
14
  3. **Machine-readable everything**: `mcp-manifest.json` at the package root (all props/tokens/composition as JSON, react-docgen shape). Prefer targeted reads of it over any prose.
@@ -33,18 +33,21 @@ pnpm add sonner
33
33
 
34
34
  ### 2a. Optional peer dependencies (install ONLY when importing the matching subpath)
35
35
 
36
- Some components ship hard peers as optional. **Install BEFORE first import** or Astro's Vite build will fail with `Failed to resolve import`. Skip if you only use core components.
37
-
38
- | When you import… | Install |
39
- |-----------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
40
- | `@devalok/shilp-sutra/ui/charts/*` | `pnpm add d3-array d3-axis d3-format d3-interpolate d3-scale d3-selection d3-shape d3-time-format d3-transition` |
41
- | `@devalok/shilp-sutra/ui/data-table` | `pnpm add @tanstack/react-table @tanstack/react-virtual` |
42
- | `@devalok/shilp-sutra/composed/date-picker` (+ DateRange, DateTime, Calendar) | `pnpm add date-fns` |
43
- | `@devalok/shilp-sutra/composed/rich-text-editor` (+ RichChatInput, RichTextViewer) | `pnpm add @tiptap/react @tiptap/starter-kit @tiptap/extension-placeholder` |
44
- | `@devalok/shilp-sutra/ui/input-otp` | `pnpm add input-otp` |
45
- | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
46
- | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter` |
47
- | Any `Icon` / `IconButton` with Tabler icons | `pnpm add @tabler/icons-react` |
36
+ Some components ship hard peers as optional. **Install BEFORE first import.** On Vite / Rolldown a missing peer may **not** fail the build — the bundler can silently replace the import with a stub that throws `Could not resolve "…"` in the browser at runtime, while the build still exits 0. A green build is therefore **not** proof the app works. Confirm coverage with the MCP `verify_setup` / `preflight` tools or the table below. Skip only if you use core components.
37
+
38
+ | When you import… | Install |
39
+ |---|---|
40
+ | `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
41
+ | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
42
+ | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
43
+ | `@devalok/shilp-sutra/composed/schedule-view` | `pnpm add date-fns` |
44
+ | `@devalok/shilp-sutra/ui/charts` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
45
+ | `@devalok/shilp-sutra/ui/data-table` | `pnpm add @tanstack/react-table @tanstack/react-virtual` |
46
+ | `@devalok/shilp-sutra/ui/data-table-toolbar` | `pnpm add @tanstack/react-table` |
47
+ | `@devalok/shilp-sutra/ui/input-otp` | `pnpm add input-otp` |
48
+ | `@devalok/shilp-sutra/ui/toast` | `pnpm add sonner` |
49
+ | `@devalok/shilp-sutra/ui/toaster` | `pnpm add sonner` |
50
+ | Any `Icon` / `IconButton` with Tabler icons (near-universal — most components use icons internally, so it is a base-install peer) | `pnpm add @tabler/icons-react` |
48
51
 
49
52
  ## 3. Wire Tailwind 4 in `astro.config`
50
53
 
@@ -48,16 +48,19 @@ pnpm add sonner
48
48
 
49
49
  Some components depend on third-party libraries that ship as optional peers. **Install BEFORE first import** of the matching component, or `next build` will exit with `Module not found`. Skip entirely if you only use core components (`Button`, `Text`, `Stack`, `Dialog`, `Toast`, `Form*`, `Input`, `Card`, etc.).
50
50
 
51
- | When you import… | Install |
52
- |-----------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
53
- | `@devalok/shilp-sutra/ui/charts/*` (BarChart, LineChart, …)| `pnpm add d3-array d3-axis d3-format d3-interpolate d3-scale d3-selection d3-shape d3-time-format d3-transition` |
54
- | `@devalok/shilp-sutra/ui/data-table` | `pnpm add @tanstack/react-table @tanstack/react-virtual` |
55
- | `@devalok/shilp-sutra/composed/date-picker` (+ DateRange, DateTime, Calendar) | `pnpm add date-fns` |
56
- | `@devalok/shilp-sutra/composed/rich-text-editor` (+ RichChatInput, RichTextViewer) | `pnpm add @tiptap/react @tiptap/starter-kit @tiptap/extension-placeholder` |
57
- | `@devalok/shilp-sutra/ui/input-otp` | `pnpm add input-otp` |
58
- | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
59
- | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter` |
60
- | Any `Icon` / `IconButton` use with Tabler icons | `pnpm add @tabler/icons-react` |
51
+ | When you import… | Install |
52
+ |---|---|
53
+ | `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
54
+ | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
55
+ | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
56
+ | `@devalok/shilp-sutra/composed/schedule-view` | `pnpm add date-fns` |
57
+ | `@devalok/shilp-sutra/ui/charts` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
58
+ | `@devalok/shilp-sutra/ui/data-table` | `pnpm add @tanstack/react-table @tanstack/react-virtual` |
59
+ | `@devalok/shilp-sutra/ui/data-table-toolbar` | `pnpm add @tanstack/react-table` |
60
+ | `@devalok/shilp-sutra/ui/input-otp` | `pnpm add input-otp` |
61
+ | `@devalok/shilp-sutra/ui/toast` | `pnpm add sonner` |
62
+ | `@devalok/shilp-sutra/ui/toaster` | `pnpm add sonner` |
63
+ | Any `Icon` / `IconButton` with Tabler icons (near-universal — most components use icons internally, so it is a base-install peer) | `pnpm add @tabler/icons-react` |
61
64
 
62
65
  > These aren't in core deps so consumers who never render a chart, OTP input, or rich-text editor don't pay the install / bundle cost. One-time decision at install.
63
66
 
@@ -166,9 +169,14 @@ export function Providers({ children }: { children: ReactNode }) {
166
169
  }
167
170
  ```
168
171
 
169
- `next-themes` is already in the install list from § 2 no extra install step needed here. If `<Toaster />` is not used:
172
+ > **This default `Providers` renders `<Toaster />`, which imports `sonner`.** Install it now or `next build` fails with `Module not found: Can't resolve 'sonner'`:
173
+ > ```bash
174
+ > pnpm add sonner
175
+ > ```
170
176
 
171
- - Drop the `Toaster` import and its JSX usage
177
+ `next-themes` is already in the install list from § 2 — no extra install step needed here. If you do **not** want toasts:
178
+
179
+ - Drop the `Toaster` import and its JSX usage from `Providers`
172
180
  - Skip installing `sonner`
173
181
 
174
182
  Mount `<Providers>` from `app/layout.tsx` (or `src/app/layout.tsx`). **Replace the scaffold's layout** with the version below — the scaffold imports `next/font/google` (Geist) and applies font-variable classes to `<html>`, which you don't need when shilp-sutra ships its own fonts:
@@ -18,7 +18,7 @@ If both `app/` and `pages/` exist, prefer [install-next-app-router.md](./install
18
18
 
19
19
  Same dependencies as the App Router recipe — see [install-next-app-router.md § 2](./install-next-app-router.md#2-install-dependencies). Replace `next-themes`'s `attribute="class"` setup with the same on Pages Router (it works identically).
20
20
 
21
- **Optional peer dependencies** — if you'll render `<DataTable>`, any chart, `<DatePicker>`, `<RichTextEditor>`, `<InputOTP>`, `<FilePreview>`, `<MarkdownViewer>`, or use Tabler icons, install the matching peers BEFORE first import. Full table at [install-next-app-router.md § 2a](./install-next-app-router.md#2a-optional-peer-dependencies-install-only-when-importing-the-matching-subpath) — identical for Pages Router.
21
+ **Optional peer dependencies** — if you'll render `<DataTable>`, any chart, `<DatePicker>`, `<ScheduleView>`, `<InputOTP>`, `<FilePreview>`, `<MarkdownViewer>`, or `<Toaster>`, install the matching peers BEFORE first import. (The emoji picker and rich-text editors bundle their deps — no install needed; `@tabler/icons-react` auto-installs as a required peer.) Full table at [install-next-app-router.md § 2a](./install-next-app-router.md#2a-optional-peer-dependencies-install-only-when-importing-the-matching-subpath) — identical for Pages Router.
22
22
 
23
23
  ## 3. PostCSS
24
24
 
@@ -69,6 +69,8 @@ export default function App({ Component, pageProps }: AppProps) {
69
69
  }
70
70
  ```
71
71
 
72
+ > ⚠ **This renders `<Toaster />`, which imports `sonner`.** Install it or `next build` fails with `Module not found: Can't resolve 'sonner'`: `pnpm add sonner`. If you don't want toasts, drop the `Toaster` import + usage and skip `sonner`.
73
+
72
74
  For `next-themes` to avoid hydration warnings, add a `_document.tsx` with `suppressHydrationWarning` on the `<html>`:
73
75
 
74
76
  ```tsx
@@ -12,7 +12,7 @@ You are in this recipe if:
12
12
  - `vite.config.{ts,js}` exists with the `vitePlugin` from `@remix-run/dev`
13
13
  - `app/root.tsx` exists with `<Outlet />` inside `<Document>` shell
14
14
 
15
- For React Router v7 (the spiritual successor to Remix), use the [install-vite.md](./install-vite.md) recipeit works the same way.
15
+ > **New projects scaffold as React Router v7, not Remix.** `create-remix` is deprecated and redirects to `create-react-router`; Remix v2 was upstreamed into React Router (maintenance mode). If you ran `create-react-router`, you have an RR7 **framework-mode** app (`@react-router/dev` + `react-router build` + `app/root.tsx` + `ssr: true`) — verified cold with shilp-sutra (SSR render, HTTP 200). Its wiring is the same shape as this recipe: `@tailwindcss/vite` plugin, `@import "@devalok/shilp-sutra/css"` in `app/app.css`, and **no `transpilePackages`** (Vite resolves our ESM). Ignore the SPA-only steps in [install-vite.md](./install-vite.md) (`index.html` bootstrap, `main.tsx` `createRoot`) RR7 framework mode has its own `root.tsx` shell, like this recipe.
16
16
 
17
17
  ## 2. Install
18
18
 
@@ -29,18 +29,21 @@ pnpm add sonner # only if rendering <Toaster />
29
29
 
30
30
  ### 2a. Optional peer dependencies (install ONLY when importing the matching subpath)
31
31
 
32
- Some components ship hard peers as optional. **Install BEFORE first import** or Remix's Vite build will fail with `Failed to resolve import`. Skip if you only use core components.
33
-
34
- | When you import… | Install |
35
- |-----------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
36
- | `@devalok/shilp-sutra/ui/charts/*` | `pnpm add d3-array d3-axis d3-format d3-interpolate d3-scale d3-selection d3-shape d3-time-format d3-transition` |
37
- | `@devalok/shilp-sutra/ui/data-table` | `pnpm add @tanstack/react-table @tanstack/react-virtual` |
38
- | `@devalok/shilp-sutra/composed/date-picker` (+ DateRange, DateTime, Calendar) | `pnpm add date-fns` |
39
- | `@devalok/shilp-sutra/composed/rich-text-editor` (+ RichChatInput, RichTextViewer) | `pnpm add @tiptap/react @tiptap/starter-kit @tiptap/extension-placeholder` |
40
- | `@devalok/shilp-sutra/ui/input-otp` | `pnpm add input-otp` |
41
- | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
42
- | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter` |
43
- | Any `Icon` / `IconButton` with Tabler icons | `pnpm add @tabler/icons-react` |
32
+ Some components ship hard peers as optional. **Install BEFORE first import.** On Vite 8 / Rolldown a missing peer does **not** fail the build — Rolldown silently replaces the import with a stub that throws `Could not resolve "…"` in the browser at runtime, while the build still exits 0. A green build is therefore **not** proof the app works. Confirm coverage with the MCP `verify_setup` / `preflight` tools or the table below. Skip only if you use core components.
33
+
34
+ | When you import… | Install |
35
+ |---|---|
36
+ | `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
37
+ | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
38
+ | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
39
+ | `@devalok/shilp-sutra/composed/schedule-view` | `pnpm add date-fns` |
40
+ | `@devalok/shilp-sutra/ui/charts` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
41
+ | `@devalok/shilp-sutra/ui/data-table` | `pnpm add @tanstack/react-table @tanstack/react-virtual` |
42
+ | `@devalok/shilp-sutra/ui/data-table-toolbar` | `pnpm add @tanstack/react-table` |
43
+ | `@devalok/shilp-sutra/ui/input-otp` | `pnpm add input-otp` |
44
+ | `@devalok/shilp-sutra/ui/toast` | `pnpm add sonner` |
45
+ | `@devalok/shilp-sutra/ui/toaster` | `pnpm add sonner` |
46
+ | Any `Icon` / `IconButton` with Tabler icons (near-universal — most components use icons internally, so it is a base-install peer) | `pnpm add @tabler/icons-react` |
44
47
 
45
48
  ## 3. Wire Tailwind 4 in `vite.config.ts`
46
49
 
@@ -16,6 +16,8 @@ You are in this recipe if:
16
16
 
17
17
  If instead you see `app.config.ts` + `@tanstack/start`, that is the legacy Vinxi setup — this recipe does not apply until you migrate.
18
18
 
19
+ > **Scaffolded with `create-start` and got a Router SPA?** As of `@tanstack/create-start` 0.59, the default template is a TanStack **Router** SPA — Vite + `@tanstack/react-router` + an `index.html` + `src/main.tsx` (client `createRoot`), with **no** `@tanstack/react-start` and no SSR server entry. That is NOT the Start SSR setup this recipe covers — use [install-vite.md](./install-vite.md) instead (it is router-agnostic and covers TanStack Router SPAs cleanly). This recipe applies only when `@tanstack/react-start` is a dependency.
20
+
19
21
  ## 2. Install
20
22
 
21
23
  ```bash
@@ -36,18 +38,21 @@ pnpm add sonner # only if rendering <Toaster />
36
38
 
37
39
  ### 2a. Optional peer dependencies (install ONLY when importing the matching subpath)
38
40
 
39
- Some components ship hard peers as optional. **Install BEFORE first import** or the TanStack Start dev/build will fail with `Failed to resolve import`. Skip if you only use core components.
40
-
41
- | When you import… | Install |
42
- |-----------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
43
- | `@devalok/shilp-sutra/ui/charts/*` | `pnpm add d3-array d3-axis d3-format d3-interpolate d3-scale d3-selection d3-shape d3-time-format d3-transition` |
44
- | `@devalok/shilp-sutra/ui/data-table` | `pnpm add @tanstack/react-table @tanstack/react-virtual` |
45
- | `@devalok/shilp-sutra/composed/date-picker` (+ DateRange, DateTime, Calendar) | `pnpm add date-fns` |
46
- | `@devalok/shilp-sutra/composed/rich-text-editor` (+ RichChatInput, RichTextViewer) | `pnpm add @tiptap/react @tiptap/starter-kit @tiptap/extension-placeholder` |
47
- | `@devalok/shilp-sutra/ui/input-otp` | `pnpm add input-otp` |
48
- | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
49
- | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter` |
50
- | Any `Icon` / `IconButton` with Tabler icons | `pnpm add @tabler/icons-react` |
41
+ Some components ship hard peers as optional. **Install BEFORE first import.** On Vite 8 / Rolldown a missing peer does **not** fail the build — Rolldown silently replaces the import with a stub that throws `Could not resolve "…"` in the browser at runtime, while the build still exits 0. A green build is therefore **not** proof the app works. Confirm coverage with the MCP `verify_setup` / `preflight` tools or the table below. Skip only if you use core components.
42
+
43
+ | When you import… | Install |
44
+ |---|---|
45
+ | `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
46
+ | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
47
+ | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
48
+ | `@devalok/shilp-sutra/composed/schedule-view` | `pnpm add date-fns` |
49
+ | `@devalok/shilp-sutra/ui/charts` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
50
+ | `@devalok/shilp-sutra/ui/data-table` | `pnpm add @tanstack/react-table @tanstack/react-virtual` |
51
+ | `@devalok/shilp-sutra/ui/data-table-toolbar` | `pnpm add @tanstack/react-table` |
52
+ | `@devalok/shilp-sutra/ui/input-otp` | `pnpm add input-otp` |
53
+ | `@devalok/shilp-sutra/ui/toast` | `pnpm add sonner` |
54
+ | `@devalok/shilp-sutra/ui/toaster` | `pnpm add sonner` |
55
+ | Any `Icon` / `IconButton` with Tabler icons (near-universal — most components use icons internally, so it is a base-install peer) | `pnpm add @tabler/icons-react` |
51
56
 
52
57
  ## 3. Wire Tailwind 4 in `vite.config.ts`
53
58
 
@@ -117,6 +122,8 @@ function RootComponent() {
117
122
  }
118
123
  ```
119
124
 
125
+ > **Newer scaffolds use `shellComponent`.** As of `@tanstack/create-start` 0.59 the generated `__root.tsx` uses `shellComponent: RootDocument` (which receives `{ children }`) instead of `component: RootComponent` with `<Outlet />`. Both wire up the same way for shilp-sutra — put the `{ rel: "stylesheet", href: appCss }` link in `head()` and keep `<HeadContent />` + `<Scripts />`. If your `__root.tsx` already has a `shellComponent`, add the stylesheet link to its existing `head()` rather than replacing the component. (Verified cold: shilp-sutra components — Button, Text, MarkdownViewer, EmojiPickerPopover — SSR-render cleanly under TanStack Start, HTTP 200.)
126
+
120
127
  ## 5. Theme toggle
121
128
 
122
129
  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.