@boostdev/design-system-components 0.1.2 → 0.1.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.
package/AGENTS.md CHANGED
@@ -39,9 +39,12 @@ Or individual token layers. All component styles live inside `@layer component`.
39
39
  ## Import paths
40
40
 
41
41
  ```ts
42
- // Named exports from the main barrel
42
+ // Named exports plain React / Vite
43
43
  import { Button, Badge, Typography } from '@boostdev/components';
44
44
 
45
+ // Named exports — Next.js / RSC (adds 'use client' to the bundle)
46
+ import { Button, Badge, Typography } from '@boostdev/components/client';
47
+
45
48
  // CSS (import once, at the app root)
46
49
  import '@boostdev/components/css';
47
50
  ```
package/README.md CHANGED
@@ -37,6 +37,25 @@ cascade. You can override any component from outside without specificity fights.
37
37
 
38
38
  ---
39
39
 
40
+ ## Next.js / React Server Components
41
+
42
+ The main `@boostdev/components` entry has no `'use client'` directive. When Next.js evaluates the
43
+ bundle in a React Server Component context, components that call `createContext` (e.g. `Toast`) will
44
+ crash at module evaluation time.
45
+
46
+ Use the `/client` subpath instead — it is identical in API but has `'use client'` prepended to the
47
+ bundle, which tells Next.js to treat it as client-only code:
48
+
49
+ ```ts
50
+ // Plain React / Vite — unchanged
51
+ import { Button, Card } from '@boostdev/components';
52
+
53
+ // Next.js / RSC — use the /client subpath
54
+ import { Button, Card } from '@boostdev/components/client';
55
+ ```
56
+
57
+ ---
58
+
40
59
  ## Usage
41
60
 
42
61
  ### UI components