sh-ui-cli 0.67.1 → 0.67.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.
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$description": "sh-ui 릴리즈 노트 단일 소스. docs(React)와 showcase(Flutter)가 함께 읽는다. 새 릴리즈마다 맨 앞에 추가.",
|
|
4
4
|
"versions": [
|
|
5
|
+
{
|
|
6
|
+
"version": "0.67.3",
|
|
7
|
+
"date": "2026-05-09",
|
|
8
|
+
"title": "fix(sidebar) — Collapsible 하위 메뉴 펼침/접힘 애니메이션",
|
|
9
|
+
"type": "patch",
|
|
10
|
+
"highlights": [
|
|
11
|
+
"**Sidebar Collapsible 애니메이션 회귀 fix** — chevron 회전은 부드러운데 본문은 `display:none` 토글이라 즉시 사라지던 어색함. `grid-template-rows: 0fr ↔ 1fr` 트릭으로 height 를 모르는 채로 200ms ease 트랜지션. inner wrapper + `overflow:hidden`/`min-height:0` 으로 grid track 에 맞춰 잘림.",
|
|
12
|
+
"**a11y 보존** — `hidden={!open}` 대신 `inert` + `aria-hidden` 사용. 닫힌 상태에서도 DOM 은 살아 있어 트랜지션이 가능하면서, 포커스/스크린리더 접근은 정상적으로 차단.",
|
|
13
|
+
"**reduced-motion 가드** — `prefers-reduced-motion: reduce` 일 때 `__collapsible-content` 트랜지션 비활성. 모션 민감 사용자는 즉시 토글 (기존 동작) 유지.",
|
|
14
|
+
"**collapsed=icon flyout 모드 영향 없음** — icon 모드에서는 inline content 가 아닌 Popover 로 전환되므로 기존 flyout UX 그대로."
|
|
15
|
+
],
|
|
16
|
+
"url": "https://github.com/sanghyeonKim0201/sh-ui/releases/tag/v0.67.3"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"version": "0.67.2",
|
|
20
|
+
"date": "2026-05-09",
|
|
21
|
+
"title": "patch — MCP instructions 에 v0.65~0.67 신규 툴/라우팅 가이드 반영 + migrations 노트",
|
|
22
|
+
"type": "patch",
|
|
23
|
+
"highlights": [
|
|
24
|
+
"**MCP `instructions` 갱신** — `sh_ui_add_app` (모노레포에 앱 추가), `sh_ui_migrate_to_v065` (v0.64.x → v0.65 자동 마이그레이션) 사용 시점을 명시. AI 가 사용자 의도 (\"admin 앱 추가\", \"컴포넌트 중복 emit 정리\") 와 툴 호출을 직접 매핑.",
|
|
25
|
+
"**모노레포 라우팅 가이드 추가** — `sh_ui_add_component` 가 monorepo 에선 컴포넌트는 ui-core 단일 SoT, tokens 는 각 ui-app 으로 라우팅. CLI `sh-ui add` 는 v0.67+ walk-up 으로 어느 디렉토리에서든 자동 라우팅 (apps/web 에서 tokens → ui-web hintApp 추론).",
|
|
26
|
+
"**v0.67.1 preset 보존 정책 명시** — rose/emerald/violet 등 풍부한 preset 도 'custom' 과 동일하게 tokens.css 단일 진실로 보존. `sh_ui_add_component` 의 `tokens` 가 rebuild 대신 보존하는 케이스 확장.",
|
|
27
|
+
"**`apps/docs/migrations/v0.65.md`** 에 v0.66/0.67 후속 개선 섹션 추가 — sh_ui_add_app, walk-up 라우팅, preset 회귀 fix 까지 한 페이지에서 흐름 파악 가능."
|
|
28
|
+
],
|
|
29
|
+
"url": "https://github.com/sanghyeonKim0201/sh-ui/releases/tag/v0.67.2"
|
|
30
|
+
},
|
|
5
31
|
{
|
|
6
32
|
"version": "0.67.1",
|
|
7
33
|
"date": "2026-05-09",
|
|
@@ -918,8 +918,13 @@ export function SidebarCollapsibleContent({ children }: { children: React.ReactN
|
|
|
918
918
|
}
|
|
919
919
|
|
|
920
920
|
return (
|
|
921
|
-
<div
|
|
922
|
-
|
|
921
|
+
<div
|
|
922
|
+
className="sh-ui-sidebar__collapsible-content"
|
|
923
|
+
data-state={open ? "open" : "closed"}
|
|
924
|
+
inert={!open}
|
|
925
|
+
aria-hidden={!open || undefined}
|
|
926
|
+
>
|
|
927
|
+
<div className="sh-ui-sidebar__collapsible-content-inner">{children}</div>
|
|
923
928
|
</div>
|
|
924
929
|
);
|
|
925
930
|
}
|
|
@@ -462,8 +462,19 @@
|
|
|
462
462
|
transform: rotate(90deg);
|
|
463
463
|
}
|
|
464
464
|
|
|
465
|
+
/* grid-template-rows 0fr→1fr 트릭 — height 를 모르는 채로 부드럽게 펼침/접힘.
|
|
466
|
+
* inner 는 overflow:hidden + min-height:0 으로 grid track 에 맞춰 잘려나간다. */
|
|
467
|
+
.sh-ui-sidebar__collapsible-content {
|
|
468
|
+
display: grid;
|
|
469
|
+
grid-template-rows: 1fr;
|
|
470
|
+
transition: grid-template-rows 200ms ease;
|
|
471
|
+
}
|
|
465
472
|
.sh-ui-sidebar__collapsible-content[data-state="closed"] {
|
|
466
|
-
|
|
473
|
+
grid-template-rows: 0fr;
|
|
474
|
+
}
|
|
475
|
+
.sh-ui-sidebar__collapsible-content-inner {
|
|
476
|
+
min-height: 0;
|
|
477
|
+
overflow: hidden;
|
|
467
478
|
}
|
|
468
479
|
|
|
469
480
|
/* ───── Flyout (collapsed=icon 상태의 서브메뉴) ─────
|
|
@@ -493,7 +504,8 @@
|
|
|
493
504
|
.sh-ui-sidebar__menu-button,
|
|
494
505
|
.sh-ui-sidebar__menu-sub-button,
|
|
495
506
|
.sh-ui-sidebar__panel-close,
|
|
496
|
-
.sh-ui-sidebar__chevron
|
|
507
|
+
.sh-ui-sidebar__chevron,
|
|
508
|
+
.sh-ui-sidebar__collapsible-content {
|
|
497
509
|
transition: none;
|
|
498
510
|
}
|
|
499
511
|
.sh-ui-sidebar__panel {
|
package/package.json
CHANGED
package/src/mcp.mjs
CHANGED
|
@@ -164,6 +164,22 @@ function buildServerInstructions(cliName) {
|
|
|
164
164
|
|
|
165
165
|
\`create-next-app\` + \`sh_ui_init\` 조합은 **쓰지 말 것** — 위 두 경로가 더 짧고 sh-ui 관용에 맞다.
|
|
166
166
|
|
|
167
|
+
## 기존 모노레포에 새 앱 추가하는 경우 (v0.66+)
|
|
168
|
+
|
|
169
|
+
이미 sh-ui monorepo 가 있고 사용자가 "admin 앱 추가", "dashboard 같은 앱 더 만들고 싶어" 류 요청을 하면 \`sh_ui_add_app\` MCP 툴 사용 (Bash 직접 호출보다 우선).
|
|
170
|
+
|
|
171
|
+
- 인자: name (필수), port, plugins (선택), theme (앱별 다른 톤 가능), cssFramework, cwd
|
|
172
|
+
- 산출물: \`apps/{name}/\` (Next.js + arch overlay) + \`packages/ui/ui-apps/ui-{name}/\` (tokens-only role, v0.65 layout). 새 ui-app 만 theme/css 적용 — 다른 앱 영향 X.
|
|
173
|
+
- 앱별로 다른 톤을 원하면 각 앱 별도 호출 (예: 마케팅 사이트 = rose, admin = emerald). 컴포넌트는 ui-core 단일 SoT 라 두 앱이 자동 공유.
|
|
174
|
+
|
|
175
|
+
## v0.64.x → v0.65 마이그레이션 (v0.66+)
|
|
176
|
+
|
|
177
|
+
사용자가 "v0.64 모노레포에서 컴포넌트 중복 emit 정리하고 싶어" / "ui-app 들에 같은 컴포넌트가 N 번 있어" 류 요청 또는 사용자가 v0.64.x 시절 만든 모노레포라면 \`sh_ui_migrate_to_v065\` 사용:
|
|
178
|
+
|
|
179
|
+
- **dryRun 기본** — 변경 plan 미리보기 후 사용자 확인. 컨텐츠 충돌 시 abort (자동 병합 안 함).
|
|
180
|
+
- apply: 모든 ui-app 의 \`src/{components,hooks,lib}/\` → \`packages/ui/ui-core/\` 단일 SoT 로 dedup 이동, ui-app 에 \`role: "tokens-only"\` 마커, \`apps/*\` 의 \`@workspace/ui-{app}/components/...\` 임포트를 \`@workspace/ui-core/...\` 로 일괄 재작성.
|
|
181
|
+
- 적용 후 사용자에게 \`pnpm install\` 안내.
|
|
182
|
+
|
|
167
183
|
## 이미 있는 프로젝트에 sh-ui 를 얹는 경우 (MCP 툴 사용)
|
|
168
184
|
|
|
169
185
|
기존 Next.js/Vite/Flutter 프로젝트에 sh-ui 컴포넌트만 추가하고 싶을 때:
|
|
@@ -178,6 +194,14 @@ function buildServerInstructions(cliName) {
|
|
|
178
194
|
- \`sh_ui_add_component\` / \`sh_ui_remove_component\` — 설치/삭제
|
|
179
195
|
- \`sh_ui_get_changelog\` — 최근 변경 내역
|
|
180
196
|
|
|
197
|
+
### 모노레포 라우팅 (v0.65+)
|
|
198
|
+
|
|
199
|
+
monorepo 에서 \`sh_ui_add_component\` 호출 시:
|
|
200
|
+
- **컴포넌트/훅/lib** → \`packages/ui/ui-core/\` 단일 SoT (ui-app 마다 복제 X). 모든 앱이 \`@workspace/ui-core/components/<name>\` 으로 import.
|
|
201
|
+
- **\`tokens\`** → 각 \`packages/ui/ui-apps/ui-{app}/\` (앱별 다른 톤 가능). \`--app <name>\` 으로 대상 명시 가능.
|
|
202
|
+
|
|
203
|
+
CLI \`sh-ui add <name>\` 은 monorepo 의 어느 디렉토리에서든 (apps/web/, root, ui-core, ui-apps/ui-{app}) 실행해도 자동 라우팅 (v0.67+ walk-up). \`apps/web/\` 안에서 \`sh-ui add tokens\` 실행하면 hintApp='web' 으로 ui-web 자동 선택.
|
|
204
|
+
|
|
181
205
|
## UI 짤 때 사고 순서 (raw HTML 기본값 회피)
|
|
182
206
|
|
|
183
207
|
새 위젯·페이지를 작성할 때 \`<aside>\` / \`<nav>\` / \`<header>\` / \`<table>\` / \`<button>\` 같은 시맨틱 태그를 raw 로 쓰기 전에:
|
|
@@ -222,7 +246,7 @@ function buildServerInstructions(cliName) {
|
|
|
222
246
|
|
|
223
247
|
### 기존 프로젝트 톤만 바꾸고 싶을 때
|
|
224
248
|
|
|
225
|
-
> v0.61.2 부터 \`theme.base: "custom"\` 인 프로젝트에서 \`sh_ui_add_component\` 의 \`tokens\` 는 no-op (보존). 색을 바꾸려면 새 base64 를 만들고 새 디렉토리로 \`force: true\` 재스캐폴드하는 게 정석. 부분 편집을 원해도 \`tokens.css\` 직접 수정 후 \`sh_ui_encode_theme\` 로 새 base64 백업까지 같이 — 그 base64 를 메모리에 갱신해야 다음 재스캐폴드와 일관됨.
|
|
249
|
+
> v0.61.2 부터 \`theme.base: "custom"\` 인 프로젝트에서 \`sh_ui_add_component\` 의 \`tokens\` 는 no-op (보존). v0.67.1 부터 \`rose\`/\`emerald\`/\`violet\` 같은 풍부한 preset 도 동일 — tokens.css 단일 진실로 보존. 색을 바꾸려면 새 base64 를 만들고 새 디렉토리로 \`force: true\` 재스캐폴드하는 게 정석. 부분 편집을 원해도 \`tokens.css\` 직접 수정 후 \`sh_ui_encode_theme\` 로 새 base64 백업까지 같이 — 그 base64 를 메모리에 갱신해야 다음 재스캐폴드와 일관됨.
|
|
226
250
|
`;
|
|
227
251
|
}
|
|
228
252
|
|