@opencosmos/ui 1.3.1 → 1.3.3

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 (45) hide show
  1. package/.claude/CLAUDE.md +47 -47
  2. package/README.md +21 -21
  3. package/dist/{hooks-CKW8vE9H.d.ts → hooks-CFPKFXhH.d.ts} +1 -1
  4. package/dist/{hooks-1b8WaQf1.d.mts → hooks-CeAuZ0i5.d.mts} +1 -1
  5. package/dist/hooks.d.mts +1 -1
  6. package/dist/hooks.d.ts +1 -1
  7. package/dist/hooks.js.map +1 -1
  8. package/dist/hooks.mjs.map +1 -1
  9. package/dist/index.d.mts +78 -11
  10. package/dist/index.d.ts +78 -11
  11. package/dist/index.js +585 -342
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +548 -312
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/{providers-CXPDMsl7.d.mts → providers-CzKisd2T.d.mts} +1 -1
  16. package/dist/{providers-Dn_Msjvz.d.ts → providers-D39-kwai.d.ts} +1 -1
  17. package/dist/providers.d.mts +1 -1
  18. package/dist/providers.d.ts +1 -1
  19. package/dist/providers.js.map +1 -1
  20. package/dist/providers.mjs.map +1 -1
  21. package/dist/tokens.js.map +1 -1
  22. package/dist/{utils-Cs04sxth.d.mts → utils-CkatYLG4.d.mts} +1 -1
  23. package/dist/{utils-CIIM7dAC.d.ts → utils-Y1Zi7biA.d.ts} +1 -1
  24. package/dist/utils.d.mts +1 -1
  25. package/dist/utils.d.ts +1 -1
  26. package/dist/utils.js.map +1 -1
  27. package/dist/utils.mjs.map +1 -1
  28. package/package.json +257 -257
  29. package/src/component-registry.ts +4 -4
  30. package/src/components/data-display/CollapsibleCodeBlock.tsx +1 -1
  31. package/src/components/data-display/OpenCosmosIcon.tsx +39 -0
  32. package/src/components/data-display/index.ts +1 -0
  33. package/src/components/layout/AppSidebar.tsx +277 -0
  34. package/src/components/layout/CustomizerPanel.tsx +2 -2
  35. package/src/components/layout/index.ts +1 -0
  36. package/src/hooks/useTheme.ts +1 -1
  37. package/src/hooks.ts +1 -1
  38. package/src/index.ts +6 -4
  39. package/src/lib/store/customizer.ts +1 -1
  40. package/src/lib/store/theme.ts +1 -1
  41. package/src/lib/syntax-parser/index.ts +1 -1
  42. package/src/providers/ThemeProvider.tsx +2 -2
  43. package/src/providers.ts +1 -1
  44. package/src/tokens.ts +3 -3
  45. package/src/utils.ts +1 -1
package/.claude/CLAUDE.md CHANGED
@@ -1,11 +1,11 @@
1
- # @thesage/ui — AI Context
1
+ # @opencosmos/ui — AI Context
2
2
 
3
3
  > 100 accessible React components | Radix UI + Tailwind CSS | 3 themes | TypeScript strict mode | MIT
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- pnpm add @thesage/ui
8
+ pnpm add @opencosmos/ui
9
9
  ```
10
10
 
11
11
  ## Provider Hierarchy (Required)
@@ -13,9 +13,9 @@ pnpm add @thesage/ui
13
13
  Wrap your app root in this exact order:
14
14
 
15
15
  ```tsx
16
- import { ThemeProvider, TooltipProvider } from '@thesage/ui/providers'
17
- import { Toaster } from '@thesage/ui'
18
- import '@thesage/ui/globals.css'
16
+ import { ThemeProvider, TooltipProvider } from '@opencosmos/ui/providers'
17
+ import { Toaster } from '@opencosmos/ui'
18
+ import '@opencosmos/ui/globals.css'
19
19
 
20
20
  export default function RootLayout({ children }) {
21
21
  return (
@@ -33,19 +33,19 @@ export default function RootLayout({ children }) {
33
33
 
34
34
  ```tsx
35
35
  // Main exports (most common)
36
- import { Button, Card, Input, Dialog, Badge } from '@thesage/ui'
36
+ import { Button, Card, Input, Dialog, Badge } from '@opencosmos/ui'
37
37
 
38
38
  // Subpath exports
39
- import { useMotionPreference, useTheme } from '@thesage/ui/hooks'
40
- import { ThemeProvider, TooltipProvider } from '@thesage/ui/providers'
41
- import { cn } from '@thesage/ui/utils'
42
- import { spacing, typography } from '@thesage/ui/tokens'
39
+ import { useMotionPreference, useTheme } from '@opencosmos/ui/hooks'
40
+ import { ThemeProvider, TooltipProvider } from '@opencosmos/ui/providers'
41
+ import { cn } from '@opencosmos/ui/utils'
42
+ import { spacing, typography } from '@opencosmos/ui/tokens'
43
43
 
44
44
  // Heavy/optional features (require peer dependencies)
45
- import { Form, FormField, FormItem } from '@thesage/ui/forms' // react-hook-form + zod
46
- import { Calendar, DatePicker } from '@thesage/ui/dates' // date-fns + react-day-picker
47
- import { DataTable } from '@thesage/ui/tables' // @tanstack/react-table
48
- import { DragDrop } from '@thesage/ui/dnd' // @dnd-kit/*
45
+ import { Form, FormField, FormItem } from '@opencosmos/ui/forms' // react-hook-form + zod
46
+ import { Calendar, DatePicker } from '@opencosmos/ui/dates' // date-fns + react-day-picker
47
+ import { DataTable } from '@opencosmos/ui/tables' // @tanstack/react-table
48
+ import { DragDrop } from '@opencosmos/ui/dnd' // @dnd-kit/*
49
49
  ```
50
50
 
51
51
  ## Themes
@@ -56,7 +56,7 @@ Three themes, each with light and dark modes:
56
56
  - **Volt** — Bold, electric, cyberpunk neon
57
57
 
58
58
  ```tsx
59
- import { useTheme } from '@thesage/ui/hooks'
59
+ import { useTheme } from '@opencosmos/ui/hooks'
60
60
  const { theme, setTheme, mode, setMode } = useTheme()
61
61
  setTheme('volt')
62
62
  setMode('dark')
@@ -67,13 +67,13 @@ setMode('dark')
67
67
  - Use CSS variables: `bg-background`, `text-foreground`, `border-border`
68
68
  - NEVER hardcode colors: no `bg-white`, `text-black`, `bg-neutral-100`
69
69
  - All components accept `className` for Tailwind overrides
70
- - Merge classes with `cn()`: `import { cn } from '@thesage/ui/utils'`
70
+ - Merge classes with `cn()`: `import { cn } from '@opencosmos/ui/utils'`
71
71
 
72
72
  ## Motion
73
73
 
74
74
  Every animation MUST respect user preferences:
75
75
  ```tsx
76
- import { useMotionPreference } from '@thesage/ui/hooks'
76
+ import { useMotionPreference } from '@opencosmos/ui/hooks'
77
77
  const { shouldAnimate, scale } = useMotionPreference()
78
78
  ```
79
79
 
@@ -81,14 +81,14 @@ const { shouldAnimate, scale } = useMotionPreference()
81
81
 
82
82
  | Category | Count | Import | Examples |
83
83
  |----------|-------|--------|----------|
84
- | Actions | 5 | `@thesage/ui` | Button, Toggle, ToggleGroup, Link, Magnetic |
85
- | Forms | 18 | `@thesage/ui` | Input, Textarea, Select, Checkbox, Switch, Slider, Combobox, RadioGroup, Label, SearchBar |
86
- | Navigation | 7 | `@thesage/ui` | Tabs, Breadcrumb, Pagination, NavigationMenu, Menubar, Command |
87
- | Overlays | 8 | `@thesage/ui` | Dialog, AlertDialog, Popover, Tooltip, HoverCard, ContextMenu, DropdownMenu, Drawer |
88
- | Feedback | 6 | `@thesage/ui` | Alert, Toaster/toast, Progress, Skeleton, Spinner |
89
- | Data Display | 14 | `@thesage/ui` | Card, Badge, Avatar, Table, Carousel, AspectRatio, Collapsible, CodeBlock |
90
- | Layout | 8 | `@thesage/ui` | Accordion, Separator, ScrollArea, ResizablePanel, Sheet |
91
- | Features | 3 | `@thesage/ui` | CustomizerPanel, ThemeSwitcher |
84
+ | Actions | 5 | `@opencosmos/ui` | Button, Toggle, ToggleGroup, Link, Magnetic |
85
+ | Forms | 18 | `@opencosmos/ui` | Input, Textarea, Select, Checkbox, Switch, Slider, Combobox, RadioGroup, Label, SearchBar |
86
+ | Navigation | 7 | `@opencosmos/ui` | Tabs, Breadcrumb, Pagination, NavigationMenu, Menubar, Command |
87
+ | Overlays | 8 | `@opencosmos/ui` | Dialog, AlertDialog, Popover, Tooltip, HoverCard, ContextMenu, DropdownMenu, Drawer |
88
+ | Feedback | 6 | `@opencosmos/ui` | Alert, Toaster/toast, Progress, Skeleton, Spinner |
89
+ | Data Display | 14 | `@opencosmos/ui` | Card, Badge, Avatar, Table, Carousel, AspectRatio, Collapsible, CodeBlock |
90
+ | Layout | 8 | `@opencosmos/ui` | Accordion, Separator, ScrollArea, ResizablePanel, Sheet |
91
+ | Features | 3 | `@opencosmos/ui` | CustomizerPanel, ThemeSwitcher |
92
92
 
93
93
  ## High-Frequency Component Quick Reference
94
94
 
@@ -163,7 +163,7 @@ const { shouldAnimate, scale } = useMotionPreference()
163
163
 
164
164
  ### Form (react-hook-form integration)
165
165
  ```tsx
166
- import { Form, FormField, FormItem, FormLabel, FormControl, FormMessage } from '@thesage/ui/forms'
166
+ import { Form, FormField, FormItem, FormLabel, FormControl, FormMessage } from '@opencosmos/ui/forms'
167
167
 
168
168
  <Form {...form}>
169
169
  <FormField control={form.control} name="email" render={({ field }) => (
@@ -180,16 +180,16 @@ import { Form, FormField, FormItem, FormLabel, FormControl, FormMessage } from '
180
180
 
181
181
  | Entrypoint | Size | Peer Deps Required |
182
182
  |------------|------|--------------------|
183
- | `@thesage/ui` (core) | 146 KB | None |
184
- | `@thesage/ui/dates` | 29 KB | date-fns, react-day-picker |
185
- | `@thesage/ui/tokens` | 11 KB | None |
186
- | `@thesage/ui/utils` | 10 KB | None |
187
- | `@thesage/ui/forms` | 9 KB | react-hook-form, zod |
188
- | `@thesage/ui/tables` | 8 KB | @tanstack/react-table |
189
- | `@thesage/ui/dnd` | 8 KB | @dnd-kit/* |
190
- | `@thesage/ui/providers` | 8 KB | None |
191
- | `@thesage/ui/hooks` | 6 KB | None |
192
- | `@thesage/ui/webgl` | 1 KB | framer-motion |
183
+ | `@opencosmos/ui` (core) | 146 KB | None |
184
+ | `@opencosmos/ui/dates` | 29 KB | date-fns, react-day-picker |
185
+ | `@opencosmos/ui/tokens` | 11 KB | None |
186
+ | `@opencosmos/ui/utils` | 10 KB | None |
187
+ | `@opencosmos/ui/forms` | 9 KB | react-hook-form, zod |
188
+ | `@opencosmos/ui/tables` | 8 KB | @tanstack/react-table |
189
+ | `@opencosmos/ui/dnd` | 8 KB | @dnd-kit/* |
190
+ | `@opencosmos/ui/providers` | 8 KB | None |
191
+ | `@opencosmos/ui/hooks` | 6 KB | None |
192
+ | `@opencosmos/ui/webgl` | 1 KB | framer-motion |
193
193
 
194
194
  `sideEffects: false` enables tree-shaking. Heavy features isolated behind subpath exports.
195
195
 
@@ -214,26 +214,26 @@ For gaps SDE doesn't cover, these libraries integrate well:
214
214
  ## Eject (Full Customization)
215
215
 
216
216
  ```bash
217
- npx @thesage/ui eject Button # copies to src/components/ui/Button.tsx
218
- npx @thesage/ui eject Dialog --dir my/dir # custom target
219
- npx @thesage/ui eject --list # list all components
217
+ npx @opencosmos/ui eject Button # copies to src/components/ui/Button.tsx
218
+ npx @opencosmos/ui eject Dialog --dir my/dir # custom target
219
+ npx @opencosmos/ui eject --list # list all components
220
220
  ```
221
221
 
222
222
  Imports are automatically rewritten:
223
223
  - `../../lib/utils` → `./utils` (auto-scaffolded)
224
- - `../../hooks/*` → `@thesage/ui/hooks`
225
- - `../category/*` → `@thesage/ui`
224
+ - `../../hooks/*` → `@opencosmos/ui/hooks`
225
+ - `../category/*` → `@opencosmos/ui`
226
226
 
227
- Ejected components keep working with SDE themes and CSS variables. Also available via MCP tool `eject_component` and web UI at thesage.dev.
227
+ Ejected components keep working with SDE themes and CSS variables. Also available via MCP tool `eject_component` and web UI at opencosmos.ai/studio.
228
228
 
229
229
  ## Full API Reference
230
230
 
231
231
  For complete props, variants, and examples for all 100 components:
232
- - Web: https://thesage.dev/llms-full.txt
233
- - MCP Server: `npx @thesage/mcp` (tools: list_components, search_components, get_component)
232
+ - Web: https://opencosmos.ai/studio/llms-full.txt
233
+ - MCP Server: `npx @opencosmos/mcp` (tools: list_components, search_components, get_component)
234
234
 
235
235
  ## Resources
236
236
 
237
- - Docs: https://thesage.dev/docs
238
- - GitHub: https://github.com/shalomormsby/sage-design-engine
239
- - NPM: https://www.npmjs.com/package/@thesage/ui
237
+ - Docs: https://opencosmos.ai/studio/docs
238
+ - GitHub: https://github.com/shalomormsby/opencosmos-ui
239
+ - NPM: https://www.npmjs.com/package/@opencosmos/ui
package/README.md CHANGED
@@ -1,22 +1,22 @@
1
- # Sage Design Engine (@thesage/ui)
1
+ # OpenCosmos UI (@opencosmos/ui)
2
2
 
3
3
  <div align="center">
4
4
 
5
- [![npm version](https://img.shields.io/npm/v/@thesage/ui?color=indigo&style=flat-square)](https://www.npmjs.com/package/@thesage/ui)
6
- [![License](https://img.shields.io/npm/l/@thesage/ui?color=blue&style=flat-square)](https://github.com/shalomormsby/sage-design-engine/blob/main/LICENSE)
7
- [![Downloads](https://img.shields.io/npm/dt/@thesage/ui?color=teal&style=flat-square)](https://www.npmjs.com/package/@thesage/ui)
5
+ [![npm version](https://img.shields.io/npm/v/@opencosmos/ui?color=indigo&style=flat-square)](https://www.npmjs.com/package/@opencosmos/ui)
6
+ [![License](https://img.shields.io/npm/l/@opencosmos/ui?color=blue&style=flat-square)](https://github.com/shalomormsby/opencosmos-ui/blob/main/LICENSE)
7
+ [![Downloads](https://img.shields.io/npm/dt/@opencosmos/ui?color=teal&style=flat-square)](https://www.npmjs.com/package/@opencosmos/ui)
8
8
 
9
9
  **Sage — Make it Lovable.**
10
10
 
11
11
  Components that feel alive. Themes with real personality. Motion your users control. Designed for humans. Fluent with AI.
12
12
 
13
- [Documentation](https://thesage.dev) | [Components](https://thesage.dev/components) | [GitHub](https://github.com/shalomormsby/sage-design-engine)
13
+ [Documentation](https://opencosmos.ai/studio) | [Components](https://opencosmos.ai/studio/components) | [GitHub](https://github.com/shalomormsby/opencosmos-ui)
14
14
 
15
15
  </div>
16
16
 
17
17
  ---
18
18
 
19
- **Sage Design Engine** is a component library and design system built on **Radix UI** primitives and **Tailwind CSS**. 100 accessible components across 11 functional categories, three distinct themes with runtime switching, and a user-controlled motion system — all wired through a 4-layer design token architecture.
19
+ **OpenCosmos UI** is a component library and design system built on **Radix UI** primitives and **Tailwind CSS**. 100 accessible components across 11 functional categories, three distinct themes with runtime switching, and a user-controlled motion system — all wired through a 4-layer design token architecture.
20
20
 
21
21
  ## Features
22
22
 
@@ -30,7 +30,7 @@ Components that feel alive. Themes with real personality. Motion your users cont
30
30
  ## Installation
31
31
 
32
32
  ```bash
33
- pnpm add @thesage/ui
33
+ pnpm add @opencosmos/ui
34
34
  ```
35
35
 
36
36
  Sage requires **Tailwind CSS** as a styling engine:
@@ -64,7 +64,7 @@ pnpm add @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities
64
64
  module.exports = {
65
65
  content: [
66
66
  "./src/**/*.{ts,tsx}",
67
- "./node_modules/@thesage/ui/dist/**/*.{js,ts,jsx,tsx}"
67
+ "./node_modules/@opencosmos/ui/dist/**/*.{js,ts,jsx,tsx}"
68
68
  ],
69
69
  }
70
70
  ```
@@ -72,13 +72,13 @@ module.exports = {
72
72
  ### Import styles
73
73
 
74
74
  ```tsx
75
- import '@thesage/ui/globals.css';
75
+ import '@opencosmos/ui/globals.css';
76
76
  ```
77
77
 
78
78
  ## Usage
79
79
 
80
80
  ```tsx
81
- import { Button, Card, ThemeProvider } from '@thesage/ui';
81
+ import { Button, Card, ThemeProvider } from '@opencosmos/ui';
82
82
 
83
83
  export default function App() {
84
84
  return (
@@ -101,15 +101,15 @@ export default function App() {
101
101
  ### Subpath imports
102
102
 
103
103
  ```tsx
104
- import { useMotionPreference, useTheme } from '@thesage/ui/hooks'
105
- import { ThemeProvider } from '@thesage/ui/providers'
106
- import { cn } from '@thesage/ui/utils'
104
+ import { useMotionPreference, useTheme } from '@opencosmos/ui/hooks'
105
+ import { ThemeProvider } from '@opencosmos/ui/providers'
106
+ import { cn } from '@opencosmos/ui/utils'
107
107
 
108
108
  // Optional feature imports
109
- import { Form, FormField } from '@thesage/ui/forms'
110
- import { DatePicker } from '@thesage/ui/dates'
111
- import { DataTable } from '@thesage/ui/tables'
112
- import { SortableList } from '@thesage/ui/dnd'
109
+ import { Form, FormField } from '@opencosmos/ui/forms'
110
+ import { DatePicker } from '@opencosmos/ui/dates'
111
+ import { DataTable } from '@opencosmos/ui/tables'
112
+ import { SortableList } from '@opencosmos/ui/dnd'
113
113
  ```
114
114
 
115
115
  ## Component categories
@@ -130,14 +130,14 @@ import { SortableList } from '@thesage/ui/dnd'
130
130
  Need to deeply customize a component? Eject it into your project for full ownership:
131
131
 
132
132
  ```bash
133
- npx @thesage/ui eject Button
134
- npx @thesage/ui eject Dialog --dir components/sage
135
- npx @thesage/ui eject --list # see all available components
133
+ npx @opencosmos/ui eject Button
134
+ npx @opencosmos/ui eject Dialog --dir components/sage
135
+ npx @opencosmos/ui eject --list # see all available components
136
136
  ```
137
137
 
138
138
  This copies the component source into your project with imports automatically rewritten. The ejected component still works with Sage themes and CSS variables — you just own the code now.
139
139
 
140
- You can also eject from [thesage.dev](https://thesage.dev) — every component page has an **Eject** button that lets you copy or download the source directly.
140
+ You can also eject from [opencosmos.ai/studio](https://opencosmos.ai/studio) — every component page has an **Eject** button that lets you copy or download the source directly.
141
141
 
142
142
  ## Bundle size
143
143
 
@@ -208,7 +208,7 @@ declare function useForm<T extends Record<string, any>>({ initialValues, validat
208
208
 
209
209
  /**
210
210
  * Hooks subpath export
211
- * Allows: import { ... } from '@thesage/ui/hooks'
211
+ * Allows: import { ... } from '@opencosmos/ui/hooks'
212
212
  */
213
213
 
214
214
  type hooks_MotionPreference = MotionPreference;
@@ -208,7 +208,7 @@ declare function useForm<T extends Record<string, any>>({ initialValues, validat
208
208
 
209
209
  /**
210
210
  * Hooks subpath export
211
- * Allows: import { ... } from '@thesage/ui/hooks'
211
+ * Allows: import { ... } from '@opencosmos/ui/hooks'
212
212
  */
213
213
 
214
214
  type hooks_MotionPreference = MotionPreference;
package/dist/hooks.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- export { M as MotionPreference, T as ThemeHook, U as UseFormOptions, a as UseFormReturn, u as useForm, b as useMotionPreference, c as useTheme } from './hooks-1b8WaQf1.mjs';
1
+ export { M as MotionPreference, T as ThemeHook, U as UseFormOptions, a as UseFormReturn, u as useForm, b as useMotionPreference, c as useTheme } from './hooks-CeAuZ0i5.mjs';
2
2
  import './index-DscTIrZ2.mjs';
3
3
  import './validation-Bj1ye-v_.mjs';
package/dist/hooks.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { M as MotionPreference, T as ThemeHook, U as UseFormOptions, a as UseFormReturn, u as useForm, b as useMotionPreference, c as useTheme } from './hooks-CKW8vE9H.js';
1
+ export { M as MotionPreference, T as ThemeHook, U as UseFormOptions, a as UseFormReturn, u as useForm, b as useMotionPreference, c as useTheme } from './hooks-CFPKFXhH.js';
2
2
  import './index-DscTIrZ2.js';
3
3
  import './validation-Bj1ye-v_.js';