@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.
Files changed (431) hide show
  1. package/assets/components/AIMessage/AIMessage.module.css +23 -1
  2. package/assets/components/AIMessage/AIMessage.tsx +27 -7
  3. package/assets/components/Accordion/Accordion.module.css +3 -0
  4. package/assets/components/AppFrame/AppFrame.module.css +2 -0
  5. package/assets/components/AttachmentItem/AttachmentItem.module.css +50 -13
  6. package/assets/components/AttachmentItem/AttachmentItem.tsx +25 -8
  7. package/assets/components/AttachmentThumb/AttachmentThumb.module.css +12 -9
  8. package/assets/components/Avatar/Avatar.module.css +26 -11
  9. package/assets/components/Avatar/Avatar.tsx +1 -1
  10. package/assets/components/AvatarUpload/AvatarUpload.module.css +4 -3
  11. package/assets/components/Badge/Badge.module.css +96 -70
  12. package/assets/components/Badge/Badge.tsx +33 -25
  13. package/assets/components/Breadcrumb/Breadcrumb.module.css +8 -4
  14. package/assets/components/Breadcrumb/Breadcrumb.tsx +1 -1
  15. package/assets/components/Bubble/Bubble.module.css +6 -0
  16. package/assets/components/Button/Button.module.css +6 -0
  17. package/assets/components/Calendar/Calendar.module.css +244 -0
  18. package/assets/components/Calendar/Calendar.tsx +419 -0
  19. package/assets/components/Calendar/index.ts +2 -0
  20. package/assets/components/Callout/Callout.module.css +54 -7
  21. package/assets/components/Callout/Callout.tsx +26 -2
  22. package/assets/components/Callout/index.ts +1 -1
  23. package/assets/components/Canvas/Canvas.module.css +75 -0
  24. package/assets/components/Canvas/Canvas.tsx +699 -0
  25. package/assets/components/Canvas/alignment.ts +34 -0
  26. package/assets/components/Canvas/clipboard.ts +30 -0
  27. package/assets/components/Canvas/collision.ts +67 -0
  28. package/assets/components/Canvas/edgeOptions.ts +11 -0
  29. package/assets/components/Canvas/graph.ts +11 -0
  30. package/assets/components/Canvas/history.ts +41 -0
  31. package/assets/components/Canvas/index.ts +4 -0
  32. package/assets/components/Canvas/selection.ts +56 -0
  33. package/assets/components/Canvas/tokens.css +61 -0
  34. package/assets/components/Canvas/types.ts +27 -0
  35. package/assets/components/Canvas/useCanvasSettlement.ts +79 -0
  36. package/assets/components/CanvasEdge/CanvasEdge.module.css +62 -0
  37. package/assets/components/CanvasEdge/CanvasEdge.tsx +121 -0
  38. package/assets/components/CanvasEdge/geometry.ts +350 -0
  39. package/assets/components/CanvasEdge/index.ts +4 -0
  40. package/assets/components/CanvasEdge/interactions.ts +14 -0
  41. package/assets/components/CanvasEdge/tokens.css +29 -0
  42. package/assets/components/CanvasNode/CanvasNode.module.css +234 -30
  43. package/assets/components/CanvasNode/CanvasNode.tsx +95 -28
  44. package/assets/components/CanvasNode/index.ts +1 -1
  45. package/assets/components/CanvasNode/runningOutline.ts +59 -0
  46. package/assets/components/CanvasNode/tokens.css +76 -13
  47. package/assets/components/Card/Card.module.css +5 -0
  48. package/assets/components/Chart/Chart.module.css +278 -0
  49. package/assets/components/Chart/Chart.tsx +385 -0
  50. package/assets/components/Chart/entrance.tsx +57 -0
  51. package/assets/components/Chart/index.ts +14 -0
  52. package/assets/components/ChatComposer/ChatComposer.module.css +17 -0
  53. package/assets/components/ChatComposer/ChatComposer.tsx +131 -0
  54. package/assets/components/ChatComposer/index.ts +2 -0
  55. package/assets/components/ChatInput/ChatInput.module.css +197 -30
  56. package/assets/components/ChatInput/ChatInput.tsx +137 -45
  57. package/assets/components/ChatInput/SendButton.tsx +4 -1
  58. package/assets/components/ChatInput/index.ts +5 -0
  59. package/assets/components/ChatMessage/ChatMessage.module.css +19 -0
  60. package/assets/components/ChatMessage/ChatMessage.tsx +63 -0
  61. package/assets/components/ChatMessage/index.ts +2 -0
  62. package/assets/components/ChatReactions/ChatReactions.module.css +15 -0
  63. package/assets/components/ChatReactions/ChatReactions.tsx +58 -0
  64. package/assets/components/ChatReactions/index.ts +2 -0
  65. package/assets/components/Checkbox/Checkbox.module.css +39 -0
  66. package/assets/components/Checkbox/Checkbox.tsx +99 -14
  67. package/assets/components/Checkbox/index.ts +1 -1
  68. package/assets/components/CheckboxCard/CheckboxCard.module.css +1 -177
  69. package/assets/components/CheckboxCard/CheckboxCard.tsx +6 -72
  70. package/assets/components/Chip/Chip.module.css +20 -30
  71. package/assets/components/Code/Code.module.css +1 -0
  72. package/assets/components/CodeBlock/CodeBlock.module.css +113 -13
  73. package/assets/components/CodeBlock/CodeBlock.tsx +114 -29
  74. package/assets/components/CodeBlock/SyntaxHighlight.tsx +20 -0
  75. package/assets/components/CodeBlock/diff-lines.ts +21 -0
  76. package/assets/components/CodeBlock/index.ts +2 -1
  77. package/assets/components/CodeBlock/line-preview.ts +7 -0
  78. package/assets/components/CodeBlock/syntax-highlighter.ts +96 -0
  79. package/assets/components/CodeBlock/use-syntax-tokens.ts +17 -0
  80. package/assets/components/ColorArea/ColorArea.module.css +3 -0
  81. package/assets/components/ColorField/ColorField.module.css +19 -190
  82. package/assets/components/ColorField/ColorField.tsx +116 -107
  83. package/assets/components/ColorPicker/ColorPicker.module.css +310 -0
  84. package/assets/components/ColorPicker/ColorPicker.tsx +387 -0
  85. package/assets/components/ColorPicker/index.ts +16 -0
  86. package/assets/components/ColorSlider/ColorSlider.module.css +15 -12
  87. package/assets/components/ColorSlider/ColorSlider.tsx +3 -3
  88. package/assets/components/ColorSwatch/ColorSwatch.module.css +2 -2
  89. package/assets/components/ColorSwatchPicker/ColorSwatchPicker.module.css +4 -3
  90. package/assets/components/Combobox/Combobox.module.css +21 -4
  91. package/assets/components/Combobox/Combobox.tsx +38 -22
  92. package/assets/components/CommandPalette/CommandPalette.module.css +19 -24
  93. package/assets/components/CommandPalette/CommandPalette.tsx +7 -5
  94. package/assets/components/Comment/Comment.module.css +25 -0
  95. package/assets/components/Comment/Comment.tsx +44 -0
  96. package/assets/components/Comment/CommentComposer.module.css +26 -0
  97. package/assets/components/Comment/CommentComposer.tsx +56 -0
  98. package/assets/components/Comment/CommentEditor.module.css +8 -0
  99. package/assets/components/Comment/CommentEditor.tsx +43 -0
  100. package/assets/components/Comment/CommentMentionInput.module.css +9 -0
  101. package/assets/components/Comment/CommentMentionInput.tsx +150 -0
  102. package/assets/components/Comment/index.ts +9 -0
  103. package/assets/components/Comment/types.ts +1 -0
  104. package/assets/components/ContextMenu/ContextMenu.module.css +5 -2
  105. package/assets/components/ContextMenu/ContextMenu.tsx +5 -0
  106. package/assets/components/ControlGroup/ControlGroup.module.css +20 -7
  107. package/assets/components/DataTable/DataTable.module.css +2 -0
  108. package/assets/components/DatePicker/DateField.tsx +72 -25
  109. package/assets/components/DatePicker/DatePicker.module.css +56 -54
  110. package/assets/components/DatePicker/DatePicker.tsx +86 -40
  111. package/assets/components/DatePicker/TimeSelector.tsx +1 -1
  112. package/assets/components/Disclosure/Disclosure.module.css +1 -0
  113. package/assets/components/Drawer/Drawer.module.css +23 -19
  114. package/assets/components/Drawer/Drawer.tsx +20 -24
  115. package/assets/components/DropdownMenu/DropdownMenu.tsx +5 -0
  116. package/assets/components/EmojiPicker/EmojiGlyph.module.css +2 -0
  117. package/assets/components/EmojiPicker/EmojiGlyph.tsx +12 -0
  118. package/assets/components/EmojiPicker/EmojiPicker.module.css +43 -0
  119. package/assets/components/EmojiPicker/EmojiPicker.tsx +143 -0
  120. package/assets/components/EmojiPicker/UNICODE-LICENSE.txt +39 -0
  121. package/assets/components/EmojiPicker/data.ts +41 -0
  122. package/assets/components/EmojiPicker/emojiData-0.json +1 -0
  123. package/assets/components/EmojiPicker/emojiData-1.json +1 -0
  124. package/assets/components/EmojiPicker/emojiData-2.json +1 -0
  125. package/assets/components/EmojiPicker/emojiData-3.json +1 -0
  126. package/assets/components/EmojiPicker/emojiData.sources.json +35 -0
  127. package/assets/components/EmojiPicker/emojiData.ts +8 -0
  128. package/assets/components/EmojiPicker/emojiFallbacks.json +1 -0
  129. package/assets/components/EmojiPicker/index.ts +4 -0
  130. package/assets/components/EmptyState/EmptyState.module.css +2 -2
  131. package/assets/components/EventChip/EventChip.module.css +120 -53
  132. package/assets/components/EventChip/EventChip.tsx +54 -6
  133. package/assets/components/EventChip/index.ts +1 -1
  134. package/assets/components/EventListItem/EventListItem.module.css +3 -0
  135. package/assets/components/EventListItem/EventListItem.tsx +15 -8
  136. package/assets/components/FileIcon/FileIcon.module.css +6 -6
  137. package/assets/components/FileUpload/FileUpload.module.css +10 -3
  138. package/assets/components/FileUpload/FileUpload.tsx +5 -9
  139. package/assets/components/FileUpload/FileUploadItem.tsx +34 -0
  140. package/assets/components/GalleryItem/GalleryItem.module.css +16 -19
  141. package/assets/components/GeneratedImage/GeneratedImage.module.css +2 -0
  142. package/assets/components/Icon/Icon.tsx +264 -1088
  143. package/assets/components/Icon/LucideFamilyIcon.tsx +436 -0
  144. package/assets/components/Icon/MissingIcon.tsx +25 -0
  145. package/assets/components/Icon/SolarFamilyIcon.tsx +443 -0
  146. package/assets/components/Icon/catalogNames.ts +8 -0
  147. package/assets/components/Icon/context.tsx +1 -1
  148. package/assets/components/Icon/index.ts +2 -0
  149. package/assets/components/Icon/lucideCatalog.ts +11358 -0
  150. package/assets/components/Icon/phosphorCatalog.ts +3052 -0
  151. package/assets/components/Icon/solarCatalog.ts +16064 -0
  152. package/assets/components/IconButton/IconButton.module.css +3 -2
  153. package/assets/components/Input/Input.module.css +63 -22
  154. package/assets/components/Input/Input.tsx +21 -10
  155. package/assets/components/Kanban/Kanban.module.css +6 -0
  156. package/assets/components/ListItem/ListItem.module.css +9 -6
  157. package/assets/components/MenuItem/MenuItem.module.css +24 -22
  158. package/assets/components/MenuItem/MenuItem.tsx +12 -12
  159. package/assets/components/MessageActions/MessageActions.module.css +38 -2
  160. package/assets/components/MessageActions/MessageActions.tsx +53 -28
  161. package/assets/components/MessageQuote/MessageQuote.module.css +1 -0
  162. package/assets/components/MessageSources/MessageSources.module.css +2 -0
  163. package/assets/components/MessageState/MessageState.module.css +1 -1
  164. package/assets/components/MetricCard/MetricCard.module.css +96 -108
  165. package/assets/components/MetricCard/MetricCard.tsx +45 -23
  166. package/assets/components/MetricCard/tokens.css +10 -0
  167. package/assets/components/MiniCalendar/MiniCalendar.module.css +130 -0
  168. package/assets/components/MiniCalendar/MiniCalendar.tsx +161 -0
  169. package/assets/components/MiniCalendar/index.ts +2 -0
  170. package/assets/components/Modal/Modal.module.css +13 -4
  171. package/assets/components/Modal/Modal.tsx +4 -0
  172. package/assets/components/Onboarding/LayoutBuilder.tsx +12 -50
  173. package/assets/components/Onboarding/Onboarding.module.css +211 -278
  174. package/assets/components/Onboarding/OnboardingAxisPanel.tsx +81 -125
  175. package/assets/components/Onboarding/OnboardingPage.tsx +244 -467
  176. package/assets/components/Onboarding/actions.ts +5 -0
  177. package/assets/components/Onboarding/palette.css +8 -0
  178. package/assets/components/Onboarding/wizardData.ts +8 -8
  179. package/assets/components/ProgressBar/ProgressBar.module.css +42 -8
  180. package/assets/components/ProgressBar/ProgressBar.tsx +5 -6
  181. package/assets/components/ProgressBar/index.ts +0 -1
  182. package/assets/components/QuotationBar/QuotationBar.module.css +2 -0
  183. package/assets/components/Radio/Radio.module.css +2 -0
  184. package/assets/components/RadioCard/RadioCard.module.css +96 -3
  185. package/assets/components/RadioCard/RadioCard.tsx +76 -13
  186. package/assets/components/RadioCard/index.ts +1 -1
  187. package/assets/components/SegmentedChart/SegmentedChart.module.css +16 -0
  188. package/assets/components/SegmentedChart/SegmentedChart.tsx +25 -8
  189. package/assets/components/Select/Select.module.css +9 -7
  190. package/assets/components/Select/Select.tsx +22 -6
  191. package/assets/components/Shortcut/Shortcut.module.css +2 -0
  192. package/assets/components/Sidebar/Sidebar.module.css +1 -0
  193. package/assets/components/Sidebar/Sidebar.tsx +2 -2
  194. package/assets/components/Skeleton/Skeleton.module.css +33 -0
  195. package/assets/components/Skeleton/Skeleton.tsx +20 -0
  196. package/assets/components/Skeleton/index.ts +2 -0
  197. package/assets/components/Skeleton/tokens.css +11 -0
  198. package/assets/components/Slider/Slider.module.css +3 -0
  199. package/assets/components/Slider/Slider.tsx +7 -2
  200. package/assets/components/Spinner/LottiePlayer.tsx +4 -4
  201. package/assets/components/Spinner/Spinner.module.css +3 -0
  202. package/assets/components/Spinner/lottieManifest.ts +3 -0
  203. package/assets/components/Stepper/Stepper.module.css +56 -8
  204. package/assets/components/Stepper/Stepper.tsx +13 -4
  205. package/assets/components/Switch/Switch.module.css +55 -42
  206. package/assets/components/Switch/Switch.tsx +6 -2
  207. package/assets/components/Switch/index.ts +1 -1
  208. package/assets/components/TabStrip/TabStrip.module.css +5 -1
  209. package/assets/components/TableCell/TableCell.module.css +8 -1
  210. package/assets/components/TableCell/TableCellBadge.tsx +7 -3
  211. package/assets/components/TableCell/TableCellImage.tsx +1 -1
  212. package/assets/components/TableCell/TableCellTag.tsx +23 -0
  213. package/assets/components/TableCell/index.ts +3 -0
  214. package/assets/components/TableHeader/TableHeader.module.css +4 -0
  215. package/assets/components/TableRow/TableRow.module.css +3 -0
  216. package/assets/components/TableRowEdit/TableRowEdit.module.css +2 -0
  217. package/assets/components/TableToolbar/TableToolbar.module.css +1 -0
  218. package/assets/components/Tabs/Tabs.module.css +23 -8
  219. package/assets/components/Tabs/Tabs.tsx +4 -3
  220. package/assets/components/Tag/Tag.module.css +101 -0
  221. package/assets/components/Tag/Tag.tsx +55 -0
  222. package/assets/components/Tag/index.ts +2 -0
  223. package/assets/components/TemplateBoundary/TemplateBoundary.tsx +22 -18
  224. package/assets/components/TemplateBoundary/types.ts +2 -0
  225. package/assets/components/Textarea/Textarea.module.css +30 -226
  226. package/assets/components/Textarea/Textarea.tsx +2 -2
  227. package/assets/components/ThemeController.tsx +30 -3
  228. package/assets/components/TimePicker/TimePicker.module.css +17 -4
  229. package/assets/components/TimePicker/TimePicker.tsx +102 -23
  230. package/assets/components/TimelineView/TimelineEventBar.tsx +109 -0
  231. package/assets/components/TimelineView/TimelineView.module.css +203 -0
  232. package/assets/components/TimelineView/TimelineView.tsx +137 -0
  233. package/assets/components/TimelineView/axis.ts +62 -0
  234. package/assets/components/TimelineView/index.ts +3 -0
  235. package/assets/components/TimelineView/layout.ts +56 -0
  236. package/assets/components/TimelineView/move.ts +51 -0
  237. package/assets/components/TimelineView/useTimelineDrag.ts +215 -0
  238. package/assets/components/TimelineView/useTimelineZoom.ts +92 -0
  239. package/assets/components/Toast/Toast.module.css +20 -0
  240. package/assets/components/Toast/Toast.tsx +1 -1
  241. package/assets/components/Toolbar/Toolbar.module.css +31 -24
  242. package/assets/components/Toolbar/Toolbar.tsx +4 -3
  243. package/assets/components/Tooltip/Tooltip.module.css +10 -0
  244. package/assets/components/Tooltip/Tooltip.tsx +50 -15
  245. package/assets/components/TopLoader/TopLoader.module.css +1 -0
  246. package/assets/components/TreeNav/TreeNav.module.css +1 -0
  247. package/assets/components/UserMessage/UserMessage.module.css +110 -1
  248. package/assets/components/UserMessage/UserMessage.tsx +138 -16
  249. package/assets/components/UserMessage/index.ts +4 -0
  250. package/assets/components/_color.ts +2 -2
  251. package/assets/components/_data.ts +37 -31
  252. package/assets/components/_utils.css +36 -5
  253. package/assets/components/axisOptions.ts +2 -0
  254. package/assets/components/component-registry.json +1731 -94
  255. package/assets/components/index.ts +23 -0
  256. package/assets/components/materialScope.tsx +11 -0
  257. package/assets/components/reset.css +1 -0
  258. package/assets/components/themeBootScript.ts +3 -2
  259. package/assets/components/tokens.css +308 -71
  260. package/assets/components/useChartEntrance.ts +119 -0
  261. package/assets/prompts/ASSEMBLY.md +20 -7
  262. package/assets/prompts/CATALOG.md +110 -92
  263. package/assets/prompts/FEEDBACK_PROCESS.md +19 -0
  264. package/assets/prompts/PRINCIPLES.md +25 -1
  265. package/assets/prompts/TEMPLATE_PREVIEWS.md +21 -0
  266. package/assets/prompts/WORKFLOW_DESIGN.md +48 -70
  267. package/assets/prompts/axes/font.md +12 -1
  268. package/assets/prompts/axes/icon.md +6 -4
  269. package/assets/prompts/axes/material.md +40 -0
  270. package/assets/prompts/axes/motion.md +2 -0
  271. package/assets/prompts/axes/palette.md +10 -2
  272. package/assets/prompts/axes/shape.md +8 -0
  273. package/assets/prompts/axes/voice.md +4 -0
  274. package/assets/prompts/components/README.md +3 -3
  275. package/assets/prompts/components/_variants.md +35 -35
  276. package/assets/prompts/components/accordion.md +15 -15
  277. package/assets/prompts/components/ai-message.md +14 -12
  278. package/assets/prompts/components/app-frame.md +16 -16
  279. package/assets/prompts/components/attachment-item.md +38 -31
  280. package/assets/prompts/components/attachment-thumb.md +14 -12
  281. package/assets/prompts/components/avatar-upload.md +10 -10
  282. package/assets/prompts/components/avatar.md +16 -16
  283. package/assets/prompts/components/badge.md +32 -97
  284. package/assets/prompts/components/breadcrumb.md +25 -24
  285. package/assets/prompts/components/bubble.md +13 -13
  286. package/assets/prompts/components/button-group.md +1 -1
  287. package/assets/prompts/components/button.md +36 -36
  288. package/assets/prompts/components/calendar.md +151 -0
  289. package/assets/prompts/components/callout.md +39 -23
  290. package/assets/prompts/components/canvas-edge.md +70 -0
  291. package/assets/prompts/components/canvas-node.md +27 -10
  292. package/assets/prompts/components/canvas.md +85 -0
  293. package/assets/prompts/components/card.md +31 -31
  294. package/assets/prompts/components/chart-bar.md +77 -0
  295. package/assets/prompts/components/chart-pie.md +63 -0
  296. package/assets/prompts/components/chart-radar.md +56 -0
  297. package/assets/prompts/components/chart-radial.md +56 -0
  298. package/assets/prompts/components/chart.md +129 -0
  299. package/assets/prompts/components/chat-composer.md +71 -0
  300. package/assets/prompts/components/chat-input.md +82 -27
  301. package/assets/prompts/components/chat-message.md +48 -0
  302. package/assets/prompts/components/chat-reactions.md +38 -0
  303. package/assets/prompts/components/checkbox-card.md +26 -45
  304. package/assets/prompts/components/checkbox.md +40 -17
  305. package/assets/prompts/components/chip.md +34 -34
  306. package/assets/prompts/components/code-block.md +109 -65
  307. package/assets/prompts/components/code.md +4 -4
  308. package/assets/prompts/components/color-area.md +9 -9
  309. package/assets/prompts/components/color-field.md +17 -13
  310. package/assets/prompts/components/color-picker.md +173 -0
  311. package/assets/prompts/components/color-slider.md +14 -14
  312. package/assets/prompts/components/color-swatch-picker.md +8 -8
  313. package/assets/prompts/components/color-swatch.md +9 -9
  314. package/assets/prompts/components/combobox.md +5 -2
  315. package/assets/prompts/components/command-palette.md +31 -30
  316. package/assets/prompts/components/comment.md +75 -0
  317. package/assets/prompts/components/context-menu.md +28 -25
  318. package/assets/prompts/components/control-group.md +4 -4
  319. package/assets/prompts/components/data-table.md +9 -0
  320. package/assets/prompts/components/date-picker.md +41 -23
  321. package/assets/prompts/components/disclosure.md +10 -10
  322. package/assets/prompts/components/drawer.md +29 -18
  323. package/assets/prompts/components/dropdown-menu.md +23 -21
  324. package/assets/prompts/components/emoji-picker.md +45 -0
  325. package/assets/prompts/components/empty-state.md +20 -18
  326. package/assets/prompts/components/event-chip.md +70 -28
  327. package/assets/prompts/components/event-list-item.md +32 -28
  328. package/assets/prompts/components/file-icon.md +18 -19
  329. package/assets/prompts/components/file-upload.md +1 -1
  330. package/assets/prompts/components/gallery-item.md +24 -23
  331. package/assets/prompts/components/generated-image.md +10 -10
  332. package/assets/prompts/components/hint.md +19 -19
  333. package/assets/prompts/components/icon-button.md +16 -16
  334. package/assets/prompts/components/icon.md +42 -17
  335. package/assets/prompts/components/input.md +49 -46
  336. package/assets/prompts/components/kanban.md +35 -35
  337. package/assets/prompts/components/list-item.md +50 -41
  338. package/assets/prompts/components/menu-item.md +49 -44
  339. package/assets/prompts/components/message-actions.md +15 -6
  340. package/assets/prompts/components/message-quote.md +7 -7
  341. package/assets/prompts/components/message-sources.md +10 -10
  342. package/assets/prompts/components/message-state.md +17 -17
  343. package/assets/prompts/components/message-table.md +5 -5
  344. package/assets/prompts/components/metric-card.md +57 -109
  345. package/assets/prompts/components/mini-calendar.md +77 -0
  346. package/assets/prompts/components/modal.md +40 -39
  347. package/assets/prompts/components/multi-select.md +4 -1
  348. package/assets/prompts/components/onboarding.md +23 -19
  349. package/assets/prompts/components/page-header.md +42 -33
  350. package/assets/prompts/components/pagination.md +17 -17
  351. package/assets/prompts/components/progress-bar.md +26 -13
  352. package/assets/prompts/components/quotation-bar.md +10 -10
  353. package/assets/prompts/components/radio-card.md +34 -117
  354. package/assets/prompts/components/radio.md +9 -9
  355. package/assets/prompts/components/segmented-chart.md +19 -5
  356. package/assets/prompts/components/select.md +29 -25
  357. package/assets/prompts/components/shortcut.md +11 -11
  358. package/assets/prompts/components/sidebar.md +67 -58
  359. package/assets/prompts/components/skeleton.md +47 -0
  360. package/assets/prompts/components/slider.md +18 -18
  361. package/assets/prompts/components/spinner.md +16 -16
  362. package/assets/prompts/components/stepper.md +29 -15
  363. package/assets/prompts/components/switch.md +30 -26
  364. package/assets/prompts/components/tab-strip.md +32 -31
  365. package/assets/prompts/components/table-cell.md +9 -7
  366. package/assets/prompts/components/table-header.md +16 -16
  367. package/assets/prompts/components/table-row-edit.md +19 -19
  368. package/assets/prompts/components/table-row-select.md +9 -9
  369. package/assets/prompts/components/table-row.md +29 -20
  370. package/assets/prompts/components/table-toolbar.md +9 -0
  371. package/assets/prompts/components/tabs.md +30 -27
  372. package/assets/prompts/components/tag.md +54 -0
  373. package/assets/prompts/components/textarea.md +16 -15
  374. package/assets/prompts/components/time-picker.md +22 -14
  375. package/assets/prompts/components/timeline-view.md +129 -0
  376. package/assets/prompts/components/toast.md +43 -42
  377. package/assets/prompts/components/toolbar.md +36 -23
  378. package/assets/prompts/components/tooltip.md +36 -17
  379. package/assets/prompts/components/top-loader.md +12 -12
  380. package/assets/prompts/components/topbar.md +43 -34
  381. package/assets/prompts/components/tree-nav.md +10 -10
  382. package/assets/prompts/components/user-message.md +23 -12
  383. package/assets/prompts/design-examples/README.md +1 -1
  384. package/assets/prompts/design-examples/ai-chat-full-page.png +0 -0
  385. package/assets/prompts/design-examples/catalog.json +124 -1
  386. package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.module.css +346 -0
  387. package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.tsx +375 -0
  388. package/assets/prompts/design-examples/sources/ai-chat-full-page/FullPageChat.tsx +8 -0
  389. package/assets/prompts/design-examples/sources/ai-chat-full-page/REFERENCE.md +19 -0
  390. package/assets/prompts/design-examples/sources/ai-chat-full-page/useChatDemo.ts +139 -0
  391. package/assets/prompts/design-examples/sources/ai-chat-full-page/useDemoTextStream.ts +30 -0
  392. package/assets/prompts/primitives/emerge.md +2 -0
  393. package/assets/prompts/templates/README.md +1 -1
  394. package/assets/prompts/templates/ains.md +9 -1
  395. package/assets/prompts/templates/aurora.md +5 -4
  396. package/assets/prompts/templates/minimal.md +14 -6
  397. package/assets/prompts/templates/onboarding.md +156 -0
  398. package/assets/prompts/templates/workspace.md +16 -11
  399. package/assets/prompts/tokens/color.md +11 -4
  400. package/assets/prompts/tokens/material.md +51 -0
  401. package/assets/prompts/tokens/radius.md +34 -0
  402. package/assets/prompts/tokens/typography.md +24 -2
  403. package/assets/prompts/use-cases/chart-chart-area.md +1334 -0
  404. package/assets/prompts/use-cases/chart-chart-bar.md +1886 -0
  405. package/assets/prompts/use-cases/chart-chart-pie.md +1031 -0
  406. package/assets/prompts/use-cases/chart-chart-radar.md +785 -0
  407. package/assets/prompts/use-cases/chart-chart-radial.md +988 -0
  408. package/assets/prompts/use-cases/chart-segmented-chart.md +262 -0
  409. package/assets/prompts/use-cases/chat-chat-composer.md +529 -0
  410. package/assets/prompts/use-cases/chat-chat-input.md +1766 -0
  411. package/assets/prompts/use-cases/data-comment.md +360 -0
  412. package/assets/prompts/use-cases/data-data-table.md +249 -0
  413. package/assets/prompts/use-cases/data-list-item.md +1056 -0
  414. package/assets/prompts/use-cases/data-metric-card.md +673 -0
  415. package/assets/prompts/use-cases/data-table-row.md +966 -0
  416. package/assets/prompts/use-cases/data-table-toolbar.md +481 -0
  417. package/assets/prompts/use-cases/feedback-drawer.md +1168 -0
  418. package/assets/prompts/use-cases/feedback-progress-bar.md +432 -0
  419. package/assets/prompts/use-cases/general-toolbar.md +854 -0
  420. package/assets/prompts/use-cases/general-tooltip.md +652 -0
  421. package/assets/prompts/use-cases/input-checkbox.md +443 -0
  422. package/assets/prompts/use-cases/structure-card.md +603 -0
  423. package/assets/prompts/use-cases/structure-page-header.md +755 -0
  424. package/assets/prompts/use-cases/structure-sidebar.md +1132 -0
  425. package/assets/prompts/use-cases/structure-topbar.md +1196 -0
  426. package/assets/public/ovenn-wordmark.svg +19 -0
  427. package/assets/skills/ovenn-wireframe/SKILL.md +17 -4
  428. package/package.json +10 -2
  429. package/src/commands/info.js +1 -1
  430. package/src/utils/design-examples.js +3 -4
  431. package/assets/prompts/templates/glass-button.md +0 -336
@@ -1,52 +1,53 @@
1
1
  "use client";
2
2
 
3
- import { useEffect, useMemo, useState } from "react";
4
- import { Badge } from "../Badge";
3
+ import { useEffect, useMemo, useRef, useState } from "react";
5
4
  import { Button } from "../Button";
5
+ import { Card } from "../Card";
6
6
  import { Icon } from "../Icon";
7
- import { Chip } from "../Chip";
8
- import { Input } from "../Input";
9
- import { CheckboxCard } from "../CheckboxCard";
7
+ import { Disclosure } from "../Disclosure";
8
+ import { Tabs } from "../Tabs";
9
+ import { Modal } from "../Modal";
10
+ import { Radio } from "../Radio";
11
+ import { ColorPicker } from "../ColorPicker";
12
+ import { ColorSwatch } from "../ColorSwatch";
13
+ import { Checkbox } from "../Checkbox";
14
+ import { parseColor } from "react-aria-components";
15
+ import { RadioCard } from "../RadioCard";
10
16
  import { Stepper } from "../Stepper";
11
- import { isValidHex, normalizeHex } from "../_color";
12
- import { paletteSetPresets, type PaletteSet } from "../_data";
17
+ import { PALETTE_SET_ANGLES, hexToOklch, isValidHex, normalizeHex } from "../_color";
18
+ import { type PaletteSet, type MaterialValue } from "../_data";
13
19
  import { useTheme } from "../ThemeController";
14
20
  import { OnboardingAxisPanel } from "./OnboardingAxisPanel";
15
21
  import { applyOnboarding, checkExistingFiles } from "./actions";
16
- import { PresetsGallery } from "./PresetsGallery";
17
22
  import { LayoutBuilder } from "./LayoutBuilder";
18
23
  import { DocsIndex } from "./DocsIndex";
19
24
  import {
20
25
  getDensityChoices,
21
26
  getLayoutChoices,
22
27
  getPaletteChoices,
23
- getThemeChoices,
24
28
  getVibeChoices,
25
- THEME_PRESETS,
26
- THEME_VIBE_FALLBACK,
27
29
  type DensityChoiceId,
28
30
  type Lang,
29
31
  type LayoutId,
30
- type ThemeId,
31
32
  type VibeId,
32
33
  } from "./wizardData";
33
34
  import styles from "./Onboarding.module.css";
34
35
  import "./palette.css";
35
36
 
36
- type StepKey = "theme" | "vibe" | "color" | "density" | "layout" | "summary";
37
+ type StepKey = "vibe" | "color" | "density" | "material" | "layout" | "summary";
37
38
 
38
39
  const LABELS = {
39
40
  ko: {
40
41
  steps: {
41
- theme: { title: "디자인 스타일", hint: "시작 번들. 축 디폴트 + DESIGN.md가 함께 적용." },
42
- vibe: { title: "프로덕트 분위기", hint: "코너 · 모션 · 강조색이 세트로 결정." },
42
+ material: { title: "표면 재질", hint: "솔리드 또는 글래스" },
43
+ vibe: { title: "프로덕트 분위기", hint: "모서리 · 모션의 기본 조합" },
43
44
  density: { title: "정보 밀도", hint: "한 화면에 얼마나 빽빽하게 담을지." },
44
45
  color: { title: "컬러 & 톤", hint: "팔레트 선택 + 브랜드 색." },
45
46
  layout: { title: "레이아웃", hint: "사이드바 · 탑바 조합." },
46
47
  summary: { title: "요약 & 적용", hint: "선택을 확인하고 프로젝트에 반영." },
47
48
  },
48
49
  stepTitle: {
49
- theme: "디자인 스타일을 적용할까요?",
50
+ material: "표면의 재질을 골라주세요",
50
51
  vibe: "이 프로덕트는 어떤 톤인가요?",
51
52
  color: "컬러는 어떻게 갈까요?",
52
53
  density: "화면에 정보가 얼마나 많나요?",
@@ -54,18 +55,16 @@ const LABELS = {
54
55
  summary: "이렇게 설정할게요",
55
56
  },
56
57
  stepLead: {
57
- theme:
58
- "스타일을 고르면 축 디폴트와 DESIGN.md가 함께 적용돼요. 축은 뒤에서 자유롭게 바꿀 수 있어요.",
59
- vibe: "가장 가까운 하나만 골라주세요. Shape · Motion · Icon Weight가 세트로 결정돼요.",
58
+ material: "글래스는 메뉴·모달처럼 떠 있는 표면에 적용됩니다. 입력 필드와 본문은 선명하게 유지돼요.",
59
+ vibe: "모서리와 모션의 기본 조합을 선택하세요. 세부 값은 마지막 단계에서 조정할 수 있어요.",
60
60
  color:
61
- "먼저 팔레트를 고르고, 그 다음 브랜드 색을 슬라이더로 조정하거나 hex로 직접 넣어주세요.",
61
+ "밝기와 브랜드 색을 정하고, 함께 사용할 색 조합을 선택하세요.",
62
62
  density: "한 화면에 담을 정보량. Density 축이 결정돼요.",
63
63
  layout: "쓰임새에 맞는 사이드바·탑바 조합.",
64
- summary:
65
- "선택을 확인하고 프로젝트에 적용하세요. 언제든 자유 조정으로 세부 축을 바꿀 수 있어요.",
64
+ summary: "",
66
65
  },
67
- back: "Back",
68
- next: "Next",
66
+ back: "이전",
67
+ next: "다음",
69
68
  applyThisSetup: "이 설정 적용",
70
69
  applyError: {
71
70
  emptySelection: "선택값이 비어있습니다",
@@ -110,7 +109,6 @@ const LABELS = {
110
109
  brand: "Ovenn 온보딩",
111
110
  freeMode: "자유 조정",
112
111
  },
113
- themePreview: "preview image TBD",
114
112
  color: {
115
113
  modeHeading: "밝기 모드",
116
114
  modeAria: "밝기 모드",
@@ -119,7 +117,7 @@ const LABELS = {
119
117
  paletteHeading: "조화 세트",
120
118
  paletteAria: "조화 세트",
121
119
  brandHeading: "브랜드 색",
122
- monoHeading: "Mono",
120
+ monoHeading: "무채색",
123
121
  monoOn: "ON — primary와 chart는 모드 기반 명도 단계 흑백",
124
122
  monoOff: "OFF — 아이콘·secondary 전부 brand 톤",
125
123
  hexPlaceholder: "#3B5BDB",
@@ -127,19 +125,19 @@ const LABELS = {
127
125
  hexHint: "입력한 색을 primary로 그대로 사용해요",
128
126
  },
129
127
  summary: {
130
- themeLabel: "디자인 스타일",
128
+ materialLabel: "표면 재질",
131
129
  vibeLabel: "분위기",
132
130
  colorLabel: "컬러 & 톤",
133
131
  densityLabel: "정보 밀도",
134
132
  layoutLabel: "레이아웃",
135
133
  custom: "Custom",
136
134
  none: "—",
137
- hint: "한 번 적용한 뒤 축을 바꾸면 이미 쌓인 컴포넌트·레이아웃이 자동 보정되지 않아요. 지금 신중히 결정해주세요.",
135
+ hint: "적용하면 프로젝트 설정과 디자인 결정 문서가 저장됩니다.",
138
136
  advanced: "고급 설정",
139
137
  },
140
138
  free: {
141
139
  title: "자유 조정",
142
- lead: "좌측 축을 직접 조작하거나 아래에서 프리셋·레이아웃·문서를 골라 보세요.",
140
+ lead: "축을 직접 조정하고 레이아웃과 컴포넌트 문서를 확인하세요.",
143
141
  backToWizard: "← 위저드로",
144
142
  tabPresets: "프리셋",
145
143
  tabLayout: "레이아웃",
@@ -148,15 +146,15 @@ const LABELS = {
148
146
  },
149
147
  en: {
150
148
  steps: {
151
- theme: { title: "Design style", hint: "Starter bundle. Axis defaults plus DESIGN.md." },
152
- vibe: { title: "Product tone", hint: "Corners, motion, and accent decided as a set." },
149
+ material: { title: "Material", hint: "Solid or glass surfaces" },
150
+ vibe: { title: "Product tone", hint: "Default corners and motion" },
153
151
  density: { title: "Density", hint: "How tightly to pack a screen." },
154
152
  color: { title: "Color and tone", hint: "Palette plus brand color." },
155
153
  layout: { title: "Layout", hint: "Sidebar and topbar composition." },
156
154
  summary: { title: "Review and apply", hint: "Confirm selections and apply to project." },
157
155
  },
158
156
  stepTitle: {
159
- theme: "Pick a design style",
157
+ material: "Choose a surface material" ,
160
158
  vibe: "What tone fits this product?",
161
159
  color: "How should the color feel?",
162
160
  density: "How much information per screen?",
@@ -164,15 +162,13 @@ const LABELS = {
164
162
  summary: "Your setup",
165
163
  },
166
164
  stepLead: {
167
- theme:
168
- "Picking a style applies axis defaults and DESIGN.md together. You can change axes freely later.",
169
- vibe: "Pick the closest one. Shape, Motion, and Icon Weight get decided as a set.",
165
+ material: "Glass applies to floating surfaces such as menus and dialogs. Fields and content stay clear.",
166
+ vibe: "Choose default corners and motion. Fine-tune individual axes in the final step.",
170
167
  color:
171
- "Pick a palette first, then adjust the brand color with the slider or enter a hex directly.",
168
+ "Choose a mode, brand color, and a matching color harmony.",
172
169
  density: "How much info fits on screen. Sets the Density axis.",
173
170
  layout: "The sidebar and topbar combination that fits your use.",
174
- summary:
175
- "Confirm selections and apply. You can tweak individual axes in free mode anytime.",
171
+ summary: "",
176
172
  },
177
173
  back: "Back",
178
174
  next: "Next",
@@ -220,7 +216,6 @@ const LABELS = {
220
216
  brand: "Ovenn onboarding",
221
217
  freeMode: "Free mode",
222
218
  },
223
- themePreview: "preview image TBD",
224
219
  color: {
225
220
  modeHeading: "Light or dark",
226
221
  modeAria: "Light or dark",
@@ -229,7 +224,7 @@ const LABELS = {
229
224
  paletteHeading: "Harmony set",
230
225
  paletteAria: "Harmony set",
231
226
  brandHeading: "Brand color",
232
- monoHeading: "Mono",
227
+ monoHeading: "Grayscale",
233
228
  monoOn: "ON — primary and charts use mode-aware grayscale steps",
234
229
  monoOff: "OFF — icon and secondary follow brand",
235
230
  hexPlaceholder: "#3B5BDB",
@@ -237,7 +232,7 @@ const LABELS = {
237
232
  hexHint: "Your color is used as the primary as-is.",
238
233
  },
239
234
  summary: {
240
- themeLabel: "Design style",
235
+ materialLabel: "Material",
241
236
  vibeLabel: "Tone",
242
237
  colorLabel: "Color and tone",
243
238
  densityLabel: "Density",
@@ -249,7 +244,7 @@ const LABELS = {
249
244
  },
250
245
  free: {
251
246
  title: "Free mode",
252
- lead: "Tweak axes on the left, or pick presets, layouts, and docs below.",
247
+ lead: "Adjust individual axes and explore layouts and component docs.",
253
248
  backToWizard: "← Back to wizard",
254
249
  tabPresets: "Presets",
255
250
  tabLayout: "Layout",
@@ -259,18 +254,18 @@ const LABELS = {
259
254
  } as const;
260
255
 
261
256
  type Answers = {
262
- theme: ThemeId | null;
263
257
  vibe: VibeId | null;
264
258
  /** primary brand hex (#RRGGBB). 비어있으면 ThemeController default 사용. */
265
259
  brand: string;
266
260
  paletteSet: PaletteSet;
267
261
  mono: boolean;
268
262
  mode: "light" | "dark";
263
+ material: MaterialValue;
269
264
  density: DensityChoiceId | null;
270
265
  layout: LayoutId | null;
271
266
  };
272
267
 
273
- const STEP_KEYS: StepKey[] = ["theme", "vibe", "density", "color", "layout", "summary"];
268
+ const STEP_KEYS: StepKey[] = ["vibe", "density", "color", "material", "layout", "summary"];
274
269
 
275
270
  function getSteps(lang: Lang): { key: StepKey; title: string; hint: string }[] {
276
271
  const L = LABELS[lang];
@@ -284,6 +279,7 @@ export function OnboardingPage() {
284
279
  brand: currentBrand,
285
280
  paletteSet: currentPaletteSet,
286
281
  mono: currentMono,
282
+ material: currentMaterial,
287
283
  shape: currentShape,
288
284
  density: currentDensity,
289
285
  motionMode: currentMotion,
@@ -294,7 +290,7 @@ export function OnboardingPage() {
294
290
  setPaletteSet,
295
291
  setMono,
296
292
  setDensity,
297
- applyPreset,
293
+ setMaterial,
298
294
  voice,
299
295
  lang,
300
296
  } = useTheme();
@@ -314,34 +310,16 @@ export function OnboardingPage() {
314
310
  | { phase: "error"; message: string; files: string[] }
315
311
  >({ phase: "idle" });
316
312
  const [answers, setAnswers] = useState<Answers>({
317
- theme: "none",
318
313
  vibe: "balanced",
319
314
  brand: currentBrand,
320
- paletteSet: "analogous",
321
- mono: false,
315
+ paletteSet: currentPaletteSet,
316
+ mono: currentMono,
322
317
  mode: "light",
323
- density: "default",
318
+ material: currentMaterial,
319
+ density: currentDensity,
324
320
  layout: "topbar-sidebar",
325
321
  });
326
322
 
327
- const applyTheme = (t: ThemeId) => {
328
- setAnswers((a) => ({ ...a, theme: t }));
329
- // "none" 은 이후 축을 사용자가 직접 선택.
330
- // pure/spare/expressive는 prompts/themes/<slug>.md의 Preset을 자동 매핑하고
331
- // vibe/density도 테마가 커버하므로 answers에 미리 세팅 → vibe 단계 skip 가능.
332
- if (t === "none") return;
333
- const preset = THEME_PRESETS[t];
334
- const vibeFallback = THEME_VIBE_FALLBACK[t];
335
- applyPreset(preset);
336
- setAnswers((a) => ({
337
- ...a,
338
- theme: t,
339
- vibe: vibeFallback,
340
- density: preset.density,
341
- mode: preset.mode,
342
- }));
343
- };
344
-
345
323
  const applyMode = (m: "light" | "dark") => {
346
324
  setTheme(m);
347
325
  setAnswers((a) => ({ ...a, mode: m }));
@@ -390,13 +368,17 @@ export function OnboardingPage() {
390
368
 
391
369
  /** 적용 흐름: 1) 확인 다이얼로그 open (기존 파일 조회) → 2) 사용자 확인 → 3) 미리보기 적용 + 파일 쓰기 */
392
370
  const openApplyConfirm = async () => {
393
- const { existing } = await checkExistingFiles();
394
- setApplyState({ phase: "confirm", existing });
371
+ try {
372
+ const { existing } = await checkExistingFiles();
373
+ setApplyState({ phase: "confirm", existing });
374
+ } catch (error) {
375
+ setApplyState({ phase: "error", message: error instanceof Error ? error.message : String(error), files: [] });
376
+ }
395
377
  };
396
378
 
397
379
  const runApply = async () => {
398
380
  const layoutChoice = layoutChoices.find((c) => c.id === answers.layout);
399
- if (!answers.theme || !layoutChoice) {
381
+ if (!layoutChoice || !isValidHex(currentBrand)) {
400
382
  setApplyState({ phase: "error", message: L.applyError.emptySelection, files: [] });
401
383
  return;
402
384
  }
@@ -413,11 +395,12 @@ export function OnboardingPage() {
413
395
  const result = await applyOnboarding(
414
396
  {
415
397
  brandSet: { id: "core", version: "1" },
416
- theme: answers.theme,
417
- mode: answers.mode,
398
+ theme: "none",
399
+ mode: theme,
418
400
  brand: currentBrand,
419
401
  paletteSet: currentPaletteSet,
420
402
  mono: currentMono,
403
+ material: currentMaterial,
421
404
  shape: currentShape,
422
405
  density: currentDensity,
423
406
  motion: currentMotion,
@@ -447,6 +430,7 @@ export function OnboardingPage() {
447
430
  "ovenn-palette",
448
431
  "ovenn-hue",
449
432
  "ovenn-accent-hue",
433
+ "ovenn-material",
450
434
  "ovenn-shape",
451
435
  "ovenn-density",
452
436
  "ovenn-motion",
@@ -484,7 +468,7 @@ export function OnboardingPage() {
484
468
  }, []);
485
469
 
486
470
  // 온보딩은 설정 전 단계라 OS prefers-color-scheme이나 저장된 ovenn-mode가 dark여도
487
- // 무조건 light로 고정 (CheckboxCard 안 글자 가독성 확보).
471
+ // 무조건 light로 고정 (RadioCard 안 글자 가독성 확보).
488
472
  // theme이 dark로 돌아올 때마다 다시 light로 끌어오는 게 아니라, 마운트 시 한 번만
489
473
  // light로 세팅 — 사용자가 온보딩 안에서 축을 바꿔도 ThemeController sync effect가
490
474
  // light를 재적용함.
@@ -495,17 +479,26 @@ export function OnboardingPage() {
495
479
 
496
480
  const step = STEPS[stepIdx];
497
481
  const canGoNext = useMemo(() => {
498
- if (step.key === "theme") return answers.theme != null;
499
482
  if (step.key === "vibe") return answers.vibe != null;
500
- if (step.key === "color") return answers.paletteSet != null;
483
+ if (step.key === "color") return isValidHex(answers.brand);
501
484
  if (step.key === "density") return answers.density != null;
502
485
  if (step.key === "layout") return answers.layout != null;
503
486
  return true;
504
487
  }, [step.key, answers]);
505
488
  const totalSteps = STEPS.length;
489
+ const headingRef = useRef<HTMLHeadingElement>(null);
490
+ const applyButtonRef = useRef<HTMLButtonElement>(null);
491
+ const stepBodyRef = useRef<HTMLDivElement>(null);
492
+ useEffect(() => {
493
+ stepBodyRef.current?.scrollTo({ top: 0 });
494
+ headingRef.current?.focus({ preventScroll: true });
495
+ }, [stepIdx]);
496
+ const currentAnswers: Answers = { ...answers, mode: theme, brand: currentBrand,
497
+ paletteSet: currentPaletteSet, mono: currentMono, material: currentMaterial, density: currentDensity };
498
+ const syncAnswers = () => setAnswers(currentAnswers);
506
499
 
507
500
  if (mode === "free") {
508
- return <FreeMode onBack={() => setMode("wizard")} />;
501
+ return <FreeMode onBack={() => { syncAnswers(); setMode("wizard"); }} />;
509
502
  }
510
503
 
511
504
  return (
@@ -516,7 +509,7 @@ export function OnboardingPage() {
516
509
  steps={STEPS}
517
510
  lang={lang}
518
511
  onStepClick={(idx) => {
519
- if (idx <= stepIdx || isStepReachable(idx, answers, STEPS)) setStepIdx(idx);
512
+ if (idx <= stepIdx || isStepReachable(idx, answers, STEPS)) { if (step.key === "summary") syncAnswers(); setStepIdx(idx); }
520
513
  }}
521
514
  onFreeMode={() => setMode("free")}
522
515
  />
@@ -527,14 +520,11 @@ export function OnboardingPage() {
527
520
  <span className={styles.stepProgress}>
528
521
  {stepIdx + 1} / {totalSteps}
529
522
  </span>
530
- <h1 className={styles.stepTitle}>{L.stepTitle[step.key]}</h1>
531
- <p className={styles.stepLead}>{L.stepLead[step.key]}</p>
523
+ <h1 ref={headingRef} tabIndex={-1} className={styles.stepTitle}>{L.stepTitle[step.key]}</h1>
524
+ {L.stepLead[step.key] && <p className={styles.stepLead}>{L.stepLead[step.key]}</p>}
532
525
  </header>
533
526
 
534
- <div className={styles.stepBody}>
535
- {step.key === "theme" && (
536
- <ThemeStep value={answers.theme} onChange={applyTheme} />
537
- )}
527
+ <div ref={stepBodyRef} className={styles.stepBody}>
538
528
  {step.key === "vibe" && (
539
529
  <VibeStep value={answers.vibe} onChange={applyVibe} />
540
530
  )}
@@ -553,35 +543,37 @@ export function OnboardingPage() {
553
543
  {step.key === "density" && (
554
544
  <DensityStep value={answers.density} onChange={applyDensity} />
555
545
  )}
546
+ {step.key === "material" && <MaterialStep value={currentMaterial} onChange={setMaterial} />}
556
547
  {step.key === "layout" && (
557
548
  <LayoutStep
558
549
  value={answers.layout}
559
550
  onChange={(v) => setAnswers((a) => ({ ...a, layout: v }))}
560
551
  />
561
552
  )}
562
- {step.key === "summary" && <SummaryStep answers={answers} />}
553
+ {step.key === "summary" && <SummaryStep answers={currentAnswers} />}
563
554
  </div>
564
555
 
565
556
  <footer className={styles.stepFoot}>
566
557
  <div className={styles.stepFootActions}>
567
558
  <Button
568
559
  variant="secondary"
569
- size="lg"
560
+ size="md"
570
561
  disabled={stepIdx === 0}
571
- onClick={() => setStepIdx((i) => Math.max(0, i - 1))}
562
+ onClick={() => { if (step.key === "summary") syncAnswers(); setStepIdx((i) => Math.max(0, i - 1)); }}
572
563
  >
573
564
  {L.back}
574
565
  </Button>
575
566
  <Button
567
+ ref={applyButtonRef}
576
568
  variant="primary"
577
- size="lg"
569
+ size="md"
578
570
  disabled={!canGoNext}
579
571
  onClick={() => {
580
572
  if (stepIdx === totalSteps - 1) {
581
573
  openApplyConfirm();
582
574
  return;
583
575
  }
584
- setStepIdx((i) => nextStepIdx(i, answers, STEPS));
576
+ setStepIdx((i) => Math.min(totalSteps - 1, i + 1));
585
577
  }}
586
578
  rightIcon={
587
579
  stepIdx === totalSteps - 1 ? undefined : <Icon name="arrow-right" />
@@ -600,6 +592,7 @@ export function OnboardingPage() {
600
592
  lang={lang}
601
593
  onCancel={() => setApplyState({ phase: "idle" })}
602
594
  onConfirm={runApply}
595
+ onRestoreFocus={() => applyButtonRef.current?.focus()}
603
596
  />
604
597
  )}
605
598
  </div>
@@ -621,21 +614,22 @@ function ApplyDialog({
621
614
  lang,
622
615
  onCancel,
623
616
  onConfirm,
617
+ onRestoreFocus,
624
618
  }: {
625
619
  state: ApplyState;
626
620
  lang: Lang;
627
621
  onCancel: () => void;
628
622
  onConfirm: () => void;
623
+ onRestoreFocus: () => void;
629
624
  }) {
630
625
  const D = LABELS[lang].dialog;
631
626
  return (
632
- <div className={styles.applyBackdrop} onClick={state.phase === "applying" ? undefined : onCancel}>
633
- <div
634
- className={styles.applyModal}
635
- onClick={(e) => e.stopPropagation()}
636
- role="dialog"
637
- aria-modal="true"
638
- >
627
+ <Modal open onOpenChange={(open) => { if (!open && state.phase !== "applying") onCancel(); }}
628
+ title={state.phase === "confirm" ? (state.existing.length ? D.overwriteTitle : D.applyTitle) : state.phase === "done" ? D.doneTitle : state.phase === "error" ? D.errorTitle : D.applyingTitle}
629
+ onCloseAutoFocus={(event) => { event.preventDefault(); onRestoreFocus(); }}
630
+ titleSrOnly size="md" dismissLabel={D.close}
631
+ isDismissable={state.phase !== "applying"} isKeyboardDismissDisabled={state.phase === "applying"}>
632
+ <div className={styles.applyContent}>
639
633
  {state.phase === "confirm" && (
640
634
  <>
641
635
  <h2 className={styles.applyTitle}>
@@ -724,7 +718,7 @@ function ApplyDialog({
724
718
  </>
725
719
  )}
726
720
  </div>
727
- </div>
721
+ </Modal>
728
722
  );
729
723
  }
730
724
 
@@ -735,12 +729,10 @@ function ApplyDialog({
735
729
  * 각 step에 필요한 answers 필드를 매핑.
736
730
  */
737
731
  const STEP_REQUIRES: Record<StepKey, (keyof Answers)[]> = {
738
- theme: [],
739
- vibe: ["theme"],
740
- density: ["theme", "vibe"],
741
- color: ["theme", "vibe", "density"],
742
- layout: ["theme", "vibe", "density", "paletteSet"],
743
- summary: ["theme", "vibe", "density", "paletteSet", "layout"],
732
+ vibe: [], density: ["vibe"], color: ["vibe", "density"],
733
+ material: ["vibe", "density", "paletteSet"],
734
+ layout: ["vibe", "density", "paletteSet", "material"],
735
+ summary: ["vibe", "density", "paletteSet", "material", "layout"],
744
736
  };
745
737
 
746
738
  type StepsArr = { key: StepKey; title: string; hint: string }[];
@@ -748,25 +740,9 @@ type StepsArr = { key: StepKey; title: string; hint: string }[];
748
740
  function isStepReachable(idx: number, a: Answers, steps: StepsArr): boolean {
749
741
  const step = steps[idx];
750
742
  if (!step) return false;
751
- return STEP_REQUIRES[step.key].every((k) => a[k] != null);
743
+ return STEP_REQUIRES[step.key].every((k) => a[k] != null) && (idx <= 2 || isValidHex(a.brand));
752
744
  }
753
745
 
754
- /**
755
- * 다음 step 인덱스 계산. 특수 룰:
756
- * - theme 단계에서 none이 아닌 테마를 고르면 vibe 단계는 건너뜀 (테마가 vibe 축을 커버).
757
- * 그 외엔 선형 +1.
758
- */
759
- function nextStepIdx(current: number, a: Answers, steps: StepsArr): number {
760
- const curr = steps[current]?.key;
761
- if (curr === "theme" && a.theme && a.theme !== "none") {
762
- const colorIdx = steps.findIndex((s) => s.key === "color");
763
- if (colorIdx > current) return colorIdx;
764
- }
765
- return Math.min(steps.length - 1, current + 1);
766
- }
767
-
768
- // ────────────────────────────────────────────────────────
769
-
770
746
  function Rail({
771
747
  stepIdx,
772
748
  answers,
@@ -783,38 +759,52 @@ function Rail({
783
759
  onFreeMode: () => void;
784
760
  }) {
785
761
  const L = LABELS[lang];
762
+ const navigationRef = useRef<HTMLDivElement>(null);
763
+ const [compact, setCompact] = useState(false);
764
+ const [shortHeight, setShortHeight] = useState(false);
765
+ useEffect(() => {
766
+ const width = window.matchMedia("(max-width: 900px)");
767
+ const height = window.matchMedia("(max-height: 800px)");
768
+ const update = () => { setCompact(width.matches); setShortHeight(height.matches); };
769
+ update(); width.addEventListener("change", update); height.addEventListener("change", update);
770
+ return () => { width.removeEventListener("change", update); height.removeEventListener("change", update); };
771
+ }, []);
772
+ useEffect(() => {
773
+ const viewport = navigationRef.current;
774
+ const current = viewport?.querySelector<HTMLElement>('[aria-current="step"]');
775
+ if (!compact || !viewport || !current) return;
776
+ const frame = viewport.getBoundingClientRect();
777
+ const item = current.getBoundingClientRect();
778
+ if (item.left < frame.left) viewport.scrollLeft += item.left - frame.left;
779
+ else if (item.right > frame.right) viewport.scrollLeft += item.right - frame.right;
780
+ }, [compact, stepIdx]);
786
781
  return (
787
- <aside className={styles.rail}>
788
- <div className={styles.railBrand} aria-hidden>
789
- <Icon name="palette" size={18} />
790
- </div>
782
+ <aside className={styles.rail} data-mode="dark">
783
+ <div className={styles.railBrand}><span className={styles.railLogo} role="img" aria-label="Ovenn" /></div>
791
784
 
785
+ <div ref={navigationRef} className={styles.railNavigation}>
792
786
  <Stepper
793
787
  className={styles.railSteps}
788
+ orientation={compact ? "horizontal" : "vertical"}
794
789
  activeIndex={stepIdx}
795
790
  onStepClick={onStepClick}
796
791
  marker="number"
792
+ tone="neutral"
797
793
  >
798
794
  {steps.map((s, i) => (
799
795
  <Stepper.Item
800
796
  key={s.key}
801
797
  title={s.title}
802
- hint={s.hint}
798
+ hint={compact || shortHeight ? undefined : s.hint}
803
799
  disabled={i > stepIdx && !isStepReachable(i, answers, steps)}
804
800
  />
805
801
  ))}
806
802
  </Stepper>
803
+ </div>
807
804
 
808
805
  <div className={styles.railFoot}>
809
806
  <span>{L.rail.brand}</span>
810
- <button
811
- type="button"
812
- className={styles.railFootBtn}
813
- onClick={onFreeMode}
814
- >
815
- {L.rail.freeMode}
816
- <Icon name="arrow-right" size={12} />
817
- </button>
807
+ <Button variant="ghost" onClick={onFreeMode} rightIcon={<Icon name="arrow-right" />}>{L.rail.freeMode}</Button>
818
808
  </div>
819
809
  </aside>
820
810
  );
@@ -822,108 +812,6 @@ function Rail({
822
812
 
823
813
  // ────────────────────────────────────────────────────────
824
814
 
825
- /**
826
- * 각 테마 미리보기 이미지. null이면 placeholder 블록 표시.
827
- * 이미지는 web/public/onboarding/<slug>.png 에 둔다.
828
- */
829
- const THEME_PREVIEW_IMG: Record<ThemeId, string | null> = {
830
- none: null,
831
- pure: "/onboarding/pure.png",
832
- spare: "/onboarding/spare.png",
833
- expressive: "/onboarding/expressive.png",
834
- };
835
-
836
- function ThemeStep({
837
- value,
838
- onChange,
839
- }: {
840
- value: ThemeId | null;
841
- onChange: (v: ThemeId) => void;
842
- }) {
843
- const { lang } = useTheme();
844
- const L = LABELS[lang];
845
- const themeChoices = useMemo(() => getThemeChoices(lang), [lang]);
846
- const [hovered, setHovered] = useState<ThemeId | null>(null);
847
- const [cursor, setCursor] = useState<{ x: number; y: number }>({ x: 0, y: 0 });
848
-
849
- const handleMove = (e: React.MouseEvent) => {
850
- setCursor({ x: e.clientX, y: e.clientY });
851
- };
852
-
853
- // "none"은 사진이 어차피 없으니 호버 미리보기 생략.
854
- const showPreview = hovered !== null && hovered !== "none";
855
- const previewSrc = hovered ? THEME_PREVIEW_IMG[hovered] : null;
856
-
857
- // 커서 오른쪽 아래로 offset. 화면 밖 넘치면 왼쪽/위로 뒤집기.
858
- const OFFSET_X = 20;
859
- const OFFSET_Y = 20;
860
- const PREVIEW_W = 384; // CSS와 동기 (space-24 * 4 = 96 * 4)
861
- const PREVIEW_H = 288; // CSS와 동기 (space-24 * 3)
862
- let left = cursor.x + OFFSET_X;
863
- let top = cursor.y + OFFSET_Y;
864
- if (typeof window !== "undefined") {
865
- if (left + PREVIEW_W > window.innerWidth) left = cursor.x - OFFSET_X - PREVIEW_W;
866
- if (top + PREVIEW_H > window.innerHeight) top = cursor.y - OFFSET_Y - PREVIEW_H;
867
- }
868
-
869
- return (
870
- <>
871
- <div className={styles.choiceList}>
872
- {themeChoices.map((c) => (
873
- <div
874
- key={c.id}
875
- onMouseEnter={() => setHovered(c.id)}
876
- onMouseLeave={() => setHovered((prev) => (prev === c.id ? null : prev))}
877
- onMouseMove={handleMove}
878
- >
879
- <CheckboxCard
880
- mode="radio"
881
- name="onb-theme"
882
- value={c.id}
883
- checked={value === c.id}
884
- onChange={() => onChange(c.id)}
885
- title={
886
- c.badge ? (
887
- <span className={styles.themeTitleRow}>
888
- <Badge size="sm" variant="soft" status={c.badgeStatus}>
889
- {c.badge}
890
- </Badge>
891
- <span>{c.title}</span>
892
- </span>
893
- ) : (
894
- c.title
895
- )
896
- }
897
- description={c.hint}
898
- />
899
- </div>
900
- ))}
901
- </div>
902
-
903
- <div
904
- className={styles.themeHoverLayer}
905
- data-visible={showPreview || undefined}
906
- style={{ transform: `translate(${left}px, ${top}px)` }}
907
- aria-hidden
908
- >
909
- {previewSrc ? (
910
- // eslint-disable-next-line @next/next/no-img-element
911
- <img src={previewSrc} alt="" className={styles.themeHoverImg} />
912
- ) : (
913
- <div className={styles.themeHoverPlaceholder}>
914
- <span className={styles.themeHoverPlaceholderLabel}>
915
- {hovered ?? ""}
916
- </span>
917
- <span className={styles.themeHoverPlaceholderHint}>
918
- {L.themePreview}
919
- </span>
920
- </div>
921
- )}
922
- </div>
923
- </>
924
- );
925
- }
926
-
927
815
  function VibeStep({
928
816
  value,
929
817
  onChange,
@@ -934,15 +822,23 @@ function VibeStep({
934
822
  const { lang } = useTheme();
935
823
  const vibeChoices = useMemo(() => getVibeChoices(lang), [lang]);
936
824
  return (
937
- <div className={styles.choiceList}>
825
+ <div className={styles.choiceList} role="radiogroup" aria-label={LABELS[lang].steps.vibe.title}>
938
826
  {vibeChoices.map((c) => (
939
- <CheckboxCard
827
+ <RadioCard
940
828
  key={c.id}
941
829
  mode="radio"
942
830
  name="onb-vibe"
943
831
  value={c.id}
944
832
  checked={value === c.id}
945
833
  onChange={() => onChange(c.id)}
834
+ size="lg"
835
+ layout="horizontal"
836
+ indicator
837
+ icon={<span className={styles.optionPreview} aria-hidden><span className={styles.vibePreview}>
838
+ <span className={styles.vibePreviewBtn} data-shape={c.values.shape} />
839
+ <span className={styles.vibePreviewChip} data-shape={c.values.shape} data-motion={c.values.motion} />
840
+ <span className={styles.vibePreviewChip} data-shape={c.values.shape} data-variant="ghost" />
841
+ </span></span>}
946
842
  title={c.title}
947
843
  description={c.hint}
948
844
  />
@@ -970,98 +866,94 @@ function ColorStep({
970
866
  onMono: (v: boolean) => void;
971
867
  onBrandHex: (hex: string) => void;
972
868
  }) {
973
- const { lang } = useTheme();
869
+ const { lang, brand: validBrand } = useTheme();
974
870
  const C = LABELS[lang].color;
871
+ const achromatic = (hexToOklch(validBrand)?.c ?? 0) < 0.0001;
975
872
  const paletteChoices = useMemo(() => getPaletteChoices(lang), [lang]);
976
- const brandInvalid = brand.trim().length > 0 && !isValidHex(brand.trim());
977
- const activeHint = paletteChoices.find((c) => c.id === paletteSet)?.hint;
873
+ const [pickerColor, setPickerColor] = useState(() => parseColor(isValidHex(brand) ? normalizeHex(brand) : validBrand).toFormat("hsb"));
874
+ useEffect(() => {
875
+ const next = parseColor(isValidHex(brand) ? normalizeHex(brand) : validBrand).toFormat("hsb");
876
+ // Preserve hue at zero saturation/brightness when the visible HEX is unchanged.
877
+ setPickerColor((current) => current.toString("hex") === next.toString("hex") ? current : next);
878
+ }, [brand, validBrand]);
978
879
 
979
880
  return (
980
881
  <div className={styles.colorStep}>
981
- <section className={styles.colorSection}>
982
- <span className={styles.colorSectionTitle}>{C.modeHeading}</span>
983
- <div className={styles.paletteRow} role="radiogroup" aria-label={C.modeAria}>
984
- <Chip
985
- size="lg"
986
- selected={mode === "light"}
987
- onPressedChange={() => onMode("light")}
988
- >
989
- {C.light}
990
- </Chip>
991
- <Chip
992
- size="lg"
993
- selected={mode === "dark"}
994
- onPressedChange={() => onMode("dark")}
995
- >
996
- {C.dark}
997
- </Chip>
882
+ <div className={styles.colorSettings}>
883
+ <section className={styles.colorSettingRow}>
884
+ <span id="onb-mode-label" className={styles.colorSectionTitle}>{C.modeHeading}</span>
885
+ <div className={styles.modeOptions} role="radiogroup" aria-labelledby="onb-mode-label">
886
+ <Radio name="onb-mode" value="light" checked={mode === "light"} onChange={() => onMode("light")}>{C.light}</Radio>
887
+ <Radio name="onb-mode" value="dark" checked={mode === "dark"} onChange={() => onMode("dark")}>{C.dark}</Radio>
998
888
  </div>
999
889
  </section>
1000
-
1001
- <section className={styles.colorSection}>
890
+ <section className={styles.colorSettingRow}>
1002
891
  <span className={styles.colorSectionTitle}>{C.brandHeading}</span>
1003
- <div className={styles.hexBlock}>
1004
- <Input
1005
- size="md"
1006
- width="fill"
1007
- placeholder={C.hexPlaceholder}
1008
- value={brand}
1009
- onChange={(e) => onBrandHex(e.target.value)}
1010
- invalid={brandInvalid}
1011
- prefix={
1012
- <span
1013
- className={styles.hexBigSwatch}
1014
- style={{
1015
- background: brand && !brandInvalid ? normalizeHex(brand) : "transparent",
1016
- }}
1017
- aria-hidden
1018
- />
1019
- }
1020
- />
1021
- <span className={styles.hexHelp}>
1022
- {brandInvalid ? C.hexInvalid : C.hexHint}
1023
- </span>
1024
- </div>
892
+ <ColorPicker value={pickerColor} onChange={(color) => {
893
+ const opaque = color.toFormat("hsb").withChannelValue("alpha", 1);
894
+ setPickerColor(opaque);
895
+ onBrandHex(opaque.toString("hex"));
896
+ }}>
897
+ <ColorPicker.Trigger appearance="input" aria-label={lang === "ko" ? "색상 선택" : "Choose color"}>
898
+ <ColorSwatch size="xs" />
899
+ <span>{pickerColor.toString("hex")}</span>
900
+ </ColorPicker.Trigger>
901
+ <ColorPicker.Popover>
902
+ <ColorPicker.Editor locale={lang} showAlpha={false} />
903
+ </ColorPicker.Popover>
904
+ </ColorPicker>
1025
905
  </section>
1026
906
 
1027
- <section className={styles.colorSection}>
1028
- <div className={styles.colorSectionHead}>
1029
- <span className={styles.colorSectionTitle}>{C.paletteHeading}</span>
1030
- {activeHint && <span className={styles.colorSectionHint}>{activeHint}</span>}
1031
- </div>
1032
- <div className={styles.paletteRow} role="radiogroup" aria-label={C.paletteAria}>
1033
- {paletteChoices.map((c) => {
1034
- const preset = paletteSetPresets.find((p) => p.id === c.id);
1035
- return (
1036
- <Chip
1037
- key={c.id}
1038
- size="lg"
1039
- selected={paletteSet === c.id}
1040
- onPressedChange={() => onPaletteSet(c.id)}
1041
- >
1042
- {preset?.label ?? c.id}
1043
- </Chip>
1044
- );
1045
- })}
1046
- </div>
907
+ <section className={styles.colorGrayscale}>
908
+ <Checkbox id="onb-mono" checked={mono} onChange={(event) => onMono(event.currentTarget.checked)}>
909
+ {lang === "ko" ? "무채색으로 사용" : "Use grayscale"}
910
+ </Checkbox>
911
+ <span className={styles.hexHelp}>{lang === "ko" ? "강조색·차트에 적용" : "For accents and charts"}</span>
1047
912
  </section>
913
+ </div>
1048
914
 
1049
915
  <section className={styles.colorSection}>
1050
- <span className={styles.colorSectionTitle}>{C.monoHeading}</span>
1051
- <div className={styles.paletteRow}>
1052
- <Chip
1053
- size="lg"
1054
- selected={mono}
1055
- onPressedChange={() => onMono(!mono)}
1056
- >
1057
- {mono ? C.monoOn : C.monoOff}
1058
- </Chip>
916
+ <span className={styles.colorSectionTitle}>{C.paletteHeading}</span>
917
+ {(mono || achromatic) && <span className={styles.hexHelp}>{lang === "ko"
918
+ ? (mono ? "무채색에서는 모든 조합을 같은 회색 명도로 표시합니다." : "무채색은 조화 방식에 관계없이 같은 명도 단계로 표시됩니다.")
919
+ : (mono ? "In monochrome, all harmonies use the same grayscale steps." : "Neutral colors use the same tonal steps across harmonies.")}</span>}
920
+ <div className={styles.harmonyChoices} role="radiogroup" aria-label={C.paletteAria}>
921
+ {paletteChoices.map((c) => (
922
+ <div key={c.id} className={styles.choiceFrame}><RadioCard name="onb-harmony" value={c.id} checked={paletteSet === c.id}
923
+ onChange={() => onPaletteSet(c.id)} layout="vertical" align="start" indicator
924
+ icon={<span className={styles.harmonySwatches} data-palette-set={c.id} data-mono={String(mono)} data-mode={mode} aria-hidden>
925
+ {PALETTE_SET_ANGLES[c.id].map((angle, index) => <span key={angle}
926
+ data-harmony-color={index}
927
+ style={{ background: `var(--chart-${index + 1})` }} />)}
928
+ </span>}
929
+ title={c.title} description={mono || achromatic ? undefined : c.hint} /></div>
930
+ ))}
1059
931
  </div>
1060
932
  </section>
933
+
934
+
1061
935
  </div>
1062
936
  );
1063
937
  }
1064
938
 
939
+ function MaterialPreview({ material, compact = false }: { material: MaterialValue; compact?: boolean }) {
940
+ return <span className={styles.materialPreview} data-material={material} data-size={compact ? "compact" : undefined} aria-hidden>
941
+ <span className={styles.materialBackdrop} />
942
+ <span className={styles.materialSurface}><span /><span />{!compact && <span />}</span>
943
+ </span>;
944
+ }
945
+
946
+ function MaterialStep({ value, onChange }: { value: MaterialValue; onChange: (v: MaterialValue) => void }) {
947
+ const { lang } = useTheme();
948
+ return <div className={styles.materialChoices} role="radiogroup" aria-label={lang === "ko" ? "표면 재질" : "Surface material"}>
949
+ {(["solid", "glass"] as const).map((material) => <div key={material} className={styles.choiceFrame}><RadioCard
950
+ name="onb-material" value={material} checked={value === material} onChange={() => onChange(material)}
951
+ layout="vertical" align="start" indicator icon={<MaterialPreview material={material} />}
952
+ title={material === "solid" ? (lang === "ko" ? "솔리드" : "Solid") : (lang === "ko" ? "글래스" : "Glass")}
953
+ description={material === "solid" ? (lang === "ko" ? "배경이 비치지 않는 또렷한 표면" : "Opaque surfaces with clear separation") : (lang === "ko" ? "배경을 은은하게 비추는 반투명 표면" : "Translucent surfaces with background blur")} /></div>)}
954
+ </div>;
955
+ }
956
+
1065
957
  function DensityStep({
1066
958
  value,
1067
959
  onChange,
@@ -1072,15 +964,21 @@ function DensityStep({
1072
964
  const { lang } = useTheme();
1073
965
  const densityChoices = useMemo(() => getDensityChoices(lang), [lang]);
1074
966
  return (
1075
- <div className={styles.choiceList}>
967
+ <div className={styles.choiceList} role="radiogroup" aria-label={LABELS[lang].steps.density.title}>
1076
968
  {densityChoices.map((c) => (
1077
- <CheckboxCard
969
+ <RadioCard
1078
970
  key={c.id}
1079
971
  mode="radio"
1080
972
  name="onb-density"
1081
973
  value={c.id}
1082
974
  checked={value === c.id}
1083
975
  onChange={() => onChange(c.id)}
976
+ size="lg"
977
+ layout="horizontal"
978
+ indicator
979
+ icon={<span className={styles.optionPreview} aria-hidden><span className={styles.densityPreview} data-density={c.id}>
980
+ <span /><span /><span /><span />
981
+ </span></span>}
1084
982
  title={c.title}
1085
983
  description={c.hint}
1086
984
  />
@@ -1098,80 +996,18 @@ function LayoutStep({
1098
996
  }) {
1099
997
  const { lang } = useTheme();
1100
998
  const layoutChoices = useMemo(() => getLayoutChoices(lang), [lang]);
1101
- const [hovered, setHovered] = useState<LayoutId | null>(null);
1102
- const [cursor, setCursor] = useState<{ x: number; y: number }>({ x: 0, y: 0 });
1103
-
1104
- const handleMove = (e: React.MouseEvent) => {
1105
- setCursor({ x: e.clientX, y: e.clientY });
1106
- };
1107
-
1108
- const hoveredChoice = hovered ? layoutChoices.find((c) => c.id === hovered) : null;
1109
- const hoveredSidebar = hoveredChoice?.sidebar ?? "none";
1110
- const hoveredTopbar = hoveredChoice?.topbar ?? false;
1111
- const hoveredFrameLayout = hoveredChoice?.appFrameLayout ?? "sidebar-first";
1112
- const hoveredTabs = hoveredChoice?.tabs ?? false;
1113
-
1114
- // ThemeStep과 동일한 커서 추적 로직.
1115
- const OFFSET_X = 20;
1116
- const OFFSET_Y = 20;
1117
- const PREVIEW_W = 384;
1118
- const PREVIEW_H = 256;
1119
- let left = cursor.x + OFFSET_X;
1120
- let top = cursor.y + OFFSET_Y;
1121
- if (typeof window !== "undefined") {
1122
- if (left + PREVIEW_W > window.innerWidth) left = cursor.x - OFFSET_X - PREVIEW_W;
1123
- if (top + PREVIEW_H > window.innerHeight) top = cursor.y - OFFSET_Y - PREVIEW_H;
1124
- }
1125
-
1126
999
  return (
1127
- <>
1128
- <div className={styles.choiceList}>
1129
- {layoutChoices.map((c) => (
1130
- <div
1131
- key={c.id}
1132
- onMouseEnter={() => setHovered(c.id)}
1133
- onMouseLeave={() => setHovered((prev) => (prev === c.id ? null : prev))}
1134
- onMouseMove={handleMove}
1135
- >
1136
- <CheckboxCard
1137
- mode="radio"
1138
- name="onb-layout"
1139
- value={c.id}
1140
- checked={value === c.id}
1141
- onChange={() => onChange(c.id)}
1142
- title={c.title}
1143
- description={c.hint}
1144
- />
1145
- </div>
1146
- ))}
1147
- </div>
1148
-
1149
- <div
1150
- className={styles.themeHoverLayer}
1151
- data-visible={hoveredChoice ? true : undefined}
1152
- style={{ transform: `translate(${left}px, ${top}px)` }}
1153
- aria-hidden
1154
- >
1155
- {hoveredChoice && (
1156
- <LayoutWireframe
1157
- sidebar={hoveredSidebar}
1158
- topbar={hoveredTopbar}
1159
- frameLayout={hoveredFrameLayout}
1160
- tabs={hoveredTabs}
1161
- />
1162
- )}
1163
- </div>
1164
- </>
1000
+ <div className={styles.layoutChoices} role="radiogroup" aria-label={LABELS[lang].steps.layout.title}>
1001
+ {layoutChoices.map((c) => (
1002
+ <div key={c.id} className={styles.choiceFrame}><RadioCard name="onb-layout" value={c.id} checked={value === c.id}
1003
+ onChange={() => onChange(c.id)} layout="vertical" align="start" indicator
1004
+ icon={<LayoutWireframe sidebar={c.sidebar} topbar={c.topbar} frameLayout={c.appFrameLayout ?? "sidebar-first"} tabs={c.tabs ?? false} />}
1005
+ title={c.title} description={c.hint} /></div>
1006
+ ))}
1007
+ </div>
1165
1008
  );
1166
1009
  }
1167
1010
 
1168
- /**
1169
- * 레이아웃 호버 미리보기 와이어프레임.
1170
- * frameLayout에 따라 두 가지 구조:
1171
- * - sidebar-first: [좌사이드바(세로 전체) | (탑바 + 콘텐츠 세로)] — Figma/Notion
1172
- * - topbar-first: [탑바(가로 전체); (좌사이드바 | 콘텐츠)] — GitHub/Vercel
1173
- * tabs=true면 탑바 아래 탭 바 한 줄 추가.
1174
- */
1175
1011
  function LayoutWireframe({
1176
1012
  sidebar,
1177
1013
  topbar,
@@ -1216,16 +1052,14 @@ function LayoutWireframe({
1216
1052
  // ────────────────────────────────────────────────────────
1217
1053
 
1218
1054
  function SummaryStep({ answers }: { answers: Answers }) {
1219
- const { lang } = useTheme();
1055
+ const { lang, shape, motionMode } = useTheme();
1220
1056
  const S = LABELS[lang].summary;
1221
- const themeChoices = useMemo(() => getThemeChoices(lang), [lang]);
1222
1057
  const vibeChoices = useMemo(() => getVibeChoices(lang), [lang]);
1223
1058
  const paletteChoices = useMemo(() => getPaletteChoices(lang), [lang]);
1224
1059
  const densityChoices = useMemo(() => getDensityChoices(lang), [lang]);
1225
1060
  const layoutChoices = useMemo(() => getLayoutChoices(lang), [lang]);
1226
1061
  const [advancedOpen, setAdvancedOpen] = useState(false);
1227
1062
 
1228
- const theme = themeChoices.find((c) => c.id === answers.theme);
1229
1063
  const vibe = vibeChoices.find((c) => c.id === answers.vibe);
1230
1064
  const paletteChoice = paletteChoices.find((c) => c.id === answers.paletteSet);
1231
1065
  const density = densityChoices.find((c) => c.id === answers.density);
@@ -1234,40 +1068,29 @@ function SummaryStep({ answers }: { answers: Answers }) {
1234
1068
  return (
1235
1069
  <>
1236
1070
  <div className={styles.summaryGrid}>
1237
- <SummaryCard
1238
- label={S.themeLabel}
1239
- value={theme?.title ?? S.none}
1240
- preview={
1241
- theme?.badge ? (
1242
- <Badge size="sm" variant="soft" status={theme.badgeStatus}>
1243
- {theme.badge}
1244
- </Badge>
1245
- ) : (
1246
- <span className={styles.summaryPreviewMuted}>{S.custom}</span>
1247
- )
1248
- }
1249
- />
1071
+ <SummaryCard label={S.materialLabel} value={answers.material === "glass" ? (lang === "ko" ? "글래스" : "Glass") : (lang === "ko" ? "솔리드" : "Solid")}
1072
+ preview={<MaterialPreview material={answers.material} compact />} />
1250
1073
  <SummaryCard
1251
1074
  label={S.vibeLabel}
1252
- value={vibe?.title ?? S.none}
1075
+ value={lang === "ko" ? `모서리 ${{soft:"둥글게",standard:"기본",crisp:"각지게",pill:"캡슐형"}[shape]} · 모션 ${{bouncy:"경쾌하게",standard:"기본",calm:"차분하게",none:"없음"}[motionMode]}` : `Corners: ${shape} · Motion: ${motionMode}`}
1253
1076
  preview={
1254
1077
  vibe && (
1255
1078
  <div className={styles.vibePreview} data-summary>
1256
1079
  <span
1257
1080
  className={styles.vibePreviewBtn}
1258
- data-shape={vibe.values.shape}
1081
+ data-shape={shape}
1259
1082
  aria-hidden
1260
1083
  />
1261
1084
  <span
1262
1085
  className={styles.vibePreviewChip}
1263
- data-shape={vibe.values.shape}
1264
- data-motion={vibe.values.motion}
1086
+ data-shape={shape}
1087
+ data-motion={motionMode}
1265
1088
  aria-hidden
1266
1089
  />
1267
1090
  <span
1268
1091
  className={styles.vibePreviewChip}
1269
- data-shape={vibe.values.shape}
1270
- data-motion={vibe.values.motion}
1092
+ data-shape={shape}
1093
+ data-motion={motionMode}
1271
1094
  data-variant="ghost"
1272
1095
  aria-hidden
1273
1096
  />
@@ -1277,13 +1100,10 @@ function SummaryStep({ answers }: { answers: Answers }) {
1277
1100
  />
1278
1101
  <SummaryCard
1279
1102
  label={S.colorLabel}
1280
- value={paletteChoice?.title ?? S.none}
1103
+ value={`${answers.mode === "light" ? LABELS[lang].color.light : LABELS[lang].color.dark} · ${answers.brand} · ${paletteChoice?.title ?? S.none}${answers.mono ? (lang === "ko" ? " · 무채색" : " · Grayscale") : ""}`}
1281
1104
  preview={
1282
- <div className={styles.colorPreview} aria-hidden>
1283
- <span
1284
- className={styles.colorPreviewSwatch}
1285
- style={{ background: answers.brand }}
1286
- />
1105
+ <div className={styles.summaryPalette} data-palette-set={answers.paletteSet} data-mono={String(answers.mono)} data-mode={answers.mode} aria-hidden>
1106
+ {PALETTE_SET_ANGLES[answers.paletteSet].map((angle, index) => <span key={angle} style={{ background: `var(--chart-${index + 1})` }} />)}
1287
1107
  </div>
1288
1108
  }
1289
1109
  />
@@ -1323,23 +1143,10 @@ function SummaryStep({ answers }: { answers: Answers }) {
1323
1143
 
1324
1144
  <p className={styles.summaryHint}>{S.hint}</p>
1325
1145
 
1326
- <div className={styles.summaryAdvanced}>
1327
- <button
1328
- type="button"
1329
- className={styles.summaryAdvancedToggle}
1330
- onClick={() => setAdvancedOpen((v) => !v)}
1331
- aria-expanded={advancedOpen}
1332
- >
1333
- <span>{S.advanced}</span>
1334
- <Icon name={advancedOpen ? "caret-down" : "caret-right"} size={16} />
1335
-
1336
- </button>
1337
- {advancedOpen && (
1338
- <div className={styles.summaryAdvancedBody}>
1339
- <OnboardingAxisPanel variant="wide" themeId={answers.theme} />
1340
- </div>
1341
- )}
1342
- </div>
1146
+ <Disclosure open={advancedOpen} onOpenChange={setAdvancedOpen}>
1147
+ <Disclosure.Trigger>{S.advanced}</Disclosure.Trigger>
1148
+ <Disclosure.Body>{advancedOpen && <div className={styles.summaryAdvancedBody}><OnboardingAxisPanel variant="wide" /></div>}</Disclosure.Body>
1149
+ </Disclosure>
1343
1150
 
1344
1151
  </>
1345
1152
  );
@@ -1396,13 +1203,13 @@ function SummaryCard({
1396
1203
  preview?: React.ReactNode;
1397
1204
  }) {
1398
1205
  return (
1399
- <div className={styles.summaryCard}>
1206
+ <Card variant="line" size="md" className={styles.summaryCard}>
1400
1207
  <div className={styles.summaryCardPreview}>{preview}</div>
1401
1208
  <div className={styles.summaryCardText}>
1402
1209
  <span className={styles.summaryLabel}>{label}</span>
1403
1210
  <span className={styles.summaryValue}>{value}</span>
1404
1211
  </div>
1405
- </div>
1212
+ </Card>
1406
1213
  );
1407
1214
  }
1408
1215
 
@@ -1413,7 +1220,7 @@ function SummaryCard({
1413
1220
  function FreeMode({ onBack }: { onBack: () => void }) {
1414
1221
  const { lang } = useTheme();
1415
1222
  const F = LABELS[lang].free;
1416
- const [tab, setTab] = useState<"presets" | "layout" | "docs">("presets");
1223
+ const [tab, setTab] = useState<"layout" | "docs">("layout");
1417
1224
 
1418
1225
  return (
1419
1226
  <div className={styles.freeShell}>
@@ -1436,46 +1243,16 @@ function FreeMode({ onBack }: { onBack: () => void }) {
1436
1243
  </Button>
1437
1244
  </div>
1438
1245
 
1439
- <FreeTabs value={tab} onChange={setTab} />
1440
-
1441
- {tab === "presets" && <PresetsGallery />}
1442
- {tab === "layout" && <LayoutBuilder />}
1443
- {tab === "docs" && <DocsIndex />}
1246
+ <Tabs value={tab} onValueChange={(value) => setTab(value as "layout" | "docs")} variant="segmented" stretch>
1247
+ <Tabs.List aria-label={F.title}>
1248
+ <Tabs.Trigger value="layout">{F.tabLayout}</Tabs.Trigger>
1249
+ <Tabs.Trigger value="docs">{F.tabDocs}</Tabs.Trigger>
1250
+ </Tabs.List>
1251
+ <Tabs.Panel value="layout" keepMounted><LayoutBuilder /></Tabs.Panel>
1252
+ <Tabs.Panel value="docs" keepMounted><DocsIndex /></Tabs.Panel>
1253
+ </Tabs>
1444
1254
  </div>
1445
1255
  </div>
1446
1256
  </div>
1447
1257
  );
1448
1258
  }
1449
-
1450
- function FreeTabs({
1451
- value,
1452
- onChange,
1453
- }: {
1454
- value: "presets" | "layout" | "docs";
1455
- onChange: (v: "presets" | "layout" | "docs") => void;
1456
- }) {
1457
- const { lang } = useTheme();
1458
- const F = LABELS[lang].free;
1459
- const tabs: { id: "presets" | "layout" | "docs"; label: string }[] = [
1460
- { id: "presets", label: F.tabPresets },
1461
- { id: "layout", label: F.tabLayout },
1462
- { id: "docs", label: F.tabDocs },
1463
- ];
1464
- return (
1465
- <div className={styles.segment} role="tablist">
1466
- {tabs.map((t) => (
1467
- <button
1468
- key={t.id}
1469
- type="button"
1470
- className={styles.segmentItem}
1471
- data-active={value === t.id || undefined}
1472
- onClick={() => onChange(t.id)}
1473
- role="tab"
1474
- aria-selected={value === t.id}
1475
- >
1476
- {t.label}
1477
- </button>
1478
- ))}
1479
- </div>
1480
- );
1481
- }