@conscience-technology/ovenn 0.7.5 → 0.7.6
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/README.md +43 -4
- package/assets/components/AttachmentThumb/AttachmentThumb.tsx +1 -0
- package/assets/components/ChatComposer/ChatComposer.tsx +1 -1
- package/assets/components/FileIcon/FileIcon.tsx +1 -0
- package/assets/components/FileIcon/fileExtMap.ts +1 -0
- package/assets/components/Onboarding/OnboardingAxisPanel.tsx +1 -1
- package/assets/components/Onboarding/OnboardingPage.tsx +13 -11
- package/assets/components/Onboarding/actions.ts +9 -9
- package/assets/components/TableRowEdit/TableRowEdit.tsx +2 -2
- package/assets/components/ThemeController.tsx +2 -2
- package/assets/components/TimelineView/TimelineView.tsx +4 -2
- package/assets/components/Tooltip/Tooltip.module.css +1 -0
- package/assets/components/_utils.css +1 -0
- package/assets/components/side-effect-css.d.ts +5 -0
- package/assets/components/themeBootScript.ts +7 -1
- package/assets/components/tokens.css +1 -0
- package/assets/prompts/ASSEMBLY.md +2 -0
- package/assets/prompts/CASCADE.md +2 -2
- package/assets/prompts/CATALOG.md +1 -1
- package/assets/prompts/PRINCIPLES.md +4 -8
- package/assets/prompts/RULES.md +19 -1
- package/assets/prompts/SLOTS.md +2 -4
- package/assets/prompts/WORKFLOW_DESIGN.md +0 -4
- package/assets/prompts/axes/icon.md +1 -1
- package/assets/prompts/axes/motion.md +1 -1
- package/assets/prompts/axes/voice.md +1 -1
- package/assets/prompts/components/_variants.md +3 -3
- package/assets/prompts/components/accordion.md +4 -4
- package/assets/prompts/components/attachment-item.md +2 -2
- package/assets/prompts/components/button.md +2 -2
- package/assets/prompts/components/card.md +1 -2
- package/assets/prompts/components/chart-bar.md +1 -1
- package/assets/prompts/components/chat-input.md +1 -1
- package/assets/prompts/components/checkbox.md +5 -5
- package/assets/prompts/components/color-field.md +2 -2
- package/assets/prompts/components/command-palette.md +3 -3
- package/assets/prompts/components/context-menu.md +5 -5
- package/assets/prompts/components/date-picker.md +2 -2
- package/assets/prompts/components/drawer.md +2 -2
- package/assets/prompts/components/dropdown-menu.md +3 -3
- package/assets/prompts/components/event-list-item.md +4 -4
- package/assets/prompts/components/file-icon.md +2 -2
- package/assets/prompts/components/gallery-item.md +1 -1
- package/assets/prompts/components/hint.md +3 -3
- package/assets/prompts/components/kanban.md +2 -3
- package/assets/prompts/components/list-item.md +11 -11
- package/assets/prompts/components/menu-item.md +2 -2
- package/assets/prompts/components/message-table.md +4 -4
- package/assets/prompts/components/onboarding.md +3 -3
- package/assets/prompts/components/page-header.md +6 -7
- package/assets/prompts/components/quotation-bar.md +1 -1
- package/assets/prompts/components/select.md +1 -1
- package/assets/prompts/components/shortcut.md +3 -3
- package/assets/prompts/components/sidebar.md +5 -4
- package/assets/prompts/components/stepper.md +1 -1
- package/assets/prompts/components/tab-strip.md +2 -2
- package/assets/prompts/components/table-row-edit.md +6 -6
- package/assets/prompts/components/table-row-select.md +1 -1
- package/assets/prompts/components/tabs.md +5 -2
- package/assets/prompts/components/textarea.md +1 -1
- package/assets/prompts/components/toast.md +3 -3
- package/assets/prompts/components/tooltip.md +3 -3
- package/assets/prompts/components/topbar.md +1 -1
- package/assets/prompts/primitives/scroll.md +1 -1
- package/assets/prompts/recipes/README.md +5 -6
- package/assets/prompts/recipes/meta-line.md +2 -2
- package/assets/prompts/recipes/page-header.md +2 -2
- package/assets/prompts/recipes/section-header.md +1 -1
- package/assets/prompts/themes/_SCHEMA.md +2 -2
- package/assets/skills/ovenn-validate/SKILL.md +1 -1
- package/assets/skills/ovenn-validate/scripts/lib/component-usage.js +7 -1
- package/assets/skills/ovenn-validate/scripts/lib/engine.mjs +105 -0
- package/assets/skills/ovenn-validate/scripts/lib/engine.test.mjs +46 -0
- package/assets/skills/ovenn-validate/scripts/lib/source-utils.mjs +5 -3
- package/assets/skills/ovenn-validate/scripts/rules/doc-sync.mjs +28 -5
- package/assets/skills/ovenn-validate/scripts/rules/doc-sync.test.mjs +15 -0
- package/assets/skills/ovenn-validate/scripts/rules/ghost-tokens.mjs +7 -0
- package/assets/skills/ovenn-validate/scripts/rules/hardcoded.mjs +61 -30
- package/assets/skills/ovenn-validate/scripts/rules/memory-rules.mjs +7 -4
- package/assets/skills/ovenn-validate/scripts/rules/memory-rules.test.mjs +3 -0
- package/assets/skills/ovenn-validate/scripts/validate.mjs +8 -136
- package/assets/skills/ovenn-wireframe/SKILL.md +1 -1
- package/bin/ovenn.js +8 -0
- package/package.json +2 -2
- package/src/commands/check.js +70 -0
- package/src/commands/info.js +32 -7
- package/src/commands/init.js +26 -30
- package/src/commands/setup-checks.js +80 -0
- package/src/commands/update.js +90 -18
- package/src/data/ctds-releases.json +1 -0
- package/src/utils/assets.js +5 -0
- package/src/utils/component-usage.js +7 -1
- package/src/utils/design-workflow.js +6 -2
- package/src/utils/doctor.js +7 -1
- package/src/utils/legacy-ctds.js +169 -0
- package/src/utils/managed-assets.js +16 -3
- package/src/utils/route.js +17 -0
- package/src/utils/rules-context.js +91 -0
- package/src/utils/update-transaction.js +16 -3
- package/assets/prompts/FEEDBACK_PROCESS.md +0 -19
- package/assets/prompts/GUIDE.md +0 -307
- package/assets/prompts/MEMORY.md +0 -202
- package/assets/prompts/TEMPLATE_PREVIEWS.md +0 -21
- package/assets/prompts/components/README.md +0 -84
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ Clicking "Apply" writes two files to the project root:
|
|
|
66
66
|
```bash
|
|
67
67
|
npx @conscience-technology/ovenn init # default
|
|
68
68
|
npx @conscience-technology/ovenn init --dry # print planned writes without touching disk
|
|
69
|
-
npx @conscience-technology/ovenn init --force #
|
|
69
|
+
npx @conscience-technology/ovenn init --force # on an existing install: same as `ovenn update --force` (backup + rollback)
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
Debug:
|
|
@@ -76,6 +76,15 @@ OVENN_DEBUG=1 npx @conscience-technology/ovenn init
|
|
|
76
76
|
|
|
77
77
|
## Diagnose and update safely
|
|
78
78
|
|
|
79
|
+
Run the latest CLI explicitly. A bare `ovenn` resolves to whatever version the project or npx cache already holds, which may be the release you are trying to leave.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx @conscience-technology/ovenn@latest update --dry # preview
|
|
83
|
+
npx @conscience-technology/ovenn@latest update
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Running `init` on an existing install runs `update`; with `--force` it runs `update --force`, so local edits are never replaced without a backup. Projects installed by the legacy `@conscience-technology/ctds` CLI (0.1.0–0.6.3) are migrated by the same command: untouched CTDS files are replaced or removed, `components/ctds` imports in project code and `globals.css`/`layout.tsx` move to `components/ovenn`, `ctds.config.json` becomes `ovenn.config.json`, the CTDS block leaves `AGENTS.md`, and saved `ctds-*` theme choices carry over in the browser. Files are recognised as untouched by comparing them with every published CTDS release.
|
|
87
|
+
|
|
79
88
|
```bash
|
|
80
89
|
ovenn info doctor --json
|
|
81
90
|
ovenn update --dry --json
|
|
@@ -86,12 +95,42 @@ ovenn update --rollback=UPDATE_ID
|
|
|
86
95
|
ovenn update --recover=UPDATE_ID
|
|
87
96
|
```
|
|
88
97
|
|
|
89
|
-
All bundled components, prompts, skills and onboarding assets use file-level hash comparison.
|
|
98
|
+
All bundled components, prompts, skills and onboarding assets use file-level hash comparison. Files a release no longer ships are removed when untouched; edited ones, and edited CTDS files, are moved to `.ovenn/kept/<path>` so they neither compile against removed siblings nor reach agents, and the update lists them by name. Your own extra files, config and local renderers remain in place. `AGENTS.md`, `CLAUDE.md` and the Cursor rule only replace their Ovenn marker block, so notes outside it never block an update. Files kept because of local edits are listed by name; they stay at the old version until you take the new one. Keeping a local edit retains its old upstream baseline, so a later update still reports the conflict. Re-running init without force does not adopt skipped local files as a new baseline. Legacy metadata without auxiliary hashes treats differing existing auxiliary files as conflicts.
|
|
90
99
|
|
|
91
|
-
Interactive choices are collected before writes. In a noninteractive shell, conflicts are kept unless --force is explicitly supplied. Each applied update has backups and a journal in `.ovenn/updates/ID`. A later user edit blocks rollback before any restoration. A process interrupted while applying requires --recover; do not remove its backup directory first. Backups may contain project code; retain them according to your project policy.
|
|
100
|
+
Interactive choices are collected before writes. In a noninteractive shell, conflicts are kept unless --force is explicitly supplied. Edited files that --force (or an interactive yes) replaces are listed by name, and the backup restores them. Each applied update has backups and a journal in `.ovenn/updates/ID`. A later user edit blocks rollback before any restoration. A process interrupted while applying requires --recover; do not remove its backup directory first. Backups may contain project code; retain them according to your project policy.
|
|
92
101
|
|
|
93
102
|
Doctor checks declared and resolvable dependencies, metadata/missing assets/local edits, token import, visible ThemeController integration, config JSON, installed/CLI version and unfinished update journals. External wrappers and peer range compatibility need additional verification. Root `app/` and `src/app/` fixtures use the repository's pinned Next/React runtime in release checks; this is not a compatibility claim for every peer version or Vite.
|
|
94
103
|
|
|
104
|
+
## Run the check automatically (opt-in)
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npx @conscience-technology/ovenn setup-checks --hook --prebuild --ci # or --all; --dry previews
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`--hook` adds a Claude Code PostToolUse hook to `.claude/settings.json`: after each Edit/Write it checks only that file and, on a violation, exits 2 so Claude Code shows the file, line and fix to the agent. `--prebuild` makes `npm run build` run the check first (an existing `prebuild` is kept and the check appended). `--ci` adds `.github/workflows/ovenn-check.yml`. Existing settings are merged; running it again changes nothing. `ovenn init` only mentions this; it installs none of it.
|
|
111
|
+
|
|
112
|
+
## Rules for the task at hand
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
ovenn info get-rules --local --components=Input,Canvas # RULES + those components' principle/behaviour/Don't/[HARD]
|
|
116
|
+
ovenn info get-design-workflow --local --phase=build # only the build sections of ASSEMBLY/WORKFLOW_DESIGN
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
MCP `get_rules(components, principles)` and `get_design_workflow(phase)` return the same text. Without arguments both return the full documents as before.
|
|
120
|
+
|
|
121
|
+
## TypeScript 7
|
|
122
|
+
|
|
123
|
+
Installed components type-check with TypeScript 5, 6 and 7. `ovenn info check-component-usage --local` parses with TypeScript's JS compiler API, which the TypeScript 7 `typescript` package no longer ships; in a TypeScript 7 project install Microsoft's compatibility package next to it (`npm install -D @typescript/typescript6`) and the check uses it. `ovenn info doctor` warns when it is missing. A project's own `import "./globals.css"` in `app/layout.tsx` needs its own declaration under TypeScript 7; that file is not part of Ovenn.
|
|
124
|
+
|
|
125
|
+
## Check your code offline
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
npx @conscience-technology/ovenn check # app/, src/, components/ … (skips components/ovenn)
|
|
129
|
+
npx @conscience-technology/ovenn check app/dashboard --json
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Hardcoded colours, sizes and times, undeclared tokens and the machine-checkable `prompts/RULES.md` rules, reported as `file:line — rule — message` with a suggested fix. Exit code 1 on any error, so it fits a prebuild script, a commit hook or CI. No server is needed and it runs the copy bundled with the CLI, so a git-ignored `.claude/` does not matter. Mark a justified case with `/* ovenn-validate-disable-next-line <rule> */`, or a whole file with `/* ovenn-validate-disable-file <rule> -- <reason> */` (the reason is required). `ovenn info check-hardcoding --file=…` runs the same check; MCP `check_hardcoding` uses the same engine.
|
|
133
|
+
|
|
95
134
|
## MCP queries
|
|
96
135
|
|
|
97
136
|
`ovenn info` initializes Streamable HTTP, accepts JSON or SSE responses, preserves session headers and bounds requests with `--timeout=15000`. An unavailable endpoint produces an error; it does not modify the project. No authentication provider is added by the CLI.
|
|
@@ -105,7 +144,7 @@ ovenn info check-brand --project=brand-check.json --json
|
|
|
105
144
|
|
|
106
145
|
A project check JSON contains `{files: {"App.tsx": "source code", "frame.tsx": "source code"}, entryFiles: ["App.tsx"], brandSetId: "core"}`. Diagnostics include file/line/column, severity, rule source and a suggested next step. Supply the root entry and its wrappers/re-exports. Unknown external components and runtime spreads produce explicit limitations; valid does not mean complete. This is a structure check, not visual brand certification. Existing Ovenn validators remain responsible for token/hardcoding rules.
|
|
107
146
|
|
|
108
|
-
설치 진단은 `ovenn info doctor --json`, 변경 미리보기는 `ovenn update --dry --json`, 로컬 수정 보존은 `--keep-local`을 사용합니다. 백업 ID로 `--rollback=ID`, 중간 종료는 `--recover=ID`를 실행합니다. 실제 모델 성능 평가는 저장소 `evals/p4/README.md`에서 별도로 추적합니다.
|
|
147
|
+
업데이트는 `npx @conscience-technology/ovenn@latest update`로 최신 CLI를 지정해 실행합니다. 기존 설치에서 `init`을 다시 실행해도 update로 처리되며, 구 `@conscience-technology/ctds` 설치도 같은 명령으로 Ovenn에 이전됩니다. 설치 진단은 `ovenn info doctor --json`, 변경 미리보기는 `ovenn update --dry --json`, 로컬 수정 보존은 `--keep-local`을 사용합니다. 백업 ID로 `--rollback=ID`, 중간 종료는 `--recover=ID`를 실행합니다. 실제 모델 성능 평가는 저장소 `evals/p4/README.md`에서 별도로 추적합니다.
|
|
109
148
|
|
|
110
149
|
## Local development (contributors)
|
|
111
150
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
// ovenn-validate-disable-file hardcoded/hex-color -- image placeholder light/dark colour pair, the same asset-colour pattern as the FileIcon generic group
|
|
2
3
|
|
|
3
4
|
import type { CSSProperties, HTMLAttributes, MouseEvent } from "react";
|
|
4
5
|
import { ImageSquare as PhImageSquare, X as PhX } from "@phosphor-icons/react";
|
|
@@ -43,7 +43,7 @@ export function ChatMessageText({ value, mentions = [] }: { value: string; menti
|
|
|
43
43
|
|
|
44
44
|
const labels = {
|
|
45
45
|
ko: { input: "메시지 작성", placeholder: "메시지 입력", send: "메시지 보내기", sending: "전송 중", people: "사용자 멘션", commands: "명령", empty: "일치하는 항목이 없습니다" },
|
|
46
|
-
en: { input: "Write a message", placeholder: "Write a message
|
|
46
|
+
en: { input: "Write a message", placeholder: "Write a message", send: "Send message", sending: "Sending", people: "Mention people", commands: "Commands", empty: "No matches" },
|
|
47
47
|
};
|
|
48
48
|
type Query = { kind: "@" | "/"; start: number; end: number; text: string };
|
|
49
49
|
|
|
@@ -286,7 +286,7 @@ export function OnboardingAxisPanel({
|
|
|
286
286
|
<div className={styles.voiceGroup} role="radiogroup" aria-label={L.rowVoice}>
|
|
287
287
|
{VOICES.map((v) => (
|
|
288
288
|
<RadioCard key={v} name="onb-axis-voice" value={v} checked={voice === v} onChange={() => setVoice(v)}
|
|
289
|
-
title={
|
|
289
|
+
title={voiceSample[v]} description={v} />
|
|
290
290
|
))}
|
|
291
291
|
</div>
|
|
292
292
|
) : (
|
|
@@ -40,10 +40,10 @@ const LABELS = {
|
|
|
40
40
|
ko: {
|
|
41
41
|
steps: {
|
|
42
42
|
material: { title: "표면 재질", hint: "솔리드 또는 글래스" },
|
|
43
|
-
vibe: { title: "프로덕트 분위기", hint: "
|
|
43
|
+
vibe: { title: "프로덕트 분위기", hint: "모서리와 모션의 기본 조합" },
|
|
44
44
|
density: { title: "정보 밀도", hint: "한 화면에 얼마나 빽빽하게 담을지." },
|
|
45
45
|
color: { title: "컬러 & 톤", hint: "팔레트 선택 + 브랜드 색." },
|
|
46
|
-
layout: { title: "레이아웃", hint: "
|
|
46
|
+
layout: { title: "레이아웃", hint: "사이드바와 탑바 조합." },
|
|
47
47
|
summary: { title: "요약 & 적용", hint: "선택을 확인하고 프로젝트에 반영." },
|
|
48
48
|
},
|
|
49
49
|
stepTitle: {
|
|
@@ -82,9 +82,9 @@ const LABELS = {
|
|
|
82
82
|
),
|
|
83
83
|
applyLead:
|
|
84
84
|
"프로젝트 루트에 다음 두 파일이 생성됩니다. 모두 로컬 파일 작업이고 되돌릴 수 있어요.",
|
|
85
|
-
configOverwrite: "기존 파일
|
|
85
|
+
configOverwrite: "기존 파일 덮어씀, 축 값 JSON",
|
|
86
86
|
configNew: "축 값 JSON (AI 에이전트·ThemeController가 참조)",
|
|
87
|
-
designOverwrite: "기존 파일
|
|
87
|
+
designOverwrite: "기존 파일 덮어씀, 테마·축 산문 요약",
|
|
88
88
|
designNew: "테마·축 산문 요약",
|
|
89
89
|
cancel: "취소",
|
|
90
90
|
overwriteApply: "덮어쓰고 적용",
|
|
@@ -95,7 +95,7 @@ const LABELS = {
|
|
|
95
95
|
doneLead: "다음 파일이 생성/수정됐어요.",
|
|
96
96
|
doneTail: (
|
|
97
97
|
<>
|
|
98
|
-
이제 Claude Code 등 AI 에이전트가 <code>ovenn.config.json</code
|
|
98
|
+
이제 Claude Code 등 AI 에이전트가 <code>ovenn.config.json</code>과{" "}
|
|
99
99
|
<code>DESIGN.md</code>를 참조해 이 프로젝트의 축 값에 맞춰 코드를 생성할 수 있습니다.
|
|
100
100
|
</>
|
|
101
101
|
),
|
|
@@ -118,8 +118,9 @@ const LABELS = {
|
|
|
118
118
|
paletteAria: "조화 세트",
|
|
119
119
|
brandHeading: "브랜드 색",
|
|
120
120
|
monoHeading: "무채색",
|
|
121
|
-
monoOn: "ON
|
|
122
|
-
monoOff: "OFF
|
|
121
|
+
monoOn: "ON: primary와 chart는 모드 기반 명도 단계 흑백",
|
|
122
|
+
monoOff: "OFF: 아이콘·secondary 전부 brand 톤",
|
|
123
|
+
// ovenn-validate-disable-next-line hardcoded/hex-color
|
|
123
124
|
hexPlaceholder: "#3B5BDB",
|
|
124
125
|
hexInvalid: "hex 형식이 올바르지 않아요",
|
|
125
126
|
hexHint: "입력한 색을 primary로 그대로 사용해요",
|
|
@@ -225,8 +226,9 @@ const LABELS = {
|
|
|
225
226
|
paletteAria: "Harmony set",
|
|
226
227
|
brandHeading: "Brand color",
|
|
227
228
|
monoHeading: "Grayscale",
|
|
228
|
-
monoOn: "ON
|
|
229
|
-
monoOff: "OFF
|
|
229
|
+
monoOn: "ON: primary and charts use mode-aware grayscale steps",
|
|
230
|
+
monoOff: "OFF: icon and secondary follow brand",
|
|
231
|
+
// ovenn-validate-disable-next-line hardcoded/hex-color
|
|
230
232
|
hexPlaceholder: "#3B5BDB",
|
|
231
233
|
hexInvalid: "The hex format is not valid.",
|
|
232
234
|
hexHint: "Your color is used as the primary as-is.",
|
|
@@ -1072,7 +1074,7 @@ function SummaryStep({ answers }: { answers: Answers }) {
|
|
|
1072
1074
|
preview={<MaterialPreview material={answers.material} compact />} />
|
|
1073
1075
|
<SummaryCard
|
|
1074
1076
|
label={S.vibeLabel}
|
|
1075
|
-
value={lang === "ko" ? `모서리 ${{soft:"둥글게",standard:"기본",crisp:"각지게",pill:"캡슐형"}[shape]}
|
|
1077
|
+
value={lang === "ko" ? `모서리 ${{soft:"둥글게",standard:"기본",crisp:"각지게",pill:"캡슐형"}[shape]}, 모션 ${{bouncy:"경쾌하게",standard:"기본",calm:"차분하게",none:"없음"}[motionMode]}` : `Corners: ${shape}, Motion: ${motionMode}`}
|
|
1076
1078
|
preview={
|
|
1077
1079
|
vibe && (
|
|
1078
1080
|
<div className={styles.vibePreview} data-summary>
|
|
@@ -1100,7 +1102,7 @@ function SummaryStep({ answers }: { answers: Answers }) {
|
|
|
1100
1102
|
/>
|
|
1101
1103
|
<SummaryCard
|
|
1102
1104
|
label={S.colorLabel}
|
|
1103
|
-
value={`${answers.mode === "light" ? LABELS[lang].color.light : LABELS[lang].color.dark}
|
|
1105
|
+
value={`${answers.mode === "light" ? LABELS[lang].color.light : LABELS[lang].color.dark}, ${answers.brand}, ${paletteChoice?.title ?? S.none}${answers.mono ? (lang === "ko" ? ", 무채색" : ", Grayscale") : ""}`}
|
|
1104
1106
|
preview={
|
|
1105
1107
|
<div className={styles.summaryPalette} data-palette-set={answers.paletteSet} data-mono={String(answers.mono)} data-mode={answers.mode} aria-hidden>
|
|
1106
1108
|
{PALETTE_SET_ANGLES[answers.paletteSet].map((angle, index) => <span key={angle} style={{ background: `var(--chart-${index + 1})` }} />)}
|
|
@@ -294,7 +294,7 @@ const DESIGN_MD_STRINGS: Record<Lang, DesignMdStrings> = {
|
|
|
294
294
|
machineReadable:
|
|
295
295
|
"머신 리더블 소스는 [ovenn.config.json](ovenn.config.json)에.",
|
|
296
296
|
themeLineNone:
|
|
297
|
-
"**직접
|
|
297
|
+
"**직접 조합**: 테마 preset 없이 사용자가 각 축을 직접 선택했습니다.",
|
|
298
298
|
themeLineNamed: (theme) =>
|
|
299
299
|
`**${theme}** 테마 기반. 자세한 원칙·Do/Don't는 [prompts/themes/${theme}.md](prompts/themes/${theme}.md) 참조.`,
|
|
300
300
|
axisHeading: "축 값",
|
|
@@ -302,8 +302,8 @@ const DESIGN_MD_STRINGS: Record<Lang, DesignMdStrings> = {
|
|
|
302
302
|
modeLight: "밝은 배경",
|
|
303
303
|
modeDark: "어두운 배경",
|
|
304
304
|
brandDesc: "primary brand hex (유저 입력)",
|
|
305
|
-
monoOn: "ON
|
|
306
|
-
monoOff: "OFF
|
|
305
|
+
monoOn: "ON: primary와 chart는 명도 단계 흑백, 상태색만 유색 유지",
|
|
306
|
+
monoOff: "OFF: 아이콘·secondary·selected-fg 전부 brand 톤",
|
|
307
307
|
iconFamilyDesc: "아이콘 세트",
|
|
308
308
|
langDesc: "UI 언어",
|
|
309
309
|
layoutHeading: "레이아웃",
|
|
@@ -312,7 +312,7 @@ const DESIGN_MD_STRINGS: Record<Lang, DesignMdStrings> = {
|
|
|
312
312
|
"이 프로젝트는 위 축 값으로 고정됐습니다. 컴포넌트·페이지를 생성할 때:",
|
|
313
313
|
aiBullets: {
|
|
314
314
|
noHardcode:
|
|
315
|
-
"**하드코딩
|
|
315
|
+
"**하드코딩 금지**: 색/간격/radius/shadow/motion은 전부 Ovenn 토큰 경유.",
|
|
316
316
|
sourceOfTruth: `축 값은 [ovenn.config.json](ovenn.config.json)이 소스 오브 트루스.
|
|
317
317
|
런타임엔 \`ThemeController\`가 관리하며, 사용자가 축을 바꿀 때마다 \`<html data-*>\` 속성이 갱신됩니다.`,
|
|
318
318
|
tokenRules:
|
|
@@ -340,8 +340,8 @@ const DESIGN_MD_STRINGS: Record<Lang, DesignMdStrings> = {
|
|
|
340
340
|
modeLight: "Light background",
|
|
341
341
|
modeDark: "Dark background",
|
|
342
342
|
brandDesc: "primary brand hex (user input)",
|
|
343
|
-
monoOn: "ON
|
|
344
|
-
monoOff: "OFF
|
|
343
|
+
monoOn: "ON: primary and charts use grayscale steps; only status colors remain chromatic",
|
|
344
|
+
monoOff: "OFF: icon, secondary, selected-fg all follow brand",
|
|
345
345
|
iconFamilyDesc: "Icon set",
|
|
346
346
|
langDesc: "UI language",
|
|
347
347
|
layoutHeading: "Layout",
|
|
@@ -456,9 +456,9 @@ function paletteSetDesc(v: PaletteSet, lang: Lang = "ko"): string {
|
|
|
456
456
|
split: "primary + 보색 ±30 · 균형감",
|
|
457
457
|
},
|
|
458
458
|
en: {
|
|
459
|
-
analogous: "±30·±60 around primary
|
|
460
|
-
triadic: "primary + 120·240
|
|
461
|
-
split: "primary + split-complement ±30
|
|
459
|
+
analogous: "±30·±60 around primary, gentle harmony",
|
|
460
|
+
triadic: "primary + 120·240, strong contrast",
|
|
461
|
+
split: "primary + split-complement ±30, balanced",
|
|
462
462
|
},
|
|
463
463
|
};
|
|
464
464
|
return map[lang][v];
|
|
@@ -31,8 +31,8 @@ const TABLE_ROW_EDIT_LABELS = {
|
|
|
31
31
|
세로 구분선이 강제된다. 셀 콘텐츠는 호출 측에서 columns[].render로 꽂음
|
|
32
32
|
(TableCell* 또는 Input/Select 등 편집 요소).
|
|
33
33
|
|
|
34
|
-
variant 없음(line 외곽 고정). size는 sm
|
|
35
|
-
|
|
34
|
+
variant 없음(line 외곽 고정). size는 sm/md/lg로 행 최소 높이만 바꾼다(기본 md).
|
|
35
|
+
lg는 TableRow와 API를 맞추려 받지만 스프레드시트 톤의 편집 행에는 권장하지 않음.
|
|
36
36
|
──────────────────────────────────────────────────────────── */
|
|
37
37
|
|
|
38
38
|
export type TableRowEditSize = "sm" | "md" | "lg";
|
|
@@ -14,11 +14,11 @@ import type {
|
|
|
14
14
|
} from "./_data";
|
|
15
15
|
import { hexToOklch, isValidHex, shouldUseDarkForeground } from "./_color";
|
|
16
16
|
import { IconAxisProvider } from "./Icon";
|
|
17
|
+
// Default brand when no hex is set or the hex is invalid.
|
|
18
|
+
import { DEFAULT_BRAND } from "./themeBootScript";
|
|
17
19
|
|
|
18
20
|
type ThemeMode = "light" | "dark";
|
|
19
21
|
|
|
20
|
-
/** 기본 brand = #3B5BDB (indigo). hex가 비거나 invalid면 폴백. */
|
|
21
|
-
const DEFAULT_BRAND = "#3B5BDB";
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* ovenn.config.json의 shape. `ovenn init` 후 사용자가 /ovenn 적용하면 이 모양으로 쓰임.
|
|
@@ -95,6 +95,8 @@ export const TimelineView = forwardRef<HTMLDivElement, TimelineViewProps>(functi
|
|
|
95
95
|
const fullFormatter = useMemo(() => new Intl.DateTimeFormat(lang === "ko" ? "ko-KR" : "en-GB", {
|
|
96
96
|
year: "numeric", month: "short", day: "numeric", hour: "2-digit", minute: "2-digit", hourCycle: "h23",
|
|
97
97
|
}), [lang]);
|
|
98
|
+
// Spoken range for labels and announcements; RULES keeps dashes out of generated copy.
|
|
99
|
+
const timeRange = (from: Date, to: Date) => lang === "ko" ? `${fullFormatter.format(from)}부터 ${fullFormatter.format(to)}까지` : `${fullFormatter.format(from)} to ${fullFormatter.format(to)}`;
|
|
98
100
|
const ticks = useMemo(() => timelineTicks(start, end, unit, canvasWidth), [start, end, unit, canvasWidth]);
|
|
99
101
|
const now = currentTime?.getTime();
|
|
100
102
|
const showNow = now !== undefined && now >= from && now <= end.getTime();
|
|
@@ -116,7 +118,7 @@ export const TimelineView = forwardRef<HTMLDivElement, TimelineViewProps>(functi
|
|
|
116
118
|
<span className={styles.rowMeasure} data-slot="timeline-row-measure" aria-hidden="true" />
|
|
117
119
|
<div className={styles.guides} aria-hidden="true">{ticks.map(tick => <span key={tick.time} className={styles.guide} style={{ left: `${tick.left}%` }} />)}</div>
|
|
118
120
|
{items.map(({ event, row, left, width }) => {
|
|
119
|
-
const label = `${event.title}, ${
|
|
121
|
+
const label = `${event.title}, ${timeRange(event.start, event.end)}`;
|
|
120
122
|
return <TimelineEventBar key={event.id} event={event} row={row} left={left} width={width}
|
|
121
123
|
size={size} appearance={event.appearance ?? appearance} showTime={showTime} time={formatter.format(event.start)} label={label}
|
|
122
124
|
selected={selectedEventId === undefined ? undefined : selectedEventId === event.id}
|
|
@@ -130,7 +132,7 @@ export const TimelineView = forwardRef<HTMLDivElement, TimelineViewProps>(functi
|
|
|
130
132
|
</div>
|
|
131
133
|
</div>
|
|
132
134
|
{(canDrag || canResize) && <span id={dragHelpId} className={styles.srOnly}>{editHelp}</span>}
|
|
133
|
-
<span role="status" className={styles.srOnly}>{drag.announcement && `${drag.announcement.title}, ${
|
|
135
|
+
<span role="status" className={styles.srOnly}>{drag.announcement && `${drag.announcement.title}, ${timeRange(drag.announcement.start, drag.announcement.end)}, ${lang === "ko" ? "행" : "row"} ${(drag.announcement.row ?? 0) + 1}` }</span>
|
|
134
136
|
{items.length === 0 && <div className={styles.empty}>{emptyContent ?? <EmptyState title={unit === "date" ? (lang === "ko" ? "이 기간에 일정이 없습니다" : "No events in this date range") : (lang === "ko" ? "이 시간대에 일정이 없습니다" : "No events in this time range")} />}</div>}
|
|
135
137
|
</div>
|
|
136
138
|
);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// TypeScript 7 type-checks side-effect imports (noUncheckedSideEffectImports is on by default). These global
|
|
2
|
+
// stylesheets are imported for their rules only. Listed by name so CSS Modules keep Next's typed `*.module.css`.
|
|
3
|
+
declare module "*/tokens.css";
|
|
4
|
+
declare module "*/palette.css";
|
|
5
|
+
declare module "*/provider-tokens.css";
|
|
@@ -44,6 +44,10 @@ export type InitialAxes = {
|
|
|
44
44
|
accentHue?: number | null;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
+
/** Default brand seed (indigo) when no brand is configured; ThemeController uses the same value. */
|
|
48
|
+
// ovenn-validate-disable-next-line hardcoded/hex-color
|
|
49
|
+
export const DEFAULT_BRAND = "#3B5BDB";
|
|
50
|
+
|
|
47
51
|
export function themeBootScript({
|
|
48
52
|
onboardingPath = "/onboarding",
|
|
49
53
|
initial,
|
|
@@ -58,6 +62,8 @@ export function themeBootScript({
|
|
|
58
62
|
return `(function(){try{
|
|
59
63
|
var INIT=${JSON.stringify(init)};
|
|
60
64
|
var ONBOARD=${JSON.stringify(onboardingPath)};
|
|
65
|
+
// Projects migrated from CTDS kept theme choices under ctds-* keys. Carry them over once; existing ovenn-* values win.
|
|
66
|
+
for(var n=localStorage.length-1;n>=0;n--){var ck=localStorage.key(n);if(ck&&ck.indexOf('ctds-')===0){var nk='ovenn-'+ck.slice(5);if(localStorage.getItem(nk)===null)localStorage.setItem(nk,localStorage.getItem(ck));localStorage.removeItem(ck);}}
|
|
61
67
|
var isOnboarding=location.pathname===ONBOARD||location.pathname.indexOf(ONBOARD+'/')===0;
|
|
62
68
|
var mode=isOnboarding?'light':(INIT.mode||localStorage.getItem('ovenn-mode')||(matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'));
|
|
63
69
|
document.documentElement.setAttribute('data-mode',mode);
|
|
@@ -90,7 +96,7 @@ function _legacyBrand(){
|
|
|
90
96
|
function toByte(v){var x=Math.round(255*Math.max(0,Math.min(1,toSrgb(v))));return (x<16?'0':'')+x.toString(16);}
|
|
91
97
|
return '#'+toByte(r)+toByte(g)+toByte(bb);
|
|
92
98
|
}
|
|
93
|
-
var brand=INIT.brand||_legacyBrand()||localStorage.getItem('ovenn-brand')
|
|
99
|
+
var brand=INIT.brand||_legacyBrand()||localStorage.getItem('ovenn-brand')||${JSON.stringify(DEFAULT_BRAND)};
|
|
94
100
|
var hexMatch=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.exec(String(brand).trim());
|
|
95
101
|
if(hexMatch){
|
|
96
102
|
var clean=hexMatch[1];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* ovenn-validate-disable-file hardcoded -- token definition layer: literal values are declared here once and used through var() everywhere else */
|
|
1
2
|
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");
|
|
2
3
|
/* Font 축용 폰트 로드 — display=swap + 필요한 웨이트만.
|
|
3
4
|
ko: Pretendard(위) + Nanum Myeongjo(point)
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
## 조립 전 확인: componentPlan
|
|
22
22
|
|
|
23
|
+
componentPlan의 부품이 정해지면 그 부품의 규칙만 받는다: MCP `get_rules(components=[...])`, 파일 환경은 `ovenn info get-rules --local --components=Input,Canvas`. 다음 단계의 절차는 `get_design_workflow(phase=plan|build|review)`로 그 단계 절만 받는다. 인자 없이 부르면 전문이다.
|
|
24
|
+
|
|
23
25
|
UI 코드를 쓰기 전에 역할·시각적 방향·레퍼런스·부품 선택을 마친다. 역할별 실행기가 있는 환경에서는 WORKFLOW_DESIGN의 UX·구조 협업을 먼저 실행하고 쟁점별 결정과 해결 여부를 보존한다. orchestrationVersion=2에서는 UX·구조 제안을 병렬 실행한 뒤 조정자가 흐름·구조·실제 부품 계획을 한 번에 확정한다. 필수 충돌이 있을 때만 담당자의 추가 확인을 1회 수행하며 미해결이면 구현을 시작하지 않는다. 확정한 업무 흐름과 구조를 입력으로 부품을 선정한다. componentPlan 형식과 검사 의미는 get_design_workflow 또는 로컬 `ovenn info get-design-workflow --local`에서 받는다. 각 역할의 id, purpose, component, strategy(reuse|compose|derived|custom|preserved), source, reason, requires, sourceFiles를 기록한다. component는 실제 export 이름이며 조합은 components 배열에 추가한다. 직접 구현/보존은 대안·구체적 요구·검증 근거를 reason과 evidence에 남긴다. 계획 확인 전 UI를 만들고 사후 명세로 선행했다고 주장하지 않는다.
|
|
24
26
|
|
|
25
27
|
역할은 입력/액션뿐 아니라 셸·사이드바 하단·지표 카드·목록 행·표·프로필·상태까지 조사한다. 셸 역할의 componentPlan에는 앞서 선택한 AppFrame·슬롯과 실제 사용할 Sidebar/Topbar를 반영하고, 상위 셸을 재사용하는 경우는 해당 소스와 보존 범위를 기록한다. 선택하지 않은 영역을 사용률 때문에 추가하지 않는다. 후보에 맞는 설치 가능한 부품이 있으면 실제 소스·CSS·필수 provider를 확인하고 사용한다. 컴포넌트 원문 마지막의 component-contract는 기계 계약이며 일반 미감 제한이 아니다. 변경 범위 밖 기존 구현은 preserved로 구분한다. 실행기 없는 환경에서는 순서를 지침으로 따르되 실행 사실을 인증했다고 주장하지 않는다.
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
- 자식 영역이 축을 상속받지 못한 것 같으면: (1) 중간에 `data-*` 재선언이 있는지, (2) iframe·portal로 넘어가 조상 체인이 끊긴 건 아닌지 확인.
|
|
46
46
|
|
|
47
47
|
### 관련
|
|
48
|
-
-
|
|
49
|
-
- 각 축의 값·기본값·국소 스코프 디테일: [mode
|
|
48
|
+
- 앱 wiring: `app/layout.tsx` + `components/ovenn/ThemeController.tsx` + `components/ovenn/themeBootScript.ts`
|
|
49
|
+
- 각 축의 값·기본값·국소 스코프 디테일: [[axes/mode]] · [[axes/palette]] · [[axes/shape]] · [[axes/density]] · [[axes/motion]] · [[axes/icon]]
|
|
@@ -13,7 +13,7 @@ variant 이름이 헷갈리면 `prompts/components/_variants.md`.
|
|
|
13
13
|
- **Avatar** · `prompts/components/avatar.md`: 사람·팀의 식별 마커. 이미지 → 이니셜 → 아이콘 순서로 자동 폴백.
|
|
14
14
|
- **AvatarUpload** · `prompts/components/avatar-upload.md`: Avatar + 파일 피커. 프로필·조직 로고 설정의 "현재 사진 보여주고 바꾸기" 자리.
|
|
15
15
|
- **Badge** · `prompts/components/badge.md`: 수량·언리드·짧은 알림과 상태 dot을 표시하는 작은 시각 요소.
|
|
16
|
-
- **Button** · `prompts/components/button.md`: 텍스트 액션의 최소 단위. 클릭 시 무언가 일어나는 컨트롤: 페이지 이동은
|
|
16
|
+
- **Button** · `prompts/components/button.md`: 텍스트 액션의 최소 단위. 클릭 시 무언가 일어나는 컨트롤: 페이지 이동은 링크(`<a>` 또는 Next `Link`).
|
|
17
17
|
- **Chip** · `prompts/components/chip.md`: 선택을 담는 라벨. Chip 하나가 두 가지 모드로 쓰인다: 사용자가 이미 고른 값을 보여주며 제거할 수 있는 요약 모드, 그리고 사용자가 켜고 끌 수 있는 토글 모드.
|
|
18
18
|
- **Code** · `prompts/components/code.md`: 본문 안에서 변수명, 속성명, 짧은 코드 조각을 표시한다.
|
|
19
19
|
- **ControlGroup** · `prompts/components/control-group.md`: Button·Input·Select·DatePicker를 같은 높이의 한 몸체로 연결하는 가로 컨트롤 그룹.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Ovenn 전역 원칙
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
변형·안전·토큰 정책을 설명한다. 문서 사이의 우선순위는 [[RULES]] §0 표가 정한다. **컴포넌트는 수정 가능한 출발점이며, 프로젝트 디자인은 자유롭게 만든다.** 동작과 접근성을 재사용하면서 표현을 바꿀 수 있다.
|
|
4
4
|
|
|
5
5
|
## 목표: 사용성과 아름다움
|
|
6
6
|
|
|
@@ -32,17 +32,13 @@
|
|
|
32
32
|
|
|
33
33
|
## 4. 충돌 시 우선순위
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
2. 사용자가 요청한 디자인과 프로젝트의 명시적 정책.
|
|
37
|
-
3. 이 원칙과 실제 토큰 선언, 명시적으로 exact를 요청한 영역의 보존 계약.
|
|
38
|
-
4. 컴포넌트 API와 현재 구현의 제약. 제약은 조사하고 로컬 파생으로 해결할 수 있다.
|
|
39
|
-
5. Brand Set·축·Theme·프리셋·기존 미감 기본값.
|
|
35
|
+
순위는 [[RULES]] §0 표 하나가 정한다. 접근성·동작 계약이 가장 먼저이고, 사용자의 명시 지시, 필수 규칙과 `[HARD]`, 프로젝트 정책, 이 원칙, 컴포넌트 제약, 미감 기본값 순이다. 컴포넌트 API의 제약은 조사하고 로컬 파생으로 해결할 수 있다.
|
|
40
36
|
|
|
41
|
-
|
|
37
|
+
필수 규칙과 `[HARD]` 밖의 색 조합·폰트 개수·굵기·정렬·대문자·표면·HTML 태그 등 미감 제한은 선택 가능한 기본값이다. 오래된 하위 문서/skill/메모리가 그 변형 허용을 다시 금지하지 않는다.
|
|
42
38
|
|
|
43
39
|
### 4a. 안전 계약과 디자인 선택
|
|
44
40
|
|
|
45
|
-
역할/라벨, 포커스·키보드, disabled/loading/오류 의미, 데이터·선택 상태는 보존한다. 디자인 선택은 프로젝트 안에서 자율적으로 결정하고 검증한다. 규칙 준수만으로 미적 완성도가 보증되지는 않는다. WORKFLOW_DESIGN의 명시적 디자인 금지 규칙은
|
|
41
|
+
역할/라벨, 포커스·키보드, disabled/loading/오류 의미, 데이터·선택 상태는 보존한다. 디자인 선택은 프로젝트 안에서 자율적으로 결정하고 검증한다. 규칙 준수만으로 미적 완성도가 보증되지는 않는다. WORKFLOW_DESIGN의 명시적 디자인 금지 규칙은 RULES §0의 5행이다. 해당 위반이 관측되면 필수 수정하며, 일반적인 미감 기본값의 선택 가능성을 이유로 면제하지 않는다.
|
|
46
42
|
|
|
47
43
|
### 4b. Template과 Brand Set
|
|
48
44
|
|
package/assets/prompts/RULES.md
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
# Ovenn 필수 규칙
|
|
2
2
|
|
|
3
|
-
모든 UI 작업에 예외 없이 적용한다.
|
|
3
|
+
모든 UI 작업에 예외 없이 적용한다. 문서끼리 충돌하면 아래 §0 표가 정한다. 우선순위는 이 표 한 곳에만 둔다.
|
|
4
|
+
|
|
5
|
+
## 0. 문서 역할과 우선순위
|
|
6
|
+
|
|
7
|
+
충돌하면 위 행이 이긴다. 같은 행에서는 다루는 범위가 더 좁은 문서가 이긴다(컴포넌트 문서 > 레시피 > 일반 원칙).
|
|
8
|
+
|
|
9
|
+
| 순위 | 무엇 | 어디 | 바꾸는 방법 |
|
|
10
|
+
|---|---|---|---|
|
|
11
|
+
| 1 | 접근성·보안·동작/데이터 의미, 보존할 공개 계약 | 이 문서 §1 | 바꾸지 않는다 |
|
|
12
|
+
| 2 | 사용자가 이번 작업에서 명시한 지시 | 요청 | 사용자. 그 범위 안에서만 3~7행을 바꾼다 |
|
|
13
|
+
| 3 | 필수 규칙(이 문서 §2~§4)과 각 문서의 `[HARD]` bullet | RULES, 해당 문서 | 사용자의 명시 지시로만 |
|
|
14
|
+
| 4 | 프로젝트의 명시적 정책 | `ovenn.config.json`, `DESIGN.md`, 프로젝트 토큰 | 프로젝트 |
|
|
15
|
+
| 5 | 원칙·절차·검수 기준과 exact 보존 계약. 검수 기준의 디자인 금지는 위반이 관측되면 필수 수정 | [[PRINCIPLES]], [[ASSEMBLY]], [[WORKFLOW_DESIGN]] | 문서 변경 |
|
|
16
|
+
| 6 | 컴포넌트 API와 현재 구현의 제약 | `prompts/components/*`, 실제 코드 | 로컬 파생으로 해결할 수 있다 |
|
|
17
|
+
| 7 | 미감 기본값: Brand Set·축·Theme·프리셋, `[HARD]`가 없는 Do/Don't | 각 문서 | 프로젝트에서 자유롭게 바꾼다 |
|
|
18
|
+
|
|
19
|
+
- 같은 규칙은 이 문서에만 두고 다른 문서는 링크한다. 컴포넌트 문서는 그 부품에서 규칙을 지키는 방법(예: ListItem은 MetaDivider)만 적는다.
|
|
20
|
+
- `[HARD]`는 그 문서의 부품·자리에만 적용한다. 7행의 선택 사항(대문자·HTML 태그·정렬·표면 등)을 `[HARD]`로 다시 금지하지 않는다.
|
|
21
|
+
- 기계로 잡히는 규칙은 `ovenn check`가 파일·줄·고칠 방법과 함께 알려 준다.
|
|
4
22
|
|
|
5
23
|
## 1. 접근성·동작 계약
|
|
6
24
|
- 키보드·포커스·라벨·역할·대비·disabled/loading/오류 의미·데이터와 선택 상태를 외형 때문에 손상하지 않는다.
|
package/assets/prompts/SLOTS.md
CHANGED
|
@@ -4,7 +4,7 @@ Ovenn은 CSS Modules 지역 스코프를 쓴다 ([[PRINCIPLES §6b]]). 그래서
|
|
|
4
4
|
|
|
5
5
|
**`data-slot` 과 통일된 `data-*` state attribute** 가 그 자리를 메우는 **공식 API**. CSS 선택자로 쓰지 않고 **외부 통합용**.
|
|
6
6
|
|
|
7
|
-
> 전제: [[PRINCIPLES]]
|
|
7
|
+
> 전제: [[PRINCIPLES]]를 읽었다.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -169,7 +169,7 @@ Modal
|
|
|
169
169
|
|
|
170
170
|
## 6. 신규 컴포넌트 작성 시
|
|
171
171
|
|
|
172
|
-
|
|
172
|
+
컴포넌트 문서에 섹션 추가 — `## data-slot` 과 `## state attributes`:
|
|
173
173
|
|
|
174
174
|
```markdown
|
|
175
175
|
## data-slot
|
|
@@ -190,5 +190,3 @@ Modal
|
|
|
190
190
|
## 7. 관련
|
|
191
191
|
|
|
192
192
|
- [[PRINCIPLES §6b]] — CSS class 네이밍 (지역 vs 전역)
|
|
193
|
-
- [[GUIDE]] — 섹션 문서 공통 골격
|
|
194
|
-
- [[MEMORY]] — 메모리 승격 (data-slot 누락 feedback 축적 자리)
|
|
@@ -61,7 +61,6 @@
|
|
|
61
61
|
### 관련
|
|
62
62
|
- [[ASSEMBLY]]: 공통 순서·회차·증거·완료 계약
|
|
63
63
|
- [[PRINCIPLES]]: 안전·변형·토큰 정책
|
|
64
|
-
- [[FEEDBACK_PROCESS]]: 사용자 피드백으로 이 문서를 개선하는 메타 프로세스
|
|
65
64
|
- [[tokens/spacing]]: 간격 관계와 계산 범위
|
|
66
65
|
- [[tokens/typography]]: 역할별 타이포 위계
|
|
67
66
|
|
|
@@ -129,6 +128,3 @@ required는 위치·관측·영향·수정 방향을 구체적으로 제시한
|
|
|
129
128
|
강화 검수(reviewEvidenceVersion=1)는 각 기준의 evidence에 실제 첨부된 캡처 파일명을 남기고, ruleChecks에 위 6개 규칙 모두의 판정을 기록한다. 같은 지적을 수정 후 실제 화면에서 다시 확인한다. 다음 시각 검수는 이전 지적의 issueIndex별 resolved/still_present/not_observed와 현재 위치·관측·증거를 보고한다. resolved도 무엇이 바뀌었는지 실제 캡처로 확인해야 한다. source hash와 capture hash가 다른 보고서는 현재 결과의 합격으로 사용하지 않는다.
|
|
130
129
|
|
|
131
130
|
검수 모델은 criteria/issues 내용을 작성하고 실행기는 실제 전달한 소스·캡처 hash와 검수 세션을 연결한다. 모델이 긴 hash를 복사한 것을 파일을 관측한 증거로 삼지 않는다. needs_changes인 기준에는 같은 criterion의 required 지적이 있어야 한다.
|
|
132
|
-
|
|
133
|
-
### 사용자 피드백에서 규칙 개선까지
|
|
134
|
-
사용자 피드백으로 이 문서를 개선하는 메타 프로세스는 [[FEEDBACK_PROCESS]]에 있다. `continue` 모드에서 agent에게 전달되는 원인 분석 계약도 같은 파일에서 읽는다.
|
|
@@ -16,7 +16,7 @@ Weight는 축이 아니라 `<Icon weight="..." />` prop (컴포넌트별 자유
|
|
|
16
16
|
- 아이콘은 항상 의미 기반 이름으로 참조: `<Icon name="check" />`.
|
|
17
17
|
- 프로젝트 시작 시 Family 하나 결정. 리스킨 아닌 이상 안 바꾼다.
|
|
18
18
|
- 활성/선택 상태 표시엔 `weight=fill`, 그 외에는 `weight=regular`.
|
|
19
|
-
- **단순한 상징 우선** — Button/MenuItem 라벨이 이미 의미를 담고 있으니, 아이콘은 1초 안에 분류되는 "모양 꼬리표" 역할. 조합형 메타포(`envelope-plus`, `pencil-simple` 등)보다 원형 상징(`plus`, `x`, `check`, `search`, `trash`, `arrow-right`)이
|
|
19
|
+
- **단순한 상징 우선** — Button/MenuItem 라벨이 이미 의미를 담고 있으니, 아이콘은 1초 안에 분류되는 "모양 꼬리표" 역할. 조합형 메타포(`envelope-plus`, `pencil-simple` 등)보다 원형 상징(`plus`, `x`, `check`, `search`, `trash`, `arrow-right`)이 우선.
|
|
20
20
|
|
|
21
21
|
### Don't
|
|
22
22
|
- 한 페이지에서 두 Family를 섞지 않는다.
|
|
@@ -74,6 +74,6 @@ Turbopack CSS Modules는 컴포넌트 CSS 안의 `animation: <name>` shorthand
|
|
|
74
74
|
- `data-state="closed"` 애니메이션 생략 (인·아웃 대칭이 원칙).
|
|
75
75
|
|
|
76
76
|
### 관련
|
|
77
|
-
- [[primitives/fade]] · [[primitives/emerge]]
|
|
77
|
+
- [[primitives/fade]] · [[primitives/emerge]] — Motion 축이 파라미터를 스왑, `.m-float`이 side별 매핑
|
|
78
78
|
|
|
79
79
|
- 흐르는 업로드 피드백은 --duration-flow(1500ms × motion-scale)와 --ease-flow를 사용한다. 이 값은 공용 토큰에서 정의하고 컴포넌트 내부에서 시간·곡선을 직접 재선언하지 않는다.
|
|
@@ -24,7 +24,7 @@ Theme과 독립 — editorial이든 mechanical이든 어떤 Theme에도 어떤 V
|
|
|
24
24
|
- [HARD] 접근성 문구(에러 설명, 필수 필드 안내, 스크린리더 라벨)는 Voice와 무관하게 **명확성 우선**.
|
|
25
25
|
`casual`이어도 필수 정보를 희석하지 않는다 (예: "비밀번호는 필수입니다" 수준은 유지).
|
|
26
26
|
- Voice에 CSS 변수나 토큰을 할당하지 않는다. 코드 레벨 영향은 `data-voice` 속성 노출뿐.
|
|
27
|
-
- [HARD] **[HARD] em dash(—), en dash(–), 생략부호(…), 수사적 큰따옴표 전면 금지.**
|
|
27
|
+
- [HARD] **[HARD] em dash(—), en dash(–), 생략부호(…), 수사적 큰따옴표 전면 금지.**
|
|
28
28
|
모든 Voice 공통 하드 룰. 범위는 **제목·헤딩·버튼 라벨·메뉴명뿐 아니라 본문·테이블 셀·설명·툴팁·에러 메시지까지 모든 사람 UI 카피** 전부. 문서·UI 카피·AI 생성물 전부 해당.
|
|
29
29
|
나쁜 예:
|
|
30
30
|
- 제목: "온보딩 — 테마를 고릅니다", "설정 — 기본값", "저장 — 완료"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
| [IconButton](icon-button.md) |: *(강조는 Button 쪽)* | `outline` | `ghost` | `destructive` | |
|
|
29
29
|
|
|
30
30
|
**선택 규칙 (액션)**
|
|
31
|
-
- 중요 액션=`primary`, 서브 액션=`outline`. 폼·모달·페이지 액션의 기본 쌍. **`secondary`는 레거시, 신규 코드에선 `outline`을 쓴다.**
|
|
31
|
+
- 중요 액션=`primary`, 서브 액션=`outline`. 폼·모달·페이지 액션의 기본 쌍. **`secondary`는 레거시, 신규 코드에선 `outline`을 쓴다.**
|
|
32
32
|
- 테이블 행·툴바 안 액션은 `ghost`.
|
|
33
33
|
- 삭제·해제는 `destructive`, 삭제가 두 번째 시선이면 `destructive-ghost`.
|
|
34
34
|
- IconButton엔 `primary`가 없다: "꽉 찬 색의 아이콘 버튼"은 Ovenn에서 금지. 강조가 필요하면 label 붙은 Button을 써라.
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
**선택 규칙 (표시)**
|
|
47
47
|
- 상태·카테고리 라벨=`Badge solid`(기본) 또는 `soft`(순한 톤). 선택된 필터 값=`Chip`.
|
|
48
|
-
- Chip은 "선택된 값(X로 제거 가능)" 전용. 카테고리·태그·메타 라벨은 **반드시 Badge
|
|
48
|
+
- Chip은 "선택된 값(X로 제거 가능)" 전용. 카테고리·태그·메타 라벨은 **반드시 Badge**.
|
|
49
49
|
- **안내 자리 3층 구분**: 성격에 따라 분리:
|
|
50
50
|
- **흐름 속 각주 (1~2줄, 톤 없음)** = `Hint`
|
|
51
51
|
- **액션 유도 있는 안내 블록 (사이드바·리스트 끝)**는 `Callout fill`을 기본으로 쓴다. 아주 옅은 배경과 테두리를 함께 쓰려면 `outline-tint`를 쓴다.
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
| [TimePicker](time-picker.md) | `line` | `outline` | `filled` |
|
|
62
62
|
|
|
63
63
|
**선택 규칙 (입력)**
|
|
64
|
-
- `line`을 먼저 고려. 독립 폼 블록이면 `outline`, 테이블 셀처럼 밀도가 극한이면 `filled
|
|
64
|
+
- `line`을 먼저 고려. 독립 폼 블록이면 `outline`, 테이블 셀처럼 밀도가 극한이면 `filled`.
|
|
65
65
|
|
|
66
66
|
### 레이아웃·구조 컴포넌트
|
|
67
67
|
"역할" 매핑과 맞지 않는 축을 쓰는 것들. 이름 그대로 사용:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Accordion
|
|
2
2
|
|
|
3
3
|
### 원칙
|
|
4
|
-
여러 섹션을 **접었다 폈다** 하는 구조 컴포넌트. 긴 콘텐츠를 압축해 "지금 중요한 것"만 보여주고, 사용자가 원할 때 세부를 펼친다. 설정 그룹·FAQ·상세 사양·단계별 체크리스트가 전형적인 자리. Radix `@radix-ui/react-accordion`을 감싼 compound 어댑터: 열림 상태·높이 측정·키보드 네비·ARIA는 Radix가 처리하고, Ovenn은 Trigger 레이아웃·caret·divider·card variant만 담당. [[components/
|
|
4
|
+
여러 섹션을 **접었다 폈다** 하는 구조 컴포넌트. 긴 콘텐츠를 압축해 "지금 중요한 것"만 보여주고, 사용자가 원할 때 세부를 펼친다. 설정 그룹·FAQ·상세 사양·단계별 체크리스트가 전형적인 자리. Radix `@radix-ui/react-accordion`을 감싼 compound 어댑터: 열림 상태·높이 측정·키보드 네비·ARIA는 Radix가 처리하고, Ovenn은 Trigger 레이아웃·caret·divider·card variant만 담당. [[components/disclosure]]과 비슷하지만 **여러 아이템**인 점이 다르다. 하나짜리면 Disclosure로.
|
|
5
5
|
|
|
6
6
|
### Do
|
|
7
7
|
- **"지금 보이는 것 vs 숨긴 것"의 비율이 1:3 이상일 때 쓴다.** 전부 다 중요하면 그냥 나열하는 게 낫다. Accordion은 "요약은 다 보이고, 세부가 선택적"인 리스트용.
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
- **본문에 또 다른 Primary CTA 넣지 말 것.** 사용자가 섹션을 "펼쳐야만" 중요한 액션을 볼 수 있는 구조는 발견 실패를 유발. 핵심 CTA는 Accordion 밖 상단에.
|
|
19
19
|
- **길이가 들쭉날쭉한 본문 금지.** 어떤 섹션은 1줄, 어떤 섹션은 20줄이면 레이아웃이 요동친다. 긴 섹션은 아예 별도 페이지로.
|
|
20
20
|
- **Accordion과 Tabs 혼용 금지.** 둘 다 "숨기기 + 보이기"이지만: **Accordion은 세로 리스트, Tabs는 가로 전환**. 섹션 수가 3개 이하 + 서로 배타적이면 Tabs가 맞음. 섹션 수가 많거나 동시 열람 가능하면 Accordion.
|
|
21
|
-
- **애니메이션 커스터마이즈 금지.** Radix의 `--radix-accordion-content-height` 변수에 맞춰 Ovenn 모션 토큰(`--duration-base` + `--ease-out`)으로 이미 처리. duration·ease 하드코딩은
|
|
21
|
+
- **애니메이션 커스터마이즈 금지.** Radix의 `--radix-accordion-content-height` 변수에 맞춰 Ovenn 모션 토큰(`--duration-base` + `--ease-out`)으로 이미 처리. duration·ease 하드코딩은 위반.
|
|
22
22
|
- [HARD] **라벨에 아이콘만 넣고 텍스트 빼는 것 금지.** 접근성·스캐닝 모두 깨짐.
|
|
23
23
|
|
|
24
24
|
### Fallback
|
|
25
25
|
type 애매하면 `single + collapsible`. variant 애매하면 `line`. defaultValue 애매하면 비워두기(전부 닫힘). 크기는 preset 하나(trigger text-base·min-h 48px·content text-sm). line variant는 자동으로 min-h 40px로 조밀. 특수 자리는 로컬 CSS 변수로 override.
|
|
26
26
|
|
|
27
27
|
### 관련
|
|
28
|
-
- [[components/
|
|
28
|
+
- [[components/disclosure]]: Accordion의 1-아이템 버전. "더 보기" 토글 하나짜리.
|
|
29
29
|
- [[components/tabs]]: 섹션 수 ≤ 3 + 가로 전환이 자연스러우면 Tabs. Accordion은 세로 리스트.
|
|
30
30
|
- [[components/menu-item]]: Section variant는 사이드바 섹션 접힘에 사용. 메뉴 트리의 접힘은 Accordion이 아님.
|
|
31
31
|
- [[tokens/motion]]: `--duration-base` · `--ease-out`이 slide 애니메이션을 만든다.
|
|
@@ -89,7 +89,7 @@ size prop을 두면 "라벨은 크게 본문은 작게" 같은 자리마다 다
|
|
|
89
89
|
| closed | 라벨 `--fg`, caret 아래, 본문 숨김 |
|
|
90
90
|
| open | 라벨 `--fg-strong`, caret 180도 회전, 본문 slide-down |
|
|
91
91
|
| hover (closed, 모든 variant) | Trigger 배경 `--hover` + 라벨 `--fg-strong` + leading·caret `--fg-strong`. 네 variant 전부 동일 어휘 |
|
|
92
|
-
| hover (open) | 배경 변화 없음: 상태 signal 유지
|
|
92
|
+
| hover (open) | 배경 변화 없음: 상태 signal 유지 |
|
|
93
93
|
| focus-visible | `--focus-ring` outline |
|
|
94
94
|
| disabled | `--fg-disabled`, cursor not-allowed, 클릭·키보드 모두 꺼짐 |
|
|
95
95
|
|