themelia-react-ui 1.0.0 → 1.0.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 (507) hide show
  1. package/CHANGELOG.md +190 -1
  2. package/README.md +92 -13
  3. package/dist/{accordion-BRWh3BM1.js → accordion-BRTcsp8J.js} +8 -8
  4. package/dist/accordion-BRTcsp8J.js.map +1 -0
  5. package/dist/{action-menu-Cx3SdfbN.js → action-menu-Drxw_vJk.js} +36 -36
  6. package/dist/action-menu-Drxw_vJk.js.map +1 -0
  7. package/dist/affordance-geometry.generated-CL84ZN9A.js +63 -0
  8. package/dist/affordance-geometry.generated-CL84ZN9A.js.map +1 -0
  9. package/dist/{ai-artifact-DkOArd3-.js → ai-artifact-DLVdK0Py.js} +151 -155
  10. package/dist/ai-artifact-DLVdK0Py.js.map +1 -0
  11. package/dist/{app-shell-BH_bGcE2.js → app-shell-C_fKpljx.js} +11 -10
  12. package/dist/app-shell-C_fKpljx.js.map +1 -0
  13. package/dist/{attachment-DsLgNHXt.js → attachment-DbjUWsP0.js} +12 -12
  14. package/dist/{attachment-DsLgNHXt.js.map → attachment-DbjUWsP0.js.map} +1 -1
  15. package/dist/auth-CAQcasMV.js +723 -0
  16. package/dist/auth-CAQcasMV.js.map +1 -0
  17. package/dist/{avatar-CsnWaYmt.js → avatar-Bu2HhitA.js} +76 -71
  18. package/dist/avatar-Bu2HhitA.js.map +1 -0
  19. package/dist/{badge-BZXZT9wd.js → badge-CzId1Wlm.js} +4 -4
  20. package/dist/{badge-BZXZT9wd.js.map → badge-CzId1Wlm.js.map} +1 -1
  21. package/dist/base/accordion.js +1 -1
  22. package/dist/base/action-menu.js +1 -1
  23. package/dist/base/attachment.js +1 -1
  24. package/dist/base/avatar.js +1 -1
  25. package/dist/base/badge.js +1 -1
  26. package/dist/base/buttons.js +3 -2
  27. package/dist/base/cards.js +3 -3
  28. package/dist/base/carousel.js +25 -27
  29. package/dist/base/carousel.js.map +1 -1
  30. package/dist/base/cascader.js +150 -148
  31. package/dist/base/cascader.js.map +1 -1
  32. package/dist/base/chart.js +1 -1
  33. package/dist/base/choice-inputs.js +3 -2
  34. package/dist/base/code-block.js +1 -1
  35. package/dist/base/combobox.js +1 -1
  36. package/dist/base/command.js +1 -1
  37. package/dist/base/copyable.js +1 -1
  38. package/dist/base/date-pickers.js +3 -3
  39. package/dist/base/display.js +7 -7
  40. package/dist/base/feedback.js +4 -3
  41. package/dist/base/forms-numeric.js +1 -1
  42. package/dist/base/forms.js +2 -2
  43. package/dist/base/inline-edit.js +233 -0
  44. package/dist/base/inline-edit.js.map +1 -0
  45. package/dist/base/item.js +1 -1
  46. package/dist/base/media-gallery.js +1 -1
  47. package/dist/base/navigation.js +6 -6
  48. package/dist/base/popover-menu.js +1 -1
  49. package/dist/base/popover.js +1 -1
  50. package/dist/base/qr-code.js +1 -1
  51. package/dist/base/repeaters.js +33 -33
  52. package/dist/base/repeaters.js.map +1 -1
  53. package/dist/base/sheet.js +1 -1
  54. package/dist/base/sidebar.js +1 -1
  55. package/dist/base/signature-pad.js +83 -81
  56. package/dist/base/signature-pad.js.map +1 -1
  57. package/dist/base/skeleton.js +1 -1
  58. package/dist/base/spinner.js +1 -1
  59. package/dist/base/structure.js +1 -1
  60. package/dist/base/table.js +1 -1
  61. package/dist/base/text-inputs.js +2 -2
  62. package/dist/base/toaster.js +6 -6
  63. package/dist/base/toaster.js.map +1 -1
  64. package/dist/base/tree.js +1 -1
  65. package/dist/base/upload-queue.js +1 -1
  66. package/dist/base/upload.js +3 -3
  67. package/dist/base/value-inputs.js +1 -1
  68. package/dist/blocks/admin.js +134 -134
  69. package/dist/blocks/admin.js.map +1 -1
  70. package/dist/blocks/ai.js +120 -117
  71. package/dist/blocks/ai.js.map +1 -1
  72. package/dist/blocks/analytics/usage-card.js +3 -0
  73. package/dist/blocks/analytics.js +530 -491
  74. package/dist/blocks/analytics.js.map +1 -1
  75. package/dist/blocks/collaboration.js +2 -2
  76. package/dist/blocks/commerce/receipt.js +1 -1
  77. package/dist/blocks/commerce.js +395 -383
  78. package/dist/blocks/commerce.js.map +1 -1
  79. package/dist/blocks/data-display.js +1 -1
  80. package/dist/blocks/onboarding.js +6 -6
  81. package/dist/blocks/onboarding.js.map +1 -1
  82. package/dist/blocks/planning.js +311 -0
  83. package/dist/blocks/planning.js.map +1 -0
  84. package/dist/blocks/timelines.js +1 -1
  85. package/dist/{breadcrumbs-DdQ_I5ra.js → breadcrumbs-BuYz5SDU.js} +9 -8
  86. package/dist/breadcrumbs-BuYz5SDU.js.map +1 -0
  87. package/dist/button-BZDasD04.js +651 -0
  88. package/dist/button-BZDasD04.js.map +1 -0
  89. package/dist/{button-BS6l5JUw.js → button-BZyfTvwm.js} +3 -3
  90. package/dist/button-BZyfTvwm.js.map +1 -0
  91. package/dist/buttons-D_6KJvEE.js +99 -0
  92. package/dist/buttons-D_6KJvEE.js.map +1 -0
  93. package/dist/{cards-BMB0laLG.js → cards-qGSErLw_.js} +12 -12
  94. package/dist/{cards-BMB0laLG.js.map → cards-qGSErLw_.js.map} +1 -1
  95. package/dist/chart-Bsc5BICK.js +150 -0
  96. package/dist/chart-Bsc5BICK.js.map +1 -0
  97. package/dist/checkbox-BQNDjUCh.js +34 -0
  98. package/dist/checkbox-BQNDjUCh.js.map +1 -0
  99. package/dist/choice-inputs-Mk3iWbhr.js +725 -0
  100. package/dist/choice-inputs-Mk3iWbhr.js.map +1 -0
  101. package/dist/{code-block-DIlqzoiD.js → code-block-DzHKRybS.js} +23 -23
  102. package/dist/code-block-DzHKRybS.js.map +1 -0
  103. package/dist/{collapsible-DsnktFNv.js → collapsible-ClvC7Bj3.js} +3 -3
  104. package/dist/{collapsible-DsnktFNv.js.map → collapsible-ClvC7Bj3.js.map} +1 -1
  105. package/dist/{collection-content-C4fthJV_.js → collection-content-D6S8cv_n.js} +3 -3
  106. package/dist/{collection-content-C4fthJV_.js.map → collection-content-D6S8cv_n.js.map} +1 -1
  107. package/dist/{combobox-HDftpzxt.js → combobox-BFnbJJp3.js} +18 -18
  108. package/dist/combobox-BFnbJJp3.js.map +1 -0
  109. package/dist/{combobox-CHD750do.js → combobox-hozNwUcc.js} +313 -316
  110. package/dist/combobox-hozNwUcc.js.map +1 -0
  111. package/dist/{command-D0kWBZfd.js → command-BnmSchli.js} +9 -9
  112. package/dist/command-BnmSchli.js.map +1 -0
  113. package/dist/comments-u5L0OGip.js +1156 -0
  114. package/dist/comments-u5L0OGip.js.map +1 -0
  115. package/dist/components/base/buttons/button-group.recipes.d.ts +1 -1
  116. package/dist/components/base/buttons/button.recipes.d.ts +10 -19
  117. package/dist/components/base/buttons/use-pending-button-focus.d.ts +3 -0
  118. package/dist/components/base/cards/card.recipes.d.ts +13 -5
  119. package/dist/components/base/cards/partials/card-primitives.d.ts +9 -4
  120. package/dist/components/base/cards/smart-card.types.d.ts +3 -1
  121. package/dist/components/base/date-pickers/date-picker.recipes.d.ts +5 -18
  122. package/dist/components/base/date-pickers/datepicker.types.d.ts +3 -0
  123. package/dist/components/base/forms/form-field.d.ts +1 -0
  124. package/dist/components/base/forms/form-sizing.d.ts +3 -3
  125. package/dist/components/base/inline-edit/index.d.ts +2 -0
  126. package/dist/components/base/inline-edit/inline-edit.d.ts +81 -0
  127. package/dist/components/base/inline-edit/inline-edit.recipes.d.ts +6 -0
  128. package/dist/components/base/navigation/tabs.d.ts +3 -5
  129. package/dist/components/base/popover/popover.recipes.d.ts +3 -3
  130. package/dist/components/base/structure/structure.recipes.d.ts +6 -0
  131. package/dist/components/base/table/index.d.ts +1 -1
  132. package/dist/components/base/text-inputs/clear-native-field.d.ts +2 -0
  133. package/dist/components/base/text-inputs/input-trailing-action.d.ts +3 -0
  134. package/dist/components/blocks/analytics/index.d.ts +1 -0
  135. package/dist/components/blocks/analytics/types.d.ts +1 -1
  136. package/dist/components/blocks/analytics/usage-card/index.d.ts +3 -0
  137. package/dist/components/blocks/analytics/usage-card/types.d.ts +52 -0
  138. package/dist/components/blocks/analytics/usage-card/usage-card.d.ts +6 -0
  139. package/dist/components/blocks/analytics/usage-card/usage-card.data.d.ts +19 -0
  140. package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +22 -0
  141. package/dist/components/blocks/collaboration/message/message.recipes.d.ts +12 -0
  142. package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +1 -4
  143. package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +1 -4
  144. package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +3 -3
  145. package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +1 -6
  146. package/dist/components/blocks/planning/index.d.ts +3 -0
  147. package/dist/components/blocks/planning/task-card.d.ts +3 -0
  148. package/dist/components/blocks/planning/task-card.strings.d.ts +15 -0
  149. package/dist/components/blocks/planning/task-card.types.d.ts +66 -0
  150. package/dist/components/features/combobox/components/error-message.d.ts +1 -1
  151. package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -0
  152. package/dist/components/features/filters/facets/search-facet.d.ts +0 -12
  153. package/dist/components/features/filters/facets/tags-facet.d.ts +1 -1
  154. package/dist/components/features/media-library/media-library.d.ts +1 -1
  155. package/dist/components/features/media-library/media-library.types.d.ts +9 -1
  156. package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
  157. package/dist/components/features/overlays/hooks/use-pending-overlay-focus.d.ts +2 -0
  158. package/dist/components/features/overlays/overlays.types.d.ts +5 -4
  159. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +2 -1
  160. package/dist/components/features/table/data-table.d.ts +1 -1
  161. package/dist/components/features/table/table.types.d.ts +1 -1
  162. package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +3 -1
  163. package/dist/components/layout/auth/auth.types.d.ts +1 -0
  164. package/dist/components/layout/page/page.d.ts +0 -1
  165. package/dist/components/layout/page/page.types.d.ts +9 -3
  166. package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -1
  167. package/dist/components/layout/sidebar/sidebar.types.d.ts +4 -0
  168. package/dist/components/layout/workspace/workspace.types.d.ts +3 -0
  169. package/dist/components/typography/heading.d.ts +5 -2
  170. package/dist/components/typography/index.d.ts +1 -1
  171. package/dist/components/typography/text.styles.d.ts +10 -0
  172. package/dist/components/ui/popover.d.ts +1 -1
  173. package/dist/components/ui/sidebar.d.ts +1 -1
  174. package/dist/components/ui/table.d.ts +2 -1
  175. package/dist/container.recipes-D9t8MHR3.js +27 -0
  176. package/dist/container.recipes-D9t8MHR3.js.map +1 -0
  177. package/dist/{containers-CPNyNo1_.js → containers-DqB-bSYE.js} +34 -56
  178. package/dist/containers-DqB-bSYE.js.map +1 -0
  179. package/dist/control-group-recipes-DBXmfh2E.js +21 -0
  180. package/dist/control-group-recipes-DBXmfh2E.js.map +1 -0
  181. package/dist/{copyable-B7SBXJMr.js → copyable-BTSByfmq.js} +6 -6
  182. package/dist/{copyable-B7SBXJMr.js.map → copyable-BTSByfmq.js.map} +1 -1
  183. package/dist/{data-display-b3d1TfL4.js → data-display-Bihs9Ven.js} +542 -329
  184. package/dist/data-display-Bihs9Ven.js.map +1 -0
  185. package/dist/{date-BFNMnrS5.js → date-DOKhJPu7.js} +4 -4
  186. package/dist/{date-BFNMnrS5.js.map → date-DOKhJPu7.js.map} +1 -1
  187. package/dist/{date-picker-DI6kPNof.js → date-picker-DzP5HQq7.js} +492 -472
  188. package/dist/date-picker-DzP5HQq7.js.map +1 -0
  189. package/dist/date-pickers-BpgGz7S-.js +196 -0
  190. package/dist/date-pickers-BpgGz7S-.js.map +1 -0
  191. package/dist/{display-ByI5tkqy.js → display-CS6Hbk18.js} +8 -8
  192. package/dist/{display-ByI5tkqy.js.map → display-CS6Hbk18.js.map} +1 -1
  193. package/dist/{dropdown-menu-BlnyHr-9.js → dropdown-menu-D-boNgGO.js} +7 -7
  194. package/dist/{dropdown-menu-BlnyHr-9.js.map → dropdown-menu-D-boNgGO.js.map} +1 -1
  195. package/dist/features/activities.js +152 -141
  196. package/dist/features/activities.js.map +1 -1
  197. package/dist/features/ai-chat.js +182 -179
  198. package/dist/features/ai-chat.js.map +1 -1
  199. package/dist/features/async-preview.js +9 -9
  200. package/dist/features/async-preview.js.map +1 -1
  201. package/dist/features/combobox.js +1 -1
  202. package/dist/features/comments.js +1 -1
  203. package/dist/features/data-view.js +25 -23
  204. package/dist/features/data-view.js.map +1 -1
  205. package/dist/features/email-composer/engine.js +1 -1
  206. package/dist/features/email-composer.js +103 -104
  207. package/dist/features/email-composer.js.map +1 -1
  208. package/dist/features/event-calendar.js +375 -373
  209. package/dist/features/event-calendar.js.map +1 -1
  210. package/dist/features/filters.js +1 -1
  211. package/dist/features/global-search.js +222 -224
  212. package/dist/features/global-search.js.map +1 -1
  213. package/dist/features/kanban.js +29 -29
  214. package/dist/features/kanban.js.map +1 -1
  215. package/dist/features/map.js +59 -58
  216. package/dist/features/map.js.map +1 -1
  217. package/dist/features/media-library.js +856 -855
  218. package/dist/features/media-library.js.map +1 -1
  219. package/dist/features/mentions.js +1 -1
  220. package/dist/features/overlays.js +1 -1
  221. package/dist/features/products.js +1210 -1209
  222. package/dist/features/products.js.map +1 -1
  223. package/dist/features/questionnaire.js +133 -132
  224. package/dist/features/questionnaire.js.map +1 -1
  225. package/dist/features/resource-assignment.js +29 -31
  226. package/dist/features/resource-assignment.js.map +1 -1
  227. package/dist/features/resource.js +13 -13
  228. package/dist/features/resource.js.map +1 -1
  229. package/dist/features/rich-text-editor.js +2 -2
  230. package/dist/features/schema-form.js +82 -82
  231. package/dist/features/schema-form.js.map +1 -1
  232. package/dist/features/suggestions.js +3 -3
  233. package/dist/features/sync.js +4 -4
  234. package/dist/features/sync.js.map +1 -1
  235. package/dist/features/table.js +1 -1
  236. package/dist/features/theme-tweaker.js +456 -450
  237. package/dist/features/theme-tweaker.js.map +1 -1
  238. package/dist/feedback-CJkUAapr.js +233 -0
  239. package/dist/feedback-CJkUAapr.js.map +1 -0
  240. package/dist/field-affordance-recipes-uKY4MsZ_.js +25 -0
  241. package/dist/field-affordance-recipes-uKY4MsZ_.js.map +1 -0
  242. package/dist/{field-state-recipes-CBTRt9Bt.js → field-state-recipes-DQQpiLWC.js} +3 -3
  243. package/dist/field-state-recipes-DQQpiLWC.js.map +1 -0
  244. package/dist/{filters-qtrcv1hf.js → filters-D6FF8L6s.js} +715 -720
  245. package/dist/filters-D6FF8L6s.js.map +1 -0
  246. package/dist/{form-field-C6W-y2hR.js → form-field-CZwrkP7m.js} +17 -9
  247. package/dist/form-field-CZwrkP7m.js.map +1 -0
  248. package/dist/{form-sizing-39NohSqn.js → form-sizing-QP8aIRaW.js} +10 -6
  249. package/dist/form-sizing-QP8aIRaW.js.map +1 -0
  250. package/dist/{forms-BF-HSbff.js → forms-B5NCbkSC.js} +35 -35
  251. package/dist/{forms-BF-HSbff.js.map → forms-B5NCbkSC.js.map} +1 -1
  252. package/dist/forms-numeric-Crrm80Lm.js +867 -0
  253. package/dist/forms-numeric-Crrm80Lm.js.map +1 -0
  254. package/dist/{header-B8ex54cY.js → header-kxruN3RM.js} +53 -49
  255. package/dist/header-kxruN3RM.js.map +1 -0
  256. package/dist/{hooks-D6UBVzf2.js → hooks-BrlnCwQd.js} +2 -2
  257. package/dist/{hooks-D6UBVzf2.js.map → hooks-BrlnCwQd.js.map} +1 -1
  258. package/dist/{http-CLTVJc5I.js → http-CdEIHyQf.js} +2 -2
  259. package/dist/http-CdEIHyQf.js.map +1 -0
  260. package/dist/{icon-badge-Dv0RYQwj.js → icon-badge-Btc6pQrp.js} +4 -4
  261. package/dist/{icon-badge-Dv0RYQwj.js.map → icon-badge-Btc6pQrp.js.map} +1 -1
  262. package/dist/index.js +2 -2
  263. package/dist/input-SX9V0AL3.js +255 -0
  264. package/dist/input-SX9V0AL3.js.map +1 -0
  265. package/dist/input-vxcaNCYC.js +20 -0
  266. package/dist/input-vxcaNCYC.js.map +1 -0
  267. package/dist/{item-pJ0GsOiJ.js → item-DE4YnuJx.js} +18 -17
  268. package/dist/item-DE4YnuJx.js.map +1 -0
  269. package/dist/layout/app-shell.js +1 -1
  270. package/dist/layout/auth.js +1 -1
  271. package/dist/layout/containers.js +1 -1
  272. package/dist/layout/header.js +1 -1
  273. package/dist/layout/hooks.js +1 -1
  274. package/dist/layout/navigation.js +1 -1
  275. package/dist/layout/page.js +1 -1
  276. package/dist/layout/settings.js +1 -1
  277. package/dist/layout/sidebar.js +2 -2
  278. package/dist/layout/workspace.js +1 -1
  279. package/dist/layout.js +10 -10
  280. package/dist/lib/affordance-geometry.generated.d.ts +44 -4
  281. package/dist/lib/control-group-recipes.d.ts +22 -0
  282. package/dist/lib/field-affordance-recipes.d.ts +35 -2
  283. package/dist/lib/field-state-recipes.d.ts +2 -2
  284. package/dist/lib/navigation-row-recipes.d.ts +3 -2
  285. package/dist/lib/overlay-anatomy-recipes.d.ts +1 -1
  286. package/dist/lib/surface-recipes.d.ts +5 -2
  287. package/dist/lib/token-merge.generated.d.ts +144 -2
  288. package/dist/lib/ui-provider/types.d.ts +4 -2
  289. package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
  290. package/dist/lib/utils.js +1 -1
  291. package/dist/{media-gallery-Ca4YmvBi.js → media-gallery-DLp3HAz0.js} +75 -74
  292. package/dist/media-gallery-DLp3HAz0.js.map +1 -0
  293. package/dist/{mentions-CRio8mTm.js → mentions-Cl0Kt_Pd.js} +52 -50
  294. package/dist/{mentions-CRio8mTm.js.map → mentions-Cl0Kt_Pd.js.map} +1 -1
  295. package/dist/message-SZUNB1eX.js +127 -0
  296. package/dist/message-SZUNB1eX.js.map +1 -0
  297. package/dist/{navigation-BTrEb5u4.js → navigation-DnQSNMT0.js} +64 -55
  298. package/dist/navigation-DnQSNMT0.js.map +1 -0
  299. package/dist/{navigation-DqEITuD2.js → navigation-DyytsLRB.js} +37 -37
  300. package/dist/navigation-DyytsLRB.js.map +1 -0
  301. package/dist/{navigation-row-recipes-BFpvGPGE.js → navigation-row-recipes-DQEXQcqY.js} +3 -3
  302. package/dist/navigation-row-recipes-DQEXQcqY.js.map +1 -0
  303. package/dist/{number-BNT_BIzJ.js → number-DasMFWEG.js} +4 -4
  304. package/dist/{number-BNT_BIzJ.js.map → number-DasMFWEG.js.map} +1 -1
  305. package/dist/overlays-DUbs1KEi.js +1011 -0
  306. package/dist/overlays-DUbs1KEi.js.map +1 -0
  307. package/dist/{page-BMBGjJY8.js → page-hGmT4nWK.js} +75 -64
  308. package/dist/page-hGmT4nWK.js.map +1 -0
  309. package/dist/{page-header-BH41wCyY.js → page-header-D8nERkn5.js} +9 -9
  310. package/dist/page-header-D8nERkn5.js.map +1 -0
  311. package/dist/{pagination-C29vvt3I.js → pagination-NLGqRirf.js} +20 -20
  312. package/dist/pagination-NLGqRirf.js.map +1 -0
  313. package/dist/{popover-TInGXsjg.js → popover-CghIYdQf.js} +23 -22
  314. package/dist/popover-CghIYdQf.js.map +1 -0
  315. package/dist/{popover-menu-BzqXqE72.js → popover-menu-B4PoWhRl.js} +6 -6
  316. package/dist/{popover-menu-BzqXqE72.js.map → popover-menu-B4PoWhRl.js.map} +1 -1
  317. package/dist/{popover.recipes-zgBhMlUu.js → popover.recipes-QlD4JenO.js} +5 -5
  318. package/dist/popover.recipes-QlD4JenO.js.map +1 -0
  319. package/dist/{primitives-DKPOGVpj.js → primitives-C7ff0QaI.js} +120 -113
  320. package/dist/primitives-C7ff0QaI.js.map +1 -0
  321. package/dist/primitives.js +3 -3
  322. package/dist/progress-BroqrAyV.js +169 -0
  323. package/dist/progress-BroqrAyV.js.map +1 -0
  324. package/dist/{receipt-DYWTQGEc.js → receipt-BuJynLgf.js} +8 -8
  325. package/dist/{receipt-DYWTQGEc.js.map → receipt-BuJynLgf.js.map} +1 -1
  326. package/dist/{rich-text-B7sBAdDG.js → rich-text-DlxDOtf4.js} +4 -4
  327. package/dist/{rich-text-B7sBAdDG.js.map → rich-text-DlxDOtf4.js.map} +1 -1
  328. package/dist/rich-text-editor-BKyG7rWz.js +574 -0
  329. package/dist/rich-text-editor-BKyG7rWz.js.map +1 -0
  330. package/dist/{rich-text-editor.recipes-DxvOE0Lp.js → rich-text-editor.recipes-B72Nfuze.js} +35 -26
  331. package/dist/rich-text-editor.recipes-B72Nfuze.js.map +1 -0
  332. package/dist/{scroll-area-BheMQ270.js → scroll-area-D-pIhEKl.js} +3 -3
  333. package/dist/scroll-area-D-pIhEKl.js.map +1 -0
  334. package/dist/{separator-Gk_WXH-l.js → separator-BNIgG3au.js} +3 -3
  335. package/dist/{separator-Gk_WXH-l.js.map → separator-BNIgG3au.js.map} +1 -1
  336. package/dist/{separator-DO0EbCEm.js → separator-BhtFyo4x.js} +2 -2
  337. package/dist/{separator-DO0EbCEm.js.map → separator-BhtFyo4x.js.map} +1 -1
  338. package/dist/services/actions.js +1 -1
  339. package/dist/{settings-D9f_wdIC.js → settings-DOTOzeZ2.js} +10 -9
  340. package/dist/{settings-D9f_wdIC.js.map → settings-DOTOzeZ2.js.map} +1 -1
  341. package/dist/{sheet-vOUloJ4O.js → sheet-BFhrNehm.js} +11 -11
  342. package/dist/sheet-BFhrNehm.js.map +1 -0
  343. package/dist/{sidebar-CNBKFDRW.js → sidebar-CyR4XKwR.js} +219 -200
  344. package/dist/sidebar-CyR4XKwR.js.map +1 -0
  345. package/dist/{sidebar-C3UKkbC5.js → sidebar-SvGJ0Zwi.js} +63 -58
  346. package/dist/sidebar-SvGJ0Zwi.js.map +1 -0
  347. package/dist/{skeleton-BvRhK8y-.js → skeleton-3F0uhYn3.js} +4 -4
  348. package/dist/{skeleton-BvRhK8y-.js.map → skeleton-3F0uhYn3.js.map} +1 -1
  349. package/dist/{smart-card-B5FcKODh.js → smart-card-DjGVV2xr.js} +206 -199
  350. package/dist/smart-card-DjGVV2xr.js.map +1 -0
  351. package/dist/{spinner-JtlFJ7Nc.js → spinner-Cpf7oRkF.js} +5 -5
  352. package/dist/{spinner-JtlFJ7Nc.js.map → spinner-Cpf7oRkF.js.map} +1 -1
  353. package/dist/{structure-BvW4vG4H.js → structure-CRdqVawd.js} +14 -14
  354. package/dist/{structure-BvW4vG4H.js.map → structure-CRdqVawd.js.map} +1 -1
  355. package/dist/{structure.recipes-DjqnBpwz.js → structure.recipes-Bqhf9oIh.js} +2 -2
  356. package/dist/structure.recipes-Bqhf9oIh.js.map +1 -0
  357. package/dist/style.css +1 -1
  358. package/dist/{surface-recipes-CQfRr-VL.js → surface-recipes-Dd__PD-w.js} +4 -3
  359. package/dist/surface-recipes-Dd__PD-w.js.map +1 -0
  360. package/dist/{table-DnlAJ-xR.js → table-CLtJTxoR.js} +17 -16
  361. package/dist/table-CLtJTxoR.js.map +1 -0
  362. package/dist/table-CcRDZiLP.js +1444 -0
  363. package/dist/table-CcRDZiLP.js.map +1 -0
  364. package/dist/tabs-BNgu7g0u.js +188 -0
  365. package/dist/tabs-BNgu7g0u.js.map +1 -0
  366. package/dist/text-inputs-DsR56TR-.js +330 -0
  367. package/dist/text-inputs-DsR56TR-.js.map +1 -0
  368. package/dist/{text.styles-BwB7vAF2.js → text.styles-Q4sGAIgA.js} +18 -10
  369. package/dist/text.styles-Q4sGAIgA.js.map +1 -0
  370. package/dist/theme.css +77 -115
  371. package/dist/{timelines-CnZ2S_Gr.js → timelines-D1pkt3se.js} +84 -78
  372. package/dist/timelines-D1pkt3se.js.map +1 -0
  373. package/dist/{tree-COD9BGdU.js → tree-BtmYyMZV.js} +8 -8
  374. package/dist/{tree-COD9BGdU.js.map → tree-BtmYyMZV.js.map} +1 -1
  375. package/dist/typography/rich-text.js +1 -1
  376. package/dist/typography-BxQgiZyw.js +96 -0
  377. package/dist/typography-BxQgiZyw.js.map +1 -0
  378. package/dist/typography.js +1 -1
  379. package/dist/{ui-provider-CftIB6TY.js → ui-provider-DRPn3qNl.js} +3 -2
  380. package/dist/ui-provider-DRPn3qNl.js.map +1 -0
  381. package/dist/ui-provider.js +1 -1
  382. package/dist/{upload-DIzw1dx1.js → upload-CDbYw1WN.js} +326 -323
  383. package/dist/upload-CDbYw1WN.js.map +1 -0
  384. package/dist/{upload-queue-xRJ3qDmd.js → upload-queue-CNd_hH_a.js} +25 -25
  385. package/dist/upload-queue-CNd_hH_a.js.map +1 -0
  386. package/dist/usage-card-VyJLUwRr.js +457 -0
  387. package/dist/usage-card-VyJLUwRr.js.map +1 -0
  388. package/dist/utils-BvH9PSmq.js +4275 -0
  389. package/dist/utils-BvH9PSmq.js.map +1 -0
  390. package/dist/value-inputs-D0KCrfVC.js +840 -0
  391. package/dist/value-inputs-D0KCrfVC.js.map +1 -0
  392. package/dist/{workspace-Cbqz4FzN.js → workspace-CcR8r-Nt.js} +115 -122
  393. package/dist/workspace-CcR8r-Nt.js.map +1 -0
  394. package/docs/consumer-skill/SKILL.md +112 -18
  395. package/docs/consumer-skill/examples/analytics.tsx +34 -0
  396. package/docs/consumer-skill/examples/app-layout.tsx +42 -12
  397. package/docs/consumer-skill/examples/detail.tsx +24 -9
  398. package/docs/consumer-skill/examples/manifest.json +27 -1
  399. package/docs/consumer-skill/examples/planning-usage-edit.tsx +29 -0
  400. package/docs/consumer-skill/examples/scoped-directory.tsx +77 -0
  401. package/docs/consumer-skill/examples/website.tsx +56 -0
  402. package/docs/consumer-skill/references/analytics.md +70 -0
  403. package/docs/consumer-skill/references/composition.md +219 -2
  404. package/docs/consumer-skill/references/design-contract.md +37 -10
  405. package/docs/consumer-skill/references/discovery.md +93 -5
  406. package/docs/consumer-skill/references/installation.md +20 -3
  407. package/docs/consumer-skill/references/integration.md +26 -0
  408. package/docs/consumer-skill/references/public-api.json +2416 -388
  409. package/docs/consumer-skill/references/review.md +126 -0
  410. package/docs/consumer-skill/references/theming.md +52 -7
  411. package/docs/consumer-skill/references/tokens.json +177 -9
  412. package/docs/consumer-skill/references/workflows.md +129 -1
  413. package/docs/consumer-skill/scripts/check-composition.mjs +31 -0
  414. package/docs/consumer-skill/scripts/composition-policy.mjs +317 -0
  415. package/docs/consumer-skill/scripts/discovery.mjs +65 -8
  416. package/docs/consumer-skill/scripts/surface-policy.mjs +66 -0
  417. package/package.json +30 -6
  418. package/dist/accordion-BRWh3BM1.js.map +0 -1
  419. package/dist/action-menu-Cx3SdfbN.js.map +0 -1
  420. package/dist/affordance-geometry.generated-DXl-Zb3Z.js +0 -23
  421. package/dist/affordance-geometry.generated-DXl-Zb3Z.js.map +0 -1
  422. package/dist/ai-artifact-DkOArd3-.js.map +0 -1
  423. package/dist/app-shell-BH_bGcE2.js.map +0 -1
  424. package/dist/auth-BDB1V_2q.js +0 -704
  425. package/dist/auth-BDB1V_2q.js.map +0 -1
  426. package/dist/avatar-CsnWaYmt.js.map +0 -1
  427. package/dist/breadcrumbs-DdQ_I5ra.js.map +0 -1
  428. package/dist/button-BS6l5JUw.js.map +0 -1
  429. package/dist/buttons-Co6GavvM.js +0 -674
  430. package/dist/buttons-Co6GavvM.js.map +0 -1
  431. package/dist/chart-DVfcwQu6.js +0 -149
  432. package/dist/chart-DVfcwQu6.js.map +0 -1
  433. package/dist/choice-inputs-CavA-SGV.js +0 -644
  434. package/dist/choice-inputs-CavA-SGV.js.map +0 -1
  435. package/dist/code-block-DIlqzoiD.js.map +0 -1
  436. package/dist/combobox-CHD750do.js.map +0 -1
  437. package/dist/combobox-HDftpzxt.js.map +0 -1
  438. package/dist/command-D0kWBZfd.js.map +0 -1
  439. package/dist/comments-CvYeglMS.js +0 -1132
  440. package/dist/comments-CvYeglMS.js.map +0 -1
  441. package/dist/containers-CPNyNo1_.js.map +0 -1
  442. package/dist/data-display-b3d1TfL4.js.map +0 -1
  443. package/dist/date-picker-DI6kPNof.js.map +0 -1
  444. package/dist/date-pickers-ByP6Cv2z.js +0 -224
  445. package/dist/date-pickers-ByP6Cv2z.js.map +0 -1
  446. package/dist/feedback-a9j9J-9A.js +0 -391
  447. package/dist/feedback-a9j9J-9A.js.map +0 -1
  448. package/dist/field-affordance-recipes-CHdUtn2Z.js +0 -17
  449. package/dist/field-affordance-recipes-CHdUtn2Z.js.map +0 -1
  450. package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
  451. package/dist/filters-qtrcv1hf.js.map +0 -1
  452. package/dist/form-field-C6W-y2hR.js.map +0 -1
  453. package/dist/form-sizing-39NohSqn.js.map +0 -1
  454. package/dist/forms-numeric-Y15Bg5Nr.js +0 -867
  455. package/dist/forms-numeric-Y15Bg5Nr.js.map +0 -1
  456. package/dist/header-B8ex54cY.js.map +0 -1
  457. package/dist/http-CLTVJc5I.js.map +0 -1
  458. package/dist/input-DMorJiTI.js +0 -202
  459. package/dist/input-DMorJiTI.js.map +0 -1
  460. package/dist/input-ci9fIgFH.js +0 -20
  461. package/dist/input-ci9fIgFH.js.map +0 -1
  462. package/dist/item-pJ0GsOiJ.js.map +0 -1
  463. package/dist/media-gallery-Ca4YmvBi.js.map +0 -1
  464. package/dist/message-B5-6LeYl.js +0 -108
  465. package/dist/message-B5-6LeYl.js.map +0 -1
  466. package/dist/navigation-BTrEb5u4.js.map +0 -1
  467. package/dist/navigation-DqEITuD2.js.map +0 -1
  468. package/dist/navigation-row-recipes-BFpvGPGE.js.map +0 -1
  469. package/dist/overlays-DBqV0J_V.js +0 -982
  470. package/dist/overlays-DBqV0J_V.js.map +0 -1
  471. package/dist/page-BMBGjJY8.js.map +0 -1
  472. package/dist/page-header-BH41wCyY.js.map +0 -1
  473. package/dist/pagination-C29vvt3I.js.map +0 -1
  474. package/dist/popover-TInGXsjg.js.map +0 -1
  475. package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
  476. package/dist/primitives-DKPOGVpj.js.map +0 -1
  477. package/dist/rich-text-editor-BZSJchAF.js +0 -575
  478. package/dist/rich-text-editor-BZSJchAF.js.map +0 -1
  479. package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +0 -1
  480. package/dist/scroll-area-BheMQ270.js.map +0 -1
  481. package/dist/select-B2mb-qN2.js +0 -108
  482. package/dist/select-B2mb-qN2.js.map +0 -1
  483. package/dist/sheet-vOUloJ4O.js.map +0 -1
  484. package/dist/sidebar-C3UKkbC5.js.map +0 -1
  485. package/dist/sidebar-CNBKFDRW.js.map +0 -1
  486. package/dist/smart-card-B5FcKODh.js.map +0 -1
  487. package/dist/structure.recipes-DjqnBpwz.js.map +0 -1
  488. package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
  489. package/dist/table-DnlAJ-xR.js.map +0 -1
  490. package/dist/table-ghtAQ-JJ.js +0 -1424
  491. package/dist/table-ghtAQ-JJ.js.map +0 -1
  492. package/dist/tabs-DY09eoZg.js +0 -187
  493. package/dist/tabs-DY09eoZg.js.map +0 -1
  494. package/dist/text-inputs-BhOcedTo.js +0 -331
  495. package/dist/text-inputs-BhOcedTo.js.map +0 -1
  496. package/dist/text.styles-BwB7vAF2.js.map +0 -1
  497. package/dist/timelines-CnZ2S_Gr.js.map +0 -1
  498. package/dist/typography-Cv8MT-82.js +0 -96
  499. package/dist/typography-Cv8MT-82.js.map +0 -1
  500. package/dist/ui-provider-CftIB6TY.js.map +0 -1
  501. package/dist/upload-DIzw1dx1.js.map +0 -1
  502. package/dist/upload-queue-xRJ3qDmd.js.map +0 -1
  503. package/dist/utils-C2EKeIw3.js +0 -72
  504. package/dist/utils-C2EKeIw3.js.map +0 -1
  505. package/dist/value-inputs-Co1fu-xv.js +0 -824
  506. package/dist/value-inputs-Co1fu-xv.js.map +0 -1
  507. package/dist/workspace-Cbqz4FzN.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"accordion-BRWh3BM1.js","names":["Accordion","AccordionPrimitive","AccordionItem","AccordionTrigger","AccordionContent","Accordion","React","PrimitiveAccordion","PrimitiveAccordionItem","PrimitiveAccordionTrigger","PrimitiveAccordionContent","Accordion","Text","motionRecipes","Stack","DisclosurePanelElement","IconBadge","React$1","Accordion$2","props","Accordion","cn","className","AccordionItem$1","AccordionTrigger$1","children","ChevronDownIcon","AccordionContent$1","panelProps","Accordion$1","AccordionItem","AccordionTrigger","isSimpleText","AccordionContent","ACCORDION_ROOT_VARIANT_CLASS","ACCORDION_ITEM_VARIANT_CLASS","ACCORDION_TRIGGER_BASE","ACCORDION_CONTENT_PADDING","defaultSmartAccordionStrings","SmartAccordion","forwardRef","stringsProp","strings","useStrings","hasIconColumn","iconStyle","items","item","contentPadding","triggerGridClass","onValueChange","next","variant","itemClassName","triggerClassName","SmartAccordionIcon","isSimpleContent","contentClassName","content","reserveSpace","icon"],"sources":["../src/components/ui/accordion.tsx","../src/components/base/accordion/accordion.tsx","../src/components/base/accordion/accordion-variants.ts","../src/components/base/accordion/accordion.strings.ts","../src/components/base/accordion/smart-accordion.tsx"],"sourcesContent":["import { DisclosurePanelElement } from './disclosure-panel';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { Accordion as AccordionPrimitive } from \"@base-ui/react/accordion\"\n\nimport { cn } from \"../../lib/utils\"\nimport { ChevronDownIcon } from \"lucide-react\"\n\nfunction Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {\n return (\n <AccordionPrimitive.Root\n data-slot=\"accordion\"\n className={cn(\"border-border accordion--component flex w-full flex-col border box-border overflow-hidden\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\"border-border accordion-item--component border-b last:border-b-0\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: AccordionPrimitive.Trigger.Props) {\n return (\n <AccordionPrimitive.Header className=\"accordion-header m-0\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\"accordion-trigger--component flex w-full items-center justify-between border-0 bg-transparent outline-none cursor-pointer box-border\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon data-slot=\"accordion-trigger-icon\" className={cn(\"accordion-trigger--icon size-icon text-muted-foreground shrink-0 [[aria-expanded=true]_&]:rotate-180\", motionRecipes.chevron)} />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({\n className,\n children,\n render,\n ...props\n}: AccordionPrimitive.Panel.Props) {\n return (\n <AccordionPrimitive.Panel\n data-slot=\"accordion-content\"\n className={cn(\"accordion-content--component box-border text-foreground h-(--accordion-panel-height)\", motionRecipes.disclosure, className)}\n {...props}\n render={(panelProps, state) => <DisclosurePanelElement props={panelProps} state={state} render={render} heightVariable=\"--accordion-panel-height\" />}\n >\n {children}\n </AccordionPrimitive.Panel>\n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n\n","/**\n * Accordion — tokenized base wrapper around the shadcn/Base UI primitive.\n *\n * The internal primitive intentionally keeps shadcn's roomy defaults. This\n * public layer calibrates them for admin surfaces: radius tokens, 12px row\n * insets, density-aware vertical rhythm, quiet hover/focus treatments, and\n * matching trigger/content columns. Consumers retain the complete compound\n * API and can override any treatment with `className`.\n */\nimport * as React from 'react';\n\nimport {\n\tAccordion as PrimitiveAccordion,\n\tAccordionContent as PrimitiveAccordionContent,\n\tAccordionItem as PrimitiveAccordionItem,\n\tAccordionTrigger as PrimitiveAccordionTrigger,\n} from '../../ui/accordion';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\n\nexport type AccordionProps = React.ComponentPropsWithoutRef<typeof PrimitiveAccordion>;\nexport type AccordionItemProps = React.ComponentPropsWithoutRef<typeof PrimitiveAccordionItem>;\nexport type AccordionTriggerProps = React.ComponentPropsWithoutRef<typeof PrimitiveAccordionTrigger>;\nexport type AccordionContentProps = React.ComponentPropsWithoutRef<typeof PrimitiveAccordionContent>;\n\nconst Accordion = React.forwardRef<React.ElementRef<typeof PrimitiveAccordion>, AccordionProps>(\n\tfunction Accordion({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t<PrimitiveAccordion\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'accordion--component rounded-radius-lg border-border bg-card',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAccordion.displayName = 'Accordion';\n\nconst AccordionItem = React.forwardRef<React.ElementRef<typeof PrimitiveAccordionItem>, AccordionItemProps>(\n\tfunction AccordionItem({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t<PrimitiveAccordionItem\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'accordion-item--component border-border data-open:bg-muted/30',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAccordionItem.displayName = 'AccordionItem';\n\nconst AccordionTrigger = React.forwardRef<React.ElementRef<typeof PrimitiveAccordionTrigger>, AccordionTriggerProps>(\n\tfunction AccordionTrigger({ className, children, ...props }, ref) {\n\t\tconst isSimpleText = typeof children === 'string' || typeof children === 'number' || typeof children === 'bigint';\n\t\treturn (\n\t\t\t<PrimitiveAccordionTrigger\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'accordion-trigger--component min-h-action items-center gap-space-lg px-row-x py-row-y',\n\t\t\t\t\t'text-left text-sm font-medium transition-colors hover:bg-muted/40 hover:no-underline',\n\t\t\t\t\t'focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-ring/50',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{isSimpleText ? (\n\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Text>\n\t\t\t\t) : children}\n\t\t\t</PrimitiveAccordionTrigger>\n\t\t);\n\t},\n);\nAccordionTrigger.displayName = 'AccordionTrigger';\n\nconst AccordionContent = React.forwardRef<React.ElementRef<typeof PrimitiveAccordionContent>, AccordionContentProps>(\n\tfunction AccordionContent({ className, children, ...props }, ref) {\n\t\tconst isSimpleText = typeof children === 'string' || typeof children === 'number' || typeof children === 'bigint';\n\t\treturn (\n\t\t\t<PrimitiveAccordionContent\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'accordion-content--component px-row-x pb-space-lg text-sm',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{isSimpleText ? (\n\t\t\t\t\t<Text tag=\"div\" size=\"inherit\" lineHeight=\"relaxed\" className=\"text-inherit\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Text>\n\t\t\t\t) : children}\n\t\t\t</PrimitiveAccordionContent>\n\t\t);\n\t},\n);\nAccordionContent.displayName = 'AccordionContent';\n\nexport {\n\tAccordion,\n\tAccordionItem,\n\tAccordionTrigger,\n\tAccordionContent,\n};\n","/**\n * Shared accordion-shell variant classes — used by both `SmartAccordion`\n * and any blocks surface that builds on `base/accordion` directly\n * (e.g. `blocks/onboarding/checklist`).\n *\n * Exported because two consumers already keep it in lockstep; a third\n * one will copy this exact map. Centralising means a future tweak\n * (e.g. tighten `card` items to `border-border/70`) propagates.\n *\n * Padding tokens for trigger / content live alongside so the rhythm\n * is shared too:\n *\n * - Trigger: `gap-space-lg px-row-x py-row-y` — density-driven,\n * `<UIProvider>`\n * override flows through.\n * - Content padding accounts for the base panel's `px-row-x`.\n * Medallion and inline rows use shared media/spacing tokens, and\n * no-icon rows add no extra left padding so body copy tracks the\n * trigger text column instead of drifting.\n */\nimport type { DisclosureSurface } from '../../../lib/component-vocabulary';\n\nexport type AccordionShellVariant = DisclosureSurface;\n\nexport const ACCORDION_ROOT_VARIANT_CLASS: Record<AccordionShellVariant, string> = {\n\tcard: 'gap-space-md border-0 rounded-none bg-transparent overflow-visible',\n\tbordered: 'rounded-radius-lg border border-border bg-card overflow-hidden',\n\tflat: 'border-0 rounded-none bg-transparent overflow-visible',\n};\n\nexport const ACCORDION_ITEM_VARIANT_CLASS: Record<AccordionShellVariant, string> = {\n\tcard: 'border border-border bg-card rounded-radius data-open:bg-muted/25',\n\tbordered: 'bg-transparent not-last:border-b border-border data-open:bg-muted/30',\n\tflat: 'border-0 not-last:border-b-0 bg-transparent data-open:bg-muted/30 rounded-radius',\n};\n\nexport const ACCORDION_TRIGGER_BASE =\n\t'items-center gap-space-lg px-row-x py-row-y text-left hover:no-underline';\n\n/**\n * Content-padding presets keyed off the leading-icon width. Use\n * `withMedallion` when the trigger renders a default `IconBadge`\n * plus the shared row gap so body text aligns under the title at every\n * consumer density.\n */\nexport const ACCORDION_CONTENT_PADDING = {\n\twithMedallion: 'pl-[calc(var(--spacing-row-x)+var(--spacing-avatar)+var(--spacing-space-lg))] pr-row-x pt-0',\n\twithInline: 'pl-[calc(var(--spacing-row-x)+var(--spacing-icon-lg)+var(--spacing-space-lg))] pr-row-x pt-0',\n\twithoutIcon: 'px-row-x pt-0',\n} as const;\n","/**\n * Strings for `SmartAccordion`. There aren't many — Radix handles the\n * trigger ARIA states automatically, so the only library-owned copy is\n * the optional landmark label on the wrapping nav region. Consumers\n * override per-item `title` / `badge` / `content` directly via\n * `SmartAccordionItem` props (the strings live in the data, not here).\n */\nexport interface SmartAccordionStrings {\n\t/**\n\t * Sets `aria-label` on the wrapping element so screen readers can name\n\t * the accordion region. Optional — when absent, no aria-label is set.\n\t */\n\tregionAriaLabel?: string;\n}\n\nexport const defaultSmartAccordionStrings: SmartAccordionStrings = {\n\tregionAriaLabel: undefined,\n};\n","/**\n * SmartAccordion — the canonical \"icon + title + optional badge + body\"\n * accordion pattern, with three visual variants for the surface chrome\n * (`card` | `bordered` | `flat`) and three icon framings (`medallion` |\n * `inline` | `none`).\n *\n * Composes the wrapped `base/accordion` parts (rule 2 — blocks-style\n * convenience built from re-exports, not the raw shadcn primitive).\n *\n * For richer rows (multi-line metadata, custom layouts), drop down to\n * the compound API:\n *\n * import { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n * from '.';\n */\nimport { forwardRef, type ReactNode } from 'react';\n\nimport { IconBadge } from '../display/icon-badge';\nimport { Stack } from '../structure';\nimport { Text } from '../../typography';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './accordion';\nimport {\n\tACCORDION_CONTENT_PADDING,\n\tACCORDION_ITEM_VARIANT_CLASS,\n\tACCORDION_ROOT_VARIANT_CLASS,\n\tACCORDION_TRIGGER_BASE,\n} from './accordion-variants';\nimport { defaultSmartAccordionStrings } from './accordion.strings';\nimport type {\n\tSmartAccordionIconStyle,\n\tSmartAccordionProps,\n} from './accordion.types';\n\n/**\n * Bounded accordion composition for repeated icon, title, description, badge,\n * and body sections. Use the compound Accordion parts when row structure or\n * per-item presentation differs.\n */\nexport const SmartAccordion = forwardRef<HTMLDivElement, SmartAccordionProps>(function SmartAccordion({\n\titems,\n\tmultiple = false,\n\tdefaultValue,\n\tvalue,\n\tonValueChange,\n\tvariant = 'bordered',\n\ticonStyle = 'inline',\n\tclassName,\n\titemClassName,\n\ttriggerClassName,\n\tcontentClassName,\n\tstrings: stringsProp,\n}, ref) {\n\tconst strings = useStrings(defaultSmartAccordionStrings, stringsProp);\n\tconst hasIconColumn = iconStyle !== 'none' && items.some((item) => item.icon != null);\n\tconst contentPadding =\n\t\t!hasIconColumn\n\t\t\t? ACCORDION_CONTENT_PADDING.withoutIcon\n\t\t\t: iconStyle === 'medallion'\n\t\t\t? ACCORDION_CONTENT_PADDING.withMedallion\n\t\t\t: ACCORDION_CONTENT_PADDING.withInline;\n\tconst triggerGridClass = !hasIconColumn\n\t\t? 'grid-cols-[minmax(0,1fr)]'\n\t\t: 'grid-cols-[auto_minmax(0,1fr)]';\n\treturn (\n\t\t<Accordion\n\t\t\tref={ref}\n\t\t\tmultiple={multiple}\n\t\t\tdefaultValue={defaultValue}\n\t\t\tvalue={value}\n\t\t\tonValueChange={\n\t\t\t\tonValueChange\n\t\t\t\t\t? (next) => onValueChange(next as string[])\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\taria-label={strings.regionAriaLabel}\n\t\t\tdata-variant={variant}\n\t\t\tdata-icon-style={iconStyle}\n\t\t\tclassName={cn('smart-accordion--component', ACCORDION_ROOT_VARIANT_CLASS[variant], className)}\n\t\t>\n\t\t\t{items.map((item) => (\n\t\t\t\t<AccordionItem\n\t\t\t\t\tkey={item.value}\n\t\t\t\t\tvalue={item.value}\n\t\t\t\t\tclassName={cn('smart-accordion--item', ACCORDION_ITEM_VARIANT_CLASS[variant], itemClassName)}\n\t\t\t\t>\n\t\t\t\t\t<AccordionTrigger\n\t\t\t\t\t\tclassName={cn('smart-accordion--trigger', ACCORDION_TRIGGER_BASE, triggerClassName)}\n\t\t\t\t\t\tdisabled={item.disabled}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className={cn('grid min-w-0 flex-1 items-center gap-x-space-lg', triggerGridClass)}>\n\t\t\t\t\t\t\t<SmartAccordionIcon\n\t\t\t\t\t\t\t\ticonStyle={iconStyle}\n\t\t\t\t\t\t\t\ticon={item.icon}\n\t\t\t\t\t\t\t\treserveSpace={hasIconColumn}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Stack render={<span />} gap=\"dense\" className=\"smart-accordion--heading flex-1\">\n\t\t\t\t\t\t\t\t<span className=\"flex min-w-0 flex-wrap items-center gap-x-space-md gap-y-space-xs\">\n\t\t\t\t\t\t\t\t\t{isSimpleContent(item.title) ? (\n\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" weight=\"semibold\" className=\"smart-accordion--title min-w-0\">\n\t\t\t\t\t\t\t\t\t\t\t{item.title}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t) : item.title}\n\t\t\t\t\t\t\t\t\t{item.badge != null && (\n\t\t\t\t\t\t\t\t\t\t<span className=\"smart-accordion--badge inline-flex shrink-0\">{item.badge}</span>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{!!item.description && (\n\t\t\t\t\t\t\t\t\tisSimpleContent(item.description) ? (\n\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" type=\"secondary\" className=\"smart-accordion--description min-w-0\">\n\t\t\t\t\t\t\t\t\t\t\t{item.description}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t) : item.description\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</AccordionTrigger>\n\t\t\t\t\t<AccordionContent\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t'smart-accordion--content',\n\t\t\t\t\t\t\tcontentPadding,\n\t\t\t\t\t\t\tcontentClassName,\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isSimpleContent(item.content) ? (\n\t\t\t\t\t\t\t<Text tag=\"div\" type=\"secondary\" lineHeight=\"relaxed\">\n\t\t\t\t\t\t\t\t{item.content}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t) : item.content}\n\t\t\t\t\t</AccordionContent>\n\t\t\t\t</AccordionItem>\n\t\t\t))}\n\t\t</Accordion>\n\t);\n});\n\nSmartAccordion.displayName = 'SmartAccordion';\n\nfunction isSimpleContent(content: ReactNode): content is string | number | bigint {\n\treturn typeof content === 'string' || typeof content === 'number' || typeof content === 'bigint';\n}\n\nfunction SmartAccordionIcon({\n\ticonStyle,\n\ticon,\n\treserveSpace,\n}: {\n\ticonStyle: SmartAccordionIconStyle;\n\ticon?: ReactNode;\n\treserveSpace: boolean;\n}) {\n\tif (iconStyle === 'none' || !reserveSpace) return null;\n\tif (!icon) {\n\t\treturn (\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'smart-accordion--icon inline-flex shrink-0',\n\t\t\t\t\ticonStyle === 'inline' ? 'size-icon-lg' : 'size-avatar',\n\t\t\t\t)}\n\t\t\t/>\n\t\t);\n\t}\n\tif (iconStyle === 'inline') {\n\t\treturn (\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName=\"smart-accordion--icon inline-flex size-icon-lg shrink-0 self-center text-muted-foreground [&>svg]:size-icon\"\n\t\t\t>\n\t\t\t\t{icon}\n\t\t\t</span>\n\t\t);\n\t}\n\treturn (\n\t\t<IconBadge size=\"md\" tone=\"neutral\" shape=\"circle\" aria-hidden=\"true\" className=\"smart-accordion--icon self-center\">\n\t\t\t{icon}\n\t\t</IconBadge>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;AAOA,SAASA,EAAU,EAAE,cAAW,GAAGmB,KAAwC;CACzE,OACE,kBAAClB,EAAmB,MAApB;EACE,aAAU;EACV,WAAWoB,EAAG,6FAA6FC,CAAS;EACpH,GAAIH;CACL,CAAA;AAEL;AAEA,SAASjB,EAAc,EAAE,cAAW,GAAGiB,KAAwC;CAC7E,OACE,kBAAClB,EAAmB,MAApB;EACE,aAAU;EACV,WAAWoB,EAAG,oEAAoEC,CAAS;EAC3F,GAAIH;CACL,CAAA;AAEL;AAEA,SAAShB,EAAiB,EACxB,cACA,aACA,GAAGgB,KACgC;CACnC,OACE,kBAAClB,EAAmB,QAApB;EAA2B,WAAU;EACnC,UAAA,kBAACA,EAAmB,SAApB;GACE,aAAU;GACV,WAAWoB,EAAG,wIAAwIC,CAAS;GAC/J,GAAIH;GAHN,UAAA,CAKGM,GACD,kBAACC,GAAD;IAAiB,aAAU;IAAyB,WAAWL,EAAG,wGAAwGR,EAAc,OAAO;GAAI,CAAA,CACzK;;CACH,CAAA;AAE/B;AAEA,SAAST,EAAiB,EACxB,cACA,aACA,WACA,GAAGe,KAC8B;CACjC,OACE,kBAAClB,EAAmB,OAApB;EACE,aAAU;EACV,WAAWoB,EAAG,wFAAwFR,EAAc,YAAYS,CAAS;EACzI,GAAIH;EACJ,SAAS,GAAY,MAAU,kBAACJ,GAAD;GAAwB,OAAOa;GAAmB;GAAe;GAAQ,gBAAe;EAA4B,CAAA;EAElJ;CACuB,CAAA;AAE9B;;;ACrCA,IAAMvB,IAAYC,EAAM,WACvB,SAAmB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,EAAK;OACD,CAAA,IACHA,EAAK,OACRA,EAAK,SAAS,QACd,kBAAC,QAAD;QAAM,WAAU;QAA+C,UAAAA,EAAK;OAAY,CAAA,CAE5E;MACL,CAAA,GAAA,CAAC,CAACA,EAAK,gBACPS,EAAgBT,EAAK,WAAW,IAC/B,kBAACnC,GAAD;OAAM,KAAI;OAAO,MAAK;OAAY,WAAU;OAC1C,UAAAmC,EAAK;MACD,CAAA,IACHA,EAAK,YAEJ;KACH,CAAA,CAAA;;GACY,CAAA,GAClB,kBAACd,GAAD;IACC,WAAWZ,EACV,4BACA2B,GACAS,CACD;IAEC,UAAAD,EAAgBT,EAAK,OAAO,IAC5B,kBAACnC,GAAD;KAAM,KAAI;KAAM,MAAK;KAAY,YAAW;KAC1C,UAAAmC,EAAK;IACD,CAAA,IACHA,EAAK;GACQ,CAAA,CACJ;EAhDT,GAAAA,EAAK,KAgDI,CACf;CACS,CAAA;AAEb,CAAC;AAED,EAAe,cAAc;AAE7B,SAASS,EAAgB,GAAyD;CACjF,OAAO,OAAOE,KAAY,YAAY,OAAOA,KAAY,YAAY,OAAOA,KAAY;AACzF;AAEA,SAASH,EAAmB,EAC3B,cACA,SACA,mBAKE;CAuBF,OAtBIV,MAAc,UAAU,CAACc,IAAqB,OAC7CC,IAWDf,MAAc,WAEhB,kBAAC,QAAD;EACC,eAAY;EACZ,WAAU;EAET,UAAAe;CACI,CAAA,IAIP,kBAAC5C,GAAD;EAAW,MAAK;EAAK,MAAK;EAAU,OAAM;EAAS,eAAY;EAAO,WAAU;EAC9E,UAAA4C;CACS,CAAA,IAtBV,kBAAC,QAAD;EACC,eAAY;EACZ,WAAWvC,EACV,8CACAwB,MAAc,WAAW,iBAAiB,aAC3C;CACA,CAAA;AAkBJ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"action-menu-Cx3SdfbN.js","names":["Icon","_Fragment","_jsx","Text","DisplayLabel","collectionRecipes","CollectionContent","DropdownMenuItem","DropdownMenuSeparator","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuCheckboxItem","DropdownMenuLabel","DropdownMenuContent","DropdownMenuLinkItem","DropdownMenu","React","Fragment$1","defaultActionMenuStrings","isDestructiveAction","action","resolveActions","visible","actions","preserveOrder","standard","destructive","getActionKey","index","renderActionIcon","icon","isValidElement","renderActionLabel","label","cn","className","toMenuVariant","tone","toButtonPresentation","buttonStyle","renderMenuAction","key","shouldCloseOnSelect","closeOnSelect","content","density","href","renderLink","props","renderGroupedActions","nodes","currentGroup","args","nextGroup","groupChanged","assignRef","ref","node","ActionMenu","MoreVertical","stringsProp","open","setOpen","strings","useStrings","resolvedSrText","srText","resolvedActions","hasVisibleLabel","labelVisibility","defaultButtonProps","triggerClassName","triggerProps","buttonProps","labelClassName","triggerIcon","buttonContent","renderTrigger","baseTriggerRef","dropdownTriggerProps","composedRef","Button","width","contentClassName","ActionButtons","visibleActions","resolved","children","size","buttonClassName","buttonRenderProps"],"sources":["../src/components/base/action-menu/action-menu.strings.ts","../src/components/base/action-menu/action-menu.tsx"],"sourcesContent":["export interface ActionMenuStrings {\n\topenMenuLabel: string;\n}\n\nexport const defaultActionMenuStrings: ActionMenuStrings = {\n\topenMenuLabel: 'Open menu',\n};\n","/**\n * ActionMenu — centralized action chrome for page, card, table, and row\n * overflow menus.\n *\n * Primary API is definition-driven: pass `actions={[...]}` and the component\n * renders the trigger, menu surface, grouping, checkbox rows, destructive\n * separation, links, disabled state, and density. `ActionButtons` renders the\n * same definitions as inline buttons for page/toolbars that need visible\n * actions plus an overflow menu.\n */\nimport type { LucideIcon } from 'lucide-react';\nimport { MoreVertical } from 'lucide-react';\nimport React, { isValidElement, type ComponentType, type ElementType, type ReactElement, type ReactNode } from 'react';\n\nimport { Button, type ButtonSize, type ButtonStyle } from '../buttons';\nimport { Stack } from '../structure';\nimport { collectionRecipes, type CollectionDensity } from '../popover/popover.recipes';\nimport { CollectionContent } from '../popover/collection-content';\nimport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuLinkItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuTrigger,\n} from '../navigation/dropdown-menu';\nimport { DisplayLabel, Text } from '../../typography';\nimport type { ActionButtonStyle, ActionPresentation } from '../../../lib/action-presentation';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport {\n\tdefaultActionMenuStrings,\n\ttype ActionMenuStrings,\n} from './action-menu.strings';\n\ntype ActionMenuButtonProps = Partial<React.ComponentPropsWithoutRef<typeof Button>> & {\n\t[key: `data-${string}`]: string | boolean | undefined;\n\t'aria-label'?: string;\n\tonPointerDown?: React.PointerEventHandler<HTMLButtonElement>;\n};\nexport type ActionMenuDensity = CollectionDensity | 'table';\nexport type ActionMenuLabelVisibility = 'visible' | 'responsive' | 'hidden';\nexport interface ActionMenuLinkRenderProps extends React.ComponentPropsWithoutRef<'a'> {\n\thref: string;\n\tdisabled?: boolean;\n\texternal?: boolean;\n}\n\nexport type ActionMenuIcon = LucideIcon | ComponentType<{ className?: string }> | ReactNode;\n\nexport interface ActionMenuAction extends ActionPresentation {\n\t/** Stable React key. Falls back to a string `label`, then the index. */\n\tid?: string;\n\t/** Visible label for the entry. */\n\tlabel: ReactNode;\n\t/** Leading glyph. Accepts a Lucide icon, a component, or a rendered node. */\n\ticon?: ActionMenuIcon;\n\t/** `'checkbox'` renders a toggle driven by `checked`/`onCheckedChange`. Defaults to `'item'`. */\n\ttype?: 'item' | 'checkbox';\n\t/**\n\t * Renders the entry as a link. By default this is a native `<a href>`, so it\n\t * performs a full page navigation; pass `renderLink` on `ActionMenu` to route\n\t * it through your framework's router instead.\n\t */\n\thref?: string;\n\t/** Anchor target forwarded to the rendered link. Requires `href`. */\n\ttarget?: string;\n\t/** Anchor rel forwarded to the rendered link. Requires `href`. */\n\trel?: string;\n\t/** Marks the destination as leaving the app; forwarded to `renderLink`. */\n\texternal?: boolean;\n\t/** Runs when the entry is chosen. This is the handler for a normal item. */\n\tonClick?: () => void;\n\t/** Checked state for a `'checkbox'` entry. */\n\tchecked?: boolean;\n\t/** Fires with the next checked state for a `'checkbox'` entry. */\n\tonCheckedChange?: (checked: boolean) => void;\n\t/**\n\t * Starts a new group, drawing a separator above this entry. A string also\n\t * captions the group; `true` rules off without a heading, for the common\n\t * case of holding one entry apart (a sign-out, a delete) with no label to\n\t * write.\n\t */\n\tgroup?: string | true;\n\t/** Overrides the button size when the action renders as a button. */\n\tbuttonSize?: ButtonSize;\n\t/** Escape hatch merged onto the entry root. */\n\tclassName?: string;\n\t/** Escape hatch merged onto the entry's inner content. */\n\tcontentClassName?: string;\n\t/** Overrides the menu's `closeOnSelect` for this entry. */\n\tcloseOnSelect?: boolean;\n\t/** Replaces the rendered entry, e.g. to emit a framework `<Link>`. */\n\trender?: ReactNode;\n}\n\nexport interface ActionMenuProps {\n\t/**\n\t * Commands to offer. Destructive entries are moved last unless\n\t * `preserveOrder` is set.\n\t */\n\tactions: readonly ActionMenuAction[];\n\t/** Trigger text. Omit for an icon-only trigger, and set `srText` instead. */\n\tlabel?: string;\n\t/** Trigger glyph. Defaults to the horizontal ellipsis. */\n\ticon?: ActionMenuIcon;\n\t/** Accessible name when the trigger shows no visible `label`. */\n\tsrText?: string;\n\t/** Escape hatch forwarded to the trigger button. */\n\tbuttonProps?: ActionMenuButtonProps;\n\t/** Menu alignment against the trigger. Defaults to `end`. */\n\talign?: 'center' | 'start' | 'end';\n\t/** Which edge of the trigger the menu opens from. Defaults to `bottom`. */\n\tside?: 'top' | 'right' | 'bottom' | 'left';\n\t/** Merged onto the menu surface. */\n\tcontentClassName?: string;\n\t/** Fixed menu width. Defaults to sizing from the widest item. */\n\twidth?: string;\n\t/** Closes the menu after an action runs. Defaults to `true`. */\n\tcloseOnSelect?: boolean;\n\t/** Vertical row rhythm; table preserves the legacy tight action spacing. Inline room stays stable. */\n\tdensity?: ActionMenuDensity;\n\t/** Whether the trigger's `label` is visible, hidden, or responsive. */\n\tlabelVisibility?: ActionMenuLabelVisibility;\n\t/** Preserve incoming action order instead of moving destructive items last. */\n\tpreserveOrder?: boolean;\n\t/**\n\t * Renders actions carrying an `href` through the consumer's router, keeping\n\t * this component framework-agnostic. Without it, such actions render as\n\t * plain anchors.\n\t */\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n\t/**\n\t * Replaces the default trigger button entirely, so a menu can hang off a\n\t * shape that is not a button with a glyph — an account block, a sidebar\n\t * row, a tab that has to match its siblings.\n\t *\n\t * Takes Base UI's `render` contract: either an element, whose props are\n\t * merged for you, or a function receiving the props to spread. Either way\n\t * the ARIA wiring, the open/close handlers and the popup's anchor ref reach\n\t * a real DOM node without anyone cloning anything.\n\t *\n\t * For a plain button that just needs different words or a different glyph,\n\t * `label`, `icon` and `buttonProps` are the smaller tools; reach for this\n\t * only when the trigger is a different thing.\n\t */\n\trenderTrigger?: React.ComponentProps<typeof DropdownMenuTrigger>['render'];\n\t/** Overrides the menu's own copy (the default trigger label). */\n\tstrings?: StringsProp<ActionMenuStrings>;\n}\n\nexport interface ActionButtonsProps {\n\t/** Commands to render side by side rather than collapsed into a menu. */\n\tactions: readonly ActionMenuAction[];\n\t/** Merged onto the button group. */\n\tclassName?: string;\n\t/** Merged onto every button in the group. */\n\tbuttonClassName?: string;\n\t/** Height preset applied to each button. */\n\tsize?: ButtonSize;\n\t/** Renders actions carrying an `href` through the consumer's router. */\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n}\n\nfunction isDestructiveAction(action: ActionMenuAction) {\n\treturn action.tone === 'destructive';\n}\n\nfunction resolveActions(actions: readonly ActionMenuAction[], preserveOrder = false) {\n\tconst visible = actions.filter((action) => action.visible !== false);\n\tif (preserveOrder) return visible;\n\n\tconst standard = visible.filter((action) => !isDestructiveAction(action));\n\tconst destructive = visible.filter(isDestructiveAction);\n\treturn [...standard, ...destructive];\n}\n\nfunction getActionKey(action: ActionMenuAction, index: number) {\n\treturn action.id ?? (typeof action.label === 'string' ? action.label : `action-${index}`);\n}\n\nfunction renderActionIcon(icon: ActionMenuAction['icon']) {\n\tif (!icon) return null;\n\tif (isValidElement(icon)) return icon;\n\tif (typeof icon === 'function') {\n\t\tconst Icon = icon as LucideIcon;\n\t\treturn <Icon className=\"size-icon-sm\" aria-hidden=\"true\" />;\n\t}\n\tif (typeof icon === 'object' && icon !== null && '$$typeof' in icon) {\n\t\tconst Icon = icon as unknown as ElementType<{ className?: string; 'aria-hidden'?: boolean }>;\n\t\treturn <Icon className=\"size-icon-sm\" aria-hidden />;\n\t}\n\treturn icon;\n}\n\nfunction renderActionLabel(label: ReactNode, className?: string) {\n\tif (typeof label === 'string' || typeof label === 'number' || typeof label === 'bigint') {\n\t\treturn <Text tag=\"span\" lineHeight=\"tight\" className={cn('text-inherit', className)}>{label}</Text>;\n\t}\n\treturn className ? <span className={className}>{label}</span> : label;\n}\n\nfunction toMenuVariant(tone: ActionMenuAction['tone']): 'default' | 'destructive' {\n\treturn tone === 'destructive' ? 'destructive' : 'default';\n}\n\nfunction toButtonPresentation(action: Pick<ActionMenuAction, 'tone' | 'buttonStyle'>): {\n\ttone: NonNullable<ActionMenuAction['tone']>;\n\tbuttonStyle: ButtonStyle;\n\tclassName?: string;\n} {\n\tconst tone = action.tone ?? 'primary';\n\tconst buttonStyle: ActionButtonStyle = action.buttonStyle ?? 'solid';\n\tif (buttonStyle === 'link') {\n\t\treturn {\n\t\t\ttone,\n\t\t\tbuttonStyle: 'ghost',\n\t\t\tclassName: 'underline underline-offset-4',\n\t\t};\n\t}\n\treturn { tone, buttonStyle };\n}\n\nfunction renderMenuAction({\n\taction,\n\tindex,\n\tdensity,\n\tcloseOnSelect,\n\trenderLink,\n}: {\n\taction: ActionMenuAction;\n\tindex: number;\n\tdensity: ActionMenuDensity;\n\tcloseOnSelect: boolean;\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n}) {\n\tconst key = getActionKey(action, index);\n\tconst shouldCloseOnSelect = action.closeOnSelect ?? closeOnSelect;\n\tif (action.render) {\n\t\treturn <div key={key} className=\"action-menu--item\">{action.render}</div>;\n\t}\n\n\tconst icon = renderActionIcon(action.icon);\n\tconst content = (\n\t\t<CollectionContent label={action.label} leading={icon} wrap\n\t\t className={cn('action-menu--item-content w-full',action.contentClassName)}\n\t\t leadingClassName=\"action-menu--item-icon text-inherit\" labelClassName=\"action-menu--item-label\"/>\n\t);\n\tconst className = cn(\n\t\t'action-menu--item',\n\t\tdensity === 'table' && collectionRecipes.tableRow,\n\t\taction.className,\n\t);\n\tif (action.type === 'checkbox') {\n\t\treturn (\n\t\t\t<DropdownMenuCheckboxItem\n\t\t\t\tkey={key}\n\t\t\t\tchecked={!!action.checked}\n\t\t\t\tdisabled={action.disabled}\n\t\t\t\tcloseOnClick={shouldCloseOnSelect}\n\t\t\t\tonCheckedChange={action.onCheckedChange}\n\t\t\t\tclassName={className}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</DropdownMenuCheckboxItem>\n\t\t);\n\t}\n\n\tif (action.href && !action.disabled) {\n\t\tconst href = action.href;\n\t\treturn (\n\t\t\t<DropdownMenuLinkItem\n\t\t\t\tkey={key}\n\t\t\t\thref={href}\n\t\t\t\tvariant={toMenuVariant(action.tone)}\n\t\t\t\tcloseOnClick={shouldCloseOnSelect}\n\t\t\t\tonClick={action.onClick}\n\t\t\t\t// Element form, not a function, when the consumer supplies a link\n\t\t\t\t// renderer. The function form hands the menu-item props to the\n\t\t\t\t// consumer and trusts them to spread — and the renderer people\n\t\t\t\t// actually write destructures href/children/className and drops the\n\t\t\t\t// rest, which silently costs the row its `role=\"menuitem\"`. Handing\n\t\t\t\t// back an element lets the menu merge its own props on afterwards,\n\t\t\t\t// so a narrow renderer stays accessible.\n\t\t\t\trender={\n\t\t\t\t\trenderLink\n\t\t\t\t\t\t? (renderLink({\n\t\t\t\t\t\t\thref,\n\t\t\t\t\t\t\tchildren: content,\n\t\t\t\t\t\t\ttarget: action.target,\n\t\t\t\t\t\t\trel: action.rel,\n\t\t\t\t\t\t\texternal: action.external,\n\t\t\t\t\t\t\tdisabled: action.disabled,\n\t\t\t\t\t\t}) as ReactElement)\n\t\t\t\t\t\t: (props) => (\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t\thref={href}\n\t\t\t\t\t\t\t\ttarget={action.target}\n\t\t\t\t\t\t\t\trel={action.rel}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tclassName={className}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</DropdownMenuLinkItem>\n\t\t);\n\t}\n\n\treturn (\n\t\t<DropdownMenuItem\n\t\tkey={key}\n\t\tdisabled={action.disabled}\n\t\tvariant={toMenuVariant(action.tone)}\n\t\tcloseOnClick={shouldCloseOnSelect}\n\t\tonClick={action.onClick}\n\t\tclassName={className}\n\t\t>\n\t\t\t{content}\n\t\t</DropdownMenuItem>\n\t);\n}\n\nfunction renderGroupedActions(args: {\n\tactions: readonly ActionMenuAction[];\n\tdensity: ActionMenuDensity;\n\tcloseOnSelect: boolean;\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n}) {\n\tconst nodes: ReactNode[] = [];\n\tlet currentGroup: string | true | null = null;\n\n\targs.actions.forEach((action, index) => {\n\t\tconst nextGroup = action.group ?? null;\n\t\tconst groupChanged = nextGroup !== currentGroup;\n\n\t\tif (nodes.length > 0 && groupChanged) {\n\t\t\tnodes.push(<DropdownMenuSeparator key={`sep-${currentGroup ?? 'root'}-${nextGroup ?? 'root'}-${index}`} />);\n\t\t}\n\n\t\tif (groupChanged) {\n\t\t\tcurrentGroup = nextGroup;\n\t\t\tif (typeof nextGroup === 'string') {\n\t\t\t\tnodes.push(\n\t\t\t\t\t<DropdownMenuLabel\n\t\t\t\t\t\tkey={`group-${nextGroup}-${index}`}\n\t\t\t\t\t\tclassName=\"normal-case\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<DisplayLabel tag=\"span\">{nextGroup}</DisplayLabel>\n\t\t\t\t\t</DropdownMenuLabel>,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tnodes.push(renderMenuAction({ ...args, action, index }));\n\t});\n\n\treturn nodes;\n}\n\n/**\n * Writes a node into a ref of either shape. `ActionMenu` has two claims on its\n * trigger — Base UI's own anchor ref and the consumer's — so neither may\n * overwrite the other.\n */\nfunction assignRef<T>(ref: React.Ref<T> | undefined, node: T | null) {\n\tif (typeof ref === 'function') {\n\t\tref(node);\n\t} else if (ref) {\n\t\t(ref as React.RefObject<T | null>).current = node;\n\t}\n}\n\nexport const ActionMenu = React.forwardRef<HTMLButtonElement, ActionMenuProps>(function ActionMenu({\n\tactions,\n\tlabel,\n\ticon = MoreVertical,\n\tsrText,\n\tbuttonProps,\n\talign = 'end',\n\tside = 'bottom',\n\tcontentClassName = '',\n\twidth = 'w-auto',\n\tcloseOnSelect = true,\n\tdensity = 'default',\n\tlabelVisibility = 'visible',\n\tpreserveOrder = false,\n\trenderLink,\n\trenderTrigger,\n\tstrings: stringsProp,\n}: ActionMenuProps, ref) {\n\tconst [open, setOpen] = React.useState(false);\n\tconst strings = useStrings(defaultActionMenuStrings, stringsProp);\n\tconst resolvedSrText = srText ?? strings.openMenuLabel;\n\tconst resolvedActions = React.useMemo(\n\t\t() => resolveActions(actions, preserveOrder),\n\t\t[actions, preserveOrder],\n\t);\n\n\tif (resolvedActions.length === 0) return null;\n\tconst hasVisibleLabel = Boolean(label) && labelVisibility === 'visible';\n\tconst hasResponsiveLabel = Boolean(label) && labelVisibility === 'responsive';\n\n\tconst defaultButtonProps: ActionMenuButtonProps = {\n\t\ttone: 'secondary',\n\t\tbuttonStyle: 'ghost',\n\t\tsize: hasVisibleLabel ? 'sm' : 'md',\n\t\ticonOnly: !hasVisibleLabel,\n\t\tclassName: hasVisibleLabel\n\t\t\t? undefined\n\t\t\t: hasResponsiveLabel\n\t\t\t\t? 'size-action p-0 sm:w-auto sm:gap-space-sm sm:px-control-sm'\n\t\t\t\t: 'size-action p-0',\n\t};\n\n\tconst mergedButtonProps = {\n\t\t...defaultButtonProps,\n\t\t...buttonProps,\n\t\tclassName: cn(defaultButtonProps.className, buttonProps?.className),\n\t};\n\n\tconst {\n\t\ttone = 'secondary',\n\t\tbuttonStyle = 'ghost',\n\t\tsize = 'md',\n\t\ticonOnly = !hasVisibleLabel,\n\t\tclassName: triggerClassName,\n\t\t...triggerProps\n\t} = mergedButtonProps;\n\n\tconst labelClassName =\n\t\tlabelVisibility === 'hidden'\n\t\t\t? 'sr-only'\n\t\t\t: labelVisibility === 'responsive'\n\t\t\t\t? 'sr-only sm:not-sr-only'\n\t\t\t\t: undefined;\n\n\tconst triggerIcon = renderActionIcon(icon);\n\n\tconst buttonContent = label ? (\n\t\t<>\n\t\t\t{triggerIcon}\n\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className={cn('whitespace-nowrap text-inherit', labelClassName)}>\n\t\t\t\t{label}\n\t\t\t</Text>\n\t\t</>\n\t) : (\n\t\t<>\n\t\t\t{triggerIcon}\n\t\t\t<Text tag=\"span\" size=\"inherit\" className=\"sr-only\">{resolvedSrText}</Text>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<DropdownMenu open={open} onOpenChange={setOpen}>\n\t\t\t<DropdownMenuTrigger\n\t\t\t\trender={renderTrigger ?? ((dropdownTriggerProps) => {\n\t\t\t\t\t// Base UI supplies its own trigger ref through `render`. Composing\n\t\t\t\t\t// rather than overwriting keeps the popup anchored while still\n\t\t\t\t\t// handing the consumer the trigger element.\n\t\t\t\t\tconst { ref: baseTriggerRef } = dropdownTriggerProps as {\n\t\t\t\t\t\tref?: React.Ref<HTMLButtonElement>;\n\t\t\t\t\t};\n\n\t\t\t\t\tconst composedRef = (node: HTMLButtonElement | null) => {\n\t\t\t\t\t\tassignRef(baseTriggerRef, node);\n\t\t\t\t\t\tassignRef(ref, node);\n\t\t\t\t\t};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t{...triggerProps}\n\t\t\t\t\t\t\t{...dropdownTriggerProps}\n\t\t\t\t\t\t\tref={composedRef}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone={tone}\n\t\t\t\t\t\t\tbuttonStyle={buttonStyle}\n\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\ticonOnly={iconOnly}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t'action-menu--component',\n\t\t\t\t\t\t\t\ttriggerClassName,\n\t\t\t\t\t\t\t\t(dropdownTriggerProps as { className?: string }).className,\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{buttonContent}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t/>\n\t\t\t<DropdownMenuContent\n\t\t\t\tdensity={density === 'table' ? 'compact' : density}\n\t\t\t\talign={align}\n\t\t\t\tside={side}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'action-menu--content',\n\t\t\t\t\twidth,\n\t\t\t\t\t'min-w-36',\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<DropdownMenuGroup className=\"action-menu--group\">\n\t\t\t\t\t{renderGroupedActions({\n\t\t\t\t\t\tactions: resolvedActions,\n\t\t\t\t\t\tdensity,\n\t\t\t\t\t\tcloseOnSelect,\n\t\t\t\t\t\trenderLink,\n\t\t\t\t\t})}\n\t\t\t\t</DropdownMenuGroup>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n});\n\nActionMenu.displayName = 'ActionMenu';\n\nexport const ActionButtons = React.forwardRef<HTMLDivElement, ActionButtonsProps>(function ActionButtons({\n\tactions,\n\tclassName,\n\tbuttonClassName,\n\tsize = 'sm',\n\trenderLink,\n}: ActionButtonsProps, ref) {\n\tconst visibleActions = resolveActions(actions, true);\n\tif (visibleActions.length === 0) return null;\n\n\treturn (\n\t\t<div ref={ref} className={cn('action-buttons--component flex flex-wrap items-center gap-space-sm', className)}>\n\t\t\t{visibleActions.map((action, index) => {\n\t\t\t\tconst key = getActionKey(action, index);\n\t\t\t\tif (action.render) {\n\t\t\t\t\treturn <React.Fragment key={key}>{action.render}</React.Fragment>;\n\t\t\t\t}\n\n\t\t\t\tconst icon = renderActionIcon(action.icon);\n\t\t\t\tconst resolved = toButtonPresentation(action);\n\t\t\t\tconst children = (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{!!icon && <span className=\"action-buttons--icon inline-flex shrink-0 items-center\">{icon}</span>}\n\t\t\t\t\t\t{renderActionLabel(action.label, 'action-buttons--label')}\n\t\t\t\t\t</>\n\t\t\t\t);\n\n\t\t\t\tif (action.href && !action.disabled && renderLink) {\n\t\t\t\t\tconst href = action.href;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone={resolved.tone}\n\t\t\t\t\t\t\tbuttonStyle={resolved.buttonStyle}\n\t\t\t\t\t\t\tsize={action.buttonSize ?? size}\n\t\t\t\t\t\t\tnativeButton={false}\n\t\t\t\t\t\t\tclassName={cn('action-buttons--item leading-tight', resolved.className, buttonClassName, action.className)}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\taction.onClick?.();\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\trender={(buttonRenderProps) =>\n\t\t\t\t\t\t\t\trenderLink({\n\t\t\t\t\t\t\t\t\t...buttonRenderProps,\n\t\t\t\t\t\t\t\t\thref,\n\t\t\t\t\t\t\t\t\tchildren: buttonRenderProps.children,\n\t\t\t\t\t\t\t\t\ttarget: action.target,\n\t\t\t\t\t\t\t\t\trel: action.rel,\n\t\t\t\t\t\t\t\t\texternal: action.external,\n\t\t\t\t\t\t\t\t\tdisabled: action.disabled,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (action.href && !action.disabled) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button key={key} href={action.href} target={action.target} rel={action.rel} tone={resolved.tone} buttonStyle={resolved.buttonStyle} size={action.buttonSize ?? size} className={cn('action-buttons--item leading-tight', resolved.className, buttonClassName, action.className)} onClick={action.onClick}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst button = (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttone={resolved.tone}\n\t\t\t\t\t\tbuttonStyle={resolved.buttonStyle}\n\t\t\t\t\t\tsize={action.buttonSize ?? size}\n\t\t\t\t\t\tclassName={cn('action-buttons--item leading-tight', resolved.className, buttonClassName, action.className)}\n\t\t\t\t\t\tdisabled={!!action.disabled}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\taction.onClick?.();\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\n\t\t\t\treturn button;\n\t\t\t})}\n\t\t</div>\n\t);\n});\n\nActionButtons.displayName = 'ActionButtons';\n\nexport {\n\tdefaultActionMenuStrings,\n\ttype ActionMenuStrings,\n} from './action-menu.strings';\n"],"mappings":";;;;;;;;;;;;AAIA,IAAakB,IAA8C,EAC1D,eAAe,YAChB;;;ACkKA,SAASC,EAAoB,GAA0B;CACtD,OAAOC,EAAO,SAAS;AACxB;AAEA,SAASC,EAAe,GAAsC,IAAgB,IAAO;CACpF,IAAMC,IAAUC,EAAQ,QAAQ,MAAWH,EAAO,YAAY,EAAK;CACnE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GA2BA,OAzBIrB,EAAO,QAAQ,CAACA,EAAO,WAEzB,kBAAC6D,GAAD;IAAkB,MAAM7D,EAAO;IAAM,QAAQA,EAAO;IAAQ,KAAKA,EAAO;IAAK,MAAMkE,EAAS;IAAM,aAAaA,EAAS;IAAa,MAAMlE,EAAO,cAAcoE;IAAM,WAAWtD,EAAG,sCAAsCoD,EAAS,WAAWG,GAAiBrE,EAAO,SAAS;IAAG,SAASA,EAAO;IAChS;GACM,GAFKqB,CAEL,IAKTvC,kBAAC+E,GAAD;IAEC,MAAK;IACL,MAAMK,EAAS;IACf,aAAaA,EAAS;IACtB,MAAMlE,EAAO,cAAcoE;IAC3B,WAAWtD,EAAG,sCAAsCoD,EAAS,WAAWG,GAAiBrE,EAAO,SAAS;IACzG,UAAU,CAAC,CAACA,EAAO;IACnB,eAAe;KACd,EAAO,UAAU;IAClB;IAEC;GACM,GAZFqB,CAeA;EACR,CAAC;CACG,CAAA;AAEP,CAAC;AAED,EAAc,cAAc"}
@@ -1,23 +0,0 @@
1
- //#region src/lib/affordance-geometry.generated.ts
2
- var e = {
3
- navigationGuideStart: "ms-[calc(var(--control-x)*0.8333333*var(--space-scale)+var(--icon)*0.75*var(--space-scale)/2)]",
4
- clearEnd: {
5
- sm: "end-[calc(var(--control-x)*0.8333333*var(--space-scale))]",
6
- md: "end-[calc(var(--control-x)*var(--space-scale))]",
7
- lg: "end-[calc(var(--control-x)*var(--space-scale))]"
8
- },
9
- clearPadding: {
10
- sm: "pe-[calc(var(--control-x)*0.8333333*var(--space-scale)+1.375rem*var(--density-scale)+0.375rem*var(--space-scale))]",
11
- md: "pe-[calc(var(--control-x)*var(--space-scale)+1.375rem*var(--density-scale)+0.375rem*var(--space-scale))]",
12
- lg: "pe-[calc(var(--control-x)*var(--space-scale)+1.375rem*var(--density-scale)+0.375rem*var(--space-scale))]"
13
- },
14
- togglePadding: "pe-[calc(1.375rem*var(--density-scale)+0.625rem*var(--space-scale))]",
15
- largeIconStart: "ps-[calc((var(--control-x)+var(--icon)*1.25+0.5rem)*var(--space-scale))]",
16
- largeIconEnd: "pe-[calc((var(--control-x)+var(--icon)*1.25+0.5rem)*var(--space-scale))]",
17
- overlayClose: "absolute top-[calc(var(--surface-y)*var(--space-scale))] end-[calc(var(--surface-x)*var(--space-scale))]",
18
- overlayHeader: "[[data-slot$=-content]:has(>[data-overlay-close])>&]:pe-[calc(var(--surface-x)*var(--space-scale)+var(--height-action)*0.8888889*var(--density-scale)+0.5rem*var(--space-scale))]"
19
- };
20
- //#endregion
21
- export { e as t };
22
-
23
- //# sourceMappingURL=affordance-geometry.generated-DXl-Zb3Z.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"affordance-geometry.generated-DXl-Zb3Z.js","names":["affordanceGeometry","\"navigationGuideStart\"","\"clearEnd\"","\"sm\"","\"md\"","\"lg\"","\"clearPadding\"","\"togglePadding\"","\"largeIconStart\"","\"largeIconEnd\"","\"overlayClose\"","\"overlayHeader\""],"sources":["../src/lib/affordance-geometry.generated.ts"],"sourcesContent":["/* Generated by scripts/primitive-geometry.mjs; recipes, not theme roots. */\nexport const affordanceGeometry = {\n \"navigationGuideStart\": \"ms-[calc(var(--control-x)*0.8333333*var(--space-scale)+var(--icon)*0.75*var(--space-scale)/2)]\",\n \"clearEnd\": {\n \"sm\": \"end-[calc(var(--control-x)*0.8333333*var(--space-scale))]\",\n \"md\": \"end-[calc(var(--control-x)*var(--space-scale))]\",\n \"lg\": \"end-[calc(var(--control-x)*var(--space-scale))]\"\n },\n \"clearPadding\": {\n \"sm\": \"pe-[calc(var(--control-x)*0.8333333*var(--space-scale)+1.375rem*var(--density-scale)+0.375rem*var(--space-scale))]\",\n \"md\": \"pe-[calc(var(--control-x)*var(--space-scale)+1.375rem*var(--density-scale)+0.375rem*var(--space-scale))]\",\n \"lg\": \"pe-[calc(var(--control-x)*var(--space-scale)+1.375rem*var(--density-scale)+0.375rem*var(--space-scale))]\"\n },\n \"togglePadding\": \"pe-[calc(1.375rem*var(--density-scale)+0.625rem*var(--space-scale))]\",\n \"largeIconStart\": \"ps-[calc((var(--control-x)+var(--icon)*1.25+0.5rem)*var(--space-scale))]\",\n \"largeIconEnd\": \"pe-[calc((var(--control-x)+var(--icon)*1.25+0.5rem)*var(--space-scale))]\",\n \"overlayClose\": \"absolute top-[calc(var(--surface-y)*var(--space-scale))] end-[calc(var(--surface-x)*var(--space-scale))]\",\n \"overlayHeader\": \"[[data-slot$=-content]:has(>[data-overlay-close])>&]:pe-[calc(var(--surface-x)*var(--space-scale)+var(--height-action)*0.8888889*var(--density-scale)+0.5rem*var(--space-scale))]\"\n} as const;\n"],"mappings":";AACA,IAAaA,IAAqB;CAChCC,sBAAwB;CACxBC,UAAY;EACVC,IAAM;EACNC,IAAM;EACNC,IAAM;CACR;CACAC,cAAgB;EACdH,IAAM;EACNC,IAAM;EACNC,IAAM;CACR;CACAE,eAAiB;CACjBC,gBAAkB;CAClBC,cAAgB;CAChBC,cAAgB;CAChBC,eAAiB;AACnB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-artifact-DkOArd3-.js","names":["_Fragment","STATUS_VARIANT","_Fragment","NumberValue","_Fragment","_Fragment","_Fragment","cn","Button","Text","DisplayLabel","TextLink","Stack","SecondaryValue","MonoValue","Duration","Number","IconBadge","Badge","AttachmentFileIcon","AttachmentTitle","AttachmentDescription","AttachmentActions","AttachmentMedia","AttachmentContent","AttachmentProgress","Attachment","Message","CodeBlock","Fragment$1","useCopyFeedback","copied","setCopied","useState","failed","setFailed","mounted","useRef","attempt","timer","useEffect","source","request","text","error","onCopyError","defaultAiMessageBubbleStrings","AiMessageBubble","stringsProp","strings","useStrings","copyText","plainText","children","renderedAvatar","avatar","avatarLabel","role","User","Bot","showActions","onCopy","onRegenerate","authorName","className","loading","copy","Copy","RotateCcw","defaultAiToolCallStrings","STATUS_BADGE","CircleDot","Loader2","AlertCircle","DurationValue","label","ms","AiToolCall","IconComponent","Wrench","expandedProp","internalExpanded","setInternalExpanded","defaultExpanded","expanded","setExpanded","next","onExpandedChange","labelByStatus","StatusIcon","status","hasDetails","args","result","name","durationMs","jsx","ChevronDown","ChevronRight","DetailBlock","tone","AiShimmer","paused","style","duration","defaultAiCodeBlockStrings","AiCodeBlock","props","defaultAiAttachmentStrings","AiAttachment","Icon","showProgress","errored","progress","thumbnailUrl","meta","onRemove","X","defaultAiAgentStrings","TONE_AVATAR","STATUS_VARIANT$1","AiAgent","icon","avatarSize","variant","iconSize","StatusPill","subtitle","trailing","defaultAiConfirmationStrings","TONE","AiConfirmation","ShieldCheck","toneCfg","title","description","details","onReject","rejectLabel","onApprove","Check","approveLabel","defaultAiSourcesStrings","interpolate","template","v","params","k","m","AiSources","mergeStrings","titleText","sources","AvatarStrip","maxAvatars","visible","AvatarStack","SourceRow","idx","onSelect","max","overflow","visual","s","SourceFavicon","i","src","Globe","interactive","rowClassName","rowContent","index","ExternalLink","visitLabel","defaultAiReasoningStrings","renderThoughtFor","durationParts","seconds","AiReasoning","streaming","expandWhileStreaming","headerLabel","durationSeconds","Brain","defaultAiChainOfThoughtStrings","STATUS_VISUAL","Circle","AiChainOfThought","hideHeader","steps","step","isLast","defaultAiTaskStrings","STATUS_ICON","XCircle","MinusCircle","STATUS_VARIANT","AiTask","TaskRow","task","item","hasChildren","open","setOpen","density","depth","indent","child","defaultAiArtifactStrings","AiArtifact","FileText","actions","ActionIcon","action","onDownload","Download","onOpen","collapsed"],"sources":["../src/components/blocks/ai/use-copy-feedback.ts","../src/components/blocks/ai/ai-message-bubble/types.ts","../src/components/blocks/ai/ai-message-bubble/ai-message-bubble.tsx","../src/components/blocks/ai/ai-tool-call/types.ts","../src/components/blocks/ai/ai-tool-call/ai-tool-call.tsx","../src/components/blocks/ai/ai-shimmer/ai-shimmer.tsx","../src/components/blocks/ai/ai-code-block/types.ts","../src/components/blocks/ai/ai-code-block/ai-code-block.tsx","../src/components/blocks/ai/ai-attachment/types.ts","../src/components/blocks/ai/ai-attachment/ai-attachment.tsx","../src/components/blocks/ai/ai-agent/types.ts","../src/components/blocks/ai/ai-agent/ai-agent.tsx","../src/components/blocks/ai/ai-confirmation/types.ts","../src/components/blocks/ai/ai-confirmation/ai-confirmation.tsx","../src/components/blocks/ai/ai-sources/types.ts","../src/components/blocks/ai/ai-sources/ai-sources.tsx","../src/components/blocks/ai/ai-reasoning/types.ts","../src/components/blocks/ai/ai-reasoning/ai-reasoning.tsx","../src/components/blocks/ai/ai-chain-of-thought/types.ts","../src/components/blocks/ai/ai-chain-of-thought/ai-chain-of-thought.tsx","../src/components/blocks/ai/ai-task/types.ts","../src/components/blocks/ai/ai-task/ai-task.tsx","../src/components/blocks/ai/ai-artifact/types.ts","../src/components/blocks/ai/ai-artifact/ai-artifact.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\n/** Shared clipboard lifecycle for AI surfaces; callbacks and text stay per mount. */\nexport function useCopyFeedback(onCopyError?: (error: unknown) => void, source?: string) {\n\tconst [copied, setCopied] = useState(false);\n\tconst [failed, setFailed] = useState(false);\n\tconst mounted = useRef(false);\n\tconst attempt = useRef(0);\n\tconst timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n\tuseEffect(() => {\n\t\tmounted.current = true;\n\t\tsetCopied(false);\n\t\tsetFailed(false);\n\t\treturn () => {\n\t\t\tmounted.current = false;\n\t\t\tattempt.current += 1;\n\t\t\tclearTimeout(timer.current);\n\t\t};\n\t}, [source]);\n\n\tconst copy = async (text: string) => {\n\t\tconst request = ++attempt.current;\n\t\tclearTimeout(timer.current);\n\t\tsetCopied(false);\n\t\tsetFailed(false);\n\t\ttry {\n\t\t\tif (typeof navigator === 'undefined' || !navigator.clipboard?.writeText) {\n\t\t\t\tthrow new Error('Clipboard unavailable');\n\t\t\t}\n\t\t\tawait navigator.clipboard.writeText(text);\n\t\t} catch (error) {\n\t\t\tif (mounted.current && request === attempt.current) {\n\t\t\t\tsetFailed(true);\n\t\t\t\tonCopyError?.(error);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tif (!mounted.current || request !== attempt.current) return false;\n\t\tsetCopied(true);\n\t\ttimer.current = setTimeout(() => setCopied(false), 1500);\n\t\treturn true;\n\t};\n\n\treturn { copied, failed, copy };\n}\n","import type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type AiMessageRole = 'assistant' | 'user' | 'system';\n\nexport interface AiMessageBubbleStrings {\n\t/** Optional localized loading announcement. */\n\tloading?: string;\n\tcopyAria: string;\n /** Failure feedback, additive for existing string dictionaries. */\n copyError?: string;\n\tcopied: string;\n\tregenerateAria: string;\n}\n\nexport const defaultAiMessageBubbleStrings: AiMessageBubbleStrings = {\n copyError: 'Could not copy. Please try again.',\n\tcopyAria: 'Copy message',\n\tcopied: 'Copied',\n\tregenerateAria: 'Regenerate response',\n};\n\nexport interface AiMessageBubbleProps {\n\trole?: AiMessageRole;\n\t/** Leading avatar. */\n\tavatar?: ReactNode;\n\tavatarLabel?: string;\n\tauthorName?: ReactNode;\n\t/** Formatted time for the entry. */\n\ttimestamp?: ReactNode;\n\tchildren?: ReactNode;\n\t/** Plain-text version of the message content; used for the copy action. */\n\tplainText?: string;\n\tloading?: boolean;\n\t/** Fired when an entry is copied. */\n\tonCopy?: () => void;\n\tonRegenerate?: () => void;\n\t/** Merged onto the outermost node. */\n\t/** Called when the clipboard is unavailable or the write fails. */\n onCopyError?: (error: unknown) => void;\n className?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiMessageBubbleStrings>;\n}\n","import { Bot, Copy, RotateCcw, User } from 'lucide-react';\nimport { Button } from '../../../base/buttons';\nimport { Message } from '../../collaboration/message';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\nimport { useCopyFeedback } from '../use-copy-feedback';\nimport { defaultAiMessageBubbleStrings, type AiMessageBubbleProps } from './types';\n/** AI-specific copy/regenerate actions on the generic message presentation owner. */\nexport function AiMessageBubble({ role = 'assistant', avatar, avatarLabel, authorName, timestamp, children, plainText, loading = false, onCopy, onRegenerate, onCopyError, className, strings: stringsProp }: AiMessageBubbleProps) {\n const strings = useStrings(defaultAiMessageBubbleStrings, stringsProp);\n const copyText = plainText ?? (typeof children === 'string' ? children : '');\n const { copied, failed, copy } = useCopyFeedback(onCopyError, copyText);\n const Icon = role === 'user' ? User : Bot;\n const renderedAvatar = avatar ?? <span aria-label={avatarLabel} className=\"inline-flex size-avatar-sm shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground\"><Icon aria-hidden=\"true\" className=\"size-icon-md\" /></span>;\n const showActions = (onCopy !== undefined || plainText || onRegenerate) && role === 'assistant';\n return <Message align={role === 'user' ? 'end' : 'start'} tone={role === 'user' ? 'primary' : role === 'system' ? 'muted' : 'surface'} avatar={renderedAvatar} author={authorName} timestamp={timestamp} loading={loading} strings={{ loading: strings.loading }} className={cn('ai-message-bubble--component', className)} actions={showActions ? <>\n <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly aria-label={strings.copyAria} disabled={!copyText || loading} onClick={async () => { if (copyText && await copy(copyText)) onCopy?.(); }}><Copy aria-hidden=\"true\" className=\"size-icon-md\" /></Button>\n {copied && <Text size=\"xs\" type=\"success\">{strings.copied}</Text>}\n {onRegenerate && <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly aria-label={strings.regenerateAria} onClick={onRegenerate}><RotateCcw aria-hidden=\"true\" className=\"size-icon-md\" /></Button>}\n {failed && <Text role=\"alert\" size=\"xs\" type=\"error\">{strings.copyError ?? defaultAiMessageBubbleStrings.copyError}</Text>}\n </> : undefined}>{children}</Message>;\n}\nAiMessageBubble.displayName = 'AiMessageBubble';\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type AiToolCallStatus = 'pending' | 'running' | 'success' | 'error';\n\nexport interface AiToolCallStrings {\n\tpending: string;\n\trunning: string;\n\tsuccess: string;\n\terror: string;\n\texpand: string;\n\tcollapse: string;\n\targs: string;\n\tresult: string;\n\tdurationLabel: string;\n}\n\nexport const defaultAiToolCallStrings: AiToolCallStrings = {\n\tpending: 'Queued',\n\trunning: 'Running',\n\tsuccess: 'Success',\n\terror: 'Failed',\n\texpand: 'Show details',\n\tcollapse: 'Hide details',\n\targs: 'Arguments',\n\tresult: 'Result',\n\tdurationLabel: 'Took',\n};\n\nexport interface AiToolCallProps {\n\t/** Display name. */\n\tname: string;\n\tstatus: AiToolCallStatus;\n\t/** Leading glyph. */\n\ticon?: LucideIcon;\n\targs?: ReactNode;\n\tresult?: ReactNode;\n\terror?: ReactNode;\n\t/** Duration in ms; rendered as \"Took 1.2s\". */\n\tdurationMs?: number;\n\t/** Expanded state, for controlled use. */\n\texpanded?: boolean;\n\t/** Initial expanded state, for uncontrolled use. */\n\tdefaultExpanded?: boolean;\n\t/** Fired whenever the disclosure state changes. */\n\tonExpandedChange?: (expanded: boolean) => void;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiToolCallStrings>;\n}\n","/**\n * AiToolCall — collapsible trace for a model-invoked tool / function. Header\n * shows the tool name, status pill, and an expand/collapse toggle. Expanded\n * content reveals JSON-style `args` and `result` blocks (or an error block\n * when status is `error`) plus an optional duration. Use to surface tool-use\n * transparency in chat / agent UIs. Strings overridable for i18n.\n */\nimport {\n\tuseState,\n\ttype ReactNode } from 'react';\nimport {\n\tAlertCircle,\n\tChevronDown,\n\tChevronRight,\n\tCircleDot,\n\tLoader2,\n\tWrench,\n\ttype LucideIcon,\n\t} from 'lucide-react';\nimport { Badge } from '../../../base/badge';\nimport { Button } from '../../../base/buttons';\nimport { IconBadge,\n} from '../../../base/display';\nimport { Stack } from '../../../base/structure';\nimport { Duration, MonoValue, SecondaryValue } from '../../../primitives';\nimport { DisplayLabel } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport {\n\tdefaultAiToolCallStrings,\n\ttype AiToolCallProps,\n\ttype AiToolCallStatus,\n} from './types';\n\nconst STATUS_BADGE: Record<\n\tAiToolCallStatus,\n\t{ tone: 'secondary' | 'primary' | 'success' | 'destructive'; icon?: LucideIcon }\n> = {\n\tpending: { tone: 'secondary', icon: CircleDot },\n\trunning: { tone: 'primary', icon: Loader2 },\n\tsuccess: { tone: 'success' },\n\terror: { tone: 'destructive', icon: AlertCircle },\n};\n\nfunction DurationValue({ label, ms }: { label: string; ms: number }) {\n\treturn (\n\t\t<span className=\"inline-flex shrink-0 items-baseline gap-space-xs\">\n\t\t\t<SecondaryValue size=\"xs\">\n\t\t\t\t{label}\n\t\t\t</SecondaryValue>\n\t\t\t<Duration\n\t\t\t\tvalue={ms}\n\t\t\t\tfrom=\"milliseconds\"\n\t\t\t\tmaxParts={1}\n\t\t\t\tsize=\"xs\"\n\t\t\t\talign=\"left\"\n\t\t\t\ttype=\"secondary\"\n\t\t\t\tmaximumFractionDigits={ms < 10_000 ? 1 : 0}\n\t\t\t/>\n\t\t</span>\n\t);\n}\n\nexport function AiToolCall({\n\tname,\n\tstatus,\n\ticon: IconComponent = Wrench,\n\targs,\n\tresult,\n\terror,\n\tdurationMs,\n\texpanded: expandedProp,\n\tdefaultExpanded = false,\n\tonExpandedChange,\n\tclassName,\n\tstrings: stringsProp,\n}: AiToolCallProps) {\n\tconst strings = useStrings(defaultAiToolCallStrings, stringsProp);\n\tconst [internalExpanded, setInternalExpanded] = useState(defaultExpanded);\n\tconst expanded = expandedProp ?? internalExpanded;\n\tconst setExpanded = (next: boolean) => {\n\t\tif (expandedProp === undefined) setInternalExpanded(next);\n\t\tonExpandedChange?.(next);\n\t};\n\tconst labelByStatus: Record<AiToolCallStatus, string> = {\n\t\tpending: strings.pending,\n\t\trunning: strings.running,\n\t\tsuccess: strings.success,\n\t\terror: strings.error,\n\t};\n\tconst StatusIcon = STATUS_BADGE[status].icon;\n\n\tconst hasDetails = Boolean(args || result || error);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('ai-tool-call--component @container/ai-tool-call', \n\t\t\t\t'overflow-hidden rounded-radius border border-border/60 bg-card',\n\t\t\t\tstatus === 'error' && 'border-destructive/40 bg-destructive/5',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<Button\n\t\t\t\ttype=\"button\"\n\t\t\t\ttone=\"secondary\"\n\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\tsize=\"md\"\n\t\t\t\tonClick={() => hasDetails && setExpanded(!expanded)}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'ai-tool-call--trigger h-auto w-full flex-wrap justify-start gap-space-md whitespace-normal rounded-none px-space-lg py-space-md text-left @md/ai-tool-call:flex-nowrap',\n\t\t\t\t\thasDetails ? 'cursor-pointer hover:bg-muted/40' : 'cursor-default',\n\t\t\t\t)}\n\t\t\t\taria-expanded={hasDetails ? expanded : undefined}\n\t\t\t\taria-label={hasDetails ? (expanded ? strings.collapse : strings.expand) : undefined}\n\t\t\t>\n\t\t\t\t<IconBadge icon={IconComponent} tone=\"neutral\" size=\"md\" shape=\"square\" />\n\t\t\t\t<div className=\"min-w-0 flex-1\">\n\t\t\t\t\t<MonoValue className=\"truncate\">\n\t\t\t\t\t\t{name}\n\t\t\t\t\t</MonoValue>\n\t\t\t\t</div>\n\t\t\t\t<span className=\"ai-tool-call--meta order-last flex w-full flex-wrap items-center gap-space-sm @md/ai-tool-call:order-none @md/ai-tool-call:w-auto @md/ai-tool-call:flex-nowrap\">\n\t\t\t\t\t<Badge tone={STATUS_BADGE[status].tone} className=\"gap-space-xs\">\n\t\t\t\t\t\t{!!StatusIcon && (\n\t\t\t\t\t\t\t<StatusIcon\n\t\t\t\t\t\t\t\tclassName={cn('size-icon-sm', status === 'running' && 'animate-spin')}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{labelByStatus[status]}\n\t\t\t\t\t</Badge>\n\t\t\t\t\t{!!durationMs && (\n\t\t\t\t\t\t<DurationValue label={strings.durationLabel} ms={durationMs} />\n\t\t\t\t\t)}\n\t\t\t\t</span>\n\t\t\t\t{hasDetails &&\n\t\t\t\t\t(expanded ? (\n\t\t\t\t\t\t<ChevronDown className=\"size-icon-md shrink-0 text-muted-foreground\" />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<ChevronRight className=\"size-icon-md shrink-0 text-muted-foreground\" />\n\t\t\t\t\t))}\n\t\t\t</Button>\n\n\t\t\t{!!expanded && hasDetails && (\n\t\t\t\t<Stack gap=\"md\" className=\"ai-tool-call--details border-t border-border/60 bg-muted/20 px-space-lg py-space-md\">\n\t\t\t\t\t{!!args && (\n\t\t\t\t\t\t<DetailBlock label={strings.args}>{args}</DetailBlock>\n\t\t\t\t\t)}\n\t\t\t\t\t{status === 'error' && !!error ? (\n\t\t\t\t\t\t<DetailBlock label={strings.error} tone=\"destructive\">\n\t\t\t\t\t\t\t{error}\n\t\t\t\t\t\t</DetailBlock>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t!!result && <DetailBlock label={strings.result}>{result}</DetailBlock>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nAiToolCall.displayName = 'AiToolCall';\n\nfunction DetailBlock({\n\tlabel,\n\tchildren,\n\ttone = 'neutral',\n}: {\n\t/** Display label. */\n\tlabel: string;\n\tchildren: ReactNode;\n\ttone?: 'neutral' | 'destructive';\n}) {\n\treturn (\n\t\t<Stack gap=\"sm\" className=\"ai-tool-call--detail-block\">\n\t\t\t<DisplayLabel>\n\t\t\t\t{label}\n\t\t\t</DisplayLabel>\n\t\t\t<pre\n\t\t\t\ttabIndex={0}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'max-w-full overflow-x-auto rounded-radius-md bg-card px-space-md py-space-md font-mono text-xs leading-relaxed',\n\t\t\t\t\ttone === 'destructive' && 'text-destructive bg-destructive/5',\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</pre>\n\t\t</Stack>\n\t);\n}\n","/**\n * AiShimmer — gradient text shimmer for streaming / loading copy. Renders\n * children with a moving highlight band that draws the eye while a model is\n * thinking. Use anywhere a static \"Loading…\" feels too inert: agent typing,\n * tool warm-up, awaiting first token.\n */\nimport type { CSSProperties } from 'react';\nimport { Text } from '../../../typography';\nimport { cn } from '../../../../lib/utils';\n\nimport type { AiShimmerProps } from './types';\n\nexport function AiShimmer({\n\tchildren = 'Thinking…',\n\tpaused = false,\n\tduration = 2.4,\n\tclassName,\n}: AiShimmerProps) {\n\tif (paused) {\n\t\treturn (\n\t\t\t<Text tag=\"span\" type=\"secondary\" weight=\"medium\" className={cn('ai-shimmer--component', className)}>\n\t\t\t\t{children}\n\t\t\t</Text>\n\t\t);\n\t}\n\n\t// `CSSProperties` has no index signature for custom properties, which is the\n\t// only reason this needed a cast. Widening the annotation states the intent\n\t// — one known custom property — instead of switching the key off.\n\tconst style: CSSProperties & Record<'--ai-shimmer-duration', string> = {\n\t\t'--ai-shimmer-duration': `${duration}s`,\n\t};\n\n\treturn (\n\t\t<Text\n\t\t\ttag=\"span\"\n\t\t\tweight=\"medium\"\n\t\t\tdata-ai-shimmer\n\t\t\trole=\"status\"\n\t\t\taria-live=\"polite\"\n\t\t\tclassName={cn(\n\t\t\t\t'ai-shimmer--component inline-block bg-clip-text text-transparent',\n\t\t\t\t// foreground -> muted -> foreground gradient swept across\n\t\t\t\t'bg-[linear-gradient(110deg,var(--ai-shimmer-base,var(--muted-foreground))_30%,var(--ai-shimmer-highlight,var(--foreground))_50%,var(--ai-shimmer-base,var(--muted-foreground))_70%)]',\n\t\t\t\t'bg-[length:200%_100%]',\n\t\t\t\t'animate-[ai-shimmer-sweep_var(--ai-shimmer-duration,2.4s)_linear_infinite] motion-reduce:animate-none',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={style}\n\t\t>\n\t\t\t{children}\n\t\t</Text>\n\t);\n}\n\nAiShimmer.displayName = 'AiShimmer';\n","import type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport interface AiCodeBlockStrings {\n\tcopy: string;\n\tcopied: string;\n\tcopyAria: string;\n /** Failure feedback, additive for existing string dictionaries. */\n copyError?: string;\n\t/** Header label when no language is provided. */\n\tdefaultLanguageLabel: string;\n}\n\nexport const defaultAiCodeBlockStrings: AiCodeBlockStrings = {\n\tcopy: 'Copy',\n\tcopied: 'Copied',\n copyError: 'Could not copy. Please try again.',\n\tcopyAria: 'Copy code',\n\tdefaultLanguageLabel: 'Code',\n};\n\nexport interface AiCodeBlockProps {\n\t/** The code to render. Pre-formatted text. */\n\tcode: string;\n\t/** Display label for the language (e.g. \"TypeScript\", \"shell\"). */\n\tlanguage?: string;\n\t/** Optional filename rendered in the header next to the language label. */\n\tfilename?: string;\n\t/** Render with line numbers. */\n\tshowLineNumbers?: boolean;\n\t/** Highlight specific 1-indexed line numbers. */\n\thighlightLines?: ReadonlyArray<number>;\n\t/** Hide the header strip entirely. */\n\thideHeader?: boolean;\n\t/** Force max-height before scroll. */\n\tmaxHeight?: number | string;\n\t/** Trailing slot inside the header (e.g. extra action button). */\n\theaderActions?: ReactNode;\n\t/** Fired when the user copies (after the navigator.clipboard write). */\n\tonCopy?: () => void;\n\t/** Merged onto the outermost node. */\n\t/** Called when the clipboard is unavailable or the write fails. */\n onCopyError?: (error: unknown) => void;\n className?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiCodeBlockStrings>;\n}\n","import { CodeBlock } from '../../../base/code-block';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\nimport { defaultAiCodeBlockStrings, type AiCodeBlockProps } from './types';\n/** Compatibility adapter; the generic code display owns layout and copying. */\nexport function AiCodeBlock({ strings: stringsProp, className, onCopy, ...props }: AiCodeBlockProps) {\n const strings = useStrings(defaultAiCodeBlockStrings, stringsProp);\n return <CodeBlock {...props} className={cn('ai-code-block--component', className)} onCopy={onCopy ? () => onCopy() : undefined} strings={{ copyAria: strings.copyAria, copied: strings.copied, copyError: strings.copyError, defaultLanguageLabel: strings.defaultLanguageLabel }} />;\n}\nAiCodeBlock.displayName = 'AiCodeBlock';\n","import type { LucideIcon } from 'lucide-react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type AiAttachmentKind = 'image' | 'document' | 'audio' | 'video' | 'code' | 'archive' | 'generic';\n\nexport interface AiAttachmentStrings {\n\tremoveAria: string;\n\topenAria: string;\n\tuploadProgressAria: string;\n\t/** Text feedback when the attachment cannot be used. */\n\terror?: string;\n}\n\nexport const defaultAiAttachmentStrings: AiAttachmentStrings = {\n\tremoveAria: 'Remove attachment',\n\topenAria: 'Open attachment',\n\tuploadProgressAria: 'Upload progress',\n\terror: 'Failed',\n};\n\nexport interface AiAttachmentProps {\n\t/** Filename / display label. */\n\tname: string;\n\t/** Optional secondary label — formatted size, file extension, etc. */\n\tmeta?: string;\n\t/** Pre-categorized kind. Defaults to \"generic\" — drives the fallback icon. */\n\tkind?: AiAttachmentKind;\n\t/** Override the auto-picked kind icon. */\n\ticon?: LucideIcon;\n\t/** When set, renders the chip as a thumbnail tile with this image. */\n\tthumbnailUrl?: string;\n\t/** Show a small loading bar (in-flight upload). */\n\tprogress?: number; // 0..1\n\t/** Show as errored — overrides progress. */\n\terrored?: boolean;\n\t/** Open / download callback (clicking the chip body). */\n\tonOpen?: () => void;\n\t/** Render a remove (×) action. */\n\tonRemove?: () => void;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiAttachmentStrings>;\n}\n","/** Compatibility presentation for staged AI files; Attachment owns the file anatomy. */\nimport { AlertCircle, X } from 'lucide-react';\nimport { Attachment, AttachmentMedia, AttachmentContent, AttachmentTitle, AttachmentDescription, AttachmentActions, AttachmentProgress, AttachmentFileIcon } from '../../../base/attachment';\nimport { Button } from '../../../base/buttons';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\nimport { defaultAiAttachmentStrings, type AiAttachmentProps } from './types';\n\nexport function AiAttachment({ name, meta, kind = 'generic', icon: Icon, thumbnailUrl, progress, errored = false, onOpen, onRemove, className, strings: stringsProp }: AiAttachmentProps) {\n const strings = useStrings(defaultAiAttachmentStrings, stringsProp);\n const showProgress = !errored && typeof progress === 'number' && progress >= 0 && progress < 1;\n return <Attachment name={name} layout=\"compact\" status={errored ? 'error' : showProgress ? 'uploading' : undefined} onOpen={onOpen} strings={{ preview: () => strings.openAria }} className={cn('ai-attachment--component inline-flex w-auto', className)}>\n <AttachmentMedia variant={thumbnailUrl ? 'image' : 'icon'}>\n {thumbnailUrl ? <img src={thumbnailUrl} alt=\"\" /> : errored ? <AlertCircle aria-hidden=\"true\" /> : Icon ? <Icon aria-hidden=\"true\" /> : <AttachmentFileIcon name={name} kind={kind} />}\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle title={name}>{name}</AttachmentTitle>\n {meta && <AttachmentDescription clamp={1}>{meta}</AttachmentDescription>}\n {errored && <AttachmentDescription clamp=\"none\"><Text tag=\"span\" size=\"xs\" type=\"error\" role=\"alert\">{strings.error ?? defaultAiAttachmentStrings.error}</Text></AttachmentDescription>}\n {showProgress && <AttachmentProgress value={Math.round((progress ?? 0) * 100)} size=\"sm\" aria-label={strings.uploadProgressAria} />}\n </AttachmentContent>\n {onRemove && <AttachmentActions><Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly aria-label={strings.removeAria} onClick={onRemove}><X aria-hidden=\"true\" className=\"size-icon-sm\" /></Button></AttachmentActions>}\n </Attachment>;\n}\nAiAttachment.displayName = 'AiAttachment';\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type AiAgentStatus = 'idle' | 'thinking' | 'working' | 'done' | 'error' | 'offline';\n\nexport interface AiAgentStrings {\n\tstatusLabels: Record<AiAgentStatus, string>;\n}\n\nexport const defaultAiAgentStrings: AiAgentStrings = {\n\tstatusLabels: {\n\t\tidle: 'Idle',\n\t\tthinking: 'Thinking',\n\t\tworking: 'Working',\n\t\tdone: 'Done',\n\t\terror: 'Error',\n\t\toffline: 'Offline',\n\t},\n};\n\nexport interface AiAgentProps {\n\t/** Display name (e.g. \"Atlas\", \"Claude\"). */\n\tname: string;\n\t/** Avatar / mark — typically an icon or short emoji. */\n\ticon?: LucideIcon;\n\t/** Override avatar with arbitrary content (image, gradient mark, etc.). */\n\tavatar?: ReactNode;\n\t/** Short blurb / model identifier rendered under the name. */\n\tsubtitle?: ReactNode;\n\t/** Tone color for the avatar wash. */\n\ttone?: 'primary' | 'success' | 'warning' | 'destructive' | 'info' | 'neutral';\n\t/** Live status displayed as a pill next to the name. */\n\tstatus?: AiAgentStatus;\n\t/** Density variant — `inline` is a single-line chip, `card` is a tile. */\n\tvariant?: 'inline' | 'card';\n\t/** Trailing slot — typically actions, badges. */\n\ttrailing?: ReactNode;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiAgentStrings>;\n}\n","/**\n * AiAgent — identity card for an AI persona / model. Renders avatar (icon\n * or custom), name, optional subtitle (model id, role), and a live status\n * pill. `variant='inline'` is a one-line chip (header strips, breadcrumbs);\n * `variant='card'` is a small tile (model picker, agent dock).\n */\nimport { Bot, type LucideIcon } from 'lucide-react';\nimport { Badge } from '../../../base/badge';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { Stack } from '../../../base/structure';\nimport { cn } from '../../../../lib/utils';\n\nimport {\n\tdefaultAiAgentStrings,\n\ttype AiAgentProps,\n\ttype AiAgentStatus,\n} from './types';\n\nconst TONE_AVATAR: Record<NonNullable<AiAgentProps['tone']>, string> = {\n\tprimary: 'bg-primary/15 text-primary-accent',\n\tsuccess: 'bg-success/15 text-success',\n\twarning: 'bg-warning/20 text-warning',\n\tdestructive: 'bg-destructive/15 text-destructive',\n\tinfo: 'bg-info/15 text-info',\n\tneutral: 'bg-muted text-muted-foreground',\n};\n\nconst STATUS_VARIANT: Record<\n\tAiAgentStatus,\n\t'secondary' | 'primary' | 'success' | 'warning' | 'destructive'\n> = {\n\tidle: 'secondary',\n\tthinking: 'primary',\n\tworking: 'primary',\n\tdone: 'success',\n\terror: 'destructive',\n\toffline: 'secondary',\n};\n\nexport function AiAgent({\n\tname,\n\ticon,\n\tavatar,\n\tsubtitle,\n\ttone = 'primary',\n\tstatus,\n\tvariant = 'inline',\n\ttrailing,\n\tclassName,\n\tstrings: stringsProp,\n}: AiAgentProps) {\n\tconst strings = useStrings(defaultAiAgentStrings, stringsProp);\n\tconst Icon: LucideIcon = icon ?? Bot;\n\n\tconst avatarSize = variant === 'card' ? 'size-9' : 'size-7';\n\tconst iconSize = variant === 'card' ? 'size-icon' : 'size-icon-md';\n\n\tconst renderedAvatar =\n\t\tavatar ?? (\n\t\t\t<span\n\t\t\t\taria-hidden\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'inline-flex shrink-0 items-center justify-center rounded-full',\n\t\t\t\t\tavatarSize,\n\t\t\t\t\tTONE_AVATAR[tone],\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<Icon className={iconSize} />\n\t\t\t</span>\n\t\t);\n\n\tconst StatusPill = !!status && (\n\t\t<Badge tone={STATUS_VARIANT[status]} className=\"gap-space-xs\">\n\t\t\t<span\n\t\t\t\taria-hidden\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'inline-block size-1.5 rounded-full',\n\t\t\t\t\tstatus === 'thinking' || status === 'working'\n\t\t\t\t\t\t? 'animate-pulse bg-current'\n\t\t\t\t\t\t: 'bg-current',\n\t\t\t\t)}\n\t\t\t/>\n\t\t\t{strings.statusLabels[status]}\n\t\t</Badge>\n\t);\n\n\tif (variant === 'card') {\n\t\treturn (\n\t\t\t<div className={cn('ai-agent--component',\n\t\t\t\t\t'rounded-radius border border-border/60 bg-card p-surface-xs',\n\t\t\t\t\tclassName,\n\t\t\t\t)}>\n\t\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"lg\">\n\t\t\t\t{renderedAvatar}\n\t\t\t\t<div className=\"min-w-0 flex-1\">\n\t\t\t\t\t<div className=\"flex items-center gap-space-md\">\n\t\t\t\t\t\t<Text weight=\"semibold\" className=\"truncate\">\n\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t{StatusPill}\n\t\t\t\t\t</div>\n\t\t\t\t\t{!!subtitle && (\n\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"mt-0.5 line-clamp-1\">\n\t\t\t\t\t\t\t{subtitle}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{!!trailing && <div className=\"ml-auto flex items-center gap-space-xs\">{trailing}</div>}\n\t\t\t</Stack>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className={cn('ai-agent--component', 'inline-flex items-center gap-space-md', className)}>\n\t\t\t{renderedAvatar}\n\t\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"md\" className=\"min-w-0\">\n\t\t\t\t<Text weight=\"medium\" className=\"truncate\">\n\t\t\t\t\t{name}\n\t\t\t\t</Text>\n\t\t\t\t{!!subtitle && (\n\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"truncate\">\n\t\t\t\t\t\t{subtitle}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t\t{StatusPill}\n\t\t\t</Stack>\n\t\t\t{!!trailing && <div className=\"ml-1 flex items-center gap-space-xs\">{trailing}</div>}\n\t\t</div>\n\t);\n}\n\nAiAgent.displayName = 'AiAgent';\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\nimport type { SemanticTone } from '../../../../lib/component-vocabulary';\n\nexport type AiConfirmationTone = Extract<\n\tSemanticTone,\n\t'neutral' | 'destructive' | 'warning' | 'info' | 'primary'\n>;\n\nexport interface AiConfirmationStrings {\n\tapprove: string;\n\treject: string;\n\tpending: string;\n\tapproved: string;\n\trejected: string;\n}\n\nexport const defaultAiConfirmationStrings: AiConfirmationStrings = {\n\tapprove: 'Approve',\n\treject: 'Reject',\n\tpending: 'Awaiting your approval',\n\tapproved: 'Approved',\n\trejected: 'Rejected',\n};\n\nexport type AiConfirmationStatus = 'pending' | 'approved' | 'rejected';\n\nexport interface AiConfirmationProps {\n\t/** Title — short, action-oriented (e.g. \"Run npm install\"). */\n\ttitle: ReactNode;\n\t/** Body description / details. */\n\tdescription?: ReactNode;\n\t/** Decorative icon. */\n\ticon?: LucideIcon;\n\t/** Semantic color intent. */\n\ttone?: AiConfirmationTone;\n\t/** Current status — when set, the action row is replaced with a result pill. */\n\tstatus?: AiConfirmationStatus;\n\t/** Approve callback. */\n\tonApprove?: () => void;\n\t/** Reject callback. */\n\tonReject?: () => void;\n\t/** Override the approve button label. */\n\tapproveLabel?: ReactNode;\n\t/** Override the reject button label. */\n\trejectLabel?: ReactNode;\n\t/** Render a \"details\" expandable area. */\n\tdetails?: ReactNode;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiConfirmationStrings>;\n}\n","/**\n * AiConfirmation — inline approval prompt rendered in-stream when an agent\n * needs user permission before taking a side-effecting action (run command,\n * call write API, charge a card). Carries title, description, icon, optional\n * details, and an approve/reject pair. After resolution, the action row\n * collapses into a status pill.\n */\nimport {\n\tCheck,\n\tShieldCheck,\n\tX,\n\ttype LucideIcon } from 'lucide-react';\nimport { Button } from '../../../base/buttons';\nimport { IconBadge,\n} from '../../../base/display';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { Stack } from '../../../base/structure';\nimport { cn } from '../../../../lib/utils';\n\nimport {\n\tdefaultAiConfirmationStrings,\n\ttype AiConfirmationProps,\n\ttype AiConfirmationTone,\n} from './types';\n\nconst TONE: Record<\n\tAiConfirmationTone,\n\t{ ring: string; icon: 'neutral' | 'primary' | 'success' | 'warning' | 'destructive' | 'info' }\n> = {\n\tneutral: { ring: 'border-border/60 bg-card', icon: 'neutral' },\n\tdestructive: { ring: 'border-destructive/40 bg-destructive/5', icon: 'destructive' },\n\twarning: { ring: 'border-warning/40 bg-warning/5', icon: 'warning' },\n\tinfo: { ring: 'border-info/40 bg-info/5', icon: 'info' },\n\tprimary: { ring: 'border-primary/40 bg-primary/5', icon: 'primary' },\n};\n\nexport function AiConfirmation({\n\ttitle,\n\tdescription,\n\ticon,\n\ttone = 'neutral',\n\tstatus = 'pending',\n\tonApprove,\n\tonReject,\n\tapproveLabel,\n\trejectLabel,\n\tdetails,\n\tclassName,\n\tstrings: stringsProp,\n}: AiConfirmationProps) {\n\tconst strings = useStrings(defaultAiConfirmationStrings, stringsProp);\n\tconst Icon: LucideIcon = icon ?? ShieldCheck;\n\tconst toneCfg = TONE[tone];\n\n\treturn (\n\t\t<div\n\t\t\trole=\"region\"\n\t\t\taria-live=\"polite\"\n\t\t\tclassName={cn('ai-confirmation--component',\n\t\t\t\t'@container/ai-confirmation rounded-radius border p-surface-xs',\n\t\t\t\ttoneCfg.ring,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<div className=\"ai-confirmation--header flex items-start gap-space-lg\">\n\t\t\t\t<IconBadge icon={Icon} tone={toneCfg.icon} size=\"md\" shape=\"square\" />\n\t\t\t\t<div className=\"min-w-0 flex-1\">\n\t\t\t\t\t<Text weight=\"semibold\">{title}</Text>\n\t\t\t\t\t{!!description && (\n\t\t\t\t\t\t<Text type=\"secondary\" className=\"mt-1\">\n\t\t\t\t\t\t\t{description}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t\t{!!details && <div className=\"mt-space-md\">{details}</div>}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{status === 'pending' ? (\n\t\t\t\t<div className=\"ai-confirmation--footer mt-space-lg flex flex-col items-stretch gap-space-md border-t border-border/60 pt-2.5 @sm/ai-confirmation:flex-row @sm/ai-confirmation:items-center @sm/ai-confirmation:justify-between\">\n\t\t\t\t\t<Text size=\"xs\" type=\"secondary\">\n\t\t\t\t\t\t{strings.pending}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Stack direction=\"horizontal\" align=\"center\" justify=\"end\" gap=\"md\" className=\"ai-confirmation--actions\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\tonClick={onReject}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<X className=\"size-icon-md\" />\n\t\t\t\t\t\t\t{rejectLabel ?? strings.reject}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone={tone === 'destructive' ? 'destructive' : 'primary'}\n\t\t\t\t\t\t\tonClick={onApprove}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Check className=\"size-icon-md\" />\n\t\t\t\t\t\t\t{approveLabel ?? strings.approve}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</Stack>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<div className=\"ai-confirmation--footer mt-space-lg flex items-center gap-space-md border-t border-border/60 pt-2.5\">\n\t\t\t\t\t{status === 'approved' ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Check className=\"size-icon-md text-success\" />\n\t\t\t\t\t\t\t<Text size=\"xs\" type=\"success\" weight=\"medium\">\n\t\t\t\t\t\t\t\t{strings.approved}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<X className=\"size-icon-md text-muted-foreground\" />\n\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" weight=\"medium\">\n\t\t\t\t\t\t\t\t{strings.rejected}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nAiConfirmation.displayName = 'AiConfirmation';\n","import type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport interface AiSourceItem {\n\t/** Stable identity for this entry. */\n\tid: string;\n\t/** Surface title. */\n\ttitle: ReactNode;\n\turl?: string;\n\t/** Hostname / publisher / \"doc-section\" — rendered under the title. */\n\tpublisher?: string;\n\t/** Favicon / logo URL — rendered as a small avatar; falls back to a globe. */\n\tfaviconUrl?: string;\n\t/** Optional short snippet shown only in the expanded variant. */\n\tsnippet?: ReactNode;\n}\n\nexport interface AiSourcesStrings {\n\t/** Header title — `{{count}}` placeholder for the source count. */\n\ttitle: string;\n\texpand: string;\n\tcollapse: string;\n\tvisit: string;\n}\n\nexport const defaultAiSourcesStrings: AiSourcesStrings = {\n\ttitle: '{{count}} sources',\n\texpand: 'Show all sources',\n\tcollapse: 'Hide sources',\n\tvisit: 'Visit source',\n};\n\nexport type AiSourcesVariant = 'list' | 'avatars';\n\nexport interface AiSourcesProps {\n\t/** Source list. Order is significant — index drives the displayed number. */\n\tsources: ReadonlyArray<AiSourceItem>;\n\t/** `list` is a vertical row layout; `avatars` is a stacked-favicons strip. */\n\tvariant?: AiSourcesVariant;\n\t/** Number of sources rendered in the avatar strip before the \"+N\" overflow. */\n\tmaxAvatars?: number;\n\t/** Expanded state, for controlled use in the list variant. */\n\texpanded?: boolean;\n\t/** Render the list expanded by default (only applies to `list` variant). */\n\tdefaultExpanded?: boolean;\n\t/** Fired whenever the disclosure state changes. */\n\tonExpandedChange?: (expanded: boolean) => void;\n\t/** Click handler — preferred over `url` for SPA routing. */\n\tonSelect?: (source: AiSourceItem, index: number) => void;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiSourcesStrings>;\n}\n","/**\n * AiSources — light-weight source list rendered under streamed content. Two\n * shapes: `list` is a vertical stack of source rows (favicon + title + host);\n * `avatars` is a compact stacked-favicon strip used when space is tight (chat\n * footer, side panel header). For richer \"expandable\" footnote-style sources\n * with relevance bars and snippets, see `<AiCitation>`.\n */\nimport { useEffect, useState } from 'react';\nimport { ChevronDown, ChevronRight, ExternalLink, Globe } from 'lucide-react';\nimport { Button } from '../../../base/buttons';\nimport { Stack } from '../../../base/structure';\nimport { Number as NumberValue, SecondaryValue } from '../../../primitives';\nimport { Text, TextLink } from '../../../typography';\nimport { mergeStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport { defaultAiSourcesStrings, type AiSourceItem, type AiSourcesProps } from './types';\n\nfunction interpolate(template: string, params: Record<string, string | number>): string {\n\treturn template.replace(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (m, k) => {\n\t\tconst v = params[k];\n\t\treturn v === undefined ? m : String(v);\n\t});\n}\n\nexport function AiSources({\n\tsources,\n\tvariant = 'list',\n\tmaxAvatars = 5,\n\texpanded: expandedProp,\n\tdefaultExpanded = false,\n\tonExpandedChange,\n\tonSelect,\n\tclassName,\n\tstrings: stringsProp,\n}: AiSourcesProps) {\n\tconst strings = mergeStrings(defaultAiSourcesStrings, stringsProp);\n\tconst [internalExpanded, setInternalExpanded] = useState(defaultExpanded);\n\tconst expanded = expandedProp ?? internalExpanded;\n\tconst setExpanded = (next: boolean) => {\n\t\tif (expandedProp === undefined) setInternalExpanded(next);\n\t\tonExpandedChange?.(next);\n\t};\n\tconst titleText = interpolate(strings.title, { count: sources.length });\n\n\tif (variant === 'avatars') {\n\t\treturn (\n\t\t\t<AvatarStrip\n\t\t\t\tsources={sources}\n\t\t\t\tmax={maxAvatars}\n\t\t\t\ttitle={titleText}\n\t\t\t\tonSelect={onSelect}\n\t\t\t\tclassName={cn('ai-sources--component', className)}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst visible = expanded ? sources : sources.slice(0, 0);\n\n\treturn (\n\t\t<div className={cn('ai-sources--component rounded-radius border border-border/60 bg-card', className)}>\n\t\t\t<Button\n\t\t\t\ttype=\"button\"\n\t\t\t\ttone=\"secondary\"\n\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\tsize=\"md\"\n\t\t\t\tonClick={() => setExpanded(!expanded)}\n\t\t\t\taria-expanded={expanded}\n\t\t\t\taria-label={expanded ? strings.collapse : strings.expand}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'ai-sources--trigger h-auto w-full justify-start gap-space-md px-surface-xs py-row-y text-left',\n\t\t\t\t\t'rounded-radius hover:bg-muted/40',\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<AvatarStack sources={sources.slice(0, 4)} />\n\t\t\t\t<Text weight=\"medium\" className=\"flex-1\">\n\t\t\t\t\t{titleText}\n\t\t\t\t</Text>\n\t\t\t\t{expanded ? (\n\t\t\t\t\t<ChevronDown className=\"size-icon-md text-muted-foreground\" />\n\t\t\t\t) : (\n\t\t\t\t\t<ChevronRight className=\"size-icon-md text-muted-foreground\" />\n\t\t\t\t)}\n\t\t\t</Button>\n\n\t\t\t{expanded && (\n\t\t\t\t<div className=\"ai-sources--list border-t border-border/60 px-surface-xs py-row-y\">\n\t\t\t\t\t<Stack render={<ol />} gap=\"2xs\">\n\t\t\t\t\t\t{visible.map((source, idx) => (\n\t\t\t\t\t\t\t<SourceRow\n\t\t\t\t\t\t\t\tkey={source.id}\n\t\t\t\t\t\t\t\tsource={source}\n\t\t\t\t\t\t\t\tindex={idx + 1}\n\t\t\t\t\t\t\t\tonSelect={onSelect ? () => onSelect(source, idx) : undefined}\n\t\t\t\t\t\t\t\tvisitLabel={strings.visit}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</Stack>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nAiSources.displayName = 'AiSources';\n\nfunction AvatarStrip({\n\tsources,\n\tmax,\n\ttitle,\n\tonSelect,\n\tclassName,\n}: {\n\tsources: ReadonlyArray<AiSourceItem>;\n\tmax: number;\n\ttitle: string;\n\tonSelect?: (source: AiSourceItem, index: number) => void;\n\tclassName?: string;\n}) {\n\tconst visible = sources.slice(0, max);\n\tconst overflow = sources.length - visible.length;\n\treturn (\n\t\t<div className={cn('inline-flex items-center gap-space-md', className)}>\n\t\t\t<AvatarStack sources={visible} onSelect={onSelect} />\n\t\t\t<Text size=\"xs\" type=\"secondary\">\n\t\t\t\t{title}\n\t\t\t</Text>\n\t\t\t{overflow > 0 && (\n\t\t\t\t<SecondaryValue size=\"xs\" className=\"tabular-nums\">\n\t\t\t\t\t+\n\t\t\t\t\t<NumberValue value={overflow} size=\"xs\" type=\"secondary\" align=\"left\" />\n\t\t\t\t</SecondaryValue>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nfunction AvatarStack({\n\tsources,\n\tonSelect,\n}: {\n\tsources: ReadonlyArray<AiSourceItem>;\n\tonSelect?: (source: AiSourceItem, index: number) => void;\n}) {\n\treturn (\n\t\t<div className=\"flex -space-x-1.5\">\n\t\t\t{sources.map((s, i) => {\n\t\t\t\tconst visual = (\n\t\t\t\t\t<span\n\t\t\t\t\t\tkey={s.id}\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\ttitle={typeof s.title === 'string' ? s.title : undefined}\n\t\t\t\t\t\tclassName=\"inline-flex size-icon-lg items-center justify-center overflow-hidden rounded-full border border-card bg-muted text-muted-foreground ring-1 ring-border/60\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<SourceFavicon src={s.faviconUrl} />\n\t\t\t\t\t</span>\n\t\t\t\t);\n\t\t\t\tif (onSelect) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={s.id}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\ticonOnly\n\t\t\t\t\t\t\tonClick={() => onSelect(s, i)}\n\t\t\t\t\t\t\tclassName=\"size-icon-lg rounded-full p-0\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{visual}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn visual;\n\t\t\t})}\n\t\t</div>\n\t);\n}\n\nfunction SourceFavicon({ src }: { src?: string }) {\n\tconst [failed, setFailed] = useState(false);\n\n\tuseEffect(() => {\n\t\tsetFailed(false);\n\t}, [src]);\n\n\tif (!src || failed) {\n\t\treturn <Globe className=\"size-icon-sm\" />;\n\t}\n\n\treturn <img src={src} alt=\"\" className=\"size-full object-cover\" onError={() => setFailed(true)} />;\n}\n\nfunction SourceRow({\n\tsource,\n\tindex,\n\tonSelect,\n\tvisitLabel,\n}: {\n\tsource: AiSourceItem;\n\tindex: number;\n\tonSelect?: () => void;\n\tvisitLabel: string;\n}) {\n\tconst interactive = Boolean(source.url || onSelect);\n\tconst rowClassName = cn(\n\t\t'group flex w-full items-start gap-2.5 rounded-radius-md px-2 py-1.5 text-left',\n\t\tinteractive && 'hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40',\n\t);\n\tconst rowContent = (\n\t\t<>\n\t\t\t<NumberValue\n\t\t\t\tvalue={index}\n\t\t\t\tsize=\"xs\"\n\t\t\t\tweight=\"semibold\"\n\t\t\t\ttype=\"secondary\"\n\t\t\t\talign=\"center\"\n\t\t\t\tclassName=\"inline-flex size-icon-lg shrink-0 items-center justify-center rounded-full bg-muted\"\n\t\t\t/>\n\t\t\t<div className=\"min-w-0 flex-1\">\n\t\t\t\t<Text weight=\"medium\" className=\"truncate\">\n\t\t\t\t\t{source.title}\n\t\t\t\t\t{!!source.url && (\n\t\t\t\t\t\t<ExternalLink className=\"ml-1 inline size-icon-sm text-muted-foreground/70 align-baseline\" />\n\t\t\t\t\t)}\n\t\t\t\t</Text>\n\t\t\t\t{!!source.publisher && (\n\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"truncate\">\n\t\t\t\t\t\t{source.publisher}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t\t{!!source.snippet && (\n\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"mt-1 line-clamp-2\">\n\t\t\t\t\t\t{source.snippet}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<li>\n\t\t\t{source.url && !onSelect ? (\n\t\t\t\t<TextLink\n\t\t\t\t\thref={source.url}\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\tsize=\"inherit\"\n\t\t\t\t\tunderline={false}\n\t\t\t\t\tclassName={rowClassName}\n\t\t\t\t\taria-label={visitLabel}\n\t\t\t\t>\n\t\t\t\t\t{rowContent}\n\t\t\t\t</TextLink>\n\t\t\t) : onSelect ? (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\tonClick={onSelect}\n\t\t\t\t\tclassName={cn(rowClassName, 'h-auto justify-start whitespace-normal')}\n\t\t\t\t\taria-label={source.url ? visitLabel : undefined}\n\t\t\t\t>\n\t\t\t\t\t{rowContent}\n\t\t\t\t</Button>\n\t\t\t) : (\n\t\t\t\t<span className={rowClassName}>{rowContent}</span>\n\t\t\t)}\n\t\t</li>\n\t);\n}\n","import type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport interface AiReasoningStrings {\n\t/** Header label when collapsed and reasoning is in progress. */\n\tthinking: string;\n\t/** Header label when reasoning is complete. Use `{{duration}}` for the formatted elapsed time. */\n\tthoughtFor: string;\n\t/** Header label when no duration is available. */\n\tthoughtDone: string;\n\texpandAria: string;\n\tcollapseAria: string;\n}\n\nexport const defaultAiReasoningStrings: AiReasoningStrings = {\n\tthinking: 'Thinking…',\n\tthoughtFor: 'Thought for {{duration}}',\n\tthoughtDone: 'Reasoning complete',\n\texpandAria: 'Expand reasoning',\n\tcollapseAria: 'Collapse reasoning',\n};\n\nexport interface AiReasoningProps {\n\t/** Reasoning trace — typically streamed plaintext. */\n\tchildren?: ReactNode;\n\t/** Show the live \"Thinking…\" header with shimmer. */\n\tstreaming?: boolean;\n\t/** Total elapsed time in seconds — shown in the collapsed-done header. */\n\tdurationSeconds?: number;\n\t/** Auto-expand while streaming. */\n\texpandWhileStreaming?: boolean;\n\t/** Initial expanded state. */\n\tdefaultExpanded?: boolean;\n\t/** Controlled expanded state. */\n\texpanded?: boolean;\n\tonExpandedChange?: (expanded: boolean) => void;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiReasoningStrings>;\n}\n","/**\n * AiReasoning — collapsible \"thinking\" trace shown above the assistant's\n * final answer. While `streaming` is true the header runs the shimmer label\n * and the body is auto-expanded; once streaming ends, the header switches\n * to a localized duration summary and the body collapses to a peek.\n *\n * Accept the trace as `children` so the consumer can stream raw text, JSX\n * blocks (substeps, code), or Markdown via their own renderer.\n */\nimport { useEffect, useState, type ReactNode } from 'react';\nimport { Brain, ChevronDown, ChevronRight } from 'lucide-react';\nimport { Button } from '../../../base/buttons';\nimport { Duration } from '../../../primitives';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport { AiShimmer } from '../ai-shimmer/ai-shimmer';\nimport { defaultAiReasoningStrings, type AiReasoningProps } from './types';\n\nfunction renderThoughtFor(template: string, seconds: number): ReactNode {\n\tconst durationParts = template.split(/\\{\\{\\s*duration\\s*\\}\\}/);\n\tif (durationParts.length === 1) return template;\n\n\treturn (\n\t\t<>\n\t\t\t{durationParts[0]}\n\t\t\t<Duration value={seconds} maxParts={1} align=\"left\" />\n\t\t\t{durationParts.slice(1).join('{{duration}}')}\n\t\t</>\n\t);\n}\n\nexport function AiReasoning({\n\tchildren,\n\tstreaming = false,\n\tdurationSeconds,\n\texpandWhileStreaming = true,\n\tdefaultExpanded = false,\n\texpanded: expandedProp,\n\tonExpandedChange,\n\tclassName,\n\tstrings: stringsProp,\n}: AiReasoningProps) {\n\tconst strings = useStrings(defaultAiReasoningStrings, stringsProp);\n\tconst [internalExpanded, setInternalExpanded] = useState(defaultExpanded);\n\tconst expanded = expandedProp ?? internalExpanded;\n\tconst setExpanded = (next: boolean) => {\n\t\tif (expandedProp === undefined) setInternalExpanded(next);\n\t\tonExpandedChange?.(next);\n\t};\n\n\tuseEffect(() => {\n\t\tif (streaming && expandWhileStreaming && !expanded) {\n\t\t\tsetExpanded(true);\n\t\t}\n\t\tif (!streaming && expandWhileStreaming && expanded && !defaultExpanded && expandedProp === undefined) {\n\t\t\t// auto-collapse only once when streaming flips off and consumer hasn't pinned state\n\t\t\tsetExpanded(false);\n\t\t}\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [streaming]);\n\n\tconst headerLabel: ReactNode = streaming ? (\n\t\t<AiShimmer className=\"flex-1\">{strings.thinking}</AiShimmer>\n\t) : durationSeconds !== undefined ? (\n\t\t<Text weight=\"medium\" className=\"flex-1\">\n\t\t\t{renderThoughtFor(strings.thoughtFor, durationSeconds)}\n\t\t</Text>\n\t) : (\n\t\t<Text weight=\"medium\" className=\"flex-1\">\n\t\t\t{strings.thoughtDone}\n\t\t</Text>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('ai-reasoning--component', \n\t\t\t\t'overflow-hidden rounded-radius border border-border/60 bg-muted/20',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<Button\n\t\t\t\ttype=\"button\"\n\t\t\t\ttone=\"secondary\"\n\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\tsize=\"md\"\n\t\t\t\tonClick={() => setExpanded(!expanded)}\n\t\t\t\taria-expanded={expanded}\n\t\t\t\taria-label={expanded ? strings.collapseAria : strings.expandAria}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'ai-reasoning--trigger h-auto w-full justify-start gap-space-md rounded-none px-surface-xs py-row-y text-left',\n\t\t\t\t\t'hover:bg-muted/30',\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<Brain className=\"size-icon-md text-muted-foreground\" />\n\t\t\t\t{headerLabel}\n\t\t\t\t{expanded ? (\n\t\t\t\t\t<ChevronDown className=\"size-icon-md text-muted-foreground\" />\n\t\t\t\t) : (\n\t\t\t\t\t<ChevronRight className=\"size-icon-md text-muted-foreground\" />\n\t\t\t\t)}\n\t\t\t</Button>\n\n\t\t\t{expanded && (\n\t\t\t\t<div className=\"ai-reasoning--body border-t border-border/60 p-surface-xs\">\n\t\t\t\t\t{typeof children === 'string' ? (\n\t\t\t\t\t\t<Text type=\"secondary\" lineHeight=\"relaxed\" className=\"whitespace-pre-wrap\">\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"whitespace-pre-wrap\">{children}</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nAiReasoning.displayName = 'AiReasoning';\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type AiChainStepStatus = 'pending' | 'active' | 'completed' | 'failed';\n\nexport interface AiChainStep {\n\t/** Stable identity for this entry. */\n\tid: string;\n\t/** Surface title. */\n\ttitle: ReactNode;\n\t/** Optional rationale rendered under the title. */\n\tdescription?: ReactNode;\n\t/** Step status — drives the marker style. */\n\tstatus?: AiChainStepStatus;\n\t/** Custom icon override for the step marker. */\n\ticon?: LucideIcon;\n\t/** Free-form children rendered inside the step body (substeps, code, …). */\n\tbody?: ReactNode;\n}\n\nexport interface AiChainOfThoughtStrings {\n\t/** Surface title. */\n\ttitle: string;\n\tstreamingHint: string;\n}\n\nexport const defaultAiChainOfThoughtStrings: AiChainOfThoughtStrings = {\n\ttitle: 'Reasoning',\n\tstreamingHint: 'Working through the steps…',\n};\n\nexport interface AiChainOfThoughtProps {\n\t/** Step list — order is significant. */\n\tsteps: ReadonlyArray<AiChainStep>;\n\t/** Hide the header strip. */\n\thideHeader?: boolean;\n\t/** Show the streaming hint under the header. */\n\tstreaming?: boolean;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiChainOfThoughtStrings>;\n}\n","/**\n * AiChainOfThought — vertical timeline of reasoning steps an agent took (or\n * is taking) to reach a conclusion. Status-aware markers; per-step body slot\n * for nested content (tool calls, code, sub-steps). Pair with `AiReasoning`\n * (free-form trace) when the model emits structured plan steps.\n */\nimport { AlertCircle, Check, Circle, Loader2, type LucideIcon } from 'lucide-react';\nimport { Stack } from '../../../base/structure';\nimport { DisplayLabel, Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport { AiShimmer } from '../ai-shimmer/ai-shimmer';\nimport {\n\tdefaultAiChainOfThoughtStrings,\n\ttype AiChainOfThoughtProps,\n\ttype AiChainStepStatus,\n} from './types';\n\nconst STATUS_VISUAL: Record<\n\tAiChainStepStatus,\n\t{ icon: LucideIcon; iconCls: string; ring: string; spin?: boolean }\n> = {\n\tpending: {\n\t\ticon: Circle,\n\t\ticonCls: 'text-muted-foreground/60',\n\t\tring: 'border-border/60 bg-card',\n\t},\n\tactive: {\n\t\ticon: Loader2,\n\t\ticonCls: 'text-primary-accent',\n\t\tring: 'border-primary/40 bg-primary/5',\n\t\tspin: true,\n\t},\n\tcompleted: {\n\t\ticon: Check,\n\t\ticonCls: 'text-success-foreground',\n\t\tring: 'border-success/40 bg-success',\n\t},\n\tfailed: {\n\t\ticon: AlertCircle,\n\t\ticonCls: 'text-destructive-foreground',\n\t\tring: 'border-destructive/40 bg-destructive',\n\t},\n};\n\nexport function AiChainOfThought({\n\tsteps,\n\thideHeader = false,\n\tstreaming = false,\n\tclassName,\n\tstrings: stringsProp,\n}: AiChainOfThoughtProps) {\n\tconst strings = useStrings(defaultAiChainOfThoughtStrings, stringsProp);\n\n\treturn (\n\t\t<Stack\n\t\t\tgap=\"none\"\n\t\t\tclassName={cn('ai-chain-of-thought--component', 'rounded-radius border border-border/60 bg-card', className)}\n\t\t>\n\t\t\t{!hideHeader && (\n\t\t\t\t<div className=\"ai-chain-of-thought--header border-b border-border/60 p-surface\">\n\t\t\t\t<Stack direction=\"horizontal\" gap=\"sm\" wrap={false}>\n\t\t\t\t\t<DisplayLabel>\n\t\t\t\t\t\t{strings.title}\n\t\t\t\t\t</DisplayLabel>\n\t\t\t\t\t{streaming && (\n\t\t\t\t\t\t<AiShimmer className=\"ml-auto !text-xs\">\n\t\t\t\t\t\t\t{strings.streamingHint}\n\t\t\t\t\t\t</AiShimmer>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<ol className=\"ai-chain-of-thought--body relative p-surface\">\n\t\t\t\t{steps.map((step, idx) => {\n\t\t\t\t\tconst status: AiChainStepStatus = step.status ?? 'pending';\n\t\t\t\t\tconst visual = STATUS_VISUAL[status];\n\t\t\t\t\tconst Icon = step.icon ?? visual.icon;\n\t\t\t\t\tconst isLast = idx === steps.length - 1;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<li key={step.id} className=\"relative flex gap-space-lg pb-space-lg last:pb-0\">\n\t\t\t\t\t\t\t{!isLast && (\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\t\tclassName=\"absolute bottom-0 left-[11px] top-[26px] w-px bg-border/60\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t'relative z-[1] mt-0.5 inline-flex size-6 shrink-0 items-center justify-center rounded-full border',\n\t\t\t\t\t\t\t\t\tvisual.ring,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t'size-icon-sm',\n\t\t\t\t\t\t\t\t\t\tvisual.iconCls,\n\t\t\t\t\t\t\t\t\t\tvisual.spin && 'animate-spin',\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<div className=\"min-w-0 flex-1\">\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tweight={status === 'active' ? 'semibold' : 'medium'}\n\t\t\t\t\t\t\t\t\tclassName={cn(status === 'pending' && 'text-muted-foreground')}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{step.title}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t{!!step.description && (\n\t\t\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"mt-0.5\">\n\t\t\t\t\t\t\t\t\t\t{step.description}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!step.body && (\n\t\t\t\t\t\t\t\t\t<div className=\"mt-space-md\">{step.body}</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</ol>\n\t\t</Stack>\n\t);\n}\n\nAiChainOfThought.displayName = 'AiChainOfThought';\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type AiTaskStatus = 'queued' | 'running' | 'completed' | 'failed' | 'cancelled' | 'skipped';\n\nexport interface AiTaskItem {\n\t/** Stable identity for this entry. */\n\tid: string;\n\t/** Surface title. */\n\ttitle: ReactNode;\n\t/** Status — drives the marker pill and icon. */\n\tstatus?: AiTaskStatus;\n\t/** Optional sub-task list rendered nested. */\n\tchildren?: ReadonlyArray<AiTaskItem>;\n\t/** Decorative icon override. */\n\ticon?: LucideIcon;\n\t/** Right-aligned slot — duration, byte count, etc. */\n\trightSlot?: ReactNode;\n\t/** Free-form body rendered under the title (logs, code, …). */\n\tbody?: ReactNode;\n}\n\nexport interface AiTaskStrings {\n\tstatusLabels: Record<AiTaskStatus, string>;\n\tcollapseSubtasks: string;\n\texpandSubtasks: string;\n}\n\nexport const defaultAiTaskStrings: AiTaskStrings = {\n\tstatusLabels: {\n\t\tqueued: 'Queued',\n\t\trunning: 'Running',\n\t\tcompleted: 'Done',\n\t\tfailed: 'Failed',\n\t\tcancelled: 'Cancelled',\n\t\tskipped: 'Skipped',\n\t},\n\tcollapseSubtasks: 'Collapse subtasks',\n\texpandSubtasks: 'Expand subtasks',\n};\n\nexport interface AiTaskProps {\n\t/** Top-level task. */\n\ttask: AiTaskItem;\n\t/** Compact = single row with collapsible children; expanded = always show. */\n\tdensity?: 'compact' | 'expanded';\n\t/** Indentation width per nesting level (px). */\n\tindent?: number;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiTaskStrings>;\n}\n","/**\n * AiTask — single task (with optional sub-tasks) used by agent surfaces to\n * surface long-running plans: scaffolding, package installs, multi-file\n * edits. Each row carries a status marker, a title, and optional body /\n * right-slot. Children render nested under the parent and are auto-\n * collapsed by default in the `compact` density.\n */\nimport { useState } from 'react';\nimport {\n\tAlertCircle,\n\tCheck,\n\tChevronDown,\n\tChevronRight,\n\tCircle,\n\tLoader2,\n\tMinusCircle,\n\tXCircle,\n\ttype LucideIcon,\n} from 'lucide-react';\nimport { Badge } from '../../../base/badge';\nimport { Button } from '../../../base/buttons';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport {\n\tdefaultAiTaskStrings,\n\ttype AiTaskItem,\n\ttype AiTaskProps,\n\ttype AiTaskStatus,\n} from './types';\n\nconst STATUS_ICON: Record<AiTaskStatus, { icon: LucideIcon; cls: string; spin?: boolean }> = {\n\tqueued: { icon: Circle, cls: 'text-muted-foreground/60' },\n\trunning: { icon: Loader2, cls: 'text-primary-accent', spin: true },\n\tcompleted: { icon: Check, cls: 'text-success' },\n\tfailed: { icon: AlertCircle, cls: 'text-destructive' },\n\tcancelled: { icon: XCircle, cls: 'text-muted-foreground' },\n\tskipped: { icon: MinusCircle, cls: 'text-muted-foreground' },\n};\n\nconst STATUS_VARIANT: Record<\n\tAiTaskStatus,\n\t'secondary' | 'primary' | 'success' | 'destructive' | 'warning'\n> = {\n\tqueued: 'secondary',\n\trunning: 'primary',\n\tcompleted: 'success',\n\tfailed: 'destructive',\n\tcancelled: 'secondary',\n\tskipped: 'secondary',\n};\n\nexport function AiTask({\n\ttask,\n\tdensity = 'compact',\n\tindent = 18,\n\tclassName,\n\tstrings: stringsProp,\n}: AiTaskProps) {\n\tconst strings = useStrings(defaultAiTaskStrings, stringsProp);\n\treturn (\n\t\t<div className={cn('ai-task--component', 'rounded-radius border border-border/60 bg-card', className)}>\n\t\t\t<TaskRow\n\t\t\t\titem={task}\n\t\t\t\tdepth={0}\n\t\t\t\tdensity={density}\n\t\t\t\tindent={indent}\n\t\t\t\tstrings={strings}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nAiTask.displayName = 'AiTask';\n\nfunction TaskRow({\n\titem,\n\tdepth,\n\tdensity,\n\tindent,\n\tstrings,\n}: {\n\titem: AiTaskItem;\n\tdepth: number;\n\tdensity: 'compact' | 'expanded';\n\tindent: number;\n\tstrings: ReturnType<typeof useStrings<typeof defaultAiTaskStrings>>;\n}) {\n\tconst status: AiTaskStatus = item.status ?? 'queued';\n\tconst visual = STATUS_ICON[status];\n\tconst Icon = item.icon ?? visual.icon;\n\tconst hasChildren = !!item.children?.length;\n\tconst [open, setOpen] = useState(density === 'expanded' || depth === 0 ? true : false);\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'flex items-start gap-space-md px-3 py-2',\n\t\t\t\t\tdepth > 0 && 'border-t border-border/60',\n\t\t\t\t)}\n\t\t\t\tstyle={{ paddingLeft: 12 + depth * indent }}\n\t\t\t>\n\t\t\t\t{hasChildren ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\tonClick={() => setOpen((v) => !v)}\n\t\t\t\t\t\taria-expanded={open}\n\t\t\t\t\t\taria-label={open ? strings.collapseSubtasks : strings.expandSubtasks}\n\t\t\t\t\t\tclassName=\"-ml-1 mt-0.5 size-icon rounded p-0 text-muted-foreground hover:text-foreground\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{open ? (\n\t\t\t\t\t\t\t<ChevronDown className=\"size-icon-md\" />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<ChevronRight className=\"size-icon-md\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<span aria-hidden className=\"mt-0.5 size-icon\" />\n\t\t\t\t)}\n\t\t\t\t<Icon\n\t\t\t\t\tclassName={cn('mt-[3px] size-icon-md shrink-0', visual.cls, visual.spin && 'animate-spin')}\n\t\t\t\t/>\n\t\t\t\t<div className=\"min-w-0 flex-1\">\n\t\t\t\t\t<div className=\"flex items-center gap-space-md\">\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tweight={status === 'running' ? 'semibold' : 'medium'}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t'flex-1 truncate',\n\t\t\t\t\t\t\t\tstatus === 'queued' && 'text-muted-foreground',\n\t\t\t\t\t\t\t\tstatus === 'cancelled' && 'line-through text-muted-foreground',\n\t\t\t\t\t\t\t\tstatus === 'skipped' && 'text-muted-foreground/70',\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{item.title}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<Badge tone={STATUS_VARIANT[status]}>\n\t\t\t\t\t\t\t{strings.statusLabels[status]}\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t{!!item.rightSlot && (\n\t\t\t\t\t\t\t<span className=\"tabular-nums text-muted-foreground\">\n\t\t\t\t\t\t\t\t{item.rightSlot}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t{!!item.body && <div className=\"mt-space-md\">{item.body}</div>}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{hasChildren && open && (\n\t\t\t\t<div>\n\t\t\t\t\t{item.children!.map((child) => (\n\t\t\t\t\t\t<TaskRow\n\t\t\t\t\t\t\tkey={child.id}\n\t\t\t\t\t\t\titem={child}\n\t\t\t\t\t\t\tdepth={depth + 1}\n\t\t\t\t\t\t\tdensity={density}\n\t\t\t\t\t\t\tindent={indent}\n\t\t\t\t\t\t\tstrings={strings}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</>\n\t);\n}\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport interface AiArtifactStrings {\n\topenAria: string;\n\tcopy: string;\n\tcopied: string;\n\tcopyAria: string;\n /** Failure feedback, additive for existing string dictionaries. */\n copyError?: string;\n\tdownloadAria: string;\n\texpandAria: string;\n}\n\nexport const defaultAiArtifactStrings: AiArtifactStrings = {\n\topenAria: 'Open artifact',\n\tcopy: 'Copy',\n\tcopied: 'Copied',\n copyError: 'Could not copy. Please try again.',\n\tcopyAria: 'Copy artifact',\n\tdownloadAria: 'Download artifact',\n\texpandAria: 'Expand artifact',\n};\n\nexport interface AiArtifactAction {\n\t/** Stable identity for this entry. */\n\tid: string;\n\t/** Display label. */\n\tlabel: string;\n\t/** Leading glyph. */\n\ticon?: LucideIcon;\n\t/** Fired when an entry is activated. */\n\tonSelect?: () => void;\n}\n\nexport interface AiArtifactProps {\n\t/** Title — typically the artifact name (e.g. \"App.tsx\", \"design-spec.md\"). */\n\ttitle: ReactNode;\n\t/** Subtitle — typically the kind / language (\"React component\", \"Markdown\"). */\n\tsubtitle?: ReactNode;\n\t/** Icon override for the leading badge. */\n\ticon?: LucideIcon;\n\t/** Plain text content used by the default copy action. */\n\tcopyText?: string;\n\t/** Body content — preview, code, sandbox iframe, etc. */\n\tchildren?: ReactNode;\n\t/** Hide the body and render the artifact as a clickable preview-only chip. */\n\tcollapsed?: boolean;\n\t/** Click handler for the whole header (e.g. open in side panel). */\n\tonOpen?: () => void;\n\t/** Custom actions in the header. */\n\tactions?: ReadonlyArray<AiArtifactAction>;\n\t/** Provide a download handler — adds a download button. */\n\tonDownload?: () => void;\n\t/** Merged onto the outermost node. */\n\t/** Called when the clipboard is unavailable or the write fails. */\n onCopyError?: (error: unknown) => void;\n className?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiArtifactStrings>;\n}\n","import { useCopyFeedback } from '../use-copy-feedback';\n/**\n * AiArtifact — generic shell for a model-produced asset (code file, document,\n * design spec, sandbox preview, …). Header carries a leading icon, title /\n * subtitle, and an action toolbar (open, copy, download, custom actions).\n * Body slot accepts the preview itself: `<AiCodeBlock>`, an `<iframe>`, an\n * `<AiPackageInfo>`, etc.\n */\n\nimport {\n\tCheck,\n\tCopy,\n\tDownload,\n\tExternalLink,\n\tFileText,\n\ttype LucideIcon,\n\t} from 'lucide-react';\nimport { Button } from '../../../base/buttons';\nimport { IconBadge,\n} from '../../../base/display';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { Stack } from '../../../base/structure';\nimport { cn } from '../../../../lib/utils';\n\nimport { defaultAiArtifactStrings, type AiArtifactProps } from './types';\n\nexport function AiArtifact({\n\ttitle,\n\tsubtitle,\n\ticon,\n\tcopyText,\n\tchildren,\n\tcollapsed = false,\n\tonOpen,\n\tactions,\n\tonDownload,\n\tonCopyError,\n\tclassName,\n\tstrings: stringsProp,\n}: AiArtifactProps) {\n\tconst strings = useStrings(defaultAiArtifactStrings, stringsProp);\n\tconst Icon: LucideIcon = icon ?? FileText;\n\tconst { copied, failed, copy } = useCopyFeedback(onCopyError, copyText);\n\n\tconst handleCopy = async () => {\n\t\tif (copyText) await copy(copyText);\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('ai-artifact--component', \n\t\t\t\t'overflow-hidden rounded-radius border border-border/60 bg-card',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<div className=\"ai-artifact--header @container/ai-artifact-header border-b border-border/60 bg-muted/20 p-surface\">\n\t\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"lg\">\n\t\t\t\t<div className=\"ai-artifact--identity flex min-w-0 basis-full items-center gap-space-lg @sm/ai-artifact-header:flex-1 @sm/ai-artifact-header:basis-0\">\n\t\t\t\t<IconBadge icon={Icon} tone=\"neutral\" size=\"md\" shape=\"square\" />\n\t\t\t\t<div className=\"min-w-0 flex-1\">\n\t\t\t\t\t<Text weight=\"semibold\" className=\"break-words\">\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</Text>\n\t\t\t\t\t{!!subtitle && (\n\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"break-words\">\n\t\t\t\t\t\t\t{subtitle}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"ai-artifact--actions flex flex-wrap items-center gap-space-xs\">\n\t\t\t\t\t{actions?.map((action) => {\n\t\t\t\t\t\tconst ActionIcon = action.icon;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tkey={action.id}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\tonClick={action.onSelect}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{!!ActionIcon && <ActionIcon className=\"size-icon-md\" />}\n\t\t\t\t\t\t\t\t{action.label}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t\t{!!copyText && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\t\taria-label={strings.copyAria}\n\t\t\t\t\t\t\tonClick={handleCopy}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{copied ? (\n\t\t\t\t\t\t\t\t<Check className=\"size-icon-md text-success\" />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Copy className=\"size-icon-md\" />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)}\n\t\t\t\t\t{!!onDownload && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\t\taria-label={strings.downloadAria}\n\t\t\t\t\t\t\tonClick={onDownload}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Download className=\"size-icon-md\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)}\n\t\t\t\t\t{!!onOpen && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\t\taria-label={strings.openAria}\n\t\t\t\t\t\t\tonClick={onOpen}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ExternalLink className=\"size-icon-md\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Stack>\n\t\t\t</div>\n\t\t\t{!collapsed && !!children && <div className=\"bg-card\">{children}</div>}\n\n\t\t\t{failed && <div className=\"px-control py-row-y\"><Text role=\"alert\" size=\"xs\" type=\"error\">{strings.copyError ?? defaultAiArtifactStrings.copyError}</Text></div>}\n\t\t</div>\n\t);\n}\n\nAiArtifact.displayName = 'AiArtifact';\n"],"mappings":";;;;;;;;;;;;;;;;;AAGA,SAAgB8B,EAAgB,GAAwC,GAAiB;CACxF,IAAM,CAACC,GAAQC,KAAaC,EAAS,EAAK,GACpC,CAACC,GAAQC,KAAaF,EAAS,EAAK,GACpCG,IAAUC,EAAO,EAAK,GACtBC,IAAUD,EAAO,CAAC,GAClBE,IAAQF,EAAkD,KAAA,CAAS;CAoCzE,OAlCAG,SACC,EAAQ,UAAU,IAClBR,EAAU,EAAK,GACfG,EAAU,EAAK,SACF;EAGZ,AAFA,EAAQ,UAAU,IAClB,EAAQ,WAAW,GACnB,aAAaI,EAAM,OAAO;CAC3B,IACE,CAACE,CAAM,CAAC,GAyBJ;EAAE;EAAQ;EAAQ,aAvBL,MAAiB;GACpC,IAAMC,IAAU,EAAEJ,EAAQ;GAG1B,AAFA,aAAaC,EAAM,OAAO,GAC1BP,EAAU,EAAK,GACfG,EAAU,EAAK;GACf,IAAI;IACH,IAAI,OAAO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KAAM,MAAK;KAAQ,MAAK;KAAK,MAAK;KAAS,UAAAwC,EAAQ,aAAa+J,EAAyB;IAAgB,CAAA;GAAM,CAAA;EAC3J;;AAEP;AAEA,EAAW,cAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-shell-BH_bGcE2.js","names":["HEADER_THEME_CLASS","_Fragment","_Fragment","_Fragment","useThemeScopeHost","ThemeScopeHostProvider","cn","Stack","PageViewport","HEADER_THEME_CLASS$1","TopbarSidebarLayout","Content","props","headerStyle","headerHeight","sidebarWidth","style","resolvedSidebarTrigger","slots","sidebarTrigger","headerScope","resolvedLogo","logo","resolvedHeaderActions","headerActions","resolvedSidebar","sidebar","resolvedContent","children","hasSidebar","contentNode","contentClassName","sidebarNode","mobileSidebarMode","sidebarClassName","className","headerTheme","sidebarSide","headerClassName","headerInnerClassName","Fragment","bodyClassName","SidebarInsetLayout","shellStyle","resolvedTrigger","isInset","surface","toolbarNode","toolbar","toolbarClassName","mainNode","HEADER_THEME_CLASS","StackedLayout","resolvedNav","nav","contentWidth","event","viewport","action","insets","left","right","subheaderClassName","Container","AppLayout","presentation","_variant","shell","variant"],"sources":["../src/components/layout/app-shell/topbar-sidebar-layout.tsx","../src/components/layout/app-shell/sidebar-inset-layout.tsx","../src/components/layout/app-shell/stacked-layout.tsx","../src/components/layout/app-shell/app-layout.tsx"],"sourcesContent":["/**\n * TopbarSidebarLayout — header-first app shell with a two-column body.\n *\n * This shell is intentionally separate from the default shadcn sidebar layout:\n * the logo belongs in the header, while the sidebar and content occupy the\n * remaining page height below the header.\n */\nimport { cn } from '../../../lib/utils';\nimport { ThemeScopeHostProvider, useThemeScopeHost } from '../../../lib/theme-scope';\n\nimport { Stack } from '../../base/structure';\nimport { PageViewport } from '../containers';\n\nimport type {\n\tTopbarSidebarLayoutProps,\n\tTopbarSidebarLayoutStyle,\n} from './app-shell.types';\n\n/**\n * Header theme is just a token scope. `.light` / `.dark` remap the shadcn\n * palette for the header subtree (see css/themes/shadcn.default.css), so header\n * partials use ordinary tokens (`bg-background`, `text-foreground`, `bg-accent`\n * …) and invert against the header surface automatically — no header-specific\n * color variables required. `light` keeps the header light even on a dark page;\n * `dark` gives a dark topbar on a light page.\n */\nconst HEADER_THEME_CLASS: Record<NonNullable<TopbarSidebarLayoutProps['headerTheme']>, string> = {\n\tlight: 'light',\n\tdark: 'dark',\n};\n\nexport function TopbarSidebarLayout({\n\tchildren,\n\theaderTheme = 'light',\n\tsidebarSide = 'left',\n\tmobileSidebarMode = 'drawer',\n\theaderHeight,\n\tsidebarWidth,\n\tsidebarTrigger,\n\tlogo,\n\theaderActions,\n\tsidebar,\n\tslots,\n\tcontentAs: Content = 'main',\n\tclassName,\n\theaderClassName,\n\theaderInnerClassName,\n\tbodyClassName,\n\tsidebarClassName,\n\tcontentClassName,\n\tstyle,\n\t...props\n}: TopbarSidebarLayoutProps) {\n\tconst headerStyle = {\n\t\t...(headerHeight ? { '--shell-header-height': headerHeight } : null),\n\t\t...(sidebarWidth ? { '--shell-sidebar-width': sidebarWidth } : null),\n\t\t...style,\n\t} as TopbarSidebarLayoutStyle;\n\tconst resolvedSidebarTrigger = slots?.sidebarTrigger ?? sidebarTrigger;\n\tconst headerScope = useThemeScopeHost<HTMLElement>();\n\tconst resolvedLogo = slots?.logo ?? logo;\n\tconst resolvedHeaderActions = slots?.headerActions ?? headerActions;\n\tconst resolvedSidebar = slots?.sidebar ?? sidebar;\n\tconst resolvedContent = slots?.content ?? children;\n\tconst hasSidebar = Boolean(resolvedSidebar);\n\tconst contentNode = (\n\t\t<PageViewport\n\t\t\trender={<Content />}\n\t\t\tclassName={cn(\n\t\t\t\t'topbar-sidebar-layout--content bg-sidebar-accent',\n\t\t\t\tcontentClassName,\n\t\t\t)}\n\t\t>\n\t\t\t{resolvedContent}\n\t\t</PageViewport>\n\t);\n\tconst sidebarNode = hasSidebar ? (\n\t\t<aside\n\t\t\tclassName={cn(\n\t\t\t\t'topbar-sidebar-layout--sidebar min-h-0 min-w-0 overflow-hidden bg-sidebar text-sidebar-foreground',\n\t\t\t\tmobileSidebarMode === 'drawer' ? 'hidden md:block group-data-[mobile=true]/sidebar-wrapper:hidden' : null,\n\t\t\t\tsidebarClassName,\n\t\t\t)}\n\t\t>\n\t\t\t{resolvedSidebar}\n\t\t</aside>\n\t) : null;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'topbar-sidebar-layout--component @container/app-shell isolate flex min-h-svh flex-col overflow-hidden bg-background text-foreground',\n\t\t\t\t'shell-sidebar-vars',\n\t\t\t\t'has-[[data-slot=sidebar][data-collapsible=icon]]:shell-sidebar-icon-current',\n\t\t\t\t'has-[[data-slot=sidebar][data-collapsible=offcanvas]]:shell-sidebar-offcanvas-current',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={headerStyle}\n\t\t\tdata-header-theme={headerTheme}\n\t\t\tdata-sidebar-side={sidebarSide}\n\t\t\tdata-mobile-sidebar-mode={mobileSidebarMode}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ThemeScopeHostProvider value={headerScope.context}>\n\t\t\t<header\n\t\t\t\tref={headerScope.attachHost}\n\t\t\t\tdata-theme-scope=\"\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'topbar-sidebar-layout--header z-40 flex min-h-shell-header shrink-0 items-center border-b border-border bg-background px-surface py-space-sm text-foreground',\n\t\t\t\t\tHEADER_THEME_CLASS[headerTheme],\n\t\t\t\t\theaderClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"lg\" wrap\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'topbar-sidebar-layout--header-inner min-h-action w-full min-w-0 @3xl/app-shell:gap-space-2xl',\n\t\t\t\t\t\theaderInnerClassName,\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{slots?.header ?? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{!!resolvedSidebarTrigger && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--sidebar-trigger flex shrink-0 items-center\">\n\t\t\t\t\t\t\t\t\t{resolvedSidebarTrigger}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!resolvedLogo && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--logo flex min-w-0 shrink-0 items-center\">\n\t\t\t\t\t\t\t\t\t{resolvedLogo}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!slots?.headerStart && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-start flex min-w-0 items-center\">\n\t\t\t\t\t\t\t\t\t{slots.headerStart}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!slots?.headerCenter && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-center hidden min-w-0 flex-1 items-center @3xl/app-shell:flex\">\n\t\t\t\t\t\t\t\t\t{slots.headerCenter}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!(resolvedHeaderActions || slots?.headerEnd) && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-trailing ms-auto flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm @3xl/app-shell:gap-space-md [&>*]:max-w-full\">\n\t\t\t\t\t\t\t\t\t{!!resolvedHeaderActions && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-actions flex min-w-0 max-w-full flex-wrap items-center gap-space-sm @3xl/app-shell:gap-space-md [&>*]:max-w-full\">\n\t\t\t\t\t\t\t\t\t\t\t{resolvedHeaderActions}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{!!slots?.headerEnd && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-end flex min-w-0 max-w-full flex-wrap items-center gap-space-sm @3xl/app-shell:gap-space-md [&>*]:max-w-full\">\n\t\t\t\t\t\t\t\t\t\t\t{slots.headerEnd}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t</header>\n\t\t\t</ThemeScopeHostProvider>\n\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'topbar-sidebar-layout--body grid min-h-0 flex-1 grid-cols-1',\n\t\t\t\t\t\thasSidebar && mobileSidebarMode === 'drawer' && 'group-data-[mobile=true]/sidebar-wrapper:grid-cols-1',\n\t\t\t\t\thasSidebar && (\n\t\t\t\t\t\tsidebarSide === 'left'\n\t\t\t\t\t\t\t? 'md:shell-grid-left'\n\t\t\t\t\t\t\t: 'md:shell-grid-right'\n\t\t\t\t\t),\n\t\t\t\t\tbodyClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{sidebarSide === 'left' ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{sidebarNode}\n\t\t\t\t\t\t{contentNode}\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{contentNode}\n\t\t\t\t\t\t{sidebarNode}\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * SidebarInsetLayout — sidebar-first app shell with no global header.\n *\n * The counterpart to `TopbarSidebarLayout`. There the header spans the page and\n * owns the logo, with the sidebar below it; here the sidebar owns the full page\n * height and the logo sits inside it, so the content column carries only a slim\n * toolbar of its own. This is the shape shadcn's dashboard uses, and it is the\n * one to reach for when navigation should read as the primary frame.\n *\n * `toolbar={false}` removes even that row, for a shell with no header chrome.\n */\nimport { cn } from '../../../lib/utils';\n\nimport { Stack } from '../../base/structure';\nimport { PageViewport } from '../containers';\n\nimport type {\n\tSidebarInsetLayoutProps,\n\tTopbarSidebarLayoutStyle,\n} from './app-shell.types';\n\nexport function SidebarInsetLayout({\n\tchildren,\n\tsidebarSide = 'left',\n\tsurface = 'inset',\n\ttoolbar = true,\n\tsidebarWidth,\n\tsidebar,\n\tsidebarTrigger,\n\tslots,\n\tcontentAs: Content = 'main',\n\tclassName,\n\tsidebarClassName,\n\ttoolbarClassName,\n\tcontentClassName,\n\tstyle,\n\t...props\n}: SidebarInsetLayoutProps) {\n\tconst shellStyle = {\n\t\t...(sidebarWidth ? { '--shell-sidebar-width': sidebarWidth } : null),\n\t\t...style,\n\t} as TopbarSidebarLayoutStyle;\n\n\tconst resolvedSidebar = slots?.sidebar ?? sidebar;\n\tconst resolvedTrigger = slots?.sidebarTrigger ?? sidebarTrigger;\n\tconst resolvedContent = slots?.content ?? children;\n\tconst hasSidebar = Boolean(resolvedSidebar);\n\tconst isInset = surface === 'inset';\n\n\tconst sidebarNode = hasSidebar ? (\n\t\t<aside\n\t\t\tclassName={cn(\n\t\t\t\t'sidebar-inset-layout--sidebar min-h-0 min-w-0 shrink-0 overflow-hidden bg-sidebar text-sidebar-foreground',\n\t\t\t\t// Below `md` the column is hidden so `SidebarTrigger` can open the\n\t\t\t\t// sheet instead, matching `TopbarSidebarLayout`'s drawer behaviour.\n\t\t\t\t'hidden md:block group-data-[mobile=true]/sidebar-wrapper:hidden',\n\t\t\t\tsidebarClassName,\n\t\t\t)}\n\t\t>\n\t\t\t{resolvedSidebar}\n\t\t</aside>\n\t) : null;\n\n\tconst toolbarNode = toolbar ? (\n\t\t<header\n\t\t\tclassName={cn(\n\t\t\t\t'sidebar-inset-layout--toolbar @container/toolbar flex min-h-shell-header shrink-0 items-center gap-space-md px-surface py-space-sm',\n\t\t\t\t// The toolbar and scrolling body share one surface boundary.\n\t\t\t\t'border-b border-border',\n\t\t\t\ttoolbarClassName,\n\t\t\t)}\n\t\t>\n\t\t\t{slots?.toolbar ?? (\n\t\t\t\t<Stack\n\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tgap=\"md\" wrap\n\t\t\t\t\tclassName=\"sidebar-inset-layout--toolbar-inner min-h-action w-full min-w-0\"\n\t\t\t\t>\n\t\t\t\t\t{!!resolvedTrigger && (\n\t\t\t\t\t\t<div className=\"sidebar-inset-layout--sidebar-trigger flex shrink-0 items-center\">\n\t\t\t\t\t\t\t{resolvedTrigger}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{!!slots?.toolbarStart && (\n\t\t\t\t\t\t<div className=\"sidebar-inset-layout--toolbar-start flex min-w-0 flex-1 basis-32 items-center [&>*]:min-w-0 [&>*]:max-w-full\">\n\t\t\t\t\t\t\t{slots.toolbarStart}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{!!slots?.toolbarEnd && (\n\t\t\t\t\t\t<div className=\"sidebar-inset-layout--toolbar-end ms-auto flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm [&>*]:max-w-full\">\n\t\t\t\t\t\t\t{slots.toolbarEnd}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t)}\n\t\t</header>\n\t) : null;\n\n\tconst mainNode = (\n\t\t<div className={cn('sidebar-inset-layout--main flex min-h-0 min-w-0 flex-1 flex-col bg-card text-card-foreground', isInset && 'md:m-space-md md:overflow-hidden md:rounded-radius md:border md:border-border md:shadow-sm')}>\n\t\t\t{toolbarNode}\n\t\t\t<PageViewport\n\t\t\t\trender={<Content />}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'sidebar-inset-layout--content',\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{resolvedContent}\n\t\t\t</PageViewport>\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t// Grid, not flex: the sidebar column's width lives in\n\t\t\t\t// `--shell-sidebar-width-current`, which `shell-grid-left/right`\n\t\t\t\t// consume and the `has-[…]` variants below rewrite for the icon and\n\t\t\t\t// offcanvas collapse modes. A flex column has no intrinsic width here\n\t\t\t\t// — the shadcn sidebar inside it is positioned — so it collapses to 0.\n\t\t\t\t'sidebar-inset-layout--component isolate grid min-h-svh grid-cols-1 overflow-hidden text-foreground',\n\t\t\t\thasSidebar && (sidebarSide === 'left' ? 'md:shell-grid-left' : 'md:shell-grid-right'),\n\t\t\t\tisInset ? 'bg-sidebar' : 'bg-background',\n\t\t\t\t'shell-sidebar-vars group-data-[mobile=true]/sidebar-wrapper:grid-cols-1',\n\t\t\t\t'has-[[data-slot=sidebar][data-collapsible=icon]]:shell-sidebar-icon-current',\n\t\t\t\t'has-[[data-slot=sidebar][data-collapsible=offcanvas]]:shell-sidebar-offcanvas-current',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={shellStyle}\n\t\t\tdata-sidebar-side={sidebarSide}\n\t\t\tdata-surface={surface}\n\t\t\t{...props}\n\t\t>\n\t\t\t{sidebarSide === 'left' ? (\n\t\t\t\t<>\n\t\t\t\t\t{sidebarNode}\n\t\t\t\t\t{mainNode}\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t{mainNode}\n\t\t\t\t\t{sidebarNode}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","/**\n * StackedLayout — header-only app shell with horizontal navigation.\n *\n * The third shape alongside `TopbarSidebarLayout` (header over sidebar) and\n * `SidebarInsetLayout` (sidebar owns the page). Here there is no sidebar at all:\n * primary navigation runs across the header and the page stacks beneath it.\n *\n * Reach for this when the navigation is shallow enough to fit a row — settings,\n * marketing consoles, single-resource tools — where a sidebar would be mostly\n * empty. `contentWidth=\"contained\"` holds the page to a reading measure;\n * `\"full\"` lets dashboards span. Header flow follows the shell width: below\n * 48rem navigation owns a full row; wider shells place it beside the logo.\n */\nimport { cn } from '../../../lib/utils';\nimport { ThemeScopeHostProvider, useThemeScopeHost } from '../../../lib/theme-scope';\n\nimport { Stack } from '../../base/structure';\nimport { Container, PageViewport } from '../containers';\n\nimport type {\n\tStackedLayoutProps,\n\tTopbarSidebarLayoutStyle,\n} from './app-shell.types';\n\n/** Same token-scope trick as `TopbarSidebarLayout` — see its note. */\nconst HEADER_THEME_CLASS: Record<NonNullable<StackedLayoutProps['headerTheme']>, string> = {\n\tlight: 'light',\n\tdark: 'dark',\n};\n\nexport function StackedLayout({\n\tchildren,\n\theaderTheme = 'light',\n\tcontentWidth = 'contained',\n\theaderHeight,\n\tlogo,\n\tnav,\n\tslots,\n\tcontentAs: Content = 'main',\n\tclassName,\n\theaderClassName,\n\tsubheaderClassName,\n\tcontentClassName,\n\tstyle,\n\t...props\n}: StackedLayoutProps) {\n\tconst shellStyle = {\n\t\t...(headerHeight ? { '--shell-header-height': headerHeight } : null),\n\t\t...style,\n\t} as TopbarSidebarLayoutStyle;\n\n\tconst headerScope = useThemeScopeHost<HTMLElement>();\n\tconst resolvedLogo = slots?.logo ?? logo;\n\tconst resolvedNav = slots?.nav ?? nav;\n\tconst resolvedContent = slots?.content ?? children;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'stacked-layout--component @container/stacked-shell isolate flex min-h-svh flex-col bg-background text-foreground',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={shellStyle}\n\t\t\tdata-header-theme={headerTheme}\n\t\t\tdata-content-width={contentWidth}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ThemeScopeHostProvider value={headerScope.context}>\n\t\t\t<header\n\t\t\t\tref={headerScope.attachHost}\n\t\t\t\tdata-theme-scope=\"\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'stacked-layout--header z-40 flex shrink-0 items-center border-b border-border bg-background px-surface py-space-sm text-foreground @3xl/stacked-shell:min-h-shell-header @3xl/stacked-shell:py-0',\n\t\t\t\t\tHEADER_THEME_CLASS[headerTheme],\n\t\t\t\t\theaderClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<Stack\n\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tgap=\"lg\"\n\t\t\t\t\twrap\n\t\t\t\t\t// The shell width owns header adaptation, including narrow parents\n\t\t\t\t\t// on wide viewports. Children keep their identity across both flows.\n\t\t\t\t\tclassName=\"stacked-layout--header-inner min-h-action w-full min-w-0 @3xl/stacked-shell:flex-nowrap @3xl/stacked-shell:gap-space-2xl\"\n\t\t\t\t>\n\t\t\t\t\t{slots?.header ?? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{!!resolvedLogo && (\n\t\t\t\t\t\t\t\t<div className=\"stacked-layout--logo flex min-w-0 shrink-0 items-center @3xl/stacked-shell:order-1\">\n\t\t\t\t\t\t\t\t\t{resolvedLogo}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!resolvedNav && (\n\t\t\t\t\t\t\t\t// This shell has no sidebar, so hiding the nav in narrow shells left\n\t\t\t\t\t\t\t\t// the app with no navigation at all — logo and account menu\n\t\t\t\t\t\t\t\t// only. Instead it drops to its own full-width row and scrolls\n\t\t\t\t\t\t\t\t// horizontally, and returns inline when its parent is wide enough.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// Rendered once, not duplicated per breakpoint: a second copy\n\t\t\t\t\t\t\t\t// would put every nav link in the accessibility tree twice.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// Keep navigation intrinsic and single-line inside its scroller.\n\t\t\t\t\t\t\t\t// The shared inset reserves room for outer focus rings on every side.\n\t\t\t\t\t\t\t\t<nav\n\t\t\t\t\t\t\t\t\tonFocusCapture={(event) => {\n\t\t\t\t\t\t\t\t\t\t// Native focus can leave a partially visible action clipped.\n\t\t\t\t\t\t\t\t\t\t// Reveal only within this horizontal owner; preserve page scroll.\n\t\t\t\t\t\t\t\t\t\tconst nav = event.currentTarget;\n\t\t\t\t\t\t\t\t\t\t// React portal focus bubbles through its logical nav ancestry.\n\t\t\t\t\t\t\t\t\t\tif (!nav.contains(event.target)) return;\n\t\t\t\t\t\t\t\t\t\tconst viewport = nav.getBoundingClientRect();\n\t\t\t\t\t\t\t\t\t\tconst action = event.target.getBoundingClientRect();\n\t\t\t\t\t\t\t\t\t\tconst insets = getComputedStyle(nav);\n\t\t\t\t\t\t\t\t\t\tconst left = viewport.left + (parseFloat(insets.paddingLeft) || 0);\n\t\t\t\t\t\t\t\t\t\tconst right = viewport.right - (parseFloat(insets.paddingRight) || 0);\n\t\t\t\t\t\t\t\t\t\tif (action.left < left) nav.scrollLeft += action.left - left;\n\t\t\t\t\t\t\t\t\t\telse if (action.right > right) nav.scrollLeft += action.right - right;\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tclassName=\"stacked-layout--nav order-last flex w-full min-w-0 flex-nowrap items-center overflow-x-auto p-space-sm @3xl/stacked-shell:order-2 @3xl/stacked-shell:w-auto @3xl/stacked-shell:flex-1 [&>*]:shrink-0 [&>*]:flex-nowrap\">\n\t\t\t\t\t\t\t\t\t{resolvedNav}\n\t\t\t\t\t\t\t\t</nav>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!slots?.headerEnd && (\n\t\t\t\t\t\t\t\t<div className=\"stacked-layout--header-end ms-auto flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm @3xl/stacked-shell:order-3 @3xl/stacked-shell:gap-space-md [&>*]:max-w-full\">\n\t\t\t\t\t\t\t\t\t{slots.headerEnd}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t</header>\n\t\t\t</ThemeScopeHostProvider>\n\n\t\t\t{!!slots?.subheader && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'stacked-layout--subheader shrink-0 border-b border-border bg-background px-surface',\n\t\t\t\t\t\tsubheaderClassName,\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{slots.subheader}\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t<PageViewport\n\t\t\t\trender={<Content />}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'stacked-layout--content bg-sidebar-accent',\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{contentWidth === 'contained' ? (\n\t\t\t\t\t<Container maxWidth=\"2xl\" className=\"stacked-layout--measure\">\n\t\t\t\t\t\t{resolvedContent}\n\t\t\t\t\t</Container>\n\t\t\t\t) : (\n\t\t\t\t\tresolvedContent\n\t\t\t\t)}\n\t\t\t</PageViewport>\n\t\t</div>\n\t);\n}\n","import { cn } from '../../../lib/utils';\nimport { SidebarInsetLayout } from './sidebar-inset-layout';\nimport { StackedLayout } from './stacked-layout';\nimport { TopbarSidebarLayout } from './topbar-sidebar-layout';\nimport type { SidebarInsetLayoutProps, StackedLayoutProps, TopbarSidebarLayoutProps } from './app-shell.types';\n\n/** Presets select chrome; each underlying shell retains its own typed slots and behavior. */\nexport type AppLayoutProps =\n | (Omit<TopbarSidebarLayoutProps, 'headerTheme'> & {variant?: 'light-header' | 'dark-header'})\n | (Omit<SidebarInsetLayoutProps, 'surface'> & {variant: 'sidebar' | 'inset'})\n | (StackedLayoutProps & {variant: 'stacked'});\n\nexport type AppLayoutVariant = NonNullable<AppLayoutProps['variant']>;\n\n/** Five ready compositions using three shell owners, with one page viewport. */\nexport function AppLayout(props: AppLayoutProps) {\n const presentation = {'data-app-layout': props.variant ?? 'light-header', className: cn('app-layout--component', props.className)};\n switch (props.variant) {\n case 'stacked': {\n const {variant: _variant, ...shell} = props;\n return <StackedLayout {...shell} {...presentation} />;\n }\n case 'sidebar':\n case 'inset': {\n const {variant, ...shell} = props;\n return <SidebarInsetLayout {...shell} {...presentation} surface={variant === 'sidebar' ? 'flush' : 'inset'} />;\n }\n default: {\n const {variant = 'light-header', ...shell} = props;\n return <TopbarSidebarLayout {...shell} {...presentation} headerTheme={variant === 'dark-header' ? 'dark' : 'light'} />;\n }\n }\n}\n"],"mappings":";;;;;;;AA0BA,IAAMA,IAA2F;CAChG,OAAO;CACP,MAAM;AACP;AAEA,SAAgBU,EAAoB,EACnC,aACA,iBAAc,SACd,iBAAc,QACd,uBAAoB,UACpB,iBACA,iBACA,mBACA,SACA,kBACA,YACA,UACA,WAAWC,IAAU,QACrB,cACA,oBACA,yBACA,kBACA,qBACA,qBACA,UACA,GAAGC,KACyB;CAC5B,IAAMC,IAAc;EACnB,GAAIC,IAAe,EAAE,yBAAyBA,EAAa,IAAI;EAC/D,GAAIC,IAAe,EAAE,yBAAyBA,EAAa,IAAI;EAC/D,GAAGC;CACJ,GACMC,IAAyBC,GAAO,kBAAkBC,GAClDC,IAAchB,EAA+B,GAC7CiB,IAAeH,GAAO,QAAQI,GAC9BC,IAAwBL,GAAO,iBAAiBM,GAChDC,IAAkBP,GAAO,WAAWQ,GACpCC,IAAkBT,GAAO,WAAWU,GACpCC,IAAa,EAAQJ,GACrBK,IACL,kBAACtB,GAAD;EACC,QAAQ,kBAACG,GAAD,CAAU,CAAA;EAClB,WAAWL,EACV,oDACAyB,CACD;EAEC,UAAAJ;CACY,CAAA,GAETK,IAAcH,IACnB,kBAAC,SAAD;EACC,WAAWvB,EACV,qGACA2B,MAAsB,WAAW,oEAAoE,MACrGC,CACD;EAEC,UAAAT;CACK,CAAA,IACJ;CAEJ,OACC,kBAAC,OAAD;EACC,WAAWnB,EACV,uIACA,sBACA,+EACA,yFACA6B,CACD;EACA,OAAOtB;EACP,qBAAmBuB;EACnB,qBAAmBC;EACnB,4BAA0BJ;EAC1B,GAAIrB;EAZL,UAAA,CAcC,kBAACP,GAAD;GAAwB,OAAOe,EAAY;GAC3C,UAAA,kBAAC,UAAD;IACC,KAAKA,EAAY;IACj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