@makitt.io/mds-mcp-server 0.1.3 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +151 -34
- package/dist/catalog.d.ts +16 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +383 -0
- package/dist/catalog.js.map +1 -0
- package/dist/data/catalog.json +41955 -4439
- package/dist/data/playbook/ai-fill.md +61 -48
- package/dist/data/playbook/anti-patterns.md +112 -110
- package/dist/data/playbook/array-input.md +94 -49
- package/dist/data/playbook/async-states.md +71 -61
- package/dist/data/playbook/data-grid.md +118 -101
- package/dist/data/playbook/feedback.md +103 -84
- package/dist/data/playbook/form.md +164 -134
- package/dist/data/playbook/overlay.md +97 -88
- package/dist/data/playbook/page-layout.md +95 -76
- package/dist/data/playbook/responsive-tokens.md +77 -58
- package/dist/data/recipes/admin-list-page.md +86 -0
- package/dist/data/recipes/async-state-section.md +60 -0
- package/dist/data/recipes/dashboard-overview.md +65 -0
- package/dist/data/recipes/detail-drawer.md +69 -0
- package/dist/data/recipes/modal-form.md +67 -0
- package/dist/data/recipes/settings-form-page.md +79 -0
- package/dist/index.d.ts +4 -23
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -338
- package/dist/index.js.map +1 -1
- package/dist/loaders.d.ts +8 -0
- package/dist/loaders.d.ts.map +1 -0
- package/dist/loaders.js +120 -0
- package/dist/loaders.js.map +1 -0
- package/dist/recipes.d.ts +13 -0
- package/dist/recipes.d.ts.map +1 -0
- package/dist/recipes.js +82 -0
- package/dist/recipes.js.map +1 -0
- package/dist/responses.d.ts +8 -0
- package/dist/responses.d.ts.map +1 -0
- package/dist/responses.js +25 -0
- package/dist/responses.js.map +1 -0
- package/dist/text.d.ts +4 -0
- package/dist/text.d.ts.map +1 -0
- package/dist/text.js +20 -0
- package/dist/text.js.map +1 -0
- package/dist/tool-definitions.d.ts +3 -0
- package/dist/tool-definitions.d.ts.map +1 -0
- package/dist/tool-definitions.js +199 -0
- package/dist/tool-definitions.js.map +1 -0
- package/dist/tools.d.ts +4 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +233 -0
- package/dist/tools.js.map +1 -0
- package/dist/types.d.ts +107 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/package.json +21 -16
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
# MDS Playbook — Responsive Tokens
|
|
2
2
|
|
|
3
|
-
mds 의 "Responsive by default" 를 token 측에서 구현 — caller 의 코드 변경 없이
|
|
3
|
+
mds 의 "Responsive by default" 를 token 측에서 구현 — caller 의 코드 변경 없이
|
|
4
|
+
mobile 별 visual scale 자동 적용.
|
|
4
5
|
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
## 1. 결정 — 2 방식의 조합
|
|
8
9
|
|
|
9
|
-
| 방식
|
|
10
|
-
|
|
11
|
-
| **Token responsive** (CSS @media)
|
|
12
|
-
| **JS breakpoint hook** (`useBreakpoint`)
|
|
13
|
-
| **Tailwind utility** (`text-3xl md:text-4xl`) | 페이지 별 override 또는 의도된 단계
|
|
10
|
+
| 방식 | 적용 | 의도 |
|
|
11
|
+
| --------------------------------------------- | ----------------------------------------------- | -------------------------- |
|
|
12
|
+
| **Token responsive** (CSS @media) | 단순 visual scale (font-size / spacing) | caller 코드 변경 없이 자동 |
|
|
13
|
+
| **JS breakpoint hook** (`useBreakpoint`) | layout 분기 (DataGrid → card list 같은 큰 변형) | 의도 명시 + reactive |
|
|
14
|
+
| **Tailwind utility** (`text-3xl md:text-4xl`) | 페이지 별 override 또는 의도된 단계 | caller 명시 |
|
|
14
15
|
|
|
15
16
|
> **default = token responsive** (자동). 큰 layout 변형 만 hook / utility 명시.
|
|
16
17
|
|
|
@@ -36,25 +37,28 @@ W3C DTCG 표준 의 `$extensions` field 활용 — vendor 별 metadata.
|
|
|
36
37
|
|
|
37
38
|
### 지원 breakpoint key
|
|
38
39
|
|
|
39
|
-
| Key
|
|
40
|
-
|
|
41
|
-
| `max-sm` | `(max-width: 639px)`
|
|
42
|
-
| `max-md` | `(max-width: 767px)`
|
|
43
|
-
| `max-lg` | `(max-width: 1023px)` | 모든 portrait device
|
|
44
|
-
| `max-xl` | `(max-width: 1279px)` | non-wide desktop
|
|
40
|
+
| Key | CSS @media | 의도 |
|
|
41
|
+
| -------- | --------------------- | --------------------- |
|
|
42
|
+
| `max-sm` | `(max-width: 639px)` | mobile (< 640px) |
|
|
43
|
+
| `max-md` | `(max-width: 767px)` | mobile + small tablet |
|
|
44
|
+
| `max-lg` | `(max-width: 1023px)` | 모든 portrait device |
|
|
45
|
+
| `max-xl` | `(max-width: 1279px)` | non-wide desktop |
|
|
45
46
|
|
|
46
|
-
> `min-*` 도 추후 추가 가능 (현재 mobile-first compress 만 — desktop 의 base 가
|
|
47
|
+
> `min-*` 도 추후 추가 가능 (현재 mobile-first compress 만 — desktop 의 base 가
|
|
48
|
+
> 더 큰 size, mobile 이 축소). 의도 다르면 추가 cycle.
|
|
47
49
|
|
|
48
50
|
---
|
|
49
51
|
|
|
50
52
|
## 3. Build pipeline
|
|
51
53
|
|
|
52
|
-
`packages/mds/scripts/lib/formats.ts` 의 `cssThemeFormat` 가
|
|
54
|
+
`packages/mds/scripts/lib/formats.ts` 의 `cssThemeFormat` 가
|
|
55
|
+
`$extensions.mds.responsive` 인식.
|
|
53
56
|
|
|
54
57
|
### Output 예 (dist/css/global.css)
|
|
55
58
|
|
|
56
59
|
```css
|
|
57
|
-
:root,
|
|
60
|
+
:root,
|
|
61
|
+
[data-theme='light'] {
|
|
58
62
|
--text-3xl: 24px;
|
|
59
63
|
--text-4xl: 30px;
|
|
60
64
|
--space-8: 32px;
|
|
@@ -63,7 +67,8 @@ W3C DTCG 표준 의 `$extensions` field 활용 — vendor 별 metadata.
|
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
@media (max-width: 639px) {
|
|
66
|
-
:root,
|
|
70
|
+
:root,
|
|
71
|
+
[data-theme='light'] {
|
|
67
72
|
--space-8: 16px;
|
|
68
73
|
--space-10: 20px;
|
|
69
74
|
--space-12: 24px;
|
|
@@ -83,23 +88,23 @@ W3C DTCG 표준 의 `$extensions` field 활용 — vendor 별 metadata.
|
|
|
83
88
|
|
|
84
89
|
### Typography (`typography.json`)
|
|
85
90
|
|
|
86
|
-
| Token
|
|
87
|
-
|
|
88
|
-
| `text-3xl`
|
|
89
|
-
| `text-4xl`
|
|
90
|
-
| `text-2xl` 이하 | 그대로
|
|
91
|
-
| `display-1/2/3` | `clamp(...)` | (clamp 자체 vw 기반 자동) | marketing hero
|
|
91
|
+
| Token | desktop | max-sm (mobile) | 의도 |
|
|
92
|
+
| --------------- | ------------ | ------------------------- | -------------------- |
|
|
93
|
+
| `text-3xl` | 24px | 20px (0.83x) | h1 heading |
|
|
94
|
+
| `text-4xl` | 30px | 24px (0.8x) | display heading |
|
|
95
|
+
| `text-2xl` 이하 | 그대로 | (override 없음) | small 이미 mobile-OK |
|
|
96
|
+
| `display-1/2/3` | `clamp(...)` | (clamp 자체 vw 기반 자동) | marketing hero |
|
|
92
97
|
|
|
93
98
|
### Space (`space.json`)
|
|
94
99
|
|
|
95
|
-
| Token
|
|
96
|
-
|
|
97
|
-
| `space-8`
|
|
98
|
-
| `space-10`
|
|
99
|
-
| `space-12`
|
|
100
|
-
| `space-16`
|
|
101
|
-
| `space-20`
|
|
102
|
-
| `space-6` 이하 | 그대로
|
|
100
|
+
| Token | desktop | max-sm (mobile) | 의도 |
|
|
101
|
+
| -------------- | ------- | --------------- | --------------------- |
|
|
102
|
+
| `space-8` | 32px | 16px (0.5x) | page padding x |
|
|
103
|
+
| `space-10` | 40px | 20px (0.5x) | (특수) |
|
|
104
|
+
| `space-12` | 48px | 24px (0.5x) | section gap (default) |
|
|
105
|
+
| `space-16` | 64px | 32px (0.5x) | large section gap |
|
|
106
|
+
| `space-20` | 80px | 40px (0.5x) | bottom page padding |
|
|
107
|
+
| `space-6` 이하 | 그대로 | (override 없음) | small 이미 mobile-OK |
|
|
103
108
|
|
|
104
109
|
---
|
|
105
110
|
|
|
@@ -130,62 +135,76 @@ import { useBreakpoint, useIsBreakpointUp } from '@makitt/mds';
|
|
|
130
135
|
const bp = useBreakpoint();
|
|
131
136
|
const isDesktop = useIsBreakpointUp('lg');
|
|
132
137
|
|
|
133
|
-
if (bp === null) return <MobileList />;
|
|
134
|
-
if (!isDesktop) return <TabletGrid />;
|
|
138
|
+
if (bp === null) return <MobileList />; // < sm
|
|
139
|
+
if (!isDesktop) return <TabletGrid />; // sm 이상 lg 미만
|
|
135
140
|
return <DesktopDataGrid />;
|
|
136
141
|
```
|
|
137
142
|
|
|
138
|
-
> 단순 visual scale (font-size / spacing) 에 hook 사용 = anti-pattern. token
|
|
143
|
+
> 단순 visual scale (font-size / spacing) 에 hook 사용 = anti-pattern. token
|
|
144
|
+
> responsive 활용.
|
|
139
145
|
|
|
140
146
|
---
|
|
141
147
|
|
|
142
148
|
## 6. 결정 표 (lookup)
|
|
143
149
|
|
|
144
|
-
| 케이스
|
|
145
|
-
|
|
146
|
-
| "h1 의 mobile 의 size 축소"
|
|
147
|
-
| "DataGrid → mobile 의 card list"
|
|
150
|
+
| 케이스 | 답 |
|
|
151
|
+
| --------------------------------- | ------------------------------------------------------------------ |
|
|
152
|
+
| "h1 의 mobile 의 size 축소" | token responsive — `$extensions.mds.responsive.max-sm` |
|
|
153
|
+
| "DataGrid → mobile 의 card list" | `useBreakpoint() === null` 의 분기 (큰 변형) |
|
|
148
154
|
| "Sidebar → mobile 의 drawer 모드" | `useIsBreakpointUp('md')` 의 분기 (또는 mds 의 AppShell 자체 처리) |
|
|
149
|
-
| "특정 페이지 의 큰 hero size"
|
|
150
|
-
| "section gap 의 mobile 축소"
|
|
151
|
-
| "특정 페이지 의 unique padding"
|
|
155
|
+
| "특정 페이지 의 큰 hero size" | Tailwind `text-4xl md:text-6xl` 또는 token clamp (display-\*) |
|
|
156
|
+
| "section gap 의 mobile 축소" | token responsive — `space-12` 의 `max-sm` |
|
|
157
|
+
| "특정 페이지 의 unique padding" | inline / Tailwind utility (token override 보다 caller 직접) |
|
|
152
158
|
|
|
153
159
|
---
|
|
154
160
|
|
|
155
161
|
## 7. 안티 패턴
|
|
156
162
|
|
|
157
|
-
- ❌ **inline JS 분기 의 padding / font-size**
|
|
158
|
-
|
|
159
|
-
- ❌ **
|
|
160
|
-
|
|
161
|
-
- ❌ **
|
|
162
|
-
|
|
163
|
+
- ❌ **inline JS 분기 의 padding / font-size**
|
|
164
|
+
(`style={{ padding: bp === null ? 16 : 32 }}`) — token responsive 활용
|
|
165
|
+
- ❌ **DataGrid → card list 전환 의 token 만 의지** — layout 큰 변형 = JS 분기
|
|
166
|
+
필요
|
|
167
|
+
- ❌ **token 의 한 size 만 mobile 안 적용** (다른 size 는 mobile 자동 인데) —
|
|
168
|
+
일관성. token responsive 의 metadata 통일
|
|
169
|
+
- ❌ **`@media` block 의 직접 inline** (component SCSS 의
|
|
170
|
+
`@media (max-width: 640px) { ... }`) — token responsive 가 자동
|
|
171
|
+
- ❌ **breakpoint 의 hardcoded px** (`@media (max-width: 700px)`) — token
|
|
172
|
+
sm/md/lg/xl 통해
|
|
173
|
+
- ❌ **mobile 의 "고정" size** (clamp 대신 max-sm = 12px 같은 너무 작은) —
|
|
174
|
+
사용자 가 읽을 size 보장 (≥ 14px body)
|
|
163
175
|
|
|
164
176
|
---
|
|
165
177
|
|
|
166
178
|
## 8. TBD (별도 cycle)
|
|
167
179
|
|
|
168
|
-
1. **min
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
180
|
+
1. **min-\* breakpoint** — desktop 에서 더 큰 size 를 적용하려는 의도
|
|
181
|
+
(mobile-first 와 흐름이 다름). 현재 max-\* 만
|
|
182
|
+
2. **breakpoint 의 dynamic mapping** — `formats.ts` 의
|
|
183
|
+
`RESPONSIVE_BREAKPOINT_QUERIES` 가 hardcoded. `breakpoint.json` read 후
|
|
184
|
+
dynamic 가능
|
|
185
|
+
3. **추가 token 의 mobile fallback** — line-height / radius / shadow / icon-size
|
|
186
|
+
의 mobile 의도. 추가 token JSON 의 `$extensions` metadata
|
|
187
|
+
4. **Tailwind preset 의 responsive** — Tailwind 의 `text-3xl md:text-4xl` 같은
|
|
188
|
+
utility 의 자동 generation (token 의 mobile / desktop 양쪽 활용)
|
|
189
|
+
5. **Storybook viewport addon** — Storybook 의 viewport addon 의 standard
|
|
190
|
+
viewport 추가 (mobile 375 / tablet 768 / desktop 1280)
|
|
173
191
|
|
|
174
192
|
---
|
|
175
193
|
|
|
176
194
|
## 9. Cross-cutting
|
|
177
195
|
|
|
178
|
-
| Axis
|
|
179
|
-
|
|
180
|
-
| **A11y**
|
|
181
|
-
| **i18n**
|
|
182
|
-
| **AI fill** | token 명 의 catalog 가 mds_components_get 통해 (Step 5) — AI 가 `var(--text-3xl)` 자동 권장
|
|
183
|
-
| **Catalog** | token / 페이지 별 사용 의 inventory (TBD — 추가 catalog)
|
|
196
|
+
| Axis | 적용 |
|
|
197
|
+
| ----------- | --------------------------------------------------------------------------------------------------- |
|
|
198
|
+
| **A11y** | mobile 의 최소 font-size (14px body 기준) + tap target (44x44px 권장) 따로 |
|
|
199
|
+
| **i18n** | 한국어 의 폰 size 별 가독성 (CJK 가 라틴 보다 작은 px 에 어려움) — mobile 의 base 가 너무 작지 않게 |
|
|
200
|
+
| **AI fill** | token 명 의 catalog 가 mds_components_get 통해 (Step 5) — AI 가 `var(--text-3xl)` 자동 권장 |
|
|
201
|
+
| **Catalog** | token / 페이지 별 사용 의 inventory (TBD — 추가 catalog) |
|
|
184
202
|
|
|
185
203
|
---
|
|
186
204
|
|
|
187
205
|
## Related Playbooks
|
|
188
206
|
|
|
189
|
-
- [page-layout.md](./page-layout.md) — Page / Section / Sidebar 의 responsive
|
|
207
|
+
- [page-layout.md](./page-layout.md) — Page / Section / Sidebar 의 responsive
|
|
208
|
+
변형
|
|
190
209
|
- [data-grid.md](./data-grid.md) — DataGrid → mobile card list 변형 (큰 변형)
|
|
191
210
|
- [form.md](./form.md) — Form 의 mobile 변형 표 (각 § 의 Mobile 컬럼)
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: admin-list-page
|
|
3
|
+
title: Admin List Page
|
|
4
|
+
status: implemented
|
|
5
|
+
components:
|
|
6
|
+
- Page
|
|
7
|
+
- PageHeader
|
|
8
|
+
- Section.Root
|
|
9
|
+
- Section.Header
|
|
10
|
+
- Section.Body
|
|
11
|
+
- DataGrid
|
|
12
|
+
- Table.Root
|
|
13
|
+
- Pagination.Root
|
|
14
|
+
- Button
|
|
15
|
+
- IconButton
|
|
16
|
+
- Menu.Root
|
|
17
|
+
- Pill
|
|
18
|
+
- Banner
|
|
19
|
+
- EmptyState
|
|
20
|
+
- LoadingState
|
|
21
|
+
- SkeletonRows
|
|
22
|
+
- ErrorState
|
|
23
|
+
playbooks:
|
|
24
|
+
- page-layout
|
|
25
|
+
- data-grid
|
|
26
|
+
- async-states
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Admin List Page
|
|
30
|
+
|
|
31
|
+
Use this recipe for a dense admin page that lists many resources and supports
|
|
32
|
+
scan, filter, sort, row action, empty, loading, and error states.
|
|
33
|
+
|
|
34
|
+
## Contract
|
|
35
|
+
|
|
36
|
+
- Use `Page` as the outer surface and `PageHeader` for title, description, and
|
|
37
|
+
primary action.
|
|
38
|
+
- Put the list inside `Section.Root`; use `Section.Header` for list title,
|
|
39
|
+
count, filters, and secondary actions.
|
|
40
|
+
- Prefer `DataGrid` when sorting, column visibility, sticky columns, density, or
|
|
41
|
+
resize is needed.
|
|
42
|
+
- Use `Table.Root` only for simple static tabular content where grid behavior is
|
|
43
|
+
not needed.
|
|
44
|
+
- Use `Pill` for status values and compact categorical state.
|
|
45
|
+
- Use `Menu.Root` or `IconButton` for row actions instead of visible action text
|
|
46
|
+
in every row.
|
|
47
|
+
- Use `Pagination.Root` when result count can exceed one page.
|
|
48
|
+
|
|
49
|
+
## Required States
|
|
50
|
+
|
|
51
|
+
- Loading: show `LoadingState` for first load, or `SkeletonRows` inside the
|
|
52
|
+
section body when preserving table geometry matters.
|
|
53
|
+
- Empty: show `EmptyState` with one clear CTA if the user can create the first
|
|
54
|
+
item.
|
|
55
|
+
- Error: show `ErrorState` with retry action.
|
|
56
|
+
- Partial/error inline: use `Banner` at the top of `Section.Body`, then keep the
|
|
57
|
+
last usable data visible.
|
|
58
|
+
|
|
59
|
+
## Composition
|
|
60
|
+
|
|
61
|
+
1. `Page`
|
|
62
|
+
2. `PageHeader` with title, short description, and primary `Button`
|
|
63
|
+
3. `Section.Root`
|
|
64
|
+
4. `Section.Header` with result count, compact filters, and view actions
|
|
65
|
+
5. `Section.Body`
|
|
66
|
+
6. `DataGrid` or `Table.Root`
|
|
67
|
+
7. `Pagination.Root` in the section footer or after the grid
|
|
68
|
+
|
|
69
|
+
## Do Not
|
|
70
|
+
|
|
71
|
+
- Do not make custom cards for each row when the content is naturally tabular.
|
|
72
|
+
- Do not put app routing, query keys, permission checks, or persistence rules in
|
|
73
|
+
this recipe.
|
|
74
|
+
- Do not inline visual values to align columns; use existing table/grid props or
|
|
75
|
+
add missing MDS tokens/components.
|
|
76
|
+
|
|
77
|
+
## MCP Usage
|
|
78
|
+
|
|
79
|
+
Before coding, query:
|
|
80
|
+
|
|
81
|
+
- `mds_recipes_get("admin-list-page")`
|
|
82
|
+
- `mds_playbook_get("data-grid")`
|
|
83
|
+
- `mds_playbook_get("async-states")`
|
|
84
|
+
- `mds_components_get("DataGrid")`
|
|
85
|
+
- `mds_components_get("Page")`
|
|
86
|
+
- `mds_components_get("PageHeader")`
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: async-state-section
|
|
3
|
+
title: Async State Section
|
|
4
|
+
status: implemented
|
|
5
|
+
components:
|
|
6
|
+
- Section.Root
|
|
7
|
+
- Section.Header
|
|
8
|
+
- Section.Body
|
|
9
|
+
- LoadingState
|
|
10
|
+
- SkeletonRows
|
|
11
|
+
- EmptyState
|
|
12
|
+
- ErrorState
|
|
13
|
+
- Banner
|
|
14
|
+
- Button
|
|
15
|
+
playbooks:
|
|
16
|
+
- async-states
|
|
17
|
+
- feedback
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Async State Section
|
|
21
|
+
|
|
22
|
+
Use this recipe for any section whose content depends on asynchronous data or an
|
|
23
|
+
operation that can load, fail, return empty, or partially succeed.
|
|
24
|
+
|
|
25
|
+
## Contract
|
|
26
|
+
|
|
27
|
+
- Keep the `Section.Root` and `Section.Header` stable across states whenever the
|
|
28
|
+
section identity is known.
|
|
29
|
+
- Use `LoadingState` for first-load full replacement.
|
|
30
|
+
- Use `SkeletonRows` when preserving list/table rhythm is more useful than a
|
|
31
|
+
generic loading message.
|
|
32
|
+
- Use `EmptyState` when the request succeeds with no useful items.
|
|
33
|
+
- Use `ErrorState` when no useful content can be shown.
|
|
34
|
+
- Use `Banner` when content remains visible but a warning/error needs attention.
|
|
35
|
+
|
|
36
|
+
## Required States
|
|
37
|
+
|
|
38
|
+
- First load
|
|
39
|
+
- Refreshing with stale content still visible
|
|
40
|
+
- Empty result
|
|
41
|
+
- Blocking error
|
|
42
|
+
- Partial error
|
|
43
|
+
- Mutating or saving
|
|
44
|
+
|
|
45
|
+
## Do Not
|
|
46
|
+
|
|
47
|
+
- Do not remove page or section chrome just because content is loading.
|
|
48
|
+
- Do not invent one-off loading/empty/error visuals.
|
|
49
|
+
- Do not encode app-specific retry or cache semantics in this recipe.
|
|
50
|
+
|
|
51
|
+
## MCP Usage
|
|
52
|
+
|
|
53
|
+
Before coding, query:
|
|
54
|
+
|
|
55
|
+
- `mds_recipes_get("async-state-section")`
|
|
56
|
+
- `mds_playbook_get("async-states")`
|
|
57
|
+
- `mds_playbook_get("feedback")`
|
|
58
|
+
- `mds_components_get("LoadingState")`
|
|
59
|
+
- `mds_components_get("EmptyState")`
|
|
60
|
+
- `mds_components_get("ErrorState")`
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: dashboard-overview
|
|
3
|
+
title: Dashboard Overview
|
|
4
|
+
status: implemented
|
|
5
|
+
components:
|
|
6
|
+
- Page
|
|
7
|
+
- PageHeader
|
|
8
|
+
- StatCard
|
|
9
|
+
- Delta
|
|
10
|
+
- Chart.Line
|
|
11
|
+
- Chart.Bar
|
|
12
|
+
- DataList.Root
|
|
13
|
+
- Table.Root
|
|
14
|
+
- Section.Root
|
|
15
|
+
- SkeletonRows
|
|
16
|
+
- ErrorState
|
|
17
|
+
playbooks:
|
|
18
|
+
- page-layout
|
|
19
|
+
- data-grid
|
|
20
|
+
- async-states
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Dashboard Overview
|
|
24
|
+
|
|
25
|
+
Use this recipe for an operational overview page with KPIs, trends, recent
|
|
26
|
+
activity, and short actionable lists.
|
|
27
|
+
|
|
28
|
+
## Contract
|
|
29
|
+
|
|
30
|
+
- Use `Page` and `PageHeader` for page identity and high-level actions.
|
|
31
|
+
- Put KPI cards in a consistent grid using `StatCard` and `Delta`.
|
|
32
|
+
- Use `Chart.Line` or `Chart.Bar` for trend visualization.
|
|
33
|
+
- Use `Section.Root` around each chart or list group.
|
|
34
|
+
- Use `DataList.Root` for compact recent activity or mixed row content.
|
|
35
|
+
- Use `Table.Root` when recent data is naturally tabular.
|
|
36
|
+
|
|
37
|
+
## Layout Guidance
|
|
38
|
+
|
|
39
|
+
- First row: primary metrics with `StatCard`.
|
|
40
|
+
- Middle row: trend chart plus supporting list or secondary chart.
|
|
41
|
+
- Lower rows: recent activity, tasks, or operational exceptions.
|
|
42
|
+
- Keep each section scannable; avoid marketing-style hero composition.
|
|
43
|
+
|
|
44
|
+
## Required States
|
|
45
|
+
|
|
46
|
+
- Loading: use `SkeletonRows` for lists and chart-level loading placeholders.
|
|
47
|
+
- Error: use `ErrorState` inside the failed section; do not blank the whole page
|
|
48
|
+
if other sections have usable data.
|
|
49
|
+
- Empty: use `EmptyState` in the affected section only.
|
|
50
|
+
|
|
51
|
+
## Do Not
|
|
52
|
+
|
|
53
|
+
- Do not place domain-specific KPI names or metric formulas in this recipe.
|
|
54
|
+
- Do not create decorative cards around entire page sections.
|
|
55
|
+
- Do not hand-roll chart chrome if MDS chart components cover the case.
|
|
56
|
+
|
|
57
|
+
## MCP Usage
|
|
58
|
+
|
|
59
|
+
Before coding, query:
|
|
60
|
+
|
|
61
|
+
- `mds_recipes_get("dashboard-overview")`
|
|
62
|
+
- `mds_playbook_get("page-layout")`
|
|
63
|
+
- `mds_components_get("StatCard")`
|
|
64
|
+
- `mds_components_get("Chart.Line")`
|
|
65
|
+
- `mds_components_get("DataList.Root")`
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: detail-drawer
|
|
3
|
+
title: Detail Drawer
|
|
4
|
+
status: implemented
|
|
5
|
+
components:
|
|
6
|
+
- Drawer.Root
|
|
7
|
+
- Drawer.Content
|
|
8
|
+
- Drawer.Header
|
|
9
|
+
- Drawer.Body
|
|
10
|
+
- Drawer.Footer
|
|
11
|
+
- Drawer.Title
|
|
12
|
+
- Drawer.Description
|
|
13
|
+
- DescriptionList.Root
|
|
14
|
+
- Timeline.Root
|
|
15
|
+
- Section.Root
|
|
16
|
+
- Button
|
|
17
|
+
- Pill
|
|
18
|
+
playbooks:
|
|
19
|
+
- overlay
|
|
20
|
+
- page-layout
|
|
21
|
+
- data-grid
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# Detail Drawer
|
|
25
|
+
|
|
26
|
+
Use this recipe when the user selects an item from a list and needs to inspect
|
|
27
|
+
or act on details without losing list context.
|
|
28
|
+
|
|
29
|
+
## Contract
|
|
30
|
+
|
|
31
|
+
- Use `Drawer.Root` and `Drawer.Content`.
|
|
32
|
+
- Use `Drawer.Header` for title, status, and short description.
|
|
33
|
+
- Use `Drawer.Body` for grouped information.
|
|
34
|
+
- Use `DescriptionList.Root` for key-value facts.
|
|
35
|
+
- Use `Timeline.Root` for chronological events.
|
|
36
|
+
- Use `Section.Root` inside the drawer when detail content has multiple groups.
|
|
37
|
+
- Use `Drawer.Footer` for persistent actions that apply to the selected item.
|
|
38
|
+
|
|
39
|
+
## Fit Criteria
|
|
40
|
+
|
|
41
|
+
- Good fit: read-heavy detail, secondary edit action, audit trail, status
|
|
42
|
+
explanation, preview next to a list.
|
|
43
|
+
- Bad fit: global settings, long forms, full-screen workflow, or content that
|
|
44
|
+
needs multiple route-level tabs.
|
|
45
|
+
|
|
46
|
+
## Required States
|
|
47
|
+
|
|
48
|
+
- Loading selected item, not found, permission-limited content, action pending,
|
|
49
|
+
action error.
|
|
50
|
+
- If the list row remains selected while the drawer is open, selected visual
|
|
51
|
+
state must use MDS selected tokens/components, not custom color.
|
|
52
|
+
|
|
53
|
+
## Do Not
|
|
54
|
+
|
|
55
|
+
- Do not make the drawer the only place where critical page state exists.
|
|
56
|
+
- Do not put app-specific routing, fetch, permission, or mutation rules in this
|
|
57
|
+
recipe.
|
|
58
|
+
- Do not overflow action buttons into arbitrary inline styles; use
|
|
59
|
+
`Drawer.Footer` composition.
|
|
60
|
+
|
|
61
|
+
## MCP Usage
|
|
62
|
+
|
|
63
|
+
Before coding, query:
|
|
64
|
+
|
|
65
|
+
- `mds_recipes_get("detail-drawer")`
|
|
66
|
+
- `mds_playbook_get("overlay")`
|
|
67
|
+
- `mds_components_get("Drawer.Content")`
|
|
68
|
+
- `mds_components_get("DescriptionList.Root")`
|
|
69
|
+
- `mds_components_get("Timeline.Root")`
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: modal-form
|
|
3
|
+
title: Modal Form
|
|
4
|
+
status: implemented
|
|
5
|
+
components:
|
|
6
|
+
- Modal.Root
|
|
7
|
+
- Modal.Content
|
|
8
|
+
- Modal.Header
|
|
9
|
+
- Modal.Body
|
|
10
|
+
- Modal.Footer
|
|
11
|
+
- Modal.Title
|
|
12
|
+
- Modal.Description
|
|
13
|
+
- Field.Root
|
|
14
|
+
- TextField
|
|
15
|
+
- Select
|
|
16
|
+
- Button
|
|
17
|
+
- Banner
|
|
18
|
+
playbooks:
|
|
19
|
+
- overlay
|
|
20
|
+
- form
|
|
21
|
+
- feedback
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# Modal Form
|
|
25
|
+
|
|
26
|
+
Use this recipe when a short, focused form is an interruption to the current
|
|
27
|
+
page and the user should return to the same context after submitting or
|
|
28
|
+
cancelling.
|
|
29
|
+
|
|
30
|
+
## Contract
|
|
31
|
+
|
|
32
|
+
- Use `Modal.Root` and `Modal.Content`.
|
|
33
|
+
- Use `Modal.Header` with `Modal.Title` and optional `Modal.Description`.
|
|
34
|
+
- Put controls inside `Modal.Body`; each control still uses `Field.Root`.
|
|
35
|
+
- Put commit/cancel actions inside `Modal.Footer`.
|
|
36
|
+
- Primary action belongs on the trailing side; destructive action must use a
|
|
37
|
+
destructive tone/variant.
|
|
38
|
+
- Use `Banner` inside the body for submit errors that are not tied to one field.
|
|
39
|
+
|
|
40
|
+
## Fit Criteria
|
|
41
|
+
|
|
42
|
+
- Good fit: 1-5 fields, quick confirmation, small create/edit flow.
|
|
43
|
+
- Bad fit: long settings forms, multi-step flows, dense table editing, or flows
|
|
44
|
+
needing deep review. Use `Page`, `Drawer`, or a dedicated pattern instead.
|
|
45
|
+
|
|
46
|
+
## Required States
|
|
47
|
+
|
|
48
|
+
- Opening, focused first field or safe heading, invalid fields, submitting,
|
|
49
|
+
submit error, close/cancel.
|
|
50
|
+
- If closing can lose edits, caller owns the confirmation policy; MDS only
|
|
51
|
+
provides modal/dialog primitives.
|
|
52
|
+
|
|
53
|
+
## Do Not
|
|
54
|
+
|
|
55
|
+
- Do not put platform routing or persistence behavior in this recipe.
|
|
56
|
+
- Do not nest another modal as the default solution.
|
|
57
|
+
- Do not use modal for content users need to compare against a table behind it.
|
|
58
|
+
|
|
59
|
+
## MCP Usage
|
|
60
|
+
|
|
61
|
+
Before coding, query:
|
|
62
|
+
|
|
63
|
+
- `mds_recipes_get("modal-form")`
|
|
64
|
+
- `mds_playbook_get("overlay")`
|
|
65
|
+
- `mds_playbook_get("form")`
|
|
66
|
+
- `mds_components_get("Modal.Content")`
|
|
67
|
+
- `mds_components_get("Field.Root")`
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: settings-form-page
|
|
3
|
+
title: Settings Form Page
|
|
4
|
+
status: implemented
|
|
5
|
+
components:
|
|
6
|
+
- Page
|
|
7
|
+
- PageHeader
|
|
8
|
+
- Section.Root
|
|
9
|
+
- Field.Root
|
|
10
|
+
- Field.Label
|
|
11
|
+
- Field.Hint
|
|
12
|
+
- Field.Error
|
|
13
|
+
- TextField
|
|
14
|
+
- Textarea
|
|
15
|
+
- Select
|
|
16
|
+
- Checkbox
|
|
17
|
+
- Switch
|
|
18
|
+
- Button
|
|
19
|
+
- Toolbar.Root
|
|
20
|
+
- Banner
|
|
21
|
+
playbooks:
|
|
22
|
+
- page-layout
|
|
23
|
+
- form
|
|
24
|
+
- feedback
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Settings Form Page
|
|
28
|
+
|
|
29
|
+
Use this recipe for a full-page form that edits configuration, profile,
|
|
30
|
+
notifications, account, store, or integration settings.
|
|
31
|
+
|
|
32
|
+
## Contract
|
|
33
|
+
|
|
34
|
+
- Use `Page` and `PageHeader` for page identity.
|
|
35
|
+
- Group related settings with `Section.Root`; each section should own one clear
|
|
36
|
+
theme of fields.
|
|
37
|
+
- Every control must sit inside `Field.Root` with `Field.Label`.
|
|
38
|
+
- Use `Field.Hint` for persistent guidance and `Field.Error` for validation
|
|
39
|
+
feedback.
|
|
40
|
+
- Use `Toolbar.Root` for save/cancel or secondary actions when actions are
|
|
41
|
+
visually tied to the form.
|
|
42
|
+
- Use `Banner` for page-level status such as unsaved remote conflict, save
|
|
43
|
+
failure, or missing prerequisite.
|
|
44
|
+
|
|
45
|
+
## Field Choice
|
|
46
|
+
|
|
47
|
+
- Short text: `TextField`
|
|
48
|
+
- Long text: `Textarea`
|
|
49
|
+
- One option from known set: `Select`
|
|
50
|
+
- Boolean setting with immediate on/off meaning: `Switch`
|
|
51
|
+
- Boolean agreement or batch item selection: `Checkbox`
|
|
52
|
+
- Numeric setting: `NumberInput`
|
|
53
|
+
- Date or time setting: `DatePicker` / `TimePicker`
|
|
54
|
+
|
|
55
|
+
## Required States
|
|
56
|
+
|
|
57
|
+
- Default, dirty, saving, saved, invalid, disabled/read-only.
|
|
58
|
+
- Validation must be represented through `Field.Error`; do not rely on color
|
|
59
|
+
only.
|
|
60
|
+
- Long forms should keep actions discoverable with section or bottom toolbar
|
|
61
|
+
placement chosen by the caller.
|
|
62
|
+
|
|
63
|
+
## Do Not
|
|
64
|
+
|
|
65
|
+
- Do not encode app-specific form library, mutation, query, or persistence rules
|
|
66
|
+
in MDS recipe content.
|
|
67
|
+
- Do not place every setting in one visual group.
|
|
68
|
+
- Do not use placeholder text as the only label.
|
|
69
|
+
|
|
70
|
+
## MCP Usage
|
|
71
|
+
|
|
72
|
+
Before coding, query:
|
|
73
|
+
|
|
74
|
+
- `mds_recipes_get("settings-form-page")`
|
|
75
|
+
- `mds_playbook_get("form")`
|
|
76
|
+
- `mds_components_get("Field.Root")`
|
|
77
|
+
- `mds_components_get("TextField")`
|
|
78
|
+
- `mds_components_get("Select")`
|
|
79
|
+
- `mds_components_get("Toolbar.Root")`
|
package/dist/index.d.ts
CHANGED
|
@@ -1,28 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @makitt/mds-mcp-server — MCP server for
|
|
3
|
+
* @makitt/mds-mcp-server — MCP server for MDS.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* Fabrication 0 의 최종 layer — 사용자가 mds 의 props / 안티패턴 / 사용 약속을 정확히 lookup.
|
|
7
|
-
*
|
|
8
|
-
* Tools:
|
|
9
|
-
* - mds_components_list — 모든 컴포넌트 list (layer 필터)
|
|
10
|
-
* - mds_components_get — 특정 컴포넌트의 full spec (props/types/description)
|
|
11
|
-
* - mds_components_search — text search (name / description / prop)
|
|
12
|
-
* - mds_playbook_list — 모든 Playbook area list
|
|
13
|
-
* - mds_playbook_get — 특정 Playbook 의 content (form / feedback / data-grid 등)
|
|
14
|
-
* - mds_playbook_search — Playbook 의 decision matrix / 안티패턴 검색
|
|
15
|
-
*
|
|
16
|
-
* Transport: stdio (Claude Code / Cursor 호환)
|
|
17
|
-
*
|
|
18
|
-
* Setup:
|
|
19
|
-
* 1. Build: `pnpm build`
|
|
20
|
-
* 2. Claude Code MCP config: ~/.claude/claude_desktop_config.json
|
|
21
|
-
* {
|
|
22
|
-
* "mcpServers": {
|
|
23
|
-
* "mds": { "command": "node", "args": ["/path/to/mds-mcp-server/dist/index.js"] }
|
|
24
|
-
* }
|
|
25
|
-
* }
|
|
5
|
+
* Transport: stdio (Claude Code / Cursor compatible)
|
|
26
6
|
*/
|
|
27
|
-
export {};
|
|
7
|
+
export { callMdsTool, listMdsTools } from './tools.js';
|
|
8
|
+
export declare function startMdsMcpServer(): Promise<void>;
|
|
28
9
|
//# sourceMappingURL=index.d.ts.map
|