asta-ui 0.9.7 → 0.9.8

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 (430) hide show
  1. package/css/asta.css +2 -2
  2. package/css/asta.js +175 -45
  3. package/css/components.css +76 -76
  4. package/css/runtime/agent.js +31 -10
  5. package/css/runtime/assist.js +0 -1
  6. package/css/runtime/blocks.js +15 -3
  7. package/css/runtime/core.js +3 -3
  8. package/css/runtime/forms.js +2 -2
  9. package/css/runtime/modules.js +30 -9
  10. package/css/runtime/overlays.js +93 -16
  11. package/css/src/assist.css +4 -4
  12. package/css/src/blocks.css +12 -12
  13. package/css/src/controls.css +3 -3
  14. package/css/src/core.css +23 -23
  15. package/css/src/data.css +10 -10
  16. package/css/src/display.css +5 -5
  17. package/css/src/forms.css +3 -3
  18. package/css/src/overlays.css +16 -16
  19. package/css/tokens.css +3 -0
  20. package/dist/add-to-cart.js +2 -1
  21. package/dist/agent-plan.js +1 -1
  22. package/dist/agent-team.js +1 -1
  23. package/dist/ai-chat.js +1 -1
  24. package/dist/alert.js +1 -1
  25. package/dist/announcement-bar.js +1 -1
  26. package/dist/api-keys.js +1 -1
  27. package/dist/autonomy-dial.js +2 -1
  28. package/dist/avatar-group.js +2 -2
  29. package/dist/avatar.js +1 -1
  30. package/dist/badge.js +1 -1
  31. package/dist/base/add-to-cart.js +2 -1
  32. package/dist/base/agent-plan.js +1 -1
  33. package/dist/base/agent-team.js +1 -1
  34. package/dist/base/ai-chat.js +1 -1
  35. package/dist/base/alert.js +1 -1
  36. package/dist/base/announcement-bar.js +1 -1
  37. package/dist/base/api-keys.js +1 -1
  38. package/dist/base/autonomy-dial.js +2 -1
  39. package/dist/base/avatar-group.js +2 -2
  40. package/dist/base/avatar.js +1 -1
  41. package/dist/base/badge.js +1 -1
  42. package/dist/base/billing.js +2 -2
  43. package/dist/base/booking-slots.js +2 -1
  44. package/dist/base/button.js +1 -1
  45. package/dist/base/candlestick.js +1 -1
  46. package/dist/base/card-checkout.js +2 -1
  47. package/dist/base/cart-drawer.js +2 -1
  48. package/dist/base/change-ledger.js +2 -1
  49. package/dist/base/chat-thread.js +2 -1
  50. package/dist/base/checkbox-aui-052.js +1 -1
  51. package/dist/base/checkbox-aui-053.js +1 -1
  52. package/dist/base/checkbox-aui-054.js +1 -1
  53. package/dist/base/checkbox.js +1 -1
  54. package/dist/base/checkout.js +3 -3
  55. package/dist/base/citations.js +1 -1
  56. package/dist/base/combobox-aui-046.js +1 -1
  57. package/dist/base/combobox-aui-047.js +1 -1
  58. package/dist/base/combobox.js +1 -1
  59. package/dist/base/comments.js +3 -3
  60. package/dist/base/context-meter.js +2 -2
  61. package/dist/base/cookie-consent.js +2 -2
  62. package/dist/base/data-table.js +1 -1
  63. package/dist/base/date-picker-aui-050.js +1 -1
  64. package/dist/base/date-picker-aui-051.js +1 -1
  65. package/dist/base/date-picker.js +1 -1
  66. package/dist/base/dialog.js +1 -1
  67. package/dist/base/drawer.js +1 -1
  68. package/dist/base/dropdown-menu.js +2 -2
  69. package/dist/base/elastic-string.js +2 -1
  70. package/dist/base/empty-state.js +2 -2
  71. package/dist/base/event-calendar.js +1 -1
  72. package/dist/base/fallback-chain.js +1 -1
  73. package/dist/base/field.js +1 -1
  74. package/dist/base/file-manager.js +2 -2
  75. package/dist/base/flash-sale.js +1 -1
  76. package/dist/base/footer-aui-026.js +1 -1
  77. package/dist/base/footer-aui-027.js +1 -1
  78. package/dist/base/footer.js +2 -2
  79. package/dist/base/gravity-pills.js +1 -1
  80. package/dist/base/hold-to-confirm.js +1 -1
  81. package/dist/base/inbox.js +3 -3
  82. package/dist/base/ink-trail.js +2 -1
  83. package/dist/base/input.js +1 -1
  84. package/dist/base/invoice.js +2 -2
  85. package/dist/base/kanban.js +2 -2
  86. package/dist/base/menubar.js +1 -1
  87. package/dist/base/model-picker.js +1 -1
  88. package/dist/base/motion-button.js +1 -1
  89. package/dist/base/navbar-aui-010.js +1 -1
  90. package/dist/base/navbar-aui-011.js +1 -1
  91. package/dist/base/navbar-aui-012.js +1 -1
  92. package/dist/base/navbar-aui-014.js +1 -1
  93. package/dist/base/navbar.js +2 -2
  94. package/dist/base/needle-field.js +1 -1
  95. package/dist/base/notification-center.js +3 -3
  96. package/dist/base/notification-stack.js +2 -1
  97. package/dist/base/now-playing.js +2 -1
  98. package/dist/base/onboarding.js +2 -2
  99. package/dist/base/otp-input-aui-042.js +1 -1
  100. package/dist/base/password-input-aui-040.js +1 -1
  101. package/dist/base/password-input.js +1 -1
  102. package/dist/base/pay-methods.js +2 -1
  103. package/dist/base/payment-received.js +2 -1
  104. package/dist/base/payment-status.js +2 -1
  105. package/dist/base/pixel-reveal.js +1 -1
  106. package/dist/base/plan-switcher.js +2 -1
  107. package/dist/base/popover.js +1 -1
  108. package/dist/base/price-alert.js +1 -1
  109. package/dist/base/price-chart.js +2 -1
  110. package/dist/base/pricing-aui-021.js +1 -1
  111. package/dist/base/pricing-aui-022.js +1 -1
  112. package/dist/base/pricing-aui-023.js +1 -1
  113. package/dist/base/pricing-aui-024.js +1 -1
  114. package/dist/base/pricing.js +2 -2
  115. package/dist/base/prompt-composer.js +1 -1
  116. package/dist/base/radio-group-aui-055.js +1 -1
  117. package/dist/base/radio-group-aui-057.js +1 -1
  118. package/dist/base/radio-group.js +1 -1
  119. package/dist/base/range-slider.js +1 -1
  120. package/dist/base/scramble-text.js +1 -1
  121. package/dist/base/scrub-input.js +1 -1
  122. package/dist/base/seat-picker.js +2 -1
  123. package/dist/base/select-aui-043.js +1 -1
  124. package/dist/base/settings-panel.js +2 -2
  125. package/dist/base/shipment-tracker.js +2 -1
  126. package/dist/base/sidebar.js +2 -2
  127. package/dist/base/sign-in.js +2 -2
  128. package/dist/base/skeleton.js +1 -1
  129. package/dist/base/slider-aui-062.js +1 -1
  130. package/dist/base/slider.js +1 -1
  131. package/dist/base/snap-grid.js +1 -1
  132. package/dist/base/sortable-list.js +1 -1
  133. package/dist/base/spinner.js +1 -1
  134. package/dist/base/split-bill.js +1 -1
  135. package/dist/base/split-flap.js +2 -1
  136. package/dist/base/stepper.js +1 -1
  137. package/dist/base/tabs.js +1 -1
  138. package/dist/base/tag-input-aui-048.js +1 -1
  139. package/dist/base/tag-input.js +1 -1
  140. package/dist/base/team-members.js +3 -3
  141. package/dist/base/testimonials.js +2 -2
  142. package/dist/base/textarea-aui-002.js +1 -1
  143. package/dist/base/textarea-aui-006.js +1 -1
  144. package/dist/base/textarea-aui-007.js +1 -1
  145. package/dist/base/textarea-aui-008.js +1 -1
  146. package/dist/base/textarea-aui-037.js +1 -1
  147. package/dist/base/textarea.js +1 -1
  148. package/dist/base/toast.js +1 -1
  149. package/dist/base/token-swap.js +2 -1
  150. package/dist/base/tool-dock.js +1 -1
  151. package/dist/base/trade-ticket.js +2 -1
  152. package/dist/base/variant-picker.js +2 -1
  153. package/dist/base/wishlist.js +2 -1
  154. package/dist/base/workspace-switcher.js +1 -1
  155. package/dist/base.js +125 -124
  156. package/dist/billing.js +2 -2
  157. package/dist/booking-slots.js +2 -1
  158. package/dist/button.js +1 -1
  159. package/dist/candlestick.js +1 -1
  160. package/dist/card-checkout.js +2 -1
  161. package/dist/cart-drawer.js +2 -1
  162. package/dist/change-ledger.js +2 -1
  163. package/dist/chat-thread.js +2 -1
  164. package/dist/checkbox-aui-052.js +1 -1
  165. package/dist/checkbox-aui-053.js +1 -1
  166. package/dist/checkbox-aui-054.js +1 -1
  167. package/dist/checkbox.js +1 -1
  168. package/dist/checkout.js +3 -3
  169. package/dist/{chunk-EKPTPTKK.js → chunk-2DECQKLI.js} +2 -2
  170. package/dist/{chunk-BEV2X4YL.js → chunk-2RB5T6WP.js} +51 -11
  171. package/dist/{chunk-VNUX5LOC.js → chunk-2SOX7WUL.js} +5 -5
  172. package/dist/{chunk-H4NFBYKY.js → chunk-3G2L5A4O.js} +8 -2
  173. package/dist/{chunk-OKCSTMX3.js → chunk-3LJ72YR4.js} +4 -1
  174. package/dist/{chunk-6RA7LJ3K.js → chunk-3OCWR4L3.js} +13 -8
  175. package/dist/{chunk-RFVKRVTD.js → chunk-3PLPK7QK.js} +3 -3
  176. package/dist/{chunk-TMOEFAXQ.js → chunk-3PLQKAD7.js} +15 -2
  177. package/dist/{chunk-57PESBSZ.js → chunk-3PSV752Q.js} +1 -1
  178. package/dist/{chunk-5N2G462S.js → chunk-3XHG7P5T.js} +2 -2
  179. package/dist/{chunk-X4JYOCFA.js → chunk-4CIRS3OI.js} +18 -17
  180. package/dist/{chunk-XYQI4ZYV.js → chunk-4GWJFDSU.js} +1 -1
  181. package/dist/{chunk-KEMMI76V.js → chunk-4RBIAKO6.js} +2 -2
  182. package/dist/{chunk-YJAZHJY3.js → chunk-56VKEODT.js} +1 -1
  183. package/dist/{chunk-3RMCFFW2.js → chunk-5CAZEFDX.js} +8 -8
  184. package/dist/{chunk-JVTDNOHQ.js → chunk-5OSKT7O3.js} +2 -2
  185. package/dist/{chunk-ZWBJUJTR.js → chunk-5ZQ6PMJT.js} +2 -2
  186. package/dist/{chunk-YPFZXGPT.js → chunk-5ZTFP7P6.js} +1 -1
  187. package/dist/{chunk-P37H477M.js → chunk-633N6IVU.js} +3 -3
  188. package/dist/{chunk-EXX6YSUX.js → chunk-64UK5LOT.js} +2 -2
  189. package/dist/{chunk-TLODJONC.js → chunk-66MJ6EEU.js} +1 -1
  190. package/dist/{chunk-HVFB44HO.js → chunk-6D4LHBWD.js} +2 -2
  191. package/dist/{chunk-D4AYULMF.js → chunk-6NR46VEH.js} +2 -2
  192. package/dist/{chunk-BIYNJDPD.js → chunk-6OZZ24UL.js} +2 -2
  193. package/dist/{chunk-EN6XBXW5.js → chunk-6ZGHPBHD.js} +3 -2
  194. package/dist/{chunk-C2G5BUEG.js → chunk-74WYX24P.js} +23 -14
  195. package/dist/{chunk-FQ4YUKAE.js → chunk-765WRI6C.js} +3 -3
  196. package/dist/{chunk-5RPJPL2V.js → chunk-7HI4HJFN.js} +62 -26
  197. package/dist/{chunk-IVCHYE55.js → chunk-7IOMROVG.js} +13 -8
  198. package/dist/{chunk-ECGJ6D5D.js → chunk-7PHSPBJK.js} +1 -1
  199. package/dist/{chunk-O626XQW2.js → chunk-ALDX2G5E.js} +15 -2
  200. package/dist/{chunk-2PPF4GK5.js → chunk-ALRSHXXA.js} +58 -29
  201. package/dist/{chunk-FT7WZV3D.js → chunk-AMFNY7IA.js} +13 -4
  202. package/dist/{chunk-LKRE4HLZ.js → chunk-AQV7BK73.js} +73 -34
  203. package/dist/{chunk-ZZ25XSK2.js → chunk-B3WWWKHW.js} +2 -1
  204. package/dist/{chunk-OFYGJUKP.js → chunk-BT77ALVB.js} +1 -1
  205. package/dist/{chunk-FOJRZASV.js → chunk-BWAOBM2E.js} +32 -8
  206. package/dist/{chunk-TXC6CCSA.js → chunk-BWYPKOG3.js} +1 -1
  207. package/dist/{chunk-F4CWSZXK.js → chunk-BXNC35OZ.js} +1 -1
  208. package/dist/{chunk-5DLY6FGD.js → chunk-CMOI7V4H.js} +1 -1
  209. package/dist/{chunk-5OHHGQV6.js → chunk-CRGCVJLS.js} +3 -3
  210. package/dist/{chunk-BV5HEXB5.js → chunk-CTWW5QOS.js} +5 -5
  211. package/dist/{chunk-ANL6VX4X.js → chunk-DEAQSJ4Z.js} +1 -1
  212. package/dist/{chunk-DWPGFNNF.js → chunk-DITROAPF.js} +32 -14
  213. package/dist/{chunk-EAHHWF3V.js → chunk-DSLKU6QJ.js} +32 -14
  214. package/dist/{chunk-ZGMBQZDV.js → chunk-DUXOV6MO.js} +28 -15
  215. package/dist/{chunk-DWZT455C.js → chunk-DZU5SMC3.js} +5 -5
  216. package/dist/{chunk-VUDTGRS3.js → chunk-EWSQCTIB.js} +1 -1
  217. package/dist/{chunk-FFRJW5O7.js → chunk-FA4A2EGP.js} +2 -2
  218. package/dist/{chunk-NZRQL3SA.js → chunk-FAHOYAQH.js} +1 -1
  219. package/dist/{chunk-NPVUFQGC.js → chunk-FDI2X6DY.js} +1 -1
  220. package/dist/{chunk-JNNMKFEQ.js → chunk-FGN7KDKD.js} +1 -1
  221. package/dist/{chunk-Q5A5OTLI.js → chunk-FOHY7LPU.js} +1 -1
  222. package/dist/{chunk-CBJUY4WE.js → chunk-FPOH7ETA.js} +1 -1
  223. package/dist/chunk-FS2PZKJY.js +43 -0
  224. package/dist/{chunk-XKA3LTJZ.js → chunk-FW45BTSS.js} +2 -2
  225. package/dist/{chunk-UZF7SCRT.js → chunk-G3FPQ3XG.js} +4 -4
  226. package/dist/{chunk-TAAAYFBT.js → chunk-GTS6MKPD.js} +2 -2
  227. package/dist/{chunk-7UMBKY3H.js → chunk-H46UXFHV.js} +1 -1
  228. package/dist/{chunk-B4XRAVHL.js → chunk-H7OVE6OB.js} +3 -3
  229. package/dist/{chunk-7RCBOTWL.js → chunk-HKOPYHLZ.js} +15 -8
  230. package/dist/{chunk-UXRTPEH7.js → chunk-HRQUTQSW.js} +9 -7
  231. package/dist/{chunk-WSL4JGEA.js → chunk-HSDMCZMX.js} +2 -2
  232. package/dist/{chunk-72UKXOMW.js → chunk-IBJA4ZM5.js} +14 -5
  233. package/dist/{chunk-F526V5BA.js → chunk-ID5GN2VU.js} +2 -2
  234. package/dist/{chunk-WO36QUH3.js → chunk-IDEK35SZ.js} +4 -1
  235. package/dist/{chunk-W5M3EHJL.js → chunk-IU4OH5MB.js} +3 -3
  236. package/dist/{chunk-SR4NYQWO.js → chunk-IVR3ZIXB.js} +1 -1
  237. package/dist/{chunk-PSTMF66E.js → chunk-JGZHWQGV.js} +5 -5
  238. package/dist/{chunk-2LM3VHNO.js → chunk-JJ473HJ2.js} +2 -1
  239. package/dist/{chunk-PZ2ZUHC3.js → chunk-JQX5KR7O.js} +15 -5
  240. package/dist/{chunk-TL32C2SQ.js → chunk-K3ASWIQF.js} +8 -2
  241. package/dist/{chunk-UTGEGGSE.js → chunk-K3SP537A.js} +12 -11
  242. package/dist/{chunk-SCQ6A4ZG.js → chunk-KATSSAVI.js} +8 -2
  243. package/dist/{chunk-MUDW65ZT.js → chunk-KCORGXZI.js} +32 -9
  244. package/dist/{chunk-LDTCIVDX.js → chunk-L67VH7II.js} +1 -1
  245. package/dist/{chunk-SPKSRH6G.js → chunk-LGGGLQAD.js} +10 -9
  246. package/dist/{chunk-IDXERBKL.js → chunk-LQR5OD3Z.js} +3 -2
  247. package/dist/{chunk-F7LAUVDJ.js → chunk-M362TW4G.js} +1 -1
  248. package/dist/{chunk-DNROUJ62.js → chunk-MBMY2VYS.js} +11 -6
  249. package/dist/{chunk-N6FMS47F.js → chunk-MEIRPHQO.js} +26 -21
  250. package/dist/{chunk-DU3CZ3K7.js → chunk-MIDBYG4B.js} +17 -4
  251. package/dist/{chunk-OH5VAD27.js → chunk-MKCLD2HJ.js} +1 -1
  252. package/dist/{chunk-FLCT7THQ.js → chunk-MNWZP3S2.js} +1 -1
  253. package/dist/{chunk-OXLBH4QM.js → chunk-MT3VMDV4.js} +1 -1
  254. package/dist/chunk-MVGUQ36E.js +75 -0
  255. package/dist/{chunk-RQNXELUL.js → chunk-MXRBXBE3.js} +1 -1
  256. package/dist/{chunk-IATF2OTU.js → chunk-MYPRORYG.js} +14 -5
  257. package/dist/{chunk-V7JUJQNR.js → chunk-N7XJO5Q4.js} +1 -1
  258. package/dist/{chunk-ISZ7O2Q6.js → chunk-O6GCB7HD.js} +10 -9
  259. package/dist/{chunk-EG7NXGDD.js → chunk-OFUEFWOK.js} +19 -6
  260. package/dist/{chunk-ZUH7XRX7.js → chunk-OFWUA5BO.js} +3 -2
  261. package/dist/{chunk-ZQV2GAWY.js → chunk-OJNEZ5AY.js} +10 -9
  262. package/dist/{chunk-DPLH3EGO.js → chunk-OOK5CF2D.js} +91 -39
  263. package/dist/{chunk-BG2W2KVE.js → chunk-ORZVPZQP.js} +8 -2
  264. package/dist/{chunk-RBTX7TVA.js → chunk-OSZXWKKH.js} +3 -3
  265. package/dist/{chunk-DWA62IYV.js → chunk-OUGWYBWG.js} +3 -3
  266. package/dist/{chunk-QJXVIEB5.js → chunk-P3XPSBST.js} +2 -2
  267. package/dist/{chunk-37JQA6PI.js → chunk-PHI4NQLJ.js} +1 -1
  268. package/dist/{chunk-KEMC4RIF.js → chunk-PLQ6CYRC.js} +1 -1
  269. package/dist/{chunk-JF4BKHFK.js → chunk-PNN2M3V3.js} +2 -2
  270. package/dist/{chunk-45KDL3JM.js → chunk-PZA44CGX.js} +1 -1
  271. package/dist/{chunk-SUWA7DM6.js → chunk-Q3KZWQWK.js} +2 -1
  272. package/dist/{chunk-DD2TBHSJ.js → chunk-Q6IUIKAE.js} +1 -1
  273. package/dist/{chunk-JAQKJBVJ.js → chunk-QEHCINJG.js} +3 -3
  274. package/dist/{chunk-EOZDJA7Z.js → chunk-QJ7QZWXJ.js} +1 -1
  275. package/dist/{chunk-RSUZHZCG.js → chunk-QKAFDPXO.js} +12 -11
  276. package/dist/{chunk-VS3GQ4JR.js → chunk-QLIA6OT4.js} +7 -5
  277. package/dist/{chunk-3PQTSFOS.js → chunk-QMH6X4OV.js} +1 -1
  278. package/dist/{chunk-FIPWA5KL.js → chunk-QRU57VKP.js} +27 -9
  279. package/dist/{chunk-W6YVDJHX.js → chunk-RAEOJYMR.js} +2 -2
  280. package/dist/{chunk-XNL5BLUR.js → chunk-RJZ37JRF.js} +8 -7
  281. package/dist/{chunk-NVLYF4UL.js → chunk-RPOV3WAK.js} +55 -13
  282. package/dist/{chunk-WNPMHOXE.js → chunk-RQ673YJJ.js} +1 -1
  283. package/dist/{chunk-6322OCI4.js → chunk-RVVYQ6J5.js} +20 -9
  284. package/dist/{chunk-MDB4RFMV.js → chunk-SDUD2HI2.js} +3 -3
  285. package/dist/{chunk-3ZFF6VC5.js → chunk-SK6M4GOD.js} +11 -10
  286. package/dist/{chunk-H4URFOQC.js → chunk-TAN5UNTZ.js} +36 -5
  287. package/dist/{chunk-FT66LAUZ.js → chunk-UACKIMP4.js} +2 -1
  288. package/dist/{chunk-45IXJ7W7.js → chunk-UINHBFRO.js} +12 -10
  289. package/dist/{chunk-VWYX5IRP.js → chunk-USBGON3T.js} +38 -16
  290. package/dist/{chunk-U6N7CZYN.js → chunk-V4O44BPH.js} +2 -2
  291. package/dist/{chunk-ADZI4ROA.js → chunk-VDUU5243.js} +1 -0
  292. package/dist/{chunk-7MBTBYTJ.js → chunk-VDWLZWAT.js} +3 -3
  293. package/dist/{chunk-CSTI5CTF.js → chunk-VEKYE733.js} +1 -1
  294. package/dist/{chunk-MAKFUH34.js → chunk-VI6565XF.js} +3 -3
  295. package/dist/{chunk-PAXDHYBX.js → chunk-VIFKQE2H.js} +79 -16
  296. package/dist/{chunk-JRD6FENH.js → chunk-VTZDMX2U.js} +18 -9
  297. package/dist/{chunk-WRB66XD3.js → chunk-VYO4JJVI.js} +3 -1
  298. package/dist/{chunk-E4MX3E3B.js → chunk-W723JZDF.js} +22 -7
  299. package/dist/{chunk-U7VX6A6K.js → chunk-WA4HAXEF.js} +40 -15
  300. package/dist/{chunk-LPTY5WXM.js → chunk-WBRRSZW4.js} +2 -2
  301. package/dist/{chunk-44DNL43W.js → chunk-WDOI4U7K.js} +1 -1
  302. package/dist/{chunk-UBTYMAKF.js → chunk-WIX5IGDH.js} +5 -8
  303. package/dist/{chunk-MPH64VG7.js → chunk-WOMLNEGP.js} +3 -3
  304. package/dist/{chunk-JWBGI7FN.js → chunk-WVXAVILO.js} +91 -39
  305. package/dist/{chunk-YRPLUNP4.js → chunk-X4M6RXNL.js} +2 -2
  306. package/dist/{chunk-FDE3S2YK.js → chunk-XCKKECIR.js} +2 -2
  307. package/dist/{chunk-4SLC3EK6.js → chunk-XGNTNUAT.js} +79 -16
  308. package/dist/{chunk-Z5GNX2S3.js → chunk-XN2OBKPK.js} +1 -1
  309. package/dist/{chunk-SDL3JXFN.js → chunk-XSNQN67K.js} +1 -1
  310. package/dist/{chunk-ZE7BT2K4.js → chunk-Y3QA2RIG.js} +70 -13
  311. package/dist/{chunk-25RCKHWV.js → chunk-YDKATODA.js} +3 -2
  312. package/dist/{chunk-5GGS6VP5.js → chunk-YUOEZYRP.js} +1 -1
  313. package/dist/{chunk-OBU2UOYI.js → chunk-YV3D4CPO.js} +2 -2
  314. package/dist/{chunk-6HPSPZTF.js → chunk-YXEAYRUY.js} +10 -9
  315. package/dist/{chunk-R3LWG23K.js → chunk-Z5TG7ZGD.js} +15 -8
  316. package/dist/{chunk-ITGWD7ZY.js → chunk-ZH5A4YKQ.js} +2 -2
  317. package/dist/{chunk-QASSYLQQ.js → chunk-ZJLQDN5R.js} +2 -2
  318. package/dist/{chunk-CZCZB5YP.js → chunk-ZK4DK2SS.js} +1 -1
  319. package/dist/{chunk-24O5V2PQ.js → chunk-ZMCNI37U.js} +1 -1
  320. package/dist/{chunk-BKHH2CJA.js → chunk-ZNH7MSLM.js} +1 -1
  321. package/dist/{chunk-PIE76JKF.js → chunk-ZO25PAJA.js} +1 -1
  322. package/dist/{chunk-RGVRHFKY.js → chunk-ZXHMJKJY.js} +4 -2
  323. package/dist/{chunk-UC55XR76.js → chunk-ZYZHLWFL.js} +8 -2
  324. package/dist/citations.js +1 -1
  325. package/dist/combobox-aui-046.js +1 -1
  326. package/dist/combobox-aui-047.js +1 -1
  327. package/dist/combobox.js +1 -1
  328. package/dist/comments.js +3 -3
  329. package/dist/context-meter.js +2 -2
  330. package/dist/cookie-consent.js +2 -2
  331. package/dist/data-table.js +1 -1
  332. package/dist/date-picker-aui-050.js +1 -1
  333. package/dist/date-picker-aui-051.js +1 -1
  334. package/dist/date-picker.js +1 -1
  335. package/dist/dialog.js +1 -1
  336. package/dist/drawer.js +1 -1
  337. package/dist/dropdown-menu.js +2 -2
  338. package/dist/elastic-string.js +2 -1
  339. package/dist/empty-state.js +2 -2
  340. package/dist/event-calendar.js +1 -1
  341. package/dist/fallback-chain.js +1 -1
  342. package/dist/field.js +1 -1
  343. package/dist/file-manager.js +2 -2
  344. package/dist/flash-sale.js +1 -1
  345. package/dist/footer-aui-026.js +1 -1
  346. package/dist/footer-aui-027.js +1 -1
  347. package/dist/footer.js +2 -2
  348. package/dist/gravity-pills.js +1 -1
  349. package/dist/hold-to-confirm.js +1 -1
  350. package/dist/inbox.js +3 -3
  351. package/dist/index.js +126 -125
  352. package/dist/ink-trail.js +2 -1
  353. package/dist/input.js +1 -1
  354. package/dist/invoice.js +2 -2
  355. package/dist/kanban.js +2 -2
  356. package/dist/menubar.js +1 -1
  357. package/dist/model-picker.js +1 -1
  358. package/dist/motion-button.js +1 -1
  359. package/dist/navbar-aui-010.js +1 -1
  360. package/dist/navbar-aui-011.js +1 -1
  361. package/dist/navbar-aui-012.js +1 -1
  362. package/dist/navbar-aui-014.js +1 -1
  363. package/dist/navbar.js +2 -2
  364. package/dist/needle-field.js +1 -1
  365. package/dist/notification-center.js +3 -3
  366. package/dist/notification-stack.js +2 -1
  367. package/dist/now-playing.js +2 -1
  368. package/dist/onboarding.js +2 -2
  369. package/dist/otp-input-aui-042.js +1 -1
  370. package/dist/password-input-aui-040.js +1 -1
  371. package/dist/password-input.js +1 -1
  372. package/dist/pay-methods.js +2 -1
  373. package/dist/payment-received.js +2 -1
  374. package/dist/payment-status.js +2 -1
  375. package/dist/pixel-reveal.js +1 -1
  376. package/dist/plan-switcher.js +2 -1
  377. package/dist/popover.js +1 -1
  378. package/dist/price-alert.js +1 -1
  379. package/dist/price-chart.js +2 -1
  380. package/dist/pricing-aui-021.js +1 -1
  381. package/dist/pricing-aui-022.js +1 -1
  382. package/dist/pricing-aui-023.js +1 -1
  383. package/dist/pricing-aui-024.js +1 -1
  384. package/dist/pricing.js +2 -2
  385. package/dist/prompt-composer.js +1 -1
  386. package/dist/radio-group-aui-055.js +1 -1
  387. package/dist/radio-group-aui-057.js +1 -1
  388. package/dist/radio-group.js +1 -1
  389. package/dist/range-slider.js +1 -1
  390. package/dist/scramble-text.js +1 -1
  391. package/dist/scrub-input.js +1 -1
  392. package/dist/seat-picker.js +2 -1
  393. package/dist/select-aui-043.js +1 -1
  394. package/dist/settings-panel.js +2 -2
  395. package/dist/shipment-tracker.js +2 -1
  396. package/dist/sidebar.js +2 -2
  397. package/dist/sign-in.js +2 -2
  398. package/dist/skeleton.js +1 -1
  399. package/dist/slider-aui-062.js +1 -1
  400. package/dist/slider.js +1 -1
  401. package/dist/snap-grid.js +1 -1
  402. package/dist/sortable-list.js +1 -1
  403. package/dist/spinner.js +1 -1
  404. package/dist/split-bill.js +1 -1
  405. package/dist/split-flap.js +2 -1
  406. package/dist/stepper.js +1 -1
  407. package/dist/styles.css +3 -0
  408. package/dist/tabs.js +1 -1
  409. package/dist/tag-input-aui-048.js +1 -1
  410. package/dist/tag-input.js +1 -1
  411. package/dist/team-members.js +3 -3
  412. package/dist/testimonials.js +2 -2
  413. package/dist/textarea-aui-002.js +1 -1
  414. package/dist/textarea-aui-006.js +1 -1
  415. package/dist/textarea-aui-007.js +1 -1
  416. package/dist/textarea-aui-008.js +1 -1
  417. package/dist/textarea-aui-037.js +1 -1
  418. package/dist/textarea.js +1 -1
  419. package/dist/toast.js +1 -1
  420. package/dist/token-swap.js +2 -1
  421. package/dist/tool-dock.js +1 -1
  422. package/dist/tooltip.js +1 -1
  423. package/dist/trade-ticket.js +2 -1
  424. package/dist/types/components/kit/api-keys.d.ts +1 -1
  425. package/dist/types/components/lab/lab-hooks.d.ts +12 -0
  426. package/dist/variant-picker.js +2 -1
  427. package/dist/wishlist.js +2 -1
  428. package/dist/workspace-switcher.js +1 -1
  429. package/package.json +1 -1
  430. package/dist/chunk-2Z5Z4YYZ.js +0 -57
@@ -1,4 +1,7 @@
1
1
  "use client";
2
+ import {
3
+ useInView
4
+ } from "./chunk-FS2PZKJY.js";
2
5
 
3
6
  // components/lab/blocks/TradeTicket.tsx
4
7
  import { useEffect, useRef, useState } from "react";
@@ -15,67 +18,92 @@ function TradeTicket() {
15
18
  const [glide, setGlide] = useState(true);
16
19
  const [phase, setPhase] = useState("idle");
17
20
  const touched = useRef(false);
21
+ const root = useRef(null);
22
+ const visible = useInView(root);
18
23
  const track = useRef(null);
19
- const timers = useRef([]);
24
+ const trackBox = useRef(null);
25
+ const timers = useRef(/* @__PURE__ */ new Set());
26
+ const later = (ms, f) => {
27
+ const id = setTimeout(() => {
28
+ timers.current.delete(id);
29
+ f();
30
+ }, ms);
31
+ timers.current.add(id);
32
+ };
20
33
  const [shown, setShown] = useState(40);
21
- const target = useRef({ pct: 40, glide: true });
22
- useEffect(() => {
23
- target.current = { pct, glide };
24
- }, [pct, glide]);
34
+ const live = useRef(40);
25
35
  useEffect(() => {
26
36
  const still = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
27
37
  let raf = 0;
38
+ if (still || !glide || !visible) {
39
+ raf = requestAnimationFrame(() => {
40
+ live.current = pct;
41
+ setShown(pct);
42
+ });
43
+ return () => cancelAnimationFrame(raf);
44
+ }
28
45
  let last = performance.now();
29
- let v = target.current.pct;
30
46
  const step = (now) => {
31
47
  const dt = Math.min(64, now - last);
32
48
  last = now;
33
- const t = target.current;
34
- if (still || !t.glide) v = t.pct;
35
- else v += (t.pct - v) * (1 - Math.exp(-dt / 160));
36
- if (Math.abs(t.pct - v) < 0.02) v = t.pct;
37
- setShown((o) => o === v ? o : v);
38
- raf = requestAnimationFrame(step);
49
+ let v = live.current + (pct - live.current) * (1 - Math.exp(-dt / 160));
50
+ if (Math.abs(pct - v) < 0.02) v = pct;
51
+ live.current = v;
52
+ setShown(v);
53
+ if (v !== pct) raf = requestAnimationFrame(step);
39
54
  };
40
- raf = requestAnimationFrame(step);
55
+ if (live.current !== pct) raf = requestAnimationFrame(step);
41
56
  return () => cancelAnimationFrame(raf);
42
- }, []);
57
+ }, [pct, glide, visible]);
43
58
  const amount = side === "buy" ? BALANCE.buy * shown / 100 / PRICE : BALANCE.sell * shown / 100;
44
59
  const usd = amount * PRICE;
45
60
  const color = side === "buy" ? UP : DOWN;
46
61
  const submit = () => {
47
62
  if (phase !== "idle" || pct === 0) return;
48
63
  setPhase("sending");
49
- timers.current.push(setTimeout(() => setPhase("done"), 900));
50
- timers.current.push(setTimeout(() => setPhase("idle"), 2400));
64
+ later(900, () => setPhase("done"));
65
+ later(2400, () => setPhase("idle"));
51
66
  };
67
+ const n = useRef(0);
52
68
  useEffect(() => {
53
- if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
54
- let n = 0;
55
- const T = timers.current;
69
+ if (!visible || touched.current || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
70
+ const t = /* @__PURE__ */ new Set();
71
+ const at = (ms, f) => {
72
+ const id = setTimeout(() => {
73
+ t.delete(id);
74
+ if (!touched.current) f();
75
+ }, ms);
76
+ t.add(id);
77
+ };
56
78
  const loop = () => {
57
- if (touched.current) return;
58
- n++;
59
- if (n % 3 === 0) setSide((s) => s === "buy" ? "sell" : "buy");
79
+ n.current++;
80
+ if (n.current % 3 === 0) setSide((s) => s === "buy" ? "sell" : "buy");
60
81
  setGlide(true);
61
82
  setPct(DETENTS[1 + Math.floor(Math.random() * 4)]);
62
- T.push(setTimeout(() => !touched.current && setPhase("sending"), 1300));
63
- T.push(setTimeout(() => !touched.current && setPhase("done"), 2200));
64
- T.push(setTimeout(() => !touched.current && setPhase("idle"), 3600));
65
- T.push(setTimeout(loop, 4400));
83
+ at(1300, () => setPhase("sending"));
84
+ at(2200, () => setPhase("done"));
85
+ at(3600, () => setPhase("idle"));
86
+ at(4400, loop);
87
+ };
88
+ at(900, loop);
89
+ return () => {
90
+ t.forEach(clearTimeout);
91
+ setPhase("idle");
66
92
  };
67
- T.push(setTimeout(loop, 900));
93
+ }, [visible]);
94
+ useEffect(() => {
95
+ const T = timers.current;
68
96
  return () => T.forEach(clearTimeout);
69
97
  }, []);
70
98
  const stopDemo = () => {
71
99
  if (touched.current) return;
72
100
  touched.current = true;
73
101
  timers.current.forEach(clearTimeout);
74
- timers.current = [];
102
+ timers.current.clear();
75
103
  setPhase("idle");
76
104
  };
77
105
  const fromX = (clientX) => {
78
- const r = track.current.getBoundingClientRect();
106
+ const r = trackBox.current ?? (trackBox.current = track.current.getBoundingClientRect());
79
107
  let v = Math.max(0, Math.min(100, (clientX - r.left) / r.width * 100));
80
108
  const near = DETENTS.find((d) => Math.abs(d - v) < 3);
81
109
  if (near !== void 0) v = near;
@@ -132,6 +160,7 @@ function TradeTicket() {
132
160
  stopDemo();
133
161
  setGlide(false);
134
162
  e.currentTarget.setPointerCapture(e.pointerId);
163
+ trackBox.current = null;
135
164
  fromX(e.clientX);
136
165
  },
137
166
  onPointerMove: (e) => e.buttons && fromX(e.clientX),
@@ -68,8 +68,8 @@ function Toaster({ children, max = 3, contained = false }) {
68
68
  }
69
69
  var TONE = {
70
70
  default: null,
71
- success: { color: "#30a46c", path: "M4.5 8.5l2.2 2.2L11.5 5.5" },
72
- error: { color: "#e5484d", path: "M8 4.5v4M8 11h.01" }
71
+ success: { color: "var(--brand)", on: "var(--on-brand)", path: "M4.5 8.5l2.2 2.2L11.5 5.5" },
72
+ error: { color: "var(--ink)", on: "var(--paper)", path: "M8 4.5v4M8 11h.01" }
73
73
  };
74
74
  function Toast({
75
75
  data,
@@ -89,9 +89,18 @@ function Toast({
89
89
  const [dragging, setDragging] = useState(false);
90
90
  const drag = useRef(null);
91
91
  const left = useRef(data.duration ?? 4e3);
92
+ const heightCb = useRef(onHeight);
92
93
  useLayoutEffect(() => {
93
- if (inner.current) onHeight(inner.current.offsetHeight);
94
+ heightCb.current = onHeight;
94
95
  });
96
+ useLayoutEffect(() => {
97
+ const el = inner.current;
98
+ if (!el) return;
99
+ heightCb.current(el.offsetHeight);
100
+ const ro = new ResizeObserver(() => heightCb.current(el.offsetHeight));
101
+ ro.observe(el);
102
+ return () => ro.disconnect();
103
+ }, []);
95
104
  useEffect(() => {
96
105
  const r = requestAnimationFrame(() => setShown(true));
97
106
  return () => cancelAnimationFrame(r);
@@ -145,7 +154,7 @@ function Toast({
145
154
  transition: dragging ? "none" : `transform .45s ${EASE}, opacity .3s ease, height .35s ${EASE}`
146
155
  },
147
156
  children: /* @__PURE__ */ jsxs("div", { ref: inner, className: cx("flex items-start gap-3 p-3.5 pr-3", clamp !== void 0 && "opacity-0 transition-opacity"), children: [
148
- tone && /* @__PURE__ */ jsx("span", { className: "mt-px flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-white", style: { background: tone.color }, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3 w-3", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: tone.path }) }) }),
157
+ tone && /* @__PURE__ */ jsx("span", { className: "mt-px flex h-5 w-5 shrink-0 items-center justify-center rounded-full", style: { background: tone.color, color: tone.on }, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3 w-3", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: tone.path }) }) }),
149
158
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
150
159
  /* @__PURE__ */ jsx("p", { className: "text-[13.5px] font-medium leading-5 tracking-[-0.01em] text-ink", children: data.title }),
151
160
  data.description && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-[12.5px] leading-snug text-mute", children: data.description })
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  // components/kit/ai-chat.tsx
4
- import { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
4
+ import { memo, useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { createElement } from "react";
7
7
  var cx = (...c) => c.filter(Boolean).join(" ");
@@ -33,6 +33,34 @@ function IconButton({ label, onClick, children }) {
33
33
  );
34
34
  }
35
35
  var svg = { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true };
36
+ var Batch = memo(function Batch2({ tokens }) {
37
+ return tokens.map((t, i) => /* @__PURE__ */ jsx("span", { style: { animation: `kit-ac-tok .5s ${CURVE}` }, children: t }, i));
38
+ });
39
+ var Message = memo(function Message2({ m, live, waiting, parts, isLast, copied, onCopy, onRegenerate }) {
40
+ if (m.role === "user") {
41
+ return /* @__PURE__ */ jsx("li", { className: "flex justify-end", style: { animation: `kit-ac-in .4s ${CURVE}` }, children: /* @__PURE__ */ jsx("p", { className: "max-w-[80%] whitespace-pre-wrap rounded-xl bg-paper-2 px-3.5 py-2.5 text-[14px] leading-relaxed text-ink", children: m.content }) });
42
+ }
43
+ return /* @__PURE__ */ jsxs("li", { className: "group flex gap-3", children: [
44
+ /* @__PURE__ */ jsx(Mark, {}),
45
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 pt-0.5", children: [
46
+ live && waiting ? /* @__PURE__ */ jsx("span", { role: "img", className: "inline-flex h-6 items-center gap-1", "aria-label": "Thinking", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-mute", style: { animation: `kit-ac-dot 1.1s ${CURVE} ${i * 140}ms infinite` } }, i)) }) : /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap text-[14px] leading-relaxed text-ink", children: parts && parts.length ? parts.map((b, i) => /* @__PURE__ */ jsx(Batch, { tokens: b }, i)) : m.content }),
47
+ !live && (m.stopped || m.failed) && /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-[12.5px] text-mute", children: m.failed ? "Something went wrong. Try again." : "Stopped." }),
48
+ !live && /* @__PURE__ */ jsxs(
49
+ "div",
50
+ {
51
+ className: cx(
52
+ "mt-1.5 -ml-1.5 flex items-center gap-0.5 transition-opacity duration-300",
53
+ isLast ? "opacity-100" : "opacity-0 group-hover:opacity-100 focus-within:opacity-100"
54
+ ),
55
+ children: [
56
+ m.content && /* @__PURE__ */ jsx(IconButton, { label: copied ? "Copied" : "Copy", onClick: () => onCopy(m), children: copied ? /* @__PURE__ */ createElement("svg", { ...svg, key: "ok", style: { animation: `kit-ac-pop .3s ${CURVE}` } }, /* @__PURE__ */ jsx("path", { d: "m3.5 8.5 3 3 6-7" })) : /* @__PURE__ */ createElement("svg", { ...svg, key: "copy" }, /* @__PURE__ */ jsx("rect", { x: "5.5", y: "5.5", width: "8", height: "8", rx: "1.8" }), /* @__PURE__ */ jsx("path", { d: "M10.5 5.5V4a1.5 1.5 0 0 0-1.5-1.5H4A1.5 1.5 0 0 0 2.5 4v5A1.5 1.5 0 0 0 4 10.5h1.5" })) }),
57
+ isLast && /* @__PURE__ */ jsx(IconButton, { label: "Regenerate", onClick: onRegenerate, children: /* @__PURE__ */ jsx("svg", { ...svg, children: /* @__PURE__ */ jsx("path", { d: "M13 8a5 5 0 1 1-1.5-3.6M13 2.5v2.5h-2.5" }) }) })
58
+ ]
59
+ }
60
+ )
61
+ ] })
62
+ ] });
63
+ });
36
64
  function AiChat({
37
65
  onSend,
38
66
  defaultMessages = [],
@@ -56,6 +84,7 @@ function AiChat({
56
84
  const area = useRef(null);
57
85
  const pinned = useRef(true);
58
86
  const copyTimer = useRef(void 0);
87
+ const pending = useRef({ id: "", tokens: [], frame: 0, text: "" });
59
88
  const notify = useRef(onMessagesChange);
60
89
  useEffect(() => {
61
90
  notify.current = onMessagesChange;
@@ -65,9 +94,21 @@ function AiChat({
65
94
  ctrl.current?.abort();
66
95
  ctrl.current = null;
67
96
  clearTimeout(copyTimer.current);
97
+ cancelAnimationFrame(pending.current.frame);
68
98
  },
69
99
  []
70
100
  );
101
+ const flush = () => {
102
+ const p = pending.current;
103
+ cancelAnimationFrame(p.frame);
104
+ p.frame = 0;
105
+ if (!p.tokens.length) return;
106
+ const batch = p.tokens;
107
+ const id = p.id;
108
+ p.tokens = [];
109
+ setWaiting(false);
110
+ setChunks((all) => ({ ...all, [id]: [...all[id] ?? [], batch] }));
111
+ };
71
112
  useLayoutEffect(() => {
72
113
  const el = list.current;
73
114
  if (el && pinned.current) el.scrollTop = el.scrollHeight;
@@ -90,11 +131,15 @@ function AiChat({
90
131
  setWaiting(true);
91
132
  setChunks({ [id]: [] });
92
133
  setStatus("Assistant is replying.");
134
+ cancelAnimationFrame(pending.current.frame);
135
+ pending.current = { id, tokens: [], frame: 0, text: "" };
93
136
  const push = (t) => {
94
- if (!t) return;
137
+ if (!t || ctrl.current !== c) return;
95
138
  reply += t;
96
- setWaiting(false);
97
- setChunks((all) => ({ ...all, [id]: [...all[id] ?? [], t] }));
139
+ const p = pending.current;
140
+ p.text = reply;
141
+ p.tokens.push(t);
142
+ if (!p.frame) p.frame = requestAnimationFrame(flush);
98
143
  };
99
144
  try {
100
145
  const out = onSend({ prompt, messages: history, signal: c.signal });
@@ -112,6 +157,7 @@ function AiChat({
112
157
  }
113
158
  if (ctrl.current !== c) return;
114
159
  ctrl.current = null;
160
+ flush();
115
161
  const msg = { id, role: "assistant", content: reply, ...failed && { failed: true } };
116
162
  commit([...history, msg]);
117
163
  setStreaming(null);
@@ -131,7 +177,8 @@ function AiChat({
131
177
  c.abort();
132
178
  ctrl.current = null;
133
179
  const id = streaming;
134
- const reply = (chunks[id] ?? []).join("");
180
+ flush();
181
+ const reply = pending.current.id === id ? pending.current.text : "";
135
182
  commit([...messages, { id, role: "assistant", content: reply, stopped: true }]);
136
183
  setStreaming(null);
137
184
  setWaiting(false);
@@ -154,6 +201,12 @@ function AiChat({
154
201
  setStatus("Couldn't copy.");
155
202
  }
156
203
  };
204
+ const actions = useRef({ copy, regenerate });
205
+ useLayoutEffect(() => {
206
+ actions.current = { copy, regenerate };
207
+ });
208
+ const onCopy = useCallback((m) => actions.current.copy(m), []);
209
+ const onRegenerate = useCallback(() => actions.current.regenerate(), []);
157
210
  const shown = streaming ? [...messages, { id: streaming, role: "assistant", content: "" }] : messages;
158
211
  const empty = shown.length === 0;
159
212
  const lastId = shown[shown.length - 1]?.id;
@@ -197,34 +250,20 @@ function AiChat({
197
250
  },
198
251
  s
199
252
  )) })
200
- ] }) : /* @__PURE__ */ jsx("ol", { className: "flex flex-col gap-6 py-2", children: shown.map((m) => {
201
- const live = m.id === streaming;
202
- const parts = chunks[m.id];
203
- if (m.role === "user") {
204
- return /* @__PURE__ */ jsx("li", { className: "flex justify-end", style: { animation: `kit-ac-in .4s ${CURVE}` }, children: /* @__PURE__ */ jsx("p", { className: "max-w-[80%] whitespace-pre-wrap rounded-xl bg-paper-2 px-3.5 py-2.5 text-[14px] leading-relaxed text-ink", children: m.content }) }, m.id);
205
- }
206
- const isLast = m.id === lastId;
207
- return /* @__PURE__ */ jsxs("li", { className: "group flex gap-3", children: [
208
- /* @__PURE__ */ jsx(Mark, {}),
209
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 pt-0.5", children: [
210
- live && waiting ? /* @__PURE__ */ jsx("span", { role: "img", className: "inline-flex h-6 items-center gap-1", "aria-label": "Thinking", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-mute", style: { animation: `kit-ac-dot 1.1s ${CURVE} ${i * 140}ms infinite` } }, i)) }) : /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap text-[14px] leading-relaxed text-ink", children: parts && parts.length ? parts.map((t, i) => /* @__PURE__ */ jsx("span", { style: { animation: `kit-ac-tok .5s ${CURVE}` }, children: t }, i)) : m.content }),
211
- !live && (m.stopped || m.failed) && /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-[12.5px] text-mute", children: m.failed ? "Something went wrong. Try again." : "Stopped." }),
212
- !live && /* @__PURE__ */ jsxs(
213
- "div",
214
- {
215
- className: cx(
216
- "mt-1.5 -ml-1.5 flex items-center gap-0.5 transition-opacity duration-300",
217
- isLast ? "opacity-100" : "opacity-0 group-hover:opacity-100 focus-within:opacity-100"
218
- ),
219
- children: [
220
- m.content && /* @__PURE__ */ jsx(IconButton, { label: copied === m.id ? "Copied" : "Copy", onClick: () => copy(m), children: copied === m.id ? /* @__PURE__ */ createElement("svg", { ...svg, key: "ok", style: { animation: `kit-ac-pop .3s ${CURVE}` } }, /* @__PURE__ */ jsx("path", { d: "m3.5 8.5 3 3 6-7" })) : /* @__PURE__ */ createElement("svg", { ...svg, key: "copy" }, /* @__PURE__ */ jsx("rect", { x: "5.5", y: "5.5", width: "8", height: "8", rx: "1.8" }), /* @__PURE__ */ jsx("path", { d: "M10.5 5.5V4a1.5 1.5 0 0 0-1.5-1.5H4A1.5 1.5 0 0 0 2.5 4v5A1.5 1.5 0 0 0 4 10.5h1.5" })) }),
221
- isLast && /* @__PURE__ */ jsx(IconButton, { label: "Regenerate", onClick: regenerate, children: /* @__PURE__ */ jsx("svg", { ...svg, children: /* @__PURE__ */ jsx("path", { d: "M13 8a5 5 0 1 1-1.5-3.6M13 2.5v2.5h-2.5" }) }) })
222
- ]
223
- }
224
- )
225
- ] })
226
- ] }, m.id);
227
- }) })
253
+ ] }) : /* @__PURE__ */ jsx("ol", { className: "flex flex-col gap-6 py-2", children: shown.map((m) => /* @__PURE__ */ jsx(
254
+ Message,
255
+ {
256
+ m,
257
+ live: m.id === streaming,
258
+ waiting: m.id === streaming && waiting,
259
+ parts: chunks[m.id],
260
+ isLast: m.id === lastId,
261
+ copied: copied === m.id,
262
+ onCopy,
263
+ onRegenerate
264
+ },
265
+ m.id
266
+ )) })
228
267
  }
229
268
  ),
230
269
  /* @__PURE__ */ jsxs(
@@ -278,7 +317,7 @@ function AiChat({
278
317
  type: "submit",
279
318
  "aria-label": "Send",
280
319
  disabled: !text.trim(),
281
- className: "grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-brand text-white outline-none transition-[opacity,transform] duration-200 active:scale-95 disabled:opacity-35 focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper",
320
+ className: "grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-brand text-on-brand outline-none transition-[opacity,transform] duration-200 active:scale-95 disabled:opacity-35 focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper",
282
321
  style: { animation: `kit-ac-pop .3s ${CURVE}` },
283
322
  children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M8 13V3M3.5 7.5 8 3l4.5 4.5" }) })
284
323
  },
@@ -90,7 +90,7 @@ function PromptBox({ models, defaultModel, placeholder = "Ask anything\u2026", m
90
90
  )) }) }) }) })
91
91
  ] }),
92
92
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
93
- /* @__PURE__ */ jsxs("span", { className: cx("text-[11.5px] tabular-nums transition-colors duration-300", over ? "text-[#e5484d]" : "text-mute"), "aria-live": "polite", children: [
93
+ /* @__PURE__ */ jsxs("span", { className: cx("text-[11.5px] tabular-nums transition-colors duration-300", over ? "text-ink" : "text-mute"), "aria-live": "polite", children: [
94
94
  tokens.toLocaleString(),
95
95
  " / ",
96
96
  maxTokens.toLocaleString(),
@@ -103,6 +103,7 @@ function PromptBox({ models, defaultModel, placeholder = "Ask anything\u2026", m
103
103
  onClick: submit,
104
104
  disabled: !busy && !ready,
105
105
  className: cx(
106
+ // perf-ok: the fill grows inside one button; nothing outside it reflows.
106
107
  "relative flex h-8 items-center gap-1.5 overflow-hidden rounded-full px-3.5 text-[13px] font-medium transition-[background-color,color,transform,width] duration-300 ease-[cubic-bezier(.16,1,.3,1)] active:scale-95 motion-reduce:transition-none",
107
108
  busy ? "bg-paper-2 text-ink" : ready ? "bg-ink text-paper" : "bg-paper-2 text-mute"
108
109
  ),
@@ -255,7 +255,7 @@ function UsagePricing({
255
255
  {
256
256
  href: action.href,
257
257
  className: cx(
258
- "group inline-flex h-10 shrink-0 items-center justify-center gap-1.5 rounded-[8px] bg-brand px-4 text-[13.5px] font-medium text-white shadow-[0_10px_24px_-12px_var(--brand)] outline-none transition-transform duration-300 hover:-translate-y-px active:translate-y-0 active:scale-[.97] focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-ink",
258
+ "group inline-flex h-10 shrink-0 items-center justify-center gap-1.5 rounded-[8px] bg-brand px-4 text-[13.5px] font-medium text-on-brand shadow-[0_10px_24px_-12px_var(--brand)] outline-none transition-transform duration-300 hover:-translate-y-px active:translate-y-0 active:scale-[.97] focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-ink",
259
259
  EASE
260
260
  ),
261
261
  children: [
@@ -29,7 +29,7 @@ function Candlestick() {
29
29
  const canvas = useRef(null);
30
30
  const wrap = useRef(null);
31
31
  const [ohlc, setOhlc] = useState(null);
32
- const S = useRef({ data: seed(), born: 0, lo: 0, hi: 0, hx: -1, hy: -1, raf: 0, last: 0, prev: 0, target: 0, onScreen: true });
32
+ const S = useRef({ data: seed(), born: 0, lo: 0, hi: 0, hx: -1, hy: -1, raf: 0, last: 0, prev: 0, target: 0, onScreen: true, rect: null });
33
33
  useEffect(() => {
34
34
  const cv = canvas.current;
35
35
  const el = wrap.current;
@@ -51,16 +51,37 @@ function Candlestick() {
51
51
  ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
52
52
  const cs = getComputedStyle(el);
53
53
  colors = { ink: cs.getPropertyValue("--color-ink").trim() || colors.ink, mute: cs.getPropertyValue("--color-mute").trim() || colors.mute, paper: cs.getPropertyValue("--color-paper").trim() || colors.paper, accent: cs.getPropertyValue("--color-brand").trim() || colors.accent };
54
+ st.rect = r;
55
+ wake();
56
+ };
57
+ const wake = () => {
58
+ if (st.raf || !st.onScreen || document.hidden || !w) return;
59
+ st.prev = 0;
60
+ st.raf = requestAnimationFrame(draw);
61
+ };
62
+ const sync = () => {
63
+ cancelAnimationFrame(st.raf);
64
+ st.raf = 0;
65
+ wake();
66
+ };
67
+ const forget = () => {
68
+ st.rect = null;
54
69
  };
55
70
  const ro = new ResizeObserver(resize);
56
71
  ro.observe(el);
57
- const io = new IntersectionObserver(([e]) => st.onScreen = e.isIntersecting);
72
+ const io = new IntersectionObserver(([e]) => {
73
+ st.onScreen = e.isIntersecting;
74
+ sync();
75
+ });
58
76
  io.observe(el);
59
- resize();
77
+ document.addEventListener("visibilitychange", sync);
78
+ window.addEventListener("scroll", forget, { capture: true, passive: true });
60
79
  st.born = performance.now();
61
- const draw = (now) => {
62
- st.raf = requestAnimationFrame(draw);
80
+ resize();
81
+ function draw(now) {
82
+ st.raf = 0;
63
83
  if (!st.onScreen || document.hidden || !w) return;
84
+ st.raf = requestAnimationFrame(draw);
64
85
  const d = st.data;
65
86
  const dt = Math.min(64, now - (st.prev || now));
66
87
  st.prev = now;
@@ -173,16 +194,19 @@ function Candlestick() {
173
194
  const c = vis[Math.max(0, Math.min(vis.length - 1, i))];
174
195
  if (c) setOhlc((o) => o === c ? o : c);
175
196
  }
176
- };
177
- st.raf = requestAnimationFrame(draw);
197
+ }
178
198
  return () => {
179
199
  cancelAnimationFrame(st.raf);
200
+ st.raf = 0;
180
201
  ro.disconnect();
181
202
  io.disconnect();
203
+ document.removeEventListener("visibilitychange", sync);
204
+ window.removeEventListener("scroll", forget, { capture: true });
182
205
  };
183
206
  }, []);
184
207
  const move = (e) => {
185
- const r = wrap.current.getBoundingClientRect();
208
+ var _a;
209
+ const r = (_a = S.current).rect ?? (_a.rect = wrap.current.getBoundingClientRect());
186
210
  S.current.hx = e.clientX - r.left;
187
211
  S.current.hy = e.clientY - r.top;
188
212
  };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Avatar
4
- } from "./chunk-IVCHYE55.js";
4
+ } from "./chunk-7IOMROVG.js";
5
5
 
6
6
  // components/kit/base/testimonials.tsx
7
7
  import { useEffect, useRef, useState } from "react";
@@ -56,7 +56,7 @@ function StatusIcon({ status, small }) {
56
56
  /* @__PURE__ */ jsx("path", { d: "M16 9a7 7 0 0 0-7-7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
57
57
  ] });
58
58
  if (status === "done")
59
- return /* @__PURE__ */ jsx("span", { className: cx(box, "asta-plan-a grid shrink-0 place-items-center rounded-full bg-brand text-white animate-[asta-plan-pop_.35s_cubic-bezier(.16,1,.3,1)_both]"), "aria-hidden": true, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-[70%] w-[70%]", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "m3.5 8.5 3 3 6-7", pathLength: 1, strokeDasharray: 1, className: "asta-plan-a animate-[asta-plan-draw_.45s_cubic-bezier(.16,1,.3,1)_.1s_both]" }) }) });
59
+ return /* @__PURE__ */ jsx("span", { className: cx(box, "asta-plan-a grid shrink-0 place-items-center rounded-full bg-brand text-on-brand animate-[asta-plan-pop_.35s_cubic-bezier(.16,1,.3,1)_both]"), "aria-hidden": true, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-[70%] w-[70%]", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "m3.5 8.5 3 3 6-7", pathLength: 1, strokeDasharray: 1, className: "asta-plan-a animate-[asta-plan-draw_.45s_cubic-bezier(.16,1,.3,1)_.1s_both]" }) }) });
60
60
  if (status === "failed")
61
61
  return /* @__PURE__ */ jsx("span", { className: cx(box, "asta-plan-a grid shrink-0 place-items-center rounded-full bg-ink text-paper animate-[asta-plan-pop_.35s_cubic-bezier(.16,1,.3,1)_both]"), "aria-hidden": true, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-[70%] w-[70%]", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", children: /* @__PURE__ */ jsx("path", { d: "M8 4v5M8 12h.01" }) }) });
62
62
  if (status === "skipped")
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-LS6CFF6X.js";
5
5
  import {
6
6
  Button
7
- } from "./chunk-WSL4JGEA.js";
7
+ } from "./chunk-HSDMCZMX.js";
8
8
 
9
9
  // components/kit/base/billing.tsx
10
10
  import { useState } from "react";
@@ -82,7 +82,7 @@ function TreeCheckbox({
82
82
  onClick: () => set(p.ids),
83
83
  className: cx(
84
84
  "relative h-8 flex-1 rounded-[8px] text-[13px] font-medium outline-none transition-transform duration-200 active:scale-[0.97] focus-visible:ring-2 focus-visible:ring-brand/50",
85
- on ? "text-white" : "text-ink"
85
+ on ? "text-paper" : "text-ink"
86
86
  ),
87
87
  children: [
88
88
  /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-0 rounded-[8px] bg-paper-2 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_6%,transparent)]" }),
@@ -163,8 +163,8 @@ function TriBox({ id, state, onToggle, small }) {
163
163
  style: { opacity: filled ? 1 : 0, transform: filled ? "scale(1)" : "scale(0.6)", transitionTimingFunction: SPRING }
164
164
  }
165
165
  ),
166
- /* @__PURE__ */ jsx("svg", { "aria-hidden": true, viewBox: "0 0 16 16", className: cx("relative text-white", small ? "h-2.5 w-2.5" : "h-3 w-3"), fill: "none", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M3.5 8.5l3 3 6-7", pathLength: 1, strokeDasharray: "1", className: "transition-[stroke-dashoffset]", style: { strokeDashoffset: on ? 0 : 1, transitionDuration: on ? "380ms" : "120ms", transitionTimingFunction: EASE } }) }),
167
- /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute h-[2.2px] w-2 rounded-full bg-white transition-transform duration-300", style: { transform: `scaleX(${mixed ? 1 : 0})`, transitionTimingFunction: EASE } })
166
+ /* @__PURE__ */ jsx("svg", { "aria-hidden": true, viewBox: "0 0 16 16", className: cx("relative text-on-brand", small ? "h-2.5 w-2.5" : "h-3 w-3"), fill: "none", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M3.5 8.5l3 3 6-7", pathLength: 1, strokeDasharray: "1", className: "transition-[stroke-dashoffset]", style: { strokeDashoffset: on ? 0 : 1, transitionDuration: on ? "380ms" : "120ms", transitionTimingFunction: EASE } }) }),
167
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute h-[2.2px] w-2 rounded-full bg-on-brand transition-transform duration-300", style: { transform: `scaleX(${mixed ? 1 : 0})`, transitionTimingFunction: EASE } })
168
168
  ] });
169
169
  }
170
170
  var checkbox_aui_054_default = TreeCheckbox;
@@ -258,12 +258,12 @@ function PresetDatePicker({ value, defaultValue, onChange, presets = PRESETS, la
258
258
  onClick: () => commit(d, true),
259
259
  className: cx(
260
260
  "group/p flex h-[30px] w-full items-center gap-2.5 whitespace-nowrap rounded-[8px] px-2.5 text-left text-[13px] outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-brand/70",
261
- on ? "bg-brand text-white" : "text-[color-mix(in_srgb,var(--paper)_82%,transparent)] hover:bg-[color-mix(in_srgb,var(--paper)_8%,transparent)] hover:text-paper focus-visible:bg-[color-mix(in_srgb,var(--paper)_8%,transparent)]"
261
+ on ? "bg-brand text-on-brand" : "text-[color-mix(in_srgb,var(--paper)_82%,transparent)] hover:bg-[color-mix(in_srgb,var(--paper)_8%,transparent)] hover:text-paper focus-visible:bg-[color-mix(in_srgb,var(--paper)_8%,transparent)]"
262
262
  ),
263
263
  children: [
264
264
  /* @__PURE__ */ jsx("span", { className: "flex-1", children: p.label }),
265
- /* @__PURE__ */ jsx("span", { className: cx("hidden font-mono text-[10.5px] tabular-nums @min-[400px]:inline", on ? "text-white/75" : "text-[color-mix(in_srgb,var(--paper)_42%,transparent)]"), children: d ? hintFmt.format(d) : "\u2014" }),
266
- /* @__PURE__ */ jsx("kbd", { className: cx("hidden h-4 min-w-4 items-center justify-center rounded-[4px] px-1 font-mono text-[9.5px] @min-[400px]:flex", on ? "bg-white/20 text-white" : "bg-[color-mix(in_srgb,var(--paper)_8%,transparent)] text-[color-mix(in_srgb,var(--paper)_50%,transparent)]"), children: i + 1 })
265
+ /* @__PURE__ */ jsx("span", { className: cx("hidden font-mono text-[10.5px] tabular-nums @min-[400px]:inline", on ? "text-on-brand/75" : "text-[color-mix(in_srgb,var(--paper)_42%,transparent)]"), children: d ? hintFmt.format(d) : "\u2014" }),
266
+ /* @__PURE__ */ jsx("kbd", { className: cx("hidden h-4 min-w-4 items-center justify-center rounded-[4px] px-1 font-mono text-[9.5px] @min-[400px]:flex", on ? "bg-on-brand/20 text-on-brand" : "bg-[color-mix(in_srgb,var(--paper)_8%,transparent)] text-[color-mix(in_srgb,var(--paper)_50%,transparent)]"), children: i + 1 })
267
267
  ]
268
268
  }
269
269
  ) }, p.label);
@@ -312,12 +312,12 @@ function PresetDatePicker({ value, defaultValue, onChange, presets = PRESETS, la
312
312
  onFocus: () => !isFocus && setFocus(d),
313
313
  className: cx(
314
314
  "relative flex h-7 w-8 items-center justify-center rounded-[7px] text-[12.5px] tabular-nums outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-brand/70",
315
- on ? "font-medium text-white" : inMonth ? "text-paper hover:bg-[color-mix(in_srgb,var(--paper)_10%,transparent)]" : "text-[color-mix(in_srgb,var(--paper)_32%,transparent)] hover:bg-[color-mix(in_srgb,var(--paper)_8%,transparent)]"
315
+ on ? "font-medium text-on-brand" : inMonth ? "text-paper hover:bg-[color-mix(in_srgb,var(--paper)_10%,transparent)]" : "text-[color-mix(in_srgb,var(--paper)_32%,transparent)] hover:bg-[color-mix(in_srgb,var(--paper)_8%,transparent)]"
316
316
  ),
317
317
  children: [
318
318
  on && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-0 rounded-[7px] bg-brand shadow-[0_0_18px_-2px_color-mix(in_srgb,var(--brand)_75%,transparent)]", style: { animation: `aui051-dot .42s ${EASE} both` } }),
319
319
  /* @__PURE__ */ jsx("span", { className: "relative", children: d.getDate() }),
320
- isToday && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cx("absolute bottom-1 left-1/2 h-[3px] w-[3px] -translate-x-1/2 rounded-full", on ? "bg-white" : "bg-brand") })
320
+ isToday && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cx("absolute bottom-1 left-1/2 h-[3px] w-[3px] -translate-x-1/2 rounded-full", on ? "bg-on-brand" : "bg-brand") })
321
321
  ]
322
322
  }
323
323
  ) }, key(d));
@@ -258,7 +258,7 @@ function ModelPicker({
258
258
  /* @__PURE__ */ jsxs("span", { className: cx("min-w-0 flex-1", m.disabled && "opacity-55"), children: [
259
259
  /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5", children: [
260
260
  /* @__PURE__ */ jsx("span", { className: cx("truncate text-[13.5px] font-medium", on ? "text-ink" : "text-ink-2"), children: m.label }),
261
- m.isNew && /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded-[5px] bg-brand px-1.5 text-[10px] font-semibold leading-[16px] text-white", children: "New" })
261
+ m.isNew && /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded-[5px] bg-brand px-1.5 text-[10px] font-semibold leading-[16px] text-on-brand", children: "New" })
262
262
  ] }),
263
263
  /* @__PURE__ */ jsx("span", { className: "mt-0.5 block truncate text-[12px] text-mute", children: m.disabled ? m.disabledReason ?? "Not available" : m.hint })
264
264
  ] }),