@womp/kookie-ui 0.7.0 → 0.8.1

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 (472) hide show
  1. package/README.md +1 -1
  2. package/components.css +539 -494
  3. package/dist/cjs/components/_internal/base-menu.utils.js +1 -1
  4. package/dist/cjs/components/_internal/base-menu.utils.js.map +3 -3
  5. package/dist/cjs/components/_internal/menu-context.js +1 -1
  6. package/dist/cjs/components/_internal/menu-context.js.map +3 -3
  7. package/dist/cjs/components/_internal/shell-bottom.d.ts +6 -7
  8. package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
  9. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  10. package/dist/cjs/components/_internal/shell-bottom.js.map +4 -4
  11. package/dist/cjs/components/_internal/shell-handles.d.ts +9 -0
  12. package/dist/cjs/components/_internal/shell-handles.d.ts.map +1 -1
  13. package/dist/cjs/components/_internal/shell-handles.js +1 -1
  14. package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
  15. package/dist/cjs/components/_internal/shell-inspector.d.ts +4 -6
  16. package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
  17. package/dist/cjs/components/_internal/shell-inspector.js +1 -1
  18. package/dist/cjs/components/_internal/shell-inspector.js.map +4 -4
  19. package/dist/cjs/components/_internal/shell-pane.d.ts +70 -0
  20. package/dist/cjs/components/_internal/shell-pane.d.ts.map +1 -0
  21. package/dist/cjs/components/_internal/shell-pane.js +2 -0
  22. package/dist/cjs/components/_internal/shell-pane.js.map +7 -0
  23. package/dist/cjs/components/_internal/shell-resizable.d.ts +48 -0
  24. package/dist/cjs/components/_internal/shell-resizable.d.ts.map +1 -0
  25. package/dist/cjs/components/_internal/shell-resizable.js +2 -0
  26. package/dist/cjs/components/_internal/shell-resizable.js.map +7 -0
  27. package/dist/cjs/components/_internal/shell-resize.d.ts +11 -3
  28. package/dist/cjs/components/_internal/shell-resize.d.ts.map +1 -1
  29. package/dist/cjs/components/_internal/shell-resize.js +1 -1
  30. package/dist/cjs/components/_internal/shell-resize.js.map +2 -2
  31. package/dist/cjs/components/_internal/shell-rest.d.ts +27 -0
  32. package/dist/cjs/components/_internal/shell-rest.d.ts.map +1 -0
  33. package/dist/cjs/components/_internal/shell-rest.js +2 -0
  34. package/dist/cjs/components/_internal/shell-rest.js.map +7 -0
  35. package/dist/cjs/components/_internal/shell-sidebar.d.ts +7 -12
  36. package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
  37. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  38. package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
  39. package/dist/cjs/components/_internal/shell-store.d.ts +99 -0
  40. package/dist/cjs/components/_internal/shell-store.d.ts.map +1 -0
  41. package/dist/cjs/components/_internal/shell-store.js +2 -0
  42. package/dist/cjs/components/_internal/shell-store.js.map +7 -0
  43. package/dist/cjs/components/context-menu.js +1 -1
  44. package/dist/cjs/components/context-menu.js.map +3 -3
  45. package/dist/cjs/components/dropdown-menu.js +1 -1
  46. package/dist/cjs/components/dropdown-menu.js.map +3 -3
  47. package/dist/cjs/components/index.js +5 -5
  48. package/dist/cjs/components/index.js.map +4 -4
  49. package/dist/cjs/components/schemas/index.js +1 -1
  50. package/dist/cjs/components/schemas/index.js.map +3 -3
  51. package/dist/cjs/components/schemas/shell.schema.d.ts +277 -229
  52. package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
  53. package/dist/cjs/components/schemas/shell.schema.js +1 -1
  54. package/dist/cjs/components/schemas/shell.schema.js.map +3 -3
  55. package/dist/cjs/components/shell.context.d.ts +25 -114
  56. package/dist/cjs/components/shell.context.d.ts.map +1 -1
  57. package/dist/cjs/components/shell.context.js +1 -1
  58. package/dist/cjs/components/shell.context.js.map +4 -4
  59. package/dist/cjs/components/shell.d.ts +42 -21
  60. package/dist/cjs/components/shell.d.ts.map +1 -1
  61. package/dist/cjs/components/shell.hooks.d.ts +7 -23
  62. package/dist/cjs/components/shell.hooks.d.ts.map +1 -1
  63. package/dist/cjs/components/shell.hooks.js +1 -1
  64. package/dist/cjs/components/shell.hooks.js.map +4 -4
  65. package/dist/cjs/components/shell.js +1 -1
  66. package/dist/cjs/components/shell.js.map +4 -4
  67. package/dist/cjs/components/shell.types.d.ts +19 -2
  68. package/dist/cjs/components/shell.types.d.ts.map +1 -1
  69. package/dist/cjs/components/shell.types.js +1 -1
  70. package/dist/cjs/components/shell.types.js.map +3 -3
  71. package/dist/cjs/components/sidebar.d.ts.map +1 -1
  72. package/dist/cjs/components/sidebar.js +1 -1
  73. package/dist/cjs/components/sidebar.js.map +3 -3
  74. package/dist/cjs/hooks/use-breakpoint.d.ts +5 -0
  75. package/dist/cjs/hooks/use-breakpoint.d.ts.map +1 -1
  76. package/dist/cjs/hooks/use-breakpoint.js +1 -1
  77. package/dist/cjs/hooks/use-breakpoint.js.map +3 -3
  78. package/dist/cjs/index.js +5 -5
  79. package/dist/cjs/index.js.map +4 -4
  80. package/dist/esm/{chunk-HJU4I34X.js → chunk-25X75TI7.js} +2 -2
  81. package/dist/esm/{chunk-4XKK32M4.js → chunk-26I257HE.js} +2 -2
  82. package/dist/esm/chunk-2EQWBT2S.js +2 -0
  83. package/dist/esm/chunk-2EQWBT2S.js.map +7 -0
  84. package/dist/esm/{chunk-GLERJXVS.js → chunk-2Q7BJ7YG.js} +2 -2
  85. package/dist/esm/chunk-3J6AUDID.js +2 -0
  86. package/dist/esm/chunk-3J6AUDID.js.map +7 -0
  87. package/dist/esm/{chunk-7EWFBWBS.js → chunk-3PTSRBVY.js} +2 -2
  88. package/dist/esm/chunk-3XSB7YIM.js +2 -0
  89. package/dist/esm/{chunk-FMBECDL4.js.map → chunk-3XSB7YIM.js.map} +3 -3
  90. package/dist/esm/{chunk-O2U6RJTB.js → chunk-44JZYS7A.js} +2 -2
  91. package/dist/esm/{chunk-CTA5ODAO.js → chunk-4WU2WKUJ.js} +2 -2
  92. package/dist/esm/{chunk-KZWNGWIM.js → chunk-5M7STAH3.js} +2 -2
  93. package/dist/esm/{chunk-5WRCK4R7.js → chunk-5TAHT6VC.js} +2 -2
  94. package/dist/esm/{chunk-RNTCHVFI.js → chunk-6J6YX2VX.js} +2 -2
  95. package/dist/esm/{chunk-AGSSWWFI.js → chunk-7FKKGUHK.js} +2 -2
  96. package/dist/esm/{chunk-WHFJ4JUN.js → chunk-7NYODT3Z.js} +2 -2
  97. package/dist/esm/{chunk-NVDXXGVW.js → chunk-7PMMYHZV.js} +2 -2
  98. package/dist/esm/chunk-A2XVR7GL.js +2 -0
  99. package/dist/esm/chunk-A2XVR7GL.js.map +7 -0
  100. package/dist/esm/chunk-ADXZNG4F.js +2 -0
  101. package/dist/esm/chunk-ADXZNG4F.js.map +7 -0
  102. package/dist/esm/chunk-AGNIFHOE.js +2 -0
  103. package/dist/esm/chunk-AGNIFHOE.js.map +7 -0
  104. package/dist/esm/{chunk-KJUDZCYK.js → chunk-AIHQ3MVK.js} +2 -2
  105. package/dist/esm/{chunk-UBOOUDS4.js → chunk-AO32NT75.js} +2 -2
  106. package/dist/esm/chunk-BZZXXZ3O.js +2 -0
  107. package/dist/esm/chunk-BZZXXZ3O.js.map +7 -0
  108. package/dist/esm/{chunk-JDGJSNWT.js → chunk-C5RVO3C3.js} +2 -2
  109. package/dist/esm/{chunk-IHK3H2OM.js → chunk-CBNTPHYK.js} +2 -2
  110. package/dist/esm/{chunk-BBJUB52V.js → chunk-CRBOJ7N7.js} +2 -2
  111. package/dist/esm/{chunk-VHECAEUP.js → chunk-DCIQHXAR.js} +2 -2
  112. package/dist/esm/{chunk-43A5GUSI.js → chunk-EHBAK3LQ.js} +2 -2
  113. package/dist/esm/{chunk-K3UAS7RW.js → chunk-F3AXE27Q.js} +2 -2
  114. package/dist/esm/{chunk-KFR3CK24.js → chunk-FB3PD4Z3.js} +2 -2
  115. package/dist/esm/{chunk-MCPRXVKZ.js → chunk-FEAOFF77.js} +2 -2
  116. package/dist/esm/{chunk-VZSQATP6.js → chunk-G4YKBAZT.js} +2 -2
  117. package/dist/esm/{chunk-ECXGQQJB.js → chunk-GDAKJS64.js} +2 -2
  118. package/dist/esm/{chunk-VR7ZAFYN.js → chunk-GGSJXOKR.js} +2 -2
  119. package/dist/esm/chunk-GM7KMQDI.js +2 -0
  120. package/dist/esm/chunk-GMHA5CFH.js +2 -0
  121. package/dist/esm/chunk-GMHA5CFH.js.map +7 -0
  122. package/dist/esm/{chunk-CESYMTJQ.js → chunk-H4GR4262.js} +2 -2
  123. package/dist/esm/{chunk-WXQIIKWV.js → chunk-HBIF43PT.js} +2 -2
  124. package/dist/esm/chunk-HCNO7PX6.js +2 -0
  125. package/dist/esm/chunk-HCNO7PX6.js.map +7 -0
  126. package/dist/esm/{chunk-2264DHUW.js → chunk-HMSSFU6I.js} +2 -2
  127. package/dist/esm/chunk-HWQ3NTJP.js +2 -0
  128. package/dist/esm/chunk-HWQ3NTJP.js.map +7 -0
  129. package/dist/esm/{chunk-S5C5YRBS.js → chunk-IDUVJJYG.js} +2 -2
  130. package/dist/esm/{chunk-CIYF56YS.js → chunk-IK3MQHA5.js} +2 -2
  131. package/dist/esm/{chunk-CKMMUHKE.js → chunk-JDEBKA56.js} +2 -2
  132. package/dist/esm/{chunk-E67CIG6A.js → chunk-JDWCQ2XP.js} +2 -2
  133. package/dist/esm/{chunk-L3BWTV7I.js → chunk-JQSZF3E2.js} +2 -2
  134. package/dist/esm/{chunk-MEO7MJMQ.js → chunk-JQW4XYBS.js} +2 -2
  135. package/dist/esm/{chunk-KMPE7TJ6.js → chunk-JRFZ535T.js} +2 -2
  136. package/dist/esm/{chunk-CDG5WH4U.js → chunk-KEEPKI2X.js} +2 -2
  137. package/dist/esm/{chunk-GAV3NHYL.js → chunk-KV4SZP3F.js} +2 -2
  138. package/dist/esm/{chunk-FG7XM7KJ.js → chunk-LJCUPAOI.js} +2 -2
  139. package/dist/esm/{chunk-N4GTDLRD.js → chunk-MBCQA7UZ.js} +2 -2
  140. package/dist/esm/chunk-MM5IHQFM.js +2 -0
  141. package/dist/esm/{chunk-Y5RCH23Z.js → chunk-NQXRWBQM.js} +2 -2
  142. package/dist/esm/{chunk-CSKZZOI2.js → chunk-NTNMJX5M.js} +2 -2
  143. package/dist/esm/{chunk-V27ZAN3E.js → chunk-NV3P2CKH.js} +2 -2
  144. package/dist/esm/{chunk-4ME6O27S.js → chunk-O4CSXNST.js} +2 -2
  145. package/dist/esm/chunk-ODCVOXEV.js +2 -0
  146. package/dist/esm/{chunk-W2FOBR5Q.js → chunk-OEEF6KJG.js} +2 -2
  147. package/dist/esm/{chunk-ABSKRHVM.js → chunk-OJSOX3AX.js} +2 -2
  148. package/dist/esm/{chunk-JGLAE5G7.js → chunk-OQU2SKLN.js} +2 -2
  149. package/dist/esm/{chunk-PZ7OYATT.js → chunk-OTKQN2KY.js} +2 -2
  150. package/dist/esm/{chunk-QWVU2TW4.js → chunk-P27KV2LS.js} +2 -2
  151. package/dist/esm/{chunk-JUY7CBSL.js → chunk-PBFSBHBS.js} +2 -2
  152. package/dist/esm/{chunk-DSJY5RI3.js → chunk-PDUHBDFC.js} +2 -2
  153. package/dist/esm/{chunk-MTOLKA6S.js → chunk-POG3YABW.js} +2 -2
  154. package/dist/esm/chunk-PYHEBG5I.js +2 -0
  155. package/dist/esm/chunk-PYHEBG5I.js.map +7 -0
  156. package/dist/esm/{chunk-GO7OHBHW.js → chunk-PYXMGEO7.js} +2 -2
  157. package/dist/esm/{chunk-VNH7BJOA.js → chunk-QEGEUD4D.js} +2 -2
  158. package/dist/esm/chunk-QEL55MLF.js +2 -0
  159. package/dist/esm/{chunk-MS5J4MF6.js → chunk-QJVAS7AK.js} +2 -2
  160. package/dist/esm/chunk-ROSWI2CL.js +2 -0
  161. package/dist/esm/chunk-ROSWI2CL.js.map +7 -0
  162. package/dist/esm/{chunk-KCWESYMR.js → chunk-RY67WG3O.js} +2 -2
  163. package/dist/esm/{chunk-IFM4EMZB.js → chunk-TLGXIWAS.js} +2 -2
  164. package/dist/esm/{chunk-6FLLFCBU.js → chunk-UBSLEGQZ.js} +2 -2
  165. package/dist/esm/{chunk-VBI3AWPT.js → chunk-UNWPH3SO.js} +2 -2
  166. package/dist/esm/chunk-V5ZSDDVZ.js +2 -0
  167. package/dist/esm/chunk-V5ZSDDVZ.js.map +7 -0
  168. package/dist/esm/{chunk-X7V3V3W4.js → chunk-VTIL55SR.js} +2 -2
  169. package/dist/esm/chunk-VUNNS3ZU.js +2 -0
  170. package/dist/esm/chunk-VUNNS3ZU.js.map +7 -0
  171. package/dist/esm/{chunk-ALWNS44Q.js → chunk-W2LD2YE6.js} +2 -2
  172. package/dist/esm/{chunk-2I7QRVJ5.js → chunk-WGWUEU4K.js} +2 -2
  173. package/dist/esm/{chunk-EPTYNVCU.js → chunk-WIDJYVZF.js} +2 -2
  174. package/dist/esm/{chunk-OLAWVEAI.js → chunk-WJBOOAIO.js} +2 -2
  175. package/dist/esm/{chunk-7FC7HF76.js → chunk-WQCB7KSH.js} +2 -2
  176. package/dist/esm/{chunk-YBSRX63K.js → chunk-WZFVTC7P.js} +2 -2
  177. package/dist/esm/chunk-XDDKT4NF.js +2 -0
  178. package/dist/esm/{chunk-KFA53SVQ.js → chunk-YA5DF67M.js} +2 -2
  179. package/dist/esm/chunk-YA5DF67M.js.map +7 -0
  180. package/dist/esm/chunk-YAQBIO2B.js +2 -0
  181. package/dist/esm/chunk-YAQBIO2B.js.map +7 -0
  182. package/dist/esm/{chunk-OFUNVHZ5.js → chunk-YG66IRW4.js} +2 -2
  183. package/dist/esm/{chunk-WGYUWEQV.js → chunk-YVSM2LGS.js} +2 -2
  184. package/dist/esm/{chunk-4NTGF22C.js → chunk-Z7AZNMNX.js} +2 -2
  185. package/dist/esm/chunk-ZJ33QP5N.js +2 -0
  186. package/dist/esm/{chunk-OGXZHAQL.js → chunk-ZW26J2SA.js} +2 -2
  187. package/dist/esm/components/_internal/base-button.js +1 -1
  188. package/dist/esm/components/_internal/base-menu.utils.js +1 -1
  189. package/dist/esm/components/_internal/menu-context.js +1 -1
  190. package/dist/esm/components/_internal/shell-bottom.d.ts +6 -7
  191. package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
  192. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  193. package/dist/esm/components/_internal/shell-handles.d.ts +9 -0
  194. package/dist/esm/components/_internal/shell-handles.d.ts.map +1 -1
  195. package/dist/esm/components/_internal/shell-handles.js +1 -1
  196. package/dist/esm/components/_internal/shell-inspector.d.ts +4 -6
  197. package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
  198. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  199. package/dist/esm/components/_internal/shell-pane.d.ts +70 -0
  200. package/dist/esm/components/_internal/shell-pane.d.ts.map +1 -0
  201. package/dist/esm/components/_internal/shell-pane.js +2 -0
  202. package/dist/esm/components/_internal/shell-resizable.d.ts +48 -0
  203. package/dist/esm/components/_internal/shell-resizable.d.ts.map +1 -0
  204. package/dist/esm/components/_internal/shell-resizable.js +2 -0
  205. package/dist/esm/components/_internal/shell-resizable.js.map +7 -0
  206. package/dist/esm/components/_internal/shell-resize.d.ts +11 -3
  207. package/dist/esm/components/_internal/shell-resize.d.ts.map +1 -1
  208. package/dist/esm/components/_internal/shell-resize.js +1 -1
  209. package/dist/esm/components/_internal/shell-rest.d.ts +27 -0
  210. package/dist/esm/components/_internal/shell-rest.d.ts.map +1 -0
  211. package/dist/esm/components/_internal/shell-rest.js +2 -0
  212. package/dist/esm/components/_internal/shell-rest.js.map +7 -0
  213. package/dist/esm/components/_internal/shell-sidebar.d.ts +7 -12
  214. package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
  215. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  216. package/dist/esm/components/_internal/shell-store.d.ts +99 -0
  217. package/dist/esm/components/_internal/shell-store.d.ts.map +1 -0
  218. package/dist/esm/components/_internal/shell-store.js +2 -0
  219. package/dist/esm/components/_internal/shell-store.js.map +7 -0
  220. package/dist/esm/components/accordion.js +1 -1
  221. package/dist/esm/components/alert-dialog.js +1 -1
  222. package/dist/esm/components/avatar.js +1 -1
  223. package/dist/esm/components/badge.js +1 -1
  224. package/dist/esm/components/blockquote.js +1 -1
  225. package/dist/esm/components/blockquote.props.js +1 -1
  226. package/dist/esm/components/box.js +1 -1
  227. package/dist/esm/components/button.js +1 -1
  228. package/dist/esm/components/callout.js +1 -1
  229. package/dist/esm/components/card.js +1 -1
  230. package/dist/esm/components/chatbar.js +1 -1
  231. package/dist/esm/components/checkbox-cards.js +1 -1
  232. package/dist/esm/components/checkbox-group.js +1 -1
  233. package/dist/esm/components/checkbox.js +1 -1
  234. package/dist/esm/components/code.js +1 -1
  235. package/dist/esm/components/code.props.js +1 -1
  236. package/dist/esm/components/combobox.js +1 -1
  237. package/dist/esm/components/container.js +1 -1
  238. package/dist/esm/components/context-menu.js +1 -1
  239. package/dist/esm/components/data-list.js +1 -1
  240. package/dist/esm/components/dialog.js +1 -1
  241. package/dist/esm/components/dropdown-menu.js +1 -1
  242. package/dist/esm/components/em.js +1 -1
  243. package/dist/esm/components/em.props.js +1 -1
  244. package/dist/esm/components/flex.js +1 -1
  245. package/dist/esm/components/grid.js +1 -1
  246. package/dist/esm/components/heading.js +1 -1
  247. package/dist/esm/components/heading.props.js +1 -1
  248. package/dist/esm/components/hover-card.js +1 -1
  249. package/dist/esm/components/icon-button.js +1 -1
  250. package/dist/esm/components/image.js +1 -1
  251. package/dist/esm/components/index.js +1 -1
  252. package/dist/esm/components/inset.js +1 -1
  253. package/dist/esm/components/kbd.js +1 -1
  254. package/dist/esm/components/link.js +1 -1
  255. package/dist/esm/components/link.props.js +1 -1
  256. package/dist/esm/components/navbar.js +1 -1
  257. package/dist/esm/components/popover.js +1 -1
  258. package/dist/esm/components/progress.js +1 -1
  259. package/dist/esm/components/quote.js +1 -1
  260. package/dist/esm/components/quote.props.js +1 -1
  261. package/dist/esm/components/radio-cards.js +1 -1
  262. package/dist/esm/components/radio-group.js +1 -1
  263. package/dist/esm/components/radio.js +1 -1
  264. package/dist/esm/components/schemas/index.js +1 -1
  265. package/dist/esm/components/schemas/shell.schema.d.ts +277 -229
  266. package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
  267. package/dist/esm/components/schemas/shell.schema.js +1 -1
  268. package/dist/esm/components/scroll-area.js +1 -1
  269. package/dist/esm/components/section.js +1 -1
  270. package/dist/esm/components/segmented-control.js +1 -1
  271. package/dist/esm/components/select.js +1 -1
  272. package/dist/esm/components/separator.js +1 -1
  273. package/dist/esm/components/sheet.js +1 -1
  274. package/dist/esm/components/shell.context.d.ts +25 -114
  275. package/dist/esm/components/shell.context.d.ts.map +1 -1
  276. package/dist/esm/components/shell.context.js +1 -1
  277. package/dist/esm/components/shell.d.ts +42 -21
  278. package/dist/esm/components/shell.d.ts.map +1 -1
  279. package/dist/esm/components/shell.hooks.d.ts +7 -23
  280. package/dist/esm/components/shell.hooks.d.ts.map +1 -1
  281. package/dist/esm/components/shell.hooks.js +1 -1
  282. package/dist/esm/components/shell.js +1 -1
  283. package/dist/esm/components/shell.types.d.ts +19 -2
  284. package/dist/esm/components/shell.types.d.ts.map +1 -1
  285. package/dist/esm/components/shell.types.js +1 -1
  286. package/dist/esm/components/sidebar.d.ts.map +1 -1
  287. package/dist/esm/components/sidebar.js +1 -1
  288. package/dist/esm/components/skeleton.js +1 -1
  289. package/dist/esm/components/slider.js +1 -1
  290. package/dist/esm/components/spinner.js +1 -1
  291. package/dist/esm/components/strong.js +1 -1
  292. package/dist/esm/components/strong.props.js +1 -1
  293. package/dist/esm/components/switch.js +1 -1
  294. package/dist/esm/components/tab-nav.js +1 -1
  295. package/dist/esm/components/table.js +1 -1
  296. package/dist/esm/components/tabs.js +1 -1
  297. package/dist/esm/components/text-area.js +1 -1
  298. package/dist/esm/components/text-field.js +1 -1
  299. package/dist/esm/components/text.js +1 -1
  300. package/dist/esm/components/text.props.js +1 -1
  301. package/dist/esm/components/theme-panel.js +1 -1
  302. package/dist/esm/components/toggle-button.js +1 -1
  303. package/dist/esm/components/toggle-icon-button.js +1 -1
  304. package/dist/esm/components/toolbar.js +1 -1
  305. package/dist/esm/components/tooltip.js +1 -1
  306. package/dist/esm/components/user-card.js +1 -1
  307. package/dist/esm/components/virtual-menu.js +1 -1
  308. package/dist/esm/helpers/extract-props.js +1 -1
  309. package/dist/esm/helpers/get-margin-styles.js +1 -1
  310. package/dist/esm/helpers/get-responsive-styles.js +1 -1
  311. package/dist/esm/helpers/index.js +1 -1
  312. package/dist/esm/hooks/index.js +1 -1
  313. package/dist/esm/hooks/use-breakpoint.d.ts +5 -0
  314. package/dist/esm/hooks/use-breakpoint.d.ts.map +1 -1
  315. package/dist/esm/hooks/use-breakpoint.js +1 -1
  316. package/dist/esm/index.js +1 -1
  317. package/dist/esm/props/index.js +1 -1
  318. package/package.json +7 -2
  319. package/schemas/index.json +1655 -0
  320. package/schemas/shell-bottom.d.ts +2 -0
  321. package/schemas/shell-bottom.json +180 -76
  322. package/schemas/shell-content.d.ts +2 -0
  323. package/schemas/shell-content.json +11 -5
  324. package/schemas/shell-handle.d.ts +2 -0
  325. package/schemas/shell-handle.json +7 -5
  326. package/schemas/shell-header.d.ts +2 -0
  327. package/schemas/shell-header.json +9 -10
  328. package/schemas/shell-inspector.d.ts +2 -0
  329. package/schemas/shell-inspector.json +183 -79
  330. package/schemas/shell-panel.d.ts +2 -0
  331. package/schemas/shell-panel.json +180 -76
  332. package/schemas/shell-rail.d.ts +2 -0
  333. package/schemas/shell-rail.json +137 -64
  334. package/schemas/shell-root.d.ts +2 -0
  335. package/schemas/shell-root.json +11 -9
  336. package/schemas/shell-sidebar.d.ts +2 -0
  337. package/schemas/shell-sidebar.json +274 -85
  338. package/schemas/shell-trigger.d.ts +2 -0
  339. package/schemas/shell-trigger.json +29 -17
  340. package/src/components/_internal/base-sidebar-menu.css +2 -1
  341. package/src/components/_internal/shell-bottom.tsx +92 -361
  342. package/src/components/_internal/shell-handles.tsx +193 -108
  343. package/src/components/_internal/shell-inspector.tsx +93 -360
  344. package/src/components/_internal/shell-pane.tsx +283 -0
  345. package/src/components/_internal/shell-resizable.tsx +263 -0
  346. package/src/components/_internal/shell-resize.tsx +11 -3
  347. package/src/components/_internal/shell-rest.ts +45 -0
  348. package/src/components/_internal/shell-sidebar.tsx +130 -441
  349. package/src/components/_internal/shell-store.tsx +204 -0
  350. package/src/components/schemas/shell.schema.ts +162 -153
  351. package/src/components/shell.context.tsx +112 -124
  352. package/src/components/shell.css +637 -496
  353. package/src/components/shell.hooks.ts +12 -170
  354. package/src/components/shell.tsx +566 -1497
  355. package/src/components/shell.types.ts +22 -2
  356. package/src/components/sidebar.tsx +17 -28
  357. package/src/hooks/use-breakpoint.ts +9 -0
  358. package/styles.css +539 -494
  359. package/dist/cjs/components/_internal/shell-prop-helpers.d.ts +0 -7
  360. package/dist/cjs/components/_internal/shell-prop-helpers.d.ts.map +0 -1
  361. package/dist/cjs/components/_internal/shell-prop-helpers.js +0 -2
  362. package/dist/cjs/components/_internal/shell-prop-helpers.js.map +0 -7
  363. package/dist/esm/chunk-2SZZ75RJ.js +0 -2
  364. package/dist/esm/chunk-2SZZ75RJ.js.map +0 -7
  365. package/dist/esm/chunk-4JQZUQY7.js +0 -2
  366. package/dist/esm/chunk-5LXFJMFB.js +0 -2
  367. package/dist/esm/chunk-5LXFJMFB.js.map +0 -7
  368. package/dist/esm/chunk-CECQNGUL.js +0 -2
  369. package/dist/esm/chunk-CECQNGUL.js.map +0 -7
  370. package/dist/esm/chunk-CEIK5U6C.js +0 -2
  371. package/dist/esm/chunk-CEIK5U6C.js.map +0 -7
  372. package/dist/esm/chunk-CJ27XP5Z.js +0 -2
  373. package/dist/esm/chunk-CJ27XP5Z.js.map +0 -7
  374. package/dist/esm/chunk-EE2IH2GL.js +0 -2
  375. package/dist/esm/chunk-EE2IH2GL.js.map +0 -7
  376. package/dist/esm/chunk-FMBECDL4.js +0 -2
  377. package/dist/esm/chunk-HSAG7C53.js +0 -2
  378. package/dist/esm/chunk-JJKQ7CGI.js +0 -2
  379. package/dist/esm/chunk-KFA53SVQ.js.map +0 -7
  380. package/dist/esm/chunk-KRDP5SQ7.js +0 -2
  381. package/dist/esm/chunk-KRDP5SQ7.js.map +0 -7
  382. package/dist/esm/chunk-M6DJRFJZ.js +0 -2
  383. package/dist/esm/chunk-M6DJRFJZ.js.map +0 -7
  384. package/dist/esm/chunk-MCQCG6AS.js +0 -2
  385. package/dist/esm/chunk-NIQT45PJ.js +0 -2
  386. package/dist/esm/chunk-NNO7M466.js +0 -2
  387. package/dist/esm/chunk-NNO7M466.js.map +0 -7
  388. package/dist/esm/chunk-SNHEJU2S.js +0 -2
  389. package/dist/esm/chunk-SNHEJU2S.js.map +0 -7
  390. package/dist/esm/chunk-TLWTUKKL.js +0 -2
  391. package/dist/esm/chunk-TLWTUKKL.js.map +0 -7
  392. package/dist/esm/chunk-XI5YXUCK.js +0 -2
  393. package/dist/esm/components/_internal/shell-prop-helpers.d.ts +0 -7
  394. package/dist/esm/components/_internal/shell-prop-helpers.d.ts.map +0 -1
  395. package/dist/esm/components/_internal/shell-prop-helpers.js +0 -2
  396. package/src/components/_internal/shell-prop-helpers.ts +0 -54
  397. /package/dist/esm/{chunk-HJU4I34X.js.map → chunk-25X75TI7.js.map} +0 -0
  398. /package/dist/esm/{chunk-4XKK32M4.js.map → chunk-26I257HE.js.map} +0 -0
  399. /package/dist/esm/{chunk-GLERJXVS.js.map → chunk-2Q7BJ7YG.js.map} +0 -0
  400. /package/dist/esm/{chunk-7EWFBWBS.js.map → chunk-3PTSRBVY.js.map} +0 -0
  401. /package/dist/esm/{chunk-O2U6RJTB.js.map → chunk-44JZYS7A.js.map} +0 -0
  402. /package/dist/esm/{chunk-CTA5ODAO.js.map → chunk-4WU2WKUJ.js.map} +0 -0
  403. /package/dist/esm/{chunk-KZWNGWIM.js.map → chunk-5M7STAH3.js.map} +0 -0
  404. /package/dist/esm/{chunk-5WRCK4R7.js.map → chunk-5TAHT6VC.js.map} +0 -0
  405. /package/dist/esm/{chunk-RNTCHVFI.js.map → chunk-6J6YX2VX.js.map} +0 -0
  406. /package/dist/esm/{chunk-AGSSWWFI.js.map → chunk-7FKKGUHK.js.map} +0 -0
  407. /package/dist/esm/{chunk-WHFJ4JUN.js.map → chunk-7NYODT3Z.js.map} +0 -0
  408. /package/dist/esm/{chunk-NVDXXGVW.js.map → chunk-7PMMYHZV.js.map} +0 -0
  409. /package/dist/esm/{chunk-KJUDZCYK.js.map → chunk-AIHQ3MVK.js.map} +0 -0
  410. /package/dist/esm/{chunk-UBOOUDS4.js.map → chunk-AO32NT75.js.map} +0 -0
  411. /package/dist/esm/{chunk-JDGJSNWT.js.map → chunk-C5RVO3C3.js.map} +0 -0
  412. /package/dist/esm/{chunk-IHK3H2OM.js.map → chunk-CBNTPHYK.js.map} +0 -0
  413. /package/dist/esm/{chunk-BBJUB52V.js.map → chunk-CRBOJ7N7.js.map} +0 -0
  414. /package/dist/esm/{chunk-VHECAEUP.js.map → chunk-DCIQHXAR.js.map} +0 -0
  415. /package/dist/esm/{chunk-43A5GUSI.js.map → chunk-EHBAK3LQ.js.map} +0 -0
  416. /package/dist/esm/{chunk-K3UAS7RW.js.map → chunk-F3AXE27Q.js.map} +0 -0
  417. /package/dist/esm/{chunk-KFR3CK24.js.map → chunk-FB3PD4Z3.js.map} +0 -0
  418. /package/dist/esm/{chunk-MCPRXVKZ.js.map → chunk-FEAOFF77.js.map} +0 -0
  419. /package/dist/esm/{chunk-VZSQATP6.js.map → chunk-G4YKBAZT.js.map} +0 -0
  420. /package/dist/esm/{chunk-ECXGQQJB.js.map → chunk-GDAKJS64.js.map} +0 -0
  421. /package/dist/esm/{chunk-VR7ZAFYN.js.map → chunk-GGSJXOKR.js.map} +0 -0
  422. /package/dist/esm/{chunk-4JQZUQY7.js.map → chunk-GM7KMQDI.js.map} +0 -0
  423. /package/dist/esm/{chunk-CESYMTJQ.js.map → chunk-H4GR4262.js.map} +0 -0
  424. /package/dist/esm/{chunk-WXQIIKWV.js.map → chunk-HBIF43PT.js.map} +0 -0
  425. /package/dist/esm/{chunk-2264DHUW.js.map → chunk-HMSSFU6I.js.map} +0 -0
  426. /package/dist/esm/{chunk-S5C5YRBS.js.map → chunk-IDUVJJYG.js.map} +0 -0
  427. /package/dist/esm/{chunk-CIYF56YS.js.map → chunk-IK3MQHA5.js.map} +0 -0
  428. /package/dist/esm/{chunk-CKMMUHKE.js.map → chunk-JDEBKA56.js.map} +0 -0
  429. /package/dist/esm/{chunk-E67CIG6A.js.map → chunk-JDWCQ2XP.js.map} +0 -0
  430. /package/dist/esm/{chunk-L3BWTV7I.js.map → chunk-JQSZF3E2.js.map} +0 -0
  431. /package/dist/esm/{chunk-MEO7MJMQ.js.map → chunk-JQW4XYBS.js.map} +0 -0
  432. /package/dist/esm/{chunk-KMPE7TJ6.js.map → chunk-JRFZ535T.js.map} +0 -0
  433. /package/dist/esm/{chunk-CDG5WH4U.js.map → chunk-KEEPKI2X.js.map} +0 -0
  434. /package/dist/esm/{chunk-GAV3NHYL.js.map → chunk-KV4SZP3F.js.map} +0 -0
  435. /package/dist/esm/{chunk-FG7XM7KJ.js.map → chunk-LJCUPAOI.js.map} +0 -0
  436. /package/dist/esm/{chunk-N4GTDLRD.js.map → chunk-MBCQA7UZ.js.map} +0 -0
  437. /package/dist/esm/{chunk-JJKQ7CGI.js.map → chunk-MM5IHQFM.js.map} +0 -0
  438. /package/dist/esm/{chunk-Y5RCH23Z.js.map → chunk-NQXRWBQM.js.map} +0 -0
  439. /package/dist/esm/{chunk-CSKZZOI2.js.map → chunk-NTNMJX5M.js.map} +0 -0
  440. /package/dist/esm/{chunk-V27ZAN3E.js.map → chunk-NV3P2CKH.js.map} +0 -0
  441. /package/dist/esm/{chunk-4ME6O27S.js.map → chunk-O4CSXNST.js.map} +0 -0
  442. /package/dist/esm/{chunk-HSAG7C53.js.map → chunk-ODCVOXEV.js.map} +0 -0
  443. /package/dist/esm/{chunk-W2FOBR5Q.js.map → chunk-OEEF6KJG.js.map} +0 -0
  444. /package/dist/esm/{chunk-ABSKRHVM.js.map → chunk-OJSOX3AX.js.map} +0 -0
  445. /package/dist/esm/{chunk-JGLAE5G7.js.map → chunk-OQU2SKLN.js.map} +0 -0
  446. /package/dist/esm/{chunk-PZ7OYATT.js.map → chunk-OTKQN2KY.js.map} +0 -0
  447. /package/dist/esm/{chunk-QWVU2TW4.js.map → chunk-P27KV2LS.js.map} +0 -0
  448. /package/dist/esm/{chunk-JUY7CBSL.js.map → chunk-PBFSBHBS.js.map} +0 -0
  449. /package/dist/esm/{chunk-DSJY5RI3.js.map → chunk-PDUHBDFC.js.map} +0 -0
  450. /package/dist/esm/{chunk-MTOLKA6S.js.map → chunk-POG3YABW.js.map} +0 -0
  451. /package/dist/esm/{chunk-GO7OHBHW.js.map → chunk-PYXMGEO7.js.map} +0 -0
  452. /package/dist/esm/{chunk-VNH7BJOA.js.map → chunk-QEGEUD4D.js.map} +0 -0
  453. /package/dist/esm/{chunk-MCQCG6AS.js.map → chunk-QEL55MLF.js.map} +0 -0
  454. /package/dist/esm/{chunk-MS5J4MF6.js.map → chunk-QJVAS7AK.js.map} +0 -0
  455. /package/dist/esm/{chunk-KCWESYMR.js.map → chunk-RY67WG3O.js.map} +0 -0
  456. /package/dist/esm/{chunk-IFM4EMZB.js.map → chunk-TLGXIWAS.js.map} +0 -0
  457. /package/dist/esm/{chunk-6FLLFCBU.js.map → chunk-UBSLEGQZ.js.map} +0 -0
  458. /package/dist/esm/{chunk-VBI3AWPT.js.map → chunk-UNWPH3SO.js.map} +0 -0
  459. /package/dist/esm/{chunk-X7V3V3W4.js.map → chunk-VTIL55SR.js.map} +0 -0
  460. /package/dist/esm/{chunk-ALWNS44Q.js.map → chunk-W2LD2YE6.js.map} +0 -0
  461. /package/dist/esm/{chunk-2I7QRVJ5.js.map → chunk-WGWUEU4K.js.map} +0 -0
  462. /package/dist/esm/{chunk-EPTYNVCU.js.map → chunk-WIDJYVZF.js.map} +0 -0
  463. /package/dist/esm/{chunk-OLAWVEAI.js.map → chunk-WJBOOAIO.js.map} +0 -0
  464. /package/dist/esm/{chunk-7FC7HF76.js.map → chunk-WQCB7KSH.js.map} +0 -0
  465. /package/dist/esm/{chunk-YBSRX63K.js.map → chunk-WZFVTC7P.js.map} +0 -0
  466. /package/dist/esm/{chunk-XI5YXUCK.js.map → chunk-XDDKT4NF.js.map} +0 -0
  467. /package/dist/esm/{chunk-OFUNVHZ5.js.map → chunk-YG66IRW4.js.map} +0 -0
  468. /package/dist/esm/{chunk-WGYUWEQV.js.map → chunk-YVSM2LGS.js.map} +0 -0
  469. /package/dist/esm/{chunk-4NTGF22C.js.map → chunk-Z7AZNMNX.js.map} +0 -0
  470. /package/dist/esm/{chunk-NIQT45PJ.js.map → chunk-ZJ33QP5N.js.map} +0 -0
  471. /package/dist/esm/{chunk-OGXZHAQL.js.map → chunk-ZW26J2SA.js.map} +0 -0
  472. /package/dist/esm/components/_internal/{shell-prop-helpers.js.map → shell-pane.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/menu-context.tsx", "../../../../src/components/theme.tsx", "../../../../src/helpers/get-matching-gray-color.ts", "../../../../src/hooks/use-prop-synced-state.ts", "../../../../src/helpers/use-deprecation-warning.ts", "../../../../src/props/as-child.prop.ts", "../../../../src/props/color.prop.ts", "../../../../src/props/radius.prop.ts", "../../../../src/components/theme.props.tsx", "../../../../src/components/_internal/base-menu.utils.tsx", "../../../../src/hooks/use-breakpoint.ts", "../../../../src/components/shell.types.ts"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\n\nimport { useThemeContext } from '../theme.js';\nimport { useResolvedResponsiveValue } from './base-menu.utils.js';\n\nimport type { Responsive } from '../../props/prop-def.js';\n\n/**\n * Context to detect if a component is rendered inside a menu (DropdownMenu, ContextMenu, etc.)\n * Used by VirtualMenu to adjust its behavior:\n * - Skip role=\"menu\" when inside a parent menu (parent owns the role)\n * - Delegate certain keyboard handling to parent\n * - Use the correct item height based on menu size\n */\n\nexport type MenuSize = '1' | '2';\n\ninterface MenuContextValue {\n /** Whether we're inside a menu that owns the menu role */\n isInsideMenu: boolean;\n /** Menu size for the current breakpoint */\n size?: MenuSize;\n /** Item height in px for the current size and theme scaling */\n itemHeight?: number;\n}\n\nconst MenuContext = React.createContext<MenuContextValue>({ isInsideMenu: false });\n\ninterface MenuProviderProps {\n children: React.ReactNode;\n /** Menu size passed from parent (DropdownMenu.Content, ContextMenu.Content, etc.) */\n size?: Responsive<MenuSize>;\n}\n\n/** Map menu size to item height in pixels at 100% scaling */\nexport const menuSizeToItemHeight: Record<MenuSize, number> = {\n '1': 24, // --space-5\n '2': 32, // --space-6\n};\n\n/** Item height in px for a size at the given theme scaling (\"100%\", \"110%\"\u2026). */\nexport function getMenuItemHeight(size: MenuSize, scaling: string | undefined): number {\n const scale = scaling ? parseFloat(scaling) / 100 : 1;\n return menuSizeToItemHeight[size] * (Number.isFinite(scale) ? scale : 1);\n}\n\nexport function MenuProvider({ children, size }: MenuProviderProps) {\n const resolvedSize = useResolvedResponsiveValue<MenuSize | undefined>(size, undefined);\n const { scaling } = useThemeContext();\n const itemHeight = resolvedSize ? getMenuItemHeight(resolvedSize, scaling) : undefined;\n const value = React.useMemo(\n () => ({ isInsideMenu: true, size: resolvedSize, itemHeight }),\n [resolvedSize, itemHeight],\n );\n return <MenuContext.Provider value={value}>{children}</MenuContext.Provider>;\n}\n\nexport function useMenuContext() {\n return React.useContext(MenuContext);\n}\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot, Tooltip as TooltipPrimitive } from 'radix-ui';\nimport { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { usePropSyncedState } from '../hooks/use-prop-synced-state.js';\nimport { useDeprecatedPanelBackgroundWarning } from '../helpers/use-deprecation-warning.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemeMaterial = (typeof themePropDefs.material.values)[number];\ntype ThemePanelBackground = (typeof themePropDefs.panelBackground.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeScaling = (typeof themePropDefs.scaling.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\n// Headings follow the body font until something sets this, so `undefined` is a\n// meaningful value here rather than a missing one.\ntype ThemeHeadingFontFamily = ThemeFontFamily | undefined;\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onMaterialChange: (material: ThemeMaterial) => void;\n onPanelBackgroundChange: (panelBackground: ThemePanelBackground) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onScalingChange: (scaling: ThemeScaling) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n onHeadingFontFamilyChange: (headingFontFamily: ThemeHeadingFontFamily) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n material: ThemeMaterial;\n panelBackground: ThemePanelBackground;\n radius: ThemeRadius;\n scaling: ThemeScaling;\n fontFamily: ThemeFontFamily;\n headingFontFamily: ThemeHeadingFontFamily;\n}\n// Default theme values used when components render outside a Theme provider\nconst defaultThemeContext: ThemeContextValue = {\n appearance: themePropDefs.appearance.default,\n accentColor: themePropDefs.accentColor.default,\n grayColor: themePropDefs.grayColor.default,\n resolvedGrayColor: themePropDefs.grayColor.default,\n material: themePropDefs.material.default,\n panelBackground: themePropDefs.panelBackground.default,\n radius: themePropDefs.radius.default,\n scaling: themePropDefs.scaling.default,\n fontFamily: themePropDefs.fontFamily.default,\n headingFontFamily: undefined,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onMaterialChange: noop,\n onPanelBackgroundChange: noop,\n onRadiusChange: noop,\n onScalingChange: noop,\n onFontFamilyChange: noop,\n onHeadingFontFamilyChange: noop,\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n // Return default context if used outside Theme provider (e.g., during SSR)\n return context ?? defaultThemeContext;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir=\"ltr\">\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n </TooltipPrimitive.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>(\n (props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n material: materialProp = themePropDefs.material.default,\n panelBackground: panelBackgroundProp = themePropDefs.panelBackground.default,\n radius: radiusProp = themePropDefs.radius.default,\n scaling: scalingProp = themePropDefs.scaling.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n headingFontFamily: headingFontFamilyProp,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n\n useDeprecatedPanelBackgroundWarning(props.panelBackground);\n\n // Each of these follows its prop but stays independently settable, so\n // `ThemePanel` can change the theme at runtime. Syncing during render\n // rather than in an effect matters here: an effect would commit the old\n // theme first and re-render every consumer of the context a second time.\n const [appearance, setAppearance] = usePropSyncedState(appearanceProp);\n const [accentColor, setAccentColor] = usePropSyncedState(accentColorProp);\n const [grayColor, setGrayColor] = usePropSyncedState(grayColorProp);\n\n // Material takes precedence over panelBackground\n const effectiveMaterial =\n materialProp !== themePropDefs.material.default ? materialProp : panelBackgroundProp;\n const [material, setMaterial] = usePropSyncedState(effectiveMaterial);\n\n // Keep panelBackground in sync with material for backward compatibility\n const [panelBackground, setPanelBackground] = usePropSyncedState(material);\n\n const [radius, setRadius] = usePropSyncedState(radiusProp);\n const [scaling, setScaling] = usePropSyncedState(scalingProp);\n const [fontFamily, setFontFamily] = usePropSyncedState(fontFamilyProp);\n const [headingFontFamily, setHeadingFontFamily] = usePropSyncedState(headingFontFamilyProp);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n material={material}\n panelBackground={panelBackground}\n radius={radius}\n scaling={scaling}\n fontFamily={fontFamily}\n headingFontFamily={headingFontFamily}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onMaterialChange={setMaterial}\n onPanelBackgroundChange={setPanelBackground}\n onRadiusChange={setRadius}\n onScalingChange={setScaling}\n onFontFamilyChange={setFontFamily}\n onHeadingFontFamilyChange={setHeadingFontFamily}\n />\n );\n },\n);\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps\n extends ComponentPropsWithout<'div', RemovedProps | 'dir'>,\n ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nfunction getClientOS(): 'windows' | 'macos' | 'linux' | undefined {\n if (typeof navigator === 'undefined') return undefined;\n const ua = navigator.userAgent;\n if (ua.includes('Win')) return 'windows';\n if (ua.includes('Mac')) return 'macos';\n if (ua.includes('Linux')) return 'linux';\n return undefined;\n}\n\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = props.appearance ?? context?.appearance ?? themePropDefs.appearance.default,\n accentColor = props.accentColor ?? context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = props.grayColor ?? context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n material = props.material ?? context?.material ?? themePropDefs.material.default,\n panelBackground = props.panelBackground ??\n context?.panelBackground ??\n themePropDefs.panelBackground.default,\n radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n scaling = props.scaling ?? context?.scaling ?? themePropDefs.scaling.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n headingFontFamily = props.headingFontFamily ?? context?.headingFontFamily,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onMaterialChange = noop,\n onPanelBackgroundChange = noop,\n onRadiusChange = noop,\n onScalingChange = noop,\n onFontFamilyChange = noop,\n onHeadingFontFamilyChange = noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground =\n hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n\n // `data-os` can only be resolved on the client. Writing it straight to the\n // DOM keeps it out of the server markup \u2014 so hydration still matches \u2014 without\n // spending a render pass, and a state update here would re-render the whole\n // application on mount.\n const rootRef = React.useRef<ThemeImplElement>(null);\n const composedRef = useComposedRefs(forwardedRef, rootRef);\n const hasExplicitOS = 'data-os' in themeProps;\n\n useLayoutEffect(() => {\n if (!isRoot || hasExplicitOS) return;\n const node = rootRef.current;\n if (!node) return;\n\n const os = getClientOS();\n if (!os) return;\n node.setAttribute('data-os', os);\n return () => node.removeAttribute('data-os');\n }, [isRoot, hasExplicitOS]);\n\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n ],\n )}\n >\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-material={material}\n data-panel-background={panelBackground}\n data-radius={radius}\n data-scaling={scaling}\n data-font-family={fontFamily}\n data-heading-font-family={headingFontFamily}\n ref={composedRef}\n {...themeProps}\n className={classNames(\n 'radix-themes',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className,\n )}\n />\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps, ThemeContextValue };\n", "import type { accentColors } from '../props/color.prop.js';\n\ntype ThemeAccentColor = (typeof accentColors)[number];\n\nexport function getMatchingGrayColor(accentColor: ThemeAccentColor) {\n switch (accentColor) {\n case 'tomato':\n case 'red':\n case 'ruby':\n case 'crimson':\n case 'pink':\n case 'plum':\n case 'purple':\n case 'violet':\n return 'mauve';\n case 'iris':\n case 'indigo':\n case 'blue':\n case 'sky':\n case 'cyan':\n return 'slate';\n case 'teal':\n case 'jade':\n case 'mint':\n case 'green':\n return 'sage';\n case 'grass':\n case 'lime':\n return 'olive';\n case 'yellow':\n case 'amber':\n case 'orange':\n case 'brown':\n case 'gold':\n case 'bronze':\n return 'sand';\n case 'gray':\n return 'gray';\n }\n}\n", "import * as React from 'react';\n\n/**\n * State that tracks a prop but can also be set imperatively \u2014 the shape `Theme`\n * needs, where a prop sets the value and `ThemePanel` can change it at runtime.\n *\n * Adjusts state during render rather than syncing in a `useEffect`. An effect\n * would commit one render carrying the *old* value and schedule a second one,\n * which for a provider means every consumer renders twice and the browser can\n * paint the stale value in between.\n *\n * @see https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\nexport function usePropSyncedState<T>(propValue: T) {\n const [value, setValue] = React.useState(propValue);\n const [previousPropValue, setPreviousPropValue] = React.useState(propValue);\n\n if (!Object.is(propValue, previousPropValue)) {\n setPreviousPropValue(propValue);\n setValue(propValue);\n }\n\n return [value, setValue] as const;\n}\n", "import * as React from 'react';\n\nconst PANEL_BACKGROUND_MESSAGE = 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.';\n\nconst warned = new Set<string>();\n\nfunction warnOnce(message: string) {\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(message);\n}\n\n/**\n * Warns, in development only, that `panelBackground` is deprecated.\n *\n * The `process.env.NODE_ENV` check is a compile-time constant, so a production\n * bundle minifies the effect body away to an empty function instead of reading\n * props and formatting a message per mounted component. The message is also\n * logged once per session rather than once per component instance.\n */\nexport function useDeprecatedPanelBackgroundWarning(panelBackground: unknown) {\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (panelBackground !== undefined) warnOnce(PANEL_BACKGROUND_MESSAGE);\n }, [panelBackground]);\n}\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColors, grayColors } from '../props/color.prop.js';\nimport { radii } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst appearances = ['inherit', 'light', 'dark'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst scalings = ['90%', '95%', '100%', '105%', '110%'] as const;\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst themePropDefs = {\n ...asChildPropDef,\n /**\n * Whether to apply background color to the Theme element.\n *\n * Defaults to true for the root Theme and for Theme elements that\n * have an explicit light or dark appearance prop.\n */\n hasBackground: { type: 'boolean', default: true },\n /**\n * Sets the color scheme of the theme, typcially referred to as light and dark mode.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/dark-mode\n */\n appearance: { type: 'enum', values: appearances, default: 'inherit' },\n /**\n * Selects one of the accent color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n accentColor: { type: 'enum', values: accentColors, default: 'blue' },\n /**\n * Selects one of the gray color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n grayColor: { type: 'enum', values: grayColors, default: 'slate' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n material: { type: 'enum', values: materials, default: 'translucent' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: 'translucent' },\n /**\n * Sets the default radius of the components.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n radius: { type: 'enum', values: radii, default: 'full' },\n /**\n * Sets a scaling multiplier for values like spacing, font sizes, line heights, etc. are scaled.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/layout\n */\n scaling: { type: 'enum', values: scalings, default: '100%' },\n /**\n * Sets the font family used for body text in the theme.\n *\n * Headings follow this unless `headingFontFamily` (or the `--font-heading`\n * token) says otherwise.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n /**\n * Sets the font family used for `Heading`, independently of body text.\n *\n * Deliberately has no default: when it is left unset no attribute is\n * emitted and `--font-heading` keeps following `--font-body`, so a\n * `--font-heading` override in your own CSS survives a `fontFamily` switch.\n */\n headingFontFamily: { type: 'enum', values: fontFamilies },\n} satisfies {\n hasBackground: PropDef<boolean>;\n appearance: PropDef<(typeof appearances)[number]>;\n accentColor: PropDef<(typeof accentColors)[number]>;\n grayColor: PropDef<(typeof grayColors)[number]>;\n material: PropDef<(typeof materials)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number]>;\n radius: PropDef<(typeof radii)[number]>;\n scaling: PropDef<(typeof scalings)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n headingFontFamily: PropDef<(typeof fontFamilies)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Kbd } from '../kbd.js';\nimport { useBreakpoint } from '../../hooks/use-breakpoint.js';\n\nimport type { Breakpoint, Responsive } from '../../props/prop-def.js';\n\nconst BREAKPOINTS_DESCENDING: Breakpoint[] = ['xl', 'lg', 'md', 'sm', 'xs', 'initial'];\n\n/**\n * Resolves a responsive value for the given breakpoint, falling back through\n * the smaller breakpoints when the current one is not set.\n */\nfunction resolveResponsiveValue<T>(\n value: T | Partial<Record<Breakpoint, T>> | undefined,\n currentBreakpoint: Breakpoint,\n defaultValue: T,\n): T {\n if (value === undefined || value === null) return defaultValue;\n if (typeof value !== 'object') return value;\n\n const map = value as Partial<Record<Breakpoint, T>>;\n for (let i = BREAKPOINTS_DESCENDING.indexOf(currentBreakpoint); i < BREAKPOINTS_DESCENDING.length; i++) {\n const resolved = map[BREAKPOINTS_DESCENDING[i]];\n if (resolved !== undefined) return resolved;\n }\n return defaultValue;\n}\n\n/**\n * Resolves a possibly responsive value against the current viewport. Only a\n * responsive object subscribes to breakpoint changes; a plain value costs\n * nothing.\n */\nfunction useResolvedResponsiveValue<T>(value: Responsive<T> | undefined, defaultValue: T): T {\n const isResponsive = typeof value === 'object' && value !== null;\n const { breakpoint } = useBreakpoint(isResponsive);\n return resolveResponsiveValue(value as T | Partial<Record<Breakpoint, T>> | undefined, breakpoint, defaultValue);\n}\n\ntype MenuMaterial = 'solid' | 'translucent';\n\n/**\n * The menu surface material. The component props win, then the nearest\n * Theme's `material`. Theme keeps `panelBackground` in sync with `material` at\n * the root, but a nested `<Theme material=\"solid\">` only updates `material`,\n * so reading the deprecated `panelBackground` from the theme gave the wrong\n * surface there.\n */\nfunction resolveMenuMaterial(\n material: MenuMaterial | undefined,\n panelBackground: MenuMaterial | undefined,\n theme: { material: MenuMaterial; panelBackground: MenuMaterial },\n): MenuMaterial {\n return material ?? panelBackground ?? theme.material ?? theme.panelBackground;\n}\n\n/** Content padding per menu size, in px at 100% scaling (see base-menu.css). */\nconst CONTENT_PADDING: Record<string, number> = { '1': 8, '2': 12, '3': 12 };\n\n/**\n * Offset that lines the first item of a menu up with its anchor: the pointer\n * for a context menu, or the sub trigger for a submenu. It cancels the content\n * padding, which scales with the theme.\n */\nfunction getMenuAlignOffset(size: string, scaling: string | undefined): number {\n const scale = scaling ? parseFloat(scaling) / 100 : 1;\n const padding = CONTENT_PADDING[size] ?? CONTENT_PADDING['2'];\n return -Math.round(padding * (Number.isFinite(scale) ? scale : 1));\n}\n\nconst KEY_SYMBOLS: Record<string, string> = {\n '\u2318': 'Meta',\n cmd: 'Meta',\n command: 'Meta',\n meta: 'Meta',\n '\u2325': 'Alt',\n option: 'Alt',\n opt: 'Alt',\n alt: 'Alt',\n '\u21E7': 'Shift',\n shift: 'Shift',\n '\u2303': 'Control',\n ctrl: 'Control',\n control: 'Control',\n '\u232B': 'Backspace',\n '\u2326': 'Delete',\n '\u23CE': 'Enter',\n '\u21B5': 'Enter',\n '\u238B': 'Escape',\n esc: 'Escape',\n '\u21E5': 'Tab',\n '\u2191': 'ArrowUp',\n '\u2193': 'ArrowDown',\n '\u2190': 'ArrowLeft',\n '\u2192': 'ArrowRight',\n};\n\nconst ariaKeyShortcutsCache = new Map<string, string>();\n\n/**\n * Converts a display shortcut such as \"\u2318 \u21E7 P\" or \"Ctrl+S\" into the\n * `aria-keyshortcuts` format (\"Meta+Shift+P\", \"Control+S\").\n */\nfunction toAriaKeyShortcuts(shortcut: string): string | undefined {\n const cached = ariaKeyShortcutsCache.get(shortcut);\n if (cached !== undefined) return cached || undefined;\n\n // Modifier symbols are tokens of their own (\"\u2318\u21E7P\"); otherwise split on \"+\" and spaces.\n const tokens = shortcut.match(/[\u2318\u2325\u21E7\u2303]|[^\\s+\u2318\u2325\u21E7\u2303]+/gu) ?? [];\n const keys = tokens.map((token) => {\n const mapped = KEY_SYMBOLS[token] ?? KEY_SYMBOLS[token.toLowerCase()];\n return mapped ?? (token.length === 1 ? token.toUpperCase() : token);\n });\n const result = keys.join('+');\n ariaKeyShortcutsCache.set(shortcut, result);\n return result || undefined;\n}\n\n/**\n * The keyboard shortcut hint at the end of a menu item. It is hidden from\n * assistive technology because the item exposes it through\n * `aria-keyshortcuts` instead of reading it as part of the item name.\n */\nfunction MenuShortcut({ shortcut, className }: { shortcut: string; className?: string }) {\n return (\n <div aria-hidden className={classNames('rt-BaseMenuShortcut', className)}>\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n );\n}\n\nexport {\n resolveResponsiveValue,\n useResolvedResponsiveValue,\n resolveMenuMaterial,\n getMenuAlignOffset,\n toAriaKeyShortcuts,\n MenuShortcut,\n};\nexport type { MenuMaterial };\n", "'use client';\n\nimport * as React from 'react';\nimport { _BREAKPOINTS, type Breakpoint } from '../components/shell.types.js';\n\nconst QUERIES = Object.entries(_BREAKPOINTS) as Array<[Breakpoint, string]>;\n\ntype Listener = () => void;\n\n/**\n * One set of `MediaQueryList`s and one set of listeners for the whole\n * application. Every component that asks for the breakpoint used to create and\n * subscribe to its own copy of all five queries.\n */\nlet mediaQueryLists: Array<[Breakpoint, MediaQueryList]> | null = null;\nconst listeners = new Set<Listener>();\nlet cachedBreakpoint: Breakpoint | null = null;\n\nfunction getMediaQueryLists() {\n mediaQueryLists ??= QUERIES.map(([name, query]) => [name, window.matchMedia(query)] as [Breakpoint, MediaQueryList]);\n return mediaQueryLists;\n}\n\nfunction computeBreakpoint(): Breakpoint {\n // The largest matching query wins; `_BREAKPOINTS` is ordered smallest first.\n let matched: Breakpoint = 'initial';\n for (const [name, mql] of getMediaQueryLists()) {\n if (mql.matches) matched = name;\n }\n return matched;\n}\n\nfunction handleChange() {\n const next = computeBreakpoint();\n if (next === cachedBreakpoint) return;\n cachedBreakpoint = next;\n listeners.forEach((listener) => listener());\n}\n\nfunction subscribe(listener: Listener) {\n if (typeof window === 'undefined') return () => {};\n\n if (listeners.size === 0) {\n cachedBreakpoint = computeBreakpoint();\n for (const [, mql] of getMediaQueryLists()) {\n // Safari below 14 only has the deprecated listener API.\n if (typeof mql.addEventListener === 'function') mql.addEventListener('change', handleChange);\n else mql.addListener?.(handleChange);\n }\n }\n\n listeners.add(listener);\n\n return () => {\n listeners.delete(listener);\n if (listeners.size > 0) return;\n\n for (const [, mql] of getMediaQueryLists()) {\n try {\n if (typeof mql.removeEventListener === 'function') mql.removeEventListener('change', handleChange);\n else mql.removeListener?.(handleChange);\n } catch (error) {\n // Removal can throw in edge cases, e.g. the list was already torn down.\n if (process.env.NODE_ENV !== 'production') {\n console.warn('[useBreakpoint] MediaQueryList cleanup warning:', error);\n }\n }\n }\n cachedBreakpoint = null;\n };\n}\n\n/**\n * `getSnapshot` must return a referentially stable value between changes, so it\n * reads the cache that `handleChange` maintains rather than recomputing.\n */\nfunction getSnapshot(): Breakpoint {\n if (typeof window === 'undefined') return 'initial';\n cachedBreakpoint ??= computeBreakpoint();\n return cachedBreakpoint;\n}\n\nfunction getServerSnapshot(): Breakpoint {\n return 'initial';\n}\n\nconst getReadySnapshot = () => true;\nconst getReadyServerSnapshot = () => false;\n\nconst noopSubscribe = () => () => {};\nconst getInitialSnapshot = (): Breakpoint => 'initial';\n\n/**\n * The current breakpoint, and whether it has been resolved against a real\n * viewport yet (`false` on the server and during hydration).\n *\n * Reads through `useSyncExternalStore` rather than settling into state from an\n * effect. On a client render the very first pass already has the real\n * breakpoint, instead of rendering the whole shell at `initial` and correcting\n * it after the browser has painted.\n *\n * Pass `enabled = false` to skip the subscription (the breakpoint then reads as\n * `initial`).\n */\nexport function useBreakpoint(enabled = true): { breakpoint: Breakpoint; ready: boolean } {\n // Callers with a non-responsive value pass `enabled = false` so they neither\n // subscribe to the media queries nor re-render when the viewport crosses one.\n const breakpoint = React.useSyncExternalStore(\n enabled ? subscribe : noopSubscribe,\n enabled ? getSnapshot : getInitialSnapshot,\n getServerSnapshot,\n );\n const ready = React.useSyncExternalStore(\n enabled ? subscribe : noopSubscribe,\n getReadySnapshot,\n getReadyServerSnapshot,\n );\n\n return React.useMemo(() => ({ breakpoint, ready }), [breakpoint, ready]);\n}\n", "import type * as React from 'react';\n\nexport type PresentationValue = 'fixed' | 'overlay' | 'stacked';\n\nexport type ResponsivePresentation = PresentationValue | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PresentationValue>>;\n\nexport type PaneMode = 'expanded' | 'collapsed';\nexport type SidebarMode = 'collapsed' | 'thin' | 'expanded';\n\nexport type ResponsiveMode = PaneMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PaneMode>>;\n\nexport type ResponsiveSidebarMode = SidebarMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', SidebarMode>>;\n\nexport type Responsive<T> = T | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', T>>;\n\nexport type PaneSizePersistence = {\n load?: () => number | Promise<number | undefined> | undefined;\n save?: (size: number) => void | Promise<void>;\n};\n\nexport interface PaneBaseProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n height?: string | number;\n resizable?: boolean;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n resizer?: React.ReactNode;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n snapPoints?: number[];\n snapTolerance?: number;\n collapseThreshold?: number;\n paneId?: string;\n persistence?: PaneSizePersistence;\n}\n\nexport const _BREAKPOINTS = {\n xs: '(min-width: 520px)',\n sm: '(min-width: 768px)',\n md: '(min-width: 1024px)',\n lg: '(min-width: 1280px)',\n xl: '(min-width: 1640px)',\n} as const;\n\nexport type Breakpoint = 'initial' | keyof typeof _BREAKPOINTS;\n\nexport type PaneTarget = 'left' | 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\n/**\n * CSS custom property key type for type-safe style objects.\n * Allows any string prefixed with '--'.\n */\nexport type CSSCustomProperty = `--${string}`;\n\n/**\n * Style object that supports CSS custom properties.\n */\nexport type CSSPropertiesWithVars = React.CSSProperties & {\n [key: CSSCustomProperty]: string | number | undefined;\n};\n"],
5
- "mappings": "slBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,kBAAAE,GAAA,sBAAAC,GAAA,yBAAAC,GAAA,mBAAAC,KAAA,eAAAC,GAAAN,IAEA,IAAAO,EAAuB,oBCAvB,IAAAC,EAAuB,oBACvBC,GAAuB,yBACvBC,EAA6D,oBAC7DC,EAAiD,6BCD1C,SAASC,GAAqBC,EAA+B,CAClE,OAAQA,EAAa,CACnB,IAAK,SACL,IAAK,MACL,IAAK,OACL,IAAK,UACL,IAAK,OACL,IAAK,OACL,IAAK,SACL,IAAK,SACH,MAAO,QACT,IAAK,OACL,IAAK,SACL,IAAK,OACL,IAAK,MACL,IAAK,OACH,MAAO,QACT,IAAK,OACL,IAAK,OACL,IAAK,OACL,IAAK,Q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F,IAAMK,EAAe,OAAOP,GAAU,UAAYA,IAAU,KACtD,CAAE,WAAAQ,CAAW,EAAIC,GAAcF,CAAY,EACjD,OAAOR,GAAuBC,EAAyDQ,EAAYN,CAAY,CACjH,CTbA,IAAMQ,GAAoB,gBAAgC,CAAE,aAAc,EAAM,CAAC,EASpEC,GAAiD,CAC5D,EAAK,GACL,EAAK,EACP,EAGO,SAASC,GAAkBC,EAAgBC,EAAqC,CACrF,IAAMC,EAAQD,EAAU,WAAWA,CAAO,EAAI,IAAM,EACpD,OAAOH,GAAqBE,CAAI,GAAK,OAAO,SAASE,CAAK,EAAIA,EAAQ,EACxE,CAEO,SAASC,GAAa,CAAE,SAAAC,EAAU,KAAAJ,CAAK,EAAsB,CAClE,IAAMK,EAAeC,GAAiDN,EAAM,MAAS,EAC/E,CAAE,QAAAC,CAAQ,EAAIM,GAAgB,EAC9BC,EAAaH,EAAeN,GAAkBM,EAAcJ,CAAO,EAAI,OACvEQ,EAAc,UAClB,KAAO,CAAE,aAAc,GAAM,KAAMJ,EAAc,WAAAG,CAAW,GAC5D,CAACH,EAAcG,CAAU,CAC3B,EACA,OAAO,gBAACX,GAAY,SAAZ,CAAqB,MAAOY,GAAQL,CAAS,CACvD,CAEO,SAASM,IAAiB,CAC/B,OAAa,aAAWb,EAAW,CACrC",
6
- "names": ["menu_context_exports", "__export", "MenuProvider", "getMenuItemHeight", "menuSizeToItemHeight", "useMenuContext", "__toCommonJS", "React", "React", "import_classnames", "import_radix_ui", "import_internal", "getMatchingGrayColor", "accentColor", "React", "usePropSyncedState", "propValue", "value", "setValue", "previousPropValue", "setPreviousPropValue", "React", "PANEL_BACKGROUND_MESSAGE", "warned", "warnOnce", "message", "useDeprecatedPanelBackgroundWarning", "panelBackground", "asChildPropDef", "accentColors", "grayColors", "radii", "appearances", "panelBackgrounds", "materials", "scalings", "fontFamilies", "themePropDefs", "asChildPropDef", "accentColors", "grayColors", "radii", "noop", "defaultThemeContext", "themePropDefs", "ThemeContext", "useThemeContext", "Theme", "props", "forwardedRef", "TooltipPrimitive", "ThemeRoot", "ThemeImpl", "appearanceProp", "accentColorProp", "grayColorProp", "materialProp", "panelBackgroundProp", "radiusProp", "scalingProp", "fontFamilyProp", "headingFontFamilyProp", "hasBackground", "rootProps", "useDeprecatedPanelBackgroundWarning", "appearance", "setAppearance", "usePropSyncedState", "accentColor", "setAccentColor", "grayColor", "setGrayColor", "effectiveMaterial", "material", "setMaterial", "panelBackground", "setPanelBackground", "radius", "setRadius", "scaling", "setScaling", "fontFamily", "setFontFamily", "headingFontFamily", "setHeadingFontFamily", "getClientOS", "ua", "context", "asChild", "isRoot", "hasBackgroundProp", "onAppearanceChange", "onAccentColorChange", "onGrayColorChange", "onMaterialChange", "onPanelBackgroundChange", "onRadiusChange", "onScalingChange", "onFontFamilyChange", "onHeadingFontFamilyChange", "themeProps", "Comp", "resolvedGrayColor", "getMatchingGrayColor", "isExplicitAppearance", "rootRef", "composedRef", "hasExplicitOS", "node", "os", "classNames", "React", "import_classnames", "React", "_BREAKPOINTS", "QUERIES", "_BREAKPOINTS", "mediaQueryLists", "listeners", "cachedBreakpoint", "getMediaQueryLists", "name", "query", "computeBreakpoint", "matched", "mql", "handleChange", "next", "listener", "subscribe", "getSnapshot", "getServerSnapshot", "getReadySnapshot", "getReadyServerSnapshot", "noopSubscribe", "getInitialSnapshot", "useBreakpoint", "enabled", "breakpoint", "ready", "BREAKPOINTS_DESCENDING", "resolveResponsiveValue", "value", "currentBreakpoint", "defaultValue", "map", "i", "resolved", "useResolvedResponsiveValue", "isResponsive", "breakpoint", "useBreakpoint", "MenuContext", "menuSizeToItemHeight", "getMenuItemHeight", "size", "scaling", "scale", "MenuProvider", "children", "resolvedSize", "useResolvedResponsiveValue", "useThemeContext", "itemHeight", "value", "useMenuContext"]
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\n\nimport { useThemeContext } from '../theme.js';\nimport { useResolvedResponsiveValue } from './base-menu.utils.js';\n\nimport type { Responsive } from '../../props/prop-def.js';\n\n/**\n * Context to detect if a component is rendered inside a menu (DropdownMenu, ContextMenu, etc.)\n * Used by VirtualMenu to adjust its behavior:\n * - Skip role=\"menu\" when inside a parent menu (parent owns the role)\n * - Delegate certain keyboard handling to parent\n * - Use the correct item height based on menu size\n */\n\nexport type MenuSize = '1' | '2';\n\ninterface MenuContextValue {\n /** Whether we're inside a menu that owns the menu role */\n isInsideMenu: boolean;\n /** Menu size for the current breakpoint */\n size?: MenuSize;\n /** Item height in px for the current size and theme scaling */\n itemHeight?: number;\n}\n\nconst MenuContext = React.createContext<MenuContextValue>({ isInsideMenu: false });\n\ninterface MenuProviderProps {\n children: React.ReactNode;\n /** Menu size passed from parent (DropdownMenu.Content, ContextMenu.Content, etc.) */\n size?: Responsive<MenuSize>;\n}\n\n/** Map menu size to item height in pixels at 100% scaling */\nexport const menuSizeToItemHeight: Record<MenuSize, number> = {\n '1': 24, // --space-5\n '2': 32, // --space-6\n};\n\n/** Item height in px for a size at the given theme scaling (\"100%\", \"110%\"\u2026). */\nexport function getMenuItemHeight(size: MenuSize, scaling: string | undefined): number {\n const scale = scaling ? parseFloat(scaling) / 100 : 1;\n return menuSizeToItemHeight[size] * (Number.isFinite(scale) ? scale : 1);\n}\n\nexport function MenuProvider({ children, size }: MenuProviderProps) {\n const resolvedSize = useResolvedResponsiveValue<MenuSize | undefined>(size, undefined);\n const { scaling } = useThemeContext();\n const itemHeight = resolvedSize ? getMenuItemHeight(resolvedSize, scaling) : undefined;\n const value = React.useMemo(\n () => ({ isInsideMenu: true, size: resolvedSize, itemHeight }),\n [resolvedSize, itemHeight],\n );\n return <MenuContext.Provider value={value}>{children}</MenuContext.Provider>;\n}\n\nexport function useMenuContext() {\n return React.useContext(MenuContext);\n}\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot, Tooltip as TooltipPrimitive } from 'radix-ui';\nimport { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { usePropSyncedState } from '../hooks/use-prop-synced-state.js';\nimport { useDeprecatedPanelBackgroundWarning } from '../helpers/use-deprecation-warning.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemeMaterial = (typeof themePropDefs.material.values)[number];\ntype ThemePanelBackground = (typeof themePropDefs.panelBackground.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeScaling = (typeof themePropDefs.scaling.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\n// Headings follow the body font until something sets this, so `undefined` is a\n// meaningful value here rather than a missing one.\ntype ThemeHeadingFontFamily = ThemeFontFamily | undefined;\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onMaterialChange: (material: ThemeMaterial) => void;\n onPanelBackgroundChange: (panelBackground: ThemePanelBackground) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onScalingChange: (scaling: ThemeScaling) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n onHeadingFontFamilyChange: (headingFontFamily: ThemeHeadingFontFamily) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n material: ThemeMaterial;\n panelBackground: ThemePanelBackground;\n radius: ThemeRadius;\n scaling: ThemeScaling;\n fontFamily: ThemeFontFamily;\n headingFontFamily: ThemeHeadingFontFamily;\n}\n// Default theme values used when components render outside a Theme provider\nconst defaultThemeContext: ThemeContextValue = {\n appearance: themePropDefs.appearance.default,\n accentColor: themePropDefs.accentColor.default,\n grayColor: themePropDefs.grayColor.default,\n resolvedGrayColor: themePropDefs.grayColor.default,\n material: themePropDefs.material.default,\n panelBackground: themePropDefs.panelBackground.default,\n radius: themePropDefs.radius.default,\n scaling: themePropDefs.scaling.default,\n fontFamily: themePropDefs.fontFamily.default,\n headingFontFamily: undefined,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onMaterialChange: noop,\n onPanelBackgroundChange: noop,\n onRadiusChange: noop,\n onScalingChange: noop,\n onFontFamilyChange: noop,\n onHeadingFontFamilyChange: noop,\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n // Return default context if used outside Theme provider (e.g., during SSR)\n return context ?? defaultThemeContext;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir=\"ltr\">\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n </TooltipPrimitive.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>(\n (props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n material: materialProp = themePropDefs.material.default,\n panelBackground: panelBackgroundProp = themePropDefs.panelBackground.default,\n radius: radiusProp = themePropDefs.radius.default,\n scaling: scalingProp = themePropDefs.scaling.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n headingFontFamily: headingFontFamilyProp,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n\n useDeprecatedPanelBackgroundWarning(props.panelBackground);\n\n // Each of these follows its prop but stays independently settable, so\n // `ThemePanel` can change the theme at runtime. Syncing during render\n // rather than in an effect matters here: an effect would commit the old\n // theme first and re-render every consumer of the context a second time.\n const [appearance, setAppearance] = usePropSyncedState(appearanceProp);\n const [accentColor, setAccentColor] = usePropSyncedState(accentColorProp);\n const [grayColor, setGrayColor] = usePropSyncedState(grayColorProp);\n\n // Material takes precedence over panelBackground\n const effectiveMaterial =\n materialProp !== themePropDefs.material.default ? materialProp : panelBackgroundProp;\n const [material, setMaterial] = usePropSyncedState(effectiveMaterial);\n\n // Keep panelBackground in sync with material for backward compatibility\n const [panelBackground, setPanelBackground] = usePropSyncedState(material);\n\n const [radius, setRadius] = usePropSyncedState(radiusProp);\n const [scaling, setScaling] = usePropSyncedState(scalingProp);\n const [fontFamily, setFontFamily] = usePropSyncedState(fontFamilyProp);\n const [headingFontFamily, setHeadingFontFamily] = usePropSyncedState(headingFontFamilyProp);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n material={material}\n panelBackground={panelBackground}\n radius={radius}\n scaling={scaling}\n fontFamily={fontFamily}\n headingFontFamily={headingFontFamily}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onMaterialChange={setMaterial}\n onPanelBackgroundChange={setPanelBackground}\n onRadiusChange={setRadius}\n onScalingChange={setScaling}\n onFontFamilyChange={setFontFamily}\n onHeadingFontFamilyChange={setHeadingFontFamily}\n />\n );\n },\n);\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps\n extends ComponentPropsWithout<'div', RemovedProps | 'dir'>,\n ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nfunction getClientOS(): 'windows' | 'macos' | 'linux' | undefined {\n if (typeof navigator === 'undefined') return undefined;\n const ua = navigator.userAgent;\n if (ua.includes('Win')) return 'windows';\n if (ua.includes('Mac')) return 'macos';\n if (ua.includes('Linux')) return 'linux';\n return undefined;\n}\n\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = props.appearance ?? context?.appearance ?? themePropDefs.appearance.default,\n accentColor = props.accentColor ?? context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = props.grayColor ?? context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n material = props.material ?? context?.material ?? themePropDefs.material.default,\n panelBackground = props.panelBackground ??\n context?.panelBackground ??\n themePropDefs.panelBackground.default,\n radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n scaling = props.scaling ?? context?.scaling ?? themePropDefs.scaling.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n headingFontFamily = props.headingFontFamily ?? context?.headingFontFamily,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onMaterialChange = noop,\n onPanelBackgroundChange = noop,\n onRadiusChange = noop,\n onScalingChange = noop,\n onFontFamilyChange = noop,\n onHeadingFontFamilyChange = noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground =\n hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n\n // `data-os` can only be resolved on the client. Writing it straight to the\n // DOM keeps it out of the server markup \u2014 so hydration still matches \u2014 without\n // spending a render pass, and a state update here would re-render the whole\n // application on mount.\n const rootRef = React.useRef<ThemeImplElement>(null);\n const composedRef = useComposedRefs(forwardedRef, rootRef);\n const hasExplicitOS = 'data-os' in themeProps;\n\n useLayoutEffect(() => {\n if (!isRoot || hasExplicitOS) return;\n const node = rootRef.current;\n if (!node) return;\n\n const os = getClientOS();\n if (!os) return;\n node.setAttribute('data-os', os);\n return () => node.removeAttribute('data-os');\n }, [isRoot, hasExplicitOS]);\n\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n ],\n )}\n >\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-material={material}\n data-panel-background={panelBackground}\n data-radius={radius}\n data-scaling={scaling}\n data-font-family={fontFamily}\n data-heading-font-family={headingFontFamily}\n ref={composedRef}\n {...themeProps}\n className={classNames(\n 'radix-themes',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className,\n )}\n />\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps, ThemeContextValue };\n", "import type { accentColors } from '../props/color.prop.js';\n\ntype ThemeAccentColor = (typeof accentColors)[number];\n\nexport function getMatchingGrayColor(accentColor: ThemeAccentColor) {\n switch (accentColor) {\n case 'tomato':\n case 'red':\n case 'ruby':\n case 'crimson':\n case 'pink':\n case 'plum':\n case 'purple':\n case 'violet':\n return 'mauve';\n case 'iris':\n case 'indigo':\n case 'blue':\n case 'sky':\n case 'cyan':\n return 'slate';\n case 'teal':\n case 'jade':\n case 'mint':\n case 'green':\n return 'sage';\n case 'grass':\n case 'lime':\n return 'olive';\n case 'yellow':\n case 'amber':\n case 'orange':\n case 'brown':\n case 'gold':\n case 'bronze':\n return 'sand';\n case 'gray':\n return 'gray';\n }\n}\n", "import * as React from 'react';\n\n/**\n * State that tracks a prop but can also be set imperatively \u2014 the shape `Theme`\n * needs, where a prop sets the value and `ThemePanel` can change it at runtime.\n *\n * Adjusts state during render rather than syncing in a `useEffect`. An effect\n * would commit one render carrying the *old* value and schedule a second one,\n * which for a provider means every consumer renders twice and the browser can\n * paint the stale value in between.\n *\n * @see https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\nexport function usePropSyncedState<T>(propValue: T) {\n const [value, setValue] = React.useState(propValue);\n const [previousPropValue, setPreviousPropValue] = React.useState(propValue);\n\n if (!Object.is(propValue, previousPropValue)) {\n setPreviousPropValue(propValue);\n setValue(propValue);\n }\n\n return [value, setValue] as const;\n}\n", "import * as React from 'react';\n\nconst PANEL_BACKGROUND_MESSAGE = 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.';\n\nconst warned = new Set<string>();\n\nfunction warnOnce(message: string) {\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(message);\n}\n\n/**\n * Warns, in development only, that `panelBackground` is deprecated.\n *\n * The `process.env.NODE_ENV` check is a compile-time constant, so a production\n * bundle minifies the effect body away to an empty function instead of reading\n * props and formatting a message per mounted component. The message is also\n * logged once per session rather than once per component instance.\n */\nexport function useDeprecatedPanelBackgroundWarning(panelBackground: unknown) {\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (panelBackground !== undefined) warnOnce(PANEL_BACKGROUND_MESSAGE);\n }, [panelBackground]);\n}\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColors, grayColors } from '../props/color.prop.js';\nimport { radii } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst appearances = ['inherit', 'light', 'dark'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst scalings = ['90%', '95%', '100%', '105%', '110%'] as const;\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst themePropDefs = {\n ...asChildPropDef,\n /**\n * Whether to apply background color to the Theme element.\n *\n * Defaults to true for the root Theme and for Theme elements that\n * have an explicit light or dark appearance prop.\n */\n hasBackground: { type: 'boolean', default: true },\n /**\n * Sets the color scheme of the theme, typcially referred to as light and dark mode.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/dark-mode\n */\n appearance: { type: 'enum', values: appearances, default: 'inherit' },\n /**\n * Selects one of the accent color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n accentColor: { type: 'enum', values: accentColors, default: 'blue' },\n /**\n * Selects one of the gray color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n grayColor: { type: 'enum', values: grayColors, default: 'slate' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n material: { type: 'enum', values: materials, default: 'translucent' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: 'translucent' },\n /**\n * Sets the default radius of the components.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n radius: { type: 'enum', values: radii, default: 'full' },\n /**\n * Sets a scaling multiplier for values like spacing, font sizes, line heights, etc. are scaled.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/layout\n */\n scaling: { type: 'enum', values: scalings, default: '100%' },\n /**\n * Sets the font family used for body text in the theme.\n *\n * Headings follow this unless `headingFontFamily` (or the `--font-heading`\n * token) says otherwise.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n /**\n * Sets the font family used for `Heading`, independently of body text.\n *\n * Deliberately has no default: when it is left unset no attribute is\n * emitted and `--font-heading` keeps following `--font-body`, so a\n * `--font-heading` override in your own CSS survives a `fontFamily` switch.\n */\n headingFontFamily: { type: 'enum', values: fontFamilies },\n} satisfies {\n hasBackground: PropDef<boolean>;\n appearance: PropDef<(typeof appearances)[number]>;\n accentColor: PropDef<(typeof accentColors)[number]>;\n grayColor: PropDef<(typeof grayColors)[number]>;\n material: PropDef<(typeof materials)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number]>;\n radius: PropDef<(typeof radii)[number]>;\n scaling: PropDef<(typeof scalings)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n headingFontFamily: PropDef<(typeof fontFamilies)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Kbd } from '../kbd.js';\nimport { useBreakpoint } from '../../hooks/use-breakpoint.js';\n\nimport type { Breakpoint, Responsive } from '../../props/prop-def.js';\n\nconst BREAKPOINTS_DESCENDING: Breakpoint[] = ['xl', 'lg', 'md', 'sm', 'xs', 'initial'];\n\n/**\n * Resolves a responsive value for the given breakpoint, falling back through\n * the smaller breakpoints when the current one is not set.\n */\nfunction resolveResponsiveValue<T>(\n value: T | Partial<Record<Breakpoint, T>> | undefined,\n currentBreakpoint: Breakpoint,\n defaultValue: T,\n): T {\n if (value === undefined || value === null) return defaultValue;\n if (typeof value !== 'object') return value;\n\n const map = value as Partial<Record<Breakpoint, T>>;\n for (let i = BREAKPOINTS_DESCENDING.indexOf(currentBreakpoint); i < BREAKPOINTS_DESCENDING.length; i++) {\n const resolved = map[BREAKPOINTS_DESCENDING[i]];\n if (resolved !== undefined) return resolved;\n }\n return defaultValue;\n}\n\n/**\n * Resolves a possibly responsive value against the current viewport. Only a\n * responsive object subscribes to breakpoint changes; a plain value costs\n * nothing.\n */\nfunction useResolvedResponsiveValue<T>(value: Responsive<T> | undefined, defaultValue: T): T {\n const isResponsive = typeof value === 'object' && value !== null;\n const { breakpoint } = useBreakpoint(isResponsive);\n return resolveResponsiveValue(value as T | Partial<Record<Breakpoint, T>> | undefined, breakpoint, defaultValue);\n}\n\ntype MenuMaterial = 'solid' | 'translucent';\n\n/**\n * The menu surface material. The component props win, then the nearest\n * Theme's `material`. Theme keeps `panelBackground` in sync with `material` at\n * the root, but a nested `<Theme material=\"solid\">` only updates `material`,\n * so reading the deprecated `panelBackground` from the theme gave the wrong\n * surface there.\n */\nfunction resolveMenuMaterial(\n material: MenuMaterial | undefined,\n panelBackground: MenuMaterial | undefined,\n theme: { material: MenuMaterial; panelBackground: MenuMaterial },\n): MenuMaterial {\n return material ?? panelBackground ?? theme.material ?? theme.panelBackground;\n}\n\n/** Content padding per menu size, in px at 100% scaling (see base-menu.css). */\nconst CONTENT_PADDING: Record<string, number> = { '1': 8, '2': 12, '3': 12 };\n\n/**\n * Offset that lines the first item of a menu up with its anchor: the pointer\n * for a context menu, or the sub trigger for a submenu. It cancels the content\n * padding, which scales with the theme.\n */\nfunction getMenuAlignOffset(size: string, scaling: string | undefined): number {\n const scale = scaling ? parseFloat(scaling) / 100 : 1;\n const padding = CONTENT_PADDING[size] ?? CONTENT_PADDING['2'];\n return -Math.round(padding * (Number.isFinite(scale) ? scale : 1));\n}\n\nconst KEY_SYMBOLS: Record<string, string> = {\n '\u2318': 'Meta',\n cmd: 'Meta',\n command: 'Meta',\n meta: 'Meta',\n '\u2325': 'Alt',\n option: 'Alt',\n opt: 'Alt',\n alt: 'Alt',\n '\u21E7': 'Shift',\n shift: 'Shift',\n '\u2303': 'Control',\n ctrl: 'Control',\n control: 'Control',\n '\u232B': 'Backspace',\n '\u2326': 'Delete',\n '\u23CE': 'Enter',\n '\u21B5': 'Enter',\n '\u238B': 'Escape',\n esc: 'Escape',\n '\u21E5': 'Tab',\n '\u2191': 'ArrowUp',\n '\u2193': 'ArrowDown',\n '\u2190': 'ArrowLeft',\n '\u2192': 'ArrowRight',\n};\n\nconst ariaKeyShortcutsCache = new Map<string, string>();\n\n/**\n * Converts a display shortcut such as \"\u2318 \u21E7 P\" or \"Ctrl+S\" into the\n * `aria-keyshortcuts` format (\"Meta+Shift+P\", \"Control+S\").\n */\nfunction toAriaKeyShortcuts(shortcut: string): string | undefined {\n const cached = ariaKeyShortcutsCache.get(shortcut);\n if (cached !== undefined) return cached || undefined;\n\n // Modifier symbols are tokens of their own (\"\u2318\u21E7P\"); otherwise split on \"+\" and spaces.\n const tokens = shortcut.match(/[\u2318\u2325\u21E7\u2303]|[^\\s+\u2318\u2325\u21E7\u2303]+/gu) ?? [];\n const keys = tokens.map((token) => {\n const mapped = KEY_SYMBOLS[token] ?? KEY_SYMBOLS[token.toLowerCase()];\n return mapped ?? (token.length === 1 ? token.toUpperCase() : token);\n });\n const result = keys.join('+');\n ariaKeyShortcutsCache.set(shortcut, result);\n return result || undefined;\n}\n\n/**\n * The keyboard shortcut hint at the end of a menu item. It is hidden from\n * assistive technology because the item exposes it through\n * `aria-keyshortcuts` instead of reading it as part of the item name.\n */\nfunction MenuShortcut({ shortcut, className }: { shortcut: string; className?: string }) {\n return (\n <div aria-hidden className={classNames('rt-BaseMenuShortcut', className)}>\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n );\n}\n\nexport {\n resolveResponsiveValue,\n useResolvedResponsiveValue,\n resolveMenuMaterial,\n getMenuAlignOffset,\n toAriaKeyShortcuts,\n MenuShortcut,\n};\nexport type { MenuMaterial };\n", "'use client';\n\nimport * as React from 'react';\nimport { _BREAKPOINTS, type Breakpoint } from '../components/shell.types.js';\n\nconst QUERIES = Object.entries(_BREAKPOINTS) as Array<[Breakpoint, string]>;\n\ntype Listener = () => void;\n\n/**\n * One set of `MediaQueryList`s and one set of listeners for the whole\n * application. Every component that asks for the breakpoint used to create and\n * subscribe to its own copy of all five queries.\n */\nlet mediaQueryLists: Array<[Breakpoint, MediaQueryList]> | null = null;\nconst listeners = new Set<Listener>();\nlet cachedBreakpoint: Breakpoint | null = null;\n\nfunction getMediaQueryLists() {\n mediaQueryLists ??= QUERIES.map(([name, query]) => [name, window.matchMedia(query)] as [Breakpoint, MediaQueryList]);\n return mediaQueryLists;\n}\n\nfunction computeBreakpoint(): Breakpoint {\n // The largest matching query wins; `_BREAKPOINTS` is ordered smallest first.\n let matched: Breakpoint = 'initial';\n for (const [name, mql] of getMediaQueryLists()) {\n if (mql.matches) matched = name;\n }\n return matched;\n}\n\nfunction handleChange() {\n const next = computeBreakpoint();\n if (next === cachedBreakpoint) return;\n cachedBreakpoint = next;\n listeners.forEach((listener) => listener());\n}\n\nfunction subscribe(listener: Listener) {\n if (typeof window === 'undefined') return () => {};\n\n if (listeners.size === 0) {\n cachedBreakpoint = computeBreakpoint();\n for (const [, mql] of getMediaQueryLists()) {\n // Safari below 14 only has the deprecated listener API.\n if (typeof mql.addEventListener === 'function') mql.addEventListener('change', handleChange);\n else mql.addListener?.(handleChange);\n }\n }\n\n listeners.add(listener);\n\n return () => {\n listeners.delete(listener);\n if (listeners.size > 0) return;\n\n for (const [, mql] of getMediaQueryLists()) {\n try {\n if (typeof mql.removeEventListener === 'function') mql.removeEventListener('change', handleChange);\n else mql.removeListener?.(handleChange);\n } catch (error) {\n // Removal can throw in edge cases, e.g. the list was already torn down.\n if (process.env.NODE_ENV !== 'production') {\n console.warn('[useBreakpoint] MediaQueryList cleanup warning:', error);\n }\n }\n }\n cachedBreakpoint = null;\n };\n}\n\n/**\n * `getSnapshot` must return a referentially stable value between changes, so it\n * reads the cache that `handleChange` maintains rather than recomputing.\n */\nfunction getSnapshot(): Breakpoint {\n if (typeof window === 'undefined') return 'initial';\n cachedBreakpoint ??= computeBreakpoint();\n return cachedBreakpoint;\n}\n\nfunction getServerSnapshot(): Breakpoint {\n return 'initial';\n}\n\n/**\n * The breakpoint right now, outside React's render. For an effect that needs\n * the answer at the moment it runs rather than the one its render saw.\n */\nexport function readBreakpoint(): Breakpoint {\n if (typeof window === 'undefined') return 'initial';\n return computeBreakpoint();\n}\n\nconst getReadySnapshot = () => true;\nconst getReadyServerSnapshot = () => false;\n\nconst noopSubscribe = () => () => {};\nconst getInitialSnapshot = (): Breakpoint => 'initial';\n\n/**\n * The current breakpoint, and whether it has been resolved against a real\n * viewport yet (`false` on the server and during hydration).\n *\n * Reads through `useSyncExternalStore` rather than settling into state from an\n * effect. On a client render the very first pass already has the real\n * breakpoint, instead of rendering the whole shell at `initial` and correcting\n * it after the browser has painted.\n *\n * Pass `enabled = false` to skip the subscription (the breakpoint then reads as\n * `initial`).\n */\nexport function useBreakpoint(enabled = true): { breakpoint: Breakpoint; ready: boolean } {\n // Callers with a non-responsive value pass `enabled = false` so they neither\n // subscribe to the media queries nor re-render when the viewport crosses one.\n const breakpoint = React.useSyncExternalStore(\n enabled ? subscribe : noopSubscribe,\n enabled ? getSnapshot : getInitialSnapshot,\n getServerSnapshot,\n );\n const ready = React.useSyncExternalStore(\n enabled ? subscribe : noopSubscribe,\n getReadySnapshot,\n getReadyServerSnapshot,\n );\n\n return React.useMemo(() => ({ breakpoint, ready }), [breakpoint, ready]);\n}\n", "import type * as React from 'react';\n\nexport type PresentationValue = 'fixed' | 'overlay' | 'stacked';\n\nexport type ResponsivePresentation = PresentationValue | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PresentationValue>>;\n\nexport type PaneMode = 'expanded' | 'collapsed';\nexport type SidebarMode = 'collapsed' | 'thin' | 'expanded';\n\nexport type ResponsiveMode = PaneMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PaneMode>>;\n\nexport type ResponsiveSidebarMode = SidebarMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', SidebarMode>>;\n\nexport type Responsive<T> = T | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', T>>;\n\nexport type PaneSizePersistence = {\n load?: () => number | Promise<number | undefined> | undefined;\n save?: (size: number) => void | Promise<void>;\n};\n\n/**\n * Why a pane's open state changed. Since 0.8.0 only a user action is reported:\n * `toggle` for a Trigger, a handle double-click or a drag past\n * `collapseThreshold`, and `dismiss` for Escape or a press on the scrim.\n * `init`, `responsive`, `panel` and `left` are kept in the types for\n * compatibility and are never sent.\n */\nexport type PaneOpenChangeReason = 'toggle' | 'dismiss' | 'init' | 'responsive';\n\nexport interface PaneBaseProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onExpand?: () => void;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n /** @deprecated Removed in 1.0. Snap in your own `onSizeChange` and pass `size`. */\n snapPoints?: number[];\n /** @deprecated Removed in 1.0, with `snapPoints`. */\n snapTolerance?: number;\n /** @deprecated Removed in 1.0. Close the pane from your own `onResizeEnd`. */\n collapseThreshold?: number;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n paneId?: string;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n persistence?: PaneSizePersistence;\n}\n\nexport const _BREAKPOINTS = {\n xs: '(min-width: 520px)',\n sm: '(min-width: 768px)',\n md: '(min-width: 1024px)',\n lg: '(min-width: 1280px)',\n xl: '(min-width: 1640px)',\n} as const;\n\nexport type Breakpoint = 'initial' | keyof typeof _BREAKPOINTS;\n\n/** Every breakpoint, smallest first. The stylesheet's @media blocks follow this order. */\nexport const SHELL_BREAKPOINTS: readonly Breakpoint[] = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'];\n\nexport type PaneTarget = 'left' | 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\n/** The panes a Trigger can drive. `left` is the deprecated name for `rail`. */\nexport type PaneName = Exclude<PaneTarget, 'left'>;\n\n/**\n * CSS custom property key type for type-safe style objects.\n * Allows any string prefixed with '--'.\n */\nexport type CSSCustomProperty = `--${string}`;\n\n/**\n * Style object that supports CSS custom properties.\n */\nexport type CSSPropertiesWithVars = React.CSSProperties & {\n [key: CSSCustomProperty]: string | number | undefined;\n};\n"],
5
+ "mappings": "slBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,kBAAAE,GAAA,sBAAAC,GAAA,yBAAAC,GAAA,mBAAAC,KAAA,eAAAC,GAAAN,IAEA,IAAAO,EAAuB,oBCAvB,IAAAC,EAAuB,oBACvBC,GAAuB,yBACvBC,EAA6D,oBAC7DC,EAAiD,6BCD1C,SAASC,GAAqBC,EAA+B,CAClE,OAAQA,EAAa,CACnB,IAAK,SACL,IAAK,MACL,IAAK,OACL,IAAK,UACL,IAAK,OACL,IAAK,OACL,IAAK,SACL,IAAK,SACH,MAAO,QACT,IAAK,OACL,IAAK,SACL,IAAK,OACL,IAAK,MACL,IAAK,OACH,MAAO,QACT,IAAK,OACL,IAAK,OACL,IAAK,OACL,IAAK,QACH,MAAO,OACT,IAAK,QACL,IAAK,OACH,MAAO,QACT,IAAK,SACL,IAAK,QACL,IAAK,SACL,IAAK,QACL,IAAK,OACL,IAAK,SACH,MAAO,OACT,IAAK,OACH,MAAO,MACX,CACF,CCvCA,IAAAC,EAAuB,oBAahB,S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c,EAAM,CAAC,EASpEC,GAAiD,CAC5D,EAAK,GACL,EAAK,EACP,EAGO,SAASC,GAAkBC,EAAgBC,EAAqC,CACrF,IAAMC,EAAQD,EAAU,WAAWA,CAAO,EAAI,IAAM,EACpD,OAAOH,GAAqBE,CAAI,GAAK,OAAO,SAASE,CAAK,EAAIA,EAAQ,EACxE,CAEO,SAASC,GAAa,CAAE,SAAAC,EAAU,KAAAJ,CAAK,EAAsB,CAClE,IAAMK,EAAeC,GAAiDN,EAAM,MAAS,EAC/E,CAAE,QAAAC,CAAQ,EAAIM,GAAgB,EAC9BC,EAAaH,EAAeN,GAAkBM,EAAcJ,CAAO,EAAI,OACvEQ,EAAc,UAClB,KAAO,CAAE,aAAc,GAAM,KAAMJ,EAAc,WAAAG,CAAW,GAC5D,CAACH,EAAcG,CAAU,CAC3B,EACA,OAAO,gBAACX,GAAY,SAAZ,CAAqB,MAAOY,GAAQL,CAAS,CACvD,CAEO,SAASM,IAAiB,CAC/B,OAAa,aAAWb,EAAW,CACrC",
6
+ "names": ["menu_context_exports", "__export", "MenuProvider", "getMenuItemHeight", "menuSizeToItemHeight", "useMenuContext", "__toCommonJS", "React", "React", "import_classnames", "import_radix_ui", "import_internal", "getMatchingGrayColor", "accentColor", "React", "usePropSyncedState", "propValue", "value", "setValue", "previousPropValue", "setPreviousPropValue", "React", "PANEL_BACKGROUND_MESSAGE", "warned", "warnOnce", "message", "useDeprecatedPanelBackgroundWarning", "panelBackground", "asChildPropDef", "accentColors", "grayColors", "radii", "appearances", "panelBackgrounds", "materials", "scalings", "fontFamilies", "themePropDefs", "asChildPropDef", "accentColors", "grayColors", "radii", "noop", "defaultThemeContext", "themePropDefs", "ThemeContext", "useThemeContext", "Theme", "props", "forwardedRef", "TooltipPrimitive", "ThemeRoot", "ThemeImpl", "appearanceProp", "accentColorProp", "grayColorProp", "materialProp", "panelBackgroundProp", "radiusProp", "scalingProp", "fontFamilyProp", "headingFontFamilyProp", "hasBackground", "rootProps", "useDeprecatedPanelBackgroundWarning", "appearance", "setAppearance", "usePropSyncedState", "accentColor", "setAccentColor", "grayColor", "setGrayColor", "effectiveMaterial", "material", "setMaterial", "panelBackground", "setPanelBackground", "radius", "setRadius", "scaling", "setScaling", "fontFamily", "setFontFamily", "headingFontFamily", "setHeadingFontFamily", "getClientOS", "ua", "context", "asChild", "isRoot", "hasBackgroundProp", "onAppearanceChange", "onAccentColorChange", "onGrayColorChange", "onMaterialChange", "onPanelBackgroundChange", "onRadiusChange", "onScalingChange", "onFontFamilyChange", "onHeadingFontFamilyChange", "themeProps", "Comp", "resolvedGrayColor", "getMatchingGrayColor", "isExplicitAppearance", "rootRef", "composedRef", "hasExplicitOS", "node", "os", "classNames", "React", "import_classnames", "React", "_BREAKPOINTS", "QUERIES", "_BREAKPOINTS", "mediaQueryLists", "listeners", "cachedBreakpoint", "getMediaQueryLists", "name", "query", "computeBreakpoint", "matched", "mql", "handleChange", "next", "listener", "subscribe", "getSnapshot", "getServerSnapshot", "getReadySnapshot", "getReadyServerSnapshot", "noopSubscribe", "getInitialSnapshot", "useBreakpoint", "enabled", "breakpoint", "subscribe", "getSnapshot", "getServerSnapshot", "ready", "BREAKPOINTS_DESCENDING", "resolveResponsiveValue", "value", "currentBreakpoint", "defaultValue", "map", "i", "resolved", "useResolvedResponsiveValue", "isResponsive", "breakpoint", "useBreakpoint", "MenuContext", "menuSizeToItemHeight", "getMenuItemHeight", "size", "scaling", "scale", "MenuProvider", "children", "resolvedSize", "useResolvedResponsiveValue", "useThemeContext", "itemHeight", "value", "useMenuContext"]
7
7
  }
@@ -1,16 +1,18 @@
1
1
  import * as React from 'react';
2
2
  import { BottomHandle } from './shell-handles.js';
3
+ import { type SizeChangeMeta } from './shell-resizable.js';
3
4
  import type { Breakpoint, PaneBaseProps } from '../shell.types.js';
4
5
  type BottomOpenChangeMeta = {
5
- reason: 'init' | 'toggle' | 'responsive';
6
+ reason: 'init' | 'toggle' | 'responsive' | 'dismiss';
6
7
  };
7
8
  type BottomControlledProps = {
8
9
  open: boolean | Partial<Record<Breakpoint, boolean>>;
9
10
  onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void;
10
11
  defaultOpen?: never;
11
12
  };
13
+ /** Since 0.8.0 `defaultOpen` takes a responsive object here too, as the docs already said it did. */
12
14
  type BottomUncontrolledProps = {
13
- defaultOpen?: boolean;
15
+ defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>;
14
16
  onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void;
15
17
  open?: never;
16
18
  };
@@ -22,14 +24,11 @@ type BottomSizeUncontrolledProps = {
22
24
  defaultSize?: number | string;
23
25
  size?: never;
24
26
  };
25
- type BottomSizeChangeMeta = {
26
- reason: 'init' | 'resize' | 'controlled';
27
- };
28
27
  type BottomPublicProps = PaneBaseProps & (BottomControlledProps | BottomUncontrolledProps) & (BottomSizeControlledProps | BottomSizeUncontrolledProps) & {
29
- onSizeChange?: (size: number, meta: BottomSizeChangeMeta) => void;
28
+ onSizeChange?: (size: number, meta: SizeChangeMeta) => void;
30
29
  sizeUpdate?: 'throttle' | 'debounce';
31
30
  sizeUpdateMs?: number;
32
- /** When true, adds margin and triggers gray backdrop on Shell. */
31
+ /** When true, adds margin and triggers the gray backdrop on the Shell. */
33
32
  inset?: boolean;
34
33
  };
35
34
  type BottomComponent = React.ForwardRefExoticComponent<BottomPublicProps & React.RefAttributes<HTMLDivElement>> & {
@@ -1 +1 @@
1
- {"version":3,"file":"shell-bottom.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/shell-bottom.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,YAAY,EAAc,MAAM,oBAAoB,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAiC,aAAa,EAAyB,MAAM,mBAAmB,CAAC;AAIzH,KAAK,oBAAoB,GAAG;IAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAA;C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,2BAA2B,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AACnF,KAAK,iBAAiB,GAAG,aAAa,GACpC,CAAC,qBAAqB,GAAG,uBAAuB,CAAC,GACjD,CAAC,yBAAyB,GAAG,2BAA2B,CAAC,GAAG;IAC1D,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAC5D,UAAU,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEJ,KAAK,eAAe,GAAG,KAAK,CAAC,yBAAyB,CAAC,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,GAAG;IAAE,MAAM,EAAE,OAAO,YAAY,CAAA;CAAE,CAAC;AAIlJ,eAAO,MAAM,MAAM,EAqHb,eAAe,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";var io=Object.create;var De=Object.defineProperty;var lo=Object.getOwnPropertyDescriptor;var po=Object.getOwnPropertyNames;var co=Object.getPrototypeOf,uo=Object.prototype.hasOwnProperty;var mo=(e,t)=>{for(var o in t)De(e,o,{get:t[o],enumerable:!0})},Rt=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of po(t))!uo.call(e,s)&&s!==o&&De(e,s,{get:()=>t[s],enumerable:!(n=lo(t,s))||n.enumerable});return e};var B=(e,t,o)=>(o=e!=null?io(co(e)):{},Rt(t||!e||!e.__esModule?De(o,"default",{value:e,enumerable:!0}):o,e)),fo=e=>Rt(De({},"__esModule",{value:!0}),e);var un={};mo(un,{Bottom:()=>ut});module.exports=fo(un);var d=B(require("react")),no=B(require("classnames"));var P=B(require("react")),Wt=B(require("classnames")),te=require("radix-ui");var re={asChild:{type:"boolean"}};var Ee={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}};var bt={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}};var yo=["1","2","3","4"],Po=["solid","translucent"],go=["solid","translucent"],Ct={...re,align:{type:"enum",className:"rt-r-align",values:["start","center"],default:"center"},size:{type:"enum",className:"rt-r-size",values:yo,default:"3",responsive:!0},panelBackground:{type:"enum",values:Po,default:void 0},material:{type:"enum",values:go,default:void 0},width:Ee.width,minWidth:Ee.minWidth,maxWidth:{...Ee.maxWidth,default:"600px"},...bt};var x=B(require("react")),kt=B(require("classnames")),ye=require("radix-ui"),Me=require("radix-ui/internal");function xt(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var $e=B(require("react"));function Z(e){let[t,o]=$e.useState(e),[n,s]=$e.useState(e);return Object.is(e,n)||(s(e),o(e)),[t,o]}var St=B(require("react")),ho="Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.",Tt=new Set;function vo(e){Tt.has(e)||(Tt.add(e),console.warn(e))}function we(e){St.useEffect(()=>{},[e])}var Ue=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],Dt=["auto","gray","mauve","slate","sage","olive","sand"],ke={color:{type:"enum",values:Ue,default:void 0}};var Et=["none","small","medium","large","full"];var Ro=["inherit","light","dark"],bo=["solid","translucent"],Co=["solid","translucent"],xo=["90%","95%","100%","105%","110%"],wt=["sans","mono","serif"],y={...re,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:Ro,default:"inherit"},accentColor:{type:"enum",values:Ue,default:"blue"},grayColor:{type:"enum",values:Dt,default:"slate"},material:{type:"enum",values:Co,default:"translucent"},panelBackground:{type:"enum",values:bo,default:"translucent"},radius:{type:"enum",values:Et,default:"full"},scaling:{type:"enum",values:xo,default:"100%"},fontFamily:{type:"enum",values:wt,default:"sans"},headingFontFamily:{type:"enum",values:wt}};var N=()=>{},Ln={appearance:y.appearance.default,accentColor:y.accentColor.default,grayColor:y.grayColor.default,resolvedGrayColor:y.grayColor.default,material:y.material.default,panelBackground:y.panelBackground.default,radius:y.radius.default,scaling:y.scaling.default,fontFamily:y.fontFamily.default,headingFontFamily:void 0,onAppearanceChange:N,onAccentColorChange:N,onGrayColorChange:N,onMaterialChange:N,onPanelBackgroundChange:N,onRadiusChange:N,onScalingChange:N,onFontFamilyChange:N,onHeadingFontFamilyChange:N},_e=x.createContext(void 0);var qe=x.forwardRef((e,t)=>x.useContext(_e)===void 0?x.createElement(ye.Tooltip.Provider,{delayDuration:200},x.createElement(ye.Direction.Provider,{dir:"ltr"},x.createElement(Mt,{...e,ref:t}))):x.createElement(Ye,{...e,ref:t}));qe.displayName="Theme";var Mt=x.forwardRef((e,t)=>{let{appearance:o=y.appearance.default,accentColor:n=y.accentColor.default,grayColor:s=y.grayColor.default,material:r=y.material.default,panelBackground:l=y.panelBackground.default,radius:p=y.radius.default,scaling:i=y.scaling.default,fontFamily:a=y.fontFamily.default,headingFontFamily:u,hasBackground:m=y.hasBackground.default,...g}=e;we(e.panelBackground);let[E,T]=Z(o),[H,_]=Z(n),[$,R]=Z(s),z=r!==y.material.default?r:l,[F,G]=Z(z),[W,U]=Z(F),[ee,oe]=Z(p),[f,b]=Z(i),[w,K]=Z(a),[q,h]=Z(u);return x.createElement(Ye,{...g,ref:t,isRoot:!0,hasBackground:m,appearance:E,accentColor:H,grayColor:$,material:F,panelBackground:W,radius:ee,scaling:f,fontFamily:w,headingFontFamily:q,onAppearanceChange:T,onAccentColorChange:_,onGrayColorChange:R,onMaterialChange:G,onPanelBackgroundChange:U,onRadiusChange:oe,onScalingChange:b,onFontFamilyChange:K,onHeadingFontFamilyChange:h})});Mt.displayName="ThemeRoot";function To(){if(typeof navigator>"u")return;let e=navigator.userAgent;if(e.includes("Win"))return"windows";if(e.includes("Mac"))return"macos";if(e.includes("Linux"))return"linux"}var Ye=x.forwardRef((e,t)=>{let o=x.useContext(_e),{asChild:n,isRoot:s,hasBackground:r,appearance:l=e.appearance??o?.appearance??y.appearance.default,accentColor:p=e.accentColor??o?.accentColor??y.accentColor.default,grayColor:i=e.grayColor??o?.resolvedGrayColor??y.grayColor.default,material:a=e.material??o?.material??y.material.default,panelBackground:u=e.panelBackground??o?.panelBackground??y.panelBackground.default,radius:m=e.radius??o?.radius??y.radius.default,scaling:g=e.scaling??o?.scaling??y.scaling.default,fontFamily:E=e.fontFamily??o?.fontFamily??y.fontFamily.default,headingFontFamily:T=e.headingFontFamily??o?.headingFontFamily,onAppearanceChange:H=N,onAccentColorChange:_=N,onGrayColorChange:$=N,onMaterialChange:R=N,onPanelBackgroundChange:z=N,onRadiusChange:F=N,onScalingChange:G=N,onFontFamilyChange:W=N,onHeadingFontFamilyChange:U=N,...ee}=e,oe=n?ye.Slot.Root:"div",f=i==="auto"?xt(p):i,b=e.appearance==="light"||e.appearance==="dark",w=r===void 0?s||b:r,K=x.useRef(null),q=(0,Me.useComposedRefs)(t,K),h="data-os"in ee;return(0,Me.useLayoutEffect)(()=>{if(!s||h)return;let V=K.current;if(!V)return;let v=To();if(v)return V.setAttribute("data-os",v),()=>V.removeAttribute("data-os")},[s,h]),x.createElement(_e.Provider,{value:x.useMemo(()=>({appearance:l,accentColor:p,grayColor:i,resolvedGrayColor:f,material:a,panelBackground:u,radius:m,scaling:g,fontFamily:E,headingFontFamily:T,onAppearanceChange:H,onAccentColorChange:_,onGrayColorChange:$,onMaterialChange:R,onPanelBackgroundChange:z,onRadiusChange:F,onScalingChange:G,onFontFamilyChange:W,onHeadingFontFamilyChange:U}),[l,p,i,f,a,u,m,g,E,T,H,_,$,R,z,F,G,W,U])},x.createElement(oe,{"data-is-root-theme":s?"true":"false","data-accent-color":p,"data-gray-color":f,"data-has-background":w?"true":"false","data-material":a,"data-panel-background":u,"data-radius":m,"data-scaling":g,"data-font-family":E,"data-heading-font-family":T,ref:q,...ee,className:(0,kt.default)("radix-themes",{light:l==="light",dark:l==="dark"},ee.className)}))});Ye.displayName="ThemeImpl";var ce=B(require("react")),Ft=require("radix-ui");var So=["loud","medium","quiet"],Be={emphasis:{type:"enum",className:"rt-emphasis",values:So,default:void 0}};var Do=["normal","start","end","both"],Ne={trim:{type:"enum",className:"rt-r-lt",values:Do,responsive:!0}};var Eo=["left","center","right"],ze={align:{type:"enum",className:"rt-r-ta",values:Eo,responsive:!0}};var wo=["wrap","nowrap","pretty","balance"],Le={wrap:{type:"enum",className:"rt-r-tw",values:wo,responsive:!0}};var He={truncate:{type:"boolean",className:"rt-truncate"}};var ko=["sans","mono","serif"],Fe={font:{type:"enum",className:"rt-r-ff",values:ko}};var Mo=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],Ve={weight:{type:"enum",className:"rt-r-weight",values:Mo,responsive:!0}};var Bo=["h1","h2","h3","h4","h5","h6"],No=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Bt={as:{type:"enum",values:Bo,default:"h1"},...re,size:{type:"enum",className:"rt-r-size",values:No,default:"6",responsive:!0},...Fe,...Ve,...ze,...Ne,...He,...Le,...ke,...Be};var Ht=B(require("classnames"));var zo=[],Lo=new Set;function Ho(e){let t=Object.assign({},...e),o=[],n=[],s=new Set;for(let r in t){let l=t[r],p=l.values??zo,i={key:r,type:l.type,default:l.default,hasDefault:l.default!==void 0,responsive:"responsive"in l,className:l.className,customProperties:l.customProperties,parseValue:l.parseValue,values:p,valueSet:p.length>0?new Set(p):Lo,enumValueSet:l.type==="enum"?new Set([l.default,...p]):void 0};l.className?(o.push(i),s.add(r)):(i.hasDefault||l.type==="enum")&&n.push(i)}return{styling:o,passthrough:n,stylingKeys:s}}var Fo={children:new WeakMap};function Nt(e){let t=Fo;for(let o=0;o<e.length;o++){let n=e[o],s=t.children.get(n);s===void 0&&(s={children:new WeakMap},t.children.set(n,s)),t=s}return t.compiled??(t.compiled=Ho(e))}var Vo=["initial","xs","sm","md","lg","xl"],Xe=new Set(Vo);function Je(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Oo=new Set(["initial","xs","sm","md","lg","xl"]);function ie(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(Oo.has(t))return!0;return!1}function Oe(e,t,o){return t!==void 0?t.has(o):e.includes(o)}function Lt({className:e,customProperties:t,...o}){let n=Qe({allowArbitraryValues:!0,className:e,...o}),s=Ao({customProperties:t,...o});return[n,s]}function Qe({allowArbitraryValues:e,value:t,className:o,propValues:n,propValueSet:s,parseValue:r=l=>l}){if(t){if(typeof t=="string")return Oe(n,s,t)?zt(o,t,r):e?o:void 0;if(ie(t)){let l=t,p=[];for(let i in l){if(!Je(l,i)||!Xe.has(i))continue;let a=l[i];if(a!==void 0){if(Oe(n,s,a)){let u=zt(o,a,r),m=i==="initial"?u:`${i}:${u}`;p.push(m)}else if(e){let u=i==="initial"?o:`${i}:${o}`;p.push(u)}}}return p.length>0?p.join(" "):""}if(e)return o}}function zt(e,t,o){let n=e?"-":"",s=o(t),r=s?.startsWith("-"),l=r?"-":"",p=r?s?.substring(1):s;return`${l}${e}${n}${p}`}function Ao({customProperties:e,value:t,propValues:o,propValueSet:n,parseValue:s=r=>r}){if(!t||typeof t=="string"&&Oe(o,n,t))return;let r;if(typeof t=="string"){let l=s(t);r={};for(let p of e)r[p]=l;return r}if(ie(t)){let l=t;for(let p in l){if(!Je(l,p)||!Xe.has(p))continue;let i=l[p];if(i===void 0||Oe(o,n,i))continue;let a=s(i);r??(r={});for(let u of e){let m=p==="initial"?u:`${u}-${p}`;r[m]=a}}}return r??{}}function Ze(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function Io(e,t){let o=e.initial,n=!1;return t.hasDefault&&o===void 0&&(o=t.default,n=!0),t.enumValueSet!==void 0&&!t.enumValueSet.has(o)&&(o=t.default,n=!0),n?{...e,initial:o}:e}function le(e,...t){let{styling:o,passthrough:n,stylingKeys:s}=Nt(t),r={};for(let i in e)s.has(i)||(r[i]=e[i]);for(let i=0;i<n.length;i++){let a=n[i],u=r[a.key];if(u===void 0){a.hasDefault&&(r[a.key]=a.default);continue}a.enumValueSet!==void 0&&!a.enumValueSet.has(u)&&!ie(u)&&(r[a.key]=a.default)}let l,p=[];for(let i=0;i<o.length;i++){let a=o[i],u=e[a.key];if(u===void 0&&a.hasDefault&&(u=a.default),a.enumValueSet!==void 0&&!a.enumValueSet.has(u)&&!ie(u)&&(u=a.default),!!u){if(ie(u)){if(!a.responsive)continue;u=Io(u,a)}if(a.type==="enum"){let m=Qe({allowArbitraryValues:!1,value:u,className:a.className,propValues:a.values,propValueSet:a.valueSet,parseValue:a.parseValue});m&&p.push(m);continue}if(a.type==="string"||a.type==="enum | string"){let[m,g]=Lt({className:a.className,customProperties:a.customProperties,propValues:a.type==="string"?[]:a.values,propValueSet:a.type==="string"?void 0:a.valueSet,parseValue:a.parseValue,value:u});g&&(l=Ze(l,g)),m&&p.push(m);continue}if(a.type==="boolean"){p.push(a.className);continue}}}return r.className=(0,Ht.default)(p.length>0?p.join(" "):void 0,e.className),r.style=Ze(l,e.style),r}var pe=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9","-10","-11","-12"],Ae={m:{type:"enum | string",values:pe,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:pe,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:pe,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:pe,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:pe,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:pe,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:pe,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}};var Wo={...Bt,...Ae},et=ce.memo(ce.forwardRef((e,t)=>{let{children:o,className:n,asChild:s,as:r="h1",color:l,...p}=le(e,Wo),i=n?`rt-Heading ${n}`:"rt-Heading";return s?ce.createElement(Ft.Slot.Root,{"data-accent-color":l,...p,ref:t,className:i},o):ce.createElement(r,{"data-accent-color":l,...p,ref:t,className:i},o)}));et.displayName="Heading";var de=B(require("react")),Ot=require("radix-ui");var jo=["span","div","label","p"],Go=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Vt={as:{type:"enum",values:jo,default:"span"},...re,size:{type:"enum",className:"rt-r-size",values:Go,responsive:!0},...Fe,...Ve,...ze,...Ne,...He,...Le,...ke,...Be};var Ko={...Vt,...Ae},tt=de.memo(de.forwardRef((e,t)=>{let{children:o,className:n,asChild:s,as:r="span",color:l,...p}=le(e,Ko),i=n?`rt-Text ${n}`:"rt-Text";return s?de.createElement(Ot.Slot.Root,{"data-accent-color":l,...p,ref:t,className:i},o):de.createElement(r,{"data-accent-color":l,...p,ref:t,className:i},o)}));tt.displayName="Text";var Ie=B(require("react")),ot=e=>{if(!Ie.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${Ie.Children.toArray(e).map(o=>typeof o=="object"&&"type"in o&&typeof o.type=="string"?o.type:typeof o).join(", ")}`);return e};var At=B(require("react")),nt=!1;function It(){At.useEffect(()=>{if(typeof document>"u"||nt)return;nt=!0;let e=new Set,t=(u,m)=>{let g=setTimeout(()=>{e.delete(g),u()},m);e.add(g)},o=()=>{let u=!!document.querySelector('[role="dialog"][aria-modal="true"], [role="alertdialog"][aria-modal="true"]'),m=!!document.querySelector('[data-radix-popper-content-wrapper], [data-state="open"]');return u||m},n=()=>{document.body.style.pointerEvents==="none"&&(console.log("[KookieUI] Force cleaning stuck pointer-events: none from body"),document.body.style.pointerEvents="",document.body.removeAttribute("data-scroll-locked"),document.body.removeAttribute("data-remove-scroll"),document.body.classList.remove("ReactModal__Body--open"))},s=()=>{document.body.style.pointerEvents==="none"&&!o()&&(console.log("[KookieUI] Safe cleaning stuck pointer-events: none from body"),document.body.style.pointerEvents="")},r=u=>{let m=u.target;m&&!m.closest('[role="dialog"], [role="alertdialog"], [data-radix-popper-content-wrapper]')&&t(n,100)},l=u=>{u.key==="Escape"&&t(n,200)},p=()=>{t(s,50)};document.addEventListener("click",r,!0),document.addEventListener("keydown",l,!0),document.addEventListener("pointerup",p,!0),document.addEventListener("transitionend",p,!0),document.addEventListener("animationend",p,!0);let i=new MutationObserver(()=>{t(s,0)});i.observe(document.body,{childList:!0,subtree:!0,attributes:!0});let a=setInterval(()=>{document.body.style.pointerEvents==="none"&&!o()&&(console.log("[KookieUI] Periodic cleanup of stuck pointer-events"),document.body.style.pointerEvents="")},1e3);return t(s,100),()=>{clearInterval(a),e.forEach(clearTimeout),e.clear(),i.disconnect(),document.removeEventListener("click",r,!0),document.removeEventListener("keydown",l,!0),document.removeEventListener("pointerup",p,!0),document.removeEventListener("transitionend",p,!0),document.removeEventListener("animationend",p,!0),nt=!1}},[])}var rt=e=>P.createElement(te.Dialog.Root,{...e,modal:!0});rt.displayName="Sheet.Root";var $o=P.forwardRef(({children:e,...t},o)=>P.createElement(te.Dialog.Trigger,{...t,ref:o,asChild:!0},ot(e)));$o.displayName="Sheet.Trigger";var{align:jr,panelBackground:Uo,material:_o,...jt}=Ct,qo={panelBackground:Uo,material:_o},{default:Gr,...Yo}=jt.maxWidth,Xo={...jt,maxWidth:Yo},st=P.forwardRef((e,t)=>{let{side:o="start",forceMount:n,container:s,className:r,panelBackground:l,material:p,...i}=e,u={left:"start",right:"end",start:"start",end:"end",top:"top",bottom:"bottom"}[o],{panelBackground:m,material:g}=le({panelBackground:l,material:p},qo);we(l);let E=g??m,{className:T,...H}=le(i,Xo),_=P.useRef(null),$=P.useMemo(()=>R=>{_.current=R,typeof t=="function"?t(R):t&&(t.current=R)},[t]);return It(),P.useEffect(()=>{if(typeof window>"u")return;let R=_.current;if(!R)return;let z=R.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(z.length===0)return;let F=z[0],G=z[z.length-1],W=U=>{U.key==="Tab"&&(U.shiftKey?document.activeElement===F&&(U.preventDefault(),G.focus()):document.activeElement===G&&(U.preventDefault(),F.focus()))};return R.addEventListener("keydown",W),F.focus(),()=>{R.removeEventListener("keydown",W)}},[]),P.createElement(te.Dialog.Portal,{container:s,forceMount:n},P.createElement(qe,{asChild:!0},P.createElement(te.Dialog.Overlay,{className:"rt-BaseDialogOverlay rt-DialogOverlay rt-SheetOverlay"},P.createElement(te.Dialog.Content,{...H,ref:$,className:(0,Wt.default)("rt-BaseDialogContent","rt-SheetContent",r,T),"data-side":u,"data-material":E,"data-panel-background":E,tabIndex:-1,role:"dialog","aria-modal":"true"}))))});st.displayName="Sheet.Content";var at=P.forwardRef(({size:e="4",weight:t="medium",...o},n)=>P.createElement(te.Dialog.Title,{asChild:!0},P.createElement(et,{ref:n,size:e,weight:t,...o})));at.displayName="Sheet.Title";var Jo=P.forwardRef(({size:e="2",emphasis:t="medium",...o},n)=>P.createElement(te.Dialog.Description,{asChild:!0},P.createElement(tt,{ref:n,size:e,emphasis:t,...o})));Jo.displayName="Sheet.Description";var Qo=P.forwardRef(({children:e,...t},o)=>P.createElement(te.Dialog.Close,{...t,ref:o,asChild:!0},ot(e)));Qo.displayName="Sheet.Close";var it=require("radix-ui"),Gt=it.VisuallyHidden.Root,Kr=it.VisuallyHidden.Root;var D=B(require("react")),en=D.createContext(null);function lt(){let e=D.useContext(en);if(!e)throw new Error("Shell components must be used within <Shell.Root>");return e}var Ur=D.createContext(null);var _r=D.createContext(null);var qr=D.createContext(null);var Yr=D.createContext(null);var tn=D.createContext(null);function Kt(){let e=D.useContext(tn);if(!e)throw new Error("useBottomMode must be used within Shell.Root");return e}var on=D.createContext(null);function $t(){let e=D.useContext(on);if(!e)throw new Error("usePresentation must be used within Shell.Root");return e}var nn=D.createContext(null);function Ut(){let e=D.useContext(nn);if(!e)throw new Error("usePeek must be used within Shell.Root");return e}var rn=D.createContext(null);function _t(){let e=D.useContext(rn);if(!e)throw new Error("useShellActions must be used within Shell.Root");return e}var Xr=D.createContext(null);var sn=D.createContext(null);function qt(){let e=D.useContext(sn);if(!e)throw new Error("useInset must be used within Shell.Root");return e}var A=B(require("react"));var pt={xs:"(min-width: 520px)",sm:"(min-width: 768px)",md:"(min-width: 1024px)",lg:"(min-width: 1280px)",xl:"(min-width: 1640px)"};function Xt(e){let{currentBreakpoint:t}=lt();return A.useMemo(()=>{if(typeof e=="string")return e;if(e[t])return e[t];let n=[...Object.keys(pt)].reverse().concat("initial"),s=n.indexOf(t);for(let r=s+1;r<n.length;r++){let l=n[r];if(e[l])return e[l]}return"fixed"},[e,t])}function Yt(e){let{currentBreakpoint:t}=lt();return A.useMemo(()=>{if(e==null)return;if(typeof e!="object")return e;let o=e;if(o[t]!==void 0)return o[t];let s=[...Object.keys(pt)].reverse().concat("initial"),r=s.indexOf(t);for(let l=r+1;l<s.length;l++){let p=s[l];if(o[p]!==void 0)return o[p]}},[e,t])}function Jt({controlledValue:e,defaultValue:t,currentValue:o,setValue:n,breakpointReady:s,onInit:r,onResponsiveChange:l,controlledIsResponsive:p=!1}){let i=Yt(e),a=Yt(t),u=A.useRef(void 0),m=A.useRef(null),g=A.useRef(i),E=A.useRef(o),T=A.useRef(n);A.useLayoutEffect(()=>{g.current=i,E.current=o,T.current=n}),A.useEffect(()=>{if(i===void 0)return;let $=u.current!==i;if(u.current=i,o===i){m.current&&(clearTimeout(m.current),m.current=null),p&&l?.(i);return}if($){m.current&&(clearTimeout(m.current),m.current=null),n(i),p&&l?.(i);return}m.current||(m.current=setTimeout(()=>{m.current=null;let R=g.current,z=E.current;R!==void 0&&z!==R&&T.current(R)},0))},[i,o,n,l,p]),A.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]);let H=A.useRef(!1);return A.useEffect(()=>{H.current||s&&(typeof e<"u"||a!==void 0&&(H.current=!0,o!==a&&n(a),r?.(a)))},[s,e,a,o,n,r]),{resolvedControlled:i,resolvedDefault:a}}var We=B(require("react")),ct=We.createContext(null);function Qt(){let e=We.useContext(ct);if(!e)throw new Error("Shell.Handle must be used within a resizable pane");return e}var I=B(require("react")),Zt=B(require("classnames"));var ue=I.forwardRef(({className:e,children:t,...o},n)=>{let{containerRef:s,cssVarName:r,minSize:l,maxSize:p,defaultSize:i,orientation:a,edge:u,computeNext:m,onResize:g,onResizeStart:E,onResizeEnd:T,snapPoints:H,snapTolerance:_,collapseThreshold:$,collapsible:R,target:z,requestCollapse:F,requestToggle:G}=Qt(),W=I.useRef(null);I.useEffect(()=>()=>{try{W.current?.()}catch{}W.current=null},[]);let U=a,oe=`Resize ${z.charAt(0).toUpperCase()+z.slice(1)} pane`;return I.createElement("div",{...o,ref:n,className:(0,Zt.default)("rt-ShellResizer",e),"data-orientation":a,"data-edge":u,role:"slider","aria-label":oe,"aria-orientation":U,"aria-valuemin":l,"aria-valuemax":p,"aria-valuenow":i,tabIndex:0,onPointerDown:f=>{if(!s.current)return;f.preventDefault();let b=s.current,w=f.currentTarget,K=f.pointerId;try{W.current?.()}catch{}b.setAttribute("data-resizing","");try{w.setPointerCapture(K)}catch{}let q=a==="vertical"?f.clientX:f.clientY,h=parseFloat(getComputedStyle(b).getPropertyValue(r)||`${i}`),V=S=>Math.min(Math.max(S,l),p),v=document.body,k=v.style.cursor,Q=v.style.userSelect;v.style.cursor=a==="vertical"?"col-resize":"row-resize",v.style.userSelect="none",E?.(h);let se=null,ne=!1,Pe=(S,Y)=>{if(S.type===Y)ne=!0;else if(ne)return!1;return!0},j=S=>{if(!Pe(S,"pointermove")||S===se)return;se=S;let Y=a==="vertical"?S.clientX:S.clientY,J=V(m(Y,q,h));b.style.setProperty(r,`${J}px`),w.setAttribute("aria-valuenow",String(J)),g?.(J)},ge=()=>{try{w.releasePointerCapture(K)}catch{}window.removeEventListener("pointermove",j),document.removeEventListener("pointermove",j),window.removeEventListener("mousemove",j),document.removeEventListener("mousemove",j),w.removeEventListener("pointermove",j),window.removeEventListener("pointerup",O),document.removeEventListener("pointerup",O),window.removeEventListener("mouseup",O),document.removeEventListener("mouseup",O),window.removeEventListener("pointercancel",O),document.removeEventListener("pointercancel",O),window.removeEventListener("keydown",he),w.removeEventListener("lostpointercapture",O),b.removeAttribute("data-resizing"),v.style.cursor=k,v.style.userSelect=Q,W.current=null},X=!1,O=()=>{if(X)return;X=!0;let S=parseFloat(getComputedStyle(b).getPropertyValue(r)||`${i}`),Y=S;if(H&&H.length){let J=H.reduce((me,be)=>Math.abs(be-S)<Math.abs(me-S)?be:me,H[0]);Math.abs(J-S)<=(_??8)&&(Y=J,b.style.setProperty(r,`${Y}px`),w.setAttribute("aria-valuenow",String(Y)),g?.(Y))}R&&typeof $=="number"&&S<=$&&F?.(),T?.(Y),ge()},he=S=>{S.key==="Escape"&&(b.style.setProperty(r,`${h}px`),w.setAttribute("aria-valuenow",String(h)),T?.(h),ge())};window.addEventListener("pointermove",j),document.addEventListener("pointermove",j),window.addEventListener("mousemove",j),document.addEventListener("mousemove",j),w.addEventListener("pointermove",j),window.addEventListener("pointerup",O),document.addEventListener("pointerup",O),window.addEventListener("mouseup",O),document.addEventListener("mouseup",O),window.addEventListener("pointercancel",O),document.addEventListener("pointercancel",O),window.addEventListener("keydown",he),w.addEventListener("lostpointercapture",O),W.current=ge},onDoubleClick:()=>{R&&G?.()},onKeyDown:f=>{if(!s.current)return;let b=s.current,w=getComputedStyle(b).getPropertyValue(r),K=Number.parseFloat(w.trim()),q=Number.isFinite(K)?K:i,h=k=>Math.min(Math.max(k,l),p),V=f.shiftKey?32:8,v=0;if(a==="vertical"){let k=typeof document<"u"?document.dir:void 0,Q=getComputedStyle(b).direction,se=!!(b.closest&&b.closest('[dir="rtl"]')),ne=k==="rtl"||Q==="rtl"||se;f.key==="ArrowRight"?v=ne?-V:V:f.key==="ArrowLeft"&&(v=ne?V:-V)}else f.key==="ArrowDown"?v=V:f.key==="ArrowUp"&&(v=-V);if(f.key==="Home"){f.preventDefault(),E?.(q);let k=h(l);b.style.setProperty(r,`${k}px`),f.currentTarget.setAttribute("aria-valuenow",String(k)),g?.(k),T?.(k);return}if(f.key==="End"){f.preventDefault(),E?.(q);let k=h(p);b.style.setProperty(r,`${k}px`),f.currentTarget.setAttribute("aria-valuenow",String(k)),g?.(k),T?.(k);return}if(v!==0){f.preventDefault(),E?.(q);let k=a==="vertical"&&u==="start"?-v:v,Q=h(q+k);b.style.setProperty(r,`${Q}px`),f.currentTarget.setAttribute("aria-valuenow",String(Q)),g?.(Q),T?.(Q)}}},t)});ue.displayName="Shell.Handle";var an=I.forwardRef((e,t)=>I.createElement(ue,{...e,ref:t}));an.displayName="Shell.Panel.Handle";var ln=I.forwardRef((e,t)=>I.createElement(ue,{...e,ref:t}));ln.displayName="Shell.Sidebar.Handle";var pn=I.forwardRef((e,t)=>I.createElement(ue,{...e,ref:t}));pn.displayName="Shell.Inspector.Handle";var Re=I.forwardRef((e,t)=>I.createElement(ue,{...e,ref:t}));Re.displayName="Shell.Bottom.Handle";function cn(e,t){let o=new Set(t),n={};return Object.keys(e).forEach(s=>{o.has(s)||(n[s]=e[s])}),n}var eo=["presentation","expandedSize","minSize","maxSize","resizable","collapsible","onExpand","onCollapse","onResize","resizer","onResizeStart","onResizeEnd","snapPoints","snapTolerance","collapseThreshold","paneId","persistence","inset"];function to(e,t){let o=t?[...eo,...t]:[...eo];return cn(e,o)}function dt(e){if(e!=null){if(typeof e=="object"){let t={};return Object.entries(e).forEach(([o,n])=>{typeof n=="boolean"&&(t[o]=n?"expanded":"collapsed")}),t}return e?"expanded":"collapsed"}}function oo(e,t="horizontal"){if(e==null)return;if(typeof e=="number"&&Number.isFinite(e))return e;let o=String(e).trim();if(!o)return;if(o.endsWith("px"))return Number.parseFloat(o);if(o.endsWith("rem")){let s=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16")||16;return Number.parseFloat(o)*s}if(o.endsWith("%")){let s=Number.parseFloat(o),r=t==="horizontal"?document.documentElement.clientWidth||window.innerWidth||0:document.documentElement.clientHeight||window.innerHeight||0;return s/100*r}let n=Number.parseFloat(o);return Number.isFinite(n)?n:void 0}var dn=["className","children","defaultOpen","open","onOpenChange","size","defaultSize","onSizeChange","sizeUpdate","sizeUpdateMs","style","inset"],ut=d.forwardRef((e,t)=>{let{className:o,presentation:n="fixed",defaultOpen:s,open:r,onOpenChange:l,expandedSize:p=200,minSize:i=100,maxSize:a=400,resizable:u=!1,collapsible:m=!0,onExpand:g,onCollapse:E,onResize:T,onResizeStart:H,onResizeEnd:_,snapPoints:$,snapTolerance:R,collapseThreshold:z,paneId:F,persistence:G,children:W,style:U,size:ee,defaultSize:oe,onSizeChange:f,sizeUpdate:b,sizeUpdateMs:w=50,inset:K}=e,q=to(e,dn),{bottomMode:h,setBottomMode:V}=Kt(),{currentBreakpointReady:v}=$t(),{peekTarget:k}=Ut(),{togglePane:Q}=_t(),{registerInset:se,unregisterInset:ne}=qt();d.useLayoutEffect(()=>{if(K)return se("bottom"),()=>ne("bottom")},[K,se,ne]);let Pe=Xt(n),j=Pe==="overlay",ge=Pe==="stacked",X=d.useRef(null),O=d.useCallback(c=>{X.current=c,typeof t=="function"?t(c):t&&(t.current=c)},[t]),he=d.Children.toArray(W),S=he.filter(c=>d.isValidElement(c)&&c.type===Re),Y=he.filter(c=>!(d.isValidElement(c)&&c.type===Re)),J=d.useRef(l),me=d.useRef(r);d.useLayoutEffect(()=>{J.current=l,me.current=r});let be=d.useMemo(()=>dt(r),[r]),ro=d.useMemo(()=>dt(s),[s]),so=typeof r=="object"&&r!==null,{resolvedControlled:ve}=Jt({controlledValue:be,defaultValue:ro,currentValue:h,setValue:V,breakpointReady:v,controlledIsResponsive:so,onResponsiveChange:c=>J.current?.(c==="expanded",{reason:"responsive"}),onInit:c=>{typeof me.current>"u"&&J.current?.(c==="expanded",{reason:"init"})}}),ae=d.useRef(null);d.useEffect(()=>()=>{ae.current&&(clearTimeout(ae.current),ae.current=null)},[f,b,w]);let Ce=d.useMemo(()=>{let c=f,M=b,L=w??50;if(!c)return()=>{};if(M==="debounce")return(C,fe)=>{ae.current&&clearTimeout(ae.current),ae.current=setTimeout(()=>{c(C,fe),ae.current=null},L)};if(M==="throttle"){let C=0;return(fe,ht)=>{let vt=Date.now();vt-C>=L&&(C=vt,c(fe,ht))}}return(C,fe)=>c(C,fe)},[f,b,w]),xe=d.useRef(null);d.useEffect(()=>{let c=typeof r<"u";if(xe.current===null){xe.current=c;return}xe.current!==c&&(console.warn("Shell.Bottom: Switching between controlled and uncontrolled `open` is not supported."),xe.current=c)},[r]);let mt=d.useRef(null),ft=d.useRef(void 0);d.useEffect(()=>{let c=mt.current,L=ft.current!==ve;if(c!==null&&c!==h){let C=h==="expanded";(!(typeof me.current<"u")||!L&&C!==(ve===void 0?void 0:ve==="expanded"))&&J.current?.(C,{reason:"toggle"})}mt.current=h,ft.current=ve},[h,ve]);let yt=d.useRef(g),Pt=d.useRef(E);d.useLayoutEffect(()=>{yt.current=g,Pt.current=E});let Te=d.useRef(null),gt=d.useRef(!1);d.useEffect(()=>{let c=h;if(!v){Te.current=c;return}if(!gt.current){gt.current=!0,Te.current=c;return}let M=Te.current;M!==null&&M!==c&&(c==="expanded"?yt.current?.():c==="collapsed"&&Pt.current?.(),Te.current=c)},[h,v]);let je=h==="expanded",Se=d.useMemo(()=>{if(!F||G)return G;let c=`kookie-ui:shell:bottom:${F}`;return{load:()=>{if(!(typeof window>"u"))try{let L=window.localStorage.getItem(c);return L?Number(L):void 0}catch{return}},save:L=>{if(!(typeof window>"u"))try{window.localStorage.setItem(c,String(L))}catch{}}}},[F,G]);d.useEffect(()=>{let c=!0;if(!u||!Se?.load||j)return;let M=Se.load(),L=C=>{!c||typeof C!="number"||!X.current||(X.current.style.setProperty("--bottom-size",`${C}px`),T?.(C))};return M instanceof Promise?M.then(L).catch(C=>{}):L(M),()=>{c=!1}},[u,Se,T,j]);let ao=u&&!j&&je?d.createElement(ct.Provider,{value:{containerRef:X,cssVarName:"--bottom-size",minSize:i,maxSize:a,defaultSize:p,orientation:"horizontal",edge:"start",computeNext:(c,M,L)=>{let C=c-M;return L-C},onResize:T,onResizeStart:H,onResizeEnd:c=>{_?.(c),Ce(c,{reason:"resize"}),Se?.save?.(c)},target:"bottom",collapsible:m,snapPoints:$,snapTolerance:R??8,collapseThreshold:z,requestCollapse:()=>V("collapsed"),requestToggle:()=>Q("bottom")}},S.length>0?S.map((c,M)=>d.cloneElement(c,{key:c.key??M})):d.createElement(ue,null)):null,Ge=d.useCallback(c=>oo(c,"vertical"),[]);d.useEffect(()=>{if(X.current&&typeof ee>"u"&&typeof oe<"u"){let c=Ge(oe);if(typeof c=="number"&&Number.isFinite(c)){let C=Math.min((typeof a=="number"?a:void 0)??c,Math.max((typeof i=="number"?i:void 0)??c,c));X.current.style.setProperty("--bottom-size",`${C}px`),Ce(C,{reason:"init"})}}},[]);let Ke=ee;return d.useEffect(()=>{if(!X.current||typeof Ke>"u")return;let c=Ge(Ke);if(typeof c=="number"&&Number.isFinite(c)){let C=Math.min((typeof a=="number"?a:void 0)??c,Math.max((typeof i=="number"?i:void 0)??c,c));X.current.style.setProperty("--bottom-size",`${C}px`),Ce(C,{reason:"controlled"})}},[Ke,i,a,Ge,Ce]),j?d.createElement(rt,{open:h==="expanded",onOpenChange:M=>V(M?"expanded":"collapsed")},d.createElement(st,{side:"bottom",style:{padding:0},"aria-label":"Bottom panel","aria-describedby":void 0,height:{initial:`${p}px`}},d.createElement(Gt,null,d.createElement(at,null,"Bottom panel")),Y)):d.createElement("div",{...q,ref:O,className:(0,no.default)("rt-ShellBottom",o),"data-mode":h,"data-peek":k==="bottom"||void 0,"data-presentation":v?Pe:void 0,"data-open":v&&ge&&je||void 0,"data-inset":K||void 0,style:{...U,"--bottom-size":`${p}px`,"--bottom-min-size":`${i}px`,"--bottom-max-size":`${a}px`}},d.createElement("div",{className:"rt-ShellBottomContent","data-visible":je||void 0},Y),ao)});ut.displayName="Shell.Bottom";ut.Handle=Re;
1
+ "use strict";"use client";var at=Object.create;var ce=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var st=Object.getOwnPropertyNames;var lt=Object.getPrototypeOf,ut=Object.prototype.hasOwnProperty;var ct=(e,t)=>{for(var n in t)ce(e,n,{get:t[n],enumerable:!0})},Me=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of st(t))!ut.call(e,r)&&r!==n&&ce(e,r,{get:()=>t[r],enumerable:!(o=it(t,r))||o.enumerable});return e};var J=(e,t,n)=>(n=e!=null?at(lt(e)):{},Me(t||!e||!e.__esModule?ce(n,"default",{value:e,enumerable:!0}):n,e)),dt=e=>Me(ce({},"__esModule",{value:!0}),e);var Ct={};ct(Ct,{Bottom:()=>Ce});module.exports=dt(Ct);var q=J(require("react")),et=J(require("classnames")),tt=require("radix-ui/internal");var de=J(require("react")),ge=de.createContext(null);function Ie(){let e=de.useContext(ge);if(!e)throw new Error("Shell.Handle must be used within a resizable pane");return e}var R=J(require("react")),Oe=J(require("classnames"));var ee=R.forwardRef(({className:e,children:t,...n},o)=>{let{containerRef:r,controls:p,cssVarName:b,minSize:V,maxSize:w,defaultSize:E,orientation:P,edge:A,growth:g,onResize:T,onResizeStart:Y,onResizeEnd:M,snapPoints:L,snapTolerance:v,collapseThreshold:I,collapsible:N,target:D,requestCollapse:j,requestToggle:O}=Ie(),B=R.useRef(null),_=R.useCallback(i=>{B.current=i,typeof o=="function"?o(i):o&&(o.current=i)},[o]),a=R.useRef(null);R.useEffect(()=>()=>{a.current?.(),a.current=null},[]);let u=R.useCallback(()=>{let i=r.current;if(!i)return E;let c=Number.parseFloat(getComputedStyle(i).getPropertyValue(b));return Number.isFinite(c)?c:E},[r,b,E]),y=R.useCallback(()=>{let i=r.current,c=B.current,f=i?.closest(".rt-ShellRoot")?.getBoundingClientRect();if(!i||!f||!c)return w;let h=i.getBoundingClientRect(),k=c.getBoundingClientRect(),C=g(getComputedStyle(i).direction==="rtl"),m;P==="vertical"?m=C>0?f.right-h.left:h.right-f.left:m=C>0?f.bottom-h.top:h.bottom-f.top;let W=P==="vertical"?k.width:k.height;return!(f.width>0&&f.height>0)||!Number.isFinite(m)?w:Math.max(V,Math.min(w,Math.round(m-W)))},[r,g,w,V,P]),S=()=>{B.current?.setAttribute("aria-valuemax",String(y()))};R.useLayoutEffect(()=>{B.current?.setAttribute("aria-valuenow",String(Math.round(u())))},[u]);let x=(i,c)=>{i.style.setProperty(b,`${c}px`),B.current?.setAttribute("aria-valuenow",String(Math.round(c)))},K=D.charAt(0).toUpperCase()+D.slice(1);return R.createElement("div",{ref:_,className:(0,Oe.default)("rt-ShellResizer",e),"data-orientation":P,"data-edge":A,role:"separator",tabIndex:0,"aria-label":`Resize ${K} pane`,"aria-controls":p,"aria-orientation":P,"aria-valuemin":V,"aria-valuemax":w,...n,onPointerDown:i=>{n.onPointerDown?.(i);let c=r.current;if(!c||i.defaultPrevented||i.button!==0)return;i.preventDefault();let f=i.currentTarget,h=i.pointerId;a.current?.();try{f.setPointerCapture(h)}catch{}let k=getComputedStyle(c),C=Number.parseFloat(k.getPropertyValue(b)),m=Number.isFinite(C)?C:E,W=P==="vertical"?i.clientX:i.clientY,s=g(k.direction==="rtl"),$=y();f.setAttribute("aria-valuemax",String($));let Q=z=>Math.min(Math.max(z,V),$);c.setAttribute("data-resizing",""),f.setAttribute("data-dragging","");let G=document.body,nt=G.style.cursor,ot=G.style.userSelect;G.style.cursor=P==="vertical"?"col-resize":"row-resize",G.style.userSelect="none",Y?.(m);let Z=m,he=m,U=0,re=null,Te=()=>{if(U=0,re===null)return;let z=re;re=null,T?.(z)},Le=null,ke=!1,rt=(z,ne)=>{if(z.type===ne)ke=!0;else if(ke)return!1;return!0},X=z=>{if(!rt(z,"pointermove")||z===Le)return;Le=z;let ne=P==="vertical"?z.clientX:z.clientY;he=m+(ne-W)*s,Z=Q(he),x(c,Z),re=Z,U||(U=requestAnimationFrame(Te))},ue=()=>{U&&cancelAnimationFrame(U),U=0;try{f.releasePointerCapture(h)}catch{}window.removeEventListener("pointermove",X),document.removeEventListener("pointermove",X),window.removeEventListener("mousemove",X),document.removeEventListener("mousemove",X),f.removeEventListener("pointermove",X),window.removeEventListener("pointerup",H),document.removeEventListener("pointerup",H),window.removeEventListener("mouseup",H),document.removeEventListener("mouseup",H),window.removeEventListener("pointercancel",H),document.removeEventListener("pointercancel",H),window.removeEventListener("keydown",Ve),f.removeEventListener("lostpointercapture",H),c.removeAttribute("data-resizing"),f.removeAttribute("data-dragging"),G.style.cursor=nt,G.style.userSelect=ot,a.current=null},Re=!1,H=()=>{if(Re)return;if(Re=!0,U&&cancelAnimationFrame(U),Te(),N&&typeof I=="number"&&he<=I){x(c,m),T?.(m),ue(),j?.(),M?.(m);return}let z=Z;if(L&&L.length){let ne=L.reduce((Ne,Be)=>Math.abs(Be-Z)<Math.abs(Ne-Z)?Be:Ne,L[0]);Math.abs(ne-Z)<=v&&(z=Q(ne),x(c,z),T?.(z))}M?.(z),ue()},Ve=z=>{z.key==="Escape"&&(U&&cancelAnimationFrame(U),U=0,re=null,x(c,m),T?.(m),Re=!0,M?.(m),ue())};window.addEventListener("pointermove",X),document.addEventListener("pointermove",X),window.addEventListener("mousemove",X),document.addEventListener("mousemove",X),f.addEventListener("pointermove",X),window.addEventListener("pointerup",H),document.addEventListener("pointerup",H),window.addEventListener("mouseup",H),document.addEventListener("mouseup",H),window.addEventListener("pointercancel",H),document.addEventListener("pointercancel",H),window.addEventListener("keydown",Ve),f.addEventListener("lostpointercapture",H),a.current=ue},onDoubleClick:i=>{n.onDoubleClick?.(i),!i.defaultPrevented&&N&&O?.()},onFocus:i=>{n.onFocus?.(i),S()},onKeyDown:i=>{n.onKeyDown?.(i);let c=r.current;if(!c||i.defaultPrevented)return;let f=u(),h=y(),k=m=>Math.min(Math.max(m,V),h),C;if(i.key==="Home")C=k(V);else if(i.key==="End")C=k(h);else{let m=P==="vertical"?i.key==="ArrowRight"?1:i.key==="ArrowLeft"?-1:0:i.key==="ArrowDown"?1:i.key==="ArrowUp"?-1:0;if(m===0)return;let W=i.shiftKey?32:8;C=k(f+m*W*g(getComputedStyle(c).direction==="rtl"))}i.preventDefault(),Y?.(f),x(c,C),T?.(C),M?.(C)}},t)});ee.displayName="Shell.Handle";var pt=R.forwardRef((e,t)=>R.createElement(ee,{...e,ref:t}));pt.displayName="Shell.Panel.Handle";var ft=R.forwardRef((e,t)=>R.createElement(ee,{...e,ref:t}));ft.displayName="Shell.Sidebar.Handle";var mt=R.forwardRef((e,t)=>R.createElement(ee,{...e,ref:t}));mt.displayName="Shell.Inspector.Handle";var pe=R.forwardRef((e,t)=>R.createElement(ee,{...e,ref:t}));pe.displayName="Shell.Bottom.Handle";var d=J(require("react"));var ie=J(require("react"));var He={xs:"(min-width: 520px)",sm:"(min-width: 768px)",md:"(min-width: 1024px)",lg:"(min-width: 1280px)",xl:"(min-width: 1640px)"},fe=["initial","xs","sm","md","lg","xl"];var bt=Object.entries(He),ve=null,ae=new Set,te=null;function Pe(){return ve??(ve=bt.map(([e,t])=>[e,window.matchMedia(t)])),ve}function be(){let e="initial";for(let[t,n]of Pe())n.matches&&(e=t);return e}function me(){let e=be();e!==te&&(te=e,ae.forEach(t=>t()))}function Ae(e){if(typeof window>"u")return()=>{};if(ae.size===0){te=be();for(let[,t]of Pe())typeof t.addEventListener=="function"?t.addEventListener("change",me):t.addListener?.(me)}return ae.add(e),()=>{if(ae.delete(e),!(ae.size>0)){for(let[,t]of Pe())try{typeof t.removeEventListener=="function"?t.removeEventListener("change",me):t.removeListener?.(me)}catch{}te=null}}}function ht(){return typeof window>"u"?"initial":(te??(te=be()),te)}function Rt(){return"initial"}function se(){return typeof window>"u"?"initial":be()}var gt=()=>!0,vt=()=>!1,De=()=>()=>{},Pt=()=>"initial";function $e(e=!0){let t=ie.useSyncExternalStore(e?Ae:De,e?ht:Pt,Rt),n=ie.useSyncExternalStore(e?Ae:De,gt,vt);return ie.useMemo(()=>({breakpoint:t,ready:n}),[t,n])}var F=J(require("react"));function Fe(e){return typeof e=="object"&&e!==null}function le(e,t){let n={},o=null;for(let r of fe){if(e!==void 0&&!Fe(e)){n[r]=e;continue}let p=Fe(e)?e[r]:void 0;p!==void 0&&(o={value:p}),n[r]=o?o.value:t(r)}return n}function oe(e){let t=e.initial;return fe.every(n=>e[n]===t)?t:void 0}function ye(e,t){let n=oe(t);if(n!==void 0)return{[`data-${e}`]:n};let o={};for(let r of fe)o[`data-${e}-${r}`]=t[r];return o}function Se(e){return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}var Ot=le("fixed",()=>"fixed");function xe(e){e.version+=1;for(let t of e.listeners)t()}function yt(e,t){return e.listeners.add(t),()=>{e.listeners.delete(t)}}var St=F.createContext(null);function je(e){let t=F.useContext(St);if(!t)throw new Error(`${e} must be used within <Shell.Root>`);return t}function Ue(e,t){let n=F.useCallback(o=>yt(e,o),[e]);return F.useSyncExternalStore(n,()=>e.peek===t,()=>!1)}var xt=F.createContext(null);function qe(e,t){let n=F.useContext(xt);if(!n)throw new Error("Shell panes must be used within <Shell.Root>");let{registerInset:o,unregisterInset:r}=n;F.useLayoutEffect(()=>{if(t)return o(e),()=>r(e)},[e,t,o,r])}var Ee=e=>typeof e=="object"&&e!==null;function zt(e){for(let t of["initial","xs","sm","md","lg","xl"]){let n=e[t];if(n!==void 0)return n}return"closed"}function _e(e){let{name:t,label:n,propNames:o,presentationTable:r,builtIn:p}=e,b=je(`Shell.${n}`),V=d.useId(),w=e.id??`shell-${t}${V}`,E=e.controlled!==void 0,P=Ee(e.controlled);P&&(`${n}${o.controlled}${o.default}`,void 0);let A=P?e.controlled:void 0,g=A??(Ee(e.defaultValue)?e.defaultValue:void 0),T=Se(g),[Y,M]=d.useState(()=>typeof e.defaultValue=="string"?e.defaultValue:"auto"),L=d.useMemo(()=>A?le(A,()=>zt(A)):le(g,s=>p(r[s])),[T,P,r,p]),v=Y;E&&(v=A?"auto":e.controlled);let I=oe(r)===void 0||v==="auto"&&oe(L)===void 0,{breakpoint:N,ready:D}=$e(I),j=s=>{let $=oe(s);return $!==void 0?$:D?s[N]:void 0},O=v==="auto"?j(L):v,B=j(r),_=B==="overlay",a=O===void 0?void 0:O!=="closed",u=a===!0&&_,y=e.defaultValue,S=d.useRef({state:v,value:O,autoTable:L,defaultValue:y,controlled:E,onChange:e.onChange,toggleNext:e.toggleNext});d.useLayoutEffect(()=>{S.current={state:v,value:O,autoTable:L,defaultValue:y,controlled:E,onChange:e.onChange,toggleNext:e.toggleNext}});let x=d.useCallback(()=>{let s=S.current;return s.value!==void 0?s.value:s.state==="auto"?s.autoTable[se()]:void 0},[]),K=d.useCallback(()=>{let s=S.current;return typeof s.defaultValue=="string"?s.defaultValue:Ee(s.defaultValue)?s.autoTable[se()]:void 0},[]),i=d.useCallback((s,$)=>{let Q=S.current;x()!==s&&(Q.onChange?.(s,$),Q.controlled||M(s))},[x]),c=d.useCallback(s=>{let $=S.current,Q=x()??"closed",G=$.toggleNext?$.toggleNext(Q,K()):Q==="closed"?"open":"closed";i(G,s)},[i,x,K]),f=d.useRef(null),h=d.useCallback(s=>{f.current=s},[]);d.useLayoutEffect(()=>{let s={name:t,id:w,el:f.current,value:O,presentation:B,presentationTable:r,overlayLive:u,size:e.size,setValue:i,toggle:c};return b.entries.set(t,s),xe(b),()=>{b.entries.get(t)===s&&(b.entries.delete(t),xe(b))}},[b,t,w,O,B,r,u,e.size,i,c]);let k=d.useRef({onExpand:e.onExpand,onCollapse:e.onCollapse});d.useLayoutEffect(()=>{k.current={onExpand:e.onExpand,onCollapse:e.onCollapse}});let C=d.useRef({state:v,shown:a});d.useEffect(()=>{let s=C.current;s.state!==v&&s.shown!==void 0&&a!==void 0&&s.shown!==a&&(a?k.current.onExpand?.():k.current.onCollapse?.()),C.current={state:v,shown:a}},[v,a]),d.useLayoutEffect(()=>{},[]);let m=d.useRef(E);d.useEffect(()=>{},[E,n,o.controlled]);let W=Ue(b,t)&&a===!1&&!_;return{store:b,id:w,state:v,value:O,shown:a,presentation:B,overlaying:_,overlayLive:u,peeking:W,ready:D,breakpoint:N,autoTable:L,setValue:i,toggle:c,defaultHereNow:K,setElement:h}}function Ke(e,t){let{state:n,value:o,presentation:r,shown:p}=e;return{...t,"data-state":n==="thin"?"open":n,"data-thin":n==="thin"?"":void 0,...n==="auto"?ye("auto",e.autoTable):{},"data-presentation":r,"data-mode":o===void 0?void 0:o==="closed"?"collapsed":o==="thin"?"thin":"expanded","data-open":r==="stacked"&&p?"":void 0,"data-peek":e.peeking?"":void 0}}function We(e,t){let n=Se(e),o=d.useMemo(()=>le(e,()=>t),[n,t]),r=d.useMemo(()=>oe(o)===void 0?ye("presentation",o):{},[o]);return{table:o,attributes:r}}var l=J(require("react"));function Qe(e,t="horizontal"){if(e==null)return;if(typeof e=="number"&&Number.isFinite(e))return e;let n=String(e).trim();if(!n)return;if(n.endsWith("px"))return Number.parseFloat(n);if(n.endsWith("rem")){let r=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16")||16;return Number.parseFloat(n)*r}if(n.endsWith("%")){let r=Number.parseFloat(n),p=t==="horizontal"?document.documentElement.clientWidth||window.innerWidth||0:document.documentElement.clientHeight||window.innerHeight||0;return r/100*p}let o=Number.parseFloat(n);return Number.isFinite(o)?o:void 0}var ze=(e,t,n)=>Math.max(t??e,Math.min(n??e,e));function Ge(e){let{name:t,elementRef:n,cssVarName:o,orientation:r,minSize:p,maxSize:b,resizable:V,size:w,defaultSize:E,paneId:P,persistence:A}=e,g=l.useRef(e);l.useLayoutEffect(()=>{g.current=e});let T=l.useRef(null),Y=l.useRef(0);l.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]);let M=l.useCallback((a,u)=>{let{onSizeChange:y,sizeUpdate:S,sizeUpdateMs:x}=g.current;if(y){if(S==="debounce"){T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{T.current=null,g.current.onSizeChange?.(a,u)},x);return}if(S==="throttle"){let K=Date.now();if(K-Y.current<x)return;Y.current=K}y(a,u)}},[]),L=l.useCallback(a=>Qe(a,r==="vertical"?"horizontal":"vertical"),[r]),v=l.useRef(!1),I=l.useCallback((a,u)=>{let y=n.current;if(y){y.style.setProperty(o,`${a}px`);for(let S of y.querySelectorAll(":scope > .rt-ShellResizer"))S.setAttribute("aria-valuenow",String(Math.round(a)));u&&(v.current=!0)}},[n,o]);l.useLayoutEffect(()=>{v.current||I(e.expandedSize,!1)},[e.expandedSize,I]),l.useLayoutEffect(()=>{if(w!==void 0||E===void 0)return;let a=L(E);if(typeof a!="number"||!Number.isFinite(a))return;let u=ze(a,p,b);I(u,!0),M(u,{reason:"init"})},[]),l.useLayoutEffect(()=>{if(w===void 0||g.current.overlayingNow())return;let a=L(w);if(typeof a!="number"||!Number.isFinite(a))return;let u=ze(a,p,b);I(u,!0),M(u,{reason:"controlled"})},[w,p,b,e.overlaying,L,I,M]);let N=l.useMemo(()=>{if(!P||A)return A;let a=`kookie-ui:shell:${t}:${P}`;return{load:()=>{if(!(typeof window>"u"))try{let u=window.localStorage.getItem(a);return u?Number(u):void 0}catch{return}},save:u=>{if(!(typeof window>"u"))try{window.localStorage.setItem(a,String(u))}catch{}}}},[t,P,A]);l.useLayoutEffect(()=>{if(!V||!N?.load||g.current.overlayingNow())return;let a=!0,u=S=>{if(!a||typeof S!="number"||!Number.isFinite(S))return;let x=ze(S,p,b);I(x,!0),g.current.onResize?.(x)},y=N.load();return y instanceof Promise?y.then(u).catch(S=>{}):u(y),()=>{a=!1}},[V,N,e.overlaying,I,p,b,t]);let D=l.useCallback(a=>g.current.onResize?.(a),[]),j=l.useCallback(a=>{v.current=!0,g.current.onResizeStart?.(a)},[]),O=l.useCallback(a=>{g.current.onResizeEnd?.(a),M(a,{reason:"resize"}),N?.save?.(a)},[M,N]),B=l.useCallback(()=>g.current.requestCollapse(),[]),_=l.useCallback(()=>g.current.requestToggle(),[]);return l.useMemo(()=>({containerRef:n,controls:e.elementId,cssVarName:o,minSize:p,maxSize:b,defaultSize:e.expandedSize,orientation:r,edge:e.edge,growth:e.growth,onResize:D,onResizeStart:j,onResizeEnd:O,target:t,collapsible:e.collapsible,snapPoints:e.snapPoints,snapTolerance:e.snapTolerance??8,collapseThreshold:e.collapseThreshold,requestCollapse:B,requestToggle:_}),[n,e.elementId,o,p,b,e.expandedSize,r,e.edge,e.growth,D,j,O,t,e.collapsible,e.snapPoints,e.snapTolerance,e.collapseThreshold,B,_])}function Xe(e,t){let n=l.Children.toArray(e),o=n.filter(p=>l.isValidElement(p)&&p.type===t),r=n.filter(p=>!(l.isValidElement(p)&&p.type===t));return{handles:o,content:r}}function we(e){if(e===void 0)return;if(typeof e=="boolean")return e?"open":"closed";let t={};for(let[n,o]of Object.entries(e))typeof o=="boolean"&&(t[n]=o?"open":"closed");return t}var Ye=()=>"closed";var Je=()=>-1;function Ze(e){if(!("height"in e)&&!("resizer"in e))return e;let{height:t,resizer:n,...o}=e;return o}var wt={controlled:"open",default:"defaultOpen"},Ce=q.forwardRef((e,t)=>{let{className:n,presentation:o="fixed",defaultOpen:r,open:p,onOpenChange:b,expandedSize:V=200,minSize:w=100,maxSize:E=400,resizable:P=!1,collapsible:A=!0,onExpand:g,onCollapse:T,onResize:Y,onResizeStart:M,onResizeEnd:L,snapPoints:v,snapTolerance:I,collapseThreshold:N,paneId:D,persistence:j,children:O,style:B,size:_,defaultSize:a,onSizeChange:u,sizeUpdate:y,sizeUpdateMs:S=50,inset:x,id:K,...i}=e,{table:c,attributes:f}=We(o,"fixed"),h=_e({name:"bottom",label:"Bottom",propNames:wt,id:K,controlled:we(p),defaultValue:we(r),presentationTable:c,builtIn:Ye,onChange:(Q,G)=>b?.(Q!=="closed",{reason:G}),onExpand:g,onCollapse:T,size:V});qe("bottom",x),q.useEffect(()=>{(v!==void 0||N!==void 0||D!==void 0||j!==void 0)&&void 0},[v,N,D,j]);let k=q.useRef(null),C=(0,tt.useComposedRefs)(t,h.setElement,k),m=Ge({name:"bottom",elementId:h.id,elementRef:k,cssVarName:"--bottom-size",orientation:"horizontal",edge:"start",growth:Je,expandedSize:V,minSize:w,maxSize:E,resizable:P,collapsible:A,size:_,defaultSize:a,onSizeChange:u,sizeUpdate:y,sizeUpdateMs:S,onResize:Y,onResizeStart:M,onResizeEnd:L,snapPoints:v,snapTolerance:I,collapseThreshold:N,paneId:D,persistence:j,overlaying:h.overlaying,overlayingNow:()=>c[se()]==="overlay",requestCollapse:()=>h.setValue("closed","toggle"),requestToggle:()=>h.toggle("toggle")}),{handles:W,content:s}=Xe(O,pe),$=P&&h.shown!==!1&&!h.overlaying?q.createElement(ge.Provider,{value:m},W.length>0?W:q.createElement(ee,null)):null;return q.createElement("div",{...Ze(i),id:h.id,ref:C,className:(0,et.default)("rt-ShellPane","rt-ShellBottom",n),...Ke(h,f),"data-inset":x||void 0,tabIndex:h.overlaying?-1:i.tabIndex,style:{...B,"--bottom-expanded-size":`${V}px`,"--bottom-min-size":`${w}px`,"--bottom-max-size":`${E}px`}},q.createElement("div",{className:"rt-ShellBottomContent"},s),$)});Ce.displayName="Shell.Bottom";Ce.Handle=pe;
2
2
  //# sourceMappingURL=shell-bottom.js.map