@conscience-technology/ovenn 0.6.7 → 0.7.2
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/assets/components/AIMessage/AIMessage.module.css +23 -1
- package/assets/components/AIMessage/AIMessage.tsx +27 -7
- package/assets/components/Accordion/Accordion.module.css +3 -0
- package/assets/components/AppFrame/AppFrame.module.css +2 -0
- package/assets/components/AttachmentItem/AttachmentItem.module.css +50 -13
- package/assets/components/AttachmentItem/AttachmentItem.tsx +25 -8
- package/assets/components/AttachmentThumb/AttachmentThumb.module.css +12 -9
- package/assets/components/Avatar/Avatar.module.css +26 -11
- package/assets/components/Avatar/Avatar.tsx +1 -1
- package/assets/components/AvatarUpload/AvatarUpload.module.css +4 -3
- package/assets/components/Badge/Badge.module.css +96 -70
- package/assets/components/Badge/Badge.tsx +33 -25
- package/assets/components/Breadcrumb/Breadcrumb.module.css +8 -4
- package/assets/components/Breadcrumb/Breadcrumb.tsx +1 -1
- package/assets/components/Bubble/Bubble.module.css +6 -0
- package/assets/components/Button/Button.module.css +6 -0
- package/assets/components/Calendar/Calendar.module.css +244 -0
- package/assets/components/Calendar/Calendar.tsx +419 -0
- package/assets/components/Calendar/index.ts +2 -0
- package/assets/components/Callout/Callout.module.css +54 -7
- package/assets/components/Callout/Callout.tsx +26 -2
- package/assets/components/Callout/index.ts +1 -1
- package/assets/components/Canvas/Canvas.module.css +75 -0
- package/assets/components/Canvas/Canvas.tsx +699 -0
- package/assets/components/Canvas/alignment.ts +34 -0
- package/assets/components/Canvas/clipboard.ts +30 -0
- package/assets/components/Canvas/collision.ts +67 -0
- package/assets/components/Canvas/edgeOptions.ts +11 -0
- package/assets/components/Canvas/graph.ts +11 -0
- package/assets/components/Canvas/history.ts +41 -0
- package/assets/components/Canvas/index.ts +4 -0
- package/assets/components/Canvas/selection.ts +56 -0
- package/assets/components/Canvas/tokens.css +61 -0
- package/assets/components/Canvas/types.ts +27 -0
- package/assets/components/Canvas/useCanvasSettlement.ts +79 -0
- package/assets/components/CanvasEdge/CanvasEdge.module.css +62 -0
- package/assets/components/CanvasEdge/CanvasEdge.tsx +121 -0
- package/assets/components/CanvasEdge/geometry.ts +350 -0
- package/assets/components/CanvasEdge/index.ts +4 -0
- package/assets/components/CanvasEdge/interactions.ts +14 -0
- package/assets/components/CanvasEdge/tokens.css +29 -0
- package/assets/components/CanvasNode/CanvasNode.module.css +234 -30
- package/assets/components/CanvasNode/CanvasNode.tsx +95 -28
- package/assets/components/CanvasNode/index.ts +1 -1
- package/assets/components/CanvasNode/runningOutline.ts +59 -0
- package/assets/components/CanvasNode/tokens.css +76 -13
- package/assets/components/Card/Card.module.css +5 -0
- package/assets/components/Chart/Chart.module.css +278 -0
- package/assets/components/Chart/Chart.tsx +385 -0
- package/assets/components/Chart/entrance.tsx +57 -0
- package/assets/components/Chart/index.ts +14 -0
- package/assets/components/ChatComposer/ChatComposer.module.css +17 -0
- package/assets/components/ChatComposer/ChatComposer.tsx +131 -0
- package/assets/components/ChatComposer/index.ts +2 -0
- package/assets/components/ChatInput/ChatInput.module.css +197 -30
- package/assets/components/ChatInput/ChatInput.tsx +137 -45
- package/assets/components/ChatInput/SendButton.tsx +4 -1
- package/assets/components/ChatInput/index.ts +5 -0
- package/assets/components/ChatMessage/ChatMessage.module.css +19 -0
- package/assets/components/ChatMessage/ChatMessage.tsx +63 -0
- package/assets/components/ChatMessage/index.ts +2 -0
- package/assets/components/ChatReactions/ChatReactions.module.css +15 -0
- package/assets/components/ChatReactions/ChatReactions.tsx +58 -0
- package/assets/components/ChatReactions/index.ts +2 -0
- package/assets/components/Checkbox/Checkbox.module.css +39 -0
- package/assets/components/Checkbox/Checkbox.tsx +99 -14
- package/assets/components/Checkbox/index.ts +1 -1
- package/assets/components/CheckboxCard/CheckboxCard.module.css +1 -177
- package/assets/components/CheckboxCard/CheckboxCard.tsx +6 -72
- package/assets/components/Chip/Chip.module.css +20 -30
- package/assets/components/Code/Code.module.css +1 -0
- package/assets/components/CodeBlock/CodeBlock.module.css +113 -13
- package/assets/components/CodeBlock/CodeBlock.tsx +114 -29
- package/assets/components/CodeBlock/SyntaxHighlight.tsx +20 -0
- package/assets/components/CodeBlock/diff-lines.ts +21 -0
- package/assets/components/CodeBlock/index.ts +2 -1
- package/assets/components/CodeBlock/line-preview.ts +7 -0
- package/assets/components/CodeBlock/syntax-highlighter.ts +96 -0
- package/assets/components/CodeBlock/use-syntax-tokens.ts +17 -0
- package/assets/components/ColorArea/ColorArea.module.css +3 -0
- package/assets/components/ColorField/ColorField.module.css +19 -190
- package/assets/components/ColorField/ColorField.tsx +116 -107
- package/assets/components/ColorPicker/ColorPicker.module.css +310 -0
- package/assets/components/ColorPicker/ColorPicker.tsx +387 -0
- package/assets/components/ColorPicker/index.ts +16 -0
- package/assets/components/ColorSlider/ColorSlider.module.css +15 -12
- package/assets/components/ColorSlider/ColorSlider.tsx +3 -3
- package/assets/components/ColorSwatch/ColorSwatch.module.css +2 -2
- package/assets/components/ColorSwatchPicker/ColorSwatchPicker.module.css +4 -3
- package/assets/components/Combobox/Combobox.module.css +21 -4
- package/assets/components/Combobox/Combobox.tsx +38 -22
- package/assets/components/CommandPalette/CommandPalette.module.css +19 -24
- package/assets/components/CommandPalette/CommandPalette.tsx +7 -5
- package/assets/components/Comment/Comment.module.css +25 -0
- package/assets/components/Comment/Comment.tsx +44 -0
- package/assets/components/Comment/CommentComposer.module.css +26 -0
- package/assets/components/Comment/CommentComposer.tsx +56 -0
- package/assets/components/Comment/CommentEditor.module.css +8 -0
- package/assets/components/Comment/CommentEditor.tsx +43 -0
- package/assets/components/Comment/CommentMentionInput.module.css +9 -0
- package/assets/components/Comment/CommentMentionInput.tsx +150 -0
- package/assets/components/Comment/index.ts +9 -0
- package/assets/components/Comment/types.ts +1 -0
- package/assets/components/ContextMenu/ContextMenu.module.css +5 -2
- package/assets/components/ContextMenu/ContextMenu.tsx +5 -0
- package/assets/components/ControlGroup/ControlGroup.module.css +20 -7
- package/assets/components/DataTable/DataTable.module.css +2 -0
- package/assets/components/DatePicker/DateField.tsx +72 -25
- package/assets/components/DatePicker/DatePicker.module.css +56 -54
- package/assets/components/DatePicker/DatePicker.tsx +86 -40
- package/assets/components/DatePicker/TimeSelector.tsx +1 -1
- package/assets/components/Disclosure/Disclosure.module.css +1 -0
- package/assets/components/Drawer/Drawer.module.css +23 -19
- package/assets/components/Drawer/Drawer.tsx +20 -24
- package/assets/components/DropdownMenu/DropdownMenu.tsx +5 -0
- package/assets/components/EmojiPicker/EmojiGlyph.module.css +2 -0
- package/assets/components/EmojiPicker/EmojiGlyph.tsx +12 -0
- package/assets/components/EmojiPicker/EmojiPicker.module.css +43 -0
- package/assets/components/EmojiPicker/EmojiPicker.tsx +143 -0
- package/assets/components/EmojiPicker/UNICODE-LICENSE.txt +39 -0
- package/assets/components/EmojiPicker/data.ts +41 -0
- package/assets/components/EmojiPicker/emojiData-0.json +1 -0
- package/assets/components/EmojiPicker/emojiData-1.json +1 -0
- package/assets/components/EmojiPicker/emojiData-2.json +1 -0
- package/assets/components/EmojiPicker/emojiData-3.json +1 -0
- package/assets/components/EmojiPicker/emojiData.sources.json +35 -0
- package/assets/components/EmojiPicker/emojiData.ts +8 -0
- package/assets/components/EmojiPicker/emojiFallbacks.json +1 -0
- package/assets/components/EmojiPicker/index.ts +4 -0
- package/assets/components/EmptyState/EmptyState.module.css +2 -2
- package/assets/components/EventChip/EventChip.module.css +120 -53
- package/assets/components/EventChip/EventChip.tsx +54 -6
- package/assets/components/EventChip/index.ts +1 -1
- package/assets/components/EventListItem/EventListItem.module.css +3 -0
- package/assets/components/EventListItem/EventListItem.tsx +15 -8
- package/assets/components/FileIcon/FileIcon.module.css +6 -6
- package/assets/components/FileUpload/FileUpload.module.css +10 -3
- package/assets/components/FileUpload/FileUpload.tsx +5 -9
- package/assets/components/FileUpload/FileUploadItem.tsx +34 -0
- package/assets/components/GalleryItem/GalleryItem.module.css +16 -19
- package/assets/components/GeneratedImage/GeneratedImage.module.css +2 -0
- package/assets/components/Icon/Icon.tsx +264 -1088
- package/assets/components/Icon/LucideFamilyIcon.tsx +436 -0
- package/assets/components/Icon/MissingIcon.tsx +25 -0
- package/assets/components/Icon/SolarFamilyIcon.tsx +443 -0
- package/assets/components/Icon/catalogNames.ts +8 -0
- package/assets/components/Icon/context.tsx +1 -1
- package/assets/components/Icon/index.ts +2 -0
- package/assets/components/Icon/lucideCatalog.ts +11358 -0
- package/assets/components/Icon/phosphorCatalog.ts +3052 -0
- package/assets/components/Icon/solarCatalog.ts +16064 -0
- package/assets/components/IconButton/IconButton.module.css +3 -2
- package/assets/components/Input/Input.module.css +63 -22
- package/assets/components/Input/Input.tsx +21 -10
- package/assets/components/Kanban/Kanban.module.css +6 -0
- package/assets/components/ListItem/ListItem.module.css +9 -6
- package/assets/components/MenuItem/MenuItem.module.css +24 -22
- package/assets/components/MenuItem/MenuItem.tsx +12 -12
- package/assets/components/MessageActions/MessageActions.module.css +38 -2
- package/assets/components/MessageActions/MessageActions.tsx +53 -28
- package/assets/components/MessageQuote/MessageQuote.module.css +1 -0
- package/assets/components/MessageSources/MessageSources.module.css +2 -0
- package/assets/components/MessageState/MessageState.module.css +1 -1
- package/assets/components/MetricCard/MetricCard.module.css +96 -108
- package/assets/components/MetricCard/MetricCard.tsx +45 -23
- package/assets/components/MetricCard/tokens.css +10 -0
- package/assets/components/MiniCalendar/MiniCalendar.module.css +130 -0
- package/assets/components/MiniCalendar/MiniCalendar.tsx +161 -0
- package/assets/components/MiniCalendar/index.ts +2 -0
- package/assets/components/Modal/Modal.module.css +13 -4
- package/assets/components/Modal/Modal.tsx +4 -0
- package/assets/components/Onboarding/LayoutBuilder.tsx +12 -50
- package/assets/components/Onboarding/Onboarding.module.css +211 -278
- package/assets/components/Onboarding/OnboardingAxisPanel.tsx +81 -125
- package/assets/components/Onboarding/OnboardingPage.tsx +244 -467
- package/assets/components/Onboarding/actions.ts +5 -0
- package/assets/components/Onboarding/palette.css +8 -0
- package/assets/components/Onboarding/wizardData.ts +8 -8
- package/assets/components/ProgressBar/ProgressBar.module.css +42 -8
- package/assets/components/ProgressBar/ProgressBar.tsx +5 -6
- package/assets/components/ProgressBar/index.ts +0 -1
- package/assets/components/QuotationBar/QuotationBar.module.css +2 -0
- package/assets/components/Radio/Radio.module.css +2 -0
- package/assets/components/RadioCard/RadioCard.module.css +96 -3
- package/assets/components/RadioCard/RadioCard.tsx +76 -13
- package/assets/components/RadioCard/index.ts +1 -1
- package/assets/components/SegmentedChart/SegmentedChart.module.css +16 -0
- package/assets/components/SegmentedChart/SegmentedChart.tsx +25 -8
- package/assets/components/Select/Select.module.css +9 -7
- package/assets/components/Select/Select.tsx +22 -6
- package/assets/components/Shortcut/Shortcut.module.css +2 -0
- package/assets/components/Sidebar/Sidebar.module.css +1 -0
- package/assets/components/Sidebar/Sidebar.tsx +2 -2
- package/assets/components/Skeleton/Skeleton.module.css +33 -0
- package/assets/components/Skeleton/Skeleton.tsx +20 -0
- package/assets/components/Skeleton/index.ts +2 -0
- package/assets/components/Skeleton/tokens.css +11 -0
- package/assets/components/Slider/Slider.module.css +3 -0
- package/assets/components/Slider/Slider.tsx +7 -2
- package/assets/components/Spinner/LottiePlayer.tsx +4 -4
- package/assets/components/Spinner/Spinner.module.css +3 -0
- package/assets/components/Spinner/lottieManifest.ts +3 -0
- package/assets/components/Stepper/Stepper.module.css +56 -8
- package/assets/components/Stepper/Stepper.tsx +13 -4
- package/assets/components/Switch/Switch.module.css +55 -42
- package/assets/components/Switch/Switch.tsx +6 -2
- package/assets/components/Switch/index.ts +1 -1
- package/assets/components/TabStrip/TabStrip.module.css +5 -1
- package/assets/components/TableCell/TableCell.module.css +8 -1
- package/assets/components/TableCell/TableCellBadge.tsx +7 -3
- package/assets/components/TableCell/TableCellImage.tsx +1 -1
- package/assets/components/TableCell/TableCellTag.tsx +23 -0
- package/assets/components/TableCell/index.ts +3 -0
- package/assets/components/TableHeader/TableHeader.module.css +4 -0
- package/assets/components/TableRow/TableRow.module.css +3 -0
- package/assets/components/TableRowEdit/TableRowEdit.module.css +2 -0
- package/assets/components/TableToolbar/TableToolbar.module.css +1 -0
- package/assets/components/Tabs/Tabs.module.css +23 -8
- package/assets/components/Tabs/Tabs.tsx +4 -3
- package/assets/components/Tag/Tag.module.css +101 -0
- package/assets/components/Tag/Tag.tsx +55 -0
- package/assets/components/Tag/index.ts +2 -0
- package/assets/components/TemplateBoundary/TemplateBoundary.tsx +22 -18
- package/assets/components/TemplateBoundary/types.ts +2 -0
- package/assets/components/Textarea/Textarea.module.css +30 -226
- package/assets/components/Textarea/Textarea.tsx +2 -2
- package/assets/components/ThemeController.tsx +30 -3
- package/assets/components/TimePicker/TimePicker.module.css +17 -4
- package/assets/components/TimePicker/TimePicker.tsx +102 -23
- package/assets/components/TimelineView/TimelineEventBar.tsx +109 -0
- package/assets/components/TimelineView/TimelineView.module.css +203 -0
- package/assets/components/TimelineView/TimelineView.tsx +137 -0
- package/assets/components/TimelineView/axis.ts +62 -0
- package/assets/components/TimelineView/index.ts +3 -0
- package/assets/components/TimelineView/layout.ts +56 -0
- package/assets/components/TimelineView/move.ts +51 -0
- package/assets/components/TimelineView/useTimelineDrag.ts +215 -0
- package/assets/components/TimelineView/useTimelineZoom.ts +92 -0
- package/assets/components/Toast/Toast.module.css +20 -0
- package/assets/components/Toast/Toast.tsx +1 -1
- package/assets/components/Toolbar/Toolbar.module.css +31 -24
- package/assets/components/Toolbar/Toolbar.tsx +4 -3
- package/assets/components/Tooltip/Tooltip.module.css +10 -0
- package/assets/components/Tooltip/Tooltip.tsx +50 -15
- package/assets/components/TopLoader/TopLoader.module.css +1 -0
- package/assets/components/TreeNav/TreeNav.module.css +1 -0
- package/assets/components/UserMessage/UserMessage.module.css +110 -1
- package/assets/components/UserMessage/UserMessage.tsx +138 -16
- package/assets/components/UserMessage/index.ts +4 -0
- package/assets/components/_color.ts +2 -2
- package/assets/components/_data.ts +37 -31
- package/assets/components/_utils.css +36 -5
- package/assets/components/axisOptions.ts +2 -0
- package/assets/components/component-registry.json +1731 -94
- package/assets/components/index.ts +23 -0
- package/assets/components/materialScope.tsx +11 -0
- package/assets/components/reset.css +1 -0
- package/assets/components/themeBootScript.ts +3 -2
- package/assets/components/tokens.css +308 -71
- package/assets/components/useChartEntrance.ts +119 -0
- package/assets/prompts/ASSEMBLY.md +20 -7
- package/assets/prompts/CATALOG.md +110 -92
- package/assets/prompts/FEEDBACK_PROCESS.md +19 -0
- package/assets/prompts/PRINCIPLES.md +25 -1
- package/assets/prompts/TEMPLATE_PREVIEWS.md +21 -0
- package/assets/prompts/WORKFLOW_DESIGN.md +48 -70
- package/assets/prompts/axes/font.md +12 -1
- package/assets/prompts/axes/icon.md +6 -4
- package/assets/prompts/axes/material.md +40 -0
- package/assets/prompts/axes/motion.md +2 -0
- package/assets/prompts/axes/palette.md +10 -2
- package/assets/prompts/axes/shape.md +8 -0
- package/assets/prompts/axes/voice.md +4 -0
- package/assets/prompts/components/README.md +3 -3
- package/assets/prompts/components/_variants.md +35 -35
- package/assets/prompts/components/accordion.md +15 -15
- package/assets/prompts/components/ai-message.md +14 -12
- package/assets/prompts/components/app-frame.md +16 -16
- package/assets/prompts/components/attachment-item.md +38 -31
- package/assets/prompts/components/attachment-thumb.md +14 -12
- package/assets/prompts/components/avatar-upload.md +10 -10
- package/assets/prompts/components/avatar.md +16 -16
- package/assets/prompts/components/badge.md +32 -97
- package/assets/prompts/components/breadcrumb.md +25 -24
- package/assets/prompts/components/bubble.md +13 -13
- package/assets/prompts/components/button-group.md +1 -1
- package/assets/prompts/components/button.md +36 -36
- package/assets/prompts/components/calendar.md +151 -0
- package/assets/prompts/components/callout.md +39 -23
- package/assets/prompts/components/canvas-edge.md +70 -0
- package/assets/prompts/components/canvas-node.md +27 -10
- package/assets/prompts/components/canvas.md +85 -0
- package/assets/prompts/components/card.md +31 -31
- package/assets/prompts/components/chart-bar.md +77 -0
- package/assets/prompts/components/chart-pie.md +63 -0
- package/assets/prompts/components/chart-radar.md +56 -0
- package/assets/prompts/components/chart-radial.md +56 -0
- package/assets/prompts/components/chart.md +129 -0
- package/assets/prompts/components/chat-composer.md +71 -0
- package/assets/prompts/components/chat-input.md +82 -27
- package/assets/prompts/components/chat-message.md +48 -0
- package/assets/prompts/components/chat-reactions.md +38 -0
- package/assets/prompts/components/checkbox-card.md +26 -45
- package/assets/prompts/components/checkbox.md +40 -17
- package/assets/prompts/components/chip.md +34 -34
- package/assets/prompts/components/code-block.md +109 -65
- package/assets/prompts/components/code.md +4 -4
- package/assets/prompts/components/color-area.md +9 -9
- package/assets/prompts/components/color-field.md +17 -13
- package/assets/prompts/components/color-picker.md +173 -0
- package/assets/prompts/components/color-slider.md +14 -14
- package/assets/prompts/components/color-swatch-picker.md +8 -8
- package/assets/prompts/components/color-swatch.md +9 -9
- package/assets/prompts/components/combobox.md +5 -2
- package/assets/prompts/components/command-palette.md +31 -30
- package/assets/prompts/components/comment.md +75 -0
- package/assets/prompts/components/context-menu.md +28 -25
- package/assets/prompts/components/control-group.md +4 -4
- package/assets/prompts/components/data-table.md +9 -0
- package/assets/prompts/components/date-picker.md +41 -23
- package/assets/prompts/components/disclosure.md +10 -10
- package/assets/prompts/components/drawer.md +29 -18
- package/assets/prompts/components/dropdown-menu.md +23 -21
- package/assets/prompts/components/emoji-picker.md +45 -0
- package/assets/prompts/components/empty-state.md +20 -18
- package/assets/prompts/components/event-chip.md +70 -28
- package/assets/prompts/components/event-list-item.md +32 -28
- package/assets/prompts/components/file-icon.md +18 -19
- package/assets/prompts/components/file-upload.md +1 -1
- package/assets/prompts/components/gallery-item.md +24 -23
- package/assets/prompts/components/generated-image.md +10 -10
- package/assets/prompts/components/hint.md +19 -19
- package/assets/prompts/components/icon-button.md +16 -16
- package/assets/prompts/components/icon.md +42 -17
- package/assets/prompts/components/input.md +49 -46
- package/assets/prompts/components/kanban.md +35 -35
- package/assets/prompts/components/list-item.md +50 -41
- package/assets/prompts/components/menu-item.md +49 -44
- package/assets/prompts/components/message-actions.md +15 -6
- package/assets/prompts/components/message-quote.md +7 -7
- package/assets/prompts/components/message-sources.md +10 -10
- package/assets/prompts/components/message-state.md +17 -17
- package/assets/prompts/components/message-table.md +5 -5
- package/assets/prompts/components/metric-card.md +57 -109
- package/assets/prompts/components/mini-calendar.md +77 -0
- package/assets/prompts/components/modal.md +40 -39
- package/assets/prompts/components/multi-select.md +4 -1
- package/assets/prompts/components/onboarding.md +23 -19
- package/assets/prompts/components/page-header.md +42 -33
- package/assets/prompts/components/pagination.md +17 -17
- package/assets/prompts/components/progress-bar.md +26 -13
- package/assets/prompts/components/quotation-bar.md +10 -10
- package/assets/prompts/components/radio-card.md +34 -117
- package/assets/prompts/components/radio.md +9 -9
- package/assets/prompts/components/segmented-chart.md +19 -5
- package/assets/prompts/components/select.md +29 -25
- package/assets/prompts/components/shortcut.md +11 -11
- package/assets/prompts/components/sidebar.md +67 -58
- package/assets/prompts/components/skeleton.md +47 -0
- package/assets/prompts/components/slider.md +18 -18
- package/assets/prompts/components/spinner.md +16 -16
- package/assets/prompts/components/stepper.md +29 -15
- package/assets/prompts/components/switch.md +30 -26
- package/assets/prompts/components/tab-strip.md +32 -31
- package/assets/prompts/components/table-cell.md +9 -7
- package/assets/prompts/components/table-header.md +16 -16
- package/assets/prompts/components/table-row-edit.md +19 -19
- package/assets/prompts/components/table-row-select.md +9 -9
- package/assets/prompts/components/table-row.md +29 -20
- package/assets/prompts/components/table-toolbar.md +9 -0
- package/assets/prompts/components/tabs.md +30 -27
- package/assets/prompts/components/tag.md +54 -0
- package/assets/prompts/components/textarea.md +16 -15
- package/assets/prompts/components/time-picker.md +22 -14
- package/assets/prompts/components/timeline-view.md +129 -0
- package/assets/prompts/components/toast.md +43 -42
- package/assets/prompts/components/toolbar.md +36 -23
- package/assets/prompts/components/tooltip.md +36 -17
- package/assets/prompts/components/top-loader.md +12 -12
- package/assets/prompts/components/topbar.md +43 -34
- package/assets/prompts/components/tree-nav.md +10 -10
- package/assets/prompts/components/user-message.md +23 -12
- package/assets/prompts/design-examples/README.md +1 -1
- package/assets/prompts/design-examples/ai-chat-full-page.png +0 -0
- package/assets/prompts/design-examples/catalog.json +124 -1
- package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.module.css +346 -0
- package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.tsx +375 -0
- package/assets/prompts/design-examples/sources/ai-chat-full-page/FullPageChat.tsx +8 -0
- package/assets/prompts/design-examples/sources/ai-chat-full-page/REFERENCE.md +19 -0
- package/assets/prompts/design-examples/sources/ai-chat-full-page/useChatDemo.ts +139 -0
- package/assets/prompts/design-examples/sources/ai-chat-full-page/useDemoTextStream.ts +30 -0
- package/assets/prompts/primitives/emerge.md +2 -0
- package/assets/prompts/templates/README.md +1 -1
- package/assets/prompts/templates/ains.md +9 -1
- package/assets/prompts/templates/aurora.md +5 -4
- package/assets/prompts/templates/minimal.md +14 -6
- package/assets/prompts/templates/onboarding.md +156 -0
- package/assets/prompts/templates/workspace.md +16 -11
- package/assets/prompts/tokens/color.md +11 -4
- package/assets/prompts/tokens/material.md +51 -0
- package/assets/prompts/tokens/radius.md +34 -0
- package/assets/prompts/tokens/typography.md +24 -2
- package/assets/prompts/use-cases/chart-chart-area.md +1334 -0
- package/assets/prompts/use-cases/chart-chart-bar.md +1886 -0
- package/assets/prompts/use-cases/chart-chart-pie.md +1031 -0
- package/assets/prompts/use-cases/chart-chart-radar.md +785 -0
- package/assets/prompts/use-cases/chart-chart-radial.md +988 -0
- package/assets/prompts/use-cases/chart-segmented-chart.md +262 -0
- package/assets/prompts/use-cases/chat-chat-composer.md +529 -0
- package/assets/prompts/use-cases/chat-chat-input.md +1766 -0
- package/assets/prompts/use-cases/data-comment.md +360 -0
- package/assets/prompts/use-cases/data-data-table.md +249 -0
- package/assets/prompts/use-cases/data-list-item.md +1056 -0
- package/assets/prompts/use-cases/data-metric-card.md +673 -0
- package/assets/prompts/use-cases/data-table-row.md +966 -0
- package/assets/prompts/use-cases/data-table-toolbar.md +481 -0
- package/assets/prompts/use-cases/feedback-drawer.md +1168 -0
- package/assets/prompts/use-cases/feedback-progress-bar.md +432 -0
- package/assets/prompts/use-cases/general-toolbar.md +854 -0
- package/assets/prompts/use-cases/general-tooltip.md +652 -0
- package/assets/prompts/use-cases/input-checkbox.md +443 -0
- package/assets/prompts/use-cases/structure-card.md +603 -0
- package/assets/prompts/use-cases/structure-page-header.md +755 -0
- package/assets/prompts/use-cases/structure-sidebar.md +1132 -0
- package/assets/prompts/use-cases/structure-topbar.md +1196 -0
- package/assets/public/ovenn-wordmark.svg +19 -0
- package/assets/skills/ovenn-wireframe/SKILL.md +17 -4
- package/package.json +10 -2
- package/src/commands/info.js +1 -1
- package/src/utils/design-examples.js +3 -4
- package/assets/prompts/templates/glass-button.md +0 -336
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Bar Chart
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
카테고리별 수치를 비교하는 자리. Recharts `BarChart` 어댑터. 색은 `config.color`가 `--color-{dataKey}` CSS 변수로 주입되고, 각 Bar의 `fill`은 `var(--color-{dataKey})`로 받는다. Area와 달리 데이터가 연속이 아니라 **구간**이므로 fill opacity는 1(불투명), 입체감은 radius(`4~8px`)로.
|
|
5
|
+
|
|
6
|
+
### Do
|
|
7
|
+
- 카테고리 라벨이 짧고 가로가 넉넉하면 **horizontal 레이아웃**(X=카테고리). 라벨이 길면 **vertical 레이아웃**(`layout="vertical"`, Y=카테고리).
|
|
8
|
+
- 같은 카테고리 안의 두 series는 `stackId`로 쌓거나(총합·구성비) 나란히 두거나(직접 비교) 둘 중 하나로 명확히.
|
|
9
|
+
- `radius`는 솔리드 bar가 공중에 올라앉은 느낌: `4~8px`. stacked에서는 **맨 위 bar만 top radius**, 나머지는 0.
|
|
10
|
+
- 색은 `--chart-1`과 `--chart-2`가 2 series 기본. `--chart-1`은 brand 원색, `--chart-2`는 밝고 저채도인 companion이다.
|
|
11
|
+
- hover spotlight는 활성 카테고리를 유지하고 나머지를 낮은 opacity·채도로 함께 전환한다. 전환은 motion 토큰을 사용하며 `motion=none`에서는 즉시 반영한다.
|
|
12
|
+
- 범례에서 series를 끄면 해당 bar를 먼저 0까지 접은 뒤 레이아웃 계산에서 제외하고, 남은 series를 단일-series 위치와 폭으로 보간한다. 다시 켤 때는 레이아웃에 먼저 포함한 뒤 원래 값까지 펼친다.
|
|
13
|
+
|
|
14
|
+
### Don't
|
|
15
|
+
- `fillOpacity<1` + 겹치지 않는 bar는 무의미: Area 패턴 복사해서 반투명 bar 쓰지 않는다.
|
|
16
|
+
- stacked인데 각 bar에 모서리 라운드 모두 주면 bar 사이 틈이 보임: stackId=같은 그룹은 **외곽 모서리만** 라운드.
|
|
17
|
+
- Bar 수가 많을 때 `barSize` 수동 지정: Recharts auto가 더 안정적. 지정하면 반응형에서 깨짐.
|
|
18
|
+
|
|
19
|
+
### Fallback
|
|
20
|
+
- series 1개면 색은 `var(--primary)` 또는 `var(--chart-1)`. 2개면 `--chart-1, --chart-2`.
|
|
21
|
+
|
|
22
|
+
### 관련
|
|
23
|
+
- [[components/chart]]: ChartContainer/Tooltip/Legend 공통 API
|
|
24
|
+
- [[components/chart-area]]: 연속 데이터는 Area, 이산 카테고리는 Bar
|
|
25
|
+
- [[tokens/color]]: `--chart-1~5` 색 시스템
|
|
26
|
+
|
|
27
|
+
### 조합 예시
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
"use client";
|
|
31
|
+
import { Bar, BarChart, CartesianGrid, XAxis, YAxis } from "recharts";
|
|
32
|
+
import {
|
|
33
|
+
ChartContainer, ChartTooltip, ChartTooltipContent,
|
|
34
|
+
ChartLegend, ChartLegendContent,
|
|
35
|
+
type ChartConfig,
|
|
36
|
+
} from "@/components/Chart";
|
|
37
|
+
|
|
38
|
+
const data = [
|
|
39
|
+
{ month: "1월", desktop: 186, mobile: 80 },
|
|
40
|
+
{ month: "2월", desktop: 305, mobile: 200 },
|
|
41
|
+
{ month: "3월", desktop: 237, mobile: 120 },
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const config = {
|
|
45
|
+
desktop: { label: "데스크톱", color: "var(--chart-1)" },
|
|
46
|
+
mobile: { label: "모바일", color: "var(--chart-2)" },
|
|
47
|
+
} satisfies ChartConfig;
|
|
48
|
+
|
|
49
|
+
export function Example() {
|
|
50
|
+
return (
|
|
51
|
+
<ChartContainer config={config}>
|
|
52
|
+
<BarChart data={data} accessibilityLayer>
|
|
53
|
+
<CartesianGrid vertical={false} />
|
|
54
|
+
<XAxis dataKey="month" tickLine={false} axisLine={false} tickMargin={8} />
|
|
55
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
56
|
+
<ChartLegend content={<ChartLegendContent />} />
|
|
57
|
+
<Bar dataKey="mobile" stackId="a" fill="var(--color-mobile)" radius={[0, 0, 4, 4]} />
|
|
58
|
+
<Bar dataKey="desktop" stackId="a" fill="var(--color-desktop)" radius={[4, 4, 0, 0]} />
|
|
59
|
+
</BarChart>
|
|
60
|
+
</ChartContainer>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
<!-- component-contract -->
|
|
66
|
+
```json
|
|
67
|
+
{"roles":["chart-bar"],"native":[],"hints":[],"requires":[]}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
<!-- generated-use-cases:start -->
|
|
71
|
+
### 사용 사례 연결
|
|
72
|
+
|
|
73
|
+
- Sales pipeline · Support requests card
|
|
74
|
+
- 문서: /en/components/chart/chart-bar#use-cases
|
|
75
|
+
- 참조 원본: [Bar Chart 사례](../use-cases/chart-chart-bar.md)
|
|
76
|
+
- AI 조회: `get_guide(topic="use-cases/chart-chart-bar", sections=["사례 목록", "파일 목록"])` 후 필요한 `Section:` / `Source:` 헤딩을 선택한다.
|
|
77
|
+
<!-- generated-use-cases:end -->
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Pie Chart
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
전체 대비 구성비를 보여주는 Recharts `PieChart` 어댑터. 각 조각의 카테고리 키는 `ChartConfig`와 1:1로 맞추고, 색은 데이터 행의 `fill: "var(--color-{category})"`로 받는다. Palette의 color/mono 전환은 `--chart-1~5` 토큰이 담당하므로 차트 안에서 별도 분기하지 않는다.
|
|
5
|
+
|
|
6
|
+
### Do
|
|
7
|
+
- 전체가 의미 있는 100%이고 카테고리가 2~5개일 때 사용한다.
|
|
8
|
+
- 정확한 비교가 중요하면 라벨 또는 범례를 함께 제공하고, 아주 근소한 차이는 Bar Chart로 전환한다.
|
|
9
|
+
- 도넛 중앙에는 전체 합계나 현재 선택처럼 차트 전체를 설명하는 값 하나만 둔다.
|
|
10
|
+
- 조각 이름은 데이터의 `nameKey`, 수치는 `dataKey`로 명확히 분리한다.
|
|
11
|
+
- Tooltip은 `<ChartTooltipContent nameKey="category" hideLabel />`, Legend는 `<ChartLegendContent nameKey="category" />` 패턴을 사용한다.
|
|
12
|
+
- 범례는 Radial과 같은 detailed(기본)·compact 체계를 사용한다. detailed는 항목명·값을 오른쪽 세로 목록으로 표시하고 좁으면 아래에 둔다. compact는 이름만 차트 아래 가운데 정렬하고 균형 있게 줄바꿈한다. SVG 내부가 아닌 별도 HTML 흐름에 두며 세로 간격은 detailed space-1, compact space-2를 사용한다. Pie 조각 순서와 색을 범례에도 유지한다.
|
|
13
|
+
- 범례 클릭은 해당 조각을 부드럽게 solo 강조하고 나머지를 낮춘다. 라벨이 있으면 비활성 조각의 라벨과 리더 선도 함께 페이드아웃한다. 같은 범례를 다시 누르면 전체 조각과 라벨을 복원한다.
|
|
14
|
+
|
|
15
|
+
### Don't
|
|
16
|
+
- [HARD] 조각 색을 hex/rgb/oklch 리터럴로 지정하지 않는다. 반드시 `--chart-1~5`를 config에 넣고 `--color-{key}`로 소비한다.
|
|
17
|
+
- 6개 이상 카테고리를 억지로 한 원에 넣지 않는다. 작은 항목은 기타로 묶거나 Bar Chart로 바꾼다.
|
|
18
|
+
- 3D, 그림자, 폭발형 전체 조각처럼 각도·면적 인지를 왜곡하는 장식을 쓰지 않는다.
|
|
19
|
+
- 중첩 도넛에서 서로 다른 카테고리 순서를 쓰지 않는다. 두 링의 색-범주 대응을 동일하게 유지한다.
|
|
20
|
+
|
|
21
|
+
### Fallback
|
|
22
|
+
- 형태가 애매하면 기본 Pie. 중앙 요약이 있으면 Donut.
|
|
23
|
+
- 구분선은 `var(--bg)`가 기본이며, 조각이 충분히 구분될 때만 투명 stroke를 사용한다.
|
|
24
|
+
|
|
25
|
+
### 관련
|
|
26
|
+
- [[components/chart]]: ChartContainer/Tooltip/Legend 공통 API
|
|
27
|
+
- [[components/chart-bar]]: 값의 정밀 비교 또는 카테고리 6개 이상
|
|
28
|
+
- [[tokens/color]]: `--chart-1~5` 팔레트와 mono 명도 위계
|
|
29
|
+
|
|
30
|
+
### 조합 예시
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
const data = [
|
|
34
|
+
{ browser: "chrome", visitors: 275, fill: "var(--color-chrome)" },
|
|
35
|
+
{ browser: "safari", visitors: 200, fill: "var(--color-safari)" },
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
const config = {
|
|
39
|
+
chrome: { label: "Chrome", color: "var(--chart-1)" },
|
|
40
|
+
safari: { label: "Safari", color: "var(--chart-2)" },
|
|
41
|
+
} satisfies ChartConfig;
|
|
42
|
+
|
|
43
|
+
<ChartContainer config={config}>
|
|
44
|
+
<PieChart accessibilityLayer>
|
|
45
|
+
<ChartTooltip content={<ChartTooltipContent nameKey="browser" hideLabel />} />
|
|
46
|
+
<Pie data={data} dataKey="visitors" nameKey="browser" />
|
|
47
|
+
</PieChart>
|
|
48
|
+
</ChartContainer>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
<!-- component-contract -->
|
|
52
|
+
```json
|
|
53
|
+
{"roles":["chart-pie"],"native":[],"hints":[],"requires":[]}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
<!-- generated-use-cases:start -->
|
|
57
|
+
### 사용 사례 연결
|
|
58
|
+
|
|
59
|
+
- Acquisition sources card
|
|
60
|
+
- 문서: /en/components/chart/chart-pie#use-cases
|
|
61
|
+
- 참조 원본: [Pie Chart 사례](../use-cases/chart-chart-pie.md)
|
|
62
|
+
- AI 조회: `get_guide(topic="use-cases/chart-chart-pie", sections=["사례 목록", "파일 목록"])` 후 필요한 `Section:` / `Source:` 헤딩을 선택한다.
|
|
63
|
+
<!-- generated-use-cases:end -->
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Radar Chart
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
여러 항목의 상대적 프로필을 같은 축 위에서 비교하는 Recharts `RadarChart` 어댑터. 각 축은 동일한 단위와 범위를 공유해야 하며, 색은 `ChartConfig`의 `--chart-1~5` 토큰을 `var(--color-{dataKey})`로 소비한다.
|
|
5
|
+
|
|
6
|
+
### Do
|
|
7
|
+
- 3~8개 축에서 전체 모양과 강약 패턴을 비교할 때 사용한다.
|
|
8
|
+
- 모든 축의 단위와 domain을 동일하게 맞춘다. 단위가 다르면 먼저 정규화한다.
|
|
9
|
+
- 한 series는 fill을 낮은 opacity로 깔고 stroke를 명확히 유지한다. 외곽선은 `--space-0_5` 두께와 `--shadow-xs` 정도의 은은한 깊이만 허용한다.
|
|
10
|
+
- 두 series 이상이면 Legend를 제공하며, 범례 클릭으로 series를 solo 확인하고 재클릭으로 복귀시킨다.
|
|
11
|
+
- 격자는 기본 polygon, 연속적인 감각이 더 중요하면 circle을 사용한다.
|
|
12
|
+
- `PolarGrid`는 선 구조로만 사용하고 색 fill을 넣지 않는다.
|
|
13
|
+
|
|
14
|
+
### Don't
|
|
15
|
+
- [HARD] 서로 다른 단위나 범위를 정규화 없이 한 Radar에 넣지 않는다.
|
|
16
|
+
- 3개 미만 축 또는 8개 초과 축에 사용하지 않는다. 적은 축은 Bar, 많은 축은 Table이나 Small Multiples로 전환한다.
|
|
17
|
+
- series를 3개 이상 겹치지 않는다. 면적이 겹치며 해석이 급격히 어려워진다.
|
|
18
|
+
- fill을 불투명하게 만들어 뒤 series나 grid를 가리지 않는다.
|
|
19
|
+
- grid 영역에 series 색을 채우지 않는다. 면 채움은 Radar series에만 사용한다.
|
|
20
|
+
- 색을 리터럴로 지정하지 않는다. 반드시 chart token을 사용한다.
|
|
21
|
+
|
|
22
|
+
### Fallback
|
|
23
|
+
- 하나의 프로필이면 `--chart-1`, 두 개 비교면 `--chart-1 + --chart-2`.
|
|
24
|
+
- grid가 애매하면 polygon + radial lines 기본값.
|
|
25
|
+
|
|
26
|
+
### 관련
|
|
27
|
+
- [[components/chart]]: ChartContainer/Tooltip/Legend 공통 API
|
|
28
|
+
- [[components/chart-bar]]: 축별 절대값의 정밀 비교
|
|
29
|
+
- [[tokens/color]]: `--chart-1~5` 팔레트와 mono 명도 위계
|
|
30
|
+
|
|
31
|
+
### 조합 예시
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
<ChartContainer config={config}>
|
|
35
|
+
<RadarChart data={data} accessibilityLayer>
|
|
36
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
37
|
+
<PolarGrid />
|
|
38
|
+
<PolarAngleAxis dataKey="month" />
|
|
39
|
+
<Radar dataKey="desktop" fill="var(--color-desktop)" fillOpacity={0.5} stroke="var(--color-desktop)" />
|
|
40
|
+
</RadarChart>
|
|
41
|
+
</ChartContainer>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
<!-- component-contract -->
|
|
45
|
+
```json
|
|
46
|
+
{"roles":["chart-radar"],"native":[],"hints":[],"requires":[]}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
<!-- generated-use-cases:start -->
|
|
50
|
+
### 사용 사례 연결
|
|
51
|
+
|
|
52
|
+
- Product quality card
|
|
53
|
+
- 문서: /en/components/chart/chart-radar#use-cases
|
|
54
|
+
- 참조 원본: [Radar Chart 사례](../use-cases/chart-chart-radar.md)
|
|
55
|
+
- AI 조회: `get_guide(topic="use-cases/chart-chart-radar", sections=["사례 목록", "파일 목록"])` 후 필요한 `Section:` / `Source:` 헤딩을 선택한다.
|
|
56
|
+
<!-- generated-use-cases:end -->
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Radial Chart
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
진행률이나 작은 순위 집합을 원형 공간에 압축하는 Recharts `RadialBarChart` 어댑터. 색은 `ChartConfig`의 `--chart-1~5`를 `var(--color-{dataKey})`로 소비하고 mono에서는 명도 차이로 구분한다.
|
|
5
|
+
|
|
6
|
+
### Do
|
|
7
|
+
- 단일 진행률 또는 2~5개 항목의 간결한 순위를 보여줄 때 사용한다.
|
|
8
|
+
- 값의 정확한 비교보다 전체 흐름과 공간 효율이 중요할 때 선택한다.
|
|
9
|
+
- 진행률은 background track과 중앙 값을 함께 제공한다. 단일 진행·누적 원형은 약240px 캔버스로 제한해 다중 링 예시보다 작은 비례를 유지한다. 중앙 숫자는 text-4xl/medium, % 단위는 text-base/fg-muted로 나눠 균형을 맞추고 불필요한 보조 문구를 추가하지 않는다.
|
|
10
|
+
- stacked는 하나의 전체를 이루는 최대 두 항목에만 사용하고 Legend를 제공한다.
|
|
11
|
+
- 범례는 `detailed`(기본)와 `compact` 두 형태를 제공한다. detailed는 항목명·값의 세로 목록, compact는 Area Chart처럼 이름만 짧게 표시하며 차트 아래 가운데 정렬·균형 줄바꿈한다. 두 형태 모두 같은 링 선택 상태를 공유한다. compact도 SVG 내부 Legend가 아닌 별도 HTML 흐름에 두고 캔버스 내부 여백을 고려해 차트와 space-2 간격을 둔다. 세로로 내려간 detailed와 stacked 범례는 space-1 간격을 사용한다.
|
|
12
|
+
- 여러 링의 항목명과 값은 바 위가 아닌 외부 범례로 분리한다. 넓은 공간은 오른쪽, 좁은 공간은 아래에 배치하고 바깥 링부터 안쪽 링 순서로 정렬한다. 범례와 링은 같은 선택 상태를 공유한다.
|
|
13
|
+
- 여러 링을 쓰면 클릭한 링을 강조하고 중앙에 항목명과 값을 표시한다. 미선택 중앙은 비운다. 재클릭하거나 차트 밖을 누르면 전체 보기로 복귀한다.
|
|
14
|
+
- tooltip과 `accessibilityLayer`를 유지한다.
|
|
15
|
+
|
|
16
|
+
### Don't
|
|
17
|
+
- [HARD] 원의 각도나 면적으로 정밀한 수치 비교를 요구하지 않는다. 이 경우 Bar Chart를 사용한다.
|
|
18
|
+
- 5개를 초과하는 항목을 한 차트에 배치하지 않는다.
|
|
19
|
+
- 서로 다른 단위의 값을 stacked로 합치지 않는다.
|
|
20
|
+
- 색을 리터럴로 지정하지 않는다. 반드시 chart token을 사용한다.
|
|
21
|
+
- 장식용 3D, 과도한 gradient, 두꺼운 그림자를 추가하지 않는다.
|
|
22
|
+
|
|
23
|
+
### Fallback
|
|
24
|
+
- 형태가 애매하면 full radial + background track을 사용한다.
|
|
25
|
+
- 단일 비율이면 중앙 값, 여러 항목이면 tooltip과 외부 범례를 사용한다.
|
|
26
|
+
|
|
27
|
+
### 관련
|
|
28
|
+
- [[components/chart]]: ChartContainer/Tooltip/Legend 공통 API
|
|
29
|
+
- [[components/chart-bar]]: 정확한 값 비교
|
|
30
|
+
- [[components/chart-pie]]: 전체 대비 구성비
|
|
31
|
+
- [[tokens/color]]: `--chart-1~5` 팔레트와 mono 명도 위계
|
|
32
|
+
|
|
33
|
+
### 조합 예시
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
<ChartContainer config={config}>
|
|
37
|
+
<RadialBarChart data={data} innerRadius="28%" outerRadius="88%" accessibilityLayer>
|
|
38
|
+
<ChartTooltip content={<ChartTooltipContent hideLabel nameKey="browser" />} />
|
|
39
|
+
<RadialBar dataKey="visitors" background cornerRadius="50%" />
|
|
40
|
+
</RadialBarChart>
|
|
41
|
+
</ChartContainer>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
<!-- component-contract -->
|
|
45
|
+
```json
|
|
46
|
+
{"roles":["chart-radial"],"native":[],"hints":[],"requires":[]}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
<!-- generated-use-cases:start -->
|
|
50
|
+
### 사용 사례 연결
|
|
51
|
+
|
|
52
|
+
- Monthly goal card
|
|
53
|
+
- 문서: /en/components/chart/chart-radial#use-cases
|
|
54
|
+
- 참조 원본: [Radial Chart 사례](../use-cases/chart-chart-radial.md)
|
|
55
|
+
- AI 조회: `get_guide(topic="use-cases/chart-chart-radial", sections=["사례 목록", "파일 목록"])` 후 필요한 `Section:` / `Source:` 헤딩을 선택한다.
|
|
56
|
+
<!-- generated-use-cases:end -->
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Chart
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
Recharts를 Ovenn 토큰에 맞춰 감싼 어댑터. 색은 `config.color`에 토큰(`var(--chart-1)` 또는 `var(--primary)` 같은)을 넘기면 ChartStyle이 `--color-{key}` CSS 변수로 주입하고, 각 series(Area/Bar/Line/Pie 등)의 fill·stroke는 `var(--color-{dataKey})`로 받는다. Recharts primitive(`AreaChart`, `BarChart`, `XAxis`, `CartesianGrid`, `Tooltip`, `Legend`)는 그대로 쓰고, 시각 전용 컴포넌트(`ChartTooltipContent`, `ChartLegendContent`)만 Ovenn이 공급한다.
|
|
5
|
+
|
|
6
|
+
### 진입 모션
|
|
7
|
+
- 기본으로 각 차트가 화면에 처음 들어올 때 한 번 그린다. `animateIn={false}`로 끈다. 축·범례·카드의 위치와 선택 상태는 유지한다.
|
|
8
|
+
- ChartContainer는 JSX에 직접 놓인 Recharts Area/Bar/Line/Pie/Radar/RadialBar 및 Fragment의 series를 처리한다. 별도 사용자 컴포넌트가 내부에서 렌더하는 series는 그 컴포넌트에서 모션을 관리한다. 임의 컴포넌트 함수를 호출해 내부를 펼치지 않는다.
|
|
9
|
+
- Bar는 native 레이아웃/stackedBarStart를 따라 세로는 아래→위, 가로는 왼쪽→오른쪽으로 자란다. Line/Area는 왼쪽부터, Radar는 중심부터 그린다. Pie의 각도를 모두 생략하면90→-270으로 시계방향을 사용한다. 한쪽이라도 명시하면 기존 각도 설정을 보존한다.
|
|
10
|
+
- 진입 중에만 series의 기존 isAnimationActive=false를 덮어쓰며 완료 후 기존 데이터 변경·범례 모션과 콜백을 복원한다. 같은 차트의 스크롤 재진입에는 반복하지 않는다.
|
|
11
|
+
- `--chart-enter-duration`(기본2×duration-slower)과 `--chart-enter-easing`이 속도·탄력을 담당한다. CSS calc는 computed property로 해석한다. `motion=none` 또는 reduced-motion이면 대기/실행 중에도 바로 최종 상태를 표시하고 JS/WAAPI도 취소한다.
|
|
12
|
+
|
|
13
|
+
### Do
|
|
14
|
+
- `config`의 키는 데이터의 `dataKey`와 1:1 맞춘다. `desktop`이 dataKey면 config에도 `desktop: { label, color }`.
|
|
15
|
+
- 색은 **토큰 경유**. `color: "var(--chart-1)"` ~ `"var(--chart-5)"`가 기본 series 팔레트, 단일 series는 `"var(--primary)"`도 OK.
|
|
16
|
+
- Tooltip은 `<ChartTooltip content={<ChartTooltipContent />} />` 패턴. indicator 기본 `dot`, 라인 비교에선 `line`, 두 series를 "묶음"으로 보여줄 땐 `dashed`.
|
|
17
|
+
- Legend는 `<ChartLegend content={<ChartLegendContent />} />`. 기본은 전체 너비 가운데 정렬이며 항목 단위로 균형 있게 줄바꿈한다. 명시적 `align="left" | "right"`도 지원한다. 아이콘 넣고 싶으면 config의 `icon`에 React 컴포넌트.
|
|
18
|
+
- 높이는 ChartContainer의 `className` 또는 `style`로 공급 (`style={{ height: 300 }}` 또는 CSS에서 `aspect-ratio` override).
|
|
19
|
+
|
|
20
|
+
### Don't
|
|
21
|
+
- Recharts의 `Tooltip` content prop을 생략한 디폴트 툴팁 쓰지 않는다. 하드코딩된 흰 배경·검정 테두리라 Ovenn 다크 모드에서 깨진다.
|
|
22
|
+
- `fill="#..."` 같은 색 하드코딩. 반드시 `var(--color-{key})` 또는 토큰.
|
|
23
|
+
- 축 라벨·그리드 선 색을 직접 override하지 않는다. ChartContainer가 `recharts-cartesian-axis-tick` 등을 토큰으로 재지정 중.
|
|
24
|
+
- `ChartContainer` 바깥에서 `ChartTooltipContent`·`ChartLegendContent` 사용 금지. ChartContext가 없으면 throw.
|
|
25
|
+
|
|
26
|
+
### Fallback
|
|
27
|
+
- 색 지정 없이 시작하면 `--chart-1`~`--chart-5`를 순서대로. 보통 series가 2~3개면 1·2·3번 쓰면 가독성 좋음.
|
|
28
|
+
- indicator 애매하면 `dot`. 선형 추세 비교면 `line`.
|
|
29
|
+
|
|
30
|
+
### 관련
|
|
31
|
+
- [[tokens/color]] · `--chart-1`~`--chart-5`는 palette set의 hue 분산과 series별 L·C tonal hierarchy를 함께 적용한다. `--chart-1 + --chart-2`가 기본 2색 페어다.
|
|
32
|
+
- Palette `mono=true`에서는 같은 토큰이 hue 없이 흑백 명도 단계로 자동 전환된다. 차트 구현에서 별도 분기하지 않는다.
|
|
33
|
+
- [[components/metric-card]] · 숫자 하나는 MetricCard, 추세·분포는 Chart.
|
|
34
|
+
- [[components/tooltip]] · 일반 Tooltip과 다른 자리. Chart tooltip은 데이터 포인트 hover 전용.
|
|
35
|
+
|
|
36
|
+
### Props 시그니처
|
|
37
|
+
```tsx
|
|
38
|
+
<ChartContainer config={ChartConfig} className?={string}>
|
|
39
|
+
{/* Recharts chart root (AreaChart, BarChart, LineChart, PieChart, RadarChart, RadialBarChart...) */}
|
|
40
|
+
</ChartContainer>
|
|
41
|
+
|
|
42
|
+
type ChartConfig = Record<string, {
|
|
43
|
+
label?: ReactNode;
|
|
44
|
+
icon?: ComponentType;
|
|
45
|
+
color?: string; // 하나만
|
|
46
|
+
theme?: { light: string; dark: string }; // 또는 이쪽
|
|
47
|
+
}>;
|
|
48
|
+
|
|
49
|
+
<ChartTooltip content={<ChartTooltipContent
|
|
50
|
+
indicator?="dot" | "line" | "dashed" // default: dot
|
|
51
|
+
hideLabel?={boolean}
|
|
52
|
+
hideIndicator?={boolean}
|
|
53
|
+
nameKey?={string}
|
|
54
|
+
labelKey?={string}
|
|
55
|
+
labelFormatter?={(value, payload) => ReactNode}
|
|
56
|
+
formatter?={(value, name, item, index, payload) => ReactNode}
|
|
57
|
+
/>} />
|
|
58
|
+
|
|
59
|
+
<ChartLegend content={<ChartLegendContent
|
|
60
|
+
hideIcon?={boolean}
|
|
61
|
+
nameKey?={string}
|
|
62
|
+
verticalAlign?="top" | "bottom" // default: bottom
|
|
63
|
+
/>} />
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Series 팔레트 선택
|
|
67
|
+
|
|
68
|
+
| series 개수 | 추천 조합 |
|
|
69
|
+
|---|---|
|
|
70
|
+
| 1 | `var(--primary)` 또는 `var(--chart-1)` |
|
|
71
|
+
| 2 | `--chart-1`, `--chart-2` |
|
|
72
|
+
| 3 | `--chart-1`, `--chart-2`, `--chart-3` |
|
|
73
|
+
| 4~5 | `--chart-1` ~ `--chart-5` 순서대로 |
|
|
74
|
+
| 6+ | series 수가 너무 많다는 신호. 그룹핑하거나 분할 |
|
|
75
|
+
|
|
76
|
+
### 조합 예시
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
"use client";
|
|
80
|
+
import { Area, AreaChart, CartesianGrid, XAxis } from "recharts";
|
|
81
|
+
import {
|
|
82
|
+
ChartContainer,
|
|
83
|
+
ChartTooltip,
|
|
84
|
+
ChartTooltipContent,
|
|
85
|
+
ChartLegend,
|
|
86
|
+
ChartLegendContent,
|
|
87
|
+
type ChartConfig,
|
|
88
|
+
} from "@/components/Chart";
|
|
89
|
+
|
|
90
|
+
const data = [
|
|
91
|
+
{ month: "1월", desktop: 186, mobile: 80 },
|
|
92
|
+
{ month: "2월", desktop: 305, mobile: 200 },
|
|
93
|
+
{ month: "3월", desktop: 237, mobile: 120 },
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
const config = {
|
|
97
|
+
desktop: { label: "데스크톱", color: "var(--chart-1)" },
|
|
98
|
+
mobile: { label: "모바일", color: "var(--chart-2)" },
|
|
99
|
+
} satisfies ChartConfig;
|
|
100
|
+
|
|
101
|
+
export function Example() {
|
|
102
|
+
return (
|
|
103
|
+
<ChartContainer config={config}>
|
|
104
|
+
<AreaChart data={data} accessibilityLayer>
|
|
105
|
+
<CartesianGrid vertical={false} />
|
|
106
|
+
<XAxis dataKey="month" tickLine={false} axisLine={false} tickMargin={8} />
|
|
107
|
+
<ChartTooltip content={<ChartTooltipContent indicator="dot" />} />
|
|
108
|
+
<ChartLegend content={<ChartLegendContent />} />
|
|
109
|
+
<Area dataKey="desktop" type="natural" fill="var(--color-desktop)" fillOpacity={0.4} stroke="var(--color-desktop)" />
|
|
110
|
+
<Area dataKey="mobile" type="natural" fill="var(--color-mobile)" fillOpacity={0.4} stroke="var(--color-mobile)" />
|
|
111
|
+
</AreaChart>
|
|
112
|
+
</ChartContainer>
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
<!-- component-contract -->
|
|
118
|
+
```json
|
|
119
|
+
{"roles":["chart"],"native":[],"hints":[],"requires":[]}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
<!-- generated-use-cases:start -->
|
|
123
|
+
### 사용 사례 연결
|
|
124
|
+
|
|
125
|
+
- Today vs yesterday · Traffic comparison card · Weekly revenue card
|
|
126
|
+
- 문서: /en/components/chart/chart-area#use-cases
|
|
127
|
+
- 참조 원본: [Line & Area Chart 사례](../use-cases/chart-chart-area.md)
|
|
128
|
+
- AI 조회: `get_guide(topic="use-cases/chart-chart-area", sections=["사례 목록", "파일 목록"])` 후 필요한 `Section:` / `Source:` 헤딩을 선택한다.
|
|
129
|
+
<!-- generated-use-cases:end -->
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Chat Composer
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
사람 간 채널·DM·스레드 메시지를 작성하는 controlled 입력창. AIChatInput의 실제 입력 엔진과 첨부·인용·전송 표현을 조합한다. MenuItem과 ContextMenu 표면, Radix Popover를 조립하여 입력 기반 추천을 제공한다.
|
|
5
|
+
|
|
6
|
+
### Do
|
|
7
|
+
- value/onValueChange/onSend로 본문과 전송을 외부에서 관리한다. 성공 시 본문·첨부를 지우는 것도 호스트 책임이다.
|
|
8
|
+
- Enter는 전송, Shift+Enter는 줄바꿈이다. IME 조합 중 Enter는 전송하지 않는다.
|
|
9
|
+
- 빈 본문이라도 attachments가 있으면 전송한다. disabled/sending은 전송·첨부·삭제·tools를 차단한다.
|
|
10
|
+
- onAttach가 없으면 첨부 버튼을 비활성화한다. 업로드/중복 검사/오류 처리는 호스트가 소유한다.
|
|
11
|
+
- replyTo는 작성자·인용문·onCancel을 전달한다. tools에는 실제 동작하는 멘션/이모지 선택기를 조합한다.
|
|
12
|
+
- `shape`, `variant`, `appearance`, `separateSend`, `sendVariant`, `sendIcon`, `sendDisabled`, `maxRows`, `attachments/onAttach/onRemoveAttachment`, `quotation`은 AIChatInput과 동일한 실제 구현을 사용한다. 모델 선택·스트리밍 중지는 AI 전용으로 이 컴포넌트에서 제공하지 않는다.
|
|
13
|
+
- `shape`는 multi/single, `variant`는 framed/flush, `appearance`는 outline/filled다. 기본값은 multi/framed/outline이다. separateSend는 single에서만 적용한다. sendVariant는 solid/ghost/soft, sendIcon은 arrow-up/return/paper-plane다.
|
|
14
|
+
- `sendDisabled`는 편집·첨부를 유지하며 전송만 차단한다. disabled/sending은 편집·첨부 제거·추천·전송을 모두 차단한다.
|
|
15
|
+
- AI ChatInput과 같은 1행 입력에서 시작하고 동일한 외곽·여백·전송 버튼을 사용한다. 첨부 → 인용 → 본문 → 하단 조작 순서로 배치한다.
|
|
16
|
+
- `mentions`는 `{id,label,start,end}` 배열이며 start/end는 `value`의 @label을 포함하는 UTF-16 범위다. `onValueChange(value,mentions)`에서 둘을 함께 저장한다. 삽입/삭제에 따라 범위가 이동하고 멘션 내부를 수정하면 해당 메타데이터를 제거한다.
|
|
17
|
+
- @ 멘션 추천은 아바타와 이름만 있는 한 줄로 표시한다. 보조 설명은 표시하지 않는다. `mentionOptions`의 `{id,label,description?}`를 @로 검색하고 선택하면 @label과 사용자 ID를 본문/메타데이터에 함께 삽입한다. `ChatMessageText`로 저장 메시지의 멘션을 Tag로 렌더한다. 평문에서 @이름을 추측해 권한/사용자 ID로 취급하지 않는다.
|
|
18
|
+
- `commands`는 `{id,label,description?,insertText}` 배열이다. / 검색 후 선택하면 현재 트리거를 insertText로 치환하고 onCommandSelect를 호출한다. 명령은 호스트가 제공하며 네트워크 호출을 고정하지 않는다.
|
|
19
|
+
- 추천 메뉴는 입력에 포커스를 유지한다. 위아래 방향키·Enter로 선택, Escape로 닫기, 클릭 선택, 외부 클릭 닫기를 지원한다. 결과가 없는 상태의 Enter는 메시지를 전송하지 않는다. IME 조합 중 Enter는 선택·전송하지 않는다. Radix Popover의 포털·충돌 처리를 이용해 좁은 화면/스크롤에서 메뉴를 배치한다.
|
|
20
|
+
- ref는 textarea이며 maxRows 기본 8, 최소 1행이다. 에러 표시와 재시도는 호스트가 제공한다.
|
|
21
|
+
|
|
22
|
+
### Don't
|
|
23
|
+
- 모델 선택·스트리밍 중지 같은 AI 기능을 넣지 않는다. AI 대화는 AIChatInput을 사용한다.
|
|
24
|
+
- 입력값을 보내기도 전에 내부에서 지우거나 서버 호출을 고정하지 않는다.
|
|
25
|
+
|
|
26
|
+
### Fallback
|
|
27
|
+
현재 테마와 md 컨트롤을 사용한다. 데이터·상태·권한은 호스트에서 전달한다.
|
|
28
|
+
|
|
29
|
+
### 관련
|
|
30
|
+
- [[components/textarea]]
|
|
31
|
+
- [[components/chat-input]]
|
|
32
|
+
- [[components/quotation-bar]]
|
|
33
|
+
- [[components/attachment-item]]
|
|
34
|
+
- [[components/attachment-thumb]]
|
|
35
|
+
- [[components/menu-item]]
|
|
36
|
+
- [[components/context-menu]]
|
|
37
|
+
- [[components/tag]]
|
|
38
|
+
|
|
39
|
+
### Props 예시
|
|
40
|
+
```tsx
|
|
41
|
+
<ChatComposer value={value} onValueChange={setValue} onSend={send}
|
|
42
|
+
attachments={files} onAttach={attach} onRemoveAttachment={remove}
|
|
43
|
+
replyTo={{ author: "Alex", text: "Review the update", onCancel: cancelReply }} />
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
<!-- component-contract -->
|
|
47
|
+
```json
|
|
48
|
+
{"roles": ["chat-composer"], "native": [], "hints": [], "requires": ["ThemeController"]}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 리치 입력 사용 사례
|
|
52
|
+
- `editor`로 소비자 리치 입력을 조합할 수 있다. value는 해당 문서의 평문 투영이며 onSend는 문서 모델과 첨부를 함께 저장한다. custom editor의 포커스·선택·Enter/Shift+Enter·IME·접근성·disabled는 소비자가 소유하고 ref도 직접 관리한다. native textarea ref는 이 경우 제공하지 않는다.
|
|
53
|
+
- 고정 하단 도구와 텍스트 선택 미니 Toolbar는 선택 가능한 두 사례다. `tools`에 Toolbar/IconButton/이모지 선택기·GIF 버튼를 조합한다. 미니 툴바는 선택 Range를 앵커로 사용하고 도구 클릭 중 선택을 보존한다.
|
|
54
|
+
- 원본 사례: `web/examples/RichChatComposerExample.tsx`, `.module.css`. 텍스트와 bold/italic/underline만 구조적으로 저장하고 HTML을 저장하거나 실행하지 않는다. 붙여넣기는 평문, Ctrl/Cmd+B/I/U는 선택 서식, Alt+F10은 선택 툴바 접근, Enter는 전송, Shift+Enter는 줄바꿈이다. 현재 GIF 버튼은 사용자 요청에 따라 메뉴를 열지 않는 배치 예시다.
|
|
55
|
+
|
|
56
|
+
### 전송·업로드 대기
|
|
57
|
+
- uploadProgress가 있는 첨부는 완료 전까지 전송하지 않는다. 파일 선택 즉시 완료 첨부로 취급하지 말고 업로드 진행 이벤트에 맞춰 갱신한다.
|
|
58
|
+
- 메시지는 먼저 deliveryStatus=sending으로 추가하고 서버 확인 이후 sent로 변경한다. 로컬 예제는 useChatDelivery/useChatUploads로 취소·언마운트 정리 가능한 지연을 재현한다. 실제 서비스는 서버 확인을 연결한다.
|
|
59
|
+
|
|
60
|
+
- 하단 도구의 hit box/글리프는 파일 첨부와 같은32/16px 기본 치수로 맞춘다. EmojiPicker는 공용 선택 패널로 조합하며 선택 후 기존 caret에 Unicode를 삽입한다. GIF 버튼은 현재 소비자 배치 예시로 메뉴/서비스를 연결하지 않는다(사용자 명시 요청).
|
|
61
|
+
|
|
62
|
+
- 멘션 선택 후 입력 중에도 ChatMessageText와 같은 Tag 표현을 표시한다. 네이티브 textarea 위에 aria-hidden 표시 레이어를 겹치고 실제 입력·선택·IME·스크롤은 textarea가 소유한다. 멘션은 본문과 같은 글꼴·크기·행간·자간으로 표시하며 Comment와 같은 info Tag의 잉크·배경·모서리를 사용하고 색을 즉시 적용한다. 채팅 본문 글자 크기를 유지하며 단일 space-1 표면 확장으로 좌우에 같은 여백을 확보한다. 반투명 표면을 여러 그림자로 겹치지 않는다. 레이어의 Tag는 텍스트 폭을 바꾸지 않도록 inline/가로 padding 0으로 조합한다. 표면 확장은 글자 폭·줄바꿈·caret 위치를 바꾸지 않는다.
|
|
63
|
+
|
|
64
|
+
<!-- generated-use-cases:start -->
|
|
65
|
+
### 사용 사례 연결
|
|
66
|
+
|
|
67
|
+
- Sending and file uploads · Footer tools · Selection mini toolbar · Mentions and commands
|
|
68
|
+
- 문서: /en/components/chat/chat-composer#use-cases
|
|
69
|
+
- 참조 원본: [Chat Composer 사례](../use-cases/chat-chat-composer.md)
|
|
70
|
+
- AI 조회: `get_guide(topic="use-cases/chat-chat-composer", sections=["사례 목록", "파일 목록"])` 후 필요한 `Section:` / `Source:` 헤딩을 선택한다.
|
|
71
|
+
<!-- generated-use-cases:end -->
|
|
@@ -1,44 +1,52 @@
|
|
|
1
|
-
# Chat Input
|
|
1
|
+
# AI Chat Input
|
|
2
2
|
|
|
3
3
|
### 원칙
|
|
4
|
-
AI 채팅의 입력 영역. **첨부물 바 → 인용 바 → 입력 본문**(textarea 또는 input)의 세 층 구성. 모델 선택·전송·중지·파일첨부를 전부 담당. 하위 레이어 [[components/file-icon]]·[[components/attachment-thumb]]·[[components/attachment-item]]·[[components/quotation-bar]]를 **조립**하는 상위
|
|
4
|
+
AI 채팅의 입력 영역. **첨부물 바 → 인용 바 → 입력 본문**(textarea 또는 input)의 세 층 구성. 모델 선택·전송·중지·파일첨부를 전부 담당. 하위 레이어 [[components/file-icon]]·[[components/attachment-thumb]]·[[components/attachment-item]]·[[components/quotation-bar]]를 **조립**하는 상위 블록: 자체 primitive 추가 금지.
|
|
5
5
|
|
|
6
6
|
### Do
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
7
|
+
- 모델 선택 메뉴는 ContextMenu의 공통 표면·섹션·MenuItem을 재사용하는 DropdownMenu에 `size="sm"`을 지정한다. 클릭 트리거와 키보드 동작을 유지한다.
|
|
8
|
+
- Shape은 두 가지: `multi`(기본, 긴 입력·오버레이 UI), `single`(한 줄 입력).
|
|
9
|
+
- `appearance="outline"`이 기본값이며 권장한다. `filled`는 입력 영역을 연회색(`--bg-subtle`)으로 채운다.
|
|
10
|
+
- `separateSend`는 `shape="single"`일 때만 보내기 버튼을 입력 영역 밖으로 분리한다. multi에서는 무시한다. appearance·모델 선택과 독립적으로 조합한다.
|
|
11
|
+
- Variant는 두 가지: `framed`(기본, radius·border·shadow 가진 떠있는 블록), `flush`(radius·border·shadow 모두 제거, shell 바닥에 edge-to-edge).
|
|
12
|
+
- 외곽 radius는 `radius-md`를 사용하며 Shape 축이 값을 결정한다. prop으로 받지 않는다.
|
|
10
13
|
- `models` + `selectedModel` + `onSelectModel` 셋이 다 있을 때만 모델 selector 노출.
|
|
11
|
-
- 전송은 `Enter
|
|
12
|
-
- 첨부·인용은 전부 **외부
|
|
14
|
+
- 전송은 `Enter`로: multi에선 `Shift+Enter`가 줄바꿈. 스트리밍 중엔 `Enter`나 send 클릭이 `onStop`을 호출.
|
|
15
|
+
- 첨부·인용은 전부 **외부 상태**: ChatInput은 표시·삭제 콜백만 중계. 업로드 로직·중복 체크는 소비처 책임.
|
|
13
16
|
- `onAttach`에 File[]이 들어옴. 소비처가 kind 판정(image/file)해서 attachments에 매핑.
|
|
14
17
|
|
|
18
|
+
- `sendDisabled`는 입력·첨부를 유지하면서 보내기 클릭·Enter·form submit 전송을 막는다. 생성 중 Stop은 계속 동작한다.
|
|
19
|
+
- AI 채팅 카드의 이미지 조합은 `shape="single" appearance="filled" separateSend`에 models를 생략하여 만든다. 별도 shape를 추가하지 않는다. 사용자가 명시한 이 filled 조합은 전역 outline 권장 기본값의 예외다.
|
|
20
|
+
|
|
15
21
|
### Don't
|
|
16
|
-
- 첨부·인용·메시지 상태를 ChatInput 안에서 관리하지
|
|
17
|
-
- 모델 선택 메뉴를 내부에서 열지
|
|
18
|
-
- SingleLine에서 모델 라벨을 끝까지 노출하지
|
|
19
|
-
- Send 버튼 색을 임의로 override하지
|
|
20
|
-
- `flush`를 떠있는 자리(페이지 중앙·오버레이)에 쓰지
|
|
22
|
+
- 첨부·인용·메시지 상태를 ChatInput 안에서 관리하지 않는다: controlled 전용.
|
|
23
|
+
- 모델 선택 메뉴를 내부에서 열지 않는다: 현재는 라벨 클릭 시 다음 모델로 토글만. 실제 ContextMenu는 소비처에서 조립 (ChatInput의 책임 과잉 방지).
|
|
24
|
+
- SingleLine에서 모델 라벨을 끝까지 노출하지 않는다: 10자 넘으면 자동 compact(아이콘만).
|
|
25
|
+
- Send 버튼 색을 임의로 override하지 않는다: 톤 조정은 `sendVariant` prop(`solid` | `ghost` | `soft`)으로만. 각 variant 안에서 비활성→활성 색 전환은 고정 규약.
|
|
26
|
+
- `flush`를 떠있는 자리(페이지 중앙·오버레이)에 쓰지 않는다: 외곽선 없이 공중에 뜨면 영역이 흐려짐. 반드시 shell 바닥·바텀바처럼 바깥 경계가 이미 존재하는 자리에만.
|
|
21
27
|
|
|
22
28
|
### Send 버튼 variant
|
|
23
|
-
- `sendVariant="solid"` *(기본)
|
|
24
|
-
- `sendVariant="ghost"
|
|
25
|
-
- `sendVariant="soft"
|
|
26
|
-
- `sendIcon="arrow-up"` *(기본)
|
|
27
|
-
- 셋 다 활성 상태의 **아이콘 색 규약**은
|
|
29
|
+
- `sendVariant="solid"` *(기본)*: 비활성=`bg-subtle` / 활성·스트리밍=`primary` + `primary-fg` 아이콘. ChatGPT·Claude 류 떠있는 네모 버튼.
|
|
30
|
+
- `sendVariant="ghost"`: 배경 투명, 아이콘만. 비활성=`fg-disabled` / 활성=`fg-strong`. hover에서만 `bg-subtle` 살짝. 흰 캔버스에 녹아드는 깔끔한 자리(가벼운 질문창·검색봉·툴 안쪽 작은 입력).
|
|
31
|
+
- `sendVariant="soft"`: 늘 `bg-subtle` 배경, 활성이어도 색 강조 없이 fg만 진해짐. 조용한 자리(사이드바 바닥 flush, 패널 바텀바)에서 send 존재감을 낮추고 싶을 때.
|
|
32
|
+
- `sendIcon="arrow-up"` *(기본)*: 전송 뉘앙스, 범용. `"return"`(↵): 폼 submit·키보드 힌트. `"paper-plane"`: 메신저 느낌(iMessage/카톡 류). 스트리밍 중엔 아이콘 선택과 무관하게 자동으로 square로 교체.
|
|
33
|
+
- 셋 다 활성 상태의 **아이콘 색 규약**은 고정: ghost·soft는 fg-strong, solid는 primary-fg. 임의로 primary 색 아이콘 넣지 않는다.
|
|
28
34
|
|
|
29
35
|
### Fallback
|
|
30
|
-
shape 애매하면 `multi`. variant 애매하면 `framed`. sendVariant 애매하면 `solid`. sendIcon 애매하면 `arrow-up`. maxRows 애매하면 `8`.
|
|
36
|
+
shape 애매하면 `multi`. variant 애매하면 `framed`. appearance는 `outline` 권장, separateSend는 false. sendVariant 애매하면 `solid`. sendIcon 애매하면 `arrow-up`. maxRows 애매하면 `8`.
|
|
31
37
|
|
|
32
38
|
### 관련
|
|
33
|
-
- [[components/file-icon]] / [[components/attachment-thumb]] / [[components/attachment-item]] / [[components/quotation-bar]]
|
|
34
|
-
- [[components/message-bubble]]
|
|
35
|
-
- [[components/context-menu]]
|
|
36
|
-
- [[primitives/scroll]]
|
|
39
|
+
- [[components/file-icon]] / [[components/attachment-thumb]] / [[components/attachment-item]] / [[components/quotation-bar]]: 조립 요소
|
|
40
|
+
- [[components/message-bubble]]: 짝 컴포넌트 (후속)
|
|
41
|
+
- [[components/context-menu]]: 모델 선택 메뉴를 소비처에서 조립할 때
|
|
42
|
+
- [[primitives/scroll]]: "Textarea / 단일 콘텐츠 스크롤" 섹션. 긴 글 스크롤 시 글이 root border에서 clip되도록 wrapper padding-top + textarea padding-bottom 패턴 사용. 레이아웃 변경 시 반드시 그 규약 유지.
|
|
37
43
|
|
|
38
44
|
### Props 시그니처
|
|
39
45
|
```tsx
|
|
40
46
|
<ChatInput
|
|
41
|
-
shape="multi | single"
|
|
47
|
+
shape="multi | single" // default: multi
|
|
48
|
+
appearance="outline | filled" // default: outline (권장)
|
|
49
|
+
separateSend={boolean} // default false, single에서만 적용
|
|
42
50
|
variant="framed | flush" // default: framed
|
|
43
51
|
|
|
44
52
|
value={string}
|
|
@@ -61,8 +69,9 @@ shape 애매하면 `multi`. variant 애매하면 `framed`. sendVariant 애매하
|
|
|
61
69
|
sendVariant="solid | ghost | soft" // default: solid
|
|
62
70
|
sendIcon="arrow-up | return | paper-plane" // default: arrow-up
|
|
63
71
|
|
|
64
|
-
placeholder="Ask me anything
|
|
72
|
+
placeholder="Ask me anything"
|
|
65
73
|
disabled={boolean}
|
|
74
|
+
sendDisabled={boolean} // default false, 입력/첨부 유지
|
|
66
75
|
maxRows={number} // multi 전용, default 8
|
|
67
76
|
/>
|
|
68
77
|
```
|
|
@@ -77,12 +86,13 @@ type ChatAttachment =
|
|
|
77
86
|
- `kind: "file"`은 AttachmentItem이 filename 확장자로 FileIcon을 자동 결정.
|
|
78
87
|
|
|
79
88
|
### 레이아웃
|
|
80
|
-
- 외곽(framed): hairline border, `var(--bg)`, radius
|
|
81
|
-
- 외곽(flush): border·radius·shadow 전부 0
|
|
82
|
-
- **스크롤 룰**: root `padding: 0; overflow: hidden`. textarea에 상·하·좌·우 padding 전부 → 긴 글 스크롤 시 글이 root border까지 흘러 자연스레 clip. (wrapper에 padding 두면 scroll 시 "빈 띠"가 남아
|
|
89
|
+
- 외곽(framed): hairline border, `var(--bg)`, radius=`radius-md`(Shape 축), `--shadow-md`
|
|
90
|
+
- 외곽(flush): border·radius·shadow 전부 0: bg만 유지. 바깥 shell(사이드바 바닥·바텀바)이 경계를 책임지는 자리 전용
|
|
91
|
+
- **스크롤 룰**: root `padding: 0; overflow: hidden`. textarea에 상·하·좌·우 padding 전부 → 긴 글 스크롤 시 글이 root border까지 흘러 자연스레 clip. (wrapper에 padding 두면 scroll 시 "빈 띠"가 남아 어색: [[primitives/scroll]])
|
|
83
92
|
- focus-within에서 ring
|
|
84
93
|
- 내부 세로 gap: `--space-2`, padding: `--space-3`
|
|
85
94
|
- **MultiLine**: `attachments → quotation → [textarea / footer]` 세로
|
|
95
|
+
- **SingleLine + separateSend**: attachments → quotation → [입력 · attach · model] + 분리된 send. 입력 표면은 appearance가 결정한다.
|
|
86
96
|
- **SingleLine**: `attachments → quotation → [attach · input · model · send]` 가로 한 줄
|
|
87
97
|
- Attach/Model/Send: footer 안에서 좌측(attach) 우측(model+send) 분리
|
|
88
98
|
|
|
@@ -95,9 +105,54 @@ type ChatAttachment =
|
|
|
95
105
|
| FileUpload | `attachments.length > 0` | attachments 바 노출 |
|
|
96
106
|
| Quotation | `quotation != null` | quotation bar 노출 |
|
|
97
107
|
| Streaming | `isStreaming && onStop` | send 자리에 stop (square icon) |
|
|
108
|
+
| SendDisabled | `sendDisabled` | 입력·첨부 유지, 전송 버튼 비활성 및 Enter/submit 차단 |
|
|
98
109
|
| Disabled | `disabled` | opacity 0.5, pointer-events none |
|
|
99
110
|
|
|
100
111
|
<!-- component-contract -->
|
|
101
112
|
```json
|
|
102
113
|
{"roles":["chat-input"],"native":[],"hints":[],"requires":["ThemeController"]}
|
|
103
114
|
```
|
|
115
|
+
|
|
116
|
+
### 이름 호환
|
|
117
|
+
- AI 전용 신규 조립에서는 `AIChatInput`과 `AIChatInputProps`를 사용한다. 기존 `ChatInput` export 및 문서 경로는 호환 유지한다. 팀 채팅은 [[components/chat-composer]]·[[components/chat-message]]를 사용한다.
|
|
118
|
+
|
|
119
|
+
### 입력 조립 훅
|
|
120
|
+
- `inputRef`로 실제 textarea ref를 전달한다. `inputProps`는 접근성 이름·autoFocus·추천 메뉴 키보드 이벤트 등을 제공하며 controlled value/disabled/기본 입력 동작을 덮지 않는다. onKeyDown에서 preventDefault하면 기본 전송을 건너뛴다.
|
|
121
|
+
- `formProps`는 내부 form 속성, `rootProps`는 외부 div 속성, `tools`는 첨부 옆 추가 조작, `sendLabel`은 전송 버튼 접근성 이름이다. ChatComposer가 이 API를 조합한다.
|
|
122
|
+
- `maxRows`는 single/multi 스크롤 상한에 실제 적용된다. `sendDisabled`는 편집과 첨부를 유지하고 전송만 차단한다. disabled 동안 파일 선택·첨부 삭제·인용 삭제를 차단한다.
|
|
123
|
+
|
|
124
|
+
### Send 상호작용
|
|
125
|
+
- 공용 SendButton은 hover 가능한 포인터에서 살짝 상승·확대하고 arrow-up/paper-plane 아이콘은 전송 방향으로 이동한다. press는 수축·표면 톤으로 구분한다. solid/ghost/soft 모두 같은 동작 계약을 사용한다.
|
|
126
|
+
- disabled는 hover/press에 반응하지 않는다. streaming의 stop 아이콘은 방향 이동하지 않는다. motion-distance-scale로 이동·확대를 조절하며 motion=none 및 reduced-motion에서는 이동/확대를 없앤다.
|
|
127
|
+
|
|
128
|
+
- `editor`는 기본 textarea를 대체하는 소비자 입력 슬롯이다. value의 평문 투영을 전달해 전송 가능 여부를 유지하고, custom editor의 ref/선택/키보드/IME/disabled 계약은 호스트가 관리한다. ChatComposer의 리치 입력 사례가 이를 사용한다.
|
|
129
|
+
|
|
130
|
+
### 업로드 진행
|
|
131
|
+
- ChatAttachmentImage/File의 `uploadProgress?: number`(0~100)는 업로드 중인 첨부다. 이미지에는 AttachmentThumb 로더만 표시하고 진행 바는 표시하지 않는다. 파일에는 AttachmentItem loading/ProgressBar를 조합한다. 이 값이 있는 동안 Enter·버튼 전송을 차단한다.100% 표시 이후 업로드 확인을 받으면 호스트가 속성을 제거하여 첨부 완료로 전환한다. 실제 업로드/실패/취소와 서버 ID는 호스트 책임이다.
|
|
132
|
+
|
|
133
|
+
### 입력 타이포
|
|
134
|
+
- 입력 본문은 메시지와 같은 text-base/lh-base를 사용한다. 기본15.5px/26px이며 폰트 축을 따른다. multi/single 최대 행 수·버튼 정렬·분리 전송 높이도 이 행 높이로 계산한다. 모델 라벨 등 보조 조작은 기존 위계를 유지한다.
|
|
135
|
+
|
|
136
|
+
- 빈 입력과 한 줄 입력의 높이를 동일하게 유지한다. auto-resize는 line-height/padding의 소수점 치수를 유지하고 theme/font/폭 변경을 다시 측정한다. 여러 줄을 지우면 한 줄 높이로 돌아온다.
|
|
137
|
+
|
|
138
|
+
- 첨부 목록은 가로·세로 모두 space-2(기본8px) gap으로 wrap한다.
|
|
139
|
+
|
|
140
|
+
### filled 포커스
|
|
141
|
+
|
|
142
|
+
filled 입력은 포커스에서 기존 채움 위에 `--hover` 색을 얹는다. 포커스 전용 테두리·외곽 링·그림자를 추가하지 않는다. outline 입력의 경계 기반 포커스는 유지한다.
|
|
143
|
+
|
|
144
|
+
### 입력 타이포
|
|
145
|
+
- 루트 글꼴은 `--font-normal`을 사용하고 multi/single 네이티브 입력의 자간은 상위에서 상속한다. 브라우저 기본 textarea 자간으로 돌아가지 않게 하며 placeholder도 같은 글꼴·자간을 따른다.
|
|
146
|
+
|
|
147
|
+
- 플레이스홀더는 fg-subtle의 연한 보조 색을 사용한다. 일반 채팅과 AI 채팅 모두 같은 엔진에 적용한다. 파일 첨부 데이터의 downloadUrl은 호스트가 소유하며, 보낸 메시지에서 AttachmentItem의 onDownload로 연결한다.
|
|
148
|
+
|
|
149
|
+
- inputOverlay는 native textarea 값의 장식용 ReactNode 미러다. aria-hidden이며 키보드·IME·선택은 native 입력이 처리한다. editor와 함께 사용하지 않는다. 미러는 입력과 동일한 글꼴·행간·패딩·줄바꿈을 유지해야 한다.
|
|
150
|
+
|
|
151
|
+
<!-- generated-use-cases:start -->
|
|
152
|
+
### 사용 사례 연결
|
|
153
|
+
|
|
154
|
+
- AI chat card
|
|
155
|
+
- 문서: /en/components/chat/chat-input#use-cases
|
|
156
|
+
- 참조 원본: [AI Chat Input 사례](../use-cases/chat-chat-input.md)
|
|
157
|
+
- AI 조회: `get_guide(topic="use-cases/chat-chat-input", sections=["사례 목록", "파일 목록"])` 후 필요한 `Section:` / `Source:` 헤딩을 선택한다.
|
|
158
|
+
<!-- generated-use-cases:end -->
|