@devalok/shilp-sutra 0.37.0 → 0.38.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 (183) hide show
  1. package/MIGRATION.md +67 -0
  2. package/dist/_chunks/tiptap.js +977 -968
  3. package/dist/_chunks/tiptap.js.map +1 -1
  4. package/dist/composed/index.d.ts +0 -2
  5. package/dist/composed/index.d.ts.map +1 -1
  6. package/dist/composed/index.js +5 -6
  7. package/dist/composed/inline-edit.d.ts.map +1 -1
  8. package/dist/composed/inline-edit.js +42 -40
  9. package/dist/composed/inline-edit.js.map +1 -1
  10. package/dist/hooks/index.d.ts +2 -2
  11. package/dist/hooks/index.d.ts.map +1 -1
  12. package/dist/hooks/index.js +0 -1
  13. package/dist/test-utils/conformance.d.ts +37 -0
  14. package/dist/test-utils/conformance.d.ts.map +1 -0
  15. package/dist/ui/alert.d.ts +1 -2
  16. package/dist/ui/alert.d.ts.map +1 -1
  17. package/dist/ui/alert.js +1 -27
  18. package/dist/ui/alert.js.map +1 -1
  19. package/dist/ui/banner.d.ts +3 -5
  20. package/dist/ui/banner.d.ts.map +1 -1
  21. package/dist/ui/banner.js +13 -13
  22. package/dist/ui/banner.js.map +1 -1
  23. package/dist/ui/index.d.ts +1 -1
  24. package/dist/ui/index.d.ts.map +1 -1
  25. package/dist/ui/index.js +2 -2
  26. package/dist/ui/index.js.map +1 -1
  27. package/dist/ui/input.d.ts +1 -9
  28. package/dist/ui/input.d.ts.map +1 -1
  29. package/dist/ui/input.js +26 -27
  30. package/dist/ui/input.js.map +1 -1
  31. package/dist/ui/segmented-control.d.ts +1 -1
  32. package/dist/ui/segmented-control.d.ts.map +1 -1
  33. package/dist/ui/segmented-control.js +2 -4
  34. package/dist/ui/segmented-control.js.map +1 -1
  35. package/docs/components/_header.md +1 -1
  36. package/docs/components/composed/activity-feed.md +6 -0
  37. package/docs/components/composed/avatar-group.md +8 -0
  38. package/docs/components/composed/bulk-action-bar.md +6 -0
  39. package/docs/components/composed/command-palette.md +7 -0
  40. package/docs/components/composed/confirm-dialog.md +6 -0
  41. package/docs/components/composed/content-card.md +6 -0
  42. package/docs/components/composed/date-picker.md +10 -0
  43. package/docs/components/composed/deadline-indicator.md +7 -0
  44. package/docs/components/composed/emoji-picker.md +8 -0
  45. package/docs/components/composed/empty-state.md +8 -0
  46. package/docs/components/composed/error-boundary.md +7 -0
  47. package/docs/components/composed/file-preview.md +8 -0
  48. package/docs/components/composed/filter-bar.md +8 -0
  49. package/docs/components/composed/form-section.md +6 -0
  50. package/docs/components/composed/global-loading.md +6 -0
  51. package/docs/components/composed/inline-edit.md +8 -0
  52. package/docs/components/composed/loading-skeleton.md +7 -0
  53. package/docs/components/composed/markdown-viewer.md +9 -0
  54. package/docs/components/composed/master-detail.md +7 -0
  55. package/docs/components/composed/member-picker.md +7 -0
  56. package/docs/components/composed/multi-select-popover.md +11 -0
  57. package/docs/components/composed/page-header.md +7 -0
  58. package/docs/components/composed/page-skeletons.md +10 -0
  59. package/docs/components/composed/priority-indicator.md +7 -0
  60. package/docs/components/composed/rich-chat-input.md +12 -0
  61. package/docs/components/composed/rich-text-editor.md +9 -0
  62. package/docs/components/composed/schedule-view.md +8 -0
  63. package/docs/components/composed/simple-tooltip.md +7 -0
  64. package/docs/components/composed/status-badge.md +10 -0
  65. package/docs/components/shell/app-command-palette.md +8 -0
  66. package/docs/components/shell/bottom-navbar.md +12 -0
  67. package/docs/components/shell/command-registry.md +7 -0
  68. package/docs/components/shell/link-context.md +15 -0
  69. package/docs/components/shell/notification-center.md +10 -0
  70. package/docs/components/shell/notification-preferences.md +7 -0
  71. package/docs/components/shell/sidebar.md +11 -0
  72. package/docs/components/shell/top-bar.md +11 -0
  73. package/docs/components/ui/accordion.md +10 -0
  74. package/docs/components/ui/alert-dialog.md +10 -1
  75. package/docs/components/ui/alert.md +13 -2
  76. package/docs/components/ui/aspect-ratio.md +7 -0
  77. package/docs/components/ui/autocomplete.md +7 -0
  78. package/docs/components/ui/avatar.md +10 -0
  79. package/docs/components/ui/badge-group.md +7 -0
  80. package/docs/components/ui/badge-indicator.md +7 -0
  81. package/docs/components/ui/badge.md +12 -0
  82. package/docs/components/ui/banner.md +10 -1
  83. package/docs/components/ui/breadcrumb.md +8 -0
  84. package/docs/components/ui/button-group.md +24 -4
  85. package/docs/components/ui/button-processing.md +5 -0
  86. package/docs/components/ui/button.md +9 -0
  87. package/docs/components/ui/card.md +16 -4
  88. package/docs/components/ui/charts.md +9 -0
  89. package/docs/components/ui/chat.md +9 -0
  90. package/docs/components/ui/checkbox.md +15 -1
  91. package/docs/components/ui/chip.md +9 -0
  92. package/docs/components/ui/code.md +7 -0
  93. package/docs/components/ui/collapsible.md +9 -0
  94. package/docs/components/ui/color-input.md +8 -0
  95. package/docs/components/ui/color-swatch.md +7 -0
  96. package/docs/components/ui/combobox.md +16 -3
  97. package/docs/components/ui/container.md +11 -0
  98. package/docs/components/ui/context-menu.md +8 -0
  99. package/docs/components/ui/data-table-body.md +4 -0
  100. package/docs/components/ui/data-table-bulk-actions.md +4 -0
  101. package/docs/components/ui/data-table-card.md +4 -0
  102. package/docs/components/ui/data-table-context.md +4 -0
  103. package/docs/components/ui/data-table-header.md +4 -0
  104. package/docs/components/ui/data-table-pagination.md +4 -0
  105. package/docs/components/ui/data-table-toolbar.md +7 -0
  106. package/docs/components/ui/data-table.md +25 -0
  107. package/docs/components/ui/devalok-grain.md +8 -0
  108. package/docs/components/ui/dialog.md +10 -0
  109. package/docs/components/ui/dropdown-menu.md +10 -0
  110. package/docs/components/ui/file-upload.md +8 -0
  111. package/docs/components/ui/form.md +21 -0
  112. package/docs/components/ui/hover-card.md +9 -0
  113. package/docs/components/ui/icon-button.md +7 -0
  114. package/docs/components/ui/icon-context.md +7 -0
  115. package/docs/components/ui/icon-group.md +9 -0
  116. package/docs/components/ui/icon.md +7 -0
  117. package/docs/components/ui/input-otp.md +29 -7
  118. package/docs/components/ui/input.md +11 -2
  119. package/docs/components/ui/label.md +7 -1
  120. package/docs/components/ui/link.md +7 -0
  121. package/docs/components/ui/menubar.md +9 -0
  122. package/docs/components/ui/navigation-menu.md +9 -0
  123. package/docs/components/ui/number-input.md +10 -0
  124. package/docs/components/ui/pagination.md +10 -0
  125. package/docs/components/ui/popover.md +9 -0
  126. package/docs/components/ui/progress-ring.md +7 -0
  127. package/docs/components/ui/progress.md +7 -0
  128. package/docs/components/ui/radio.md +27 -2
  129. package/docs/components/ui/search-input.md +8 -0
  130. package/docs/components/ui/segmented-control.md +21 -6
  131. package/docs/components/ui/select.md +14 -3
  132. package/docs/components/ui/separator.md +7 -0
  133. package/docs/components/ui/sheet.md +10 -0
  134. package/docs/components/ui/sidebar.md +30 -0
  135. package/docs/components/ui/skeleton.md +7 -0
  136. package/docs/components/ui/slider.md +15 -1
  137. package/docs/components/ui/spinner.md +7 -0
  138. package/docs/components/ui/split-button.md +11 -0
  139. package/docs/components/ui/stack.md +8 -0
  140. package/docs/components/ui/stat-card.md +9 -0
  141. package/docs/components/ui/status-dot.md +9 -0
  142. package/docs/components/ui/stepper.md +8 -0
  143. package/docs/components/ui/switch.md +8 -0
  144. package/docs/components/ui/table.md +8 -0
  145. package/docs/components/ui/tabs.md +10 -2
  146. package/docs/components/ui/text.md +9 -4
  147. package/docs/components/ui/textarea.md +7 -1
  148. package/docs/components/ui/toast.md +9 -0
  149. package/docs/components/ui/toaster.md +8 -0
  150. package/docs/components/ui/toggle-group.md +13 -4
  151. package/docs/components/ui/toggle.md +10 -2
  152. package/docs/components/ui/tooltip.md +11 -1
  153. package/docs/components/ui/tree-view.md +12 -0
  154. package/docs/components/ui/visually-hidden.md +7 -0
  155. package/docs/recipes/customize-brand.md +216 -0
  156. package/docs/recipes/index.md +51 -0
  157. package/docs/recipes/install-astro.md +178 -0
  158. package/docs/recipes/install-next-app-router.md +230 -0
  159. package/docs/recipes/install-next-pages.md +123 -0
  160. package/docs/recipes/install-remix.md +171 -0
  161. package/docs/recipes/install-tanstack-start.md +143 -0
  162. package/docs/recipes/install-vite.md +170 -0
  163. package/docs/recipes/server-components.md +209 -0
  164. package/docs/recipes/troubleshoot.md +217 -0
  165. package/llms-full.txt +1133 -88
  166. package/llms.txt +33 -16
  167. package/package.json +45 -35
  168. package/dist/composed/responsive-overlay.d.ts +0 -23
  169. package/dist/composed/responsive-overlay.d.ts.map +0 -1
  170. package/dist/composed/responsive-overlay.js +0 -40
  171. package/dist/composed/responsive-overlay.js.map +0 -1
  172. package/dist/hooks/use-toast.d.ts +0 -17
  173. package/dist/hooks/use-toast.d.ts.map +0 -1
  174. package/dist/hooks/use-toast.js +0 -3
  175. package/dist/tailwind/index.cjs +0 -41
  176. package/dist/tailwind/index.d.ts +0 -2
  177. package/dist/tailwind/index.d.ts.map +0 -1
  178. package/dist/tailwind/index.js +0 -2
  179. package/dist/tailwind/preset.d.ts +0 -25
  180. package/dist/tailwind/preset.d.ts.map +0 -1
  181. package/dist/tailwind/preset.js +0 -17
  182. package/dist/tailwind/preset.js.map +0 -1
  183. package/docs/components/composed/responsive-overlay.md +0 -34
package/llms.txt CHANGED
@@ -4,6 +4,30 @@
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
+
7
31
  ## BREAKING CHANGES (v0.37.0 — Tailwind 4 CSS-first)
8
32
 
9
33
  **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 +37,7 @@
13
37
  @import "tailwindcss";
14
38
  @import "@devalok/shilp-sutra/css";
15
39
  ```
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.
40
+ 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
41
  - **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
42
  - **sonner is now an optional peer dep.** Install only if you render `<Toaster />`: `pnpm add sonner`.
19
43
  - **tailwindcss peer tightened to `^4.0.0`.** No more `^3.4.0 || ^4.0.0`.
@@ -48,8 +72,6 @@
48
72
  - **MessageList:** `isLoadingMore` renamed to `loadingMore`.
49
73
  - **AppCommandPalette:** Default Karm routes removed. Use `CommandRegistryProvider` for page registration. `SearchResult` type adds optional `href` field.
50
74
  - **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
75
  - **Dependencies:** `@floating-ui/dom`, `@tiptap/*`, `prosemirror-state` moved to devDeps (bundled; consumers no longer install them).
54
76
 
55
77
  ## NEW (v0.35.0)
@@ -100,14 +122,13 @@
100
122
 
101
123
  - **Button:** `variant="default"` removed (use `"solid"`), `variant="destructive"` removed (use `variant="solid" color="error"`), `color="default"` removed (use `"accent"`).
102
124
  - **Chip:** Removed. Use `Badge` instead.
103
- - **SegmentedControl:** Rewritten. `variant="filled"` `"accent"`, `variant="tonal"` `"default"`. `SegmentedControlItem` no longer exported. Legacy sizes `small`/`medium`/`big` removed.
125
+ - **SegmentedControl:** Rewritten. Variants are `"default"` (white pill) and `"solid"` (brand pill). `SegmentedControlItem` no longer exported.
104
126
  - **TopBar:** Now renders as `<header>` (was `<div>`).
105
127
  - **Sidebar:** Now renders as `<aside>` (was `<div>`).
106
128
  - **InfoBlock:** `role="status"` (was `role="alert"`).
107
129
  - **Border tokens:** One step darker system-wide.
108
130
  - **Dark mode button text:** Pure white `neutral-0` (#fff) on brand-colored buttons.
109
131
  - **BottomNavbar:** Bottom padding is now `pb-safe` (safe-area-inset).
110
- - **ResponsiveOverlay:** Deprecated. Use Dialog or Sheet directly.
111
132
  - **iOS inputs:** Forced to `font-size: max(16px, 1em)` on mobile via preset.
112
133
 
113
134
  ## CHANGES (v0.32.0)
@@ -124,7 +145,7 @@
124
145
  - **DataTable `mobileView="card"`** — Rows render as stacked cards below 640px. First column = card title, rest = label-value pairs.
125
146
  - **DataTable `aria-sort`** — Sortable column headers include `aria-sort`.
126
147
  - **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.
148
+ - **SegmentedControl** — Redesigned: `variant="default"` (white pill + shadow-raised) | `variant="solid"` (brand pill). Inset radius, snappy spring animation.
128
149
  - **`--shadow-kbd` token** — Keyboard shortcut badge shadow. Use `shadow-kbd` utility.
129
150
  - **Checkbox/Radio `size` prop** — `sm | md (default) | lg`.
130
151
 
@@ -409,11 +430,8 @@ import { toast } from '@devalok/shilp-sutra/ui/toast'
409
430
  // Hooks:
410
431
  import { useColorMode } from '@devalok/shilp-sutra/hooks/use-color-mode'
411
432
 
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'
433
+ // CSS tokens (import once at app root — already included in /css):
434
+ import '@devalok/shilp-sutra/css'
417
435
 
418
436
  ## CRITICAL: Differences from shadcn/ui
419
437
 
@@ -456,7 +474,7 @@ Components with two-axis system: Button, Badge, Alert, Banner, Progress, StatusB
456
474
  - 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
475
  - 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
476
  - 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'
477
+ - 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
478
  - SearchInput: size(xs|sm|md|lg) + loading, onClear. Delegates to Input v2 sections internally.
461
479
  - NumberInput: value + onValueChange, min, max, step (controlled only)
462
480
  - Textarea: size(xs|sm|md|lg) state(default|error|warning|success)
@@ -467,12 +485,12 @@ Components with two-axis system: Button, Badge, Alert, Banner, Progress, StatusB
467
485
  - Select > SelectTrigger(size: xs|sm|md|lg) > SelectValue; SelectContent > SelectItem(value)
468
486
  - Toggle: variant(default|outline) size(sm|md|lg)
469
487
  - 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'
488
+ - SegmentedControl: variant(default|solid) size(sm|md|lg) options selectedId onSelect. Types: SegmentedControlOption = { id, text, icon? }, SegmentedControlSize = 'sm' | 'md' | 'lg', SegmentedControlVariant = 'default' | 'solid'
471
489
  - Slider: standard Radix slider
472
490
 
473
491
  ### 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.
492
+ - Alert: variant(subtle|solid|outline) color(info|success|warning|error|neutral) size(sm|md|lg) + title, onDismiss
493
+ - Banner: color(info|success|warning|error|neutral) + actions?(ReactNode), onDismiss. Mobile flex-wrap for multiple buttons.
476
494
  - Toast: imperative API via toast.success/error/warning/info/loading/message/undo/promise/upload/custom — REQUIRES <Toaster> at layout root
477
495
  - Spinner: size(sm|md|lg) — renders with role="status"
478
496
  - 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 +586,6 @@ Import: `@devalok/shilp-sutra/ui/chat`
568
586
  - BulkActionBar: show, count, onClearSelection, actions[{label,icon?,onClick,color?,disabled?}]. Fixed bottom floating bar for multi-select contexts.
569
587
  - DeadlineIndicator: deadline(Date|string), warningThreshold?(1440min), criticalThreshold?(240min), format(relative|absolute), showIcon. Color transitions: green→yellow→red→overdue.
570
588
  - 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
589
  - MarkdownViewer: content(string), compact?, allowHtml?(false), linkTarget?('_blank'). Renders markdown with design system tokens.
573
590
  - 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
591
  - 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.0",
4
- "description": "Devalok Design System — tokens, components, and patterns for Next.js",
3
+ "version": "0.38.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,6 +731,7 @@
722
731
  "files": [
723
732
  "dist",
724
733
  "docs/components",
734
+ "docs/recipes",
725
735
  "docs/rollback.md",
726
736
  "fonts",
727
737
  "MIGRATION.md",
@@ -830,19 +840,19 @@
830
840
  "@emoji-mart/react": "^1.1.1",
831
841
  "@floating-ui/dom": "^1.7.6",
832
842
  "@floating-ui/react-dom": "^2.1.8",
833
- "@tabler/icons-react": "^3.41.1",
843
+ "@tabler/icons-react": "^3.42.0",
834
844
  "@tanstack/react-table": "^8.21.3",
835
845
  "@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",
846
+ "@tiptap/core": "^3.22.5",
847
+ "@tiptap/extension-highlight": "^3.22.5",
848
+ "@tiptap/extension-image": "^3.22.5",
849
+ "@tiptap/extension-list": "^3.22.5",
850
+ "@tiptap/extension-mention": "^3.22.5",
851
+ "@tiptap/extension-text-align": "^3.22.5",
852
+ "@tiptap/extensions": "^3.22.5",
853
+ "@tiptap/react": "^3.22.5",
854
+ "@tiptap/starter-kit": "^3.22.5",
855
+ "@tiptap/suggestion": "^3.22.5",
846
856
  "@types/react-syntax-highlighter": "^15.5.13",
847
857
  "aria-hidden": "^1.2.6",
848
858
  "class-variance-authority": "^0.7.1",
@@ -1,23 +0,0 @@
1
- "use client";
2
- import * as React from 'react';
3
- /**
4
- * @deprecated Dialog and Sheet now auto-adapt to mobile viewports.
5
- * Use Dialog directly (fullScreens on mobile) or Sheet directly (becomes bottom sheet on mobile).
6
- * This component will be removed in a future major version.
7
- */
8
- export interface ResponsiveOverlayProps {
9
- open: boolean;
10
- onOpenChange: (open: boolean) => void;
11
- title?: string;
12
- description?: string;
13
- /** Below this breakpoint renders as bottom Sheet @default 'md' */
14
- breakpoint?: 'sm' | 'md';
15
- children: React.ReactNode;
16
- className?: string;
17
- }
18
- /**
19
- * @deprecated Use Dialog or Sheet directly — they are now individually mobile-responsive.
20
- */
21
- declare function ResponsiveOverlay({ open, onOpenChange, title, description, breakpoint, children, className, }: ResponsiveOverlayProps): import("react/jsx-runtime").JSX.Element;
22
- export { ResponsiveOverlay };
23
- //# sourceMappingURL=responsive-overlay.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"responsive-overlay.d.ts","sourceRoot":"","sources":["../../src/composed/responsive-overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAqB9B;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kEAAkE;IAClE,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA8BD;;GAEG;AACH,iBAAS,iBAAiB,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,WAAW,EACX,UAAiB,EACjB,QAAQ,EACR,SAAS,GACV,EAAE,sBAAsB,2CAgCxB;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
@@ -1,40 +0,0 @@
1
- "use client";
2
- import { Dialog as e, DialogContent as t, DialogDescription as n, DialogHeader as r, DialogTitle as i } from "../ui/dialog.js";
3
- import { Sheet as a, SheetContent as o, SheetDescription as s, SheetHeader as c, SheetTitle as l } from "../ui/sheet.js";
4
- import * as u from "react";
5
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
6
- //#region src/composed/responsive-overlay.tsx
7
- var p = {
8
- sm: "640px",
9
- md: "768px"
10
- };
11
- function m(e) {
12
- let [t, n] = u.useState(!1);
13
- return u.useEffect(() => {
14
- if (typeof window > "u") return;
15
- let t = window.matchMedia(`(max-width: ${p[e]})`);
16
- n(t.matches);
17
- let r = (e) => n(e.matches);
18
- return t.addEventListener("change", r), () => t.removeEventListener("change", r);
19
- }, [e]), t;
20
- }
21
- function h({ open: u, onOpenChange: p, title: h, description: g, breakpoint: _ = "md", children: v, className: y }) {
22
- return m(_) ? /* @__PURE__ */ d(a, {
23
- open: u,
24
- onOpenChange: p,
25
- children: /* @__PURE__ */ f(o, {
26
- side: "bottom",
27
- className: y,
28
- children: [(h || g) && /* @__PURE__ */ f(c, { children: [h && /* @__PURE__ */ d(l, { children: h }), g && /* @__PURE__ */ d(s, { children: g })] }), v]
29
- })
30
- }) : /* @__PURE__ */ d(e, {
31
- open: u,
32
- onOpenChange: p,
33
- children: /* @__PURE__ */ f(t, {
34
- className: y,
35
- children: [(h || g) && /* @__PURE__ */ f(r, { children: [h && /* @__PURE__ */ d(i, { children: h }), g && /* @__PURE__ */ d(n, { children: g })] }), v]
36
- })
37
- });
38
- }
39
- //#endregion
40
- export { h as ResponsiveOverlay };
@@ -1 +0,0 @@
1
- {"version":3,"file":"responsive-overlay.js","names":[],"sources":["../../src/composed/responsive-overlay.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\n\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from '../ui/dialog'\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from '../ui/sheet'\n\n// ============================================================\n// Types\n// ============================================================\n\n/**\n * @deprecated Dialog and Sheet now auto-adapt to mobile viewports.\n * Use Dialog directly (fullScreens on mobile) or Sheet directly (becomes bottom sheet on mobile).\n * This component will be removed in a future major version.\n */\nexport interface ResponsiveOverlayProps {\n open: boolean\n onOpenChange: (open: boolean) => void\n title?: string\n description?: string\n /** Below this breakpoint renders as bottom Sheet @default 'md' */\n breakpoint?: 'sm' | 'md'\n children: React.ReactNode\n className?: string\n}\n\n// ============================================================\n// Hook\n// ============================================================\n\nconst breakpointValues: Record<string, string> = {\n sm: '640px',\n md: '768px',\n}\n\nfunction useIsMobileOverlay(breakpoint: string): boolean {\n const [isMobile, setIsMobile] = React.useState(false)\n\n React.useEffect(() => {\n if (typeof window === 'undefined') return\n const mql = window.matchMedia(`(max-width: ${breakpointValues[breakpoint]})`)\n setIsMobile(mql.matches)\n const handler = (e: MediaQueryListEvent) => setIsMobile(e.matches)\n mql.addEventListener('change', handler)\n return () => mql.removeEventListener('change', handler)\n }, [breakpoint])\n\n return isMobile\n}\n\n// ============================================================\n// ResponsiveOverlay\n// ============================================================\n\n/**\n * @deprecated Use Dialog or Sheet directly — they are now individually mobile-responsive.\n */\nfunction ResponsiveOverlay({\n open,\n onOpenChange,\n title,\n description,\n breakpoint = 'md',\n children,\n className,\n}: ResponsiveOverlayProps) {\n const isMobile = useIsMobileOverlay(breakpoint)\n\n if (isMobile) {\n return (\n <Sheet open={open} onOpenChange={onOpenChange}>\n <SheetContent side=\"bottom\" className={className}>\n {(title || description) && (\n <SheetHeader>\n {title && <SheetTitle>{title}</SheetTitle>}\n {description && <SheetDescription>{description}</SheetDescription>}\n </SheetHeader>\n )}\n {children}\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className={className}>\n {(title || description) && (\n <DialogHeader>\n {title && <DialogTitle>{title}</DialogTitle>}\n {description && <DialogDescription>{description}</DialogDescription>}\n </DialogHeader>\n )}\n {children}\n </DialogContent>\n </Dialog>\n )\n}\n\nexport { ResponsiveOverlay }\n"],"mappings":";;;;;;AA2CA,IAAM,IAA2C;CAC/C,IAAI;CACJ,IAAI;CACL;AAED,SAAS,EAAmB,GAA6B;CACvD,IAAM,CAAC,GAAU,KAAe,EAAM,SAAS,GAAM;AAWrD,QATA,EAAM,gBAAgB;AACpB,MAAI,OAAO,SAAW,IAAa;EACnC,IAAM,IAAM,OAAO,WAAW,eAAe,EAAiB,GAAY,GAAG;AAC7E,IAAY,EAAI,QAAQ;EACxB,IAAM,KAAW,MAA2B,EAAY,EAAE,QAAQ;AAElE,SADA,EAAI,iBAAiB,UAAU,EAAQ,QAC1B,EAAI,oBAAoB,UAAU,EAAQ;IACtD,CAAC,EAAW,CAAC,EAET;;AAUT,SAAS,EAAkB,EACzB,SACA,iBACA,UACA,gBACA,gBAAa,MACb,aACA,gBACyB;AAmBzB,QAlBiB,EAAmB,EAAW,GAI3C,kBAAC,GAAD;EAAa;EAAoB;YAC/B,kBAAC,GAAD;GAAc,MAAK;GAAoB;aAAvC,EACI,KAAS,MACT,kBAAC,GAAD,EAAA,UAAA,CACG,KAAS,kBAAC,GAAD,EAAA,UAAa,GAAmB,CAAA,EACzC,KAAe,kBAAC,GAAD,EAAA,UAAmB,GAA+B,CAAA,CACtD,EAAA,CAAA,EAEf,EACY;;EACT,CAAA,GAKV,kBAAC,GAAD;EAAc;EAAoB;YAChC,kBAAC,GAAD;GAA0B;aAA1B,EACI,KAAS,MACT,kBAAC,GAAD,EAAA,UAAA,CACG,KAAS,kBAAC,GAAD,EAAA,UAAc,GAAoB,CAAA,EAC3C,KAAe,kBAAC,GAAD,EAAA,UAAoB,GAAgC,CAAA,CACvD,EAAA,CAAA,EAEhB,EACa;;EACT,CAAA"}
@@ -1,17 +0,0 @@
1
- "use client";
2
- /**
3
- * @deprecated Use `toast` directly from `@devalok/shilp-sutra/ui/toast` or `@devalok/shilp-sutra`.
4
- * This module is provided for back-compatibility during migration.
5
- *
6
- * @example
7
- * // New API (recommended):
8
- * import { toast } from '@devalok/shilp-sutra'
9
- * toast.success('Saved!')
10
- *
11
- * // Old API (deprecated):
12
- * import { toast } from '@devalok/shilp-sutra/hooks/use-toast'
13
- * toast('Something happened')
14
- */
15
- export { toast } from '../ui/toast';
16
- export type { ToastActionOptions, ToastOptions, ToastType, ToastUndoOptions, ToastUploadOptions, UploadFile, } from '../ui/toast-types';
17
- //# sourceMappingURL=use-toast.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-toast.d.ts","sourceRoot":"","sources":["../../src/hooks/use-toast.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,YAAY,EACV,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,GACX,MAAM,mBAAmB,CAAA"}
@@ -1,3 +0,0 @@
1
- "use client";
2
- import { toast as e } from "../ui/toast.js";
3
- export { e as toast };
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var preset_exports = {};
20
- __export(preset_exports, {
21
- default: () => e
22
- });
23
- module.exports = __toCommonJS(preset_exports);
24
- var e = {}, t = false;
25
- function n() {
26
- if (t) return;
27
- t = true;
28
- let e2 = '\n\u26A0\uFE0F [@devalok/shilp-sutra] DEPRECATION: The JS preset at "./tailwind" is deprecated in 0.37.0 and will be removed in 0.38.0.\n\nEvery class utility you relied on from this preset (bg-surface-raised, p-ds-04, shadow-raised, text-ds-md, etc.) is now emitted zero CSS by Tailwind 4. Your app will ship unstyled unless you migrate.\n\nReplace:\n // tailwind.config.ts\n import shilpSutra from "@devalok/shilp-sutra/tailwind"\n export default { presets: [shilpSutra], content: [...] }\n\nwith:\n // app/globals.css\n @import "tailwindcss";\n @import "@devalok/shilp-sutra/css";\n\nFull guide: https://github.com/devalok-design/shilp-sutra/blob/main/MIGRATION.md\n';
29
- try {
30
- if (typeof process < "u" && typeof process.stderr?.write == "function") {
31
- process.stderr.write(e2);
32
- return;
33
- }
34
- } catch {
35
- }
36
- console.warn(e2);
37
- }
38
- n();
39
-
40
- module.exports = module.exports.default;
41
- module.exports.default = module.exports;
@@ -1,2 +0,0 @@
1
- export { default } from './preset';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tailwind/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA"}
@@ -1,2 +0,0 @@
1
- import e from "./preset.js";
2
- export { e as default };
@@ -1,25 +0,0 @@
1
- import { Config } from 'tailwindcss';
2
- /**
3
- * @deprecated Since 0.37.0. Tailwind 4 uses CSS-first configuration via
4
- * `@theme`, `@utility`, and `@custom-variant`, not JavaScript presets.
5
- *
6
- * Migrate to:
7
- *
8
- * ```css
9
- * // app/globals.css
10
- * @import "tailwindcss";
11
- * @import "@devalok/shilp-sutra/css";
12
- * ```
13
- *
14
- * And delete your `tailwind.config.ts` (or shrink it to whatever your own
15
- * app needs — we no longer ask you to reference our preset).
16
- *
17
- * This export remains as a typed no-op so in-flight consumer code that
18
- * still imports it doesn't crash at import time. Scheduled for removal
19
- * in 0.38.0.
20
- *
21
- * See MIGRATION.md at the repo root for the full 0.36 → 0.37 walkthrough.
22
- */
23
- declare const preset: Partial<Config>;
24
- export default preset;
25
- //# sourceMappingURL=preset.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/tailwind/preset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,MAAM,EAAE,OAAO,CAAC,MAAM,CAAM,CAAA;AA8DlC,eAAe,MAAM,CAAA"}
@@ -1,17 +0,0 @@
1
- //#region src/tailwind/preset.ts
2
- var e = {}, t = !1;
3
- function n() {
4
- if (t) return;
5
- t = !0;
6
- let e = "\n⚠️ [@devalok/shilp-sutra] DEPRECATION: The JS preset at \"./tailwind\" is deprecated in 0.37.0 and will be removed in 0.38.0.\n\nEvery class utility you relied on from this preset (bg-surface-raised, p-ds-04, shadow-raised, text-ds-md, etc.) is now emitted zero CSS by Tailwind 4. Your app will ship unstyled unless you migrate.\n\nReplace:\n // tailwind.config.ts\n import shilpSutra from \"@devalok/shilp-sutra/tailwind\"\n export default { presets: [shilpSutra], content: [...] }\n\nwith:\n // app/globals.css\n @import \"tailwindcss\";\n @import \"@devalok/shilp-sutra/css\";\n\nFull guide: https://github.com/devalok-design/shilp-sutra/blob/main/MIGRATION.md\n";
7
- try {
8
- if (typeof process < "u" && typeof process.stderr?.write == "function") {
9
- process.stderr.write(e);
10
- return;
11
- }
12
- } catch {}
13
- console.warn(e);
14
- }
15
- n();
16
- //#endregion
17
- export { e as default };
@@ -1 +0,0 @@
1
- {"version":3,"file":"preset.js","names":[],"sources":["../../src/tailwind/preset.ts"],"sourcesContent":["import type { Config } from 'tailwindcss'\n\n/**\n * @deprecated Since 0.37.0. Tailwind 4 uses CSS-first configuration via\n * `@theme`, `@utility`, and `@custom-variant`, not JavaScript presets.\n *\n * Migrate to:\n *\n * ```css\n * // app/globals.css\n * @import \"tailwindcss\";\n * @import \"@devalok/shilp-sutra/css\";\n * ```\n *\n * And delete your `tailwind.config.ts` (or shrink it to whatever your own\n * app needs — we no longer ask you to reference our preset).\n *\n * This export remains as a typed no-op so in-flight consumer code that\n * still imports it doesn't crash at import time. Scheduled for removal\n * in 0.38.0.\n *\n * See MIGRATION.md at the repo root for the full 0.36 → 0.37 walkthrough.\n */\nconst preset: Partial<Config> = {}\n\n// Emit a one-time deprecation warning so consumers on the old JS-preset\n// setup discover the migration via their build output — not via silent\n// visual breakage in production.\n//\n// Critical: the warning fires in ALL environments including `next build`\n// (NODE_ENV=production). Gating this on NODE_ENV would defeat the whole\n// point — the consumer most likely to ship broken CSS (CI-only pipeline,\n// no local dev loop) is exactly the one who would never see a dev-only\n// warn. Audited 0.37.0-pre-RC; see post-audit commit message.\n//\n// Written to stderr directly (not console.warn) so it survives Next's\n// output filters which can silence console calls during `next build`.\n// Inline process shim so we don't need @types/node in packages/core's\n// tsconfig (typecheck runs with types: []).\ndeclare const process:\n | {\n env?: { NODE_ENV?: string }\n stderr?: { write: (s: string) => void }\n }\n | undefined\nlet warned = false\nfunction emitDeprecationNotice(): void {\n if (warned) return\n warned = true\n const msg =\n '\\n' +\n '⚠️ [@devalok/shilp-sutra] DEPRECATION: The JS preset at \"./tailwind\" is ' +\n 'deprecated in 0.37.0 and will be removed in 0.38.0.\\n\\n' +\n 'Every class utility you relied on from this preset (bg-surface-raised, ' +\n 'p-ds-04, shadow-raised, text-ds-md, etc.) is now emitted zero CSS by ' +\n 'Tailwind 4. Your app will ship unstyled unless you migrate.\\n\\n' +\n 'Replace:\\n' +\n ' // tailwind.config.ts\\n' +\n ' import shilpSutra from \"@devalok/shilp-sutra/tailwind\"\\n' +\n ' export default { presets: [shilpSutra], content: [...] }\\n\\n' +\n 'with:\\n' +\n ' // app/globals.css\\n' +\n ' @import \"tailwindcss\";\\n' +\n ' @import \"@devalok/shilp-sutra/css\";\\n\\n' +\n 'Full guide: https://github.com/devalok-design/shilp-sutra/blob/main/MIGRATION.md\\n'\n\n // Prefer process.stderr for CI visibility; fall back to console.warn\n // in environments where process is not available (browsers, Edge runtime).\n try {\n if (\n typeof process !== 'undefined' &&\n typeof process.stderr?.write === 'function'\n ) {\n process.stderr.write(msg)\n return\n }\n } catch {\n // Fall through to console.warn.\n }\n \n console.warn(msg)\n}\n// Fire when the module is imported (ESM evaluates module body once).\nemitDeprecationNotice()\n\nexport default preset\n"],"mappings":";AAuBA,IAAM,IAA0B,EAAE,EAsB9B,IAAS;AACb,SAAS,IAA8B;AACrC,KAAI,EAAQ;AACZ,KAAS;CACT,IAAM,IACJ;AAkBF,KAAI;AACF,MACE,OAAO,UAAY,OACnB,OAAO,QAAQ,QAAQ,SAAU,YACjC;AACA,WAAQ,OAAO,MAAM,EAAI;AACzB;;SAEI;AAIR,SAAQ,KAAK,EAAI;;AAGnB,GAAuB"}
@@ -1,34 +0,0 @@
1
- # ResponsiveOverlay
2
-
3
- - Import: @devalok/shilp-sutra/composed/responsive-overlay
4
- - Server-safe: No
5
- - Category: composed
6
-
7
- ## Props
8
- open: boolean
9
- onOpenChange: (open: boolean) => void
10
- title: string
11
- description: string
12
- breakpoint: "sm" | "md" (below this renders as bottom Sheet; above as Dialog)
13
- children: ReactNode
14
- className: string
15
-
16
- ## Defaults
17
- breakpoint="md"
18
-
19
- ## Example
20
- ```jsx
21
- <ResponsiveOverlay
22
- open={open}
23
- onOpenChange={setOpen}
24
- title="Edit task"
25
- description="Update the task details"
26
- >
27
- <TaskForm />
28
- </ResponsiveOverlay>
29
- ```
30
-
31
- ## Gotchas
32
- - Renders a centered Dialog on desktop and a bottom Sheet on mobile — same content, different container
33
- - Uses `window.matchMedia` internally — SSR defaults to desktop (Dialog) until hydration
34
- - Title and description are optional; if omitted, no header is rendered in either mode