@triptease/design-system-mcp 1.0.19 → 1.0.20

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 (205) hide show
  1. package/dist/index.js +28985 -0
  2. package/package.json +20 -13
  3. package/CHANGELOG.md +0 -192
  4. package/dist/package.json +0 -44
  5. package/dist/src/index.d.ts +0 -2
  6. package/dist/src/index.js +0 -66
  7. package/dist/src/index.js.map +0 -1
  8. package/dist/src/manifests/components/entries/badge.d.ts +0 -27
  9. package/dist/src/manifests/components/entries/badge.js +0 -43
  10. package/dist/src/manifests/components/entries/badge.js.map +0 -1
  11. package/dist/src/manifests/components/entries/banner.d.ts +0 -23
  12. package/dist/src/manifests/components/entries/banner.js +0 -68
  13. package/dist/src/manifests/components/entries/banner.js.map +0 -1
  14. package/dist/src/manifests/components/entries/barChart.d.ts +0 -74
  15. package/dist/src/manifests/components/entries/barChart.js +0 -128
  16. package/dist/src/manifests/components/entries/barChart.js.map +0 -1
  17. package/dist/src/manifests/components/entries/button.d.ts +0 -40
  18. package/dist/src/manifests/components/entries/button.js +0 -59
  19. package/dist/src/manifests/components/entries/button.js.map +0 -1
  20. package/dist/src/manifests/components/entries/card.d.ts +0 -25
  21. package/dist/src/manifests/components/entries/card.js +0 -42
  22. package/dist/src/manifests/components/entries/card.js.map +0 -1
  23. package/dist/src/manifests/components/entries/checkbox.d.ts +0 -31
  24. package/dist/src/manifests/components/entries/checkbox.js +0 -64
  25. package/dist/src/manifests/components/entries/checkbox.js.map +0 -1
  26. package/dist/src/manifests/components/entries/combobox.d.ts +0 -65
  27. package/dist/src/manifests/components/entries/combobox.js +0 -177
  28. package/dist/src/manifests/components/entries/combobox.js.map +0 -1
  29. package/dist/src/manifests/components/entries/datePicker.d.ts +0 -35
  30. package/dist/src/manifests/components/entries/datePicker.js +0 -68
  31. package/dist/src/manifests/components/entries/datePicker.js.map +0 -1
  32. package/dist/src/manifests/components/entries/dateRangePicker.d.ts +0 -35
  33. package/dist/src/manifests/components/entries/dateRangePicker.js +0 -111
  34. package/dist/src/manifests/components/entries/dateRangePicker.js.map +0 -1
  35. package/dist/src/manifests/components/entries/dialog.d.ts +0 -39
  36. package/dist/src/manifests/components/entries/dialog.js +0 -74
  37. package/dist/src/manifests/components/entries/dialog.js.map +0 -1
  38. package/dist/src/manifests/components/entries/lineChart.d.ts +0 -87
  39. package/dist/src/manifests/components/entries/lineChart.js +0 -166
  40. package/dist/src/manifests/components/entries/lineChart.js.map +0 -1
  41. package/dist/src/manifests/components/entries/numberinput.d.ts +0 -52
  42. package/dist/src/manifests/components/entries/numberinput.js +0 -64
  43. package/dist/src/manifests/components/entries/numberinput.js.map +0 -1
  44. package/dist/src/manifests/components/entries/radio.d.ts +0 -31
  45. package/dist/src/manifests/components/entries/radio.js +0 -50
  46. package/dist/src/manifests/components/entries/radio.js.map +0 -1
  47. package/dist/src/manifests/components/entries/select.d.ts +0 -16
  48. package/dist/src/manifests/components/entries/select.js +0 -23
  49. package/dist/src/manifests/components/entries/select.js.map +0 -1
  50. package/dist/src/manifests/components/entries/statistic.d.ts +0 -21
  51. package/dist/src/manifests/components/entries/statistic.js +0 -69
  52. package/dist/src/manifests/components/entries/statistic.js.map +0 -1
  53. package/dist/src/manifests/components/entries/table.d.ts +0 -16
  54. package/dist/src/manifests/components/entries/table.js +0 -43
  55. package/dist/src/manifests/components/entries/table.js.map +0 -1
  56. package/dist/src/manifests/components/entries/textarea.d.ts +0 -40
  57. package/dist/src/manifests/components/entries/textarea.js +0 -54
  58. package/dist/src/manifests/components/entries/textarea.js.map +0 -1
  59. package/dist/src/manifests/components/entries/textinput.d.ts +0 -40
  60. package/dist/src/manifests/components/entries/textinput.js +0 -53
  61. package/dist/src/manifests/components/entries/textinput.js.map +0 -1
  62. package/dist/src/manifests/components/entries/toggle.d.ts +0 -23
  63. package/dist/src/manifests/components/entries/toggle.js +0 -30
  64. package/dist/src/manifests/components/entries/toggle.js.map +0 -1
  65. package/dist/src/manifests/components/entries/typography.d.ts +0 -23
  66. package/dist/src/manifests/components/entries/typography.js +0 -32
  67. package/dist/src/manifests/components/entries/typography.js.map +0 -1
  68. package/dist/src/manifests/components/index.d.ts +0 -2
  69. package/dist/src/manifests/components/index.js +0 -43
  70. package/dist/src/manifests/components/index.js.map +0 -1
  71. package/dist/src/manifests/components/types.d.ts +0 -57
  72. package/dist/src/manifests/components/types.js +0 -2
  73. package/dist/src/manifests/components/types.js.map +0 -1
  74. package/dist/src/resources/components/get.d.ts +0 -7
  75. package/dist/src/resources/components/get.js +0 -29
  76. package/dist/src/resources/components/get.js.map +0 -1
  77. package/dist/src/resources/components/index.d.ts +0 -2
  78. package/dist/src/resources/components/index.js +0 -3
  79. package/dist/src/resources/components/index.js.map +0 -1
  80. package/dist/src/resources/components/list.d.ts +0 -7
  81. package/dist/src/resources/components/list.js +0 -19
  82. package/dist/src/resources/components/list.js.map +0 -1
  83. package/dist/src/resources/guides/index.d.ts +0 -2
  84. package/dist/src/resources/guides/index.js +0 -3
  85. package/dist/src/resources/guides/index.js.map +0 -1
  86. package/dist/src/resources/guides/principles.d.ts +0 -60
  87. package/dist/src/resources/guides/principles.js +0 -158
  88. package/dist/src/resources/guides/principles.js.map +0 -1
  89. package/dist/src/resources/guides/setup.d.ts +0 -7
  90. package/dist/src/resources/guides/setup.js +0 -54
  91. package/dist/src/resources/guides/setup.js.map +0 -1
  92. package/dist/src/resources/index.d.ts +0 -3
  93. package/dist/src/resources/index.js +0 -4
  94. package/dist/src/resources/index.js.map +0 -1
  95. package/dist/src/resources/tokens/get.d.ts +0 -7
  96. package/dist/src/resources/tokens/get.js +0 -30
  97. package/dist/src/resources/tokens/get.js.map +0 -1
  98. package/dist/src/resources/tokens/index.d.ts +0 -2
  99. package/dist/src/resources/tokens/index.js +0 -3
  100. package/dist/src/resources/tokens/index.js.map +0 -1
  101. package/dist/src/resources/tokens/list.d.ts +0 -7
  102. package/dist/src/resources/tokens/list.js +0 -21
  103. package/dist/src/resources/tokens/list.js.map +0 -1
  104. package/dist/src/tools/getCSSTokens/handler.d.ts +0 -6
  105. package/dist/src/tools/getCSSTokens/handler.js +0 -29
  106. package/dist/src/tools/getCSSTokens/handler.js.map +0 -1
  107. package/dist/src/tools/getCSSTokens/index.d.ts +0 -12
  108. package/dist/src/tools/getCSSTokens/index.js +0 -14
  109. package/dist/src/tools/getCSSTokens/index.js.map +0 -1
  110. package/dist/src/tools/getCSSTokens/utils.d.ts +0 -5
  111. package/dist/src/tools/getCSSTokens/utils.js +0 -25
  112. package/dist/src/tools/getCSSTokens/utils.js.map +0 -1
  113. package/dist/src/tools/getComponentDocs/handler.d.ts +0 -6
  114. package/dist/src/tools/getComponentDocs/handler.js +0 -27
  115. package/dist/src/tools/getComponentDocs/handler.js.map +0 -1
  116. package/dist/src/tools/getComponentDocs/index.d.ts +0 -12
  117. package/dist/src/tools/getComponentDocs/index.js +0 -14
  118. package/dist/src/tools/getComponentDocs/index.js.map +0 -1
  119. package/dist/src/tools/getSetupGuide/handler.d.ts +0 -6
  120. package/dist/src/tools/getSetupGuide/handler.js +0 -50
  121. package/dist/src/tools/getSetupGuide/handler.js.map +0 -1
  122. package/dist/src/tools/getSetupGuide/index.d.ts +0 -12
  123. package/dist/src/tools/getSetupGuide/index.js +0 -17
  124. package/dist/src/tools/getSetupGuide/index.js.map +0 -1
  125. package/dist/src/tools/getSetupGuide/setupGuides.d.ts +0 -12
  126. package/dist/src/tools/getSetupGuide/setupGuides.js +0 -49
  127. package/dist/src/tools/getSetupGuide/setupGuides.js.map +0 -1
  128. package/dist/src/tools/listCSSTokens/handler.d.ts +0 -3
  129. package/dist/src/tools/listCSSTokens/handler.js +0 -20
  130. package/dist/src/tools/listCSSTokens/handler.js.map +0 -1
  131. package/dist/src/tools/listCSSTokens/index.d.ts +0 -8
  132. package/dist/src/tools/listCSSTokens/index.js +0 -10
  133. package/dist/src/tools/listCSSTokens/index.js.map +0 -1
  134. package/dist/src/tools/listComponents/handler.d.ts +0 -3
  135. package/dist/src/tools/listComponents/handler.js +0 -18
  136. package/dist/src/tools/listComponents/handler.js.map +0 -1
  137. package/dist/src/tools/listComponents/index.d.ts +0 -9
  138. package/dist/src/tools/listComponents/index.js +0 -11
  139. package/dist/src/tools/listComponents/index.js.map +0 -1
  140. package/dist/src/utils/buildCDNUrls.d.ts +0 -3
  141. package/dist/src/utils/buildCDNUrls.js +0 -6
  142. package/dist/src/utils/buildCDNUrls.js.map +0 -1
  143. package/src/index.ts +0 -127
  144. package/src/manifests/components/entries/badge.ts +0 -45
  145. package/src/manifests/components/entries/banner.ts +0 -69
  146. package/src/manifests/components/entries/barChart.ts +0 -135
  147. package/src/manifests/components/entries/button.ts +0 -61
  148. package/src/manifests/components/entries/card.ts +0 -43
  149. package/src/manifests/components/entries/checkbox.ts +0 -68
  150. package/src/manifests/components/entries/combobox.ts +0 -185
  151. package/src/manifests/components/entries/datePicker.ts +0 -74
  152. package/src/manifests/components/entries/dateRangePicker.ts +0 -119
  153. package/src/manifests/components/entries/dialog.ts +0 -78
  154. package/src/manifests/components/entries/lineChart.ts +0 -177
  155. package/src/manifests/components/entries/numberinput.ts +0 -66
  156. package/src/manifests/components/entries/radio.ts +0 -53
  157. package/src/manifests/components/entries/select.ts +0 -24
  158. package/src/manifests/components/entries/statistic.ts +0 -72
  159. package/src/manifests/components/entries/table.ts +0 -44
  160. package/src/manifests/components/entries/textarea.ts +0 -56
  161. package/src/manifests/components/entries/textinput.ts +0 -55
  162. package/src/manifests/components/entries/toggle.ts +0 -31
  163. package/src/manifests/components/entries/typography.ts +0 -33
  164. package/src/manifests/components/index.ts +0 -45
  165. package/src/manifests/components/types.ts +0 -65
  166. package/src/resources/components/get.test.ts +0 -39
  167. package/src/resources/components/get.ts +0 -35
  168. package/src/resources/components/index.ts +0 -2
  169. package/src/resources/components/list.test.ts +0 -40
  170. package/src/resources/components/list.ts +0 -20
  171. package/src/resources/guides/index.ts +0 -2
  172. package/src/resources/guides/principles.ts +0 -160
  173. package/src/resources/guides/setup.test.ts +0 -72
  174. package/src/resources/guides/setup.ts +0 -66
  175. package/src/resources/index.ts +0 -3
  176. package/src/resources/tokens/get.test.ts +0 -41
  177. package/src/resources/tokens/get.ts +0 -36
  178. package/src/resources/tokens/index.ts +0 -2
  179. package/src/resources/tokens/list.test.ts +0 -42
  180. package/src/resources/tokens/list.ts +0 -31
  181. package/src/tools/getCSSTokens/__snapshots__/handler.test.ts.snap +0 -78
  182. package/src/tools/getCSSTokens/handler.test.ts +0 -39
  183. package/src/tools/getCSSTokens/handler.ts +0 -36
  184. package/src/tools/getCSSTokens/index.ts +0 -15
  185. package/src/tools/getCSSTokens/utils.ts +0 -31
  186. package/src/tools/getComponentDocs/__snapshots__/handler.test.ts.snap +0 -23
  187. package/src/tools/getComponentDocs/handler.test.ts +0 -14
  188. package/src/tools/getComponentDocs/handler.ts +0 -34
  189. package/src/tools/getComponentDocs/index.ts +0 -15
  190. package/src/tools/getSetupGuide/__snapshots__/handler.test.ts.snap +0 -34
  191. package/src/tools/getSetupGuide/handler.test.ts +0 -20
  192. package/src/tools/getSetupGuide/handler.ts +0 -59
  193. package/src/tools/getSetupGuide/index.ts +0 -20
  194. package/src/tools/getSetupGuide/setupGuides.ts +0 -62
  195. package/src/tools/listCSSTokens/__snapshots__/handler.test.ts.snap +0 -12
  196. package/src/tools/listCSSTokens/handler.test.ts +0 -9
  197. package/src/tools/listCSSTokens/handler.ts +0 -32
  198. package/src/tools/listCSSTokens/index.ts +0 -12
  199. package/src/tools/listComponents/__snapshots__/handler.test.ts.snap +0 -12
  200. package/src/tools/listComponents/handler.test.ts +0 -9
  201. package/src/tools/listComponents/handler.ts +0 -20
  202. package/src/tools/listComponents/index.ts +0 -12
  203. package/src/utils/buildCDNUrls.ts +0 -7
  204. package/tsconfig.json +0 -12
  205. package/vitest.config.ts +0 -6
@@ -1,3 +0,0 @@
1
- export { getSetupGuide } from './setup.js';
2
- export { getPrinciplesGuide } from './principles.js';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/guides/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { getSetupGuide } from './setup.js';\nexport { getPrinciplesGuide } from './principles.js';\n"]}
@@ -1,60 +0,0 @@
1
- export declare const designSystemPrinciples: {
2
- overview: {
3
- corePrinciple: string;
4
- philosophy: string;
5
- };
6
- cssClassUsage: {
7
- defaultApproach: string;
8
- do: string[];
9
- dont: string[];
10
- };
11
- verificationWorkflow: {
12
- description: string;
13
- steps: string[];
14
- };
15
- whenToWriteCustomCSS: {
16
- description: string;
17
- scenarios: string[];
18
- notValidReasons: string[];
19
- };
20
- compositionPatterns: {
21
- description: string;
22
- patterns: {
23
- pattern: string;
24
- example: string;
25
- explanation: string;
26
- }[];
27
- };
28
- designTokens: {
29
- description: string;
30
- principle: string;
31
- examples: {
32
- wrong: string;
33
- right: string;
34
- why: string;
35
- }[];
36
- };
37
- commonMistakes: {
38
- description: string;
39
- mistakes: {
40
- mistake: string;
41
- problem: string;
42
- solution: string;
43
- prevention: string;
44
- }[];
45
- };
46
- resources: {
47
- description: string;
48
- available: {
49
- resource: string;
50
- purpose: string;
51
- }[];
52
- };
53
- };
54
- export declare const getPrinciplesGuide: () => Promise<{
55
- contents: {
56
- uri: string;
57
- mimeType: string;
58
- text: string;
59
- }[];
60
- }>;
@@ -1,158 +0,0 @@
1
- export const designSystemPrinciples = {
2
- overview: {
3
- corePrinciple: 'Trust the design system. Components and classes are fully styled and production-ready. Use them as-is.',
4
- philosophy: 'The design system handles styling, spacing, colors, and layouts. Your role is to compose components, not recreate their styling.',
5
- },
6
- cssClassUsage: {
7
- defaultApproach: 'Use existing classes without writing additional CSS',
8
- do: [
9
- 'Use classes as-is without extra styling (e.g., <div class="card">)',
10
- 'Check component documentation BEFORE writing any custom CSS',
11
- 'Compose with multiple classes when needed (e.g., class="card stat-card")',
12
- 'Override using CSS variables when provided (e.g., style="--card-padding: var(--space-scale-4)")',
13
- 'Trust that design system classes include ALL necessary styling (layout, spacing, colors, shadows)',
14
- ],
15
- dont: [
16
- "Don't duplicate CSS that classes already provide (border, background, padding, etc.)",
17
- "Don't create new classes without checking if design system has it",
18
- "Don't assume classes need additional styling - verify in docs first",
19
- "Don't override design tokens with hardcoded values (use CSS variables instead)",
20
- "Don't add wrapper divs just to style - compose classes directly",
21
- ],
22
- },
23
- verificationWorkflow: {
24
- description: 'Follow this workflow BEFORE writing any custom CSS',
25
- steps: [
26
- '1. Check: Does the design system have this component? (Query designsystem://components)',
27
- '2. Read: What does the component provide? (Check component docs)',
28
- '3. Use: Apply the class without custom CSS first',
29
- '4. Test: Does it work as-is? (Usually yes!)',
30
- '5. Customize: Only if truly needed, use CSS variables or add modifier classes',
31
- ],
32
- },
33
- whenToWriteCustomCSS: {
34
- description: 'Write custom CSS only in these scenarios',
35
- scenarios: [
36
- 'User explicitly requests custom/unique styling',
37
- 'Design system genuinely lacks the needed component',
38
- 'Truly unique layout requirements that cannot be solved with existing classes or composition',
39
- 'Dashboard-specific or app-specific layout patterns (grids, specialized containers)',
40
- ],
41
- notValidReasons: [
42
- 'Not valid: "I need a card with padding" - .card already has padding',
43
- 'Not valid: "I need a button with a border" - button already has borders',
44
- 'Not valid: "I need spacing between elements" - use design system spacing tokens',
45
- ],
46
- },
47
- compositionPatterns: {
48
- description: 'How to combine design system classes effectively',
49
- patterns: [
50
- {
51
- pattern: 'Base + Modifier',
52
- example: '<div class="card stat-card">',
53
- explanation: 'Use base design system class (card) + your modifier class (stat-card) for extensions',
54
- },
55
- {
56
- pattern: 'CSS Variable Override',
57
- example: '<div class="card" style="--card-padding: var(--space-scale-5)">',
58
- explanation: 'Override CSS variables for customization without duplicating styles',
59
- },
60
- {
61
- pattern: 'Multiple Design System Classes',
62
- example: '<button class="primary large">',
63
- explanation: 'Compose multiple utility/variant classes from design system',
64
- },
65
- ],
66
- },
67
- designTokens: {
68
- description: 'Use design tokens instead of hardcoded values',
69
- principle: 'All spacing, colors, typography should use CSS custom properties (--*)',
70
- examples: [
71
- {
72
- wrong: 'padding: 24px',
73
- right: 'padding: var(--space-scale-3)',
74
- why: 'Tokens ensure consistency and enable theming',
75
- },
76
- {
77
- wrong: 'color: #DA0707',
78
- right: 'color: var(--color-alert-400)',
79
- why: 'Semantic tokens communicate intent and adapt to themes',
80
- },
81
- {
82
- wrong: 'font-size: 16px',
83
- right: 'font-size: var(--font-size-300)',
84
- why: 'Typography scale ensures visual hierarchy',
85
- },
86
- ],
87
- },
88
- commonMistakes: {
89
- description: 'Common mistakes developers make (and how to avoid them)',
90
- mistakes: [
91
- {
92
- mistake: 'Recreating .card styling',
93
- problem: 'Duplicating background, border, padding, shadows that .card already provides',
94
- solution: 'Use <div class="card"> directly. It includes everything.',
95
- prevention: 'Read component docs BEFORE writing CSS',
96
- },
97
- {
98
- mistake: 'Adding wrapper divs for styling',
99
- problem: '<div class="my-wrapper"><div class="card">...</div></div>',
100
- solution: 'Style the card directly: <div class="card my-modifier">',
101
- prevention: 'Compose classes instead of wrapping',
102
- },
103
- {
104
- mistake: 'Hardcoding spacing values',
105
- problem: 'margin: 16px; gap: 12px;',
106
- solution: 'margin: var(--space-scale-2); gap: var(--space-scale-1-5);',
107
- prevention: 'Query designsystem://tokens/space for available values',
108
- },
109
- {
110
- mistake: 'Assuming classes are incomplete',
111
- problem: 'Adding display: flex, border: 1px solid, etc. to classes that already have these',
112
- solution: "Trust the design system. Check docs to see what's included.",
113
- prevention: 'Default assumption: classes are complete, not partial',
114
- },
115
- ],
116
- },
117
- resources: {
118
- description: 'MCP resources for discovering design system capabilities',
119
- available: [
120
- {
121
- resource: 'designsystem://components',
122
- purpose: 'List all available components',
123
- },
124
- {
125
- resource: 'designsystem://components/{name}',
126
- purpose: 'Get detailed component documentation',
127
- },
128
- {
129
- resource: 'designsystem://tokens',
130
- purpose: 'List all token categories',
131
- },
132
- {
133
- resource: 'designsystem://tokens/{category}',
134
- purpose: 'Get tokens for specific category (color, space, font, etc.)',
135
- },
136
- {
137
- resource: 'designsystem://guides/setup',
138
- purpose: 'Installation instructions',
139
- },
140
- {
141
- resource: 'designsystem://guides/principles',
142
- purpose: 'This guide - design system usage principles',
143
- },
144
- ],
145
- },
146
- };
147
- export const getPrinciplesGuide = async () => {
148
- return {
149
- contents: [
150
- {
151
- uri: 'designsystem://guides/principles',
152
- mimeType: 'application/json',
153
- text: JSON.stringify(designSystemPrinciples, null, 2),
154
- },
155
- ],
156
- };
157
- };
158
- //# sourceMappingURL=principles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"principles.js","sourceRoot":"","sources":["../../../../src/resources/guides/principles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,QAAQ,EAAE;QACR,aAAa,EACX,wGAAwG;QAC1G,UAAU,EACR,kIAAkI;KACrI;IACD,aAAa,EAAE;QACb,eAAe,EAAE,qDAAqD;QACtE,EAAE,EAAE;YACF,oEAAoE;YACpE,6DAA6D;YAC7D,0EAA0E;YAC1E,iGAAiG;YACjG,mGAAmG;SACpG;QACD,IAAI,EAAE;YACJ,sFAAsF;YACtF,mEAAmE;YACnE,qEAAqE;YACrE,gFAAgF;YAChF,iEAAiE;SAClE;KACF;IACD,oBAAoB,EAAE;QACpB,WAAW,EAAE,oDAAoD;QACjE,KAAK,EAAE;YACL,yFAAyF;YACzF,kEAAkE;YAClE,kDAAkD;YAClD,6CAA6C;YAC7C,+EAA+E;SAChF;KACF;IACD,oBAAoB,EAAE;QACpB,WAAW,EAAE,0CAA0C;QACvD,SAAS,EAAE;YACT,gDAAgD;YAChD,oDAAoD;YACpD,6FAA6F;YAC7F,oFAAoF;SACrF;QACD,eAAe,EAAE;YACf,qEAAqE;YACrE,yEAAyE;YACzE,iFAAiF;SAClF;KACF;IACD,mBAAmB,EAAE;QACnB,WAAW,EAAE,kDAAkD;QAC/D,QAAQ,EAAE;YACR;gBACE,OAAO,EAAE,iBAAiB;gBAC1B,OAAO,EAAE,8BAA8B;gBACvC,WAAW,EAAE,sFAAsF;aACpG;YACD;gBACE,OAAO,EAAE,uBAAuB;gBAChC,OAAO,EAAE,iEAAiE;gBAC1E,WAAW,EAAE,qEAAqE;aACnF;YACD;gBACE,OAAO,EAAE,gCAAgC;gBACzC,OAAO,EAAE,gCAAgC;gBACzC,WAAW,EAAE,6DAA6D;aAC3E;SACF;KACF;IACD,YAAY,EAAE;QACZ,WAAW,EAAE,+CAA+C;QAC5D,SAAS,EAAE,wEAAwE;QACnF,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,eAAe;gBACtB,KAAK,EAAE,+BAA+B;gBACtC,GAAG,EAAE,8CAA8C;aACpD;YACD;gBACE,KAAK,EAAE,gBAAgB;gBACvB,KAAK,EAAE,+BAA+B;gBACtC,GAAG,EAAE,wDAAwD;aAC9D;YACD;gBACE,KAAK,EAAE,iBAAiB;gBACxB,KAAK,EAAE,iCAAiC;gBACxC,GAAG,EAAE,2CAA2C;aACjD;SACF;KACF;IACD,cAAc,EAAE;QACd,WAAW,EAAE,yDAAyD;QACtE,QAAQ,EAAE;YACR;gBACE,OAAO,EAAE,0BAA0B;gBACnC,OAAO,EAAE,8EAA8E;gBACvF,QAAQ,EAAE,0DAA0D;gBACpE,UAAU,EAAE,wCAAwC;aACrD;YACD;gBACE,OAAO,EAAE,iCAAiC;gBAC1C,OAAO,EAAE,2DAA2D;gBACpE,QAAQ,EAAE,yDAAyD;gBACnE,UAAU,EAAE,qCAAqC;aAClD;YACD;gBACE,OAAO,EAAE,2BAA2B;gBACpC,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,4DAA4D;gBACtE,UAAU,EAAE,wDAAwD;aACrE;YACD;gBACE,OAAO,EAAE,iCAAiC;gBAC1C,OAAO,EAAE,kFAAkF;gBAC3F,QAAQ,EAAE,6DAA6D;gBACvE,UAAU,EAAE,uDAAuD;aACpE;SACF;KACF;IACD,SAAS,EAAE;QACT,WAAW,EAAE,0DAA0D;QACvE,SAAS,EAAE;YACT;gBACE,QAAQ,EAAE,2BAA2B;gBACrC,OAAO,EAAE,+BAA+B;aACzC;YACD;gBACE,QAAQ,EAAE,kCAAkC;gBAC5C,OAAO,EAAE,sCAAsC;aAChD;YACD;gBACE,QAAQ,EAAE,uBAAuB;gBACjC,OAAO,EAAE,2BAA2B;aACrC;YACD;gBACE,QAAQ,EAAE,kCAAkC;gBAC5C,OAAO,EAAE,6DAA6D;aACvE;YACD;gBACE,QAAQ,EAAE,6BAA6B;gBACvC,OAAO,EAAE,2BAA2B;aACrC;YACD;gBACE,QAAQ,EAAE,kCAAkC;gBAC5C,OAAO,EAAE,6CAA6C;aACvD;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,IAAI,EAAE;IAC3C,OAAO;QACL,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,kCAAkC;gBACvC,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,sBAAsB,EAAE,IAAI,EAAE,CAAC,CAAC;aACtD;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["export const designSystemPrinciples = {\n overview: {\n corePrinciple:\n 'Trust the design system. Components and classes are fully styled and production-ready. Use them as-is.',\n philosophy:\n 'The design system handles styling, spacing, colors, and layouts. Your role is to compose components, not recreate their styling.',\n },\n cssClassUsage: {\n defaultApproach: 'Use existing classes without writing additional CSS',\n do: [\n 'Use classes as-is without extra styling (e.g., <div class=\"card\">)',\n 'Check component documentation BEFORE writing any custom CSS',\n 'Compose with multiple classes when needed (e.g., class=\"card stat-card\")',\n 'Override using CSS variables when provided (e.g., style=\"--card-padding: var(--space-scale-4)\")',\n 'Trust that design system classes include ALL necessary styling (layout, spacing, colors, shadows)',\n ],\n dont: [\n \"Don't duplicate CSS that classes already provide (border, background, padding, etc.)\",\n \"Don't create new classes without checking if design system has it\",\n \"Don't assume classes need additional styling - verify in docs first\",\n \"Don't override design tokens with hardcoded values (use CSS variables instead)\",\n \"Don't add wrapper divs just to style - compose classes directly\",\n ],\n },\n verificationWorkflow: {\n description: 'Follow this workflow BEFORE writing any custom CSS',\n steps: [\n '1. Check: Does the design system have this component? (Query designsystem://components)',\n '2. Read: What does the component provide? (Check component docs)',\n '3. Use: Apply the class without custom CSS first',\n '4. Test: Does it work as-is? (Usually yes!)',\n '5. Customize: Only if truly needed, use CSS variables or add modifier classes',\n ],\n },\n whenToWriteCustomCSS: {\n description: 'Write custom CSS only in these scenarios',\n scenarios: [\n 'User explicitly requests custom/unique styling',\n 'Design system genuinely lacks the needed component',\n 'Truly unique layout requirements that cannot be solved with existing classes or composition',\n 'Dashboard-specific or app-specific layout patterns (grids, specialized containers)',\n ],\n notValidReasons: [\n 'Not valid: \"I need a card with padding\" - .card already has padding',\n 'Not valid: \"I need a button with a border\" - button already has borders',\n 'Not valid: \"I need spacing between elements\" - use design system spacing tokens',\n ],\n },\n compositionPatterns: {\n description: 'How to combine design system classes effectively',\n patterns: [\n {\n pattern: 'Base + Modifier',\n example: '<div class=\"card stat-card\">',\n explanation: 'Use base design system class (card) + your modifier class (stat-card) for extensions',\n },\n {\n pattern: 'CSS Variable Override',\n example: '<div class=\"card\" style=\"--card-padding: var(--space-scale-5)\">',\n explanation: 'Override CSS variables for customization without duplicating styles',\n },\n {\n pattern: 'Multiple Design System Classes',\n example: '<button class=\"primary large\">',\n explanation: 'Compose multiple utility/variant classes from design system',\n },\n ],\n },\n designTokens: {\n description: 'Use design tokens instead of hardcoded values',\n principle: 'All spacing, colors, typography should use CSS custom properties (--*)',\n examples: [\n {\n wrong: 'padding: 24px',\n right: 'padding: var(--space-scale-3)',\n why: 'Tokens ensure consistency and enable theming',\n },\n {\n wrong: 'color: #DA0707',\n right: 'color: var(--color-alert-400)',\n why: 'Semantic tokens communicate intent and adapt to themes',\n },\n {\n wrong: 'font-size: 16px',\n right: 'font-size: var(--font-size-300)',\n why: 'Typography scale ensures visual hierarchy',\n },\n ],\n },\n commonMistakes: {\n description: 'Common mistakes developers make (and how to avoid them)',\n mistakes: [\n {\n mistake: 'Recreating .card styling',\n problem: 'Duplicating background, border, padding, shadows that .card already provides',\n solution: 'Use <div class=\"card\"> directly. It includes everything.',\n prevention: 'Read component docs BEFORE writing CSS',\n },\n {\n mistake: 'Adding wrapper divs for styling',\n problem: '<div class=\"my-wrapper\"><div class=\"card\">...</div></div>',\n solution: 'Style the card directly: <div class=\"card my-modifier\">',\n prevention: 'Compose classes instead of wrapping',\n },\n {\n mistake: 'Hardcoding spacing values',\n problem: 'margin: 16px; gap: 12px;',\n solution: 'margin: var(--space-scale-2); gap: var(--space-scale-1-5);',\n prevention: 'Query designsystem://tokens/space for available values',\n },\n {\n mistake: 'Assuming classes are incomplete',\n problem: 'Adding display: flex, border: 1px solid, etc. to classes that already have these',\n solution: \"Trust the design system. Check docs to see what's included.\",\n prevention: 'Default assumption: classes are complete, not partial',\n },\n ],\n },\n resources: {\n description: 'MCP resources for discovering design system capabilities',\n available: [\n {\n resource: 'designsystem://components',\n purpose: 'List all available components',\n },\n {\n resource: 'designsystem://components/{name}',\n purpose: 'Get detailed component documentation',\n },\n {\n resource: 'designsystem://tokens',\n purpose: 'List all token categories',\n },\n {\n resource: 'designsystem://tokens/{category}',\n purpose: 'Get tokens for specific category (color, space, font, etc.)',\n },\n {\n resource: 'designsystem://guides/setup',\n purpose: 'Installation instructions',\n },\n {\n resource: 'designsystem://guides/principles',\n purpose: 'This guide - design system usage principles',\n },\n ],\n },\n};\n\nexport const getPrinciplesGuide = async () => {\n return {\n contents: [\n {\n uri: 'designsystem://guides/principles',\n mimeType: 'application/json',\n text: JSON.stringify(designSystemPrinciples, null, 2),\n },\n ],\n };\n};\n"]}
@@ -1,7 +0,0 @@
1
- export declare const getSetupGuide: (type?: string) => Promise<{
2
- contents: {
3
- uri: string;
4
- mimeType: string;
5
- text: string;
6
- }[];
7
- }>;
@@ -1,54 +0,0 @@
1
- import { setupGuides } from '../../tools/getSetupGuide/setupGuides.js';
2
- export const getSetupGuide = async (type) => {
3
- // Return both guides if no type specified
4
- if (!type) {
5
- const allGuides = Object.entries(setupGuides).map(([key, guide]) => ({
6
- type: key,
7
- name: guide.name,
8
- description: guide.description,
9
- guide,
10
- }));
11
- return {
12
- contents: [
13
- {
14
- uri: 'designsystem://guides/setup',
15
- mimeType: 'application/json',
16
- text: JSON.stringify({
17
- message: 'Multiple setup options available. Choose based on user preference or project requirements.',
18
- options: allGuides,
19
- }, null, 2),
20
- },
21
- ],
22
- };
23
- }
24
- const guideType = type.toLowerCase();
25
- const guide = setupGuides[guideType];
26
- if (!guide) {
27
- return {
28
- contents: [
29
- {
30
- uri: `designsystem://guides/setup/${type}`,
31
- mimeType: 'application/json',
32
- text: JSON.stringify({
33
- error: `Setup guide '${guideType}' not found`,
34
- available: Object.keys(setupGuides).map((key) => ({
35
- key,
36
- name: setupGuides[key].name,
37
- description: setupGuides[key].description,
38
- })),
39
- }, null, 2),
40
- },
41
- ],
42
- };
43
- }
44
- return {
45
- contents: [
46
- {
47
- uri: `designsystem://guides/setup/${type}`,
48
- mimeType: 'application/json',
49
- text: JSON.stringify(guide, null, 2),
50
- },
51
- ],
52
- };
53
- };
54
- //# sourceMappingURL=setup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../../src/resources/guides/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAAE,IAAa,EAAE,EAAE;IACnD,0CAA0C;IAC1C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;YACnE,IAAI,EAAE,GAAG;YACT,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,KAAK;SACN,CAAC,CAAC,CAAC;QAEJ,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,6BAA6B;oBAClC,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;wBACE,OAAO,EAAE,4FAA4F;wBACrG,OAAO,EAAE,SAAS;qBACnB,EACD,IAAI,EACJ,CAAC,CACF;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACrC,MAAM,KAAK,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;IAErC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,+BAA+B,IAAI,EAAE;oBAC1C,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;wBACE,KAAK,EAAE,gBAAgB,SAAS,aAAa;wBAC7C,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;4BAChD,GAAG;4BACH,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI;4BAC3B,WAAW,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,WAAW;yBAC1C,CAAC,CAAC;qBACJ,EACD,IAAI,EACJ,CAAC,CACF;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,+BAA+B,IAAI,EAAE;gBAC1C,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;aACrC;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { setupGuides } from '@/tools/getSetupGuide/setupGuides.js';\n\nexport const getSetupGuide = async (type?: string) => {\n // Return both guides if no type specified\n if (!type) {\n const allGuides = Object.entries(setupGuides).map(([key, guide]) => ({\n type: key,\n name: guide.name,\n description: guide.description,\n guide,\n }));\n\n return {\n contents: [\n {\n uri: 'designsystem://guides/setup',\n mimeType: 'application/json',\n text: JSON.stringify(\n {\n message: 'Multiple setup options available. Choose based on user preference or project requirements.',\n options: allGuides,\n },\n null,\n 2\n ),\n },\n ],\n };\n }\n\n const guideType = type.toLowerCase();\n const guide = setupGuides[guideType];\n\n if (!guide) {\n return {\n contents: [\n {\n uri: `designsystem://guides/setup/${type}`,\n mimeType: 'application/json',\n text: JSON.stringify(\n {\n error: `Setup guide '${guideType}' not found`,\n available: Object.keys(setupGuides).map((key) => ({\n key,\n name: setupGuides[key].name,\n description: setupGuides[key].description,\n })),\n },\n null,\n 2\n ),\n },\n ],\n };\n }\n\n return {\n contents: [\n {\n uri: `designsystem://guides/setup/${type}`,\n mimeType: 'application/json',\n text: JSON.stringify(guide, null, 2),\n },\n ],\n };\n};\n"]}
@@ -1,3 +0,0 @@
1
- export * from './components/index.js';
2
- export * from './tokens/index.js';
3
- export * from './guides/index.js';
@@ -1,4 +0,0 @@
1
- export * from './components/index.js';
2
- export * from './tokens/index.js';
3
- export * from './guides/index.js';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC","sourcesContent":["export * from './components/index.js';\nexport * from './tokens/index.js';\nexport * from './guides/index.js';\n"]}
@@ -1,7 +0,0 @@
1
- export declare const getCSSTokens: (category: string) => Promise<{
2
- contents: {
3
- uri: string;
4
- mimeType: string;
5
- text: string;
6
- }[];
7
- }>;
@@ -1,30 +0,0 @@
1
- import designTokens from '@triptease/stylesheet/tokens' with { type: 'json' };
2
- import { buildTokens } from '../../tools/getCSSTokens/utils.js';
3
- export const getCSSTokens = async (category) => {
4
- const tokens = buildTokens(designTokens);
5
- const categories = Object.keys(tokens);
6
- if (!categories.includes(category)) {
7
- return {
8
- contents: [
9
- {
10
- uri: `designsystem://tokens/${category}`,
11
- mimeType: 'application/json',
12
- text: JSON.stringify({
13
- error: `Invalid category '${category}'`,
14
- available: categories,
15
- }, null, 2),
16
- },
17
- ],
18
- };
19
- }
20
- return {
21
- contents: [
22
- {
23
- uri: `designsystem://tokens/${category}`,
24
- mimeType: 'application/json',
25
- text: JSON.stringify(tokens[category], null, 2),
26
- },
27
- ],
28
- };
29
- };
30
- //# sourceMappingURL=get.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../src/resources/tokens/get.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,8BAA8B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,QAAgB,EAAE,EAAE;IACrD,MAAM,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACzC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEvC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACnC,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,yBAAyB,QAAQ,EAAE;oBACxC,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;wBACE,KAAK,EAAE,qBAAqB,QAAQ,GAAG;wBACvC,SAAS,EAAE,UAAU;qBACtB,EACD,IAAI,EACJ,CAAC,CACF;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,yBAAyB,QAAQ,EAAE;gBACxC,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;aAChD;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import designTokens from '@triptease/stylesheet/tokens' with { type: 'json' };\nimport { buildTokens } from '@/tools/getCSSTokens/utils.js';\n\nexport const getCSSTokens = async (category: string) => {\n const tokens = buildTokens(designTokens);\n const categories = Object.keys(tokens);\n\n if (!categories.includes(category)) {\n return {\n contents: [\n {\n uri: `designsystem://tokens/${category}`,\n mimeType: 'application/json',\n text: JSON.stringify(\n {\n error: `Invalid category '${category}'`,\n available: categories,\n },\n null,\n 2\n ),\n },\n ],\n };\n }\n\n return {\n contents: [\n {\n uri: `designsystem://tokens/${category}`,\n mimeType: 'application/json',\n text: JSON.stringify(tokens[category], null, 2),\n },\n ],\n };\n};\n"]}
@@ -1,2 +0,0 @@
1
- export { listCSSTokens } from './list.js';
2
- export { getCSSTokens } from './get.js';
@@ -1,3 +0,0 @@
1
- export { listCSSTokens } from './list.js';
2
- export { getCSSTokens } from './get.js';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/tokens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { listCSSTokens } from './list.js';\nexport { getCSSTokens } from './get.js';\n"]}
@@ -1,7 +0,0 @@
1
- export declare const listCSSTokens: () => Promise<{
2
- contents: {
3
- uri: string;
4
- mimeType: string;
5
- text: string;
6
- }[];
7
- }>;
@@ -1,21 +0,0 @@
1
- import designTokens from '@triptease/stylesheet/tokens' with { type: 'json' };
2
- import { buildTokens } from '../../tools/getCSSTokens/utils.js';
3
- export const listCSSTokens = async () => {
4
- const tokens = buildTokens(designTokens);
5
- const categories = Object.keys(tokens);
6
- const result = {};
7
- for (const category of categories) {
8
- const tokenCount = tokens[category].length;
9
- result[category] = { count: tokenCount };
10
- }
11
- return {
12
- contents: [
13
- {
14
- uri: 'designsystem://tokens',
15
- mimeType: 'application/json',
16
- text: JSON.stringify(result, null, 2),
17
- },
18
- ],
19
- };
20
- };
21
- //# sourceMappingURL=list.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/resources/tokens/list.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,8BAA8B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAU5D,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,IAAI,EAAE;IACtC,MAAM,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACzC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,MAAM,GAAe,EAAE,CAAC;IAE9B,KAAK,MAAM,QAAQ,IAAI,UAAU,EAAE,CAAC;QAClC,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;QAC3C,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;IAC3C,CAAC;IAED,OAAO;QACL,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,uBAAuB;gBAC5B,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;aACtC;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import designTokens from '@triptease/stylesheet/tokens' with { type: 'json' };\nimport { buildTokens } from '@/tools/getCSSTokens/utils.js';\n\ninterface Summary {\n count: number;\n}\n\ninterface SummaryMap {\n [category: string]: Summary;\n}\n\nexport const listCSSTokens = async () => {\n const tokens = buildTokens(designTokens);\n const categories = Object.keys(tokens);\n const result: SummaryMap = {};\n\n for (const category of categories) {\n const tokenCount = tokens[category].length;\n result[category] = { count: tokenCount };\n }\n\n return {\n contents: [\n {\n uri: 'designsystem://tokens',\n mimeType: 'application/json',\n text: JSON.stringify(result, null, 2),\n },\n ],\n };\n};\n"]}
@@ -1,6 +0,0 @@
1
- import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
- export interface GetDesignTokensArgs {
3
- category: string;
4
- }
5
- declare const _default: (args: GetDesignTokensArgs) => CallToolResult;
6
- export default _default;
@@ -1,29 +0,0 @@
1
- import designTokens from '@triptease/stylesheet/tokens' with { type: 'json' };
2
- import { buildTokens } from '../../tools/getCSSTokens/utils.js';
3
- export default (args) => {
4
- const category = args.category;
5
- const tokens = buildTokens(designTokens);
6
- const categories = Object.keys(tokens);
7
- if (!categories.includes(category)) {
8
- return {
9
- content: [
10
- {
11
- type: 'text',
12
- text: JSON.stringify({
13
- error: `Invalid category '${category}'`,
14
- available: categories,
15
- }),
16
- },
17
- ],
18
- };
19
- }
20
- return {
21
- content: [
22
- {
23
- type: 'text',
24
- text: JSON.stringify(tokens[category]),
25
- },
26
- ],
27
- };
28
- };
29
- //# sourceMappingURL=handler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/getCSSTokens/handler.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,8BAA8B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAM5D,eAAe,CAAC,IAAyB,EAAkB,EAAE;IAC3D,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC/B,MAAM,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IAEzC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACnC,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;wBACnB,KAAK,EAAE,qBAAqB,QAAQ,GAAG;wBACvC,SAAS,EAAE,UAAU;qBACtB,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;aACvC;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';\nimport designTokens from '@triptease/stylesheet/tokens' with { type: 'json' };\nimport { buildTokens } from '@/tools/getCSSTokens/utils.js';\n\nexport interface GetDesignTokensArgs {\n category: string;\n}\n\nexport default (args: GetDesignTokensArgs): CallToolResult => {\n const category = args.category;\n const tokens = buildTokens(designTokens);\n\n const categories = Object.keys(tokens);\n if (!categories.includes(category)) {\n return {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n error: `Invalid category '${category}'`,\n available: categories,\n }),\n },\n ],\n };\n }\n\n return {\n content: [\n {\n type: 'text',\n text: JSON.stringify(tokens[category]),\n },\n ],\n };\n};\n"]}
@@ -1,12 +0,0 @@
1
- import { z } from 'zod';
2
- declare const toolDefinition: {
3
- name: string;
4
- config: {
5
- description: string;
6
- inputSchema: {
7
- category: z.ZodString;
8
- };
9
- };
10
- handler: (args: import("./handler.js").GetDesignTokensArgs) => import("@modelcontextprotocol/sdk/types.js").CallToolResult;
11
- };
12
- export default toolDefinition;
@@ -1,14 +0,0 @@
1
- import handler from './handler.js';
2
- import { z } from 'zod';
3
- const toolDefinition = {
4
- name: 'get_css_tokens',
5
- config: {
6
- description: 'Returns the CSS tokens for a specific category.',
7
- inputSchema: {
8
- category: z.string().describe('Token category: one of the category names returned by the listCSSTokens tool.'),
9
- },
10
- },
11
- handler: handler,
12
- };
13
- export default toolDefinition;
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/getCSSTokens/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,cAAc,GAAG;IACrB,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE;QACN,WAAW,EAAE,iDAAiD;QAC9D,WAAW,EAAE;YACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+EAA+E,CAAC;SAC/G;KACF;IACD,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import handler from './handler.js';\nimport { z } from 'zod';\n\nconst toolDefinition = {\n name: 'get_css_tokens',\n config: {\n description: 'Returns the CSS tokens for a specific category.',\n inputSchema: {\n category: z.string().describe('Token category: one of the category names returned by the listCSSTokens tool.'),\n },\n },\n handler: handler,\n};\n\nexport default toolDefinition;\n"]}
@@ -1,5 +0,0 @@
1
- export interface TokenOutput {
2
- token: string;
3
- value: string;
4
- }
5
- export declare const buildTokens: (input: Record<string, object>) => Record<string, TokenOutput[]>;
@@ -1,25 +0,0 @@
1
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2
- const isDesignToken = (v) => {
3
- return v && typeof v === 'object' && typeof v.value === 'string' && Array.isArray(v.path);
4
- };
5
- const processTokenGroup = (prefix, group) => {
6
- return Object.entries(group).flatMap(([key, value]) => {
7
- if (isDesignToken(value)) {
8
- return { token: `--${[...prefix, key].join('-')}`, value: value.value };
9
- }
10
- else if (value && typeof value === 'object') {
11
- return processTokenGroup([...prefix, key], value);
12
- }
13
- else {
14
- return [];
15
- }
16
- });
17
- };
18
- export const buildTokens = (input) => {
19
- const result = {};
20
- for (const category of Object.keys(input).filter((category) => category !== 'asset')) {
21
- result[category] = processTokenGroup([category], input[category]);
22
- }
23
- return result;
24
- };
25
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/tools/getCSSTokens/utils.ts"],"names":[],"mappings":"AAKA,8DAA8D;AAC9D,MAAM,aAAa,GAAG,CAAC,CAAM,EAA0C,EAAE;IACvE,OAAO,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC5F,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,MAAgB,EAAE,KAAa,EAAiB,EAAE;IAC3E,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACpD,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;QAC1E,CAAC;aAAM,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9C,OAAO,iBAAiB,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;QACpD,CAAC;aAAM,CAAC;YACN,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAA6B,EAAiC,EAAE;IAC1F,MAAM,MAAM,GAAkC,EAAE,CAAC;IAEjD,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,OAAO,CAAC,EAAE,CAAC;QACrF,MAAM,CAAC,QAAQ,CAAC,GAAG,iBAAiB,CAAC,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC","sourcesContent":["export interface TokenOutput {\n token: string;\n value: string;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isDesignToken = (v: any): v is { value: string; path: string[] } => {\n return v && typeof v === 'object' && typeof v.value === 'string' && Array.isArray(v.path);\n};\n\nconst processTokenGroup = (prefix: string[], group: object): TokenOutput[] => {\n return Object.entries(group).flatMap(([key, value]) => {\n if (isDesignToken(value)) {\n return { token: `--${[...prefix, key].join('-')}`, value: value.value };\n } else if (value && typeof value === 'object') {\n return processTokenGroup([...prefix, key], value);\n } else {\n return [];\n }\n });\n};\n\nexport const buildTokens = (input: Record<string, object>): Record<string, TokenOutput[]> => {\n const result: Record<string, TokenOutput[]> = {};\n\n for (const category of Object.keys(input).filter((category) => category !== 'asset')) {\n result[category] = processTokenGroup([category], input[category]);\n }\n\n return result;\n};\n"]}
@@ -1,6 +0,0 @@
1
- import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
- export interface GetComponentDocsArgs {
3
- component: string;
4
- }
5
- declare const _default: (args: GetComponentDocsArgs) => CallToolResult;
6
- export default _default;
@@ -1,27 +0,0 @@
1
- import { componentManifest } from '../../manifests/components/index.js';
2
- export default (args) => {
3
- const componentName = args.component.toLowerCase();
4
- const component = componentManifest[componentName];
5
- if (!component) {
6
- return {
7
- content: [
8
- {
9
- type: 'text',
10
- text: JSON.stringify({
11
- error: `Component '${componentName}' not found`,
12
- available: Object.keys(componentManifest),
13
- }),
14
- },
15
- ],
16
- };
17
- }
18
- return {
19
- content: [
20
- {
21
- type: 'text',
22
- text: JSON.stringify(component),
23
- },
24
- ],
25
- };
26
- };
27
- //# sourceMappingURL=handler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/getComponentDocs/handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAMpE,eAAe,CAAC,IAA0B,EAAkB,EAAE;IAC5D,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;IACnD,MAAM,SAAS,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAEnD,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;wBACnB,KAAK,EAAE,cAAc,aAAa,aAAa;wBAC/C,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC;qBAC1C,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;aAChC;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';\nimport { componentManifest } from '@/manifests/components/index.js';\n\nexport interface GetComponentDocsArgs {\n component: string;\n}\n\nexport default (args: GetComponentDocsArgs): CallToolResult => {\n const componentName = args.component.toLowerCase();\n const component = componentManifest[componentName];\n\n if (!component) {\n return {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n error: `Component '${componentName}' not found`,\n available: Object.keys(componentManifest),\n }),\n },\n ],\n };\n }\n\n return {\n content: [\n {\n type: 'text',\n text: JSON.stringify(component),\n },\n ],\n };\n};\n"]}
@@ -1,12 +0,0 @@
1
- import { z } from 'zod';
2
- declare const toolDefinition: {
3
- name: string;
4
- config: {
5
- description: string;
6
- inputSchema: {
7
- component: z.ZodString;
8
- };
9
- };
10
- handler: (args: import("./handler.js").GetComponentDocsArgs) => import("@modelcontextprotocol/sdk/types.js").CallToolResult;
11
- };
12
- export default toolDefinition;
@@ -1,14 +0,0 @@
1
- import { z } from 'zod';
2
- import handler from './handler.js';
3
- const toolDefinition = {
4
- name: 'get_component_docs',
5
- config: {
6
- description: 'Get documentation for a design system component (button, input, badge, checkbox, card, etc.)',
7
- inputSchema: {
8
- component: z.string().describe("Component name (e.g., 'button', 'input', 'badge')"),
9
- },
10
- },
11
- handler,
12
- };
13
- export default toolDefinition;
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/getComponentDocs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,MAAM,cAAc,GAAG;IACrB,IAAI,EAAE,oBAAoB;IAC1B,MAAM,EAAE;QACN,WAAW,EAAE,8FAA8F;QAC3G,WAAW,EAAE;YACX,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;SACpF;KACF;IACD,OAAO;CACR,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { z } from 'zod';\nimport handler from './handler.js';\n\nconst toolDefinition = {\n name: 'get_component_docs',\n config: {\n description: 'Get documentation for a design system component (button, input, badge, checkbox, card, etc.)',\n inputSchema: {\n component: z.string().describe(\"Component name (e.g., 'button', 'input', 'badge')\"),\n },\n },\n handler,\n};\n\nexport default toolDefinition;\n"]}