@discourser/design-system 0.22.1 → 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 (106) hide show
  1. package/dist/{chunk-VJN7TIGL.js → chunk-GLPWI7OF.js} +3 -3
  2. package/dist/chunk-GLPWI7OF.js.map +1 -0
  3. package/dist/{chunk-IGCGVSG4.cjs → chunk-NN4YW27E.cjs} +3 -3
  4. package/dist/chunk-NN4YW27E.cjs.map +1 -0
  5. package/dist/figma-codex.json +2 -2
  6. package/dist/index.cjs +4 -4
  7. package/dist/index.js +1 -1
  8. package/dist/languages/transform.d.ts +1 -1
  9. package/dist/preset/index.cjs +2 -2
  10. package/dist/preset/index.js +1 -1
  11. package/dist/stories/foundations/components/ColorSwatch.d.ts +1 -15
  12. package/dist/stories/foundations/components/ColorSwatch.d.ts.map +1 -1
  13. package/dist/stories/foundations/components/ElevationCard.d.ts +3 -6
  14. package/dist/stories/foundations/components/ElevationCard.d.ts.map +1 -1
  15. package/dist/stories/foundations/components/SpacingBox.d.ts.map +1 -1
  16. package/dist/stories/foundations/components/TypeSpecimen.d.ts +2 -1
  17. package/dist/stories/foundations/components/TypeSpecimen.d.ts.map +1 -1
  18. package/docs/CSS_USAGE.md +235 -0
  19. package/docs/FIGMA_MAKE_SETUP.md +339 -0
  20. package/docs/GUIDELINES_REVIEW.md +728 -0
  21. package/docs/MAINTAINER_CHECKLIST.md +265 -0
  22. package/docs/TESTING_QUICK_REFERENCE.md +159 -0
  23. package/docs/TESTING_TOKENS.md +340 -0
  24. package/docs/active-stories/README.md +29 -0
  25. package/docs/active-stories/STORY-006a-figma-translation-foundations.md +324 -0
  26. package/docs/active-stories/STORY-006b-figma-translation-components.md +201 -0
  27. package/docs/active-stories/STORY-006c-figma-translation-layout-extension.md +258 -0
  28. package/docs/active-stories/STORY-008-kai-sidecar-fragments.md +137 -0
  29. package/docs/active-stories/STORY-011-verify-translation-docs.md +182 -0
  30. package/docs/archive/ARCHITECTURE-discourser-design-system.md +448 -0
  31. package/docs/claude-feed-back/ARCHITECTURE_DIAGRAM.md +243 -0
  32. package/docs/claude-feed-back/STYLING_VERIFICATION.md +89 -0
  33. package/docs/claude-feed-back/TEST_RESULTS.md +182 -0
  34. package/docs/context-share/ELEVATION_FIX_PLAN.md +903 -0
  35. package/docs/context-share/STORY-001-VALIDATION-PASSED.md +192 -0
  36. package/docs/context-share/STORY-002-IMPLEMENTATION-COMPLETE.md +161 -0
  37. package/docs/context-share/STORYBOOK_MCP_STRATEGY.md +867 -0
  38. package/docs/context-share/TESTING_GAPS_FILLED.md +353 -0
  39. package/docs/context-share/TOKEN_TESTING_SUMMARY.md +388 -0
  40. package/docs/context-share/code-connect-prompt.md +90 -0
  41. package/docs/context-share/dds-autonomous-pipeline.md +765 -0
  42. package/docs/context-share/fix-checkbox-radio-tokens.md +145 -0
  43. package/docs/context-share/icon-component-prompt.md +154 -0
  44. package/docs/context-share/icons/Audience.svg +3 -0
  45. package/docs/context-share/icons/AudioSpeaker.svg +3 -0
  46. package/docs/context-share/icons/BookmarkPlus.svg +3 -0
  47. package/docs/context-share/icons/ClipBoard.svg +8 -0
  48. package/docs/context-share/icons/DiscourserLogo.svg +4 -0
  49. package/docs/context-share/icons/ExitStudio.svg +4 -0
  50. package/docs/context-share/icons/Microphone.svg +5 -0
  51. package/docs/context-share/icons/NotebookPen.svg +3 -0
  52. package/docs/context-share/icons/PausePlay.svg +5 -0
  53. package/docs/context-share/icons/Play.svg +4 -0
  54. package/docs/context-share/icons/Record.svg +6 -0
  55. package/docs/context-share/icons/RepeatQuestion.svg +3 -0
  56. package/docs/context-share/icons/ScrollText.svg +3 -0
  57. package/docs/context-share/icons/Sparkles.svg +3 -0
  58. package/docs/context-share/icons/Speech.svg +3 -0
  59. package/docs/context-share/icons/StopPlay.svg +4 -0
  60. package/docs/context-share/icons/Timer.svg +3 -0
  61. package/docs/context-share/icons/UserProfile.svg +3 -0
  62. package/docs/context-share/m3-token-pipeline-audit.md +125 -0
  63. package/docs/context-share/storybook-mcp-kai-agent-revised-summary.md +211 -0
  64. package/docs/discourser-design-system-prd.md +3698 -0
  65. package/docs/figma-captures/01-typography.png +0 -0
  66. package/docs/figma-captures/02-button-iconbutton.png +0 -0
  67. package/docs/figma-captures/03-form-inputs.png +0 -0
  68. package/docs/figma-captures/04-form-controls.png +0 -0
  69. package/docs/figma-captures/05-data-display.png +0 -0
  70. package/docs/figma-captures/06-feedback.png +0 -0
  71. package/docs/figma-captures/07-overlays.png +0 -0
  72. package/docs/figma-captures/08-navigation-layout.png +0 -0
  73. package/docs/figma-captures/09-custom-components.png +0 -0
  74. package/docs/figma-captures/10-scenario-queue.png +0 -0
  75. package/docs/figma-captures/11-icon-library.png +0 -0
  76. package/docs/figma-make-docs/01-understanding-templates.md +235 -0
  77. package/docs/figma-make-docs/02-prerequisites.md +266 -0
  78. package/docs/figma-make-docs/03-creating-template.md +306 -0
  79. package/docs/figma-make-docs/04-adding-guidelines.md +448 -0
  80. package/docs/figma-make-docs/05-example-starter-code.md +590 -0
  81. package/docs/figma-make-docs/06-publishing-template.md +417 -0
  82. package/docs/figma-make-docs/07-maintenance.md +536 -0
  83. package/docs/figma-make-docs/08-faq.md +490 -0
  84. package/docs/figma-make-docs/README.md +95 -0
  85. package/docs/material-theme.json +418 -0
  86. package/docs/plans/2026-03-12-figma-token-export-rewrite.md +504 -0
  87. package/docs/plans/2026-03-12-step7-panda-token-resolution-design.md +119 -0
  88. package/docs/plans/2026-03-12-step7-panda-token-resolution.md +993 -0
  89. package/docs/token-name-mapping.json +850 -0
  90. package/docs/token-name-mapping.md +251 -0
  91. package/package.json +6 -4
  92. package/src/languages/transform.ts +1 -1
  93. package/src/stories/foundations/Borders.stories.tsx +138 -0
  94. package/src/stories/foundations/ColorScale.stories.tsx +737 -0
  95. package/src/stories/foundations/Colors.mdx +2 -131
  96. package/src/stories/foundations/Elevation.mdx +26 -45
  97. package/src/stories/foundations/Motion.stories.tsx +306 -0
  98. package/src/stories/foundations/Shape.stories.tsx +159 -0
  99. package/src/stories/foundations/Spacing.mdx +24 -25
  100. package/src/stories/foundations/Typography.mdx +93 -79
  101. package/src/stories/foundations/components/ColorSwatch.tsx +72 -109
  102. package/src/stories/foundations/components/ElevationCard.tsx +19 -22
  103. package/src/stories/foundations/components/SpacingBox.tsx +15 -2
  104. package/src/stories/foundations/components/TypeSpecimen.tsx +20 -21
  105. package/dist/chunk-IGCGVSG4.cjs.map +0 -1
  106. package/dist/chunk-VJN7TIGL.js.map +0 -1
@@ -0,0 +1,448 @@
1
+ # Adding Guidelines
2
+
3
+ This guide walks you through copying all guideline files from your repository into your Figma Make template.
4
+
5
+ ## Overview
6
+
7
+ **Time Required:** 30-45 minutes
8
+
9
+ **What You'll Do:**
10
+ 1. Access the guidelines folder in Figma Make
11
+ 2. Create the folder structure
12
+ 3. Copy each guideline file
13
+ 4. Verify all files are accessible
14
+
15
+ ## Step 1: Access Guidelines Folder
16
+
17
+ ### 1.1 Open Code Panel
18
+
19
+ 1. In your Figma Make file, click **Code** in the left sidebar
20
+ 2. You should see the file explorer
21
+
22
+ ### 1.2 Locate Guidelines Folder
23
+
24
+ 1. Look for the **guidelines/** folder in the file explorer
25
+ 2. Click to expand it
26
+
27
+ **If the folder doesn't exist:**
28
+ 1. Right-click in the file explorer root
29
+ 2. Select **Create new folder**
30
+ 3. Name it exactly: `guidelines`
31
+
32
+ ### 1.3 Check Existing Contents
33
+
34
+ The folder may already have a default `Guidelines.md` file. We'll replace it with ours.
35
+
36
+ ## Step 2: Create Folder Structure
37
+
38
+ Before copying files, create the nested folder structure:
39
+
40
+ ### 2.1 Create design-tokens Folder
41
+
42
+ 1. Right-click on **guidelines/**
43
+ 2. Select **Create new folder**
44
+ 3. Name it exactly: `design-tokens`
45
+
46
+ ### 2.2 Create components Folder
47
+
48
+ 1. Right-click on **guidelines/**
49
+ 2. Select **Create new folder**
50
+ 3. Name it exactly: `components`
51
+
52
+ ### 2.3 Verify Structure
53
+
54
+ Your file tree should now look like:
55
+ ```
56
+ guidelines/
57
+ ├── design-tokens/
58
+ └── components/
59
+ ```
60
+
61
+ ## Step 3: Copy Main Guidelines File
62
+
63
+ ### 3.1 Open Source File
64
+
65
+ On your local computer:
66
+ 1. Navigate to your repository
67
+ 2. Open: `guidelines/Guidelines.md`
68
+ 3. Select all content (Cmd+A / Ctrl+A)
69
+ 4. Copy to clipboard (Cmd+C / Ctrl+C)
70
+
71
+ ### 3.2 Create/Replace in Figma Make
72
+
73
+ In Figma Make:
74
+ 1. If **Guidelines.md** exists in **guidelines/**, click to open it
75
+ 2. If it doesn't exist:
76
+ - Right-click **guidelines/**
77
+ - Select **Create new file**
78
+ - Name it: `Guidelines.md`
79
+ 3. Delete all existing content
80
+ 4. Paste your copied content (Cmd+V / Ctrl+V)
81
+ 5. Save (Cmd+S / Ctrl+S)
82
+
83
+ ### 3.3 Verify Content
84
+
85
+ Check that the file includes:
86
+ - ✅ "Discourser Design System Guidelines" heading
87
+ - ✅ "IMPORTANT: Always Read These First" section
88
+ - ✅ Core Principles section
89
+ - ✅ Package Imports examples
90
+ - ✅ Quick Reference table
91
+
92
+ ## Step 4: Copy Overview File
93
+
94
+ ### 4.1 Copy overview-components.md
95
+
96
+ **From your repository:**
97
+ 1. Open: `guidelines/overview-components.md`
98
+ 2. Select all (Cmd+A / Ctrl+A)
99
+ 3. Copy (Cmd+C / Ctrl+C)
100
+
101
+ **In Figma Make:**
102
+ 1. Right-click **guidelines/**
103
+ 2. **Create new file**
104
+ 3. Name it: `overview-components.md`
105
+ 4. Paste content (Cmd+V / Ctrl+V)
106
+ 5. Save (Cmd+S / Ctrl+S)
107
+
108
+ ### 4.2 Verify Content
109
+
110
+ Check that the file includes:
111
+ - ✅ "Components Overview" heading
112
+ - ✅ Available Components table
113
+ - ✅ Styling Guidelines section
114
+ - ✅ DO/DO NOT examples
115
+
116
+ ## Step 5: Copy Design Token Files
117
+
118
+ You need to copy 4 files into the `design-tokens/` folder.
119
+
120
+ ### 5.1 Copy colors.md
121
+
122
+ **From repository:** `guidelines/design-tokens/colors.md`
123
+
124
+ **In Figma Make:**
125
+ 1. Right-click **guidelines/design-tokens/**
126
+ 2. **Create new file**
127
+ 3. Name it: `colors.md`
128
+ 4. Paste content
129
+ 5. Save
130
+
131
+ **Verify it contains:**
132
+ - ✅ "Color Tokens" heading
133
+ - ✅ Semantic Colors Reference tables
134
+ - ✅ Usage examples
135
+ - ✅ Light/Dark mode values
136
+
137
+ ### 5.2 Copy typography.md
138
+
139
+ **From repository:** `guidelines/design-tokens/typography.md`
140
+
141
+ **In Figma Make:**
142
+ 1. Right-click **guidelines/design-tokens/**
143
+ 2. **Create new file**
144
+ 3. Name it: `typography.md`
145
+ 4. Paste content
146
+ 5. Save
147
+
148
+ **Verify it contains:**
149
+ - ✅ "Typography Tokens" heading
150
+ - ✅ Font Families table
151
+ - ✅ Type Scale tables (Display, Headline, Title, Body, Label)
152
+ - ✅ Usage examples
153
+
154
+ ### 5.3 Copy spacing.md
155
+
156
+ **From repository:** `guidelines/design-tokens/spacing.md`
157
+
158
+ **In Figma Make:**
159
+ 1. Right-click **guidelines/design-tokens/**
160
+ 2. **Create new file**
161
+ 3. Name it: `spacing.md`
162
+ 4. Paste content
163
+ 5. Save
164
+
165
+ **Verify it contains:**
166
+ - ✅ "Spacing Tokens" heading
167
+ - ✅ Spacing Scale table (none, xxs, xs, sm, md, lg, xl, xxl, xxxl)
168
+ - ✅ Usage patterns
169
+ - ✅ Common use cases
170
+
171
+ ### 5.4 Copy elevation.md
172
+
173
+ **From repository:** `guidelines/design-tokens/elevation.md`
174
+
175
+ **In Figma Make:**
176
+ 1. Right-click **guidelines/design-tokens/**
177
+ 2. **Create new file**
178
+ 3. Name it: `elevation.md`
179
+ 4. Paste content
180
+ 5. Save
181
+
182
+ **Verify it contains:**
183
+ - ✅ "Elevation Tokens" heading
184
+ - ✅ Elevation Levels table (level0-level5)
185
+ - ✅ M3 elevation strategy
186
+ - ✅ Component elevation mapping
187
+
188
+ ## Step 6: Copy Component Files
189
+
190
+ You need to copy 6 component guideline files.
191
+
192
+ ### 6.1 Copy button.md
193
+
194
+ **From repository:** `guidelines/components/button.md`
195
+
196
+ **In Figma Make:**
197
+ 1. Right-click **guidelines/components/**
198
+ 2. **Create new file**
199
+ 3. Name it: `button.md`
200
+ 4. Paste content
201
+ 5. Save
202
+
203
+ **Verify it contains:**
204
+ - ✅ "Button" heading
205
+ - ✅ Variants table (filled, outlined, text, elevated, tonal)
206
+ - ✅ Props table
207
+ - ✅ Examples section
208
+ - ✅ DO NOT section
209
+
210
+ ### 6.2 Copy card.md
211
+
212
+ **From repository:** `guidelines/components/card.md`
213
+
214
+ **In Figma Make:**
215
+ 1. Right-click **guidelines/components/**
216
+ 2. **Create new file**
217
+ 3. Name it: `card.md`
218
+ 4. Paste content
219
+ 5. Save
220
+
221
+ ### 6.3 Copy dialog.md
222
+
223
+ **From repository:** `guidelines/components/dialog.md`
224
+
225
+ **In Figma Make:**
226
+ 1. Right-click **guidelines/components/**
227
+ 2. **Create new file**
228
+ 3. Name it: `dialog.md`
229
+ 4. Paste content
230
+ 5. Save
231
+
232
+ ### 6.4 Copy icon-button.md
233
+
234
+ **From repository:** `guidelines/components/icon-button.md`
235
+
236
+ **In Figma Make:**
237
+ 1. Right-click **guidelines/components/**
238
+ 2. **Create new file**
239
+ 3. Name it: `icon-button.md`
240
+ 4. Paste content
241
+ 5. Save
242
+
243
+ ### 6.5 Copy input.md
244
+
245
+ **From repository:** `guidelines/components/input.md`
246
+
247
+ **In Figma Make:**
248
+ 1. Right-click **guidelines/components/**
249
+ 2. **Create new file**
250
+ 3. Name it: `input.md`
251
+ 4. Paste content
252
+ 5. Save
253
+
254
+ ### 6.6 Copy switch.md
255
+
256
+ **From repository:** `guidelines/components/switch.md`
257
+
258
+ **In Figma Make:**
259
+ 1. Right-click **guidelines/components/**
260
+ 2. **Create new file**
261
+ 3. Name it: `switch.md`
262
+ 4. Paste content
263
+ 5. Save
264
+
265
+ ## Step 7: Verify Complete Structure
266
+
267
+ ### 7.1 Check File Tree
268
+
269
+ Your **guidelines/** folder should now look exactly like this:
270
+
271
+ ```
272
+ guidelines/
273
+ ├── Guidelines.md
274
+ ├── overview-components.md
275
+ ├── design-tokens/
276
+ │ ├── colors.md
277
+ │ ├── typography.md
278
+ │ ├── spacing.md
279
+ │ └── elevation.md
280
+ └── components/
281
+ ├── button.md
282
+ ├── card.md
283
+ ├── dialog.md
284
+ ├── icon-button.md
285
+ ├── input.md
286
+ └── switch.md
287
+ ```
288
+
289
+ **Total files:** 12
290
+
291
+ ### 7.2 Checklist
292
+
293
+ Verify each file exists:
294
+
295
+ **Root level:**
296
+ - [ ] Guidelines.md
297
+ - [ ] overview-components.md
298
+
299
+ **design-tokens/ folder:**
300
+ - [ ] colors.md
301
+ - [ ] typography.md
302
+ - [ ] spacing.md
303
+ - [ ] elevation.md
304
+
305
+ **components/ folder:**
306
+ - [ ] button.md
307
+ - [ ] card.md
308
+ - [ ] dialog.md
309
+ - [ ] icon-button.md
310
+ - [ ] input.md
311
+ - [ ] switch.md
312
+
313
+ **All 12 files present?** ✅ Proceed to testing!
314
+
315
+ ## Step 8: Test Guidelines with AI
316
+
317
+ Now let's verify Figma Make's AI can read and use the guidelines.
318
+
319
+ ### 8.1 Test Component Knowledge
320
+
321
+ 1. Click **Chat** in the left sidebar
322
+ 2. Type: `What components are available in the Discourser Design System?`
323
+ 3. Send the message
324
+
325
+ **Expected response:**
326
+ The AI should list: Button, Card, Dialog, IconButton, Input, Switch
327
+
328
+ **If AI doesn't know:**
329
+ - Check that Guidelines.md and overview-components.md are properly saved
330
+ - Verify file names match exactly (case-sensitive)
331
+ - Try refreshing the Figma Make file
332
+
333
+ ### 8.2 Test Component Details
334
+
335
+ 1. Ask: `How do I use the Button component?`
336
+ 2. The AI should reference:
337
+ - 5 variants (filled, outlined, text, elevated, tonal)
338
+ - 3 sizes (sm, md, lg)
339
+ - Import statement
340
+ - Example usage
341
+
342
+ **If AI gives generic React button info:**
343
+ - Check that components/button.md exists and has content
344
+ - Verify the file is saved
345
+ - Try being more specific: "What Button variants are available?"
346
+
347
+ ### 8.3 Test Design Tokens
348
+
349
+ 1. Ask: `What semantic color tokens should I use?`
350
+ 2. The AI should reference:
351
+ - primary, onPrimary, primaryContainer
352
+ - surface, onSurface
353
+ - error, errorContainer
354
+ - Mention using semantic tokens instead of raw colors
355
+
356
+ **If AI doesn't know about tokens:**
357
+ - Check that design-tokens/colors.md exists
358
+ - Verify the content is pasted correctly
359
+ - Try refreshing
360
+
361
+ ## Common Issues
362
+
363
+ ### Files Not Appearing
364
+
365
+ **Symptom:** Created files don't show in file explorer
366
+
367
+ **Solution:**
368
+ - Wait 5-10 seconds for sync
369
+ - Refresh the Figma Make file
370
+ - Click away and back to **Code** panel
371
+ - Check you created them in the correct folder
372
+
373
+ ### AI Not Using Guidelines
374
+
375
+ **Symptom:** AI gives generic answers, not design-system-specific
376
+
377
+ **Solutions:**
378
+ - Verify all files are saved (no unsaved indicators)
379
+ - Check file names match exactly (case-sensitive)
380
+ - Ensure files have content (not empty)
381
+ - Try asking more specific questions
382
+ - Refresh the Figma Make file
383
+ - Wait 1-2 minutes for AI to index new guidelines
384
+
385
+ ### Copy/Paste Not Working
386
+
387
+ **Symptom:** Can't paste content into files
388
+
389
+ **Solutions:**
390
+ - Try typing a character first, then pasting
391
+ - Use keyboard shortcuts instead of right-click menu
392
+ - Check clipboard has content (paste into notepad first to verify)
393
+ - Try a different browser
394
+ - Reload the Figma Make file
395
+
396
+ ### File Names Incorrect
397
+
398
+ **Symptom:** Files created with wrong extension or name
399
+
400
+ **Solution:**
401
+ - Right-click file → Rename
402
+ - Ensure exact names including:
403
+ - Correct case (lowercase)
404
+ - Correct extension (.md)
405
+ - No extra spaces
406
+ - Delete and recreate if needed
407
+
408
+ ## Tips for Faster Copying
409
+
410
+ ### Batch Preparation
411
+
412
+ Before starting, open all source files in tabs on your local computer. This makes copying faster.
413
+
414
+ ### Use Dual Monitors
415
+
416
+ If you have two monitors:
417
+ - Local files on one monitor
418
+ - Figma Make on the other
419
+ - Copy/paste between them easily
420
+
421
+ ### Keyboard Shortcuts
422
+
423
+ Master these for speed:
424
+ - **Cmd/Ctrl + A** - Select all
425
+ - **Cmd/Ctrl + C** - Copy
426
+ - **Cmd/Ctrl + V** - Paste
427
+ - **Cmd/Ctrl + S** - Save
428
+ - **Right-click** - Context menu
429
+
430
+ ## Checkpoint
431
+
432
+ Before proceeding, verify:
433
+
434
+ - [x] All 12 guideline files copied
435
+ - [x] Folder structure is correct
436
+ - [x] Files contain proper content
437
+ - [x] AI can access and use guidelines
438
+ - [x] No typos in file/folder names
439
+
440
+ **All verified?** ✅ Ready for next step!
441
+
442
+ ## What's Next?
443
+
444
+ With guidelines in place, the AI now knows how to use your design system. Next, we'll add example starter code that demonstrates best practices.
445
+
446
+ **Next:** [Example Starter Code](./05-example-starter-code.md) →
447
+
448
+ **Previous:** [Creating Your Template File](./03-creating-template.md) ←