@design-ai/cli 4.55.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/.claude-plugin/plugin.json +164 -0
- package/AGENTS.ko.md +126 -0
- package/AGENTS.md +182 -0
- package/CHANGELOG.md +6883 -0
- package/CLAUDE.md +39 -0
- package/LICENSE +21 -0
- package/README.ko.md +245 -0
- package/README.md +277 -0
- package/agents/README.md +14 -0
- package/agents/a11y-reviewer.md +121 -0
- package/agents/component-architect.md +57 -0
- package/agents/design-critic.md +46 -0
- package/agents/token-extractor.md +63 -0
- package/cli/bin/design-ai-mcp.mjs +6 -0
- package/cli/bin/design-ai.mjs +40 -0
- package/cli/commands/audit.mjs +111 -0
- package/cli/commands/check.mjs +226 -0
- package/cli/commands/doctor.mjs +141 -0
- package/cli/commands/examples.mjs +58 -0
- package/cli/commands/help.mjs +271 -0
- package/cli/commands/install.mjs +161 -0
- package/cli/commands/learn.mjs +1871 -0
- package/cli/commands/list.mjs +143 -0
- package/cli/commands/mcp.mjs +27 -0
- package/cli/commands/pack.mjs +211 -0
- package/cli/commands/prompt.mjs +199 -0
- package/cli/commands/route.mjs +247 -0
- package/cli/commands/search.mjs +60 -0
- package/cli/commands/show.mjs +52 -0
- package/cli/commands/site.mjs +558 -0
- package/cli/commands/status.mjs +161 -0
- package/cli/commands/uninstall.mjs +119 -0
- package/cli/commands/update.mjs +184 -0
- package/cli/commands/version.mjs +94 -0
- package/cli/commands/workspace.mjs +176 -0
- package/cli/lib/brief.mjs +52 -0
- package/cli/lib/check.mjs +642 -0
- package/cli/lib/dispatch.mjs +109 -0
- package/cli/lib/doctor.mjs +505 -0
- package/cli/lib/examples.mjs +258 -0
- package/cli/lib/exec.mjs +63 -0
- package/cli/lib/help-flags.mjs +5 -0
- package/cli/lib/learn.mjs +3694 -0
- package/cli/lib/log.mjs +47 -0
- package/cli/lib/mcp-server.mjs +426 -0
- package/cli/lib/output.mjs +101 -0
- package/cli/lib/pack.mjs +599 -0
- package/cli/lib/paths.mjs +63 -0
- package/cli/lib/prompt.mjs +603 -0
- package/cli/lib/route.mjs +740 -0
- package/cli/lib/search.mjs +158 -0
- package/cli/lib/show.mjs +161 -0
- package/cli/lib/signals.mjs +2337 -0
- package/cli/lib/site.mjs +6617 -0
- package/cli/lib/skill-proposals.mjs +2046 -0
- package/cli/lib/suggest.mjs +66 -0
- package/cli/lib/workspace.mjs +1056 -0
- package/commands/README.md +25 -0
- package/commands/component-spec.md +34 -0
- package/commands/conversational.md +44 -0
- package/commands/design-from-brief.md +141 -0
- package/commands/design-review.md +62 -0
- package/commands/document-from-brief.md +47 -0
- package/commands/extract-tokens.md +38 -0
- package/commands/game-ui.md +40 -0
- package/commands/illustration.md +37 -0
- package/commands/iterate.md +167 -0
- package/commands/motion-design.md +54 -0
- package/commands/palette-from-brand.md +50 -0
- package/commands/print.md +49 -0
- package/commands/slide-deck.md +46 -0
- package/commands/spatial.md +47 -0
- package/commands/stability-review.md +74 -0
- package/commands/video.md +42 -0
- package/commands/website-improvement.md +77 -0
- package/docs/AGENT-DEVELOPMENT.md +658 -0
- package/docs/AI-LEARNING.md +429 -0
- package/docs/AIDER-INTEGRATION.md +224 -0
- package/docs/ARCHITECTURE.ko.md +183 -0
- package/docs/ARCHITECTURE.md +105 -0
- package/docs/CODEX-INTEGRATION.md +311 -0
- package/docs/COMPANY-WEBSITE-DOGFOOD.ko.md +144 -0
- package/docs/COMPANY-WEBSITE-DOGFOOD.md +150 -0
- package/docs/COMPANY-WEBSITE-INTAKE-TEMPLATE.ko.md +153 -0
- package/docs/COMPANY-WEBSITE-INTAKE-TEMPLATE.md +154 -0
- package/docs/CONTRIBUTING.ko.md +203 -0
- package/docs/CONTRIBUTING.md +242 -0
- package/docs/CURSOR-INTEGRATION.md +220 -0
- package/docs/DISTRIBUTION.ko.md +248 -0
- package/docs/DISTRIBUTION.md +253 -0
- package/docs/DOGFOOD-FINDINGS.md +180 -0
- package/docs/DOGFOOD-V4-FINDINGS.md +139 -0
- package/docs/DOGFOOD-V4-MKDOCS-FINDINGS.md +233 -0
- package/docs/DOGFOOD-V4-NPM-FINDINGS.md +157 -0
- package/docs/DOGFOOD-V4-VSCODE-FINDINGS.md +135 -0
- package/docs/FIGMA-INTEGRATION.md +222 -0
- package/docs/MCP-INTEGRATION.md +243 -0
- package/docs/MIGRATION-v4.md +121 -0
- package/docs/PLUGIN-PACKAGING.md +240 -0
- package/docs/PRODUCT-READINESS.md +66 -0
- package/docs/QUICKSTART.ko.md +178 -0
- package/docs/QUICKSTART.md +179 -0
- package/docs/RELEASE-CHECKLIST.md +292 -0
- package/docs/ROADMAP.md +19495 -0
- package/docs/SESSION-LOG.md +940 -0
- package/docs/TOKEN-SYNC.md +237 -0
- package/docs/USING.ko.md +206 -0
- package/docs/USING.md +218 -0
- package/docs/WEBSITE-IMPROVEMENT.ko.md +75 -0
- package/docs/WEBSITE-IMPROVEMENT.md +89 -0
- package/docs/announcements/README.md +56 -0
- package/docs/announcements/dev-to-korea.md +206 -0
- package/docs/announcements/hashnode-post.ko.md +232 -0
- package/docs/announcements/okky-post.ko.md +158 -0
- package/docs/announcements/press-kit.md +101 -0
- package/docs/announcements/reddit-r-korea.md +196 -0
- package/docs/announcements/show-hn.md +114 -0
- package/docs/announcements/twitter-thread.md +255 -0
- package/docs/external-status.md +34 -0
- package/docs/integrations/aider-walkthrough.ko.md +275 -0
- package/docs/integrations/aider-walkthrough.md +274 -0
- package/docs/integrations/codex-walkthrough.ko.md +297 -0
- package/docs/integrations/codex-walkthrough.md +297 -0
- package/docs/integrations/cursor-walkthrough.ko.md +281 -0
- package/docs/integrations/cursor-walkthrough.md +284 -0
- package/docs/integrations/design-ai-mcp-server.md +169 -0
- package/docs/integrations/figma-mcp.md +149 -0
- package/docs/integrations/github-mcp.md +178 -0
- package/docs/integrations/linear-mcp.md +215 -0
- package/docs/integrations/notion-mcp.md +174 -0
- package/docs/integrations/sdk-walkthrough.ko.md +375 -0
- package/docs/integrations/sdk-walkthrough.md +375 -0
- package/docs/integrations/slack-mcp.md +208 -0
- package/docs/integrations/vscode-walkthrough.ko.md +202 -0
- package/docs/integrations/vscode-walkthrough.md +205 -0
- package/docs/requirements.txt +16 -0
- package/docs/site-overrides/extra.css +83 -0
- package/docs/site-overrides/favicon.svg +4 -0
- package/docs/site-overrides/logo.svg +10 -0
- package/docs/site-overrides/main.html +18 -0
- package/docs/website-console/app.js +2540 -0
- package/docs/website-console/index.html +24 -0
- package/docs/website-console/styles.css +975 -0
- package/examples/README.md +252 -0
- package/examples/cases/dogfood-v4-korean-hr-onboarding.md +356 -0
- package/examples/component-accordion-actions.md +153 -0
- package/examples/component-accordion-details.md +147 -0
- package/examples/component-accordion-summary.md +180 -0
- package/examples/component-accordion.md +229 -0
- package/examples/component-account-card.md +284 -0
- package/examples/component-address-input.md +260 -0
- package/examples/component-affix.md +190 -0
- package/examples/component-alert-dialog.md +210 -0
- package/examples/component-alert-title.md +77 -0
- package/examples/component-alert.md +192 -0
- package/examples/component-amount-input.md +278 -0
- package/examples/component-anchor.md +198 -0
- package/examples/component-app-bar.md +249 -0
- package/examples/component-aspect-ratio.md +156 -0
- package/examples/component-auto-complete.md +199 -0
- package/examples/component-avatar-group.md +170 -0
- package/examples/component-avatar.md +191 -0
- package/examples/component-back-top.md +123 -0
- package/examples/component-backdrop.md +148 -0
- package/examples/component-badge.md +181 -0
- package/examples/component-banner.md +237 -0
- package/examples/component-biometric-gate.md +281 -0
- package/examples/component-blockquote.md +153 -0
- package/examples/component-border-beam.md +207 -0
- package/examples/component-bottom-navigation.md +226 -0
- package/examples/component-box.md +112 -0
- package/examples/component-breadcrumb.md +222 -0
- package/examples/component-button-base.md +190 -0
- package/examples/component-button-group.md +117 -0
- package/examples/component-button.md +213 -0
- package/examples/component-calendar.md +280 -0
- package/examples/component-callout.md +131 -0
- package/examples/component-card-actions.md +101 -0
- package/examples/component-card-content.md +90 -0
- package/examples/component-card-header.md +122 -0
- package/examples/component-card-media.md +79 -0
- package/examples/component-card.md +233 -0
- package/examples/component-carousel.md +266 -0
- package/examples/component-cascader.md +135 -0
- package/examples/component-category-picker.md +271 -0
- package/examples/component-chart.md +237 -0
- package/examples/component-chat-interface.md +399 -0
- package/examples/component-checkbox.md +149 -0
- package/examples/component-click-away-listener.md +87 -0
- package/examples/component-code.md +213 -0
- package/examples/component-collapsible.md +219 -0
- package/examples/component-color-picker.md +110 -0
- package/examples/component-combobox.md +267 -0
- package/examples/component-command.md +299 -0
- package/examples/component-config-provider.md +190 -0
- package/examples/component-context-menu.md +179 -0
- package/examples/component-css-baseline.md +148 -0
- package/examples/component-date-picker.md +249 -0
- package/examples/component-descriptions.md +242 -0
- package/examples/component-dialog-actions.md +111 -0
- package/examples/component-dialog-content-text.md +76 -0
- package/examples/component-dialog-content.md +105 -0
- package/examples/component-dialog-title.md +104 -0
- package/examples/component-dialog.md +176 -0
- package/examples/component-divider.md +182 -0
- package/examples/component-doc-page.md +217 -0
- package/examples/component-drawer.md +257 -0
- package/examples/component-dropdown.md +220 -0
- package/examples/component-email-layout.md +253 -0
- package/examples/component-empty-state.md +269 -0
- package/examples/component-empty.md +172 -0
- package/examples/component-fade.md +87 -0
- package/examples/component-feature-grid.md +201 -0
- package/examples/component-field.md +266 -0
- package/examples/component-filled-input.md +114 -0
- package/examples/component-flex.md +117 -0
- package/examples/component-float-button.md +214 -0
- package/examples/component-form-control-label.md +134 -0
- package/examples/component-form-control.md +113 -0
- package/examples/component-form-controls.md +251 -0
- package/examples/component-form-group.md +86 -0
- package/examples/component-form-helper-text.md +95 -0
- package/examples/component-form-label.md +98 -0
- package/examples/component-form.md +291 -0
- package/examples/component-game-hud.md +362 -0
- package/examples/component-game-menu.md +327 -0
- package/examples/component-grid.md +140 -0
- package/examples/component-grow.md +79 -0
- package/examples/component-hero-block.md +252 -0
- package/examples/component-hover-card.md +211 -0
- package/examples/component-icon-button.md +142 -0
- package/examples/component-icon.md +102 -0
- package/examples/component-illustration.md +280 -0
- package/examples/component-image-list.md +107 -0
- package/examples/component-image.md +282 -0
- package/examples/component-input-adornment.md +101 -0
- package/examples/component-input-base.md +134 -0
- package/examples/component-input-number.md +141 -0
- package/examples/component-input-otp.md +271 -0
- package/examples/component-input.md +213 -0
- package/examples/component-item.md +243 -0
- package/examples/component-kbd.md +197 -0
- package/examples/component-krw-amount.md +219 -0
- package/examples/component-label.md +118 -0
- package/examples/component-layout.md +217 -0
- package/examples/component-link.md +223 -0
- package/examples/component-list-item-avatar.md +72 -0
- package/examples/component-list-item-button.md +139 -0
- package/examples/component-list-item-icon.md +82 -0
- package/examples/component-list-item-text.md +98 -0
- package/examples/component-list-item.md +116 -0
- package/examples/component-list-subheader.md +70 -0
- package/examples/component-list.md +198 -0
- package/examples/component-loading-button.md +125 -0
- package/examples/component-loading-sequence.md +254 -0
- package/examples/component-lottie-player.md +279 -0
- package/examples/component-masonry.md +191 -0
- package/examples/component-mentions.md +189 -0
- package/examples/component-menu-item.md +102 -0
- package/examples/component-menu-list.md +98 -0
- package/examples/component-menu.md +139 -0
- package/examples/component-menubar.md +259 -0
- package/examples/component-message.md +162 -0
- package/examples/component-mobile-stepper.md +155 -0
- package/examples/component-modal.md +220 -0
- package/examples/component-navigation-menu.md +295 -0
- package/examples/component-notification.md +166 -0
- package/examples/component-otp-countdown.md +245 -0
- package/examples/component-outlined-input.md +145 -0
- package/examples/component-page-transition.md +281 -0
- package/examples/component-pagination.md +226 -0
- package/examples/component-paper.md +199 -0
- package/examples/component-pass-auth.md +265 -0
- package/examples/component-payment-brand-button.md +253 -0
- package/examples/component-payment-method-selector.md +272 -0
- package/examples/component-payment-receipt.md +277 -0
- package/examples/component-popconfirm.md +144 -0
- package/examples/component-popover.md +239 -0
- package/examples/component-popper.md +129 -0
- package/examples/component-pricing-cards.md +247 -0
- package/examples/component-progress.md +195 -0
- package/examples/component-qr-code.md +201 -0
- package/examples/component-radio.md +167 -0
- package/examples/component-rate.md +202 -0
- package/examples/component-resizable.md +163 -0
- package/examples/component-result.md +270 -0
- package/examples/component-scroll-area.md +199 -0
- package/examples/component-scroll-reveal.md +320 -0
- package/examples/component-segmented.md +178 -0
- package/examples/component-select.md +258 -0
- package/examples/component-separator.md +177 -0
- package/examples/component-sheet.md +277 -0
- package/examples/component-sidebar.md +257 -0
- package/examples/component-skeleton.md +178 -0
- package/examples/component-slide.md +89 -0
- package/examples/component-slider.md +208 -0
- package/examples/component-snackbar-content.md +92 -0
- package/examples/component-snackbar.md +121 -0
- package/examples/component-sonner.md +165 -0
- package/examples/component-space.md +125 -0
- package/examples/component-spatial-locomotion.md +373 -0
- package/examples/component-spatial-panel.md +330 -0
- package/examples/component-speed-dial-action.md +78 -0
- package/examples/component-speed-dial.md +177 -0
- package/examples/component-spin.md +173 -0
- package/examples/component-spinner.md +204 -0
- package/examples/component-splitter.md +210 -0
- package/examples/component-stack.md +130 -0
- package/examples/component-statistic.md +282 -0
- package/examples/component-step-button.md +157 -0
- package/examples/component-step-connector.md +157 -0
- package/examples/component-step-content.md +121 -0
- package/examples/component-step-icon.md +115 -0
- package/examples/component-step-label.md +101 -0
- package/examples/component-step.md +84 -0
- package/examples/component-steps.md +264 -0
- package/examples/component-stock-chart.md +251 -0
- package/examples/component-swipeable-drawer.md +149 -0
- package/examples/component-switch.md +99 -0
- package/examples/component-tab-scroll-button.md +180 -0
- package/examples/component-tab.md +120 -0
- package/examples/component-table-body.md +82 -0
- package/examples/component-table-cell.md +118 -0
- package/examples/component-table-container.md +75 -0
- package/examples/component-table-footer.md +72 -0
- package/examples/component-table-head.md +78 -0
- package/examples/component-table-pagination.md +137 -0
- package/examples/component-table-row.md +113 -0
- package/examples/component-table-sort-label.md +109 -0
- package/examples/component-table.md +202 -0
- package/examples/component-tabs.md +184 -0
- package/examples/component-tag-badge.md +309 -0
- package/examples/component-tag.md +102 -0
- package/examples/component-testimonial-carousel.md +218 -0
- package/examples/component-textarea-autosize.md +114 -0
- package/examples/component-textarea.md +173 -0
- package/examples/component-time-picker.md +205 -0
- package/examples/component-timeline.md +170 -0
- package/examples/component-toast.md +224 -0
- package/examples/component-toggle-button.md +129 -0
- package/examples/component-toggle.md +220 -0
- package/examples/component-toolbar.md +104 -0
- package/examples/component-tooltip.md +178 -0
- package/examples/component-tour.md +176 -0
- package/examples/component-transaction-list-item.md +243 -0
- package/examples/component-transfer.md +156 -0
- package/examples/component-tree-select.md +202 -0
- package/examples/component-tree.md +297 -0
- package/examples/component-typography.md +215 -0
- package/examples/component-upload.md +295 -0
- package/examples/component-video-hero.md +409 -0
- package/examples/component-video-player.md +340 -0
- package/examples/component-voice-input.md +408 -0
- package/examples/component-watermark.md +217 -0
- package/examples/component-zoom.md +92 -0
- package/examples/doc-explanation-example.md +196 -0
- package/examples/doc-how-to-example.md +205 -0
- package/examples/doc-tutorial-example.md +162 -0
- package/examples/dogfood-korean-fintech-system.md +433 -0
- package/examples/email-transactional-example.md +259 -0
- package/examples/palette-saas-violet.md +235 -0
- package/examples/print-business-card-spec.md +205 -0
- package/examples/print-packaging-spec.md +285 -0
- package/examples/report-example.md +228 -0
- package/examples/slide-deck-example.md +237 -0
- package/examples/website-improvement-report.md +128 -0
- package/examples/website-improvement-workspace.json +126 -0
- package/install.sh +189 -0
- package/knowledge/COVERAGE.md +740 -0
- package/knowledge/PRINCIPLES.md +108 -0
- package/knowledge/a11y/contrast.md +70 -0
- package/knowledge/a11y/keyboard-and-focus.md +108 -0
- package/knowledge/colors/color-theory.md +90 -0
- package/knowledge/colors/mui-palette-structure.md +105 -0
- package/knowledge/colors/palettes-by-product-type.md +876 -0
- package/knowledge/components/INDEX.md +231 -0
- package/knowledge/components/index.json +1470 -0
- package/knowledge/components/shadcn-registry.md +159 -0
- package/knowledge/conversational/ai-chat-interfaces.md +323 -0
- package/knowledge/conversational/chatbot-design.md +312 -0
- package/knowledge/conversational/conversational-ui-fundamentals.md +299 -0
- package/knowledge/conversational/korean-voice-conventions.md +281 -0
- package/knowledge/conversational/voice-ui-patterns.md +297 -0
- package/knowledge/design-tokens/ant-design.md +124 -0
- package/knowledge/design-tokens/material-3.md +235 -0
- package/knowledge/design-tokens/polaris-and-carbon.md +231 -0
- package/knowledge/design-tokens/tailwind-v4.md +284 -0
- package/knowledge/game-ui/game-accessibility.md +317 -0
- package/knowledge/game-ui/game-ui-fundamentals.md +281 -0
- package/knowledge/game-ui/hud-design.md +324 -0
- package/knowledge/game-ui/korean-gaming-conventions.md +312 -0
- package/knowledge/game-ui/menu-systems.md +388 -0
- package/knowledge/i18n/korean-app-store-visual.md +223 -0
- package/knowledge/i18n/korean-document-style.md +301 -0
- package/knowledge/i18n/korean-payments.md +211 -0
- package/knowledge/i18n/korean-product-conventions.md +96 -0
- package/knowledge/i18n/korean-publishing.md +139 -0
- package/knowledge/i18n/korean-typography.md +123 -0
- package/knowledge/icons/curated-sets.md +225 -0
- package/knowledge/illustration/hero-illustrations.md +234 -0
- package/knowledge/illustration/illustration-systems.md +221 -0
- package/knowledge/illustration/mascot-design.md +208 -0
- package/knowledge/illustration/spot-illustrations.md +246 -0
- package/knowledge/illustration/svg-optimization.md +308 -0
- package/knowledge/layout/spacing-and-grid.md +119 -0
- package/knowledge/motion/app-loading-sequences.md +277 -0
- package/knowledge/motion/choreography-depth.md +297 -0
- package/knowledge/motion/marketing-motion.md +223 -0
- package/knowledge/motion/micro-interactions.md +266 -0
- package/knowledge/motion/motion-tools.md +281 -0
- package/knowledge/motion/principles.md +126 -0
- package/knowledge/patterns/auth-flow-design.md +316 -0
- package/knowledge/patterns/b2b-onboarding-flows.md +182 -0
- package/knowledge/patterns/brand-identity.md +238 -0
- package/knowledge/patterns/brand-references.md +97 -0
- package/knowledge/patterns/chart-color-encoding.md +269 -0
- package/knowledge/patterns/chart-types.md +344 -0
- package/knowledge/patterns/dashboard-composition.md +299 -0
- package/knowledge/patterns/design-system-qa.md +356 -0
- package/knowledge/patterns/document-typography.md +248 -0
- package/knowledge/patterns/email-design.md +338 -0
- package/knowledge/patterns/empty-states.md +263 -0
- package/knowledge/patterns/error-states.md +318 -0
- package/knowledge/patterns/form-design.md +237 -0
- package/knowledge/patterns/information-architecture.md +341 -0
- package/knowledge/patterns/landing-hero-design.md +283 -0
- package/knowledge/patterns/landing-page-patterns.md +681 -0
- package/knowledge/patterns/list-and-feed.md +371 -0
- package/knowledge/patterns/mobile-navigation.md +278 -0
- package/knowledge/patterns/money-and-amount.md +301 -0
- package/knowledge/patterns/onboarding.md +300 -0
- package/knowledge/patterns/pricing-page-design.md +261 -0
- package/knowledge/patterns/realtime-data.md +280 -0
- package/knowledge/patterns/report-design.md +330 -0
- package/knowledge/patterns/search-ux.md +373 -0
- package/knowledge/patterns/settings-page.md +325 -0
- package/knowledge/patterns/slide-deck-design.md +316 -0
- package/knowledge/patterns/styles-catalog.md +2599 -0
- package/knowledge/patterns/technical-writing.md +306 -0
- package/knowledge/patterns/ui-reasoning.md +1853 -0
- package/knowledge/patterns/ux-guidelines.md +1454 -0
- package/knowledge/platforms/react-native.md +395 -0
- package/knowledge/print/brochures-and-flyers.md +276 -0
- package/knowledge/print/korean-print-conventions.md +284 -0
- package/knowledge/print/packaging.md +321 -0
- package/knowledge/print/print-fundamentals.md +238 -0
- package/knowledge/print/signage-and-posters.md +235 -0
- package/knowledge/print/stationery.md +262 -0
- package/knowledge/spatial/ar-patterns.md +253 -0
- package/knowledge/spatial/comfort-and-accessibility.md +245 -0
- package/knowledge/spatial/spatial-design-fundamentals.md +346 -0
- package/knowledge/spatial/spatial-ui-elements.md +343 -0
- package/knowledge/spatial/vr-patterns.md +302 -0
- package/knowledge/typography/font-pairings.md +332 -0
- package/knowledge/typography/mui-type-scale.md +57 -0
- package/knowledge/typography/type-scale-fundamentals.md +105 -0
- package/knowledge/video/in-product-video.md +277 -0
- package/knowledge/video/korean-video-conventions.md +247 -0
- package/knowledge/video/marketing-video.md +258 -0
- package/knowledge/video/social-and-short-form.md +257 -0
- package/knowledge/video/video-fundamentals.md +296 -0
- package/package.json +106 -0
- package/skills/README.md +39 -0
- package/skills/color-palette/PLAYBOOK.md +175 -0
- package/skills/color-palette/SKILL.md +6 -0
- package/skills/color-palette/TEMPLATE.md +103 -0
- package/skills/component-spec-writer/PLAYBOOK.md +169 -0
- package/skills/component-spec-writer/SKILL.md +6 -0
- package/skills/component-spec-writer/TEMPLATE.md +115 -0
- package/skills/conversational-ui-designer/PLAYBOOK.md +231 -0
- package/skills/conversational-ui-designer/SKILL.md +6 -0
- package/skills/design-broadcast/PLAYBOOK.md +146 -0
- package/skills/design-broadcast/SKILL.md +6 -0
- package/skills/design-critique/PLAYBOOK.md +137 -0
- package/skills/design-critique/SKILL.md +6 -0
- package/skills/design-pr-review/PLAYBOOK.md +171 -0
- package/skills/design-pr-review/SKILL.md +6 -0
- package/skills/design-system-builder/PLAYBOOK.md +218 -0
- package/skills/design-system-builder/SKILL.md +6 -0
- package/skills/design-system-qa/PLAYBOOK.md +163 -0
- package/skills/design-system-qa/SKILL.md +6 -0
- package/skills/document-author/PLAYBOOK.md +167 -0
- package/skills/document-author/SKILL.md +6 -0
- package/skills/figma-token-sync/PLAYBOOK.md +149 -0
- package/skills/figma-token-sync/SKILL.md +6 -0
- package/skills/game-ui-designer/PLAYBOOK.md +209 -0
- package/skills/game-ui-designer/SKILL.md +6 -0
- package/skills/handoff-spec/PLAYBOOK.md +170 -0
- package/skills/handoff-spec/SKILL.md +6 -0
- package/skills/illustration-designer/PLAYBOOK.md +166 -0
- package/skills/illustration-designer/SKILL.md +6 -0
- package/skills/motion-designer/PLAYBOOK.md +223 -0
- package/skills/motion-designer/SKILL.md +6 -0
- package/skills/print-designer/PLAYBOOK.md +209 -0
- package/skills/print-designer/SKILL.md +6 -0
- package/skills/slide-deck-author/PLAYBOOK.md +198 -0
- package/skills/slide-deck-author/SKILL.md +6 -0
- package/skills/spatial-designer/PLAYBOOK.md +238 -0
- package/skills/spatial-designer/SKILL.md +6 -0
- package/skills/ux-audit/PLAYBOOK.md +142 -0
- package/skills/ux-audit/SKILL.md +6 -0
- package/skills/video-designer/PLAYBOOK.md +240 -0
- package/skills/video-designer/SKILL.md +6 -0
- package/skills/website-improvement/PLAYBOOK.md +118 -0
- package/skills/website-improvement/SKILL.md +6 -0
- package/skills/website-improvement/TEMPLATE.md +103 -0
- package/tools/audit/changelog-generate.py +176 -0
- package/tools/audit/check-coverage.py +483 -0
- package/tools/audit/doctor_assertions.py +256 -0
- package/tools/audit/example-qa.py +108 -0
- package/tools/audit/frontmatter-check.py +199 -0
- package/tools/audit/integration-check.py +95 -0
- package/tools/audit/korean-copy-check.py +161 -0
- package/tools/audit/link-check.py +146 -0
- package/tools/audit/local-ci.py +558 -0
- package/tools/audit/package-contents.py +723 -0
- package/tools/audit/package-smoke.py +22443 -0
- package/tools/audit/raw-hex-check.py +252 -0
- package/tools/audit/registry-smoke.py +8188 -0
- package/tools/audit/release-metadata.py +9832 -0
- package/tools/audit/run-all.py +351 -0
- package/tools/audit/smoke_assertions.py +12742 -0
- package/tools/audit/stability-review.py +332 -0
- package/tools/audit/stale-check.py +156 -0
- package/tools/migrations/add-version-frontmatter.py +132 -0
- package/tools/migrations/bump-last-updated.py +131 -0
- package/tools/migrations/promote-stability.py +172 -0
- package/tools/preview/README.md +58 -0
- package/tools/preview/render-tokens.py +454 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
# `Chart` — spec
|
|
2
|
+
|
|
3
|
+
> Synthesized from shadcn-ui `chart` (Recharts wrapper). Themed chart container that handles theming, tooltips, legends, and accessibility for data visualization. Pairs with [`knowledge/patterns/chart-types.md`](../knowledge/patterns/chart-types.md) for chart-type selection.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- **Dashboards** with consistent chart styling.
|
|
8
|
+
- **Report / analytics** views.
|
|
9
|
+
- **In-product data viz** (account balance over time, usage stats).
|
|
10
|
+
|
|
11
|
+
When NOT to use:
|
|
12
|
+
- Single-value display (use `Statistic`).
|
|
13
|
+
- Tabular data (use `Table`).
|
|
14
|
+
- Maps / geographic (use a dedicated map component).
|
|
15
|
+
|
|
16
|
+
`Chart` is a **wrapper / theming layer**, not a chart engine. Underlying engine is Recharts (or D3 / VisX). The wrapper gives you brand-consistent tooltips, colors, legends, accessibility.
|
|
17
|
+
|
|
18
|
+
## Anatomy
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
┌─────────────────────────────────────────┐
|
|
22
|
+
│ Title [⋮] │
|
|
23
|
+
├─────────────────────────────────────────┤
|
|
24
|
+
│ 10K ┤ │
|
|
25
|
+
│ │ ╱─────╲ │
|
|
26
|
+
│ 5K ┤ ╱╱ ╲ │
|
|
27
|
+
│ │ ╱╱ ╲╱╲╲ │
|
|
28
|
+
│ │ │
|
|
29
|
+
│ 0K └──────────────────────────── │
|
|
30
|
+
│ Jan Feb Mar Apr May Jun │
|
|
31
|
+
│ │
|
|
32
|
+
│ ● Revenue ● Cost │ ← legend
|
|
33
|
+
└─────────────────────────────────────────┘
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## API
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
<Chart
|
|
40
|
+
config={{
|
|
41
|
+
revenue: { label: "Revenue", color: "var(--chart-1)" },
|
|
42
|
+
cost: { label: "Cost", color: "var(--chart-2)" },
|
|
43
|
+
}}
|
|
44
|
+
className="h-72"
|
|
45
|
+
>
|
|
46
|
+
<LineChart data={data}>
|
|
47
|
+
<CartesianGrid />
|
|
48
|
+
<XAxis dataKey="month" />
|
|
49
|
+
<YAxis />
|
|
50
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
51
|
+
<ChartLegend content={<ChartLegendContent />} />
|
|
52
|
+
<Line dataKey="revenue" stroke="var(--color-revenue)" />
|
|
53
|
+
<Line dataKey="cost" stroke="var(--color-cost)" />
|
|
54
|
+
</LineChart>
|
|
55
|
+
</Chart>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
| Prop | Type | Default | Description |
|
|
59
|
+
| --- | --- | --- | --- |
|
|
60
|
+
| `config` | `{ [key: string]: { label, color } }` | required | Mapping of series key → label + color |
|
|
61
|
+
| `children` | `Recharts component tree` | — | The chart definition |
|
|
62
|
+
| `className` | `string` | — | Style override |
|
|
63
|
+
|
|
64
|
+
The `config` becomes CSS variables (`--color-{key}`) on the wrapper, so child Recharts components reference them as `stroke="var(--color-revenue)"`. Theming flows from the wrapper.
|
|
65
|
+
|
|
66
|
+
## Composition
|
|
67
|
+
|
|
68
|
+
| Part | Purpose |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| `Chart` (Container) | Wrapper; injects theme + a11y |
|
|
71
|
+
| `ChartTooltip` | Themed tooltip wrapper (Recharts Tooltip + custom content) |
|
|
72
|
+
| `ChartTooltipContent` | Default tooltip content with brand styling |
|
|
73
|
+
| `ChartLegend` | Themed legend wrapper |
|
|
74
|
+
| `ChartLegendContent` | Default legend content |
|
|
75
|
+
| `ChartStyle` | Auto-injects CSS variables from `config` |
|
|
76
|
+
|
|
77
|
+
User wraps Recharts primitives (`LineChart`, `BarChart`, `Line`, `Bar`, `XAxis`, etc.) inside `Chart`.
|
|
78
|
+
|
|
79
|
+
## Chart types (engine-agnostic)
|
|
80
|
+
|
|
81
|
+
The wrapper supports any Recharts chart type. See [`knowledge/patterns/chart-types.md`](../knowledge/patterns/chart-types.md) for selection guidance.
|
|
82
|
+
|
|
83
|
+
| Chart type | Use |
|
|
84
|
+
| --- | --- |
|
|
85
|
+
| Line | Trend over continuous (time, scale) |
|
|
86
|
+
| Area | Trend with cumulative emphasis |
|
|
87
|
+
| Bar | Discrete comparison |
|
|
88
|
+
| Stacked bar | Composition over discrete |
|
|
89
|
+
| Pie / donut | Part-of-whole (max 5 slices) |
|
|
90
|
+
| Scatter | Correlation between two variables |
|
|
91
|
+
| Radar | Multi-dimensional comparison |
|
|
92
|
+
| Heatmap | Density across two dimensions |
|
|
93
|
+
| Treemap | Hierarchy with size encoding |
|
|
94
|
+
|
|
95
|
+
Each becomes a Recharts `<XYZChart>` inside `<Chart>`.
|
|
96
|
+
|
|
97
|
+
## Korean stock convention (CRITICAL)
|
|
98
|
+
|
|
99
|
+
Korean stock charts use **inverted color encoding**: red = up, blue = down (opposite of Western convention).
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
<Chart config={{
|
|
103
|
+
rise: { label: "상승", color: "var(--color-stock-up)" }, // red in KR
|
|
104
|
+
fall: { label: "하락", color: "var(--color-stock-down)" }, // blue in KR
|
|
105
|
+
}}>
|
|
106
|
+
...
|
|
107
|
+
</Chart>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Tokens cascade through theme. See [`knowledge/patterns/chart-color-encoding.md`](../knowledge/patterns/chart-color-encoding.md) and [`examples/component-stock-chart.md`](component-stock-chart.md) for KR-specific stock chart spec.
|
|
111
|
+
|
|
112
|
+
For non-stock data viz: use Western convention (green=up, red=down).
|
|
113
|
+
|
|
114
|
+
## States
|
|
115
|
+
|
|
116
|
+
| State | Visual |
|
|
117
|
+
| --- | --- |
|
|
118
|
+
| Loading | Skeleton showing chart shape; Recharts won't render until data arrives |
|
|
119
|
+
| Empty (no data) | Empty state message in chart area |
|
|
120
|
+
| Hover (data point) | Tooltip with series + value |
|
|
121
|
+
| Hover (series legend) | Other series dimmed, hovered series emphasized |
|
|
122
|
+
| Active selection | Persistent selected point / range |
|
|
123
|
+
|
|
124
|
+
## Tokens consumed
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
--chart-1 through --chart-N (series color palette; typically 8-12 distinct hues)
|
|
128
|
+
--chart-grid (background gridlines)
|
|
129
|
+
--chart-axis (axis labels, ticks)
|
|
130
|
+
--chart-tooltip-bg (tooltip surface)
|
|
131
|
+
--chart-tooltip-border
|
|
132
|
+
--chart-tooltip-fg
|
|
133
|
+
--chart-legend-fg
|
|
134
|
+
--color-stock-up (Korean: red)
|
|
135
|
+
--color-stock-down (Korean: blue)
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
shadcn names them `--chart-1` ... `--chart-5` (5 distinct series colors). For more series, extend with `--chart-6+` or use ordinal palette generation.
|
|
139
|
+
|
|
140
|
+
## Accessibility
|
|
141
|
+
|
|
142
|
+
- Chart container: `<figure>` with `<figcaption>` for the chart title.
|
|
143
|
+
- `role="img"` + `aria-label` describing the chart's main takeaway ("Revenue rose 30% from Jan to Jun").
|
|
144
|
+
- **Provide a data table alternative** for screen reader users: hidden `<table>` adjacent OR toggleable "View as table" button.
|
|
145
|
+
- Legend items: focusable; activating legend toggles series visibility.
|
|
146
|
+
- Tooltip: `aria-live="polite"` so changes announce on hover / focus.
|
|
147
|
+
- High contrast mode: ensure series colors are distinguishable (don't rely on hue alone — use shape encoding for points or pattern for areas).
|
|
148
|
+
|
|
149
|
+
```tsx
|
|
150
|
+
<Chart config={config} aria-label="월별 매출 추이">
|
|
151
|
+
...
|
|
152
|
+
</Chart>
|
|
153
|
+
<details>
|
|
154
|
+
<summary>표로 보기</summary>
|
|
155
|
+
<table>{/* same data as table */}</table>
|
|
156
|
+
</details>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Code example — Korean fintech dashboard
|
|
160
|
+
|
|
161
|
+
```tsx
|
|
162
|
+
function RevenueChart({ data }: Props) {
|
|
163
|
+
return (
|
|
164
|
+
<Card>
|
|
165
|
+
<CardHeader>
|
|
166
|
+
<CardTitle>월별 매출</CardTitle>
|
|
167
|
+
<CardDescription>2025년 6월부터 11월까지</CardDescription>
|
|
168
|
+
</CardHeader>
|
|
169
|
+
<CardContent>
|
|
170
|
+
<Chart
|
|
171
|
+
config={{
|
|
172
|
+
revenue: { label: "매출", color: "var(--chart-1)" },
|
|
173
|
+
cost: { label: "비용", color: "var(--chart-2)" },
|
|
174
|
+
profit: { label: "이익", color: "var(--chart-3)" },
|
|
175
|
+
}}
|
|
176
|
+
className="h-72"
|
|
177
|
+
>
|
|
178
|
+
<LineChart data={data}>
|
|
179
|
+
<CartesianGrid vertical={false} />
|
|
180
|
+
<XAxis
|
|
181
|
+
dataKey="month"
|
|
182
|
+
tickFormatter={(m) => `${m}월`}
|
|
183
|
+
/>
|
|
184
|
+
<YAxis tickFormatter={(v) => `${(v / 1000).toFixed(0)}K원`} />
|
|
185
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
186
|
+
<ChartLegend content={<ChartLegendContent />} />
|
|
187
|
+
<Line dataKey="revenue" stroke="var(--color-revenue)" strokeWidth={2} />
|
|
188
|
+
<Line dataKey="cost" stroke="var(--color-cost)" strokeWidth={2} />
|
|
189
|
+
<Line dataKey="profit" stroke="var(--color-profit)" strokeWidth={2} />
|
|
190
|
+
</LineChart>
|
|
191
|
+
</Chart>
|
|
192
|
+
</CardContent>
|
|
193
|
+
</Card>
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Edge cases
|
|
199
|
+
|
|
200
|
+
- **Empty data**: render empty state inside chart area, not a broken axis.
|
|
201
|
+
- **Single data point**: line / area charts can't render lines; consider Statistic + sparkline instead.
|
|
202
|
+
- **Very long X-axis** (60+ ticks): rotate labels OR aggregate (week vs day).
|
|
203
|
+
- **Mixed scale** (e.g., revenue in won, count in units): use dual axis (Recharts `<YAxis yAxisId="right">`).
|
|
204
|
+
- **Color-blind users**: redundant encoding — series color + line style (solid / dashed / dotted) + point shape (circle / square / triangle).
|
|
205
|
+
- **RTL**: Recharts handles axis direction via `reverse` prop.
|
|
206
|
+
- **Reduced motion**: disable Recharts default animations (`isAnimationActive={false}`).
|
|
207
|
+
- **Dark mode**: tokens cascade; verify chart bg, gridlines, tooltip remain visible.
|
|
208
|
+
|
|
209
|
+
## Performance
|
|
210
|
+
|
|
211
|
+
- For large datasets (10K+ points): consider downsampling or windowing.
|
|
212
|
+
- Recharts uses SVG; very large charts may slow. Canvas-based engines (Visx, Plot) faster.
|
|
213
|
+
- Avoid re-rendering the whole chart on every state change; memoize data transforms.
|
|
214
|
+
|
|
215
|
+
## Don't
|
|
216
|
+
|
|
217
|
+
- Don't use Western color convention for Korean stock charts. Red=up.
|
|
218
|
+
- Don't use 5+ series in one line/bar chart — visual noise. Split or aggregate.
|
|
219
|
+
- Don't omit data table alternative for screen reader users.
|
|
220
|
+
- Don't rely on color alone for series differentiation.
|
|
221
|
+
- Don't auto-animate every render — disorienting; use only on initial draw.
|
|
222
|
+
- Don't put title inside the chart (use Card / heading above) — better legibility.
|
|
223
|
+
- Don't crop axis to make small differences look big — misleading. Start at 0 unless explicitly justified.
|
|
224
|
+
|
|
225
|
+
## References
|
|
226
|
+
|
|
227
|
+
- shadcn-ui: [`chart`](../refs/shadcn-ui/apps/v4/registry/new-york-v4/ui/chart.tsx) (Recharts wrapper)
|
|
228
|
+
- Recharts: <https://recharts.org/>
|
|
229
|
+
- Edward Tufte's *The Visual Display of Quantitative Information* — chart design fundamentals
|
|
230
|
+
|
|
231
|
+
## Cross-reference
|
|
232
|
+
|
|
233
|
+
- [`examples/component-stock-chart.md`](component-stock-chart.md) — KR stock convention specifics
|
|
234
|
+
- [`knowledge/patterns/chart-types.md`](../knowledge/patterns/chart-types.md) — chart-type selection
|
|
235
|
+
- [`knowledge/patterns/chart-color-encoding.md`](../knowledge/patterns/chart-color-encoding.md) — color encoding
|
|
236
|
+
- [`knowledge/patterns/dashboard-composition.md`](../knowledge/patterns/dashboard-composition.md) — dashboard layout
|
|
237
|
+
- [`examples/component-statistic.md`](component-statistic.md) — single-value alternative
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
<!-- hand-written -->
|
|
2
|
+
# `ChatInterface` (custom — generic chat UI for chatbot / AI / live agent) — spec
|
|
3
|
+
|
|
4
|
+
> Reusable chat shell for chatbots, AI chat (LLM), and live customer support. Handles message rendering (markdown, code, attachments), streaming, suggested chips, typing indicators, and Korean conversational conventions. Pairs with [`knowledge/conversational/chatbot-design.md`](../knowledge/conversational/chatbot-design.md) and [`knowledge/conversational/ai-chat-interfaces.md`](../knowledge/conversational/ai-chat-interfaces.md).
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
Chat UIs are similar across products — chatbot, AI chat, live support — but differ in details. `ChatInterface` provides:
|
|
9
|
+
1. **Message list** with virtualization for long histories.
|
|
10
|
+
2. **Bot / user / agent** message styling.
|
|
11
|
+
3. **Markdown rendering** (for AI / rich bot messages).
|
|
12
|
+
4. **Streaming response** support.
|
|
13
|
+
5. **Suggested chips** (quick replies).
|
|
14
|
+
6. **Typing indicator**.
|
|
15
|
+
7. **Attachment** support.
|
|
16
|
+
8. **Korean voice conventions** baked in.
|
|
17
|
+
|
|
18
|
+
## Anatomy
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
┌──────────────────────────────────┐
|
|
22
|
+
│ [avatar] Brand Bot [×] │ ← header
|
|
23
|
+
├──────────────────────────────────┤
|
|
24
|
+
│ │
|
|
25
|
+
│ [Bot bubble] │
|
|
26
|
+
│ 안녕하세요! 무엇을 도와드릴까요? │
|
|
27
|
+
│ ▼ │
|
|
28
|
+
│ [상품 문의] [배송] [기타] │ ← suggested chips
|
|
29
|
+
│ │
|
|
30
|
+
│ │
|
|
31
|
+
│ User bubble [▶] │
|
|
32
|
+
│ 배송 언제 와요? │
|
|
33
|
+
│ │
|
|
34
|
+
│ [Bot typing...] │ ← typing indicator
|
|
35
|
+
│ │
|
|
36
|
+
├──────────────────────────────────┤
|
|
37
|
+
│ [📎] [Type a message...] [▶] │ ← input
|
|
38
|
+
└──────────────────────────────────┘
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## API
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
<ChatInterface
|
|
45
|
+
messages={messages}
|
|
46
|
+
onSend={handleSend}
|
|
47
|
+
agentName="Aera Bot"
|
|
48
|
+
agentAvatar="/avatar.png"
|
|
49
|
+
variant="ai" // "chatbot" | "ai" | "live-agent"
|
|
50
|
+
isTyping={isTyping}
|
|
51
|
+
isStreaming={isStreaming}
|
|
52
|
+
suggestions={suggestedChips}
|
|
53
|
+
onSuggestionClick={handleSuggestion}
|
|
54
|
+
attachments
|
|
55
|
+
voice // enable voice input
|
|
56
|
+
locale="ko-KR"
|
|
57
|
+
honorificLevel="해요체" // "합쇼체" | "해요체"
|
|
58
|
+
/>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
| Prop | Type | Default | Description |
|
|
62
|
+
| --- | --- | --- | --- |
|
|
63
|
+
| `messages` | `Message[]` | `[]` | Conversation history |
|
|
64
|
+
| `onSend` | `(text: string, attachments?: File[]) => void` | — | Send handler |
|
|
65
|
+
| `agentName` | `string` | — | Display name (Bot / Agent name) |
|
|
66
|
+
| `agentAvatar` | `string` | — | Avatar URL |
|
|
67
|
+
| `variant` | `"chatbot" \| "ai" \| "live-agent"` | `"chatbot"` | Visual style preset |
|
|
68
|
+
| `isTyping` | `boolean` | `false` | Show typing indicator |
|
|
69
|
+
| `isStreaming` | `boolean` | `false` | Last message is streaming (cursor + stop button) |
|
|
70
|
+
| `onStop` | `() => void` | — | Stop streaming |
|
|
71
|
+
| `suggestions` | `Suggestion[]` | `[]` | Quick-reply chips |
|
|
72
|
+
| `onSuggestionClick` | `(s) => void` | — | Chip handler |
|
|
73
|
+
| `attachments` | `boolean` | `false` | Allow file / image attachment |
|
|
74
|
+
| `voice` | `boolean` | `false` | Show voice input button |
|
|
75
|
+
| `locale` | `string` | `"ko-KR"` | For date formatting + Korean rendering |
|
|
76
|
+
| `honorificLevel` | `"합쇼체" \| "해요체"` | `"해요체"` | Affects placeholder text |
|
|
77
|
+
| `inputPlaceholder` | `string` | locale default | Override input placeholder |
|
|
78
|
+
| `maxLength` | `number` | `4000` | Input character limit |
|
|
79
|
+
| `disabled` | `boolean` | `false` | Disable input (e.g., closed conversation) |
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
type Message = {
|
|
83
|
+
id: string;
|
|
84
|
+
role: "user" | "bot" | "agent" | "system";
|
|
85
|
+
content: string | RichContent;
|
|
86
|
+
timestamp: number;
|
|
87
|
+
attachments?: Attachment[];
|
|
88
|
+
status?: "sending" | "sent" | "failed" | "streaming";
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
type RichContent = {
|
|
92
|
+
text?: string;
|
|
93
|
+
markdown?: string; // rendered with markdown
|
|
94
|
+
card?: CardData; // structured card
|
|
95
|
+
carousel?: CardData[]; // multi-card carousel
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
type Suggestion = { id: string; label: string };
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Variants
|
|
102
|
+
|
|
103
|
+
### `chatbot`
|
|
104
|
+
|
|
105
|
+
Standard chatbot — friendly, branded, button-driven.
|
|
106
|
+
- Bot avatar visible.
|
|
107
|
+
- Suggested chips heavy.
|
|
108
|
+
- Markdown light or off.
|
|
109
|
+
- Typing indicator.
|
|
110
|
+
|
|
111
|
+
### `ai`
|
|
112
|
+
|
|
113
|
+
AI chat (LLM-based) — long-form, streamed, markdown-rich.
|
|
114
|
+
- No bot avatar OR minimal.
|
|
115
|
+
- Markdown / code blocks rendered.
|
|
116
|
+
- Streaming with cursor.
|
|
117
|
+
- Stop / regenerate / copy controls.
|
|
118
|
+
- Sidebar history (separate component).
|
|
119
|
+
|
|
120
|
+
### `live-agent`
|
|
121
|
+
|
|
122
|
+
Live support — human on the other side.
|
|
123
|
+
- Agent name + photo.
|
|
124
|
+
- Read receipts.
|
|
125
|
+
- Attachments common.
|
|
126
|
+
- Typing indicator.
|
|
127
|
+
- "Agent left the chat" state.
|
|
128
|
+
|
|
129
|
+
## States
|
|
130
|
+
|
|
131
|
+
| State | Visual |
|
|
132
|
+
| --- | --- |
|
|
133
|
+
| Empty (first time) | Greeting from bot + suggested chips |
|
|
134
|
+
| Active conversation | Messages stacked; latest at bottom |
|
|
135
|
+
| User typing | Input field active |
|
|
136
|
+
| Bot processing | Typing indicator (dots animation) |
|
|
137
|
+
| Streaming response | Last bot bubble grows; cursor at end; "Stop" button |
|
|
138
|
+
| Send failed | "Failed to send. Retry" on user message |
|
|
139
|
+
| Disabled | Input grayed out |
|
|
140
|
+
| End of conversation | Banner: "Chat ended" |
|
|
141
|
+
|
|
142
|
+
## Tokens consumed
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
--chat-bg (background)
|
|
146
|
+
--chat-bubble-bot-bg (bot bubble)
|
|
147
|
+
--chat-bubble-bot-fg (bot text)
|
|
148
|
+
--chat-bubble-user-bg (user bubble — typically brand color)
|
|
149
|
+
--chat-bubble-user-fg (user text)
|
|
150
|
+
--chat-bubble-agent-bg (live agent bubble)
|
|
151
|
+
--chat-input-bg (input field)
|
|
152
|
+
--chat-input-fg (input text)
|
|
153
|
+
--chat-suggestion-bg (chip bg)
|
|
154
|
+
--chat-suggestion-bg-hover
|
|
155
|
+
--chat-divider (separators)
|
|
156
|
+
--chat-timestamp-fg (small timestamps)
|
|
157
|
+
--chat-typing-dot-color
|
|
158
|
+
--space-xs, --space-sm, --space-md
|
|
159
|
+
--radius-md, --radius-lg
|
|
160
|
+
--font-size-base, --font-size-sm
|
|
161
|
+
--motion-fast, --motion-medium
|
|
162
|
+
--ease-out
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Message rendering
|
|
166
|
+
|
|
167
|
+
### Plain text
|
|
168
|
+
|
|
169
|
+
```tsx
|
|
170
|
+
<MessageBubble role="bot">
|
|
171
|
+
<p>안녕하세요! 무엇을 도와드릴까요?</p>
|
|
172
|
+
</MessageBubble>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Markdown (AI variant)
|
|
176
|
+
|
|
177
|
+
```tsx
|
|
178
|
+
<MessageBubble role="bot">
|
|
179
|
+
<Markdown>
|
|
180
|
+
{`Here's how to fix it:
|
|
181
|
+
|
|
182
|
+
1. First, install the package
|
|
183
|
+
2. Then run \`npm start\`
|
|
184
|
+
|
|
185
|
+
\`\`\`js
|
|
186
|
+
const x = 5;
|
|
187
|
+
\`\`\`
|
|
188
|
+
`}
|
|
189
|
+
</Markdown>
|
|
190
|
+
</MessageBubble>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Renders headings, lists, bold, code blocks (syntax highlighted, copy button), links, tables.
|
|
194
|
+
|
|
195
|
+
### Card
|
|
196
|
+
|
|
197
|
+
```tsx
|
|
198
|
+
<MessageBubble role="bot">
|
|
199
|
+
<ChatCard
|
|
200
|
+
image="/product.jpg"
|
|
201
|
+
title="Product Name"
|
|
202
|
+
subtitle="Description"
|
|
203
|
+
price="₩50,000"
|
|
204
|
+
actions={[
|
|
205
|
+
{ label: "Buy", action: handleBuy },
|
|
206
|
+
{ label: "Details", action: handleDetails },
|
|
207
|
+
]}
|
|
208
|
+
/>
|
|
209
|
+
</MessageBubble>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Carousel
|
|
213
|
+
|
|
214
|
+
```tsx
|
|
215
|
+
<MessageBubble role="bot">
|
|
216
|
+
<ChatCarousel cards={cards} />
|
|
217
|
+
</MessageBubble>
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Horizontal scroll on mobile; arrow buttons on desktop.
|
|
221
|
+
|
|
222
|
+
### Streaming
|
|
223
|
+
|
|
224
|
+
```tsx
|
|
225
|
+
<MessageBubble role="bot" status="streaming">
|
|
226
|
+
<Markdown stream>
|
|
227
|
+
{streamingContent}
|
|
228
|
+
</Markdown>
|
|
229
|
+
<StreamCursor />
|
|
230
|
+
</MessageBubble>
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Renders incrementally. Append tokens to `streamingContent`.
|
|
234
|
+
|
|
235
|
+
## Suggested chips
|
|
236
|
+
|
|
237
|
+
```tsx
|
|
238
|
+
<Suggestions>
|
|
239
|
+
{suggestions.map(s => (
|
|
240
|
+
<Suggestion key={s.id} onClick={() => onSuggestionClick(s)}>
|
|
241
|
+
{s.label}
|
|
242
|
+
</Suggestion>
|
|
243
|
+
))}
|
|
244
|
+
</Suggestions>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Rules:
|
|
248
|
+
- 3-5 chips max.
|
|
249
|
+
- Clear under last bot message.
|
|
250
|
+
- Disappear after user sends a message (or shortly after).
|
|
251
|
+
- Korean copy: short ("배송 문의" not "배송에 대해 문의하기").
|
|
252
|
+
|
|
253
|
+
## Typing indicator
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
●○○ (dot animation)
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Standard 3-dot loop:
|
|
260
|
+
- 200ms per cycle.
|
|
261
|
+
- Three dots fade in sequence.
|
|
262
|
+
- Position: under bot avatar / left side.
|
|
263
|
+
- Hide when message arrives.
|
|
264
|
+
|
|
265
|
+
## Input
|
|
266
|
+
|
|
267
|
+
```tsx
|
|
268
|
+
<ChatInput
|
|
269
|
+
value={input}
|
|
270
|
+
onChange={setInput}
|
|
271
|
+
onSend={handleSend}
|
|
272
|
+
placeholder={inputPlaceholder ?? "메시지를 입력해 주세요..."}
|
|
273
|
+
attachments={attachments}
|
|
274
|
+
onAttach={handleAttach}
|
|
275
|
+
voice={voice}
|
|
276
|
+
onVoice={handleVoice}
|
|
277
|
+
maxLength={4000}
|
|
278
|
+
disabled={disabled}
|
|
279
|
+
multiline
|
|
280
|
+
/>
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Behavior:
|
|
284
|
+
- Enter sends; Shift+Enter newline.
|
|
285
|
+
- Auto-grow up to 5 lines, then scroll.
|
|
286
|
+
- Char counter visible if > 80% of max.
|
|
287
|
+
- Voice button replaces send when input empty (some patterns).
|
|
288
|
+
|
|
289
|
+
For Korean IME: handle composition events properly. Don't send mid-composition (handle `compositionstart` / `compositionend`).
|
|
290
|
+
|
|
291
|
+
## Attachments
|
|
292
|
+
|
|
293
|
+
```tsx
|
|
294
|
+
<AttachmentPreview
|
|
295
|
+
files={pendingAttachments}
|
|
296
|
+
onRemove={handleRemove}
|
|
297
|
+
/>
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Above input field, show pending attachments as chips with thumbnail. Remove via X button.
|
|
301
|
+
|
|
302
|
+
Inside messages: render image inline; PDF / file as card with icon.
|
|
303
|
+
|
|
304
|
+
## Accessibility
|
|
305
|
+
|
|
306
|
+
- **Live region** for new messages: `<div role="log" aria-live="polite">`.
|
|
307
|
+
- **Per-message labels**: `<article role="group" aria-labelledby="msg-id-author">`.
|
|
308
|
+
- **Send button**: `aria-label="메시지 전송"`.
|
|
309
|
+
- **Suggestion chips**: focusable, Enter to activate.
|
|
310
|
+
- **Stop streaming button**: focusable, Esc shortcut.
|
|
311
|
+
- **Read aloud option** for users who prefer voice (TTS button per message).
|
|
312
|
+
- **Adjustable text size** via parent (chat respects body font scaling).
|
|
313
|
+
- **Color contrast**: bot vs user bubbles meet WCAG AA against bg.
|
|
314
|
+
|
|
315
|
+
## Implementation hints
|
|
316
|
+
|
|
317
|
+
```tsx
|
|
318
|
+
function ChatInterface({ messages, onSend, isTyping, isStreaming, ... }: Props) {
|
|
319
|
+
const listRef = useRef<HTMLDivElement>(null);
|
|
320
|
+
|
|
321
|
+
// Auto-scroll on new message
|
|
322
|
+
useEffect(() => {
|
|
323
|
+
if (!listRef.current) return;
|
|
324
|
+
listRef.current.scrollTop = listRef.current.scrollHeight;
|
|
325
|
+
}, [messages.length]);
|
|
326
|
+
|
|
327
|
+
return (
|
|
328
|
+
<div className="chat-interface" data-variant={variant}>
|
|
329
|
+
<ChatHeader name={agentName} avatar={agentAvatar} />
|
|
330
|
+
<div ref={listRef} className="chat-list" role="log" aria-live="polite">
|
|
331
|
+
{messages.map(m => (
|
|
332
|
+
<MessageBubble key={m.id} message={m} variant={variant} />
|
|
333
|
+
))}
|
|
334
|
+
{isTyping && <TypingIndicator />}
|
|
335
|
+
</div>
|
|
336
|
+
{suggestions.length > 0 && (
|
|
337
|
+
<Suggestions suggestions={suggestions} onClick={onSuggestionClick} />
|
|
338
|
+
)}
|
|
339
|
+
<ChatInput
|
|
340
|
+
onSend={onSend}
|
|
341
|
+
placeholder={inputPlaceholder}
|
|
342
|
+
disabled={disabled || isStreaming}
|
|
343
|
+
// ...
|
|
344
|
+
/>
|
|
345
|
+
{isStreaming && <StopButton onClick={onStop} />}
|
|
346
|
+
</div>
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
## Korean conventions
|
|
352
|
+
|
|
353
|
+
| Aspect | Default |
|
|
354
|
+
| --- | --- |
|
|
355
|
+
| Greeting | "안녕하세요! 무엇을 도와드릴까요?" |
|
|
356
|
+
| User addressing | "고객님" or "[username]님" |
|
|
357
|
+
| Honorific level | 해요체 default |
|
|
358
|
+
| Input placeholder | "메시지를 입력해 주세요..." |
|
|
359
|
+
| Send button label | "전송" or icon ▶ |
|
|
360
|
+
| Attach button | "파일 첨부" |
|
|
361
|
+
| Voice button | "음성으로 입력" |
|
|
362
|
+
| Stop button | "중지" |
|
|
363
|
+
| Typing indicator label | "[bot name]이(가) 입력 중..." |
|
|
364
|
+
| Failed send | "전송 실패. 다시 시도하시겠어요?" |
|
|
365
|
+
|
|
366
|
+
For Korean IME: don't trigger send on Enter while composition is active (Hangul composition mid-character). Listen to `compositionend` to allow send.
|
|
367
|
+
|
|
368
|
+
## Edge cases
|
|
369
|
+
|
|
370
|
+
- **Very long message history**: virtualize (react-window). Don't render 10,000 messages in DOM.
|
|
371
|
+
- **Network failure mid-send**: optimistic UI; show "Failed" with retry on user bubble.
|
|
372
|
+
- **Streaming canceled**: trim to last delivered token; show "stopped" indicator.
|
|
373
|
+
- **Switching between bot ↔ human**: visual transition (banner: "Connecting to agent..." → agent name appears).
|
|
374
|
+
- **Conversation timeout / agent left**: banner; input disabled with explanation.
|
|
375
|
+
- **Multiple attachments**: show as chip row above input.
|
|
376
|
+
- **Message reactions** (thumbs up/down on AI responses): inline icons.
|
|
377
|
+
- **Edit message** (AI variant — edit user's prior message regenerates everything after): warning + confirm.
|
|
378
|
+
- **Korean IME composition**: handle properly, don't double-send.
|
|
379
|
+
- **RTL languages**: layout flips; bubbles align right for LTR / left for RTL.
|
|
380
|
+
|
|
381
|
+
## Don't
|
|
382
|
+
|
|
383
|
+
- Don't render raw markdown for AI variant. Render it.
|
|
384
|
+
- Don't auto-scroll if user has scrolled up (let them read history).
|
|
385
|
+
- Don't disable copy. Users want to copy AI responses.
|
|
386
|
+
- Don't ignore Korean IME. Composition events matter.
|
|
387
|
+
- Don't show typing indicator for > 30 seconds. Show error if backend stuck.
|
|
388
|
+
- Don't lose user's draft on accidental close. Persist locally.
|
|
389
|
+
- Don't render inline scripts in markdown. Sanitize.
|
|
390
|
+
- Don't ship without keyboard shortcuts (desktop).
|
|
391
|
+
|
|
392
|
+
## Cross-reference
|
|
393
|
+
|
|
394
|
+
- [`knowledge/conversational/chatbot-design.md`](../knowledge/conversational/chatbot-design.md) — chatbot patterns
|
|
395
|
+
- [`knowledge/conversational/ai-chat-interfaces.md`](../knowledge/conversational/ai-chat-interfaces.md) — AI chat
|
|
396
|
+
- [`knowledge/conversational/conversational-ui-fundamentals.md`](../knowledge/conversational/conversational-ui-fundamentals.md) — fundamentals
|
|
397
|
+
- [`knowledge/conversational/korean-voice-conventions.md`](../knowledge/conversational/korean-voice-conventions.md) — KR
|
|
398
|
+
- [`examples/component-voice-input.md`](component-voice-input.md) — voice input
|
|
399
|
+
- [`knowledge/i18n/korean-typography.md`](../knowledge/i18n/korean-typography.md) — Hangul + IME
|