@photon-ai/pho-ui 4.18.4 → 4.18.6

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 (369) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/{IconAlertCircleFilled-VxKU8TYK.js → IconAlertCircleFilled-D6mUlVaE.js} +2 -2
  3. package/dist/chunks/IconAlertCircleFilled-D6mUlVaE.js.map +1 -0
  4. package/dist/chunks/{IconArrowUpRight-DGgKzQwV.js → IconArrowUpRight-OK8Fp0KQ.js} +2 -2
  5. package/dist/chunks/IconArrowUpRight-OK8Fp0KQ.js.map +1 -0
  6. package/dist/chunks/{IconCheck-D2WuculQ.js → IconCheck-DwSMn1wK.js} +2 -2
  7. package/dist/chunks/IconCheck-DwSMn1wK.js.map +1 -0
  8. package/dist/chunks/{IconChevronDown-CZilB71T.js → IconChevronDown-Cd68NnX2.js} +2 -2
  9. package/dist/chunks/IconChevronDown-Cd68NnX2.js.map +1 -0
  10. package/dist/chunks/{IconChevronLeft-CSWMKQ4C.js → IconChevronLeft-CptqhdxO.js} +2 -2
  11. package/dist/chunks/IconChevronLeft-CptqhdxO.js.map +1 -0
  12. package/dist/chunks/{IconChevronRight-CzoJnYNI.js → IconChevronRight-BNkXCTk6.js} +2 -2
  13. package/dist/chunks/IconChevronRight-BNkXCTk6.js.map +1 -0
  14. package/dist/chunks/{IconChevronUp-CrpWSgIl.js → IconChevronUp-Bxllwz8J.js} +2 -2
  15. package/dist/chunks/IconChevronUp-Bxllwz8J.js.map +1 -0
  16. package/dist/chunks/{IconInfoCircle-L0zfhg7R.js → IconInfoCircle-CTAynhe8.js} +2 -2
  17. package/dist/chunks/IconInfoCircle-CTAynhe8.js.map +1 -0
  18. package/dist/chunks/{IconSearch-BKAHkLyX.js → IconSearch-DkcWWZ1H.js} +2 -2
  19. package/dist/chunks/IconSearch-DkcWWZ1H.js.map +1 -0
  20. package/dist/chunks/{IconX-pZ9vrtSr.js → IconX-DnPlFC68.js} +2 -2
  21. package/dist/chunks/IconX-DnPlFC68.js.map +1 -0
  22. package/dist/chunks/animated-height-zr7BmFY1.js.map +1 -1
  23. package/dist/chunks/{avatar-BkmGDIqf.js → avatar-PgBOfszL.js} +4 -4
  24. package/dist/chunks/avatar-PgBOfszL.js.map +1 -0
  25. package/dist/chunks/{badge-DlLJPLeZ.js → badge-CVViIYj_.js} +2 -2
  26. package/dist/chunks/badge-CVViIYj_.js.map +1 -0
  27. package/dist/chunks/{bar-chart-CNCmuhQV.js → bar-chart-ZNuOoH7c.js} +2 -2
  28. package/dist/chunks/bar-chart-ZNuOoH7c.js.map +1 -0
  29. package/dist/chunks/{basic-page-D_Wgu2pJ.js → basic-page-BKvtEQkZ.js} +20 -20
  30. package/dist/chunks/basic-page-BKvtEQkZ.js.map +1 -0
  31. package/dist/chunks/{box-search-C9EVZgcb.js → box-search-CMl5bQ7Y.js} +5 -5
  32. package/dist/chunks/box-search-CMl5bQ7Y.js.map +1 -0
  33. package/dist/chunks/{bubble-eaoLJP4N.js → bubble-D88Edlgj.js} +2 -2
  34. package/dist/chunks/bubble-D88Edlgj.js.map +1 -0
  35. package/dist/chunks/{button-C9VqBBIr.js → button-CLfWdqm-.js} +3 -3
  36. package/dist/chunks/button-CLfWdqm-.js.map +1 -0
  37. package/dist/chunks/{calendar-4OFiCLAv.js → calendar-DDWITGo4.js} +7 -7
  38. package/dist/chunks/calendar-DDWITGo4.js.map +1 -0
  39. package/dist/chunks/{card-N-tvFsuV.js → card-zyRAihYE.js} +2 -2
  40. package/dist/chunks/{card-N-tvFsuV.js.map → card-zyRAihYE.js.map} +1 -1
  41. package/dist/chunks/{chart-B5wjhkBu.js → chart-Btnw7KXV.js} +3 -3
  42. package/dist/chunks/chart-Btnw7KXV.js.map +1 -0
  43. package/dist/chunks/{chat-Bu8UyIbT.js → chat-ZUzGmTWE.js} +11 -11
  44. package/dist/chunks/chat-ZUzGmTWE.js.map +1 -0
  45. package/dist/chunks/{checkbox-CwvoEJhd.js → checkbox-DpWLbKVS.js} +2 -2
  46. package/dist/chunks/checkbox-DpWLbKVS.js.map +1 -0
  47. package/dist/chunks/choice-card-_Ocs0iUj.js.map +1 -1
  48. package/dist/chunks/chrome-Ds7WykBJ.js.map +1 -1
  49. package/dist/chunks/{close-button-GvqWbLl0.js → close-button-Ck4rY1Fp.js} +3 -3
  50. package/dist/chunks/close-button-Ck4rY1Fp.js.map +1 -0
  51. package/dist/chunks/{cn-ChIgwEl3.js → cn-CPbhpG1q.js} +162 -83
  52. package/dist/chunks/cn-CPbhpG1q.js.map +1 -0
  53. package/dist/chunks/{code-block-DekLMMtV.js → code-block-Yxg2wZGJ.js} +10 -10
  54. package/dist/chunks/code-block-Yxg2wZGJ.js.map +1 -0
  55. package/dist/chunks/{collapsible-Dv306QOT.js → collapsible-C2tn_b1Q.js} +2 -2
  56. package/dist/chunks/collapsible-C2tn_b1Q.js.map +1 -0
  57. package/dist/chunks/{combobox-BJusx5b2.js → combobox-OQOi5hlB.js} +2 -2
  58. package/dist/chunks/combobox-OQOi5hlB.js.map +1 -0
  59. package/dist/chunks/{copy-button-BmGshaq9.js → copy-button-BLvirhXk.js} +4 -4
  60. package/dist/chunks/copy-button-BLvirhXk.js.map +1 -0
  61. package/dist/chunks/{createReactComponent-BqCmnqfX.js → createReactComponent-yKZn9MIX.js} +6 -6
  62. package/dist/chunks/createReactComponent-yKZn9MIX.js.map +1 -0
  63. package/dist/chunks/{data-table-T4QKnrxQ.js → data-table-CAz_8HQw.js} +8 -8
  64. package/dist/chunks/data-table-CAz_8HQw.js.map +1 -0
  65. package/dist/chunks/{date-picker-CZbcNIe-.js → date-picker-vJQrTol9.js} +5 -5
  66. package/dist/chunks/date-picker-vJQrTol9.js.map +1 -0
  67. package/dist/chunks/{description-list-BRRQ0oF6.js → description-list-Duhhralt.js} +3 -3
  68. package/dist/chunks/description-list-Duhhralt.js.map +1 -0
  69. package/dist/chunks/{dialog-12foDiQb.js → dialog-DORIrfyJ.js} +102 -101
  70. package/dist/chunks/dialog-DORIrfyJ.js.map +1 -0
  71. package/dist/chunks/{error-D5SzZ0ev.js → error-yAVi4cBu.js} +8 -8
  72. package/dist/chunks/error-yAVi4cBu.js.map +1 -0
  73. package/dist/chunks/{filter-bar-upeYW4dQ.js → filter-bar-qqCZf1x4.js} +9 -9
  74. package/dist/chunks/filter-bar-qqCZf1x4.js.map +1 -0
  75. package/dist/chunks/{form-AiHbbw4m.js → form-CXT6ayt0.js} +2 -2
  76. package/dist/chunks/{form-AiHbbw4m.js.map → form-CXT6ayt0.js.map} +1 -1
  77. package/dist/chunks/{ghost-search-8PzP73zS.js → ghost-search-CMUI2UH0.js} +4 -4
  78. package/dist/chunks/ghost-search-CMUI2UH0.js.map +1 -0
  79. package/dist/chunks/{input-fFWvPJOf.js → input-DWnb33UF.js} +4 -4
  80. package/dist/chunks/input-DWnb33UF.js.map +1 -0
  81. package/dist/chunks/{input-group-fc9_jD4d.js → input-group-C3upo2OU.js} +39 -37
  82. package/dist/chunks/input-group-C3upo2OU.js.map +1 -0
  83. package/dist/chunks/is-react-component-DSnjtBmo.js.map +1 -1
  84. package/dist/chunks/{kbd-DNI10uy7.js → kbd-DWDs_6U1.js} +2 -2
  85. package/dist/chunks/kbd-DWDs_6U1.js.map +1 -0
  86. package/dist/chunks/{line-chart-BODTNBrX.js → line-chart-pOwE2_Oz.js} +2 -2
  87. package/dist/chunks/line-chart-pOwE2_Oz.js.map +1 -0
  88. package/dist/chunks/link-provider-DXzDQ08N.js.map +1 -1
  89. package/dist/chunks/{log-list-tNuCFGlP.js → log-list-QbSYHZu3.js} +8 -8
  90. package/dist/chunks/log-list-QbSYHZu3.js.map +1 -0
  91. package/dist/chunks/{menu-CoMrYnd1.js → menu-CC3fhf83.js} +3 -3
  92. package/dist/chunks/menu-CC3fhf83.js.map +1 -0
  93. package/dist/chunks/{message-Dz2-numf.js → message-DRAWQlW-.js} +2 -2
  94. package/dist/chunks/message-DRAWQlW-.js.map +1 -0
  95. package/dist/chunks/{popover-BhBJO346.js → popover-B0NBrYV5.js} +2 -2
  96. package/dist/chunks/popover-B0NBrYV5.js.map +1 -0
  97. package/dist/chunks/popup-anchor-C3_iXdbh.js.map +1 -1
  98. package/dist/chunks/resolve-variant-CcD8iG5l.js.map +1 -1
  99. package/dist/chunks/{scroll-area-DSwD9th7.js → scroll-area-Dhl5hqay.js} +2 -2
  100. package/dist/chunks/scroll-area-Dhl5hqay.js.map +1 -0
  101. package/dist/chunks/{select-DU_0zVbn.js → select-xhSvDNbw.js} +3 -3
  102. package/dist/chunks/select-xhSvDNbw.js.map +1 -0
  103. package/dist/chunks/{sidebar-BP39w1iA.js → sidebar-CgaSEWVr.js} +11 -11
  104. package/dist/chunks/sidebar-CgaSEWVr.js.map +1 -0
  105. package/dist/chunks/{skeleton-DwjSl4vC.js → skeleton-CqZlGphn.js} +2 -2
  106. package/dist/chunks/skeleton-CqZlGphn.js.map +1 -0
  107. package/dist/chunks/{spinner-BzLUo4Xk.js → spinner-BSutFL4l.js} +2 -2
  108. package/dist/chunks/spinner-BSutFL4l.js.map +1 -0
  109. package/dist/chunks/{stat-hnNqjWVG.js → stat-BXBfMQ9Q.js} +4 -4
  110. package/dist/chunks/stat-BXBfMQ9Q.js.map +1 -0
  111. package/dist/chunks/{status-view-C8tabjDu.js → status-view-I_Y6eEyX.js} +2 -2
  112. package/dist/chunks/status-view-I_Y6eEyX.js.map +1 -0
  113. package/dist/chunks/{toast-BACxYsv6.js → toast-DrLKzrDJ.js} +7 -7
  114. package/dist/chunks/toast-DrLKzrDJ.js.map +1 -0
  115. package/dist/chunks/{toggle-o84tawXy.js → toggle-Ca4SS3YD.js} +2 -2
  116. package/dist/chunks/toggle-Ca4SS3YD.js.map +1 -0
  117. package/dist/chunks/{tooltip-BTF7GChl.js → tooltip-4J1PUJmB.js} +2 -2
  118. package/dist/chunks/tooltip-4J1PUJmB.js.map +1 -0
  119. package/dist/chunks/{trace-DyjsBY-S.js → trace-D9F0sne7.js} +11 -11
  120. package/dist/chunks/trace-D9F0sne7.js.map +1 -0
  121. package/dist/chunks/use-copy-D6JwKUll.js.map +1 -1
  122. package/dist/chunks/use-press-pulse-IbNstUT0.js.map +1 -1
  123. package/dist/components/accordion.js +1 -1
  124. package/dist/components/accordion.js.map +1 -1
  125. package/dist/components/autocomplete.js +1 -1
  126. package/dist/components/autocomplete.js.map +1 -1
  127. package/dist/components/avatar.js +1 -1
  128. package/dist/components/badge.js +1 -1
  129. package/dist/components/bar-chart.js +1 -1
  130. package/dist/components/bubble.js +1 -1
  131. package/dist/components/button.js +2 -2
  132. package/dist/components/calendar.js +1 -1
  133. package/dist/components/card.js +1 -1
  134. package/dist/components/chart.js +1 -1
  135. package/dist/components/chat.js +1 -1
  136. package/dist/components/checkbox.js +1 -1
  137. package/dist/components/code-block.js +1 -1
  138. package/dist/components/collapsible.js +1 -1
  139. package/dist/components/combobox.js +1 -1
  140. package/dist/components/command.js +4 -4
  141. package/dist/components/command.js.map +1 -1
  142. package/dist/components/context-menu.js +2 -2
  143. package/dist/components/context-menu.js.map +1 -1
  144. package/dist/components/copy-button.js +1 -1
  145. package/dist/components/data-table.js +2 -2
  146. package/dist/components/date-picker.js +1 -1
  147. package/dist/components/description-list.js +1 -1
  148. package/dist/components/dialog.js +1 -1
  149. package/dist/components/drawer.js +1 -1
  150. package/dist/components/drawer.js.map +1 -1
  151. package/dist/components/error.js +1 -1
  152. package/dist/components/field.js +1 -1
  153. package/dist/components/field.js.map +1 -1
  154. package/dist/components/fieldset.js +1 -1
  155. package/dist/components/fieldset.js.map +1 -1
  156. package/dist/components/filter-bar.js +1 -1
  157. package/dist/components/form.js +1 -1
  158. package/dist/components/input-group.js +1 -1
  159. package/dist/components/input.js +1 -1
  160. package/dist/components/kbd.js +1 -1
  161. package/dist/components/line-chart.js +1 -1
  162. package/dist/components/log-list.js +1 -1
  163. package/dist/components/menu.js +1 -1
  164. package/dist/components/menubar.js +1 -1
  165. package/dist/components/menubar.js.map +1 -1
  166. package/dist/components/message.js +1 -1
  167. package/dist/components/meter.js +1 -1
  168. package/dist/components/meter.js.map +1 -1
  169. package/dist/components/navigation-menu.js +1 -1
  170. package/dist/components/navigation-menu.js.map +1 -1
  171. package/dist/components/notification.js +4 -4
  172. package/dist/components/notification.js.map +1 -1
  173. package/dist/components/number-field.js +1 -1
  174. package/dist/components/number-field.js.map +1 -1
  175. package/dist/components/otp-field.js +1 -1
  176. package/dist/components/otp-field.js.map +1 -1
  177. package/dist/components/phone-input.js +35 -45
  178. package/dist/components/phone-input.js.map +1 -1
  179. package/dist/components/popover.js +1 -1
  180. package/dist/components/preview-card.js +1 -1
  181. package/dist/components/preview-card.js.map +1 -1
  182. package/dist/components/progress.js +1 -1
  183. package/dist/components/progress.js.map +1 -1
  184. package/dist/components/radio-group.js +1 -1
  185. package/dist/components/radio-group.js.map +1 -1
  186. package/dist/components/scope.js +10 -10
  187. package/dist/components/scope.js.map +1 -1
  188. package/dist/components/scroll-area.js +1 -1
  189. package/dist/components/select.js +1 -1
  190. package/dist/components/separator.js +1 -1
  191. package/dist/components/separator.js.map +1 -1
  192. package/dist/components/skeleton.js +1 -1
  193. package/dist/components/slider.js +1 -1
  194. package/dist/components/slider.js.map +1 -1
  195. package/dist/components/spinner.js +1 -1
  196. package/dist/components/stat.js +1 -1
  197. package/dist/components/status-view.js +1 -1
  198. package/dist/components/switch.js +1 -1
  199. package/dist/components/switch.js.map +1 -1
  200. package/dist/components/tabs.js +1 -1
  201. package/dist/components/tabs.js.map +1 -1
  202. package/dist/components/theme-toggle.js +2 -2
  203. package/dist/components/theme-toggle.js.map +1 -1
  204. package/dist/components/toast.js +1 -1
  205. package/dist/components/toggle-group.js +1 -1
  206. package/dist/components/toggle-group.js.map +1 -1
  207. package/dist/components/toggle.js +1 -1
  208. package/dist/components/toolbar.js +1 -1
  209. package/dist/components/toolbar.js.map +1 -1
  210. package/dist/components/tooltip.js +1 -1
  211. package/dist/components/trace.js +1 -1
  212. package/dist/icons.js.map +1 -1
  213. package/dist/index.js +27 -27
  214. package/dist/motion.js.map +1 -1
  215. package/dist/sections/basic-page.js +2 -2
  216. package/dist/sections/sidebar.js +1 -1
  217. package/dist/src/components/accordion/accordion.d.ts +5 -5
  218. package/dist/src/components/autocomplete/autocomplete.d.ts +9 -9
  219. package/dist/src/components/avatar/avatar.d.ts +3 -3
  220. package/dist/src/components/badge/badge.d.ts +1 -1
  221. package/dist/src/components/bar-chart/bar-chart.d.ts +1 -1
  222. package/dist/src/components/bubble/bubble.d.ts +3 -3
  223. package/dist/src/components/button/button.d.ts +4 -4
  224. package/dist/src/components/button/close-button.d.ts +1 -1
  225. package/dist/src/components/calendar/calendar.d.ts +1 -1
  226. package/dist/src/components/card/card.d.ts +7 -7
  227. package/dist/src/components/chart/chart.d.ts +1 -1
  228. package/dist/src/components/chart/legend.d.ts +2 -2
  229. package/dist/src/components/chart/shell.d.ts +1 -1
  230. package/dist/src/components/chart/skeleton.d.ts +1 -1
  231. package/dist/src/components/chart/tooltip.d.ts +1 -1
  232. package/dist/src/components/chat/chat.d.ts +17 -17
  233. package/dist/src/components/checkbox/check-glyph.d.ts +1 -1
  234. package/dist/src/components/checkbox/checkbox-card.d.ts +1 -1
  235. package/dist/src/components/checkbox/checkbox-group.d.ts +1 -1
  236. package/dist/src/components/checkbox/checkbox.d.ts +1 -1
  237. package/dist/src/components/code-block/code-block.d.ts +1 -1
  238. package/dist/src/components/code-block/languages.d.ts +27 -27
  239. package/dist/src/components/collapsible/collapsible.d.ts +2 -2
  240. package/dist/src/components/combobox/combobox.d.ts +15 -15
  241. package/dist/src/components/command/command.d.ts +12 -12
  242. package/dist/src/components/context-menu/context-menu.d.ts +48 -0
  243. package/dist/src/components/copy-button/copy-button.d.ts +1 -1
  244. package/dist/src/components/data-table/data-table.d.ts +1 -1
  245. package/dist/src/components/date-picker/date-picker.d.ts +1 -1
  246. package/dist/src/components/description-list/description-list.d.ts +2 -2
  247. package/dist/src/components/dialog/dialog.d.ts +13 -11
  248. package/dist/src/components/drawer/drawer.d.ts +6 -6
  249. package/dist/src/components/error/error.d.ts +2 -2
  250. package/dist/src/components/field/field.d.ts +6 -6
  251. package/dist/src/components/fieldset/fieldset.d.ts +2 -2
  252. package/dist/src/components/filter-bar/filter-bar.d.ts +1 -1
  253. package/dist/src/components/form/form.d.ts +1 -1
  254. package/dist/src/components/input/input.d.ts +1 -1
  255. package/dist/src/components/input-group/box-search.d.ts +1 -1
  256. package/dist/src/components/input-group/input-group.d.ts +6 -5
  257. package/dist/src/components/kbd/kbd.d.ts +1 -1
  258. package/dist/src/components/line-chart/line-chart.d.ts +1 -1
  259. package/dist/src/components/log-list/log-list.d.ts +7 -7
  260. package/dist/src/components/menu/menu-pending.d.ts +3 -4
  261. package/dist/src/components/menu/menu.d.ts +81 -0
  262. package/dist/src/components/menubar/menubar.d.ts +1 -1
  263. package/dist/src/components/message/message.d.ts +7 -7
  264. package/dist/src/components/meter/meter.d.ts +5 -5
  265. package/dist/src/components/navigation-menu/navigation-menu.d.ts +8 -8
  266. package/dist/src/components/notification/notification.d.ts +1 -1
  267. package/dist/src/components/number-field/number-field.d.ts +6 -6
  268. package/dist/src/components/otp-field/otp-field.d.ts +1 -1
  269. package/dist/src/components/phone-input/phone-input.d.ts +2 -2
  270. package/dist/src/components/popover/popover.d.ts +4 -4
  271. package/dist/src/components/preview-card/preview-card.d.ts +3 -3
  272. package/dist/src/components/progress/progress.d.ts +5 -5
  273. package/dist/src/components/radio-group/radio-card.d.ts +1 -1
  274. package/dist/src/components/radio-group/radio-group.d.ts +2 -2
  275. package/dist/src/components/scope/scope.d.ts +1 -1
  276. package/dist/src/components/scroll-area/scroll-area-edges.d.ts +1 -1
  277. package/dist/src/components/scroll-area/scroll-area.d.ts +5 -5
  278. package/dist/src/components/select/select.d.ts +9 -9
  279. package/dist/src/components/separator/separator.d.ts +1 -1
  280. package/dist/src/components/slider/slider.d.ts +7 -7
  281. package/dist/src/components/spinner/spinner.d.ts +1 -1
  282. package/dist/src/components/stat/stat.d.ts +2 -2
  283. package/dist/src/components/status-view/status-view.d.ts +1 -1
  284. package/dist/src/components/switch/switch.d.ts +1 -1
  285. package/dist/src/components/tabs/tabs.d.ts +4 -4
  286. package/dist/src/components/theme-toggle/theme-toggle.d.ts +1 -1
  287. package/dist/src/components/toast/toast.d.ts +7 -7
  288. package/dist/src/components/toggle/toggle.d.ts +1 -1
  289. package/dist/src/components/toggle-group/toggle-group.d.ts +1 -1
  290. package/dist/src/components/toolbar/toolbar.d.ts +6 -6
  291. package/dist/src/components/tooltip/tooltip.d.ts +3 -3
  292. package/dist/src/components/trace/span-primitive.d.ts +3 -3
  293. package/dist/src/components/trace/trace.d.ts +3 -3
  294. package/dist/src/icons/discord.d.ts +1 -1
  295. package/dist/src/icons/github.d.ts +1 -1
  296. package/dist/src/icons/google.d.ts +1 -1
  297. package/dist/src/icons/imessage.d.ts +1 -1
  298. package/dist/src/icons/photon-mark.d.ts +1 -1
  299. package/dist/src/icons/reddit.d.ts +1 -1
  300. package/dist/src/icons/slack.d.ts +1 -1
  301. package/dist/src/icons/telegram.d.ts +1 -1
  302. package/dist/src/icons/whatsapp.d.ts +1 -1
  303. package/dist/src/icons/x.d.ts +1 -1
  304. package/dist/src/icons/youtube.d.ts +1 -1
  305. package/dist/src/index.d.ts +1 -1
  306. package/dist/src/sections/basic-page/basic-page.d.ts +46 -46
  307. package/dist/src/sections/sidebar/sidebar.d.ts +11 -11
  308. package/dist/src/utils/animated-height.d.ts +1 -1
  309. package/dist/src/utils/ghost-search.d.ts +1 -1
  310. package/dist/src/utils/link-provider.d.ts +1 -1
  311. package/dist/src/utils/popup-anchor.d.ts +1 -1
  312. package/dist/utils.js +1 -1
  313. package/package.json +24 -24
  314. package/src/styles/pho.css +1 -1
  315. package/src/styles/theme.css +1 -1
  316. package/dist/chunks/IconAlertCircleFilled-VxKU8TYK.js.map +0 -1
  317. package/dist/chunks/IconArrowUpRight-DGgKzQwV.js.map +0 -1
  318. package/dist/chunks/IconCheck-D2WuculQ.js.map +0 -1
  319. package/dist/chunks/IconChevronDown-CZilB71T.js.map +0 -1
  320. package/dist/chunks/IconChevronLeft-CSWMKQ4C.js.map +0 -1
  321. package/dist/chunks/IconChevronRight-CzoJnYNI.js.map +0 -1
  322. package/dist/chunks/IconChevronUp-CrpWSgIl.js.map +0 -1
  323. package/dist/chunks/IconInfoCircle-L0zfhg7R.js.map +0 -1
  324. package/dist/chunks/IconSearch-BKAHkLyX.js.map +0 -1
  325. package/dist/chunks/IconX-pZ9vrtSr.js.map +0 -1
  326. package/dist/chunks/avatar-BkmGDIqf.js.map +0 -1
  327. package/dist/chunks/badge-DlLJPLeZ.js.map +0 -1
  328. package/dist/chunks/bar-chart-CNCmuhQV.js.map +0 -1
  329. package/dist/chunks/basic-page-D_Wgu2pJ.js.map +0 -1
  330. package/dist/chunks/box-search-C9EVZgcb.js.map +0 -1
  331. package/dist/chunks/bubble-eaoLJP4N.js.map +0 -1
  332. package/dist/chunks/button-C9VqBBIr.js.map +0 -1
  333. package/dist/chunks/calendar-4OFiCLAv.js.map +0 -1
  334. package/dist/chunks/chart-B5wjhkBu.js.map +0 -1
  335. package/dist/chunks/chat-Bu8UyIbT.js.map +0 -1
  336. package/dist/chunks/checkbox-CwvoEJhd.js.map +0 -1
  337. package/dist/chunks/close-button-GvqWbLl0.js.map +0 -1
  338. package/dist/chunks/cn-ChIgwEl3.js.map +0 -1
  339. package/dist/chunks/code-block-DekLMMtV.js.map +0 -1
  340. package/dist/chunks/collapsible-Dv306QOT.js.map +0 -1
  341. package/dist/chunks/combobox-BJusx5b2.js.map +0 -1
  342. package/dist/chunks/copy-button-BmGshaq9.js.map +0 -1
  343. package/dist/chunks/createReactComponent-BqCmnqfX.js.map +0 -1
  344. package/dist/chunks/data-table-T4QKnrxQ.js.map +0 -1
  345. package/dist/chunks/date-picker-CZbcNIe-.js.map +0 -1
  346. package/dist/chunks/description-list-BRRQ0oF6.js.map +0 -1
  347. package/dist/chunks/dialog-12foDiQb.js.map +0 -1
  348. package/dist/chunks/error-D5SzZ0ev.js.map +0 -1
  349. package/dist/chunks/filter-bar-upeYW4dQ.js.map +0 -1
  350. package/dist/chunks/ghost-search-8PzP73zS.js.map +0 -1
  351. package/dist/chunks/input-fFWvPJOf.js.map +0 -1
  352. package/dist/chunks/input-group-fc9_jD4d.js.map +0 -1
  353. package/dist/chunks/kbd-DNI10uy7.js.map +0 -1
  354. package/dist/chunks/line-chart-BODTNBrX.js.map +0 -1
  355. package/dist/chunks/log-list-tNuCFGlP.js.map +0 -1
  356. package/dist/chunks/menu-CoMrYnd1.js.map +0 -1
  357. package/dist/chunks/message-Dz2-numf.js.map +0 -1
  358. package/dist/chunks/popover-BhBJO346.js.map +0 -1
  359. package/dist/chunks/scroll-area-DSwD9th7.js.map +0 -1
  360. package/dist/chunks/select-DU_0zVbn.js.map +0 -1
  361. package/dist/chunks/sidebar-BP39w1iA.js.map +0 -1
  362. package/dist/chunks/skeleton-DwjSl4vC.js.map +0 -1
  363. package/dist/chunks/spinner-BzLUo4Xk.js.map +0 -1
  364. package/dist/chunks/stat-hnNqjWVG.js.map +0 -1
  365. package/dist/chunks/status-view-C8tabjDu.js.map +0 -1
  366. package/dist/chunks/toast-BACxYsv6.js.map +0 -1
  367. package/dist/chunks/toggle-o84tawXy.js.map +0 -1
  368. package/dist/chunks/tooltip-BTF7GChl.js.map +0 -1
  369. package/dist/chunks/trace-DyjsBY-S.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as i } from "./cn-ChIgwEl3.js";
2
+ import { t as i } from "./cn-CPbhpG1q.js";
3
3
  import "react";
4
4
  import { jsx as o } from "react/jsx-runtime";
5
5
  var s = "inline-flex h-4 min-w-4 items-center justify-center rounded-[3px] px-1 font-mono text-xs font-medium text-pho-secondary ring-1 ring-pho-secondary ring-inset select-none";
@@ -15,4 +15,4 @@ export {
15
15
  m as t
16
16
  };
17
17
 
18
- //# sourceMappingURL=kbd-DNI10uy7.js.map
18
+ //# sourceMappingURL=kbd-DWDs_6U1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kbd-DWDs_6U1.js","names":["cn","jsx","KBD_CLASS","Kbd","keys","className","children","props"],"sources":["../../src/components/kbd/kbd.tsx"],"sourcesContent":["import { type ComponentProps } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** A single keycap surface — a mono-label pill with the site hairline (ring-pho-secondary) in secondary ink. */\nconst KBD_CLASS =\n \"inline-flex h-4 min-w-4 items-center justify-center rounded-[3px] px-1 font-mono text-xs font-medium text-pho-secondary ring-1 ring-pho-secondary ring-inset select-none\";\n\ninterface KbdBaseProps {\n /** Convenience string for the key(s) to show, e.g. \"⌘K\". Ignored when `children` are provided. */\n keys?: string;\n}\n\nexport interface KbdProps\n extends KbdBaseProps, Omit<ComponentProps<\"kbd\">, keyof KbdBaseProps> {}\n\n/**\n * Kbd — a keyboard keycap for documenting a shortcut (`⌘K`, `Esc`, `↵`). Supply\n * the key via `children` or the `keys` string; for a chord, place several in a\n * row (`Press ⌘ K`). It's purely presentational and carries no interaction — to\n * actually trigger a shortcut, wire a key handler on the target control.\n */\nexport function Kbd({ keys, className, children, ...props }: KbdProps) {\n return (\n <kbd className={cn(KBD_CLASS, className)} {...props}>\n {children ?? keys}\n </kbd>\n );\n}\n\nKbd.displayName = \"Kbd\";\n"],"mappings":";;;;AAIA,IAAME,IACJ;AAgBF,SAAgBC,EAAI,EAAE,MAAAC,GAAM,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAAmB;AACrE,SACE,gBAAAN,EAAC,OAAD;AAAA,IAAK,WAAWD,EAAGE,GAAWG,CAAS;AAAA,IAAG,GAAIE;AAAA,IAC3C,UAAAD,KAAYF;AAAA,EACV,CAAA;AAET;AAEAD,EAAI,cAAc"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { r as d, t as h } from "./chart-B5wjhkBu.js";
2
+ import { r as d, t as h } from "./chart-Btnw7KXV.js";
3
3
  import { jsx as e } from "react/jsx-runtime";
4
4
  function m({ series: r, curve: t = "linear", area: l = !1, gaps: i = "break", ...o }) {
5
5
  return /* @__PURE__ */ e(h, {
@@ -20,4 +20,4 @@ export {
20
20
  m as t
21
21
  };
22
22
 
23
- //# sourceMappingURL=line-chart-BODTNBrX.js.map
23
+ //# sourceMappingURL=line-chart-pOwE2_Oz.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line-chart-pOwE2_Oz.js","names":["ChartLine","Chart","jsx","LineChart","series","curve","area","gaps","props","s","index"],"sources":["../../src/components/line-chart/line-chart.tsx"],"sourcesContent":["import { Chart, ChartLine } from \"../chart/chart\";\nimport type {\n ChartBaseProps,\n ChartCurve,\n ChartDatum,\n ChartGaps,\n} from \"../chart/types\";\n\n/**\n * LineChart — series over time as lines: latency percentiles, one line\n * per destination, a min / average / max where the bounds are dashed.\n *\n * A preset on `Chart`: the `series` array becomes one `Chart.Line` per\n * entry, in order; `curve` and `gaps` apply to every line and `area`\n * washes the surface under the first. The marks, axes, tooltip and legend are the\n * root's.\n */\nexport interface LineChartProps<\n T extends ChartDatum,\n> extends ChartBaseProps<T> {\n /** Straight segments, or a monotone curve that never overshoots a sample. @default \"linear\" */\n curve?: ChartCurve;\n /** A soft fill under the first series (a lone one, as a rule). */\n area?: boolean;\n /**\n * What every line does at a bucket with no value: break there, or\n * connect its neighbours across it — for a measure that has no reading\n * in an empty bucket rather than a reading of nothing. @default \"break\"\n */\n gaps?: ChartGaps;\n}\n\nexport function LineChart<T extends ChartDatum>({\n series,\n curve = \"linear\",\n area = false,\n gaps = \"break\",\n ...props\n}: LineChartProps<T>) {\n return (\n <Chart {...props}>\n {series.map((s, index) => (\n <ChartLine\n key={s.key}\n dataKey={s.key}\n label={s.label}\n color={s.color}\n dashed={s.dashed}\n curve={curve}\n area={area && index === 0}\n gaps={gaps}\n />\n ))}\n </Chart>\n );\n}\n\nLineChart.displayName = \"LineChart\";\n"],"mappings":";;;AAgCA,SAAgBG,EAAgC,EAC9C,QAAAC,GACA,OAAAC,IAAQ,UACR,MAAAC,IAAO,IACP,MAAAC,IAAO,SACP,GAAGC,EAAA,GACiB;AACpB,SACE,gBAAAN,EAACD,GAAD;AAAA,IAAO,GAAIO;AAAA,IACR,UAAAJ,EAAO,IAAA,CAAKK,GAAGC,MACd,gBAAAR,EAACF,GAAD;AAAA,MAEE,SAASS,EAAE;AAAA,MACX,OAAOA,EAAE;AAAA,MACT,OAAOA,EAAE;AAAA,MACT,QAAQA,EAAE;AAAA,MACH,OAAAJ;AAAA,MACP,MAAMC,KAAQI,MAAU;AAAA,MAClB,MAAAH;AAAA,IACP,GARME,EAAE,GAQR,CACF;AAAA,EACI,CAAA;AAEX;AAEAN,EAAU,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"link-provider-DXzDQ08N.js","names":[],"sources":["../../src/utils/link-provider.tsx"],"sourcesContent":["import {\n createContext,\n createElement,\n forwardRef,\n useContext,\n type AnchorHTMLAttributes,\n type ComponentType,\n type ReactNode,\n} from \"react\";\n\n/**\n * The shape a host app's link component must satisfy. Routers (TanStack Router,\n * React Router, Next.js) expose a `Link` that takes `href` + anchor props; this\n * lets Pho components render real client-side links without depending on any\n * specific router.\n */\nexport type LinkComponent = ComponentType<\n AnchorHTMLAttributes<HTMLAnchorElement> & { href: string }\n>;\n\n// Forwards its ref so wrappers (e.g. Motion) can reach the underlying anchor.\nconst DefaultLink: LinkComponent = forwardRef<\n HTMLAnchorElement,\n AnchorHTMLAttributes<HTMLAnchorElement> & { href: string }\n>((props, ref) => createElement(\"a\", { ...props, ref }));\nDefaultLink.displayName = \"DefaultLink\";\n\nconst LinkContext = createContext<LinkComponent>(DefaultLink);\n\n/** Inject the host router's link component for all Pho links beneath it. */\nexport function LinkProvider({\n component,\n children,\n}: {\n component: LinkComponent;\n children: ReactNode;\n}) {\n return (\n <LinkContext.Provider value={component}>{children}</LinkContext.Provider>\n );\n}\n\n/** Read the active link component (falls back to a plain `<a>`). */\nexport function useLinkComponent(): LinkComponent {\n return useContext(LinkContext);\n}\n"],"mappings":";;;AAqBA,IAAM,IAA6B,EAAA,CAGhC,GAAO,MAAQ,EAAc,KAAK;AAAA,EAAE,GAAG;AAAA,EAAO,KAAA;AAAI,CAAC,CAAC;AACvD,EAAY,cAAc;AAE1B,IAAM,IAAc,EAA6B,CAAW;AAG5D,SAAgB,EAAa,EAC3B,WAAA,GACA,UAAA,EAAA,GAIC;AACD,SACE,gBAAA,EAAC,EAAY,UAAb;AAAA,IAAsB,OAAO;AAAA,IAAY,UAAA;AAAA,EAA+B,CAAA;AAE5E;AAGA,SAAgB,IAAkC;AAChD,SAAO,EAAW,CAAW;AAC/B"}
1
+ {"version":3,"file":"link-provider-DXzDQ08N.js","names":["createContext","createElement","forwardRef","useContext","jsx","DefaultLink","props","ref","LinkContext","LinkProvider","component","children","useLinkComponent"],"sources":["../../src/utils/link-provider.tsx"],"sourcesContent":["import {\n createContext,\n createElement,\n forwardRef,\n useContext,\n type AnchorHTMLAttributes,\n type ComponentType,\n type ReactNode,\n} from \"react\";\n\n/**\n * The shape a host app's link component must satisfy. Routers (TanStack Router,\n * React Router, Next.js) expose a `Link` that takes `href` + anchor props; this\n * lets Pho components render real client-side links without depending on any\n * specific router.\n */\nexport type LinkComponent = ComponentType<\n AnchorHTMLAttributes<HTMLAnchorElement> & { href: string }\n>;\n\n// Forwards its ref so wrappers (e.g. Motion) can reach the underlying anchor.\nconst DefaultLink: LinkComponent = forwardRef<\n HTMLAnchorElement,\n AnchorHTMLAttributes<HTMLAnchorElement> & { href: string }\n>((props, ref) => createElement(\"a\", { ...props, ref }));\nDefaultLink.displayName = \"DefaultLink\";\n\nconst LinkContext = createContext<LinkComponent>(DefaultLink);\n\n/** Inject the host router's link component for all Pho links beneath it. */\nexport function LinkProvider({\n component,\n children,\n}: {\n component: LinkComponent;\n children: ReactNode;\n}) {\n return (\n <LinkContext.Provider value={component}>{children}</LinkContext.Provider>\n );\n}\n\n/** Read the active link component (falls back to a plain `<a>`). */\nexport function useLinkComponent(): LinkComponent {\n return useContext(LinkContext);\n}\n"],"mappings":";;;AAqBA,IAAMK,IAA6BH,EAAA,CAGhCI,GAAOC,MAAQN,EAAc,KAAK;AAAA,EAAE,GAAGK;AAAA,EAAO,KAAAC;AAAI,CAAC,CAAC;AACvDF,EAAY,cAAc;AAE1B,IAAMG,IAAcR,EAA6BK,CAAW;AAG5D,SAAgBI,EAAa,EAC3B,WAAAC,GACA,UAAAC,EAAA,GAIC;AACD,SACE,gBAAAP,EAACI,EAAY,UAAb;AAAA,IAAsB,OAAOE;AAAA,IAAY,UAAAC;AAAA,EAA+B,CAAA;AAE5E;AAGA,SAAgBC,IAAkC;AAChD,SAAOT,EAAWK,CAAW;AAC/B"}
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { t as a } from "./cn-ChIgwEl3.js";
2
+ import { t as a } from "./cn-CPbhpG1q.js";
3
3
  import { n as k } from "./link-provider-DXzDQ08N.js";
4
4
  import { n as j } from "./use-copy-D6JwKUll.js";
5
- import { n as O } from "./spinner-BzLUo4Xk.js";
6
- import { a as A } from "./button-C9VqBBIr.js";
7
- import { i as D } from "./status-view-C8tabjDu.js";
8
- import { t as g } from "./skeleton-DwjSl4vC.js";
9
- import { t as h } from "./tooltip-BTF7GChl.js";
10
- import { r as E } from "./badge-DlLJPLeZ.js";
5
+ import { n as O } from "./spinner-BSutFL4l.js";
6
+ import { a as A } from "./button-CLfWdqm-.js";
7
+ import { i as D } from "./status-view-I_Y6eEyX.js";
8
+ import { t as g } from "./skeleton-CqZlGphn.js";
9
+ import { t as h } from "./tooltip-4J1PUJmB.js";
10
+ import { r as E } from "./badge-CVViIYj_.js";
11
11
  import { useEffect as T, useId as B, useRef as N } from "react";
12
12
  import { Fragment as W, jsx as t, jsxs as v } from "react/jsx-runtime";
13
13
  import { useRender as z } from "@base-ui/react/use-render";
@@ -241,4 +241,4 @@ export {
241
241
  pe as t
242
242
  };
243
243
 
244
- //# sourceMappingURL=log-list-tNuCFGlP.js.map
244
+ //# sourceMappingURL=log-list-QbSYHZu3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-list-QbSYHZu3.js","names":["_Fragment","cn","useLinkComponent","useCopy","Spinner","Button","StatusView","Skeleton","Tooltip","Badge","useEffect","useId","useRef","Fragment$1","jsx","jsxs","useRender","LOG_LIST_SURFACE","ID_HEAD","ID_TAIL","truncateMiddle","value","head","tail","SUCCESS_WORDS","ERROR_WORDS","WARNING_WORDS","logStatusColor","status","word","logStatusLabel","Status","label","size","className","props","Method","IdCell","id","cellId","copied","copy","Row","method","code","description","duration","time","children","href","onClick","render","current","Link","base","interactive","cellIds","hasMeta","describedBy","primary","Empty","title","Loading","rows","_","index","LoadMore","onLoadMore","loading","hasMore","rootMargin","ref","latest","el","observer","entries","entry","Root","LogList"],"sources":["../../src/components/log-list/log-list.tsx"],"sourcesContent":["import {\n useEffect,\n useId,\n useRef,\n type ComponentProps,\n type MouseEvent,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { Badge, type BadgeColor, type BadgeSize } from \"../badge\";\nimport { Button } from \"../button\";\nimport { Skeleton } from \"../skeleton\";\nimport { Spinner } from \"../spinner\";\nimport { StatusView } from \"../status-view\";\nimport { Tooltip } from \"../tooltip\";\nimport { cn } from \"../../utils/cn\";\nimport { useCopy } from \"../../utils/use-copy\";\nimport { useLinkComponent } from \"../../utils/link-provider\";\n\n/**\n * Log List — rows of requests, deliveries, or messages, newest first,\n * each one line: a mono id you can copy, a status, the method, what\n * happened, and how long ago. Reach for it where a `DataTable` would be\n * columns of the same few fields: a log reads left to right as one line,\n * and the page filters it from a `FilterBar` pinned above.\n *\n * Design notes:\n * - The surface is `BasicPage.Card`'s: hairline border, `base` radius,\n * hairline rules between rows. It sits in a `Stack` as any card does.\n * - The row is one link (or one button). It stretches over the row from\n * the label, the way a `DataTable` row's does, so the whole row is one\n * pointer target and one tab stop; the copy control sits above it.\n * - The id truncates in the middle, keeping the prefix that says what it\n * is and the tail that tells it apart. The full id is a tooltip away,\n * and one click copies it.\n * - `LoadMore` is the sentinel at the end: it asks for the next page as\n * it scrolls into view, and offers a button for keyboards and for\n * browsers without an observer.\n */\n\n/** Same chrome as `BasicPage.Card`. */\nconst LOG_LIST_SURFACE =\n \"rounded-base border border-pho-secondary bg-pho-primary divide-y divide-pho-secondary\";\n\n/** Middle truncation: the prefix and this many after it, then the tail. */\nconst ID_HEAD = 12;\nconst ID_TAIL = 5;\n\n/**\n * Keep the start and the end of an id and fold the middle into an\n * ellipsis — `pho_req_01m04axjqrfzxv4xjet40a84gb` reads\n * `pho_req_01m0…a84gb`. Ids that fit are returned whole.\n */\nexport function truncateMiddle(\n value: string,\n head = ID_HEAD,\n tail = ID_TAIL,\n): string {\n if (value.length <= head + tail + 1) return value;\n return `${value.slice(0, head)}…${value.slice(-tail)}`;\n}\n\n/* -------------------------------- status -------------------------------- */\n\nconst SUCCESS_WORDS = new Set([\n \"success\",\n \"succeeded\",\n \"successful\",\n \"delivered\",\n \"ok\",\n \"sent\",\n \"received\",\n \"completed\",\n \"complete\",\n \"done\",\n \"active\",\n]);\nconst ERROR_WORDS = new Set([\n \"failed\",\n \"failure\",\n \"error\",\n \"errored\",\n \"rejected\",\n \"undelivered\",\n \"timeout\",\n \"timed_out\",\n \"timed out\",\n \"canceled\",\n \"cancelled\",\n]);\nconst WARNING_WORDS = new Set([\n \"pending\",\n \"queued\",\n \"retrying\",\n \"processing\",\n \"sending\",\n \"in_progress\",\n \"in progress\",\n \"scheduled\",\n \"waiting\",\n]);\n\n/**\n * The `Badge` color for a log status: an HTTP status code (2xx success,\n * 3xx gray, 4xx warning, 5xx error) or a word (`delivered` / `failed` /\n * `pending`). Anything else is gray.\n */\nexport function logStatusColor(status: number | string): BadgeColor {\n if (typeof status === \"number\") {\n if (status < 300) return \"success\";\n if (status < 400) return \"gray\";\n if (status < 500) return \"warning\";\n return \"error\";\n }\n const word = status.trim().toLowerCase();\n if (/^\\d{3}$/.test(word)) return logStatusColor(Number(word));\n if (SUCCESS_WORDS.has(word)) return \"success\";\n if (ERROR_WORDS.has(word)) return \"error\";\n if (WARNING_WORDS.has(word)) return \"warning\";\n return \"gray\";\n}\n\n/** A status word as a label: `timed_out` reads `Timed out`. */\nexport function logStatusLabel(status: number | string): string {\n if (typeof status === \"number\") return String(status);\n const word = status.trim().replace(/_/g, \" \");\n return word.charAt(0).toUpperCase() + word.slice(1);\n}\n\nexport interface LogStatusProps extends Omit<\n ComponentProps<\"span\">,\n \"children\" | \"color\"\n> {\n /** An HTTP status code or a status word. */\n value: number | string;\n /** Override the derived word. */\n label?: ReactNode;\n /** Badge size. @default \"sm\" */\n size?: BadgeSize;\n}\n\n/** The status slot — a low-contrast `Badge` colored by `logStatusColor`. */\nfunction Status({\n value,\n label,\n size = \"sm\",\n className,\n ...props\n}: LogStatusProps) {\n return (\n <Badge\n color={logStatusColor(value)}\n contrast=\"low\"\n size={size}\n className={cn(\"tabular-nums\", className)}\n {...props}\n >\n {label ?? logStatusLabel(value)}\n </Badge>\n );\n}\n\n/** The method slot — `POST`, `GET` as a quiet mono chip. */\nfunction Method({\n className,\n ...props\n}: ComponentProps<\"span\"> & { ref?: Ref<HTMLSpanElement> }) {\n return (\n <span\n className={cn(\n \"bg-pho-secondary text-pho-secondary inline-flex h-5 min-w-12 shrink-0 items-center justify-center rounded-sm px-1.5 font-mono text-xs font-medium whitespace-nowrap\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* ---------------------------------- id ---------------------------------- */\n\n/**\n * The id cell: a mono button that copies the full id, with a tooltip\n * holding the whole of it. The cell is a fixed width in characters so\n * ids line up down the list.\n */\nfunction IdCell({ id, cellId }: { id: string; cellId: string }) {\n const { copied, copy } = useCopy();\n return (\n <Tooltip.Root>\n <Tooltip.Trigger\n id={cellId}\n aria-label={copied ? `${id} copied` : `Copy ${id}`}\n data-copied={copied || undefined}\n onClick={() => void copy(id)}\n className={cn(\n \"text-pho-secondary outline-pho-brand hover:text-pho-primary relative z-10 -mx-1 w-[calc(18ch+0.5rem)] shrink-0 cursor-pointer truncate rounded-sm px-1 py-0.5 text-left font-mono text-xs transition-colors duration-100 ease-linear focus-visible:outline-2\",\n \"data-[copied]:text-pho-success\",\n )}\n >\n {copied ? \"Copied\" : truncateMiddle(id)}\n </Tooltip.Trigger>\n <output className=\"sr-only\" aria-live=\"polite\">\n {copied ? \"Copied\" : \"\"}\n </output>\n <Tooltip.Portal>\n <Tooltip.Positioner>\n <Tooltip.Popup className=\"font-mono\">{id}</Tooltip.Popup>\n </Tooltip.Positioner>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n}\n\n/* ---------------------------------- row --------------------------------- */\n\nexport interface LogListRowProps extends Omit<\n ComponentProps<\"div\">,\n \"children\" | \"title\" | \"onClick\" | \"id\"\n> {\n /** The record's id — mono, middle-truncated, copied on click. */\n id?: string;\n /** The status slot — usually `LogList.Status`. */\n status?: ReactNode;\n /** The method — `POST`, `GET`; rendered in `LogList.Method`. */\n method?: string;\n /** What happened — the route, the event type, the message. */\n label: ReactNode;\n /** The label in mono — for a route or an event type. */\n code?: boolean;\n /**\n * The line under the label, with real content: who received what from\n * whom, the destination that answered. A sentence, with its period.\n */\n description?: ReactNode;\n /** Trailing: how long it took — \"59 ms\". */\n duration?: ReactNode;\n /** Trailing: when — \"2 min ago\". */\n time?: ReactNode;\n /** Trailing content before the duration and time. */\n children?: ReactNode;\n /** The row is a link to its page, through the host's `LinkProvider`. */\n href?: string;\n /** The row is a button. */\n onClick?: (event: MouseEvent<HTMLElement>) => void;\n /**\n * Replace the row's link element — a router's `Link`, the way Base UI\n * components take `render`. The row's classes and handlers merge in.\n */\n render?: useRender.RenderProp;\n /** The row whose page is open beside the list — it keeps the wash. */\n current?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction Row({\n id,\n status,\n method,\n label,\n code,\n description,\n duration,\n time,\n children,\n href,\n onClick,\n render,\n current,\n className,\n ...props\n}: LogListRowProps) {\n const Link = useLinkComponent();\n const base = useId();\n const interactive = href != null || onClick != null || render != null;\n const cellIds = {\n id: `${base}-id`,\n status: `${base}-status`,\n method: `${base}-method`,\n meta: `${base}-meta`,\n };\n const hasMeta = children != null || duration != null || time != null;\n const describedBy = [\n id != null && cellIds.id,\n status != null && cellIds.status,\n method != null && cellIds.method,\n hasMeta && cellIds.meta,\n ]\n .filter(Boolean)\n .join(\" \");\n const primary = useRender({\n render: render ?? (href != null ? <Link href={href} /> : undefined),\n defaultTagName: href != null ? \"a\" : onClick != null ? \"button\" : \"span\",\n props: {\n className: cn(\n \"text-pho-primary block min-w-0 max-w-full truncate text-left text-base font-medium outline-none\",\n code && \"font-mono text-xs\",\n // The one link, stretched over the row; the ring is the row's.\n interactive &&\n \"cursor-pointer after:absolute after:inset-0 after:content-['']\",\n ),\n onClick,\n type:\n render == null && href == null && onClick != null\n ? \"button\"\n : undefined,\n \"aria-current\": current ? \"page\" : undefined,\n \"aria-describedby\": describedBy || undefined,\n \"data-log-primary\": \"\",\n children: label,\n },\n });\n return (\n <div\n data-log-row=\"\"\n data-current={current || undefined}\n className={cn(\n \"relative flex min-h-12 min-w-0 items-center gap-3 px-5 py-2.5\",\n interactive &&\n \"hover:bg-pho-primary-hover outline-pho-brand transition-colors has-[[data-log-primary]:focus-visible]:outline-2 has-[[data-log-primary]:focus-visible]:-outline-offset-2\",\n current && \"bg-pho-primary-hover\",\n // The wash follows the card's rounding (minus the 1px border).\n \"first:rounded-t-[calc(var(--radius-base)-1px)] last:rounded-b-[calc(var(--radius-base)-1px)]\",\n className,\n )}\n {...props}\n >\n {id != null ? <IdCell id={id} cellId={cellIds.id} /> : null}\n {status != null ? (\n <span id={cellIds.status} className=\"flex shrink-0 items-center\">\n {status}\n </span>\n ) : null}\n {method != null ? <Method id={cellIds.method}>{method}</Method> : null}\n <div data-log-primary-cell=\"\" className=\"min-w-0 flex-1\">\n {primary}\n {description != null ? (\n <p className=\"text-pho-description truncate text-xs\">{description}</p>\n ) : null}\n </div>\n {hasMeta ? (\n <div\n id={cellIds.meta}\n className=\"text-pho-description ml-auto flex shrink-0 items-center gap-3 text-xs whitespace-nowrap tabular-nums\"\n >\n {children}\n {duration != null ? <span>{duration}</span> : null}\n {time != null ? <span>{time}</span> : null}\n </div>\n ) : null}\n </div>\n );\n}\n\n/* -------------------------------- states -------------------------------- */\n\nexport interface LogListEmptyProps extends Omit<\n ComponentProps<\"div\">,\n \"title\" | \"children\"\n> {\n /** One short line naming the state. @default \"Nothing here yet.\" */\n title?: ReactNode;\n /** What fills it, or why it is empty. */\n description?: ReactNode;\n /** An action, when there is one. */\n children?: ReactNode;\n}\n\n/** The list with no rows — `StatusView` at card size. */\nfunction Empty({\n title = \"Nothing here yet.\",\n description,\n children,\n className,\n ...props\n}: LogListEmptyProps) {\n return (\n <div className={cn(\"flex justify-center\", className)} {...props}>\n <StatusView\n size=\"sm\"\n title={title}\n description={description}\n actions={children}\n />\n </div>\n );\n}\n\n/** Bones in the rows' place while the first page is on its way. */\nfunction Loading({ rows = 5 }: { rows?: number }) {\n return (\n <>\n {Array.from({ length: rows }, (_, index) => (\n <div\n key={index}\n aria-hidden\n className=\"flex min-h-12 items-center gap-3 px-5 py-2.5\"\n >\n <Skeleton className=\"h-3.5 w-32\" />\n <Skeleton className=\"h-5 w-12 rounded-full\" />\n <Skeleton className=\"h-3.5 w-48\" />\n <Skeleton className=\"ml-auto h-3.5 w-16\" />\n </div>\n ))}\n </>\n );\n}\n\nexport interface LogListLoadMoreProps extends Omit<\n ComponentProps<\"div\">,\n \"children\"\n> {\n /** Asked for as the sentinel scrolls into view, and on the button. */\n onLoadMore: () => void;\n /** The next page is on its way — the sentinel shows a spinner and waits. */\n loading?: boolean;\n /** Nothing left to load — renders nothing. @default true */\n hasMore?: boolean;\n /** How far ahead of the viewport to ask. @default \"200px\" */\n rootMargin?: string;\n /** The button's words. @default \"Load more\" */\n label?: ReactNode;\n}\n\n/**\n * The sentinel at the end of the list. An `IntersectionObserver` asks for\n * the next page as it comes into view (`rootMargin` ahead of it); while\n * `loading` it shows a spinner and asks for nothing. The button is the\n * same request for keyboards and for a browser without the observer.\n * SSR-safe: the observer is created in an effect.\n */\nfunction LoadMore({\n onLoadMore,\n loading,\n hasMore = true,\n rootMargin = \"200px\",\n label = \"Load more\",\n className,\n ...props\n}: LogListLoadMoreProps) {\n const ref = useRef<HTMLDivElement | null>(null);\n const latest = useRef(onLoadMore);\n latest.current = onLoadMore;\n useEffect(() => {\n const el = ref.current;\n if (!hasMore || loading || el == null) return;\n if (typeof IntersectionObserver === \"undefined\") return;\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries.some((entry) => entry.isIntersecting)) latest.current();\n },\n { rootMargin },\n );\n observer.observe(el);\n return () => observer.disconnect();\n }, [hasMore, loading, rootMargin]);\n if (!hasMore) return null;\n return (\n <div\n ref={ref}\n data-log-load-more=\"\"\n aria-busy={loading || undefined}\n className={cn(\n \"flex min-h-12 items-center justify-center px-5 py-2\",\n className,\n )}\n {...props}\n >\n {loading ? (\n <Spinner aria-label=\"Loading more\" className=\"text-pho-secondary\" />\n ) : (\n <Button variant=\"ghost\" size=\"sm\" onClick={() => onLoadMore()}>\n {label}\n </Button>\n )}\n </div>\n );\n}\n\n/* ---------------------------------- root -------------------------------- */\n\nexport interface LogListRootProps extends ComponentProps<\"div\"> {\n ref?: Ref<HTMLDivElement>;\n}\n\n/** The card the rows stack in. Mark it `aria-busy` while bones show. */\nfunction Root({ className, ...props }: LogListRootProps) {\n return (\n <div\n data-log-list=\"\"\n className={cn(LOG_LIST_SURFACE, \"min-w-0\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Log List — a card of one-line log rows.\n *\n * ```tsx\n * <LogList.Root>\n * <LogList.Row\n * id=\"pho_req_01m04axjqrfzxv4xjet40a84gb\"\n * status={<LogList.Status value={200} />}\n * method=\"POST\"\n * code\n * label=\"/v1/messages\"\n * description=\"+1 332 259 3374 received a message from +1 332 222 1111.\"\n * duration=\"59 ms\"\n * time=\"2 min ago\"\n * href=\"/requests/pho_req_01m04axjqrfzxv4xjet40a84gb\"\n * />\n * <LogList.LoadMore onLoadMore={fetchNextPage} loading={isFetching} hasMore={hasNextPage} />\n * </LogList.Root>\n * ```\n */\nexport const LogList = {\n Root,\n Row,\n Status,\n Method,\n Empty,\n Loading,\n LoadMore,\n};\n"],"mappings":";;;;;;;;;;;;;AA0CA,IAAMiB,IACJ,yFAGIC,IAAU,IACVC,IAAU;AAOhB,SAAgBC,EACdC,GACAC,IAAOJ,GACPK,IAAOJ,GACC;AACR,SAAIE,EAAM,UAAUC,IAAOC,IAAO,IAAUF,IACrC,GAAGA,EAAM,MAAM,GAAGC,CAAI,CAAA,IAAKD,EAAM,MAAM,CAACE,CAAI,CAAA;AACrD;AAIA,IAAMC,IAAgB,oBAAI,IAAI;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,GACKC,IAAc,oBAAI,IAAI;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,GACKC,IAAgB,oBAAI,IAAI;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAOD,SAAgBC,EAAeC,GAAqC;AAClE,MAAI,OAAOA,KAAW;AACpB,WAAIA,IAAS,MAAY,YACrBA,IAAS,MAAY,SACrBA,IAAS,MAAY,YAClB;AAET,QAAMC,IAAOD,EAAO,KAAK,EAAE,YAAY;AACvC,SAAI,UAAU,KAAKC,CAAI,IAAUF,EAAe,OAAOE,CAAI,CAAC,IACxDL,EAAc,IAAIK,CAAI,IAAU,YAChCJ,EAAY,IAAII,CAAI,IAAU,UAC9BH,EAAc,IAAI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El3.js";
2
+ import { t as d } from "./cn-CPbhpG1q.js";
3
3
  import { t as T } from "./resolve-variant-CcD8iG5l.js";
4
- import { n as B } from "./spinner-BzLUo4Xk.js";
4
+ import { n as B } from "./spinner-BSutFL4l.js";
5
5
  import { createContext as G, useCallback as v, useContext as N, useEffect as C, useMemo as H, useRef as h, useState as M } from "react";
6
6
  import { Fragment as K, jsx as c, jsxs as R } from "react/jsx-runtime";
7
7
  import { Separator as L } from "@base-ui/react/separator";
@@ -261,4 +261,4 @@ export {
261
261
  y as t
262
262
  };
263
263
 
264
- //# sourceMappingURL=menu-CoMrYnd1.js.map
264
+ //# sourceMappingURL=menu-CC3fhf83.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-CC3fhf83.js","names":["BaseMenu","_Fragment","Separator","BaseSeparator","Menu","cn","resolveVariant","Spinner","createContext","useCallback","useContext","useEffect","useMemo","useRef","useState","Fragment$1","jsx","jsxs","Separator","Menu","MenuPendingContext","useMenuPending","isThenable","value","withMenuPendingRoot","BaseRoot","PendingRoot","onOpenChange","actionsRef","props","pending","setPending","pendingRef","heldRef","hold","on","isHeld","internalActionsRef","handleOpenChange","open","eventDetails","contextValue","MENU_BLINK_MS","hush","event","useMenuItemBlink","blinks","context","blinking","setBlinking","phase","timer","intercept","row","useAsyncMenuItem","onClick","closeOnClick","loading","disabled","pendingContext","menuPending","busy","setBusy","mountedRef","inert","blocked","blinkProps","handleClick","result","error","MenuItemSpinner","MENU_POPUP","MENU_ITEM","MENU_ITEM_COLORS","Root","Trigger","Portal","Group","RadioGroup","SubmenuRoot","Positioner","className","sideOffset","Popup","Item","color","children","LinkItem","GroupLabel","Separator$1","SubmenuTrigger","CheckboxItem","RadioItem","CHECK_INDICATOR","CheckboxItemIndicator","RadioItemIndicator","Menu$1"],"sources":["../../src/components/menu/menu-pending.tsx","../../src/components/menu/menu.tsx"],"sourcesContent":["import {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ComponentType,\n type MouseEvent as ReactMouseEvent,\n type ReactNode,\n type RefObject,\n} from \"react\";\nimport { Spinner } from \"../spinner/spinner\";\n\n/** Imperative actions exposed by Base UI menu `actionsRef`. */\nexport interface RootActions {\n unmount: () => void;\n close: () => void;\n}\n\ninterface MenuPendingContextValue {\n /** True while a menu item promise is in flight. */\n pending: boolean;\n beginPending: () => void;\n endPending: () => void;\n /** Close the menu imperatively (used by async items on resolve). */\n close: () => void;\n /** Hold the menu open (no dismissal, no other row) through a blink. */\n hold: (on: boolean) => void;\n /** Whether a row is blinking. */\n isHeld: () => boolean;\n}\n\nconst MenuPendingContext = createContext<MenuPendingContextValue | null>(null);\n\n/**\n * Whether the surrounding menu has an async item promise in flight —\n * use it to disable sibling items while work is pending.\n * Returns `false` outside a `Menu.Root` / `ContextMenu.Root`.\n */\nexport function useMenuPending(): boolean {\n return useContext(MenuPendingContext)?.pending ?? false;\n}\n\nexport function isThenable(value: unknown): value is Promise<unknown> {\n return (\n value != null && typeof (value as { then?: unknown }).then === \"function\"\n );\n}\n\ntype PreventableMouseEvent = ReactMouseEvent<HTMLElement> & {\n preventBaseUIHandler?: () => void;\n};\n\nexport type RootWithPendingProps = {\n onOpenChange?: (open: boolean, eventDetails: { cancel: () => void }) => void;\n actionsRef?: RefObject<RootActions | null>;\n children?: ReactNode;\n};\n\n/**\n * Wraps a Base UI menu root so async `Menu.Item` clicks can lock dismissal\n * (outside press, Escape) until the promise settles.\n */\nexport function withMenuPendingRoot<P extends RootWithPendingProps>(\n BaseRoot: ComponentType<P>,\n): ComponentType<P> {\n function PendingRoot({ onOpenChange, actionsRef, ...props }: P) {\n const [pending, setPending] = useState(false);\n // Guard reads a ref so a resolve → close() in the same tick isn't blocked\n // by a not-yet-flushed state update.\n const pendingRef = useRef(false);\n // A row's confirm blink holds the menu the same way, without a render.\n // Stable across pending flips: a blinking row's effect keys on `hold`.\n const heldRef = useRef(false);\n const hold = useCallback((on: boolean) => {\n heldRef.current = on;\n }, []);\n const isHeld = useCallback(() => heldRef.current, []);\n const internalActionsRef = useRef<RootActions | null>(null);\n\n useEffect(() => {\n if (!actionsRef) return;\n // Proxy so callers always hit the live Base UI actions, even if the\n // popup remounts after this effect runs.\n actionsRef.current = {\n unmount: () => internalActionsRef.current?.unmount(),\n close: () => internalActionsRef.current?.close(),\n };\n return () => {\n actionsRef.current = null;\n };\n }, [actionsRef]);\n\n const handleOpenChange = useCallback(\n (open: boolean, eventDetails: { cancel: () => void }) => {\n if (!open && (pendingRef.current || heldRef.current)) {\n eventDetails.cancel();\n return;\n }\n onOpenChange?.(open, eventDetails);\n },\n [onOpenChange],\n );\n\n const contextValue = useMemo<MenuPendingContextValue>(\n () => ({\n pending,\n beginPending: () => {\n pendingRef.current = true;\n setPending(true);\n },\n endPending: () => {\n pendingRef.current = false;\n setPending(false);\n },\n close: () => internalActionsRef.current?.close(),\n hold,\n isHeld,\n }),\n [pending, hold, isHeld],\n );\n\n return (\n <MenuPendingContext.Provider value={contextValue}>\n <BaseRoot\n {...(props as P)}\n actionsRef={internalActionsRef}\n onOpenChange={handleOpenChange}\n />\n </MenuPendingContext.Provider>\n );\n }\n\n return PendingRoot as ComponentType<P>;\n}\n\n/** Each half of a row's confirm blink: its wash off, then back on. */\nexport const MENU_BLINK_MS = 90;\n\nfunction hush(event: ReactMouseEvent<HTMLElement>) {\n event.preventDefault();\n (event as PreventableMouseEvent).preventBaseUIHandler?.();\n}\n\n/**\n * The chosen row blinks before the menu closes, as on macOS: its wash\n * goes off for `MENU_BLINK_MS`, comes back for as long, and then the\n * press goes through — the action runs, the menu closes, a link\n * navigates. It confirms the press landed on the right row, where most\n * web menus close on the same frame. `blinks` is whether this row's\n * press ends the menu (an item that closes on click, a link); a row\n * that leaves the menu open, or a modified click (a link to a new tab),\n * goes through at once. The menu holds through the blink: no dismissal,\n * no second press.\n *\n * `intercept` goes first in the row's click handler and returns true\n * when it took the press. Spread `data-blink` on the row: `MENU_ITEM`\n * drops the wash while it is set.\n */\nexport function useMenuItemBlink(blinks: boolean) {\n const context = useContext(MenuPendingContext);\n const hold = context?.hold;\n const [blinking, setBlinking] = useState(false);\n const phase = useRef<\"idle\" | \"blinking\" | \"passing\">(\"idle\");\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timer.current) clearTimeout(timer.current);\n if (phase.current === \"blinking\") hold?.(false);\n phase.current = \"idle\";\n },\n [hold],\n );\n\n function intercept(event: ReactMouseEvent<HTMLElement>) {\n // The press going through after the blink.\n if (phase.current === \"passing\") return false;\n if (phase.current === \"blinking\" || context?.isHeld()) {\n hush(event);\n return true;\n }\n if (\n !blinks ||\n !context ||\n event.button !== 0 ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey\n ) {\n return false;\n }\n hush(event);\n const row = event.currentTarget;\n phase.current = \"blinking\";\n context.hold(true);\n setBlinking(true);\n timer.current = setTimeout(() => {\n setBlinking(false);\n timer.current = setTimeout(() => {\n timer.current = null;\n context.hold(false);\n phase.current = \"passing\";\n row.click();\n phase.current = \"idle\";\n }, MENU_BLINK_MS);\n }, MENU_BLINK_MS);\n return true;\n }\n\n return {\n intercept,\n blinkProps: { \"data-blink\": blinking || undefined },\n };\n}\n\nexport type AsyncMenuItemClick = (\n event: ReactMouseEvent<HTMLElement>,\n) => void | Promise<unknown>;\n\n/**\n * Shared click handler for `Menu.Item` / `ContextMenu.Item` promise support.\n * Returns whether the item should show its loading state.\n */\nexport function useAsyncMenuItem({\n onClick,\n closeOnClick = true,\n loading = false,\n disabled = false,\n}: {\n onClick?: AsyncMenuItemClick;\n closeOnClick?: boolean;\n loading?: boolean;\n disabled?: boolean;\n}) {\n const pendingContext = useContext(MenuPendingContext);\n const menuPending = pendingContext?.pending ?? false;\n const [busy, setBusy] = useState(false);\n const mountedRef = useRef(true);\n\n useEffect(() => {\n mountedRef.current = true;\n return () => {\n mountedRef.current = false;\n };\n }, []);\n\n const inert = busy || loading;\n // Disable siblings while any item promise is in flight — not the busy item itself.\n const blocked = disabled || (menuPending && !busy);\n const { intercept, blinkProps } = useMenuItemBlink(closeOnClick);\n\n function handleClick(event: ReactMouseEvent<HTMLElement>) {\n if (inert || (menuPending && !busy)) {\n (event as PreventableMouseEvent).preventBaseUIHandler?.();\n return;\n }\n // Blink first; the promise, if any, starts once the press goes through.\n if (intercept(event)) return;\n const result = onClick?.(event);\n if (!isThenable(result)) {\n return;\n }\n // Stop Base UI's closeOnClick for this press; close on resolve instead.\n (event as PreventableMouseEvent).preventBaseUIHandler?.();\n setBusy(true);\n pendingContext?.beginPending();\n result.then(\n () => {\n pendingContext?.endPending();\n if (mountedRef.current) setBusy(false);\n if (closeOnClick) pendingContext?.close();\n },\n (error: unknown) => {\n pendingContext?.endPending();\n if (mountedRef.current) setBusy(false);\n if (\n typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\"\n ) {\n console.error(\"Menu.Item: async onClick rejected —\", error);\n }\n },\n );\n }\n\n return { inert, blocked, handleClick, blinkProps };\n}\n\n/** Menu-row spinner — keeps `data-menu-spinner` for the hide-siblings CSS. */\nexport function MenuItemSpinner() {\n return <Spinner data-menu-spinner=\"\" size=\"md\" />;\n}\n","import {\n type ComponentProps,\n type ElementType,\n type MouseEvent as ReactMouseEvent,\n} from \"react\";\nimport { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { Separator as BaseSeparator } from \"@base-ui/react/separator\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant, type VariantMap } from \"../../utils/resolve-variant\";\nimport {\n MENU_BLINK_MS,\n MenuItemSpinner,\n useAsyncMenuItem,\n useMenuItemBlink,\n useMenuPending,\n withMenuPendingRoot,\n type AsyncMenuItemClick,\n} from \"./menu-pending\";\n\nexport { useMenuPending, MENU_BLINK_MS };\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\" | \"color\"\n> & {\n className?: string;\n};\n\n/** Shared popup + item styles, reused by `ContextMenu` and `Menubar` menus. */\n// Floating layer: keeps its elevation shadow, sits on the primary surface\n// with the site's hairline (ring-pho-secondary, #eee/#202020) as its edge.\n// `base` radius + p-1.5 inset — the highlight floats 6px clear of the edge.\nexport const MENU_POPUP =\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary origin-[var(--transform-origin)] min-w-44 rounded-base p-1.5 ring-1 ring-inset outline-none transition-[transform,opacity] duration-[330ms] ease-pho-spring data-[ending-style]:duration-150 data-[ending-style]:ease-out data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:scale-95 data-[ending-style]:opacity-0\";\n// Rest at secondary; highlighted lifts to primary with the quiet ghost wash.\n// Icons use `text-current` so they follow the row ink (including destructive).\n// While loading, the spinner is first; hide the rest of the leading icons.\n// Concentric correction (see /scale): row radius = popup radius − popup\n// padding (base − 6px). py-2 + 20px line-height lands the 36px row height.\n// `data-blink` is the off half of the confirm blink (useMenuItemBlink): the\n// wash drops, over any color's, and comes back on the next frame it clears.\nexport const MENU_ITEM =\n \"relative flex cursor-pointer items-center gap-2 rounded-[calc(var(--radius-base)-6px)] py-2 pr-2.5 pl-2.5 text-base text-pho-secondary outline-none select-none data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary data-[highlighted]:data-[blink]:bg-transparent data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-loading:data-[disabled]:opacity-100 data-loading:[&>svg:not([data-menu-spinner])]:hidden [&>svg]:size-4 [&>svg]:text-current\";\n\n/** Semantic ink for `Menu.Item` / `LinkItem` / `ContextMenu.Item`. */\nexport const MENU_ITEM_COLORS = {\n default: { classes: \"\", description: \"Secondary → primary on highlight\" },\n destructive: {\n classes:\n \"text-pho-error data-[highlighted]:bg-pho-error-primary data-[highlighted]:text-pho-error\",\n description: \"Error ink + error wash on highlight\",\n },\n} satisfies VariantMap;\n\nexport type MenuItemColor = keyof typeof MENU_ITEM_COLORS;\n\ntype ItemColorProps = {\n /** Semantic ink. @default \"default\" */\n color?: MenuItemColor;\n};\n\nexport type MenuItemProps = Omit<StyledProps<typeof BaseMenu.Item>, \"onClick\"> &\n ItemColorProps & {\n /**\n * Action handler. Return a promise to keep the menu open while it runs:\n * the item shows a spinner, dismissal is locked, and the menu closes when\n * the promise resolves (if `closeOnClick`). On rejection the menu stays\n * open — surface errors inside the handler.\n */\n onClick?: AsyncMenuItemClick;\n /**\n * Declarative loading state (same visual as an in-flight promise).\n * @default false\n */\n loading?: boolean;\n };\n\nconst Root = withMenuPendingRoot(BaseMenu.Root);\nconst Trigger = BaseMenu.Trigger;\nconst Portal = BaseMenu.Portal;\nconst Group = BaseMenu.Group;\nconst RadioGroup = BaseMenu.RadioGroup;\n// Don't wrap SubmenuRoot — nested pending context would shadow the parent\n// Root and fail to lock dismissal for async items inside a submenu.\nconst SubmenuRoot = BaseMenu.SubmenuRoot;\n\nfunction Positioner({\n className,\n sideOffset = 6,\n ...props\n}: StyledProps<typeof BaseMenu.Positioner>) {\n return (\n <BaseMenu.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseMenu.Popup>) {\n return <BaseMenu.Popup className={cn(MENU_POPUP, className)} {...props} />;\n}\n\nfunction Item({\n className,\n color = \"default\",\n onClick,\n closeOnClick = true,\n loading = false,\n disabled = false,\n children,\n ...props\n}: MenuItemProps) {\n const { inert, blocked, handleClick, blinkProps } = useAsyncMenuItem({\n onClick,\n closeOnClick,\n loading,\n disabled,\n });\n\n return (\n <BaseMenu.Item\n className={cn(\n MENU_ITEM,\n resolveVariant(MENU_ITEM_COLORS, color),\n className,\n )}\n closeOnClick={closeOnClick}\n disabled={blocked}\n data-loading={inert || undefined}\n aria-busy={inert || undefined}\n {...blinkProps}\n onClick={handleClick as (event: ReactMouseEvent<HTMLElement>) => void}\n {...props}\n >\n {inert ? (\n <>\n <MenuItemSpinner />\n <output className=\"sr-only\" aria-live=\"polite\" />\n </>\n ) : null}\n {children}\n </BaseMenu.Item>\n );\n}\n\nfunction LinkItem({\n className,\n color = \"default\",\n onClick,\n ...props\n}: StyledProps<typeof BaseMenu.LinkItem> & ItemColorProps) {\n // A link's press leaves the menu wherever it goes, so it always blinks.\n const { intercept, blinkProps } = useMenuItemBlink(true);\n return (\n <BaseMenu.LinkItem\n className={cn(\n MENU_ITEM,\n resolveVariant(MENU_ITEM_COLORS, color),\n className,\n )}\n {...blinkProps}\n onClick={(event) => {\n if (!intercept(event)) onClick?.(event);\n }}\n {...props}\n />\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.GroupLabel>) {\n return (\n <BaseMenu.GroupLabel\n className={cn(\n \"text-pho-secondary px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Separator({ className, ...props }: StyledProps<typeof BaseSeparator>) {\n return (\n <BaseSeparator\n className={cn(\n \"-mx-1.5 my-1.5 h-px bg-[var(--border-color-pho-secondary)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SubmenuTrigger({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.SubmenuTrigger>) {\n return (\n <BaseMenu.SubmenuTrigger\n className={cn(\n MENU_ITEM,\n \"data-[popup-open]:bg-pho-ghost-hover\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// A checkbox or radio row stays open by default (Base UI); it blinks only\n// when `closeOnClick` makes its press the menu's last.\nfunction CheckboxItem({\n className,\n closeOnClick = false,\n onClick,\n ...props\n}: StyledProps<typeof BaseMenu.CheckboxItem>) {\n const { intercept, blinkProps } = useMenuItemBlink(closeOnClick);\n return (\n <BaseMenu.CheckboxItem\n className={cn(MENU_ITEM, \"pl-8\", className)}\n closeOnClick={closeOnClick}\n {...blinkProps}\n onClick={(event) => {\n if (!intercept(event)) onClick?.(event);\n }}\n {...props}\n />\n );\n}\n\nfunction RadioItem({\n className,\n closeOnClick = false,\n onClick,\n ...props\n}: StyledProps<typeof BaseMenu.RadioItem>) {\n const { intercept, blinkProps } = useMenuItemBlink(closeOnClick);\n return (\n <BaseMenu.RadioItem\n className={cn(MENU_ITEM, \"pl-8\", className)}\n closeOnClick={closeOnClick}\n {...blinkProps}\n onClick={(event) => {\n if (!intercept(event)) onClick?.(event);\n }}\n {...props}\n />\n );\n}\n\nconst CHECK_INDICATOR =\n \"text-pho-brand absolute left-2.5 flex items-center [&>svg]:size-4\";\n\nfunction CheckboxItemIndicator({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.CheckboxItemIndicator>) {\n return (\n <BaseMenu.CheckboxItemIndicator\n className={cn(CHECK_INDICATOR, className)}\n {...props}\n />\n );\n}\n\nfunction RadioItemIndicator({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.RadioItemIndicator>) {\n return (\n <BaseMenu.RadioItemIndicator\n className={cn(CHECK_INDICATOR, className)}\n {...props}\n />\n );\n}\n\n/**\n * Dropdown menu built on Base UI `Menu` — a list of actions opened from a\n * trigger. Supports grouped items, separators, submenus\n * (`SubmenuRoot` + `SubmenuTrigger`), and stateful `CheckboxItem` /\n * `RadioItem`s. `Menu.Item` has native promise support (spinner + locked\n * dismissal while pending). A press that closes the menu blinks its row\n * first, as on macOS (`MENU_BLINK_MS` off, as long on), then goes\n * through. For a right-click menu use `ContextMenu`.\n */\nexport const Menu = {\n Root,\n Trigger,\n Portal,\n Positioner,\n Popup,\n Item,\n LinkItem,\n Group,\n GroupLabel,\n Separator,\n SubmenuRoot,\n SubmenuTrigger,\n CheckboxItem,\n CheckboxItemIndicator,\n RadioGroup,\n RadioItem,\n RadioItemIndicator,\n};\n"],"mappings":";;;;;;;;AAkCA,IAAMoB,IAAqBZ,EAA8C,IAAI;AAO7E,SAAgBa,KAA0B;AACxC,SAAOX,EAAWU,CAAkB,GAAG,WAAW;AACpD;AAEA,SAAgBE,EAAWC,GAA2C;AACpE,SACEA,KAAS,QAAQ,OAAQA,EAA6B,QAAS;AAEnE;AAgBA,SAAgBC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,IACE,WAAWK,EAAGwF,GAAiBZ,CAAS;AAAA,IACxC,GAAIpD;AAAA,EACL,CAAA;AAEL;AAEA,SAASkE,GAAmB,EAC1B,WAAAd,GACA,GAAGpD,EAAA,GAC+C;AAClD,SACE,gBAAAb,EAAChB,EAAS,oBAAV;AAAA,IACE,WAAWK,EAAGwF,GAAiBZ,CAAS;AAAA,IACxC,GAAIpD;AAAA,EACL,CAAA;AAEL;AAWA,IAAazB,KAAO;AAAA,EAClB,MAAAsE;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAI;AAAA,EACA,OAAAG;AAAA,EACA,MAAAC;AAAA,EACA,UAAAG;AAAA,EACA,OAAAV;AAAA,EACA,YAAAW;AAAA,EACA,WAAAC;AAAA,EACA,aAAAV;AAAA,EACA,gBAAAW;AAAA,EACA,cAAAC;AAAA,EACA,uBAAAG;AAAA,EACA,YAAAhB;AAAA,EACA,WAAAc;AAAA,EACA,oBAAAG;AACF"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as r } from "./cn-ChIgwEl3.js";
2
+ import { t as r } from "./cn-CPbhpG1q.js";
3
3
  import { createContext as f, useContext as m } from "react";
4
4
  import { jsx as s } from "react/jsx-runtime";
5
5
  var u = f("start");
@@ -89,4 +89,4 @@ export {
89
89
  d as t
90
90
  };
91
91
 
92
- //# sourceMappingURL=message-Dz2-numf.js.map
92
+ //# sourceMappingURL=message-DRAWQlW-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-DRAWQlW-.js","names":["cn","createContext","useContext","jsx","MessageContext","Group","className","props","Root","align","Avatar","Content","Header","Time","Footer","Message","messageStatusKey","outbound","status","text","word","shouldShowMessageStatus","messages","index","current","key","at","next","nextKey"],"sources":["../../src/components/message/message.tsx","../../src/components/message/message-status.ts"],"sourcesContent":["import { createContext, useContext, type ComponentProps } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/**\n * Message — one turn in a thread: the row that seats an avatar beside a\n * column of header, bubble, and footer, on the author's side. It owns the\n * row layout and nothing else: the surface is `Bubble`'s, the scrolling\n * and the composer are `Chat`'s.\n *\n * Design notes:\n * - `align=\"end\"` mirrors the row — avatar on the right, column\n * right-aligned — for the reader's own messages.\n * - The avatar sits at the row's bottom, level with the bubble. When a\n * `Footer` (status) sits under the bubble, the avatar shifts up by one\n * line so it stays beside the surface.\n * - `Time` sits beside the bubble, last-line aligned — right of inbound,\n * left of outbound — and is invisible until the row is hovered or\n * focused. `Footer` is the status caption under the bubble (Delivered,\n * Failed). Inbound has no status.\n */\n\nexport type MessageAlign = \"start\" | \"end\";\n\nconst MessageContext = createContext<MessageAlign>(\"start\");\n\n/* --------------------------------- group -------------------------------- */\n\n/** Consecutive messages from one author, spaced as one turn. */\nfunction Group({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n data-message-group=\"\"\n className={cn(\"flex min-w-0 flex-col gap-2\", className)}\n {...props}\n />\n );\n}\n\n/* --------------------------------- root --------------------------------- */\n\nexport interface MessageRootProps extends ComponentProps<\"div\"> {\n /** Which side the author sits on. @default \"start\" */\n align?: MessageAlign;\n}\n\n/** The row: avatar beside the content column, mirrored for `end`. */\nfunction Root({ align = \"start\", className, ...props }: MessageRootProps) {\n return (\n <MessageContext.Provider value={align}>\n <div\n data-message=\"\"\n data-align={align}\n className={cn(\n \"group/message @container relative flex w-full min-w-0 gap-2 text-base\",\n align === \"end\" && \"flex-row-reverse\",\n className,\n )}\n {...props}\n />\n </MessageContext.Provider>\n );\n}\n\n/* -------------------------------- avatar -------------------------------- */\n\n/**\n * The avatar's seat — pass an `Avatar.Root`. Bottom-aligned with the\n * bubble; lifts by one footer line when the message has a `Footer`.\n */\nfunction Avatar({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n data-message-avatar=\"\"\n className={cn(\n // Footer line = xs line-height (18px) + the column's 4px gap.\n \"flex shrink-0 self-end group-has-[[data-message-footer]]/message:-translate-y-[1.375rem]\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -------------------------------- content ------------------------------- */\n\n/**\n * Header over the bubble; time beside it; status under it. Inbound is\n * `[bubble][time]`. Outbound is `[time][bubble]` with `Footer` below\n * the bubble column.\n */\nfunction Content({ className, ...props }: ComponentProps<\"div\">) {\n const align = useContext(MessageContext);\n return (\n <div\n data-message-content=\"\"\n className={cn(\n \"grid w-max max-w-full flex-none items-end gap-x-1.5 gap-y-1 break-words\",\n \"[&>[data-message-header]]:[grid-area:header]\",\n \"[&>[data-bubble]]:max-w-[80cqw] [&>[data-bubble]]:[grid-area:main]\",\n \"[&>[data-bubble-group]]:max-w-[80cqw] [&>[data-bubble-group]]:[grid-area:main]\",\n \"[&>[data-bubble][data-variant=ghost]]:max-w-full\",\n \"[&>[data-message-time]]:[grid-area:time]\",\n \"[&>[data-message-footer]]:[grid-area:status]\",\n align === \"end\"\n ? \"ml-auto grid-cols-[auto_minmax(0,max-content)] [grid-template-areas:'._header'_'time_main'_'._status'] [&>[data-bubble-group]]:justify-self-end [&>[data-bubble]]:justify-self-end [&>[data-message-header]]:justify-self-end\"\n : \"grid-cols-[minmax(0,max-content)_auto] [grid-template-areas:'header_.'_'main_time'_'status_.'] [&>[data-bubble-group]]:justify-self-start [&>[data-bubble]]:justify-self-start\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Who — the sender's name over the bubble, secondary ink. */\nfunction Header({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n data-message-header=\"\"\n className={cn(\n \"text-pho-secondary flex w-full max-w-full min-w-0 items-center gap-1.5 px-1 text-xs font-medium group-has-[[data-bubble][data-variant=ghost]]/message:px-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Clock beside the bubble, last-line aligned. Description ink, tabular.\n * Inbound sits to the right; outbound to the left. The slot stays in\n * layout; the digits show when the row is hovered or focused.\n */\nfunction Time({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n data-message-time=\"\"\n className={cn(\n \"text-pho-description shrink-0 self-end text-xs whitespace-nowrap tabular-nums opacity-0 transition-opacity duration-100 ease-linear group-focus-within/message:opacity-100 group-hover/message:opacity-100\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Status under the bubble — Delivered, Failed. Inbound leaves it off.\n * Description ink.\n */\nfunction Footer({ className, ...props }: ComponentProps<\"div\">) {\n const align = useContext(MessageContext);\n return (\n <div\n data-message-footer=\"\"\n className={cn(\n \"text-pho-description flex max-w-full min-w-0 items-center gap-1.5 px-1 text-xs group-has-[[data-bubble][data-variant=ghost]]/message:px-0\",\n align === \"end\" && \"justify-self-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * A turn in a thread. `Root` takes `align`; `Avatar` seats an\n * `Avatar.Root`; `Content` places `Header` over the bubble, `Time`\n * beside it, and `Footer` under it.\n *\n * ```tsx\n * <Message.Root align=\"end\">\n * <Message.Content>\n * <Bubble.Root variant=\"inverse\" align=\"end\">\n * <Bubble.Content>On my way.</Bubble.Content>\n * </Bubble.Root>\n * <Message.Time>2:47 PM</Message.Time>\n * <Message.Footer>Delivered.</Message.Footer>\n * </Message.Content>\n * </Message.Root>\n * ```\n */\nexport const Message = { Root, Group, Avatar, Content, Header, Time, Footer };\n","/**\n * One row in a thread, enough to decide whether its outbound status\n * caption should show. Inbound rows leave `outbound` off.\n */\nexport interface MessageStatusItem {\n outbound?: boolean;\n /** Delivered, Sent, Failed — or a token like `delivered`. */\n status?: string | null;\n}\n\n/**\n * The coalesce key for a row: outbound status word, lowercased. Inbound\n * and empty statuses are `null`: they carry no status and sit outside the\n * runs (see `shouldShowMessageStatus`). A failure keeps its\n * whole text (`failed. 30007`) so two different error codes never\n * collapse into one caption.\n */\nexport function messageStatusKey(\n outbound: boolean,\n status: string | null | undefined,\n): string | null {\n if (!outbound || status == null) return null;\n const text = status.trim().toLowerCase();\n const word = text.split(/[\\s.]+/)[0];\n if (!word) return null;\n return word === \"failed\" ? text : word;\n}\n\n/**\n * Whether this row should render its outbound status (Delivered, Sent,\n * Failed). Only the last message in a same-status run shows it. Inbound\n * never does, and a reply in between does not break the run: the run is\n * over the outbound messages alone, so a conversation going back and forth\n * wears one Delivered, under the latest message it holds for, not one\n * under every turn.\n */\nexport function shouldShowMessageStatus(\n messages: readonly MessageStatusItem[],\n index: number,\n): boolean {\n const current = messages[index];\n if (!current) return false;\n const key = messageStatusKey(current.outbound === true, current.status);\n if (key == null) return false;\n for (let at = index + 1; at < messages.length; at++) {\n const next = messages[at];\n const nextKey = messageStatusKey(next?.outbound === true, next?.status);\n if (nextKey != null) return nextKey !== key;\n }\n return true;\n}\n"],"mappings":";;;;AAuBA,IAAMI,IAAiBH,EAA4B,OAAO;AAK1D,SAASI,EAAM,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAAgC;AAC7D,SACE,gBAAAJ,EAAC,OAAD;AAAA,IACE,sBAAmB;AAAA,IACnB,WAAWH,EAAG,+BAA+BM,CAAS;AAAA,IACtD,GAAIC;AAAA,EACL,CAAA;AAEL;AAUA,SAASC,EAAK,EAAE,OAAAC,IAAQ,SAAS,WAAAH,GAAW,GAAGC,EAAA,GAA2B;AACxE,SACE,gBAAAJ,EAACC,EAAe,UAAhB;AAAA,IAAyB,OAAOK;AAAA,IAC9B,UAAA,gBAAAN,EAAC,OAAD;AAAA,MACE,gBAAa;AAAA,MACb,cAAYM;AAAA,MACZ,WAAWT,EACT,yEACAS,MAAU,SAAS,oBACnBH,CACF;AAAA,MACA,GAAIC;AAAA,IACL,CAAA;AAAA,EACsB,CAAA;AAE7B;AAQA,SAASG,EAAO,EAAE,WAAAJ,GAAW,GAAGC,EAAA,GAAgC;AAC9D,SACE,gBAAAJ,EAAC,OAAD;AAAA,IACE,uBAAoB;AAAA,IACpB,WAAWH,EAET,4FACAM,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AASA,SAASI,EAAQ,EAAE,WAAAL,GAAW,GAAGC,EAAA,GAAgC;AAC/D,QAAME,IAAQP,EAAWE,CAAc;AACvC,SACE,gBAAAD,EAAC,OA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,CAACC,EAAS,QAAO;AACrB,QAAMC,IAAMT,EAAiBQ,EAAQ,aAAa,IAAMA,EAAQ,MAAM;AACtE,MAAIC,KAAO,KAAM,QAAO;AACxB,WAASC,IAAKH,IAAQ,GAAGG,IAAKJ,EAAS,QAAQI,KAAM;AACnD,UAAMC,IAAOL,EAASI,CAAA,GAChBE,IAAUZ,EAAiBW,GAAM,aAAa,IAAMA,GAAM,MAAM;AACtE,QAAIC,KAAW,KAAM,QAAOA,MAAYH;AAAA,EAC1C;AACA,SAAO;AACT"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as e } from "./cn-ChIgwEl3.js";
2
+ import { t as e } from "./cn-CPbhpG1q.js";
3
3
  import "react";
4
4
  import { jsx as a } from "react/jsx-runtime";
5
5
  import { Popover as t } from "@base-ui/react/popover";
@@ -43,4 +43,4 @@ export {
43
43
  h as t
44
44
  };
45
45
 
46
- //# sourceMappingURL=popover-BhBJO346.js.map
46
+ //# sourceMappingURL=popover-B0NBrYV5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover-B0NBrYV5.js","names":["BasePopover","Popover","cn","jsx","Popover","Root","Trigger","Portal","Close","Positioner","className","sideOffset","props","Popup","Title","Description","Popover$1"],"sources":["../../src/components/popover/popover.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Popover as BasePopover } from \"@base-ui/react/popover\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BasePopover.Root;\nconst Trigger = BasePopover.Trigger;\nconst Portal = BasePopover.Portal;\nconst Close = BasePopover.Close;\n\nfunction Positioner({\n className,\n sideOffset = 8,\n ...props\n}: StyledProps<typeof BasePopover.Positioner>) {\n return (\n <BasePopover.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BasePopover.Popup>) {\n return (\n <BasePopover.Popup\n className={cn(\n // Floating layer: keeps shadow elevation; ring-pho-secondary is the\n // site card-hairline edge (#eee / #202020).\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base ease-pho-spring max-w-[calc(100vw-2rem)] origin-[var(--transform-origin)] p-4 ring-1 transition-[transform,opacity] duration-[330ms] outline-none ring-inset data-[ending-style]:duration-150 data-[ending-style]:ease-out\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Title({ className, ...props }: StyledProps<typeof BasePopover.Title>) {\n return (\n <BasePopover.Title\n className={cn(\"text-pho-primary text-base font-medium\", className)}\n {...props}\n />\n );\n}\n\nfunction Description({\n className,\n ...props\n}: StyledProps<typeof BasePopover.Description>) {\n return (\n <BasePopover.Description\n className={cn(\"text-pho-description text-base\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Popover built on Base UI `Popover` — a click-triggered floating panel\n * anchored to its trigger, for rich, interactive content (forms, menus of\n * actions, details). Unlike a `Tooltip`, it can hold focusable controls and is\n * dismissed by clicking away or pressing Escape.\n */\nexport const Popover = {\n Root,\n Trigger,\n Portal,\n Positioner,\n Popup,\n Title,\n Description,\n Close,\n};\n"],"mappings":";;;;;AAYA,IAAMK,IAAOL,EAAY,MACnBM,IAAUN,EAAY,SACtBO,IAASP,EAAY,QACrBQ,IAAQR,EAAY;AAE1B,SAASS,EAAW,EAClB,WAAAC,GACA,YAAAC,IAAa,GACb,GAAGC,EAAA,GAC0C;AAC7C,SACE,gBAAAT,EAACH,EAAY,YAAb;AAAA,IACc,YAAAW;AAAA,IACZ,WAAWT,EAAG,QAAQQ,CAAS;AAAA,IAC/B,GAAIE;AAAA,EACL,CAAA;AAEL;AAEA,SAASC,EAAM,EAAE,WAAAH,GAAW,GAAGE,EAAA,GAAgD;AAC7E,SACE,gBAAAT,EAACH,EAAY,OAAb;AAAA,IACE,WAAWE,EAGT,4SACA,kEACA,8DACAQ,CACF;AAAA,IACA,GAAIE;AAAA,EACL,CAAA;AAEL;AAEA,SAASE,EAAM,EAAE,WAAAJ,GAAW,GAAGE,EAAA,GAAgD;AAC7E,SACE,gBAAAT,EAACH,EAAY,OAAb;AAAA,IACE,WAAWE,EAAG,0CAA0CQ,CAAS;AAAA,IACjE,GAAIE;AAAA,EACL,CAAA;AAEL;AAEA,SAASG,EAAY,EACnB,WAAAL,GACA,GAAGE,EAAA,GAC2C;AAC9C,SACE,gBAAAT,EAACH,EAAY,aAAb;AAAA,IACE,WAAWE,EAAG,kCAAkCQ,CAAS;AAAA,IACzD,GAAIE;AAAA,EACL,CAAA;AAEL;AAQA,IAAaX,IAAU;AAAA,EACrB,MAAAI;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAE;AAAA,EACA,OAAAI;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAP;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"popup-anchor-C3_iXdbh.js","names":[],"sources":["../../src/utils/popup-anchor.tsx"],"sourcesContent":["import {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n type ReactNode,\n} from \"react\";\n\n/**\n * Where a popup anchors when its trigger pulses on press.\n *\n * The press pulse scales the trigger with a transform, and the popup opens on\n * that same press, so Base UI's positioner measures the trigger mid-pulse.\n * Its anchor rect includes the transform, so `--anchor-width` (the popup's\n * width) follows the scale frame by frame. The positioner's own\n * ResizeObserver then sees the popup resize inside its own callback, which the\n * browser reports as \"ResizeObserver loop completed with undelivered\n * notifications\". Anchoring to the trigger's laid-out box, the transform\n * taken back out, keeps the anchor still while the trigger pulses.\n */\nconst PopupAnchorContext = createContext<{\n element: HTMLElement | null;\n register: (element: HTMLElement | null) => void;\n} | null>(null);\n\n/** Holds the pulsing trigger a Root's positioner anchors to. */\nexport function PopupAnchorProvider({ children }: { children: ReactNode }) {\n const [element, register] = useState<HTMLElement | null>(null);\n const value = useMemo(() => ({ element, register }), [element]);\n return (\n <PopupAnchorContext.Provider value={value}>\n {children}\n </PopupAnchorContext.Provider>\n );\n}\n\n/**\n * The ref for a trigger that pulses on press (`usePressPulse`), so the\n * popup it opens anchors to its laid-out box rather than its scaled one.\n * Outside a Pho `Select.Root` or `Combobox.Root` it does nothing.\n */\nexport function usePopupAnchorTrigger() {\n const context = useContext(PopupAnchorContext);\n const register = context?.register;\n return useCallback(\n (element: HTMLElement | null) => register?.(element),\n [register],\n );\n}\n\n/**\n * The positioner's `anchor`: the registered trigger's laid-out box. With no\n * trigger registered (a Combobox anchored to its input, a trigger whose\n * `render` dropped the ref) it is `undefined`, so Base UI keeps its own\n * default anchor; a callback resolving to `null` would clear that anchor and\n * leave the popup unpositioned.\n */\nexport function usePopupAnchor() {\n const element = useContext(PopupAnchorContext)?.element ?? null;\n return useMemo(\n () =>\n element\n ? () => ({\n contextElement: element,\n getBoundingClientRect: () => layoutRect(element),\n })\n : undefined,\n [element],\n );\n}\n\n/**\n * The element's border box as laid out, its own scale undone. Only a scale\n * and a translate (what a press pulse writes) are undone; any other transform\n * leaves the measured rect as it is.\n */\nexport function layoutRect(element: Element): DOMRect {\n const rect = element.getBoundingClientRect();\n const style = getComputedStyle(element);\n if (!style.transform || style.transform === \"none\") return rect;\n const matrix = new DOMMatrixReadOnly(style.transform);\n if (!matrix.is2D || matrix.b !== 0 || matrix.c !== 0) return rect;\n if (matrix.a <= 0 || matrix.d <= 0) return rect;\n // A point x of the box lands at origin + scale * (x - origin) + translate.\n const [originX = 0, originY = 0] = style.transformOrigin\n .split(\" \")\n .map((value) => parseFloat(value) || 0);\n return new DOMRect(\n rect.left - matrix.e - originX * (1 - matrix.a),\n rect.top - matrix.f - originY * (1 - matrix.d),\n rect.width / matrix.a,\n rect.height / matrix.d,\n );\n}\n"],"mappings":";;;AAqBA,IAAM,IAAqB,EAGjB,IA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{"version":3,"file":"popup-anchor-C3_iXdbh.js","names":["createContext","useCallback","useContext","useMemo","useState","jsx","PopupAnchorContext","PopupAnchorProvider","children","element","register","value","usePopupAnchorTrigger","usePopupAnchor","layoutRect","rect","style","matrix","originX","originY"],"sources":["../../src/utils/popup-anchor.tsx"],"sourcesContent":["import {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n type ReactNode,\n} from \"react\";\n\n/**\n * Where a popup anchors when its trigger pulses on press.\n *\n * The press pulse scales the trigger with a transform, and the popup opens on\n * that same press, so Base UI's positioner measures the trigger mid-pulse.\n * Its anchor rect includes the transform, so `--anchor-width` (the popup's\n * width) follows the scale frame by frame. The positioner's own\n * ResizeObserver then sees the popup resize inside its own callback, which the\n * browser reports as \"ResizeObserver loop completed with undelivered\n * notifications\". Anchoring to the trigger's laid-out box, the transform\n * taken back out, keeps the anchor still while the trigger pulses.\n */\nconst PopupAnchorContext = createContext<{\n element: HTMLElement | null;\n register: (element: HTMLElement | null) => void;\n} | null>(null);\n\n/** Holds the pulsing trigger a Root's positioner anchors to. */\nexport function PopupAnchorProvider({ children }: { children: ReactNode }) {\n const [element, register] = useState<HTMLElement | null>(null);\n const value = useMemo(() => ({ element, register }), [element]);\n return (\n <PopupAnchorContext.Provider value={value}>\n {children}\n </PopupAnchorContext.Provider>\n );\n}\n\n/**\n * The ref for a trigger that pulses on press (`usePressPulse`), so the\n * popup it opens anchors to its laid-out box rather than its scaled one.\n * Outside a Pho `Select.Root` or `Combobox.Root` it does nothing.\n */\nexport function usePopupAnchorTrigger() {\n const context = useContext(PopupAnchorContext);\n const register = context?.register;\n return useCallback(\n (element: HTMLElement | null) => register?.(element),\n [register],\n );\n}\n\n/**\n * The positioner's `anchor`: the registered trigger's laid-out box. With no\n * trigger registered (a Combobox anchored to its input, a trigger whose\n * `render` dropped the ref) it is `undefined`, so Base UI keeps its own\n * default anchor; a callback resolving to `null` would clear that anchor and\n * leave the popup unpositioned.\n */\nexport function usePopupAnchor() {\n const element = useContext(PopupAnchorContext)?.element ?? null;\n return useMemo(\n () =>\n element\n ? () => ({\n contextElement: element,\n getBoundingClientRect: () => layoutRect(element),\n })\n : undefined,\n [element],\n );\n}\n\n/**\n * The element's border box as laid out, its own scale undone. Only a scale\n * and a translate (what a press pulse writes) are undone; any other transform\n * leaves the measured rect as it is.\n */\nexport function layoutRect(element: Element): DOMRect {\n const rect = element.getBoundingClientRect();\n const style = getComputedStyle(element);\n if (!style.transform || style.transform === \"none\") return rect;\n const matrix = new DOMMatrixReadOnly(style.transform);\n if (!matrix.is2D || matrix.b !== 0 || matrix.c !== 0) return rect;\n if (matrix.a <= 0 || matrix.d <= 0) return rect;\n // A point x of the box lands at origin + scale * (x - origin) + translate.\n const [originX = 0, originY = 0] = style.transformOrigin\n .split(\" \")\n .map((value) => parseFloat(value) || 0);\n return new DOMRect(\n rect.left - matrix.e - originX * (1 - matrix.a),\n rect.top - matrix.f - originY * (1 - matrix.d),\n rect.width / matrix.a,\n rect.height / matrix.d,\n );\n}\n"],"mappings":";;;AAqBA,IAAMM,IAAqBN,EAGjB,IAAI;AAGd,SAAgBO,EAAoB,EAAE,UAAAC,EAAA,GAAqC;AACzE,QAAM,CAACC,GAASC,CAAA,IAAYN,EAA6B,IAAI,GACvDO,IAAQR,EAAA,OAAe;AAAA,IAAE,SAAAM;AAAA,IAAS,UAAAC;AAAA,EAAS,IAAI,CAACD,CAAO,CAAC;AAC9D,SACE,gBAAAJ,EAACC,EAAmB,UAApB;AAAA,IAAoC,OAAAK;AAAA,IACjC,UAAAH;AAAA,EAC0B,CAAA;AAEjC;AAOA,SAAgBI,IAAwB;AAEtC,QAAMF,IADUR,EAAWI,CACV,GAAS;AAC1B,SAAOL,EAAA,CACJQ,MAAgCC,IAAWD,CAAO,GACnD,CAACC,CAAQ,CACX;AACF;AASA,SAAgBG,IAAiB;AAC/B,QAAMJ,IAAUP,EAAWI,CAAkB,GAAG,WAAW;AAC3D,SAAOH,EAAA,MAEHM,IAAA,OACW;AAAA,IACL,gBAAgBA;AAAA,IAChB,uBAAA,MAA6BK,EAAWL,CAAO;AAAA,EACjD,KACA,QACN,CAACA,CAAO,CACV;AACF;AAOA,SAAgBK,EAAWL,GAA2B;AACpD,QAAMM,IAAON,EAAQ,sBAAsB,GACrCO,IAAQ,iBAAiBP,CAAO;AACtC,MAAI,CAACO,EAAM,aAAaA,EAAM,cAAc,OAAQ,QAAOD;AAC3D,QAAME,IAAS,IAAI,kBAAkBD,EAAM,SAAS;AAEpD,MADI,CAACC,EAAO,QAAQA,EAAO,MAAM,KAAKA,EAAO,MAAM,KAC/CA,EAAO,KAAK,KAAKA,EAAO,KAAK,EAAG,QAAOF;AAE3C,QAAM,CAACG,IAAU,GAAGC,IAAU,CAAA,IAAKH,EAAM,gBACtC,MAAM,GAAG,EACT,IAAA,CAAKL,MAAU,WAAWA,CAAK,KAAK,CAAC;AACxC,SAAO,IAAI,QACTI,EAAK,OAAOE,EAAO,IAAIC,KAAW,IAAID,EAAO,IAC7CF,EAAK,MAAME,EAAO,IAAIE,KAAW,IAAIF,EAAO,IAC5CF,EAAK,QAAQE,EAAO,GACpBF,EAAK,SAASE,EAAO,CACvB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-variant-CcD8iG5l.js","names":[],"sources":["../../src/utils/resolve-variant.ts"],"sourcesContent":["/**\n * A single option within a variant axis: the Tailwind classes it applies plus a\n * human description (surfaced in docs and the future component registry).\n */\nexport interface VariantDef {\n classes: string;\n description?: string;\n}\n\n/** One variant axis — maps each option name to its definition. */\nexport type VariantMap = Record<string, VariantDef>;\n\n/**\n * Resolve the Tailwind classes for a chosen option of a variant axis.\n * Returns `\"\"` for an unknown key so callers can compose safely with `cn`.\n *\n * @example\n * const SIZE = { sm: { classes: \"h-6 px-2\" }, md: { classes: \"h-9 px-3\" } };\n * cn(base, resolveVariant(SIZE, size));\n */\nexport function resolveVariant<M extends VariantMap>(\n map: M,\n key: keyof M | (string & {}),\n): string {\n return map[key as keyof M]?.classes ?? \"\";\n}\n"],"mappings":";AAoBA,SAAgB,EACd,GACA,GACQ;AACR,SAAO,EAAI,CAAA,GAAiB,WAAW;AACzC"}
1
+ {"version":3,"file":"resolve-variant-CcD8iG5l.js","names":["resolveVariant","map","key"],"sources":["../../src/utils/resolve-variant.ts"],"sourcesContent":["/**\n * A single option within a variant axis: the Tailwind classes it applies plus a\n * human description (surfaced in docs and the future component registry).\n */\nexport interface VariantDef {\n classes: string;\n description?: string;\n}\n\n/** One variant axis — maps each option name to its definition. */\nexport type VariantMap = Record<string, VariantDef>;\n\n/**\n * Resolve the Tailwind classes for a chosen option of a variant axis.\n * Returns `\"\"` for an unknown key so callers can compose safely with `cn`.\n *\n * @example\n * const SIZE = { sm: { classes: \"h-6 px-2\" }, md: { classes: \"h-9 px-3\" } };\n * cn(base, resolveVariant(SIZE, size));\n */\nexport function resolveVariant<M extends VariantMap>(\n map: M,\n key: keyof M | (string & {}),\n): string {\n return map[key as keyof M]?.classes ?? \"\";\n}\n"],"mappings":";AAoBA,SAAgBA,EACdC,GACAC,GACQ;AACR,SAAOD,EAAIC,CAAA,GAAiB,WAAW;AACzC"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as d } from "./cn-ChIgwEl3.js";
2
+ import { t as d } from "./cn-CPbhpG1q.js";
3
3
  import "../motion.js";
4
4
  import { createContext as A, useContext as k, useLayoutEffect as C, useRef as b } from "react";
5
5
  import { Fragment as L, jsx as i, jsxs as v } from "react/jsx-runtime";
@@ -165,4 +165,4 @@ export {
165
165
  Z as t
166
166
  };
167
167
 
168
- //# sourceMappingURL=scroll-area-DSwD9th7.js.map
168
+ //# sourceMappingURL=scroll-area-Dhl5hqay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scroll-area-Dhl5hqay.js","names":["BaseScrollArea","_Fragment","ScrollArea","cn","createContext","useContext","useLayoutEffect","useRef","Fragment$1","jsx","jsxs","motion","ScrollArea","EDGE_CLASS","BLUR_LAYER_COUNT","BLUR_MAX_PX","buildBlurLayers","count","maxPx","segment","_","i","layer","BLUR_LAYERS","edgeMask","edge","window","toEdge","a","b","c","d","DEFAULT_SURFACE","washGradient","surface","paintEdge","node","progress","child","el","blur","Edge","edgeRef","className","blurPx","index","mask","ScrollAreaContext","useScrollAreaContext","ctx","clamp01","n","assignRef","ref","Content","inset","insetTop","insetBottom","style","props","Corner","Root","children","fade","topEl","bottomEl","Viewport","viewportRef","viewport","paint","reveal","maxScroll","top","bottom","frame","onScroll","observer","Scrollbar","Thumb","ScrollArea$1"],"sources":["../../src/components/scroll-area/scroll-area-edges.tsx","../../src/components/scroll-area/scroll-area.tsx"],"sourcesContent":["import { type Ref } from \"react\";\nimport { BLUR_PX } from \"../../motion\";\nimport { cn } from \"../../utils/cn\";\n\n/** Overlay strip height — a short ramp, not a banner. `h-8` = 32px. */\nexport const EDGE_CLASS = \"pointer-events-none absolute inset-x-0 z-10 h-8\";\nexport const EDGE_REVEAL_PX = 32;\n\nconst BLUR_LAYER_COUNT = 8;\n\n/**\n * The system's one blur strength. The edge fade peaks here, and a motion\n * that softens (a scope swap, a bar title) borrows the same value, so\n * every soft focus in the product is the same soft focus.\n */\nexport const BLUR_MAX_PX = BLUR_PX;\n\nfunction buildBlurLayers(count: number, maxPx: number) {\n const segment = 100 / (count + 1);\n return Array.from({ length: count }, (_, i) => ({\n blurPx: (i / (count - 1)) * maxPx,\n window: [\n i * segment,\n (i + 1) * segment,\n (i + 2) * segment,\n (i + 3) * segment,\n ] as const,\n })).filter((layer) => layer.blurPx > 0);\n}\n\nconst BLUR_LAYERS = buildBlurLayers(BLUR_LAYER_COUNT, BLUR_MAX_PX);\n\nfunction edgeMask(edge: \"top\" | \"bottom\", window: readonly number[]) {\n const toEdge = edge === \"top\" ? \"to top\" : \"to bottom\";\n const [a, b, c, d] = window;\n return `linear-gradient(${toEdge}, transparent ${a}%, black ${b}%, black ${c}%, transparent ${d}%)`;\n}\n\n// The wash fades into the block it sits on: every `bg-pho-*` surface\n// registers itself as `--pho-surface` (see the stylesheet), so the nearest\n// surface ancestor's background carries down here — live across themes.\n// The primary surface is the fallback for hosts outside any pho surface.\nconst DEFAULT_SURFACE =\n \"var(--pho-surface, var(--background-color-pho-primary))\";\n\nfunction washGradient(edge: \"top\" | \"bottom\", surface: string) {\n const to = edge === \"top\" ? \"to top\" : \"to bottom\";\n return `linear-gradient(${to}, color-mix(in oklab, ${surface} 20%, transparent) 0%, ${surface} 100%)`;\n}\n\nexport function paintEdge(node: HTMLDivElement | null, progress: number) {\n if (!node) return;\n for (const child of node.children) {\n const el = child as HTMLElement;\n if (el.dataset.scrollFade === \"wash\") {\n el.style.opacity = String(progress);\n continue;\n }\n const blur = `blur(${Number(el.dataset.blurPx) * progress}px)`;\n el.style.backdropFilter = blur;\n el.style.setProperty(\"-webkit-backdrop-filter\", blur);\n }\n}\n\nexport function Edge({\n edge,\n edgeRef,\n surface = DEFAULT_SURFACE,\n className,\n}: {\n edge: \"top\" | \"bottom\";\n edgeRef: Ref<HTMLDivElement>;\n /** The surface the wash fades into — the card by default, or a page. */\n surface?: string;\n /** Position override — the strip sits at the named edge unless placed. */\n className?: string;\n}) {\n return (\n <div\n ref={edgeRef}\n aria-hidden\n data-edge={edge}\n className={cn(\n EDGE_CLASS,\n className ?? (edge === \"top\" ? \"top-0\" : \"bottom-0\"),\n )}\n >\n {BLUR_LAYERS.map(({ blurPx, window }, index) => {\n const mask = edgeMask(edge, window);\n return (\n <div\n key={index}\n data-blur-px={blurPx}\n className=\"absolute inset-0\"\n style={{\n maskImage: mask,\n WebkitMaskImage: mask,\n }}\n />\n );\n })}\n <div\n data-scroll-fade=\"wash\"\n className=\"absolute inset-0 opacity-0\"\n style={{ background: washGradient(edge, surface) }}\n />\n </div>\n );\n}\n","import {\n createContext,\n useContext,\n useLayoutEffect,\n useRef,\n type ComponentProps,\n type ElementType,\n type Ref,\n type RefObject,\n} from \"react\";\nimport { ScrollArea as BaseScrollArea } from \"@base-ui/react/scroll-area\";\nimport { motion } from \"motion/react\";\nimport { cn } from \"../../utils/cn\";\nimport { Edge, EDGE_REVEAL_PX, paintEdge } from \"./scroll-area-edges\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst ScrollAreaContext = createContext<{\n topEl: RefObject<HTMLDivElement | null>;\n bottomEl: RefObject<HTMLDivElement | null>;\n fade: boolean;\n} | null>(null);\n\nfunction useScrollAreaContext() {\n const ctx = useContext(ScrollAreaContext);\n if (ctx == null) {\n throw new Error(\"ScrollArea parts must be used inside ScrollArea.Root\");\n }\n return ctx;\n}\n\nfunction clamp01(n: number) {\n if (n <= 0) return 0;\n if (n >= 1) return 1;\n return n;\n}\n\nfunction assignRef<T>(ref: Ref<T> | undefined, node: T | null) {\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n // React 18 types `RefObject.current` as readonly; the write is legal.\n (ref as { current: T | null }).current = node;\n }\n}\n\n/**\n * The scrolled content. `inset` is a resting inset in the scroll axis —\n * like a scroll view's safe-area padding: the content stands clear of the\n * edges at rest but scrolls past them to the true edge, and the scrollbar\n * and edge fade stay on `Root`'s edges. `insetTop` / `insetBottom` set the\n * ends separately (they win over `inset`).\n */\nfunction Content({\n inset,\n insetTop,\n insetBottom,\n style,\n ref,\n ...props\n}: ComponentProps<typeof BaseScrollArea.Content> & {\n inset?: number | string;\n insetTop?: number | string;\n insetBottom?: number | string;\n ref?: Ref<HTMLDivElement>;\n}) {\n return (\n <BaseScrollArea.Content\n ref={ref}\n style={{\n paddingTop: insetTop ?? inset,\n paddingBottom: insetBottom ?? inset,\n ...style,\n }}\n {...props}\n />\n );\n}\n\nconst Corner = BaseScrollArea.Corner;\n\nfunction Root({\n className,\n children,\n fade = true,\n ...props\n}: StyledProps<typeof BaseScrollArea.Root> & {\n /**\n * Progressive edge fade (blur + wash). Leave on except for code\n * surfaces — CodeBlock is the only caller that turns it off, so\n * glyphs hard-clip at the border.\n * @default true\n */\n fade?: boolean;\n}) {\n const topEl = useRef<HTMLDivElement | null>(null);\n const bottomEl = useRef<HTMLDivElement | null>(null);\n\n return (\n <BaseScrollArea.Root\n className={cn(\"relative overflow-hidden\", className)}\n {...props}\n >\n <ScrollAreaContext.Provider value={{ topEl, bottomEl, fade }}>\n {children}\n {fade ? (\n <>\n <Edge edge=\"top\" edgeRef={topEl} />\n <Edge edge=\"bottom\" edgeRef={bottomEl} />\n </>\n ) : null}\n </ScrollAreaContext.Provider>\n </BaseScrollArea.Root>\n );\n}\n\nfunction Viewport({\n className,\n ref,\n ...props\n}: StyledProps<typeof BaseScrollArea.Viewport>) {\n const { topEl, bottomEl, fade } = useScrollAreaContext();\n const viewportRef = useRef<HTMLElement | null>(null);\n\n useLayoutEffect(() => {\n const viewport = viewportRef.current;\n if (!viewport || !fade) return;\n\n const paint = () => {\n const reveal =\n topEl.current?.offsetHeight ||\n bottomEl.current?.offsetHeight ||\n EDGE_REVEAL_PX;\n const maxScroll = viewport.scrollHeight - viewport.clientHeight;\n const top = maxScroll <= 0 ? 0 : clamp01(viewport.scrollTop / reveal);\n const bottom =\n maxScroll <= 0 ? 0 : clamp01((maxScroll - viewport.scrollTop) / reveal);\n paintEdge(topEl.current, top);\n paintEdge(bottomEl.current, bottom);\n };\n\n let frame = 0;\n const onScroll = () => {\n if (frame) return;\n frame = requestAnimationFrame(() => {\n frame = 0;\n paint();\n });\n };\n\n paint();\n viewport.addEventListener(\"scroll\", onScroll, { passive: true });\n let observer: ResizeObserver | null = null;\n if (typeof ResizeObserver !== \"undefined\") {\n observer = new ResizeObserver(paint);\n observer.observe(viewport);\n if (viewport.firstElementChild) {\n observer.observe(viewport.firstElementChild);\n }\n }\n return () => {\n viewport.removeEventListener(\"scroll\", onScroll);\n if (frame) cancelAnimationFrame(frame);\n observer?.disconnect();\n };\n }, [topEl, bottomEl, fade]);\n\n return (\n <BaseScrollArea.Viewport\n // A motion element with layoutScroll: any layout-animated content\n // inside (a shared-element morph, a FLIP row) projects against the\n // viewport's scroll offset instead of reading a scroll as a layout\n // change.\n render={<motion.div layoutScroll />}\n // No `overscroll-contain`: a scroll that reaches the viewport's end\n // (or one that has nothing to scroll) chains to the parent, as a\n // native scroll view does. A popup list that must trap the scroll\n // adds it on its own Viewport.\n className={cn(\n \"outline-pho-brand h-full min-h-0 w-full rounded-[inherit] focus-visible:outline-2 focus-visible:-outline-offset-1\",\n className,\n )}\n {...props}\n ref={(node) => {\n viewportRef.current = node;\n assignRef(ref, node);\n }}\n />\n );\n}\n\nfunction Scrollbar({\n className,\n ...props\n}: StyledProps<typeof BaseScrollArea.Scrollbar>) {\n return (\n <BaseScrollArea.Scrollbar\n className={cn(\n \"relative z-20 flex touch-none p-0.5 opacity-0 transition-opacity delay-300 select-none\",\n \"data-[hovering]:opacity-100 data-[hovering]:delay-0 data-[scrolling]:opacity-100 data-[scrolling]:delay-0 data-[scrolling]:duration-0\",\n \"data-[orientation=horizontal]:h-2.5 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:w-2.5\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Thumb({\n className,\n ...props\n}: StyledProps<typeof BaseScrollArea.Thumb>) {\n return (\n <BaseScrollArea.Thumb\n className={cn(\n \"flex-1 rounded-full bg-[var(--border-color-pho-primary)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Scroll area built on Base UI `ScrollArea` — a capped region with overlay\n * scrollbars and progressive edge fade. Approaching rows blur (0 → 1px) and\n * wash into the surface; strength tracks scroll distance over one strip\n * height. Give `Root` a fixed size; put content in `Viewport` → `Content`\n * and add a `Scrollbar` → `Thumb` per axis.\n */\nexport const ScrollArea = {\n Root,\n Viewport,\n Content,\n Scrollbar,\n Thumb,\n Corner,\n};\n"],"mappings":";;;;;;;AAKA,IAAaa,IAAa,mDAGpBC,IAAmB,GAOZC,IAAA;AAEb,SAASC,EAAgBC,GAAeC,GAAe;AACrD,QAAMC,IAAU,OAAOF,IAAQ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,IACE,WAAWG,EACT,4DACAwC,CACF;AAAA,IACA,GAAIgB;AAAA,EACL,CAAA;AAEL;AASA,IAAazD,IAAa;AAAA,EACxB,MAAA2D;AAAA,EACA,UAAAK;AAAA,EACA,SAAAZ;AAAA,EACA,WAAAuB;AAAA,EACA,OAAAC;AAAA,EACA,QAAAlB;AACF"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { t as n } from "./cn-ChIgwEl3.js";
2
+ import { t as n } from "./cn-CPbhpG1q.js";
3
3
  import { SPRING_PRESS_INLINE as u } from "../motion.js";
4
4
  import { r as m } from "./use-press-pulse-IbNstUT0.js";
5
- import { t as g } from "./IconCheck-D2WuculQ.js";
5
+ import { t as g } from "./IconCheck-DwSMn1wK.js";
6
6
  import { n as h, r as f, t as y } from "./popup-anchor-C3_iXdbh.js";
7
7
  import { createContext as b, useContext as x } from "react";
8
8
  import { jsx as r } from "react/jsx-runtime";
@@ -112,4 +112,4 @@ export {
112
112
  K as t
113
113
  };
114
114
 
115
- //# sourceMappingURL=select-DU_0zVbn.js.map
115
+ //# sourceMappingURL=select-xhSvDNbw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-xhSvDNbw.js","names":["BaseSelect","Select","cn","SPRING_PRESS_INLINE","usePressPulse","IconCheck","usePopupAnchor","usePopupAnchorTrigger","PopupAnchorProvider","createContext","useContext","jsx","motion","Select","SelectMultipleContext","INLINE_PRESS_SCALE","INLINE_PRESS_SPRING","Root","multiple","props","Value","Portal","List","Group","TRIGGER_BASE","Trigger","className","disabled","variant","onPointerDown","inline","motionProps","anchorRef","Icon","Positioner","sideOffset","align","alignItemWithTrigger","anchor","triggerAnchor","Popup","Item","ItemText","ItemIndicator","children","mark","GroupLabel","Select$1"],"sources":["../../src/components/select/select.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type ElementType,\n type ReactNode,\n} from \"react\";\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { SPRING_PRESS_INLINE } from \"../../motion\";\nimport { motion } from \"motion/react\";\nimport { IconCheck } from \"@tabler/icons-react\";\nimport { cn } from \"../../utils/cn\";\nimport {\n PopupAnchorProvider,\n usePopupAnchor,\n usePopupAnchorTrigger,\n} from \"../../utils/popup-anchor\";\nimport { usePressPulse } from \"../../utils/use-press-pulse\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\n/** Lets `ItemIndicator` know whether the Root is in `multiple` mode. */\nconst SelectMultipleContext = createContext(false);\n\nexport type SelectTriggerVariant = \"default\" | \"inline\";\n\n// Inline rides someone else's surface, so its pulse is shallower and snappier\n// than the default field's (0.98 / stiffness 700) — felt, not seen moving.\nconst INLINE_PRESS_SCALE = 0.99;\nconst INLINE_PRESS_SPRING = SPRING_PRESS_INLINE;\n\nfunction Root({\n multiple = false,\n ...props\n}: ComponentProps<typeof BaseSelect.Root>) {\n return (\n <SelectMultipleContext.Provider value={Boolean(multiple)}>\n <PopupAnchorProvider>\n <BaseSelect.Root multiple={multiple} {...props} />\n </PopupAnchorProvider>\n </SelectMultipleContext.Provider>\n );\n}\n\nconst Value = BaseSelect.Value;\nconst Portal = BaseSelect.Portal;\nconst List = BaseSelect.List;\nconst Group = BaseSelect.Group;\n\n// Shared by both Trigger variants — layout, easing, disabled, icon tone.\nconst TRIGGER_BASE = cn(\n \"flex cursor-pointer items-center justify-between gap-2 text-base select-none\",\n // Colors/stroke ease briefly; transform stays out (Motion owns it).\n \"transition-[color,background-color,box-shadow,outline-color] duration-150 ease-out\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n \"[&_svg]:text-pho-secondary [&_svg]:size-4\",\n);\n\nfunction Trigger({\n className,\n disabled,\n variant = \"default\",\n onPointerDown,\n ...props\n}: StyledProps<typeof BaseSelect.Trigger> & {\n /**\n * `inline` drops the field chrome (ring, background, padding, min-width)\n * to ride a host surface — an Input Group addon, a toolbar — which then\n * carries the focus/open treatment. The press pulse moves to the arrow.\n * @default \"default\"\n */\n variant?: SelectTriggerVariant;\n}) {\n // One-shot press pulse (fires on pointer-down, always completes) — the\n // Effect Button gesture family adapted for a field-sized control. Both\n // variants pulse the whole trigger; inline is shallower and quicker.\n const inline = variant === \"inline\";\n const { motionProps } = usePressPulse({\n scale: inline ? INLINE_PRESS_SCALE : 0.98,\n transition: inline ? INLINE_PRESS_SPRING : undefined,\n disabled: Boolean(disabled),\n });\n // The pulse scales the trigger as the popup opens: the popup anchors to\n // its laid-out box, so the scale doesn't resize the popup.\n const anchorRef = usePopupAnchorTrigger();\n\n return (\n <BaseSelect.Trigger\n disabled={disabled}\n onPointerDown={onPointerDown}\n // Motion owns transform; a caller-supplied `render` in props still wins.\n render={<motion.button ref={anchorRef} {...motionProps} />}\n className={cn(\n TRIGGER_BASE,\n inline\n ? // Chrome-free: no surface of its own, text inherits the host\n // tone, and the host shows focus (e.g. Input Group's shared ring).\n \"rounded-base min-w-0 bg-transparent focus-visible:outline-none\"\n : cn(\n // Flat field surface — shadows are reserved for floating\n // layers; the 15% ring-pho-primary hairline is the input edge.\n \"bg-pho-primary ring-pho-primary text-pho-primary rounded-base min-w-44 px-3 py-2 ring-1 ring-inset focus-visible:outline-none\",\n // Open or focused, the edge is Input's: the brand ring at 2px,\n // inset, in place of the hairline.\n \"data-[popup-open]:ring-pho-brand focus-visible:ring-pho-brand focus-visible:ring-2 data-[popup-open]:ring-2\",\n ),\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Icon({ className, ...props }: StyledProps<typeof BaseSelect.Icon>) {\n return (\n <BaseSelect.Icon\n className={cn(\"flex shrink-0 items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Positioner({\n className,\n sideOffset = 6,\n align = \"start\",\n alignItemWithTrigger = false,\n anchor,\n ...props\n}: StyledProps<typeof BaseSelect.Positioner>) {\n const triggerAnchor = usePopupAnchor();\n return (\n <BaseSelect.Positioner\n anchor={anchor ?? triggerAnchor}\n sideOffset={sideOffset}\n align={align}\n // Base UI defaults to the macOS-style overlap (popup covers the trigger\n // so the selected item sits on the value text) — disorienting in a page\n // flow, so Pho drops the list below the field like a menu instead.\n alignItemWithTrigger={alignItemWithTrigger}\n className={cn(\"z-50 outline-none\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseSelect.Popup>) {\n return (\n <BaseSelect.Popup\n className={cn(\n // Floating layer: keeps its elevation shadow, edged with the site\n // hairline (ring-pho-secondary, #eee/#202020).\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base max-h-[var(--available-height)] min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-y-auto p-1 ring-1 outline-none ring-inset\",\n // Effect-Button animation family, faster: the open springs from the\n // trigger edge with a slight overshoot; close is a quick ease-out.\n \"transition-[transform,opacity] duration-[140ms] ease-[cubic-bezier(0.34,1.3,0.64,1)]\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-100 data-[ending-style]:ease-out\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseSelect.Item>) {\n return (\n <BaseSelect.Item\n className={cn(\n // Fixed 1rem leading column: the selection mark lives there, so every\n // label starts at the same x whether or not it is selected.\n // `group/pho-item` feeds the multiple-mode checkbox indicator.\n \"group/pho-item text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-[calc(var(--radius-base)-4px)] py-1.5 pr-2.5 pl-2 text-base outline-none select-none\",\n // Secondary at rest; highlight lifts to primary + ghost wash (Menu idiom).\n \"data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ItemText({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.ItemText>) {\n return (\n <BaseSelect.ItemText\n // Pin to column 2: when the single-select indicator unmounts, grid\n // auto-placement would otherwise pull the label into the mark column.\n className={cn(\"col-start-2 min-w-0\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Leading selection mark, mode-aware. Single: a brand check that appears in\n * the reserved column. Multiple: an always-visible checkbox box that fills\n * with the same quiet fill/stroke ease as the standalone Checkbox.\n */\nfunction ItemIndicator({\n className,\n children,\n ...props\n}: StyledProps<typeof BaseSelect.ItemIndicator> & { children?: ReactNode }) {\n const multiple = useContext(SelectMultipleContext);\n const mark = children ?? <IconCheck />;\n\n if (multiple) {\n return (\n <span\n aria-hidden\n className={cn(\n \"col-start-1 flex size-4 shrink-0 items-center justify-center rounded-sm ring-1 ring-inset\",\n \"bg-pho-primary ring-pho-primary text-pho-on-brand\",\n // Fill + stroke ease together on toggle — Checkbox's transition.\n \"transition-[background-color,box-shadow,color] duration-150 ease-out\",\n \"group-data-[selected]/pho-item:bg-pho-brand-solid group-data-[selected]/pho-item:ring-transparent\",\n )}\n >\n <BaseSelect.ItemIndicator\n className={cn(\n \"flex items-center justify-center [&>svg]:size-3\",\n // Glyph pops with the fill; exits on the same path.\n \"transition-[transform,opacity] duration-150 ease-out\",\n \"data-[starting-style]:scale-50 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-50 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n >\n {mark}\n </BaseSelect.ItemIndicator>\n </span>\n );\n }\n\n return (\n <BaseSelect.ItemIndicator\n className={cn(\n \"text-pho-brand col-start-1 flex size-4 items-center justify-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n >\n {mark}\n </BaseSelect.ItemIndicator>\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.GroupLabel>) {\n return (\n <BaseSelect.GroupLabel\n className={cn(\n \"text-pho-secondary px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Select built on Base UI `Select` — pick one option (or several with\n * `multiple`) from a list that opens below the trigger on click; the pattern\n * other design systems call a picker. Pass `items` to `Select.Root`, render an\n * `Item` per option, and show the selection with `Select.Value`. For a short,\n * always-visible set use `RadioGroup`; to filter a long list by typing use\n * `Combobox`.\n */\nexport const Select = {\n Root,\n Trigger,\n Value,\n Icon,\n Portal,\n Positioner,\n Popup,\n List,\n Item,\n ItemText,\n ItemIndicator,\n Group,\n GroupLabel,\n};\n"],"mappings":";;;;;;;;;;AA4BA,IAAMc,IAAwBL,EAAc,EAAK,GAM3CM,IAAqB,MACrBC,IAAsBb;AAE5B,SAASc,EAAK,EACZ,UAAAC,IAAW,IACX,GAAGC,EAAA,GACsC;AACzC,SACE,gBAAAR,EAACG,EAAsB,UAAvB;AAAA,IAAgC,OAAO,EAAQI;AAAA,IAC7C,UAAA,gBAAAP,EAACH,GAAD,EAAA,UACE,gBAAAG,EAACX,EAAW,MAAZ;AAAA,MAA2B,UAAAkB;AAAA,MAAU,GAAIC;AAAA,IAAQ,CAAA,EAC9B,CAAA;AAAA,EACS,CAAA;AAEpC;AAEA,IAAMC,IAAQpB,EAAW,OACnBqB,IAASrB,EAAW,QACpBsB,IAAOtB,EAAW,MAClBuB,IAAQvB,EAAW,OAGnBwB,IAAetB,EACnB,gFAEA,sFACA,iEACA,2CACF;AAEA,SAASuB,EAAQ,EACf,WAAAC,GACA,UAAAC,GACA,SAAAC,IAAU,WACV,eAAAC,GACA,GAAGV,EAAA,GASF;AAID,QAAMW,IAASF,MAAY,UACrB,EAAE,aAAAG,EAAA,IAAgB3B,EAAc;AAAA,IACpC,OAAO0B,IAASf,IAAqB;AAAA,IACrC,YAAYe,IAASd,IAAsB;AAAA,IAC3C,UAAU,EAAQW;AAAA,EACpB,CAAC,GAGKK,IAAYzB,EAAsB;AAExC,SACE,gBAAAI,EAACX,EAAW,SAAZ;AAAA,IACY,UAAA2B;AAAA,IACK,eAAAE;AAAA,IAEf,QAAQ,gBAAAlB,EAACC,EAAO,QAAR;AAAA,MAAe,KAAKoB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IAC9C,GAAIP;AAAA,EACL,CAAA;AAEL;AAOA,SAASwB,EAAc,EACrB,WAAAjB,GACA,UAAAkB,GACA,GAAGzB,EAAA,GACuE;AAC1E,QAAMD,IAAWR,EAAWI,CAAqB,GAC3C+B,IAAOD,KAAY,gBAAAjC,EAACN,GAAD,CAAY,CAAA;AAErC,SAAIa,IAEA,gBAAAP,EAAC,QAAD;AAAA,IACE,eAAA;AAAA,IACA,WAAWT,EACT,6FACA,qDAEA,wEACA,mGACF;AAAA,IAEA,UAAA,gBAAAS,EAACX,EAAW,eAAZ;AAAA,MACE,WAAWE,EACT,mDAEA,wDACA,kEACA,8DACAwB,CACF;AAAA,MACA,GAAIP;AAAA,MAEH,UAAA0B;AAAA,IACuB,CAAA;AAAA,EACtB,CAAA,IAKR,gBAAAlC,EAACX,EAAW,eAAZ;AAAA,IACE,WAAWE,EACT,qFACAwB,CACF;AAAA,IACA,GAAIP;AAAA,IAEH,UAAA0B;AAAA,EACuB,CAAA;AAE9B;AAEA,SAASC,EAAW,EAClB,WAAApB,GACA,GAAGP,EAAA,GACyC;AAC5C,SACE,gBAAAR,EAACX,EAAW,YAAZ;AAAA,IACE,WAAWE,EACT,wDACAwB,CACF;AAAA,IACA,GAAIP;AAAA,EACL,CAAA;AAEL;AAUA,IAAalB,IAAS;AAAA,EACpB,MAAAgB;AAAA,EACA,SAAAQ;AAAA,EACA,OAAAL;AAAA,EACA,MAAAa;AAAA,EACA,QAAAZ;AAAA,EACA,YAAAa;AAAA,EACA,OAAAM;AAAA,EACA,MAAAlB;AAAA,EACA,MAAAmB;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,OAAApB;AAAA,EACA,YAAAuB;AACF"}
@@ -1,17 +1,17 @@
1
1
  "use client";
2
- import { t as n } from "./cn-ChIgwEl3.js";
2
+ import { t as n } from "./cn-CPbhpG1q.js";
3
3
  import { t as ee } from "./is-react-component-DSnjtBmo.js";
4
4
  import { n as te } from "./link-provider-DXzDQ08N.js";
5
5
  import { SPRING_PRESS as re } from "../motion.js";
6
- import { a as ae, u as ne } from "./button-C9VqBBIr.js";
7
- import { t as oe } from "./createReactComponent-BqCmnqfX.js";
8
- import { t as se } from "./IconArrowUpRight-DGgKzQwV.js";
9
- import { t as ie } from "./IconChevronRight-CzoJnYNI.js";
10
- import { n as _ } from "./avatar-BkmGDIqf.js";
11
- import { t as le } from "./IconSearch-BKAHkLyX.js";
12
- import { t as x } from "./scroll-area-DSwD9th7.js";
13
- import { t as L } from "./collapsible-Dv306QOT.js";
14
- import { t as ce } from "./kbd-DNI10uy7.js";
6
+ import { a as ae, u as ne } from "./button-CLfWdqm-.js";
7
+ import { t as oe } from "./createReactComponent-yKZn9MIX.js";
8
+ import { t as se } from "./IconArrowUpRight-OK8Fp0KQ.js";
9
+ import { t as ie } from "./IconChevronRight-BNkXCTk6.js";
10
+ import { n as _ } from "./avatar-PgBOfszL.js";
11
+ import { t as le } from "./IconSearch-DkcWWZ1H.js";
12
+ import { t as x } from "./scroll-area-Dhl5hqay.js";
13
+ import { t as L } from "./collapsible-C2tn_b1Q.js";
14
+ import { t as ce } from "./kbd-DWDs_6U1.js";
15
15
  import { createContext as P, isValidElement as pe, useCallback as z, useContext as G, useEffect as T, useId as ue, useLayoutEffect as me, useMemo as K, useRef as w, useState as C } from "react";
16
16
  import { Fragment as de, jsx as t, jsxs as c } from "react/jsx-runtime";
17
17
  import { motion as I } from "motion/react";
@@ -303,4 +303,4 @@ export {
303
303
  We as u
304
304
  };
305
305
 
306
- //# sourceMappingURL=sidebar-BP39w1iA.js.map
306
+ //# sourceMappingURL=sidebar-CgaSEWVr.js.map