sh-ui-cli 0.61.2 → 0.61.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,16 @@
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.61.3",
7
+ "date": "2026-05-08",
8
+ "title": "fix — `sh-ui add tokens` 가 base=custom 테마에서 깨지던 회귀",
9
+ "type": "patch",
10
+ "highlights": [
11
+ "**`sh-ui add tokens` 가 `theme.base: \"custom\"` 일 때 `해석 실패: {color.custom.50}` 로 깨지던 회귀 수정** — v0.61.2 에서 base64 테마 입력 시 `theme.base` 를 `'custom'` 으로 기록하기 시작했는데, 토큰 빌더가 `{color.<base>.<shade>}` placeholder 를 풀려다 'custom' 스케일을 못 찾아 throw 했음. base64 는 사후 색상 재해석이 불가능한 원본이므로 add tokens 를 no-op 으로 처리하고 안내 메시지 출력 (tokens.css 는 create 시점에 이미 정확히 주입됨)."
12
+ ],
13
+ "url": "https://github.com/sanghyeonKim0201/sh-ui/releases/tag/v0.61.3"
14
+ },
5
15
  {
6
16
  "version": "0.61.2",
7
17
  "date": "2026-05-08",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sh-ui-cli",
3
- "version": "0.61.2",
3
+ "version": "0.61.3",
4
4
  "description": "sh-ui CLI — 프로젝트 스캐폴드(create) + 컴포넌트 추가(add/list/remove) + IDE-내 AI용 MCP 서버",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/add.mjs CHANGED
@@ -172,6 +172,19 @@ async function addTokens(config, cwd, diffMode, summary, conflictResolver) {
172
172
  if (!destRel) throw new Error("paths.tokens 가 설정에 없습니다.");
173
173
  const dest = resolve(cwd, destRel);
174
174
 
175
+ // theme.base === 'custom' 이면 토큰 빌더가 color.custom.X 스케일을 못 찾아 throw 한다 —
176
+ // base64 테마는 사후 색상 재생성 자체가 불가능 (원본 base64 가 단일 진실, 재해석 X).
177
+ // create 시점에 tokens.css 가 이미 정확히 주입돼 있으므로 보존하고 사용자에게 안내한다.
178
+ if (config.theme?.base === 'custom') {
179
+ if (!diffMode) {
180
+ console.log(
181
+ `↷ tokens → ${relative(cwd, dest)} (custom 테마 — tokens.css 보존, ` +
182
+ `색 조정은 파일 직접 편집 또는 sh_ui_encode_theme 으로 새 base64 생성 후 재스캐폴드)`
183
+ );
184
+ }
185
+ return;
186
+ }
187
+
175
188
  const { buildTokens } = await loadTokensBuilder();
176
189
  const content = await buildTokens(config);
177
190