@devalok/shilp-sutra 0.57.0 → 0.59.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 (258) hide show
  1. package/MIGRATION.md +91 -0
  2. package/dist/_chunks/badge-group.js +75 -188
  3. package/dist/_chunks/badge-group.js.map +1 -1
  4. package/dist/_chunks/chat.js +244 -243
  5. package/dist/_chunks/chat.js.map +1 -1
  6. package/dist/_chunks/image-preview.js +71 -70
  7. package/dist/_chunks/image-preview.js.map +1 -1
  8. package/dist/_chunks/motion-preference.js +15 -0
  9. package/dist/_chunks/motion-preference.js.map +1 -0
  10. package/dist/_chunks/motion-provider.js +1 -1
  11. package/dist/_chunks/motion-provider.js.map +1 -1
  12. package/dist/_chunks/popover.js +50 -49
  13. package/dist/_chunks/popover.js.map +1 -1
  14. package/dist/_chunks/primitives-internal.js +29 -29
  15. package/dist/_chunks/primitives-internal.js.map +1 -1
  16. package/dist/_chunks/shared.js +48 -47
  17. package/dist/_chunks/shared.js.map +1 -1
  18. package/dist/_chunks/success.js +34 -34
  19. package/dist/_chunks/tree-view.js +1 -1
  20. package/dist/_chunks/tree-view.js.map +1 -1
  21. package/dist/ai/block-renderer.js +8 -8
  22. package/dist/ai/command-bar.js +65 -65
  23. package/dist/ai/command-bar.js.map +1 -1
  24. package/dist/ai/conversation.js +35 -35
  25. package/dist/ai/conversation.js.map +1 -1
  26. package/dist/ai/index.js +4 -4
  27. package/dist/composed/activity-feed.d.ts.map +1 -1
  28. package/dist/composed/activity-feed.js +108 -107
  29. package/dist/composed/activity-feed.js.map +1 -1
  30. package/dist/composed/command-palette.js +137 -137
  31. package/dist/composed/command-palette.js.map +1 -1
  32. package/dist/composed/content-card.js +1 -1
  33. package/dist/composed/content-card.js.map +1 -1
  34. package/dist/composed/date-picker/index.js +5 -5
  35. package/dist/composed/date-picker/index.js.map +1 -1
  36. package/dist/composed/empty-state.js +4 -4
  37. package/dist/composed/file-preview/image-preview.d.ts.map +1 -1
  38. package/dist/composed/file-preview/shared.d.ts.map +1 -1
  39. package/dist/composed/file-preview/video-preview.d.ts.map +1 -1
  40. package/dist/composed/file-preview.js +151 -150
  41. package/dist/composed/file-preview.js.map +1 -1
  42. package/dist/composed/filter-bar.d.ts.map +1 -1
  43. package/dist/composed/filter-bar.js +53 -52
  44. package/dist/composed/filter-bar.js.map +1 -1
  45. package/dist/composed/form-section.d.ts.map +1 -1
  46. package/dist/composed/form-section.js +38 -37
  47. package/dist/composed/form-section.js.map +1 -1
  48. package/dist/composed/master-detail.d.ts.map +1 -1
  49. package/dist/composed/master-detail.js +1 -1
  50. package/dist/composed/master-detail.js.map +1 -1
  51. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  52. package/dist/composed/multi-select-popover.js +109 -108
  53. package/dist/composed/multi-select-popover.js.map +1 -1
  54. package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -1
  55. package/dist/composed/rich-chat-input/reply-banner.d.ts.map +1 -1
  56. package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -1
  57. package/dist/composed/rich-chat-input.d.ts.map +1 -1
  58. package/dist/composed/rich-chat-input.js +467 -466
  59. package/dist/composed/rich-chat-input.js.map +1 -1
  60. package/dist/composed/rich-text-editor.js +3 -3
  61. package/dist/composed/rich-text-editor.js.map +1 -1
  62. package/dist/composed/schedule-view.js +2 -2
  63. package/dist/composed/schedule-view.js.map +1 -1
  64. package/dist/composed/status-badge.d.ts.map +1 -1
  65. package/dist/composed/status-badge.js +29 -28
  66. package/dist/composed/status-badge.js.map +1 -1
  67. package/dist/motion/index.d.ts +1 -0
  68. package/dist/motion/index.d.ts.map +1 -1
  69. package/dist/motion/index.js +2 -15
  70. package/dist/motion/motion-preference.d.ts +36 -0
  71. package/dist/motion/motion-preference.d.ts.map +1 -0
  72. package/dist/motion/motion-provider.d.ts +2 -1
  73. package/dist/motion/motion-provider.d.ts.map +1 -1
  74. package/dist/motion/primitives-index.js +103 -102
  75. package/dist/motion/primitives-index.js.map +1 -1
  76. package/dist/motion/primitives.d.ts.map +1 -1
  77. package/dist/shell/bottom-navbar.js +19 -19
  78. package/dist/shell/bottom-navbar.js.map +1 -1
  79. package/dist/shell/index.d.ts +1 -1
  80. package/dist/shell/index.d.ts.map +1 -1
  81. package/dist/shell/notification-center.d.ts +17 -0
  82. package/dist/shell/notification-center.d.ts.map +1 -1
  83. package/dist/shell/notification-center.js +109 -104
  84. package/dist/shell/notification-center.js.map +1 -1
  85. package/dist/shell/notification-preferences.js +1 -1
  86. package/dist/shell/notification-preferences.js.map +1 -1
  87. package/dist/shell/top-bar.js +1 -1
  88. package/dist/shell/top-bar.js.map +1 -1
  89. package/dist/tokens/index.css +1 -0
  90. package/dist/tokens/palettes.css +292 -0
  91. package/dist/tokens/semantic.css +72 -8
  92. package/dist/tokens/shilp-sutra.css +1 -0
  93. package/dist/tokens/utilities.css +10 -7
  94. package/dist/ui/accordion.d.ts.map +1 -1
  95. package/dist/ui/accordion.js +27 -26
  96. package/dist/ui/accordion.js.map +1 -1
  97. package/dist/ui/alert-dialog.d.ts.map +1 -1
  98. package/dist/ui/alert-dialog.js +60 -59
  99. package/dist/ui/alert-dialog.js.map +1 -1
  100. package/dist/ui/alert.d.ts.map +1 -1
  101. package/dist/ui/alert.js +55 -113
  102. package/dist/ui/alert.js.map +1 -1
  103. package/dist/ui/autocomplete.js +80 -80
  104. package/dist/ui/autocomplete.js.map +1 -1
  105. package/dist/ui/avatar.d.ts.map +1 -1
  106. package/dist/ui/avatar.js +69 -68
  107. package/dist/ui/avatar.js.map +1 -1
  108. package/dist/ui/badge-indicator.d.ts +4 -8
  109. package/dist/ui/badge-indicator.d.ts.map +1 -1
  110. package/dist/ui/badge-indicator.js +3 -8
  111. package/dist/ui/badge-indicator.js.map +1 -1
  112. package/dist/ui/badge.d.ts +8 -1
  113. package/dist/ui/badge.d.ts.map +1 -1
  114. package/dist/ui/banner.d.ts.map +1 -1
  115. package/dist/ui/banner.js +42 -40
  116. package/dist/ui/banner.js.map +1 -1
  117. package/dist/ui/button-group.d.ts.map +1 -1
  118. package/dist/ui/button-group.js +3 -23
  119. package/dist/ui/button-group.js.map +1 -1
  120. package/dist/ui/button.d.ts +10 -1
  121. package/dist/ui/button.d.ts.map +1 -1
  122. package/dist/ui/button.js +79 -212
  123. package/dist/ui/button.js.map +1 -1
  124. package/dist/ui/card.d.ts.map +1 -1
  125. package/dist/ui/card.js +75 -72
  126. package/dist/ui/card.js.map +1 -1
  127. package/dist/ui/charts/radar-chart.d.ts.map +1 -1
  128. package/dist/ui/charts/radar-chart.js +1 -1
  129. package/dist/ui/charts/radar-chart.js.map +1 -1
  130. package/dist/ui/chat/message-list.d.ts.map +1 -1
  131. package/dist/ui/chat/message.d.ts.map +1 -1
  132. package/dist/ui/chat/typing-indicator.d.ts.map +1 -1
  133. package/dist/ui/code.js +1 -1
  134. package/dist/ui/code.js.map +1 -1
  135. package/dist/ui/color-input.d.ts.map +1 -1
  136. package/dist/ui/color-input.js +151 -150
  137. package/dist/ui/color-input.js.map +1 -1
  138. package/dist/ui/combobox.d.ts +14 -0
  139. package/dist/ui/combobox.d.ts.map +1 -1
  140. package/dist/ui/combobox.js +152 -148
  141. package/dist/ui/combobox.js.map +1 -1
  142. package/dist/ui/context-menu.d.ts.map +1 -1
  143. package/dist/ui/context-menu.js +70 -69
  144. package/dist/ui/context-menu.js.map +1 -1
  145. package/dist/ui/data-table-body.js +2 -2
  146. package/dist/ui/data-table-body.js.map +1 -1
  147. package/dist/ui/data-table-context.js +2 -2
  148. package/dist/ui/data-table-context.js.map +1 -1
  149. package/dist/ui/data-table-header.d.ts.map +1 -1
  150. package/dist/ui/data-table-header.js +41 -40
  151. package/dist/ui/data-table-header.js.map +1 -1
  152. package/dist/ui/data-table-pagination.js +2 -2
  153. package/dist/ui/data-table-pagination.js.map +1 -1
  154. package/dist/ui/dialog.d.ts.map +1 -1
  155. package/dist/ui/dialog.js +61 -60
  156. package/dist/ui/dialog.js.map +1 -1
  157. package/dist/ui/dot.d.ts.map +1 -1
  158. package/dist/ui/dot.js +10 -41
  159. package/dist/ui/dot.js.map +1 -1
  160. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  161. package/dist/ui/dropdown-menu.js +79 -78
  162. package/dist/ui/dropdown-menu.js.map +1 -1
  163. package/dist/ui/file-upload.d.ts.map +1 -1
  164. package/dist/ui/file-upload.js +116 -115
  165. package/dist/ui/file-upload.js.map +1 -1
  166. package/dist/ui/form.d.ts.map +1 -1
  167. package/dist/ui/form.js +27 -26
  168. package/dist/ui/form.js.map +1 -1
  169. package/dist/ui/hover-card.d.ts.map +1 -1
  170. package/dist/ui/hover-card.js +26 -25
  171. package/dist/ui/hover-card.js.map +1 -1
  172. package/dist/ui/icon.js +7 -7
  173. package/dist/ui/index.d.ts +2 -2
  174. package/dist/ui/index.d.ts.map +1 -1
  175. package/dist/ui/index.js +3 -3
  176. package/dist/ui/index.js.map +1 -1
  177. package/dist/ui/input.js +1 -1
  178. package/dist/ui/input.js.map +1 -1
  179. package/dist/ui/menubar.d.ts.map +1 -1
  180. package/dist/ui/menubar.js +73 -72
  181. package/dist/ui/menubar.js.map +1 -1
  182. package/dist/ui/navigation-menu.d.ts.map +1 -1
  183. package/dist/ui/navigation-menu.js +80 -79
  184. package/dist/ui/navigation-menu.js.map +1 -1
  185. package/dist/ui/popover.d.ts.map +1 -1
  186. package/dist/ui/progress.d.ts.map +1 -1
  187. package/dist/ui/progress.js +72 -68
  188. package/dist/ui/progress.js.map +1 -1
  189. package/dist/ui/radio.d.ts.map +1 -1
  190. package/dist/ui/radio.js +32 -31
  191. package/dist/ui/radio.js.map +1 -1
  192. package/dist/ui/search-input.d.ts.map +1 -1
  193. package/dist/ui/search-input.js +28 -27
  194. package/dist/ui/search-input.js.map +1 -1
  195. package/dist/ui/select.d.ts.map +1 -1
  196. package/dist/ui/select.js +64 -63
  197. package/dist/ui/select.js.map +1 -1
  198. package/dist/ui/sidebar.d.ts.map +1 -1
  199. package/dist/ui/sidebar.js +4 -4
  200. package/dist/ui/sidebar.js.map +1 -1
  201. package/dist/ui/slider.d.ts +63 -9
  202. package/dist/ui/slider.d.ts.map +1 -1
  203. package/dist/ui/slider.js +74 -32
  204. package/dist/ui/slider.js.map +1 -1
  205. package/dist/ui/split-button.d.ts +8 -2
  206. package/dist/ui/split-button.d.ts.map +1 -1
  207. package/dist/ui/split-button.js +49 -95
  208. package/dist/ui/split-button.js.map +1 -1
  209. package/dist/ui/stat-card.d.ts.map +1 -1
  210. package/dist/ui/stat-card.js +89 -88
  211. package/dist/ui/stat-card.js.map +1 -1
  212. package/dist/ui/stat-flash.js +16 -16
  213. package/dist/ui/stepper.d.ts.map +1 -1
  214. package/dist/ui/stepper.js +63 -62
  215. package/dist/ui/stepper.js.map +1 -1
  216. package/dist/ui/table.js +3 -3
  217. package/dist/ui/table.js.map +1 -1
  218. package/dist/ui/tabs.d.ts.map +1 -1
  219. package/dist/ui/tabs.js +67 -66
  220. package/dist/ui/tabs.js.map +1 -1
  221. package/dist/ui/textarea.js +1 -1
  222. package/dist/ui/textarea.js.map +1 -1
  223. package/dist/ui/toast.d.ts.map +1 -1
  224. package/dist/ui/toast.js +195 -194
  225. package/dist/ui/toast.js.map +1 -1
  226. package/dist/ui/toggle.d.ts.map +1 -1
  227. package/dist/ui/toggle.js +24 -22
  228. package/dist/ui/toggle.js.map +1 -1
  229. package/dist/ui/tooltip.d.ts.map +1 -1
  230. package/dist/ui/tooltip.js +37 -36
  231. package/dist/ui/tooltip.js.map +1 -1
  232. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  233. package/docs/recipes/customize-brand.md +58 -0
  234. package/docs/recipes/install-astro.md +1 -1
  235. package/docs/recipes/install-next-app-router.md +1 -1
  236. package/docs/recipes/install-next-pages.md +22 -1
  237. package/docs/recipes/install-remix.md +1 -1
  238. package/docs/recipes/install-tanstack-start.md +1 -1
  239. package/docs/recipes/install-vite.md +2 -1
  240. package/docs/recipes/server-components.md +7 -4
  241. package/docs/recipes/troubleshoot.md +1 -0
  242. package/llms.txt +1 -1
  243. package/mcp-manifest.json +9 -4
  244. package/package.json +3 -2
  245. package/skill/SKILL.md +1 -1
  246. package/skill/references/components.md +1 -1
  247. package/skill/references/customize-brand.md +58 -0
  248. package/skill/references/server-components.md +7 -4
  249. package/skill/references/setup-astro.md +1 -1
  250. package/skill/references/setup-next-app-router.md +1 -1
  251. package/skill/references/setup-next-pages.md +22 -1
  252. package/skill/references/setup-remix.md +1 -1
  253. package/skill/references/setup-tanstack-start.md +1 -1
  254. package/skill/references/setup-vite.md +2 -1
  255. package/skill/references/troubleshoot.md +1 -0
  256. package/dist/motion/check-motion-provider.d.ts +0 -2
  257. package/dist/motion/check-motion-provider.d.ts.map +0 -1
  258. package/dist/motion/index.js.map +0 -1
@@ -41,10 +41,10 @@ Some components ship hard peers as optional. **Install BEFORE first import.**
41
41
  | When you import… | Install |
42
42
  |---|---|
43
43
  | `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
44
+ | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
44
45
  | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
45
46
  | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
46
47
  | `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
47
- | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
48
48
  | `@devalok/shilp-sutra/composed/rich-text-editor` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion` |
49
49
  | `@devalok/shilp-sutra/composed/schedule-view` | `pnpm add date-fns` |
50
50
  | `@devalok/shilp-sutra/ui/charts` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
@@ -47,10 +47,10 @@ Some components ship hard peers as optional. **Install BEFORE first import.**
47
47
  | When you import… | Install |
48
48
  |---|---|
49
49
  | `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
50
+ | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
50
51
  | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
51
52
  | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
52
53
  | `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
53
- | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
54
54
  | `@devalok/shilp-sutra/composed/rich-text-editor` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion` |
55
55
  | `@devalok/shilp-sutra/composed/schedule-view` | `pnpm add date-fns` |
56
56
  | `@devalok/shilp-sutra/ui/charts` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
@@ -137,6 +137,7 @@ export function ThemeToggle() {
137
137
 
138
138
  If you installed `sonner`, mount the Toaster once near the app root:
139
139
 
140
+ <!-- typecheck-skip: imports the reader's own App entry -->
140
141
  ```tsx
141
142
  // src/main.tsx
142
143
  import { StrictMode } from "react";
@@ -78,7 +78,7 @@ export function MyButton() {
78
78
  |---|---|
79
79
  | `ContentCard` | All other composed components become client islands when rendered |
80
80
  | `PageHeader` | |
81
- | `LoadingSkeleton` | |
81
+ | `CardSkeleton` / `TableSkeleton` / `BoardSkeleton` / `ListSkeleton` | |
82
82
  | `PageSkeletons` | |
83
83
 
84
84
  ### `@devalok/shilp-sutra/shell`
@@ -127,20 +127,23 @@ All shilp-sutra components SSR cleanly. They have no client-only side effects at
127
127
 
128
128
  Use `<Suspense>` boundaries normally:
129
129
 
130
+ <!-- typecheck-skip: ClientHeavyComponent is the reader's own component -->
130
131
  ```tsx
131
132
  import { Suspense } from "react";
132
- import { LoadingSkeleton } from "@devalok/shilp-sutra/composed/loading-skeleton";
133
+ import { CardSkeleton } from "@devalok/shilp-sutra/composed/loading-skeleton";
133
134
 
134
135
  export default function Page() {
135
136
  return (
136
- <Suspense fallback={<LoadingSkeleton variant="page" />}>
137
+ <Suspense fallback={<CardSkeleton />}>
137
138
  <ClientHeavyComponent />
138
139
  </Suspense>
139
140
  );
140
141
  }
141
142
  ```
142
143
 
143
- Both `<Suspense>` and `<LoadingSkeleton>` are server-safe.
144
+ Both `<Suspense>` and the skeletons are server-safe. The module exports
145
+ `CardSkeleton`, `TableSkeleton`, `BoardSkeleton` and `ListSkeleton` — pick the
146
+ one whose shape matches what is loading.
144
147
 
145
148
  ## Common RSC mistakes
146
149
 
@@ -91,6 +91,7 @@ After editing, delete the lockfile + `node_modules` and reinstall.
91
91
 
92
92
  Add:
93
93
 
94
+ <!-- typecheck-skip: a fragment of next.config, not a standalone module -->
94
95
  ```ts
95
96
  transpilePackages: ["@devalok/shilp-sutra"],
96
97
  ```
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.57.0.
3
+ > Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.59.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
@@ -2,7 +2,7 @@
2
2
  "$schema": "./mcp-manifest.schema.json",
3
3
  "manifestVersion": "1.2.0",
4
4
  "package": "@devalok/shilp-sutra",
5
- "packageVersion": "0.57.0",
5
+ "packageVersion": "0.59.0",
6
6
  "components": {
7
7
  "accordion": {
8
8
  "displayName": "Accordion",
@@ -14020,7 +14020,7 @@
14020
14020
  },
14021
14021
  {
14022
14022
  "name": "--color-segment-thumb",
14023
- "value": "var(--neutral-3)"
14023
+ "value": "var(--neutral-5)"
14024
14024
  },
14025
14025
  {
14026
14026
  "name": "--color-overlay",
@@ -14738,7 +14738,7 @@
14738
14738
  },
14739
14739
  {
14740
14740
  "name": "--shadow-segment",
14741
- "value": "0 1px 2px -0.5px oklch(var(--shadow-color) / calc(0.10 * var(--shadow-strength))), 0 3px 8px -2px oklch(var(--shadow-color) / calc(0.09 * var(--shadow-strength)))"
14741
+ "value": "0 0 0 1px oklch(1 0 0 / 0.07), 0 1px 2px -0.5px oklch(0 0 0 / 0.40), 0 3px 8px -2px oklch(0 0 0 / 0.30)"
14742
14742
  },
14743
14743
  {
14744
14744
  "name": "--shadow-floating",
@@ -14790,7 +14790,7 @@
14790
14790
  },
14791
14791
  {
14792
14792
  "name": "--shadow-kbd",
14793
- "value": "inset 0 -1px 0 oklch(0 0 0 / 0.1)"
14793
+ "value": "inset 0 1px 0 oklch(1 0 0 / 0.10)"
14794
14794
  },
14795
14795
  {
14796
14796
  "name": "--shadow-strength",
@@ -14802,6 +14802,11 @@
14802
14802
  "value": "0 0 0 1px oklch(var(--shadow-color) / calc(0.09 * var(--shadow-strength)))",
14803
14803
  "darkValue": "0 0 0 1px oklch(1 0 0 / 0.12)"
14804
14804
  },
14805
+ {
14806
+ "name": "--shadow-edge-ring-subtle",
14807
+ "value": "0 0 0 1px oklch(var(--shadow-color) / calc(0.035 * var(--shadow-strength)))",
14808
+ "darkValue": "0 0 0 1px oklch(1 0 0 / 0.07)"
14809
+ },
14805
14810
  {
14806
14811
  "name": "--shadow-color",
14807
14812
  "value": "0.15 0.015 260"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devalok/shilp-sutra",
3
- "version": "0.57.0",
3
+ "version": "0.59.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>",
@@ -1049,6 +1049,7 @@
1049
1049
  "typecheck": "tsc --noEmit",
1050
1050
  "lint": "eslint src/",
1051
1051
  "test": "vitest run",
1052
- "test:coverage": "vitest run --coverage"
1052
+ "test:coverage": "vitest run --coverage",
1053
+ "typecheck:docs": "node scripts/typecheck-doc-snippets.mjs --check"
1053
1054
  }
1054
1055
  }
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.57.0"
6
+ version: "0.59.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.57.0.
5
+ > Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.59.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
 
@@ -258,6 +258,64 @@ Every override should consider both modes. Pattern:
258
258
 
259
259
  `.dark` is a regular class selector — its specificity is higher than `:root`/`@theme` body, so dark-mode overrides win when the class is active.
260
260
 
261
+ ## High contrast (`[data-contrast]`)
262
+
263
+ WCAG 2.2 SC 1.4.11 asks for **3:1** between a control's edge and its background.
264
+ The default control edge here is **2.00:1** in light and **2.08:1** in dark — a
265
+ deliberately softer look, and deliberately under that bar. It is recorded as
266
+ `CONTROL-EDGE-BELOW-AA` in the deviations register.
267
+
268
+ Set `data-contrast="high"` to opt into edges that clear the threshold:
269
+
270
+ ```html
271
+ <!-- whole app -->
272
+ <html data-contrast="high">
273
+ ```
274
+
275
+ ```tsx
276
+ {/* or one region — a data-entry screen inside an otherwise soft product */}
277
+ <div data-contrast="high">
278
+ <InvoiceForm />
279
+ </div>
280
+ ```
281
+
282
+ | | control edge, light | control edge, dark |
283
+ |---|---|---|
284
+ | default | `#b7b7b7` — 2.00:1 | `#4c4c4c` — 2.08:1 |
285
+ | `data-contrast="high"` | `#868686` — **3.64:1** | `#767676` — **3.93:1** |
286
+
287
+ It affects Input, Textarea, Select, Combobox, Checkbox, Radio, Switch,
288
+ NumberInput and outlined Button — anything using the control-edge tier. It does
289
+ **not** touch decorative borders (card and panel hairlines stay soft), and it
290
+ does not touch the chromatic ramps, so an outlined Button on a colour is
291
+ unchanged.
292
+
293
+ Composes with everything else — it is a plain attribute, like `.dark` and
294
+ `data-shape`:
295
+
296
+ ```html
297
+ <html class="dark" data-shape="sharp" data-contrast="high">
298
+ ```
299
+
300
+ **Two things worth knowing.**
301
+
302
+ If you override the neutral ramp, high contrast follows automatically — the
303
+ block resolves `--neutral-8` / `--neutral-9` by name rather than hard-coding
304
+ hexes, so a rebrand gets a correctly-scaled high-contrast mode for free.
305
+
306
+ If you want the *opposite* — compliant edges everywhere, with no attribute to
307
+ remember — set the tokens directly and skip the attribute entirely:
308
+
309
+ ```css
310
+ :root {
311
+ --color-surface-border-interactive: var(--neutral-8);
312
+ --color-surface-border-interactive-strong: var(--neutral-9);
313
+ }
314
+ ```
315
+
316
+ That is worth considering. A default is what most products ship, so leaving the
317
+ attribute unset means shipping the edge that misses 1.4.11.
318
+
261
319
  ## Forced colors (Windows high-contrast)
262
320
 
263
321
  If you override semantic colors, the `@media (forced-colors: active)` block in `semantic.css` continues to remap to system keywords. Your override is ignored when the user is in high-contrast mode — this is the correct behavior.
@@ -80,7 +80,7 @@ export function MyButton() {
80
80
  |---|---|
81
81
  | `ContentCard` | All other composed components become client islands when rendered |
82
82
  | `PageHeader` | |
83
- | `LoadingSkeleton` | |
83
+ | `CardSkeleton` / `TableSkeleton` / `BoardSkeleton` / `ListSkeleton` | |
84
84
  | `PageSkeletons` | |
85
85
 
86
86
  ### `@devalok/shilp-sutra/shell`
@@ -129,20 +129,23 @@ All shilp-sutra components SSR cleanly. They have no client-only side effects at
129
129
 
130
130
  Use `<Suspense>` boundaries normally:
131
131
 
132
+ <!-- typecheck-skip: ClientHeavyComponent is the reader's own component -->
132
133
  ```tsx
133
134
  import { Suspense } from "react";
134
- import { LoadingSkeleton } from "@devalok/shilp-sutra/composed/loading-skeleton";
135
+ import { CardSkeleton } from "@devalok/shilp-sutra/composed/loading-skeleton";
135
136
 
136
137
  export default function Page() {
137
138
  return (
138
- <Suspense fallback={<LoadingSkeleton variant="page" />}>
139
+ <Suspense fallback={<CardSkeleton />}>
139
140
  <ClientHeavyComponent />
140
141
  </Suspense>
141
142
  );
142
143
  }
143
144
  ```
144
145
 
145
- Both `<Suspense>` and `<LoadingSkeleton>` are server-safe.
146
+ Both `<Suspense>` and the skeletons are server-safe. The module exports
147
+ `CardSkeleton`, `TableSkeleton`, `BoardSkeleton` and `ListSkeleton` — pick the
148
+ one whose shape matches what is loading.
146
149
 
147
150
  ## Common RSC mistakes
148
151
 
@@ -38,10 +38,10 @@ Some components ship hard peers as optional. **Install BEFORE first import.**
38
38
  | When you import… | Install |
39
39
  |---|---|
40
40
  | `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
41
+ | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
41
42
  | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
42
43
  | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
43
44
  | `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
44
- | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
45
45
  | `@devalok/shilp-sutra/composed/rich-text-editor` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion` |
46
46
  | `@devalok/shilp-sutra/composed/schedule-view` | `pnpm add date-fns` |
47
47
  | `@devalok/shilp-sutra/ui/charts` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
@@ -51,10 +51,10 @@ Some components depend on third-party libraries that ship as optional peers. **I
51
51
  | When you import… | Install |
52
52
  |---|---|
53
53
  | `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
54
+ | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
54
55
  | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
55
56
  | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
56
57
  | `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
57
- | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
58
58
  | `@devalok/shilp-sutra/composed/rich-text-editor` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion` |
59
59
  | `@devalok/shilp-sutra/composed/schedule-view` | `pnpm add date-fns` |
60
60
  | `@devalok/shilp-sutra/ui/charts` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
@@ -18,7 +18,28 @@ 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>`, `<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.
21
+ ### 2a. Optional peer dependencies (install only when importing the matching subpath)
22
+
23
+ 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.).
24
+
25
+ | When you import… | Install |
26
+ |---|---|
27
+ | `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
28
+ | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
29
+ | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
30
+ | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
31
+ | `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
32
+ | `@devalok/shilp-sutra/composed/rich-text-editor` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion` |
33
+ | `@devalok/shilp-sutra/composed/schedule-view` | `pnpm add date-fns` |
34
+ | `@devalok/shilp-sutra/ui/charts` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
35
+ | `@devalok/shilp-sutra/ui/data-table` | `pnpm add @tanstack/react-table @tanstack/react-virtual` |
36
+ | `@devalok/shilp-sutra/ui/data-table-toolbar` | `pnpm add @tanstack/react-table` |
37
+ | `@devalok/shilp-sutra/ui/input-otp` | `pnpm add input-otp` |
38
+ | `@devalok/shilp-sutra/ui/toast` | `pnpm add sonner` |
39
+ | `@devalok/shilp-sutra/ui/toaster` | `pnpm add sonner` |
40
+ | 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` |
41
+
42
+ > 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.
22
43
 
23
44
  ## 3. PostCSS
24
45
 
@@ -34,10 +34,10 @@ Some components ship hard peers as optional. **Install BEFORE first import.**
34
34
  | When you import… | Install |
35
35
  |---|---|
36
36
  | `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
37
+ | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
37
38
  | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
38
39
  | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
39
40
  | `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
40
- | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
41
41
  | `@devalok/shilp-sutra/composed/rich-text-editor` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion` |
42
42
  | `@devalok/shilp-sutra/composed/schedule-view` | `pnpm add date-fns` |
43
43
  | `@devalok/shilp-sutra/ui/charts` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
@@ -43,10 +43,10 @@ Some components ship hard peers as optional. **Install BEFORE first import.**
43
43
  | When you import… | Install |
44
44
  |---|---|
45
45
  | `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
46
+ | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
46
47
  | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
47
48
  | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
48
49
  | `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
49
- | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
50
50
  | `@devalok/shilp-sutra/composed/rich-text-editor` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion` |
51
51
  | `@devalok/shilp-sutra/composed/schedule-view` | `pnpm add date-fns` |
52
52
  | `@devalok/shilp-sutra/ui/charts` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
@@ -49,10 +49,10 @@ Some components ship hard peers as optional. **Install BEFORE first import.**
49
49
  | When you import… | Install |
50
50
  |---|---|
51
51
  | `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
52
+ | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
52
53
  | `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
53
54
  | `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
54
55
  | `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
55
- | `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
56
56
  | `@devalok/shilp-sutra/composed/rich-text-editor` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion` |
57
57
  | `@devalok/shilp-sutra/composed/schedule-view` | `pnpm add date-fns` |
58
58
  | `@devalok/shilp-sutra/ui/charts` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
@@ -139,6 +139,7 @@ export function ThemeToggle() {
139
139
 
140
140
  If you installed `sonner`, mount the Toaster once near the app root:
141
141
 
142
+ <!-- typecheck-skip: imports the reader's own App entry -->
142
143
  ```tsx
143
144
  // src/main.tsx
144
145
  import { StrictMode } from "react";
@@ -93,6 +93,7 @@ After editing, delete the lockfile + `node_modules` and reinstall.
93
93
 
94
94
  Add:
95
95
 
96
+ <!-- typecheck-skip: a fragment of next.config, not a standalone module -->
96
97
  ```ts
97
98
  transpilePackages: ["@devalok/shilp-sutra"],
98
99
  ```
@@ -1,2 +0,0 @@
1
- export declare function checkMotionProvider(): void;
2
- //# sourceMappingURL=check-motion-provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"check-motion-provider.d.ts","sourceRoot":"","sources":["../../src/motion/check-motion-provider.ts"],"names":[],"mappings":"AAWA,wBAAgB,mBAAmB,IAAI,IAAI,CAiB1C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/motion/check-motion-provider.ts","../../src/motion/index.ts"],"sourcesContent":["/**\n * Dev-mode hint for missing MotionProvider.\n *\n * If the consumer hasn't wrapped their app in <MotionProvider>, Framer Motion\n * animations still work but reduced-motion preferences won't propagate through\n * MotionConfig. This check emits a one-time console.info in dev mode.\n *\n * Only runs once, only in development, only in the browser.\n */\nlet checked = false\n\nexport function checkMotionProvider(): void {\n if (checked) return\n if (typeof window === 'undefined') return\n\n // Skip in production\n try {\n // @ts-expect-error -- import.meta.env is Vite-specific, not in base TS lib\n if (import.meta.env?.PROD) return\n } catch { /* not in Vite */ }\n\n checked = true\n\n // eslint-disable-next-line no-console\n console.info(\n '[shilp-sutra] Tip: Wrap your app in <MotionProvider> for reduced-motion support ' +\n 'across all shilp-sutra animations. See https://www.npmjs.com/package/@devalok/shilp-sutra',\n )\n}\n","export { motionProps, type SpringPreset, springs, stagger, type TweenPreset,tweens, withReducedMotion } from '../ui/lib/motion'\nexport { MotionProvider, type MotionProviderProps,useMotion } from './motion-provider'\n\nimport { checkMotionProvider } from './check-motion-provider'\ncheckMotionProvider()\n"],"mappings":";;;AASA,IAAI,IAAU;AAEd,SAAgB,IAA4B;CACtC,UACA,SAAO,SAAW,MAGtB;MAAI;GAEyB;EAC7B,QAAQ,CAAoB;EAK5B,AAHA,IAAU,IAGV,QAAQ,KACN,2KAEF;CAR4B;AAS9B;;;ACxBA,EAAoB"}