sh-ui-cli 0.45.3 → 0.47.0
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/data/changelog/versions.json +26 -0
- package/data/registry/react/components/accordion/index.module.tsx +97 -0
- package/data/registry/react/components/accordion/styles.module.css +111 -0
- package/data/registry/react/components/avatar/index.module.tsx +73 -0
- package/data/registry/react/components/avatar/styles.module.css +36 -0
- package/data/registry/react/components/badge/index.module.tsx +40 -0
- package/data/registry/react/components/badge/styles.module.css +57 -0
- package/data/registry/react/components/breadcrumb/index.module.tsx +152 -0
- package/data/registry/react/components/breadcrumb/styles.module.css +82 -0
- package/data/registry/react/components/button/index.module.tsx +45 -0
- package/data/registry/react/components/button/styles.module.css +92 -0
- package/data/registry/react/components/calendar/index.module.tsx +806 -0
- package/data/registry/react/components/calendar/styles.module.css +213 -0
- package/data/registry/react/components/card/index.module.tsx +63 -0
- package/data/registry/react/components/card/styles.module.css +73 -0
- package/data/registry/react/components/carousel/index.module.tsx +430 -0
- package/data/registry/react/components/carousel/styles.module.css +155 -0
- package/data/registry/react/components/checkbox/index.module.tsx +96 -0
- package/data/registry/react/components/checkbox/styles.module.css +75 -0
- package/data/registry/react/components/code-editor/index.module.tsx +230 -0
- package/data/registry/react/components/code-editor/styles.module.css +76 -0
- package/data/registry/react/components/code-panel/index.module.tsx +191 -0
- package/data/registry/react/components/code-panel/styles.module.css +124 -0
- package/data/registry/react/components/color-picker/index.module.tsx +467 -0
- package/data/registry/react/components/color-picker/styles.module.css +166 -0
- package/data/registry/react/components/combobox/index.module.tsx +165 -0
- package/data/registry/react/components/combobox/styles.module.css +151 -0
- package/data/registry/react/components/context-menu/index.module.tsx +251 -0
- package/data/registry/react/components/context-menu/styles.module.css +140 -0
- package/data/registry/react/components/date-picker/index.module.tsx +520 -0
- package/data/registry/react/components/date-picker/styles.module.css +103 -0
- package/data/registry/react/components/dialog/index.module.tsx +95 -0
- package/data/registry/react/components/dialog/styles.module.css +127 -0
- package/data/registry/react/components/dropdown-menu/index.module.tsx +255 -0
- package/data/registry/react/components/dropdown-menu/styles.module.css +150 -0
- package/data/registry/react/components/file-upload/index.module.tsx +487 -0
- package/data/registry/react/components/file-upload/styles.module.css +170 -0
- package/data/registry/react/components/form/index.module.tsx +61 -0
- package/data/registry/react/components/form/styles.module.css +47 -0
- package/data/registry/react/components/header/index.module.tsx +805 -0
- package/data/registry/react/components/header/styles.module.css +350 -0
- package/data/registry/react/components/input/index.module.tsx +486 -0
- package/data/registry/react/components/input/styles.module.css +200 -0
- package/data/registry/react/components/label/index.module.tsx +52 -0
- package/data/registry/react/components/label/styles.module.css +90 -0
- package/data/registry/react/components/markdown-editor/index.module.tsx +119 -0
- package/data/registry/react/components/markdown-editor/styles.module.css +160 -0
- package/data/registry/react/components/menubar/index.module.tsx +32 -0
- package/data/registry/react/components/menubar/styles.module.css +45 -0
- package/data/registry/react/components/numeric-input/index.module.tsx +148 -0
- package/data/registry/react/components/numeric-input/styles.module.css +56 -0
- package/data/registry/react/components/page-toc/index.module.tsx +174 -0
- package/data/registry/react/components/page-toc/styles.module.css +82 -0
- package/data/registry/react/components/pagination/index.module.tsx +269 -0
- package/data/registry/react/components/pagination/styles.module.css +105 -0
- package/data/registry/react/components/popover/index.module.tsx +113 -0
- package/data/registry/react/components/popover/styles.module.css +65 -0
- package/data/registry/react/components/progress/index.module.tsx +54 -0
- package/data/registry/react/components/progress/styles.module.css +41 -0
- package/data/registry/react/components/radio/index.module.tsx +65 -0
- package/data/registry/react/components/radio/styles.module.css +80 -0
- package/data/registry/react/components/rich-text-editor/index.module.tsx +348 -0
- package/data/registry/react/components/rich-text-editor/styles.module.css +196 -0
- package/data/registry/react/components/select/index.module.tsx +234 -0
- package/data/registry/react/components/select/styles.module.css +193 -0
- package/data/registry/react/components/separator/index.module.tsx +46 -0
- package/data/registry/react/components/separator/styles.module.css +15 -0
- package/data/registry/react/components/sidebar/index.module.tsx +1067 -0
- package/data/registry/react/components/sidebar/styles.module.css +502 -0
- package/data/registry/react/components/skeleton/index.module.tsx +22 -0
- package/data/registry/react/components/skeleton/styles.module.css +24 -0
- package/data/registry/react/components/slider/index.module.tsx +298 -0
- package/data/registry/react/components/slider/styles.module.css +64 -0
- package/data/registry/react/components/spinner/index.module.tsx +38 -0
- package/data/registry/react/components/spinner/styles.module.css +37 -0
- package/data/registry/react/components/switch/index.module.tsx +39 -0
- package/data/registry/react/components/switch/styles.module.css +83 -0
- package/data/registry/react/components/tabs/index.module.tsx +91 -0
- package/data/registry/react/components/tabs/styles.module.css +148 -0
- package/data/registry/react/components/textarea/index.module.tsx +23 -0
- package/data/registry/react/components/textarea/styles.module.css +54 -0
- package/data/registry/react/components/toast/index.module.tsx +258 -0
- package/data/registry/react/components/toast/styles.module.css +290 -0
- package/data/registry/react/components/toggle/index.module.tsx +131 -0
- package/data/registry/react/components/toggle/styles.module.css +85 -0
- package/data/registry/react/components/tooltip/index.module.tsx +83 -0
- package/data/registry/react/components/tooltip/styles.module.css +44 -0
- package/data/registry/react/registry.json +604 -1
- package/data/tokens/build.mjs +4 -0
- package/package.json +1 -1
- package/src/add.mjs +12 -12
- package/src/api.d.ts +4 -3
- package/src/constants.js +4 -3
package/data/tokens/build.mjs
CHANGED
|
@@ -574,6 +574,10 @@ const tokenEmitters = {
|
|
|
574
574
|
// 동일. 향후 Tailwind v3 theme.config.ts 를 별도 emit 하고 싶으면
|
|
575
575
|
// 여기에 다른 함수를 등록.
|
|
576
576
|
tailwind: buildTokensCss,
|
|
577
|
+
// CSS Modules 변종도 토큰은 평문 CSS custom properties — :root 변수를
|
|
578
|
+
// 그대로 참조하면 되므로 tokens.css 를 공유. .module.css 안에서도
|
|
579
|
+
// var(--primary) 같은 글로벌 변수는 정상 참조됨.
|
|
580
|
+
"css-modules": buildTokensCss,
|
|
577
581
|
},
|
|
578
582
|
flutter: {
|
|
579
583
|
plain: buildTokensDart,
|
package/package.json
CHANGED
package/src/add.mjs
CHANGED
|
@@ -193,19 +193,19 @@ function frameworkMatches(entry, cssFramework) {
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
|
-
*
|
|
197
|
-
* plain
|
|
198
|
-
*
|
|
196
|
+
* 컴포넌트에 요청된 cssFramework 전용 변종 파일이 없으면 plain 으로 fallback.
|
|
197
|
+
* plain CSS 컴포넌트는 :root 변수만 의존하므로 어떤 환경(Tailwind v4, CSS Modules,
|
|
198
|
+
* vanilla CSS) 에서도 그대로 동작 — 깨지지 않음.
|
|
199
199
|
*
|
|
200
|
-
* 점진적 rollout 전략 — 모든 컴포넌트가 한 번에
|
|
201
|
-
* 가능한 것부터
|
|
200
|
+
* 점진적 rollout 전략 — 모든 컴포넌트가 한 번에 새 변종을 갖출 필요 없이
|
|
201
|
+
* 가능한 것부터 변종을 제공하고, 나머지는 plain 으로 자연 처리.
|
|
202
202
|
*/
|
|
203
203
|
function effectiveFramework(entry, cssFramework) {
|
|
204
|
-
if (cssFramework
|
|
205
|
-
const
|
|
206
|
-
(f) => f.frameworks && f.frameworks.includes(
|
|
204
|
+
if (cssFramework === "plain") return cssFramework;
|
|
205
|
+
const hasVariant = (entry.files ?? []).some(
|
|
206
|
+
(f) => f.frameworks && f.frameworks.includes(cssFramework),
|
|
207
207
|
);
|
|
208
|
-
return
|
|
208
|
+
return hasVariant ? cssFramework : "plain";
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
async function addComponent(name, config, cwd, installed, pendingDeps, diffMode, summary, conflictResolver) {
|
|
@@ -223,11 +223,11 @@ async function addComponent(name, config, cwd, installed, pendingDeps, diffMode,
|
|
|
223
223
|
const requestedFw = config.cssFramework ?? "plain";
|
|
224
224
|
const cssFramework = effectiveFramework(entry, requestedFw);
|
|
225
225
|
|
|
226
|
-
// 사용자가
|
|
226
|
+
// 사용자가 plain 외 변종을 골랐는데 이 컴포넌트는 plain 으로 fallback 된 경우 한 줄 알림.
|
|
227
227
|
// 동작에 문제는 없지만 일관성에 대한 기대를 정확히 셋업하기 위함.
|
|
228
|
-
if (requestedFw
|
|
228
|
+
if (requestedFw !== "plain" && cssFramework === "plain" && !diffMode) {
|
|
229
229
|
console.log(
|
|
230
|
-
`ℹ ${name} —
|
|
230
|
+
`ℹ ${name} — ${requestedFw} 변종 미제공, plain 변종으로 설치 (어떤 환경에서도 그대로 동작)`,
|
|
231
231
|
);
|
|
232
232
|
}
|
|
233
233
|
|
package/src/api.d.ts
CHANGED
|
@@ -12,10 +12,11 @@ export type ThemeMode = 'light-dark' | 'light' | 'dark';
|
|
|
12
12
|
|
|
13
13
|
/** 현재 실제로 동작하는 CSS 프레임워크.
|
|
14
14
|
* - plain: 모든 컴포넌트가 plain 변종 보유.
|
|
15
|
-
* - tailwind:
|
|
16
|
-
|
|
15
|
+
* - tailwind: 모든 styled 컴포넌트가 utility-class 변종 보유.
|
|
16
|
+
* - css-modules: 모든 styled 컴포넌트가 .module.css 변종 보유. */
|
|
17
|
+
export type CssFrameworkSupported = 'plain' | 'tailwind' | 'css-modules';
|
|
17
18
|
/** 향후 추가 예정 — UI 에서 "곧 지원" 으로 노출되지만 CLI 는 거부. */
|
|
18
|
-
export type CssFrameworkPlanned = '
|
|
19
|
+
export type CssFrameworkPlanned = 'vanilla-extract';
|
|
19
20
|
/** 알려진 전체 (validation 메시지용). */
|
|
20
21
|
export type CssFramework = CssFrameworkSupported | CssFrameworkPlanned;
|
|
21
22
|
|
package/src/constants.js
CHANGED
|
@@ -25,11 +25,12 @@ export const THEME_MODES = ['light-dark', 'light', 'dark'];
|
|
|
25
25
|
|
|
26
26
|
// 현재 실제로 동작하는 값.
|
|
27
27
|
// - plain: CSS custom properties + 일반 .css 파일 (모든 컴포넌트 변종 보유)
|
|
28
|
-
// - tailwind: utility class TSX 변종 (
|
|
29
|
-
|
|
28
|
+
// - tailwind: utility class TSX 변종 (모든 styled 컴포넌트 변종 보유)
|
|
29
|
+
// - css-modules: 모듈 단위 .module.css + styles.X 참조 (모든 styled 컴포넌트 변종 보유)
|
|
30
|
+
export const CSS_FRAMEWORKS_SUPPORTED = ['plain', 'tailwind', 'css-modules'];
|
|
30
31
|
|
|
31
32
|
// 향후 추가 예정. 사용자가 이 값을 주면 친절 에러로 안내.
|
|
32
|
-
export const CSS_FRAMEWORKS_PLANNED = ['
|
|
33
|
+
export const CSS_FRAMEWORKS_PLANNED = ['vanilla-extract'];
|
|
33
34
|
|
|
34
35
|
// 알려진 전체 — 검증 시 supported 와 planned 둘 다 인지하기 위함.
|
|
35
36
|
export const CSS_FRAMEWORKS_ALL = [
|