@womp/kookie-ui 0.30.0 → 0.31.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 (277) hide show
  1. package/components.css +41 -0
  2. package/dist/cjs/components/_internal/page-scope.d.ts +48 -0
  3. package/dist/cjs/components/_internal/page-scope.d.ts.map +1 -0
  4. package/dist/cjs/components/_internal/page-scope.js +3 -0
  5. package/dist/cjs/components/_internal/page-scope.js.map +7 -0
  6. package/dist/cjs/components/_internal/portal-theme.d.ts +2 -1
  7. package/dist/cjs/components/_internal/portal-theme.d.ts.map +1 -1
  8. package/dist/cjs/components/_internal/portal-theme.js +1 -1
  9. package/dist/cjs/components/_internal/portal-theme.js.map +4 -4
  10. package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
  11. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  12. package/dist/cjs/components/_internal/shell-bottom.js.map +4 -4
  13. package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
  14. package/dist/cjs/components/_internal/shell-inspector.js +1 -1
  15. package/dist/cjs/components/_internal/shell-inspector.js.map +4 -4
  16. package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
  17. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  18. package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
  19. package/dist/cjs/components/alert-dialog.js +1 -1
  20. package/dist/cjs/components/alert-dialog.js.map +4 -4
  21. package/dist/cjs/components/button.js +1 -1
  22. package/dist/cjs/components/button.js.map +4 -4
  23. package/dist/cjs/components/chatbar.js +1 -1
  24. package/dist/cjs/components/chatbar.js.map +4 -4
  25. package/dist/cjs/components/chip.js +1 -1
  26. package/dist/cjs/components/chip.js.map +4 -4
  27. package/dist/cjs/components/combobox.js +1 -1
  28. package/dist/cjs/components/combobox.js.map +4 -4
  29. package/dist/cjs/components/context-menu.js +1 -1
  30. package/dist/cjs/components/context-menu.js.map +4 -4
  31. package/dist/cjs/components/dialog.js +1 -1
  32. package/dist/cjs/components/dialog.js.map +4 -4
  33. package/dist/cjs/components/dropdown-menu.js +1 -1
  34. package/dist/cjs/components/dropdown-menu.js.map +4 -4
  35. package/dist/cjs/components/index.d.ts +1 -0
  36. package/dist/cjs/components/index.d.ts.map +1 -1
  37. package/dist/cjs/components/index.js +2 -2
  38. package/dist/cjs/components/index.js.map +4 -4
  39. package/dist/cjs/components/message-scroller.js +1 -1
  40. package/dist/cjs/components/message-scroller.js.map +4 -4
  41. package/dist/cjs/components/navigator.d.ts +11 -7
  42. package/dist/cjs/components/navigator.d.ts.map +1 -1
  43. package/dist/cjs/components/navigator.js +1 -1
  44. package/dist/cjs/components/navigator.js.map +4 -4
  45. package/dist/cjs/components/notice.js +1 -1
  46. package/dist/cjs/components/notice.js.map +4 -4
  47. package/dist/cjs/components/page.d.ts +31 -0
  48. package/dist/cjs/components/page.d.ts.map +1 -0
  49. package/dist/cjs/components/page.js +3 -0
  50. package/dist/cjs/components/page.js.map +7 -0
  51. package/dist/cjs/components/popover.js +1 -1
  52. package/dist/cjs/components/popover.js.map +4 -4
  53. package/dist/cjs/components/select.js +1 -1
  54. package/dist/cjs/components/select.js.map +4 -4
  55. package/dist/cjs/components/sheet.js +1 -1
  56. package/dist/cjs/components/sheet.js.map +4 -4
  57. package/dist/cjs/components/shell.d.ts.map +1 -1
  58. package/dist/cjs/components/shell.js +1 -1
  59. package/dist/cjs/components/shell.js.map +4 -4
  60. package/dist/cjs/components/sidebar.js +1 -1
  61. package/dist/cjs/components/sidebar.js.map +4 -4
  62. package/dist/cjs/components/toggle.js +1 -1
  63. package/dist/cjs/components/toggle.js.map +4 -4
  64. package/dist/cjs/components/toolbar.d.ts +5 -1
  65. package/dist/cjs/components/toolbar.d.ts.map +1 -1
  66. package/dist/cjs/components/toolbar.js +1 -1
  67. package/dist/cjs/components/toolbar.js.map +4 -4
  68. package/dist/cjs/components/tooltip.js +1 -1
  69. package/dist/cjs/components/tooltip.js.map +4 -4
  70. package/dist/cjs/index.js +5 -5
  71. package/dist/cjs/index.js.map +4 -4
  72. package/dist/esm/{chunk-HBO7W7SS.js → chunk-26O4RBOJ.js} +2 -2
  73. package/dist/esm/{chunk-FYTLUDL3.js → chunk-3M5ZM67R.js} +2 -2
  74. package/dist/esm/chunk-4B3S2DM7.js +3 -0
  75. package/dist/esm/chunk-4B3S2DM7.js.map +7 -0
  76. package/dist/esm/{chunk-NEKIU24N.js → chunk-4ZHBNYXM.js} +2 -2
  77. package/dist/esm/{chunk-TSS4K2U5.js → chunk-5VYQDA5S.js} +2 -2
  78. package/dist/esm/chunk-65URNXF2.js +3 -0
  79. package/dist/esm/chunk-65URNXF2.js.map +7 -0
  80. package/dist/esm/chunk-6SGJWML7.js +3 -0
  81. package/dist/esm/chunk-6SGJWML7.js.map +7 -0
  82. package/dist/esm/{chunk-R4UKO4UK.js → chunk-6WHKGVWY.js} +2 -2
  83. package/dist/esm/{chunk-7V6M3MIR.js → chunk-7YXHLU4C.js} +2 -2
  84. package/dist/esm/chunk-AKMRPGNP.js +3 -0
  85. package/dist/esm/chunk-AKMRPGNP.js.map +7 -0
  86. package/dist/esm/{chunk-ENQV6SEA.js → chunk-AKSAKP35.js} +2 -2
  87. package/dist/esm/{chunk-C67MM24U.js → chunk-B7STVZPU.js} +2 -2
  88. package/dist/esm/{chunk-FRFVGYGX.js → chunk-BQOFHLDP.js} +2 -2
  89. package/dist/esm/{chunk-ZYQEFENG.js → chunk-COLJWVN7.js} +2 -2
  90. package/dist/esm/{chunk-K3GDM26A.js → chunk-D42VCLKH.js} +2 -2
  91. package/dist/esm/{chunk-MGWGD6KI.js → chunk-DFQIIYLD.js} +2 -2
  92. package/dist/esm/{chunk-NWXODCTD.js → chunk-EERKYRYI.js} +2 -2
  93. package/dist/esm/{chunk-4MNRLB57.js → chunk-FICBVI4M.js} +2 -2
  94. package/dist/esm/chunk-HGF4CKRY.js +3 -0
  95. package/dist/esm/chunk-HGF4CKRY.js.map +7 -0
  96. package/dist/esm/{chunk-JD4KR6VZ.js → chunk-HVMRB3AH.js} +2 -2
  97. package/dist/esm/{chunk-HLIOHDEX.js → chunk-IFHBMTFX.js} +2 -2
  98. package/dist/esm/{chunk-J54GYD7A.js → chunk-JFJV4HL3.js} +2 -2
  99. package/dist/esm/{chunk-KJZSXLIX.js → chunk-JQMWNI62.js} +2 -2
  100. package/dist/esm/{chunk-CMHKCUHP.js → chunk-K35JUIUT.js} +2 -2
  101. package/dist/esm/{chunk-67UEMB4K.js → chunk-KBSH6CBD.js} +2 -2
  102. package/dist/esm/{chunk-SUQJ7DD4.js → chunk-L7PRLW6A.js} +2 -2
  103. package/dist/esm/{chunk-D2C2A2ZK.js → chunk-LFAUMDU5.js} +2 -2
  104. package/dist/esm/{chunk-LABMK6Q7.js → chunk-LG5DPQ46.js} +2 -2
  105. package/dist/esm/{chunk-YMRN5ESN.js → chunk-NFSW36RG.js} +2 -2
  106. package/dist/esm/{chunk-6YWHNLSC.js → chunk-NJ7RQYLX.js} +2 -2
  107. package/dist/esm/{chunk-WD66RYF6.js → chunk-NYIYRILR.js} +2 -2
  108. package/dist/esm/{chunk-JP36JSNP.js → chunk-OBSZOD5M.js} +2 -2
  109. package/dist/esm/{chunk-DP7MPGR7.js → chunk-OMPLFDS6.js} +2 -2
  110. package/dist/esm/{chunk-H2J25HXP.js → chunk-OPYTQ34H.js} +2 -2
  111. package/dist/esm/{chunk-REORAMUH.js → chunk-QBONJMSE.js} +2 -2
  112. package/dist/esm/chunk-QDAM2I6O.js +3 -0
  113. package/dist/esm/chunk-QDAM2I6O.js.map +7 -0
  114. package/dist/esm/chunk-RSG4XWHU.js +2 -0
  115. package/dist/esm/{chunk-2ZKEQS76.js → chunk-SGKLJDA3.js} +2 -2
  116. package/dist/esm/{chunk-676Y7ZUT.js → chunk-TMINGBSQ.js} +2 -2
  117. package/dist/esm/{chunk-2S7HPQVX.js → chunk-TRJAVWCK.js} +2 -2
  118. package/dist/esm/{chunk-EQE6QQXM.js → chunk-TUZ665BA.js} +2 -2
  119. package/dist/esm/{chunk-JKQN6QCP.js → chunk-VBF3XALY.js} +2 -2
  120. package/dist/esm/chunk-VWRPVM5K.js +3 -0
  121. package/dist/esm/chunk-VWRPVM5K.js.map +7 -0
  122. package/dist/esm/{chunk-B6OFKABP.js → chunk-VYF6KKYM.js} +2 -2
  123. package/dist/esm/{chunk-6UFIS6B2.js → chunk-W35ZKQMQ.js} +2 -2
  124. package/dist/esm/{chunk-EPGIYTFK.js → chunk-X7DGYRAY.js} +2 -2
  125. package/dist/esm/{chunk-X7JHZ3HA.js → chunk-XF6Z5NKE.js} +2 -2
  126. package/dist/esm/{chunk-K5V53KTJ.js → chunk-Y44DYJA5.js} +2 -2
  127. package/dist/esm/{chunk-MMDZBPSX.js → chunk-YOTTLPJ3.js} +2 -2
  128. package/dist/esm/chunk-ZBSGH74F.js +3 -0
  129. package/dist/esm/chunk-ZBSGH74F.js.map +7 -0
  130. package/dist/esm/chunk-ZHXEEOGI.js +3 -0
  131. package/dist/esm/chunk-ZHXEEOGI.js.map +7 -0
  132. package/dist/esm/{chunk-FMVOB367.js → chunk-ZLGOZKB3.js} +2 -2
  133. package/dist/esm/components/_internal/base-button.js +1 -1
  134. package/dist/esm/components/_internal/page-scope.d.ts +48 -0
  135. package/dist/esm/components/_internal/page-scope.d.ts.map +1 -0
  136. package/dist/esm/components/_internal/page-scope.js +3 -0
  137. package/dist/esm/components/_internal/page-scope.js.map +7 -0
  138. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  139. package/dist/esm/components/_internal/portal-theme.d.ts +2 -1
  140. package/dist/esm/components/_internal/portal-theme.d.ts.map +1 -1
  141. package/dist/esm/components/_internal/portal-theme.js +1 -1
  142. package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
  143. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  144. package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
  145. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  146. package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
  147. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  148. package/dist/esm/components/accordion.js +1 -1
  149. package/dist/esm/components/alert-dialog.js +1 -1
  150. package/dist/esm/components/avatar.js +1 -1
  151. package/dist/esm/components/blockquote.js +1 -1
  152. package/dist/esm/components/button.js +1 -1
  153. package/dist/esm/components/card.js +1 -1
  154. package/dist/esm/components/chatbar.js +1 -1
  155. package/dist/esm/components/checkbox-group.js +1 -1
  156. package/dist/esm/components/checkbox.js +1 -1
  157. package/dist/esm/components/chip.js +1 -1
  158. package/dist/esm/components/code.js +1 -1
  159. package/dist/esm/components/combobox.js +1 -1
  160. package/dist/esm/components/context-menu.js +1 -1
  161. package/dist/esm/components/dialog.js +1 -1
  162. package/dist/esm/components/dropdown-menu.js +1 -1
  163. package/dist/esm/components/heading.js +1 -1
  164. package/dist/esm/components/image.js +1 -1
  165. package/dist/esm/components/index.d.ts +1 -0
  166. package/dist/esm/components/index.d.ts.map +1 -1
  167. package/dist/esm/components/index.js +1 -1
  168. package/dist/esm/components/link.js +1 -1
  169. package/dist/esm/components/message-scroller.js +1 -1
  170. package/dist/esm/components/navbar.js +1 -1
  171. package/dist/esm/components/navigator.d.ts +11 -7
  172. package/dist/esm/components/navigator.d.ts.map +1 -1
  173. package/dist/esm/components/navigator.js +1 -1
  174. package/dist/esm/components/notice.js +1 -1
  175. package/dist/esm/components/page.d.ts +31 -0
  176. package/dist/esm/components/page.d.ts.map +1 -0
  177. package/dist/esm/components/page.js +3 -0
  178. package/dist/esm/components/page.js.map +7 -0
  179. package/dist/esm/components/popover.js +1 -1
  180. package/dist/esm/components/progress.js +1 -1
  181. package/dist/esm/components/radio-group.js +1 -1
  182. package/dist/esm/components/radio.js +1 -1
  183. package/dist/esm/components/scroll-area.js +1 -1
  184. package/dist/esm/components/segmented-control.js +1 -1
  185. package/dist/esm/components/select.js +1 -1
  186. package/dist/esm/components/separator.js +1 -1
  187. package/dist/esm/components/sheet.js +1 -1
  188. package/dist/esm/components/shell.d.ts.map +1 -1
  189. package/dist/esm/components/shell.js +1 -1
  190. package/dist/esm/components/sidebar.js +1 -1
  191. package/dist/esm/components/slider.js +1 -1
  192. package/dist/esm/components/switch.js +1 -1
  193. package/dist/esm/components/table.js +1 -1
  194. package/dist/esm/components/tabs.js +1 -1
  195. package/dist/esm/components/text-area.js +1 -1
  196. package/dist/esm/components/text-field.js +1 -1
  197. package/dist/esm/components/text.js +1 -1
  198. package/dist/esm/components/toggle.js +1 -1
  199. package/dist/esm/components/toolbar.d.ts +5 -1
  200. package/dist/esm/components/toolbar.d.ts.map +1 -1
  201. package/dist/esm/components/toolbar.js +1 -1
  202. package/dist/esm/components/tooltip.js +1 -1
  203. package/dist/esm/hooks/index.js +1 -1
  204. package/dist/esm/index.js +1 -1
  205. package/package.json +1 -1
  206. package/src/components/_internal/page-scope.tsx +119 -0
  207. package/src/components/_internal/portal-theme.tsx +6 -2
  208. package/src/components/_internal/shell-bottom.tsx +4 -1
  209. package/src/components/_internal/shell-inspector.tsx +4 -1
  210. package/src/components/_internal/shell-sidebar.tsx +4 -1
  211. package/src/components/index.css +1 -0
  212. package/src/components/index.tsx +1 -0
  213. package/src/components/navigator.tsx +46 -16
  214. package/src/components/page.css +38 -0
  215. package/src/components/page.tsx +93 -0
  216. package/src/components/shell.tsx +8 -2
  217. package/src/components/toolbar.css +11 -0
  218. package/src/components/toolbar.tsx +17 -5
  219. package/styles.css +41 -0
  220. package/dist/esm/chunk-5KX3RA3P.js +0 -3
  221. package/dist/esm/chunk-5KX3RA3P.js.map +0 -7
  222. package/dist/esm/chunk-AQKSO3SW.js +0 -3
  223. package/dist/esm/chunk-AQKSO3SW.js.map +0 -7
  224. package/dist/esm/chunk-D74WY6UO.js +0 -3
  225. package/dist/esm/chunk-D74WY6UO.js.map +0 -7
  226. package/dist/esm/chunk-E4KT72IB.js +0 -2
  227. package/dist/esm/chunk-QRV32INS.js +0 -3
  228. package/dist/esm/chunk-QRV32INS.js.map +0 -7
  229. package/dist/esm/chunk-VGJALIJ5.js +0 -3
  230. package/dist/esm/chunk-VGJALIJ5.js.map +0 -7
  231. package/dist/esm/chunk-WAE4MLBN.js +0 -3
  232. package/dist/esm/chunk-WAE4MLBN.js.map +0 -7
  233. package/dist/esm/chunk-YMUERC2J.js +0 -3
  234. package/dist/esm/chunk-YMUERC2J.js.map +0 -7
  235. /package/dist/esm/{chunk-HBO7W7SS.js.map → chunk-26O4RBOJ.js.map} +0 -0
  236. /package/dist/esm/{chunk-FYTLUDL3.js.map → chunk-3M5ZM67R.js.map} +0 -0
  237. /package/dist/esm/{chunk-NEKIU24N.js.map → chunk-4ZHBNYXM.js.map} +0 -0
  238. /package/dist/esm/{chunk-TSS4K2U5.js.map → chunk-5VYQDA5S.js.map} +0 -0
  239. /package/dist/esm/{chunk-R4UKO4UK.js.map → chunk-6WHKGVWY.js.map} +0 -0
  240. /package/dist/esm/{chunk-7V6M3MIR.js.map → chunk-7YXHLU4C.js.map} +0 -0
  241. /package/dist/esm/{chunk-ENQV6SEA.js.map → chunk-AKSAKP35.js.map} +0 -0
  242. /package/dist/esm/{chunk-C67MM24U.js.map → chunk-B7STVZPU.js.map} +0 -0
  243. /package/dist/esm/{chunk-FRFVGYGX.js.map → chunk-BQOFHLDP.js.map} +0 -0
  244. /package/dist/esm/{chunk-ZYQEFENG.js.map → chunk-COLJWVN7.js.map} +0 -0
  245. /package/dist/esm/{chunk-K3GDM26A.js.map → chunk-D42VCLKH.js.map} +0 -0
  246. /package/dist/esm/{chunk-MGWGD6KI.js.map → chunk-DFQIIYLD.js.map} +0 -0
  247. /package/dist/esm/{chunk-NWXODCTD.js.map → chunk-EERKYRYI.js.map} +0 -0
  248. /package/dist/esm/{chunk-4MNRLB57.js.map → chunk-FICBVI4M.js.map} +0 -0
  249. /package/dist/esm/{chunk-JD4KR6VZ.js.map → chunk-HVMRB3AH.js.map} +0 -0
  250. /package/dist/esm/{chunk-HLIOHDEX.js.map → chunk-IFHBMTFX.js.map} +0 -0
  251. /package/dist/esm/{chunk-J54GYD7A.js.map → chunk-JFJV4HL3.js.map} +0 -0
  252. /package/dist/esm/{chunk-KJZSXLIX.js.map → chunk-JQMWNI62.js.map} +0 -0
  253. /package/dist/esm/{chunk-CMHKCUHP.js.map → chunk-K35JUIUT.js.map} +0 -0
  254. /package/dist/esm/{chunk-67UEMB4K.js.map → chunk-KBSH6CBD.js.map} +0 -0
  255. /package/dist/esm/{chunk-SUQJ7DD4.js.map → chunk-L7PRLW6A.js.map} +0 -0
  256. /package/dist/esm/{chunk-D2C2A2ZK.js.map → chunk-LFAUMDU5.js.map} +0 -0
  257. /package/dist/esm/{chunk-LABMK6Q7.js.map → chunk-LG5DPQ46.js.map} +0 -0
  258. /package/dist/esm/{chunk-YMRN5ESN.js.map → chunk-NFSW36RG.js.map} +0 -0
  259. /package/dist/esm/{chunk-6YWHNLSC.js.map → chunk-NJ7RQYLX.js.map} +0 -0
  260. /package/dist/esm/{chunk-WD66RYF6.js.map → chunk-NYIYRILR.js.map} +0 -0
  261. /package/dist/esm/{chunk-JP36JSNP.js.map → chunk-OBSZOD5M.js.map} +0 -0
  262. /package/dist/esm/{chunk-DP7MPGR7.js.map → chunk-OMPLFDS6.js.map} +0 -0
  263. /package/dist/esm/{chunk-H2J25HXP.js.map → chunk-OPYTQ34H.js.map} +0 -0
  264. /package/dist/esm/{chunk-REORAMUH.js.map → chunk-QBONJMSE.js.map} +0 -0
  265. /package/dist/esm/{chunk-E4KT72IB.js.map → chunk-RSG4XWHU.js.map} +0 -0
  266. /package/dist/esm/{chunk-2ZKEQS76.js.map → chunk-SGKLJDA3.js.map} +0 -0
  267. /package/dist/esm/{chunk-676Y7ZUT.js.map → chunk-TMINGBSQ.js.map} +0 -0
  268. /package/dist/esm/{chunk-2S7HPQVX.js.map → chunk-TRJAVWCK.js.map} +0 -0
  269. /package/dist/esm/{chunk-EQE6QQXM.js.map → chunk-TUZ665BA.js.map} +0 -0
  270. /package/dist/esm/{chunk-JKQN6QCP.js.map → chunk-VBF3XALY.js.map} +0 -0
  271. /package/dist/esm/{chunk-B6OFKABP.js.map → chunk-VYF6KKYM.js.map} +0 -0
  272. /package/dist/esm/{chunk-6UFIS6B2.js.map → chunk-W35ZKQMQ.js.map} +0 -0
  273. /package/dist/esm/{chunk-EPGIYTFK.js.map → chunk-X7DGYRAY.js.map} +0 -0
  274. /package/dist/esm/{chunk-X7JHZ3HA.js.map → chunk-XF6Z5NKE.js.map} +0 -0
  275. /package/dist/esm/{chunk-K5V53KTJ.js.map → chunk-Y44DYJA5.js.map} +0 -0
  276. /package/dist/esm/{chunk-MMDZBPSX.js.map → chunk-YOTTLPJ3.js.map} +0 -0
  277. /package/dist/esm/{chunk-FMVOB367.js.map → chunk-ZLGOZKB3.js.map} +0 -0
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{b as C,c as T,d as N,e as G}from"./chunk-2ACVWLFA.js";import{a as F}from"./chunk-TGRHRMQI.js";import{b as z,d as L,f as O}from"./chunk-GKDGNPBD.js";import{c as h,e as V,g as S,h as k,i as A}from"./chunk-ISCZ57VL.js";import{b,c as R,d as I,e as v}from"./chunk-EB4AG3OL.js";import{a as y}from"./chunk-MGWGD6KI.js";import{c as f}from"./chunk-OKQAVYW4.js";import{a as g}from"./chunk-AQKSO3SW.js";import{b as j}from"./chunk-FVRVBB6O.js";import{c as W}from"./chunk-5ON3XLRD.js";import{a as ne}from"./chunk-VQPANPMI.js";var ae={};ne(ae,{CheckboxItem:()=>Y,Content:()=>K,Group:()=>J,Item:()=>H,Label:()=>U,RadioGroup:()=>Q,RadioItem:()=>X,Root:()=>_,Separator:()=>te,Sub:()=>Z,SubContent:()=>ee,SubTrigger:()=>$,Trigger:()=>q});import*as e from"react";import s from"classnames";import{ContextMenu as i,Slot as B}from"radix-ui";import{useCallbackRef as re}from"radix-ui/internal";var _=t=>{let{open:r,onOpenChange:n}=t,[a,o]=e.useState(!1),u=r??a,p=re(n),c=e.useCallback(l=>{o(l),p(l)},[p]),m=e.useCallback(()=>c(!1),[c]);return e.createElement(V,{value:m},e.createElement(i.Root,{...t,open:u,onOpenChange:c}))};_.displayName="ContextMenu.Root";var q=e.forwardRef(({children:t,...r},n)=>e.createElement(i.Trigger,{...r,ref:n,asChild:!0},F(t)));q.displayName="ContextMenu.Trigger";var E=e.createContext({}),K=e.forwardRef((t,r)=>{let n=W(t,C.size),a=j(),{size:o=C.size.default}=n,{className:u,children:p,color:c,container:m,forceMount:l,submenuBehavior:w,virtualized:d=!1,...P}=f(n,C),x=c||a.accentColor,M=b(o,C.size.default),oe=e.useMemo(()=>({size:o,color:x}),[o,x]),D=e.createElement(h,{size:o},e.createElement(E.Provider,{value:oe},p));return e.createElement(i.Portal,{container:m,forceMount:l},e.createElement(g,{asChild:!0},e.createElement(i.Content,{"data-accent-color":x,alignOffset:R(M),collisionPadding:10,...P,asChild:!1,ref:r,className:s("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-ContextMenuContent",u)},d?e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport","kui-virtualized")},D):e.createElement(y,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport")},D)))))});K.displayName="ContextMenu.Content";var U=e.forwardRef(({className:t,id:r,...n},a)=>{let o=A(r);return e.createElement(i.Label,{...n,id:o,asChild:!1,ref:a,className:s("kui-BaseMenuLabel","kui-ContextMenuLabel",t)})});U.displayName="ContextMenu.Label";var H=e.forwardRef((t,r)=>{let{className:n,children:a,color:o=T.color.default,shortcut:u,...p}=t;return e.createElement(i.Item,{"data-accent-color":o,"aria-keyshortcuts":u?I(u):void 0,...p,ref:r,className:s("kui-reset","kui-BaseMenuItem","kui-ContextMenuItem",n)},e.createElement(B.Slottable,null,a),u&&e.createElement(v,{shortcut:u,className:"kui-ContextMenuShortcut"}))});H.displayName="ContextMenu.Item";var J=e.forwardRef(({className:t,"aria-labelledby":r,...n},a)=>{let[o,u]=k(r);return e.createElement(S,{value:u},e.createElement(i.Group,{"aria-labelledby":o,...n,asChild:!1,ref:a,className:s("kui-BaseMenuGroup","kui-ContextMenuGroup",t)}))});J.displayName="ContextMenu.Group";var Q=e.forwardRef(({className:t,"aria-labelledby":r,...n},a)=>{let[o,u]=k(r);return e.createElement(S,{value:u},e.createElement(i.RadioGroup,{"aria-labelledby":o,...n,asChild:!1,ref:a,className:s("kui-BaseMenuRadioGroup","kui-ContextMenuRadioGroup",t)}))});Q.displayName="ContextMenu.RadioGroup";var X=e.forwardRef((t,r)=>{let{children:n,className:a,color:o=G.color.default,...u}=t;return e.createElement(i.RadioItem,{...u,asChild:!1,ref:r,"data-accent-color":o,className:s("kui-BaseMenuItem","kui-BaseMenuRadioItem","kui-ContextMenuItem","kui-ContextMenuRadioItem",a)},e.createElement(B.Slottable,null,n),e.createElement(i.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-ContextMenuItemIndicator"},e.createElement(O,{className:"kui-BaseMenuItemIndicatorIcon kui-ContextMenuItemIndicatorIcon"})))});X.displayName="ContextMenu.RadioItem";var Y=e.forwardRef((t,r)=>{let{children:n,className:a,shortcut:o,color:u=N.color.default,...p}=t;return e.createElement(i.CheckboxItem,{"aria-keyshortcuts":o?I(o):void 0,...p,asChild:!1,ref:r,"data-accent-color":u,className:s("kui-BaseMenuItem","kui-BaseMenuCheckboxItem","kui-ContextMenuItem","kui-ContextMenuCheckboxItem",a)},e.createElement(B.Slottable,null,n),e.createElement(i.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-ContextMenuItemIndicator"},e.createElement(z,{className:"kui-BaseMenuItemIndicatorIcon kui-ContextMenuItemIndicatorIcon"})),o&&e.createElement(v,{shortcut:o,className:"kui-ContextMenuShortcut"}))});Y.displayName="ContextMenu.CheckboxItem";var Z=t=>e.createElement(i.Sub,{...t});Z.displayName="ContextMenu.Sub";var $=e.forwardRef((t,r)=>{let{className:n,children:a,...o}=t;return e.createElement(i.SubTrigger,{...o,asChild:!1,ref:r,className:s("kui-BaseMenuItem","kui-BaseMenuSubTrigger","kui-ContextMenuItem","kui-ContextMenuSubTrigger",n)},a,e.createElement("div",{className:"kui-BaseMenuShortcut kui-ContextMenuShortcut"},e.createElement(L,{className:"kui-BaseMenuSubTriggerIcon kui-ContextMenuSubTriggerIcon"})))});$.displayName="ContextMenu.SubTrigger";var ee=e.forwardRef((t,r)=>{let n=e.useContext(E),a=t.size??n.size,o=t.color??n.color,{className:u,children:p,container:c,forceMount:m,color:l,virtualized:w=!1,...d}=f({...t,size:a},C),P=b(a,C.size.default),x=e.useMemo(()=>({size:a,color:o}),[a,o]),M=e.createElement(h,{size:a},e.createElement(E.Provider,{value:x},p));return e.createElement(i.Portal,{container:c,forceMount:m},e.createElement(g,{asChild:!0},e.createElement(i.SubContent,{"data-accent-color":o,alignOffset:R(P),sideOffset:1,collisionPadding:10,...d,asChild:!1,ref:r,className:s("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-BaseMenuSubContent","kui-ContextMenuContent","kui-ContextMenuSubContent",u)},w?e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport","kui-virtualized")},M):e.createElement(y,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport")},M)))))});ee.displayName="ContextMenu.SubContent";var te=e.forwardRef(({className:t,...r},n)=>e.createElement(i.Separator,{...r,asChild:!1,ref:n,className:s("kui-BaseMenuSeparator","kui-ContextMenuSeparator",t)}));te.displayName="ContextMenu.Separator";export{_ as a,q as b,K as c,U as d,H as e,J as f,Q as g,X as h,Y as i,Z as j,$ as k,ee as l,te as m,ae as n};
3
- //# sourceMappingURL=chunk-2S7HPQVX.js.map
2
+ import{b as C,c as T,d as N,e as G}from"./chunk-2ACVWLFA.js";import{a as F}from"./chunk-TGRHRMQI.js";import{a as g}from"./chunk-HGF4CKRY.js";import{b as j}from"./chunk-FVRVBB6O.js";import{b as z,d as L,f as O}from"./chunk-GKDGNPBD.js";import{c as W}from"./chunk-5ON3XLRD.js";import{c as h,e as V,g as S,h as k,i as A}from"./chunk-ISCZ57VL.js";import{b,c as R,d as I,e as v}from"./chunk-EB4AG3OL.js";import{a as y}from"./chunk-DFQIIYLD.js";import{c as f}from"./chunk-OKQAVYW4.js";import{a as ne}from"./chunk-VQPANPMI.js";var ae={};ne(ae,{CheckboxItem:()=>Y,Content:()=>K,Group:()=>J,Item:()=>H,Label:()=>U,RadioGroup:()=>Q,RadioItem:()=>X,Root:()=>_,Separator:()=>te,Sub:()=>Z,SubContent:()=>ee,SubTrigger:()=>$,Trigger:()=>q});import*as e from"react";import s from"classnames";import{ContextMenu as i,Slot as B}from"radix-ui";import{useCallbackRef as re}from"radix-ui/internal";var _=t=>{let{open:r,onOpenChange:n}=t,[a,o]=e.useState(!1),u=r??a,p=re(n),c=e.useCallback(l=>{o(l),p(l)},[p]),m=e.useCallback(()=>c(!1),[c]);return e.createElement(V,{value:m},e.createElement(i.Root,{...t,open:u,onOpenChange:c}))};_.displayName="ContextMenu.Root";var q=e.forwardRef(({children:t,...r},n)=>e.createElement(i.Trigger,{...r,ref:n,asChild:!0},F(t)));q.displayName="ContextMenu.Trigger";var E=e.createContext({}),K=e.forwardRef((t,r)=>{let n=W(t,C.size),a=j(),{size:o=C.size.default}=n,{className:u,children:p,color:c,container:m,forceMount:l,submenuBehavior:w,virtualized:d=!1,...P}=f(n,C),x=c||a.accentColor,M=b(o,C.size.default),oe=e.useMemo(()=>({size:o,color:x}),[o,x]),D=e.createElement(h,{size:o},e.createElement(E.Provider,{value:oe},p));return e.createElement(i.Portal,{container:m,forceMount:l},e.createElement(g,{asChild:!0},e.createElement(i.Content,{"data-accent-color":x,alignOffset:R(M),collisionPadding:10,...P,asChild:!1,ref:r,className:s("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-ContextMenuContent",u)},d?e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport","kui-virtualized")},D):e.createElement(y,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport")},D)))))});K.displayName="ContextMenu.Content";var U=e.forwardRef(({className:t,id:r,...n},a)=>{let o=A(r);return e.createElement(i.Label,{...n,id:o,asChild:!1,ref:a,className:s("kui-BaseMenuLabel","kui-ContextMenuLabel",t)})});U.displayName="ContextMenu.Label";var H=e.forwardRef((t,r)=>{let{className:n,children:a,color:o=T.color.default,shortcut:u,...p}=t;return e.createElement(i.Item,{"data-accent-color":o,"aria-keyshortcuts":u?I(u):void 0,...p,ref:r,className:s("kui-reset","kui-BaseMenuItem","kui-ContextMenuItem",n)},e.createElement(B.Slottable,null,a),u&&e.createElement(v,{shortcut:u,className:"kui-ContextMenuShortcut"}))});H.displayName="ContextMenu.Item";var J=e.forwardRef(({className:t,"aria-labelledby":r,...n},a)=>{let[o,u]=k(r);return e.createElement(S,{value:u},e.createElement(i.Group,{"aria-labelledby":o,...n,asChild:!1,ref:a,className:s("kui-BaseMenuGroup","kui-ContextMenuGroup",t)}))});J.displayName="ContextMenu.Group";var Q=e.forwardRef(({className:t,"aria-labelledby":r,...n},a)=>{let[o,u]=k(r);return e.createElement(S,{value:u},e.createElement(i.RadioGroup,{"aria-labelledby":o,...n,asChild:!1,ref:a,className:s("kui-BaseMenuRadioGroup","kui-ContextMenuRadioGroup",t)}))});Q.displayName="ContextMenu.RadioGroup";var X=e.forwardRef((t,r)=>{let{children:n,className:a,color:o=G.color.default,...u}=t;return e.createElement(i.RadioItem,{...u,asChild:!1,ref:r,"data-accent-color":o,className:s("kui-BaseMenuItem","kui-BaseMenuRadioItem","kui-ContextMenuItem","kui-ContextMenuRadioItem",a)},e.createElement(B.Slottable,null,n),e.createElement(i.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-ContextMenuItemIndicator"},e.createElement(O,{className:"kui-BaseMenuItemIndicatorIcon kui-ContextMenuItemIndicatorIcon"})))});X.displayName="ContextMenu.RadioItem";var Y=e.forwardRef((t,r)=>{let{children:n,className:a,shortcut:o,color:u=N.color.default,...p}=t;return e.createElement(i.CheckboxItem,{"aria-keyshortcuts":o?I(o):void 0,...p,asChild:!1,ref:r,"data-accent-color":u,className:s("kui-BaseMenuItem","kui-BaseMenuCheckboxItem","kui-ContextMenuItem","kui-ContextMenuCheckboxItem",a)},e.createElement(B.Slottable,null,n),e.createElement(i.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-ContextMenuItemIndicator"},e.createElement(z,{className:"kui-BaseMenuItemIndicatorIcon kui-ContextMenuItemIndicatorIcon"})),o&&e.createElement(v,{shortcut:o,className:"kui-ContextMenuShortcut"}))});Y.displayName="ContextMenu.CheckboxItem";var Z=t=>e.createElement(i.Sub,{...t});Z.displayName="ContextMenu.Sub";var $=e.forwardRef((t,r)=>{let{className:n,children:a,...o}=t;return e.createElement(i.SubTrigger,{...o,asChild:!1,ref:r,className:s("kui-BaseMenuItem","kui-BaseMenuSubTrigger","kui-ContextMenuItem","kui-ContextMenuSubTrigger",n)},a,e.createElement("div",{className:"kui-BaseMenuShortcut kui-ContextMenuShortcut"},e.createElement(L,{className:"kui-BaseMenuSubTriggerIcon kui-ContextMenuSubTriggerIcon"})))});$.displayName="ContextMenu.SubTrigger";var ee=e.forwardRef((t,r)=>{let n=e.useContext(E),a=t.size??n.size,o=t.color??n.color,{className:u,children:p,container:c,forceMount:m,color:l,virtualized:w=!1,...d}=f({...t,size:a},C),P=b(a,C.size.default),x=e.useMemo(()=>({size:a,color:o}),[a,o]),M=e.createElement(h,{size:a},e.createElement(E.Provider,{value:x},p));return e.createElement(i.Portal,{container:c,forceMount:m},e.createElement(g,{asChild:!0},e.createElement(i.SubContent,{"data-accent-color":o,alignOffset:R(P),sideOffset:1,collisionPadding:10,...d,asChild:!1,ref:r,className:s("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-BaseMenuSubContent","kui-ContextMenuContent","kui-ContextMenuSubContent",u)},w?e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport","kui-virtualized")},M):e.createElement(y,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport")},M)))))});ee.displayName="ContextMenu.SubContent";var te=e.forwardRef(({className:t,...r},n)=>e.createElement(i.Separator,{...r,asChild:!1,ref:n,className:s("kui-BaseMenuSeparator","kui-ContextMenuSeparator",t)}));te.displayName="ContextMenu.Separator";export{_ as a,q as b,K as c,U as d,H as e,J as f,Q as g,X as h,Y as i,Z as j,$ as k,ee as l,te as m,ae as n};
3
+ //# sourceMappingURL=chunk-TRJAVWCK.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as v}from"./chunk-TGRHRMQI.js";import{a as R}from"./chunk-4KBKS3ZE.js";import{a as T}from"./chunk-LPLW7OWA.js";import{a as P}from"./chunk-L54FWKJE.js";import{c as d}from"./chunk-OKQAVYW4.js";import{a as u}from"./chunk-AQKSO3SW.js";import{c as C}from"./chunk-5ON3XLRD.js";import{a as m}from"./chunk-CLJ6SEGP.js";import{a as H}from"./chunk-VQPANPMI.js";var j={};H(j,{Anchor:()=>N,Close:()=>E,Content:()=>y,Root:()=>h,Toolbar:()=>O,Trigger:()=>g});import*as o from"react";import i from"classnames";import{Popover as p}from"radix-ui";var I=["1","2","3","4"],c={...m,size:{type:"enum",className:"kui-r-size",values:I,default:"2",responsive:!0},width:P.width,minWidth:P.minWidth,maxWidth:{...P.maxWidth,default:"480px"},...T};var b=o.createContext(null),f=e=>{let r=o.useContext(b);return r};function M({children:e}){let r=f("Navigator")?.setLabelId,t=o.useId();return o.useEffect(()=>(r?.(t),()=>r?.(void 0)),[t,r]),o.cloneElement(e,{id:t})}var z={Title:M,Close:({children:e})=>o.createElement(p.Close,{asChild:!0},e)},h=e=>o.createElement(p.Root,{...e});h.displayName="Popover.Root";var g=o.forwardRef(({children:e,...r},t)=>o.createElement(p.Trigger,{...r,ref:t,asChild:!0},v(e)));g.displayName="Popover.Trigger";var y=o.forwardRef((e,r)=>{let t=C(e,c.size),{className:s,forceMount:a,container:l,...n}=d(t,c),[A,S]=o.useState(void 0),k=o.useMemo(()=>({setLabelId:S}),[]);return o.createElement(p.Portal,{container:l,forceMount:a},o.createElement(u,{asChild:!0},o.createElement(p.Content,{align:"start",sideOffset:8,collisionPadding:10,...n,ref:r,"aria-labelledby":A??n["aria-labelledby"],className:i("kui-PopperContent","kui-PopoverContent",s)},o.createElement(b.Provider,{value:k},o.createElement(R.Provider,{value:z},t.children)))))});y.displayName="Popover.Content";var E=o.forwardRef(({children:e,...r},t)=>o.createElement(p.Close,{...r,ref:t,asChild:!0},v(e)));E.displayName="Popover.Close";var N=o.forwardRef((e,r)=>o.createElement(p.Anchor,{...e,ref:r}));N.displayName="Popover.Anchor";var x=o.forwardRef(({className:e,children:r,...t},s)=>(f("Popover.Toolbar"),o.createElement("div",{...t,ref:s,className:i("kui-PopoverToolbar",e)},r)));x.displayName="Popover.Toolbar";var w=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarLeft",e)}));w.displayName="Popover.Toolbar.Left";var D=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarCenter",e)}));D.displayName="Popover.Toolbar.Center";var L=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarRight",e)}));L.displayName="Popover.Toolbar.Right";var W=o.forwardRef(({className:e,id:r,...t},s)=>{let a=f("Popover.Toolbar.Title"),l=o.useId(),n=r??`kui-popover-toolbar-title-${l}`;return o.useEffect(()=>(a?.setLabelId(n),()=>a?.setLabelId(void 0)),[a,n]),o.createElement("span",{...t,id:n,ref:s,className:i("kui-PopoverToolbarTitle",e)})});W.displayName="Popover.Toolbar.Title";var O=Object.assign(x,{Left:w,Center:D,Right:L,Title:W});export{h as a,g as b,y as c,E as d,N as e,O as f,j as g};
3
- //# sourceMappingURL=chunk-EQE6QQXM.js.map
2
+ import{a as v}from"./chunk-TGRHRMQI.js";import{a as u}from"./chunk-HGF4CKRY.js";import{c as C}from"./chunk-5ON3XLRD.js";import{a as R}from"./chunk-4KBKS3ZE.js";import{a as T}from"./chunk-LPLW7OWA.js";import{a as P}from"./chunk-L54FWKJE.js";import{c as d}from"./chunk-OKQAVYW4.js";import{a as m}from"./chunk-CLJ6SEGP.js";import{a as H}from"./chunk-VQPANPMI.js";var j={};H(j,{Anchor:()=>N,Close:()=>E,Content:()=>y,Root:()=>h,Toolbar:()=>O,Trigger:()=>g});import*as o from"react";import i from"classnames";import{Popover as p}from"radix-ui";var I=["1","2","3","4"],c={...m,size:{type:"enum",className:"kui-r-size",values:I,default:"2",responsive:!0},width:P.width,minWidth:P.minWidth,maxWidth:{...P.maxWidth,default:"480px"},...T};var b=o.createContext(null),f=e=>{let r=o.useContext(b);return r};function M({children:e}){let r=f("Navigator")?.setLabelId,t=o.useId();return o.useEffect(()=>(r?.(t),()=>r?.(void 0)),[t,r]),o.cloneElement(e,{id:t})}var z={Title:M,Close:({children:e})=>o.createElement(p.Close,{asChild:!0},e)},h=e=>o.createElement(p.Root,{...e});h.displayName="Popover.Root";var g=o.forwardRef(({children:e,...r},t)=>o.createElement(p.Trigger,{...r,ref:t,asChild:!0},v(e)));g.displayName="Popover.Trigger";var y=o.forwardRef((e,r)=>{let t=C(e,c.size),{className:s,forceMount:a,container:l,...n}=d(t,c),[A,S]=o.useState(void 0),k=o.useMemo(()=>({setLabelId:S}),[]);return o.createElement(p.Portal,{container:l,forceMount:a},o.createElement(u,{asChild:!0},o.createElement(p.Content,{align:"start",sideOffset:8,collisionPadding:10,...n,ref:r,"aria-labelledby":A??n["aria-labelledby"],className:i("kui-PopperContent","kui-PopoverContent",s)},o.createElement(b.Provider,{value:k},o.createElement(R.Provider,{value:z},t.children)))))});y.displayName="Popover.Content";var E=o.forwardRef(({children:e,...r},t)=>o.createElement(p.Close,{...r,ref:t,asChild:!0},v(e)));E.displayName="Popover.Close";var N=o.forwardRef((e,r)=>o.createElement(p.Anchor,{...e,ref:r}));N.displayName="Popover.Anchor";var x=o.forwardRef(({className:e,children:r,...t},s)=>(f("Popover.Toolbar"),o.createElement("div",{...t,ref:s,className:i("kui-PopoverToolbar",e)},r)));x.displayName="Popover.Toolbar";var w=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarLeft",e)}));w.displayName="Popover.Toolbar.Left";var D=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarCenter",e)}));D.displayName="Popover.Toolbar.Center";var L=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarRight",e)}));L.displayName="Popover.Toolbar.Right";var W=o.forwardRef(({className:e,id:r,...t},s)=>{let a=f("Popover.Toolbar.Title"),l=o.useId(),n=r??`kui-popover-toolbar-title-${l}`;return o.useEffect(()=>(a?.setLabelId(n),()=>a?.setLabelId(void 0)),[a,n]),o.createElement("span",{...t,id:n,ref:s,className:i("kui-PopoverToolbarTitle",e)})});W.displayName="Popover.Toolbar.Title";var O=Object.assign(x,{Left:w,Center:D,Right:L,Title:W});export{h as a,g as b,y as c,E as d,N as e,O as f,j as g};
3
+ //# sourceMappingURL=chunk-TUZ665BA.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{c as r}from"./chunk-OKQAVYW4.js";import{c as s}from"./chunk-5ON3XLRD.js";import{c as o}from"./chunk-HBWBPBSA.js";import*as e from"react";import w from"classnames";import{Switch as i}from"radix-ui";var n=["1","2","3","4"],t={size:{type:"enum",className:"kui-r-size",values:n,default:"2",responsive:!0},...o};var l=e.forwardRef((p,c)=>{let m=s(p,t.size),{className:f,color:a,...h}=r(m,t);return e.createElement(i.Root,{"data-accent-color":a,...h,asChild:!1,ref:c,className:w("kui-reset","kui-SwitchRoot",f)},e.createElement(i.Thumb,{className:"kui-SwitchThumb"}))});l.displayName="Switch";export{l as a};
3
- //# sourceMappingURL=chunk-JKQN6QCP.js.map
2
+ import{c as s}from"./chunk-5ON3XLRD.js";import{c as o}from"./chunk-HBWBPBSA.js";import{c as r}from"./chunk-OKQAVYW4.js";import*as e from"react";import w from"classnames";import{Switch as i}from"radix-ui";var n=["1","2","3","4"],t={size:{type:"enum",className:"kui-r-size",values:n,default:"2",responsive:!0},...o};var l=e.forwardRef((p,c)=>{let m=s(p,t.size),{className:f,color:a,...h}=r(m,t);return e.createElement(i.Root,{"data-accent-color":a,...h,asChild:!1,ref:c,className:w("kui-reset","kui-SwitchRoot",f)},e.createElement(i.Thumb,{className:"kui-SwitchThumb"}))});l.displayName="Switch";export{l as a};
3
+ //# sourceMappingURL=chunk-VBF3XALY.js.map
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import*as t from"react";var l=t.createContext(null);function a(e){e.version+=1;for(let n of e.listeners)n()}function o(e,n){if(e.collapsed!==n){e.collapsed=n;for(let r of e.mirrors)n?r.setAttribute("data-collapsed",""):r.removeAttribute("data-collapsed")}}function i({children:e}){let n=t.useMemo(()=>({title:null,mirrors:new Set,collapsed:!1,listeners:new Set,version:0}),[]);return t.createElement(l.Provider,{value:n},e)}function u({children:e}){return t.createElement(l.Provider,{value:null},e)}function c(){return t.useContext(l)}function s(e,n){t.useEffect(()=>{if(e)return e.title=n,a(e),()=>{e.title===n&&(e.title=null,a(e))}},[e,n])}function d(e){let n=t.useCallback(r=>e?(e.listeners.add(r),()=>{e.listeners.delete(r)}):()=>{},[e]);return t.useSyncExternalStore(n,()=>e?.version??0,()=>0),e?.title??null}function f(e){let n=t.useRef(null);return t.useCallback(r=>{e&&(n.current&&e.mirrors.delete(n.current),n.current=r,r&&(e.mirrors.add(r),e.collapsed?r.setAttribute("data-collapsed",""):r.removeAttribute("data-collapsed")))},[e])}export{o as a,i as b,u as c,c as d,s as e,d as f,f as g};
3
+ //# sourceMappingURL=chunk-VWRPVM5K.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/_internal/page-scope.tsx"],
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\n\n/**\n * What page is in a pane, and whether its title has scrolled away (from v2, 2026-11-03).\n *\n * A page's large title lives inside the scroller and the band that shows it again lives beside\n * it, so context, which only flows down, cannot carry it from one to the other. The store sits\n * at their common ancestor, the pane. Each pane provides its own, so two panes can each hold a\n * titled page; `Shell.Header` provides none, so a `Toolbar.Title` there always speaks for itself.\n * Outside a Shell there is no scope: a `Page` still draws its heading and a `Toolbar.Title` still\n * shows its own words.\n */\ntype PageStore = {\n /** The words of the page in this pane, or null while nothing has claimed it. */\n title: string | null;\n /** Every `Toolbar.Title` mirroring this pane's page, as elements: the collapse is written onto them. */\n mirrors: Set<HTMLElement>;\n /** Whether the page's own title has scrolled up behind the band. */\n collapsed: boolean;\n listeners: Set<() => void>;\n /** What a subscriber reads: a stable value between notifications. */\n version: number;\n};\n\nconst PageScopeContext = React.createContext<PageStore | null>(null);\n\nfunction notify(store: PageStore) {\n store.version += 1;\n for (const listener of store.listeners) listener();\n}\n\n/**\n * The collapse is an attribute write, not a render: only CSS reads it, and an observer sends it\n * twice per visit to a page.\n */\nfunction setPageCollapsed(store: PageStore, collapsed: boolean): void {\n if (store.collapsed === collapsed) return;\n store.collapsed = collapsed;\n for (const el of store.mirrors) {\n if (collapsed) el.setAttribute('data-collapsed', '');\n else el.removeAttribute('data-collapsed');\n }\n}\n\n/** Every pane renders one. It draws nothing. */\nfunction PageScope({ children }: { children: React.ReactNode }) {\n const store = React.useMemo<PageStore>(() => ({ title: null, mirrors: new Set(), collapsed: false, listeners: new Set(), version: 0 }), []);\n return <PageScopeContext.Provider value={store}>{children}</PageScopeContext.Provider>;\n}\n\n/** Cuts the scope off below a portal: a panel over a pane is not in it, so its title must not take the pane's band. */\nfunction NoPageScope({ children }: { children: React.ReactNode }) {\n return <PageScopeContext.Provider value={null}>{children}</PageScopeContext.Provider>;\n}\n\nfunction usePageScope(): PageStore | null {\n return React.useContext(PageScopeContext);\n}\n\n/** A `Page` claims the pane it is in, in an effect, so no subscriber's snapshot changes mid-render. */\nfunction useClaimPage(store: PageStore | null, title: string): void {\n React.useEffect(() => {\n if (!store) return;\n store.title = title;\n notify(store);\n return () => {\n if (store.title === title) {\n store.title = null;\n notify(store);\n }\n };\n }, [store, title]);\n}\n\n/** What a `Toolbar.Title` shows when it is given no words of its own. */\nfunction usePageTitle(store: PageStore | null): string | null {\n const subscribe = React.useCallback(\n (cb: () => void) => {\n if (!store) return () => {};\n store.listeners.add(cb);\n return () => {\n store.listeners.delete(cb);\n };\n },\n [store],\n );\n // The version is read so the subscription re-renders this consumer; the title itself is the value.\n React.useSyncExternalStore(\n subscribe,\n () => store?.version ?? 0,\n () => 0,\n );\n return store?.title ?? null;\n}\n\n/**\n * Registers a mirroring title's element, stamped with what the page is doing now: a title that\n * mounts after its page has scrolled arrives collapsed.\n */\nfunction usePageMirror(store: PageStore | null): React.RefCallback<HTMLElement> {\n const current = React.useRef<HTMLElement | null>(null);\n return React.useCallback(\n (el: HTMLElement | null) => {\n if (!store) return;\n if (current.current) store.mirrors.delete(current.current);\n current.current = el;\n if (!el) return;\n store.mirrors.add(el);\n if (store.collapsed) el.setAttribute('data-collapsed', '');\n else el.removeAttribute('data-collapsed');\n },\n [store],\n );\n}\n\nexport { PageScope, NoPageScope, usePageScope, useClaimPage, usePageTitle, usePageMirror, setPageCollapsed };\nexport type { PageStore };\n"],
5
+ "mappings": ";AAEA,UAAYA,MAAW,QAwBvB,IAAMC,EAAyB,gBAAgC,IAAI,EAEnE,SAASC,EAAOC,EAAkB,CAChCA,EAAM,SAAW,EACjB,QAAWC,KAAYD,EAAM,UAAWC,EAAS,CACnD,CAMA,SAASC,EAAiBF,EAAkBG,EAA0B,CACpE,GAAIH,EAAM,YAAcG,EACxB,CAAAH,EAAM,UAAYG,EA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,EAAM,UAAWI,EAAG,aAAa,iBAAkB,EAAE,EACpDA,EAAG,gBAAgB,gBAAgB,GAC1C,EACA,CAACJ,CAAK,CACR,CACF",
6
+ "names": ["React", "PageScopeContext", "notify", "store", "listener", "setPageCollapsed", "collapsed", "el", "PageScope", "children", "NoPageScope", "usePageScope", "useClaimPage", "title", "usePageTitle", "subscribe", "cb", "usePageMirror", "current"]
7
+ }
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{c as j}from"./chunk-OKQAVYW4.js";import{c as I}from"./chunk-5ON3XLRD.js";import{c as E}from"./chunk-HBWBPBSA.js";import{b as L}from"./chunk-XU74PNM2.js";import*as r from"react";import re from"classnames";import{Direction as ae,Slider as v}from"radix-ui";var te=["1","2","3","4"],g={size:{type:"enum",className:"kui-r-size",values:te,default:"2",responsive:!0},showTickLabels:{type:"boolean"},snapToTicks:{type:"boolean"},...E,...L};var ne=r.forwardRef((K,O)=>{let W=I(K,g.size),{className:B,color:G,radius:A,tabIndex:C,...H}=j(W,g),{ticks:c,unit:u,showTickLabels:U,snapToTicks:y,value:$,defaultValue:q,onValueChange:x,onValueCommit:p,"aria-label":F,"aria-labelledby":J,...i}=H,k=i.min??0,d=i.max??100,[Q,X]=r.useState(()=>q??[k]),P=$!==void 0,s=P?$:Q,D=r.useId(),Y=i.step,l=r.useMemo(()=>c?[...c].sort((e,t)=>e.value-t.value):[],[c]),m=r.useCallback(e=>{let t=l[0].value;for(let a of l)Math.abs(a.value-e)<Math.abs(t-e)&&(t=a.value);return t},[l]),R=r.useCallback((e,t)=>{let a=m(e);return e>t&&a<=t?l.find(n=>n.value>t)?.value??t:e<t&&a>=t?[...l].reverse().find(n=>n.value<t)?.value??t:a},[m,l]),f=r.useRef(!1),N=r.useCallback(e=>{let t=a=>u?`${a} ${u}`:a.toString();return e.length===1?`${t(e[0])} out of ${t(d)}`:e.length===2?`${t(e[0])} to ${t(e[1])} out of ${t(d)}`:`${e.map(t).join(", ")} out of ${t(d)}`},[u,d]),Z=ae.useDirection(i.dir),T=i.orientation??"horizontal",V=T==="vertical"?!i.inverted:Z==="rtl"!=!!i.inverted,S=r.useMemo(()=>c?c.map((e,t)=>{let a=(e.value-k)/(d-k)*100;return{...e,percentage:V?100-a:a,index:t}}):null,[c,k,d,V]),b=r.useRef(null),h=r.useRef(null),_=r.useCallback(e=>{b.current&&(b.current.textContent=N(e),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{b.current&&(b.current.textContent="")},1e3))},[N]),w=r.useCallback(e=>{let a=y&&l.length>0?e.map((n,o)=>f.current&&s[o]!==void 0?R(n,s[o]):m(n)):e;P||X(a),x?.(a)},[y,l,R,m,s,x,P]),ee=r.useCallback(e=>{if(!p)return;if(!y||l.length===0){p(e);return}let t=f.current,a=e.map((n,o)=>t&&s[o]!==void 0?R(n,s[o]):m(n));t&&a.every((n,o)=>n===s[o])||p(a)},[p,y,l,R,m,s]);return r.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),r.createElement("div",{className:"kui-SliderContainer","data-orientation":T,"data-has-ticks":S?"":void 0},r.createElement("div",{ref:b,"aria-live":"polite","aria-atomic":"true",className:"kui-sr-only"}),r.createElement(v.Root,{"data-accent-color":G,"data-radius":A,ref:O,...i,value:s,step:Y,onKeyDown:e=>{f.current=!0,i.onKeyDown?.(e)},onPointerDown:e=>{f.current=!1,i.onPointerDown?.(e)},onValueChange:w,onValueCommit:ee,asChild:!1,className:re("kui-SliderRoot",B)},r.createElement(v.Track,{className:"kui-SliderTrack"},r.createElement(v.Range,{className:"kui-SliderRange","data-inverted":i.inverted?"":void 0})),s.map((e,t)=>r.createElement(v.Thumb,{key:t,className:"kui-SliderThumb",...C!==void 0?{tabIndex:C}:void 0,"aria-label":F,"aria-labelledby":J,"aria-valuetext":u?`${e} ${u}`:void 0}))),S&&r.createElement("div",{className:"kui-SliderTicks","data-orientation":T,role:"group","aria-label":"Slider tick marks"},S.map(e=>r.createElement("button",{key:e.index,className:"kui-SliderTick",style:T==="vertical"?{top:`${e.percentage}%`}:{left:`${e.percentage}%`},disabled:i.disabled,onClick:()=>{let t=0;s.forEach((n,o)=>{let M=Math.abs(n-e.value),z=Math.abs(s[t]-e.value);(M<z||M===z&&e.value>n)&&(t=o)});let a=s.map((n,o)=>o===t?e.value:n).sort((n,o)=>n-o);f.current=!1,w(a),p?.(a),_(a)},"aria-label":`Set to ${e.label||(u?`${e.value} ${u}`:e.value)}`,"aria-describedby":e.label?void 0:`${D}-tick-${e.index}`,type:"button"},r.createElement("div",{className:"kui-SliderTickMark"}),e.label&&U!==!1&&r.createElement("div",{className:"kui-SliderTickLabel"},e.label),!e.label&&r.createElement("span",{id:`${D}-tick-${e.index}`,className:"kui-sr-only"},u?`${e.value} ${u}`:e.value)))))});ne.displayName="Slider";export{ne as a};
3
- //# sourceMappingURL=chunk-B6OFKABP.js.map
2
+ import{c as I}from"./chunk-5ON3XLRD.js";import{c as E}from"./chunk-HBWBPBSA.js";import{b as L}from"./chunk-XU74PNM2.js";import{c as j}from"./chunk-OKQAVYW4.js";import*as r from"react";import re from"classnames";import{Direction as ae,Slider as v}from"radix-ui";var te=["1","2","3","4"],g={size:{type:"enum",className:"kui-r-size",values:te,default:"2",responsive:!0},showTickLabels:{type:"boolean"},snapToTicks:{type:"boolean"},...E,...L};var ne=r.forwardRef((K,O)=>{let W=I(K,g.size),{className:B,color:G,radius:A,tabIndex:C,...H}=j(W,g),{ticks:c,unit:u,showTickLabels:U,snapToTicks:y,value:$,defaultValue:q,onValueChange:x,onValueCommit:p,"aria-label":F,"aria-labelledby":J,...i}=H,k=i.min??0,d=i.max??100,[Q,X]=r.useState(()=>q??[k]),P=$!==void 0,s=P?$:Q,D=r.useId(),Y=i.step,l=r.useMemo(()=>c?[...c].sort((e,t)=>e.value-t.value):[],[c]),m=r.useCallback(e=>{let t=l[0].value;for(let a of l)Math.abs(a.value-e)<Math.abs(t-e)&&(t=a.value);return t},[l]),R=r.useCallback((e,t)=>{let a=m(e);return e>t&&a<=t?l.find(n=>n.value>t)?.value??t:e<t&&a>=t?[...l].reverse().find(n=>n.value<t)?.value??t:a},[m,l]),f=r.useRef(!1),N=r.useCallback(e=>{let t=a=>u?`${a} ${u}`:a.toString();return e.length===1?`${t(e[0])} out of ${t(d)}`:e.length===2?`${t(e[0])} to ${t(e[1])} out of ${t(d)}`:`${e.map(t).join(", ")} out of ${t(d)}`},[u,d]),Z=ae.useDirection(i.dir),T=i.orientation??"horizontal",V=T==="vertical"?!i.inverted:Z==="rtl"!=!!i.inverted,S=r.useMemo(()=>c?c.map((e,t)=>{let a=(e.value-k)/(d-k)*100;return{...e,percentage:V?100-a:a,index:t}}):null,[c,k,d,V]),b=r.useRef(null),h=r.useRef(null),_=r.useCallback(e=>{b.current&&(b.current.textContent=N(e),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{b.current&&(b.current.textContent="")},1e3))},[N]),w=r.useCallback(e=>{let a=y&&l.length>0?e.map((n,o)=>f.current&&s[o]!==void 0?R(n,s[o]):m(n)):e;P||X(a),x?.(a)},[y,l,R,m,s,x,P]),ee=r.useCallback(e=>{if(!p)return;if(!y||l.length===0){p(e);return}let t=f.current,a=e.map((n,o)=>t&&s[o]!==void 0?R(n,s[o]):m(n));t&&a.every((n,o)=>n===s[o])||p(a)},[p,y,l,R,m,s]);return r.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),r.createElement("div",{className:"kui-SliderContainer","data-orientation":T,"data-has-ticks":S?"":void 0},r.createElement("div",{ref:b,"aria-live":"polite","aria-atomic":"true",className:"kui-sr-only"}),r.createElement(v.Root,{"data-accent-color":G,"data-radius":A,ref:O,...i,value:s,step:Y,onKeyDown:e=>{f.current=!0,i.onKeyDown?.(e)},onPointerDown:e=>{f.current=!1,i.onPointerDown?.(e)},onValueChange:w,onValueCommit:ee,asChild:!1,className:re("kui-SliderRoot",B)},r.createElement(v.Track,{className:"kui-SliderTrack"},r.createElement(v.Range,{className:"kui-SliderRange","data-inverted":i.inverted?"":void 0})),s.map((e,t)=>r.createElement(v.Thumb,{key:t,className:"kui-SliderThumb",...C!==void 0?{tabIndex:C}:void 0,"aria-label":F,"aria-labelledby":J,"aria-valuetext":u?`${e} ${u}`:void 0}))),S&&r.createElement("div",{className:"kui-SliderTicks","data-orientation":T,role:"group","aria-label":"Slider tick marks"},S.map(e=>r.createElement("button",{key:e.index,className:"kui-SliderTick",style:T==="vertical"?{top:`${e.percentage}%`}:{left:`${e.percentage}%`},disabled:i.disabled,onClick:()=>{let t=0;s.forEach((n,o)=>{let M=Math.abs(n-e.value),z=Math.abs(s[t]-e.value);(M<z||M===z&&e.value>n)&&(t=o)});let a=s.map((n,o)=>o===t?e.value:n).sort((n,o)=>n-o);f.current=!1,w(a),p?.(a),_(a)},"aria-label":`Set to ${e.label||(u?`${e.value} ${u}`:e.value)}`,"aria-describedby":e.label?void 0:`${D}-tick-${e.index}`,type:"button"},r.createElement("div",{className:"kui-SliderTickMark"}),e.label&&U!==!1&&r.createElement("div",{className:"kui-SliderTickLabel"},e.label),!e.label&&r.createElement("span",{id:`${D}-tick-${e.index}`,className:"kui-sr-only"},u?`${e.value} ${u}`:e.value)))))});ne.displayName="Slider";export{ne as a};
3
+ //# sourceMappingURL=chunk-VYF6KKYM.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as m}from"./chunk-FATCGZZE.js";import{a as c}from"./chunk-7VJF6EXN.js";import{a as l}from"./chunk-TGRHRMQI.js";import{a as D}from"./chunk-JP36JSNP.js";import{a as P}from"./chunk-4MNRLB57.js";import{a as p}from"./chunk-4KBKS3ZE.js";import{c as r}from"./chunk-OKQAVYW4.js";import{a as g}from"./chunk-AQKSO3SW.js";import{c as n}from"./chunk-5ON3XLRD.js";import{a as w}from"./chunk-VQPANPMI.js";var z={};w(z,{Close:()=>T,Content:()=>v,Description:()=>y,Root:()=>f,Title:()=>R,Trigger:()=>d});import*as o from"react";import W from"classnames";import{Dialog as i}from"radix-ui";var f=e=>o.createElement(i.Root,{...e,modal:!0});f.displayName="Dialog.Root";var d=o.forwardRef(({children:e,...t},a)=>o.createElement(i.Trigger,{...t,ref:a,asChild:!0},l(e)));d.displayName="Dialog.Trigger";var{align:O,...C}=m,B={align:O},S={Title:({children:e})=>o.createElement(i.Title,{asChild:!0},e),Close:({children:e})=>o.createElement(i.Close,{asChild:!0},e)},v=o.forwardRef(({align:e,...t},a)=>{let u=n(t,C.size),{className:h}=r({align:e},B),{className:N,forceMount:E,container:x,onCloseAutoFocus:H,...s}=r(u,C);return c(),o.createElement(i.Portal,{container:x,forceMount:E},o.createElement(g,{asChild:!0},o.createElement(i.Overlay,{className:"kui-BaseDialogOverlay kui-DialogOverlay"},o.createElement("div",{className:"kui-BaseDialogScroll kui-DialogScroll"},o.createElement("div",{className:`kui-BaseDialogScrollPadding kui-DialogScrollPadding ${h}`},o.createElement(i.Content,{...s,ref:a,className:W("kui-BaseDialogContent","kui-DialogContent",N),children:o.createElement(p.Provider,{value:S},s.children),"aria-modal":"true",onCloseAutoFocus:k=>{H?.(k),document.body.style.pointerEvents=""}}))))))});v.displayName="Dialog.Content";var R=o.forwardRef((e,t)=>o.createElement(i.Title,{asChild:!0},o.createElement(D,{size:"5",trim:"start",...e,asChild:!1,ref:t})));R.displayName="Dialog.Title";var y=o.forwardRef((e,t)=>o.createElement(i.Description,{asChild:!0},o.createElement(P,{as:"p",size:"3",...e,asChild:!1,ref:t})));y.displayName="Dialog.Description";var T=o.forwardRef(({children:e,...t},a)=>o.createElement(i.Close,{...t,ref:a,asChild:!0},l(e)));T.displayName="Dialog.Close";export{f as a,d as b,v as c,R as d,y as e,T as f,z as g};
3
- //# sourceMappingURL=chunk-6UFIS6B2.js.map
2
+ import{a as m}from"./chunk-FATCGZZE.js";import{a as c}from"./chunk-7VJF6EXN.js";import{a as l}from"./chunk-TGRHRMQI.js";import{a as D}from"./chunk-OBSZOD5M.js";import{a as P}from"./chunk-FICBVI4M.js";import{a as g}from"./chunk-HGF4CKRY.js";import{c as n}from"./chunk-5ON3XLRD.js";import{a as p}from"./chunk-4KBKS3ZE.js";import{c as r}from"./chunk-OKQAVYW4.js";import{a as w}from"./chunk-VQPANPMI.js";var z={};w(z,{Close:()=>T,Content:()=>v,Description:()=>y,Root:()=>f,Title:()=>R,Trigger:()=>d});import*as o from"react";import W from"classnames";import{Dialog as i}from"radix-ui";var f=e=>o.createElement(i.Root,{...e,modal:!0});f.displayName="Dialog.Root";var d=o.forwardRef(({children:e,...t},a)=>o.createElement(i.Trigger,{...t,ref:a,asChild:!0},l(e)));d.displayName="Dialog.Trigger";var{align:O,...C}=m,B={align:O},S={Title:({children:e})=>o.createElement(i.Title,{asChild:!0},e),Close:({children:e})=>o.createElement(i.Close,{asChild:!0},e)},v=o.forwardRef(({align:e,...t},a)=>{let u=n(t,C.size),{className:h}=r({align:e},B),{className:N,forceMount:E,container:x,onCloseAutoFocus:H,...s}=r(u,C);return c(),o.createElement(i.Portal,{container:x,forceMount:E},o.createElement(g,{asChild:!0},o.createElement(i.Overlay,{className:"kui-BaseDialogOverlay kui-DialogOverlay"},o.createElement("div",{className:"kui-BaseDialogScroll kui-DialogScroll"},o.createElement("div",{className:`kui-BaseDialogScrollPadding kui-DialogScrollPadding ${h}`},o.createElement(i.Content,{...s,ref:a,className:W("kui-BaseDialogContent","kui-DialogContent",N),children:o.createElement(p.Provider,{value:S},s.children),"aria-modal":"true",onCloseAutoFocus:k=>{H?.(k),document.body.style.pointerEvents=""}}))))))});v.displayName="Dialog.Content";var R=o.forwardRef((e,t)=>o.createElement(i.Title,{asChild:!0},o.createElement(D,{size:"5",trim:"start",...e,asChild:!1,ref:t})));R.displayName="Dialog.Title";var y=o.forwardRef((e,t)=>o.createElement(i.Description,{asChild:!0},o.createElement(P,{as:"p",size:"3",...e,asChild:!1,ref:t})));y.displayName="Dialog.Description";var T=o.forwardRef(({children:e,...t},a)=>o.createElement(i.Close,{...t,ref:a,asChild:!0},l(e)));T.displayName="Dialog.Close";export{f as a,d as b,v as c,R as d,y as e,T as f,z as g};
3
+ //# sourceMappingURL=chunk-W35ZKQMQ.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{c as s}from"./chunk-OKQAVYW4.js";import{c as t}from"./chunk-5ON3XLRD.js";import{a as o}from"./chunk-CLJ6SEGP.js";import*as e from"react";import P from"classnames";import{Slot as l}from"radix-ui";var c=["1","2","3","4"],u=["raised","surface","outline","ghost","soft"],r={...o,size:{type:"enum",className:"kui-r-size",values:c,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:u,default:"raised"}};var C=e.forwardRef((p,a)=>{let i=t(p,r.size),{asChild:m,className:f,...n}=s(i,r),d=m?l.Root:"div";return e.createElement(d,{ref:a,...n,className:P("kui-reset","kui-BaseCard","kui-Card","kui-SurfaceNest",f)})});C.displayName="Card";export{C as a};
3
- //# sourceMappingURL=chunk-EPGIYTFK.js.map
2
+ import{c as t}from"./chunk-5ON3XLRD.js";import{c as s}from"./chunk-OKQAVYW4.js";import{a as o}from"./chunk-CLJ6SEGP.js";import*as e from"react";import P from"classnames";import{Slot as l}from"radix-ui";var c=["1","2","3","4"],u=["raised","surface","outline","ghost","soft"],r={...o,size:{type:"enum",className:"kui-r-size",values:c,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:u,default:"raised"}};var C=e.forwardRef((p,a)=>{let i=t(p,r.size),{asChild:m,className:f,...n}=s(i,r),d=m?l.Root:"div";return e.createElement(d,{ref:a,...n,className:P("kui-reset","kui-BaseCard","kui-Card","kui-SurfaceNest",f)})});C.displayName="Card";export{C as a};
3
+ //# sourceMappingURL=chunk-X7DGYRAY.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as d}from"./chunk-OAJ5DARR.js";import{a as u}from"./chunk-MGWGD6KI.js";import{a as f}from"./chunk-L54FWKJE.js";import{a as b,c as r}from"./chunk-OKQAVYW4.js";import{c}from"./chunk-5ON3XLRD.js";import{a as g}from"./chunk-VQPANPMI.js";var G={};g(G,{Body:()=>y,Cell:()=>w,ColumnHeaderCell:()=>v,Header:()=>T,Root:()=>R,Row:()=>C,RowHeaderCell:()=>H});import*as e from"react";import t from"classnames";var O=["1","2","3","4"],W=["surface","ghost"],j=["auto","fixed"],p={size:{type:"enum",className:"kui-r-size",values:O,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:W,default:"ghost"},layout:{type:"enum",className:"kui-r-tl",values:j,responsive:!0}},z=["start","center","end","baseline"],P={align:{type:"enum",className:"kui-r-va",values:z,parseValue:V,responsive:!0}};function V(a){return{baseline:"baseline",start:"top",center:"middle",end:"bottom"}[a]}var A=["start","center","end"],n={justify:{type:"enum",className:"kui-r-ta",values:A,responsive:!0},...f,...d};var R=e.forwardRef((a,o)=>{let l=c(a,p.size),{layout:s,...N}=p,{className:h,children:D,layout:E,"aria-label":m,"aria-labelledby":i,"aria-describedby":k,...x}=r(l,N),B=b({value:E,className:p.layout.className,propValues:p.layout.values});return e.createElement("div",{ref:o,className:t("kui-TableRoot",h),...x},e.createElement(u,{"aria-label":m,"aria-labelledby":i},e.createElement("table",{className:t("kui-TableRootTable",B),"aria-label":m,"aria-labelledby":i,"aria-describedby":k},D)))});R.displayName="Table.Root";var T=e.forwardRef(({className:a,...o},l)=>e.createElement("thead",{...o,ref:l,className:t("kui-TableHeader",a)}));T.displayName="Table.Header";var y=e.forwardRef(({className:a,...o},l)=>e.createElement("tbody",{...o,ref:l,className:t("kui-TableBody",a)}));y.displayName="Table.Body";var C=e.forwardRef((a,o)=>{let{className:l,...s}=r(a,P);return e.createElement("tr",{...s,ref:o,className:t("kui-TableRow",l)})});C.displayName="Table.Row";var w=e.forwardRef((a,o)=>{let{className:l,...s}=r(a,n);return e.createElement("td",{className:t("kui-TableCell",l),ref:o,...s})});w.displayName="Table.Cell";var v=e.forwardRef((a,o)=>{let{className:l,...s}=r(a,n);return e.createElement("th",{className:t("kui-TableCell","kui-TableColumnHeaderCell",l),scope:"col",ref:o,...s})});v.displayName="Table.ColumnHeaderCell";var H=e.forwardRef((a,o)=>{let{className:l,...s}=r(a,n);return e.createElement("th",{className:t("kui-TableCell","kui-TableRowHeaderCell",l),scope:"row",ref:o,...s})});H.displayName="Table.RowHeaderCell";export{R as a,T as b,y as c,C as d,w as e,v as f,H as g,G as h};
3
- //# sourceMappingURL=chunk-X7JHZ3HA.js.map
2
+ import{a as d}from"./chunk-OAJ5DARR.js";import{c}from"./chunk-5ON3XLRD.js";import{a as u}from"./chunk-DFQIIYLD.js";import{a as f}from"./chunk-L54FWKJE.js";import{a as b,c as r}from"./chunk-OKQAVYW4.js";import{a as g}from"./chunk-VQPANPMI.js";var G={};g(G,{Body:()=>y,Cell:()=>w,ColumnHeaderCell:()=>v,Header:()=>T,Root:()=>R,Row:()=>C,RowHeaderCell:()=>H});import*as e from"react";import t from"classnames";var O=["1","2","3","4"],W=["surface","ghost"],j=["auto","fixed"],p={size:{type:"enum",className:"kui-r-size",values:O,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:W,default:"ghost"},layout:{type:"enum",className:"kui-r-tl",values:j,responsive:!0}},z=["start","center","end","baseline"],P={align:{type:"enum",className:"kui-r-va",values:z,parseValue:V,responsive:!0}};function V(a){return{baseline:"baseline",start:"top",center:"middle",end:"bottom"}[a]}var A=["start","center","end"],n={justify:{type:"enum",className:"kui-r-ta",values:A,responsive:!0},...f,...d};var R=e.forwardRef((a,o)=>{let l=c(a,p.size),{layout:s,...N}=p,{className:h,children:D,layout:E,"aria-label":m,"aria-labelledby":i,"aria-describedby":k,...x}=r(l,N),B=b({value:E,className:p.layout.className,propValues:p.layout.values});return e.createElement("div",{ref:o,className:t("kui-TableRoot",h),...x},e.createElement(u,{"aria-label":m,"aria-labelledby":i},e.createElement("table",{className:t("kui-TableRootTable",B),"aria-label":m,"aria-labelledby":i,"aria-describedby":k},D)))});R.displayName="Table.Root";var T=e.forwardRef(({className:a,...o},l)=>e.createElement("thead",{...o,ref:l,className:t("kui-TableHeader",a)}));T.displayName="Table.Header";var y=e.forwardRef(({className:a,...o},l)=>e.createElement("tbody",{...o,ref:l,className:t("kui-TableBody",a)}));y.displayName="Table.Body";var C=e.forwardRef((a,o)=>{let{className:l,...s}=r(a,P);return e.createElement("tr",{...s,ref:o,className:t("kui-TableRow",l)})});C.displayName="Table.Row";var w=e.forwardRef((a,o)=>{let{className:l,...s}=r(a,n);return e.createElement("td",{className:t("kui-TableCell",l),ref:o,...s})});w.displayName="Table.Cell";var v=e.forwardRef((a,o)=>{let{className:l,...s}=r(a,n);return e.createElement("th",{className:t("kui-TableCell","kui-TableColumnHeaderCell",l),scope:"col",ref:o,...s})});v.displayName="Table.ColumnHeaderCell";var H=e.forwardRef((a,o)=>{let{className:l,...s}=r(a,n);return e.createElement("th",{className:t("kui-TableCell","kui-TableRowHeaderCell",l),scope:"row",ref:o,...s})});H.displayName="Table.RowHeaderCell";export{R as a,T as b,y as c,C as d,w as e,v as f,H as g,G as h};
3
+ //# sourceMappingURL=chunk-XF6Z5NKE.js.map
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import{a as ye}from"./chunk-YCLPURTD.js";import{a as Z}from"./chunk-OAJ5DARR.js";import{b as xe,c as $}from"./chunk-OKQAVYW4.js";import{c as ue}from"./chunk-5ON3XLRD.js";import{c as Y}from"./chunk-HBWBPBSA.js";import{b as le}from"./chunk-XU74PNM2.js";import{a as Ie}from"./chunk-VQPANPMI.js";var Ve={};Ie(Ve,{Group:()=>Fe,Root:()=>Te,Slot:()=>Me});import*as e from"react";import*as ge from"react-dom";import J from"classnames";import{composeEventHandlers as _,composeRefs as Se,useLayoutEffect as ze}from"radix-ui/internal";var Pe=["1","2","3","4"],Le=["raised","surface","soft","ghost","outline"],ce={size:{type:"enum",className:"kui-r-size",values:Pe,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:Le,default:"raised"},error:{type:"boolean",default:!1},errorMessage:{type:"string",default:void 0},required:{type:"boolean",default:!1},"aria-describedby":{type:"string",default:void 0},"aria-labelledby":{type:"string",default:void 0},...Y,...le},Ne=["raised","surface","soft","outline","ghost"],de={size:{type:"enum",className:"kui-r-size",values:Pe,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:Ne,default:"raised"},disabled:{type:"boolean",default:!1},...Y,...le},Ge=["left","right"],Re={side:{type:"enum",values:Ge},...Y,gap:ye.gap,px:Z.px,pl:Z.pl,pr:Z.pr};var he=e.createContext(null),pe="button, a, input, select, textarea, label, [tabindex], [contenteditable]",ve=e.createContext(null),Te=e.forwardRef((x,z)=>{let l=e.useContext(ve),d=l?{...x,size:l.size,variant:l.variant,radius:l.radius,color:x.color??l.color,disabled:!!(l.disabled||x.disabled)}:x,{className:y,style:p,...P}=ue(d,ce.size),f=e.useRef(null),{children:k,className:E,color:V,radius:U,style:H,...n}=$(P,ce),c=!!n.errorMessage,I=e.useId(),[K,O]=e.useState([]),A=e.useCallback(r=>(O(o=>o.includes(r)?o:[...o,r]),()=>O(o=>o.filter(h=>h!==r))),[]),R=e.useRef(null),j=e.useCallback(r=>(R.current=r,()=>{R.current===r&&(R.current=null)}),[]),F=!!(n.disabled||n.readOnly),B=e.useMemo(()=>({registerSlot:A,registerScrub:j,inert:F}),[A,j,F]),{"aria-describedby":L,"aria-labelledby":N,"aria-invalid":s}=n,g=!!n.error||s===!0||s==="true",W=e.useMemo(()=>{let r=[];return n.errorMessage&&r.push(I),L&&r.push(L),r.push(...K),r.length>0?r.join(" "):void 0},[n.errorMessage,L,I,K]),Q=e.useMemo(()=>({"aria-invalid":g?!0:s,"aria-describedby":W,"aria-labelledby":N}),[g,s,W,N]),{error:b,errorMessage:ee,required:q,"aria-describedby":fe,"aria-labelledby":te,onKeyDown:X,...M}=n,S=r=>{let o=R.current;!o||F||r.key!=="ArrowUp"&&r.key!=="ArrowDown"||(r.preventDefault(),o(r.key==="ArrowUp"?1:-1,r.shiftKey,r.altKey))},u=e.useCallback(r=>{let o=r.target;if(o.closest(pe))return;let h=f.current;if(!h)return;let w=o.closest(`
2
+ import{a as ye}from"./chunk-YCLPURTD.js";import{a as Z}from"./chunk-OAJ5DARR.js";import{c as ue}from"./chunk-5ON3XLRD.js";import{c as Y}from"./chunk-HBWBPBSA.js";import{b as le}from"./chunk-XU74PNM2.js";import{b as xe,c as $}from"./chunk-OKQAVYW4.js";import{a as Ie}from"./chunk-VQPANPMI.js";var Ve={};Ie(Ve,{Group:()=>Fe,Root:()=>Te,Slot:()=>Me});import*as e from"react";import*as ge from"react-dom";import J from"classnames";import{composeEventHandlers as _,composeRefs as Se,useLayoutEffect as ze}from"radix-ui/internal";var Pe=["1","2","3","4"],Le=["raised","surface","soft","ghost","outline"],ce={size:{type:"enum",className:"kui-r-size",values:Pe,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:Le,default:"raised"},error:{type:"boolean",default:!1},errorMessage:{type:"string",default:void 0},required:{type:"boolean",default:!1},"aria-describedby":{type:"string",default:void 0},"aria-labelledby":{type:"string",default:void 0},...Y,...le},Ne=["raised","surface","soft","outline","ghost"],de={size:{type:"enum",className:"kui-r-size",values:Pe,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:Ne,default:"raised"},disabled:{type:"boolean",default:!1},...Y,...le},Ge=["left","right"],Re={side:{type:"enum",values:Ge},...Y,gap:ye.gap,px:Z.px,pl:Z.pl,pr:Z.pr};var he=e.createContext(null),pe="button, a, input, select, textarea, label, [tabindex], [contenteditable]",ve=e.createContext(null),Te=e.forwardRef((x,z)=>{let l=e.useContext(ve),d=l?{...x,size:l.size,variant:l.variant,radius:l.radius,color:x.color??l.color,disabled:!!(l.disabled||x.disabled)}:x,{className:y,style:p,...P}=ue(d,ce.size),f=e.useRef(null),{children:k,className:E,color:V,radius:U,style:H,...n}=$(P,ce),c=!!n.errorMessage,I=e.useId(),[K,O]=e.useState([]),A=e.useCallback(r=>(O(o=>o.includes(r)?o:[...o,r]),()=>O(o=>o.filter(h=>h!==r))),[]),R=e.useRef(null),j=e.useCallback(r=>(R.current=r,()=>{R.current===r&&(R.current=null)}),[]),F=!!(n.disabled||n.readOnly),B=e.useMemo(()=>({registerSlot:A,registerScrub:j,inert:F}),[A,j,F]),{"aria-describedby":L,"aria-labelledby":N,"aria-invalid":s}=n,g=!!n.error||s===!0||s==="true",W=e.useMemo(()=>{let r=[];return n.errorMessage&&r.push(I),L&&r.push(L),r.push(...K),r.length>0?r.join(" "):void 0},[n.errorMessage,L,I,K]),Q=e.useMemo(()=>({"aria-invalid":g?!0:s,"aria-describedby":W,"aria-labelledby":N}),[g,s,W,N]),{error:b,errorMessage:ee,required:q,"aria-describedby":fe,"aria-labelledby":te,onKeyDown:X,...M}=n,S=r=>{let o=R.current;!o||F||r.key!=="ArrowUp"&&r.key!=="ArrowDown"||(r.preventDefault(),o(r.key==="ArrowUp"?1:-1,r.shiftKey,r.altKey))},u=e.useCallback(r=>{let o=r.target;if(o.closest(pe))return;let h=f.current;if(!h)return;let w=o.closest(`
3
3
  .kui-TextFieldSlot[data-side='right'],
4
4
  .kui-TextFieldSlot:not([data-side='right']) ~ .kui-TextFieldSlot:not([data-side='left'])
5
5
  `)?h.value.length:0;r.preventDefault(),h.focus();try{h.setSelectionRange(w,w)}catch{}},[]),D=e.createElement("div",{"data-accent-color":V,"data-radius":U,style:c?H:xe(H,p),className:J("kui-TextFieldRoot",E,!c&&y,{"kui-error":g}),onMouseDown:u},e.createElement("input",{...M,required:q||void 0,...Q,onKeyDown:_(X,S),ref:Se(f,z),className:"kui-reset kui-TextFieldInput"}),e.createElement(he.Provider,{value:B},k));return e.createElement("div",{className:J("kui-TextFieldWrapper",c&&y),style:c?p:void 0,"data-message":c||void 0},D,c?e.createElement("div",{id:I,className:"kui-TextFieldErrorMessage",role:"alert"},n.errorMessage):null)});Te.displayName="TextField.Root";var Fe=e.forwardRef((x,z)=>{let l=ue(x,de.size),{size:d,variant:y,radius:p,color:P,disabled:f}=l,{className:k,children:E,radius:V,color:U,disabled:H,...n}=$(l,de),c=e.useMemo(()=>({size:d,variant:y,radius:p,color:P,disabled:f}),[d,y,p,P,f]);return e.createElement("div",{role:"group","data-accent-color":P,"data-radius":p,"data-disabled":f||void 0,...n,ref:z,className:J("kui-TextFieldGroup",k)},e.createElement(ve.Provider,{value:c},E))});Fe.displayName="TextField.Group";var Me=e.forwardRef((x,z)=>{let{scrub:l,scrubValue:d,scrubStep:y=1,scrubSensitivity:p=1,scrubMin:P,scrubMax:f,scrubShiftMultiplier:k=10,scrubAltMultiplier:E=.1,onScrub:V,...U}=x,{className:H,color:n,side:c,onPointerDown:I,onPointerMove:K,onPointerUp:O,onLostPointerCapture:A,...R}=$(U,Re),j=e.useId(),F=R.id??j,B=e.useContext(he),L=B?.registerSlot,N=B?.registerScrub,s=!!l&&!B?.inert,g=e.useRef(null),[W,Q]=e.useState(null);ze(()=>{let t=!!g.current?.querySelector(pe);Q(i=>i===t?i:t)}),e.useEffect(()=>W===!1?L?.(F):void 0,[L,F,W]);let[b,ee]=e.useState(!1),[q,fe]=e.useState({x:0,y:0}),te=e.useRef(null),X=e.useRef(0),M=e.useRef(0),S=e.useRef(0),u=e.useRef(0),D=e.useRef(null),r=e.useRef(0),o=e.useRef({scrubValue:d,scrubStep:y,scrubSensitivity:p,scrubMin:P,scrubMax:f,scrubShiftMultiplier:k,scrubAltMultiplier:E,onScrub:V});o.current={scrubValue:d,scrubStep:y,scrubSensitivity:p,scrubMin:P,scrubMax:f,scrubShiftMultiplier:k,scrubAltMultiplier:E,onScrub:V};let h=e.useCallback(t=>{if(!s||t.target.closest(pe))return;t.preventDefault(),M.current=0,S.current=d??0,u.current=t.clientX,X.current=t.clientY,fe({x:t.clientX,y:t.clientY});let G=g.current;G&&(D.current=t.pointerId,r.current=t.clientX,G.setPointerCapture(t.pointerId),ee(!0))},[s,d]),re=e.useCallback((t,i,G,m)=>{let a=o.current,v=window.innerWidth,C=window.innerHeight;u.current+=t,u.current>v?u.current=u.current%v:u.current<0&&(u.current=v+u.current%v);let T=X.current+i;T>C?T=T%C:T<0&&(T=C+T%C),X.current=T;let oe=te.current;oe&&(oe.style.left=`${u.current}px`,oe.style.top=`${T}px`),M.current+=t;let se=M.current/a.scrubSensitivity;if(Math.abs(se)>=1){let ne=1;G?ne=a.scrubShiftMultiplier:m&&(ne=a.scrubAltMultiplier);let be=Math.trunc(se),ie=be*a.scrubStep*ne,ae=ie;if(a.scrubMin!==void 0||a.scrubMax!==void 0){let Ee=S.current+ie,me=Math.max(a.scrubMin??-1/0,Math.min(a.scrubMax??1/0,Ee));ae=me-S.current,S.current=me}else S.current+=ie;ae!==0&&a.onScrub?.(ae,!0),M.current=(se-be)*a.scrubSensitivity}},[]),w=e.useCallback(()=>{o.current.onScrub?.(0,!1),M.current=0,S.current=0,D.current=null,ee(!1)},[]),De=e.useCallback(t=>{if(!b)return;let i=t.clientX-r.current;r.current=t.clientX,re(i,t.movementY,t.shiftKey,t.altKey)},[b,re]),we=e.useCallback(t=>{if(D.current!==t.pointerId)return;let i=g.current;i&&D.current!==null&&i.releasePointerCapture(D.current),w()},[w]),Ce=e.useCallback(()=>{b&&w()},[b,w]);e.useEffect(()=>{if(!b)return;let t=document.createElement("style");return t.textContent="* { cursor: none !important; user-select: none !important; }",document.head.appendChild(t),()=>{document.head.removeChild(t)}},[b]),e.useEffect(()=>{if(!(!s||!N))return N((t,i,G)=>{let m=o.current,a=i?m.scrubShiftMultiplier:G?m.scrubAltMultiplier:1,v=m.scrubValue??0,C=Math.max(m.scrubMin??-1/0,Math.min(m.scrubMax??1/0,v+t*m.scrubStep*a));C!==v&&m.onScrub?.(C-v,!1)})},[s,N]);let ke=b?ge.createPortal(e.createElement("img",{ref:te,className:"kui-TextFieldSlotScrubCursor",src:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='black' stroke='white' stroke-width='1' d='M0 12 L5 7 L5 10 L19 10 L19 7 L24 12 L19 17 L19 14 L5 14 L5 17 Z'/%3E%3C/svg%3E",alt:"",style:{position:"fixed",left:q.x,top:q.y,transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:99999,width:24,height:24},"aria-hidden":"true"}),document.body):null;return e.createElement("div",{"data-accent-color":n,"data-side":c,"data-scrub":s||void 0,"data-scrubbing":b||void 0,...R,id:F,ref:Se(g,z),className:J("kui-TextFieldSlot",H),onPointerDown:s?_(I,h):I,onPointerMove:s?_(K,De):K,onPointerUp:s?_(O,we):O,onLostPointerCapture:s?_(A,Ce):A},R.children,ke)});Me.displayName="TextField.Slot";export{Te as a,Fe as b,Me as c,Ve as d};
6
- //# sourceMappingURL=chunk-K5V53KTJ.js.map
6
+ //# sourceMappingURL=chunk-Y44DYJA5.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as d}from"./chunk-KJZSXLIX.js";import{b as m}from"./chunk-5KJIPH2N.js";import{a as E}from"./chunk-VQPANPMI.js";var L={};E(L,{Button:()=>R,Content:()=>M,Item:()=>P,Root:()=>S,Viewport:()=>g,useMessageScroller:()=>f,useMessageScrollerScrollable:()=>V,useMessageScrollerVisibility:()=>N});import*as e from"react";import c from"classnames";import{MessageScroller as a,useMessageScroller as f,useMessageScrollerScrollable as V,useMessageScrollerVisibility as N}from"@shadcn/react/message-scroller";import{useComposedRefs as T}from"radix-ui/internal";var S=e.forwardRef(({autoScroll:o=!0,defaultScrollPosition:t="end",scrollEdgeThreshold:r,scrollMargin:s,className:n,children:i,...l},u)=>e.createElement(a.Provider,{autoScroll:o,defaultScrollPosition:t,...r!=null?{scrollEdgeThreshold:r}:{},...s!=null?{scrollMargin:s}:{}},e.createElement(a.Root,{...l,ref:u,className:c("kui-MessageScrollerRoot",n)},i)));S.displayName="MessageScroller.Root";var g=e.forwardRef(({className:o,"aria-label":t,fade:r=!0,...s},n)=>{let i=m(r),l=T(n,i);return e.createElement(a.Viewport,{"aria-label":t??"",...s,ref:l,"data-fade":r?"":void 0,className:c("kui-MessageScrollerViewport",o)})});g.displayName="MessageScroller.Viewport";var M=e.forwardRef(({className:o,...t},r)=>e.createElement(a.Content,{...t,ref:r,className:c("kui-MessageScrollerContent",o)}));M.displayName="MessageScroller.Content";var P=e.forwardRef(({className:o,...t},r)=>e.createElement(a.Item,{...t,ref:r,className:c("kui-MessageScrollerItem",o)}));P.displayName="MessageScroller.Item";var R=e.forwardRef(({direction:o="end",behavior:t="auto",className:r,children:s,size:n,variant:i="surface",emphasis:l,color:u="gray",radius:v="full","aria-label":b,onClick:y,...B},w)=>{let{scrollToEnd:h,scrollToStart:C}=f(),k=p=>{if(y?.(p),p.defaultPrevented)return;p.preventDefault(),p.currentTarget.closest(".kui-MessageScrollerRoot")?.querySelector(".kui-MessageScrollerViewport")?.focus({preventScroll:!0}),o==="start"?C({behavior:t}):h({behavior:t})};return e.createElement(a.Button,{direction:o,behavior:t,onClick:k,render:e.createElement(d,{iconOnly:!0,...B,ref:w,size:n,...l?{emphasis:l}:{variant:i},color:u,radius:v,"aria-label":b??(o==="end"?"Jump to the latest":"Jump to the first"),className:c("kui-MessageScrollerButton",r),"data-direction":o},s??e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":!0,style:o==="start"?{transform:"rotate(180deg)"}:void 0},e.createElement("path",{d:"M7.5 2.5v10M3.5 8.5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})))})});R.displayName="MessageScroller.Button";export{f as a,V as b,N as c,S as d,g as e,M as f,P as g,R as h,L as i};
3
- //# sourceMappingURL=chunk-MMDZBPSX.js.map
2
+ import{a as d}from"./chunk-JQMWNI62.js";import{b as m}from"./chunk-5KJIPH2N.js";import{a as E}from"./chunk-VQPANPMI.js";var L={};E(L,{Button:()=>R,Content:()=>M,Item:()=>P,Root:()=>S,Viewport:()=>g,useMessageScroller:()=>f,useMessageScrollerScrollable:()=>V,useMessageScrollerVisibility:()=>N});import*as e from"react";import c from"classnames";import{MessageScroller as a,useMessageScroller as f,useMessageScrollerScrollable as V,useMessageScrollerVisibility as N}from"@shadcn/react/message-scroller";import{useComposedRefs as T}from"radix-ui/internal";var S=e.forwardRef(({autoScroll:o=!0,defaultScrollPosition:t="end",scrollEdgeThreshold:r,scrollMargin:s,className:n,children:i,...l},u)=>e.createElement(a.Provider,{autoScroll:o,defaultScrollPosition:t,...r!=null?{scrollEdgeThreshold:r}:{},...s!=null?{scrollMargin:s}:{}},e.createElement(a.Root,{...l,ref:u,className:c("kui-MessageScrollerRoot",n)},i)));S.displayName="MessageScroller.Root";var g=e.forwardRef(({className:o,"aria-label":t,fade:r=!0,...s},n)=>{let i=m(r),l=T(n,i);return e.createElement(a.Viewport,{"aria-label":t??"",...s,ref:l,"data-fade":r?"":void 0,className:c("kui-MessageScrollerViewport",o)})});g.displayName="MessageScroller.Viewport";var M=e.forwardRef(({className:o,...t},r)=>e.createElement(a.Content,{...t,ref:r,className:c("kui-MessageScrollerContent",o)}));M.displayName="MessageScroller.Content";var P=e.forwardRef(({className:o,...t},r)=>e.createElement(a.Item,{...t,ref:r,className:c("kui-MessageScrollerItem",o)}));P.displayName="MessageScroller.Item";var R=e.forwardRef(({direction:o="end",behavior:t="auto",className:r,children:s,size:n,variant:i="surface",emphasis:l,color:u="gray",radius:v="full","aria-label":b,onClick:y,...B},w)=>{let{scrollToEnd:h,scrollToStart:C}=f(),k=p=>{if(y?.(p),p.defaultPrevented)return;p.preventDefault(),p.currentTarget.closest(".kui-MessageScrollerRoot")?.querySelector(".kui-MessageScrollerViewport")?.focus({preventScroll:!0}),o==="start"?C({behavior:t}):h({behavior:t})};return e.createElement(a.Button,{direction:o,behavior:t,onClick:k,render:e.createElement(d,{iconOnly:!0,...B,ref:w,size:n,...l?{emphasis:l}:{variant:i},color:u,radius:v,"aria-label":b??(o==="end"?"Jump to the latest":"Jump to the first"),className:c("kui-MessageScrollerButton",r),"data-direction":o},s??e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":!0,style:o==="start"?{transform:"rotate(180deg)"}:void 0},e.createElement("path",{d:"M7.5 2.5v10M3.5 8.5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})))})});R.displayName="MessageScroller.Button";export{f as a,V as b,N as c,S as d,g as e,M as f,P as g,R as h,L as i};
3
+ //# sourceMappingURL=chunk-YOTTLPJ3.js.map
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as d,c as E,f as H,g as N}from"./chunk-XUCR7L4G.js";import{a as R,e as p}from"./chunk-3QWGSRYC.js";import{a as y,b as x,c as O}from"./chunk-LTUW36HM.js";import{a as M,b as T,c as w}from"./chunk-QKCNGEX4.js";import{a as v}from"./chunk-WEBNIUEX.js";import{a as B}from"./chunk-G66WDIIV.js";import{b as S}from"./chunk-VWRPVM5K.js";import{o as C}from"./chunk-GHWEXMF6.js";import*as e from"react";import re from"classnames";import{useComposedRefs as pe}from"radix-ui/internal";var de={controlled:"open",default:"defaultOpen"},I=e.forwardRef((U,k)=>{let{className:V,presentation:A="fixed",defaultOpen:L,open:$,onOpenChange:q,expandedSize:t=200,minSize:n=100,maxSize:a=400,resizable:m=!1,collapsible:D=!0,onExpand:W,onCollapse:_,onResize:j,onResizeStart:F,onResizeEnd:G,snapPoints:i,snapTolerance:K,collapseThreshold:s,paneId:l,persistence:r,children:J,style:Q,size:c,defaultSize:u,onSizeChange:X,sizeUpdate:Y,sizeUpdateMs:Z=50,inset:P,id:ee,...f}=U,{table:z,attributes:oe}=O(A,"fixed"),o=y({name:"bottom",label:"Bottom",propNames:de,id:ee,controlled:d($),defaultValue:d(L),presentationTable:z,builtIn:E,onChange:(se,le)=>q?.(se!=="closed",{reason:le}),onExpand:W,onCollapse:_,size:t});C("bottom",P),e.useEffect(()=>{(i!==void 0||s!==void 0||l!==void 0||r!==void 0)&&void 0},[i,s,l,r]);let b=e.useRef(null),te=pe(k,o.setElement,b),ne=T({name:"bottom",elementId:o.id,elementRef:b,cssVarName:"--bottom-size",orientation:"horizontal",edge:"start",growth:H,expandedSize:t,minSize:n,maxSize:a,resizable:m,collapsible:D,size:c,defaultSize:u,onSizeChange:X,sizeUpdate:Y,sizeUpdateMs:Z,onResize:j,onResizeStart:F,onResizeEnd:G,snapPoints:i,snapTolerance:K,collapseThreshold:s,paneId:l,persistence:r,overlaying:o.overlaying,overlayingNow:()=>z[B()]==="overlay",requestCollapse:()=>o.setValue("closed","toggle"),requestToggle:()=>o.toggle("toggle")}),h=M(c,u,n,a),{handles:g,content:ae}=w(J,p),ie=m&&o.shown!==!1&&!o.overlaying?e.createElement(v.Provider,{value:ne},g.length>0?g:e.createElement(R,null)):null;return e.createElement("div",{...N(f),id:o.id,ref:te,className:re("kui-ShellPane","kui-ShellBottom",V),...x(o,oe),"data-inset":P||void 0,tabIndex:o.overlaying?-1:f.tabIndex,style:{...Q,"--bottom-expanded-size":`${t}px`,...h?{"--bottom-size":h}:{},"--bottom-min-size":`${n}px`,"--bottom-max-size":`${a}px`}},e.createElement("div",{className:"kui-ShellBottomContent"},e.createElement(S,null,ae)),ie)});I.displayName="Shell.Bottom";I.Handle=p;export{I as a};
3
+ //# sourceMappingURL=chunk-ZBSGH74F.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/_internal/shell-bottom.tsx"],
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { PaneResizeContext } from './shell-resize.js';\nimport { BottomHandle, PaneHandle } from './shell-handles.js';\nimport { usePane, paneAttributes, usePresentationTable } from './shell-pane.js';\nimport { splitHandles, useInitialPaneSize, useResizablePane, type SizeChangeMeta } from './shell-resizable.js';\nimport { useInsetRegistration, warnOnce } from './shell-store.js';\nimport { bottomAnchoredGrowth, detailRest, toPaneValue, withoutRemovedPaneProps } from './shell-rest.js';\nimport { PageScope } from './page-scope.js';\nimport { readBreakpoint } from '../../hooks/use-breakpoint.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps } from '../shell.types.js';\n\ntype BottomOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' | 'dismiss' };\ntype BottomControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; defaultOpen?: never };\n/** Since 0.8.0 `defaultOpen` takes a responsive object here too, as the docs already said it did. */\ntype BottomUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; open?: never };\ntype BottomSizeControlledProps = { size: number | string; defaultSize?: never };\ntype BottomSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\ntype BottomPublicProps = PaneBaseProps &\n (BottomControlledProps | BottomUncontrolledProps) &\n (BottomSizeControlledProps | BottomSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: SizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n };\n\ntype BottomComponent = React.ForwardRefExoticComponent<BottomPublicProps & React.RefAttributes<HTMLDivElement>> & { Handle: typeof BottomHandle };\n\nconst BOTTOM_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\nexport const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>((props, ref) => {\n const {\n className,\n presentation = 'fixed',\n defaultOpen,\n open,\n onOpenChange,\n expandedSize = 200,\n minSize = 100,\n maxSize = 400,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n inset,\n id,\n ...domProps\n } = props;\n\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'bottom',\n label: 'Bottom',\n propNames: BOTTOM_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable: table,\n builtIn: detailRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('bottom', inset);\n\n React.useEffect(() => {\n if (snapPoints !== undefined || collapseThreshold !== undefined || paneId !== undefined || persistence !== undefined) {\n warnOnce('Shell.Bottom: `snapPoints`, `collapseThreshold`, `paneId` and `persistence` are deprecated and are removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`.');\n }\n }, [snapPoints, collapseThreshold, paneId, persistence]);\n\n const elementRef = React.useRef<HTMLElement | null>(null);\n const composedRef = useComposedRefs(ref, pane.setElement, elementRef);\n\n const resize = useResizablePane({\n name: 'bottom',\n elementId: pane.id,\n elementRef,\n cssVarName: '--bottom-size',\n orientation: 'horizontal',\n edge: 'start',\n growth: bottomAnchoredGrowth,\n expandedSize,\n minSize,\n maxSize,\n resizable,\n collapsible,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n overlaying: pane.overlaying,\n overlayingNow: () => table[readBreakpoint()] === 'overlay',\n requestCollapse: () => pane.setValue('closed', 'toggle'),\n requestToggle: () => pane.toggle('toggle'),\n });\n\n // The starting size is in the server HTML, so the pane does not jump on hydration.\n const initialSize = useInitialPaneSize(size, defaultSize, minSize, maxSize);\n const { handles, content } = splitHandles(children, BottomHandle);\n const handle = resizable && pane.shown !== false && !pane.overlaying ? <PaneResizeContext.Provider value={resize}>{handles.length > 0 ? handles : <PaneHandle />}</PaneResizeContext.Provider> : null;\n\n return (\n <div\n {...withoutRemovedPaneProps(domProps)}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellBottom', className)}\n {...paneAttributes(pane, attributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--bottom-expanded-size': `${expandedSize}px`,\n ...(initialSize ? { '--bottom-size': initialSize } : {}),\n '--bottom-min-size': `${minSize}px`,\n '--bottom-max-size': `${maxSize}px`,\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"kui-ShellBottomContent\">\n <PageScope>{content}</PageScope>\n </div>\n {handle}\n </div>\n );\n}) as BottomComponent;\n\nBottom.displayName = 'Shell.Bottom';\nBottom.Handle = BottomHandle;\n\nexport type { BottomPublicProps };\n"],
5
+ "mappings": ";wXAEA,UAAYA,MAAW,QACvB,OAAOC,OAAgB,aACvB,OAAS,mBAAAC,OAAuB,oBA6BhC,IAAMC,GAAoB,CAAE,WAAY,OAAQ,QAAS,aAAc,EAE1DC,EAAe,aAA8C,CAACC,EAAOC,IAAQ,CACxF,GAAM,CACJ,UAAAC,EACA,aAAAC,EAAe,QACf,YAAAC,EACA,KAAAC,EACA,aAAAC,EACA,aAAAC,EAAe,IACf,QAAAC,EAAU,IACV,QAAAC,EAAU,IACV,UAAAC,EAAY,GACZ,YAAAC,EAAc,GACd,SAAAC,EACA,WAAAC,EACA,SAAAC,EACA,cAAAC,EACA,YAAAC,EACA,WAAAC,EACA,cAAAC,EACA,kBAAAC,EACA,OAAAC,EACA,YAAAC,EACA,SAAAC,EACA,MAAAC,EACA,KAAAC,EACA,YAAAC,EACA,aAAAC,EACA,WAAAC,EACA,aAAAC,EAAe,GACf,MAAAC,EACA,GAAAC,GACA,GAAGC,CACL,EAAI/B,EAEE,CAAE,MAAAgC,EAAO,WAAAC,EAAW,EAAIC,EAAqB/B,EAAc,OAAO,EAClEgC,EAAOC,EAAQ,CACnB,KAAM,SACN,MAAO,SACP,UAAWtC,GACX,GAAAgC,GACA,WAAYO,EAAYhC,CAAI,EAC5B,aAAcgC,EAAYjC,CAAW,EACrC,kBAAmB4B,EACnB,QAASM,EACT,SAAU,CAACC,GAAOC,KAAWlC,IAAeiC,KAAU,SAAU,CAAE,OAAAC,EAAO,CAAC,EAC1E,SAAA5B,EACA,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J,GAAS,OACrB,SAAUM,EAAK,WAAa,GAAKJ,EAAS,SAC1C,MACE,CACE,GAAGR,EACH,yBAA0B,GAAGhB,CAAY,KACzC,GAAI0C,EAAc,CAAE,gBAAiBA,CAAY,EAAI,CAAC,EACtD,oBAAqB,GAAGzC,CAAO,KAC/B,oBAAqB,GAAGC,CAAO,IACjC,GAGF,gBAAC,OAAI,UAAU,0BACb,gBAACoD,EAAA,KAAWT,EAAQ,CACtB,EACCG,EACH,CAEJ,CAAC,EAEDxD,EAAO,YAAc,eACrBA,EAAO,OAASuD",
6
+ "names": ["React", "classNames", "useComposedRefs", "BOTTOM_PROP_NAMES", "Bottom", "props", "ref", "className", "presentation", "defaultOpen", "open", "onOpenChange", "expandedSize", "minSize", "maxSize", "resizable", "collapsible", "onExpand", "onCollapse", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "children", "style", "size", "defaultSize", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "inset", "id", "domProps", "table", "attributes", "usePresentationTable", "pane", "usePane", "toPaneValue", "detailRest", "value", "reason", "useInsetRegistration", "elementRef", "composedRef", "useComposedRefs", "resize", "useResizablePane", "bottomAnchoredGrowth", "readBreakpoint", "initialSize", "useInitialPaneSize", "handles", "content", "splitHandles", "BottomHandle", "handle", "PaneResizeContext", "PaneHandle", "withoutRemovedPaneProps", "classNames", "paneAttributes", "PageScope"]
7
+ }
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as Ye,b as Xe}from"./chunk-4G3FJUER.js";import{a as Je}from"./chunk-ZG2XQUOH.js";import{a as Ge}from"./chunk-4B3S2DM7.js";import{a as Ke}from"./chunk-ZBSGH74F.js";import{a as je}from"./chunk-AKMRPGNP.js";import{a as J,b as _e,c as Ue,d as qe,g as $e}from"./chunk-XUCR7L4G.js";import{a as De,b as Pe}from"./chunk-3QWGSRYC.js";import{a as he,b as ve,c as Se}from"./chunk-LTUW36HM.js";import{a as Be,b as Ve,c as We}from"./chunk-QKCNGEX4.js";import{a as Fe}from"./chunk-WEBNIUEX.js";import{b as ye}from"./chunk-5ON3XLRD.js";import{a as Le}from"./chunk-G66WDIIV.js";import{b as ie}from"./chunk-VWRPVM5K.js";import{c as pe,d as fe,e as Ae,f as me,i as Ie,j as Ne,k as Oe}from"./chunk-NFSW36RG.js";import{c as ke,d as we}from"./chunk-QEDKL23P.js";import{e as ce,f as Me,h as ze,i as ne,j as He,k as de,l as ue,n as xe,o as oe}from"./chunk-GHWEXMF6.js";import{a as Te}from"./chunk-ANQLWGFN.js";import{a as it}from"./chunk-VQPANPMI.js";var ht={};it(ht,{Bottom:()=>Ke,Content:()=>rt,Header:()=>ot,Inspector:()=>je,Left:()=>lt,PaneFooter:()=>Ne,PaneHeader:()=>Ie,Panel:()=>Ee,Rail:()=>at,Root:()=>nt,Scroll:()=>Oe,Sidebar:()=>Ge,Trigger:()=>st,useResponsivePresentation:()=>Je,useShell:()=>Xe,useSidebarMode:()=>Ye});import*as e from"react";import $ from"classnames";import{Slot as ct}from"radix-ui";import{useComposedRefs as Ce,useLayoutEffect as dt}from"radix-ui/internal";var Re=0;function Qe(a){Re=Math.max(0,Re+a);let r=document.documentElement;Re>0?r.setAttribute("data-kui-shell-lock",""):r.removeAttribute("data-kui-shell-lock")}var ge="data-kui-shell-inert",ut=30;function Q(a,r){return r===null||r===a||r===a.body||r===a.documentElement}function Ze(a,r,s){for(let u of a.querySelectorAll("[data-shell-trigger][aria-controls]"))if(!(u.getAttribute("aria-controls")!==r||u.closest("[inert]"))&&!(s&&!s.some(S=>S.contains(u))))return u;return null}var pt={values:["1","2","3"]},tt=e.createContext(null),et=64;function be(a){return a.querySelector(":scope > .kui-ShellContent > .kui-ShellScroll > .kui-ScrollAreaViewport")??a.querySelector(":scope > .kui-ShellContent")}var nt=e.forwardRef(({className:a,children:r,height:s="full",contained:u,size:S,style:g,onKeyDown:F,onFocus:x,...k},T)=>{let P=ye(S,pt),[i]=e.useState(Me),C=e.useCallback(t=>ze(i,t),[i]);e.useSyncExternalStore(C,()=>i.version,()=>0);let R=e.useRef(null),D=Ce(T,R),[E,w]=e.useState(()=>new Set),A=e.useCallback(t=>{w(n=>n.has(t)?n:new Set(n).add(t))},[]),f=e.useCallback(t=>{w(n=>{if(!n.has(t))return n;let o=new Set(n);return o.delete(t),o})},[]),m=e.useMemo(()=>({registerInset:A,unregisterInset:f}),[A,f]),I=e.useCallback(()=>{for(let t of i.entries.values())t.overlayLive&&t.setValue("closed","dismiss")},[i]),M=e.useCallback(()=>[...i.entries.values()].filter(t=>t.overlayLive&&t.el).map(t=>({name:t.name,id:t.id,el:t.el})),[i]),y=[...i.entries.values()].filter(t=>t.overlayLive&&t.el).length,N=u===!0||s!=="full"&&s!=="auto",V=!N&&s==="full",[Z,le]=e.useState(void 0);e.useEffect(()=>{if(!V)return;let t=R.current,n=t?.ownerDocument.defaultView;if(!t||!n||typeof n.matchMedia!="function")return;let o=ke(),c=o?n.scrollY:be(t)?.scrollTop??0,h=0,v=0,L=()=>{v&&cancelAnimationFrame(v),v=requestAnimationFrame(()=>{v=0})},U=()=>{o&&!v&&(c=n.scrollY)},q=l=>{!o&&!v&&l.target instanceof HTMLElement&&l.target===be(t)&&(c=l.target.scrollTop)};n.addEventListener("resize",L),n.addEventListener("scroll",U,{passive:!0}),t.addEventListener("scroll",q,{passive:!0,capture:!0});let se=we(l=>{o=l;let d=c;h&&cancelAnimationFrame(h),h=requestAnimationFrame(()=>{if(h=0,l)n.scrollTo(0,d);else{let p=be(t);p&&(p.scrollTop=d)}})});return()=>{h&&cancelAnimationFrame(h),v&&cancelAnimationFrame(v),n.removeEventListener("resize",L),n.removeEventListener("scroll",U),t.removeEventListener("scroll",q,{capture:!0}),se()}},[V]);let K=e.useCallback(()=>{let t=R.current;if(!t)return;let n=M().map(o=>o.el);for(let o of t.children){if(!(o instanceof HTMLElement)||o.classList.contains("kui-ShellScrim"))continue;let c=n.some(h=>o===h||o.contains(h));n.length===0||c?o.hasAttribute(ge)&&(o.removeAttribute(ge),o.inert=!1):o.inert||(o.setAttribute(ge,""),o.inert=!0)}},[M]),j=e.useRef(null),G=e.useRef([]),ee=e.useRef(null),O=e.useRef(!1),z=e.useRef(0),W=e.useCallback(()=>{z.current&&cancelAnimationFrame(z.current),z.current=0},[]),_=e.useCallback((t,n)=>{W();let o=0,c=()=>{if(z.current=0,!!t.isConnected){if(n(t.ownerDocument.activeElement)){t.focus({preventScroll:!0});return}o+=1,o<ut&&(z.current=requestAnimationFrame(c))}};z.current=requestAnimationFrame(c)},[W]);e.useEffect(()=>()=>{W(),O.current&&(O.current=!1,Qe(-1))},[W]),e.useEffect(()=>{let t=R.current;if(!t)return;let n=t.ownerDocument,o=M(),c=o.map(l=>l.el),h=!N&&o.length>0;h!==O.current&&(O.current=h,Qe(h?1:-1));let v=G.current;G.current=o;let L=v.filter(l=>{if(c.includes(l.el))return!1;let d=i.entries.get(l.name);return!l.el.isConnected||!d||d.el!==l.el||d.value==="closed"}),U=l=>l!==null&&L.some(d=>d.el.contains(l));if(v.length===0&&o.length>0){let l=n.activeElement,d=l instanceof HTMLElement&&!Q(n,l)&&!c.some(p=>p.contains(l))?l:null;if(d&&!t.contains(d)){let p=ee.current;p&&p.isConnected&&!c.some(te=>te.contains(p))&&(d=p)}j.current=d}if(K(),o.length===0){let l=j.current;if(j.current=null,L.length===0)return;let p=(H=>H!==null&&H.isConnected&&!H.closest("[inert]")&&!U(H))(l)?l:null;for(let H of L)p??(p=Ze(n,H.id));if(!p)return;let te=H=>Q(n,H)||U(H);te(n.activeElement)?p.focus({preventScroll:!0}):_(p,te);return}if(L.length>0){let l=n.activeElement;if(Q(n,l)||U(l)){let d=null;for(let p of L)d??(d=Ze(n,p.id,c));(d??c[c.length-1]).focus({preventScroll:!0})}}let q=c.filter(l=>!v.some(d=>d.el===l)),se=n.activeElement;q.length>0&&!c.some(l=>l.contains(se))&&(q[0].focus({preventScroll:!0}),_(q[0],l=>Q(n,l)||l instanceof Element&&l.closest("[inert]")!==null))}),e.useEffect(()=>{let t=R.current;if(!t||y===0||typeof MutationObserver>"u")return;let n=new MutationObserver(K);return n.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["inert"]}),()=>n.disconnect()},[y,K]);let Y=t=>{F?.(t),!(t.key!=="Escape"||t.defaultPrevented||y===0)&&(I(),t.stopPropagation())};e.useEffect(()=>{let t=R.current;if(!t||y===0)return;let n=t.ownerDocument,o=c=>{c.key!=="Escape"||c.defaultPrevented||!Q(n,c.target)||I()};return n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)},[y,I]);let ae=t=>{x?.(t),t.target instanceof HTMLElement&&R.current?.contains(t.target)&&(ee.current=t.target)},B=i.entries.get("rail"),X=B!==void 0&&B.value!==void 0&&B.value!=="closed"?E.has("rail")?`calc(${B.size}px + 2 * var(--shell-inset-gap))`:`${B.size}px`:void 0,re=s==="full"?{}:s==="auto"?{height:"auto"}:typeof s=="number"?{height:`${s}px`}:{height:s};return e.createElement(He.Provider,{value:i},e.createElement(pe.Provider,{value:P},e.createElement(fe.Provider,{value:!1},e.createElement(Ae.Provider,{value:V},e.createElement(tt.Provider,{value:le},e.createElement(xe.Provider,{value:m},e.createElement(Te.Provider,{value:void 0},e.createElement("div",{...k,ref:D,className:$("kui-ShellRoot",a),"data-height":s==="auto"&&!N?"auto":void 0,"data-contained":N||void 0,"data-window":V||void 0,"data-has-inset":E.size>0||void 0,"data-overlay-live":y>0||void 0,onKeyDown:Y,onFocus:ae,style:{...re,...X?{"--shell-rail-offset":X}:{},...Z!==void 0?{"--kui-shell-header-h":`${Z}px`}:{},...g}},r,e.createElement("div",{className:"kui-ShellScrim","aria-hidden":!0,onClick:I})))))))))});nt.displayName="Shell.Root";var ot=e.forwardRef(({className:a,height:r=et,style:s,...u},S)=>{let g=e.useContext(tt);return dt(()=>{if(g)return g(r===et?void 0:r),()=>g(void 0)},[g,r]),e.createElement("header",{...u,ref:S,className:$("kui-ShellHeader",a),style:{...s,"--shell-header-height":`${r}px`}})});ot.displayName="Shell.Header";var lt=e.forwardRef(({children:a},r)=>(e.useEffect(()=>{},[]),e.createElement(e.Fragment,null,a)));lt.displayName="Shell.Left";var ft={controlled:"open",default:"defaultOpen"},at=e.forwardRef((a,r)=>{let{className:s,presentation:u,expandedSize:S=64,collapsible:g,onExpand:F,onCollapse:x,children:k,style:T,open:P,defaultOpen:i,onOpenChange:C,inset:R,id:D,...E}=a,{table:w,attributes:A}=Se(u,"fixed"),f=he({name:"rail",label:"Rail",propNames:ft,id:D,controlled:J(P),defaultValue:J(i),presentationTable:w,builtIn:_e,onChange:(I,M)=>C?.(I!=="closed",{reason:M}),onExpand:F,onCollapse:x,size:S});oe("rail",R);let m=Ce(r,f.setElement);return e.createElement("div",{...E,role:E.role??"navigation",id:f.id,ref:m,className:$("kui-ShellPane","kui-ShellRail",s),...ve(f,A),"data-inset":R||void 0,tabIndex:f.overlaying?-1:E.tabIndex,style:{...T,"--rail-size":`${S}px`}},e.createElement(mt,null,k))});at.displayName="Shell.Rail";function mt({children:a}){let r=e.useContext(pe);return e.createElement("div",{className:$("kui-ShellRailContent",`kui-r-size-${r}`)},e.createElement(me,{presentation:"thin"},a))}var Pt={controlled:"open",default:"defaultOpen"},Ee=e.forwardRef((a,r)=>{let{className:s,presentation:u,defaultOpen:S,open:g,onOpenChange:F,size:x,defaultSize:k,expandedSize:T=288,minSize:P=100,maxSize:i=800,resizable:C=!1,collapsible:R=!0,onExpand:D,onCollapse:E,onResize:w,onResizeStart:A,onResizeEnd:f,snapPoints:m,snapTolerance:I,collapseThreshold:M,paneId:y,persistence:N,children:V,style:Z,onSizeChange:le,sizeUpdate:K,sizeUpdateMs:j=50,inset:G,id:ee,...O}=a,z=de("Shell.Panel"),W=ue(z,"rail"),_=Se(u,"fixed"),Y=u===void 0,ae=Y?W?.presentationTable??ce:_.table,B=Y?{"data-presentation-follows":""}:_.attributes,b=he({name:"panel",label:"Panel",propNames:Pt,id:ee,controlled:J(g),defaultValue:J(S),presentationTable:ae,builtIn:Ue,onChange:(v,L)=>F?.(v!=="closed",{reason:L}),onExpand:D,onCollapse:E,size:T});oe("panel",G),e.useEffect(()=>{(m!==void 0||M!==void 0||y!==void 0||N!==void 0)&&void 0},[m,M,y,N]);let X=e.useRef(null),re=Ce(r,b.setElement,X),t=Ve({name:"panel",elementId:b.id,elementRef:X,cssVarName:"--panel-size",orientation:"vertical",edge:"end",growth:qe,expandedSize:T,minSize:P,maxSize:i,resizable:C,collapsible:R,size:x,defaultSize:k,onSizeChange:le,sizeUpdate:K,sizeUpdateMs:j,onResize:w,onResizeStart:A,onResizeEnd:f,snapPoints:m,snapTolerance:I,collapseThreshold:M,paneId:y,persistence:N,overlaying:b.overlaying,overlayingNow:()=>(Y?z.entries.get("rail")?.presentationTable??ce:_.table)[Le()]==="overlay",requestCollapse:()=>b.setValue("closed","toggle"),requestToggle:()=>b.toggle("toggle")}),n=Be(x,k,P,i),{handles:o,content:c}=We(V,Pe),h=C&&b.shown!==!1&&!b.overlaying?e.createElement(Fe.Provider,{value:t},o.length>0?o:e.createElement(De,null)):null;return e.createElement("div",{...$e(O),role:O.role??"navigation",id:b.id,ref:re,className:$("kui-ShellPane","kui-ShellPanel",s),...ve(b,B),"data-inset":G||void 0,tabIndex:b.overlaying?-1:O.tabIndex,style:{...Z,"--panel-expanded-size":`${T}px`,...n?{"--panel-size":n}:{}}},e.createElement("div",{className:"kui-ShellPanelContent"},e.createElement(me,null,e.createElement(ie,null,c))),h)});Ee.displayName="Shell.Panel";Ee.Handle=Pe;var rt=e.forwardRef(({className:a,inset:r,children:s,...u},S)=>(oe("content",r),e.createElement("main",{...u,ref:S,className:$("kui-ShellContent",a),"data-inset":r||void 0},e.createElement(fe.Provider,{value:!0},e.createElement(ie,null,s)))));rt.displayName="Shell.Content";var st=e.forwardRef(({target:a,action:r="toggle",peekOnHover:s,asChild:u=!1,onClick:S,onMouseEnter:g,onMouseLeave:F,children:x,...k},T)=>{let P=de("Shell.Trigger");e.useEffect(()=>{a==="left"&&void 0,s&&void 0},[a,s]);let i=a==="left"?"rail":a,C=ue(P,i),R=C?.value===void 0?void 0:C.value!=="closed",D=f=>{if(S?.(f),f.defaultPrevented)return;let m=P.entries.get(i);m&&(P.peek===i&&ne(P,null),r==="toggle"?m.toggle("toggle"):r==="expand"?m.setValue("open","toggle"):m.setValue("closed","toggle"))},E=f=>{if(g?.(f),!s)return;let m=P.entries.get(i);m&&m.value==="closed"&&m.presentation!=="overlay"&&ne(P,i)},w=f=>{F?.(f),s&&P.peek===i&&ne(P,null)},A=u?ct.Root:"button";return e.createElement(A,{...!u&&{type:"button"},"aria-controls":C?.id,"aria-expanded":R,...k,ref:T,onClick:D,onMouseEnter:E,onMouseLeave:w,"data-shell-trigger":a,"data-shell-action":r},x)});st.displayName="Shell.Trigger";export{nt as a,ot as b,lt as c,at as d,Ee as e,rt as f,st as g,ht as h};
3
+ //# sourceMappingURL=chunk-ZHXEEOGI.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/shell.tsx"],
4
+ "sourcesContent": ["/**\n * Shell: the app frame.\n *\n * Since 0.8.0 the Shell is built on kookie-ui-v2's model, behind v1's API:\n *\n * - The Root is a CSS grid and renders its children as given, in JSX order.\n * Each pane claims its own grid area, so the Root never scans or reorders\n * children, any child renders, and a pane mounted after the Root works.\n * - State lives on each pane: `auto` (untouched), `open` or `closed`. An\n * untouched pane follows the window, resolved by the\n * stylesheet, so first paint needs no script and no open-state callback\n * fires on mount or on a resize.\n * - A pane is one element at every width. `overlay` is a posture of that\n * element, not a Sheet swapped in: crossing a breakpoint keeps its scroll\n * position, its focus and its children's state.\n * - The Root owns what an overlay needs: one scrim, `inert` on everything\n * else, focus moved in and returned, Escape, and a scroll lock.\n * - Nothing links panes to each other. A Rail closing no longer closes the\n * Panel; an app that wants that writes it in `onOpenChange`.\n */\n'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\nimport { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';\nimport { PaneResizeContext } from './_internal/shell-resize.js';\nimport { PaneHandle, PanelHandle } from './_internal/shell-handles.js';\nimport { Sidebar } from './_internal/shell-sidebar.js';\nimport type { SidebarPublicProps } from './_internal/shell-sidebar.js';\nimport { Bottom } from './_internal/shell-bottom.js';\nimport type { BottomPublicProps } from './_internal/shell-bottom.js';\nimport { Inspector } from './_internal/shell-inspector.js';\nimport type { InspectorPublicProps } from './_internal/shell-inspector.js';\nimport { usePane, paneAttributes, usePresentationTable } from './_internal/shell-pane.js';\nimport { splitHandles, useInitialPaneSize, useResizablePane } from './_internal/shell-resizable.js';\nimport {\n FIXED_TABLE,\n ShellInsetContext,\n ShellStoreContext,\n createShellStore,\n setShellPeek,\n subscribeShellStore,\n useInsetRegistration,\n usePaneEntry,\n useShellStore,\n warnOnce,\n type InsetPaneId,\n} from './_internal/shell-store.js';\nimport { navigationRest, detailRest, toPaneValue, startAnchoredGrowth, withoutRemovedPaneProps } from './_internal/shell-rest.js';\nimport { useShell, useSidebarMode } from './shell.context.js';\nimport { useResponsivePresentation } from './shell.hooks.js';\nimport { readBreakpoint } from '../hooks/use-breakpoint.js';\nimport { useThemeSize } from '../hooks/theme-size.js';\nimport { PageScope } from './_internal/page-scope.js';\nimport { PaneChromeScope, PaneFooter, PaneHeader, Scroll, ShellContentContext, ShellSizeContext, ShellWindowContext } from './_internal/pane-chrome.js';\nimport { onPageScrollMediaChange, pageScrollMatches } from './_internal/shell-page-scroll.js';\nimport type { PaneSize, PaneHeaderProps, PaneFooterProps, ScrollProps } from './_internal/pane-chrome.js';\nimport { PaneBandSizeContext } from './_internal/pane-band-context.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps, PaneMode, PaneName, PaneTarget, ResponsivePresentation, SidebarMode } from './shell.types.js';\n\n/* \u2500\u2500 Root \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport interface ShellRootProps extends React.ComponentPropsWithoutRef<'div'> {\n children: React.ReactNode;\n /**\n * The Shell's height. `full` (the default) is the window's height; on a narrow touch screen the\n * page scrolls instead of the content, so the browser can hide its toolbars. `auto` grows with\n * the content. Any other value is the Shell's own height, and makes it contained.\n */\n height?: 'full' | 'auto' | string | number;\n /**\n * Makes the Shell fill its parent instead of the window, and always scroll inside itself. Its\n * overlays cover only its own box and leave the page free to scroll. Use it for a Shell in a\n * card, a demo or a canvas. An explicit `height` implies it.\n */\n contained?: boolean;\n /** The index the panes' chrome takes: `Shell.PaneHeader`, `Shell.Scroll`, `Shell.PaneFooter` and the Sidebar rows in them. Defaults to the nearest Theme's size (3 when the Theme is 4), else `2`. */\n size?: PaneSize;\n}\n\n/**\n * Every Shell with a live overlay holds the page still, counted across Shells,\n * through an attribute the stylesheet reads. Saving and restoring the\n * document's inline `overflow` would fight any other scroll lock on the page.\n */\nlet pageLockHolders = 0;\nfunction updatePageLock(delta: 1 | -1) {\n pageLockHolders = Math.max(0, pageLockHolders + delta);\n const doc = document.documentElement;\n if (pageLockHolders > 0) doc.setAttribute('data-kui-shell-lock', '');\n else doc.removeAttribute('data-kui-shell-lock');\n}\n\n/** Marks a child the Root made inert, so closing removes only what the Root added. */\nconst INERT_MARK = 'data-kui-shell-inert';\n\n/** How many frames a focus rescue watches after an overlay opens or closes. */\nconst RESCUE_FRAMES = 30;\n\n/** Focus that is nowhere useful: the document, or nothing at all. */\nfunction isNowhere(doc: Document, el: Element | EventTarget | null): boolean {\n return el === null || el === doc || el === doc.body || el === doc.documentElement;\n}\n\n/** A Trigger that drives the pane with this id and can take focus, optionally only inside `within`. */\nfunction triggerFor(doc: Document, id: string, within?: HTMLElement[]): HTMLElement | null {\n for (const el of doc.querySelectorAll<HTMLElement>('[data-shell-trigger][aria-controls]')) {\n if (el.getAttribute('aria-controls') !== id || el.closest('[inert]')) continue;\n if (within && !within.some((pane) => pane.contains(el))) continue;\n return el;\n }\n return null;\n}\n\ntype LivePane = { name: PaneName; id: string; el: HTMLElement };\n\n/** Shell.Root's own range; a Theme size above it maps to 3. */\nconst shellSizePropDef = { values: ['1', '2', '3'] as const };\n\n/** Lets a Shell.Header tell the Root its height, for the rows that stick beneath it while the page scrolls. */\nconst ShellHeaderHeightContext = React.createContext<((height: number | undefined) => void) | null>(null);\n\n/** The Shell.Header's default height, which the stylesheet assumes until a Header says otherwise. */\nconst DEFAULT_HEADER_HEIGHT = 64;\n\n/** The content's scroller while the frame scrolls: the Shell.Scroll's viewport, or the content itself. */\nfunction frameScroller(rootEl: HTMLElement): HTMLElement | null {\n return rootEl.querySelector<HTMLElement>(':scope > .kui-ShellContent > .kui-ShellScroll > .kui-ScrollAreaViewport') ?? rootEl.querySelector<HTMLElement>(':scope > .kui-ShellContent');\n}\n\nconst Root = React.forwardRef<HTMLDivElement, ShellRootProps>(({ className, children, height = 'full', contained: containedProp, size: sizeProp, style, onKeyDown, onFocus, ...props }, ref) => {\n // No size of its own: the nearest Theme's, mapped into 1-3.\n const size = useThemeSize(sizeProp, shellSizePropDef);\n const [store] = React.useState(createShellStore);\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n // Subscribed for the re-render, not for a value: a pane opening or closing\n // must bring the Root back so containment and the scrim follow it.\n React.useSyncExternalStore(\n subscribe,\n () => store.version,\n () => 0,\n );\n\n const rootRef = React.useRef<HTMLDivElement | null>(null);\n const composedRef = useComposedRefs(ref, rootRef);\n\n // Inset: the Root paints the backdrop while any pane is inset.\n const [insetPanes, setInsetPanes] = React.useState<ReadonlySet<InsetPaneId>>(() => new Set());\n const registerInset = React.useCallback((id: InsetPaneId) => {\n setInsetPanes((prev) => (prev.has(id) ? prev : new Set(prev).add(id)));\n }, []);\n const unregisterInset = React.useCallback((id: InsetPaneId) => {\n setInsetPanes((prev) => {\n if (!prev.has(id)) return prev;\n const next = new Set(prev);\n next.delete(id);\n return next;\n });\n }, []);\n const insetContext = React.useMemo(() => ({ registerInset, unregisterInset }), [registerInset, unregisterInset]);\n\n const closeOverlays = React.useCallback(() => {\n for (const entry of store.entries.values()) {\n if (entry.overlayLive) entry.setValue('closed', 'dismiss');\n }\n }, [store]);\n\n const livePanes = React.useCallback(\n (): LivePane[] => [...store.entries.values()].filter((entry) => entry.overlayLive && entry.el).map((entry) => ({ name: entry.name, id: entry.id, el: entry.el as HTMLElement })),\n [store],\n );\n const liveCount = [...store.entries.values()].filter((entry) => entry.overlayLive && entry.el).length;\n\n // A contained Shell sits inside a page, and its overlays cover only its box:\n // it holds no page lock. A height of its own implies it. `full` is the\n // window, and `auto` grows with its content, so its overlays are placed on\n // the window. Only a `full` Shell lets the page scroll on a phone.\n const contained = containedProp === true || (height !== 'full' && height !== 'auto');\n const windowShell = !contained && height === 'full';\n\n const [headerHeight, setHeaderHeight] = React.useState<number | undefined>(undefined);\n\n /*\n * The reading position crosses with the scroller. When a touch window\n * crosses the narrow boundary (a phone rotating, an iPad entering Split\n * View), the scroller changes between the content and the page, and the new\n * one starts at the top. The offset is remembered on `scroll` from whichever\n * scroller is live, because by the time the change is reported the old one\n * has already been laid out again and clamped. Only the live scroller is\n * heard. The clamp itself is reported as a scroll in the same frame as the\n * resize and before the media change, so scrolls are not heard from a resize\n * until that frame's animation callbacks.\n */\n React.useEffect(() => {\n if (!windowShell) return;\n const rootEl = rootRef.current;\n const win = rootEl?.ownerDocument.defaultView;\n if (!rootEl || !win || typeof win.matchMedia !== 'function') return;\n let pageScrolls = pageScrollMatches();\n let offset = pageScrolls ? win.scrollY : (frameScroller(rootEl)?.scrollTop ?? 0);\n let frame = 0;\n let resizing = 0;\n const onResize = () => {\n if (resizing) cancelAnimationFrame(resizing);\n resizing = requestAnimationFrame(() => {\n resizing = 0;\n });\n };\n const fromPage = () => {\n if (pageScrolls && !resizing) offset = win.scrollY;\n };\n const fromFrame = (event: Event) => {\n if (!pageScrolls && !resizing && event.target instanceof HTMLElement && event.target === frameScroller(rootEl)) offset = event.target.scrollTop;\n };\n win.addEventListener('resize', onResize);\n win.addEventListener('scroll', fromPage, { passive: true });\n rootEl.addEventListener('scroll', fromFrame, { passive: true, capture: true });\n const stop = onPageScrollMediaChange((matches) => {\n pageScrolls = matches;\n const carried = offset;\n if (frame) cancelAnimationFrame(frame);\n frame = requestAnimationFrame(() => {\n frame = 0;\n if (matches) win.scrollTo(0, carried);\n else {\n const el = frameScroller(rootEl);\n if (el) el.scrollTop = carried;\n }\n });\n });\n return () => {\n if (frame) cancelAnimationFrame(frame);\n if (resizing) cancelAnimationFrame(resizing);\n win.removeEventListener('resize', onResize);\n win.removeEventListener('scroll', fromPage);\n rootEl.removeEventListener('scroll', fromFrame, { capture: true });\n stop();\n };\n }, [windowShell]);\n\n /*\n * Containment is the Root's, not the pane's. Only the Root can see every live\n * overlay and every child at once. A per-pane effect, given two overlays,\n * inerts the other live overlay and restores values the other effect wrote,\n * which can leave the whole frame inert for good.\n *\n * Exempt are the scrim and each root child that CONTAINS a live overlay, so\n * a pane wrapped in a plain element is not inerted with its wrapper. A child\n * the Root inerts is marked, and closing clears only marked children, so\n * `inert` the app sets on a child is the app's before, during and after.\n */\n const contain = React.useCallback(() => {\n const rootEl = rootRef.current;\n if (!rootEl) return;\n const liveEls = livePanes().map((pane) => pane.el);\n for (const child of rootEl.children) {\n if (!(child instanceof HTMLElement) || child.classList.contains('kui-ShellScrim')) continue;\n const holdsLive = liveEls.some((el) => child === el || child.contains(el));\n if (liveEls.length === 0 || holdsLive) {\n if (child.hasAttribute(INERT_MARK)) {\n child.removeAttribute(INERT_MARK);\n child.inert = false;\n }\n } else if (!child.inert) {\n child.setAttribute(INERT_MARK, '');\n child.inert = true;\n }\n }\n }, [livePanes]);\n\n const returnFocusTo = React.useRef<HTMLElement | null>(null);\n const lastLive = React.useRef<LivePane[]>([]);\n const lastFocusInRoot = React.useRef<HTMLElement | null>(null);\n const holdsLock = React.useRef(false);\n\n /*\n * Focus can be taken away after the commit that moved it: a menu that\n * opened or closed a pane restores focus to its own trigger when it\n * finishes closing, which may be inert or hidden by then. For a few frames\n * after an overlay opens or closes, focus that ends up nowhere useful is\n * put back where it belongs.\n */\n const rescueFrame = React.useRef(0);\n const cancelRescue = React.useCallback(() => {\n if (rescueFrame.current) cancelAnimationFrame(rescueFrame.current);\n rescueFrame.current = 0;\n }, []);\n const rescueFocus = React.useCallback(\n (target: HTMLElement, lost: (active: Element | null) => boolean) => {\n cancelRescue();\n let frames = 0;\n const tick = () => {\n rescueFrame.current = 0;\n if (!target.isConnected) return;\n if (lost(target.ownerDocument.activeElement)) {\n target.focus({ preventScroll: true });\n return;\n }\n frames += 1;\n if (frames < RESCUE_FRAMES) rescueFrame.current = requestAnimationFrame(tick);\n };\n rescueFrame.current = requestAnimationFrame(tick);\n },\n [cancelRescue],\n );\n\n React.useEffect(\n () => () => {\n cancelRescue();\n if (holdsLock.current) {\n holdsLock.current = false;\n updatePageLock(-1);\n }\n },\n [cancelRescue],\n );\n\n // No dependency array, on purpose: a pane opening or closing is a render\n // of this component, and so is a child appearing through the Root.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl) return;\n const doc = rootEl.ownerDocument;\n const live = livePanes();\n const liveEls = live.map((pane) => pane.el);\n\n const wantsLock = !contained && live.length > 0;\n if (wantsLock !== holdsLock.current) {\n holdsLock.current = wantsLock;\n updatePageLock(wantsLock ? 1 : -1);\n }\n\n const previous = lastLive.current;\n lastLive.current = live;\n // A pane that left the live set because it closed, as opposed to one\n // that is still open but stopped being an overlay at a breakpoint.\n const closed = previous.filter((pane) => {\n if (liveEls.includes(pane.el)) return false;\n const entry = store.entries.get(pane.name);\n return !pane.el.isConnected || !entry || entry.el !== pane.el || entry.value === 'closed';\n });\n const inClosed = (active: Element | null) => active !== null && closed.some((pane) => pane.el.contains(active));\n\n // The return target is taken on the opening edge, before inerting: inerting\n // the subtree that holds the trigger blurs it. Focus already inside the\n // overlay (a pane that became one at a breakpoint) is no place to return\n // to, and an opener in a portal (a menu item) goes away with its menu, so\n // the last place focus held inside the frame stands in for it.\n if (previous.length === 0 && live.length > 0) {\n const active = doc.activeElement;\n let target = active instanceof HTMLElement && !isNowhere(doc, active) && !liveEls.some((el) => el.contains(active)) ? active : null;\n if (target && !rootEl.contains(target)) {\n const inRoot = lastFocusInRoot.current;\n if (inRoot && inRoot.isConnected && !liveEls.some((el) => el.contains(inRoot))) target = inRoot;\n }\n returnFocusTo.current = target;\n }\n\n contain();\n\n if (live.length === 0) {\n const before = returnFocusTo.current;\n returnFocusTo.current = null;\n // Every overlay that left only stopped being one: focus stays where it is.\n if (closed.length === 0) return;\n const usable = (el: HTMLElement | null) => el !== null && el.isConnected && !el.closest('[inert]') && !inClosed(el);\n let target = usable(before) ? before : null;\n for (const pane of closed) target ??= triggerFor(doc, pane.id);\n if (!target) return;\n const lost = (active: Element | null) => isNowhere(doc, active) || inClosed(active);\n if (lost(doc.activeElement)) target.focus({ preventScroll: true });\n else rescueFocus(target, lost);\n return;\n }\n\n // Some overlays closed while others stay: focus left in a closed one goes\n // to the Trigger that opened it, if a live pane holds it, or to the pane\n // on top.\n if (closed.length > 0) {\n const active = doc.activeElement;\n if (isNowhere(doc, active) || inClosed(active)) {\n let target: HTMLElement | null = null;\n for (const pane of closed) target ??= triggerFor(doc, pane.id, liveEls);\n (target ?? liveEls[liveEls.length - 1]).focus({ preventScroll: true });\n }\n }\n\n // Focus moves in on the opening edge and nowhere else, and only when it\n // is not already somewhere the user put it inside the live set.\n const opened = liveEls.filter((el) => !previous.some((pane) => pane.el === el));\n const active = doc.activeElement;\n if (opened.length > 0 && !liveEls.some((el) => el.contains(active))) {\n opened[0].focus({ preventScroll: true });\n rescueFocus(opened[0], (now) => isNowhere(doc, now) || (now instanceof Element && now.closest('[inert]') !== null));\n }\n });\n\n // A child that appears through its own state while an overlay is live does\n // not render the Root, so the Root watches its children while one is.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl || liveCount === 0 || typeof MutationObserver === 'undefined') return;\n const observer = new MutationObserver(contain);\n observer.observe(rootEl, { childList: true, subtree: true, attributes: true, attributeFilter: ['inert'] });\n return () => observer.disconnect();\n }, [liveCount, contain]);\n\n /*\n * Escape closes the overlays. It is handled as a React event on the Root, so\n * a component inside a pane that answers Escape in its own onKeyDown runs\n * first, and its preventDefault() or stopPropagation() keeps the pane open.\n * When the Root closes something it stops the event there, so a React\n * Escape handler above the Shell does not act on it too. A layer that\n * listens on the document in the capture phase (Radix dialogs, menus and\n * popovers) answers first and calls preventDefault() when it closes, so an\n * enclosing Kookie Dialog closes before a Shell inside it is asked.\n */\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (event.key !== 'Escape' || event.defaultPrevented || liveCount === 0) return;\n closeOverlays();\n event.stopPropagation();\n };\n\n // With focus on the document itself (a pane closed under it, or a menu that\n // closed and took focus with it), the Root never sees the key. While an\n // overlay is live the document answers that one case.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl || liveCount === 0) return;\n const doc = rootEl.ownerDocument;\n const onDocumentKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || event.defaultPrevented || !isNowhere(doc, event.target)) return;\n closeOverlays();\n };\n doc.addEventListener('keydown', onDocumentKeyDown);\n return () => doc.removeEventListener('keydown', onDocumentKeyDown);\n }, [liveCount, closeOverlays]);\n\n const handleFocus = (event: React.FocusEvent<HTMLDivElement>) => {\n onFocus?.(event);\n if (event.target instanceof HTMLElement && rootRef.current?.contains(event.target)) lastFocusInRoot.current = event.target;\n };\n\n // A floating Panel sits beside the Rail when the Rail is showing, and\n // beside its card when the Rail is inset.\n const rail = store.entries.get('rail');\n const railShown = rail !== undefined && rail.value !== undefined && rail.value !== 'closed';\n const railOffset = railShown ? (insetPanes.has('rail') ? `calc(${rail.size}px + 2 * var(--shell-inset-gap))` : `${rail.size}px`) : undefined;\n\n // `full` writes no inline height: the stylesheet states it as 100vh with a\n // 100dvh override where supported, and an inline value would beat both.\n const heightStyle: React.CSSProperties = height === 'full' ? {} : height === 'auto' ? { height: 'auto' } : typeof height === 'number' ? { height: `${height}px` } : { height };\n\n return (\n <ShellStoreContext.Provider value={store}>\n <ShellSizeContext.Provider value={size}>\n <ShellContentContext.Provider value={false}>\n <ShellWindowContext.Provider value={windowShell}>\n <ShellHeaderHeightContext.Provider value={setHeaderHeight}>\n <ShellInsetContext.Provider value={insetContext}>\n {/* A Shell inside a portalled surface's Theme starts with no band, like any other. */}\n <PaneBandSizeContext.Provider value={undefined}>\n {/* The Root is not a widget: it hears Escape bubbling up from the panes,\n after their own handlers, to close the overlays. */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n {...props}\n ref={composedRef}\n className={classNames('kui-ShellRoot', className)}\n data-height={height === 'auto' && !contained ? 'auto' : undefined}\n data-contained={contained || undefined}\n data-window={windowShell || undefined}\n data-has-inset={insetPanes.size > 0 || undefined}\n data-overlay-live={liveCount > 0 || undefined}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n style={{\n ...heightStyle,\n ...(railOffset ? ({ '--shell-rail-offset': railOffset } as CSSPropertiesWithVars) : {}),\n ...(headerHeight !== undefined ? ({ '--kui-shell-header-h': `${headerHeight}px` } as CSSPropertiesWithVars) : {}),\n ...style,\n }}\n >\n {children}\n {/* Root-owned and always mounted. The stylesheet shows it while an\n overlay is live; containment takes the rest of the frame out of\n the accessibility tree, so the scrim itself is hidden from it. */}\n <div className=\"kui-ShellScrim\" aria-hidden onClick={closeOverlays} />\n </div>\n </PaneBandSizeContext.Provider>\n </ShellInsetContext.Provider>\n </ShellHeaderHeightContext.Provider>\n </ShellWindowContext.Provider>\n </ShellContentContext.Provider>\n </ShellSizeContext.Provider>\n </ShellStoreContext.Provider>\n );\n});\nRoot.displayName = 'Shell.Root';\n\n/* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface ShellHeaderProps extends React.ComponentPropsWithoutRef<'header'> {\n height?: number;\n}\n\nconst Header = React.forwardRef<HTMLElement, ShellHeaderProps>(({ className, height = DEFAULT_HEADER_HEIGHT, style, ...props }, ref) => {\n // Rows that stick beneath the header while the page scrolls need its height. The stylesheet\n // assumes the default, so only another height is told to the Root.\n const setHeaderHeight = React.useContext(ShellHeaderHeightContext);\n useLayoutEffect(() => {\n if (!setHeaderHeight) return;\n setHeaderHeight(height === DEFAULT_HEADER_HEIGHT ? undefined : height);\n return () => setHeaderHeight(undefined);\n }, [setHeaderHeight, height]);\n return (\n <header\n {...props}\n ref={ref}\n className={classNames('kui-ShellHeader', className)}\n style={\n {\n ...style,\n '--shell-header-height': `${height}px`,\n } as CSSPropertiesWithVars\n }\n />\n );\n});\nHeader.displayName = 'Shell.Header';\n\n/* \u2500\u2500 Left (deprecated) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface LeftProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean, meta: { reason: 'init' | 'toggle' | 'panel' | 'responsive' | 'dismiss' }) => void;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n inset?: boolean;\n}\n\n/**\n * @deprecated The Root no longer wraps the Rail and Panel in a Left\n * container: each is its own pane. `Shell.Left` renders its children and\n * ignores its own props. Removed in 1.0.\n */\nconst Left = React.forwardRef<HTMLDivElement, LeftProps>(({ children }, _ref) => {\n React.useEffect(() => {\n warnOnce('Shell.Left is deprecated and is removed in 1.0. Render Shell.Rail and Shell.Panel directly in Shell.Root.');\n }, []);\n return <>{children}</>;\n});\nLeft.displayName = 'Shell.Left';\n\n/* \u2500\u2500 Rail \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype RailOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' | 'panel' | 'dismiss' };\n\ntype RailControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: RailOpenChangeMeta) => void; defaultOpen?: never };\ntype RailUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: RailOpenChangeMeta) => void; open?: never };\n\ntype RailProps = React.ComponentPropsWithoutRef<'div'> & {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n collapsible?: boolean;\n /** @deprecated Use `onOpenChange`. */\n onExpand?: () => void;\n /** @deprecated Use `onOpenChange`. */\n onCollapse?: () => void;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n} & (RailControlledProps | RailUncontrolledProps);\n\nconst RAIL_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\nconst Rail = React.forwardRef<HTMLDivElement, RailProps>((props, ref) => {\n const { className, presentation, expandedSize = 64, collapsible: _collapsible, onExpand, onCollapse, children, style, open, defaultOpen, onOpenChange, inset, id, ...domProps } = props;\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'rail',\n label: 'Rail',\n propNames: RAIL_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable: table,\n builtIn: navigationRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('rail', inset);\n const composedRef = useComposedRefs(ref, pane.setElement);\n\n return (\n <div\n {...domProps}\n role={domProps.role ?? 'navigation'}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellRail', className)}\n {...paneAttributes(pane, attributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={{ ...style, '--rail-size': `${expandedSize}px` } as CSSPropertiesWithVars}\n >\n <RailContent>{children}</RailContent>\n </div>\n );\n});\nRail.displayName = 'Shell.Rail';\n\n/** The Rail's content carries the index, so the thin row styles can size themselves by it. */\nfunction RailContent({ children }: { children: React.ReactNode }) {\n const size = React.useContext(ShellSizeContext);\n return (\n <div className={classNames('kui-ShellRailContent', `kui-r-size-${size}`)}>\n <PaneChromeScope presentation=\"thin\">{children}</PaneChromeScope>\n </div>\n );\n}\n\n/* \u2500\u2500 Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype HandleComponent = React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<'div'> & React.RefAttributes<HTMLDivElement>>;\n\ntype PanelOpenChangeMeta = { reason: 'toggle' | 'left' | 'init' | 'responsive' | 'dismiss' };\ntype PanelControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: PanelOpenChangeMeta) => void; defaultOpen?: never };\ntype PanelUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: PanelOpenChangeMeta) => void; open?: never };\n\ntype PanelSizeControlledProps = { size: number | string; defaultSize?: never };\ntype PanelSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\n\ntype PanelSizeChangeMeta = { reason: 'init' | 'resize' | 'controlled' };\ntype PanelPublicProps = PaneBaseProps &\n (PanelControlledProps | PanelUncontrolledProps) &\n (PanelSizeControlledProps | PanelSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: PanelSizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n };\ntype PanelComponent = React.ForwardRefExoticComponent<PanelPublicProps & React.RefAttributes<HTMLDivElement>> & {\n Handle: HandleComponent;\n};\n\nconst PANEL_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\n/**\n * A Panel with a `presentation` of its own uses it. One without follows the\n * Rail rendered before it, which is how 0.7 placed a Panel; the stylesheet\n * reads the Rail's attributes for the first paint and the registry carries\n * the Rail's table for the JS mirror.\n */\nconst Panel = React.forwardRef<HTMLDivElement, PanelPublicProps>((props, ref) => {\n const {\n className,\n presentation,\n defaultOpen,\n open,\n onOpenChange,\n size,\n defaultSize,\n expandedSize = 288,\n minSize = 100,\n maxSize = 800,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n inset,\n id,\n ...domProps\n } = props;\n const store = useShellStore('Shell.Panel');\n const rail = usePaneEntry(store, 'rail');\n const own = usePresentationTable(presentation, 'fixed');\n const followsRail = presentation === undefined;\n const presentationTable = followsRail ? (rail?.presentationTable ?? FIXED_TABLE) : own.table;\n const presentationAttributes = followsRail ? { 'data-presentation-follows': '' } : own.attributes;\n\n const pane = usePane({\n name: 'panel',\n label: 'Panel',\n propNames: PANEL_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable,\n builtIn: detailRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('panel', inset);\n\n React.useEffect(() => {\n if (snapPoints !== undefined || collapseThreshold !== undefined || paneId !== undefined || persistence !== undefined) {\n warnOnce('Shell.Panel: `snapPoints`, `collapseThreshold`, `paneId` and `persistence` are deprecated and are removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`.');\n }\n }, [snapPoints, collapseThreshold, paneId, persistence]);\n\n const elementRef = React.useRef<HTMLElement | null>(null);\n const composedRef = useComposedRefs(ref, pane.setElement, elementRef);\n\n const resize = useResizablePane({\n name: 'panel',\n elementId: pane.id,\n elementRef,\n cssVarName: '--panel-size',\n orientation: 'vertical',\n edge: 'end',\n growth: startAnchoredGrowth,\n expandedSize,\n minSize,\n maxSize,\n resizable,\n collapsible,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n overlaying: pane.overlaying,\n // Asked when the effect runs: the Rail registers its table after this\n // Panel first renders, so the render's answer can be out of date.\n overlayingNow: () => {\n const table = followsRail ? (store.entries.get('rail')?.presentationTable ?? FIXED_TABLE) : own.table;\n return table[readBreakpoint()] === 'overlay';\n },\n requestCollapse: () => pane.setValue('closed', 'toggle'),\n requestToggle: () => pane.toggle('toggle'),\n });\n\n // The starting size is in the server HTML, so the pane does not jump on hydration.\n const initialSize = useInitialPaneSize(size, defaultSize, minSize, maxSize);\n const { handles, content } = splitHandles(children, PanelHandle);\n const handle = resizable && pane.shown !== false && !pane.overlaying ? <PaneResizeContext.Provider value={resize}>{handles.length > 0 ? handles : <PaneHandle />}</PaneResizeContext.Provider> : null;\n\n return (\n <div\n {...withoutRemovedPaneProps(domProps)}\n role={domProps.role ?? 'navigation'}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellPanel', className)}\n {...paneAttributes(pane, presentationAttributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--panel-expanded-size': `${expandedSize}px`,\n ...(initialSize ? { '--panel-size': initialSize } : {}),\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"kui-ShellPanelContent\">\n <PaneChromeScope>\n <PageScope>{content}</PageScope>\n </PaneChromeScope>\n </div>\n {handle}\n </div>\n );\n}) as PanelComponent;\nPanel.displayName = 'Shell.Panel';\nPanel.Handle = PanelHandle;\n\n/* \u2500\u2500 Content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface ShellContentProps extends React.ComponentPropsWithoutRef<'main'> {\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n}\n\n/**\n * The work area. It scrolls as it is; with a `Shell.Scroll` child it becomes a column and the\n * Scroll scrolls instead, so a `Shell.PaneHeader float` beside it stays pinned over the page.\n */\nconst Content = React.forwardRef<HTMLElement, ShellContentProps>(({ className, inset, children, ...props }, ref) => {\n useInsetRegistration('content', inset);\n return (\n <main {...props} ref={ref} className={classNames('kui-ShellContent', className)} data-inset={inset || undefined}>\n {/* Each pane holds its own page store, so a band's title can mirror the page beside it. */}\n <ShellContentContext.Provider value={true}>\n <PageScope>{children}</PageScope>\n </ShellContentContext.Provider>\n </main>\n );\n});\nContent.displayName = 'Shell.Content';\n\n/* \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype TriggerAction = 'toggle' | 'expand' | 'collapse';\n\ninterface TriggerProps extends React.ComponentPropsWithoutRef<'button'> {\n target: PaneTarget;\n action?: TriggerAction;\n /**\n * Renders the single child in place of the trigger's own button, with the trigger's click,\n * `aria-controls`, `aria-expanded` and data attributes merged onto it. Use it to make a\n * `Button` the trigger: `<Shell.Trigger asChild><Button iconOnly aria-label=\"Toggle sidebar\">\u2026</Button></Shell.Trigger>`.\n */\n asChild?: boolean;\n /**\n * Whether to show a preview of the target pane on hover while it is closed\n * and not an overlay. Defaults to false.\n *\n * @deprecated Removed in 1.0. A preview reachable only by mouse hover has no\n * keyboard or touch equivalent; open the pane instead.\n */\n peekOnHover?: boolean;\n}\n\n/**\n * A button that drives a pane by name, through the registry. It sets\n * `aria-controls` and `aria-expanded` (left off while an untouched pane\n * cannot know its state yet), renders `type=\"button\"`, and runs the\n * consumer's `onClick` first: calling `preventDefault()` there cancels it. With `asChild` the\n * child is the button, and its own `type` stands.\n */\nconst Trigger = React.forwardRef<HTMLButtonElement, TriggerProps>(({ target, action = 'toggle', peekOnHover, asChild = false, onClick, onMouseEnter, onMouseLeave, children, ...props }, ref) => {\n const store = useShellStore('Shell.Trigger');\n React.useEffect(() => {\n if (target === 'left') warnOnce('Shell.Trigger target=\"left\" is deprecated and is removed in 1.0. Use target=\"rail\".');\n if (peekOnHover) warnOnce('Shell.Trigger: `peekOnHover` is deprecated and is removed in 1.0.');\n }, [target, peekOnHover]);\n const name: PaneName = target === 'left' ? 'rail' : target;\n // Subscribes to its own pane only.\n const entry = usePaneEntry(store, name);\n const shown = entry?.value === undefined ? undefined : entry.value !== 'closed';\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (event.defaultPrevented) return;\n const current = store.entries.get(name);\n if (!current) return;\n if (store.peek === name) setShellPeek(store, null);\n if (action === 'toggle') current.toggle('toggle');\n else if (action === 'expand') current.setValue('open', 'toggle');\n else current.setValue('closed', 'toggle');\n };\n\n const handleMouseEnter = (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseEnter?.(event);\n if (!peekOnHover) return;\n const current = store.entries.get(name);\n if (current && current.value === 'closed' && current.presentation !== 'overlay') setShellPeek(store, name);\n };\n\n const handleMouseLeave = (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseLeave?.(event);\n if (peekOnHover && store.peek === name) setShellPeek(store, null);\n };\n\n const Comp = asChild ? Slot.Root : 'button';\n return (\n <Comp\n // A button's default type is `submit`. Stated before the spread, so a consumer's own wins.\n // An asChild child states its own (Button already says `button`; a link has none), so the\n // key is left off rather than passed as undefined.\n {...(!asChild && { type: 'button' as const })}\n aria-controls={entry?.id}\n aria-expanded={shown}\n {...props}\n ref={ref}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n data-shell-trigger={target}\n data-shell-action={action}\n >\n {children}\n </Comp>\n );\n});\nTrigger.displayName = 'Shell.Trigger';\n\n// Exports\nexport {\n Root,\n Header,\n Left,\n Rail,\n Panel,\n Sidebar,\n Content,\n Inspector,\n Bottom,\n Trigger,\n PaneHeader,\n PaneFooter,\n Scroll,\n useShell,\n useSidebarMode,\n useResponsivePresentation,\n type PaneMode,\n type SidebarMode,\n type ResponsivePresentation,\n type PaneTarget,\n type TriggerAction,\n type ShellRootProps as RootProps,\n type ShellHeaderProps as HeaderProps,\n type RailProps,\n type PanelPublicProps as PanelProps,\n type SidebarPublicProps as SidebarProps,\n type ShellContentProps as ContentProps,\n type InspectorPublicProps as InspectorProps,\n type BottomPublicProps as BottomProps,\n type TriggerProps,\n type PaneHeaderProps,\n type PaneFooterProps,\n type ScrollProps,\n};\n"],
5
+ "mappings": ";y6BAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,YAAAE,GAAA,YAAAC,GAAA,WAAAC,GAAA,cAAAC,GAAA,SAAAC,GAAA,eAAAC,GAAA,eAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,SAAAC,GAAA,WAAAC,GAAA,YAAAC,GAAA,YAAAC,GAAA,8BAAAC,GAAA,aAAAC,GAAA,mBAAAC,KAsBA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,OAAY,WACrB,OAAS,mBAAAC,GAAiB,mBAAAC,OAAuB,oBA6DjD,IAAIC,GAAkB,EACtB,SAASC,GAAeC,EAAe,CACrCF,GAAkB,KAAK,IAAI,EAAGA,GAAkBE,CAAK,EACrD,I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AC,EACxB,IAAMK,EAAiBzG,IAAW,OAAS,OAASA,EAE9ChC,EAAQ0G,GAAa1H,EAAOyJ,CAAI,EAChCC,EAAQ1I,GAAO,QAAU,OAAY,OAAYA,EAAM,QAAU,SAEjE2I,EAAe3H,GAA+C,CAElE,GADAsH,IAAUtH,CAAK,EACXA,EAAM,iBAAkB,OAC5B,IAAM4H,EAAU5J,EAAM,QAAQ,IAAIyJ,CAAI,EACjCG,IACD5J,EAAM,OAASyJ,GAAMI,GAAa7J,EAAO,IAAI,EAC7CmJ,IAAW,SAAUS,EAAQ,OAAO,QAAQ,EACvCT,IAAW,SAAUS,EAAQ,SAAS,OAAQ,QAAQ,EAC1DA,EAAQ,SAAS,SAAU,QAAQ,EAC1C,EAEME,EAAoB9H,GAA+C,CAEvE,GADAuH,IAAevH,CAAK,EAChB,CAACoH,EAAa,OAClB,IAAMQ,EAAU5J,EAAM,QAAQ,IAAIyJ,CAAI,EAClCG,GAAWA,EAAQ,QAAU,UAAYA,EAAQ,eAAiB,WAAWC,GAAa7J,EAAOyJ,CAAI,CAC3G,EAEMM,EAAoB/H,GAA+C,CACvEwH,IAAexH,CAAK,EAChBoH,GAAepJ,EAAM,OAASyJ,GAAMI,GAAa7J,EAAO,IAAI,CAClE,EAEMgK,EAAOX,EAAUY,GAAK,KAAO,SACnC,OACE,gBAACD,EAAA,CAIE,GAAI,CAACX,GAAW,CAAE,KAAM,QAAkB,EAC3C,gBAAerI,GAAO,GACtB,gBAAe0I,EACd,GAAG9J,EACJ,IAAKC,EACL,QAAS8J,EACT,aAAcG,EACd,aAAcC,EACd,qBAAoB/G,EACpB,oBAAmBmG,GAElB9J,CACH,CAEJ,CAAC,EACD6J,GAAQ,YAAc",
6
+ "names": ["shell_exports", "__export", "Bottom", "Content", "Header", "Inspector", "Left", "PaneFooter", "PaneHeader", "Panel", "Rail", "Root", "Scroll", "Sidebar", "Trigger", "useResponsivePresentation", "useShell", "useSidebarMode", "React", "classNames", "Slot", "useComposedRefs", "useLayoutEffect", "pageLockHolders", "updatePageLock", "delta", "doc", "INERT_MARK", "RESCUE_FRAMES", "isNowhere", "el", "triggerFor", "id", "within", "pane", "shellSizePropDef", "ShellHeaderHeightContext", "DEFAULT_HEADER_HEIGHT", "frameScroller", "rootEl", "Root", "className", "children", "height", "containedProp", "sizeProp", "style", "onKeyDown", "onFocus", "props", "ref", "size", "useThemeSize", "store", "createShellStore", "subscribe", "listener", "subscribeShellStore", "rootRef", "composedRef", "useComposedRefs", "insetPanes", "setInsetPanes", "registerInset", "prev", "unregisterInset", "next", "insetContext", "closeOverlays", "entry", "livePanes", "liveCount", "contained", "windowShell", "headerHeight", "setHeaderHeight", "win", "pageScrolls", "pageScrollMatches", "offset", "frame", "resizing", "onResize", "fromPage", "fromFrame", "event", "stop", "onPageScrollMediaChange", "matches", "carried", "contain", "liveEls", "child", "holdsLive", "returnFocusTo", "lastLive", "lastFocusInRoot", "holdsLock", "rescueFrame", "cancelRescue", "rescueFocus", "target", "lost", "frames", "tick", "live", "wantsLock", "previous", "closed", "inClosed", "active", "inRoot", "before", "opened", "now", "observer", "handleKeyDown", "onDocumentKeyDown", "handleFocus", "rail", "railOffset", "heightStyle", "ShellStoreContext", "ShellSizeContext", "ShellContentContext", "ShellWindowContext", "ShellInsetContext", "PaneBandSizeContext", "classNames", "Header", "useLayoutEffect", "Left", "_ref", "RAIL_PROP_NAMES", "Rail", "presentation", "expandedSize", "_collapsible", "onExpand", "onCollapse", "open", "defaultOpen", "onOpenChange", "inset", "domProps", "table", "attributes", "usePresentationTable", "usePane", "toPaneValue", "navigationRest", "value", "reason", "useInsetRegistration", "paneAttributes", "RailContent", "PaneChromeScope", "PANEL_PROP_NAMES", "Panel", "defaultSize", "minSize", "maxSize", "resizable", "collapsible", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "useShellStore", "usePaneEntry", "own", "followsRail", "presentationTable", "FIXED_TABLE", "presentationAttributes", "detailRest", "elementRef", "resize", "useResizablePane", "startAnchoredGrowth", "readBreakpoint", "initialSize", "useInitialPaneSize", "handles", "content", "splitHandles", "PanelHandle", "handle", "PaneResizeContext", "PaneHandle", "withoutRemovedPaneProps", "PageScope", "Content", "Trigger", "action", "peekOnHover", "asChild", "onClick", "onMouseEnter", "onMouseLeave", "name", "shown", "handleClick", "current", "setShellPeek", "handleMouseEnter", "handleMouseLeave", "Comp", "Slot"]
7
+ }
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as r}from"./chunk-KJZSXLIX.js";import*as e from"react";import d from"classnames";import{Toggle as g}from"radix-ui";var i=e.forwardRef(({pressed:o,onPressedChange:t,defaultPressed:s,children:a,className:l,...n},p)=>{delete n.done;let u=e.useRef(!1);return e.useEffect(()=>{},[o,t]),e.createElement(g.Root,{pressed:o,onPressedChange:t,defaultPressed:s,asChild:!0},e.createElement(r,{...n,ref:p,className:d("kui-Toggle",l)},a))});i.displayName="Toggle";export{i as a};
3
- //# sourceMappingURL=chunk-FMVOB367.js.map
2
+ import{a as r}from"./chunk-JQMWNI62.js";import*as e from"react";import d from"classnames";import{Toggle as g}from"radix-ui";var i=e.forwardRef(({pressed:o,onPressedChange:t,defaultPressed:s,children:a,className:l,...n},p)=>{delete n.done;let u=e.useRef(!1);return e.useEffect(()=>{},[o,t]),e.createElement(g.Root,{pressed:o,onPressedChange:t,defaultPressed:s,asChild:!0},e.createElement(r,{...n,ref:p,className:d("kui-Toggle",l)},a))});i.displayName="Toggle";export{i as a};
3
+ //# sourceMappingURL=chunk-ZLGOZKB3.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a}from"../../chunk-2ZKEQS76.js";import"../../chunk-BUXK5VGR.js";import"../../chunk-KVVRFWGQ.js";import"../../chunk-YCLPURTD.js";import"../../chunk-CR65RYGM.js";import"../../chunk-GKDGNPBD.js";import"../../chunk-7N2Q5WOM.js";import"../../chunk-OAJ5DARR.js";import"../../chunk-5KMEUZWN.js";import"../../chunk-LPLW7OWA.js";import"../../chunk-L54FWKJE.js";import"../../chunk-OKQAVYW4.js";import"../../chunk-5ON3XLRD.js";import"../../chunk-HBWBPBSA.js";import"../../chunk-XU74PNM2.js";import"../../chunk-CLJ6SEGP.js";import"../../chunk-VQPANPMI.js";export{a as BaseButton};
2
+ import{a}from"../../chunk-SGKLJDA3.js";import"../../chunk-BUXK5VGR.js";import"../../chunk-KVVRFWGQ.js";import"../../chunk-YCLPURTD.js";import"../../chunk-CR65RYGM.js";import"../../chunk-7N2Q5WOM.js";import"../../chunk-OAJ5DARR.js";import"../../chunk-5KMEUZWN.js";import"../../chunk-GKDGNPBD.js";import"../../chunk-5ON3XLRD.js";import"../../chunk-HBWBPBSA.js";import"../../chunk-LPLW7OWA.js";import"../../chunk-L54FWKJE.js";import"../../chunk-XU74PNM2.js";import"../../chunk-OKQAVYW4.js";import"../../chunk-CLJ6SEGP.js";import"../../chunk-VQPANPMI.js";export{a as BaseButton};
3
3
  //# sourceMappingURL=base-button.js.map
@@ -0,0 +1,48 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * What page is in a pane, and whether its title has scrolled away (from v2, 2026-11-03).
4
+ *
5
+ * A page's large title lives inside the scroller and the band that shows it again lives beside
6
+ * it, so context, which only flows down, cannot carry it from one to the other. The store sits
7
+ * at their common ancestor, the pane. Each pane provides its own, so two panes can each hold a
8
+ * titled page; `Shell.Header` provides none, so a `Toolbar.Title` there always speaks for itself.
9
+ * Outside a Shell there is no scope: a `Page` still draws its heading and a `Toolbar.Title` still
10
+ * shows its own words.
11
+ */
12
+ type PageStore = {
13
+ /** The words of the page in this pane, or null while nothing has claimed it. */
14
+ title: string | null;
15
+ /** Every `Toolbar.Title` mirroring this pane's page, as elements: the collapse is written onto them. */
16
+ mirrors: Set<HTMLElement>;
17
+ /** Whether the page's own title has scrolled up behind the band. */
18
+ collapsed: boolean;
19
+ listeners: Set<() => void>;
20
+ /** What a subscriber reads: a stable value between notifications. */
21
+ version: number;
22
+ };
23
+ /**
24
+ * The collapse is an attribute write, not a render: only CSS reads it, and an observer sends it
25
+ * twice per visit to a page.
26
+ */
27
+ declare function setPageCollapsed(store: PageStore, collapsed: boolean): void;
28
+ /** Every pane renders one. It draws nothing. */
29
+ declare function PageScope({ children }: {
30
+ children: React.ReactNode;
31
+ }): React.JSX.Element;
32
+ /** Cuts the scope off below a portal: a panel over a pane is not in it, so its title must not take the pane's band. */
33
+ declare function NoPageScope({ children }: {
34
+ children: React.ReactNode;
35
+ }): React.JSX.Element;
36
+ declare function usePageScope(): PageStore | null;
37
+ /** A `Page` claims the pane it is in, in an effect, so no subscriber's snapshot changes mid-render. */
38
+ declare function useClaimPage(store: PageStore | null, title: string): void;
39
+ /** What a `Toolbar.Title` shows when it is given no words of its own. */
40
+ declare function usePageTitle(store: PageStore | null): string | null;
41
+ /**
42
+ * Registers a mirroring title's element, stamped with what the page is doing now: a title that
43
+ * mounts after its page has scrolled arrives collapsed.
44
+ */
45
+ declare function usePageMirror(store: PageStore | null): React.RefCallback<HTMLElement>;
46
+ export { PageScope, NoPageScope, usePageScope, useClaimPage, usePageTitle, usePageMirror, setPageCollapsed };
47
+ export type { PageStore };
48
+ //# sourceMappingURL=page-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-scope.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/page-scope.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;;;;;GASG;AACH,KAAK,SAAS,GAAG;IACf,gFAAgF;IAChF,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,wGAAwG;IACxG,OAAO,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IAC1B,oEAAoE;IACpE,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAC3B,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AASF;;;GAGG;AACH,iBAAS,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI,CAOpE;AAED,gDAAgD;AAChD,iBAAS,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAG7D;AAED,uHAAuH;AACvH,iBAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAE/D;AAED,iBAAS,YAAY,IAAI,SAAS,GAAG,IAAI,CAExC;AAED,uGAAuG;AACvG,iBAAS,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAYlE;AAED,yEAAyE;AACzE,iBAAS,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAkB5D;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAc9E;AAED,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC;AAC7G,YAAY,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ "use client";import{a,b,c,d,e,f,g}from"../../chunk-VWRPVM5K.js";import"../../chunk-VQPANPMI.js";export{c as NoPageScope,b as PageScope,a as setPageCollapsed,e as useClaimPage,g as usePageMirror,d as usePageScope,f as usePageTitle};
3
+ //# sourceMappingURL=page-scope.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use client";import{a,b,c,d,e,f,g,h,i,j,k}from"../../chunk-YMRN5ESN.js";import"../../chunk-MGWGD6KI.js";import"../../chunk-KOAWATCI.js";import"../../chunk-5KJIPH2N.js";import"../../chunk-YOSLXJI5.js";import"../../chunk-QEDKL23P.js";import"../../chunk-GHWEXMF6.js";import"../../chunk-LPLW7OWA.js";import"../../chunk-L54FWKJE.js";import"../../chunk-MAA6LEE2.js";import"../../chunk-OKQAVYW4.js";import"../../chunk-XU74PNM2.js";import"../../chunk-CLJ6SEGP.js";import"../../chunk-ANQLWGFN.js";import"../../chunk-VQPANPMI.js";export{g as BAND_STEP,f as PaneChromeScope,j as PaneFooter,i as PaneHeader,k as Scroll,d as ShellContentContext,c as ShellSizeContext,e as ShellWindowContext,a as SidebarVisualContext,h as usePaneBandSize,b as useSidebarVisual};
2
+ "use client";import{a,b,c,d,e,f,g,h,i,j,k}from"../../chunk-NFSW36RG.js";import"../../chunk-DFQIIYLD.js";import"../../chunk-KOAWATCI.js";import"../../chunk-5KJIPH2N.js";import"../../chunk-YOSLXJI5.js";import"../../chunk-QEDKL23P.js";import"../../chunk-GHWEXMF6.js";import"../../chunk-LPLW7OWA.js";import"../../chunk-L54FWKJE.js";import"../../chunk-XU74PNM2.js";import"../../chunk-MAA6LEE2.js";import"../../chunk-OKQAVYW4.js";import"../../chunk-CLJ6SEGP.js";import"../../chunk-ANQLWGFN.js";import"../../chunk-VQPANPMI.js";export{g as BAND_STEP,f as PaneChromeScope,j as PaneFooter,i as PaneHeader,k as Scroll,d as ShellContentContext,c as ShellSizeContext,e as ShellWindowContext,a as SidebarVisualContext,h as usePaneBandSize,b as useSidebarVisual};
3
3
  //# sourceMappingURL=pane-chrome.js.map