export interface CommandSnippet { id: string; label: string; command: string; description: string; } export interface StudioGuideCopy { badgeCli: string; badgeSsot: string; title: string; subtitleBeforeTokens: string; subtitleBetween: string; subtitleBeforeCss: string; subtitleAfterCss: string; copyCmdTitle: string; viewComponentsBtn: string; step1Label: string; step1Title: string; step1Desc: string; runCommands: CommandSnippet[]; terminalExampleTitle: string; copyLabel: string; copiedLabel: string; fullWorkflowSnippet: string; step2Label: string; step2Title: string; step2DescBefore: string; step2DescAfter: string; tabLabels: { components: string; themes: string; palette: string; brand: string; export: string; }; workspaces: { components: { title: string; desc: string; bullets: [string, string]; }; themes: { title: string; desc: string; }; palette: { title: string; desc: string; }; brand: { title: string; desc: string; }; export: { title: string; desc: string; }; }; saveTitle: string; saveDescBefore: string; saveDescMiddle: string; saveDescAfter: string; figmaTitle: string; figmaDescBefore: string; figmaDescMiddle: string; figmaDescAfter: string; cliTableTitle: string; cliTableCommandHeader: string; cliTablePurposeHeader: string; cliCheatsheet: { command: string; purpose: string }[]; } function getLocalized(locale: string, map: { ko: T; en: T; ja: T }): T { if (locale === 'en') return map.en; if (locale === 'ja') return map.ja; return map.ko; } /** * Returns localized copy and command metadata for StudioGuideView. */ export function getStudioGuideCopy(locale: string): StudioGuideCopy { return { badgeCli: 'CLI Local GUI', badgeSsot: 'Zero-Runtime SSOT', ...getLocalized(locale, { ko: { title: 'AtomSystem 로컬 스튜디오 가이드', subtitleBeforeTokens: '로컬 스튜디오는 내 프로젝트의 ', subtitleBetween: '과 ', subtitleBeforeCss: '를 브라우저 GUI에서 직접 편집하고, 저장 즉시 ', subtitleAfterCss: '로 자동 재컴파일하는 독립 로컬 서버 도구입니다.', copyCmdTitle: '명령어 복사', viewComponentsBtn: '컴포넌트 문서 보기', }, en: { title: 'AtomSystem Local Studio Guide', subtitleBeforeTokens: 'Local Studio is a standalone local server tool that lets you visually edit your project’s ', subtitleBetween: ' and ', subtitleBeforeCss: ' in a browser GUI, and automatically recompile ', subtitleAfterCss: ' the moment you save.', copyCmdTitle: 'Copy command', viewComponentsBtn: 'View Components', }, ja: { title: 'AtomSystem ローカルスタジオガイド', subtitleBeforeTokens: 'ローカルスタジオは、プロジェクトの ', subtitleBetween: ' と ', subtitleBeforeCss: ' をブラウザGUI上で直接編集し、保存と同時に ', subtitleAfterCss: ' へ自動再コンパイルする独立ローカルサーバーツールです。', copyCmdTitle: 'コマンドをコピー', viewComponentsBtn: 'コンポーネント一覧を見る', }, }), step1Label: 'Step 01 · Quick Start', ...getLocalized(locale, { ko: { step1Title: '실행 방법', step1Desc: '프로젝트 루트 디렉토리에서 터미널을 열고 아래 순서대로 실행합니다.', terminalExampleTitle: '터미널 실행 예시', copyLabel: '복사', copiedLabel: '복사됨', }, en: { step1Title: 'How to Run', step1Desc: 'Open a terminal in your project root directory and run the commands below in order.', terminalExampleTitle: 'Terminal Workflow Example', copyLabel: 'Copy', copiedLabel: 'Copied', }, ja: { step1Title: '起動方法', step1Desc: 'プロジェクトのルートディレクトリでターミナルを開き、以下の順番で実行します。', terminalExampleTitle: 'ターミナル実行例', copyLabel: 'コピー', copiedLabel: 'コピー完了', }, }), runCommands: [ { id: 'init', command: 'npx atomsystem init', ...getLocalized(locale, { ko: { label: '1. 초기 환경 설정', description: 'tokens/tokens.json, css/atom-ui.css, AGENTS.md 및 AI 스킬 파일을 프로젝트에 생성합니다.', }, en: { label: '1. Initialize Project', description: 'Generates tokens/tokens.json, css/atom-ui.css, AGENTS.md, and AI skill files in your project.', }, ja: { label: '1. 初期環境セットアップ', description: 'tokens/tokens.json、css/atom-ui.css、AGENTS.md、AIスキルファイルを生成します。', }, }), }, { id: 'studio', command: 'npx atomsystem studio', ...getLocalized(locale, { ko: { label: '2. 로컬 스튜디오 실행', description: '로컬 SSOT 스튜디오 서버(http://localhost:4000)를 실행합니다.', }, en: { label: '2. Start Local Studio', description: 'Launches the local SSOT Studio server at http://localhost:4000.', }, ja: { label: '2. ローカルスタジオ起動', description: 'ローカルSSOTスタジオサーバー(http://localhost:4000)を起動します。', }, }), }, { id: 'studio-port', command: 'npx atomsystem studio --port=4001', ...getLocalized(locale, { ko: { label: '포트 지정 실행 (충돌 시)', description: '4000번 포트가 이미 사용 중일 때 원하는 포트로 스튜디오를 띄웁니다.', }, en: { label: 'Custom Port (If 4000 is busy)', description: 'Starts Local Studio on a custom port when port 4000 is already in use.', }, ja: { label: 'ポート指定起動(競合時)', description: '4000番ポートが使用中の場合、任意のポートでスタジオを起動します。', }, }), }, ], fullWorkflowSnippet: [ getLocalized(locale, { ko: '# 1. 프로젝트에 AtomSystem 초기화\nnpx atomsystem init\n\n# 2. 로컬 스튜디오 실행 (기본 포트 4000)\nnpx atomsystem studio\n# 브라우저에서 http://localhost:4000 접속', en: '# 1. Initialize AtomSystem in your project\nnpx atomsystem init\n\n# 2. Launch Local Studio (default port 4000)\nnpx atomsystem studio\n# Open http://localhost:4000 in your browser', ja: '# 1. プロジェクトにAtomSystemを初期化\nnpx atomsystem init\n\n# 2. ローカルスタジオを起動(デフォルトポート 4000)\nnpx atomsystem studio\n# ブラウザで http://localhost:4000 にアクセス', }), getLocalized(locale, { ko: '# (선택) 4000번 포트가 사용 중일 경우 다른 포트로 실행\nnpx atomsystem studio --port=4001\n\n# 3. 코드 수정 후 컴포넌트/CSS 자동 동기화\nnpx atomsystem sync', en: '# (Optional) Use a custom port if 4000 is already in use\nnpx atomsystem studio --port=4001\n\n# 3. Scan components and recompile CSS after code changes\nnpx atomsystem sync', ja: '# (任意)4000番ポートが使用中の場合は別ポートで起動\nnpx atomsystem studio --port=4001\n\n# 3. コード変更後にコンポーネント/CSSを自動同期\nnpx atomsystem sync', }), ].join('\n\n'), step2Label: 'Step 02 · Workspace Guide', ...getLocalized(locale, { ko: { step2Title: '스튜디오 화면별 사용 방법', step2DescBefore: '', step2DescAfter: '에 접속하면 상단/사이드바의 5개 워크스페이스를 통해 디자인 시스템 전체를 관리할 수 있습니다.', }, en: { step2Title: 'How to Use Each Workspace', step2DescBefore: 'Open ', step2DescAfter: ' to manage your entire design system across 5 dedicated workspaces.', }, ja: { step2Title: 'ワークスペース別の使い方', step2DescBefore: '', step2DescAfter: ' にアクセスすると、5つのワークスペースからデザインシステム全体を管理できます。', }, }), tabLabels: { components: '1. Components', themes: '2. Themes', palette: '3. Palette', brand: '4. Brand', export: '5. Code Export', }, workspaces: { components: getLocalized(locale, { ko: { title: '컴포넌트 스튜디오 (Type · Variable · Status)', desc: '등록된 모든 UI 컴포넌트의 외형(Type), 시맨틱 옵션(Variable), 인터랙션 상태(Status)를 실시간 프리뷰로 점검하고 속성을 편집합니다.', bullets: [ '좌측 사이드바에서 컴포넌트를 선택하면 Props·상태별 미리보기와 코드 스니펫을 즉시 확인할 수 있습니다.', '상단 + AI 제출 모달 또는 npx atomsystem submit으로 신규 컴포넌트를 추가하면 레지스트리와 문서에 자동 반영됩니다.', ] as [string, string], }, en: { title: 'Component Studio (Type · Variable · Status)', desc: 'Inspect and edit every registered UI component’s Type, semantic Variable options, and interactive Status states in a live preview.', bullets: [ 'Select any component from the left sidebar to inspect props, state previews, and copyable code snippets.', 'Add new components via the + AI Submit modal or npx atomsystem submit to automatically update the registry and docs.', ] as [string, string], }, ja: { title: 'コンポーネントスタジオ (Type · Variable · Status)', desc: '登録済みUIコンポーネントの外観(Type)、セマンティック設定(Variable)、インタラクション状態(Status)をライブプレビューで確認・編集します。', bullets: [ '左サイドバーからコンポーネントを選択すると、Propsや状態別プレビュー、コードスニペットを即座に確認できます。', '上部の + AI提出モーダルまたは npx atomsystem submit で新規コンポーネントを追加すると、レジストリとドキュメントに自動反映されます。', ] as [string, string], }, }), themes: getLocalized(locale, { ko: { title: '테마 매니저 (Theme Manager)', desc: '라이트/다크 모드 및 기본 테마 프리셋을 전환하고, 서비스 분위기에 맞는 시맨틱 테마 토큰 세트를 구성합니다.', }, en: { title: 'Theme Manager', desc: 'Switch between light/dark modes and built-in theme presets, or configure semantic theme token sets for your product.', }, ja: { title: 'テーママネージャー (Theme Manager)', desc: 'ライト/ダークモードや組み込みテーマプリセットを切り替え、サービスに合わせたセマンティックテーマトークンを構成します。', }, }), palette: getLocalized(locale, { ko: { title: '팔레트 & 시맨틱 토큰 편집 (Palette)', desc: '브랜드 컬러(--accent-primary), 배경/텍스트 토큰(--bg-primary, --text-primary), 상태 컬러(Success, Warning, Destructive) 및 곡률(--radius)을 컬러피커와 입력창으로 수정합니다.', }, en: { title: 'Palette & Semantic Tokens', desc: 'Edit brand colors (--accent-primary), surface/text tokens (--bg-primary, --text-primary), status colors (Success, Warning, Destructive), and border radius (--radius) with color pickers.', }, ja: { title: 'パレット & セマンティックトークン編集 (Palette)', desc: 'ブランドカラー(--accent-primary)、背景/テキスト(--bg-primary, --text-primary)、状態カラー、角丸(--radius)をカラーピッカーで調整します。', }, }), brand: getLocalized(locale, { ko: { title: '브랜드 설정 (Brand Settings)', desc: '프로젝트 브랜드 이름, 로고 URL, 기본 폰트 패밀리(font-sans, font-mono)를 설정해 전체 컴포넌트 타이포그래피에 일괄 반영합니다.', }, en: { title: 'Brand Settings', desc: 'Configure your brand name, logo URL, and default font families (font-sans, font-mono) applied across all components.', }, ja: { title: 'ブランド設定 (Brand Settings)', desc: 'ブランド名、ロゴURL、基本フォントファミリー(font-sans, font-mono)を設定し、全コンポーネントに一括適用します。', }, }), export: getLocalized(locale, { ko: { title: '코드 내보내기 (Code Export)', desc: '편집된 W3C DTCG 형식의 tokens.json과 컴파일된 atom-ui.css CSS 변수 코드를 확인하고 복사할 수 있습니다.', }, en: { title: 'Code Export', desc: 'Inspect and copy your edited W3C DTCG tokens.json and compiled zero-runtime atom-ui.css CSS variables.', }, ja: { title: 'コードエクスポート (Code Export)', desc: '編集したW3C DTCG形式の tokens.json とコンパイル済み atom-ui.css のCSS変数コードを確認・コピーできます。', }, }), }, ...getLocalized(locale, { ko: { saveTitle: '저장 시 자동 파일 반영 (SSOT)', saveDescBefore: '스튜디오 상단 ', saveDescMiddle: '저장 버튼을 클릭하면 로컬 프로젝트의 ', saveDescAfter: '이 갱신되고, 동시에 css/atom-ui.css가 0ms 제로 런타임 CSS 변수로 자동 재컴파일됩니다.', }, en: { saveTitle: 'One-Click Save & SSOT Sync', saveDescBefore: 'Clicking ', saveDescMiddle: 'Save in the Studio header updates ', saveDescAfter: ' and immediately recompiles css/atom-ui.css as zero-runtime CSS variables.', }, ja: { saveTitle: '保存時の自動ファイル反映 (SSOT)', saveDescBefore: 'スタジオ上部の ', saveDescMiddle: '保存ボタンをクリックすると ', saveDescAfter: ' が更新され、同時に css/atom-ui.css がゼロランタイムCSS変数として自動再コンパイルされます。', }, }), ...getLocalized(locale, { ko: { figmaTitle: 'Figma 플러그인 연동 (AtomSystem Manager)', figmaDescBefore: '로컬 스튜디오가 실행된 상태에서 Figma의 ', figmaDescMiddle: 'AtomSystem Manager 플러그인을 실행하면 ', figmaDescAfter: '과 자동 연결되어 토큰을 Pull/Push로 양방향 동기화할 수 있습니다.', }, en: { figmaTitle: 'Figma Plugin Sync (AtomSystem Manager)', figmaDescBefore: 'While Local Studio is running, open the ', figmaDescMiddle: 'AtomSystem Manager plugin in Figma to connect to ', figmaDescAfter: ' and sync tokens bidirectionally via Pull and Push.', }, ja: { figmaTitle: 'Figmaプラグイン連携 (AtomSystem Manager)', figmaDescBefore: 'ローカルスタジオ起動中にFigmaの ', figmaDescMiddle: 'AtomSystem Manager プラグインを開くと ', figmaDescAfter: ' に自動接続され、Pull/Pushでトークンを双方向同期できます。', }, }), ...getLocalized(locale, { ko: { cliTableTitle: '함께 사용하는 CLI 명령어', cliTableCommandHeader: '명령어', cliTablePurposeHeader: '설명', }, en: { cliTableTitle: 'CLI Command Reference', cliTableCommandHeader: 'Command', cliTablePurposeHeader: 'Description', }, ja: { cliTableTitle: '関連CLIコマンド一覧', cliTableCommandHeader: 'コマンド', cliTablePurposeHeader: '説明', }, }), cliCheatsheet: [ { command: 'npx atomsystem init', purpose: getLocalized(locale, { ko: '토큰(tokens/tokens.json), CSS(css/atom-ui.css), AI 가이드 초기화', en: 'Initialize tokens/tokens.json, css/atom-ui.css, and AI guidelines', ja: 'tokens/tokens.json、css/atom-ui.css、AIガイドを初期化', }), }, { command: 'npx atomsystem studio', purpose: getLocalized(locale, { ko: '로컬 GUI 스튜디오 실행 (기본 http://localhost:4000)', en: 'Launch Local GUI Studio (default http://localhost:4000)', ja: 'ローカルGUIスタジオを起動(デフォルト http://localhost:4000)', }), }, { command: 'npx atomsystem studio --port=4001', purpose: getLocalized(locale, { ko: '지정 포트로 로컬 GUI 스튜디오 실행', en: 'Launch Local GUI Studio on a custom port', ja: '指定ポートでローカルGUIスタジオを起動', }), }, { command: 'npx atomsystem schema', purpose: getLocalized(locale, { ko: 'AI 컴포넌트 제출용 표준 JSON 스키마 확인', en: 'Inspect the standard JSON schema for AI component submission', ja: 'AIコンポーネント提出用の標準JSONスキーマを確認', }), }, { command: 'npx atomsystem submit .atom.json', purpose: getLocalized(locale, { ko: '컴포넌트 생성 + 레지스트리/CSS/문서 자동 반영', en: 'Scaffold component and update registry, CSS, and docs', ja: 'コンポーネント生成+レジストリ/CSS/ドキュメント自動反映', }), }, { command: 'npx atomsystem sync', purpose: getLocalized(locale, { ko: 'components/ui/*.tsx 스캔 후 레지스트리 및 CSS 재컴파일', en: 'Scan components/ui/*.tsx and recompile registry & CSS', ja: 'components/ui/*.tsx をスキャンしてレジストリとCSSを再コンパイル', }), }, { command: 'npx atomsystem refactor --fix', purpose: getLocalized(locale, { ko: '하드코딩 색상/간격을 시맨틱 토큰 변수로 자동 치환', en: 'Automatically replace hardcoded colors/spacing with semantic tokens', ja: 'ハードコードされた色/余白をセマンティックトークン変数へ自動置換', }), }, ], }; }