@devalok/shilp-sutra 0.37.1 → 0.39.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 (260) hide show
  1. package/MIGRATION.md +185 -0
  2. package/dist/_chunks/badge-group.js +4 -4
  3. package/dist/_chunks/badge-group.js.map +1 -1
  4. package/dist/_chunks/chat.js +14 -14
  5. package/dist/_chunks/chat.js.map +1 -1
  6. package/dist/_chunks/date-picker.js +9 -9
  7. package/dist/_chunks/date-picker.js.map +1 -1
  8. package/dist/_chunks/document-preview.js +2 -2
  9. package/dist/_chunks/document-preview.js.map +1 -1
  10. package/dist/_chunks/file-preview.js +11 -11
  11. package/dist/_chunks/file-preview.js.map +1 -1
  12. package/dist/_chunks/image-preview.js +2 -2
  13. package/dist/_chunks/image-preview.js.map +1 -1
  14. package/dist/_chunks/mention-suggestion.js +5 -5
  15. package/dist/_chunks/mention-suggestion.js.map +1 -1
  16. package/dist/_chunks/popover.js +3 -3
  17. package/dist/_chunks/popover.js.map +1 -1
  18. package/dist/_chunks/rich-chat-input.js +33 -33
  19. package/dist/_chunks/rich-chat-input.js.map +1 -1
  20. package/dist/_chunks/shared.js +5 -5
  21. package/dist/_chunks/shared.js.map +1 -1
  22. package/dist/_chunks/text.js +2 -2
  23. package/dist/_chunks/text.js.map +1 -1
  24. package/dist/_chunks/tiptap.js +977 -968
  25. package/dist/_chunks/tiptap.js.map +1 -1
  26. package/dist/_chunks/tree-view.js +1 -1
  27. package/dist/_chunks/tree-view.js.map +1 -1
  28. package/dist/_chunks/use-calendar.js +5 -5
  29. package/dist/_chunks/use-calendar.js.map +1 -1
  30. package/dist/ai/command-bar.js +10 -10
  31. package/dist/ai/command-bar.js.map +1 -1
  32. package/dist/ai/conversation.js +4 -4
  33. package/dist/ai/conversation.js.map +1 -1
  34. package/dist/composed/activity-feed.js +5 -5
  35. package/dist/composed/activity-feed.js.map +1 -1
  36. package/dist/composed/avatar-group.js +4 -4
  37. package/dist/composed/avatar-group.js.map +1 -1
  38. package/dist/composed/bulk-action-bar.js +1 -1
  39. package/dist/composed/bulk-action-bar.js.map +1 -1
  40. package/dist/composed/command-palette.js +5 -5
  41. package/dist/composed/command-palette.js.map +1 -1
  42. package/dist/composed/content-card.js +1 -1
  43. package/dist/composed/content-card.js.map +1 -1
  44. package/dist/composed/emoji-picker.js +4 -4
  45. package/dist/composed/emoji-picker.js.map +1 -1
  46. package/dist/composed/empty-state.js +1 -1
  47. package/dist/composed/empty-state.js.map +1 -1
  48. package/dist/composed/error-boundary.js +3 -3
  49. package/dist/composed/error-boundary.js.map +1 -1
  50. package/dist/composed/filter-bar.js +1 -1
  51. package/dist/composed/filter-bar.js.map +1 -1
  52. package/dist/composed/index.d.ts +0 -2
  53. package/dist/composed/index.d.ts.map +1 -1
  54. package/dist/composed/index.js +5 -6
  55. package/dist/composed/inline-edit.js +1 -1
  56. package/dist/composed/inline-edit.js.map +1 -1
  57. package/dist/composed/loading-skeleton.js +9 -9
  58. package/dist/composed/loading-skeleton.js.map +1 -1
  59. package/dist/composed/markdown-viewer.js +3 -3
  60. package/dist/composed/markdown-viewer.js.map +1 -1
  61. package/dist/composed/multi-select-popover.js +1 -1
  62. package/dist/composed/multi-select-popover.js.map +1 -1
  63. package/dist/composed/page-header.js +1 -1
  64. package/dist/composed/page-header.js.map +1 -1
  65. package/dist/composed/page-skeletons.js +15 -15
  66. package/dist/composed/page-skeletons.js.map +1 -1
  67. package/dist/composed/priority-indicator.js +3 -3
  68. package/dist/composed/priority-indicator.js.map +1 -1
  69. package/dist/composed/rich-text-editor.js +11 -11
  70. package/dist/composed/rich-text-editor.js.map +1 -1
  71. package/dist/composed/schedule-view.js +3 -3
  72. package/dist/composed/schedule-view.js.map +1 -1
  73. package/dist/composed/status-badge.js +3 -3
  74. package/dist/composed/status-badge.js.map +1 -1
  75. package/dist/hooks/index.d.ts +2 -2
  76. package/dist/hooks/index.d.ts.map +1 -1
  77. package/dist/hooks/index.js +0 -1
  78. package/dist/shell/bottom-navbar.js +6 -6
  79. package/dist/shell/bottom-navbar.js.map +1 -1
  80. package/dist/shell/notification-center.js +8 -8
  81. package/dist/shell/notification-center.js.map +1 -1
  82. package/dist/shell/notification-preferences.js +1 -1
  83. package/dist/shell/notification-preferences.js.map +1 -1
  84. package/dist/shell/sidebar.js +6 -6
  85. package/dist/shell/sidebar.js.map +1 -1
  86. package/dist/shell/top-bar.js +4 -4
  87. package/dist/shell/top-bar.js.map +1 -1
  88. package/dist/tokens/semantic.css +82 -9
  89. package/dist/ui/accordion.js +1 -1
  90. package/dist/ui/accordion.js.map +1 -1
  91. package/dist/ui/alert-dialog.js +3 -3
  92. package/dist/ui/alert-dialog.js.map +1 -1
  93. package/dist/ui/alert.d.ts +1 -2
  94. package/dist/ui/alert.d.ts.map +1 -1
  95. package/dist/ui/alert.js +3 -29
  96. package/dist/ui/alert.js.map +1 -1
  97. package/dist/ui/autocomplete.js +2 -2
  98. package/dist/ui/autocomplete.js.map +1 -1
  99. package/dist/ui/avatar.js +11 -11
  100. package/dist/ui/avatar.js.map +1 -1
  101. package/dist/ui/badge-indicator.js +1 -1
  102. package/dist/ui/badge-indicator.js.map +1 -1
  103. package/dist/ui/banner.d.ts +3 -5
  104. package/dist/ui/banner.d.ts.map +1 -1
  105. package/dist/ui/banner.js +14 -14
  106. package/dist/ui/banner.js.map +1 -1
  107. package/dist/ui/breadcrumb.js +1 -1
  108. package/dist/ui/breadcrumb.js.map +1 -1
  109. package/dist/ui/button.d.ts +2 -2
  110. package/dist/ui/button.js +14 -14
  111. package/dist/ui/button.js.map +1 -1
  112. package/dist/ui/card.js +5 -5
  113. package/dist/ui/card.js.map +1 -1
  114. package/dist/ui/charts/index.js +5 -5
  115. package/dist/ui/charts/index.js.map +1 -1
  116. package/dist/ui/checkbox.js +1 -1
  117. package/dist/ui/checkbox.js.map +1 -1
  118. package/dist/ui/code.js +2 -2
  119. package/dist/ui/code.js.map +1 -1
  120. package/dist/ui/color-input.js +10 -10
  121. package/dist/ui/color-input.js.map +1 -1
  122. package/dist/ui/color-swatch.js +3 -3
  123. package/dist/ui/color-swatch.js.map +1 -1
  124. package/dist/ui/combobox.js +5 -5
  125. package/dist/ui/combobox.js.map +1 -1
  126. package/dist/ui/context-menu.js +6 -6
  127. package/dist/ui/context-menu.js.map +1 -1
  128. package/dist/ui/data-table-body.js +1 -1
  129. package/dist/ui/data-table-body.js.map +1 -1
  130. package/dist/ui/data-table-bulk-actions.js +2 -2
  131. package/dist/ui/data-table-bulk-actions.js.map +1 -1
  132. package/dist/ui/data-table-card.js +2 -2
  133. package/dist/ui/data-table-card.js.map +1 -1
  134. package/dist/ui/data-table-header.js +2 -2
  135. package/dist/ui/data-table-header.js.map +1 -1
  136. package/dist/ui/data-table-pagination.js +3 -3
  137. package/dist/ui/data-table-pagination.js.map +1 -1
  138. package/dist/ui/data-table-toolbar.js +1 -1
  139. package/dist/ui/data-table-toolbar.js.map +1 -1
  140. package/dist/ui/data-table.js +1 -1
  141. package/dist/ui/data-table.js.map +1 -1
  142. package/dist/ui/devalok-grain.d.ts +1 -1
  143. package/dist/ui/devalok-grain.js.map +1 -1
  144. package/dist/ui/dialog.js +2 -2
  145. package/dist/ui/dialog.js.map +1 -1
  146. package/dist/ui/dropdown-menu.js +6 -6
  147. package/dist/ui/dropdown-menu.js.map +1 -1
  148. package/dist/ui/file-upload.js +4 -4
  149. package/dist/ui/file-upload.js.map +1 -1
  150. package/dist/ui/hover-card.js +1 -1
  151. package/dist/ui/hover-card.js.map +1 -1
  152. package/dist/ui/icon-button.js +1 -1
  153. package/dist/ui/icon-button.js.map +1 -1
  154. package/dist/ui/index.d.ts +1 -1
  155. package/dist/ui/index.d.ts.map +1 -1
  156. package/dist/ui/index.js +2 -2
  157. package/dist/ui/index.js.map +1 -1
  158. package/dist/ui/input-otp.js +1 -1
  159. package/dist/ui/input-otp.js.map +1 -1
  160. package/dist/ui/input.d.ts +1 -9
  161. package/dist/ui/input.d.ts.map +1 -1
  162. package/dist/ui/input.js +28 -29
  163. package/dist/ui/input.js.map +1 -1
  164. package/dist/ui/link.js +1 -1
  165. package/dist/ui/link.js.map +1 -1
  166. package/dist/ui/menubar.js +8 -8
  167. package/dist/ui/menubar.js.map +1 -1
  168. package/dist/ui/navigation-menu.js +3 -3
  169. package/dist/ui/navigation-menu.js.map +1 -1
  170. package/dist/ui/number-input.js +3 -3
  171. package/dist/ui/number-input.js.map +1 -1
  172. package/dist/ui/pagination.js +1 -1
  173. package/dist/ui/pagination.js.map +1 -1
  174. package/dist/ui/progress.js +1 -1
  175. package/dist/ui/progress.js.map +1 -1
  176. package/dist/ui/radio.js +1 -1
  177. package/dist/ui/radio.js.map +1 -1
  178. package/dist/ui/segmented-control.d.ts +1 -1
  179. package/dist/ui/segmented-control.d.ts.map +1 -1
  180. package/dist/ui/segmented-control.js +5 -7
  181. package/dist/ui/segmented-control.js.map +1 -1
  182. package/dist/ui/select.js +3 -3
  183. package/dist/ui/select.js.map +1 -1
  184. package/dist/ui/sheet.js +2 -2
  185. package/dist/ui/sheet.js.map +1 -1
  186. package/dist/ui/sidebar.js +11 -11
  187. package/dist/ui/sidebar.js.map +1 -1
  188. package/dist/ui/skeleton.js +9 -9
  189. package/dist/ui/skeleton.js.map +1 -1
  190. package/dist/ui/slider.js +2 -2
  191. package/dist/ui/slider.js.map +1 -1
  192. package/dist/ui/split-button.js +7 -7
  193. package/dist/ui/split-button.js.map +1 -1
  194. package/dist/ui/stat-card.js +7 -7
  195. package/dist/ui/stat-card.js.map +1 -1
  196. package/dist/ui/status-dot.js +2 -2
  197. package/dist/ui/status-dot.js.map +1 -1
  198. package/dist/ui/stepper.js +2 -2
  199. package/dist/ui/stepper.js.map +1 -1
  200. package/dist/ui/switch.js +2 -2
  201. package/dist/ui/switch.js.map +1 -1
  202. package/dist/ui/tabs.js +3 -3
  203. package/dist/ui/tabs.js.map +1 -1
  204. package/dist/ui/textarea.js +1 -1
  205. package/dist/ui/textarea.js.map +1 -1
  206. package/dist/ui/toast.js +8 -8
  207. package/dist/ui/toast.js.map +1 -1
  208. package/dist/ui/toggle.js +1 -1
  209. package/dist/ui/toggle.js.map +1 -1
  210. package/dist/ui/tooltip.js +1 -1
  211. package/dist/ui/tooltip.js.map +1 -1
  212. package/docs/components/_header.md +91 -2
  213. package/docs/components/ui/alert.md +4 -1
  214. package/docs/components/ui/banner.md +3 -1
  215. package/docs/components/ui/input.md +4 -2
  216. package/docs/components/ui/segmented-control.md +13 -6
  217. package/docs/recipes/customize-brand.md +297 -0
  218. package/docs/recipes/index.md +51 -0
  219. package/docs/recipes/install-astro.md +178 -0
  220. package/docs/recipes/install-next-app-router.md +230 -0
  221. package/docs/recipes/install-next-pages.md +123 -0
  222. package/docs/recipes/install-remix.md +171 -0
  223. package/docs/recipes/install-tanstack-start.md +143 -0
  224. package/docs/recipes/install-vite.md +170 -0
  225. package/docs/recipes/server-components.md +209 -0
  226. package/docs/recipes/troubleshoot.md +217 -0
  227. package/llms-full.txt +116 -54
  228. package/llms.txt +42 -17
  229. package/package.json +46 -35
  230. package/skill/README.md +99 -0
  231. package/skill/SKILL.md +144 -0
  232. package/skill/install.sh +59 -0
  233. package/skill/references/components-full.md +6997 -0
  234. package/skill/references/components.md +673 -0
  235. package/skill/references/customize-brand.md +299 -0
  236. package/skill/references/server-components.md +211 -0
  237. package/skill/references/setup-astro.md +180 -0
  238. package/skill/references/setup-next-app-router.md +232 -0
  239. package/skill/references/setup-next-pages.md +125 -0
  240. package/skill/references/setup-remix.md +173 -0
  241. package/skill/references/setup-tanstack-start.md +145 -0
  242. package/skill/references/setup-vite.md +172 -0
  243. package/skill/references/troubleshoot.md +219 -0
  244. package/dist/composed/responsive-overlay.d.ts +0 -23
  245. package/dist/composed/responsive-overlay.d.ts.map +0 -1
  246. package/dist/composed/responsive-overlay.js +0 -40
  247. package/dist/composed/responsive-overlay.js.map +0 -1
  248. package/dist/hooks/use-toast.d.ts +0 -17
  249. package/dist/hooks/use-toast.d.ts.map +0 -1
  250. package/dist/hooks/use-toast.js +0 -3
  251. package/dist/tailwind/index.cjs +0 -41
  252. package/dist/tailwind/index.d.ts +0 -2
  253. package/dist/tailwind/index.d.ts.map +0 -1
  254. package/dist/tailwind/index.js +0 -2
  255. package/dist/tailwind/preset.d.ts +0 -25
  256. package/dist/tailwind/preset.d.ts.map +0 -1
  257. package/dist/tailwind/preset.js +0 -17
  258. package/dist/tailwind/preset.js.map +0 -1
  259. package/docs/components/composed/responsive-overlay.md +0 -41
  260. /package/{LICENSE → skill/LICENSE} +0 -0
package/llms-full.txt CHANGED
@@ -5,7 +5,7 @@
5
5
  > All variant values and props verified from source CVA definitions.
6
6
  >
7
7
  > Package: @devalok/shilp-sutra
8
- > Version: 0.37.1
8
+ > Version: 0.39.0
9
9
  >
10
10
  > **If you are an AI agent reading this file top-to-bottom:** the Setup
11
11
  > section below is authoritative. If any later per-component doc or a
@@ -39,7 +39,7 @@ pnpm add sonner
39
39
  transpilePackages: ['@devalok/shilp-sutra', '@devalok/shilp-sutra-brand'],
40
40
  ```
41
41
 
42
- **Do NOT** import `@devalok/shilp-sutra/tailwind` in a `tailwind.config.ts`. That export is a deprecated no-op stub and logs a dev-mode `console.warn`. It is scheduled for removal in 0.38.
42
+ **Do NOT** import `@devalok/shilp-sutra/tailwind`. That export was removed in 0.38.0. Use the CSS-first setup (`@import "tailwindcss"; @import "@devalok/shilp-sutra/css";`) — no `tailwind.config.ts` is required.
43
43
 
44
44
  ### Peer dependencies (0.37.0)
45
45
 
@@ -67,7 +67,8 @@ transpilePackages: ['@devalok/shilp-sutra', '@devalok/shilp-sutra-brand'],
67
67
  | `--leading-ds-*` | `leading-ds-tight`, `leading-ds-normal` | ds-namespaced |
68
68
  | `--tracking-*` | `tracking-tight`, `tracking-normal` | standard TW namespace |
69
69
  | `--font-*`, `--font-weight-*` | `font-sans`, `font-semibold` | standard TW namespace |
70
- | `--radius`, `--radius-ds-*` | `rounded` (bare), `rounded-ds-lg` | unprefixed + ds-namespaced |
70
+ | `--radius`, `--radius-ds-*` | `rounded` (bare), `rounded-ds-lg` | unprefixed + ds-namespaced primitive scale |
71
+ | `--radius-control`, `--radius-surface`, `--radius-overlay-*`, `--radius-pill`, `--radius-bubble` | `rounded-control`, `rounded-surface`, `rounded-overlay`, `rounded-pill`, `rounded-bubble` | semantic roles (PUBLIC) — components reference these, `[data-shape]` presets remap them |
71
72
  | `--shadow-*` | `shadow-raised`, `shadow-overlay` | semantic names only; bare `shadow` is NOT generated (TW4 has no default scale and we don't define `--shadow`) |
72
73
  | `--ease-*` | `ease-productive-standard` | semantic names |
73
74
  | `--breakpoint-*` | `md:`, `lg:` | standard TW namespace |
@@ -105,6 +106,94 @@ See `MIGRATION.md#v0370--tailwind-4-css-first-migration` (root of this package).
105
106
 
106
107
  ---
107
108
 
109
+ ## Shape Presets & Radius Roles (v0.39+)
110
+
111
+ Radius has TWO layers:
112
+
113
+ 1. **Primitive scale** — `--radius-ds-sm/md/lg/xl/2xl/full` (private; internal building blocks).
114
+ 2. **Semantic roles** — `--radius-control`, `--radius-control-inner`, `--radius-surface`, `--radius-overlay-sm/md/lg`, `--radius-pill`, `--radius-bubble`. Components reference roles. Consumers customize these.
115
+
116
+ ### Role token reference
117
+
118
+ | Token | Default (px) | Utility class | Used by |
119
+ |--------------------------|--------------|--------------------------|---------|
120
+ | `--radius-control` | 6 | `rounded-control` | Button, Input, Select, Combobox, Autocomplete, NumberInput, Toggle, ToggleGroup, Tabs trigger (contained), menu items, sidebar menu button, stepper, pagination, code block, InputOTP slot |
121
+ | `--radius-control-inner` | 2 | `rounded-control-inner` | Checkbox box, +/− buttons, close X buttons, focus rings on text links, small badges, color preset swatches, skeleton text bars, inline Code |
122
+ | `--radius-surface` | 10 | `rounded-surface` | Card, StatCard, DataTableCard, Alert, Accordion trigger, FileUpload dropzone, Tabs list (contained) |
123
+ | `--radius-overlay-sm` | 6 | `rounded-overlay-sm` | Tooltip, Toast, charts internal tooltip |
124
+ | `--radius-overlay` | 10 | `rounded-overlay` | Popover, HoverCard, DropdownMenu / ContextMenu / Menubar content, Select / Combobox / Autocomplete listbox, NavigationMenu viewport, DataTable bulk-actions toolbar, SplitButton dropdown |
125
+ | `--radius-overlay-lg` | 16 | `rounded-overlay-lg` | Dialog, AlertDialog, Sheet (top corners), BottomSheet, ColorInput picker panel, ChatMessageInput wrapper, Sidebar inset variant |
126
+ | `--radius-pill` | 9999 | `rounded-pill` | Badge, BadgeIndicator, StatusDot, Radio, Switch, Slider, Progress, Avatar circle, SegmentedControl item, ChatMessage reaction button, drag handles |
127
+ | `--radius-bubble` | 24 | `rounded-bubble` | ChatMessage bubble |
128
+
129
+ Bare `rounded-ds-*` and `rounded-full` are BANNED in components (enforced by pre-publish audit gate). Token-showcase stories (`forced-colors.stories.tsx`, `FoundationsShowcase.tsx`) are explicitly allowlisted.
130
+
131
+ ### Shape presets — `[data-shape]`
132
+
133
+ Apply to `<html>`, app root, or any subtree. Three presets ship by default:
134
+
135
+ | Preset | control / control-inner | surface | overlay-sm / overlay / overlay-lg | bubble | Feel |
136
+ |---|---|---|---|---|---|
137
+ | `sharp` | 2 / 0 | 4 | 2 / 4 / 6 | 8 | Vercel / Linear / dev-tool |
138
+ | `slightly-rounded` (default) | 6 / 2 | 10 | 6 / 10 / 16 | 24 | shadcn / Stripe / Notion sidebar |
139
+ | `rounded` | 10 / 4 | 16 | 10 / 16 / 24 | 32 | iOS / Notion content / consumer |
140
+
141
+ ```html
142
+ <!-- Whole-app preset -->
143
+ <html data-shape="sharp">
144
+
145
+ <!-- Or scoped per subtree -->
146
+ <div data-shape="rounded">...</div>
147
+ ```
148
+
149
+ `--radius-pill` stays `9999px` in every preset by design — pill shapes are shape-by-meaning, not shape-by-style.
150
+
151
+ ### Per-token consumer overrides
152
+
153
+ Override any role globally or scoped:
154
+
155
+ ```css
156
+ :root { --radius-control: 4px; } /* tighten controls only */
157
+ .checkout { --radius-control: 8px; --radius-surface: 20px; } /* per-subtree */
158
+ [data-shape="rounded"] .admin { --radius-control: 6px; } /* extend a preset */
159
+ ```
160
+
161
+ ### Custom preset
162
+
163
+ ```css
164
+ [data-shape="brand-soft"] {
165
+ --radius-control: 8px;
166
+ --radius-control-inner: 3px;
167
+ --radius-surface: 14px;
168
+ --radius-overlay-sm: 8px;
169
+ --radius-overlay: 14px;
170
+ --radius-overlay-lg: 20px;
171
+ --radius-pill: 9999px;
172
+ --radius-bubble: 28px;
173
+ }
174
+ ```
175
+
176
+ ```html
177
+ <html data-shape="brand-soft">
178
+ ```
179
+
180
+ ### Migration from `rounded-ds-*` / `rounded-full`
181
+
182
+ ```diff
183
+ - className="rounded-ds-md ..." → + className="rounded-control ..."
184
+ - className="rounded-ds-lg ..." → + className="rounded-surface ..." /* card/panel context */
185
+ - className="rounded-ds-lg ..." → + className="rounded-overlay ..." /* popover/dropdown context */
186
+ - className="rounded-ds-xl ..." → + className="rounded-overlay-lg ..." /* dialog/sheet */
187
+ - className="rounded-ds-2xl ..." → + className="rounded-bubble ..."
188
+ - className="rounded-ds-sm ..." → + className="rounded-control-inner ..."
189
+ - className="rounded-ds-full ..." → + className="rounded-pill ..."
190
+ - className="rounded-full ..." → + className="rounded-pill ..."
191
+ ```
192
+
193
+ Re-runnable codemod: `scripts/migrate-radius-roles.mjs` (dry-run by default, `--write` to apply).
194
+
195
+ ---
196
+
108
197
  ## Architecture Notes
109
198
 
110
199
  ### The Two-Axis Variant System
@@ -256,7 +345,7 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
256
345
  - Category: ui
257
346
 
258
347
  ## Props
259
- variant: "subtle" | "solid" | "outline" | "filled" (deprecated alias for "solid")
348
+ variant: "subtle" | "solid" | "outline"
260
349
  color: "info" | "success" | "warning" | "error" | "neutral"
261
350
  size: "sm" | "md" | "lg"
262
351
  title: string (optional)
@@ -287,6 +376,9 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
287
376
  - Icon is auto-selected by color (info=circle, success=check, warning=triangle, error=alert)
288
377
 
289
378
  ## Changes
379
+ ### v0.38.0
380
+ - **Removed** (BREAKING) `variant="filled"` deprecated alias. Use `variant="solid"`.
381
+
290
382
  ### v0.31.0
291
383
  - **Added** `size` prop: `sm | md | lg`. Default `md` (non-breaking).
292
384
 
@@ -722,7 +814,6 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
722
814
  ## Props
723
815
  color: "info" | "success" | "warning" | "error" | "neutral"
724
816
  actions: ReactNode (optional action slot for one or more buttons; wraps on narrow viewports)
725
- action: ReactNode (DEPRECATED — use `actions` instead)
726
817
  onDismiss: () => void (optional, shows X button)
727
818
  children: ReactNode (message text)
728
819
 
@@ -749,6 +840,9 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
749
840
  - `onDismiss` fires after the exit animation completes, not immediately on dismiss button click
750
841
 
751
842
  ## Changes
843
+ ### v0.38.0
844
+ - **Removed** (BREAKING) deprecated singular `action` prop. Use `actions={[...]}` (plural).
845
+
752
846
  ### v0.20.0
753
847
  - **Added** `actions` prop (plural) for multiple action buttons with mobile-friendly flex-wrap
754
848
  - **Deprecated** `action` prop — use `actions` instead (both still work; `actions` takes priority)
@@ -2576,8 +2670,6 @@ const { size, stroke } = useIconContext()
2576
2670
  startSectionType: 'icon' | 'label' (section display type — auto-inferred from content)
2577
2671
  endSectionType: 'icon' | 'label' (section display type — auto-inferred from content)
2578
2672
  wrapperClassName: string (classes for the wrapper div — border, bg, ring)
2579
- startIcon: ReactNode (@deprecated — use startSection)
2580
- endIcon: ReactNode (@deprecated — use endSection)
2581
2673
  (plus all standard HTML input attributes except native "size")
2582
2674
 
2583
2675
  ## Types
@@ -2612,6 +2704,10 @@ const { size, stroke } = useIconContext()
2612
2704
  - Section type is auto-inferred: strings default to `'label'` (tinted bg + border), React elements default to `'icon'` (fixed-width centered). Override with `startSectionType`/`endSectionType`.
2613
2705
 
2614
2706
  ## Changes
2707
+ ### v0.38.0
2708
+ - **Removed** (BREAKING) deprecated `startIcon` / `endIcon` props. Use `startSection` / `endSection`.
2709
+ - **Removed** (BREAKING) deprecated `inputVariants` export. Use `inputWrapperVariants`.
2710
+
2615
2711
  ### v0.29.0
2616
2712
  - **Changed** v2 rewrite: container-first architecture with wrapper div holding focus ring
2617
2713
  - **Added** `xs` size (28px height)
@@ -3239,8 +3335,8 @@ const { size, stroke } = useIconContext()
3239
3335
  - Category: ui
3240
3336
 
3241
3337
  ## Props
3242
- size: "sm" | "md" | "lg" (REQUIRED) — also accepts legacy "small" | "medium" | "big"
3243
- variant: "filled" | "tonal" (REQUIRED)
3338
+ size: "sm" | "md" | "lg"
3339
+ variant: "default" | "solid"
3244
3340
  options: SegmentedControlOption[] (REQUIRED)
3245
3341
  selectedId: string (REQUIRED)
3246
3342
  onSelect: (id: string) => void (REQUIRED)
@@ -3248,14 +3344,18 @@ const { size, stroke } = useIconContext()
3248
3344
 
3249
3345
  ## Types
3250
3346
  SegmentedControlOption = { id: string, text: string, icon?: ComponentType<{ className?: string }> }
3251
- SegmentedControlSize = 'sm' | 'md' | 'lg' | 'small' | 'medium' | 'big' (legacy aliases)
3252
- SegmentedControlVariant = 'filled' | 'tonal'
3347
+ SegmentedControlSize = 'sm' | 'md' | 'lg'
3348
+ SegmentedControlVariant = 'default' | 'solid'
3349
+
3350
+ ## Defaults
3351
+ size: "md"
3352
+ variant: "default"
3253
3353
 
3254
3354
  ## Example
3255
3355
  ```jsx
3256
3356
  <SegmentedControl
3257
3357
  size="md"
3258
- variant="tonal"
3358
+ variant="default"
3259
3359
  options={[
3260
3360
  { id: 'list', text: 'List' },
3261
3361
  { id: 'grid', text: 'Grid' },
@@ -3278,11 +3378,14 @@ const { size, stroke } = useIconContext()
3278
3378
  - Use Tabs (not SegmentedControl) when you need associated content panels per option
3279
3379
 
3280
3380
  ## Changes
3381
+ ### v0.38.0
3382
+ - **Removed** (BREAKING) deprecated `variant="accent"` alias. Use `variant="solid"`.
3383
+
3281
3384
  ### v0.18.0
3282
3385
  - **Fixed** `bg-interactive` changed to `bg-accent-9`, `bg-field` changed to `bg-surface-3` (OKLCH migration)
3283
3386
 
3284
3387
  ### v0.4.2
3285
- - **Changed** (BREAKING) `color` prop renamed to `variant` (values `filled`/`tonal` unchanged)
3388
+ - **Changed** (BREAKING) `color` prop renamed to `variant`
3286
3389
 
3287
3390
  ### v0.1.1
3288
3391
  - **Fixed** `tabIndex={0}` changed to `tabIndex={-1}` on tablist wrapper — fixes double-focus keyboard navigation bug
@@ -5932,47 +6035,6 @@ Priority = 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT' | 'low' | 'medium' | 'high' | 'u
5932
6035
 
5933
6036
  ### v0.1.0
5934
6037
  - **Added** Initial release
5935
- # ResponsiveOverlay
5936
-
5937
- - Import: @devalok/shilp-sutra/composed/responsive-overlay
5938
- - Server-safe: No
5939
- - Category: composed
5940
-
5941
- ## Props
5942
- open: boolean
5943
- onOpenChange: (open: boolean) => void
5944
- title: string
5945
- description: string
5946
- breakpoint: "sm" | "md" (below this renders as bottom Sheet; above as Dialog)
5947
- children: ReactNode
5948
- className: string
5949
-
5950
- ## Defaults
5951
- breakpoint="md"
5952
-
5953
- ## Example
5954
- ```jsx
5955
- <ResponsiveOverlay
5956
- open={open}
5957
- onOpenChange={setOpen}
5958
- title="Edit task"
5959
- description="Update the task details"
5960
- >
5961
- <TaskForm />
5962
- </ResponsiveOverlay>
5963
- ```
5964
-
5965
- ## Composability
5966
- - **One component, two containers.** Above `breakpoint`: centered Dialog. Below: bottom-anchored Sheet. Same content slot, different surface treatment per viewport.
5967
- - **Standard controlled model** — `open` + `onOpenChange` (same shape as Dialog/Sheet).
5968
- - **title + description pattern** — matches Dialog/Sheet's requirement for an accessible heading. Omit both only when the surrounding context makes the purpose obvious (rare).
5969
- - **SSR caveat:** `window.matchMedia` reads on mount — initial SSR render defaults to desktop (Dialog). Hydration flips to Sheet on mobile. Acceptable for most flows; visible layout shift on low-spec devices.
5970
- - **When to use:** Any modal that needs to behave differently on mobile (edit dialogs, filter panels, quick-action menus). For always-the-same behavior, use Dialog or Sheet directly.
5971
-
5972
- ## Gotchas
5973
- - Renders a centered Dialog on desktop and a bottom Sheet on mobile — same content, different container
5974
- - Uses `window.matchMedia` internally — SSR defaults to desktop (Dialog) until hydration
5975
- - Title and description are optional; if omitted, no header is rendered in either mode
5976
6038
  # RichChatInput
5977
6039
 
5978
6040
  - Import: @devalok/shilp-sutra/composed/rich-chat-input
package/llms.txt CHANGED
@@ -4,6 +4,38 @@
4
4
  > Built on the same primitives as shadcn/ui but with key API differences.
5
5
  > Read this file BEFORE writing any UI code. Do NOT guess from shadcn/ui knowledge.
6
6
 
7
+ ## QUICK SETUP (AI agents — start here)
8
+
9
+ If you are setting up shilp-sutra in a consumer project for the first time, **do not improvise**. Use a recipe.
10
+
11
+ When the package is installed, recipes ship at `node_modules/@devalok/shilp-sutra/docs/recipes/`. Pick one based on the consumer's framework:
12
+
13
+ | Framework | Recipe file |
14
+ |---|---|
15
+ | Next.js (App Router) | `install-next-app-router.md` |
16
+ | Next.js (Pages Router) | `install-next-pages.md` |
17
+ | Vite + React | `install-vite.md` |
18
+ | Astro | `install-astro.md` |
19
+ | Remix | `install-remix.md` |
20
+ | TanStack Start | `install-tanstack-start.md` |
21
+ | Other React + Tailwind | start from `install-vite.md` and adapt |
22
+
23
+ Other recipes:
24
+
25
+ - `customize-brand.md` — token override cookbook (color, radius, font, spacing)
26
+ - `server-components.md` — RSC-safety matrix and import patterns
27
+ - `troubleshoot.md` — decision tree for the 8 most common breakages
28
+
29
+ The repo URL for these files is `https://github.com/devalok-design/shilp-sutra/tree/main/packages/core/docs/recipes`. Consumer projects should also have an `AGENTS.md` at their root with the rules above pre-loaded — read that first if it exists.
30
+
31
+ ## NEW (v0.39.0)
32
+
33
+ - **Shape presets (`[data-shape]`).** Set on `<html>` (or any subtree) to re-skin roundness across the whole UI. Three ship by default: `sharp` (technical, 2/4/6 px), `slightly-rounded` (default, 6/10/16 px), `rounded` (consumer, 10/16/24 px). Pill shapes (Badge, Switch, Radio, Avatar circle) stay pill regardless.
34
+ - **Semantic radius role tokens.** New: `--radius-control`, `--radius-control-inner`, `--radius-surface`, `--radius-overlay-sm`, `--radius-overlay`, `--radius-overlay-lg`, `--radius-pill`, `--radius-bubble`. Consumers override any role globally or scoped — e.g. `:root { --radius-control: 4px; }`.
35
+ - **Visual changes (no API breaks).** Button no longer scales radius with size (md/lg/xl/lg → all 6px); Input lg matches Button at same height; SegmentedControl items now actually pill; Tabs trigger (contained) matches Button; Tooltip belongs to its own `overlay-sm` tier with Toast; Menubar trigger matches DropdownMenu item; Autocomplete listbox matches Popover. If you preferred old chunky big controls, set `data-shape="rounded"` for v0.38-era feel.
36
+ - **Pre-publish audit gate.** Components in `src/ui/` can no longer use `rounded-ds-*` or bare `rounded-full` — must use semantic roles. Composed/shell migration is v0.40.0 (gate scoped accordingly).
37
+ - See `customize-brand.md` recipe for the full role token list and how to define your own preset.
38
+
7
39
  ## BREAKING CHANGES (v0.37.0 — Tailwind 4 CSS-first)
8
40
 
9
41
  **Setup migration only — component APIs unchanged.** See `MIGRATION.md` at the root of this package (or https://github.com/devalok-design/shilp-sutra/blob/main/MIGRATION.md#v0370--tailwind-4-css-first-migration) for the full guide.
@@ -13,7 +45,7 @@
13
45
  @import "tailwindcss";
14
46
  @import "@devalok/shilp-sutra/css";
15
47
  ```
16
- The old `./tailwind` export is a deprecated no-op stub; importing it logs a dev-mode `console.warn` and is scheduled for removal in 0.38.
48
+ The `./tailwind` export has been removed in 0.38. Delete any `tailwind.config.ts` that referenced the preset and switch to the CSS import above.
17
49
  - **framer-motion is now a required peer dep.** Previously bundled. Install: `pnpm add framer-motion`. Module-scoped React contexts (MotionConfig, LayoutGroup, AnimatePresence) must be single-copy — the peer declaration forces pnpm to dedupe against the consumer's version.
18
50
  - **sonner is now an optional peer dep.** Install only if you render `<Toaster />`: `pnpm add sonner`.
19
51
  - **tailwindcss peer tightened to `^4.0.0`.** No more `^3.4.0 || ^4.0.0`.
@@ -21,7 +53,7 @@
21
53
  - **Node engines floor dropped.** No `engines.node` declared — use any Node 18+.
22
54
  - **New export `@devalok/shilp-sutra/css`** — primary consumer entry for TW4 setup.
23
55
  - **Source class hygiene:** `w-[--var]` → `w-(--var)`, `theme(spacing.N)` → literal, `bg-gradient-to-*` → `bg-linear-to-*`, bare `shadow` → explicit like `shadow-raised`. Codemod your own code; grep: `grep -rn 'w-\[--\|bg-gradient-to-\|theme(spacing' src/`.
24
- - **Tokens now expose TW4 namespaces.** Spacing is `--spacing-ds-*` (so `p-ds-03`, not `p-3`). Typography uses `--text-ds-*`, `--leading-ds-*`. Radius is unprefixed (`--radius`, `--radius-ds-*`). Z-layer utilities are custom-generated (`z-popover`, `z-dropdown`, etc.).
56
+ - **Tokens now expose TW4 namespaces.** Spacing is `--spacing-ds-*` (so `p-ds-03`, not `p-3`). Typography uses `--text-ds-*`, `--leading-ds-*`. Radius has TWO layers: primitive scale (`--radius-ds-sm/md/lg/xl/2xl/full`) AND semantic roles (`--radius-control`, `--radius-surface`, `--radius-overlay-sm/md/lg`, `--radius-pill`, `--radius-bubble`). Components reference roles — consumers swap roles via `[data-shape]` presets or override individual tokens. Z-layer utilities are custom-generated (`z-popover`, `z-dropdown`, etc.).
25
57
  - **Dark mode variant:** `@custom-variant dark (&:where(.dark *))` — identical semantics to old `darkMode: 'class'`. `.dark` on `<html>` or `<body>` activates everything below.
26
58
 
27
59
  ## NEW (v0.36.0)
@@ -48,8 +80,6 @@
48
80
  - **MessageList:** `isLoadingMore` renamed to `loadingMore`.
49
81
  - **AppCommandPalette:** Default Karm routes removed. Use `CommandRegistryProvider` for page registration. `SearchResult` type adds optional `href` field.
50
82
  - **NumberInput:** Shape changed from pill to rounded rectangle.
51
- - **Alert:** `variant="filled"` deprecated → use `"solid"` (alias still works).
52
- - **SegmentedControl:** `variant="accent"` deprecated → use `"solid"` (alias still works).
53
83
  - **Dependencies:** `@floating-ui/dom`, `@tiptap/*`, `prosemirror-state` moved to devDeps (bundled; consumers no longer install them).
54
84
 
55
85
  ## NEW (v0.35.0)
@@ -100,14 +130,13 @@
100
130
 
101
131
  - **Button:** `variant="default"` removed (use `"solid"`), `variant="destructive"` removed (use `variant="solid" color="error"`), `color="default"` removed (use `"accent"`).
102
132
  - **Chip:** Removed. Use `Badge` instead.
103
- - **SegmentedControl:** Rewritten. `variant="filled"` `"accent"`, `variant="tonal"` `"default"`. `SegmentedControlItem` no longer exported. Legacy sizes `small`/`medium`/`big` removed.
133
+ - **SegmentedControl:** Rewritten. Variants are `"default"` (white pill) and `"solid"` (brand pill). `SegmentedControlItem` no longer exported.
104
134
  - **TopBar:** Now renders as `<header>` (was `<div>`).
105
135
  - **Sidebar:** Now renders as `<aside>` (was `<div>`).
106
136
  - **InfoBlock:** `role="status"` (was `role="alert"`).
107
137
  - **Border tokens:** One step darker system-wide.
108
138
  - **Dark mode button text:** Pure white `neutral-0` (#fff) on brand-colored buttons.
109
139
  - **BottomNavbar:** Bottom padding is now `pb-safe` (safe-area-inset).
110
- - **ResponsiveOverlay:** Deprecated. Use Dialog or Sheet directly.
111
140
  - **iOS inputs:** Forced to `font-size: max(16px, 1em)` on mobile via preset.
112
141
 
113
142
  ## CHANGES (v0.32.0)
@@ -124,7 +153,7 @@
124
153
  - **DataTable `mobileView="card"`** — Rows render as stacked cards below 640px. First column = card title, rest = label-value pairs.
125
154
  - **DataTable `aria-sort`** — Sortable column headers include `aria-sort`.
126
155
  - **Charts `ariaLabel` prop** — Configurable screen reader label on all chart components.
127
- - **SegmentedControl** — Redesigned: `variant="default"` (white pill + shadow-sm) | `variant="accent"` (brand pill). Inset radius, snappy spring animation.
156
+ - **SegmentedControl** — Redesigned: `variant="default"` (white pill + shadow-raised) | `variant="solid"` (brand pill). Inset radius, snappy spring animation.
128
157
  - **`--shadow-kbd` token** — Keyboard shortcut badge shadow. Use `shadow-kbd` utility.
129
158
  - **Checkbox/Radio `size` prop** — `sm | md (default) | lg`.
130
159
 
@@ -409,11 +438,8 @@ import { toast } from '@devalok/shilp-sutra/ui/toast'
409
438
  // Hooks:
410
439
  import { useColorMode } from '@devalok/shilp-sutra/hooks/use-color-mode'
411
440
 
412
- // CSS tokens (import once at app root):
413
- import '@devalok/shilp-sutra/tokens'
414
-
415
- // Tailwind preset (in tailwind.config):
416
- import shilpSutra from '@devalok/shilp-sutra/tailwind'
441
+ // CSS tokens (import once at app root — already included in /css):
442
+ import '@devalok/shilp-sutra/css'
417
443
 
418
444
  ## CRITICAL: Differences from shadcn/ui
419
445
 
@@ -456,7 +482,7 @@ Components with two-axis system: Button, Badge, Alert, Banner, Progress, StatusB
456
482
  - SplitButton: [Action | ▼] button with dropdown. Props: variant(solid|soft|outline), color, size(xs|sm|md|icon-xs|icon-sm|icon-md), triggerSide(left|right, default right), triggerWidth?(number|string), placement?(Floating UI Placement, default top-end), dropdownContent(ReactNode), open?, onOpenChange?, dropdownLabel?, dropdownIcon?. ARIA: role="group", aria-haspopup="menu", aria-expanded.
457
483
  - ButtonGroup: Visually merges adjacent Buttons. Props: variant, color, size, disabled (propagates), orientation(horizontal|vertical), attached(true|false, default true), fullWidth. Compound pattern: Button reads position from context, applies radius + border-removal inline. Tonal dividers for solid/soft/ghost. Focus z-index isolation.
458
484
  - Icon: `<Icon icon={IconPlus} />` — context-aware wrapper for Tabler icons. Size tiers: xs(14px) sm(16px) md(18px) lg(20px) xl(24px) 2xl(32px). Default: md. Stroke: light(1.5) regular(2) bold(2.5). Default: regular. Scales per size tier. Reads size from parent Button/IconGroup via IconContext. Explicit props override. Accessibility: aria-hidden by default. Pass label="Add item" for accessible icons. Animation: animate="spin|pulse|bounce|draw". `draw` renders SVG path-draw animation (check/X icons draw progressively via pathLength; other icons fall back to static). State machine: state="idle|loading|success|error". Button integration: startIcon={<Icon icon={IconPlus} />} (NOT raw <IconPlus />). IconGroup: <IconGroup size="sm" gap="tight"> for toolbar patterns.
459
- - Input: size(xs|sm|md|lg) state(InputState) + startSection(ReactNode), endSection(ReactNode), startSectionClickable(bool), endSectionClickable(bool), startSectionType('icon'|'label'), endSectionType('icon'|'label'), wrapperClassName(string). Container-level focus ring wraps input + sections as one unit. Sections are pointer-events-none by default; use *SectionClickable for interactive content (clear buttons, toggles). Section type auto-inferred: strings→'label' (tinted bg + border separator), React elements→'icon' (fixed-width centered). Override with *SectionType. Flexbox section layout. Icons auto-size via IconProvider per input size. className targets <input>, wrapperClassName targets wrapper div. Deprecated aliases: startIcon→startSection, endIcon→endSection, inputVariants→inputWrapperVariants. Type: InputState = 'default' | 'error' | 'warning' | 'success'
485
+ - Input: size(xs|sm|md|lg) state(InputState) + startSection(ReactNode), endSection(ReactNode), startSectionClickable(bool), endSectionClickable(bool), startSectionType('icon'|'label'), endSectionType('icon'|'label'), wrapperClassName(string). Container-level focus ring wraps input + sections as one unit. Sections are pointer-events-none by default; use *SectionClickable for interactive content (clear buttons, toggles). Section type auto-inferred: strings→'label' (tinted bg + border separator), React elements→'icon' (fixed-width centered). Override with *SectionType. Flexbox section layout. Icons auto-size via IconProvider per input size. className targets <input>, wrapperClassName targets wrapper div. Type: InputState = 'default' | 'error' | 'warning' | 'success'
460
486
  - SearchInput: size(xs|sm|md|lg) + loading, onClear. Delegates to Input v2 sections internally.
461
487
  - NumberInput: value + onValueChange, min, max, step (controlled only)
462
488
  - Textarea: size(xs|sm|md|lg) state(default|error|warning|success)
@@ -467,12 +493,12 @@ Components with two-axis system: Button, Badge, Alert, Banner, Progress, StatusB
467
493
  - Select > SelectTrigger(size: xs|sm|md|lg) > SelectValue; SelectContent > SelectItem(value)
468
494
  - Toggle: variant(default|outline) size(sm|md|lg)
469
495
  - ToggleGroup > ToggleGroupItem (variant/size propagate from root)
470
- - SegmentedControl > SegmentedControlItem: variant(filled|tonal) size(sm|md|lg). Types: SegmentedControlOption = { id, text, icon? }, SegmentedControlSize = 'sm' | 'md' | 'lg', SegmentedControlVariant = 'filled' | 'tonal'
496
+ - SegmentedControl: variant(default|solid) size(sm|md|lg) options selectedId onSelect. Types: SegmentedControlOption = { id, text, icon? }, SegmentedControlSize = 'sm' | 'md' | 'lg', SegmentedControlVariant = 'default' | 'solid'
471
497
  - Slider: standard Radix slider
472
498
 
473
499
  ### Feedback & Notifications
474
- - Alert: variant(subtle|filled|outline) color(info|success|warning|error|neutral) + title, onDismiss
475
- - Banner: color(info|success|warning|error|neutral) + actions?(ReactNode), onDismiss. `action` (singular) deprecated, use `actions`. Mobile flex-wrap for multiple buttons.
500
+ - Alert: variant(subtle|solid|outline) color(info|success|warning|error|neutral) size(sm|md|lg) + title, onDismiss
501
+ - Banner: color(info|success|warning|error|neutral) + actions?(ReactNode), onDismiss. Mobile flex-wrap for multiple buttons.
476
502
  - Toast: imperative API via toast.success/error/warning/info/loading/message/undo/promise/upload/custom — REQUIRES <Toaster> at layout root
477
503
  - Spinner: size(sm|md|lg) — renders with role="status"
478
504
  - Progress: track size(sm|md|lg), indicator color(default|success|warning|error), autoColor(boolean, auto-shifts color by value: 0-59=default, 60-84=warning, 85-100=success, >100=error)
@@ -568,7 +594,6 @@ Import: `@devalok/shilp-sutra/ui/chat`
568
594
  - BulkActionBar: show, count, onClearSelection, actions[{label,icon?,onClick,color?,disabled?}]. Fixed bottom floating bar for multi-select contexts.
569
595
  - DeadlineIndicator: deadline(Date|string), warningThreshold?(1440min), criticalThreshold?(240min), format(relative|absolute), showIcon. Color transitions: green→yellow→red→overdue.
570
596
  - MasterDetail: selected, onBack, masterWidth, breakpoint(sm|md|lg). Compound: MasterDetail.List, MasterDetail.Detail, MasterDetail.ListItem(active). Desktop=grid, mobile=stacked with back button.
571
- - ResponsiveOverlay: open, onOpenChange, title, description, breakpoint(sm|md). Dialog on desktop, bottom Sheet on mobile.
572
597
  - MarkdownViewer: content(string), compact?, allowHtml?(false), linkTarget?('_blank'). Renders markdown with design system tokens.
573
598
  - EmojiPicker: onSelect(emoji), set?(native|apple|google|twitter|facebook), theme(auto|light|dark). EmojiPickerPopover wraps in Popover. Lazy-loads emoji-mart with set-specific data.
574
599
  - EmojiNode: TipTap inline atom node for spritesheet emoji rendering. Attrs: id, native, set, x, y. Use createEmojiSuggestion(set) to wire :shortcode: autocomplete. Export: EmojiNode, EmojiNodeAttrs, createEmojiSuggestion.
package/package.json CHANGED
@@ -1,13 +1,44 @@
1
1
  {
2
2
  "name": "@devalok/shilp-sutra",
3
- "version": "0.37.1",
4
- "description": "Devalok Design System — tokens, components, and patterns for Next.js",
3
+ "version": "0.39.0",
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
+ "author": "Devalok Design & Strategy Studios <shilp-sutra@devalok.in>",
7
+ "homepage": "https://devalok-design.github.io/shilp-sutra/",
6
8
  "repository": {
7
9
  "type": "git",
8
10
  "url": "https://github.com/devalok-design/shilp-sutra",
9
11
  "directory": "packages/core"
10
12
  },
13
+ "bugs": {
14
+ "url": "https://github.com/devalok-design/shilp-sutra/issues"
15
+ },
16
+ "keywords": [
17
+ "react",
18
+ "design-system",
19
+ "components",
20
+ "ui",
21
+ "ui-library",
22
+ "tailwindcss",
23
+ "tailwind-v4",
24
+ "typescript",
25
+ "accessible",
26
+ "a11y",
27
+ "wcag",
28
+ "radix-ui",
29
+ "headless",
30
+ "cva",
31
+ "design-tokens",
32
+ "oklch",
33
+ "framer-motion",
34
+ "dark-mode",
35
+ "nextjs",
36
+ "vite",
37
+ "astro",
38
+ "remix",
39
+ "ai-agent",
40
+ "llms-txt"
41
+ ],
11
42
  "type": "module",
12
43
  "main": "./dist/ui/index.js",
13
44
  "module": "./dist/ui/index.js",
@@ -554,11 +585,6 @@
554
585
  "import": "./dist/composed/status-badge.js",
555
586
  "default": "./dist/composed/status-badge.js"
556
587
  },
557
- "./composed/responsive-overlay": {
558
- "types": "./dist/composed/responsive-overlay.d.ts",
559
- "import": "./dist/composed/responsive-overlay.js",
560
- "default": "./dist/composed/responsive-overlay.js"
561
- },
562
588
  "./composed/schedule-view": {
563
589
  "types": "./dist/composed/schedule-view.d.ts",
564
590
  "import": "./dist/composed/schedule-view.js",
@@ -629,23 +655,6 @@
629
655
  "import": "./dist/hooks/use-mobile.js",
630
656
  "default": "./dist/hooks/use-mobile.js"
631
657
  },
632
- "./hooks/use-toast": {
633
- "types": "./dist/hooks/use-toast.d.ts",
634
- "import": "./dist/hooks/use-toast.js",
635
- "default": "./dist/hooks/use-toast.js"
636
- },
637
- "./tailwind": {
638
- "types": "./dist/tailwind/index.d.ts",
639
- "require": "./dist/tailwind/index.cjs",
640
- "import": "./dist/tailwind/index.js",
641
- "default": "./dist/tailwind/index.js"
642
- },
643
- "./tailwind/preset": {
644
- "types": "./dist/tailwind/preset.d.ts",
645
- "require": "./dist/tailwind/index.cjs",
646
- "import": "./dist/tailwind/preset.js",
647
- "default": "./dist/tailwind/preset.js"
648
- },
649
658
  "./utils": {
650
659
  "types": "./dist/ui/lib/utils.d.ts",
651
660
  "import": "./dist/ui/lib/utils.js",
@@ -722,8 +731,10 @@
722
731
  "files": [
723
732
  "dist",
724
733
  "docs/components",
734
+ "docs/recipes",
725
735
  "docs/rollback.md",
726
736
  "fonts",
737
+ "skill",
727
738
  "MIGRATION.md",
728
739
  "README.md",
729
740
  "llms.txt",
@@ -830,19 +841,19 @@
830
841
  "@emoji-mart/react": "^1.1.1",
831
842
  "@floating-ui/dom": "^1.7.6",
832
843
  "@floating-ui/react-dom": "^2.1.8",
833
- "@tabler/icons-react": "^3.41.1",
844
+ "@tabler/icons-react": "^3.42.0",
834
845
  "@tanstack/react-table": "^8.21.3",
835
846
  "@tanstack/react-virtual": "^3.13.23",
836
- "@tiptap/core": "^3.22.3",
837
- "@tiptap/extension-highlight": "^3.22.3",
838
- "@tiptap/extension-image": "^3.22.3",
839
- "@tiptap/extension-list": "^3.22.3",
840
- "@tiptap/extension-mention": "^3.22.3",
841
- "@tiptap/extension-text-align": "^3.22.3",
842
- "@tiptap/extensions": "^3.22.3",
843
- "@tiptap/react": "^3.22.3",
844
- "@tiptap/starter-kit": "^3.22.3",
845
- "@tiptap/suggestion": "^3.22.3",
847
+ "@tiptap/core": "^3.22.5",
848
+ "@tiptap/extension-highlight": "^3.22.5",
849
+ "@tiptap/extension-image": "^3.22.5",
850
+ "@tiptap/extension-list": "^3.22.5",
851
+ "@tiptap/extension-mention": "^3.22.5",
852
+ "@tiptap/extension-text-align": "^3.22.5",
853
+ "@tiptap/extensions": "^3.22.5",
854
+ "@tiptap/react": "^3.22.5",
855
+ "@tiptap/starter-kit": "^3.22.5",
856
+ "@tiptap/suggestion": "^3.22.5",
846
857
  "@types/react-syntax-highlighter": "^15.5.13",
847
858
  "aria-hidden": "^1.2.6",
848
859
  "class-variance-authority": "^0.7.1",
@@ -0,0 +1,99 @@
1
+ # shilp-sutra — Devalok Design System
2
+
3
+ > Agent Skill for `@devalok/shilp-sutra` — Devalok Design & Strategy Studios' React design system. Tailwind 4, React 19, CVA, OKLCH tokens, framer-motion, 110+ accessible components.
4
+
5
+ Use this skill when working in a React project that depends on `@devalok/shilp-sutra` (or when adding the package to one). It teaches the agent the correct setup, the per-framework playbook, the component API, the brand-token override pattern, and the Server Component import rules — all from the same files the design system ships in its npm tarball, so the skill never drifts from the live package.
6
+
7
+ ## When the agent should activate this skill
8
+
9
+ - The user mentions `shilp-sutra`, `@devalok`, or Devalok's design system.
10
+ - The project's `package.json` lists `@devalok/shilp-sutra` or `@devalok/shilp-sutra-brand`.
11
+ - The user asks to install Tailwind, add UI components, theme an app, or migrate from shadcn/MUI/Chakra in a project that already has the package.
12
+
13
+ ## What's inside
14
+
15
+ ```
16
+ shilp-sutra/
17
+ ├── SKILL.md # Entry — load this first
18
+ ├── README.md # This file (marketplace listing)
19
+ ├── LICENSE # MIT
20
+ └── references/
21
+ ├── components.md # Concise component cheatsheet (~660 lines)
22
+ ├── components-full.md # Exhaustive per-component reference (~6900 lines)
23
+ ├── setup-next-app-router.md # Next.js (App Router) install playbook
24
+ ├── setup-next-pages.md # Next.js (Pages Router) install playbook
25
+ ├── setup-vite.md # Vite + React install playbook
26
+ ├── setup-astro.md # Astro install playbook
27
+ ├── setup-remix.md # Remix install playbook
28
+ ├── setup-tanstack-start.md # TanStack Start install playbook
29
+ ├── customize-brand.md # Token override cookbook
30
+ ├── server-components.md # RSC-safety matrix and import patterns
31
+ └── troubleshoot.md # Decision tree for the 8 most common breakages
32
+ ```
33
+
34
+ ## Install
35
+
36
+ ### Claude Code (personal)
37
+
38
+ ```bash
39
+ # Option A — clone the repo (sparse) and copy the skill
40
+ git clone --depth=1 --filter=blob:none --sparse https://github.com/devalok-design/shilp-sutra
41
+ cd shilp-sutra
42
+ git sparse-checkout set skills/shilp-sutra
43
+ cp -r skills/shilp-sutra ~/.claude/skills/shilp-sutra
44
+
45
+ # Option B — if @devalok/shilp-sutra is already a dependency in your project
46
+ cp -r node_modules/@devalok/shilp-sutra/skill ~/.claude/skills/shilp-sutra
47
+
48
+ # Option C — direct curl (latest from main)
49
+ curl -fsSL https://raw.githubusercontent.com/devalok-design/shilp-sutra/main/skills/shilp-sutra/install.sh | bash
50
+ ```
51
+
52
+ Restart Claude Code or open a new session. Verify with `What skills are available?` — `shilp-sutra` should appear.
53
+
54
+ ### Project-scoped (commit to repo)
55
+
56
+ ```bash
57
+ mkdir -p .claude/skills
58
+ curl -fsSL https://raw.githubusercontent.com/devalok-design/shilp-sutra/main/skills/shilp-sutra/install.sh | INSTALL_DIR=.claude/skills bash
59
+ git add .claude/skills/shilp-sutra
60
+ git commit -m "chore: add shilp-sutra agent skill"
61
+ ```
62
+
63
+ Every contributor (and their agent) on the project gets the skill automatically.
64
+
65
+ ### Cursor, Codex, Aider, and other tools
66
+
67
+ The skill follows the [Agent Skills open standard](https://agentskills.io/specification) — any compatible agent loads it from the same directory. See your tool's docs for the install path.
68
+
69
+ ## What it teaches the agent
70
+
71
+ - **Setup playbook** for Next.js (App + Pages), Vite, Astro, Remix, TanStack Start. Each recipe is concrete, copy-pasteable, and has been validated against real consumer projects.
72
+ - **Hard constraints** — the eight ways to break Tailwind 4 + framer-motion setup that look unrelated to the design system but aren't.
73
+ - **Component API** — every component, every variant, every example. Two layers: a cheatsheet for fast scans and a full reference for prop tables.
74
+ - **RSC import patterns** — which components are server-safe, which need `"use client"`, and why per-component imports matter for Next.js.
75
+ - **Theming** — how to override OKLCH ramps, radius, fonts, and the spacing scale without forking the package.
76
+ - **Troubleshoot tree** — the eight most common breakages with the symptom, root cause, and exact fix for each.
77
+
78
+ ## Source of truth
79
+
80
+ This skill is **built from** the package's own documentation (`packages/core/llms.txt`, `packages/core/llms-full.txt`, `packages/core/docs/recipes/`) by `scripts/build-skill.mjs`. The pre-publish audit fails if the bundled references drift from source, so the skill stays in sync with every release.
81
+
82
+ ## Versioning
83
+
84
+ The skill version tracks the package version. Both are at the top of `SKILL.md` (frontmatter `metadata.version`) and in `package.json`. If you've installed the skill but upgraded the package, regenerate the skill or pull the latest from the repo.
85
+
86
+ ## Feedback
87
+
88
+ If a recipe is wrong, a constraint is outdated, or a component behavior contradicts the docs, file an issue at <https://github.com/devalok-design/shilp-sutra/issues> with the label `ai-agent-feedback`. Include the package version, the file/recipe path, the command or error, and what you expected.
89
+
90
+ ## License
91
+
92
+ MIT © Devalok Design & Strategy Studios. See `LICENSE`.
93
+
94
+ ## Links
95
+
96
+ - npm: <https://www.npmjs.com/package/@devalok/shilp-sutra>
97
+ - Storybook: <https://devalok-design.github.io/shilp-sutra/>
98
+ - Repo: <https://github.com/devalok-design/shilp-sutra>
99
+ - Agent Skills spec: <https://agentskills.io/specification>