@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
@@ -0,0 +1,38 @@
1
+ /* Page (from v2, 2026-11-03): the screen you navigated to. Three distances and a marker; the
2
+ * width is the frame's to state. */
3
+ .kui-Page {
4
+ display: flex;
5
+ flex-direction: column;
6
+ /* From the title block to whatever the page begins with: two steps clear of the title-to-
7
+ description interval, so a section does not read as a third line of the description. */
8
+ gap: var(--layout-space-8);
9
+ /* Air above the title. A floating band's reach is already cleared by `Shell.Scroll`, which
10
+ pads its content by it, so only the air is left to add. */
11
+ padding-block-start: var(--layout-space-7);
12
+ }
13
+
14
+ /* The title and its description are one block, and the marker is placed against it. */
15
+ .kui-PageHeader {
16
+ position: relative;
17
+ display: flex;
18
+ flex-direction: column;
19
+ gap: var(--layout-space-6);
20
+ }
21
+
22
+ /* The mark and the title are a lockup, so they sit closer than the title and description. */
23
+ .kui-PageMark {
24
+ margin-block-end: calc(var(--layout-space-4) - var(--layout-space-6));
25
+ }
26
+
27
+ /* Where the title stops being visible. The band floats over the scroller, so the marker sits the
28
+ band's reach above the end of the title block, and crosses the scroller's top edge at the
29
+ moment the title passes behind the band. A hairline tall, since a zero-area box is not
30
+ reliably reported as intersecting; out of flow, and it paints nothing. */
31
+ .kui-PageMarker {
32
+ position: absolute;
33
+ inset-block-end: var(--kui-pane-inset-start, 0px);
34
+ inset-inline-start: 0;
35
+ block-size: 1px;
36
+ inline-size: 100%;
37
+ pointer-events: none;
38
+ }
@@ -0,0 +1,93 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import classNames from 'classnames';
5
+
6
+ import { setPageCollapsed, useClaimPage, usePageScope } from './_internal/page-scope.js';
7
+ import { usePageScrollMedia } from './_internal/shell-page-scroll.js';
8
+ import { Heading } from './heading.js';
9
+ import { Text } from './text.js';
10
+
11
+ interface PageProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'title'> {
12
+ /**
13
+ * The title of the page. It shows large at the top. When it scrolls away, it also shows in
14
+ * the `Toolbar.Title` of the pane's band. It is a string, because it shows in two places.
15
+ */
16
+ title: string;
17
+ /** A sentence under the title that describes the page. Optional. */
18
+ description?: React.ReactNode;
19
+ /** A logo or mark above the title, such as an app's logo on its home page. Most pages don't need it. */
20
+ mark?: React.ReactNode;
21
+ }
22
+
23
+ /**
24
+ * Page, from v2 (2026-11-03): the screen you navigated to, and its title.
25
+ *
26
+ * A page is not a band. The pinned row with the way back and the tools is the pane's
27
+ * (`Shell.PaneHeader`): it stays while you move from page to page. The large title that arrives
28
+ * and leaves with the content is the page's, and it is this.
29
+ *
30
+ * It owns three things: the air above its title (a floating band's reach is already cleared by
31
+ * `Shell.Scroll`), the title and its description at the page's type steps, and the collapse:
32
+ * when the title passes behind the band, every `Toolbar.Title` with no words of its own in this
33
+ * pane shows the page's title.
34
+ *
35
+ * It takes no width (the frame around it states one), no level (a page is the document's one
36
+ * `h1`), no size (an app has one page step) and no actions (they go in the toolbar).
37
+ */
38
+ const Page = React.forwardRef<HTMLDivElement, PageProps>(({ title, description, mark, className, children, ...props }, forwardedRef) => {
39
+ const store = usePageScope();
40
+ const marker = React.useRef<HTMLDivElement>(null);
41
+ useClaimPage(store, title);
42
+
43
+ // Re-read when a touch window crosses the phone boundary: the scroller changes from the
44
+ // content's viewport to the page, and an observer built for one never fires for the other.
45
+ const pageScrolls = usePageScrollMedia();
46
+ React.useEffect(() => {
47
+ const el = marker.current;
48
+ if (!el || !store) return;
49
+ // The scroller is the viewport around this, if it scrolls; on a phone window Shell the
50
+ // document scrolls and the viewport is `overflow: visible`, so the root is the document.
51
+ const viewport = el.closest<HTMLElement>('.kui-ScrollAreaViewport');
52
+ const scrolls = viewport !== null && !/^(visible|clip)$/.test(getComputedStyle(viewport).overflowY);
53
+ const observer = new IntersectionObserver(
54
+ (entries) => {
55
+ const entry = entries[entries.length - 1];
56
+ if (!entry) return;
57
+ // Gone off the top, not merely gone: a marker below the fold is also out of view.
58
+ const top = entry.rootBounds?.top;
59
+ setPageCollapsed(store, !entry.isIntersecting && (top === undefined || entry.boundingClientRect.top <= top));
60
+ },
61
+ { root: scrolls ? viewport : null, threshold: 0 },
62
+ );
63
+ observer.observe(el);
64
+ return () => {
65
+ observer.disconnect();
66
+ // A page that unmounts takes its collapse with it, or the next page's band opens collapsed.
67
+ setPageCollapsed(store, false);
68
+ };
69
+ }, [store, pageScrolls]);
70
+
71
+ return (
72
+ <div {...props} ref={forwardedRef} className={classNames('kui-Page', className)}>
73
+ <div className="kui-PageHeader">
74
+ {mark === undefined || mark === null ? null : <div className="kui-PageMark">{mark}</div>}
75
+ <Heading as="h1" size="9" weight="medium">
76
+ {title}
77
+ </Heading>
78
+ {description === undefined || description === null ? null : (
79
+ <Text as="p" size="4">
80
+ {description}
81
+ </Text>
82
+ )}
83
+ {/* Out of flow, so it displaces nothing and a page with no band behaves the same. */}
84
+ <div ref={marker} className="kui-PageMarker" aria-hidden="true" />
85
+ </div>
86
+ {children}
87
+ </div>
88
+ );
89
+ });
90
+ Page.displayName = 'Page';
91
+
92
+ export { Page };
93
+ export type { PageProps };
@@ -52,6 +52,7 @@ import { useShell, useSidebarMode } from './shell.context.js';
52
52
  import { useResponsivePresentation } from './shell.hooks.js';
53
53
  import { readBreakpoint } from '../hooks/use-breakpoint.js';
54
54
  import { useThemeSize } from '../hooks/theme-size.js';
55
+ import { PageScope } from './_internal/page-scope.js';
55
56
  import { PaneChromeScope, PaneFooter, PaneHeader, Scroll, ShellContentContext, ShellSizeContext, ShellWindowContext } from './_internal/pane-chrome.js';
56
57
  import { onPageScrollMediaChange, pageScrollMatches } from './_internal/shell-page-scroll.js';
57
58
  import type { PaneSize, PaneHeaderProps, PaneFooterProps, ScrollProps } from './_internal/pane-chrome.js';
@@ -784,7 +785,9 @@ const Panel = React.forwardRef<HTMLDivElement, PanelPublicProps>((props, ref) =>
784
785
  }
785
786
  >
786
787
  <div className="kui-ShellPanelContent">
787
- <PaneChromeScope>{content}</PaneChromeScope>
788
+ <PaneChromeScope>
789
+ <PageScope>{content}</PageScope>
790
+ </PaneChromeScope>
788
791
  </div>
789
792
  {handle}
790
793
  </div>
@@ -808,7 +811,10 @@ const Content = React.forwardRef<HTMLElement, ShellContentProps>(({ className, i
808
811
  useInsetRegistration('content', inset);
809
812
  return (
810
813
  <main {...props} ref={ref} className={classNames('kui-ShellContent', className)} data-inset={inset || undefined}>
811
- <ShellContentContext.Provider value={true}>{children}</ShellContentContext.Provider>
814
+ {/* Each pane holds its own page store, so a band's title can mirror the page beside it. */}
815
+ <ShellContentContext.Provider value={true}>
816
+ <PageScope>{children}</PageScope>
817
+ </ShellContentContext.Provider>
812
818
  </main>
813
819
  );
814
820
  });
@@ -158,6 +158,17 @@
158
158
  flex-shrink: 1;
159
159
  }
160
160
 
161
+ /* A mirroring title is the page's own, said again in the band: silent while the page's large
162
+ title is on screen, shown at once when it is not. Paint only, so the clusters beside it never
163
+ move when someone scrolls. */
164
+ .kui-ToolbarTitle:where([data-mirror]) {
165
+ opacity: 0;
166
+ }
167
+
168
+ .kui-ToolbarTitle:where([data-mirror][data-collapsed]) {
169
+ opacity: 1;
170
+ }
171
+
161
172
  /* A title is a different kind of thing from the controls beside it, so it takes more air than
162
173
  they take from each other. It reaches inside a cluster, since a band is often written
163
174
  <Flex>{back}{title}</Flex>. No air against the row's own ends. */
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import * as React from 'react';
4
- import { useLayoutEffect } from 'radix-ui/internal';
4
+ import { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';
5
5
  import classNames from 'classnames';
6
6
  import { Toolbar as ToolbarPrimitive } from 'radix-ui';
7
7
 
@@ -13,6 +13,7 @@ import { extractProps } from '../helpers/extract-props.js';
13
13
  import { useThemeSize } from '../hooks/theme-size.js';
14
14
  import { layoutPropDefs } from '../props/layout.props.js';
15
15
  import { usePaneBandSize } from './_internal/pane-chrome.js';
16
+ import { usePageMirror, usePageScope, usePageTitle } from './_internal/page-scope.js';
16
17
 
17
18
  import type { ButtonProps } from './button.js';
18
19
  import type { LayoutProps } from '../props/layout.props.js';
@@ -671,7 +672,11 @@ ToolbarSeparator.displayName = 'Toolbar.Separator';
671
672
  const TITLE_SIZE = { '1': '2', '2': '3', '3': '4', '4': '5' } as const satisfies Record<ToolbarSize, TextProps['size']>;
672
673
 
673
674
  interface ToolbarTitleProps {
674
- /** The title text. With none, the title renders nothing. */
675
+ /**
676
+ * The title text. With none, the title mirrors the page in this Shell pane: it shows the
677
+ * `Page`'s title once that title has scrolled behind the band. Outside a pane with a page, it
678
+ * renders nothing.
679
+ */
675
680
  children?: React.ReactNode;
676
681
  className?: string;
677
682
  style?: React.CSSProperties;
@@ -689,10 +694,16 @@ const ToolbarTitle = React.forwardRef<HTMLSpanElement, ToolbarTitleProps>(
689
694
  const toolbar = React.useContext(ToolbarContext);
690
695
  const themeSize = useThemeSize<ToolbarSize>(undefined, toolbarRootPropDefs.size);
691
696
  const size = toolbar?.size ?? themeSize;
692
- if (children === undefined || children === null || children === false) return null;
697
+ const store = usePageScope();
698
+ const pageTitle = usePageTitle(store);
699
+ const mirrorRef = usePageMirror(store);
700
+ const mirroring = children === undefined || children === null || children === false;
701
+ const words = mirroring ? pageTitle : children;
702
+ const ref = useComposedRefs(forwardedRef, mirroring ? mirrorRef : undefined);
703
+ if (words === undefined || words === null) return null;
693
704
  return (
694
705
  <Text
695
- ref={forwardedRef}
706
+ ref={ref}
696
707
  as="span"
697
708
  size={TITLE_SIZE[size]}
698
709
  weight="medium"
@@ -700,8 +711,9 @@ const ToolbarTitle = React.forwardRef<HTMLSpanElement, ToolbarTitleProps>(
700
711
  id={id}
701
712
  style={style}
702
713
  className={classNames('kui-ToolbarTitle', className)}
714
+ data-mirror={mirroring || undefined}
703
715
  >
704
- {children}
716
+ {words}
705
717
  </Text>
706
718
  );
707
719
  },
package/styles.css CHANGED
@@ -20480,6 +20480,12 @@
20480
20480
  -ms-flex-negative: 1;
20481
20481
  flex-shrink: 1;
20482
20482
  }
20483
+ .kui-ToolbarTitle:where([data-mirror]) {
20484
+ opacity: 0;
20485
+ }
20486
+ .kui-ToolbarTitle:where([data-mirror][data-collapsed]) {
20487
+ opacity: 1;
20488
+ }
20483
20489
  :where(.kui-Toolbar) .kui-ToolbarTitle:where(:not(:first-child)) {
20484
20490
  -webkit-margin-start: calc(var(--toolbar-title-gap) - var(--toolbar-gap));
20485
20491
  margin-inline-start: calc(var(--toolbar-title-gap) - var(--toolbar-gap));
@@ -20582,6 +20588,41 @@
20582
20588
  outline: 2px solid var(--focus-8);
20583
20589
  outline-offset: -2px;
20584
20590
  }
20591
+ .kui-Page {
20592
+ display: -webkit-box;
20593
+ display: -ms-flexbox;
20594
+ display: flex;
20595
+ -webkit-box-orient: vertical;
20596
+ -webkit-box-direction: normal;
20597
+ -ms-flex-direction: column;
20598
+ flex-direction: column;
20599
+ gap: var(--layout-space-8);
20600
+ -webkit-padding-before: var(--layout-space-7);
20601
+ padding-block-start: var(--layout-space-7);
20602
+ }
20603
+ .kui-PageHeader {
20604
+ position: relative;
20605
+ display: -webkit-box;
20606
+ display: -ms-flexbox;
20607
+ display: flex;
20608
+ -webkit-box-orient: vertical;
20609
+ -webkit-box-direction: normal;
20610
+ -ms-flex-direction: column;
20611
+ flex-direction: column;
20612
+ gap: var(--layout-space-6);
20613
+ }
20614
+ .kui-PageMark {
20615
+ -webkit-margin-after: calc(var(--layout-space-4) - var(--layout-space-6));
20616
+ margin-block-end: calc(var(--layout-space-4) - var(--layout-space-6));
20617
+ }
20618
+ .kui-PageMarker {
20619
+ position: absolute;
20620
+ inset-block-end: var(--kui-pane-inset-start, 0px);
20621
+ inset-inline-start: 0;
20622
+ block-size: 1px;
20623
+ inline-size: 100%;
20624
+ pointer-events: none;
20625
+ }
20585
20626
  .kui-TooltipContent {
20586
20627
  -webkit-box-sizing: border-box;
20587
20628
  box-sizing: border-box;
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{d as m,i as b,j as C}from"./chunk-WAE4MLBN.js";import{a as O}from"./chunk-JP36JSNP.js";import{a as S}from"./chunk-KVVRFWGQ.js";import{a as R}from"./chunk-4KBKS3ZE.js";import{d as B,i as w,k as H}from"./chunk-YMRN5ESN.js";import{j as L}from"./chunk-GHWEXMF6.js";import*as e from"react";import k from"classnames";var E=e.createContext(null),A=e.createContext(0),G=e.createContext(null);function J(){let t=e.useContext(L),a=e.useContext(B),i=e.useContext(R);return t!==null&&!a&&i===null}var M=e.Activity;function Q({visible:t,children:a}){return M?e.createElement(M,{mode:t?"visible":"hidden"},a):e.createElement("div",{hidden:!t,style:{display:t?"contents":"none"}},a)}function se({path:t,defaultPath:a,onPathChange:i,screen:s,root:c,children:u,className:v,style:p}){let l=J(),[F,$]=e.useState(a??[]),o=t??F,[g,D]=e.useState({path:o,direction:null}),f=g.direction;if(g.path.length!==o.length||g.path.some((n,r)=>!Object.is(n,o[r]))){let n=g.path;f=o.length<n.length?"pop":o.length>n.length||!Object.is(o[o.length-1],n[n.length-1])?"push":g.direction,D({path:o,direction:f})}let T=e.useRef([]),h=e.useRef([]),[I,q]=e.useState(0),N=e.useCallback(n=>{t===void 0&&$(n),i?.(n)},[t,i]),z=e.useMemo(()=>({path:o,canGoBack:o.length>0,push:n=>{h.current[o.length+1]=typeof document>"u"?null:document.activeElement,N([...o,n])},pop:()=>{o.length>0&&N(o.slice(0,-1))},popTo:n=>{n<o.length&&N(o.slice(0,Math.max(0,n)))},titles:T,openers:h,setTitle:(n,r)=>{T.current[n]!==r&&(T.current[n]=r,q(V=>V+1))},direction:f,inPane:l}),[o,N,I,f,l]),x=e.useRef(o.length);e.useEffect(()=>{let n=x.current;if(x.current=o.length,o.length<n){let r=h.current[n];h.current.length=o.length+1,r&&r.isConnected&&r.focus()}},[o.length]);let y=[c,...o.map(n=>s(n))],K=y.length-1,P=e.createElement("div",{className:k("kui-Navigator",v),style:p},y.map((n,r)=>e.createElement(Q,{key:r===0?"root":`${r}:${String(o[r-1])}`,visible:r===K},e.createElement(A.Provider,{value:r},e.createElement("div",{className:"kui-NavigatorLevel"},n)))));return e.createElement(E.Provider,{value:z},e.createElement(G.Provider,{value:P},u??(l?e.createElement(U,null):P)))}function U(){return e.createElement(e.Fragment,null,e.createElement(w,null,e.createElement(C,null,e.createElement(S,{align:"center"},e.createElement(Z,null),e.createElement(_,null)))),e.createElement(H,null,e.createElement(X,null)))}function X(){return e.createElement(e.Fragment,null,e.useContext(G))}function d(){let t=e.useContext(E);if(!t)throw new Error("Kookie: this part must be inside a <Navigator>.");return t}function ce(){return d()}function j(){return e.createElement("svg",{className:"kui-NavigatorBackGlyph",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},e.createElement("path",{d:"m15 18-6-6 6-6",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"}))}function Y(){return e.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},e.createElement("path",{d:"M18 6 6 18M6 6l12 12",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round"}))}function W(t,a){let i=a>0?t.titles.current[a-1]:void 0;return i?`Back to ${i}`:"Back"}function Z(t){let a=d();return a.canGoBack?e.createElement(m,{iconOnly:!0,"aria-label":t["aria-label"]??W(a,a.path.length),onClick:a.pop},e.createElement(j,null)):null}function _(){let t=d();return e.createElement(b,null,t.titles.current[t.path.length])}function le({title:t,children:a,className:i}){let s=d(),c=e.useContext(A),u=e.useContext(R),v=e.useRef(null);if(e.useEffect(()=>{s.setTitle(c,t)},[s,c,t]),e.useEffect(()=>{if(c===0||s.direction!=="push")return;let l=v.current?.querySelector(".kui-NavigatorBar .kui-ToolbarTitle")??v.current;l&&(l.tabIndex=-1,l.focus({preventScroll:!0}))},[]),s.inPane)return e.createElement("div",{ref:v,className:k("kui-NavigatorScreen",i)},a);let p=e.createElement(O,{as:"h2",size:"4",weight:"medium",truncate:!0},t);return e.createElement("div",{ref:v,className:k("kui-NavigatorScreen",i)},e.createElement("div",{className:"kui-NavigatorBar"},e.createElement(C,{"aria-label":"Navigation"},s.canGoBack&&c>0?e.createElement(m,{iconOnly:!0,"aria-label":W(s,c),onClick:s.pop},e.createElement(j,null)):null,e.createElement(b,{className:"kui-NavigatorBarTitle"},u?e.createElement(u.Title,null,p):p),u?e.createElement(u.Close,null,e.createElement(m,{iconOnly:!0,"aria-label":"Close"},e.createElement(Y,null))):null)),e.createElement("div",{className:"kui-NavigatorBody"},a))}function ue({value:t,className:a,children:i,...s}){let c=d();return e.createElement("button",{type:"button",...s,className:k("kui-reset","kui-NavigatorLink",a),onClick:()=>c.push(t)},e.createElement("span",{className:"kui-NavigatorLinkLabel"},i),e.createElement("svg",{className:"kui-NavigatorLinkGlyph",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},e.createElement("path",{d:"m9 18 6-6-6-6",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"})))}export{se as a,X as b,ce as c,Z as d,_ as e,le as f,ue as g};
3
- //# sourceMappingURL=chunk-5KX3RA3P.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/navigator.tsx"],
4
- "sourcesContent": ["'use client';\n\n/**\n * Navigator, from v2 (2026-11-03): a stack of screens, any depth. Any screen can open another on\n * top of it, and Back removes the top one. The first screen is the root and never goes.\n *\n * THE PATH IS DATA. The screens above the root are a list of values the app owns, and `screen`\n * turns a value into a screen, so an app can keep the path in its URL, restore it, or open three\n * levels deep from a link.\n *\n * IT HAS NO REGION OF ITS OWN. The host decides how a screen carries its title. In a Shell pane\n * (Sidebar, Panel, Inspector, Bottom), the pane's band holds Back and the title, and the screens\n * go in the pane's scroller. Anywhere else (a card, a Dialog, a Sheet, a Popover, `Shell.Content`)\n * each screen draws its own band: Back, the title, and the overlay's close when it has one.\n *\n * SCREENS UNDER THE TOP STAY MOUNTED, hidden, so a list keeps its scroll and a field its draft.\n *\n * Focus: a pushed screen takes focus at its top; on pop, focus returns to the control that opened\n * the screen. Escape never goes back; it belongs to whatever overlay holds this.\n *\n * Differs from v2 in look only: no motion, since v1 has none. v1 has no Page or Row yet, so a pane\n * screen's title lives in the band from the start, and `NavigatorLink` is its own row.\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { NavigatorHostContext } from './_internal/navigator-host.js';\nimport { PaneHeader, Scroll, ShellContentContext } from './_internal/pane-chrome.js';\nimport { ShellStoreContext } from './_internal/shell-store.js';\nimport { Flex } from './flex.js';\nimport { Heading } from './heading.js';\nimport { Toolbar, ToolbarButton, ToolbarTitle } from './toolbar.js';\n\ntype NavigatorApi<T> = {\n /** The values above the root, bottom first. Empty at the root. */\n path: readonly T[];\n /** Open a screen on top. */\n push: (value: T) => void;\n /** Close the top screen. Does nothing at the root. */\n pop: () => void;\n /** Close every screen above `depth`, where 0 is the root. */\n popTo: (depth: number) => void;\n /** Whether there is a screen to go back to. */\n canGoBack: boolean;\n};\n\ntype NavigatorState = NavigatorApi<unknown> & {\n /** Each level's title, so Back can name the screen it returns to and a pane's band can show it. */\n titles: React.MutableRefObject<(string | undefined)[]>;\n setTitle: (depth: number, title: string) => void;\n /** The control that opened each level, so focus can go back to it. */\n openers: React.MutableRefObject<(HTMLElement | null)[]>;\n direction: 'push' | 'pop' | null;\n inPane: boolean;\n};\n\nconst NavigatorContext = React.createContext<NavigatorState | null>(null);\nconst LevelContext = React.createContext<number>(0);\nconst OutletContext = React.createContext<React.ReactNode>(null);\n\n/**\n * True in a Shell pane, not in `Shell.Content` and not in an overlay opened from the pane: there\n * the pane's band carries the title. Overlays set the host context, which is how they opt out.\n */\nfunction useInPane() {\n const store = React.useContext(ShellStoreContext);\n const inContent = React.useContext(ShellContentContext);\n const host = React.useContext(NavigatorHostContext);\n return store !== null && !inContent && host === null;\n}\n\n// Activity keeps a hidden screen's state and cleans up its effects (React 19.2). On an older\n// React, the screen is kept in a hidden element instead, with its effects still running.\nconst Activity = (React as { Activity?: React.ComponentType<{ mode: 'visible' | 'hidden'; children: React.ReactNode }> }).Activity;\n\nfunction Level({ visible, children }: { visible: boolean; children: React.ReactNode }) {\n if (Activity) return <Activity mode={visible ? 'visible' : 'hidden'}>{children}</Activity>;\n return (\n <div hidden={!visible} style={{ display: visible ? 'contents' : 'none' }}>\n {children}\n </div>\n );\n}\n\ninterface NavigatorProps<T> {\n /** The screens above the root, as values. Use it with `onPathChange` to control the path. */\n path?: readonly T[];\n /** The path to start with when the navigator controls its own path. */\n defaultPath?: readonly T[];\n /** Called with the new path whenever a screen opens or closes. */\n onPathChange?: (path: T[]) => void;\n /** Turns a value from the path into its screen, usually a `NavigatorScreen`. */\n screen: (value: T) => React.ReactNode;\n /** The root screen, usually a `NavigatorScreen`. It is always at the bottom and never closes. */\n root: React.ReactNode;\n /**\n * The frame around the screens, when you need your own: a `Shell.PaneHeader` with actions, and\n * a `Shell.Scroll` holding `NavigatorOutlet`. Leave it out and the navigator draws the frame: in\n * a Shell pane, the pane's band with Back and the title, and its scroller; anywhere else, the\n * screens on their own.\n */\n children?: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * A stack of screens: any screen can open another on top, and Back returns to the one below.\n * `root` is the first screen, `screen` turns each value in the path into its screen, and\n * `children`, when given, is the frame the screens go into through `NavigatorOutlet`.\n */\nfunction Navigator<T>({ path: pathProp, defaultPath, onPathChange, screen, root, children, className, style }: NavigatorProps<T>) {\n const inPane = useInPane();\n const [own, setOwn] = React.useState<readonly T[]>(defaultPath ?? []);\n const path = pathProp ?? own;\n // The direction comes from the path itself, so a path the app sets moves focus the same way as\n // one changed by push and pop. Equal length with a new top value is a new screen arriving.\n const [seen, setSeen] = React.useState<{ path: readonly T[]; direction: 'push' | 'pop' | null }>({ path, direction: null });\n let direction = seen.direction;\n // Compared by content, not identity: a controlled `path` may be a new array every render.\n if (seen.path.length !== path.length || seen.path.some((value, i) => !Object.is(value, path[i]))) {\n const before = seen.path;\n direction = path.length < before.length ? 'pop' : path.length > before.length || !Object.is(path[path.length - 1], before[before.length - 1]) ? 'push' : seen.direction;\n setSeen({ path, direction });\n }\n const titles = React.useRef<(string | undefined)[]>([]);\n const openers = React.useRef<(HTMLElement | null)[]>([]);\n const [version, setVersion] = React.useState(0);\n\n const change = React.useCallback(\n (next: T[]) => {\n if (pathProp === undefined) setOwn(next);\n onPathChange?.(next);\n },\n [pathProp, onPathChange],\n );\n\n const api = React.useMemo<NavigatorState>(\n () => ({\n path,\n canGoBack: path.length > 0,\n push: (value) => {\n openers.current[path.length + 1] = typeof document === 'undefined' ? null : (document.activeElement as HTMLElement | null);\n change([...path, value as T]);\n },\n pop: () => {\n if (path.length > 0) change(path.slice(0, -1));\n },\n popTo: (depth) => {\n if (depth < path.length) change(path.slice(0, Math.max(0, depth)));\n },\n titles,\n openers,\n setTitle: (depth, title) => {\n if (titles.current[depth] === title) return;\n titles.current[depth] = title;\n setVersion((v) => v + 1);\n },\n direction,\n inPane,\n }),\n // `version` is read through `titles`; it is here so a new title reaches the band and Back.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [path, change, version, direction, inPane],\n );\n\n // On pop, focus goes back to the control that opened the screen that just closed.\n const previousDepth = React.useRef(path.length);\n React.useEffect(() => {\n const before = previousDepth.current;\n previousDepth.current = path.length;\n if (path.length < before) {\n const opener = openers.current[before];\n openers.current.length = path.length + 1;\n if (opener && opener.isConnected) opener.focus();\n }\n }, [path.length]);\n\n const levels = [root, ...path.map((value) => screen(value))];\n const top = levels.length - 1;\n const outlet = (\n <div className={classNames('kui-Navigator', className)} style={style}>\n {levels.map((level, depth) => (\n // Keyed by depth AND value, so a path that replaces the screen at a depth mounts a new\n // screen instead of handing it the old one's state.\n <Level key={depth === 0 ? 'root' : `${depth}:${String(path[depth - 1])}`} visible={depth === top}>\n <LevelContext.Provider value={depth}>\n <div className=\"kui-NavigatorLevel\">{level}</div>\n </LevelContext.Provider>\n </Level>\n ))}\n </div>\n );\n\n return (\n <NavigatorContext.Provider value={api}>\n <OutletContext.Provider value={outlet}>{children ?? (inPane ? <PaneFrame /> : outlet)}</OutletContext.Provider>\n </NavigatorContext.Provider>\n );\n}\n\n/**\n * The pane's frame: Back and the top screen's title as one cluster at the start of the pane's\n * band, and the screens in the pane's scroller. Pass children to the Navigator instead when the\n * band needs actions of its own, and put `NavigatorBack` and `NavigatorTitle` in it, together in\n * a `Flex`.\n */\nfunction PaneFrame() {\n return (\n <>\n <PaneHeader>\n <Toolbar>\n {/* One cluster: as two loose toolbar children, the band splits them to its two ends. */}\n <Flex align=\"center\">\n <NavigatorBack />\n <NavigatorTitle />\n </Flex>\n </Toolbar>\n </PaneHeader>\n <Scroll>\n <NavigatorOutlet />\n </Scroll>\n </>\n );\n}\n\n/** Where the screens go, inside a frame passed as the navigator's children. */\nfunction NavigatorOutlet() {\n return <>{React.useContext(OutletContext)}</>;\n}\n\nfunction useNavigatorState(): NavigatorState {\n const state = React.useContext(NavigatorContext);\n if (!state) throw new Error('Kookie: this part must be inside a <Navigator>.');\n return state;\n}\n\n/** The navigator around this component: its path, and `push`, `pop` and `popTo`. */\nfunction useNavigator<T = unknown>(): NavigatorApi<T> {\n return useNavigatorState() as NavigatorApi<T>;\n}\n\nfunction BackGlyph() {\n return (\n <svg className=\"kui-NavigatorBackGlyph\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden>\n <path d=\"m15 18-6-6 6-6\" stroke=\"currentColor\" strokeWidth={1.75} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n );\n}\n\nfunction CloseGlyph() {\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden>\n <path d=\"M18 6 6 18M6 6l12 12\" stroke=\"currentColor\" strokeWidth={1.75} strokeLinecap=\"round\" />\n </svg>\n );\n}\n\nfunction backLabel(state: NavigatorState, depth: number) {\n const previous = depth > 0 ? state.titles.current[depth - 1] : undefined;\n return previous ? `Back to ${previous}` : 'Back';\n}\n\ninterface NavigatorBackProps {\n /** The accessible name. The default is \"Back to\" and the previous screen's title. */\n 'aria-label'?: string;\n}\n\n/**\n * Back, for a toolbar: a chevron that closes the top screen. It is absent at the root rather than\n * disabled, because there is nowhere to go back to. It names the screen it returns to, so a screen\n * reader hears \"Back to Settings\".\n */\nfunction NavigatorBack(props: NavigatorBackProps) {\n const state = useNavigatorState();\n if (!state.canGoBack) return null;\n return (\n <ToolbarButton iconOnly aria-label={props['aria-label'] ?? backLabel(state, state.path.length)} onClick={state.pop}>\n <BackGlyph />\n </ToolbarButton>\n );\n}\n\n/** The top screen's title, for a toolbar in a frame of your own. */\nfunction NavigatorTitle() {\n const state = useNavigatorState();\n return <ToolbarTitle>{state.titles.current[state.path.length]}</ToolbarTitle>;\n}\n\ninterface NavigatorScreenProps {\n /** The screen's title. In a pane it shows in the pane's band; elsewhere in the screen's own. */\n title: string;\n /** The screen's content, under its title. */\n children?: React.ReactNode;\n className?: string;\n}\n\n/**\n * One screen in a navigator. In a Shell pane the pane's band carries Back and its title, so the\n * screen is only its content. Anywhere else it draws its own band: Back, the title, and the\n * overlay's close when it sits in one. In a Dialog, Sheet or Popover the title names the panel.\n */\nfunction NavigatorScreen({ title, children, className }: NavigatorScreenProps) {\n const state = useNavigatorState();\n const depth = React.useContext(LevelContext);\n const Host = React.useContext(NavigatorHostContext);\n const node = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n state.setTitle(depth, title);\n }, [state, depth, title]);\n\n // A pushed screen takes focus at its top, so a keyboard and a screen reader start there. In a\n // pane the title is in the band, outside the screen, so the screen itself takes it.\n React.useEffect(() => {\n if (depth === 0 || state.direction !== 'push') return;\n const target = node.current?.querySelector<HTMLElement>('.kui-NavigatorBar .kui-ToolbarTitle') ?? node.current;\n if (target) {\n target.tabIndex = -1;\n target.focus({ preventScroll: true });\n }\n // Only on arrival: a later re-render must not pull focus back to the title.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (state.inPane) {\n return (\n <div ref={node} className={classNames('kui-NavigatorScreen', className)}>\n {children}\n </div>\n );\n }\n\n const heading = (\n <Heading as=\"h2\" size=\"4\" weight=\"medium\" truncate>\n {title}\n </Heading>\n );\n return (\n <div ref={node} className={classNames('kui-NavigatorScreen', className)}>\n {/* One row: Back, the title, and the overlay's close. The band sits one step closer to the\n panel's edge than the content does. */}\n <div className=\"kui-NavigatorBar\">\n <Toolbar aria-label=\"Navigation\">\n {state.canGoBack && depth > 0 ? (\n <ToolbarButton iconOnly aria-label={backLabel(state, depth)} onClick={state.pop}>\n <BackGlyph />\n </ToolbarButton>\n ) : null}\n <ToolbarTitle className=\"kui-NavigatorBarTitle\">{Host ? <Host.Title>{heading}</Host.Title> : heading}</ToolbarTitle>\n {Host ? (\n <Host.Close>\n <ToolbarButton iconOnly aria-label=\"Close\">\n <CloseGlyph />\n </ToolbarButton>\n </Host.Close>\n ) : null}\n </Toolbar>\n </div>\n <div className=\"kui-NavigatorBody\">{children}</div>\n </div>\n );\n}\n\ninterface NavigatorLinkProps<T> extends Omit<React.ComponentPropsWithoutRef<'button'>, 'value' | 'onClick'> {\n /** The value pushed onto the path when the row is pressed. */\n value: T;\n}\n\n/** A row that opens the next screen, with the chevron that says so. */\nfunction NavigatorLink<T>({ value, className, children, ...props }: NavigatorLinkProps<T>) {\n const state = useNavigatorState();\n return (\n <button type=\"button\" {...props} className={classNames('kui-reset', 'kui-NavigatorLink', className)} onClick={() => state.push(value)}>\n <span className=\"kui-NavigatorLinkLabel\">{children}</span>\n <svg className=\"kui-NavigatorLinkGlyph\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden>\n <path d=\"m9 18 6-6-6-6\" stroke=\"currentColor\" strokeWidth={1.75} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </button>\n );\n}\n\nexport { Navigator, NavigatorOutlet, NavigatorBack, NavigatorTitle, NavigatorScreen, NavigatorLink, useNavigator };\nexport type { NavigatorProps, NavigatorBackProps, NavigatorScreenProps, NavigatorLinkProps, NavigatorApi };\n"],
5
- "mappings": ";4QAwBA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAgCvB,IAAMC,EAAyB,gBAAqC,IAAI,EAClEC,EAAqB,gBAAsB,CAAC,EAC5CC,EAAsB,gBAA+B,IAAI,EAM/D,SAASC,GAAY,CACnB,IAAMC,EAAc,aAAWC,CAAiB,EAC1CC,EAAkB,aAAWC,CAAmB,EAChDC,EAAa,aAAWC,CAAoB,EAClD,OAAOL,IAAU,MAAQ,CAACE,GAAaE,IAAS,IAClD,CAIA,IAAME,EAAoH,WAE1H,SAASC,EAAM,CAAE,QAAAC,EAAS,SAAAC,CAAS,EAAoD,CACrF,OAAIH,EAAiB,gBAACA,EAAA,CAAS,KAAME,EAAU,UAAY,UAAWC,CAAS,EAE7E,gBAAC,OAAI,OAAQ,CAACD,EAAS,MAAO,CAAE,QAASA,EAAU,WAAa,MAAO,GACpEC,CACH,CAEJ,CA6BA,SAASC,GAAa,CAAE,KAAMC,EAAU,YAAAC,EAAa,aAAAC,EAAc,OAAAC,EAAQ,KAAAC,EAAM,SAAAN,EAAU,UAAAO,EAAW,MAAAC,CAAM,EAAsB,CAChI,IAAMC,EAASn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,GAAC,aAAW,SACjC,gBAACJ,EAAA,IAAW,CACd,CACF,EACE,IACN,CACF,EACA,gBAAC,OAAI,UAAU,qBAAqBhD,CAAS,CAC/C,CAEJ,CAQA,SAAS4D,GAAiB,CAAE,MAAA5C,EAAO,UAAAT,EAAW,SAAAP,EAAU,GAAGmD,CAAM,EAA0B,CACzF,IAAMN,EAAQD,EAAkB,EAChC,OACE,gBAAC,UAAO,KAAK,SAAU,GAAGO,EAAO,UAAWjB,EAAW,YAAa,oBAAqB3B,CAAS,EAAG,QAAS,IAAMsC,EAAM,KAAK7B,CAAK,GAClI,gBAAC,QAAK,UAAU,0BAA0BhB,CAAS,EACnD,gBAAC,OAAI,UAAU,yBAAyB,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA6B,cAAW,IACpH,gBAAC,QAAK,EAAE,gBAAgB,OAAO,eAAe,YAAa,KAAM,cAAc,QAAQ,eAAe,QAAQ,CAChH,CACF,CAEJ",
6
- "names": ["React", "classNames", "NavigatorContext", "LevelContext", "OutletContext", "useInPane", "store", "ShellStoreContext", "inContent", "ShellContentContext", "host", "NavigatorHostContext", "Activity", "Level", "visible", "children", "Navigator", "pathProp", "defaultPath", "onPathChange", "screen", "root", "className", "style", "inPane", "own", "setOwn", "path", "seen", "setSeen", "direction", "value", "i", "before", "titles", "openers", "version", "setVersion", "change", "next", "api", "depth", "title", "v", "previousDepth", "opener", "levels", "top", "outlet", "classNames", "level", "PaneFrame", "PaneHeader", "Toolbar", "Flex", "NavigatorBack", "NavigatorTitle", "Scroll", "NavigatorOutlet", "useNavigatorState", "state", "useNavigator", "BackGlyph", "CloseGlyph", "backLabel", "previous", "props", "ToolbarButton", "ToolbarTitle", "NavigatorScreen", "Host", "node", "target", "heading", "Heading", "NavigatorLink"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{c as t}from"./chunk-FVRVBB6O.js";import{a as o}from"./chunk-ANQLWGFN.js";import*as e from"react";var m=e.forwardRef((r,a)=>e.createElement(o.Provider,{value:null},e.createElement(t,{...r,ref:a})));m.displayName="PortalTheme";export{m as a};
3
- //# sourceMappingURL=chunk-AQKSO3SW.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/_internal/portal-theme.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\n\nimport { Theme } from '../theme.js';\nimport { PaneBandSizeContext } from './pane-band-context.js';\n\n/**\n * The Theme at the root of a portalled surface (Popover, Dialog, Sheet, menus, Tooltip). The\n * surface renders outside any Shell pane even though context flows into it, so a Toolbar in it\n * does not take the pane's band size. A `Theme asChild` an app nests in a pane keeps the band.\n */\nconst PortalTheme = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<typeof Theme>>((props, forwardedRef) => (\n <PaneBandSizeContext.Provider value={null}>\n <Theme {...props} ref={forwardedRef} />\n </PaneBandSizeContext.Provider>\n));\nPortalTheme.displayName = 'PortalTheme';\n\nexport { PortalTheme };\n"],
5
- "mappings": ";gFAAA,UAAYA,MAAW,QAUvB,IAAMC,EAAoB,aAAyE,CAACC,EAAOC,IACzG,gBAACC,EAAoB,SAApB,CAA6B,MAAO,MACnC,gBAACC,EAAA,CAAO,GAAGH,EAAO,IAAKC,EAAc,CACvC,CACD,EACDF,EAAY,YAAc",
6
- "names": ["React", "PortalTheme", "props", "forwardedRef", "PaneBandSizeContext", "Theme"]
7
- }
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as Ge,b as Ye}from"./chunk-4G3FJUER.js";import{a as Xe}from"./chunk-ZG2XQUOH.js";import{a as je}from"./chunk-VGJALIJ5.js";import{a as $e}from"./chunk-QRV32INS.js";import{a as Ke}from"./chunk-YMUERC2J.js";import{a as Fe,b as me}from"./chunk-3QWGSRYC.js";import{a as Pe,b as he,c as ve}from"./chunk-LTUW36HM.js";import{a as De,b as Be,c as Ve}from"./chunk-QKCNGEX4.js";import{a as Oe}from"./chunk-WEBNIUEX.js";import{a as J,b as We,c as _e,d as Ue,g as qe}from"./chunk-XUCR7L4G.js";import{a as ye}from"./chunk-G66WDIIV.js";import{c as ue,d as pe,e as we,f as fe,i as Ae,j as Ie,k as Ne}from"./chunk-YMRN5ESN.js";import{c as xe,d as ke}from"./chunk-QEDKL23P.js";import{e as ie,f as Te,h as Me,i as ne,j as ze,k as ce,l as de,n as He,o as oe}from"./chunk-GHWEXMF6.js";import{b as Ee}from"./chunk-5ON3XLRD.js";import{a as Le}from"./chunk-ANQLWGFN.js";import{a as st}from"./chunk-VQPANPMI.js";var Pt={};st(Pt,{Bottom:()=>$e,Content:()=>at,Header:()=>nt,Inspector:()=>Ke,Left:()=>ot,PaneFooter:()=>Ie,PaneHeader:()=>Ae,Panel:()=>Ce,Rail:()=>lt,Root:()=>tt,Scroll:()=>Ne,Sidebar:()=>je,Trigger:()=>rt,useResponsivePresentation:()=>Xe,useShell:()=>Ye,useSidebarMode:()=>Ge});import*as e from"react";import $ from"classnames";import{Slot as it}from"radix-ui";import{useComposedRefs as be,useLayoutEffect as ct}from"radix-ui/internal";var Re=0;function Je(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 Se="data-kui-shell-inert",dt=30;function Q(a,r){return r===null||r===a||r===a.body||r===a.documentElement}function Qe(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(R=>R.contains(u))))return u;return null}var ut={values:["1","2","3"]},et=e.createContext(null),Ze=64;function ge(a){return a.querySelector(":scope > .kui-ShellContent > .kui-ShellScroll > .kui-ScrollAreaViewport")??a.querySelector(":scope > .kui-ShellContent")}var tt=e.forwardRef(({className:a,children:r,height:s="full",contained:u,size:R,style:g,onKeyDown:F,onFocus:x,...k},T)=>{let P=Ee(R,ut),[i]=e.useState(Te),C=e.useCallback(t=>Me(i,t),[i]);e.useSyncExternalStore(C,()=>i.version,()=>0);let S=e.useRef(null),D=be(T,S),[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=S.current,n=t?.ownerDocument.defaultView;if(!t||!n||typeof n.matchMedia!="function")return;let o=xe(),c=o?n.scrollY:ge(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===ge(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=ke(l=>{o=l;let d=c;h&&cancelAnimationFrame(h),h=requestAnimationFrame(()=>{if(h=0,l)n.scrollTo(0,d);else{let p=ge(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=S.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(Se)&&(o.removeAttribute(Se),o.inert=!1):o.inert||(o.setAttribute(Se,""),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<dt&&(z.current=requestAnimationFrame(c))}};z.current=requestAnimationFrame(c)},[W]);e.useEffect(()=>()=>{W(),O.current&&(O.current=!1,Je(-1))},[W]),e.useEffect(()=>{let t=S.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,Je(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=Qe(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=Qe(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=S.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=S.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&&S.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(ze.Provider,{value:i},e.createElement(ue.Provider,{value:P},e.createElement(pe.Provider,{value:!1},e.createElement(we.Provider,{value:V},e.createElement(et.Provider,{value:le},e.createElement(He.Provider,{value:m},e.createElement(Le.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})))))))))});tt.displayName="Shell.Root";var nt=e.forwardRef(({className:a,height:r=Ze,style:s,...u},R)=>{let g=e.useContext(et);return ct(()=>{if(g)return g(r===Ze?void 0:r),()=>g(void 0)},[g,r]),e.createElement("header",{...u,ref:R,className:$("kui-ShellHeader",a),style:{...s,"--shell-header-height":`${r}px`}})});nt.displayName="Shell.Header";var ot=e.forwardRef(({children:a},r)=>(e.useEffect(()=>{},[]),e.createElement(e.Fragment,null,a)));ot.displayName="Shell.Left";var pt={controlled:"open",default:"defaultOpen"},lt=e.forwardRef((a,r)=>{let{className:s,presentation:u,expandedSize:R=64,collapsible:g,onExpand:F,onCollapse:x,children:k,style:T,open:P,defaultOpen:i,onOpenChange:C,inset:S,id:D,...E}=a,{table:w,attributes:A}=ve(u,"fixed"),f=Pe({name:"rail",label:"Rail",propNames:pt,id:D,controlled:J(P),defaultValue:J(i),presentationTable:w,builtIn:We,onChange:(I,M)=>C?.(I!=="closed",{reason:M}),onExpand:F,onCollapse:x,size:R});oe("rail",S);let m=be(r,f.setElement);return e.createElement("div",{...E,role:E.role??"navigation",id:f.id,ref:m,className:$("kui-ShellPane","kui-ShellRail",s),...he(f,A),"data-inset":S||void 0,tabIndex:f.overlaying?-1:E.tabIndex,style:{...T,"--rail-size":`${R}px`}},e.createElement(ft,null,k))});lt.displayName="Shell.Rail";function ft({children:a}){let r=e.useContext(ue);return e.createElement("div",{className:$("kui-ShellRailContent",`kui-r-size-${r}`)},e.createElement(fe,{presentation:"thin"},a))}var mt={controlled:"open",default:"defaultOpen"},Ce=e.forwardRef((a,r)=>{let{className:s,presentation:u,defaultOpen:R,open:g,onOpenChange:F,size:x,defaultSize:k,expandedSize:T=288,minSize:P=100,maxSize:i=800,resizable:C=!1,collapsible:S=!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=ce("Shell.Panel"),W=de(z,"rail"),_=ve(u,"fixed"),Y=u===void 0,ae=Y?W?.presentationTable??ie:_.table,B=Y?{"data-presentation-follows":""}:_.attributes,b=Pe({name:"panel",label:"Panel",propNames:mt,id:ee,controlled:J(g),defaultValue:J(R),presentationTable:ae,builtIn:_e,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=be(r,b.setElement,X),t=Be({name:"panel",elementId:b.id,elementRef:X,cssVarName:"--panel-size",orientation:"vertical",edge:"end",growth:Ue,expandedSize:T,minSize:P,maxSize:i,resizable:C,collapsible:S,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??ie:_.table)[ye()]==="overlay",requestCollapse:()=>b.setValue("closed","toggle"),requestToggle:()=>b.toggle("toggle")}),n=De(x,k,P,i),{handles:o,content:c}=Ve(V,me),h=C&&b.shown!==!1&&!b.overlaying?e.createElement(Oe.Provider,{value:t},o.length>0?o:e.createElement(Fe,null)):null;return e.createElement("div",{...qe(O),role:O.role??"navigation",id:b.id,ref:re,className:$("kui-ShellPane","kui-ShellPanel",s),...he(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(fe,null,c)),h)});Ce.displayName="Shell.Panel";Ce.Handle=me;var at=e.forwardRef(({className:a,inset:r,children:s,...u},R)=>(oe("content",r),e.createElement("main",{...u,ref:R,className:$("kui-ShellContent",a),"data-inset":r||void 0},e.createElement(pe.Provider,{value:!0},s))));at.displayName="Shell.Content";var rt=e.forwardRef(({target:a,action:r="toggle",peekOnHover:s,asChild:u=!1,onClick:R,onMouseEnter:g,onMouseLeave:F,children:x,...k},T)=>{let P=ce("Shell.Trigger");e.useEffect(()=>{a==="left"&&void 0,s&&void 0},[a,s]);let i=a==="left"?"rail":a,C=de(P,i),S=C?.value===void 0?void 0:C.value!=="closed",D=f=>{if(R?.(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?it.Root:"button";return e.createElement(A,{...!u&&{type:"button"},"aria-controls":C?.id,"aria-expanded":S,...k,ref:T,onClick:D,onMouseEnter:E,onMouseLeave:w,"data-shell-trigger":a,"data-shell-action":r},x)});rt.displayName="Shell.Trigger";export{tt as a,nt as b,ot as c,lt as d,Ce as e,at as f,rt as g,Pt as h};
3
- //# sourceMappingURL=chunk-D74WY6UO.js.map
@@ -1,7 +0,0 @@
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 { 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>{content}</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 <ShellContentContext.Provider value={true}>{children}</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": ";g4BAAA,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,oBA4DjD,IAAIC,GAAkB,EACtB,SAASC,GAAeC,EAAe,CACrCF,GAAkB,KAAK,IAAI,EAAGA,GAAkBE,CAAK,EACrD,IAAMC,EAAM,SAAS,gBACjBH,GAAkB,EAAGG,EAAI,aAAa,sBAAuB,EAAE,EAC9DA,EAAI,gBAAgB,qBAAqB,CAChD,CAGA,IAAMC,GAAa,uBAGbC,GAAgB,GAGtB,SAASC,EAAUH,EAAeI,EAA2C,CAC3E,OAAOA,IAAO,MAAQA,IAAOJ,GAAOI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AI,EACjCG,IACD3J,EAAM,OAASwJ,GAAMI,GAAa5J,EAAO,IAAI,EAC7CkJ,IAAW,SAAUS,EAAQ,OAAO,QAAQ,EACvCT,IAAW,SAAUS,EAAQ,SAAS,OAAQ,QAAQ,EAC1DA,EAAQ,SAAS,SAAU,QAAQ,EAC1C,EAEME,EAAoB7H,GAA+C,CAEvE,GADAsH,IAAetH,CAAK,EAChB,CAACmH,EAAa,OAClB,IAAMQ,EAAU3J,EAAM,QAAQ,IAAIwJ,CAAI,EAClCG,GAAWA,EAAQ,QAAU,UAAYA,EAAQ,eAAiB,WAAWC,GAAa5J,EAAOwJ,CAAI,CAC3G,EAEMM,EAAoB9H,GAA+C,CACvEuH,IAAevH,CAAK,EAChBmH,GAAenJ,EAAM,OAASwJ,GAAMI,GAAa5J,EAAO,IAAI,CAClE,EAEM+J,EAAOX,EAAUY,GAAK,KAAO,SACnC,OACE,gBAACD,EAAA,CAIE,GAAI,CAACX,GAAW,CAAE,KAAM,QAAkB,EAC3C,gBAAepI,GAAO,GACtB,gBAAeyI,EACd,GAAG7J,EACJ,IAAKC,EACL,QAAS6J,EACT,aAAcG,EACd,aAAcC,EACd,qBAAoB9G,EACpB,oBAAmBkG,GAElB7J,CACH,CAEJ,CAAC,EACD4J,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", "Content", "Trigger", "action", "peekOnHover", "asChild", "onClick", "onMouseEnter", "onMouseLeave", "name", "shown", "handleClick", "current", "setShellPeek", "handleMouseEnter", "handleMouseLeave", "Comp", "Slot"]
7
- }
@@ -1,2 +0,0 @@
1
- "use client";
2
- //# sourceMappingURL=chunk-E4KT72IB.js.map
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as v,e as p}from"./chunk-3QWGSRYC.js";import{a as R,b as y,c as x}from"./chunk-LTUW36HM.js";import{a as O,b as M,c as T}from"./chunk-QKCNGEX4.js";import{a as C}from"./chunk-WEBNIUEX.js";import{a as d,c as w,f as E,g as H}from"./chunk-XUCR7L4G.js";import{a as B}from"./chunk-G66WDIIV.js";import{o as S}from"./chunk-GHWEXMF6.js";import*as e from"react";import le from"classnames";import{useComposedRefs as re}from"radix-ui/internal";var pe={controlled:"open",default:"defaultOpen"},N=e.forwardRef((I,U)=>{let{className:k,presentation:V="fixed",defaultOpen:A,open:L,onOpenChange:$,expandedSize:t=200,minSize:n=100,maxSize:a=400,resizable:m=!1,collapsible:q=!0,onExpand:D,onCollapse:W,onResize:_,onResizeStart:j,onResizeEnd:F,snapPoints:s,snapTolerance:G,collapseThreshold:i,paneId:l,persistence:r,children:K,style:J,size:c,defaultSize:u,onSizeChange:Q,sizeUpdate:X,sizeUpdateMs:Y=50,inset:f,id:Z,...z}=I,{table:P,attributes:ee}=x(V,"fixed"),o=R({name:"bottom",label:"Bottom",propNames:pe,id:Z,controlled:d(L),defaultValue:d(A),presentationTable:P,builtIn:w,onChange:(se,ie)=>$?.(se!=="closed",{reason:ie}),onExpand:D,onCollapse:W,size:t});S("bottom",f),e.useEffect(()=>{(s!==void 0||i!==void 0||l!==void 0||r!==void 0)&&void 0},[s,i,l,r]);let b=e.useRef(null),oe=re(U,o.setElement,b),te=M({name:"bottom",elementId:o.id,elementRef:b,cssVarName:"--bottom-size",orientation:"horizontal",edge:"start",growth:E,expandedSize:t,minSize:n,maxSize:a,resizable:m,collapsible:q,size:c,defaultSize:u,onSizeChange:Q,sizeUpdate:X,sizeUpdateMs:Y,onResize:_,onResizeStart:j,onResizeEnd:F,snapPoints:s,snapTolerance:G,collapseThreshold:i,paneId:l,persistence:r,overlaying:o.overlaying,overlayingNow:()=>P[B()]==="overlay",requestCollapse:()=>o.setValue("closed","toggle"),requestToggle:()=>o.toggle("toggle")}),h=O(c,u,n,a),{handles:g,content:ne}=T(K,p),ae=m&&o.shown!==!1&&!o.overlaying?e.createElement(C.Provider,{value:te},g.length>0?g:e.createElement(v,null)):null;return e.createElement("div",{...H(z),id:o.id,ref:oe,className:le("kui-ShellPane","kui-ShellBottom",k),...y(o,ee),"data-inset":f||void 0,tabIndex:o.overlaying?-1:z.tabIndex,style:{...J,"--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"},ne),ae)});N.displayName="Shell.Bottom";N.Handle=p;export{N as a};
3
- //# sourceMappingURL=chunk-QRV32INS.js.map