@makitt.io/mds-mcp-server 0.1.1 → 0.1.2

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.
@@ -121,31 +121,55 @@ import { Banner } from '@makitt/mds';
121
121
 
122
122
  ---
123
123
 
124
- ## 5. Notification (영속) — TBD (mds 추가 예정)
124
+ ## 5. Notification (영속) — `overlays/Notification/` (Step 14 완료)
125
125
 
126
- > mds 영속 Notification 컴포넌트 미존재. 현재는 `<Banner>` long-lived 사용으로 대체.
126
+ 영속 알림 inbox + Compound API. `notificationStore` (sessionStorage persist) + `useNotification()` hook.
127
127
 
128
- ### 향후 추가 예정
128
+ ### Compound API
129
129
 
130
130
  ```tsx
131
- // (예정)
132
- <Notification tone="warning" persistent onDismiss={dismiss}>
133
- 라이선스가 7일 만료됩니다.
134
- <Button onClick={renew}>지금 갱신</Button>
135
- </Notification>
131
+ import { Notification, useNotification } from '@makitt/mds';
132
+
133
+ // (A) Drawer 안 알림 센터 (Slack inbox 패턴)
134
+ <Drawer.Root>
135
+ <Drawer.Trigger>알림</Drawer.Trigger>
136
+ <Drawer.Content side="right">
137
+ <Drawer.Header><Drawer.Title>알림</Drawer.Title><Drawer.Close /></Drawer.Header>
138
+ <Drawer.Body>
139
+ <Notification.Root /> {/* store-bound list 자동 render */}
140
+ </Drawer.Body>
141
+ </Drawer.Content>
142
+ </Drawer.Root>
143
+
144
+ // (B) imperative API — 알림 추가
145
+ const { push, markRead, dismiss, clear } = useNotification();
146
+
147
+ push({
148
+ level: 'warning',
149
+ title: '라이선스 만료 임박',
150
+ description: '7일 후 만료',
151
+ action: { label: '갱신', onClick: renew },
152
+ });
136
153
  ```
137
154
 
138
- ### Banner 와 차이 — 일단 design
155
+ ### 핵심
156
+
157
+ - **`overlays/Notification/`** layer — 알림 센터 는 Drawer / Popover overlay 안 mount (caller 위치 결정, mds 강요 X)
158
+ - **`notificationStore`** — sessionStorage persist (새 session 시 자동 clear, 동일 session 의 dismiss state 유지)
159
+ - **`useNotification()`** hook — items / unreadCount / push / markRead / markAllRead / dismiss / clear
160
+ - **Compound parts** — `Notification.Root` (store-bound list + header + auto empty state)
161
+ - **4 level** — info / success / warning / danger (axe-pass: `role="alert"` for warning/danger, `role="status"` for info/success)
162
+
163
+ ### Banner 와 차이
139
164
 
140
165
  - **Banner** = 페이지 inline (그 페이지의 상태)
141
- - **Notification** = global inbox (모든 페이지에서 표시)
142
- - Persistent = sessionStorage / 서버 상태 명시 닫기 유지
166
+ - **Notification** = global inbox (모든 페이지 — Drawer / Popover 안 mount)
167
+ - **Persistent** = sessionStorage 명시 dismiss 유지 (새 session reset)
143
168
 
144
- ### TBD
169
+ ### TBD (별도 cycle)
145
170
 
146
- - Notification mount 위치 (top of shell? side inbox?)
147
- - 다중 notification stacking
148
- - 닫기 후 다시 나타나는 조건 (서버 trigger / cookie 기반)
171
+ - Server-side dismiss persistence (현재 = sessionStorage client only)
172
+ - Sub-component 분리 export (`Notification.Header`, `Notification.Item`, `Notification.EmptyState`)
149
173
 
150
174
  ---
151
175
 
@@ -68,10 +68,37 @@
68
68
  - input 의 a11y attribute (htmlFor / aria-describedby / aria-errormessage / aria-invalid) 자동 wire
69
69
  - 원자 input 직접 사용 보다 `Field` compound 권장 (Storybook 의 stories 도 Field 사용 예시)
70
70
 
71
- ### 파일 / 이미지 — Step 13 별도
72
-
73
- > mds 에 일반 `FileUpload` 컴포넌트 없음 (Step 13 별도 신규 작업). 현재 도메인별 구현 (예: web 의 PersonCell avatar / blog 의 cover image).
74
- > 임시 — domain feature 의 `shared/ui/FileInput/` (TBD), 또는 raw `<input type="file">` + mds wrapper (a11y 보강).
71
+ ### 파일 / 이미지 — `FileUpload` (Step 13 완료)
72
+
73
+ `compounds/FileUpload/`drag-drop + file picker + preview + per-file progress.
74
+
75
+ **핵심 — `upload` prop injection** (WYSIWYG editor 패턴):
76
+
77
+ ```tsx
78
+ <Field.Root>
79
+ <Field.Label>제품 이미지</Field.Label>
80
+ <FileUpload
81
+ accept="image/*"
82
+ multiple
83
+ maxFiles={10}
84
+ maxSize={5 * 1024 * 1024}
85
+ upload={async (file, onProgress) => {
86
+ const { url } = await uploadToS3(file, onProgress);
87
+ return { url };
88
+ }}
89
+ value={files}
90
+ onChange={setFiles}
91
+ onReject={(rejected) => toast.error(rejected[0]?.message)}
92
+ />
93
+ <Field.Hint>최대 10MB / image only</Field.Hint>
94
+ </Field.Root>
95
+ ```
96
+
97
+ - mds 는 picker / drag-drop / preview / progress UI 만 책임. server upload (S3 / Cloudinary / 자체 API / multipart) 는 caller 결정.
98
+ - `upload` 안 주면 deferred mode (File 객체 만 보관, form submit 시 caller 가 처리).
99
+ - Controlled (`value` + `onChange`) + Uncontrolled (`defaultValue`) 둘 다 지원.
100
+ - `FileItem`: `{ id, file?, url?, name, size, type, status: 'pending'|'uploading'|'success'|'error', progress?, error? }` — File 객체 + server URL 양쪽 표현 가능 (편집 시 기존 URL 도 자연 처리).
101
+ - `onReject` callback — `accept` / `maxSize` / `maxFiles` validation fail 시.
75
102
 
76
103
  ---
77
104
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makitt.io/mds-mcp-server",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server for @makitt/mds — AI 가 catalog + playbook 자동 query (fabrication 0)",
5
5
  "repository": {
6
6
  "type": "git",