@spectrabrain/eds 0.2.2 → 0.3.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/AI.md +4 -4
- package/AI_CONTEXT.json +7 -8
- package/CHANGELOG.md +46 -16
- package/CONSUMER_AGENT.md +65 -55
- package/FRONTEND_CONVENTIONS.md +27 -32
- package/QUICKSTART.md +19 -28
- package/README.md +14 -14
- package/TAILWIND_V4.md +4 -2
- package/TOKEN_CONTEXT.md +7 -7
- package/consumer/align/templates/package.scripts.json +0 -1
- package/consumer/align/templates/src/app/main.tsx +9 -19
- package/consumer/align/templates/vite.config.rolldown.ts +1 -1
- package/consumer/align-analysis.mjs +1712 -299
- package/consumer/align-plan.mjs +647 -139
- package/consumer/align-rules.mjs +59 -23
- package/consumer/align.mjs +639 -103
- package/consumer/cli.mjs +7 -7
- package/dist/components/Button/README.md +1 -1
- package/dist/components/Button/spec.json +2 -2
- package/dist/components.css +7 -7
- package/llms.txt +6 -8
- package/package.json +2 -2
- package/consumer/align/templates/env.mock +0 -1
- package/consumer/align/templates/src/mocks/browser.ts +0 -5
- package/consumer/align/templates/src/mocks/handlers.ts +0 -4
package/consumer/cli.mjs
CHANGED
|
@@ -8,13 +8,13 @@ const usage = [
|
|
|
8
8
|
"Usage: eds <command> [options]",
|
|
9
9
|
"",
|
|
10
10
|
"Commands:",
|
|
11
|
-
" init
|
|
12
|
-
" write allowScripts on npm 12+, then
|
|
11
|
+
" init Add sync:eds and eds:doctor when missing; add pretypecheck/prebuild when target scripts exist",
|
|
12
|
+
" and hooks are missing; write allowScripts on npm 12+, then sync in the package declaring @spectrabrain/eds",
|
|
13
13
|
" sync Generate src/styles/eds-tokens.css, wire the Tailwind root CSS and update AGENTS.md",
|
|
14
14
|
" and the @AGENTS.md import in CLAUDE.md (or .claude/CLAUDE.md) and GEMINI.md when they exist",
|
|
15
15
|
" (without a Tailwind root only those change); notes say when an agent may not load the block",
|
|
16
|
-
" doctor Check
|
|
17
|
-
" is a public token (exit 1 when something is off)",
|
|
16
|
+
" doctor Check sync status and the EDS font import; with a Tailwind CSS v4 root, also check that each eds-*",
|
|
17
|
+
" class in the sources is a public token (exit 1 when something is off)",
|
|
18
18
|
" align One-time reorganization of a Vite + React frontend into the EVA conventions (FRONTEND_CONVENTIONS.md):",
|
|
19
19
|
" write .eds/align/PLAN.md, the steps an AI agent follows, plus templates; source files are not changed",
|
|
20
20
|
"",
|
|
@@ -25,9 +25,9 @@ const usage = [
|
|
|
25
25
|
" --no-allow-scripts init: do not write allowScripts to package.json on npm 12+",
|
|
26
26
|
" --print-ci github|gitlab init: print a CI job that runs eds doctor with this repository's package manager",
|
|
27
27
|
" --warn doctor: report findings but exit 0 (same as EDS_DOCTOR=warn)",
|
|
28
|
-
" --scan doctor: also list
|
|
29
|
-
" --check align: check
|
|
30
|
-
" the plan's base commit (exit 1
|
|
28
|
+
" --scan doctor: with a Tailwind CSS v4 root, also list palette and arbitrary color classes that bypass EDS tokens",
|
|
29
|
+
" --check align: check conventions and protected, preserved and out-of-package files",
|
|
30
|
+
" since the plan's base commit; repository root lockfiles are excluded (exit 1 on error)",
|
|
31
31
|
" --frontend <dir> align: the frontend package when the current directory is not it",
|
|
32
32
|
" --help Show this message",
|
|
33
33
|
"",
|
|
@@ -109,7 +109,7 @@ Layout은 prop으로 지정하지 않고 슬롯 조합에서 추론합니다.
|
|
|
109
109
|
| `aria-label` | 선택적인 `string`이며, 지정하면 비어 있지 않아야 합니다. icon-only에서는 항상 지정합니다. |
|
|
110
110
|
| `disabled` | `boolean`입니다. native button은 `disabled`, link는 href 제거·`aria-disabled="true"`·`tabIndex={-1}`를 적용합니다. |
|
|
111
111
|
| `loading` | `boolean`입니다. label·아이콘 공간을 유지한 progress circle을 표시하고 상호작용을 차단하며 `aria-busy="true"`를 적용합니다. |
|
|
112
|
-
| `className` | `string`입니다. 허용 범위는 `QUICKSTART.md`
|
|
112
|
+
| `className` | `string`입니다. 허용 범위는 `QUICKSTART.md`의 `className` 규칙을 따릅니다. |
|
|
113
113
|
| `style` | 지원하지 않습니다(`never`). 스타일 override는 공개 API가 아닙니다. |
|
|
114
114
|
| `aria-*` / `data-*` | 각 branch의 native HTML 속성으로 전달할 수 있습니다. |
|
|
115
115
|
| `ref` | branch에 따라 `HTMLButtonElement` 또는 `HTMLAnchorElement`를 전달합니다. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"specVersion": 1,
|
|
3
|
-
"packageVersion": "0.
|
|
3
|
+
"packageVersion": "0.3.1",
|
|
4
4
|
"name": "Button",
|
|
5
5
|
"purpose": "사용자가 즉시 실행할 수 있는 행동과 탐색을 표현하는 인터랙티브 요소입니다.",
|
|
6
6
|
"usageContexts": [
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
},
|
|
259
259
|
"accessibility": {
|
|
260
260
|
"iconOnlyName": "icon-only의 아이콘은 aria-hidden이므로 항상 비어 있지 않은 aria-label 또는 aria-labelledby로 이름을 지정합니다. 타입이 이를 요구하지 않아 빠뜨려도 typecheck가 통과하며, 빈 aria-label은 render 오류입니다.",
|
|
261
|
-
"loading": "loading 중에도 label·아이콘 공간과 accessible name을 유지합니다. native button은 disabled가 되어 포커스를 잃을 수 있으므로, 끝나면 포커스를 원래 Button이나 결과 요소로 옮기고 결과는 Button 밖의 status·alert 영역으로 알립니다."
|
|
261
|
+
"loading": "loading 중에도 label·아이콘 공간과 accessible name을 유지합니다. native button은 disabled가 되어 포커스를 잃을 수 있으므로, 끝나면 포커스를 원래 Button이나 결과 요소로 옮기고 결과는 Button 밖의 status·alert 영역으로 알립니다. prefers-reduced-motion: reduce에서는 progress 회전 애니메이션을 끕니다."
|
|
262
262
|
},
|
|
263
263
|
"unsupportedProps": [
|
|
264
264
|
{
|
package/dist/components.css
CHANGED
|
@@ -106,17 +106,17 @@
|
|
|
106
106
|
--eds-button-style-neutral-link-loading-progressCircle-trackColor: #6B7280;
|
|
107
107
|
--eds-button-style-neutral-link-loading-root-backgroundColor: var(--eds-color-bg-transparent-hover);
|
|
108
108
|
--eds-button-style-neutral-outline-disabled-label-color: var(--eds-color-fg-disabled);
|
|
109
|
-
--eds-button-style-neutral-outline-disabled-root-backgroundColor: var(--eds-color-bg-
|
|
110
|
-
--eds-button-style-neutral-outline-disabled-root-borderColor: var(--eds-color-stroke-neutral-
|
|
109
|
+
--eds-button-style-neutral-outline-disabled-root-backgroundColor: var(--eds-color-bg-neutral-primary);
|
|
110
|
+
--eds-button-style-neutral-outline-disabled-root-borderColor: var(--eds-color-stroke-neutral-tertiary);
|
|
111
111
|
--eds-button-style-neutral-outline-disabled-root-borderWidth: 1px;
|
|
112
112
|
--eds-button-style-neutral-outline-enabled-label-color: var(--eds-color-fg-neutral);
|
|
113
|
-
--eds-button-style-neutral-outline-enabled-root-backgroundColor: var(--eds-color-bg-
|
|
114
|
-
--eds-button-style-neutral-outline-enabled-root-borderColor: var(--eds-color-stroke-neutral-
|
|
113
|
+
--eds-button-style-neutral-outline-enabled-root-backgroundColor: var(--eds-color-bg-neutral-primary);
|
|
114
|
+
--eds-button-style-neutral-outline-enabled-root-borderColor: var(--eds-color-stroke-neutral-tertiary);
|
|
115
115
|
--eds-button-style-neutral-outline-enabled-root-borderWidth: 1px;
|
|
116
|
-
--eds-button-style-neutral-outline-hover-root-backgroundColor: var(--eds-color-bg-
|
|
116
|
+
--eds-button-style-neutral-outline-hover-root-backgroundColor: var(--eds-color-bg-neutral-primary-hover);
|
|
117
117
|
--eds-button-style-neutral-outline-loading-progressCircle-rangeColor: var(--eds-color-fg-neutral);
|
|
118
118
|
--eds-button-style-neutral-outline-loading-progressCircle-trackColor: #D1D5DB;
|
|
119
|
-
--eds-button-style-neutral-outline-loading-root-backgroundColor: var(--eds-color-bg-
|
|
119
|
+
--eds-button-style-neutral-outline-loading-root-backgroundColor: var(--eds-color-bg-neutral-primary-hover);
|
|
120
120
|
--eds-button-style-neutral-solid-disabled-label-color: var(--eds-color-fg-disabled);
|
|
121
121
|
--eds-button-style-neutral-solid-disabled-root-backgroundColor: var(--eds-color-bg-disabled);
|
|
122
122
|
--eds-button-style-neutral-solid-enabled-label-color: var(--eds-color-fg-neutral-inverted);
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
@media (prefers-reduced-motion: reduce) {
|
|
270
|
-
.eds-button__progressCircle > svg {
|
|
270
|
+
.eds-button__button[data-loading="true"] .eds-button__progressCircle > svg {
|
|
271
271
|
animation: none;
|
|
272
272
|
will-change: auto;
|
|
273
273
|
}
|
package/llms.txt
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
# EVA Design System (@spectrabrain/eds)
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
EDS 내부 소스로 동작을 추론하지 않고 공개 문서와 TypeScript contract를 기준으로 합니다. 링크는 모두 package root 기준 경로입니다.
|
|
3
|
+
> 소비처 AI는 package root의 `QUICKSTART.md`를 먼저 읽고, 나머지는 아래 조건에 해당할 때만 읽습니다. 기계용 경로와 조건은 `AI_CONTEXT.json`의 `readOrder`에 있습니다.
|
|
6
4
|
|
|
7
5
|
## 필수
|
|
8
6
|
|
|
9
|
-
- [QUICKSTART.md](./QUICKSTART.md): UI 작업 규칙, 완료
|
|
7
|
+
- [QUICKSTART.md](./QUICKSTART.md): UI 작업 규칙, 완료 기준, doctor 복구 순서와 조건별 문서 안내입니다.
|
|
10
8
|
|
|
11
9
|
## 조건부
|
|
12
10
|
|
|
13
|
-
- [CONSUMER_AGENT.md](./CONSUMER_AGENT.md): 소비처 `AGENTS.md`에 `<!-- EDS:BEGIN -->` block이 없거나,
|
|
11
|
+
- [CONSUMER_AGENT.md](./CONSUMER_AGENT.md): 소비처 `AGENTS.md`에 `<!-- EDS:BEGIN -->` block이 없거나, `eds doctor`가 exit 1·2 또는 `eds sync`가 exit 2로 끝나거나, sync 복구가 불분명하거나, EDS 버전을 올렸거나, 사용자가 프로토타입을 EVA 구조로 정리하라고 요청했을 때(`eds align`) 읽습니다.
|
|
14
12
|
- [TOKEN_CONTEXT.md](./TOKEN_CONTEXT.md): EDS 컴포넌트 prop 밖에서 color·typography·spacing·radius token을 지정하거나 바꿀 때 읽습니다. Tailwind 없이 CSS variable이나 `cssVar()`로 쓰는 경우도 포함합니다.
|
|
15
13
|
- [TAILWIND_V4.md](./TAILWIND_V4.md): Tailwind CSS v4 adapter나 root CSS 배선을 설정하거나 고칠 때 읽습니다.
|
|
16
|
-
- [AI.md](./AI.md): 요청이 dark theme,
|
|
14
|
+
- [AI.md](./AI.md): 요청이 dark theme, EDS Tailwind plugin, 생성 CSS에 없는 EDS token utility alias, `AI_CONTEXT.json` `components`에 없는 컴포넌트를 요구할 때 읽습니다.
|
|
17
15
|
- [FRONTEND_CONVENTIONS.md](./FRONTEND_CONVENTIONS.md): `.eds/align/PLAN.md`가 있거나(`eds align` 진행 중), 소비처 `AGENTS.md`가 구조·라이브러리·코드 패턴 변경에 이 문서를 가리킬 때 읽습니다.
|
|
18
|
-
- [dist/components/Button/README.md](./dist/components/Button/README.md): Button
|
|
16
|
+
- [dist/components/Button/README.md](./dist/components/Button/README.md): 요청이 Button으로 해결될 수 있는지 판단할 때 사용 맥락과 role·variant 선택 기준을 읽고, 선택하면 prop·접근성 계약을 따릅니다.
|
|
19
17
|
- [dist/components/Button/spec.json](./dist/components/Button/spec.json): `api.iconNames`의 아이콘 이름을 확인하거나 도구가 기계용 계약을 읽을 때 씁니다.
|
|
20
|
-
- [dist/tokens.json](./dist/tokens.json): 도구·스크립트가 기계용 token manifest와 public 이름→CSS variable mapping을 읽거나, Tailwind 없이 쓸 `var(--eds-*)` 이름을 확인할 때 씁니다. class
|
|
18
|
+
- [dist/tokens.json](./dist/tokens.json): 도구·스크립트가 기계용 token manifest와 public 이름→CSS variable mapping을 읽거나, Tailwind 없이 쓸 `var(--eds-*)` 이름을 확인할 때 씁니다. Tailwind CSS v4 root를 sync한 소비처에서는 생성 class 이름을 `src/styles/eds-tokens.css`에서 확인합니다.
|
|
21
19
|
- [CHANGELOG.md](./CHANGELOG.md): EDS 버전을 올렸을 때(설치된 버전이 `AGENTS.md`의 `EDS:VERSION` 줄보다 높을 때) 읽습니다.
|
|
22
20
|
|
|
23
21
|
## Optional
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrabrain/eds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "EVA services' shared React design system",
|
|
5
5
|
"author": "SpectraBrain",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@vitest/browser-playwright": "4.1.6",
|
|
88
88
|
"axe-core": "^4.11.0",
|
|
89
89
|
"jsdom": "^26.1.0",
|
|
90
|
-
"playwright": "1.
|
|
90
|
+
"playwright": "1.61.1",
|
|
91
91
|
"postcss": "^8.5.6",
|
|
92
92
|
"postcss-modules": "^6.0.1",
|
|
93
93
|
"react": "^19.2.8",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VITE_API_MOCKING=true
|