@womp/kookie-ui 0.35.7 → 0.37.0

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 (370) hide show
  1. package/components.css +12 -20
  2. package/dist/cjs/components/_internal/base-menu.utils.js +1 -1
  3. package/dist/cjs/components/_internal/base-menu.utils.js.map +2 -2
  4. package/dist/cjs/components/_internal/menu-context.js +1 -1
  5. package/dist/cjs/components/_internal/menu-context.js.map +2 -2
  6. package/dist/cjs/components/_internal/pane-chrome.js +1 -1
  7. package/dist/cjs/components/_internal/pane-chrome.js.map +2 -2
  8. package/dist/cjs/components/_internal/shell-bottom.d.ts +3 -3
  9. package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
  10. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  11. package/dist/cjs/components/_internal/shell-bottom.js.map +3 -3
  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 +3 -3
  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 +3 -3
  19. package/dist/cjs/components/_internal/shell-pane.d.ts +2 -7
  20. package/dist/cjs/components/_internal/shell-pane.d.ts.map +1 -1
  21. package/dist/cjs/components/_internal/shell-pane.js +1 -1
  22. package/dist/cjs/components/_internal/shell-pane.js.map +3 -3
  23. package/dist/cjs/components/_internal/shell-resizable.d.ts +3 -9
  24. package/dist/cjs/components/_internal/shell-resizable.d.ts.map +1 -1
  25. package/dist/cjs/components/_internal/shell-resizable.js +1 -1
  26. package/dist/cjs/components/_internal/shell-resizable.js.map +3 -3
  27. package/dist/cjs/components/_internal/shell-resize.d.ts +0 -4
  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 +1 -6
  32. package/dist/cjs/components/_internal/shell-rest.d.ts.map +1 -1
  33. package/dist/cjs/components/_internal/shell-rest.js +1 -1
  34. package/dist/cjs/components/_internal/shell-rest.js.map +3 -3
  35. package/dist/cjs/components/_internal/shell-sidebar.d.ts +3 -3
  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 +3 -3
  39. package/dist/cjs/components/_internal/shell-store.d.ts +0 -10
  40. package/dist/cjs/components/_internal/shell-store.d.ts.map +1 -1
  41. package/dist/cjs/components/_internal/shell-store.js +1 -1
  42. package/dist/cjs/components/_internal/shell-store.js.map +3 -3
  43. package/dist/cjs/components/_internal/use-close-warning.d.ts +12 -0
  44. package/dist/cjs/components/_internal/use-close-warning.d.ts.map +1 -0
  45. package/dist/cjs/components/_internal/use-close-warning.js +3 -0
  46. package/dist/cjs/components/_internal/use-close-warning.js.map +7 -0
  47. package/dist/cjs/components/checkbox-group.js +1 -1
  48. package/dist/cjs/components/checkbox-group.js.map +3 -3
  49. package/dist/cjs/components/checkbox-group.primitive.d.ts +0 -10
  50. package/dist/cjs/components/checkbox-group.primitive.d.ts.map +1 -1
  51. package/dist/cjs/components/checkbox-group.primitive.js +1 -1
  52. package/dist/cjs/components/checkbox-group.primitive.js.map +3 -3
  53. package/dist/cjs/components/context-menu.d.ts +1 -5
  54. package/dist/cjs/components/context-menu.d.ts.map +1 -1
  55. package/dist/cjs/components/context-menu.js +1 -1
  56. package/dist/cjs/components/context-menu.js.map +3 -3
  57. package/dist/cjs/components/dialog.d.ts.map +1 -1
  58. package/dist/cjs/components/dialog.js +1 -1
  59. package/dist/cjs/components/dialog.js.map +4 -4
  60. package/dist/cjs/components/dropdown-menu.js +1 -1
  61. package/dist/cjs/components/dropdown-menu.js.map +2 -2
  62. package/dist/cjs/components/index.js +2 -2
  63. package/dist/cjs/components/index.js.map +4 -4
  64. package/dist/cjs/components/navigator.js.map +2 -2
  65. package/dist/cjs/components/schemas/index.d.ts +1 -1
  66. package/dist/cjs/components/schemas/index.d.ts.map +1 -1
  67. package/dist/cjs/components/schemas/index.js +1 -1
  68. package/dist/cjs/components/schemas/index.js.map +3 -3
  69. package/dist/cjs/components/schemas/shell.schema.d.ts +6 -112
  70. package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
  71. package/dist/cjs/components/schemas/shell.schema.js +1 -1
  72. package/dist/cjs/components/schemas/shell.schema.js.map +3 -3
  73. package/dist/cjs/components/separator.js +1 -1
  74. package/dist/cjs/components/separator.js.map +2 -2
  75. package/dist/cjs/components/sheet.d.ts +7 -4
  76. package/dist/cjs/components/sheet.d.ts.map +1 -1
  77. package/dist/cjs/components/sheet.js +1 -1
  78. package/dist/cjs/components/sheet.js.map +4 -4
  79. package/dist/cjs/components/shell.context.d.ts +1 -45
  80. package/dist/cjs/components/shell.context.d.ts.map +1 -1
  81. package/dist/cjs/components/shell.context.js +1 -1
  82. package/dist/cjs/components/shell.context.js.map +4 -4
  83. package/dist/cjs/components/shell.d.ts +7 -37
  84. package/dist/cjs/components/shell.d.ts.map +1 -1
  85. package/dist/cjs/components/shell.js +1 -1
  86. package/dist/cjs/components/shell.js.map +4 -4
  87. package/dist/cjs/components/shell.types.d.ts +6 -27
  88. package/dist/cjs/components/shell.types.d.ts.map +1 -1
  89. package/dist/cjs/components/shell.types.js +1 -1
  90. package/dist/cjs/components/shell.types.js.map +2 -2
  91. package/dist/cjs/components/sidebar.js +1 -1
  92. package/dist/cjs/components/sidebar.js.map +2 -2
  93. package/dist/cjs/components/toolbar.js +1 -1
  94. package/dist/cjs/components/toolbar.js.map +2 -2
  95. package/dist/cjs/hooks/use-breakpoint.js +1 -1
  96. package/dist/cjs/hooks/use-breakpoint.js.map +2 -2
  97. package/dist/cjs/index.js +4 -4
  98. package/dist/cjs/index.js.map +4 -4
  99. package/dist/esm/{chunk-LR4X7SVV.js → chunk-2K46JPUL.js} +2 -2
  100. package/dist/esm/chunk-3K7E4XL3.js +3 -0
  101. package/dist/esm/chunk-3K7E4XL3.js.map +7 -0
  102. package/dist/esm/chunk-3LR7KMBE.js +3 -0
  103. package/dist/esm/chunk-3LR7KMBE.js.map +7 -0
  104. package/dist/esm/{chunk-HGF4CKRY.js → chunk-3ZBEWLSO.js} +2 -2
  105. package/dist/esm/{chunk-26O4RBOJ.js → chunk-5BABJBV3.js} +2 -2
  106. package/dist/esm/{chunk-5APRBJRR.js → chunk-5GTQXMS2.js} +2 -2
  107. package/dist/esm/chunk-5U2LEJLU.js +3 -0
  108. package/dist/esm/chunk-5U2LEJLU.js.map +7 -0
  109. package/dist/esm/{chunk-KBSH6CBD.js → chunk-5XO3PLDH.js} +2 -2
  110. package/dist/esm/{chunk-SGKLJDA3.js → chunk-74JANLVU.js} +2 -2
  111. package/dist/esm/{chunk-TUZ665BA.js → chunk-7E3ZOVRL.js} +2 -2
  112. package/dist/esm/{chunk-COLJWVN7.js → chunk-AQR42GKA.js} +2 -2
  113. package/dist/esm/{chunk-FTNZWAPB.js → chunk-ARPUPT4M.js} +2 -2
  114. package/dist/esm/{chunk-OMPLFDS6.js → chunk-ASBTPKH3.js} +2 -2
  115. package/dist/esm/{chunk-JFJV4HL3.js → chunk-CFXFWIRM.js} +2 -2
  116. package/dist/esm/{chunk-YLGIP3A5.js → chunk-CJZGEHVB.js} +2 -2
  117. package/dist/esm/{chunk-ISCZ57VL.js → chunk-DJGZ4K3V.js} +2 -2
  118. package/dist/esm/{chunk-PMXIQ5B4.js → chunk-FKCKELUB.js} +2 -2
  119. package/dist/esm/{chunk-Y5ITMKC6.js → chunk-G7S2BMS3.js} +2 -2
  120. package/dist/esm/{chunk-SR42NATX.js → chunk-GHIHF55B.js} +2 -2
  121. package/dist/esm/chunk-H7GH3DTF.js +3 -0
  122. package/dist/esm/chunk-H7GH3DTF.js.map +7 -0
  123. package/dist/esm/{chunk-C6VGCYFQ.js → chunk-HNOT2HS4.js} +2 -2
  124. package/dist/esm/chunk-HWT2K2XR.js +3 -0
  125. package/dist/esm/chunk-HWT2K2XR.js.map +7 -0
  126. package/dist/esm/{chunk-D42VCLKH.js → chunk-ICO5ULJL.js} +2 -2
  127. package/dist/esm/{chunk-FYZXC7AL.js → chunk-JJVAVLCN.js} +2 -2
  128. package/dist/esm/chunk-LBAC2X4U.js +3 -0
  129. package/dist/esm/{chunk-5BXCPANF.js.map → chunk-LBAC2X4U.js.map} +3 -3
  130. package/dist/esm/{chunk-R4DMVTM3.js → chunk-M6THDAMU.js} +2 -2
  131. package/dist/esm/{chunk-MAA6LEE2.js → chunk-MDQ7ZHOS.js} +1 -1
  132. package/dist/esm/chunk-MDQ7ZHOS.js.map +7 -0
  133. package/dist/esm/chunk-MQA3BKF4.js +3 -0
  134. package/dist/esm/chunk-MQA3BKF4.js.map +7 -0
  135. package/dist/esm/{chunk-VBF3XALY.js → chunk-MS2ONKJJ.js} +2 -2
  136. package/dist/esm/chunk-MXNPCJPV.js +3 -0
  137. package/dist/esm/chunk-MXNPCJPV.js.map +7 -0
  138. package/dist/esm/{chunk-XFMAA4MD.js → chunk-NJG42JDM.js} +2 -2
  139. package/dist/esm/{chunk-NJ7RQYLX.js → chunk-OIJQSUUM.js} +2 -2
  140. package/dist/esm/{chunk-VYF6KKYM.js → chunk-ONJYRJ66.js} +2 -2
  141. package/dist/esm/chunk-PIVHOUEA.js +3 -0
  142. package/dist/esm/chunk-PIVHOUEA.js.map +7 -0
  143. package/dist/esm/{chunk-UH6CJXHY.js → chunk-QPGW6RJG.js} +2 -2
  144. package/dist/esm/{chunk-EB4AG3OL.js → chunk-REELD6CT.js} +2 -2
  145. package/dist/esm/chunk-RYXIRZQW.js +3 -0
  146. package/dist/esm/chunk-RYXIRZQW.js.map +7 -0
  147. package/dist/esm/chunk-S66WR5R7.js +3 -0
  148. package/dist/esm/{chunk-MXEOE4LA.js.map → chunk-S66WR5R7.js.map} +2 -2
  149. package/dist/esm/chunk-SECVO3CW.js +3 -0
  150. package/dist/esm/chunk-SECVO3CW.js.map +7 -0
  151. package/dist/esm/chunk-SHDZYFUN.js +3 -0
  152. package/dist/esm/chunk-SHDZYFUN.js.map +7 -0
  153. package/dist/esm/{chunk-3M5ZM67R.js → chunk-TCFBNE6A.js} +2 -2
  154. package/dist/esm/chunk-U7P64MXD.js +3 -0
  155. package/dist/esm/chunk-U7P64MXD.js.map +7 -0
  156. package/dist/esm/chunk-UFYQC5XY.js +3 -0
  157. package/dist/esm/chunk-UFYQC5XY.js.map +7 -0
  158. package/dist/esm/{chunk-QBONJMSE.js → chunk-VRQK7U7J.js} +2 -2
  159. package/dist/esm/{chunk-TANYRHGP.js → chunk-W3X4N4JE.js} +2 -2
  160. package/dist/esm/{chunk-OPYTQ34H.js → chunk-W4CPV4PO.js} +2 -2
  161. package/dist/esm/{chunk-G66WDIIV.js → chunk-WJKCXGVN.js} +2 -2
  162. package/dist/esm/{chunk-YLPCYCYA.js → chunk-WT4IDG2W.js} +2 -2
  163. package/dist/esm/chunk-XBDAE77C.js +3 -0
  164. package/dist/esm/chunk-XBDAE77C.js.map +7 -0
  165. package/dist/esm/{chunk-X4PWBFOT.js → chunk-YM47BXKK.js} +2 -2
  166. package/dist/esm/chunk-YOESAYMJ.js +3 -0
  167. package/dist/esm/chunk-YOESAYMJ.js.map +7 -0
  168. package/dist/esm/{chunk-FVRVBB6O.js → chunk-YOZXIUZY.js} +2 -2
  169. package/dist/esm/{chunk-OGVKMDO7.js → chunk-YRCXTCIT.js} +2 -2
  170. package/dist/esm/components/_internal/base-button.js +1 -1
  171. package/dist/esm/components/_internal/base-menu.utils.js +1 -1
  172. package/dist/esm/components/_internal/menu-context.js +1 -1
  173. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  174. package/dist/esm/components/_internal/portal-theme.js +1 -1
  175. package/dist/esm/components/_internal/shell-bottom.d.ts +3 -3
  176. package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
  177. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  178. package/dist/esm/components/_internal/shell-handles.d.ts.map +1 -1
  179. package/dist/esm/components/_internal/shell-handles.js +1 -1
  180. package/dist/esm/components/_internal/shell-inspector.d.ts +3 -3
  181. package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
  182. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  183. package/dist/esm/components/_internal/shell-pane.d.ts +2 -7
  184. package/dist/esm/components/_internal/shell-pane.d.ts.map +1 -1
  185. package/dist/esm/components/_internal/shell-pane.js +1 -1
  186. package/dist/esm/components/_internal/shell-resizable.d.ts +3 -9
  187. package/dist/esm/components/_internal/shell-resizable.d.ts.map +1 -1
  188. package/dist/esm/components/_internal/shell-resizable.js +1 -1
  189. package/dist/esm/components/_internal/shell-resize.d.ts +0 -4
  190. package/dist/esm/components/_internal/shell-resize.d.ts.map +1 -1
  191. package/dist/esm/components/_internal/shell-resize.js +1 -1
  192. package/dist/esm/components/_internal/shell-rest.d.ts +1 -6
  193. package/dist/esm/components/_internal/shell-rest.d.ts.map +1 -1
  194. package/dist/esm/components/_internal/shell-rest.js +1 -1
  195. package/dist/esm/components/_internal/shell-sidebar.d.ts +3 -3
  196. package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
  197. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  198. package/dist/esm/components/_internal/shell-store.d.ts +0 -10
  199. package/dist/esm/components/_internal/shell-store.d.ts.map +1 -1
  200. package/dist/esm/components/_internal/shell-store.js +1 -1
  201. package/dist/esm/components/_internal/use-close-warning.d.ts +12 -0
  202. package/dist/esm/components/_internal/use-close-warning.d.ts.map +1 -0
  203. package/dist/esm/components/_internal/use-close-warning.js +3 -0
  204. package/dist/esm/components/accordion.js +1 -1
  205. package/dist/esm/components/alert-dialog.js +1 -1
  206. package/dist/esm/components/avatar.js +1 -1
  207. package/dist/esm/components/button.js +1 -1
  208. package/dist/esm/components/chatbar.js +1 -1
  209. package/dist/esm/components/checkbox-group.js +1 -1
  210. package/dist/esm/components/checkbox-group.primitive.d.ts +0 -10
  211. package/dist/esm/components/checkbox-group.primitive.d.ts.map +1 -1
  212. package/dist/esm/components/checkbox-group.primitive.js +1 -1
  213. package/dist/esm/components/checkbox.js +1 -1
  214. package/dist/esm/components/chip.js +1 -1
  215. package/dist/esm/components/combobox.js +1 -1
  216. package/dist/esm/components/command.js +1 -1
  217. package/dist/esm/components/context-menu.d.ts +1 -5
  218. package/dist/esm/components/context-menu.d.ts.map +1 -1
  219. package/dist/esm/components/context-menu.js +1 -1
  220. package/dist/esm/components/dialog.d.ts.map +1 -1
  221. package/dist/esm/components/dialog.js +1 -1
  222. package/dist/esm/components/dropdown-menu.js +1 -1
  223. package/dist/esm/components/index.js +1 -1
  224. package/dist/esm/components/message-scroller.js +1 -1
  225. package/dist/esm/components/navigator.js +1 -1
  226. package/dist/esm/components/notice.js +1 -1
  227. package/dist/esm/components/popover.js +1 -1
  228. package/dist/esm/components/radio-group.js +1 -1
  229. package/dist/esm/components/radio.js +1 -1
  230. package/dist/esm/components/schemas/index.d.ts +1 -1
  231. package/dist/esm/components/schemas/index.d.ts.map +1 -1
  232. package/dist/esm/components/schemas/index.js +1 -1
  233. package/dist/esm/components/schemas/index.js.map +2 -2
  234. package/dist/esm/components/schemas/shell.schema.d.ts +6 -112
  235. package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
  236. package/dist/esm/components/schemas/shell.schema.js +1 -1
  237. package/dist/esm/components/select.js +1 -1
  238. package/dist/esm/components/separator.js +1 -1
  239. package/dist/esm/components/sheet.d.ts +7 -4
  240. package/dist/esm/components/sheet.d.ts.map +1 -1
  241. package/dist/esm/components/sheet.js +1 -1
  242. package/dist/esm/components/shell.context.d.ts +1 -45
  243. package/dist/esm/components/shell.context.d.ts.map +1 -1
  244. package/dist/esm/components/shell.context.js +1 -1
  245. package/dist/esm/components/shell.d.ts +7 -37
  246. package/dist/esm/components/shell.d.ts.map +1 -1
  247. package/dist/esm/components/shell.js +1 -1
  248. package/dist/esm/components/shell.types.d.ts +6 -27
  249. package/dist/esm/components/shell.types.d.ts.map +1 -1
  250. package/dist/esm/components/shell.types.js +1 -1
  251. package/dist/esm/components/sidebar.js +1 -1
  252. package/dist/esm/components/slider.js +1 -1
  253. package/dist/esm/components/switch.js +1 -1
  254. package/dist/esm/components/tabs.js +1 -1
  255. package/dist/esm/components/text-area.js +1 -1
  256. package/dist/esm/components/text-field.js +1 -1
  257. package/dist/esm/components/theme.js +1 -1
  258. package/dist/esm/components/toggle.js +1 -1
  259. package/dist/esm/components/toolbar.js +1 -1
  260. package/dist/esm/components/tooltip.js +1 -1
  261. package/dist/esm/components/virtual-menu.js +1 -1
  262. package/dist/esm/hooks/use-breakpoint.js +1 -1
  263. package/dist/esm/index.js +1 -1
  264. package/package.json +1 -5
  265. package/schemas/index.json +13 -335
  266. package/schemas/shell-bottom.json +2 -63
  267. package/schemas/shell-inspector.json +2 -63
  268. package/schemas/shell-panel.json +2 -63
  269. package/schemas/shell-rail.json +2 -38
  270. package/schemas/shell-sidebar.json +5 -102
  271. package/schemas/shell-trigger.json +0 -6
  272. package/src/components/_internal/base-dialog.css +15 -0
  273. package/src/components/_internal/shell-bottom.tsx +6 -26
  274. package/src/components/_internal/shell-handles.tsx +2 -32
  275. package/src/components/_internal/shell-inspector.tsx +6 -26
  276. package/src/components/_internal/shell-pane.tsx +7 -56
  277. package/src/components/_internal/shell-resizable.tsx +6 -81
  278. package/src/components/_internal/shell-resize.tsx +0 -4
  279. package/src/components/_internal/shell-rest.ts +2 -11
  280. package/src/components/_internal/shell-sidebar.tsx +8 -30
  281. package/src/components/_internal/shell-store.tsx +1 -34
  282. package/src/components/_internal/use-close-warning.ts +38 -0
  283. package/src/components/checkbox-group.primitive.tsx +0 -12
  284. package/src/components/context-menu.tsx +1 -6
  285. package/src/components/dialog.tsx +6 -1
  286. package/src/components/schemas/index.ts +0 -1
  287. package/src/components/schemas/shell.schema.ts +3 -20
  288. package/src/components/sheet.tsx +11 -5
  289. package/src/components/shell.context.tsx +5 -112
  290. package/src/components/shell.css +1 -29
  291. package/src/components/shell.tsx +12 -97
  292. package/src/components/shell.types.ts +6 -28
  293. package/styles.css +12 -20
  294. package/dist/cjs/components/shell.hooks.d.ts +0 -10
  295. package/dist/cjs/components/shell.hooks.d.ts.map +0 -1
  296. package/dist/cjs/components/shell.hooks.js +0 -3
  297. package/dist/cjs/components/shell.hooks.js.map +0 -7
  298. package/dist/esm/chunk-2VSRZ4IT.js +0 -3
  299. package/dist/esm/chunk-2VSRZ4IT.js.map +0 -7
  300. package/dist/esm/chunk-2WFN4D52.js +0 -3
  301. package/dist/esm/chunk-2WFN4D52.js.map +0 -7
  302. package/dist/esm/chunk-4OJRLS5N.js +0 -3
  303. package/dist/esm/chunk-4OJRLS5N.js.map +0 -7
  304. package/dist/esm/chunk-4TTRPCGG.js +0 -3
  305. package/dist/esm/chunk-4TTRPCGG.js.map +0 -7
  306. package/dist/esm/chunk-5BXCPANF.js +0 -3
  307. package/dist/esm/chunk-B447PNRD.js +0 -3
  308. package/dist/esm/chunk-B447PNRD.js.map +0 -7
  309. package/dist/esm/chunk-BJVXB3PN.js +0 -3
  310. package/dist/esm/chunk-BJVXB3PN.js.map +0 -7
  311. package/dist/esm/chunk-HQT32HQ6.js +0 -3
  312. package/dist/esm/chunk-HQT32HQ6.js.map +0 -7
  313. package/dist/esm/chunk-KGCGT4MJ.js +0 -3
  314. package/dist/esm/chunk-KGCGT4MJ.js.map +0 -7
  315. package/dist/esm/chunk-M26LLCQC.js +0 -3
  316. package/dist/esm/chunk-M26LLCQC.js.map +0 -7
  317. package/dist/esm/chunk-MAA6LEE2.js.map +0 -7
  318. package/dist/esm/chunk-MXEOE4LA.js +0 -3
  319. package/dist/esm/chunk-QV66TN2A.js +0 -3
  320. package/dist/esm/chunk-QV66TN2A.js.map +0 -7
  321. package/dist/esm/chunk-TRJAVWCK.js +0 -3
  322. package/dist/esm/chunk-TRJAVWCK.js.map +0 -7
  323. package/dist/esm/chunk-TS4QCDSI.js +0 -3
  324. package/dist/esm/chunk-TS4QCDSI.js.map +0 -7
  325. package/dist/esm/chunk-XOAOSRTH.js +0 -3
  326. package/dist/esm/chunk-XOAOSRTH.js.map +0 -7
  327. package/dist/esm/chunk-XUCR7L4G.js +0 -3
  328. package/dist/esm/chunk-XUCR7L4G.js.map +0 -7
  329. package/dist/esm/chunk-XVN43IZL.js +0 -3
  330. package/dist/esm/chunk-XVN43IZL.js.map +0 -7
  331. package/dist/esm/components/shell.hooks.d.ts +0 -10
  332. package/dist/esm/components/shell.hooks.d.ts.map +0 -1
  333. package/dist/esm/components/shell.hooks.js +0 -3
  334. package/src/components/shell.hooks.ts +0 -20
  335. /package/dist/esm/{chunk-LR4X7SVV.js.map → chunk-2K46JPUL.js.map} +0 -0
  336. /package/dist/esm/{chunk-HGF4CKRY.js.map → chunk-3ZBEWLSO.js.map} +0 -0
  337. /package/dist/esm/{chunk-26O4RBOJ.js.map → chunk-5BABJBV3.js.map} +0 -0
  338. /package/dist/esm/{chunk-5APRBJRR.js.map → chunk-5GTQXMS2.js.map} +0 -0
  339. /package/dist/esm/{chunk-KBSH6CBD.js.map → chunk-5XO3PLDH.js.map} +0 -0
  340. /package/dist/esm/{chunk-SGKLJDA3.js.map → chunk-74JANLVU.js.map} +0 -0
  341. /package/dist/esm/{chunk-TUZ665BA.js.map → chunk-7E3ZOVRL.js.map} +0 -0
  342. /package/dist/esm/{chunk-COLJWVN7.js.map → chunk-AQR42GKA.js.map} +0 -0
  343. /package/dist/esm/{chunk-FTNZWAPB.js.map → chunk-ARPUPT4M.js.map} +0 -0
  344. /package/dist/esm/{chunk-OMPLFDS6.js.map → chunk-ASBTPKH3.js.map} +0 -0
  345. /package/dist/esm/{chunk-JFJV4HL3.js.map → chunk-CFXFWIRM.js.map} +0 -0
  346. /package/dist/esm/{chunk-YLGIP3A5.js.map → chunk-CJZGEHVB.js.map} +0 -0
  347. /package/dist/esm/{chunk-ISCZ57VL.js.map → chunk-DJGZ4K3V.js.map} +0 -0
  348. /package/dist/esm/{chunk-PMXIQ5B4.js.map → chunk-FKCKELUB.js.map} +0 -0
  349. /package/dist/esm/{chunk-Y5ITMKC6.js.map → chunk-G7S2BMS3.js.map} +0 -0
  350. /package/dist/esm/{chunk-SR42NATX.js.map → chunk-GHIHF55B.js.map} +0 -0
  351. /package/dist/esm/{chunk-C6VGCYFQ.js.map → chunk-HNOT2HS4.js.map} +0 -0
  352. /package/dist/esm/{chunk-D42VCLKH.js.map → chunk-ICO5ULJL.js.map} +0 -0
  353. /package/dist/esm/{chunk-FYZXC7AL.js.map → chunk-JJVAVLCN.js.map} +0 -0
  354. /package/dist/esm/{chunk-R4DMVTM3.js.map → chunk-M6THDAMU.js.map} +0 -0
  355. /package/dist/esm/{chunk-VBF3XALY.js.map → chunk-MS2ONKJJ.js.map} +0 -0
  356. /package/dist/esm/{chunk-XFMAA4MD.js.map → chunk-NJG42JDM.js.map} +0 -0
  357. /package/dist/esm/{chunk-NJ7RQYLX.js.map → chunk-OIJQSUUM.js.map} +0 -0
  358. /package/dist/esm/{chunk-VYF6KKYM.js.map → chunk-ONJYRJ66.js.map} +0 -0
  359. /package/dist/esm/{chunk-UH6CJXHY.js.map → chunk-QPGW6RJG.js.map} +0 -0
  360. /package/dist/esm/{chunk-EB4AG3OL.js.map → chunk-REELD6CT.js.map} +0 -0
  361. /package/dist/esm/{chunk-3M5ZM67R.js.map → chunk-TCFBNE6A.js.map} +0 -0
  362. /package/dist/esm/{chunk-QBONJMSE.js.map → chunk-VRQK7U7J.js.map} +0 -0
  363. /package/dist/esm/{chunk-TANYRHGP.js.map → chunk-W3X4N4JE.js.map} +0 -0
  364. /package/dist/esm/{chunk-OPYTQ34H.js.map → chunk-W4CPV4PO.js.map} +0 -0
  365. /package/dist/esm/{chunk-G66WDIIV.js.map → chunk-WJKCXGVN.js.map} +0 -0
  366. /package/dist/esm/{chunk-YLPCYCYA.js.map → chunk-WT4IDG2W.js.map} +0 -0
  367. /package/dist/esm/{chunk-X4PWBFOT.js.map → chunk-YM47BXKK.js.map} +0 -0
  368. /package/dist/esm/{chunk-FVRVBB6O.js.map → chunk-YOZXIUZY.js.map} +0 -0
  369. /package/dist/esm/{chunk-OGVKMDO7.js.map → chunk-YRCXTCIT.js.map} +0 -0
  370. /package/dist/esm/components/{shell.hooks.js.map → _internal/use-close-warning.js.map} +0 -0
package/components.css CHANGED
@@ -1358,6 +1358,18 @@
1358
1358
  white-space: nowrap;
1359
1359
  border: 0;
1360
1360
  }
1361
+ .kui-Toolbar:where(.kui-BaseDialogContent > :first-child) {
1362
+ -webkit-margin-before: calc(-1 * var(--layout-space-2));
1363
+ margin-block-start: calc(-1 * var(--layout-space-2));
1364
+ margin-inline: calc(-1 * var(--layout-space-2));
1365
+ -webkit-margin-after: var(--layout-space-6);
1366
+ margin-block-end: var(--layout-space-6);
1367
+ }
1368
+ .kui-ToolbarTitle:where(.kui-BaseDialogContent > .kui-Toolbar:first-child > *) {
1369
+ -webkit-margin-end: auto;
1370
+ margin-inline-end: auto;
1371
+ min-inline-size: 0;
1372
+ }
1361
1373
  .kui-AlertDialogContent {
1362
1374
  max-width: var(--overlay-w);
1363
1375
  }
@@ -12589,26 +12601,6 @@
12589
12601
  inline-size: var(--sidebar-size, var(--sidebar-expanded-size, 288px));
12590
12602
  }
12591
12603
  }
12592
- .kui-ShellPane[data-peek][data-state],
12593
- .kui-ShellRail ~ .kui-ShellPanel[data-presentation-follows][data-peek][data-state] {
12594
- --kui-shell-position: absolute;
12595
- --kui-shell-z: 4;
12596
- --kui-shell-pin: fixed;
12597
- --kui-shell-pin-top: initial;
12598
- --kui-shell-row: 2 / 3;
12599
- --kui-shell-col: 1 / -1;
12600
- --kui-shell-surface: var(--color-surface);
12601
- --kui-shell-shadow: var(--surface-chrome);
12602
- --kui-shell-edge: 1px;
12603
- --kui-shell-offset: var(--shell-rail-offset, 0px);
12604
- --kui-shell-handle: none;
12605
- display: -webkit-box;
12606
- display: -ms-flexbox;
12607
- display: flex;
12608
- }
12609
- .kui-ShellSidebar[data-peek][data-state] {
12610
- inline-size: var(--peek-sidebar-width, var(--sidebar-size, var(--sidebar-expanded-size, 288px)));
12611
- }
12612
12604
  .kui-ShellScrim {
12613
12605
  display: none;
12614
12606
  position: absolute;
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";"use client";var J=Object.create;var P=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var ee=Object.getPrototypeOf,te=Object.prototype.hasOwnProperty;var ne=(t,e)=>{for(var n in e)P(t,n,{get:e[n],enumerable:!0})},V=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Z(e))!te.call(t,o)&&o!==n&&P(t,o,{get:()=>e[o],enumerable:!(i=X(e,o))||i.enumerable});return t};var m=(t,e,n)=>(n=t!=null?J(ee(t)):{},V(e||!t||!t.__esModule?P(n,"default",{value:t,enumerable:!0}):n,t)),re=t=>V(P({},"__esModule",{value:!0}),t);var xe={};ne(xe,{MenuShortcut:()=>he,getMenuAlignOffset:()=>be,resolveResponsiveValue:()=>F,toAriaKeyShortcuts:()=>De,useResolvedResponsiveValue:()=>ve});module.exports=re(xe);var B=m(require("react")),H=m(require("classnames"));var S=m(require("react")),$=m(require("classnames")),G=require("radix-ui");var O={asChild:{type:"boolean"}};var se=["1","2","3","4","5","6","7","8","9"],oe=["raised","soft"],K={...O,size:{type:"enum",className:"kui-r-size",values:se,responsive:!0},variant:{type:"enum",className:"kui-variant",values:oe,default:"raised"}};var z=m(require("classnames"));var ie=[],pe=new Set;function ae(t){let e=Object.assign({},...t),n=[],i=[],o=new Set;for(let s in e){let p=e[s],l=p.values??ie,a={key:s,type:p.type,default:p.default,hasDefault:p.default!==void 0,responsive:"responsive"in p,className:p.className,customProperties:p.customProperties,parseValue:p.parseValue,values:l,valueSet:l.length>0?new Set(l):pe,enumValueSet:p.type==="enum"?new Set([p.default,...l]):void 0};p.className?(n.push(a),o.add(s)):(a.hasDefault||p.type==="enum")&&i.push(a)}return{styling:n,passthrough:i,stylingKeys:o}}var le={children:new WeakMap};function M(t){let e=le;for(let n=0;n<t.length;n++){let i=t[n],o=e.children.get(i);o===void 0&&(o={children:new WeakMap},e.children.set(i,o)),e=o}return e.compiled??(e.compiled=ae(t))}var fe=["initial","xs","sm","md","lg","xl"],b=new Set(fe);function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var de=new Set(["initial","xs","sm","md","lg","xl"]);function u(t){if(typeof t!="object"||t===null)return!1;for(let e in t)if(de.has(e))return!0;return!1}function R(t,e,n){return e!==void 0?e.has(n):t.includes(n)}function A({className:t,customProperties:e,...n}){let i=h({allowArbitraryValues:!0,className:t,...n}),o=ue({customProperties:e,...n});return[i,o]}function h({allowArbitraryValues:t,value:e,className:n,propValues:i,propValueSet:o,parseValue:s=p=>p}){if(e){if(typeof e=="string")return R(i,o,e)?j(n,e,s):t?n:void 0;if(u(e)){let p=e,l=[];for(let a in p){if(!D(p,a)||!b.has(a))continue;let r=p[a];if(r!==void 0){if(R(i,o,r)){let f=j(n,r,s),d=a==="initial"?f:`${a}:${f}`;l.push(d)}else if(t){let f=a==="initial"?n:`${a}:${n}`;l.push(f)}}}return l.length>0?l.join(" "):""}if(t)return n}}function j(t,e,n){let i=t?"-":"",o=n(e),s=o?.startsWith("-"),p=s?"-":"",l=s?o?.substring(1):o;return`${p}${t}${i}${l}`}function ue({customProperties:t,value:e,propValues:n,propValueSet:i,parseValue:o=s=>s}){if(!e||typeof e=="string"&&R(n,i,e))return;let s;if(typeof e=="string"){let p=o(e);s={};for(let l of t)s[l]=p;return s}if(u(e)){let p=e;for(let l in p){if(!D(p,l)||!b.has(l))continue;let a=p[l];if(a===void 0||R(n,i,a))continue;let r=o(a);s??(s={});for(let f of t){let d=l==="initial"?f:`${f}-${l}`;s[d]=r}}}return s??{}}function x(...t){let e;for(let n of t)n&&(e===void 0&&(e={}),Object.assign(e,n));return e}function ce(t,e){let n=t.initial,i=!1;return e.hasDefault&&n===void 0&&(n=e.default,i=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(n)&&(n=e.default,i=!0),i?{...t,initial:n}:t}function L(t,...e){let{styling:n,passthrough:i,stylingKeys:o}=M(e),s={};for(let a in t)o.has(a)||(s[a]=t[a]);for(let a=0;a<i.length;a++){let r=i[a],f=s[r.key];if(f===void 0){r.hasDefault&&(s[r.key]=r.default);continue}r.enumValueSet!==void 0&&!r.enumValueSet.has(f)&&!u(f)&&(s[r.key]=r.default)}let p,l=[];for(let a=0;a<n.length;a++){let r=n[a],f=t[r.key];if(f===void 0&&r.hasDefault&&(f=r.default),r.enumValueSet!==void 0&&!r.enumValueSet.has(f)&&!u(f)&&(f=r.default),!!f){if(u(f)){if(!r.responsive)continue;f=ce(f,r)}if(r.type==="enum"){let d=h({allowArbitraryValues:!1,value:f,className:r.className,propValues:r.values,propValueSet:r.valueSet,parseValue:r.parseValue});d&&l.push(d);continue}if(r.type==="string"||r.type==="enum | string"){let[d,E]=A({className:r.className,customProperties:r.customProperties,propValues:r.type==="string"?[]:r.values,propValueSet:r.type==="string"?void 0:r.valueSet,parseValue:r.parseValue,value:f});E&&(p=x(p,E)),d&&l.push(d);continue}if(r.type==="boolean"){l.push(r.className);continue}}}return s.className=(0,z.default)(l.length>0?l.join(" "):void 0,t.className),s.style=x(p,t.style),s}var T=S.forwardRef((t,e)=>{let{asChild:n,className:i,...o}=L(t,K),s=n?G.Slot.Root:"kbd";return S.createElement(s,{...o,ref:e,className:(0,$.default)("kui-reset","kui-Kbd",i)})});T.displayName="Kbd";var g=m(require("react"));var I={xs:"(min-width: 520px)",sm:"(min-width: 768px)",md:"(min-width: 1024px)",lg:"(min-width: 1280px)",xl:"(min-width: 1640px)"};var me=Object.entries(I),k=null,y=new Set,c=null;function N(){return k??(k=me.map(([t,e])=>[t,window.matchMedia(e)])),k}function C(){let t="initial";for(let[e,n]of N())n.matches&&(t=e);return t}function v(){let t=C();t!==c&&(c=t,y.forEach(e=>e()))}function U(t){if(typeof window>"u")return()=>{};if(y.size===0){c=C();for(let[,e]of N())typeof e.addEventListener=="function"?e.addEventListener("change",v):e.addListener?.(v)}return y.add(t),()=>{if(y.delete(t),!(y.size>0)){for(let[,e]of N())try{typeof e.removeEventListener=="function"?e.removeEventListener("change",v):e.removeListener?.(v)}catch{}c=null}}}function ye(){return typeof window>"u"?"initial":(c??(c=C()),c)}function ge(){return"initial"}var Pe=()=>!0,Re=()=>!1,W=()=>()=>{},Se=()=>"initial";function _(t=!0){let e=g.useSyncExternalStore(t?U:W,t?ye:Se,ge),n=g.useSyncExternalStore(t?U:W,Pe,Re);return g.useMemo(()=>({breakpoint:e,ready:n}),[e,n])}var w=["xl","lg","md","sm","xs","initial"];function F(t,e,n){if(t==null)return n;if(typeof t!="object")return t;let i=t;for(let o=w.indexOf(e);o<w.length;o++){let s=i[w[o]];if(s!==void 0)return s}return n}function ve(t,e){let n=typeof t=="object"&&t!==null,{breakpoint:i}=_(n);return F(t,i,e)}var q={1:8,2:12,3:16,4:24};function be(t){return-(q[t]??q[2])}var Q={"\u2318":"Meta",cmd:"Meta",command:"Meta",meta:"Meta","\u2325":"Alt",option:"Alt",opt:"Alt",alt:"Alt","\u21E7":"Shift",shift:"Shift","\u2303":"Control",ctrl:"Control",control:"Control","\u232B":"Backspace","\u2326":"Delete","\u23CE":"Enter","\u21B5":"Enter","\u238B":"Escape",esc:"Escape","\u21E5":"Tab","\u2191":"ArrowUp","\u2193":"ArrowDown","\u2190":"ArrowLeft","\u2192":"ArrowRight"},Y=new Map;function De(t){let e=Y.get(t);if(e!==void 0)return e||void 0;let o=(t.match(/[⌘⌥⇧⌃]|[^\s+⌘⌥⇧⌃]+/gu)??[]).map(s=>Q[s]??Q[s.toLowerCase()]??(s.length===1?s.toUpperCase():s)).join("+");return Y.set(t,o),o||void 0}function he({shortcut:t,className:e}){return B.createElement("div",{"aria-hidden":!0,className:(0,H.default)("kui-BaseMenuShortcut",e)},B.createElement(T,{size:"1"},t))}
2
+ "use strict";"use client";var J=Object.create;var P=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var ee=Object.getPrototypeOf,te=Object.prototype.hasOwnProperty;var ne=(t,e)=>{for(var n in e)P(t,n,{get:e[n],enumerable:!0})},E=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Z(e))!te.call(t,s)&&s!==n&&P(t,s,{get:()=>e[s],enumerable:!(i=X(e,s))||i.enumerable});return t};var m=(t,e,n)=>(n=t!=null?J(ee(t)):{},E(e||!t||!t.__esModule?P(n,"default",{value:t,enumerable:!0}):n,t)),re=t=>E(P({},"__esModule",{value:!0}),t);var xe={};ne(xe,{MenuShortcut:()=>he,getMenuAlignOffset:()=>De,resolveResponsiveValue:()=>F,toAriaKeyShortcuts:()=>be,useResolvedResponsiveValue:()=>ve});module.exports=re(xe);var B=m(require("react")),H=m(require("classnames"));var S=m(require("react")),$=m(require("classnames")),G=require("radix-ui");var O={asChild:{type:"boolean"}};var oe=["1","2","3","4","5","6","7","8","9"],se=["raised","soft"],K={...O,size:{type:"enum",className:"kui-r-size",values:oe,responsive:!0},variant:{type:"enum",className:"kui-variant",values:se,default:"raised"}};var z=m(require("classnames"));var ie=[],pe=new Set;function ae(t){let e=Object.assign({},...t),n=[],i=[],s=new Set;for(let o in e){let p=e[o],l=p.values??ie,a={key:o,type:p.type,default:p.default,hasDefault:p.default!==void 0,responsive:"responsive"in p,className:p.className,customProperties:p.customProperties,parseValue:p.parseValue,values:l,valueSet:l.length>0?new Set(l):pe,enumValueSet:p.type==="enum"?new Set([p.default,...l]):void 0};p.className?(n.push(a),s.add(o)):(a.hasDefault||p.type==="enum")&&i.push(a)}return{styling:n,passthrough:i,stylingKeys:s}}var le={children:new WeakMap};function M(t){let e=le;for(let n=0;n<t.length;n++){let i=t[n],s=e.children.get(i);s===void 0&&(s={children:new WeakMap},e.children.set(i,s)),e=s}return e.compiled??(e.compiled=ae(t))}var fe=["initial","xs","sm","md","lg","xl"],D=new Set(fe);function b(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var de=new Set(["initial","xs","sm","md","lg","xl"]);function u(t){if(typeof t!="object"||t===null)return!1;for(let e in t)if(de.has(e))return!0;return!1}function R(t,e,n){return e!==void 0?e.has(n):t.includes(n)}function A({className:t,customProperties:e,...n}){let i=h({allowArbitraryValues:!0,className:t,...n}),s=ue({customProperties:e,...n});return[i,s]}function h({allowArbitraryValues:t,value:e,className:n,propValues:i,propValueSet:s,parseValue:o=p=>p}){if(e){if(typeof e=="string")return R(i,s,e)?j(n,e,o):t?n:void 0;if(u(e)){let p=e,l=[];for(let a in p){if(!b(p,a)||!D.has(a))continue;let r=p[a];if(r!==void 0){if(R(i,s,r)){let f=j(n,r,o),d=a==="initial"?f:`${a}:${f}`;l.push(d)}else if(t){let f=a==="initial"?n:`${a}:${n}`;l.push(f)}}}return l.length>0?l.join(" "):""}if(t)return n}}function j(t,e,n){let i=t?"-":"",s=n(e),o=s?.startsWith("-"),p=o?"-":"",l=o?s?.substring(1):s;return`${p}${t}${i}${l}`}function ue({customProperties:t,value:e,propValues:n,propValueSet:i,parseValue:s=o=>o}){if(!e||typeof e=="string"&&R(n,i,e))return;let o;if(typeof e=="string"){let p=s(e);o={};for(let l of t)o[l]=p;return o}if(u(e)){let p=e;for(let l in p){if(!b(p,l)||!D.has(l))continue;let a=p[l];if(a===void 0||R(n,i,a))continue;let r=s(a);o??(o={});for(let f of t){let d=l==="initial"?f:`${f}-${l}`;o[d]=r}}}return o??{}}function x(...t){let e;for(let n of t)n&&(e===void 0&&(e={}),Object.assign(e,n));return e}function ce(t,e){let n=t.initial,i=!1;return e.hasDefault&&n===void 0&&(n=e.default,i=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(n)&&(n=e.default,i=!0),i?{...t,initial:n}:t}function L(t,...e){let{styling:n,passthrough:i,stylingKeys:s}=M(e),o={};for(let a in t)s.has(a)||(o[a]=t[a]);for(let a=0;a<i.length;a++){let r=i[a],f=o[r.key];if(f===void 0){r.hasDefault&&(o[r.key]=r.default);continue}r.enumValueSet!==void 0&&!r.enumValueSet.has(f)&&!u(f)&&(o[r.key]=r.default)}let p,l=[];for(let a=0;a<n.length;a++){let r=n[a],f=t[r.key];if(f===void 0&&r.hasDefault&&(f=r.default),r.enumValueSet!==void 0&&!r.enumValueSet.has(f)&&!u(f)&&(f=r.default),!!f){if(u(f)){if(!r.responsive)continue;f=ce(f,r)}if(r.type==="enum"){let d=h({allowArbitraryValues:!1,value:f,className:r.className,propValues:r.values,propValueSet:r.valueSet,parseValue:r.parseValue});d&&l.push(d);continue}if(r.type==="string"||r.type==="enum | string"){let[d,V]=A({className:r.className,customProperties:r.customProperties,propValues:r.type==="string"?[]:r.values,propValueSet:r.type==="string"?void 0:r.valueSet,parseValue:r.parseValue,value:f});V&&(p=x(p,V)),d&&l.push(d);continue}if(r.type==="boolean"){l.push(r.className);continue}}}return o.className=(0,z.default)(l.length>0?l.join(" "):void 0,t.className),o.style=x(p,t.style),o}var k=S.forwardRef((t,e)=>{let{asChild:n,className:i,...s}=L(t,K),o=n?G.Slot.Root:"kbd";return S.createElement(o,{...s,ref:e,className:(0,$.default)("kui-reset","kui-Kbd",i)})});k.displayName="Kbd";var g=m(require("react"));var I={xs:"(min-width: 520px)",sm:"(min-width: 768px)",md:"(min-width: 1024px)",lg:"(min-width: 1280px)",xl:"(min-width: 1640px)"};var me=Object.entries(I),T=null,y=new Set,c=null;function N(){return T??(T=me.map(([t,e])=>[t,window.matchMedia(e)])),T}function C(){let t="initial";for(let[e,n]of N())n.matches&&(t=e);return t}function v(){let t=C();t!==c&&(c=t,y.forEach(e=>e()))}function U(t){if(typeof window>"u")return()=>{};if(y.size===0){c=C();for(let[,e]of N())typeof e.addEventListener=="function"?e.addEventListener("change",v):e.addListener?.(v)}return y.add(t),()=>{if(y.delete(t),!(y.size>0)){for(let[,e]of N())try{typeof e.removeEventListener=="function"?e.removeEventListener("change",v):e.removeListener?.(v)}catch{}c=null}}}function ye(){return typeof window>"u"?"initial":(c??(c=C()),c)}function ge(){return"initial"}var Pe=()=>!0,Re=()=>!1,W=()=>()=>{},Se=()=>"initial";function _(t=!0){let e=g.useSyncExternalStore(t?U:W,t?ye:Se,ge),n=g.useSyncExternalStore(t?U:W,Pe,Re);return g.useMemo(()=>({breakpoint:e,ready:n}),[e,n])}var w=["xl","lg","md","sm","xs","initial"];function F(t,e,n){if(t==null)return n;if(typeof t!="object")return t;let i=t;for(let s=w.indexOf(e);s<w.length;s++){let o=i[w[s]];if(o!==void 0)return o}return n}function ve(t,e){let n=typeof t=="object"&&t!==null,{breakpoint:i}=_(n);return F(t,i,e)}var q={1:8,2:12,3:16,4:24};function De(t){return-(q[t]??q[2])}var Q={"\u2318":"Meta",cmd:"Meta",command:"Meta",meta:"Meta","\u2325":"Alt",option:"Alt",opt:"Alt",alt:"Alt","\u21E7":"Shift",shift:"Shift","\u2303":"Control",ctrl:"Control",control:"Control","\u232B":"Backspace","\u2326":"Delete","\u23CE":"Enter","\u21B5":"Enter","\u238B":"Escape",esc:"Escape","\u21E5":"Tab","\u2191":"ArrowUp","\u2193":"ArrowDown","\u2190":"ArrowLeft","\u2192":"ArrowRight"},Y=new Map;function be(t){let e=Y.get(t);if(e!==void 0)return e||void 0;let s=(t.match(/[⌘⌥⇧⌃]|[^\s+⌘⌥⇧⌃]+/gu)??[]).map(o=>Q[o]??Q[o.toLowerCase()]??(o.length===1?o.toUpperCase():o)).join("+");return Y.set(t,s),s||void 0}function he({shortcut:t,className:e}){return B.createElement("div",{"aria-hidden":!0,className:(0,H.default)("kui-BaseMenuShortcut",e)},B.createElement(k,{size:"1"},t))}
3
3
  //# sourceMappingURL=base-menu.utils.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/base-menu.utils.tsx", "../../../../src/components/kbd.tsx", "../../../../src/props/as-child.prop.ts", "../../../../src/components/kbd.props.tsx", "../../../../src/helpers/extract-props.ts", "../../../../src/helpers/compile-prop-defs.ts", "../../../../src/props/prop-def.ts", "../../../../src/helpers/has-own-property.ts", "../../../../src/helpers/is-responsive-object.ts", "../../../../src/helpers/get-responsive-styles.ts", "../../../../src/helpers/merge-styles.ts", "../../../../src/hooks/use-breakpoint.ts", "../../../../src/components/shell.types.ts"],
4
- "sourcesContent": ["'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\n/** Content padding per menu size, in px (see base-menu.css). */\n// The panel padding ladder (--panel-p-N).\nconst CONTENT_PADDING: Record<string, number> = { '1': 8, '2': 12, '3': 16, '4': 24 };\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.\n */\nfunction getMenuAlignOffset(size: string): number {\n return -(CONTENT_PADDING[size] ?? CONTENT_PADDING['2']);\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('kui-BaseMenuShortcut', className)}>\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n );\n}\n\nexport {\n resolveResponsiveValue,\n useResolvedResponsiveValue,\n getMenuAlignOffset,\n toAriaKeyShortcuts,\n MenuShortcut,\n};\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { kbdPropDefs } from './kbd.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype KbdElement = React.ElementRef<'kbd'>;\ntype KbdOwnProps = GetPropDefTypes<typeof kbdPropDefs>;\ninterface KbdProps extends ComponentPropsWithout<'kbd', RemovedProps>, KbdOwnProps {}\nconst Kbd = React.forwardRef<KbdElement, KbdProps>((props, forwardedRef) => {\n const { asChild, className, ...kbdProps } = extractProps(props, kbdPropDefs);\n const Comp = asChild ? Slot.Root : 'kbd';\n return (\n <Comp\n {...kbdProps}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-Kbd', className)}\n />\n );\n});\nKbd.displayName = 'Kbd';\n\nexport { Kbd };\nexport type { KbdProps };\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 { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst variants = ['raised', 'soft'] as const;\n\nconst kbdPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'kui-variant',\n values: variants,\n default: 'raised',\n },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { kbdPropDefs };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\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' | '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": ";6kBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,kBAAAE,GAAA,uBAAAC,GAAA,2BAAAC,EAAA,uBAAAC,GAAA,+BAAAC,KAAA,eAAAC,GAAAP,IAEA,IAAAQ,EAAuB,oBACvBC,EAAuB,yBCHvB,IAAAC,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAqB,oBCArB,IAAMC,EAAiB,CAKrB,QAAS,CACP,KAAM,SACR,CACF,ECNA,IAAMC,GAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EACpDC,GAAW,CAAC,SAAU,MAAM,EAE5BC,EAAc,CAClB,GAAGC,EACH,KAAM,CACJ,KAAM,OACN,UAAW,aACX,OAAQH,GACR,WAAY,EACd,EACA,QAAS,CACP,KAAM,OACN,UAAW,cACX,OAAQC,GACR,QAAS,QACX,CACF,ECrBA,IAAAG,EAAuB,yBC0CvB,IAAMC,GAAkC,CAAC,EACnCC,GAAiC,IAAI,IAE3C,S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E,gBAACE,EAAA,CAAI,KAAK,KAAKP,CAAS,CAC1B,CAEJ",
4
+ "sourcesContent": ["'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\n/** Content padding per menu size, in px (see base-menu.css). */\n// The panel padding ladder (--panel-p-N).\nconst CONTENT_PADDING: Record<string, number> = { '1': 8, '2': 12, '3': 16, '4': 24 };\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.\n */\nfunction getMenuAlignOffset(size: string): number {\n return -(CONTENT_PADDING[size] ?? CONTENT_PADDING['2']);\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('kui-BaseMenuShortcut', className)}>\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n );\n}\n\nexport {\n resolveResponsiveValue,\n useResolvedResponsiveValue,\n getMenuAlignOffset,\n toAriaKeyShortcuts,\n MenuShortcut,\n};\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { kbdPropDefs } from './kbd.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype KbdElement = React.ElementRef<'kbd'>;\ntype KbdOwnProps = GetPropDefTypes<typeof kbdPropDefs>;\ninterface KbdProps extends ComponentPropsWithout<'kbd', RemovedProps>, KbdOwnProps {}\nconst Kbd = React.forwardRef<KbdElement, KbdProps>((props, forwardedRef) => {\n const { asChild, className, ...kbdProps } = extractProps(props, kbdPropDefs);\n const Comp = asChild ? Slot.Root : 'kbd';\n return (\n <Comp\n {...kbdProps}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-Kbd', className)}\n />\n );\n});\nKbd.displayName = 'Kbd';\n\nexport { Kbd };\nexport type { KbdProps };\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 { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst variants = ['raised', 'soft'] as const;\n\nconst kbdPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'kui-variant',\n values: variants,\n default: 'raised',\n },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { kbdPropDefs };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\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' | '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\n/**\n * Why a pane's open state changed. Only a user action is reported: `toggle` for a Trigger or a\n * handle double-click, and `dismiss` for Escape or a press on the scrim.\n */\nexport type PaneOpenChangeReason = 'toggle' | 'dismiss';\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 onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\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\n/** The panes a Trigger can drive. */\nexport type PaneTarget = 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\nexport type PaneName = PaneTarget;\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": ";6kBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,kBAAAE,GAAA,uBAAAC,GAAA,2BAAAC,EAAA,uBAAAC,GAAA,+BAAAC,KAAA,eAAAC,GAAAP,IAEA,IAAAQ,EAAuB,oBACvBC,EAAuB,yBCHvB,IAAAC,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAqB,oBCArB,IAAMC,EAAiB,CAKrB,QAAS,CACP,KAAM,SACR,CACF,ECNA,IAAMC,GAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK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,YAAY,CAAC,IAClDA,EAAM,SAAW,EAAIA,EAAM,YAAY,EAAIA,EAC9D,EACmB,KAAK,GAAG,EAC5B,OAAAL,EAAsB,IAAIE,EAAUE,CAAM,EACnCA,GAAU,MACnB,CAOA,SAASE,GAAa,CAAE,SAAAJ,EAAU,UAAAK,CAAU,EAA6C,CACvF,OACE,gBAAC,OAAI,cAAW,GAAC,aAAW,EAAAC,SAAW,uBAAwBD,CAAS,GACtE,gBAACE,EAAA,CAAI,KAAK,KAAKP,CAAS,CAC1B,CAEJ",
6
6
  "names": ["base_menu_utils_exports", "__export", "MenuShortcut", "getMenuAlignOffset", "resolveResponsiveValue", "toAriaKeyShortcuts", "useResolvedResponsiveValue", "__toCommonJS", "React", "import_classnames", "React", "import_classnames", "import_radix_ui", "asChildPropDef", "sizes", "variants", "kbdPropDefs", "asChildPropDef", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "includesValue", "propValues", "propValueSet", "value", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "parseValue", "getBaseClassName", "isResponsiveObject", "object", "classNames", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "parsed", "customProperty", "bpProperty", "mergeStyles", "styles", "result", "style", "normalizeResponsiveValue", "value", "propDef", "initial", "changed", "extractProps", "props", "propDefs", "styling", "passthrough", "stylingKeys", "getCompiledPropDefs", "extractedProps", "key", "i", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "Kbd", "props", "forwardedRef", "asChild", "className", "kbdProps", "extractProps", "kbdPropDefs", "Comp", "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", "CONTENT_PADDING", "getMenuAlignOffset", "size", "KEY_SYMBOLS", "ariaKeyShortcutsCache", "toAriaKeyShortcuts", "shortcut", "cached", "result", "token", "MenuShortcut", "className", "classNames", "Kbd"]
7
7
  }
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";"use client";var T=Object.create;var p=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var A=(e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})},g=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of L(t))!I.call(e,o)&&o!==n&&p(e,o,{get:()=>t[o],enumerable:!(i=z(t,o))||i.enumerable});return e};var d=(e,t,n)=>(n=e!=null?T(w(e)):{},g(t||!e||!e.__esModule?p(n,"default",{value:e,enumerable:!0}):n,e)),N=e=>g(p({},"__esModule",{value:!0}),e);var X={};A(X,{MenuCloseProvider:()=>W,MenuGroupLabelProvider:()=>$,MenuProvider:()=>q,getMenuItemHeight:()=>k,menuSizeToItemHeight:()=>C,useMenuClose:()=>Y,useMenuContext:()=>U,useMenuGroupLabelId:()=>J,useMenuGroupLabelledBy:()=>F});module.exports=N(X);var r=d(require("react")),h=require("radix-ui/internal");var j=d(require("react")),H=d(require("classnames"));var u=d(require("react"));var y={xs:"(min-width: 520px)",sm:"(min-width: 768px)",md:"(min-width: 1024px)",lg:"(min-width: 1280px)",xl:"(min-width: 1640px)"};var O=Object.entries(y),l=null,a=new Set,s=null;function f(){return l??(l=O.map(([e,t])=>[e,window.matchMedia(t)])),l}function m(){let e="initial";for(let[t,n]of f())n.matches&&(e=t);return e}function c(){let e=m();e!==s&&(s=e,a.forEach(t=>t()))}function v(e){if(typeof window>"u")return()=>{};if(a.size===0){s=m();for(let[,t]of f())typeof t.addEventListener=="function"?t.addEventListener("change",c):t.addListener?.(c)}return a.add(e),()=>{if(a.delete(e),!(a.size>0)){for(let[,t]of f())try{typeof t.removeEventListener=="function"?t.removeEventListener("change",c):t.removeListener?.(c)}catch{}s=null}}}function K(){return typeof window>"u"?"initial":(s??(s=m()),s)}function V(){return"initial"}var _=()=>!0,D=()=>!1,P=()=>()=>{},G=()=>"initial";function M(e=!0){let t=u.useSyncExternalStore(e?v:P,e?K:G,V),n=u.useSyncExternalStore(e?v:P,_,D);return u.useMemo(()=>({breakpoint:t,ready:n}),[t,n])}var x=["xl","lg","md","sm","xs","initial"];function Q(e,t,n){if(e==null)return n;if(typeof e!="object")return e;let i=e;for(let o=x.indexOf(t);o<x.length;o++){let S=i[x[o]];if(S!==void 0)return S}return n}function b(e,t){let n=typeof e=="object"&&e!==null,{breakpoint:i}=M(n);return Q(e,i,t)}var B=r.createContext({isInsideMenu:!1}),R=r.createContext(null),C={1:24,2:30,3:34,4:38};function k(e){return C[e]}function q({children:e,size:t}){let n=b(t,void 0),i=n?k(n):void 0,o=r.useMemo(()=>({isInsideMenu:!0,size:n,itemHeight:i}),[n,i]);return r.createElement(B.Provider,{value:o},r.createElement(R.Provider,{value:null},e))}function U(){return r.useContext(B)}var E=r.createContext(void 0),W=E.Provider;function Y(){return r.useContext(E)}var $=R.Provider;function F(e){let[t,n]=r.useState(null);return[e??t??void 0,n]}function J(e,t=!0){let n=r.useContext(R),i=r.useId(),o=e??i;return(0,h.useLayoutEffect)(()=>{if(!(!n||!t))return n(o),()=>n(null)},[n,o,t]),n?o:e}
2
+ "use strict";"use client";var T=Object.create;var p=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var A=(e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})},g=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of z(t))!I.call(e,o)&&o!==n&&p(e,o,{get:()=>t[o],enumerable:!(i=L(t,o))||i.enumerable});return e};var d=(e,t,n)=>(n=e!=null?T(w(e)):{},g(t||!e||!e.__esModule?p(n,"default",{value:e,enumerable:!0}):n,e)),N=e=>g(p({},"__esModule",{value:!0}),e);var X={};A(X,{MenuCloseProvider:()=>W,MenuGroupLabelProvider:()=>$,MenuProvider:()=>q,getMenuItemHeight:()=>k,menuSizeToItemHeight:()=>C,useMenuClose:()=>Y,useMenuContext:()=>U,useMenuGroupLabelId:()=>J,useMenuGroupLabelledBy:()=>F});module.exports=N(X);var r=d(require("react")),h=require("radix-ui/internal");var j=d(require("react")),H=d(require("classnames"));var u=d(require("react"));var y={xs:"(min-width: 520px)",sm:"(min-width: 768px)",md:"(min-width: 1024px)",lg:"(min-width: 1280px)",xl:"(min-width: 1640px)"};var O=Object.entries(y),l=null,a=new Set,s=null;function f(){return l??(l=O.map(([e,t])=>[e,window.matchMedia(t)])),l}function m(){let e="initial";for(let[t,n]of f())n.matches&&(e=t);return e}function c(){let e=m();e!==s&&(s=e,a.forEach(t=>t()))}function M(e){if(typeof window>"u")return()=>{};if(a.size===0){s=m();for(let[,t]of f())typeof t.addEventListener=="function"?t.addEventListener("change",c):t.addListener?.(c)}return a.add(e),()=>{if(a.delete(e),!(a.size>0)){for(let[,t]of f())try{typeof t.removeEventListener=="function"?t.removeEventListener("change",c):t.removeListener?.(c)}catch{}s=null}}}function K(){return typeof window>"u"?"initial":(s??(s=m()),s)}function V(){return"initial"}var _=()=>!0,D=()=>!1,v=()=>()=>{},G=()=>"initial";function P(e=!0){let t=u.useSyncExternalStore(e?M:v,e?K:G,V),n=u.useSyncExternalStore(e?M:v,_,D);return u.useMemo(()=>({breakpoint:t,ready:n}),[t,n])}var x=["xl","lg","md","sm","xs","initial"];function Q(e,t,n){if(e==null)return n;if(typeof e!="object")return e;let i=e;for(let o=x.indexOf(t);o<x.length;o++){let S=i[x[o]];if(S!==void 0)return S}return n}function b(e,t){let n=typeof e=="object"&&e!==null,{breakpoint:i}=P(n);return Q(e,i,t)}var B=r.createContext({isInsideMenu:!1}),R=r.createContext(null),C={1:24,2:30,3:34,4:38};function k(e){return C[e]}function q({children:e,size:t}){let n=b(t,void 0),i=n?k(n):void 0,o=r.useMemo(()=>({isInsideMenu:!0,size:n,itemHeight:i}),[n,i]);return r.createElement(B.Provider,{value:o},r.createElement(R.Provider,{value:null},e))}function U(){return r.useContext(B)}var E=r.createContext(void 0),W=E.Provider;function Y(){return r.useContext(E)}var $=R.Provider;function F(e){let[t,n]=r.useState(null);return[e??t??void 0,n]}function J(e,t=!0){let n=r.useContext(R),i=r.useId(),o=e??i;return(0,h.useLayoutEffect)(()=>{if(!(!n||!t))return n(o),()=>n(null)},[n,o,t]),n?o:e}
3
3
  //# sourceMappingURL=menu-context.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/menu-context.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';\nimport { useLayoutEffect } from 'radix-ui/internal';\n\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' | '3' | '4';\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\n/** The register function of the menu Group a Label sits in (see useMenuGroupLabelId). */\nconst MenuGroupLabelContext = React.createContext<((id: string | null) => void) | null>(null);\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/**\n * Menu row height in pixels per size: the line height plus --row-inset-N above and below\n * (base-menu.css), never under the 24px target floor.\n */\nexport const menuSizeToItemHeight: Record<MenuSize, number> = {\n '1': 24,\n '2': 30,\n '3': 34,\n '4': 38,\n};\n\nexport function getMenuItemHeight(size: MenuSize): number {\n return menuSizeToItemHeight[size];\n}\n\nexport function MenuProvider({ children, size }: MenuProviderProps) {\n const resolvedSize = useResolvedResponsiveValue<MenuSize | undefined>(size, undefined);\n const itemHeight = resolvedSize ? getMenuItemHeight(resolvedSize) : undefined;\n const value = React.useMemo(\n () => ({ isInsideMenu: true, size: resolvedSize, itemHeight }),\n [resolvedSize, itemHeight],\n );\n // A submenu is its own surface, so its labels never name a group of the parent menu.\n return (\n <MenuContext.Provider value={value}>\n <MenuGroupLabelContext.Provider value={null}>{children}</MenuGroupLabelContext.Provider>\n </MenuContext.Provider>\n );\n}\n\nexport function useMenuContext() {\n return React.useContext(MenuContext);\n}\n\n/**\n * Closes the whole menu from inside it. DropdownMenu.Root and ContextMenu.Root provide it,\n * so a VirtualMenu row can close the menu on select the way a menu item does.\n */\nconst MenuCloseContext = React.createContext<(() => void) | undefined>(undefined);\nexport const MenuCloseProvider = MenuCloseContext.Provider;\n\nexport function useMenuClose() {\n return React.useContext(MenuCloseContext);\n}\n\n/**\n * Names a menu group by its label, the way v2's MenuGroup does. A Group holds the id of\n * the Label inside it and points aria-labelledby at it, so a screen reader announces the\n * section name when focus enters the group.\n */\nexport const MenuGroupLabelProvider = MenuGroupLabelContext.Provider;\n\n/** For a Group: the id its aria-labelledby points to, and the setter a nested Label calls. */\nexport function useMenuGroupLabelledBy(ariaLabelledBy: string | undefined) {\n const [labelId, setLabelId] = React.useState<string | null>(null);\n return [ariaLabelledBy ?? labelId ?? undefined, setLabelId] as const;\n}\n\n/** For a Label: its id, registered with the Group it sits in while the label is rendered. */\nexport function useMenuGroupLabelId(idProp: string | undefined, rendered = true) {\n const register = React.useContext(MenuGroupLabelContext);\n const generatedId = React.useId();\n const id = idProp ?? generatedId;\n useLayoutEffect(() => {\n if (!register || !rendered) return;\n register(id);\n return () => register(null);\n }, [register, id, rendered]);\n return register ? id : idProp;\n}\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\n/** Content padding per menu size, in px (see base-menu.css). */\n// The panel padding ladder (--panel-p-N).\nconst CONTENT_PADDING: Record<string, number> = { '1': 8, '2': 12, '3': 16, '4': 24 };\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.\n */\nfunction getMenuAlignOffset(size: string): number {\n return -(CONTENT_PADDING[size] ?? CONTENT_PADDING['2']);\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('kui-BaseMenuShortcut', className)}>\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n );\n}\n\nexport {\n resolveResponsiveValue,\n useResolvedResponsiveValue,\n getMenuAlignOffset,\n toAriaKeyShortcuts,\n MenuShortcut,\n};\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' | '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": ";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,EAAA,2B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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' | '3' | '4';\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\n/** The register function of the menu Group a Label sits in (see useMenuGroupLabelId). */\nconst MenuGroupLabelContext = React.createContext<((id: string | null) => void) | null>(null);\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/**\n * Menu row height in pixels per size: the line height plus --row-inset-N above and below\n * (base-menu.css), never under the 24px target floor.\n */\nexport const menuSizeToItemHeight: Record<MenuSize, number> = {\n '1': 24,\n '2': 30,\n '3': 34,\n '4': 38,\n};\n\nexport function getMenuItemHeight(size: MenuSize): number {\n return menuSizeToItemHeight[size];\n}\n\nexport function MenuProvider({ children, size }: MenuProviderProps) {\n const resolvedSize = useResolvedResponsiveValue<MenuSize | undefined>(size, undefined);\n const itemHeight = resolvedSize ? getMenuItemHeight(resolvedSize) : undefined;\n const value = React.useMemo(\n () => ({ isInsideMenu: true, size: resolvedSize, itemHeight }),\n [resolvedSize, itemHeight],\n );\n // A submenu is its own surface, so its labels never name a group of the parent menu.\n return (\n <MenuContext.Provider value={value}>\n <MenuGroupLabelContext.Provider value={null}>{children}</MenuGroupLabelContext.Provider>\n </MenuContext.Provider>\n );\n}\n\nexport function useMenuContext() {\n return React.useContext(MenuContext);\n}\n\n/**\n * Closes the whole menu from inside it. DropdownMenu.Root and ContextMenu.Root provide it,\n * so a VirtualMenu row can close the menu on select the way a menu item does.\n */\nconst MenuCloseContext = React.createContext<(() => void) | undefined>(undefined);\nexport const MenuCloseProvider = MenuCloseContext.Provider;\n\nexport function useMenuClose() {\n return React.useContext(MenuCloseContext);\n}\n\n/**\n * Names a menu group by its label, the way v2's MenuGroup does. A Group holds the id of\n * the Label inside it and points aria-labelledby at it, so a screen reader announces the\n * section name when focus enters the group.\n */\nexport const MenuGroupLabelProvider = MenuGroupLabelContext.Provider;\n\n/** For a Group: the id its aria-labelledby points to, and the setter a nested Label calls. */\nexport function useMenuGroupLabelledBy(ariaLabelledBy: string | undefined) {\n const [labelId, setLabelId] = React.useState<string | null>(null);\n return [ariaLabelledBy ?? labelId ?? undefined, setLabelId] as const;\n}\n\n/** For a Label: its id, registered with the Group it sits in while the label is rendered. */\nexport function useMenuGroupLabelId(idProp: string | undefined, rendered = true) {\n const register = React.useContext(MenuGroupLabelContext);\n const generatedId = React.useId();\n const id = idProp ?? generatedId;\n useLayoutEffect(() => {\n if (!register || !rendered) return;\n register(id);\n return () => register(null);\n }, [register, id, rendered]);\n return register ? id : idProp;\n}\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\n/** Content padding per menu size, in px (see base-menu.css). */\n// The panel padding ladder (--panel-p-N).\nconst CONTENT_PADDING: Record<string, number> = { '1': 8, '2': 12, '3': 16, '4': 24 };\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.\n */\nfunction getMenuAlignOffset(size: string): number {\n return -(CONTENT_PADDING[size] ?? CONTENT_PADDING['2']);\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('kui-BaseMenuShortcut', className)}>\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n );\n}\n\nexport {\n resolveResponsiveValue,\n useResolvedResponsiveValue,\n getMenuAlignOffset,\n toAriaKeyShortcuts,\n MenuShortcut,\n};\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' | '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\n/**\n * Why a pane's open state changed. Only a user action is reported: `toggle` for a Trigger or a\n * handle double-click, and `dismiss` for Escape or a press on the scrim.\n */\nexport type PaneOpenChangeReason = 'toggle' | 'dismiss';\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 onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\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\n/** The panes a Trigger can drive. */\nexport type PaneTarget = 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\nexport type PaneName = PaneTarget;\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": ";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,EAAA,2BAAAC,EAAA,iBAAAC,EAAA,sBAAAC,EAAA,yBAAAC,EAAA,iBAAAC,EAAA,mBAAAC,EAAA,wBAAAC,EAAA,2BAAAC,IAAA,eAAAC,EAAAX,GAEA,IAAAY,EAAuB,oBACvBC,EAAgC,6BCDhC,IAAAC,EAAuB,oBACvBC,EAAuB,yBCDvB,IAAAC,EAAuB,oBC+BhB,IAAMC,EAAe,CAC1B,GAAI,qBACJ,GAAI,qBACJ,GAAI,sBACJ,GAAI,sBACJ,GAAI,qBACN,EDlCA,IAAMC,EAAU,OAAO,QAAQC,CAAY,EASvCC,EAA8D,KAC5DC,EAAY,IAAI,IAClBC,EAAsC,KAE1C,SAASC,GAAqB,CAC5B,OAAAH,MAAoBF,EAAQ,IAAI,CAAC,CAACM,EAAMC,CAAK,IAAM,CAACD,EAAM,OAAO,WAAWC,CAAK,CAAC,CAAiC,GA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,GAAiB,CAC/B,OAAa,aAAWX,CAAW,CACrC,CAMA,IAAMY,EAAyB,gBAAwC,MAAS,EACnEC,EAAoBD,EAAiB,SAE3C,SAASE,GAAe,CAC7B,OAAa,aAAWF,CAAgB,CAC1C,CAOO,IAAMG,EAAyBd,EAAsB,SAGrD,SAASe,EAAuBC,EAAoC,CACzE,GAAM,CAACC,EAASC,CAAU,EAAU,WAAwB,IAAI,EAChE,MAAO,CAACF,GAAkBC,GAAW,OAAWC,CAAU,CAC5D,CAGO,SAASC,EAAoBC,EAA4BC,EAAW,GAAM,CAC/E,IAAMC,EAAiB,aAAWtB,CAAqB,EACjDuB,EAAoB,QAAM,EAC1BC,EAAKJ,GAAUG,EACrB,4BAAgB,IAAM,CACpB,GAAI,GAACD,GAAY,CAACD,GAClB,OAAAC,EAASE,CAAE,EACJ,IAAMF,EAAS,IAAI,CAC5B,EAAG,CAACA,EAAUE,EAAIH,CAAQ,CAAC,EACpBC,EAAWE,EAAKJ,CACzB",
6
6
  "names": ["menu_context_exports", "__export", "MenuCloseProvider", "MenuGroupLabelProvider", "MenuProvider", "getMenuItemHeight", "menuSizeToItemHeight", "useMenuClose", "useMenuContext", "useMenuGroupLabelId", "useMenuGroupLabelledBy", "__toCommonJS", "React", "import_internal", "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", "MenuGroupLabelContext", "menuSizeToItemHeight", "getMenuItemHeight", "size", "MenuProvider", "children", "resolvedSize", "useResolvedResponsiveValue", "itemHeight", "value", "useMenuContext", "MenuCloseContext", "MenuCloseProvider", "useMenuClose", "MenuGroupLabelProvider", "useMenuGroupLabelledBy", "ariaLabelledBy", "labelId", "setLabelId", "useMenuGroupLabelId", "idProp", "rendered", "register", "generatedId", "id"]
7
7
  }
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";"use client";var xe=Object.create;var x=Object.defineProperty;var Re=Object.getOwnPropertyDescriptor;var be=Object.getOwnPropertyNames;var De=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty;var Te=(t,e)=>{for(var r in e)x(t,r,{get:e[r],enumerable:!0})},W=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of be(e))!Ce.call(t,s)&&s!==r&&x(t,s,{get:()=>e[s],enumerable:!(n=Re(e,s))||n.enumerable});return t};var y=(t,e,r)=>(r=t!=null?xe(De(t)):{},W(e||!t||!t.__esModule?x(r,"default",{value:t,enumerable:!0}):r,t)),Ne=t=>W(x({},"__esModule",{value:!0}),t);var Ue={};Te(Ue,{BAND_STEP:()=>de,PaneChromeScope:()=>Ke,PaneFooter:()=>me,PaneHeader:()=>fe,Scroll:()=>ye,ShellContentContext:()=>ce,ShellSizeContext:()=>k,ShellWindowContext:()=>ue,SidebarVisualContext:()=>H,usePaneBandSize:()=>_e,useSidebarVisual:()=>w});module.exports=Ne(Ue);var u=y(require("react")),v=y(require("classnames"));var d=y(require("react")),ee=y(require("classnames")),P=require("radix-ui"),te=require("radix-ui/internal");var $={asChild:{type:"boolean"}};var we=["none","small","medium","large","full"],j={radius:{type:"enum",values:we,default:void 0}};var ke=["vertical","horizontal","both"],R={...$,...j,scrollbars:{type:"enum",values:ke,default:"both"},fade:{type:"boolean",default:!1}};var b=y(require("react"));function A(t){let e=getComputedStyle(t);return{x:e.overflowX==="hidden"?0:Math.max(0,t.scrollWidth-t.clientWidth),y:e.overflowY==="hidden"?0:Math.max(0,t.scrollHeight-t.clientHeight)}}function I(t){let[e,r]=b.useState(null);return b.useEffect(()=>{if(!t||!e)return;let n=0,s=()=>{n=0;let l=A(e),a=Math.max(0,e.scrollTop),c=Math.max(0,l.y-e.scrollTop);e.style.setProperty("--scroll-overflow-start",`${a}px`),e.style.setProperty("--scroll-overflow-end",`${c}px`);let f=Math.abs(e.scrollLeft),m=Math.max(0,l.x-f);e.style.setProperty("--scroll-overflow-x-start",`${f}px`),e.style.setProperty("--scroll-overflow-x-end",`${m}px`)},i=()=>{n||(n=requestAnimationFrame(s))};s(),e.addEventListener("scroll",i,{passive:!0});let o=typeof ResizeObserver>"u"?null:new ResizeObserver(i);o?.observe(e);for(let l of Array.from(e.children))o?.observe(l);let p=typeof MutationObserver>"u"?null:new MutationObserver(i);return p?.observe(e,{childList:!0}),()=>{n&&cancelAnimationFrame(n),e.removeEventListener("scroll",i),o?.disconnect(),p?.disconnect(),e.style.removeProperty("--scroll-overflow-start"),e.style.removeProperty("--scroll-overflow-end"),e.style.removeProperty("--scroll-overflow-x-start"),e.style.removeProperty("--scroll-overflow-x-end")}},[t,e]),r}var D=y(require("react"));function K(){let[t,e]=D.useState(null);return D.useEffect(()=>{let r=t?.parentElement;if(!t||!r)return;let n=0,s=()=>{n=0;for(let o of r.querySelectorAll(":scope > .kui-ScrollAreaScrollbar > .kui-ScrollAreaThumb")){let p=o.parentElement,l=getComputedStyle(p);if(p.dataset.orientation==="horizontal"){let a=p.clientWidth-parseFloat(l.paddingLeft)-parseFloat(l.paddingRight),c=G(t.scrollLeft,t.scrollWidth-t.offsetWidth,a-o.offsetWidth);o.style.transform=`translate3d(${c}px, 0, 0)`}else{let a=p.clientHeight-parseFloat(l.paddingTop)-parseFloat(l.paddingBottom),c=G(t.scrollTop,t.scrollHeight-t.offsetHeight,a-o.offsetHeight);o.style.transform=`translate3d(0, ${c}px, 0)`}}},i=()=>{n||(n=requestAnimationFrame(s))};return t.addEventListener("scroll",i,{passive:!0}),()=>{n&&cancelAnimationFrame(n),t.removeEventListener("scroll",i)}},[t]),e}function G(t,e,r){return e<=0||r<=0?0:Math.min(Math.max(t,-e),e)/e*r}var C=y(require("react"));function _(t,e){let{asChild:r,children:n}=t;if(!r)return typeof e=="function"?e(n):e;let s=C.Children.only(n);return C.cloneElement(s,{children:typeof e=="function"?e(s.props.children):e})}var Q=y(require("classnames"));var Ve=[],Ee=new Set;function Ae(t){let e=Object.assign({},...t),r=[],n=[],s=new Set;for(let i in e){let o=e[i],p=o.values??Ve,l={key:i,type:o.type,default:o.default,hasDefault:o.default!==void 0,responsive:"responsive"in o,className:o.className,customProperties:o.customProperties,parseValue:o.parseValue,values:p,valueSet:p.length>0?new Set(p):Ee,enumValueSet:o.type==="enum"?new Set([o.default,...p]):void 0};o.className?(r.push(l),s.add(i)):(l.hasDefault||o.type==="enum")&&n.push(l)}return{styling:r,passthrough:n,stylingKeys:s}}var Oe={children:new WeakMap};function U(t){let e=Oe;for(let r=0;r<t.length;r++){let n=t[r],s=e.children.get(n);s===void 0&&(s={children:new WeakMap},e.children.set(n,s)),e=s}return e.compiled??(e.compiled=Ae(t))}var ze=["initial","xs","sm","md","lg","xl"],O=new Set(ze);function z(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Me=new Set(["initial","xs","sm","md","lg","xl"]);function S(t){if(typeof t!="object"||t===null)return!1;for(let e in t)if(Me.has(e))return!0;return!1}function T(t,e,r){return e!==void 0?e.has(r):t.includes(r)}function Y({className:t,customProperties:e,...r}){let n=M({allowArbitraryValues:!0,className:t,...r}),s=Be({customProperties:e,...r});return[n,s]}function M({allowArbitraryValues:t,value:e,className:r,propValues:n,propValueSet:s,parseValue:i=o=>o}){if(e){if(typeof e=="string")return T(n,s,e)?q(r,e,i):t?r:void 0;if(S(e)){let o=e,p=[];for(let l in o){if(!z(o,l)||!O.has(l))continue;let a=o[l];if(a!==void 0){if(T(n,s,a)){let c=q(r,a,i),f=l==="initial"?c:`${l}:${c}`;p.push(f)}else if(t){let c=l==="initial"?r:`${l}:${r}`;p.push(c)}}}return p.length>0?p.join(" "):""}if(t)return r}}function q(t,e,r){let n=t?"-":"",s=r(e),i=s?.startsWith("-"),o=i?"-":"",p=i?s?.substring(1):s;return`${o}${t}${n}${p}`}function Be({customProperties:t,value:e,propValues:r,propValueSet:n,parseValue:s=i=>i}){if(!e||typeof e=="string"&&T(r,n,e))return;let i;if(typeof e=="string"){let o=s(e);i={};for(let p of t)i[p]=o;return i}if(S(e)){let o=e;for(let p in o){if(!z(o,p)||!O.has(p))continue;let l=o[p];if(l===void 0||T(r,n,l))continue;let a=s(l);i??(i={});for(let c of t){let f=p==="initial"?c:`${c}-${p}`;i[f]=a}}}return i??{}}function B(...t){let e;for(let r of t)r&&(e===void 0&&(e={}),Object.assign(e,r));return e}function He(t,e){let r=t.initial,n=!1;return e.hasDefault&&r===void 0&&(r=e.default,n=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(r)&&(r=e.default,n=!0),n?{...t,initial:r}:t}function X(t,...e){let{styling:r,passthrough:n,stylingKeys:s}=U(e),i={};for(let l in t)s.has(l)||(i[l]=t[l]);for(let l=0;l<n.length;l++){let a=n[l],c=i[a.key];if(c===void 0){a.hasDefault&&(i[a.key]=a.default);continue}a.enumValueSet!==void 0&&!a.enumValueSet.has(c)&&!S(c)&&(i[a.key]=a.default)}let o,p=[];for(let l=0;l<r.length;l++){let a=r[l],c=t[a.key];if(c===void 0&&a.hasDefault&&(c=a.default),a.enumValueSet!==void 0&&!a.enumValueSet.has(c)&&!S(c)&&(c=a.default),!!c){if(S(c)){if(!a.responsive)continue;c=He(c,a)}if(a.type==="enum"){let f=M({allowArbitraryValues:!1,value:c,className:a.className,propValues:a.values,propValueSet:a.valueSet,parseValue:a.parseValue});f&&p.push(f);continue}if(a.type==="string"||a.type==="enum | string"){let[f,m]=Y({className:a.className,customProperties:a.customProperties,propValues:a.type==="string"?[]:a.values,propValueSet:a.type==="string"?void 0:a.valueSet,parseValue:a.parseValue,value:c});m&&(o=B(o,m)),f&&p.push(f);continue}if(a.type==="boolean"){p.push(a.className);continue}}}return i.className=(0,Q.default)(p.length>0?p.join(" "):void 0,t.className),i.style=B(o,t.style),i}var J={width:{type:"string",className:"kui-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"kui-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"kui-r-max-w",customProperties:["--max-width"],responsive:!0}};var Z={height:{type:"string",className:"kui-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"kui-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"kui-r-max-h",customProperties:["--max-height"],responsive:!0}};var Le='[role="menu"], [role="listbox"]';function Fe(t,e){d.useEffect(()=>{if(!e||!t||t.closest(Le))return;let r=0,n=()=>{r=0;let o=A(t);o.x>0||o.y>0?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")},s=()=>{r||(r=requestAnimationFrame(n))};n();let i=typeof ResizeObserver>"u"?null:new ResizeObserver(s);i?.observe(t);for(let o of Array.from(t.children))i?.observe(o);return()=>{r&&cancelAnimationFrame(r),i?.disconnect()}},[t,e])}var N=d.forwardRef((t,e)=>{let{asChild:r,children:n,className:s,style:i,type:o,scrollHideDelay:p=o!=="scroll"?0:void 0,dir:l,radius:a=R.radius.default,scrollbars:c=R.scrollbars.default,fade:f=R.fade.default,...m}=X(t,J,Z),[V,E]=d.useState(null),Pe=I(f),Se=K(),ge=(0,te.useComposedRefs)(e,Pe,Se,E);Fe(V,m.tabIndex===void 0);let he=m["aria-label"]!==void 0||m["aria-labelledby"]!==void 0;return d.createElement(P.ScrollArea.Root,{type:o,scrollHideDelay:p,dir:l,className:(0,ee.default)("kui-ScrollAreaRoot",s),"data-fade":f?"":void 0,style:i,asChild:r},_({asChild:r,children:n},ve=>d.createElement(d.Fragment,null,d.createElement(P.ScrollArea.Viewport,{role:he?"region":void 0,...m,ref:ge,className:"kui-ScrollAreaViewport"},ve),d.createElement("div",{className:"kui-ScrollAreaViewportFocusRing"}),c!=="vertical"?d.createElement(P.ScrollArea.Scrollbar,{"data-radius":a,orientation:"horizontal",className:"kui-ScrollAreaScrollbar"},d.createElement(P.ScrollArea.Thumb,{className:"kui-ScrollAreaThumb"})):null,c!=="horizontal"?d.createElement(P.ScrollArea.Scrollbar,{"data-radius":a,orientation:"vertical",className:"kui-ScrollAreaScrollbar"},d.createElement(P.ScrollArea.Thumb,{className:"kui-ScrollAreaThumb"})):null,c==="both"?d.createElement(P.ScrollArea.Corner,{className:"kui-ScrollAreaCorner"}):null)))});N.displayName="ScrollArea";var g=y(require("react")),We=require("radix-ui/internal");var re=["initial","xs","sm","md","lg","xl"];function ne(t){return typeof t=="object"&&t!==null}function $e(t,e){let r={},n=null;for(let s of re){if(t!==void 0&&!ne(t)){r[s]=t;continue}let i=ne(t)?t[s]:void 0;i!==void 0&&(n={value:i}),r[s]=n?n.value:e(s)}return r}var kt=$e("fixed",()=>"fixed");var oe=g.createContext(null);var Vt=g.createContext(null);var se=y(require("react")),h=se.createContext(void 0);var ae=y(require("react")),je="(max-width: 767.98px) and (pointer: coarse)",ie,le=()=>ie??(ie=window.matchMedia(je));function Ie(t,e){return typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener?.(e),()=>t.removeListener?.(e))}function Ge(t){return Ie(le(),t)}function pe(){return ae.useSyncExternalStore(Ge,()=>le().matches,()=>!1)}var H=u.createContext(null);function w(){return u.useContext(H)}var k=u.createContext("2"),ce=u.createContext(!1),ue=u.createContext(!1);function Ke({children:t,presentation:e}){let r=u.useContext(k),n=u.useMemo(()=>({size:r,menuVariant:"soft",presentation:e}),[r,e]);return u.createElement(H.Provider,{value:n},t)}function L(){let t=w(),e=u.useContext(k),r=t?.size??e,n=t?.menuVariant??"soft";return["kui-ShellPaneChrome",`kui-r-size-${r}`,`kui-menu-variant-${n}`]}var de={1:"2",2:"3",3:"4",4:"4"};function F(){let t=w(),e=u.useContext(k);return de[t?.size??e]}function _e(){let t=u.useContext(h),e=u.useContext(oe)!==null,r=F();return t!==void 0?t:e?r:null}var fe=u.forwardRef(({className:t,float:e,children:r,...n},s)=>{let i=L(),o=F();return u.createElement("div",{...n,ref:s,"data-float":e||void 0,className:(0,v.default)("kui-ShellPaneHeader","kui-SidebarHeader","kui-SidebarHeader--container",...i,t)},u.createElement(h.Provider,{value:o},r))});fe.displayName="Shell.PaneHeader";var me=u.forwardRef(({className:t,float:e,children:r,...n},s)=>{let i=L(),o=F();return u.createElement("div",{...n,ref:s,"data-float":e||void 0,className:(0,v.default)("kui-ShellPaneFooter","kui-SidebarFooter","kui-SidebarFooter--container",...i,t)},u.createElement(h.Provider,{value:o},r))});me.displayName="Shell.PaneFooter";var ye=u.forwardRef(({className:t,style:e,dir:r,children:n,fade:s=!1,pane:i=!1,...o},p)=>{let l=L(),a=u.useContext(ce),c=w(),f=a&&c===null&&!i,m=u.useContext(ue),V=pe();if(f){let E=o.tabIndex??(m&&V?-1:void 0);return u.createElement(N,{...o,tabIndex:E,ref:p,type:"hover",fade:s,className:"kui-ShellScroll"},u.createElement("div",{style:e,dir:r,className:(0,v.default)("kui-ShellScrollContent",t)},n))}return u.createElement(N,{...o,ref:p,type:"hover",fade:s,className:"kui-ShellScroll"},u.createElement("div",{style:e,dir:r,className:(0,v.default)("kui-BaseMenuContent","kui-SidebarContent",...l,t)},u.createElement(h.Provider,{value:null},u.createElement("div",{className:"kui-BaseMenuViewport"},n))))});ye.displayName="Shell.Scroll";
2
+ "use strict";"use client";var Re=Object.create;var R=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var be=Object.getOwnPropertyNames;var De=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty;var Te=(t,e)=>{for(var r in e)R(t,r,{get:e[r],enumerable:!0})},W=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of be(e))!Ce.call(t,s)&&s!==r&&R(t,s,{get:()=>e[s],enumerable:!(o=xe(e,s))||o.enumerable});return t};var y=(t,e,r)=>(r=t!=null?Re(De(t)):{},W(e||!t||!t.__esModule?R(r,"default",{value:t,enumerable:!0}):r,t)),Ne=t=>W(R({},"__esModule",{value:!0}),t);var Ue={};Te(Ue,{BAND_STEP:()=>de,PaneChromeScope:()=>Ke,PaneFooter:()=>me,PaneHeader:()=>fe,Scroll:()=>ye,ShellContentContext:()=>ce,ShellSizeContext:()=>k,ShellWindowContext:()=>ue,SidebarVisualContext:()=>H,usePaneBandSize:()=>_e,useSidebarVisual:()=>w});module.exports=Ne(Ue);var u=y(require("react")),v=y(require("classnames"));var d=y(require("react")),ee=y(require("classnames")),P=require("radix-ui"),te=require("radix-ui/internal");var j={asChild:{type:"boolean"}};var we=["none","small","medium","large","full"],$={radius:{type:"enum",values:we,default:void 0}};var ke=["vertical","horizontal","both"],x={...j,...$,scrollbars:{type:"enum",values:ke,default:"both"},fade:{type:"boolean",default:!1}};var b=y(require("react"));function A(t){let e=getComputedStyle(t);return{x:e.overflowX==="hidden"?0:Math.max(0,t.scrollWidth-t.clientWidth),y:e.overflowY==="hidden"?0:Math.max(0,t.scrollHeight-t.clientHeight)}}function I(t){let[e,r]=b.useState(null);return b.useEffect(()=>{if(!t||!e)return;let o=0,s=()=>{o=0;let l=A(e),a=Math.max(0,e.scrollTop),c=Math.max(0,l.y-e.scrollTop);e.style.setProperty("--scroll-overflow-start",`${a}px`),e.style.setProperty("--scroll-overflow-end",`${c}px`);let f=Math.abs(e.scrollLeft),m=Math.max(0,l.x-f);e.style.setProperty("--scroll-overflow-x-start",`${f}px`),e.style.setProperty("--scroll-overflow-x-end",`${m}px`)},i=()=>{o||(o=requestAnimationFrame(s))};s(),e.addEventListener("scroll",i,{passive:!0});let n=typeof ResizeObserver>"u"?null:new ResizeObserver(i);n?.observe(e);for(let l of Array.from(e.children))n?.observe(l);let p=typeof MutationObserver>"u"?null:new MutationObserver(i);return p?.observe(e,{childList:!0}),()=>{o&&cancelAnimationFrame(o),e.removeEventListener("scroll",i),n?.disconnect(),p?.disconnect(),e.style.removeProperty("--scroll-overflow-start"),e.style.removeProperty("--scroll-overflow-end"),e.style.removeProperty("--scroll-overflow-x-start"),e.style.removeProperty("--scroll-overflow-x-end")}},[t,e]),r}var D=y(require("react"));function K(){let[t,e]=D.useState(null);return D.useEffect(()=>{let r=t?.parentElement;if(!t||!r)return;let o=0,s=()=>{o=0;for(let n of r.querySelectorAll(":scope > .kui-ScrollAreaScrollbar > .kui-ScrollAreaThumb")){let p=n.parentElement,l=getComputedStyle(p);if(p.dataset.orientation==="horizontal"){let a=p.clientWidth-parseFloat(l.paddingLeft)-parseFloat(l.paddingRight),c=G(t.scrollLeft,t.scrollWidth-t.offsetWidth,a-n.offsetWidth);n.style.transform=`translate3d(${c}px, 0, 0)`}else{let a=p.clientHeight-parseFloat(l.paddingTop)-parseFloat(l.paddingBottom),c=G(t.scrollTop,t.scrollHeight-t.offsetHeight,a-n.offsetHeight);n.style.transform=`translate3d(0, ${c}px, 0)`}}},i=()=>{o||(o=requestAnimationFrame(s))};return t.addEventListener("scroll",i,{passive:!0}),()=>{o&&cancelAnimationFrame(o),t.removeEventListener("scroll",i)}},[t]),e}function G(t,e,r){return e<=0||r<=0?0:Math.min(Math.max(t,-e),e)/e*r}var C=y(require("react"));function _(t,e){let{asChild:r,children:o}=t;if(!r)return typeof e=="function"?e(o):e;let s=C.Children.only(o);return C.cloneElement(s,{children:typeof e=="function"?e(s.props.children):e})}var Q=y(require("classnames"));var Ve=[],Ee=new Set;function Ae(t){let e=Object.assign({},...t),r=[],o=[],s=new Set;for(let i in e){let n=e[i],p=n.values??Ve,l={key:i,type:n.type,default:n.default,hasDefault:n.default!==void 0,responsive:"responsive"in n,className:n.className,customProperties:n.customProperties,parseValue:n.parseValue,values:p,valueSet:p.length>0?new Set(p):Ee,enumValueSet:n.type==="enum"?new Set([n.default,...p]):void 0};n.className?(r.push(l),s.add(i)):(l.hasDefault||n.type==="enum")&&o.push(l)}return{styling:r,passthrough:o,stylingKeys:s}}var Oe={children:new WeakMap};function U(t){let e=Oe;for(let r=0;r<t.length;r++){let o=t[r],s=e.children.get(o);s===void 0&&(s={children:new WeakMap},e.children.set(o,s)),e=s}return e.compiled??(e.compiled=Ae(t))}var ze=["initial","xs","sm","md","lg","xl"],O=new Set(ze);function z(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Me=new Set(["initial","xs","sm","md","lg","xl"]);function g(t){if(typeof t!="object"||t===null)return!1;for(let e in t)if(Me.has(e))return!0;return!1}function T(t,e,r){return e!==void 0?e.has(r):t.includes(r)}function Y({className:t,customProperties:e,...r}){let o=M({allowArbitraryValues:!0,className:t,...r}),s=Be({customProperties:e,...r});return[o,s]}function M({allowArbitraryValues:t,value:e,className:r,propValues:o,propValueSet:s,parseValue:i=n=>n}){if(e){if(typeof e=="string")return T(o,s,e)?q(r,e,i):t?r:void 0;if(g(e)){let n=e,p=[];for(let l in n){if(!z(n,l)||!O.has(l))continue;let a=n[l];if(a!==void 0){if(T(o,s,a)){let c=q(r,a,i),f=l==="initial"?c:`${l}:${c}`;p.push(f)}else if(t){let c=l==="initial"?r:`${l}:${r}`;p.push(c)}}}return p.length>0?p.join(" "):""}if(t)return r}}function q(t,e,r){let o=t?"-":"",s=r(e),i=s?.startsWith("-"),n=i?"-":"",p=i?s?.substring(1):s;return`${n}${t}${o}${p}`}function Be({customProperties:t,value:e,propValues:r,propValueSet:o,parseValue:s=i=>i}){if(!e||typeof e=="string"&&T(r,o,e))return;let i;if(typeof e=="string"){let n=s(e);i={};for(let p of t)i[p]=n;return i}if(g(e)){let n=e;for(let p in n){if(!z(n,p)||!O.has(p))continue;let l=n[p];if(l===void 0||T(r,o,l))continue;let a=s(l);i??(i={});for(let c of t){let f=p==="initial"?c:`${c}-${p}`;i[f]=a}}}return i??{}}function B(...t){let e;for(let r of t)r&&(e===void 0&&(e={}),Object.assign(e,r));return e}function He(t,e){let r=t.initial,o=!1;return e.hasDefault&&r===void 0&&(r=e.default,o=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(r)&&(r=e.default,o=!0),o?{...t,initial:r}:t}function X(t,...e){let{styling:r,passthrough:o,stylingKeys:s}=U(e),i={};for(let l in t)s.has(l)||(i[l]=t[l]);for(let l=0;l<o.length;l++){let a=o[l],c=i[a.key];if(c===void 0){a.hasDefault&&(i[a.key]=a.default);continue}a.enumValueSet!==void 0&&!a.enumValueSet.has(c)&&!g(c)&&(i[a.key]=a.default)}let n,p=[];for(let l=0;l<r.length;l++){let a=r[l],c=t[a.key];if(c===void 0&&a.hasDefault&&(c=a.default),a.enumValueSet!==void 0&&!a.enumValueSet.has(c)&&!g(c)&&(c=a.default),!!c){if(g(c)){if(!a.responsive)continue;c=He(c,a)}if(a.type==="enum"){let f=M({allowArbitraryValues:!1,value:c,className:a.className,propValues:a.values,propValueSet:a.valueSet,parseValue:a.parseValue});f&&p.push(f);continue}if(a.type==="string"||a.type==="enum | string"){let[f,m]=Y({className:a.className,customProperties:a.customProperties,propValues:a.type==="string"?[]:a.values,propValueSet:a.type==="string"?void 0:a.valueSet,parseValue:a.parseValue,value:c});m&&(n=B(n,m)),f&&p.push(f);continue}if(a.type==="boolean"){p.push(a.className);continue}}}return i.className=(0,Q.default)(p.length>0?p.join(" "):void 0,t.className),i.style=B(n,t.style),i}var J={width:{type:"string",className:"kui-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"kui-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"kui-r-max-w",customProperties:["--max-width"],responsive:!0}};var Z={height:{type:"string",className:"kui-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"kui-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"kui-r-max-h",customProperties:["--max-height"],responsive:!0}};var Le='[role="menu"], [role="listbox"]';function Fe(t,e){d.useEffect(()=>{if(!e||!t||t.closest(Le))return;let r=0,o=()=>{r=0;let n=A(t);n.x>0||n.y>0?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")},s=()=>{r||(r=requestAnimationFrame(o))};o();let i=typeof ResizeObserver>"u"?null:new ResizeObserver(s);i?.observe(t);for(let n of Array.from(t.children))i?.observe(n);return()=>{r&&cancelAnimationFrame(r),i?.disconnect()}},[t,e])}var N=d.forwardRef((t,e)=>{let{asChild:r,children:o,className:s,style:i,type:n,scrollHideDelay:p=n!=="scroll"?0:void 0,dir:l,radius:a=x.radius.default,scrollbars:c=x.scrollbars.default,fade:f=x.fade.default,...m}=X(t,J,Z),[V,E]=d.useState(null),Pe=I(f),ge=K(),Se=(0,te.useComposedRefs)(e,Pe,ge,E);Fe(V,m.tabIndex===void 0);let he=m["aria-label"]!==void 0||m["aria-labelledby"]!==void 0;return d.createElement(P.ScrollArea.Root,{type:n,scrollHideDelay:p,dir:l,className:(0,ee.default)("kui-ScrollAreaRoot",s),"data-fade":f?"":void 0,style:i,asChild:r},_({asChild:r,children:o},ve=>d.createElement(d.Fragment,null,d.createElement(P.ScrollArea.Viewport,{role:he?"region":void 0,...m,ref:Se,className:"kui-ScrollAreaViewport"},ve),d.createElement("div",{className:"kui-ScrollAreaViewportFocusRing"}),c!=="vertical"?d.createElement(P.ScrollArea.Scrollbar,{"data-radius":a,orientation:"horizontal",className:"kui-ScrollAreaScrollbar"},d.createElement(P.ScrollArea.Thumb,{className:"kui-ScrollAreaThumb"})):null,c!=="horizontal"?d.createElement(P.ScrollArea.Scrollbar,{"data-radius":a,orientation:"vertical",className:"kui-ScrollAreaScrollbar"},d.createElement(P.ScrollArea.Thumb,{className:"kui-ScrollAreaThumb"})):null,c==="both"?d.createElement(P.ScrollArea.Corner,{className:"kui-ScrollAreaCorner"}):null)))});N.displayName="ScrollArea";var S=y(require("react")),We=require("radix-ui/internal");var re=["initial","xs","sm","md","lg","xl"];function oe(t){return typeof t=="object"&&t!==null}function je(t,e){let r={},o=null;for(let s of re){if(t!==void 0&&!oe(t)){r[s]=t;continue}let i=oe(t)?t[s]:void 0;i!==void 0&&(o={value:i}),r[s]=o?o.value:e(s)}return r}var kt=je("fixed",()=>"fixed");var ne=S.createContext(null);var Vt=S.createContext(null);var se=y(require("react")),h=se.createContext(void 0);var ae=y(require("react")),$e="(max-width: 767.98px) and (pointer: coarse)",ie,le=()=>ie??(ie=window.matchMedia($e));function Ie(t,e){return typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener?.(e),()=>t.removeListener?.(e))}function Ge(t){return Ie(le(),t)}function pe(){return ae.useSyncExternalStore(Ge,()=>le().matches,()=>!1)}var H=u.createContext(null);function w(){return u.useContext(H)}var k=u.createContext("2"),ce=u.createContext(!1),ue=u.createContext(!1);function Ke({children:t,presentation:e}){let r=u.useContext(k),o=u.useMemo(()=>({size:r,menuVariant:"soft",presentation:e}),[r,e]);return u.createElement(H.Provider,{value:o},t)}function L(){let t=w(),e=u.useContext(k),r=t?.size??e,o=t?.menuVariant??"soft";return["kui-ShellPaneChrome",`kui-r-size-${r}`,`kui-menu-variant-${o}`]}var de={1:"2",2:"3",3:"4",4:"4"};function F(){let t=w(),e=u.useContext(k);return de[t?.size??e]}function _e(){let t=u.useContext(h),e=u.useContext(ne)!==null,r=F();return t!==void 0?t:e?r:null}var fe=u.forwardRef(({className:t,float:e,children:r,...o},s)=>{let i=L(),n=F();return u.createElement("div",{...o,ref:s,"data-float":e||void 0,className:(0,v.default)("kui-ShellPaneHeader","kui-SidebarHeader","kui-SidebarHeader--container",...i,t)},u.createElement(h.Provider,{value:n},r))});fe.displayName="Shell.PaneHeader";var me=u.forwardRef(({className:t,float:e,children:r,...o},s)=>{let i=L(),n=F();return u.createElement("div",{...o,ref:s,"data-float":e||void 0,className:(0,v.default)("kui-ShellPaneFooter","kui-SidebarFooter","kui-SidebarFooter--container",...i,t)},u.createElement(h.Provider,{value:n},r))});me.displayName="Shell.PaneFooter";var ye=u.forwardRef(({className:t,style:e,dir:r,children:o,fade:s=!1,pane:i=!1,...n},p)=>{let l=L(),a=u.useContext(ce),c=w(),f=a&&c===null&&!i,m=u.useContext(ue),V=pe();if(f){let E=n.tabIndex??(m&&V?-1:void 0);return u.createElement(N,{...n,tabIndex:E,ref:p,type:"hover",fade:s,className:"kui-ShellScroll"},u.createElement("div",{style:e,dir:r,className:(0,v.default)("kui-ShellScrollContent",t)},o))}return u.createElement(N,{...n,ref:p,type:"hover",fade:s,className:"kui-ShellScroll"},u.createElement("div",{style:e,dir:r,className:(0,v.default)("kui-BaseMenuContent","kui-SidebarContent",...l,t)},u.createElement(h.Provider,{value:null},u.createElement("div",{className:"kui-BaseMenuViewport"},o))))});ye.displayName="Shell.Scroll";
3
3
  //# sourceMappingURL=pane-chrome.js.map