@qredence/fleet 0.6.1 → 0.6.3

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 (280) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/web/client/assets/DialogTitle-DiAm7YNe.js +1 -0
  3. package/dist/web/client/assets/agent-disclosure-CMrxF7L-.js +1 -0
  4. package/dist/web/client/assets/alert-dialog-CYE37KMM.js +1 -0
  5. package/dist/web/client/assets/analytics-stub-C2vgmGm_.js +1 -0
  6. package/dist/web/client/assets/artifacts-panel-ClDpGWOU.js +1 -0
  7. package/dist/web/client/assets/{bot-Bs7QWJ2q.js → bot-DbB9BKL0.js} +1 -1
  8. package/dist/web/client/assets/bundle-mjs-cJTHqqzI.js +1 -0
  9. package/dist/web/client/assets/button-Dl0ce3Y5.js +1 -0
  10. package/dist/web/client/assets/{card-DA3Vnqay.js → card-DCEnYd2G.js} +1 -1
  11. package/dist/web/client/assets/chat-BVMnC5Qh.js +52 -0
  12. package/dist/web/client/assets/chat-command-palette-YuyaJNbi.js +1 -0
  13. package/dist/web/client/assets/check-B3LlvM65.js +1 -0
  14. package/dist/web/client/assets/{chevron-down-BEVGmnSb.js → chevron-down-DUUprRP5.js} +1 -1
  15. package/dist/web/client/assets/chevron-right-NVqQIoiO.js +1 -0
  16. package/dist/web/client/assets/{chunk-YOKDWASO-BAf618wr.js → chunk-YOKDWASO-Bte3iwlH.js} +6 -6
  17. package/dist/web/client/assets/citations-DXqV2NLy.js +1 -0
  18. package/dist/web/client/assets/collapsible-CUxOjhDJ.js +1 -0
  19. package/dist/web/client/assets/command-Cw4X8Bpk.js +1 -0
  20. package/dist/web/client/assets/createBaseUIEventDetails-B58Jldei.js +1 -0
  21. package/dist/web/client/assets/createLucideIcon-_dfI7Arx.js +1 -0
  22. package/dist/web/client/assets/dialog-BzcIOvFC.js +1 -0
  23. package/dist/web/client/assets/dist-52wg4XPY.js +1 -0
  24. package/dist/web/client/assets/dist-DbHxXSgQ.js +41 -0
  25. package/dist/web/client/assets/ease-CMumuPlX.js +1 -0
  26. package/dist/web/client/assets/{eye-B0DFz5hL.js → eye-CDHqtVoE.js} +1 -1
  27. package/dist/web/client/assets/file-text-TmalmYrb.js +1 -0
  28. package/dist/web/client/assets/{folder-BC5p7qK7.js → folder-vuNT4shY.js} +1 -1
  29. package/dist/web/client/assets/{fork-picker-dialog-B7NNpVmW.js → fork-picker-dialog-BYRr-xTy.js} +1 -1
  30. package/dist/web/client/assets/gauge-BsDqNM1A.js +1 -0
  31. package/dist/web/client/assets/git-branch-CTq9aACS.js +1 -0
  32. package/dist/web/client/assets/globals-BtCXZXL_.css +2 -0
  33. package/dist/web/client/assets/{hard-drive-CHqgr7VQ.js → hard-drive-BT7UxHQu.js} +1 -1
  34. package/dist/web/client/assets/highlighted-body-KPVGNVTW-CgT7gqvs.js +1 -0
  35. package/dist/web/client/assets/horizontal-resize-VLjLByUV.js +1 -0
  36. package/dist/web/client/assets/index-B9aXxpOv.js +12 -0
  37. package/dist/web/client/assets/input-CxZp56Im.js +1 -0
  38. package/dist/web/client/assets/input-group-D7lAfKHR.js +1 -0
  39. package/dist/web/client/assets/ipython-tool-CkHaO3PW.js +3 -0
  40. package/dist/web/client/assets/is-ref-object-BcRWZ4l7.js +1 -0
  41. package/dist/web/client/assets/{loader-circle-DjfHXUPB.js → loader-circle-B5GIZGxd.js} +1 -1
  42. package/dist/web/client/assets/markdown-BHkByC9K.js +2 -0
  43. package/dist/web/client/assets/{markdown-code-xNyjdZ4g.js → markdown-code-CDTRq-HZ.js} +1 -1
  44. package/dist/web/client/assets/mermaid-HWGCJPDP-CY3N5ECk.js +1 -0
  45. package/dist/web/client/assets/message-queue-Dl8wbCOu.js +1 -0
  46. package/dist/web/client/assets/model-selector-list-CHD8lMAl.js +1 -0
  47. package/dist/web/client/assets/{notify-DxL0VD7Z.js → notify-DjVixft7.js} +1 -1
  48. package/dist/web/client/assets/{openui-renderer-TLNe5e_Q.js → openui-renderer-C4e9FOVR.js} +38 -38
  49. package/dist/web/client/assets/{package-CdcJFPf2.js → package-BKBPgwMP.js} +1 -1
  50. package/dist/web/client/assets/{pencil-DcUwsKLn.js → pencil-CdO6qfv3.js} +1 -1
  51. package/dist/web/client/assets/{plug-Dt6VN0zF.js → plug-BRROUIw-.js} +1 -1
  52. package/dist/web/client/assets/prompt-input-WaGSKZCU.js +1 -0
  53. package/dist/web/client/assets/prompt-suggestions-BNyTcyWg.js +1 -0
  54. package/dist/web/client/assets/provider-catalog-ClVvphe0.js +1 -0
  55. package/dist/web/client/assets/provider-label-CwZ-KDxk.js +1 -0
  56. package/dist/web/client/assets/react-CwJFpaho.js +1 -0
  57. package/dist/web/client/assets/react-dom-DX3XddaT.js +1 -0
  58. package/dist/web/client/assets/{refresh-cw-IThTJ3j-.js → refresh-cw-l9WPHRkq.js} +1 -1
  59. package/dist/web/client/assets/repl-panel-L9dmPqio.js +1 -0
  60. package/dist/web/client/assets/{resource-helpers-Q2T0YCMO.js → resource-helpers-BuWybA8l.js} +1 -1
  61. package/dist/web/client/assets/resources-panel-mT-aMCvV.js +1 -0
  62. package/dist/web/client/assets/right-panel-context-CS8tJMzE.js +1 -0
  63. package/dist/web/client/assets/right-panel-registry-BnYCffmM.js +2 -0
  64. package/dist/web/client/assets/{rotate-ccw-WNFNkKQD.js → rotate-ccw-CfGhzOv7.js} +1 -1
  65. package/dist/web/client/assets/routes-DUontXSG.js +16 -0
  66. package/dist/web/client/assets/safe-external-url-BbAom7Bm.js +1 -0
  67. package/dist/web/client/assets/search-BjcXAUrI.js +1 -0
  68. package/dist/web/client/assets/session-insights-panel-B0rl37lo.js +1 -0
  69. package/dist/web/client/assets/session-reasoning-panel-8D2P7iaJ.js +1 -0
  70. package/dist/web/client/assets/session-tool-renderer-Bd3dsE2D.js +1395 -0
  71. package/dist/web/client/assets/session-tree-panel-CM4_wwrM.js +1 -0
  72. package/dist/web/client/assets/settings-dialog-DMTD9m6z.js +2 -0
  73. package/dist/web/client/assets/{skeleton-CkR2VmWc.js → skeleton-C3mo31Qu.js} +1 -1
  74. package/dist/web/client/assets/skeleton-loaders-BMa_G4yX.js +1 -0
  75. package/dist/web/client/assets/sparkles-BY5MFyk6.js +1 -0
  76. package/dist/web/client/assets/square-DQaQu9bp.js +1 -0
  77. package/dist/web/client/assets/{square-terminal-BYTN_I86.js → square-terminal-BsopiuN7.js} +1 -1
  78. package/dist/web/client/assets/{subagent-chat-panel-oeLDPDAK.js → subagent-chat-panel-BESrXxAR.js} +1 -1
  79. package/dist/web/client/assets/subagent-transcript-CAqFJfMj.js +1 -0
  80. package/dist/web/client/assets/subagents-panel-8aKOwWLs.js +1 -0
  81. package/dist/web/client/assets/{sun-BWiZFty0.js → sun-D0llhiMU.js} +1 -1
  82. package/dist/web/client/assets/surfaces-CpfsGAIA.js +1 -0
  83. package/dist/web/client/assets/switch-D3FhZU-S.js +1 -0
  84. package/dist/web/client/assets/terminal-BQAKkBY6.js +1 -0
  85. package/dist/web/client/assets/toast-lnCWGgSE.js +1 -0
  86. package/dist/web/client/assets/tokens-Ch5WqXC_.js +1 -0
  87. package/dist/web/client/assets/tool-result-B_yb2JoE.js +4 -0
  88. package/dist/web/client/assets/tool-timeline-VnMRQoLS.js +1 -0
  89. package/dist/web/client/assets/{triangle-alert-CU-gd7ui.js → triangle-alert-GAYh_5d3.js} +1 -1
  90. package/dist/web/client/assets/ui-preferences-aG2U2jjW.js +1 -0
  91. package/dist/web/client/assets/use-presence-7I2qv4qI.js +1 -0
  92. package/dist/web/client/assets/use-reduced-motion-BOcG709U.js +9 -0
  93. package/dist/web/client/assets/useBaseUiId-D9ZGPZ6f.js +1 -0
  94. package/dist/web/client/assets/useControlled-CgAAWIy9.js +1 -0
  95. package/dist/web/client/assets/utils-Brtgag-m.js +1 -0
  96. package/dist/web/client/assets/virtualized-turn-list-mL3ONUUA.js +6 -0
  97. package/dist/web/client/assets/workspace-panel-CKF5JQl2.js +1 -0
  98. package/dist/web/client/assets/workspace-path-nav-DqPbETfJ.js +2 -0
  99. package/dist/web/client/assets/{wrench-BJNNe07k.js → wrench-Myc12BTA.js} +1 -1
  100. package/dist/web/client/assets/x-BGsDD848.js +1 -0
  101. package/dist/web/client/bundle-budget.json +6 -6
  102. package/dist/web/server/_tanstack-start-manifest_v-Cm8xE-Rb-TMLYN3GY.js +93 -0
  103. package/dist/web/server/{artifacts-panel-D3ySO--V-XSL53CXL.js → artifacts-panel-CwLVBqyi-CDORJY75.js} +37 -41
  104. package/dist/web/server/{chat-command-palette-kAbXhWVg-TJWXH2WW.js → chat-command-palette-DUha04ia-5OV7WVJZ.js} +20 -18
  105. package/dist/web/server/{chunk-SALXCFVO.js → chunk-33QA7BQJ.js} +19 -1
  106. package/dist/web/server/chunk-3Q3QKLHC.js +386 -0
  107. package/dist/web/server/chunk-4EBSM4JR.js +74 -0
  108. package/dist/web/server/{chunk-5UCAJBAH.js → chunk-5RTGRTPD.js} +82 -49
  109. package/dist/web/server/chunk-7E76R7MB.js +2138 -0
  110. package/dist/web/server/{chunk-EBG3XFGQ.js → chunk-7FK6YEMA.js} +49 -44
  111. package/dist/web/server/chunk-7HXCGBUP.js +56 -0
  112. package/dist/web/server/{chunk-P66QQWUM.js → chunk-7NZ3FJDA.js} +14 -1
  113. package/dist/web/server/{chunk-HF7DG7PC.js → chunk-7UTDOTOU.js} +80 -78
  114. package/dist/web/server/{chunk-NNKJTKOQ.js → chunk-ADYZWC5L.js} +311 -281
  115. package/dist/web/server/{chunk-NJ4QEZHK.js → chunk-B2LF64HM.js} +7 -5
  116. package/dist/web/server/{chunk-OZO5ARFA.js → chunk-BQROC4PL.js} +11 -2
  117. package/dist/web/server/{chunk-NIZBFVJF.js → chunk-CAPTFJOC.js} +9 -7
  118. package/dist/web/server/{chunk-DJMHPJBP.js → chunk-CHEC7TWB.js} +3 -1
  119. package/dist/web/server/chunk-DLA5TLKX.js +164 -0
  120. package/dist/web/server/{chunk-PLYZ7P2Y.js → chunk-DP26GVWH.js} +43 -5
  121. package/dist/web/server/{chunk-MNBGB2SP.js → chunk-E5HALE4M.js} +4 -4
  122. package/dist/web/server/chunk-ETCO5KZK.js +113 -0
  123. package/dist/web/server/{chunk-NGCQJ33Y.js → chunk-FMAYMBRS.js} +1492 -1640
  124. package/dist/web/server/{chunk-KP2PNDGL.js → chunk-FTLJ66KU.js} +30 -33
  125. package/dist/web/server/{chunk-BLSX7WHW.js → chunk-H5D5DX3K.js} +23 -21
  126. package/dist/web/server/chunk-HGVJEUV4.js +102 -0
  127. package/dist/web/server/{chunk-WNCAL4HN.js → chunk-HQ5TEXHT.js} +132 -152
  128. package/dist/web/server/{chunk-YOM42BKD.js → chunk-IPV4GLJL.js} +16 -16
  129. package/dist/web/server/chunk-K6PTNSCW.js +31 -0
  130. package/dist/web/server/{chunk-AR7O7JXD.js → chunk-KBWUBWVJ.js} +24 -1
  131. package/dist/web/server/{chunk-O3HDELZ2.js → chunk-KZ35W5M7.js} +667 -661
  132. package/dist/web/server/{chunk-QIULBRTU.js → chunk-MJXXVQNA.js} +79 -84
  133. package/dist/web/server/{chunk-EAJTWMK5.js → chunk-NZ6KQT2X.js} +2 -2
  134. package/dist/web/server/{chunk-YGYOBX7G.js → chunk-O2IC376F.js} +1811 -53
  135. package/dist/web/server/chunk-OMPXUTMX.js +33 -0
  136. package/dist/web/server/{chunk-S3PQ6HKH.js → chunk-OVJYUWSQ.js} +2 -2
  137. package/dist/web/server/{chunk-JTCCQZLN.js → chunk-RJNGEU6C.js} +2 -2
  138. package/dist/web/server/{chunk-UCUFC553.js → chunk-RXUMFFUV.js} +3 -3
  139. package/dist/web/server/{chunk-DLUZFOG3.js → chunk-S2IBIJIG.js} +18 -22
  140. package/dist/web/server/{chunk-DO2O27B2.js → chunk-SDV3P3IW.js} +2 -2
  141. package/dist/web/server/{chunk-2DDWXTVG.js → chunk-T2UTBHJ4.js} +55 -11
  142. package/dist/web/server/chunk-TLNZNR7C.js +46 -0
  143. package/dist/web/server/{chunk-UL2725KQ.js → chunk-TR2GA5OF.js} +57 -49
  144. package/dist/web/server/{chunk-QFRCJWQQ.js → chunk-TU2WNRAL.js} +93 -32
  145. package/dist/web/server/{chunk-FYDQK6UX.js → chunk-UDD5W4CR.js} +32 -10
  146. package/dist/web/server/{chunk-MNPHMZU7.js → chunk-UE32PAV2.js} +47 -57
  147. package/dist/web/server/{chunk-3TIMGWWI.js → chunk-UM3RHJNZ.js} +2 -2
  148. package/dist/web/server/{chunk-ZIFSJ3HQ.js → chunk-V5IFFLZQ.js} +185 -109
  149. package/dist/web/server/{chunk-ETTDO4UO.js → chunk-WTYNN6EV.js} +1 -26
  150. package/dist/web/server/{chunk-EJEPDVK6.js → chunk-WU6X3GPJ.js} +48 -5
  151. package/dist/web/server/{chunk-D27LRYVT.js → chunk-XEG4JTND.js} +10 -9
  152. package/dist/web/server/{chunk-XIB6XNUX.js → chunk-XJ6TGSUB.js} +425 -404
  153. package/dist/web/server/{chunk-NWDI3OWB.js → chunk-XSOUURPF.js} +30 -26
  154. package/dist/web/server/{chunk-RIP3PBWT.js → chunk-YCCF676T.js} +4 -4
  155. package/dist/web/server/{chunk-4WBFCB4O.js → chunk-YDDDSVNB.js} +178 -269
  156. package/dist/web/server/{chunk-GETSIVNU.js → chunk-YVGCPUAW.js} +7 -7
  157. package/dist/web/server/{chunk-4UBOIY2S.js → chunk-ZNFXBGLK.js} +1 -1
  158. package/dist/web/server/{fork-picker-dialog-Ds6Tgtu3-DIBWN7MV.js → fork-picker-dialog-DeMiLZtS-WTRTTP64.js} +10 -8
  159. package/dist/web/server/{markdown-DTnMbD87-FXGGAPJD.js → markdown-BzNejPoZ-6ITTDAV6.js} +2 -3
  160. package/dist/web/server/{markdown-code-BStjFfsy-SSLWUT4S.js → markdown-code-DAwXuW6m-HHVELO6I.js} +3 -4
  161. package/dist/web/server/{fleet-message-queue-D_w8lSeY-T3HB7HVQ.js → message-queue-Demph1x4-GGXJUUKO.js} +14 -10
  162. package/dist/web/server/{model-selector-list-DxeGZoD2-P6S6FSJH.js → model-selector-list-BeGQHwKV-UJYFO4KX.js} +21 -19
  163. package/dist/web/server/{openui-renderer-MKFv6LlH-MDRSVFEY.js → openui-renderer-B4z18Brm-HSMKJ47D.js} +17 -17
  164. package/dist/web/server/{prompt-suggestions-BOItmGnD-YQA7RHLG.js → prompt-suggestions-yPZqX__K-3VGJC4IF.js} +7 -6
  165. package/dist/web/server/{repl-panel-CuyF8wt5-CHDT2Q3N.js → repl-panel-CgUF1qUw-3DFD2V53.js} +10 -11
  166. package/dist/web/server/{resources-panel-CE5pD4vy-V5FXBTYC.js → resources-panel-ChUliWV--JITAGS6Q.js} +6 -7
  167. package/dist/web/server/{router-Dg72SESP-PCWKLFRG.js → router-DfG45nTQ-3VXEUYG5.js} +3336 -238
  168. package/dist/web/server/{routes-BGrVtPYF-SURPAJN6.js → routes-B9F9UfF1-UN2IVBMJ.js} +5156 -4242
  169. package/dist/web/server/server.js +2 -2
  170. package/dist/web/server/{session-insights-panel-CUhdgvRt-VB2HUCQP.js → session-insights-panel-xgrkX1Rp-FDNURBXZ.js} +9 -9
  171. package/dist/web/server/{fleet-reasoning-panel-DG_vuvv0-NCZWEEIT.js → session-reasoning-panel-m1RgcIph-NUXGXVKE.js} +21 -22
  172. package/dist/web/server/session-tool-renderer-CT65wuet-RQBMXHEZ.js +46 -0
  173. package/dist/web/server/session-tree-panel-rS0t1wbf-HNA6AJBY.js +229 -0
  174. package/dist/web/server/{settings-dialog-CK0FJlTg-HZRBAXDZ.js → settings-dialog-CqkrDSnm-LFEKSS7Y.js} +186 -1380
  175. package/dist/web/server/{subagent-chat-panel-gzamnTgK-PQ2TLLJF.js → subagent-chat-panel-Cf7QdDqH-DPPSVLSY.js} +31 -39
  176. package/dist/web/server/{subagents-panel-Berjd7HJ-EI5ZKC6V.js → subagents-panel-_JsUw-6t-MZWM5P45.js} +38 -45
  177. package/dist/web/server/{fleet-tool-timeline-D6yM4ZMz-ZSFVRRRI.js → tool-timeline-QL9k5dzA-RLU26HXT.js} +6 -6
  178. package/dist/web/server/{workspace-panel-CBBa_3UO-B4PPFPMA.js → workspace-panel-BHEB9nRM-Y6KGIVGP.js} +23 -30
  179. package/package.json +1 -1
  180. package/dist/web/client/assets/action-swap-roll-COzQ86wm.js +0 -1
  181. package/dist/web/client/assets/agent-activity-svETLf_5.js +0 -1
  182. package/dist/web/client/assets/agent-disclosure-DAMuuGcM.js +0 -1
  183. package/dist/web/client/assets/analytics-stub-B6zGMuSV.js +0 -1
  184. package/dist/web/client/assets/artifacts-panel-HVjqBMyx.js +0 -1
  185. package/dist/web/client/assets/artifacts-utils-N_kUFbz2.js +0 -1
  186. package/dist/web/client/assets/bundle-mjs-DKHVkVWu.js +0 -1
  187. package/dist/web/client/assets/button-C5wFDY5_.js +0 -1
  188. package/dist/web/client/assets/chat-BhYseKd6.js +0 -52
  189. package/dist/web/client/assets/chat-command-palette-LILDO_vG.js +0 -1
  190. package/dist/web/client/assets/check-JjHKAZas.js +0 -1
  191. package/dist/web/client/assets/chevron-right-DrJxToLs.js +0 -1
  192. package/dist/web/client/assets/chevron-up-CnSvySGH.js +0 -1
  193. package/dist/web/client/assets/circle-alert-CONlFReH.js +0 -1
  194. package/dist/web/client/assets/circle-x-CkKCB__4.js +0 -1
  195. package/dist/web/client/assets/citations-BPv8HIpf.js +0 -2
  196. package/dist/web/client/assets/cn-C8c0S2mI.js +0 -1
  197. package/dist/web/client/assets/collapsible-BoXtZZWN.js +0 -1
  198. package/dist/web/client/assets/command-PhicLCoO.js +0 -1
  199. package/dist/web/client/assets/createBaseUIEventDetails-DV0dQrBX.js +0 -1
  200. package/dist/web/client/assets/createLucideIcon-DwxZHm0M.js +0 -1
  201. package/dist/web/client/assets/dialog-pBGUjAQ7.js +0 -1
  202. package/dist/web/client/assets/dist-BPaFisIZ.js +0 -41
  203. package/dist/web/client/assets/earth-DGZXAN5r.js +0 -1
  204. package/dist/web/client/assets/ease-u56MhKYS.js +0 -1
  205. package/dist/web/client/assets/file-text-T-NcAlZs.js +0 -1
  206. package/dist/web/client/assets/fleet-message-queue-fbYYwMj0.js +0 -1
  207. package/dist/web/client/assets/fleet-pi-tool-renderer-BRgNnmaJ.js +0 -1395
  208. package/dist/web/client/assets/fleet-reasoning-panel-CjA2dwUJ.js +0 -1
  209. package/dist/web/client/assets/fleet-subagent-list-iKUtLJKZ.js +0 -1
  210. package/dist/web/client/assets/fleet-tool-timeline-C8heL7ae.js +0 -1
  211. package/dist/web/client/assets/gauge-DNpstbBn.js +0 -1
  212. package/dist/web/client/assets/globals-CuIiqOTg.css +0 -2
  213. package/dist/web/client/assets/highlighted-body-KPVGNVTW-sUCZ1fHv.js +0 -1
  214. package/dist/web/client/assets/horizontal-resize-Cp3iHMH7.js +0 -1
  215. package/dist/web/client/assets/image-BbPmlw-n.js +0 -1
  216. package/dist/web/client/assets/index-CSGplyr_.js +0 -12
  217. package/dist/web/client/assets/input-PcdubeKn.js +0 -1
  218. package/dist/web/client/assets/input-group-C2HJEZvl.js +0 -1
  219. package/dist/web/client/assets/ipython-tool-CyuMOxz1.js +0 -3
  220. package/dist/web/client/assets/layout-gyLzPvVv.js +0 -1
  221. package/dist/web/client/assets/markdown-lvexwooo.js +0 -2
  222. package/dist/web/client/assets/mermaid-HWGCJPDP-Bm7CuruA.js +0 -1
  223. package/dist/web/client/assets/message-square-hbDao-A1.js +0 -1
  224. package/dist/web/client/assets/model-selector-list-CoXX358G.js +0 -1
  225. package/dist/web/client/assets/plus-DXN1Bg_z.js +0 -1
  226. package/dist/web/client/assets/prompt-input-fwP8TsgQ.js +0 -1
  227. package/dist/web/client/assets/prompt-suggestions-BlGXmWS7.js +0 -1
  228. package/dist/web/client/assets/provider-catalog-DYMFdbKc.js +0 -1
  229. package/dist/web/client/assets/provider-label-B4q5mI65.js +0 -1
  230. package/dist/web/client/assets/react-dom-Bwxum3ti.js +0 -1
  231. package/dist/web/client/assets/repl-panel-C5om8MGU.js +0 -1
  232. package/dist/web/client/assets/resources-panel-D867-goy.js +0 -1
  233. package/dist/web/client/assets/right-panel-context-DHlNWJsF.js +0 -1
  234. package/dist/web/client/assets/right-panel-registry-BBlxLxnx.js +0 -2
  235. package/dist/web/client/assets/routes-XGsAIqBJ.js +0 -16
  236. package/dist/web/client/assets/safe-external-url-D3PJJIcM.js +0 -1
  237. package/dist/web/client/assets/search-eWVnAJsb.js +0 -1
  238. package/dist/web/client/assets/session-insights-panel-YnaXvTpi.js +0 -1
  239. package/dist/web/client/assets/settings-dialog-BSBasR3o.js +0 -2
  240. package/dist/web/client/assets/shield-check-CkA2viVW.js +0 -1
  241. package/dist/web/client/assets/skeleton-loaders-C9vHwAYV.js +0 -1
  242. package/dist/web/client/assets/sparkles-DuclzqlE.js +0 -1
  243. package/dist/web/client/assets/square-Bhn8gjr0.js +0 -1
  244. package/dist/web/client/assets/subagent-transcript-DaVHjNUH.js +0 -1
  245. package/dist/web/client/assets/subagent-utils-DDH5qm9Z.js +0 -1
  246. package/dist/web/client/assets/subagents-panel-D_aVgSCi.js +0 -1
  247. package/dist/web/client/assets/surfaces-BhAXz9So.js +0 -1
  248. package/dist/web/client/assets/switch-WhXeJNNY.js +0 -1
  249. package/dist/web/client/assets/terminal-DOS1s1gm.js +0 -1
  250. package/dist/web/client/assets/toast-D3c9XeGe.js +0 -1
  251. package/dist/web/client/assets/tool-result-Cki8WUNc.js +0 -4
  252. package/dist/web/client/assets/ui-preferences-CImQGZm_.js +0 -1
  253. package/dist/web/client/assets/use-reduced-motion-eORd7fqW.js +0 -9
  254. package/dist/web/client/assets/useBaseUiId-CHqXB2UQ.js +0 -1
  255. package/dist/web/client/assets/useControlled-CJJ9BOQB.js +0 -1
  256. package/dist/web/client/assets/utils-Eg7xtNmV.js +0 -1
  257. package/dist/web/client/assets/virtualized-turn-list-CdMa-ydT.js +0 -6
  258. package/dist/web/client/assets/workspace-panel-77bDbprs.js +0 -1
  259. package/dist/web/client/assets/workspace-path-nav-C0AQNZyy.js +0 -1
  260. package/dist/web/client/assets/x-CsRC_tCI.js +0 -1
  261. package/dist/web/server/_tanstack-start-manifest_v-0L7fqnH4-KMVGUFE4.js +0 -95
  262. package/dist/web/server/agent-activity-BuEE6iVw-CDZLK4D2.js +0 -514
  263. package/dist/web/server/chunk-2JHTYWD5.js +0 -1196
  264. package/dist/web/server/chunk-3JMESBAT.js +0 -35
  265. package/dist/web/server/chunk-42XU6WV7.js +0 -56
  266. package/dist/web/server/chunk-AQ66E5OW.js +0 -33
  267. package/dist/web/server/chunk-BYXBJQAS.js +0 -0
  268. package/dist/web/server/chunk-FAGDMGLK.js +0 -6589
  269. package/dist/web/server/chunk-FJV6EQDW.js +0 -36
  270. package/dist/web/server/chunk-GL6HWDJB.js +0 -19
  271. package/dist/web/server/chunk-L46H6IDX.js +0 -13
  272. package/dist/web/server/chunk-NIDBN7BQ.js +0 -86
  273. package/dist/web/server/chunk-ON33WDZX.js +0 -31
  274. package/dist/web/server/chunk-PVJCTQFK.js +0 -22
  275. package/dist/web/server/chunk-QPNUGF3V.js +0 -35
  276. package/dist/web/server/chunk-S5LFXXDY.js +0 -1265
  277. package/dist/web/server/chunk-VPKX7QRU.js +0 -42
  278. package/dist/web/server/chunk-ZCVWADNW.js +0 -37
  279. package/dist/web/server/fleet-pi-tool-renderer-qwc-qZFq-4U556N5Q.js +0 -51
  280. package/dist/web/server/fleet-subagent-list-BGb0PjhF-2X67FMUV.js +0 -18
@@ -7,8 +7,15 @@ import {
7
7
  useFormContext,
8
8
  useLabelableContext,
9
9
  useLabelableId,
10
- useRegisterFieldControl
11
- } from "./chunk-5UCAJBAH.js";
10
+ useRegisterFieldControl,
11
+ useValueChanged
12
+ } from "./chunk-5RTGRTPD.js";
13
+ import {
14
+ Check
15
+ } from "./chunk-4QD4PCVP.js";
16
+ import {
17
+ useControlled
18
+ } from "./chunk-OVJYUWSQ.js";
12
19
  import {
13
20
  COMPOSITE_KEYS,
14
21
  FOCUSABLE_POPUP_PROPS,
@@ -31,7 +38,7 @@ import {
31
38
  useFloatingTree,
32
39
  useScrollLock,
33
40
  useSurface
34
- } from "./chunk-4WBFCB4O.js";
41
+ } from "./chunk-YDDDSVNB.js";
35
42
  import {
36
43
  ARROW_DOWN,
37
44
  ARROW_LEFT,
@@ -57,25 +64,19 @@ import {
57
64
  isTypeableElement,
58
65
  jsdom,
59
66
  ownerDocument,
60
- useStore,
61
67
  useTimeout,
62
68
  visuallyHidden,
63
69
  visuallyHiddenInput,
64
70
  webkit
65
- } from "./chunk-WNCAL4HN.js";
66
- import {
67
- Check
68
- } from "./chunk-4QD4PCVP.js";
69
- import {
70
- useControlled
71
- } from "./chunk-S3PQ6HKH.js";
71
+ } from "./chunk-HQ5TEXHT.js";
72
72
  import {
73
73
  useTransitionStatus,
74
74
  useValueAsRef
75
- } from "./chunk-MNBGB2SP.js";
75
+ } from "./chunk-E5HALE4M.js";
76
76
  import {
77
77
  EMPTY_ARRAY,
78
78
  EMPTY_OBJECT,
79
+ NOOP,
79
80
  addEventListener,
80
81
  cancelOpen,
81
82
  createChangeEventDetails,
@@ -114,12 +115,12 @@ import {
114
115
  useRenderElement,
115
116
  useStableCallback,
116
117
  windowResize
117
- } from "./chunk-XIB6XNUX.js";
118
+ } from "./chunk-XJ6TGSUB.js";
118
119
  import {
119
120
  cn
120
- } from "./chunk-DJMHPJBP.js";
121
+ } from "./chunk-CHEC7TWB.js";
121
122
 
122
- // web/app/dist/server/assets/useRender-C0Ot31pO.js
123
+ // web/app/dist/server/assets/select-DFrKxOMt.js
123
124
  import * as React$1 from "react";
124
125
  import { useLayoutEffect } from "react";
125
126
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -796,18 +797,18 @@ var size$2 = function(options) {
796
797
  const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
797
798
  const shiftData = state.middlewareData.shift;
798
799
  const noShift = !shiftData;
799
- let availableHeight = overflowAvailableHeight;
800
- let availableWidth = overflowAvailableWidth;
801
- if (shiftData != null && shiftData.enabled.x) availableWidth = maximumClippingWidth;
802
- if (shiftData != null && shiftData.enabled.y) availableHeight = maximumClippingHeight;
800
+ let availableHeight2 = overflowAvailableHeight;
801
+ let availableWidth2 = overflowAvailableWidth;
802
+ if (shiftData != null && shiftData.enabled.x) availableWidth2 = maximumClippingWidth;
803
+ if (shiftData != null && shiftData.enabled.y) availableHeight2 = maximumClippingHeight;
803
804
  if (noShift && !alignment) {
804
- if (isYAxis) availableWidth = width - 2 * max(overflow.left, overflow.right);
805
- else availableHeight = height - 2 * max(overflow.top, overflow.bottom);
805
+ if (isYAxis) availableWidth2 = width - 2 * max(overflow.left, overflow.right);
806
+ else availableHeight2 = height - 2 * max(overflow.top, overflow.bottom);
806
807
  }
807
808
  await apply({
808
809
  ...state,
809
- availableWidth,
810
- availableHeight
810
+ availableWidth: availableWidth2,
811
+ availableHeight: availableHeight2
811
812
  });
812
813
  const nextDimensions = await platform2.getDimensions(elements.floating);
813
814
  if (width !== nextDimensions.width || height !== nextDimensions.height) return { reset: { rects: true } };
@@ -2037,7 +2038,6 @@ function useListNavigation(context, props) {
2037
2038
  ]);
2038
2039
  const floating = React$1.useMemo(() => {
2039
2040
  return {
2040
- "aria-orientation": orientation === "both" ? void 0 : orientation,
2041
2041
  ...!typeableComboboxReference ? ariaActiveDescendantProp : {},
2042
2042
  onKeyDown(event) {
2043
2043
  if (event.key === "Tab" && event.shiftKey && open && !virtual) {
@@ -2059,7 +2059,6 @@ function useListNavigation(context, props) {
2059
2059
  ariaActiveDescendantProp,
2060
2060
  commonOnKeyDown,
2061
2061
  floatingFocusElementRef,
2062
- orientation,
2063
2062
  typeableComboboxReference,
2064
2063
  store,
2065
2064
  open,
@@ -2294,10 +2293,14 @@ var baseArrow = (options) => ({
2294
2293
  };
2295
2294
  }
2296
2295
  });
2297
- var arrow = (options, deps) => ({
2298
- ...baseArrow(options),
2299
- options: [options, deps]
2300
- });
2296
+ var arrow = (options, deps) => {
2297
+ const { name, fn } = baseArrow(options);
2298
+ return {
2299
+ name,
2300
+ fn,
2301
+ options: [options, deps]
2302
+ };
2303
+ };
2301
2304
  var hide = {
2302
2305
  name: "hide",
2303
2306
  async fn(state) {
@@ -2311,8 +2314,13 @@ var DEFAULT_SIDES = {
2311
2314
  sideX: "left",
2312
2315
  sideY: "top"
2313
2316
  };
2314
- var AVAILABLE_WIDTH_VAR = "--available-width";
2315
- var AVAILABLE_HEIGHT_VAR = "--available-height";
2317
+ var availableWidth = "--available-width";
2318
+ var availableHeight = "--available-height";
2319
+ var anchorWidth = "--anchor-width";
2320
+ var anchorHeight = "--anchor-height";
2321
+ var transformOrigin$1 = "--transform-origin";
2322
+ var AVAILABLE_WIDTH_VAR = availableWidth;
2323
+ var AVAILABLE_HEIGHT_VAR = availableHeight;
2316
2324
  function getLogicalSide(sideParam, renderedSide, isRtl) {
2317
2325
  const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end";
2318
2326
  return {
@@ -2447,47 +2455,37 @@ function useAnchorPositioningWithHook(params, useFloatingHook) {
2447
2455
  else middleware.push(flipMiddleware, shiftMiddleware);
2448
2456
  middleware.push(size({
2449
2457
  ...commonCollisionProps,
2450
- apply({ elements: { floating }, availableWidth, availableHeight, rects }) {
2458
+ apply({ elements: { floating }, availableWidth: availableWidth2, availableHeight: availableHeight2, rects }) {
2451
2459
  if (!mountedRef.current) return;
2452
2460
  const floatingStyle = floating.style;
2453
- floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `${availableWidth}px`);
2454
- floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `${availableHeight}px`);
2461
+ floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `${availableWidth2}px`);
2462
+ floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `${availableHeight2}px`);
2455
2463
  const dpr = getWindow(floating).devicePixelRatio || 1;
2456
2464
  const { x: x2, y: y2, width, height } = rects.reference;
2457
- const anchorWidth = (Math.round((x2 + width) * dpr) - Math.round(x2 * dpr)) / dpr;
2458
- const anchorHeight = (Math.round((y2 + height) * dpr) - Math.round(y2 * dpr)) / dpr;
2459
- floatingStyle.setProperty("--anchor-width", `${anchorWidth}px`);
2460
- floatingStyle.setProperty("--anchor-height", `${anchorHeight}px`);
2465
+ const anchorWidth$1 = (Math.round((x2 + width) * dpr) - Math.round(x2 * dpr)) / dpr;
2466
+ const anchorHeight$1 = (Math.round((y2 + height) * dpr) - Math.round(y2 * dpr)) / dpr;
2467
+ floatingStyle.setProperty(anchorWidth, `${anchorWidth$1}px`);
2468
+ floatingStyle.setProperty(anchorHeight, `${anchorHeight$1}px`);
2461
2469
  }
2462
2470
  }), arrow((state) => ({
2463
2471
  element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"),
2464
- padding: arrowPadding,
2472
+ padding: arrowRef.current ? arrowPadding : 0,
2465
2473
  offsetParent: "floating"
2466
2474
  }), [arrowPadding]), {
2467
2475
  name: "transformOrigin",
2468
2476
  fn(state) {
2469
- const { elements: elements2, middlewareData: middlewareData2, placement: renderedPlacement2, rects, y: y2 } = state;
2470
- const currentRenderedSide = getSide(renderedPlacement2);
2471
- const currentRenderedAxis = getSideAxis(currentRenderedSide);
2477
+ const { elements: { floating }, middlewareData: middlewareData2, placement: renderedPlacement2, platform: platform2, rects, y: y2 } = state;
2478
+ const renderedSide2 = getSide(renderedPlacement2);
2479
+ const renderedAlign2 = getAlignment(renderedPlacement2);
2480
+ const isVertical = getSideAxis(renderedSide2) === "y";
2472
2481
  const arrowEl = arrowRef.current;
2473
- const arrowX = middlewareData2.arrow?.x || 0;
2474
- const arrowY = middlewareData2.arrow?.y || 0;
2475
- const arrowWidth = arrowEl?.clientWidth || 0;
2476
- const arrowHeight = arrowEl?.clientHeight || 0;
2477
- const transformX = arrowX + arrowWidth / 2;
2478
- const transformY = arrowY + arrowHeight / 2;
2479
- const shiftY = Math.abs(middlewareData2.shift?.y || 0);
2480
- const halfAnchorHeight = rects.reference.height / 2;
2481
2482
  const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;
2482
- const isOverlappingAnchor = shiftY > sideOffsetValue;
2483
- const adjacentTransformOrigin = {
2484
- top: `${transformX}px calc(100% + ${sideOffsetValue}px)`,
2485
- bottom: `${transformX}px ${-sideOffsetValue}px`,
2486
- left: `calc(100% + ${sideOffsetValue}px) ${transformY}px`,
2487
- right: `${-sideOffsetValue}px ${transformY}px`
2488
- }[currentRenderedSide];
2489
- const overlapTransformOrigin = `${transformX}px ${rects.reference.y + halfAnchorHeight - y2}px`;
2490
- elements2.floating.style.setProperty("--transform-origin", crossAxisShiftEnabled && currentRenderedAxis === "y" && isOverlappingAnchor ? overlapTransformOrigin : adjacentTransformOrigin);
2483
+ let crossOrigin;
2484
+ if (!arrowEl && renderedAlign2 && Math.abs(isVertical ? middlewareData2.shift?.x || 0 : middlewareData2.shift?.y || 0) <= 1) crossOrigin = renderedAlign2 === "start" === (isVertical && platform2.isRTL?.(floating) === true) ? "100%" : "0%";
2485
+ else crossOrigin = `${(isVertical ? middlewareData2.arrow?.x || 0 : middlewareData2.arrow?.y || 0) + (isVertical ? arrowEl?.clientWidth || 0 : arrowEl?.clientHeight || 0) / 2}px`;
2486
+ let sideOrigin = renderedSide2 === "top" || renderedSide2 === "left" ? `calc(100% + ${sideOffsetValue}px)` : `${-sideOffsetValue}px`;
2487
+ if (crossAxisShiftEnabled && isVertical && Math.abs(middlewareData2.shift?.y || 0) > sideOffsetValue) sideOrigin = `${rects.reference.y + rects.reference.height / 2 - y2}px`;
2488
+ floating.style.setProperty(transformOrigin$1, isVertical ? `${crossOrigin} ${sideOrigin}` : `${sideOrigin} ${crossOrigin}`);
2491
2489
  return {};
2492
2490
  }
2493
2491
  }, hide, adaptiveOrigin);
@@ -2500,6 +2498,7 @@ function useAnchorPositioningWithHook(params, useFloatingHook) {
2500
2498
  });
2501
2499
  }, [mounted, floatingRootContext]);
2502
2500
  const autoUpdateOptions = React$1.useMemo(() => ({
2501
+ ancestorScroll: !disableAnchorTracking,
2503
2502
  elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined",
2504
2503
  layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined"
2505
2504
  }), [disableAnchorTracking]);
@@ -2676,24 +2675,67 @@ function usePreviousValue(value) {
2676
2675
  function isElementDisabled(element) {
2677
2676
  return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
2678
2677
  }
2679
- var SelectRootContext = /* @__PURE__ */ React$1.createContext(null);
2678
+ var SelectRootContext = /* @__PURE__ */ React$1.createContext(void 0);
2679
+ var SelectRootPropsContext = /* @__PURE__ */ React$1.createContext(void 0);
2680
+ var SelectFloatingContext = /* @__PURE__ */ React$1.createContext(void 0);
2680
2681
  function useSelectRootContext() {
2681
- const context = React$1.useContext(SelectRootContext);
2682
- if (context === null) throw new Error(formatErrorMessage(60));
2682
+ const store = React$1.useContext(SelectRootContext);
2683
+ if (store === void 0) throw new Error(formatErrorMessage(60));
2684
+ return store;
2685
+ }
2686
+ function useSelectRootPropsContext() {
2687
+ const context = React$1.useContext(SelectRootPropsContext);
2688
+ if (context === void 0) throw new Error(formatErrorMessage(101));
2683
2689
  return context;
2684
2690
  }
2691
+ function useSelectFloatingContext() {
2692
+ const context = React$1.useContext(SelectFloatingContext);
2693
+ if (context === void 0) throw new Error(formatErrorMessage(61));
2694
+ return context;
2695
+ }
2696
+ function areArraysEqual(array1, array2, itemComparer = Object.is) {
2697
+ const { length } = array1;
2698
+ if (length !== array2.length) return false;
2699
+ for (let i = 0; i < length; i += 1) if (!itemComparer(array1[i], array2[i])) return false;
2700
+ return true;
2701
+ }
2685
2702
  var defaultItemEquality = (itemValue, selectedValue) => Object.is(itemValue, selectedValue);
2686
2703
  function compareItemEquality(itemValue, selectedValue, comparer) {
2687
2704
  if (itemValue == null || selectedValue == null) return Object.is(itemValue, selectedValue);
2688
2705
  return comparer(itemValue, selectedValue);
2689
2706
  }
2707
+ function isSelectedValueDirty(currentValue, initialValue, comparer) {
2708
+ if (Array.isArray(currentValue) && Array.isArray(initialValue)) return !areArraysEqual(currentValue, initialValue, (itemValue, initialItemValue) => compareItemEquality(itemValue, initialItemValue, comparer));
2709
+ return currentValue !== initialValue;
2710
+ }
2711
+ function selectedValueIncludes(selectedValues, itemValue, comparer) {
2712
+ if (!selectedValues) return false;
2713
+ return selectedValues.some((selectedValue) => {
2714
+ if (selectedValue === void 0) return false;
2715
+ return compareItemEquality(itemValue, selectedValue, comparer);
2716
+ });
2717
+ }
2690
2718
  function findItemIndex(itemValues, selectedValue, comparer) {
2691
- if (!itemValues || itemValues.length === 0) return -1;
2719
+ if (!itemValues) return -1;
2692
2720
  return itemValues.findIndex((itemValue) => {
2693
2721
  if (itemValue === void 0) return false;
2694
2722
  return compareItemEquality(itemValue, selectedValue, comparer);
2695
2723
  });
2696
2724
  }
2725
+ function createSelectionMatcher(selectedValues, comparer) {
2726
+ if (comparer !== defaultItemEquality) return (itemValue) => selectedValueIncludes(selectedValues, itemValue, comparer);
2727
+ const index2 = new Set(selectedValues);
2728
+ index2.delete(void 0);
2729
+ return (itemValue) => index2.has(itemValue) && (itemValue !== 0 || selectedValues.some((v) => Object.is(itemValue, v)));
2730
+ }
2731
+ function findSelectionIndex(itemValues, selectedValue, comparer, multiple) {
2732
+ const index2 = multiple && Array.isArray(selectedValue) ? itemValues.findIndex(createSelectionMatcher(selectedValue, comparer)) : findItemIndex(itemValues, selectedValue, comparer);
2733
+ return index2 === -1 ? null : index2;
2734
+ }
2735
+ function resolveSelectedIndex(index2, itemValue, registry, selectedValues, comparer, currentIndex) {
2736
+ if (selectedValueIncludes(selectedValues, itemValue, comparer)) return currentIndex != null && index2 > currentIndex && selectedValueIncludes(selectedValues, registry[currentIndex], comparer) ? currentIndex : index2;
2737
+ return index2 === currentIndex ? findSelectionIndex(registry, selectedValues, comparer, true) : currentIndex;
2738
+ }
2697
2739
  function removeItem(selectedValues, itemValue, comparer) {
2698
2740
  return selectedValues.filter((selectedValue) => !compareItemEquality(itemValue, selectedValue, comparer));
2699
2741
  }
@@ -2706,8 +2748,14 @@ function serializeValue(value) {
2706
2748
  return String(value);
2707
2749
  }
2708
2750
  }
2751
+ function isGroup(item) {
2752
+ return typeof item === "object" && item != null && Array.isArray(item.items);
2753
+ }
2709
2754
  function isGroupedItems(items) {
2710
- return items != null && items.length > 0 && typeof items[0] === "object" && items[0] != null && "items" in items[0];
2755
+ return isGroup(items?.[0]);
2756
+ }
2757
+ function flattenLeafItems(items) {
2758
+ return isGroupedItems(items) ? items.flatMap((group) => group.items) : items;
2711
2759
  }
2712
2760
  function hasNullItemLabel(items) {
2713
2761
  if (!Array.isArray(items)) return items != null && "null" in items;
@@ -2738,10 +2786,9 @@ function resolveSelectedLabel(value, items, itemToStringLabel) {
2738
2786
  }
2739
2787
  if (itemToStringLabel && value != null) return itemToStringLabel(value);
2740
2788
  if (value && typeof value === "object" && "label" in value && value.label != null) return value.label;
2741
- if (items && !Array.isArray(items)) return items[value] ?? fallback();
2789
+ if (items && !Array.isArray(items)) return (Object.hasOwn(items, value) ? items[value] : void 0) ?? fallback();
2742
2790
  if (Array.isArray(items)) {
2743
- const arrayItems = items;
2744
- const flatItems = isGroupedItems(arrayItems) ? arrayItems.flatMap((group) => group.items) : arrayItems;
2791
+ const flatItems = flattenLeafItems(items);
2745
2792
  if (value == null || typeof value !== "object") {
2746
2793
  const match = flatItems.find((item) => item.value === value);
2747
2794
  if (match && match.label != null) return match.label;
@@ -2805,17 +2852,6 @@ var selectors = {
2805
2852
  scrollDownArrowVisible: (state) => state.scrollDownArrowVisible,
2806
2853
  hasScrollArrows: (state) => state.hasScrollArrows
2807
2854
  };
2808
- function areArraysEqual(array1, array2, itemComparer = (a, b) => a === b) {
2809
- return array1.length === array2.length && array1.every((value, index2) => itemComparer(value, array2[index2]));
2810
- }
2811
- function useValueChanged(value, onChange) {
2812
- const valueRef = React$1.useRef(value);
2813
- const onChangeCallback = useStableCallback(onChange);
2814
- useIsoLayoutEffect(() => {
2815
- if (valueRef.current !== value) onChangeCallback(valueRef.current);
2816
- valueRef.current = value;
2817
- }, [value, onChangeCallback]);
2818
- }
2819
2855
  function useEnhancedClickHandler(handler) {
2820
2856
  const lastClickInteractionTypeRef = React$1.useRef("");
2821
2857
  const handlePointerDown = React$1.useCallback((event) => {
@@ -2906,6 +2942,7 @@ function SelectRoot(props) {
2906
2942
  dragY: 0
2907
2943
  });
2908
2944
  const alignItemWithTriggerActiveRef = React$1.useRef(false);
2945
+ const initialValueRef = React$1.useRef(value);
2909
2946
  const { mounted, setMounted, transitionStatus } = useTransitionStatus(open);
2910
2947
  const { openMethod, triggerProps: interactionTypeProps } = useOpenInteractionType(open);
2911
2948
  const store = useRefWithInit(() => new ReactStore({
@@ -2925,8 +2962,8 @@ function SelectRoot(props) {
2925
2962
  openMethod: null,
2926
2963
  activeIndex: null,
2927
2964
  selectedIndex: null,
2928
- popupProps: {},
2929
- triggerProps: {},
2965
+ popupProps: EMPTY_OBJECT,
2966
+ triggerProps: EMPTY_OBJECT,
2930
2967
  triggerElement: null,
2931
2968
  positionerElement: null,
2932
2969
  listElement: null,
@@ -2934,11 +2971,29 @@ function SelectRoot(props) {
2934
2971
  scrollUpArrowVisible: false,
2935
2972
  scrollDownArrowVisible: false,
2936
2973
  hasScrollArrows: false
2937
- })).current;
2938
- const activeIndex = useStore(store, selectors.activeIndex);
2939
- const selectedIndex = useStore(store, selectors.selectedIndex);
2940
- const triggerElement = useStore(store, selectors.triggerElement);
2941
- const positionerElement = useStore(store, selectors.positionerElement);
2974
+ }, {
2975
+ setValue: NOOP,
2976
+ setOpen: NOOP,
2977
+ handleScrollArrowVisibility: NOOP,
2978
+ onOpenChangeComplete: NOOP,
2979
+ listRef,
2980
+ popupRef,
2981
+ scrollHandlerRef,
2982
+ scrollArrowsMountedCountRef,
2983
+ valueRef,
2984
+ valuesRef,
2985
+ labelsRef,
2986
+ typingRef,
2987
+ selectionRef,
2988
+ firstItemTextRef,
2989
+ selectedItemTextRef,
2990
+ alignItemWithTriggerActiveRef,
2991
+ initialValueRef
2992
+ }, selectors)).current;
2993
+ const activeIndex = store.useState("activeIndex");
2994
+ const selectedIndex = store.useState("selectedIndex");
2995
+ const triggerElement = store.useState("triggerElement");
2996
+ const positionerElement = store.useState("positionerElement");
2942
2997
  const previousOpenMethod = usePreviousValue(openMethod);
2943
2998
  const renderedOpenMethod = openMethod ?? previousOpenMethod;
2944
2999
  const serializedValue = React$1.useMemo(() => {
@@ -2960,21 +3015,12 @@ function SelectRoot(props) {
2960
3015
  const controlRef = useValueAsRef(triggerElement);
2961
3016
  const getStringifiedValueForForm = useStableCallback(() => fieldStringValue);
2962
3017
  useRegisterFieldControl(controlRef, generatedId, value, getStringifiedValueForForm, !disabled, nameProp);
2963
- const initialValueRef = React$1.useRef(value);
2964
3018
  const hasSelectedValue = multiple ? Array.isArray(value) && value.length > 0 : value != null && serializedValue !== "";
2965
3019
  useIsoLayoutEffect(() => {
2966
3020
  setFilled(hasSelectedValue);
2967
3021
  }, [hasSelectedValue, setFilled]);
2968
3022
  useIsoLayoutEffect(function syncSelectedIndex() {
2969
- let target = value;
2970
- let empty = false;
2971
- if (multiple) {
2972
- const currentValue = Array.isArray(value) ? value : [];
2973
- empty = currentValue.length === 0;
2974
- target = currentValue[currentValue.length - 1];
2975
- }
2976
- const index2 = empty ? -1 : findItemIndex(valuesRef.current, target, isItemEqualToValue);
2977
- const nextIndex = index2 === -1 ? null : index2;
3023
+ const nextIndex = findSelectionIndex(valuesRef.current, value, isItemEqualToValue, multiple);
2978
3024
  if (nextIndex === null) selectedItemTextRef.current = null;
2979
3025
  if (open) return;
2980
3026
  store.set("selectedIndex", nextIndex);
@@ -2985,14 +3031,9 @@ function SelectRoot(props) {
2985
3031
  isItemEqualToValue,
2986
3032
  store
2987
3033
  ]);
2988
- function isSelectedValueDirty(currentValue) {
2989
- const initialValue = validityData.initialValue;
2990
- if (Array.isArray(currentValue) && Array.isArray(initialValue)) return !areArraysEqual(currentValue, initialValue, (itemValue, initialItemValue) => compareItemEquality(itemValue, initialItemValue, isItemEqualToValue));
2991
- return currentValue !== initialValue;
2992
- }
2993
3034
  useValueChanged(value, () => {
2994
3035
  clearErrors(name);
2995
- setDirty(isSelectedValueDirty(value));
3036
+ setDirty(isSelectedValueDirty(value, validityData.initialValue, isItemEqualToValue));
2996
3037
  validation.change(value);
2997
3038
  });
2998
3039
  const setOpen = useStableCallback((nextOpen, eventDetails) => {
@@ -3046,12 +3087,12 @@ function SelectRoot(props) {
3046
3087
  }
3047
3088
  });
3048
3089
  const click = useClick(floatingContext, {
3049
- enabled: !readOnly && !disabled,
3090
+ enabled: !disabled,
3050
3091
  event: "mousedown"
3051
3092
  });
3052
3093
  const dismiss = useDismiss(floatingContext);
3053
3094
  const listNavigation2 = useListNavigation(floatingContext, {
3054
- enabled: !readOnly && !disabled,
3095
+ enabled: !disabled,
3055
3096
  listRef,
3056
3097
  activeIndex,
3057
3098
  selectedIndex,
@@ -3063,7 +3104,7 @@ function SelectRoot(props) {
3063
3104
  focusItemOnHover: highlightItemOnHover
3064
3105
  });
3065
3106
  const typeahead = useTypeahead(floatingContext, {
3066
- enabled: !readOnly && !disabled && (open || !multiple),
3107
+ enabled: !disabled && (open || !readOnly && !multiple),
3067
3108
  listRef: labelsRef,
3068
3109
  activeIndex,
3069
3110
  selectedIndex,
@@ -3089,6 +3130,10 @@ function SelectRoot(props) {
3089
3130
  dismiss.floating
3090
3131
  ]);
3091
3132
  const itemProps = listNavigation2.item ?? EMPTY_OBJECT;
3133
+ store.useContextCallback("setValue", setValue);
3134
+ store.useContextCallback("setOpen", setOpen);
3135
+ store.useContextCallback("handleScrollArrowVisibility", handleScrollArrowVisibility);
3136
+ store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
3092
3137
  useOnFirstRender(() => {
3093
3138
  store.update({
3094
3139
  popupProps,
@@ -3111,47 +3156,20 @@ function SelectRoot(props) {
3111
3156
  isItemEqualToValue,
3112
3157
  openMethod: renderedOpenMethod
3113
3158
  });
3114
- const contextValue = React$1.useMemo(() => ({
3115
- store,
3116
- floatingContext,
3117
- required,
3159
+ const rootPropsContextValue = React$1.useMemo(() => ({
3118
3160
  disabled,
3119
3161
  readOnly,
3162
+ required,
3120
3163
  multiple,
3121
3164
  highlightItemOnHover,
3122
- setValue,
3123
- setOpen,
3124
- listRef,
3125
- popupRef,
3126
- scrollHandlerRef,
3127
- handleScrollArrowVisibility,
3128
- scrollArrowsMountedCountRef,
3129
- itemProps,
3130
- valueRef,
3131
- valuesRef,
3132
- labelsRef,
3133
- typingRef,
3134
- selectionRef,
3135
- firstItemTextRef,
3136
- selectedItemTextRef,
3137
- validation,
3138
- onOpenChangeComplete,
3139
- alignItemWithTriggerActiveRef,
3140
- initialValueRef
3165
+ itemProps
3141
3166
  }), [
3142
- store,
3143
- floatingContext,
3144
- required,
3145
3167
  disabled,
3146
3168
  readOnly,
3169
+ required,
3147
3170
  multiple,
3148
3171
  highlightItemOnHover,
3149
- setValue,
3150
- setOpen,
3151
- itemProps,
3152
- validation,
3153
- onOpenChangeComplete,
3154
- handleScrollArrowVisibility
3172
+ itemProps
3155
3173
  ]);
3156
3174
  const ref = useMergedRefs(inputRef, validation.inputRef);
3157
3175
  const hiddenInputName = multiple ? void 0 : name;
@@ -3176,9 +3194,15 @@ function SelectRoot(props) {
3176
3194
  disabled
3177
3195
  ]);
3178
3196
  return /* @__PURE__ */ jsxs(SelectRootContext.Provider, {
3179
- value: contextValue,
3197
+ value: store,
3180
3198
  children: [
3181
- children,
3199
+ /* @__PURE__ */ jsx(SelectRootPropsContext.Provider, {
3200
+ value: rootPropsContextValue,
3201
+ children: /* @__PURE__ */ jsx(SelectFloatingContext.Provider, {
3202
+ value: floatingContext,
3203
+ children
3204
+ })
3205
+ }),
3182
3206
  /* @__PURE__ */ jsx("input", {
3183
3207
  ...validation.getValidationProps(disabled, {
3184
3208
  onFocus() {
@@ -3251,33 +3275,35 @@ function getPseudoElementBounds(element) {
3251
3275
  bottom: elementRect.bottom + heightDiff / 2
3252
3276
  };
3253
3277
  }
3278
+ var popupSide = "data-popup-side";
3254
3279
  var SELECTED_DELAY = 400;
3255
3280
  var stateAttributesMapping$2 = {
3256
3281
  ...pressableTriggerOpenStateMapping,
3257
3282
  ...fieldValidityMapping,
3258
- popupSide: (side) => side ? { "data-popup-side": side } : null,
3283
+ popupSide: (side) => side ? { [popupSide]: side } : null,
3259
3284
  value: () => null
3260
3285
  };
3261
3286
  var SelectTrigger = /* @__PURE__ */ React$1.forwardRef(function SelectTrigger2(componentProps, forwardedRef) {
3262
3287
  const { render, className, id: idProp, disabled: disabledProp = false, nativeButton = true, style, ...elementProps } = componentProps;
3263
- const { setTouched, setFocused, validationMode, state: fieldState, disabled: fieldDisabled } = useFieldRootContext();
3288
+ const { setTouched, setFocused, validationMode, validation, state: fieldState, disabled: fieldDisabled } = useFieldRootContext();
3264
3289
  const { labelId: fieldLabelId } = useLabelableContext();
3265
- const { store, setOpen, selectionRef, validation, readOnly, required, alignItemWithTriggerActiveRef, disabled: selectDisabled } = useSelectRootContext();
3290
+ const store = useSelectRootContext();
3291
+ const { readOnly, required, disabled: selectDisabled } = useSelectRootPropsContext();
3266
3292
  const disabled = fieldDisabled || selectDisabled || disabledProp;
3267
- const open = useStore(store, selectors.open);
3268
- const mounted = useStore(store, selectors.mounted);
3269
- const value = useStore(store, selectors.value);
3270
- const triggerProps = useStore(store, selectors.triggerProps);
3271
- const positionerElement = useStore(store, selectors.positionerElement);
3272
- const listElement = useStore(store, selectors.listElement);
3273
- const popupSideValue = useStore(store, selectors.popupSide);
3274
- const rootId = useStore(store, selectors.id);
3275
- const selectLabelId = useStore(store, selectors.labelId);
3276
- const hasSelectedValue = useStore(store, selectors.hasSelectedValue);
3277
- const popupSide = mounted && positionerElement ? popupSideValue : null;
3293
+ const open = store.useState("open");
3294
+ const mounted = store.useState("mounted");
3295
+ const value = store.useState("value");
3296
+ const triggerProps = store.useState("triggerProps");
3297
+ const positionerElement = store.useState("positionerElement");
3298
+ const listElement = store.useState("listElement");
3299
+ const popupSideValue = store.useState("popupSide");
3300
+ const rootId = store.useState("id");
3301
+ const selectLabelId = store.useState("labelId");
3302
+ const hasSelectedValue = store.useState("hasSelectedValue");
3303
+ const popupSide2 = mounted && positionerElement ? popupSideValue : null;
3278
3304
  const id = idProp ?? rootId;
3279
3305
  const ariaLabelledBy = resolveAriaLabelledBy(fieldLabelId, selectLabelId);
3280
- useLabelableId({ id });
3306
+ useLabelableId({ id: idProp });
3281
3307
  const positionerRef = useValueAsRef(positionerElement);
3282
3308
  const triggerRef = React$1.useRef(null);
3283
3309
  const { getButtonProps, buttonRef } = useButton({
@@ -3291,14 +3317,14 @@ var SelectTrigger = /* @__PURE__ */ React$1.forwardRef(function SelectTrigger2(c
3291
3317
  React$1.useEffect(() => {
3292
3318
  if (open) {
3293
3319
  selectedDelayTimeout.start(SELECTED_DELAY, () => {
3294
- selectionRef.current.allowUnselectedMouseUp = true;
3295
- selectionRef.current.allowSelectedMouseUp = true;
3320
+ store.context.selectionRef.current.allowUnselectedMouseUp = true;
3321
+ store.context.selectionRef.current.allowSelectedMouseUp = true;
3296
3322
  });
3297
3323
  return () => {
3298
3324
  selectedDelayTimeout.clear();
3299
3325
  };
3300
3326
  }
3301
- selectionRef.current = {
3327
+ store.context.selectionRef.current = {
3302
3328
  allowSelectedMouseUp: false,
3303
3329
  allowUnselectedMouseUp: false,
3304
3330
  dragY: 0
@@ -3306,7 +3332,7 @@ var SelectTrigger = /* @__PURE__ */ React$1.forwardRef(function SelectTrigger2(c
3306
3332
  timeoutMouseDown.clear();
3307
3333
  }, [
3308
3334
  open,
3309
- selectionRef,
3335
+ store,
3310
3336
  timeoutMouseDown,
3311
3337
  selectedDelayTimeout
3312
3338
  ]);
@@ -3322,7 +3348,7 @@ var SelectTrigger = /* @__PURE__ */ React$1.forwardRef(function SelectTrigger2(c
3322
3348
  tabIndex: disabled ? -1 : 0,
3323
3349
  onFocus(event) {
3324
3350
  setFocused(true);
3325
- if (open && alignItemWithTriggerActiveRef.current) setOpen(false, createChangeEventDetails(none, event.nativeEvent));
3351
+ if (open && store.context.alignItemWithTriggerActiveRef.current) store.context.setOpen(false, createChangeEventDetails(none, event.nativeEvent));
3326
3352
  timeoutFocus.start(0, () => {
3327
3353
  store.set("forceMount", true);
3328
3354
  });
@@ -3341,7 +3367,7 @@ var SelectTrigger = /* @__PURE__ */ React$1.forwardRef(function SelectTrigger2(c
3341
3367
  const mouseUpTarget = mouseEvent.target;
3342
3368
  if (contains(triggerRef.current, mouseUpTarget) || contains(positionerRef.current, mouseUpTarget)) return;
3343
3369
  if (isMouseWithinBounds(mouseEvent, triggerRef.current)) return;
3344
- setOpen(false, createChangeEventDetails(cancelOpen, mouseEvent));
3370
+ store.context.setOpen(false, createChangeEventDetails(cancelOpen, mouseEvent));
3345
3371
  }
3346
3372
  timeoutMouseDown.start(0, () => {
3347
3373
  doc.addEventListener("mouseup", handleMouseUp, { once: true });
@@ -3356,7 +3382,7 @@ var SelectTrigger = /* @__PURE__ */ React$1.forwardRef(function SelectTrigger2(c
3356
3382
  disabled,
3357
3383
  value,
3358
3384
  readOnly,
3359
- popupSide,
3385
+ popupSide: popupSide2,
3360
3386
  placeholder: !hasSelectedValue
3361
3387
  };
3362
3388
  return useRenderElement("button", componentProps, {
@@ -3374,13 +3400,13 @@ var SelectTrigger = /* @__PURE__ */ React$1.forwardRef(function SelectTrigger2(c
3374
3400
  var stateAttributesMapping$1 = { value: () => null };
3375
3401
  var SelectValue = /* @__PURE__ */ React$1.forwardRef(function SelectValue2(componentProps, forwardedRef) {
3376
3402
  const { className, render, children: childrenProp, placeholder, style, ...elementProps } = componentProps;
3377
- const { store, valueRef } = useSelectRootContext();
3378
- const value = useStore(store, selectors.value);
3379
- const items = useStore(store, selectors.items);
3380
- const itemToStringLabel = useStore(store, selectors.itemToStringLabel);
3381
- const hasSelectedValue = useStore(store, selectors.hasSelectedValue);
3403
+ const store = useSelectRootContext();
3404
+ const value = store.useState("value");
3405
+ const items = store.useState("items");
3406
+ const itemToStringLabel = store.useState("itemToStringLabel");
3407
+ const hasSelectedValue = store.useState("hasSelectedValue");
3382
3408
  const shouldCheckNullItemLabel = !hasSelectedValue && placeholder != null && childrenProp == null;
3383
- const hasNullLabel = useStore(store, selectors.hasNullItemLabel, shouldCheckNullItemLabel);
3409
+ const hasNullLabel = store.useState("hasNullItemLabel", shouldCheckNullItemLabel);
3384
3410
  const state = {
3385
3411
  value,
3386
3412
  placeholder: !hasSelectedValue
@@ -3393,15 +3419,14 @@ var SelectValue = /* @__PURE__ */ React$1.forwardRef(function SelectValue2(compo
3393
3419
  else children = resolveSelectedLabel(value, items, itemToStringLabel);
3394
3420
  return useRenderElement("span", componentProps, {
3395
3421
  state,
3396
- ref: [forwardedRef, valueRef],
3422
+ ref: [forwardedRef, store.context.valueRef],
3397
3423
  props: [{ children }, elementProps],
3398
3424
  stateAttributesMapping: stateAttributesMapping$1
3399
3425
  });
3400
3426
  });
3401
3427
  var SelectIcon = /* @__PURE__ */ React$1.forwardRef(function SelectIcon2(componentProps, forwardedRef) {
3402
3428
  const { render, className, style, ...elementProps } = componentProps;
3403
- const { store } = useSelectRootContext();
3404
- const state = { open: useStore(store, selectors.open) };
3429
+ const state = { open: useSelectRootContext().useState("open") };
3405
3430
  return useRenderElement("span", componentProps, {
3406
3431
  state,
3407
3432
  ref: forwardedRef,
@@ -3413,9 +3438,9 @@ var SelectIcon = /* @__PURE__ */ React$1.forwardRef(function SelectIcon2(compone
3413
3438
  });
3414
3439
  });
3415
3440
  var SelectPortal = /* @__PURE__ */ React$1.forwardRef(function SelectPortal2(portalProps, forwardedRef) {
3416
- const { store } = useSelectRootContext();
3417
- const mounted = useStore(store, selectors.mounted);
3418
- const forceMount = useStore(store, selectors.forceMount);
3441
+ const store = useSelectRootContext();
3442
+ const mounted = store.useState("mounted");
3443
+ const forceMount = store.useState("forceMount");
3419
3444
  if (!(mounted || forceMount)) return null;
3420
3445
  return /* @__PURE__ */ jsx(FloatingPortal, {
3421
3446
  ref: forwardedRef,
@@ -3442,7 +3467,7 @@ function CompositeList(props) {
3442
3467
  const map = useRefWithInit(createMap).current;
3443
3468
  const nextIndexRef = React$1.useRef(0);
3444
3469
  const isDirtyRef = React$1.useRef(true);
3445
- const itemsRef = React$1.useRef([]);
3470
+ const itemsRef = React$1.useRef(null);
3446
3471
  const mutationObserverRef = React$1.useRef(null);
3447
3472
  const scheduleMapUpdate = useStableCallback(() => {
3448
3473
  if (isDirtyRef.current) return;
@@ -3500,14 +3525,20 @@ function CompositeList(props) {
3500
3525
  const flush = useStableCallback(() => {
3501
3526
  const [items, automaticNodes] = getCompositeListSnapshot(map);
3502
3527
  const nextMap = syncRefs(items);
3528
+ const previousItems = itemsRef.current;
3529
+ const changed = !previousItems || previousItems.length !== items.length || items.some((item, index2) => {
3530
+ const previousItem = previousItems[index2];
3531
+ return item.index !== previousItem.index || item.element !== previousItem.element || item.registration.index !== previousItem.registration.index || item.registration.metadata !== previousItem.registration.metadata;
3532
+ });
3503
3533
  observe(automaticNodes);
3504
3534
  itemsRef.current = items;
3505
3535
  isDirtyRef.current = false;
3536
+ if (!changed) return;
3506
3537
  listeners.forEach((listener) => listener(nextMap));
3507
3538
  onMapChange(nextMap);
3508
3539
  });
3509
3540
  useIsoLayoutEffect(() => {
3510
- if (!isDirtyRef.current) syncRefs(itemsRef.current);
3541
+ if (!isDirtyRef.current && itemsRef.current) syncRefs(itemsRef.current);
3511
3542
  return () => {
3512
3543
  elementsRef.current = [];
3513
3544
  if (labelsRef) labelsRef.current = [];
@@ -3631,22 +3662,23 @@ function useAnchoredPopupScrollLock(enabled, touchOpen, positionerElement, refer
3631
3662
  var FIXED = { position: "fixed" };
3632
3663
  var SelectPositioner = /* @__PURE__ */ React$1.forwardRef(function SelectPositioner2(componentProps, forwardedRef) {
3633
3664
  const { anchor, className, render, positionMethod, side, align, sideOffset, alignOffset, collisionBoundary = "clipping-ancestors", collisionPadding, arrowPadding, sticky, disableAnchorTracking, alignItemWithTrigger = true, collisionAvoidance = DROPDOWN_COLLISION_AVOIDANCE, style, ...elementProps } = componentProps;
3634
- const { store, listRef, labelsRef, alignItemWithTriggerActiveRef, selectedItemTextRef, valuesRef, initialValueRef, popupRef, setValue, floatingContext: floatingRootContext } = useSelectRootContext();
3635
- const open = useStore(store, selectors.open);
3636
- const mounted = useStore(store, selectors.mounted);
3637
- const modal = useStore(store, selectors.modal);
3638
- const value = useStore(store, selectors.value);
3639
- const openMethod = useStore(store, selectors.openMethod);
3640
- const positionerElement = useStore(store, selectors.positionerElement);
3641
- const triggerElement = useStore(store, selectors.triggerElement);
3642
- const isItemEqualToValue = useStore(store, selectors.isItemEqualToValue);
3643
- const transitionStatus = useStore(store, selectors.transitionStatus);
3665
+ const store = useSelectRootContext();
3666
+ const floatingRootContext = useSelectFloatingContext();
3667
+ const open = store.useState("open");
3668
+ const mounted = store.useState("mounted");
3669
+ const modal = store.useState("modal");
3670
+ const value = store.useState("value");
3671
+ const openMethod = store.useState("openMethod");
3672
+ const positionerElement = store.useState("positionerElement");
3673
+ const triggerElement = store.useState("triggerElement");
3674
+ const isItemEqualToValue = store.useState("isItemEqualToValue");
3675
+ const transitionStatus = store.useState("transitionStatus");
3644
3676
  const scrollUpArrowRef = React$1.useRef(null);
3645
3677
  const scrollDownArrowRef = React$1.useRef(null);
3646
3678
  const [controlledAlignItemWithTrigger, setControlledAlignItemWithTrigger] = React$1.useState(alignItemWithTrigger);
3647
3679
  const alignItemWithTriggerActive = mounted && controlledAlignItemWithTrigger && openMethod !== "touch";
3648
3680
  if (!mounted && controlledAlignItemWithTrigger !== alignItemWithTrigger) setControlledAlignItemWithTrigger(alignItemWithTrigger);
3649
- React$1.useImperativeHandle(alignItemWithTriggerActiveRef, () => alignItemWithTriggerActive);
3681
+ React$1.useImperativeHandle(store.context.alignItemWithTriggerActiveRef, () => alignItemWithTriggerActive);
3650
3682
  useAnchoredPopupScrollLock((alignItemWithTriggerActive || modal) && open, openMethod === "touch", positionerElement, triggerElement);
3651
3683
  const positioning = useAnchorPositioning({
3652
3684
  anchor,
@@ -3686,29 +3718,28 @@ var SelectPositioner = /* @__PURE__ */ React$1.forwardRef(function SelectPositio
3686
3718
  });
3687
3719
  const prevMapSizeRef = React$1.useRef(0);
3688
3720
  const onMapChange = useStableCallback((map) => {
3689
- if (valuesRef.current.length === 0) return;
3721
+ if (store.context.valuesRef.current.length === 0) return;
3690
3722
  const prevSize = prevMapSizeRef.current;
3691
3723
  prevMapSizeRef.current = map.size;
3692
- if (map.size === prevSize) return;
3693
3724
  const eventDetails = createChangeEventDetails(none);
3694
3725
  if (prevSize !== 0 && !store.state.multiple && value !== null) {
3695
- if (findItemIndex(valuesRef.current, value, isItemEqualToValue) === -1) {
3696
- const initialSelectedValue = initialValueRef.current;
3697
- const nextValue = initialSelectedValue != null && findItemIndex(valuesRef.current, initialSelectedValue, isItemEqualToValue) !== -1 ? initialSelectedValue : null;
3698
- setValue(nextValue, eventDetails);
3726
+ if (findItemIndex(store.context.valuesRef.current, value, isItemEqualToValue) === -1) {
3727
+ const initialSelectedValue = store.context.initialValueRef.current;
3728
+ const nextValue = initialSelectedValue != null && findItemIndex(store.context.valuesRef.current, initialSelectedValue, isItemEqualToValue) !== -1 ? initialSelectedValue : null;
3729
+ store.context.setValue(nextValue, eventDetails);
3699
3730
  if (nextValue === null) {
3700
3731
  store.set("selectedIndex", null);
3701
- selectedItemTextRef.current = null;
3732
+ store.context.selectedItemTextRef.current = null;
3702
3733
  }
3703
3734
  }
3704
3735
  }
3705
3736
  if (prevSize !== 0 && store.state.multiple && Array.isArray(value)) {
3706
- const nextValue = value.filter((selectedItemValue) => findItemIndex(valuesRef.current, selectedItemValue, isItemEqualToValue) !== -1);
3737
+ const nextValue = value.filter((selectedItemValue) => findItemIndex(store.context.valuesRef.current, selectedItemValue, isItemEqualToValue) !== -1);
3707
3738
  if (nextValue.length !== value.length) {
3708
- setValue(nextValue, eventDetails);
3739
+ store.context.setValue(nextValue, eventDetails);
3709
3740
  if (nextValue.length === 0) {
3710
3741
  store.set("selectedIndex", null);
3711
- selectedItemTextRef.current = null;
3742
+ store.context.selectedItemTextRef.current = null;
3712
3743
  }
3713
3744
  }
3714
3745
  }
@@ -3719,7 +3750,7 @@ var SelectPositioner = /* @__PURE__ */ React$1.forwardRef(function SelectPositio
3719
3750
  });
3720
3751
  const stylesToClear = { height: "" };
3721
3752
  clearStyles(positionerElement, stylesToClear);
3722
- clearStyles(popupRef.current, stylesToClear);
3753
+ clearStyles(store.context.popupRef.current, stylesToClear);
3723
3754
  }
3724
3755
  });
3725
3756
  const contextValue = React$1.useMemo(() => ({
@@ -3736,8 +3767,8 @@ var SelectPositioner = /* @__PURE__ */ React$1.forwardRef(function SelectPositio
3736
3767
  setControlledAlignItemWithTrigger
3737
3768
  ]);
3738
3769
  return /* @__PURE__ */ jsx(CompositeList, {
3739
- elementsRef: listRef,
3740
- labelsRef,
3770
+ elementsRef: store.context.listRef,
3771
+ labelsRef: store.context.labelsRef,
3741
3772
  onMapChange,
3742
3773
  children: /* @__PURE__ */ jsxs(SelectPositionerContext.Provider, {
3743
3774
  value: contextValue,
@@ -3771,36 +3802,39 @@ var DEFAULT_CSP_CONTEXT_VALUE = { disableStyleElements: false };
3771
3802
  function useCSPContext() {
3772
3803
  return React$1.useContext(CSPContext) ?? DEFAULT_CSP_CONTEXT_VALUE;
3773
3804
  }
3805
+ var transformOrigin = "--transform-origin";
3774
3806
  var stateAttributesMapping = {
3775
3807
  ...popupStateMapping,
3776
3808
  ...transitionStatusMapping
3777
3809
  };
3778
3810
  var SelectPopup = /* @__PURE__ */ React$1.forwardRef(function SelectPopup2(componentProps, forwardedRef) {
3779
3811
  const { render, className, style, finalFocus, ...elementProps } = componentProps;
3780
- const { store, popupRef, onOpenChangeComplete, setOpen, valueRef, firstItemTextRef, selectedItemTextRef, multiple, handleScrollArrowVisibility, scrollHandlerRef, listRef, highlightItemOnHover, floatingContext: floatingRootContext } = useSelectRootContext();
3812
+ const store = useSelectRootContext();
3813
+ const { multiple, readOnly, highlightItemOnHover } = useSelectRootPropsContext();
3814
+ const floatingRootContext = useSelectFloatingContext();
3781
3815
  const { side, align, alignItemWithTriggerActive, isPositioned, setControlledAlignItemWithTrigger } = useSelectPositionerContext();
3782
3816
  const insideToolbar = useToolbarRootContext(true) != null;
3783
3817
  const direction = useDirection();
3784
3818
  const { nonce, disableStyleElements } = useCSPContext();
3785
- const id = useStore(store, selectors.id);
3786
- const open = useStore(store, selectors.open);
3787
- const openMethod = useStore(store, selectors.openMethod);
3788
- const mounted = useStore(store, selectors.mounted);
3789
- const popupProps = useStore(store, selectors.popupProps);
3790
- const transitionStatus = useStore(store, selectors.transitionStatus);
3791
- const triggerElement = useStore(store, selectors.triggerElement);
3792
- const positionerElement = useStore(store, selectors.positionerElement);
3793
- const listElement = useStore(store, selectors.listElement);
3819
+ const id = store.useState("id");
3820
+ const open = store.useState("open");
3821
+ const openMethod = store.useState("openMethod");
3822
+ const mounted = store.useState("mounted");
3823
+ const popupProps = store.useState("popupProps");
3824
+ const transitionStatus = store.useState("transitionStatus");
3825
+ const triggerElement = store.useState("triggerElement");
3826
+ const positionerElement = store.useState("positionerElement");
3827
+ const listElement = store.useState("listElement");
3794
3828
  const reachedMaxHeightRef = React$1.useRef(false);
3795
3829
  const initialPlacedRef = React$1.useRef(false);
3796
3830
  const originalPositionerStylesRef = React$1.useRef({});
3797
3831
  const scrollArrowFrame = useAnimationFrame();
3798
3832
  const handleScroll = useStableCallback((scroller) => {
3799
- if (!positionerElement || !popupRef.current || !initialPlacedRef.current) return;
3833
+ if (!positionerElement || !store.context.popupRef.current || !initialPlacedRef.current) return;
3800
3834
  const isTopPositioned = positionerElement.style.top === "0px";
3801
3835
  const isBottomPositioned = positionerElement.style.bottom === "0px";
3802
3836
  if (reachedMaxHeightRef.current || !alignItemWithTriggerActive || !isTopPositioned && !isBottomPositioned) {
3803
- handleScrollArrowVisibility(scroller);
3837
+ store.context.handleScrollArrowVisibility(scroller);
3804
3838
  return;
3805
3839
  }
3806
3840
  const scale = getScale(positionerElement);
@@ -3810,7 +3844,7 @@ var SelectPopup = /* @__PURE__ */ React$1.forwardRef(function SelectPopup2(compo
3810
3844
  const positionerStyles = win.getComputedStyle(positionerElement);
3811
3845
  const marginTop = parseFloat(positionerStyles.marginTop);
3812
3846
  const marginBottom = parseFloat(positionerStyles.marginBottom);
3813
- const maxPopupHeight = getMaxPopupHeight(win.getComputedStyle(popupRef.current));
3847
+ const maxPopupHeight = getMaxPopupHeight(win.getComputedStyle(store.context.popupRef.current));
3814
3848
  const maxAvailableHeight = Math.min(doc.documentElement.clientHeight - marginTop - marginBottom, maxPopupHeight);
3815
3849
  const scrollTop = scroller.scrollTop;
3816
3850
  const maxScrollTop = getMaxScrollTop(scroller);
@@ -3825,7 +3859,7 @@ var SelectPopup = /* @__PURE__ */ React$1.forwardRef(function SelectPopup2(compo
3825
3859
  if (heightDelta > 0) setHeight(currentHeight + heightDelta);
3826
3860
  scroller.scrollTop = isTopPositioned ? maxScrollTop : 0;
3827
3861
  if (maxAvailableHeight - (currentHeight + heightDelta) <= 1) reachedMaxHeightRef.current = true;
3828
- handleScrollArrowVisibility(scroller);
3862
+ store.context.handleScrollArrowVisibility(scroller);
3829
3863
  return;
3830
3864
  }
3831
3865
  if (maxAvailableHeight - nextHeight > 1) nextScrollTop = isTopPositioned ? Infinity : 0;
@@ -3837,14 +3871,14 @@ var SelectPopup = /* @__PURE__ */ React$1.forwardRef(function SelectPopup2(compo
3837
3871
  if (Math.abs(scroller.scrollTop - target) > 1) scroller.scrollTop = target;
3838
3872
  }
3839
3873
  if (nextPositionerHeight >= maxAvailableHeight - 1) reachedMaxHeightRef.current = true;
3840
- handleScrollArrowVisibility(scroller);
3874
+ store.context.handleScrollArrowVisibility(scroller);
3841
3875
  });
3842
- React$1.useImperativeHandle(scrollHandlerRef, () => handleScroll, [handleScroll]);
3876
+ React$1.useImperativeHandle(store.context.scrollHandlerRef, () => handleScroll, [handleScroll]);
3843
3877
  useOpenChangeComplete({
3844
3878
  open,
3845
- ref: popupRef,
3879
+ ref: store.context.popupRef,
3846
3880
  onComplete() {
3847
- if (open) onOpenChangeComplete?.(true);
3881
+ if (open) store.context.onOpenChangeComplete(true);
3848
3882
  }
3849
3883
  });
3850
3884
  const state = {
@@ -3854,7 +3888,7 @@ var SelectPopup = /* @__PURE__ */ React$1.forwardRef(function SelectPopup2(compo
3854
3888
  align
3855
3889
  };
3856
3890
  useIsoLayoutEffect(() => {
3857
- if (!positionerElement || !popupRef.current || Object.keys(originalPositionerStylesRef.current).length) return;
3891
+ if (!positionerElement || !store.context.popupRef.current || Object.keys(originalPositionerStylesRef.current).length) return;
3858
3892
  originalPositionerStylesRef.current = {
3859
3893
  top: positionerElement.style.top || "0",
3860
3894
  left: positionerElement.style.left || "0",
@@ -3866,7 +3900,7 @@ var SelectPopup = /* @__PURE__ */ React$1.forwardRef(function SelectPopup2(compo
3866
3900
  marginTop: positionerElement.style.marginTop,
3867
3901
  marginBottom: positionerElement.style.marginBottom
3868
3902
  };
3869
- }, [popupRef, positionerElement]);
3903
+ }, [store, positionerElement]);
3870
3904
  useIsoLayoutEffect(() => {
3871
3905
  if (open || alignItemWithTriggerActive) return;
3872
3906
  initialPlacedRef.current = false;
@@ -3875,23 +3909,22 @@ var SelectPopup = /* @__PURE__ */ React$1.forwardRef(function SelectPopup2(compo
3875
3909
  }, [
3876
3910
  open,
3877
3911
  alignItemWithTriggerActive,
3878
- positionerElement,
3879
- popupRef
3912
+ positionerElement
3880
3913
  ]);
3881
3914
  useIsoLayoutEffect(() => {
3882
- const popupElement = popupRef.current;
3915
+ const popupElement = store.context.popupRef.current;
3883
3916
  if (!open || !triggerElement || !positionerElement || !popupElement || alignItemWithTriggerActive && !isPositioned || store.state.transitionStatus === "ending") return;
3884
3917
  initialPlacedRef.current = true;
3885
- popupElement.style.removeProperty("--transform-origin");
3918
+ popupElement.style.removeProperty(transformOrigin);
3886
3919
  if (!alignItemWithTriggerActive) {
3887
- scrollArrowFrame.request(() => handleScrollArrowVisibility(listElement || popupElement));
3920
+ scrollArrowFrame.request(() => store.context.handleScrollArrowVisibility(listElement || popupElement));
3888
3921
  return;
3889
3922
  }
3890
3923
  const restoreTransformStyles = unsetTransformStyles(popupElement);
3891
3924
  try {
3892
- let textElement = selectedItemTextRef.current;
3893
- if (!textElement?.isConnected) textElement = !selectors.hasSelectedValue(store.state) && firstItemTextRef.current?.isConnected ? firstItemTextRef.current : null;
3894
- const valueElement = valueRef.current;
3925
+ let textElement = store.context.selectedItemTextRef.current;
3926
+ if (!textElement?.isConnected) textElement = !store.select("hasSelectedValue") && store.context.firstItemTextRef.current?.isConnected ? store.context.firstItemTextRef.current : null;
3927
+ const valueElement = store.context.valueRef.current;
3895
3928
  const win = getWindow(positionerElement);
3896
3929
  const positionerStyles = win.getComputedStyle(positionerElement);
3897
3930
  const popupStyles = win.getComputedStyle(popupElement);
@@ -3959,11 +3992,11 @@ var SelectPopup = /* @__PURE__ */ React$1.forwardRef(function SelectPopup2(compo
3959
3992
  const popupHeight = positionerRect.height;
3960
3993
  const textCenterY = textRect.top + textRect.height / 2;
3961
3994
  const clampedY = clamp(popupHeight > 0 ? (textCenterY - popupTop) / popupHeight * 100 : 50, 0, 100);
3962
- popupElement.style.setProperty("--transform-origin", `50% ${clampedY}%`);
3995
+ popupElement.style.setProperty(transformOrigin, `50% ${clampedY}%`);
3963
3996
  }
3964
3997
  if (initialHeight === viewportHeight || height >= maxPopupHeight) reachedMaxHeightRef.current = true;
3965
- handleScrollArrowVisibility(scroller);
3966
- if (highlightItemOnHover && store.state.selectedIndex === null && store.state.activeIndex === null && listRef.current[0] != null) store.set("activeIndex", 0);
3998
+ store.context.handleScrollArrowVisibility(scroller);
3999
+ if (highlightItemOnHover && store.state.selectedIndex === null && store.state.activeIndex === null && store.context.listRef.current[0] != null) store.set("activeIndex", 0);
3967
4000
  } finally {
3968
4001
  restoreTransformStyles();
3969
4002
  }
@@ -3972,16 +4005,10 @@ var SelectPopup = /* @__PURE__ */ React$1.forwardRef(function SelectPopup2(compo
3972
4005
  open,
3973
4006
  positionerElement,
3974
4007
  triggerElement,
3975
- valueRef,
3976
- firstItemTextRef,
3977
- selectedItemTextRef,
3978
- popupRef,
3979
- handleScrollArrowVisibility,
3980
4008
  alignItemWithTriggerActive,
3981
4009
  setControlledAlignItemWithTrigger,
3982
4010
  scrollArrowFrame,
3983
4011
  listElement,
3984
- listRef,
3985
4012
  highlightItemOnHover,
3986
4013
  direction,
3987
4014
  isPositioned
@@ -3990,22 +4017,20 @@ var SelectPopup = /* @__PURE__ */ React$1.forwardRef(function SelectPopup2(compo
3990
4017
  if (!alignItemWithTriggerActive || !positionerElement || !open) return;
3991
4018
  const win = getWindow(positionerElement);
3992
4019
  function handleResize(event) {
3993
- setOpen(false, createChangeEventDetails(windowResize, event));
4020
+ store.context.setOpen(false, createChangeEventDetails(windowResize, event));
3994
4021
  }
3995
4022
  return addEventListener(win, "resize", handleResize);
3996
4023
  }, [
3997
- setOpen,
4024
+ store,
3998
4025
  alignItemWithTriggerActive,
3999
4026
  positionerElement,
4000
4027
  open
4001
4028
  ]);
4002
4029
  const defaultProps = {
4003
- ...listElement ? {
4004
- role: "presentation",
4005
- "aria-orientation": void 0
4006
- } : {
4030
+ ...listElement ? { role: "presentation" } : {
4007
4031
  role: "listbox",
4008
4032
  "aria-multiselectable": multiple || void 0,
4033
+ "aria-readonly": readOnly || void 0,
4009
4034
  id: `${id}-list`
4010
4035
  },
4011
4036
  onKeyDown(event) {
@@ -4019,7 +4044,7 @@ var SelectPopup = /* @__PURE__ */ React$1.forwardRef(function SelectPopup2(compo
4019
4044
  className: !listElement && alignItemWithTriggerActive ? styleDisableScrollbar.className : void 0
4020
4045
  };
4021
4046
  const element = useRenderElement("div", componentProps, {
4022
- ref: [forwardedRef, popupRef],
4047
+ ref: [forwardedRef, store.context.popupRef],
4023
4048
  state,
4024
4049
  stateAttributesMapping,
4025
4050
  props: [
@@ -4082,16 +4107,18 @@ function unsetTransformStyles(popupElement) {
4082
4107
  }
4083
4108
  var SelectList = /* @__PURE__ */ React$1.forwardRef(function SelectList2(componentProps, forwardedRef) {
4084
4109
  const { render, className, style, ...elementProps } = componentProps;
4085
- const { store, scrollHandlerRef, multiple } = useSelectRootContext();
4110
+ const store = useSelectRootContext();
4111
+ const { multiple, readOnly } = useSelectRootPropsContext();
4086
4112
  const { alignItemWithTriggerActive } = useSelectPositionerContext();
4087
- const hasScrollArrows = useStore(store, selectors.hasScrollArrows);
4088
- const openMethod = useStore(store, selectors.openMethod);
4113
+ const hasScrollArrows = store.useState("hasScrollArrows");
4114
+ const openMethod = store.useState("openMethod");
4089
4115
  const defaultProps = {
4090
- id: `${useStore(store, selectors.id)}-list`,
4116
+ id: `${store.useState("id")}-list`,
4091
4117
  role: "listbox",
4092
4118
  "aria-multiselectable": multiple || void 0,
4119
+ "aria-readonly": readOnly || void 0,
4093
4120
  onScroll(event) {
4094
- scrollHandlerRef.current?.(event.currentTarget);
4121
+ store.context.scrollHandlerRef.current?.(event.currentTarget);
4095
4122
  },
4096
4123
  ...alignItemWithTriggerActive && { style: LIST_FUNCTIONAL_STYLES },
4097
4124
  className: hasScrollArrows && openMethod !== "touch" ? styleDisableScrollbar.className : void 0
@@ -4160,17 +4187,18 @@ var SelectItem = /* @__PURE__ */ React$1.memo(/* @__PURE__ */ React$1.forwardRef
4160
4187
  label,
4161
4188
  textRef
4162
4189
  });
4163
- const { store, itemProps, setOpen, setValue, selectionRef, typingRef, valuesRef, multiple, selectedItemTextRef, disabled: selectDisabled, readOnly } = useSelectRootContext();
4190
+ const store = useSelectRootContext();
4191
+ const { itemProps, multiple, disabled: selectDisabled, readOnly } = useSelectRootPropsContext();
4164
4192
  const disabled = selectDisabled || disabledProp;
4165
- const highlighted = useStore(store, selectors.isActive, listItem.index);
4166
- const open = useStore(store, selectors.open);
4167
- const selected = useStore(store, selectors.isSelected, itemValue);
4168
- const selectedByFocus = useStore(store, selectors.isSelectedByFocus, listItem.index);
4169
- const isItemEqualToValue = useStore(store, selectors.isItemEqualToValue);
4193
+ const highlighted = store.useState("isActive", listItem.index);
4194
+ const open = store.useState("open");
4195
+ const selected = store.useState("isSelected", itemValue);
4196
+ const selectedByFocus = store.useState("isSelectedByFocus", listItem.index);
4197
+ const isItemEqualToValue = store.useState("isItemEqualToValue");
4170
4198
  const index2 = listItem.index;
4171
4199
  const itemRef = React$1.useRef(null);
4172
4200
  useIsoLayoutEffect(() => {
4173
- const values = valuesRef.current;
4201
+ const values = store.context.valuesRef.current;
4174
4202
  values[index2] = itemValue;
4175
4203
  return () => {
4176
4204
  delete values[index2];
@@ -4178,23 +4206,29 @@ var SelectItem = /* @__PURE__ */ React$1.memo(/* @__PURE__ */ React$1.forwardRef
4178
4206
  }, [
4179
4207
  index2,
4180
4208
  itemValue,
4181
- valuesRef
4209
+ store
4182
4210
  ]);
4183
4211
  useIsoLayoutEffect(() => {
4184
4212
  const selectedValue = store.state.value;
4185
- let selectedCandidate = selectedValue;
4186
- if (multiple && Array.isArray(selectedValue)) selectedCandidate = selectedValue.length > 0 ? selectedValue[selectedValue.length - 1] : void 0;
4187
- if (selectedCandidate !== void 0 && compareItemEquality(itemValue, selectedCandidate, isItemEqualToValue)) {
4188
- store.set("selectedIndex", index2);
4189
- if (textRef.current) selectedItemTextRef.current = textRef.current;
4213
+ const currentIndex = store.state.selectedIndex;
4214
+ let nextIndex = currentIndex;
4215
+ let claims;
4216
+ if (multiple && Array.isArray(selectedValue)) {
4217
+ nextIndex = resolveSelectedIndex(index2, itemValue, store.context.valuesRef.current, selectedValue, isItemEqualToValue, currentIndex);
4218
+ claims = nextIndex === index2;
4219
+ if (index2 === currentIndex && !claims) store.context.selectedItemTextRef.current = null;
4220
+ } else {
4221
+ claims = selectedValue !== void 0 && compareItemEquality(itemValue, selectedValue, isItemEqualToValue);
4222
+ if (claims) nextIndex = index2;
4190
4223
  }
4224
+ store.set("selectedIndex", nextIndex);
4225
+ if (claims && textRef.current) store.context.selectedItemTextRef.current = textRef.current;
4191
4226
  }, [
4192
4227
  index2,
4193
4228
  multiple,
4194
4229
  isItemEqualToValue,
4195
4230
  store,
4196
- itemValue,
4197
- selectedItemTextRef
4231
+ itemValue
4198
4232
  ]);
4199
4233
  const pointerTypeRef = React$1.useRef("mouse");
4200
4234
  const allowMouseSelectionRef = React$1.useRef(false);
@@ -4215,14 +4249,14 @@ var SelectItem = /* @__PURE__ */ React$1.memo(/* @__PURE__ */ React$1.forwardRef
4215
4249
  if (multiple) {
4216
4250
  const currentValue = Array.isArray(selectedValue) ? selectedValue : [];
4217
4251
  const nextValue = selected ? removeItem(currentValue, itemValue, isItemEqualToValue) : [...currentValue, itemValue];
4218
- setValue(nextValue, createChangeEventDetails(itemPress, event));
4252
+ store.context.setValue(nextValue, createChangeEventDetails(itemPress, event));
4219
4253
  } else {
4220
- setValue(itemValue, createChangeEventDetails(itemPress, event));
4221
- setOpen(false, createChangeEventDetails(itemPress, event));
4254
+ store.context.setValue(itemValue, createChangeEventDetails(itemPress, event));
4255
+ store.context.setOpen(false, createChangeEventDetails(itemPress, event));
4222
4256
  }
4223
4257
  }
4224
4258
  function resetDragMovement() {
4225
- selectionRef.current.dragY = 0;
4259
+ store.context.selectionRef.current.dragY = 0;
4226
4260
  }
4227
4261
  const defaultProps = {
4228
4262
  role: "option",
@@ -4230,7 +4264,7 @@ var SelectItem = /* @__PURE__ */ React$1.memo(/* @__PURE__ */ React$1.forwardRef
4230
4264
  tabIndex: open && highlighted ? 0 : -1,
4231
4265
  onKeyDown(event) {
4232
4266
  store.set("activeIndex", index2);
4233
- if (event.key === " " && typingRef.current) event.preventDefault();
4267
+ if (event.key === " " && store.context.typingRef.current) event.preventDefault();
4234
4268
  },
4235
4269
  onClick(event) {
4236
4270
  const isMouseClick = pointerTypeRef.current !== "touch";
@@ -4246,7 +4280,7 @@ var SelectItem = /* @__PURE__ */ React$1.memo(/* @__PURE__ */ React$1.forwardRef
4246
4280
  },
4247
4281
  onPointerMove(event) {
4248
4282
  if (event.pointerType === "mouse" && event.buttons === 1) {
4249
- const selection = selectionRef.current;
4283
+ const selection = store.context.selectionRef.current;
4250
4284
  selection.dragY += event.movementY;
4251
4285
  if (selection.dragY ** 2 >= 64) selection.allowUnselectedMouseUp = true;
4252
4286
  }
@@ -4260,8 +4294,8 @@ var SelectItem = /* @__PURE__ */ React$1.memo(/* @__PURE__ */ React$1.forwardRef
4260
4294
  resetDragMovement();
4261
4295
  if (disabled || pointerTypeRef.current === "touch") return;
4262
4296
  if (allowMouseSelectionRef.current) return;
4263
- const disallowSelectedMouseUp = !selectionRef.current.allowSelectedMouseUp && selected;
4264
- const disallowUnselectedMouseUp = !selectionRef.current.allowUnselectedMouseUp && !selected;
4297
+ const disallowSelectedMouseUp = !store.context.selectionRef.current.allowSelectedMouseUp && selected;
4298
+ const disallowUnselectedMouseUp = !store.context.selectionRef.current.allowUnselectedMouseUp && !selected;
4265
4299
  if (disallowSelectedMouseUp || disallowUnselectedMouseUp) return;
4266
4300
  allowMouseSelectionRef.current = true;
4267
4301
  itemRef.current?.click();
@@ -4325,6 +4359,8 @@ var Inner = /* @__PURE__ */ React$1.memo(/* @__PURE__ */ React$1.forwardRef((com
4325
4359
  stateAttributesMapping: transitionStatusMapping
4326
4360
  });
4327
4361
  useOpenChangeComplete({
4362
+ batch: true,
4363
+ enabled: !selected,
4328
4364
  open: selected,
4329
4365
  ref: indicatorRef,
4330
4366
  onComplete() {
@@ -4335,15 +4371,14 @@ var Inner = /* @__PURE__ */ React$1.memo(/* @__PURE__ */ React$1.forwardRef((com
4335
4371
  }));
4336
4372
  var SelectItemText = /* @__PURE__ */ React$1.memo(/* @__PURE__ */ React$1.forwardRef(function SelectItemText2(componentProps, forwardedRef) {
4337
4373
  const { index: index2, textRef, selectedByFocus } = useSelectItemContext();
4338
- const { firstItemTextRef, selectedItemTextRef } = useSelectRootContext();
4374
+ const store = useSelectRootContext();
4339
4375
  const { render, className, style, ...elementProps } = componentProps;
4340
4376
  const localRef = React$1.useCallback((node) => {
4341
4377
  if (!node) return;
4342
- if (index2 === 0) firstItemTextRef.current = node;
4343
- if (selectedByFocus) selectedItemTextRef.current = node;
4378
+ if (index2 === 0) store.context.firstItemTextRef.current = node;
4379
+ if (selectedByFocus) store.context.selectedItemTextRef.current = node;
4344
4380
  }, [
4345
- firstItemTextRef,
4346
- selectedItemTextRef,
4381
+ store,
4347
4382
  index2,
4348
4383
  selectedByFocus
4349
4384
  ]);
@@ -4415,9 +4450,6 @@ function Select({ className, onValueChange, options, placeholder, triggerId, val
4415
4450
  }) })]
4416
4451
  });
4417
4452
  }
4418
- function useRender(params) {
4419
- return useRenderElement(params.defaultTagName ?? "div", params, params);
4420
- }
4421
4453
 
4422
4454
  export {
4423
4455
  clamp,
@@ -4436,7 +4468,6 @@ export {
4436
4468
  getDisabledMountTransitionStyles,
4437
4469
  usePositioner,
4438
4470
  isElementDisabled,
4439
- useValueChanged,
4440
4471
  useOpenMethodTriggerProps,
4441
4472
  normalizeScrollOffset,
4442
4473
  CompositeList,
@@ -4445,6 +4476,5 @@ export {
4445
4476
  useToolbarRootContext,
4446
4477
  useCSPContext,
4447
4478
  useCompositeListItem,
4448
- Select,
4449
- useRender
4479
+ Select
4450
4480
  };