@discourser/design-system 0.22.2 → 0.22.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 (75) hide show
  1. package/dist/figma-codex.json +2 -2
  2. package/docs/CSS_USAGE.md +235 -0
  3. package/docs/FIGMA_MAKE_SETUP.md +339 -0
  4. package/docs/GUIDELINES_REVIEW.md +728 -0
  5. package/docs/MAINTAINER_CHECKLIST.md +265 -0
  6. package/docs/TESTING_QUICK_REFERENCE.md +159 -0
  7. package/docs/TESTING_TOKENS.md +340 -0
  8. package/docs/active-stories/README.md +29 -0
  9. package/docs/active-stories/STORY-006a-figma-translation-foundations.md +324 -0
  10. package/docs/active-stories/STORY-006b-figma-translation-components.md +201 -0
  11. package/docs/active-stories/STORY-006c-figma-translation-layout-extension.md +258 -0
  12. package/docs/active-stories/STORY-008-kai-sidecar-fragments.md +137 -0
  13. package/docs/active-stories/STORY-011-verify-translation-docs.md +182 -0
  14. package/docs/archive/ARCHITECTURE-discourser-design-system.md +448 -0
  15. package/docs/claude-feed-back/ARCHITECTURE_DIAGRAM.md +243 -0
  16. package/docs/claude-feed-back/STYLING_VERIFICATION.md +89 -0
  17. package/docs/claude-feed-back/TEST_RESULTS.md +182 -0
  18. package/docs/context-share/ELEVATION_FIX_PLAN.md +903 -0
  19. package/docs/context-share/STORY-001-VALIDATION-PASSED.md +192 -0
  20. package/docs/context-share/STORY-002-IMPLEMENTATION-COMPLETE.md +161 -0
  21. package/docs/context-share/STORYBOOK_MCP_STRATEGY.md +867 -0
  22. package/docs/context-share/TESTING_GAPS_FILLED.md +353 -0
  23. package/docs/context-share/TOKEN_TESTING_SUMMARY.md +388 -0
  24. package/docs/context-share/code-connect-prompt.md +90 -0
  25. package/docs/context-share/dds-autonomous-pipeline.md +765 -0
  26. package/docs/context-share/fix-checkbox-radio-tokens.md +145 -0
  27. package/docs/context-share/icon-component-prompt.md +154 -0
  28. package/docs/context-share/icons/Audience.svg +3 -0
  29. package/docs/context-share/icons/AudioSpeaker.svg +3 -0
  30. package/docs/context-share/icons/BookmarkPlus.svg +3 -0
  31. package/docs/context-share/icons/ClipBoard.svg +8 -0
  32. package/docs/context-share/icons/DiscourserLogo.svg +4 -0
  33. package/docs/context-share/icons/ExitStudio.svg +4 -0
  34. package/docs/context-share/icons/Microphone.svg +5 -0
  35. package/docs/context-share/icons/NotebookPen.svg +3 -0
  36. package/docs/context-share/icons/PausePlay.svg +5 -0
  37. package/docs/context-share/icons/Play.svg +4 -0
  38. package/docs/context-share/icons/Record.svg +6 -0
  39. package/docs/context-share/icons/RepeatQuestion.svg +3 -0
  40. package/docs/context-share/icons/ScrollText.svg +3 -0
  41. package/docs/context-share/icons/Sparkles.svg +3 -0
  42. package/docs/context-share/icons/Speech.svg +3 -0
  43. package/docs/context-share/icons/StopPlay.svg +4 -0
  44. package/docs/context-share/icons/Timer.svg +3 -0
  45. package/docs/context-share/icons/UserProfile.svg +3 -0
  46. package/docs/context-share/m3-token-pipeline-audit.md +125 -0
  47. package/docs/context-share/storybook-mcp-kai-agent-revised-summary.md +211 -0
  48. package/docs/discourser-design-system-prd.md +3698 -0
  49. package/docs/figma-captures/01-typography.png +0 -0
  50. package/docs/figma-captures/02-button-iconbutton.png +0 -0
  51. package/docs/figma-captures/03-form-inputs.png +0 -0
  52. package/docs/figma-captures/04-form-controls.png +0 -0
  53. package/docs/figma-captures/05-data-display.png +0 -0
  54. package/docs/figma-captures/06-feedback.png +0 -0
  55. package/docs/figma-captures/07-overlays.png +0 -0
  56. package/docs/figma-captures/08-navigation-layout.png +0 -0
  57. package/docs/figma-captures/09-custom-components.png +0 -0
  58. package/docs/figma-captures/10-scenario-queue.png +0 -0
  59. package/docs/figma-captures/11-icon-library.png +0 -0
  60. package/docs/figma-make-docs/01-understanding-templates.md +235 -0
  61. package/docs/figma-make-docs/02-prerequisites.md +266 -0
  62. package/docs/figma-make-docs/03-creating-template.md +306 -0
  63. package/docs/figma-make-docs/04-adding-guidelines.md +448 -0
  64. package/docs/figma-make-docs/05-example-starter-code.md +590 -0
  65. package/docs/figma-make-docs/06-publishing-template.md +417 -0
  66. package/docs/figma-make-docs/07-maintenance.md +536 -0
  67. package/docs/figma-make-docs/08-faq.md +490 -0
  68. package/docs/figma-make-docs/README.md +95 -0
  69. package/docs/material-theme.json +418 -0
  70. package/docs/plans/2026-03-12-figma-token-export-rewrite.md +504 -0
  71. package/docs/plans/2026-03-12-step7-panda-token-resolution-design.md +119 -0
  72. package/docs/plans/2026-03-12-step7-panda-token-resolution.md +993 -0
  73. package/docs/token-name-mapping.json +850 -0
  74. package/docs/token-name-mapping.md +251 -0
  75. package/package.json +3 -2
@@ -0,0 +1,243 @@
1
+ # Design System Architecture: Current vs. Correct
2
+
3
+ ## Current (Broken) Architecture
4
+
5
+ ```
6
+ ┌─────────────────────────────────────────────────────────────┐
7
+ │ @discourser/design-system (Published Package) │
8
+ │ │
9
+ │ ┌──────────────┐ ┌─────────────────┐ ┌──────────────┐│
10
+ │ │ src/preset/ │ │ src/components/ │ │ styled- ││
11
+ │ │ index.ts │───│ Button.tsx │ │ system/ ││
12
+ │ │ │ │ │ │ ││
13
+ │ │ (defines │ │ import { button}│──▶│ (GENERATED ││
14
+ │ │ tokens, │ │ from 'styled- │ │ during build││
15
+ │ │ recipes) │ │ system/recipes' │ │ published ││
16
+ │ └──────────────┘ └─────────────────┘ │ to npm) ❌ ││
17
+ │ └──────────────┘│
18
+ └─────────────────────────────────────────────────────────────┘
19
+
20
+ │ npm install
21
+
22
+ ┌─────────────────────────────────────────────────────────────┐
23
+ │ Consumer App (discourser.ai) │
24
+ │ │
25
+ │ ┌────────────────────┐ ┌──────────────────────────────┐ │
26
+ │ │ panda.config.ts │ │ node_modules/ │ │
27
+ │ │ │ │ @discourser/ │ │
28
+ │ │ presets: [ │ │ design-system/ │ │
29
+ │ │ discourserPanda │───│ styled-system/ ❌ │ │
30
+ │ │ Preset │ │ (outdated, wrong tokens) │ │
31
+ │ │ ] │ │ │ │
32
+ │ └────────────────────┘ └──────────────────────────────┘ │
33
+ │ │
34
+ │ ❌ PROBLEM: Consumer tries to import from │
35
+ │ @discourser/design-system/styled-system/* │
36
+ │ but that was generated for the design system's build, │
37
+ │ not the consumer's app │
38
+ └─────────────────────────────────────────────────────────────┘
39
+ ```
40
+
41
+ **Why This Fails:**
42
+ 1. Components in design system import from `styled-system/recipes`
43
+ 2. That `styled-system/` folder is built for the design system project
44
+ 3. Published to npm alongside components
45
+ 4. Consumer imports components, which reference a `styled-system/` that doesn't match their app
46
+ 5. Token references break, recipes don't align with consumer's configuration
47
+
48
+ ---
49
+
50
+ ## Correct Architecture: Preset-Only
51
+
52
+ ```
53
+ ┌─────────────────────────────────────────────────────────────┐
54
+ │ @discourser/design-system (Published Package) │
55
+ │ │
56
+ │ ┌──────────────────────────────────────────────────────┐ │
57
+ │ │ dist/preset/index.js │ │
58
+ │ │ │ │
59
+ │ │ export const discourserPandaPreset = { │ │
60
+ │ │ name: 'discourser-material3-preset', │ │
61
+ │ │ theme: { │ │
62
+ │ │ extend: { │ │
63
+ │ │ tokens: { │ │
64
+ │ │ colors: { /* M3 palettes */ }, │ │
65
+ │ │ spacing: { /* M3 spacing */ }, │ │
66
+ │ │ // ... all token definitions │ │
67
+ │ │ }, │ │
68
+ │ │ recipes: { │ │
69
+ │ │ button: { /* button recipe */ }, │ │
70
+ │ │ input: { /* input recipe */ }, │ │
71
+ │ │ // ... all recipe definitions │ │
72
+ │ │ } │ │
73
+ │ │ } │ │
74
+ │ │ } │ │
75
+ │ │ } │ │
76
+ │ └──────────────────────────────────────────────────────┘ │
77
+ │ │
78
+ │ ✅ NO styled-system/ folder published │
79
+ │ ✅ NO components published (or see Alternative below) │
80
+ │ ✅ Only preset configuration as JavaScript/TypeScript │
81
+ └─────────────────────────────────────────────────────────────┘
82
+
83
+ │ npm install
84
+
85
+ ┌─────────────────────────────────────────────────────────────┐
86
+ │ Consumer App (discourser.ai) │
87
+ │ │
88
+ │ ┌─────────────────────────────────────────────────────┐ │
89
+ │ │ panda.config.ts │ │
90
+ │ │ │ │
91
+ │ │ import { discourserPandaPreset } │ │
92
+ │ │ from '@discourser/design-system/preset' │ │
93
+ │ │ │ │
94
+ │ │ export default defineConfig({ │ │
95
+ │ │ presets: [discourserPandaPreset], │ │
96
+ │ │ include: ['./src/**/*.{ts,tsx}'], │ │
97
+ │ │ outdir: 'styled-system' ────────────┐ │ │
98
+ │ │ }) │ │ │
99
+ │ └───────────────────────────────────────┼─────────────┘ │
100
+ │ │ │
101
+ │ ▼ │
102
+ │ ┌───────────────────────────────────────────────────┐ │
103
+ │ │ pnpm panda codegen │ │
104
+ │ │ │ │
105
+ │ │ Generates styled-system/ in consumer's project: │ │
106
+ │ │ │ │
107
+ │ │ styled-system/ │ │
108
+ │ │ ├── css/ ← CSS utility functions │ │
109
+ │ │ ├── tokens/ ← M3 tokens from preset │ │
110
+ │ │ ├── recipes/ ← Button, input recipes │ │
111
+ │ │ └── patterns/ ← Layout patterns │ │
112
+ │ │ │ │
113
+ │ │ ✅ Generated locally for THIS app │ │
114
+ │ │ ✅ Uses tokens/recipes from preset │ │
115
+ │ │ ✅ Can add app-specific overrides │ │
116
+ │ └───────────────────────────────────────────────────┘ │
117
+ │ │ │
118
+ │ ▼ │
119
+ │ ┌───────────────────────────────────────────────────┐ │
120
+ │ │ Consumer builds their own components │ │
121
+ │ │ │ │
122
+ │ │ import { button } from 'styled-system/recipes' │ │
123
+ │ │ │ │
124
+ │ │ export function Button({ variant, ...props }) { │ │
125
+ │ │ return ( │ │
126
+ │ │ <button │ │
127
+ │ │ className={button({ variant })} │ │
128
+ │ │ {...props} │ │
129
+ │ │ /> │ │
130
+ │ │ ) │ │
131
+ │ │ } │ │
132
+ │ │ │ │
133
+ │ │ ✅ Uses THEIR styled-system/ (local) │ │
134
+ │ │ ✅ Full control over components │ │
135
+ │ │ ✅ Can customize as needed │ │
136
+ │ └───────────────────────────────────────────────────┘ │
137
+ └─────────────────────────────────────────────────────────────┘
138
+ ```
139
+
140
+ ---
141
+
142
+ ## Alternative: Preset + Component Examples
143
+
144
+ If you want to help consumers with pre-built components:
145
+
146
+ ```
147
+ ┌─────────────────────────────────────────────────────────────┐
148
+ │ @discourser/design-system (Published Package) │
149
+ │ │
150
+ │ ┌──────────────────┐ ┌──────────────────────────────┐ │
151
+ │ │ dist/preset/ │ │ examples/ (in published pkg) │ │
152
+ │ │ index.js │ │ │ │
153
+ │ │ │ │ Button.example.tsx │ │
154
+ │ │ (preset config) │ │ Input.example.tsx │ │
155
+ │ │ │ │ Card.example.tsx │ │
156
+ │ │ ✅ Build-time │ │ │ │
157
+ │ │ configuration │ │ ✅ Reference implementations │ │
158
+ │ └──────────────────┘ │ ✅ Copy-paste ready │ │
159
+ │ │ ✅ Use consumer's │ │
160
+ │ │ styled-system/ │ │
161
+ │ └──────────────────────────────┘ │
162
+ └─────────────────────────────────────────────────────────────┘
163
+
164
+ │ npm install
165
+
166
+ ┌─────────────────────────────────────────────────────────────┐
167
+ │ Consumer App │
168
+ │ │
169
+ │ 1. Import preset in panda.config.ts │
170
+ │ 2. Run panda codegen │
171
+ │ 3. Copy examples from node_modules/.../examples/ │
172
+ │ 4. Customize as needed │
173
+ │ │
174
+ │ ✅ Full flexibility │
175
+ │ ✅ No dependency hell │
176
+ │ ✅ Examples as documentation │
177
+ └─────────────────────────────────────────────────────────────┘
178
+ ```
179
+
180
+ ---
181
+
182
+ ## Key Principles
183
+
184
+ ### ✅ Correct Approach
185
+
186
+ 1. **Preset = Configuration Only**
187
+ - Token definitions (colors, spacing, typography)
188
+ - Recipe definitions (button variants, input styles)
189
+ - Semantic tokens (surface, primary, onPrimary)
190
+ - Theme extensions
191
+ - NO generated code
192
+ - NO styled-system/
193
+
194
+ 2. **Consumer Generates styled-system/**
195
+ - Runs `panda codegen` with your preset
196
+ - Gets their own `styled-system/` folder
197
+ - Matches their app configuration
198
+ - Can add overrides/extensions
199
+
200
+ 3. **Components Are Consumer Responsibility**
201
+ - OR provide as examples to copy
202
+ - OR publish separately as static CSS components
203
+ - Never mix runtime components with Panda preset
204
+
205
+ ### ❌ What NOT to Do
206
+
207
+ 1. **Don't Publish styled-system/**
208
+ - It's generated for YOUR project
209
+ - Won't work in consumer projects
210
+ - Creates conflicts and confusion
211
+
212
+ 2. **Don't Import styled-system/ in Published Components**
213
+ - If components are published, they can't reference styled-system/
214
+ - Must use static CSS or CSS modules instead
215
+
216
+ 3. **Don't Make @pandacss/dev a Regular Dependency**
217
+ - Must be peerDependency
218
+ - Prevents version conflicts
219
+ - Allows consumers to control Panda version
220
+
221
+ ---
222
+
223
+ ## Migration Summary
224
+
225
+ ### Remove from Published Package
226
+ - ❌ `styled-system/` folder
227
+ - ❌ Components that import from `styled-system/*`
228
+ - ❌ tsup plugin that rewrites styled-system imports
229
+
230
+ ### Keep in Published Package
231
+ - ✅ Preset configuration (`dist/preset/index.js`)
232
+ - ✅ Type definitions (`DesignLanguageContract`)
233
+ - ✅ Language utilities (for advanced users)
234
+
235
+ ### Update package.json
236
+ - ✅ Move `@pandacss/dev` to peerDependencies
237
+ - ✅ Remove `styled-system` from files array
238
+ - ✅ Export only `dist/` folder
239
+
240
+ ### Documentation
241
+ - ✅ README with usage examples
242
+ - ✅ Example components consumers can copy
243
+ - ✅ Migration guide from 0.9.x to 1.0.0
@@ -0,0 +1,89 @@
1
+ # Button Styling Verification - Material 3 Design System
2
+
3
+ ## Issue Resolution Summary
4
+
5
+ The buttons in the Next.js app (localhost:3000) are now rendering correctly with Material 3 styling from the @discourser/design-system package.
6
+
7
+ ## Root Cause
8
+
9
+ The initial styling issue was caused by:
10
+ 1. Incorrect preset import path in `panda.config.ts` (importing from main export instead of `/preset`)
11
+ 2. Wrong `include` paths scanning `dist/` instead of `src/` files
12
+ 3. Stale `styled-system/` directory needed regeneration
13
+
14
+ ## Fix Applied
15
+
16
+ Updated `/Users/willstreeter/WebstormProjects/vibe-coding/shifu-project/discourser.ai/panda.config.ts`:
17
+
18
+ ```typescript
19
+ // Before
20
+ import { discourserPandaPreset } from '@discourser/design-system';
21
+ include: ['./node_modules/@discourser/design-system/dist/**/*.{js,cjs}']
22
+
23
+ // After
24
+ import { discourserPandaPreset } from '@discourser/design-system/preset';
25
+ include: ['./node_modules/@discourser/design-system/src/**/*.{ts,tsx}']
26
+ ```
27
+
28
+ Then regenerated: `pnpm panda codegen`
29
+
30
+ ## Verification Results
31
+
32
+ ### Button Styles Applied Correctly
33
+
34
+ **Logout Button** (variant="outline"):
35
+ - CSS Classes: `button button--variant_outline button--size_md color-palette_primary`
36
+ - Background: `rgba(63, 105, 0, 0.094)` (translucent olive)
37
+ - Border: `1px solid rgba(63, 105, 0, 0.392)` (olive border)
38
+ - Text Color: `rgba(63, 105, 0, 0.8)` (olive text)
39
+ - Border Radius: `6px`
40
+ - Font: `Poppins, "Poppins Fallback"`
41
+
42
+ **Log In Button** (variant="solid"):
43
+ - CSS Classes: `button button--variant_solid button--size_md color-palette_primary`
44
+ - Background: `rgb(63, 105, 0)` (solid olive/Material 3 primary)
45
+ - Text Color: `rgb(255, 255, 255)` (white)
46
+ - Border: `0px` (no border for solid)
47
+ - Border Radius: `6px`
48
+ - Font: `Poppins, "Poppins Fallback"`
49
+
50
+ **Sign Up Button** (variant="outline"):
51
+ - Same styling as Logout button (outline variant)
52
+
53
+ ### Material 3 Primary Color
54
+
55
+ The olive/green color `rgb(63, 105, 0)` is the Material 3 primary color from the design system's token configuration, correctly applied across all variants.
56
+
57
+ ## Component Code
58
+
59
+ ### page.tsx (localhost:3000)
60
+ ```tsx
61
+ <Button variant="solid">Log In</Button>
62
+ <Button variant="outline">Sign Up</Button>
63
+ ```
64
+
65
+ ### LogoutButton.tsx
66
+ ```tsx
67
+ <Button variant="outline" colorPalette="primary" loading={isLoading}>
68
+ {isLoading ? 'Logging out...' : 'Logout'}
69
+ </Button>
70
+ ```
71
+
72
+ ## CSS Loading Chain
73
+
74
+ 1. `/Users/willstreeter/.../discourser.ai/src/app/layout.tsx` imports `./globals.css`
75
+ 2. `globals.css` imports `@discourser/design-system/styles.css`
76
+ 3. Design system styles.css contains all Panda CSS generated styles
77
+ 4. Consumer app's `styled-system/` contains locally generated styles from preset
78
+
79
+ ## Comparison: Storybook vs Next.js App
80
+
81
+ Both environments now display identical Material 3 button styling:
82
+ - ✅ Solid variant: Olive background with white text
83
+ - ✅ Outline variant: Olive border and text with transparent background
84
+ - ✅ Proper border radius, padding, and typography
85
+ - ✅ Color palette correctly applied
86
+
87
+ ## Status: ✅ RESOLVED
88
+
89
+ The design system is now working correctly in the consuming Next.js application. All buttons render with proper Material 3 styling using the olive color palette defined in the design system's tokens.
@@ -0,0 +1,182 @@
1
+ # Test Implementation Results
2
+
3
+ ## ✅ Build & Deployment Complete
4
+
5
+ ### What Was Done
6
+
7
+ 1. **✅ Built Design System**
8
+ - Panda codegen → styled-system/
9
+ - tsup → dist/ (ESM + CJS)
10
+ - TypeScript types → dist/**/*.d.ts
11
+ - CSS generation → dist/styles.css
12
+
13
+ 2. **✅ Updated Consumer Imports (31 files)**
14
+ - Changed from `import { Button } from '@discourser/design-system'`
15
+ - To `import { Button } from '@discourser/design-system/Button'`
16
+ - 59 imports across 31 files updated
17
+
18
+ 3. **✅ Copied to Consumer App**
19
+ - dist/ → node_modules/@discourser/design-system/dist/ (209 files)
20
+ - styled-system/ → node_modules/@discourser/design-system/styled-system/ (185 files)
21
+ - src/components/ → node_modules/@discourser/design-system/src/components/
22
+
23
+ ### Files Deployed
24
+
25
+ **Total size:** ~3.1 MB
26
+ - dist/ (1.3 MB) - Compiled JavaScript + TypeScript definitions
27
+ - styled-system/ (1.8 MB) - Panda CSS generated code
28
+
29
+ ### Next Steps: Testing
30
+
31
+ #### 1. Verify Imports Work
32
+
33
+ Try importing a component in discourser.ai:
34
+
35
+ ```typescript
36
+ // discourser.ai/src/test.tsx
37
+ import { Button } from '@discourser/design-system/Button'
38
+ import * as Card from '@discourser/design-system/Card'
39
+
40
+ export function TestPage() {
41
+ return (
42
+ <div>
43
+ <Button variant="filled" size="md">Test Button</Button>
44
+ <Card.Root>
45
+ <Card.Body>
46
+ <Card.Title>Test Card</Card.Title>
47
+ </Card.Body>
48
+ </Card.Root>
49
+ </div>
50
+ )
51
+ }
52
+ ```
53
+
54
+ #### 2. Start Dev Server
55
+
56
+ ```bash
57
+ cd /Users/willstreeter/WebstormProjects/vibe-coding/shifu-project/discourser.ai
58
+ pnpm dev
59
+ ```
60
+
61
+ #### 3. Check for Errors
62
+
63
+ Look for:
64
+ - ✅ No import resolution errors
65
+ - ✅ Components render correctly
66
+ - ✅ Styles are applied
67
+ - ✅ Ark UI behaviors work (dialogs, tooltips, etc.)
68
+
69
+ #### 4. Verify Deep Imports
70
+
71
+ Test that tree-shaking works:
72
+
73
+ ```typescript
74
+ // Only imports Button code, not the entire library
75
+ import { Button } from '@discourser/design-system/Button'
76
+ ```
77
+
78
+ #### 5. Test Namespace Components
79
+
80
+ Components exported as namespaces:
81
+
82
+ ```typescript
83
+ import * as Card from '@discourser/design-system/Card'
84
+ import * as Dialog from '@discourser/design-system/Dialog'
85
+ import * as RadioGroup from '@discourser/design-system/RadioGroup'
86
+ import * as Switch from '@discourser/design-system/Switch'
87
+ import * as Select from '@discourser/design-system/Select'
88
+ import * as Slider from '@discourser/design-system/Slider'
89
+ import * as Checkbox from '@discourser/design-system/Checkbox'
90
+ import * as Avatar from '@discourser/design-system/Avatar'
91
+ import * as Progress from '@discourser/design-system/Progress'
92
+ import * as Skeleton from '@discourser/design-system/Skeleton'
93
+ import * as Popover from '@discourser/design-system/Popover'
94
+ import * as Tooltip from '@discourser/design-system/Tooltip'
95
+ import * as Tabs from '@discourser/design-system/Tabs'
96
+ import * as Accordion from '@discourser/design-system/Accordion'
97
+ import * as Drawer from '@discourser/design-system/Drawer'
98
+ ```
99
+
100
+ ### Expected Behavior
101
+
102
+ **✅ Working:**
103
+ - Components import without errors
104
+ - TypeScript autocomplete works
105
+ - Components render with correct styles
106
+ - Ark UI interactions work (dialogs open/close, tooltips show, etc.)
107
+ - Dark mode toggle works
108
+ - All Material 3 colors are applied
109
+
110
+ **❌ If You See Errors:**
111
+
112
+ 1. **"Cannot find module '@discourser/design-system/Button'"**
113
+ - Check package.json exports are correct
114
+ - Verify src/components/Button.tsx exists in node_modules
115
+
116
+ 2. **"Cannot find module '@discourser/design-system/styled-system/css'"**
117
+ - Verify styled-system/ folder was copied
118
+ - Check styled-system/css/index.mjs exists
119
+
120
+ 3. **Components render but no styles**
121
+ - Import the CSS: `import '@discourser/design-system/styles.css'`
122
+ - Or ensure Panda CSS is processing the components
123
+
124
+ 4. **TypeScript errors in components**
125
+ - Check @ark-ui/react is installed in consumer app
126
+ - Verify React 19+ is installed
127
+
128
+ ### Troubleshooting Commands
129
+
130
+ ```bash
131
+ # Verify files exist
132
+ ls -la /Users/willstreeter/WebstormProjects/vibe-coding/shifu-project/discourser.ai/node_modules/@discourser/design-system/
133
+
134
+ # Check dist exists
135
+ ls /Users/willstreeter/WebstormProjects/vibe-coding/shifu-project/discourser.ai/node_modules/@discourser/design-system/dist/
136
+
137
+ # Check styled-system exists
138
+ ls /Users/willstreeter/WebstormProjects/vibe-coding/shifu-project/discourser.ai/node_modules/@discourser/design-system/styled-system/
139
+
140
+ # Check components exist
141
+ ls /Users/willstreeter/WebstormProjects/vibe-coding/shifu-project/discourser.ai/node_modules/@discourser/design-system/src/components/
142
+ ```
143
+
144
+ ### What Changed in Consumer App
145
+
146
+ **Files Modified:** 31 files in discourser.ai/src/
147
+
148
+ **Import Pattern Changes:**
149
+
150
+ Before:
151
+ ```typescript
152
+ import { Button, Card, Header } from '@discourser/design-system';
153
+ ```
154
+
155
+ After:
156
+ ```typescript
157
+ import { Button } from '@discourser/design-system/Button';
158
+ import * as Card from '@discourser/design-system/Card';
159
+ import { Header } from '@discourser/design-system/Header';
160
+ ```
161
+
162
+ ### Success Criteria
163
+
164
+ - [ ] Dev server starts without errors
165
+ - [ ] Components import successfully
166
+ - [ ] Components render visually
167
+ - [ ] Styles are applied (Material 3 colors)
168
+ - [ ] Interactive components work (buttons click, dialogs open, etc.)
169
+ - [ ] TypeScript types work (autocomplete, type checking)
170
+ - [ ] Dark mode works
171
+ - [ ] No console errors
172
+
173
+ ### If Everything Works
174
+
175
+ The implementation is successful! You can now:
176
+ 1. Continue development with the new import pattern
177
+ 2. Publish the design system to npm
178
+ 3. Use across Next.js, Electron, React Native Web
179
+
180
+ ### If There Are Issues
181
+
182
+ Report back what errors you see and I'll help debug!