@devalok/shilp-sutra 0.36.0 → 0.37.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (530) hide show
  1. package/MIGRATION.md +346 -0
  2. package/README.md +26 -29
  3. package/dist/_chunks/badge-group.js +42 -42
  4. package/dist/_chunks/badge-group.js.map +1 -1
  5. package/dist/_chunks/chat.js +324 -327
  6. package/dist/_chunks/chat.js.map +1 -1
  7. package/dist/_chunks/date-picker.js +245 -245
  8. package/dist/_chunks/date-picker.js.map +1 -1
  9. package/dist/_chunks/document-preview.js +33 -33
  10. package/dist/_chunks/document-preview.js.map +1 -1
  11. package/dist/_chunks/file-preview.js +264 -264
  12. package/dist/_chunks/file-preview.js.map +1 -1
  13. package/dist/_chunks/image-preview.js +45 -45
  14. package/dist/_chunks/image-preview.js.map +1 -1
  15. package/dist/_chunks/mention-suggestion.js +85 -85
  16. package/dist/_chunks/mention-suggestion.js.map +1 -1
  17. package/dist/_chunks/motion-provider.js +13 -13
  18. package/dist/_chunks/motion-provider.js.map +1 -1
  19. package/dist/_chunks/popover.js +36 -36
  20. package/dist/_chunks/popover.js.map +1 -1
  21. package/dist/_chunks/primitives.js +489 -489
  22. package/dist/_chunks/primitives.js.map +1 -1
  23. package/dist/_chunks/rich-chat-input.js +1066 -1066
  24. package/dist/_chunks/rich-chat-input.js.map +1 -1
  25. package/dist/_chunks/shared.js +43 -43
  26. package/dist/_chunks/shared.js.map +1 -1
  27. package/dist/_chunks/text.js +432 -0
  28. package/dist/_chunks/text.js.map +1 -0
  29. package/dist/_chunks/tiptap.js +6053 -6187
  30. package/dist/_chunks/tiptap.js.map +1 -1
  31. package/dist/_chunks/tree-view.js +97 -97
  32. package/dist/_chunks/tree-view.js.map +1 -1
  33. package/dist/_chunks/use-calendar.js.map +1 -1
  34. package/dist/ai/ai-command-provider.d.ts.map +1 -1
  35. package/dist/ai/ai-command-provider.js.map +1 -1
  36. package/dist/ai/block-renderer.d.ts.map +1 -1
  37. package/dist/ai/block-renderer.js +43 -43
  38. package/dist/ai/block-renderer.js.map +1 -1
  39. package/dist/ai/blocks/block-table.d.ts.map +1 -1
  40. package/dist/ai/blocks/confirm.d.ts.map +1 -1
  41. package/dist/ai/blocks/divider.d.ts.map +1 -1
  42. package/dist/ai/blocks/error.d.ts.map +1 -1
  43. package/dist/ai/blocks/index.d.ts +5 -5
  44. package/dist/ai/blocks/index.d.ts.map +1 -1
  45. package/dist/ai/blocks/index.js +2 -2
  46. package/dist/ai/blocks/info.d.ts.map +1 -1
  47. package/dist/ai/blocks/loading.d.ts.map +1 -1
  48. package/dist/ai/blocks/stat-row.d.ts.map +1 -1
  49. package/dist/ai/blocks/success.d.ts.map +1 -1
  50. package/dist/ai/blocks/text.d.ts.map +1 -1
  51. package/dist/ai/command-bar.d.ts +0 -11
  52. package/dist/ai/command-bar.d.ts.map +1 -1
  53. package/dist/ai/command-bar.js +128 -128
  54. package/dist/ai/command-bar.js.map +1 -1
  55. package/dist/ai/conversation.d.ts +1 -1
  56. package/dist/ai/conversation.d.ts.map +1 -1
  57. package/dist/ai/conversation.js +76 -76
  58. package/dist/ai/conversation.js.map +1 -1
  59. package/dist/ai/devadoot-icon.d.ts +0 -12
  60. package/dist/ai/devadoot-icon.d.ts.map +1 -1
  61. package/dist/ai/index.d.ts +11 -11
  62. package/dist/ai/index.d.ts.map +1 -1
  63. package/dist/ai/index.js +44 -44
  64. package/dist/ai/index.js.map +1 -1
  65. package/dist/composed/activity-feed.d.ts.map +1 -1
  66. package/dist/composed/activity-feed.js +93 -93
  67. package/dist/composed/activity-feed.js.map +1 -1
  68. package/dist/composed/avatar-group.d.ts.map +1 -1
  69. package/dist/composed/avatar-group.js +50 -50
  70. package/dist/composed/avatar-group.js.map +1 -1
  71. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  72. package/dist/composed/bulk-action-bar.js +40 -40
  73. package/dist/composed/bulk-action-bar.js.map +1 -1
  74. package/dist/composed/command-palette.d.ts +0 -6
  75. package/dist/composed/command-palette.d.ts.map +1 -1
  76. package/dist/composed/command-palette.js +131 -131
  77. package/dist/composed/command-palette.js.map +1 -1
  78. package/dist/composed/confirm-dialog.d.ts.map +1 -1
  79. package/dist/composed/confirm-dialog.js.map +1 -1
  80. package/dist/composed/content-card.d.ts.map +1 -1
  81. package/dist/composed/content-card.js.map +1 -1
  82. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  83. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  84. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
  85. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
  86. package/dist/composed/date-picker/index.d.ts +11 -11
  87. package/dist/composed/date-picker/index.d.ts.map +1 -1
  88. package/dist/composed/date-picker/index.js +1 -1
  89. package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
  90. package/dist/composed/date-picker/presets.d.ts.map +1 -1
  91. package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
  92. package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
  93. package/dist/composed/deadline-indicator.d.ts.map +1 -1
  94. package/dist/composed/deadline-indicator.js +25 -25
  95. package/dist/composed/deadline-indicator.js.map +1 -1
  96. package/dist/composed/emoji-picker.d.ts.map +1 -1
  97. package/dist/composed/emoji-picker.js +37 -37
  98. package/dist/composed/emoji-picker.js.map +1 -1
  99. package/dist/composed/empty-state.d.ts.map +1 -1
  100. package/dist/composed/empty-state.js +21 -21
  101. package/dist/composed/empty-state.js.map +1 -1
  102. package/dist/composed/error-boundary.d.ts +1 -1
  103. package/dist/composed/error-boundary.d.ts.map +1 -1
  104. package/dist/composed/error-boundary.js.map +1 -1
  105. package/dist/composed/extensions/emoji-node.d.ts.map +1 -1
  106. package/dist/composed/extensions/emoji-suggestion.d.ts.map +1 -1
  107. package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
  108. package/dist/composed/extensions/mention-suggestion.d.ts +1 -1
  109. package/dist/composed/extensions/mention-suggestion.d.ts.map +1 -1
  110. package/dist/composed/extensions/slash-command.d.ts +1 -1
  111. package/dist/composed/extensions/slash-command.d.ts.map +1 -1
  112. package/dist/composed/file-preview/audio-preview.d.ts.map +1 -1
  113. package/dist/composed/file-preview/document-preview.d.ts.map +1 -1
  114. package/dist/composed/file-preview/embed-preview.d.ts.map +1 -1
  115. package/dist/composed/file-preview/image-preview.d.ts.map +1 -1
  116. package/dist/composed/file-preview/shared.d.ts.map +1 -1
  117. package/dist/composed/file-preview/video-preview.d.ts.map +1 -1
  118. package/dist/composed/file-preview.d.ts.map +1 -1
  119. package/dist/composed/filter-bar.d.ts +1 -1
  120. package/dist/composed/filter-bar.d.ts.map +1 -1
  121. package/dist/composed/filter-bar.js +54 -54
  122. package/dist/composed/filter-bar.js.map +1 -1
  123. package/dist/composed/form-section.d.ts.map +1 -1
  124. package/dist/composed/form-section.js +26 -26
  125. package/dist/composed/form-section.js.map +1 -1
  126. package/dist/composed/global-loading.d.ts.map +1 -1
  127. package/dist/composed/global-loading.js.map +1 -1
  128. package/dist/composed/index.d.ts +55 -55
  129. package/dist/composed/index.d.ts.map +1 -1
  130. package/dist/composed/index.js +17 -17
  131. package/dist/composed/inline-edit.d.ts.map +1 -1
  132. package/dist/composed/inline-edit.js.map +1 -1
  133. package/dist/composed/loading-skeleton.d.ts +1 -1
  134. package/dist/composed/loading-skeleton.d.ts.map +1 -1
  135. package/dist/composed/loading-skeleton.js.map +1 -1
  136. package/dist/composed/markdown-viewer.d.ts.map +1 -1
  137. package/dist/composed/markdown-viewer.js +3 -3
  138. package/dist/composed/markdown-viewer.js.map +1 -1
  139. package/dist/composed/master-detail.d.ts.map +1 -1
  140. package/dist/composed/master-detail.js +42 -42
  141. package/dist/composed/master-detail.js.map +1 -1
  142. package/dist/composed/member-picker.d.ts.map +1 -1
  143. package/dist/composed/member-picker.js.map +1 -1
  144. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  145. package/dist/composed/multi-select-popover.js +55 -55
  146. package/dist/composed/multi-select-popover.js.map +1 -1
  147. package/dist/composed/page-header.d.ts.map +1 -1
  148. package/dist/composed/page-header.js.map +1 -1
  149. package/dist/composed/page-skeletons.d.ts.map +1 -1
  150. package/dist/composed/page-skeletons.js.map +1 -1
  151. package/dist/composed/priority-indicator.d.ts.map +1 -1
  152. package/dist/composed/priority-indicator.js +34 -34
  153. package/dist/composed/priority-indicator.js.map +1 -1
  154. package/dist/composed/responsive-overlay.d.ts.map +1 -1
  155. package/dist/composed/responsive-overlay.js.map +1 -1
  156. package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -1
  157. package/dist/composed/rich-chat-input/audio-player.d.ts.map +1 -1
  158. package/dist/composed/rich-chat-input/audio-waveform.d.ts.map +1 -1
  159. package/dist/composed/rich-chat-input/chat-toolbar.d.ts.map +1 -1
  160. package/dist/composed/rich-chat-input/recording-overlay.d.ts.map +1 -1
  161. package/dist/composed/rich-chat-input/reply-banner.d.ts.map +1 -1
  162. package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -1
  163. package/dist/composed/rich-chat-input.d.ts +6 -6
  164. package/dist/composed/rich-chat-input.d.ts.map +1 -1
  165. package/dist/composed/rich-chat-input.js +1 -1
  166. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  167. package/dist/composed/rich-text-editor.js +25 -25
  168. package/dist/composed/rich-text-editor.js.map +1 -1
  169. package/dist/composed/schedule-view.d.ts.map +1 -1
  170. package/dist/composed/schedule-view.js +53 -53
  171. package/dist/composed/schedule-view.js.map +1 -1
  172. package/dist/composed/simple-tooltip.d.ts.map +1 -1
  173. package/dist/composed/simple-tooltip.js.map +1 -1
  174. package/dist/composed/status-badge.d.ts +1 -1
  175. package/dist/composed/status-badge.d.ts.map +1 -1
  176. package/dist/composed/status-badge.js +30 -30
  177. package/dist/composed/status-badge.js.map +1 -1
  178. package/dist/hooks/index.d.ts +3 -3
  179. package/dist/hooks/index.d.ts.map +1 -1
  180. package/dist/hooks/index.js +1 -1
  181. package/dist/hooks/use-color-mode.js.map +1 -1
  182. package/dist/hooks/use-toast.d.ts +1 -1
  183. package/dist/hooks/use-toast.d.ts.map +1 -1
  184. package/dist/motion/index.d.ts +2 -2
  185. package/dist/motion/index.d.ts.map +1 -1
  186. package/dist/motion/index.js.map +1 -1
  187. package/dist/motion/motion-provider.d.ts +1 -1
  188. package/dist/motion/motion-provider.d.ts.map +1 -1
  189. package/dist/motion/primitives-index.d.ts +1 -1
  190. package/dist/motion/primitives-index.d.ts.map +1 -1
  191. package/dist/motion/primitives-index.js +40 -40
  192. package/dist/motion/primitives-index.js.map +1 -1
  193. package/dist/motion/primitives.d.ts +1 -1
  194. package/dist/motion/primitives.d.ts.map +1 -1
  195. package/dist/shell/app-command-palette.d.ts +0 -8
  196. package/dist/shell/app-command-palette.d.ts.map +1 -1
  197. package/dist/shell/app-command-palette.js.map +1 -1
  198. package/dist/shell/bottom-navbar.d.ts +0 -6
  199. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  200. package/dist/shell/bottom-navbar.js +62 -62
  201. package/dist/shell/bottom-navbar.js.map +1 -1
  202. package/dist/shell/index.d.ts +8 -8
  203. package/dist/shell/index.d.ts.map +1 -1
  204. package/dist/shell/index.js +5 -5
  205. package/dist/shell/link-context.d.ts +1 -1
  206. package/dist/shell/link-context.d.ts.map +1 -1
  207. package/dist/shell/notification-center.d.ts +0 -6
  208. package/dist/shell/notification-center.d.ts.map +1 -1
  209. package/dist/shell/notification-center.js +54 -54
  210. package/dist/shell/notification-center.js.map +1 -1
  211. package/dist/shell/notification-preferences.d.ts +0 -6
  212. package/dist/shell/notification-preferences.d.ts.map +1 -1
  213. package/dist/shell/notification-preferences.js +22 -22
  214. package/dist/shell/notification-preferences.js.map +1 -1
  215. package/dist/shell/sidebar.d.ts.map +1 -1
  216. package/dist/shell/sidebar.js.map +1 -1
  217. package/dist/shell/top-bar.d.ts +0 -6
  218. package/dist/shell/top-bar.d.ts.map +1 -1
  219. package/dist/shell/top-bar.js.map +1 -1
  220. package/dist/tailwind/index.cjs +15 -499
  221. package/dist/tailwind/preset.d.ts +21 -0
  222. package/dist/tailwind/preset.d.ts.map +1 -1
  223. package/dist/tailwind/preset.js +14 -489
  224. package/dist/tailwind/preset.js.map +1 -1
  225. package/dist/tokens/animations.css +17 -0
  226. package/dist/tokens/base.css +26 -0
  227. package/dist/tokens/index.css +22 -0
  228. package/dist/tokens/semantic.css +436 -464
  229. package/dist/tokens/shilp-sutra.css +41 -0
  230. package/dist/tokens/typography-semantic.css +48 -41
  231. package/dist/tokens/utilities.css +276 -0
  232. package/dist/tokens/variants.css +14 -0
  233. package/dist/ui/accordion.d.ts +2 -2
  234. package/dist/ui/accordion.d.ts.map +1 -1
  235. package/dist/ui/accordion.js +23 -23
  236. package/dist/ui/accordion.js.map +1 -1
  237. package/dist/ui/alert-dialog.d.ts +2 -2
  238. package/dist/ui/alert-dialog.d.ts.map +1 -1
  239. package/dist/ui/alert-dialog.js +37 -37
  240. package/dist/ui/alert-dialog.js.map +1 -1
  241. package/dist/ui/alert.d.ts.map +1 -1
  242. package/dist/ui/alert.js +36 -36
  243. package/dist/ui/alert.js.map +1 -1
  244. package/dist/ui/aspect-ratio.d.ts +1 -1
  245. package/dist/ui/aspect-ratio.d.ts.map +1 -1
  246. package/dist/ui/aspect-ratio.js.map +1 -1
  247. package/dist/ui/autocomplete.d.ts +1 -1
  248. package/dist/ui/autocomplete.d.ts.map +1 -1
  249. package/dist/ui/autocomplete.js +27 -27
  250. package/dist/ui/autocomplete.js.map +1 -1
  251. package/dist/ui/avatar.d.ts +2 -2
  252. package/dist/ui/avatar.d.ts.map +1 -1
  253. package/dist/ui/avatar.js +41 -41
  254. package/dist/ui/avatar.js.map +1 -1
  255. package/dist/ui/badge-group.d.ts.map +1 -1
  256. package/dist/ui/badge-indicator.d.ts.map +1 -1
  257. package/dist/ui/badge-indicator.js +10 -10
  258. package/dist/ui/badge-indicator.js.map +1 -1
  259. package/dist/ui/badge.d.ts +2 -2
  260. package/dist/ui/badge.d.ts.map +1 -1
  261. package/dist/ui/banner.d.ts.map +1 -1
  262. package/dist/ui/banner.js +28 -28
  263. package/dist/ui/banner.js.map +1 -1
  264. package/dist/ui/breadcrumb.d.ts +1 -1
  265. package/dist/ui/breadcrumb.d.ts.map +1 -1
  266. package/dist/ui/breadcrumb.js.map +1 -1
  267. package/dist/ui/button-group.d.ts.map +1 -1
  268. package/dist/ui/button-group.js.map +1 -1
  269. package/dist/ui/button-processing.d.ts.map +1 -1
  270. package/dist/ui/button-processing.js +15 -15
  271. package/dist/ui/button-processing.js.map +1 -1
  272. package/dist/ui/button.d.ts.map +1 -1
  273. package/dist/ui/button.js +84 -84
  274. package/dist/ui/button.js.map +1 -1
  275. package/dist/ui/card.d.ts +1 -1
  276. package/dist/ui/card.d.ts.map +1 -1
  277. package/dist/ui/card.js +28 -28
  278. package/dist/ui/card.js.map +1 -1
  279. package/dist/ui/charts/_internal/axes.d.ts +1 -1
  280. package/dist/ui/charts/_internal/axes.d.ts.map +1 -1
  281. package/dist/ui/charts/_internal/grid-lines.d.ts.map +1 -1
  282. package/dist/ui/charts/_internal/legend.d.ts.map +1 -1
  283. package/dist/ui/charts/_internal/tooltip.d.ts +1 -1
  284. package/dist/ui/charts/_internal/tooltip.d.ts.map +1 -1
  285. package/dist/ui/charts/area-chart.d.ts.map +1 -1
  286. package/dist/ui/charts/bar-chart.d.ts +1 -1
  287. package/dist/ui/charts/bar-chart.d.ts.map +1 -1
  288. package/dist/ui/charts/chart-container.d.ts.map +1 -1
  289. package/dist/ui/charts/gauge-chart.d.ts.map +1 -1
  290. package/dist/ui/charts/index.d.ts +5 -5
  291. package/dist/ui/charts/index.d.ts.map +1 -1
  292. package/dist/ui/charts/index.js +618 -618
  293. package/dist/ui/charts/index.js.map +1 -1
  294. package/dist/ui/charts/line-chart.d.ts.map +1 -1
  295. package/dist/ui/charts/pie-chart.d.ts.map +1 -1
  296. package/dist/ui/charts/radar-chart.d.ts.map +1 -1
  297. package/dist/ui/charts/sparkline.d.ts.map +1 -1
  298. package/dist/ui/chat/date-separator.d.ts.map +1 -1
  299. package/dist/ui/chat/index.d.ts +4 -4
  300. package/dist/ui/chat/index.d.ts.map +1 -1
  301. package/dist/ui/chat/index.js +1 -1
  302. package/dist/ui/chat/message-input.d.ts.map +1 -1
  303. package/dist/ui/chat/message-list.d.ts.map +1 -1
  304. package/dist/ui/chat/message.d.ts +1 -1
  305. package/dist/ui/chat/message.d.ts.map +1 -1
  306. package/dist/ui/chat/system-message.d.ts.map +1 -1
  307. package/dist/ui/chat/typing-indicator.d.ts.map +1 -1
  308. package/dist/ui/chat/unread-separator.d.ts.map +1 -1
  309. package/dist/ui/checkbox.d.ts.map +1 -1
  310. package/dist/ui/checkbox.js +18 -18
  311. package/dist/ui/checkbox.js.map +1 -1
  312. package/dist/ui/code.d.ts.map +1 -1
  313. package/dist/ui/code.js.map +1 -1
  314. package/dist/ui/collapsible.d.ts +2 -2
  315. package/dist/ui/collapsible.d.ts.map +1 -1
  316. package/dist/ui/collapsible.js +10 -10
  317. package/dist/ui/collapsible.js.map +1 -1
  318. package/dist/ui/color-input.d.ts.map +1 -1
  319. package/dist/ui/color-input.js +85 -85
  320. package/dist/ui/color-input.js.map +1 -1
  321. package/dist/ui/color-swatch.d.ts.map +1 -1
  322. package/dist/ui/color-swatch.js.map +1 -1
  323. package/dist/ui/combobox.d.ts.map +1 -1
  324. package/dist/ui/combobox.js +58 -58
  325. package/dist/ui/combobox.js.map +1 -1
  326. package/dist/ui/container.d.ts.map +1 -1
  327. package/dist/ui/container.js.map +1 -1
  328. package/dist/ui/context-menu.d.ts +2 -2
  329. package/dist/ui/context-menu.d.ts.map +1 -1
  330. package/dist/ui/context-menu.js +47 -47
  331. package/dist/ui/context-menu.js.map +1 -1
  332. package/dist/ui/data-table-body.d.ts +1 -1
  333. package/dist/ui/data-table-body.d.ts.map +1 -1
  334. package/dist/ui/data-table-body.js +43 -43
  335. package/dist/ui/data-table-body.js.map +1 -1
  336. package/dist/ui/data-table-bulk-actions.js.map +1 -1
  337. package/dist/ui/data-table-card.d.ts.map +1 -1
  338. package/dist/ui/data-table-card.js +7 -7
  339. package/dist/ui/data-table-card.js.map +1 -1
  340. package/dist/ui/data-table-context.d.ts +1 -1
  341. package/dist/ui/data-table-context.d.ts.map +1 -1
  342. package/dist/ui/data-table-context.js.map +1 -1
  343. package/dist/ui/data-table-header.js +38 -38
  344. package/dist/ui/data-table-header.js.map +1 -1
  345. package/dist/ui/data-table-pagination.js.map +1 -1
  346. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  347. package/dist/ui/data-table-toolbar.js.map +1 -1
  348. package/dist/ui/data-table.d.ts +2 -2
  349. package/dist/ui/data-table.d.ts.map +1 -1
  350. package/dist/ui/data-table.js +5 -5
  351. package/dist/ui/data-table.js.map +1 -1
  352. package/dist/ui/devalok-grain.js +8 -8
  353. package/dist/ui/devalok-grain.js.map +1 -1
  354. package/dist/ui/dialog.d.ts +2 -2
  355. package/dist/ui/dialog.d.ts.map +1 -1
  356. package/dist/ui/dialog.js +41 -41
  357. package/dist/ui/dialog.js.map +1 -1
  358. package/dist/ui/dropdown-menu.d.ts +2 -2
  359. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  360. package/dist/ui/dropdown-menu.js +46 -46
  361. package/dist/ui/dropdown-menu.js.map +1 -1
  362. package/dist/ui/file-upload.d.ts.map +1 -1
  363. package/dist/ui/file-upload.js +54 -54
  364. package/dist/ui/file-upload.js.map +1 -1
  365. package/dist/ui/form.d.ts.map +1 -1
  366. package/dist/ui/form.js +17 -17
  367. package/dist/ui/form.js.map +1 -1
  368. package/dist/ui/hover-card.d.ts +2 -2
  369. package/dist/ui/hover-card.d.ts.map +1 -1
  370. package/dist/ui/hover-card.js +19 -19
  371. package/dist/ui/hover-card.js.map +1 -1
  372. package/dist/ui/icon-button.d.ts.map +1 -1
  373. package/dist/ui/icon-button.js.map +1 -1
  374. package/dist/ui/icon-group.d.ts.map +1 -1
  375. package/dist/ui/icon-group.js +4 -4
  376. package/dist/ui/icon-group.js.map +1 -1
  377. package/dist/ui/icon.d.ts.map +1 -1
  378. package/dist/ui/icon.js +32 -32
  379. package/dist/ui/icon.js.map +1 -1
  380. package/dist/ui/index.d.ts +57 -57
  381. package/dist/ui/index.d.ts.map +1 -1
  382. package/dist/ui/index.js +27 -27
  383. package/dist/ui/index.js.map +1 -1
  384. package/dist/ui/input-otp.d.ts +1 -1
  385. package/dist/ui/input-otp.d.ts.map +1 -1
  386. package/dist/ui/input-otp.js.map +1 -1
  387. package/dist/ui/input.d.ts.map +1 -1
  388. package/dist/ui/input.js +14 -14
  389. package/dist/ui/input.js.map +1 -1
  390. package/dist/ui/label.d.ts +1 -1
  391. package/dist/ui/label.d.ts.map +1 -1
  392. package/dist/ui/label.js.map +1 -1
  393. package/dist/ui/lib/bottom-sheet.d.ts.map +1 -1
  394. package/dist/ui/lib/index.d.ts +4 -4
  395. package/dist/ui/lib/index.d.ts.map +1 -1
  396. package/dist/ui/lib/slot.d.ts +1 -1
  397. package/dist/ui/lib/slot.d.ts.map +1 -1
  398. package/dist/ui/lib/utils.d.ts.map +1 -1
  399. package/dist/ui/lib/utils.js.map +1 -1
  400. package/dist/ui/link.d.ts.map +1 -1
  401. package/dist/ui/link.js.map +1 -1
  402. package/dist/ui/menubar.d.ts +2 -2
  403. package/dist/ui/menubar.d.ts.map +1 -1
  404. package/dist/ui/menubar.js +64 -64
  405. package/dist/ui/menubar.js.map +1 -1
  406. package/dist/ui/navigation-menu.d.ts +2 -2
  407. package/dist/ui/navigation-menu.d.ts.map +1 -1
  408. package/dist/ui/navigation-menu.js +72 -72
  409. package/dist/ui/navigation-menu.js.map +1 -1
  410. package/dist/ui/number-input.d.ts.map +1 -1
  411. package/dist/ui/number-input.js.map +1 -1
  412. package/dist/ui/pagination.d.ts +1 -1
  413. package/dist/ui/pagination.d.ts.map +1 -1
  414. package/dist/ui/pagination.js.map +1 -1
  415. package/dist/ui/popover.d.ts +2 -2
  416. package/dist/ui/popover.d.ts.map +1 -1
  417. package/dist/ui/progress-ring.d.ts +1 -1
  418. package/dist/ui/progress-ring.d.ts.map +1 -1
  419. package/dist/ui/progress-ring.js +33 -33
  420. package/dist/ui/progress-ring.js.map +1 -1
  421. package/dist/ui/progress.d.ts +2 -2
  422. package/dist/ui/progress.d.ts.map +1 -1
  423. package/dist/ui/progress.js +23 -23
  424. package/dist/ui/progress.js.map +1 -1
  425. package/dist/ui/radio.d.ts.map +1 -1
  426. package/dist/ui/radio.js +19 -19
  427. package/dist/ui/radio.js.map +1 -1
  428. package/dist/ui/search-input.d.ts.map +1 -1
  429. package/dist/ui/search-input.js +17 -17
  430. package/dist/ui/search-input.js.map +1 -1
  431. package/dist/ui/segmented-control.d.ts.map +1 -1
  432. package/dist/ui/segmented-control.js +19 -19
  433. package/dist/ui/segmented-control.js.map +1 -1
  434. package/dist/ui/select.d.ts +2 -2
  435. package/dist/ui/select.d.ts.map +1 -1
  436. package/dist/ui/select.js +68 -68
  437. package/dist/ui/select.js.map +1 -1
  438. package/dist/ui/separator.d.ts +1 -1
  439. package/dist/ui/separator.d.ts.map +1 -1
  440. package/dist/ui/separator.js.map +1 -1
  441. package/dist/ui/sheet.d.ts +2 -2
  442. package/dist/ui/sheet.d.ts.map +1 -1
  443. package/dist/ui/sheet.js +44 -44
  444. package/dist/ui/sheet.js.map +1 -1
  445. package/dist/ui/sidebar.d.ts +1 -1
  446. package/dist/ui/sidebar.d.ts.map +1 -1
  447. package/dist/ui/sidebar.js +156 -156
  448. package/dist/ui/sidebar.js.map +1 -1
  449. package/dist/ui/skeleton.d.ts +1 -1
  450. package/dist/ui/skeleton.d.ts.map +1 -1
  451. package/dist/ui/skeleton.js +2 -2
  452. package/dist/ui/skeleton.js.map +1 -1
  453. package/dist/ui/slider.d.ts +2 -2
  454. package/dist/ui/slider.d.ts.map +1 -1
  455. package/dist/ui/slider.js +5 -5
  456. package/dist/ui/slider.js.map +1 -1
  457. package/dist/ui/spinner.d.ts.map +1 -1
  458. package/dist/ui/spinner.js +21 -21
  459. package/dist/ui/spinner.js.map +1 -1
  460. package/dist/ui/split-button.d.ts +1 -1
  461. package/dist/ui/split-button.d.ts.map +1 -1
  462. package/dist/ui/split-button.js +28 -28
  463. package/dist/ui/split-button.js.map +1 -1
  464. package/dist/ui/stack.d.ts +1 -1
  465. package/dist/ui/stack.d.ts.map +1 -1
  466. package/dist/ui/stack.js.map +1 -1
  467. package/dist/ui/stat-card.d.ts.map +1 -1
  468. package/dist/ui/stat-card.js +73 -73
  469. package/dist/ui/stat-card.js.map +1 -1
  470. package/dist/ui/status-dot.d.ts.map +1 -1
  471. package/dist/ui/status-dot.js.map +1 -1
  472. package/dist/ui/stepper.d.ts +1 -1
  473. package/dist/ui/stepper.d.ts.map +1 -1
  474. package/dist/ui/stepper.js +48 -48
  475. package/dist/ui/stepper.js.map +1 -1
  476. package/dist/ui/switch.d.ts +1 -1
  477. package/dist/ui/switch.d.ts.map +1 -1
  478. package/dist/ui/switch.js +15 -15
  479. package/dist/ui/switch.js.map +1 -1
  480. package/dist/ui/table.d.ts +1 -1
  481. package/dist/ui/table.d.ts.map +1 -1
  482. package/dist/ui/table.js.map +1 -1
  483. package/dist/ui/tabs.d.ts +2 -2
  484. package/dist/ui/tabs.d.ts.map +1 -1
  485. package/dist/ui/tabs.js +52 -52
  486. package/dist/ui/tabs.js.map +1 -1
  487. package/dist/ui/text.d.ts +1 -1
  488. package/dist/ui/text.d.ts.map +1 -1
  489. package/dist/ui/text.js.map +1 -1
  490. package/dist/ui/textarea.d.ts.map +1 -1
  491. package/dist/ui/textarea.js +13 -13
  492. package/dist/ui/textarea.js.map +1 -1
  493. package/dist/ui/toast-registry.js.map +1 -1
  494. package/dist/ui/toast.d.ts +3 -3
  495. package/dist/ui/toast.d.ts.map +1 -1
  496. package/dist/ui/toast.js +164 -164
  497. package/dist/ui/toast.js.map +1 -1
  498. package/dist/ui/toaster.d.ts.map +1 -1
  499. package/dist/ui/toaster.js +6 -6
  500. package/dist/ui/toaster.js.map +1 -1
  501. package/dist/ui/toggle-group.d.ts +1 -1
  502. package/dist/ui/toggle-group.d.ts.map +1 -1
  503. package/dist/ui/toggle-group.js.map +1 -1
  504. package/dist/ui/toggle.d.ts +1 -1
  505. package/dist/ui/toggle.d.ts.map +1 -1
  506. package/dist/ui/toggle.js +14 -14
  507. package/dist/ui/toggle.js.map +1 -1
  508. package/dist/ui/tooltip.d.ts +2 -2
  509. package/dist/ui/tooltip.d.ts.map +1 -1
  510. package/dist/ui/tooltip.js +26 -26
  511. package/dist/ui/tooltip.js.map +1 -1
  512. package/dist/ui/tree-view/index.d.ts +2 -2
  513. package/dist/ui/tree-view/index.d.ts.map +1 -1
  514. package/dist/ui/tree-view/index.js +1 -1
  515. package/dist/ui/tree-view/tree-view.d.ts +1 -1
  516. package/dist/ui/tree-view/tree-view.d.ts.map +1 -1
  517. package/dist/ui/visually-hidden.d.ts.map +1 -1
  518. package/dist/ui/visually-hidden.js.map +1 -1
  519. package/docs/components/_header.md +96 -0
  520. package/docs/rollback.md +179 -0
  521. package/llms-full.txt +97 -1
  522. package/llms.txt +24 -2
  523. package/package.json +296 -277
  524. package/dist/_chunks/framer.js +0 -5604
  525. package/dist/_chunks/framer.js.map +0 -1
  526. package/dist/_chunks/rolldown-runtime.js +0 -21
  527. package/dist/_chunks/sonner.js +0 -616
  528. package/dist/_chunks/sonner.js.map +0 -1
  529. package/dist/_chunks/stat-row.js +0 -432
  530. package/dist/_chunks/stat-row.js.map +0 -1
@@ -1,35 +1,35 @@
1
1
  "use client";
2
- import { a as e } from "./framer.js";
3
- import { tweens as t } from "../ui/lib/motion.js";
4
- import { cn as n } from "../ui/lib/utils.js";
5
- import { Icon as r } from "../ui/icon.js";
6
- import { Button as i } from "../ui/button.js";
7
- import * as a from "react";
8
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
9
- import { IconAlertTriangle as c, IconDownload as l, IconVolume as u, IconVolumeOff as d } from "@tabler/icons-react";
2
+ import { tweens as e } from "../ui/lib/motion.js";
3
+ import { cn as t } from "../ui/lib/utils.js";
4
+ import { Icon as n } from "../ui/icon.js";
5
+ import { Button as r } from "../ui/button.js";
6
+ import * as i from "react";
7
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
+ import { IconAlertTriangle as s, IconDownload as c, IconVolume as l, IconVolumeOff as u } from "@tabler/icons-react";
9
+ import { motion as d } from "framer-motion";
10
10
  //#region src/composed/file-preview/shared.tsx
11
11
  function f({ message: e, url: t }) {
12
- return /* @__PURE__ */ s("div", {
12
+ return /* @__PURE__ */ o("div", {
13
13
  className: "flex flex-col items-center justify-center gap-ds-04 rounded-ds-md border border-surface-border bg-surface-sunken p-ds-08 text-center",
14
14
  children: [
15
- /* @__PURE__ */ o(r, {
16
- icon: c,
15
+ /* @__PURE__ */ a(n, {
16
+ icon: s,
17
17
  size: "2xl",
18
18
  className: "text-warning-9"
19
19
  }),
20
- /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("p", {
20
+ /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("p", {
21
21
  className: "text-ds-md font-semibold text-surface-fg",
22
22
  children: "Preview unavailable"
23
- }), /* @__PURE__ */ o("p", {
23
+ }), /* @__PURE__ */ a("p", {
24
24
  className: "text-ds-sm text-surface-fg-muted mt-ds-01",
25
25
  children: e
26
26
  })] }),
27
- /* @__PURE__ */ o(i, {
27
+ /* @__PURE__ */ a(r, {
28
28
  variant: "outline",
29
29
  size: "xs",
30
- startIcon: /* @__PURE__ */ o(r, { icon: l }),
30
+ startIcon: /* @__PURE__ */ a(n, { icon: c }),
31
31
  asChild: !0,
32
- children: /* @__PURE__ */ o("a", {
32
+ children: /* @__PURE__ */ a("a", {
33
33
  href: t,
34
34
  download: !0,
35
35
  target: "_blank",
@@ -40,8 +40,8 @@ function f({ message: e, url: t }) {
40
40
  ]
41
41
  });
42
42
  }
43
- function p({ children: r, className: i }) {
44
- return /* @__PURE__ */ o(e.div, {
43
+ function p({ children: n, className: r }) {
44
+ return /* @__PURE__ */ a(d.div, {
45
45
  initial: {
46
46
  opacity: 0,
47
47
  y: 8
@@ -50,50 +50,50 @@ function p({ children: r, className: i }) {
50
50
  opacity: 1,
51
51
  y: 0
52
52
  },
53
- transition: t.fade,
54
- className: n("flex items-center gap-ds-01 rounded-ds-md border border-surface-border bg-surface-overlay/95 px-ds-02 py-ds-01 shadow-floating backdrop-blur-xs", i),
55
- children: r
53
+ transition: e.fade,
54
+ className: t("flex items-center gap-ds-01 rounded-ds-md border border-surface-border bg-surface-overlay/95 px-ds-02 py-ds-01 shadow-floating backdrop-blur-xs", r),
55
+ children: n
56
56
  });
57
57
  }
58
58
  function m() {
59
- return /* @__PURE__ */ o("div", { className: "mx-ds-01 h-4 w-px bg-surface-border-subtle" });
59
+ return /* @__PURE__ */ a("div", { className: "mx-ds-01 h-4 w-px bg-surface-border-subtle" });
60
60
  }
61
- function h({ volume: e, muted: t, onVolumeChange: i, onMuteToggle: c, variant: l = "light" }) {
62
- let f = a.useRef(null), [p, m] = a.useState(!1), h = t ? 0 : e;
61
+ function h({ volume: e, muted: r, onVolumeChange: s, onMuteToggle: c, variant: d = "light" }) {
62
+ let f = i.useRef(null), [p, m] = i.useState(!1), h = r ? 0 : e;
63
63
  function g(t) {
64
64
  if (!f.current) return e;
65
65
  let n = f.current.getBoundingClientRect();
66
66
  return Math.max(0, Math.min(1, (t.clientX - n.left) / n.width));
67
67
  }
68
68
  function _(e) {
69
- e.preventDefault(), m(!0), i(g(e)), e.target.setPointerCapture(e.pointerId);
69
+ e.preventDefault(), m(!0), s(g(e)), e.target.setPointerCapture(e.pointerId);
70
70
  }
71
71
  function v(e) {
72
- p && i(g(e));
72
+ p && s(g(e));
73
73
  }
74
74
  function y() {
75
75
  m(!1);
76
76
  }
77
- let b = l === "dark", x = b ? "bg-white/30" : "bg-surface-sunken", S = b ? "bg-white" : "bg-accent-9", C = b ? "bg-white" : "bg-accent-9";
78
- return /* @__PURE__ */ s("div", {
77
+ let b = d === "dark", x = b ? "bg-white/30" : "bg-surface-sunken", S = b ? "bg-white" : "bg-accent-9", C = b ? "bg-white" : "bg-accent-9";
78
+ return /* @__PURE__ */ o("div", {
79
79
  className: "group/vol flex items-center gap-ds-02 shrink-0",
80
- children: [/* @__PURE__ */ o("button", {
80
+ children: [/* @__PURE__ */ a("button", {
81
81
  onClick: c,
82
- className: n("transition-colors", b ? "text-white hover:text-white/80" : "text-surface-fg-muted hover:text-surface-fg"),
83
- "aria-label": t ? "Unmute (M)" : "Mute (M)",
84
- title: t ? "Unmute" : "Mute",
85
- children: t || e === 0 ? /* @__PURE__ */ o(r, {
86
- icon: d,
87
- size: "sm"
88
- }) : /* @__PURE__ */ o(r, {
82
+ className: t("transition-colors", b ? "text-white hover:text-white/80" : "text-surface-fg-muted hover:text-surface-fg"),
83
+ "aria-label": r ? "Unmute (M)" : "Mute (M)",
84
+ title: r ? "Unmute" : "Mute",
85
+ children: r || e === 0 ? /* @__PURE__ */ a(n, {
89
86
  icon: u,
90
87
  size: "sm"
88
+ }) : /* @__PURE__ */ a(n, {
89
+ icon: l,
90
+ size: "sm"
91
91
  })
92
- }), /* @__PURE__ */ o("div", {
92
+ }), /* @__PURE__ */ a("div", {
93
93
  className: "w-0 overflow-hidden group-hover/vol:w-20 transition-[width] duration-200 ease-productive-standard flex items-center",
94
- children: /* @__PURE__ */ s("div", {
94
+ children: /* @__PURE__ */ o("div", {
95
95
  ref: f,
96
- className: n("relative w-full h-1 rounded-full cursor-pointer", x),
96
+ className: t("relative w-full h-1 rounded-full cursor-pointer", x),
97
97
  onPointerDown: _,
98
98
  onPointerMove: v,
99
99
  onPointerUp: y,
@@ -103,11 +103,11 @@ function h({ volume: e, muted: t, onVolumeChange: i, onMuteToggle: c, variant: l
103
103
  "aria-valuemin": 0,
104
104
  "aria-valuemax": 100,
105
105
  tabIndex: 0,
106
- children: [/* @__PURE__ */ o("div", {
107
- className: n("absolute left-0 top-0 h-full rounded-full transition-[width] duration-75", S),
106
+ children: [/* @__PURE__ */ a("div", {
107
+ className: t("absolute left-0 top-0 h-full rounded-full transition-[width] duration-75", S),
108
108
  style: { width: `${h * 100}%` }
109
- }), /* @__PURE__ */ o("div", {
110
- className: n("absolute top-1/2 -translate-y-1/2 h-2.5 w-2.5 rounded-full shadow-raised transition-opacity", C, p ? "opacity-100 scale-110" : "opacity-0 group-hover/vol:opacity-100"),
109
+ }), /* @__PURE__ */ a("div", {
110
+ className: t("absolute top-1/2 -translate-y-1/2 h-2.5 w-2.5 rounded-full shadow-raised transition-opacity", C, p ? "opacity-100 scale-110" : "opacity-0 group-hover/vol:opacity-100"),
111
111
  style: {
112
112
  left: `${h * 100}%`,
113
113
  marginLeft: "-5px"
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","names":[],"sources":["../../src/composed/file-preview/shared.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { motion } from 'framer-motion'\nimport { cn } from '../../ui/lib/utils'\nimport { tweens } from '../../ui/lib/motion'\nimport { Icon } from '../../ui/icon'\nimport { Button } from '../../ui/button'\nimport {\n IconDownload,\n IconAlertTriangle,\n IconVolume,\n IconVolumeOff,\n} from '@tabler/icons-react'\n\n// ============================================================\n// Shared: Error Fallback\n// ============================================================\n\nexport function ErrorFallback({ message, url }: { message: string; url: string }) {\n return (\n <div className=\"flex flex-col items-center justify-center gap-ds-04 rounded-ds-md border border-surface-border bg-surface-sunken p-ds-08 text-center\">\n <Icon icon={IconAlertTriangle} size=\"2xl\" className=\"text-warning-9\" />\n <div>\n <p className=\"text-ds-md font-semibold text-surface-fg\">Preview unavailable</p>\n <p className=\"text-ds-sm text-surface-fg-muted mt-ds-01\">{message}</p>\n </div>\n <Button variant=\"outline\" size=\"xs\" startIcon={<Icon icon={IconDownload} />} asChild>\n <a href={url} download target=\"_blank\" rel=\"noopener noreferrer\">Download file</a>\n </Button>\n </div>\n )\n}\n\n// ============================================================\n// Shared: Floating Toolbar\n// ============================================================\n\nexport function Toolbar({ children, className }: { children: React.ReactNode; className?: string }) {\n return (\n <motion.div\n initial={{ opacity: 0, y: 8 }}\n animate={{ opacity: 1, y: 0 }}\n transition={tweens.fade}\n className={cn(\n 'flex items-center gap-ds-01 rounded-ds-md border border-surface-border bg-surface-overlay/95 px-ds-02 py-ds-01 shadow-floating backdrop-blur-xs',\n className,\n )}\n >\n {children}\n </motion.div>\n )\n}\n\nexport function ToolbarDivider() {\n return <div className=\"mx-ds-01 h-4 w-px bg-surface-border-subtle\" />\n}\n\n// ============================================================\n// Shared: Volume Slider (Spotify/YouTube style)\n// Custom-built — no native input range. Consistent across browsers.\n// ============================================================\n\nexport function VolumeControl({\n volume,\n muted,\n onVolumeChange,\n onMuteToggle,\n variant = 'light',\n}: {\n volume: number\n muted: boolean\n onVolumeChange: (v: number) => void\n onMuteToggle: () => void\n variant?: 'light' | 'dark'\n}) {\n const trackRef = React.useRef<HTMLDivElement>(null)\n const [dragging, setDragging] = React.useState(false)\n const displayVolume = muted ? 0 : volume\n\n function getVolumeFromEvent(e: MouseEvent | React.MouseEvent) {\n if (!trackRef.current) return volume\n const rect = trackRef.current.getBoundingClientRect()\n return Math.max(0, Math.min(1, (e.clientX - rect.left) / rect.width))\n }\n\n function handlePointerDown(e: React.PointerEvent) {\n e.preventDefault()\n setDragging(true)\n const v = getVolumeFromEvent(e)\n onVolumeChange(v)\n ;(e.target as HTMLElement).setPointerCapture(e.pointerId)\n }\n\n function handlePointerMove(e: React.PointerEvent) {\n if (!dragging) return\n onVolumeChange(getVolumeFromEvent(e))\n }\n\n function handlePointerUp() {\n setDragging(false)\n }\n\n const isDark = variant === 'dark'\n const trackBg = isDark ? 'bg-white/30' : 'bg-surface-sunken'\n const fillBg = isDark ? 'bg-white' : 'bg-accent-9'\n const thumbBg = isDark ? 'bg-white' : 'bg-accent-9'\n const iconClass = isDark ? 'text-white hover:text-white/80' : 'text-surface-fg-muted hover:text-surface-fg'\n\n return (\n <div className=\"group/vol flex items-center gap-ds-02 shrink-0\">\n <button onClick={onMuteToggle} className={cn('transition-colors', iconClass)} aria-label={muted ? 'Unmute (M)' : 'Mute (M)'} title={muted ? 'Unmute' : 'Mute'}>\n {muted || volume === 0 ? <Icon icon={IconVolumeOff} size=\"sm\" /> : <Icon icon={IconVolume} size=\"sm\" />}\n </button>\n <div className=\"w-0 overflow-hidden group-hover/vol:w-20 transition-[width] duration-200 ease-productive-standard flex items-center\">\n <div\n ref={trackRef}\n className={cn('relative w-full h-1 rounded-full cursor-pointer', trackBg)}\n onPointerDown={handlePointerDown}\n onPointerMove={handlePointerMove}\n onPointerUp={handlePointerUp}\n role=\"slider\"\n aria-label=\"Volume\"\n aria-valuenow={Math.round(displayVolume * 100)}\n aria-valuemin={0}\n aria-valuemax={100}\n tabIndex={0}\n >\n {/* Fill */}\n <div\n className={cn('absolute left-0 top-0 h-full rounded-full transition-[width] duration-75', fillBg)}\n style={{ width: `${displayVolume * 100}%` }}\n />\n {/* Thumb */}\n <div\n className={cn(\n 'absolute top-1/2 -translate-y-1/2 h-2.5 w-2.5 rounded-full shadow-raised transition-opacity',\n thumbBg,\n dragging ? 'opacity-100 scale-110' : 'opacity-0 group-hover/vol:opacity-100',\n )}\n style={{ left: `${displayVolume * 100}%`, marginLeft: '-5px' }}\n />\n </div>\n </div>\n </div>\n )\n}\n\n// ============================================================\n// Shared: Time Formatting\n// ============================================================\n\nexport function formatTime(s: number): string {\n if (!isFinite(s) || s < 0) return '0:00'\n const h = Math.floor(s / 3600)\n const m = Math.floor((s % 3600) / 60)\n const sec = Math.floor(s % 60)\n if (h > 0) return `${h}:${m.toString().padStart(2, '0')}:${sec.toString().padStart(2, '0')}`\n return `${m}:${sec.toString().padStart(2, '0')}`\n}\n"],"mappings":";;;;;;;;;AAmBA,SAAgB,EAAc,EAAE,YAAS,UAAyC;AAChF,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,GAAD;IAAM,MAAM;IAAmB,MAAK;IAAM,WAAU;IAAmB,CAAA;GACvE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;IAAG,WAAU;cAA2C;IAAuB,CAAA,EAC/E,kBAAC,KAAD;IAAG,WAAU;cAA6C;IAAY,CAAA,CAClE,EAAA,CAAA;GACN,kBAAC,GAAD;IAAQ,SAAQ;IAAU,MAAK;IAAK,WAAW,kBAAC,GAAD,EAAM,MAAM,GAAgB,CAAA;IAAE,SAAA;cAC3E,kBAAC,KAAD;KAAG,MAAM;KAAK,UAAA;KAAS,QAAO;KAAS,KAAI;eAAsB;KAAiB,CAAA;IAC3E,CAAA;GACL;;;AAQV,SAAgB,EAAQ,EAAE,aAAU,gBAAgE;AAClG,QACE,kBAAC,EAAO,KAAR;EACE,SAAS;GAAE,SAAS;GAAG,GAAG;GAAG;EAC7B,SAAS;GAAE,SAAS;GAAG,GAAG;GAAG;EAC7B,YAAY,EAAO;EACnB,WAAW,EACT,mJACA,EACD;EAEA;EACU,CAAA;;AAIjB,SAAgB,IAAiB;AAC/B,QAAO,kBAAC,OAAD,EAAK,WAAU,8CAA+C,CAAA;;AAQvE,SAAgB,EAAc,EAC5B,WACA,UACA,mBACA,iBACA,aAAU,WAOT;CACD,IAAM,IAAW,EAAM,OAAuB,KAAK,EAC7C,CAAC,GAAU,KAAe,EAAM,SAAS,GAAM,EAC/C,IAAgB,IAAQ,IAAI;CAElC,SAAS,EAAmB,GAAkC;AAC5D,MAAI,CAAC,EAAS,QAAS,QAAO;EAC9B,IAAM,IAAO,EAAS,QAAQ,uBAAuB;AACrD,SAAO,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI,EAAE,UAAU,EAAK,QAAQ,EAAK,MAAM,CAAC;;CAGvE,SAAS,EAAkB,GAAuB;AAK9C,EAJF,EAAE,gBAAgB,EAClB,EAAY,GAAK,EAEjB,EADU,EAAmB,EAAE,CACd,EACf,EAAE,OAAuB,kBAAkB,EAAE,UAAU;;CAG3D,SAAS,EAAkB,GAAuB;AAC3C,OACL,EAAe,EAAmB,EAAE,CAAC;;CAGvC,SAAS,IAAkB;AACzB,IAAY,GAAM;;CAGpB,IAAM,IAAS,MAAY,QACrB,IAAU,IAAS,gBAAgB,qBACnC,IAAS,IAAS,aAAa,eAC/B,IAAU,IAAS,aAAa;AAGtC,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,UAAD;GAAQ,SAAS;GAAc,WAAW,EAAG,qBAJ/B,IAAS,mCAAmC,8CAIkB;GAAE,cAAY,IAAQ,eAAe;GAAY,OAAO,IAAQ,WAAW;aACpJ,KAAS,MAAW,IAAI,kBAAC,GAAD;IAAM,MAAM;IAAe,MAAK;IAAO,CAAA,GAAG,kBAAC,GAAD;IAAM,MAAM;IAAY,MAAK;IAAO,CAAA;GAChG,CAAA,EACT,kBAAC,OAAD;GAAK,WAAU;aACb,kBAAC,OAAD;IACE,KAAK;IACL,WAAW,EAAG,mDAAmD,EAAQ;IACzE,eAAe;IACf,eAAe;IACf,aAAa;IACb,MAAK;IACL,cAAW;IACX,iBAAe,KAAK,MAAM,IAAgB,IAAI;IAC9C,iBAAe;IACf,iBAAe;IACf,UAAU;cAXZ,CAcE,kBAAC,OAAD;KACE,WAAW,EAAG,4EAA4E,EAAO;KACjG,OAAO,EAAE,OAAO,GAAG,IAAgB,IAAI,IAAI;KAC3C,CAAA,EAEF,kBAAC,OAAD;KACE,WAAW,EACT,+FACA,GACA,IAAW,0BAA0B,wCACtC;KACD,OAAO;MAAE,MAAM,GAAG,IAAgB,IAAI;MAAI,YAAY;MAAQ;KAC9D,CAAA,CACE;;GACF,CAAA,CACF;;;AAQV,SAAgB,EAAW,GAAmB;AAC5C,KAAI,CAAC,SAAS,EAAE,IAAI,IAAI,EAAG,QAAO;CAClC,IAAM,IAAI,KAAK,MAAM,IAAI,KAAK,EACxB,IAAI,KAAK,MAAO,IAAI,OAAQ,GAAG,EAC/B,IAAM,KAAK,MAAM,IAAI,GAAG;AAE9B,QADI,IAAI,IAAU,GAAG,EAAE,GAAG,EAAE,UAAU,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAI,UAAU,CAAC,SAAS,GAAG,IAAI,KACnF,GAAG,EAAE,GAAG,EAAI,UAAU,CAAC,SAAS,GAAG,IAAI"}
1
+ {"version":3,"file":"shared.js","names":[],"sources":["../../src/composed/file-preview/shared.tsx"],"sourcesContent":["'use client'\n\nimport {\n IconAlertTriangle,\n IconDownload,\n IconVolume,\n IconVolumeOff,\n} from '@tabler/icons-react'\nimport { motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { Button } from '../../ui/button'\nimport { Icon } from '../../ui/icon'\nimport { tweens } from '../../ui/lib/motion'\nimport { cn } from '../../ui/lib/utils'\n\n// ============================================================\n// Shared: Error Fallback\n// ============================================================\n\nexport function ErrorFallback({ message, url }: { message: string; url: string }) {\n return (\n <div className=\"flex flex-col items-center justify-center gap-ds-04 rounded-ds-md border border-surface-border bg-surface-sunken p-ds-08 text-center\">\n <Icon icon={IconAlertTriangle} size=\"2xl\" className=\"text-warning-9\" />\n <div>\n <p className=\"text-ds-md font-semibold text-surface-fg\">Preview unavailable</p>\n <p className=\"text-ds-sm text-surface-fg-muted mt-ds-01\">{message}</p>\n </div>\n <Button variant=\"outline\" size=\"xs\" startIcon={<Icon icon={IconDownload} />} asChild>\n <a href={url} download target=\"_blank\" rel=\"noopener noreferrer\">Download file</a>\n </Button>\n </div>\n )\n}\n\n// ============================================================\n// Shared: Floating Toolbar\n// ============================================================\n\nexport function Toolbar({ children, className }: { children: React.ReactNode; className?: string }) {\n return (\n <motion.div\n initial={{ opacity: 0, y: 8 }}\n animate={{ opacity: 1, y: 0 }}\n transition={tweens.fade}\n className={cn(\n 'flex items-center gap-ds-01 rounded-ds-md border border-surface-border bg-surface-overlay/95 px-ds-02 py-ds-01 shadow-floating backdrop-blur-xs',\n className,\n )}\n >\n {children}\n </motion.div>\n )\n}\n\nexport function ToolbarDivider() {\n return <div className=\"mx-ds-01 h-4 w-px bg-surface-border-subtle\" />\n}\n\n// ============================================================\n// Shared: Volume Slider (Spotify/YouTube style)\n// Custom-built — no native input range. Consistent across browsers.\n// ============================================================\n\nexport function VolumeControl({\n volume,\n muted,\n onVolumeChange,\n onMuteToggle,\n variant = 'light',\n}: {\n volume: number\n muted: boolean\n onVolumeChange: (v: number) => void\n onMuteToggle: () => void\n variant?: 'light' | 'dark'\n}) {\n const trackRef = React.useRef<HTMLDivElement>(null)\n const [dragging, setDragging] = React.useState(false)\n const displayVolume = muted ? 0 : volume\n\n function getVolumeFromEvent(e: MouseEvent | React.MouseEvent) {\n if (!trackRef.current) return volume\n const rect = trackRef.current.getBoundingClientRect()\n return Math.max(0, Math.min(1, (e.clientX - rect.left) / rect.width))\n }\n\n function handlePointerDown(e: React.PointerEvent) {\n e.preventDefault()\n setDragging(true)\n const v = getVolumeFromEvent(e)\n onVolumeChange(v)\n ;(e.target as HTMLElement).setPointerCapture(e.pointerId)\n }\n\n function handlePointerMove(e: React.PointerEvent) {\n if (!dragging) return\n onVolumeChange(getVolumeFromEvent(e))\n }\n\n function handlePointerUp() {\n setDragging(false)\n }\n\n const isDark = variant === 'dark'\n const trackBg = isDark ? 'bg-white/30' : 'bg-surface-sunken'\n const fillBg = isDark ? 'bg-white' : 'bg-accent-9'\n const thumbBg = isDark ? 'bg-white' : 'bg-accent-9'\n const iconClass = isDark ? 'text-white hover:text-white/80' : 'text-surface-fg-muted hover:text-surface-fg'\n\n return (\n <div className=\"group/vol flex items-center gap-ds-02 shrink-0\">\n <button onClick={onMuteToggle} className={cn('transition-colors', iconClass)} aria-label={muted ? 'Unmute (M)' : 'Mute (M)'} title={muted ? 'Unmute' : 'Mute'}>\n {muted || volume === 0 ? <Icon icon={IconVolumeOff} size=\"sm\" /> : <Icon icon={IconVolume} size=\"sm\" />}\n </button>\n <div className=\"w-0 overflow-hidden group-hover/vol:w-20 transition-[width] duration-200 ease-productive-standard flex items-center\">\n <div\n ref={trackRef}\n className={cn('relative w-full h-1 rounded-full cursor-pointer', trackBg)}\n onPointerDown={handlePointerDown}\n onPointerMove={handlePointerMove}\n onPointerUp={handlePointerUp}\n role=\"slider\"\n aria-label=\"Volume\"\n aria-valuenow={Math.round(displayVolume * 100)}\n aria-valuemin={0}\n aria-valuemax={100}\n tabIndex={0}\n >\n {/* Fill */}\n <div\n className={cn('absolute left-0 top-0 h-full rounded-full transition-[width] duration-75', fillBg)}\n style={{ width: `${displayVolume * 100}%` }}\n />\n {/* Thumb */}\n <div\n className={cn(\n 'absolute top-1/2 -translate-y-1/2 h-2.5 w-2.5 rounded-full shadow-raised transition-opacity',\n thumbBg,\n dragging ? 'opacity-100 scale-110' : 'opacity-0 group-hover/vol:opacity-100',\n )}\n style={{ left: `${displayVolume * 100}%`, marginLeft: '-5px' }}\n />\n </div>\n </div>\n </div>\n )\n}\n\n// ============================================================\n// Shared: Time Formatting\n// ============================================================\n\nexport function formatTime(s: number): string {\n if (!isFinite(s) || s < 0) return '0:00'\n const h = Math.floor(s / 3600)\n const m = Math.floor((s % 3600) / 60)\n const sec = Math.floor(s % 60)\n if (h > 0) return `${h}:${m.toString().padStart(2, '0')}:${sec.toString().padStart(2, '0')}`\n return `${m}:${sec.toString().padStart(2, '0')}`\n}\n"],"mappings":"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"}
@@ -0,0 +1,432 @@
1
+ "use client";
2
+ import { durations as e, springs as t, tweens as n } from "../ui/lib/motion.js";
3
+ import { cn as r } from "../ui/lib/utils.js";
4
+ import { Icon as i } from "../ui/icon.js";
5
+ import { Alert as a } from "../ui/alert.js";
6
+ import { n as o } from "./badge-group.js";
7
+ import { Button as s } from "../ui/button.js";
8
+ import { Collapsible as c, CollapsibleContent as l, CollapsibleTrigger as u } from "../ui/collapsible.js";
9
+ import { Skeleton as d } from "../ui/skeleton.js";
10
+ import { Table as f, TableBody as p, TableCaption as m, TableCell as h, TableHead as g, TableHeader as _, TableRow as v } from "../ui/table.js";
11
+ import { Separator as y } from "../ui/separator.js";
12
+ import { StatCard as b } from "../ui/stat-card.js";
13
+ import { n as x } from "./motion-provider.js";
14
+ import * as S from "react";
15
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
16
+ import { IconCircle as T, IconCircleCheck as E, IconCircleX as D } from "@tabler/icons-react";
17
+ import { motion as O } from "framer-motion";
18
+ import k from "react-markdown";
19
+ import A from "remark-gfm";
20
+ //#region src/ai/blocks/block-table.tsx
21
+ function j(e, t) {
22
+ if (t.variant === "badge") {
23
+ if (e && typeof e == "object" && "label" in e) {
24
+ let t = e;
25
+ return /* @__PURE__ */ C(o, {
26
+ variant: "subtle",
27
+ size: "sm",
28
+ color: t.color,
29
+ children: t.label
30
+ });
31
+ }
32
+ return /* @__PURE__ */ C(o, {
33
+ variant: "subtle",
34
+ size: "sm",
35
+ children: String(e ?? "")
36
+ });
37
+ }
38
+ return String(e ?? "");
39
+ }
40
+ function M(e, t, n) {
41
+ return !t || !n ? e : [...e].sort((e, r) => {
42
+ let i = e[t], a = r[t], o = String(i ?? ""), s = String(a ?? ""), c = Number(i), l = Number(a);
43
+ if (!Number.isNaN(c) && !Number.isNaN(l)) return n === "asc" ? c - l : l - c;
44
+ let u = o.localeCompare(s);
45
+ return n === "asc" ? u : -u;
46
+ });
47
+ }
48
+ var N = S.memo(function({ data: e, confidence: n }) {
49
+ let { reducedMotion: i } = x(), [a, o] = S.useState(null), [s, c] = S.useState(null), l = S.useCallback((t) => {
50
+ e.sortable && (a === t ? s === "asc" ? c("desc") : s === "desc" && (o(null), c(null)) : (o(t), c("asc")));
51
+ }, [
52
+ e.sortable,
53
+ a,
54
+ s
55
+ ]), u = e.columns ?? [], d = M(e.rows ?? [], a, s);
56
+ return /* @__PURE__ */ C("div", {
57
+ className: r("overflow-x-auto", n === "low" && "border-l-2 border-warning-7 pl-3"),
58
+ children: /* @__PURE__ */ w(f, { children: [
59
+ e.caption && /* @__PURE__ */ C(m, { children: e.caption }),
60
+ /* @__PURE__ */ C(_, { children: /* @__PURE__ */ C(v, { children: u.map((t) => {
61
+ let n = a === t.key, i = e.sortable ? n ? s === "asc" ? "ascending" : "descending" : "none" : void 0;
62
+ return /* @__PURE__ */ C(g, {
63
+ role: "columnheader",
64
+ className: r(t.variant === "number" && "text-right", e.sortable && "cursor-pointer select-none"),
65
+ tabIndex: e.sortable ? 0 : void 0,
66
+ onClick: e.sortable ? () => l(t.key) : void 0,
67
+ onKeyDown: e.sortable ? (e) => {
68
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), l(t.key));
69
+ } : void 0,
70
+ "aria-sort": i,
71
+ children: /* @__PURE__ */ w("span", {
72
+ className: "inline-flex items-center gap-1",
73
+ children: [
74
+ t.label,
75
+ n && s === "asc" && /* @__PURE__ */ C("span", {
76
+ "aria-hidden": "true",
77
+ children: "▲"
78
+ }),
79
+ n && s === "desc" && /* @__PURE__ */ C("span", {
80
+ "aria-hidden": "true",
81
+ children: "▼"
82
+ })
83
+ ]
84
+ })
85
+ }, t.key);
86
+ }) }) }),
87
+ /* @__PURE__ */ C(p, { children: d.map((e, n) => {
88
+ let a = typeof e.id == "string" || typeof e.id == "number" ? String(e.id) : `row-${n}`;
89
+ return /* @__PURE__ */ C(i ? "tr" : O.tr, {
90
+ className: "hover:bg-surface-raised-hover transition-colors",
91
+ ...i ? {} : {
92
+ initial: {
93
+ opacity: 0,
94
+ y: 6
95
+ },
96
+ animate: {
97
+ opacity: 1,
98
+ y: 0
99
+ },
100
+ transition: {
101
+ ...t.responsive,
102
+ delay: n * .03
103
+ }
104
+ },
105
+ children: u.map((t) => /* @__PURE__ */ C(h, {
106
+ className: r("text-ds-sm py-ds-02b px-ds-04", t.variant === "number" && "text-right tabular-nums font-medium"),
107
+ children: j(e[t.key], t)
108
+ }, t.key))
109
+ }, a);
110
+ }) })
111
+ ] })
112
+ });
113
+ });
114
+ N.displayName = "BlockTable";
115
+ //#endregion
116
+ //#region src/ai/blocks/confirm.tsx
117
+ var P = S.memo(function({ data: e, confidence: t, onAction: n }) {
118
+ let i = S.useCallback(() => {
119
+ n?.(e.actionId, "confirm");
120
+ }, [e.actionId, n]), a = S.useCallback(() => {
121
+ n?.(e.actionId, "cancel");
122
+ }, [e.actionId, n]);
123
+ return /* @__PURE__ */ w("div", {
124
+ className: r(t === "low" && "border-l-2 border-warning-7 pl-3"),
125
+ children: [
126
+ e.description && /* @__PURE__ */ C("p", {
127
+ className: "text-ds-sm text-surface-fg-muted mb-3",
128
+ children: e.description
129
+ }),
130
+ /* @__PURE__ */ w("div", {
131
+ className: "flex items-center gap-3",
132
+ children: [/* @__PURE__ */ C(s, {
133
+ variant: "solid",
134
+ color: e.destructive ? "error" : void 0,
135
+ onClick: i,
136
+ children: e.label
137
+ }), /* @__PURE__ */ C(s, {
138
+ variant: "ghost",
139
+ onClick: a,
140
+ children: "Cancel"
141
+ })]
142
+ }),
143
+ e.rationale && /* @__PURE__ */ w(c, {
144
+ className: "mt-3",
145
+ children: [/* @__PURE__ */ C(u, {
146
+ asChild: !0,
147
+ children: /* @__PURE__ */ C("button", {
148
+ type: "button",
149
+ className: "text-ds-xs text-surface-fg-subtle underline cursor-pointer",
150
+ children: "Why this action?"
151
+ })
152
+ }), /* @__PURE__ */ C(l, { children: /* @__PURE__ */ C("p", {
153
+ className: "text-ds-sm text-surface-fg-muted mt-2 p-3 bg-surface-raised rounded-ds-lg",
154
+ children: e.rationale
155
+ }) })]
156
+ })
157
+ ]
158
+ });
159
+ });
160
+ P.displayName = "ConfirmBlock";
161
+ //#endregion
162
+ //#region src/ai/blocks/divider.tsx
163
+ var F = S.memo(function(e) {
164
+ let { reducedMotion: t } = x();
165
+ return t ? /* @__PURE__ */ C(y, {}) : /* @__PURE__ */ C(O.div, {
166
+ initial: { scaleX: 0 },
167
+ animate: { scaleX: 1 },
168
+ style: { originX: .5 },
169
+ transition: n.elegant,
170
+ children: /* @__PURE__ */ C(y, {})
171
+ });
172
+ });
173
+ F.displayName = "DividerBlock";
174
+ //#endregion
175
+ //#region src/ai/blocks/error.tsx
176
+ var I = S.memo(function({ data: e, confidence: t }) {
177
+ return /* @__PURE__ */ w("div", {
178
+ className: r(t === "low" && "border-l-2 border-warning-7 pl-3"),
179
+ children: [/* @__PURE__ */ C(a, {
180
+ color: "error",
181
+ variant: "subtle",
182
+ title: e.title,
183
+ children: /* @__PURE__ */ C("div", {
184
+ className: "prose prose-sm",
185
+ children: /* @__PURE__ */ C(k, {
186
+ remarkPlugins: [A],
187
+ children: e.message
188
+ })
189
+ })
190
+ }), e.suggestion && /* @__PURE__ */ C("p", {
191
+ className: "mt-2 text-ds-sm text-surface-fg-muted",
192
+ children: e.suggestion
193
+ })]
194
+ });
195
+ });
196
+ I.displayName = "ErrorBlock";
197
+ //#endregion
198
+ //#region src/ai/blocks/info.tsx
199
+ var L = S.memo(function({ data: e }) {
200
+ return /* @__PURE__ */ C(a, {
201
+ color: "info",
202
+ variant: "subtle",
203
+ role: "status",
204
+ children: e.message
205
+ });
206
+ });
207
+ L.displayName = "InfoBlock";
208
+ //#endregion
209
+ //#region src/ai/blocks/loading.tsx
210
+ function R() {
211
+ return /* @__PURE__ */ C(O.span, {
212
+ className: "inline-block h-4 w-4 rounded-full border-2 border-current border-t-transparent text-accent-9",
213
+ animate: { rotate: 360 },
214
+ transition: {
215
+ repeat: Infinity,
216
+ duration: 1,
217
+ ease: "linear"
218
+ },
219
+ "aria-hidden": "true",
220
+ "data-testid": "step-spinner"
221
+ });
222
+ }
223
+ function z({ status: e }) {
224
+ switch (e) {
225
+ case "done": return /* @__PURE__ */ C("span", {
226
+ "data-testid": "step-icon-done",
227
+ children: /* @__PURE__ */ C(i, {
228
+ icon: E,
229
+ size: "sm",
230
+ className: "text-success-11"
231
+ })
232
+ });
233
+ case "active": return /* @__PURE__ */ C(R, {});
234
+ case "error": return /* @__PURE__ */ C("span", {
235
+ "data-testid": "step-icon-error",
236
+ children: /* @__PURE__ */ C(i, {
237
+ icon: D,
238
+ size: "sm",
239
+ className: "text-error-11"
240
+ })
241
+ });
242
+ default: return /* @__PURE__ */ C("span", {
243
+ "data-testid": "step-icon-pending",
244
+ children: /* @__PURE__ */ C(i, {
245
+ icon: T,
246
+ size: "sm",
247
+ className: "text-surface-fg-subtle opacity-50"
248
+ })
249
+ });
250
+ }
251
+ }
252
+ var B = S.memo(function({ data: t }) {
253
+ let { reducedMotion: n } = x(), i = n;
254
+ if (t.lines != null) {
255
+ let e = Math.max(1, t.lines);
256
+ return /* @__PURE__ */ w("div", {
257
+ role: "status",
258
+ "aria-busy": "true",
259
+ "aria-label": "Loading",
260
+ className: "flex flex-col gap-2",
261
+ children: [Array.from({ length: e }).map((t, n) => /* @__PURE__ */ C(d, {
262
+ animation: "shimmer",
263
+ className: r("h-4", n === e - 1 ? "w-3/5" : "w-full")
264
+ }, n)), /* @__PURE__ */ C("span", {
265
+ className: "sr-only",
266
+ children: "Loading"
267
+ })]
268
+ });
269
+ }
270
+ return t.steps ? /* @__PURE__ */ w("div", {
271
+ role: "status",
272
+ "aria-busy": "true",
273
+ "aria-label": "Processing",
274
+ className: "flex flex-col gap-2",
275
+ children: [t.steps.map((t, n) => /* @__PURE__ */ w(O.div, {
276
+ className: "flex items-center gap-2",
277
+ initial: i ? void 0 : {
278
+ opacity: 0,
279
+ x: -8
280
+ },
281
+ animate: {
282
+ opacity: 1,
283
+ x: 0
284
+ },
285
+ transition: i ? { duration: 0 } : {
286
+ duration: e.moderate01b,
287
+ delay: n * .06
288
+ },
289
+ children: [/* @__PURE__ */ C(z, { status: t.status }), /* @__PURE__ */ C("span", {
290
+ className: r("text-ds-sm", t.status === "done" || t.status === "active" ? "text-surface-fg" : "text-surface-fg-subtle"),
291
+ children: t.label
292
+ })]
293
+ }, t.id)), /* @__PURE__ */ C("span", {
294
+ className: "sr-only",
295
+ children: "Processing"
296
+ })]
297
+ }) : /* @__PURE__ */ C("div", {
298
+ role: "status",
299
+ "aria-busy": "true",
300
+ "aria-label": "Loading",
301
+ children: /* @__PURE__ */ C("span", {
302
+ className: "sr-only",
303
+ children: "Loading"
304
+ })
305
+ });
306
+ });
307
+ B.displayName = "LoadingBlock";
308
+ //#endregion
309
+ //#region src/ai/blocks/stat-row.tsx
310
+ var V = S.memo(function({ data: e }) {
311
+ let { reducedMotion: n } = x(), r = e.stats ?? [];
312
+ return r.length === 0 ? null : /* @__PURE__ */ C("div", {
313
+ className: "flex flex-wrap gap-ds-05",
314
+ children: r.map((e, r) => {
315
+ let i = e.change ? {
316
+ value: e.change.value,
317
+ direction: e.change.direction
318
+ } : void 0;
319
+ return n ? /* @__PURE__ */ C("div", {
320
+ className: "flex-1 min-w-[140px]",
321
+ children: /* @__PURE__ */ C(b, {
322
+ label: e.label,
323
+ value: e.value,
324
+ delta: i
325
+ })
326
+ }, e.label) : /* @__PURE__ */ C(O.div, {
327
+ className: "flex-1 min-w-[140px]",
328
+ initial: {
329
+ opacity: 0,
330
+ y: 8
331
+ },
332
+ animate: {
333
+ opacity: 1,
334
+ y: 0
335
+ },
336
+ transition: {
337
+ ...t.responsive,
338
+ delay: r * .08
339
+ },
340
+ children: /* @__PURE__ */ C(b, {
341
+ label: e.label,
342
+ value: e.value,
343
+ delta: i
344
+ })
345
+ }, e.label);
346
+ })
347
+ });
348
+ });
349
+ V.displayName = "StatRowBlock";
350
+ //#endregion
351
+ //#region src/ai/blocks/success.tsx
352
+ var H = 5e3, U = S.memo(function({ data: e, blockId: t, confidence: n, onAction: i }) {
353
+ let { reducedMotion: o } = x(), c = o, l = e.undoTimeout ?? H, [u, d] = S.useState(l), [f, p] = S.useState(!!e.undoable);
354
+ S.useEffect(() => {
355
+ if (!e.undoable) return;
356
+ let t = setInterval(() => {
357
+ d((e) => {
358
+ let n = e - 100;
359
+ return n <= 0 ? (clearInterval(t), p(!1), 0) : n;
360
+ });
361
+ }, 100);
362
+ return () => clearInterval(t);
363
+ }, [e.undoable, l]);
364
+ let m = S.useCallback(() => {
365
+ i?.(t || "unknown", "undo");
366
+ }, [t, i]), h = Math.ceil(u / 1e3), g = 2 * Math.PI * 9;
367
+ return /* @__PURE__ */ w("div", {
368
+ className: r(n === "low" && "border-l-2 border-warning-7 pl-3"),
369
+ children: [/* @__PURE__ */ C(a, {
370
+ color: "success",
371
+ variant: "subtle",
372
+ title: e.title,
373
+ children: e.message
374
+ }), f && e.undoable && /* @__PURE__ */ C("div", {
375
+ className: "mt-2 flex items-center gap-2",
376
+ children: /* @__PURE__ */ C(s, {
377
+ variant: "ghost",
378
+ size: "sm",
379
+ onClick: m,
380
+ "aria-label": `Undo action, ${h} seconds remaining`,
381
+ children: /* @__PURE__ */ w("span", {
382
+ className: "flex items-center gap-1.5",
383
+ children: [/* @__PURE__ */ w("svg", {
384
+ width: 20,
385
+ height: 20,
386
+ viewBox: "0 0 20 20",
387
+ className: "shrink-0 -rotate-90",
388
+ "aria-hidden": "true",
389
+ children: [/* @__PURE__ */ C("circle", {
390
+ cx: 20 / 2,
391
+ cy: 20 / 2,
392
+ r: 9,
393
+ fill: "none",
394
+ stroke: "currentColor",
395
+ strokeWidth: 2,
396
+ opacity: .2
397
+ }), /* @__PURE__ */ C(O.circle, {
398
+ cx: 20 / 2,
399
+ cy: 20 / 2,
400
+ r: 9,
401
+ fill: "none",
402
+ stroke: "currentColor",
403
+ strokeWidth: 2,
404
+ strokeDasharray: g,
405
+ initial: c ? void 0 : { strokeDashoffset: 0 },
406
+ animate: { strokeDashoffset: g },
407
+ transition: c ? { duration: 0 } : {
408
+ duration: l / 1e3,
409
+ ease: "linear"
410
+ }
411
+ })]
412
+ }), "Undo"]
413
+ })
414
+ })
415
+ })]
416
+ });
417
+ });
418
+ U.displayName = "SuccessBlock";
419
+ //#endregion
420
+ //#region src/ai/blocks/text.tsx
421
+ var W = S.memo(function({ data: e, confidence: t }) {
422
+ return /* @__PURE__ */ C("div", {
423
+ className: r("prose prose-sm", "text-surface-fg", "prose-headings:text-surface-fg", "prose-a:text-accent-11 prose-a:underline", "prose-code:text-accent-11 prose-code:bg-surface-raised prose-code:rounded prose-code:px-1", "prose-strong:text-surface-fg", t === "low" && "border-l-2 border-warning-7 pl-3"),
424
+ children: /* @__PURE__ */ C(k, {
425
+ remarkPlugins: [A],
426
+ children: e.content
427
+ })
428
+ });
429
+ });
430
+ W.displayName = "TextBlock";
431
+ //#endregion
432
+ export { L as a, P as c, B as i, N as l, U as n, I as o, V as r, F as s, W as t };