@womp/kookie-ui 0.36.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/components.css +0 -20
  2. package/dist/cjs/components/_internal/base-menu.utils.js +1 -1
  3. package/dist/cjs/components/_internal/base-menu.utils.js.map +2 -2
  4. package/dist/cjs/components/_internal/menu-context.js +1 -1
  5. package/dist/cjs/components/_internal/menu-context.js.map +2 -2
  6. package/dist/cjs/components/_internal/pane-chrome.js +1 -1
  7. package/dist/cjs/components/_internal/pane-chrome.js.map +2 -2
  8. package/dist/cjs/components/_internal/shell-bottom.d.ts +3 -3
  9. package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
  10. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  11. package/dist/cjs/components/_internal/shell-bottom.js.map +3 -3
  12. package/dist/cjs/components/_internal/shell-handles.d.ts.map +1 -1
  13. package/dist/cjs/components/_internal/shell-handles.js +1 -1
  14. package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
  15. package/dist/cjs/components/_internal/shell-inspector.d.ts +3 -3
  16. package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
  17. package/dist/cjs/components/_internal/shell-inspector.js +1 -1
  18. package/dist/cjs/components/_internal/shell-inspector.js.map +3 -3
  19. package/dist/cjs/components/_internal/shell-pane.d.ts +2 -7
  20. package/dist/cjs/components/_internal/shell-pane.d.ts.map +1 -1
  21. package/dist/cjs/components/_internal/shell-pane.js +1 -1
  22. package/dist/cjs/components/_internal/shell-pane.js.map +3 -3
  23. package/dist/cjs/components/_internal/shell-resizable.d.ts +3 -9
  24. package/dist/cjs/components/_internal/shell-resizable.d.ts.map +1 -1
  25. package/dist/cjs/components/_internal/shell-resizable.js +1 -1
  26. package/dist/cjs/components/_internal/shell-resizable.js.map +3 -3
  27. package/dist/cjs/components/_internal/shell-resize.d.ts +0 -4
  28. package/dist/cjs/components/_internal/shell-resize.d.ts.map +1 -1
  29. package/dist/cjs/components/_internal/shell-resize.js +1 -1
  30. package/dist/cjs/components/_internal/shell-resize.js.map +2 -2
  31. package/dist/cjs/components/_internal/shell-rest.d.ts +1 -6
  32. package/dist/cjs/components/_internal/shell-rest.d.ts.map +1 -1
  33. package/dist/cjs/components/_internal/shell-rest.js +1 -1
  34. package/dist/cjs/components/_internal/shell-rest.js.map +3 -3
  35. package/dist/cjs/components/_internal/shell-sidebar.d.ts +3 -3
  36. package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
  37. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  38. package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
  39. package/dist/cjs/components/_internal/shell-store.d.ts +0 -10
  40. package/dist/cjs/components/_internal/shell-store.d.ts.map +1 -1
  41. package/dist/cjs/components/_internal/shell-store.js +1 -1
  42. package/dist/cjs/components/_internal/shell-store.js.map +3 -3
  43. package/dist/cjs/components/checkbox-group.js +1 -1
  44. package/dist/cjs/components/checkbox-group.js.map +3 -3
  45. package/dist/cjs/components/checkbox-group.primitive.d.ts +0 -10
  46. package/dist/cjs/components/checkbox-group.primitive.d.ts.map +1 -1
  47. package/dist/cjs/components/checkbox-group.primitive.js +1 -1
  48. package/dist/cjs/components/checkbox-group.primitive.js.map +3 -3
  49. package/dist/cjs/components/context-menu.d.ts +1 -5
  50. package/dist/cjs/components/context-menu.d.ts.map +1 -1
  51. package/dist/cjs/components/context-menu.js +1 -1
  52. package/dist/cjs/components/context-menu.js.map +3 -3
  53. package/dist/cjs/components/dropdown-menu.js +1 -1
  54. package/dist/cjs/components/dropdown-menu.js.map +2 -2
  55. package/dist/cjs/components/index.js +2 -2
  56. package/dist/cjs/components/index.js.map +4 -4
  57. package/dist/cjs/components/navigator.js.map +2 -2
  58. package/dist/cjs/components/schemas/index.d.ts +1 -1
  59. package/dist/cjs/components/schemas/index.d.ts.map +1 -1
  60. package/dist/cjs/components/schemas/index.js +1 -1
  61. package/dist/cjs/components/schemas/index.js.map +3 -3
  62. package/dist/cjs/components/schemas/shell.schema.d.ts +6 -112
  63. package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
  64. package/dist/cjs/components/schemas/shell.schema.js +1 -1
  65. package/dist/cjs/components/schemas/shell.schema.js.map +3 -3
  66. package/dist/cjs/components/separator.js +1 -1
  67. package/dist/cjs/components/separator.js.map +2 -2
  68. package/dist/cjs/components/shell.context.d.ts +1 -45
  69. package/dist/cjs/components/shell.context.d.ts.map +1 -1
  70. package/dist/cjs/components/shell.context.js +1 -1
  71. package/dist/cjs/components/shell.context.js.map +4 -4
  72. package/dist/cjs/components/shell.d.ts +7 -37
  73. package/dist/cjs/components/shell.d.ts.map +1 -1
  74. package/dist/cjs/components/shell.js +1 -1
  75. package/dist/cjs/components/shell.js.map +4 -4
  76. package/dist/cjs/components/shell.types.d.ts +6 -27
  77. package/dist/cjs/components/shell.types.d.ts.map +1 -1
  78. package/dist/cjs/components/shell.types.js +1 -1
  79. package/dist/cjs/components/shell.types.js.map +2 -2
  80. package/dist/cjs/components/sidebar.js +1 -1
  81. package/dist/cjs/components/sidebar.js.map +2 -2
  82. package/dist/cjs/components/toolbar.js +1 -1
  83. package/dist/cjs/components/toolbar.js.map +2 -2
  84. package/dist/cjs/hooks/use-breakpoint.js +1 -1
  85. package/dist/cjs/hooks/use-breakpoint.js.map +2 -2
  86. package/dist/cjs/index.js +4 -4
  87. package/dist/cjs/index.js.map +4 -4
  88. package/dist/esm/{chunk-5RLGDXOM.js → chunk-2K46JPUL.js} +2 -2
  89. package/dist/esm/chunk-3K7E4XL3.js +3 -0
  90. package/dist/esm/chunk-3K7E4XL3.js.map +7 -0
  91. package/dist/esm/chunk-3LR7KMBE.js +3 -0
  92. package/dist/esm/chunk-3LR7KMBE.js.map +7 -0
  93. package/dist/esm/chunk-5U2LEJLU.js +3 -0
  94. package/dist/esm/chunk-5U2LEJLU.js.map +7 -0
  95. package/dist/esm/{chunk-IN6D33TU.js → chunk-5XO3PLDH.js} +2 -2
  96. package/dist/esm/{chunk-COLJWVN7.js → chunk-AQR42GKA.js} +2 -2
  97. package/dist/esm/{chunk-FTNZWAPB.js → chunk-ARPUPT4M.js} +2 -2
  98. package/dist/esm/{chunk-ISCZ57VL.js → chunk-DJGZ4K3V.js} +2 -2
  99. package/dist/esm/{chunk-PMXIQ5B4.js → chunk-FKCKELUB.js} +2 -2
  100. package/dist/esm/chunk-H7GH3DTF.js +3 -0
  101. package/dist/esm/chunk-H7GH3DTF.js.map +7 -0
  102. package/dist/esm/{chunk-E6MOZSYV.js → chunk-HNOT2HS4.js} +2 -2
  103. package/dist/esm/chunk-LBAC2X4U.js +3 -0
  104. package/dist/esm/{chunk-5BXCPANF.js.map → chunk-LBAC2X4U.js.map} +3 -3
  105. package/dist/esm/{chunk-MAA6LEE2.js → chunk-MDQ7ZHOS.js} +1 -1
  106. package/dist/esm/chunk-MDQ7ZHOS.js.map +7 -0
  107. package/dist/esm/chunk-MQA3BKF4.js +3 -0
  108. package/dist/esm/chunk-MQA3BKF4.js.map +7 -0
  109. package/dist/esm/chunk-MXNPCJPV.js +3 -0
  110. package/dist/esm/chunk-MXNPCJPV.js.map +7 -0
  111. package/dist/esm/{chunk-EB4AG3OL.js → chunk-REELD6CT.js} +2 -2
  112. package/dist/esm/chunk-RYXIRZQW.js +3 -0
  113. package/dist/esm/chunk-RYXIRZQW.js.map +7 -0
  114. package/dist/esm/chunk-S66WR5R7.js +3 -0
  115. package/dist/esm/{chunk-MXEOE4LA.js.map → chunk-S66WR5R7.js.map} +2 -2
  116. package/dist/esm/chunk-SECVO3CW.js +3 -0
  117. package/dist/esm/chunk-SECVO3CW.js.map +7 -0
  118. package/dist/esm/chunk-SHDZYFUN.js +3 -0
  119. package/dist/esm/chunk-SHDZYFUN.js.map +7 -0
  120. package/dist/esm/{chunk-3M5ZM67R.js → chunk-TCFBNE6A.js} +2 -2
  121. package/dist/esm/chunk-U7P64MXD.js +3 -0
  122. package/dist/esm/chunk-U7P64MXD.js.map +7 -0
  123. package/dist/esm/chunk-UFYQC5XY.js +3 -0
  124. package/dist/esm/chunk-UFYQC5XY.js.map +7 -0
  125. package/dist/esm/{chunk-G66WDIIV.js → chunk-WJKCXGVN.js} +2 -2
  126. package/dist/esm/chunk-XBDAE77C.js +3 -0
  127. package/dist/esm/chunk-XBDAE77C.js.map +7 -0
  128. package/dist/esm/{chunk-SIYOLE6P.js → chunk-YM47BXKK.js} +2 -2
  129. package/dist/esm/components/_internal/base-menu.utils.js +1 -1
  130. package/dist/esm/components/_internal/menu-context.js +1 -1
  131. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  132. package/dist/esm/components/_internal/shell-bottom.d.ts +3 -3
  133. package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
  134. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  135. package/dist/esm/components/_internal/shell-handles.d.ts.map +1 -1
  136. package/dist/esm/components/_internal/shell-handles.js +1 -1
  137. package/dist/esm/components/_internal/shell-inspector.d.ts +3 -3
  138. package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
  139. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  140. package/dist/esm/components/_internal/shell-pane.d.ts +2 -7
  141. package/dist/esm/components/_internal/shell-pane.d.ts.map +1 -1
  142. package/dist/esm/components/_internal/shell-pane.js +1 -1
  143. package/dist/esm/components/_internal/shell-resizable.d.ts +3 -9
  144. package/dist/esm/components/_internal/shell-resizable.d.ts.map +1 -1
  145. package/dist/esm/components/_internal/shell-resizable.js +1 -1
  146. package/dist/esm/components/_internal/shell-resize.d.ts +0 -4
  147. package/dist/esm/components/_internal/shell-resize.d.ts.map +1 -1
  148. package/dist/esm/components/_internal/shell-resize.js +1 -1
  149. package/dist/esm/components/_internal/shell-rest.d.ts +1 -6
  150. package/dist/esm/components/_internal/shell-rest.d.ts.map +1 -1
  151. package/dist/esm/components/_internal/shell-rest.js +1 -1
  152. package/dist/esm/components/_internal/shell-sidebar.d.ts +3 -3
  153. package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
  154. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  155. package/dist/esm/components/_internal/shell-store.d.ts +0 -10
  156. package/dist/esm/components/_internal/shell-store.d.ts.map +1 -1
  157. package/dist/esm/components/_internal/shell-store.js +1 -1
  158. package/dist/esm/components/checkbox-group.js +1 -1
  159. package/dist/esm/components/checkbox-group.primitive.d.ts +0 -10
  160. package/dist/esm/components/checkbox-group.primitive.d.ts.map +1 -1
  161. package/dist/esm/components/checkbox-group.primitive.js +1 -1
  162. package/dist/esm/components/context-menu.d.ts +1 -5
  163. package/dist/esm/components/context-menu.d.ts.map +1 -1
  164. package/dist/esm/components/context-menu.js +1 -1
  165. package/dist/esm/components/dropdown-menu.js +1 -1
  166. package/dist/esm/components/index.js +1 -1
  167. package/dist/esm/components/navigator.js +1 -1
  168. package/dist/esm/components/schemas/index.d.ts +1 -1
  169. package/dist/esm/components/schemas/index.d.ts.map +1 -1
  170. package/dist/esm/components/schemas/index.js +1 -1
  171. package/dist/esm/components/schemas/index.js.map +2 -2
  172. package/dist/esm/components/schemas/shell.schema.d.ts +6 -112
  173. package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
  174. package/dist/esm/components/schemas/shell.schema.js +1 -1
  175. package/dist/esm/components/separator.js +1 -1
  176. package/dist/esm/components/shell.context.d.ts +1 -45
  177. package/dist/esm/components/shell.context.d.ts.map +1 -1
  178. package/dist/esm/components/shell.context.js +1 -1
  179. package/dist/esm/components/shell.d.ts +7 -37
  180. package/dist/esm/components/shell.d.ts.map +1 -1
  181. package/dist/esm/components/shell.js +1 -1
  182. package/dist/esm/components/shell.types.d.ts +6 -27
  183. package/dist/esm/components/shell.types.d.ts.map +1 -1
  184. package/dist/esm/components/shell.types.js +1 -1
  185. package/dist/esm/components/sidebar.js +1 -1
  186. package/dist/esm/components/toolbar.js +1 -1
  187. package/dist/esm/components/virtual-menu.js +1 -1
  188. package/dist/esm/hooks/use-breakpoint.js +1 -1
  189. package/dist/esm/index.js +1 -1
  190. package/package.json +1 -1
  191. package/schemas/index.json +13 -335
  192. package/schemas/shell-bottom.json +2 -63
  193. package/schemas/shell-inspector.json +2 -63
  194. package/schemas/shell-panel.json +2 -63
  195. package/schemas/shell-rail.json +2 -38
  196. package/schemas/shell-sidebar.json +5 -102
  197. package/schemas/shell-trigger.json +0 -6
  198. package/src/components/_internal/shell-bottom.tsx +6 -26
  199. package/src/components/_internal/shell-handles.tsx +2 -32
  200. package/src/components/_internal/shell-inspector.tsx +6 -26
  201. package/src/components/_internal/shell-pane.tsx +7 -56
  202. package/src/components/_internal/shell-resizable.tsx +6 -81
  203. package/src/components/_internal/shell-resize.tsx +0 -4
  204. package/src/components/_internal/shell-rest.ts +2 -11
  205. package/src/components/_internal/shell-sidebar.tsx +8 -30
  206. package/src/components/_internal/shell-store.tsx +1 -34
  207. package/src/components/checkbox-group.primitive.tsx +0 -12
  208. package/src/components/context-menu.tsx +1 -6
  209. package/src/components/schemas/index.ts +0 -1
  210. package/src/components/schemas/shell.schema.ts +3 -20
  211. package/src/components/shell.context.tsx +5 -112
  212. package/src/components/shell.css +1 -29
  213. package/src/components/shell.tsx +12 -97
  214. package/src/components/shell.types.ts +6 -28
  215. package/styles.css +0 -20
  216. package/dist/cjs/components/shell.hooks.d.ts +0 -10
  217. package/dist/cjs/components/shell.hooks.d.ts.map +0 -1
  218. package/dist/cjs/components/shell.hooks.js +0 -3
  219. package/dist/cjs/components/shell.hooks.js.map +0 -7
  220. package/dist/esm/chunk-2VSRZ4IT.js +0 -3
  221. package/dist/esm/chunk-2VSRZ4IT.js.map +0 -7
  222. package/dist/esm/chunk-2WFN4D52.js +0 -3
  223. package/dist/esm/chunk-2WFN4D52.js.map +0 -7
  224. package/dist/esm/chunk-4OJRLS5N.js +0 -3
  225. package/dist/esm/chunk-4OJRLS5N.js.map +0 -7
  226. package/dist/esm/chunk-4TTRPCGG.js +0 -3
  227. package/dist/esm/chunk-4TTRPCGG.js.map +0 -7
  228. package/dist/esm/chunk-5BXCPANF.js +0 -3
  229. package/dist/esm/chunk-B447PNRD.js +0 -3
  230. package/dist/esm/chunk-B447PNRD.js.map +0 -7
  231. package/dist/esm/chunk-BJVXB3PN.js +0 -3
  232. package/dist/esm/chunk-BJVXB3PN.js.map +0 -7
  233. package/dist/esm/chunk-DNY4WWZF.js +0 -3
  234. package/dist/esm/chunk-DNY4WWZF.js.map +0 -7
  235. package/dist/esm/chunk-HQT32HQ6.js +0 -3
  236. package/dist/esm/chunk-HQT32HQ6.js.map +0 -7
  237. package/dist/esm/chunk-KGCGT4MJ.js +0 -3
  238. package/dist/esm/chunk-KGCGT4MJ.js.map +0 -7
  239. package/dist/esm/chunk-M26LLCQC.js +0 -3
  240. package/dist/esm/chunk-M26LLCQC.js.map +0 -7
  241. package/dist/esm/chunk-MAA6LEE2.js.map +0 -7
  242. package/dist/esm/chunk-MXEOE4LA.js +0 -3
  243. package/dist/esm/chunk-TS4QCDSI.js +0 -3
  244. package/dist/esm/chunk-TS4QCDSI.js.map +0 -7
  245. package/dist/esm/chunk-XOAOSRTH.js +0 -3
  246. package/dist/esm/chunk-XOAOSRTH.js.map +0 -7
  247. package/dist/esm/chunk-XUCR7L4G.js +0 -3
  248. package/dist/esm/chunk-XUCR7L4G.js.map +0 -7
  249. package/dist/esm/components/shell.hooks.d.ts +0 -10
  250. package/dist/esm/components/shell.hooks.d.ts.map +0 -1
  251. package/dist/esm/components/shell.hooks.js +0 -3
  252. package/dist/esm/components/shell.hooks.js.map +0 -7
  253. package/src/components/shell.hooks.ts +0 -20
  254. /package/dist/esm/{chunk-5RLGDXOM.js.map → chunk-2K46JPUL.js.map} +0 -0
  255. /package/dist/esm/{chunk-IN6D33TU.js.map → chunk-5XO3PLDH.js.map} +0 -0
  256. /package/dist/esm/{chunk-COLJWVN7.js.map → chunk-AQR42GKA.js.map} +0 -0
  257. /package/dist/esm/{chunk-FTNZWAPB.js.map → chunk-ARPUPT4M.js.map} +0 -0
  258. /package/dist/esm/{chunk-ISCZ57VL.js.map → chunk-DJGZ4K3V.js.map} +0 -0
  259. /package/dist/esm/{chunk-PMXIQ5B4.js.map → chunk-FKCKELUB.js.map} +0 -0
  260. /package/dist/esm/{chunk-E6MOZSYV.js.map → chunk-HNOT2HS4.js.map} +0 -0
  261. /package/dist/esm/{chunk-EB4AG3OL.js.map → chunk-REELD6CT.js.map} +0 -0
  262. /package/dist/esm/{chunk-3M5ZM67R.js.map → chunk-TCFBNE6A.js.map} +0 -0
  263. /package/dist/esm/{chunk-G66WDIIV.js.map → chunk-WJKCXGVN.js.map} +0 -0
  264. /package/dist/esm/{chunk-SIYOLE6P.js.map → chunk-YM47BXKK.js.map} +0 -0
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{d as R,i as d,j as S}from"./chunk-E6MOZSYV.js";import{a as G}from"./chunk-65URNXF2.js";import{a as j}from"./chunk-OBSZOD5M.js";import{a as E}from"./chunk-KVVRFWGQ.js";import{a as P}from"./chunk-4KBKS3ZE.js";import{a as y,d as x,e as H}from"./chunk-VWRPVM5K.js";import{d as O,i as M,k as A}from"./chunk-PMXIQ5B4.js";import*as e from"react";import f from"classnames";var D=e.createContext(null),F=e.createContext(0),$=e.createContext(null);function U(){let t=x(),o=e.useContext(P);return t!==null&&o===null}var W=e.Activity;function X({visible:t,children:o}){return W?e.createElement(W,{mode:t?"visible":"hidden"},o):e.createElement("div",{hidden:!t,style:{display:t?"contents":"none"}},o)}function ve({path:t,defaultPath:o,onPathChange:s,screen:i,root:c,children:u,className:b,style:l}){let v=U(),[N,p]=e.useState(o??[]),a=t??N,[g,q]=e.useState({path:a,direction:null}),m=g.direction;if(g.path.length!==a.length||g.path.some((n,r)=>!Object.is(n,a[r]))){let n=g.path;m=a.length<n.length?"pop":a.length>n.length||!Object.is(a[a.length-1],n[n.length-1])?"push":g.direction,q({path:a,direction:m})}e.useEffect(()=>{},[a]);let C=e.useRef([]),k=e.useRef([]),[z,K]=e.useState(0),T=e.useCallback(n=>{t===void 0&&p(n),s?.(n)},[t,s]),_=e.useMemo(()=>({path:a,canGoBack:a.length>0,push:n=>{k.current[a.length+1]=typeof document>"u"?null:document.activeElement,T([...a,n])},pop:()=>{a.length>0&&T(a.slice(0,-1))},popTo:n=>{n<a.length&&T(a.slice(0,Math.max(0,n)))},titles:C,openers:k,setTitle:(n,r)=>{C.current[n]!==r&&(C.current[n]=r,K(Q=>Q+1))},direction:m,inPane:v}),[a,T,z,m,v]),L=e.useRef(a.length);e.useEffect(()=>{let n=L.current;if(L.current=a.length,a.length<n){let r=k.current[n];k.current.length=a.length+1,r&&r.isConnected&&r.focus()}},[a.length]);let B=[c,...a.map(n=>i(n))],J=B.length-1,w=e.createElement("div",{className:f("kui-Navigator",b),style:l},B.map((n,r)=>e.createElement(X,{key:r===0?"root":`${r}:${String(a[r-1])}`,visible:r===J},e.createElement(F.Provider,{value:r},e.createElement("div",{className:"kui-NavigatorLevel"},n)))));return e.createElement(D.Provider,{value:_},e.createElement($.Provider,{value:w},u??(v?e.createElement(Y,null):w)))}function Y(){return e.createElement(e.Fragment,null,e.createElement(M,null,e.createElement(S,null,e.createElement(E,{align:"center"},e.createElement(te,null),e.createElement(d,null)))),e.createElement(A,null,e.createElement(Z,null)))}function Z(){return e.createElement(e.Fragment,null,e.useContext($))}function h(){let t=e.useContext(D);if(!t)throw new Error("Kookie: this part must be inside a <Navigator>.");return t}function pe(){return h()}function I(){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 ee(){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 V(t,o){let s=o>0?t.titles.current[o-1]:void 0;return s?`Back to ${s}`:"Back"}function te(t){let o=h();return o.canGoBack?e.createElement(R,{iconOnly:!0,"aria-label":t["aria-label"]??V(o,o.path.length),onClick:o.pop},e.createElement(I,null)):null}function ge(){let t=h();return t.inPane?e.createElement(d,null):e.createElement(d,null,t.titles.current[t.path.length])}function de({title:t,children:o,className:s}){let i=h(),c=e.useContext(F),u=e.useContext(P),b=e.useContext(O),l=e.useRef(null);if(e.useEffect(()=>{i.setTitle(c,t)},[i,c,t]),e.useEffect(()=>{if(c===0||i.direction!=="push")return;let p=l.current?.querySelector(".kui-NavigatorBar .kui-ToolbarTitle, h1")??l.current;p&&(p.tabIndex=-1,p.focus({preventScroll:!0}))},[]),i.inPane&&b)return e.createElement("div",{ref:l,className:f("kui-NavigatorScreen",s)},e.createElement(G,{title:t},o));if(i.inPane)return e.createElement("div",{ref:l,className:f("kui-NavigatorScreen",s)},e.createElement(ne,{title:t}),o);let v=c===i.path.length,N=e.createElement(j,{as:"h2",size:"4",weight:"medium",truncate:!0},t);return e.createElement("div",{ref:l,className:f("kui-NavigatorScreen",s)},e.createElement("div",{className:"kui-NavigatorBar"},e.createElement(S,{"aria-label":"Navigation"},i.canGoBack&&c>0?e.createElement(R,{iconOnly:!0,"aria-label":V(i,c),onClick:i.pop},e.createElement(I,null)):null,e.createElement(d,{className:"kui-NavigatorBarTitle"},u&&v?e.createElement(u.Title,null,N):N),u?e.createElement(u.Close,null,e.createElement(R,{iconOnly:!0,"aria-label":"Close"},e.createElement(ee,null))):null)),e.createElement("div",{className:"kui-NavigatorBody"},o))}function ne({title:t}){let o=x();return H(o,t),e.useEffect(()=>{if(o)return y(o,!0),()=>y(o,!1)},[o]),null}function fe({value:t,className:o,children:s,...i}){let c=h();return e.createElement("button",{type:"button",...i,className:f("kui-reset","kui-NavigatorLink",o),onClick:()=>c.push(t)},e.createElement("span",{className:"kui-NavigatorLinkLabel"},s),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{ve as a,Z as b,pe as c,te as d,ge as e,de as f,fe as g};
3
- //# sourceMappingURL=chunk-5RLGDXOM.js.map
2
+ import{d as R,i as d,j as S}from"./chunk-HNOT2HS4.js";import{a as G}from"./chunk-65URNXF2.js";import{a as j}from"./chunk-OBSZOD5M.js";import{a as E}from"./chunk-KVVRFWGQ.js";import{a as P}from"./chunk-4KBKS3ZE.js";import{a as y,d as x,e as H}from"./chunk-VWRPVM5K.js";import{d as O,i as M,k as A}from"./chunk-FKCKELUB.js";import*as e from"react";import f from"classnames";var D=e.createContext(null),F=e.createContext(0),$=e.createContext(null);function U(){let t=x(),o=e.useContext(P);return t!==null&&o===null}var W=e.Activity;function X({visible:t,children:o}){return W?e.createElement(W,{mode:t?"visible":"hidden"},o):e.createElement("div",{hidden:!t,style:{display:t?"contents":"none"}},o)}function ve({path:t,defaultPath:o,onPathChange:s,screen:i,root:c,children:u,className:b,style:l}){let v=U(),[N,p]=e.useState(o??[]),a=t??N,[g,q]=e.useState({path:a,direction:null}),m=g.direction;if(g.path.length!==a.length||g.path.some((n,r)=>!Object.is(n,a[r]))){let n=g.path;m=a.length<n.length?"pop":a.length>n.length||!Object.is(a[a.length-1],n[n.length-1])?"push":g.direction,q({path:a,direction:m})}e.useEffect(()=>{},[a]);let C=e.useRef([]),k=e.useRef([]),[z,K]=e.useState(0),T=e.useCallback(n=>{t===void 0&&p(n),s?.(n)},[t,s]),_=e.useMemo(()=>({path:a,canGoBack:a.length>0,push:n=>{k.current[a.length+1]=typeof document>"u"?null:document.activeElement,T([...a,n])},pop:()=>{a.length>0&&T(a.slice(0,-1))},popTo:n=>{n<a.length&&T(a.slice(0,Math.max(0,n)))},titles:C,openers:k,setTitle:(n,r)=>{C.current[n]!==r&&(C.current[n]=r,K(Q=>Q+1))},direction:m,inPane:v}),[a,T,z,m,v]),L=e.useRef(a.length);e.useEffect(()=>{let n=L.current;if(L.current=a.length,a.length<n){let r=k.current[n];k.current.length=a.length+1,r&&r.isConnected&&r.focus()}},[a.length]);let B=[c,...a.map(n=>i(n))],J=B.length-1,w=e.createElement("div",{className:f("kui-Navigator",b),style:l},B.map((n,r)=>e.createElement(X,{key:r===0?"root":`${r}:${String(a[r-1])}`,visible:r===J},e.createElement(F.Provider,{value:r},e.createElement("div",{className:"kui-NavigatorLevel"},n)))));return e.createElement(D.Provider,{value:_},e.createElement($.Provider,{value:w},u??(v?e.createElement(Y,null):w)))}function Y(){return e.createElement(e.Fragment,null,e.createElement(M,null,e.createElement(S,null,e.createElement(E,{align:"center"},e.createElement(te,null),e.createElement(d,null)))),e.createElement(A,null,e.createElement(Z,null)))}function Z(){return e.createElement(e.Fragment,null,e.useContext($))}function h(){let t=e.useContext(D);if(!t)throw new Error("Kookie: this part must be inside a <Navigator>.");return t}function pe(){return h()}function I(){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 ee(){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 V(t,o){let s=o>0?t.titles.current[o-1]:void 0;return s?`Back to ${s}`:"Back"}function te(t){let o=h();return o.canGoBack?e.createElement(R,{iconOnly:!0,"aria-label":t["aria-label"]??V(o,o.path.length),onClick:o.pop},e.createElement(I,null)):null}function ge(){let t=h();return t.inPane?e.createElement(d,null):e.createElement(d,null,t.titles.current[t.path.length])}function de({title:t,children:o,className:s}){let i=h(),c=e.useContext(F),u=e.useContext(P),b=e.useContext(O),l=e.useRef(null);if(e.useEffect(()=>{i.setTitle(c,t)},[i,c,t]),e.useEffect(()=>{if(c===0||i.direction!=="push")return;let p=l.current?.querySelector(".kui-NavigatorBar .kui-ToolbarTitle, h1")??l.current;p&&(p.tabIndex=-1,p.focus({preventScroll:!0}))},[]),i.inPane&&b)return e.createElement("div",{ref:l,className:f("kui-NavigatorScreen",s)},e.createElement(G,{title:t},o));if(i.inPane)return e.createElement("div",{ref:l,className:f("kui-NavigatorScreen",s)},e.createElement(ne,{title:t}),o);let v=c===i.path.length,N=e.createElement(j,{as:"h2",size:"4",weight:"medium",truncate:!0},t);return e.createElement("div",{ref:l,className:f("kui-NavigatorScreen",s)},e.createElement("div",{className:"kui-NavigatorBar"},e.createElement(S,{"aria-label":"Navigation"},i.canGoBack&&c>0?e.createElement(R,{iconOnly:!0,"aria-label":V(i,c),onClick:i.pop},e.createElement(I,null)):null,e.createElement(d,{className:"kui-NavigatorBarTitle"},u&&v?e.createElement(u.Title,null,N):N),u?e.createElement(u.Close,null,e.createElement(R,{iconOnly:!0,"aria-label":"Close"},e.createElement(ee,null))):null)),e.createElement("div",{className:"kui-NavigatorBody"},o))}function ne({title:t}){let o=x();return H(o,t),e.useEffect(()=>{if(o)return y(o,!0),()=>y(o,!1)},[o]),null}function fe({value:t,className:o,children:s,...i}){let c=h();return e.createElement("button",{type:"button",...i,className:f("kui-reset","kui-NavigatorLink",o),onClick:()=>c.push(t)},e.createElement("span",{className:"kui-NavigatorLinkLabel"},s),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{ve as a,Z as b,pe as c,te as d,ge as e,de as f,fe as g};
3
+ //# sourceMappingURL=chunk-2K46JPUL.js.map
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{b as C,c as N,d as G,e as E}from"./chunk-2ACVWLFA.js";import{a as F}from"./chunk-TGRHRMQI.js";import{a as T}from"./chunk-3ZBEWLSO.js";import{b as j}from"./chunk-YOZXIUZY.js";import{b as z,d as L,f as O}from"./chunk-GKDGNPBD.js";import{c as W}from"./chunk-5ON3XLRD.js";import{c as S,e as V,g as k,h as y,i as A}from"./chunk-DJGZ4K3V.js";import{b,c as I,d as v,e as h}from"./chunk-REELD6CT.js";import{a as g}from"./chunk-DFQIIYLD.js";import{c as R}from"./chunk-OKQAVYW4.js";import{a as oe}from"./chunk-VQPANPMI.js";var re={};oe(re,{CheckboxItem:()=>Y,Content:()=>U,Group:()=>J,Item:()=>H,Label:()=>_,RadioGroup:()=>Q,RadioItem:()=>X,Root:()=>q,Separator:()=>te,Sub:()=>Z,SubContent:()=>ee,SubTrigger:()=>$,Trigger:()=>K});import*as e from"react";import s from"classnames";import{ContextMenu as i,Slot as w}from"radix-ui";import{useCallbackRef as ne}from"radix-ui/internal";var q=t=>{let{open:r,onOpenChange:n}=t,[a,o]=e.useState(!1),u=r??a,p=ne(n),c=e.useCallback(l=>{o(l),p(l)},[p]),m=e.useCallback(()=>c(!1),[c]);return e.createElement(V,{value:m},e.createElement(i.Root,{...t,open:u,onOpenChange:c}))};q.displayName="ContextMenu.Root";var K=e.forwardRef(({children:t,...r},n)=>e.createElement(i.Trigger,{...r,ref:n,asChild:!0},F(t)));K.displayName="ContextMenu.Trigger";var B=e.createContext({}),U=e.forwardRef((t,r)=>{let n=W(t,C.size),a=j(),{size:o=C.size.default}=n,{className:u,children:p,color:c,container:m,forceMount:l,virtualized:P=!1,...d}=R(n,C),x=c||a.accentColor,f=b(o,C.size.default),M=e.useMemo(()=>({size:o,color:x}),[o,x]),D=e.createElement(S,{size:o},e.createElement(B.Provider,{value:M},p));return e.createElement(i.Portal,{container:m,forceMount:l},e.createElement(T,{asChild:!0},e.createElement(i.Content,{"data-accent-color":x,alignOffset:I(f),collisionPadding:10,...d,asChild:!1,ref:r,className:s("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-ContextMenuContent",u)},P?e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport","kui-virtualized")},D):e.createElement(g,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport")},D)))))});U.displayName="ContextMenu.Content";var _=e.forwardRef(({className:t,id:r,...n},a)=>{let o=A(r);return e.createElement(i.Label,{...n,id:o,asChild:!1,ref:a,className:s("kui-BaseMenuLabel","kui-ContextMenuLabel",t)})});_.displayName="ContextMenu.Label";var H=e.forwardRef((t,r)=>{let{className:n,children:a,color:o=N.color.default,shortcut:u,...p}=t;return e.createElement(i.Item,{"data-accent-color":o,"aria-keyshortcuts":u?v(u):void 0,...p,ref:r,className:s("kui-reset","kui-BaseMenuItem","kui-ContextMenuItem",n)},e.createElement(w.Slottable,null,a),u&&e.createElement(h,{shortcut:u,className:"kui-ContextMenuShortcut"}))});H.displayName="ContextMenu.Item";var J=e.forwardRef(({className:t,"aria-labelledby":r,...n},a)=>{let[o,u]=y(r);return e.createElement(k,{value:u},e.createElement(i.Group,{"aria-labelledby":o,...n,asChild:!1,ref:a,className:s("kui-BaseMenuGroup","kui-ContextMenuGroup",t)}))});J.displayName="ContextMenu.Group";var Q=e.forwardRef(({className:t,"aria-labelledby":r,...n},a)=>{let[o,u]=y(r);return e.createElement(k,{value:u},e.createElement(i.RadioGroup,{"aria-labelledby":o,...n,asChild:!1,ref:a,className:s("kui-BaseMenuRadioGroup","kui-ContextMenuRadioGroup",t)}))});Q.displayName="ContextMenu.RadioGroup";var X=e.forwardRef((t,r)=>{let{children:n,className:a,color:o=E.color.default,...u}=t;return e.createElement(i.RadioItem,{...u,asChild:!1,ref:r,"data-accent-color":o,className:s("kui-BaseMenuItem","kui-BaseMenuRadioItem","kui-ContextMenuItem","kui-ContextMenuRadioItem",a)},e.createElement(w.Slottable,null,n),e.createElement(i.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-ContextMenuItemIndicator"},e.createElement(O,{className:"kui-BaseMenuItemIndicatorIcon kui-ContextMenuItemIndicatorIcon"})))});X.displayName="ContextMenu.RadioItem";var Y=e.forwardRef((t,r)=>{let{children:n,className:a,shortcut:o,color:u=G.color.default,...p}=t;return e.createElement(i.CheckboxItem,{"aria-keyshortcuts":o?v(o):void 0,...p,asChild:!1,ref:r,"data-accent-color":u,className:s("kui-BaseMenuItem","kui-BaseMenuCheckboxItem","kui-ContextMenuItem","kui-ContextMenuCheckboxItem",a)},e.createElement(w.Slottable,null,n),e.createElement(i.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-ContextMenuItemIndicator"},e.createElement(z,{className:"kui-BaseMenuItemIndicatorIcon kui-ContextMenuItemIndicatorIcon"})),o&&e.createElement(h,{shortcut:o,className:"kui-ContextMenuShortcut"}))});Y.displayName="ContextMenu.CheckboxItem";var Z=t=>e.createElement(i.Sub,{...t});Z.displayName="ContextMenu.Sub";var $=e.forwardRef((t,r)=>{let{className:n,children:a,...o}=t;return e.createElement(i.SubTrigger,{...o,asChild:!1,ref:r,className:s("kui-BaseMenuItem","kui-BaseMenuSubTrigger","kui-ContextMenuItem","kui-ContextMenuSubTrigger",n)},a,e.createElement("div",{className:"kui-BaseMenuShortcut kui-ContextMenuShortcut"},e.createElement(L,{className:"kui-BaseMenuSubTriggerIcon kui-ContextMenuSubTriggerIcon"})))});$.displayName="ContextMenu.SubTrigger";var ee=e.forwardRef((t,r)=>{let n=e.useContext(B),a=t.size??n.size,o=t.color??n.color,{className:u,children:p,container:c,forceMount:m,color:l,virtualized:P=!1,...d}=R({...t,size:a},C),x=b(a,C.size.default),f=e.useMemo(()=>({size:a,color:o}),[a,o]),M=e.createElement(S,{size:a},e.createElement(B.Provider,{value:f},p));return e.createElement(i.Portal,{container:c,forceMount:m},e.createElement(T,{asChild:!0},e.createElement(i.SubContent,{"data-accent-color":o,alignOffset:I(x),sideOffset:1,collisionPadding:10,...d,asChild:!1,ref:r,className:s("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-BaseMenuSubContent","kui-ContextMenuContent","kui-ContextMenuSubContent",u)},P?e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport","kui-virtualized")},M):e.createElement(g,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:s("kui-BaseMenuViewport","kui-ContextMenuViewport")},M)))))});ee.displayName="ContextMenu.SubContent";var te=e.forwardRef(({className:t,...r},n)=>e.createElement(i.Separator,{...r,asChild:!1,ref:n,className:s("kui-BaseMenuSeparator","kui-ContextMenuSeparator",t)}));te.displayName="ContextMenu.Separator";export{q as a,K as b,U as c,_ as d,H as e,J as f,Q as g,X as h,Y as i,Z as j,$ as k,ee as l,te as m,re as n};
3
+ //# sourceMappingURL=chunk-3K7E4XL3.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/context-menu.tsx"],
4
+ "sourcesContent": ["/**\n * Context Menu component that provides right-click menu functionality.\n * Requires client-side rendering due to event handling and portal usage.\n */\n'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { ContextMenu as ContextMenuPrimitive, Slot } from 'radix-ui';\nimport { useCallbackRef } from 'radix-ui/internal';\n\nimport { ScrollArea } from './scroll-area.js';\nimport {\n contextMenuContentPropDefs,\n contextMenuSubContentPropDefs,\n contextMenuItemPropDefs,\n contextMenuCheckboxItemPropDefs,\n contextMenuRadioItemPropDefs,\n} from './context-menu.props.js';\nimport { useThemeContext } from './theme.js';\nimport { PortalTheme } from './_internal/portal-theme.js';\nimport { ThickCheckIcon, ThickChevronRightIcon, ThickDotIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport {\n MenuCloseProvider,\n MenuGroupLabelProvider,\n MenuProvider,\n useMenuGroupLabelId,\n useMenuGroupLabelledBy,\n} from './_internal/menu-context.js';\nimport {\n MenuShortcut,\n getMenuAlignOffset,\n toAriaKeyShortcuts,\n useResolvedResponsiveValue,\n} from './_internal/base-menu.utils.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ninterface ContextMenuRootProps\n extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Root> {}\nconst ContextMenuRoot: React.FC<ContextMenuRootProps> = (props) => {\n const { open: openProp, onOpenChange } = props;\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);\n const open = openProp ?? uncontrolledOpen;\n\n const handleOpenChangeProp = useCallbackRef(onOpenChange);\n const handleOpenChange = React.useCallback(\n (next: boolean) => {\n setUncontrolledOpen(next);\n handleOpenChangeProp(next);\n },\n [handleOpenChangeProp],\n );\n const close = React.useCallback(() => handleOpenChange(false), [handleOpenChange]);\n\n return (\n <MenuCloseProvider value={close}>\n <ContextMenuPrimitive.Root {...props} open={open} onOpenChange={handleOpenChange} />\n </MenuCloseProvider>\n );\n};\nContextMenuRoot.displayName = 'ContextMenu.Root';\n\ntype ContextMenuTriggerElement = React.ElementRef<typeof ContextMenuPrimitive.Trigger>;\ninterface ContextMenuTriggerProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Trigger, RemovedProps> {}\nconst ContextMenuTrigger = React.forwardRef<ContextMenuTriggerElement, ContextMenuTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </ContextMenuPrimitive.Trigger>\n ),\n);\nContextMenuTrigger.displayName = 'ContextMenu.Trigger';\n\n/** Visual props shared by Content and SubContent. */\ntype ContextMenuSurfaceProps = GetPropDefTypes<typeof contextMenuContentPropDefs>;\n\ntype ContextMenuContentContextValue = {\n size?: ContextMenuSurfaceProps['size'];\n color?: ContextMenuSurfaceProps['color'];\n};\nconst ContextMenuContentContext = React.createContext<ContextMenuContentContextValue>({});\ntype ContextMenuContentElement = React.ElementRef<typeof ContextMenuPrimitive.Content>;\ninterface ContextMenuContentProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Content, RemovedProps>,\n ContextMenuSurfaceProps {\n container?: React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Portal>['container'];\n /**\n * When true, skips the ScrollArea wrapper to allow VirtualMenu to handle its own scrolling.\n * Use this when rendering virtualized lists inside the context menu.\n */\n virtualized?: boolean;\n}\nconst ContextMenuContent = React.forwardRef<ContextMenuContentElement, ContextMenuContentProps>(\n (ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, contextMenuContentPropDefs.size);\n const themeContext = useThemeContext();\n const {\n size = contextMenuContentPropDefs.size.default,\n } = props;\n const {\n className,\n children,\n color,\n container,\n forceMount,\n virtualized = false,\n ...contentProps\n } = extractProps(props, contextMenuContentPropDefs);\n\n const resolvedColor = color || themeContext.accentColor;\n const scalarSize = useResolvedResponsiveValue(size, contextMenuContentPropDefs.size.default);\n\n const contextValue = React.useMemo(\n () => ({ size, color: resolvedColor }),\n [size, resolvedColor],\n );\n\n const body = (\n <MenuProvider size={size}>\n <ContextMenuContentContext.Provider value={contextValue}>{children}</ContextMenuContentContext.Provider>\n </MenuProvider>\n );\n\n return (\n <ContextMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <PortalTheme asChild>\n <ContextMenuPrimitive.Content\n data-accent-color={resolvedColor}\n alignOffset={getMenuAlignOffset(scalarSize)}\n collisionPadding={10}\n {...contentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-PopperContent',\n 'kui-BaseMenuContent',\n 'kui-variant-soft',\n 'kui-ContextMenuContent',\n className,\n )}\n >\n {virtualized ? (\n <div className={classNames('kui-BaseMenuViewport', 'kui-ContextMenuViewport', 'kui-virtualized')}>\n {body}\n </div>\n ) : (\n <ScrollArea type=\"auto\" scrollbars=\"vertical\">\n <div className={classNames('kui-BaseMenuViewport', 'kui-ContextMenuViewport')}>{body}</div>\n </ScrollArea>\n )}\n </ContextMenuPrimitive.Content>\n </PortalTheme>\n </ContextMenuPrimitive.Portal>\n );\n },\n);\nContextMenuContent.displayName = 'ContextMenu.Content';\n\ntype ContextMenuLabelElement = React.ElementRef<typeof ContextMenuPrimitive.Label>;\ninterface ContextMenuLabelProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Label, RemovedProps> {}\nconst ContextMenuLabel = React.forwardRef<ContextMenuLabelElement, ContextMenuLabelProps>(\n ({ className, id: idProp, ...props }, forwardedRef) => {\n const id = useMenuGroupLabelId(idProp);\n return (\n <ContextMenuPrimitive.Label\n {...props}\n id={id}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuLabel', 'kui-ContextMenuLabel', className)}\n />\n );\n },\n);\nContextMenuLabel.displayName = 'ContextMenu.Label';\n\ntype ContextMenuItemElement = React.ElementRef<typeof ContextMenuPrimitive.Item>;\ntype ContextMenuItemOwnProps = GetPropDefTypes<typeof contextMenuItemPropDefs>;\ninterface ContextMenuItemProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Item, RemovedProps>,\n ContextMenuItemOwnProps {}\nconst ContextMenuItem = React.forwardRef<ContextMenuItemElement, ContextMenuItemProps>(\n (props, forwardedRef) => {\n const {\n className,\n children,\n color = contextMenuItemPropDefs.color.default,\n shortcut,\n ...itemProps\n } = props;\n return (\n <ContextMenuPrimitive.Item\n data-accent-color={color}\n aria-keyshortcuts={shortcut ? toAriaKeyShortcuts(shortcut) : undefined}\n {...itemProps}\n ref={forwardedRef}\n className={classNames('kui-reset', 'kui-BaseMenuItem', 'kui-ContextMenuItem', className)}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n {shortcut && <MenuShortcut shortcut={shortcut} className=\"kui-ContextMenuShortcut\" />}\n </ContextMenuPrimitive.Item>\n );\n },\n);\nContextMenuItem.displayName = 'ContextMenu.Item';\n\ntype ContextMenuGroupElement = React.ElementRef<typeof ContextMenuPrimitive.Group>;\ninterface ContextMenuGroupProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Group, RemovedProps> {}\nconst ContextMenuGroup = React.forwardRef<ContextMenuGroupElement, ContextMenuGroupProps>(\n ({ className, 'aria-labelledby': ariaLabelledBy, ...props }, forwardedRef) => {\n const [labelledBy, setLabelId] = useMenuGroupLabelledBy(ariaLabelledBy);\n return (\n <MenuGroupLabelProvider value={setLabelId}>\n <ContextMenuPrimitive.Group\n aria-labelledby={labelledBy}\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuGroup', 'kui-ContextMenuGroup', className)}\n />\n </MenuGroupLabelProvider>\n );\n },\n);\nContextMenuGroup.displayName = 'ContextMenu.Group';\n\ntype ContextMenuRadioGroupElement = React.ElementRef<typeof ContextMenuPrimitive.RadioGroup>;\ninterface ContextMenuRadioGroupProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.RadioGroup, RemovedProps> {}\nconst ContextMenuRadioGroup = React.forwardRef<\n ContextMenuRadioGroupElement,\n ContextMenuRadioGroupProps\n>(({ className, 'aria-labelledby': ariaLabelledBy, ...props }, forwardedRef) => {\n const [labelledBy, setLabelId] = useMenuGroupLabelledBy(ariaLabelledBy);\n return (\n <MenuGroupLabelProvider value={setLabelId}>\n <ContextMenuPrimitive.RadioGroup\n aria-labelledby={labelledBy}\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuRadioGroup', 'kui-ContextMenuRadioGroup', className)}\n />\n </MenuGroupLabelProvider>\n );\n});\nContextMenuRadioGroup.displayName = 'ContextMenu.RadioGroup';\n\ntype ContextMenuRadioItemElement = React.ElementRef<typeof ContextMenuPrimitive.RadioItem>;\ntype ContextMenuRadioItemOwnProps = GetPropDefTypes<typeof contextMenuRadioItemPropDefs>;\ninterface ContextMenuRadioItemProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.RadioItem, RemovedProps>,\n ContextMenuRadioItemOwnProps {}\nconst ContextMenuRadioItem = React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n color = contextMenuRadioItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <ContextMenuPrimitive.RadioItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'kui-BaseMenuItem',\n 'kui-BaseMenuRadioItem',\n 'kui-ContextMenuItem',\n 'kui-ContextMenuRadioItem',\n className,\n )}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n <ContextMenuPrimitive.ItemIndicator className=\"kui-BaseMenuItemIndicator kui-ContextMenuItemIndicator\">\n <ThickDotIcon className=\"kui-BaseMenuItemIndicatorIcon kui-ContextMenuItemIndicatorIcon\" />\n </ContextMenuPrimitive.ItemIndicator>\n </ContextMenuPrimitive.RadioItem>\n );\n});\nContextMenuRadioItem.displayName = 'ContextMenu.RadioItem';\n\ntype ContextMenuCheckboxItemElement = React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>;\ntype ContextMenuCheckboxItemOwnProps = GetPropDefTypes<typeof contextMenuCheckboxItemPropDefs>;\ninterface ContextMenuCheckboxItemProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.CheckboxItem, RemovedProps>,\n ContextMenuCheckboxItemOwnProps {}\nconst ContextMenuCheckboxItem = React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n shortcut,\n color = contextMenuCheckboxItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <ContextMenuPrimitive.CheckboxItem\n aria-keyshortcuts={shortcut ? toAriaKeyShortcuts(shortcut) : undefined}\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'kui-BaseMenuItem',\n 'kui-BaseMenuCheckboxItem',\n 'kui-ContextMenuItem',\n 'kui-ContextMenuCheckboxItem',\n className,\n )}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n <ContextMenuPrimitive.ItemIndicator className=\"kui-BaseMenuItemIndicator kui-ContextMenuItemIndicator\">\n <ThickCheckIcon className=\"kui-BaseMenuItemIndicatorIcon kui-ContextMenuItemIndicatorIcon\" />\n </ContextMenuPrimitive.ItemIndicator>\n {shortcut && <MenuShortcut shortcut={shortcut} className=\"kui-ContextMenuShortcut\" />}\n </ContextMenuPrimitive.CheckboxItem>\n );\n});\nContextMenuCheckboxItem.displayName = 'ContextMenu.CheckboxItem';\n\ninterface ContextMenuSubProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Sub, RemovedProps> {}\nconst ContextMenuSub: React.FC<ContextMenuSubProps> = (props) => (\n <ContextMenuPrimitive.Sub {...props} />\n);\nContextMenuSub.displayName = 'ContextMenu.Sub';\n\ntype ContextMenuSubTriggerElement = React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>;\ninterface ContextMenuSubTriggerProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.SubTrigger, RemovedProps> {}\nconst ContextMenuSubTrigger = React.forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>((props, forwardedRef) => {\n const { className, children, ...subTriggerProps } = props;\n return (\n <ContextMenuPrimitive.SubTrigger\n {...subTriggerProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-BaseMenuItem',\n 'kui-BaseMenuSubTrigger',\n 'kui-ContextMenuItem',\n 'kui-ContextMenuSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"kui-BaseMenuShortcut kui-ContextMenuShortcut\">\n <ThickChevronRightIcon className=\"kui-BaseMenuSubTriggerIcon kui-ContextMenuSubTriggerIcon\" />\n </div>\n </ContextMenuPrimitive.SubTrigger>\n );\n});\nContextMenuSubTrigger.displayName = 'ContextMenu.SubTrigger';\n\ntype ContextMenuSubContentElement = React.ElementRef<typeof ContextMenuPrimitive.SubContent>;\ninterface ContextMenuSubContentProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.SubContent, RemovedProps>,\n ContextMenuSurfaceProps {\n container?: React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Portal>['container'];\n /**\n * When true, skips the ScrollArea wrapper to allow VirtualMenu to handle its own scrolling.\n */\n virtualized?: boolean;\n}\nconst ContextMenuSubContent = React.forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>((props, forwardedRef) => {\n const parent = React.useContext(ContextMenuContentContext);\n\n // A submenu inherits the parent surface, and its own props win.\n const size = props.size ?? parent.size;\n const color = props.color ?? parent.color;\n\n const {\n className,\n children,\n container,\n forceMount,\n color: _color,\n virtualized = false,\n ...subContentProps\n } = extractProps({ ...props, size }, contextMenuSubContentPropDefs);\n\n const scalarSize = useResolvedResponsiveValue(size, contextMenuSubContentPropDefs.size.default);\n\n const contextValue = React.useMemo(\n () => ({ size, color }),\n [size, color],\n );\n\n const body = (\n <MenuProvider size={size}>\n <ContextMenuContentContext.Provider value={contextValue}>{children}</ContextMenuContentContext.Provider>\n </MenuProvider>\n );\n\n return (\n <ContextMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <PortalTheme asChild>\n <ContextMenuPrimitive.SubContent\n data-accent-color={color}\n alignOffset={getMenuAlignOffset(scalarSize)}\n // Side offset accounts for the outer solid box-shadow\n sideOffset={1}\n collisionPadding={10}\n {...subContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'kui-PopperContent',\n 'kui-BaseMenuContent',\n 'kui-variant-soft',\n 'kui-BaseMenuSubContent',\n 'kui-ContextMenuContent',\n 'kui-ContextMenuSubContent',\n className,\n )}\n >\n {virtualized ? (\n <div className={classNames('kui-BaseMenuViewport', 'kui-ContextMenuViewport', 'kui-virtualized')}>\n {body}\n </div>\n ) : (\n <ScrollArea type=\"auto\" scrollbars=\"vertical\">\n <div className={classNames('kui-BaseMenuViewport', 'kui-ContextMenuViewport')}>{body}</div>\n </ScrollArea>\n )}\n </ContextMenuPrimitive.SubContent>\n </PortalTheme>\n </ContextMenuPrimitive.Portal>\n );\n});\nContextMenuSubContent.displayName = 'ContextMenu.SubContent';\n\ntype ContextMenuSeparatorElement = React.ElementRef<typeof ContextMenuPrimitive.Separator>;\ninterface ContextMenuSeparatorProps\n extends ComponentPropsWithout<typeof ContextMenuPrimitive.Separator, RemovedProps> {}\nconst ContextMenuSeparator = React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>(({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('kui-BaseMenuSeparator', 'kui-ContextMenuSeparator', className)}\n />\n));\nContextMenuSeparator.displayName = 'ContextMenu.Separator';\n\nexport {\n ContextMenuRoot as Root,\n ContextMenuTrigger as Trigger,\n ContextMenuContent as Content,\n ContextMenuLabel as Label,\n ContextMenuItem as Item,\n ContextMenuGroup as Group,\n ContextMenuRadioGroup as RadioGroup,\n ContextMenuRadioItem as RadioItem,\n ContextMenuCheckboxItem as CheckboxItem,\n ContextMenuSub as Sub,\n ContextMenuSubTrigger as SubTrigger,\n ContextMenuSubContent as SubContent,\n ContextMenuSeparator as Separator,\n};\n\nexport type {\n ContextMenuRootProps as RootProps,\n ContextMenuTriggerProps as TriggerProps,\n ContextMenuContentProps as ContentProps,\n ContextMenuLabelProps as LabelProps,\n ContextMenuItemProps as ItemProps,\n ContextMenuGroupProps as GroupProps,\n ContextMenuRadioGroupProps as RadioGroupProps,\n ContextMenuRadioItemProps as RadioItemProps,\n ContextMenuCheckboxItemProps as CheckboxItemProps,\n ContextMenuSubProps as SubProps,\n ContextMenuSubTriggerProps as SubTriggerProps,\n ContextMenuSubContentProps as SubContentProps,\n ContextMenuSeparatorProps as SeparatorProps,\n};\n"],
5
+ "mappings": ";wgBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,kBAAAE,EAAA,YAAAC,EAAA,UAAAC,EAAA,SAAAC,EAAA,UAAAC,EAAA,eAAAC,EAAA,cA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AGjC,CAAC,CAAE,UAAAjD,EAAW,GAAGzB,CAAM,EAAGe,IAC1B,gBAACH,EAAqB,UAArB,CACE,GAAGZ,EACJ,QAAS,GACT,IAAKe,EACL,UAAWyB,EAAW,wBAAyB,2BAA4Bf,CAAS,EACtF,CACD,EACDiD,GAAqB,YAAc",
6
+ "names": ["context_menu_exports", "__export", "ContextMenuCheckboxItem", "ContextMenuContent", "ContextMenuGroup", "ContextMenuItem", "ContextMenuLabel", "ContextMenuRadioGroup", "ContextMenuRadioItem", "ContextMenuRoot", "ContextMenuSeparator", "ContextMenuSub", "ContextMenuSubContent", "ContextMenuSubTrigger", "ContextMenuTrigger", "React", "classNames", "ContextMenuPrimitive", "Slot", "useCallbackRef", "ContextMenuRoot", "props", "openProp", "onOpenChange", "uncontrolledOpen", "setUncontrolledOpen", "open", "handleOpenChangeProp", "useCallbackRef", "handleOpenChange", "next", "close", "MenuCloseProvider", "ContextMenuPrimitive", "ContextMenuTrigger", "children", "forwardedRef", "requireReactElement", "ContextMenuContentContext", "ContextMenuContent", "ownProps", "useThemeSizeProps", "baseMenuSubContentPropDefs", "themeContext", "useThemeContext", "size", "className", "color", "container", "forceMount", "virtualized", "contentProps", "extractProps", "resolvedColor", "scalarSize", "useResolvedResponsiveValue", "contextValue", "body", "MenuProvider", "PortalTheme", "getMenuAlignOffset", "classNames", "ScrollArea", "ContextMenuLabel", "idProp", "id", "useMenuGroupLabelId", "ContextMenuItem", "baseMenuItemPropDefs", "shortcut", "itemProps", "toAriaKeyShortcuts", "Slot", "MenuShortcut", "ContextMenuGroup", "ariaLabelledBy", "labelledBy", "setLabelId", "useMenuGroupLabelledBy", "MenuGroupLabelProvider", "ContextMenuRadioGroup", "ContextMenuRadioItem", "baseMenuRadioItemPropDefs", "ThickDotIcon", "ContextMenuCheckboxItem", "baseMenuCheckboxItemPropDefs", "ThickCheckIcon", "ContextMenuSub", "ContextMenuSubTrigger", "subTriggerProps", "ThickChevronRightIcon", "ContextMenuSubContent", "parent", "_color", "subContentProps", "ContextMenuSeparator"]
7
+ }
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{z as e}from"zod";var c=e.enum(["expanded","collapsed"]).describe("Pane state mode"),l=e.enum(["collapsed","expanded"]).describe("Sidebar state"),d=e.enum(["fixed","overlay","stacked"]).describe("Presentation mode"),g=e.enum(["initial","xs","sm","md","lg","xl"]).describe("Responsive breakpoint"),h=e.enum(["rail","panel","sidebar","inspector","bottom"]).describe("Pane target"),u=e.enum(["toggle","expand","collapse"]).describe("Trigger action"),p=e.enum(["toggle","dismiss"]).describe("Why the state changed: `toggle` for a trigger or the resize handle, `dismiss` for Escape or the scrim"),b=e.enum(["init","resize","controlled"]).describe("Why the size changed");function i(t){return e.union([t,e.object({initial:t.optional(),xs:t.optional(),sm:t.optional(),md:t.optional(),lg:t.optional(),xl:t.optional()})])}var z=i(c).describe("Responsive pane mode configuration"),m=i(l).describe("Responsive sidebar state"),n=i(d).describe("Responsive presentation configuration"),S=i(e.boolean()).describe("Responsive open state"),o=e.record(e.string(),e.union([e.string(),e.number()])).optional().describe("Inline styles"),a={open:e.boolean().optional().describe("The open state, when controlled"),defaultOpen:e.union([e.boolean(),S]).optional().describe("The starting state. A responsive object leaves the pane untouched, with that object as the answer at each breakpoint."),onOpenChange:e.function({input:[e.boolean(),e.object({reason:p})],output:e.void()}).optional().describe("Called when a user opens or closes the pane. Never called on mount or on a resize.")},r={id:e.string().optional().describe("The pane id. A Trigger points `aria-controls` at it."),presentation:n.optional(),expandedSize:e.number().optional(),flush:e.boolean().optional().describe("Whether the pane joins the app frame. Defaults to true. `false` pulls it off the frame as a card."),className:e.string().optional().describe("Additional CSS class name"),style:o,children:e.any().optional()},s={minSize:e.number().optional(),maxSize:e.number().optional().describe("The largest size. A drag also stops before the handle leaves the frame."),resizable:e.boolean().optional(),collapsible:e.boolean().optional().describe("A double-click on the handle closes the pane"),size:e.union([e.number(),e.string()]).optional().describe("The size, when controlled"),defaultSize:e.union([e.number(),e.string()]).optional().describe("The starting size"),onSizeChange:e.function({input:[e.number(),e.object({reason:b})],output:e.void()}).optional(),sizeUpdate:e.enum(["throttle","debounce"]).optional().describe("Rate-limits onSizeChange across repeated resize ends, such as key presses on the handle. A drag calls it once, when the drag ends; use onResize for live sizes."),sizeUpdateMs:e.number().optional(),onResize:e.function({input:[e.number()],output:e.void()}).optional().describe("Called during a drag, at most once per animation frame"),onResizeStart:e.function({input:[e.number()],output:e.void()}).optional(),onResizeEnd:e.function({input:[e.number()],output:e.void()}).optional()},x=e.object({height:e.union([e.literal("full"),e.literal("auto"),e.string(),e.number()]).default("full").describe("Height of the frame. `full` is the window: 100dvh, with 100vh where dvh is not supported, and on a narrow touch screen the page scrolls. Any value other than `full` or `auto` makes the Shell contained."),contained:e.boolean().default(!1).describe("Fills the parent instead of the window and always scrolls inside itself. An explicit `height` implies it."),size:e.enum(["1","2","3"]).default("2").describe("Index of the pane chrome and the Sidebar rows in it"),className:e.string().optional().describe("Additional CSS class name"),style:o,children:e.any().optional().describe("The Shell parts, and anything else, rendered in order")}).strict(),y=e.object({height:e.number().default(64).describe("Height of the header, in pixels"),flush:e.boolean().optional().describe("Whether the header joins the app frame. Defaults to true. `false` makes it a card off the frame."),className:e.string().optional().describe("Additional CSS class name"),style:o,children:e.any().optional().describe("Header content")}).strict(),P=e.object({...r,...a,presentation:n.default("fixed").describe("Presentation mode"),expandedSize:e.number().default(64).describe("Width in pixels"),collapsible:e.boolean().optional()}).strict(),v=e.object({...r,...a,...s,presentation:n.optional().describe("Presentation mode. With no value the panel follows the Rail's."),expandedSize:e.number().default(288).describe("Open width in pixels"),minSize:e.number().default(100).describe("Minimum width when resizing"),maxSize:e.number().default(800).describe("Maximum width when resizing"),resizable:e.boolean().default(!1).describe("Whether the panel can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the panel")}).strict(),w=e.object({...r,...s,state:l.optional().describe("The state, when controlled"),defaultState:m.optional().describe("The starting state. With no value the sidebar is open where it is in the frame and closed where it is an overlay."),onStateChange:e.function({input:[l,e.object({reason:p})],output:e.void()}).optional().describe("Called when a user changes the state. Never called on mount or on a resize."),presentation:n.default({initial:"overlay",sm:"fixed"}).describe("Presentation mode"),expandedSize:e.number().default(288).describe("Open width in pixels"),minSize:e.number().default(200).describe("Minimum width when resizing"),maxSize:e.number().default(400).describe("Maximum width when resizing"),resizable:e.boolean().default(!1).describe("Whether the sidebar can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the sidebar")}).strict(),R=e.object({flush:e.boolean().optional().describe("Whether the work area joins the app frame. Defaults to true. `false` makes it a card on the Shell background."),className:e.string().optional().describe("Additional CSS class name"),style:o,children:e.any().optional().describe("Main content")}).strict(),T=e.object({...r,...a,...s,presentation:n.default({initial:"overlay",sm:"fixed"}).describe("Presentation mode"),expandedSize:e.number().default(320).describe("Open width in pixels"),minSize:e.number().default(200).describe("Minimum width when resizing"),maxSize:e.number().default(500).describe("Maximum width when resizing"),resizable:e.boolean().default(!1).describe("Whether the inspector can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the inspector")}).strict(),k=e.object({...r,...a,...s,presentation:n.default("fixed").describe("Presentation mode"),expandedSize:e.number().default(200).describe("Open height in pixels"),minSize:e.number().default(100).describe("Minimum height when resizing"),maxSize:e.number().default(400).describe("Maximum height when resizing"),resizable:e.boolean().default(!1).describe("Whether the bottom panel can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the panel")}).strict(),N=e.object({target:h.describe("Which pane to drive"),action:u.default("toggle").describe("Action to perform"),type:e.enum(["button","submit","reset"]).default("button").describe("The button type"),className:e.string().optional().describe("Additional CSS class name"),style:o,children:e.any().optional().describe("Trigger content"),onClick:e.function().optional().describe("Runs before the trigger acts. Call `event.preventDefault()` to cancel it."),onMouseEnter:e.function().optional().describe("Mouse enter handler"),onMouseLeave:e.function().optional().describe("Mouse leave handler"),"aria-label":e.string().optional().describe("ARIA label for accessibility"),"aria-labelledby":e.string().optional().describe("ARIA labelled by reference"),"aria-describedby":e.string().optional().describe("ARIA described by reference")}).strict(),M=e.object({className:e.string().optional().describe("Additional CSS class name"),style:o,children:e.any().optional().describe("Handle content")}).strict();function A(t){return t}function C(t){return t}function E(t){return t}function j(t){return t}function O(t){return t}function H(t){return t}function W(t){return t}function D(t){return t}function _(t){return t}function V(t){return t}export{x as a,y as b,P as c,v as d,w as e,R as f,T as g,k as h,N as i,M as j,A as k,C as l,E as m,j as n,O as o,H as p,W as q,D as r,_ as s,V as t};
3
+ //# sourceMappingURL=chunk-3LR7KMBE.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/schemas/shell.schema.ts"],
4
+ "sourcesContent": ["import { z } from 'zod';\n\n/**\n * Shell Zod schema: the Shell's props, for tools that read a schema\n * (editors, assistants, documentation).\n *\n * Shell is the frame of an application. Each pane holds its own open state;\n * a pane nobody has touched follows the window, and the stylesheet resolves\n * it at each breakpoint. Callbacks report user actions only.\n *\n * @example\n * ```tsx\n * const props = ShellRootSchema.parse({ height: 'full' });\n *\n * const sidebarProps = ShellSidebarSchema.parse({\n * defaultState: { initial: 'collapsed', md: 'expanded' },\n * presentation: { initial: 'overlay', sm: 'fixed' },\n * });\n * ```\n */\n\n// Common types\nconst PaneModeSchema = z.enum(['expanded', 'collapsed']).describe('Pane state mode');\nconst SidebarModeSchema = z.enum(['collapsed', 'expanded']).describe('Sidebar state');\nconst PresentationValueSchema = z.enum(['fixed', 'overlay', 'stacked']).describe('Presentation mode');\nconst _BreakpointSchema = z.enum(['initial', 'xs', 'sm', 'md', 'lg', 'xl']).describe('Responsive breakpoint');\nconst PaneTargetSchema = z.enum(['rail', 'panel', 'sidebar', 'inspector', 'bottom']).describe('Pane target');\nconst TriggerActionSchema = z.enum(['toggle', 'expand', 'collapse']).describe('Trigger action');\nconst OpenChangeReasonSchema = z.enum(['toggle', 'dismiss']).describe('Why the state changed: `toggle` for a trigger or the resize handle, `dismiss` for Escape or the scrim');\nconst SizeChangeReasonSchema = z.enum(['init', 'resize', 'controlled']).describe('Why the size changed');\n\nfunction responsive<T extends z.ZodTypeAny>(value: T) {\n return z.union([\n value,\n z.object({\n initial: value.optional(),\n xs: value.optional(),\n sm: value.optional(),\n md: value.optional(),\n lg: value.optional(),\n xl: value.optional(),\n }),\n ]);\n}\n\n// Responsive schemas\nconst _ResponsiveModeSchema = responsive(PaneModeSchema).describe('Responsive pane mode configuration');\nconst ResponsiveSidebarModeSchema = responsive(SidebarModeSchema).describe('Responsive sidebar state');\nconst ResponsivePresentationSchema = responsive(PresentationValueSchema).describe('Responsive presentation configuration');\nconst ResponsiveOpenSchema = responsive(z.boolean()).describe('Responsive open state');\n\nconst StyleSchema = z\n .record(z.string(), z.union([z.string(), z.number()]))\n .optional()\n .describe('Inline styles');\n\nconst OpenPropsSchema = {\n open: z.boolean().optional().describe('The open state, when controlled'),\n defaultOpen: z\n .union([z.boolean(), ResponsiveOpenSchema])\n .optional()\n .describe('The starting state. A responsive object leaves the pane untouched, with that object as the answer at each breakpoint.'),\n onOpenChange: z\n .function({ input: [z.boolean(), z.object({ reason: OpenChangeReasonSchema })], output: z.void() })\n .optional()\n .describe('Called when a user opens or closes the pane. Never called on mount or on a resize.'),\n};\n\n// Props shared by every pane\nconst PaneBaseShape = {\n id: z.string().optional().describe('The pane id. A Trigger points `aria-controls` at it.'),\n presentation: ResponsivePresentationSchema.optional(),\n expandedSize: z.number().optional(),\n flush: z.boolean().optional().describe('Whether the pane joins the app frame. Defaults to true. `false` pulls it off the frame as a card.'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional(),\n};\n\n// Props of a pane that resizes\nconst ResizeShape = {\n minSize: z.number().optional(),\n maxSize: z.number().optional().describe('The largest size. A drag also stops before the handle leaves the frame.'),\n resizable: z.boolean().optional(),\n collapsible: z.boolean().optional().describe('A double-click on the handle closes the pane'),\n size: z.union([z.number(), z.string()]).optional().describe('The size, when controlled'),\n defaultSize: z.union([z.number(), z.string()]).optional().describe('The starting size'),\n onSizeChange: z.function({ input: [z.number(), z.object({ reason: SizeChangeReasonSchema })], output: z.void() }).optional(),\n sizeUpdate: z\n .enum(['throttle', 'debounce'])\n .optional()\n .describe('Rate-limits onSizeChange across repeated resize ends, such as key presses on the handle. A drag calls it once, when the drag ends; use onResize for live sizes.'),\n sizeUpdateMs: z.number().optional(),\n onResize: z\n .function({ input: [z.number()], output: z.void() })\n .optional()\n .describe('Called during a drag, at most once per animation frame'),\n onResizeStart: z.function({ input: [z.number()], output: z.void() }).optional(),\n onResizeEnd: z.function({ input: [z.number()], output: z.void() }).optional(),\n};\n\n/**\n * Shell.Root component schema\n */\nexport const ShellRootSchema = z\n .object({\n height: z\n .union([z.literal('full'), z.literal('auto'), z.string(), z.number()])\n .default('full')\n .describe(\n 'Height of the frame. `full` is the window: 100dvh, with 100vh where dvh is not supported, and on a narrow touch screen the page scrolls. Any value other than `full` or `auto` makes the Shell contained.',\n ),\n contained: z.boolean().default(false).describe('Fills the parent instead of the window and always scrolls inside itself. An explicit `height` implies it.'),\n size: z.enum(['1', '2', '3']).default('2').describe('Index of the pane chrome and the Sidebar rows in it'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('The Shell parts, and anything else, rendered in order'),\n })\n .strict();\n\n/**\n * Shell.Header component schema\n */\nexport const ShellHeaderSchema = z\n .object({\n height: z.number().default(64).describe('Height of the header, in pixels'),\n flush: z.boolean().optional().describe('Whether the header joins the app frame. Defaults to true. `false` makes it a card off the frame.'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('Header content'),\n })\n .strict();\n\n/**\n * Shell.Rail component schema\n */\nexport const ShellRailSchema = z\n .object({\n ...PaneBaseShape,\n ...OpenPropsSchema,\n presentation: ResponsivePresentationSchema.default('fixed').describe('Presentation mode'),\n expandedSize: z.number().default(64).describe('Width in pixels'),\n collapsible: z.boolean().optional(),\n })\n .strict();\n\n/**\n * Shell.Panel component schema\n */\nexport const ShellPanelSchema = z\n .object({\n ...PaneBaseShape,\n ...OpenPropsSchema,\n ...ResizeShape,\n presentation: ResponsivePresentationSchema.optional().describe(\"Presentation mode. With no value the panel follows the Rail's.\"),\n expandedSize: z.number().default(288).describe('Open width in pixels'),\n minSize: z.number().default(100).describe('Minimum width when resizing'),\n maxSize: z.number().default(800).describe('Maximum width when resizing'),\n resizable: z.boolean().default(false).describe('Whether the panel can be resized'),\n collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the panel'),\n })\n .strict();\n\n/**\n * Shell.Sidebar component schema\n */\nexport const ShellSidebarSchema = z\n .object({\n ...PaneBaseShape,\n ...ResizeShape,\n state: SidebarModeSchema.optional().describe('The state, when controlled'),\n defaultState: ResponsiveSidebarModeSchema.optional().describe('The starting state. With no value the sidebar is open where it is in the frame and closed where it is an overlay.'),\n onStateChange: z\n .function({ input: [SidebarModeSchema, z.object({ reason: OpenChangeReasonSchema })], output: z.void() })\n .optional()\n .describe('Called when a user changes the state. Never called on mount or on a resize.'),\n presentation: ResponsivePresentationSchema.default({ initial: 'overlay', sm: 'fixed' }).describe('Presentation mode'),\n expandedSize: z.number().default(288).describe('Open width in pixels'),\n minSize: z.number().default(200).describe('Minimum width when resizing'),\n maxSize: z.number().default(400).describe('Maximum width when resizing'),\n resizable: z.boolean().default(false).describe('Whether the sidebar can be resized'),\n collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the sidebar'),\n })\n .strict();\n\n/**\n * Shell.Content component schema\n */\nexport const ShellContentSchema = z\n .object({\n flush: z.boolean().optional().describe('Whether the work area joins the app frame. Defaults to true. `false` makes it a card on the Shell background.'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('Main content'),\n })\n .strict();\n\n/**\n * Shell.Inspector component schema\n */\nexport const ShellInspectorSchema = z\n .object({\n ...PaneBaseShape,\n ...OpenPropsSchema,\n ...ResizeShape,\n presentation: ResponsivePresentationSchema.default({ initial: 'overlay', sm: 'fixed' }).describe('Presentation mode'),\n expandedSize: z.number().default(320).describe('Open width in pixels'),\n minSize: z.number().default(200).describe('Minimum width when resizing'),\n maxSize: z.number().default(500).describe('Maximum width when resizing'),\n resizable: z.boolean().default(false).describe('Whether the inspector can be resized'),\n collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the inspector'),\n })\n .strict();\n\n/**\n * Shell.Bottom component schema\n */\nexport const ShellBottomSchema = z\n .object({\n ...PaneBaseShape,\n ...OpenPropsSchema,\n ...ResizeShape,\n presentation: ResponsivePresentationSchema.default('fixed').describe('Presentation mode'),\n expandedSize: z.number().default(200).describe('Open height in pixels'),\n minSize: z.number().default(100).describe('Minimum height when resizing'),\n maxSize: z.number().default(400).describe('Maximum height when resizing'),\n resizable: z.boolean().default(false).describe('Whether the bottom panel can be resized'),\n collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the panel'),\n })\n .strict();\n\n/**\n * Shell.Trigger component schema\n */\nexport const ShellTriggerSchema = z\n .object({\n target: PaneTargetSchema.describe('Which pane to drive'),\n action: TriggerActionSchema.default('toggle').describe('Action to perform'),\n type: z.enum(['button', 'submit', 'reset']).default('button').describe('The button type'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('Trigger content'),\n onClick: z.function().optional().describe('Runs before the trigger acts. Call `event.preventDefault()` to cancel it.'),\n onMouseEnter: z.function().optional().describe('Mouse enter handler'),\n onMouseLeave: z.function().optional().describe('Mouse leave handler'),\n 'aria-label': z.string().optional().describe('ARIA label for accessibility'),\n 'aria-labelledby': z.string().optional().describe('ARIA labelled by reference'),\n 'aria-describedby': z.string().optional().describe('ARIA described by reference'),\n })\n .strict();\n\n/**\n * Shell.Handle component schema (for resize handles)\n */\nexport const ShellHandleSchema = z\n .object({\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('Handle content'),\n })\n .strict();\n\n// Type exports\nexport type ShellRootProps = z.infer<typeof ShellRootSchema>;\nexport type ShellHeaderProps = z.infer<typeof ShellHeaderSchema>;\nexport type ShellRailProps = z.infer<typeof ShellRailSchema>;\nexport type ShellPanelProps = z.infer<typeof ShellPanelSchema>;\nexport type ShellSidebarProps = z.infer<typeof ShellSidebarSchema>;\nexport type ShellContentProps = z.infer<typeof ShellContentSchema>;\nexport type ShellInspectorProps = z.infer<typeof ShellInspectorSchema>;\nexport type ShellBottomProps = z.infer<typeof ShellBottomSchema>;\nexport type ShellTriggerProps = z.infer<typeof ShellTriggerSchema>;\nexport type ShellHandleProps = z.infer<typeof ShellHandleSchema>;\n\n// Common type exports\nexport type PaneMode = z.infer<typeof PaneModeSchema>;\nexport type SidebarMode = z.infer<typeof SidebarModeSchema>;\nexport type PresentationValue = z.infer<typeof PresentationValueSchema>;\nexport type Breakpoint = z.infer<typeof _BreakpointSchema>;\nexport type PaneTarget = z.infer<typeof PaneTargetSchema>;\nexport type TriggerAction = z.infer<typeof TriggerActionSchema>;\nexport type ResponsiveMode = z.infer<typeof _ResponsiveModeSchema>;\nexport type ResponsiveSidebarMode = z.infer<typeof ResponsiveSidebarModeSchema>;\nexport type ResponsivePresentation = z.infer<typeof ResponsivePresentationSchema>;\n\n/**\n * Development-only helper to validate and normalize Shell props\n * This function should only be used in development mode\n *\n * @param props - Props to validate and normalize\n * @returns Validated and normalized props\n *\n * @example\n * ```tsx\n * // In development, this will validate props and show helpful errors\n * const validatedProps = parseShellRootProps({ height: 'invalid' });\n * // Throws validation errors for invalid values\n * ```\n */\nexport function parseShellRootProps(props: unknown): ShellRootProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellRootSchema.parse(props);\n }\n return props as ShellRootProps;\n}\n\nexport function parseShellHeaderProps(props: unknown): ShellHeaderProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellHeaderSchema.parse(props);\n }\n return props as ShellHeaderProps;\n}\n\nexport function parseShellRailProps(props: unknown): ShellRailProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellRailSchema.parse(props);\n }\n return props as ShellRailProps;\n}\n\nexport function parseShellPanelProps(props: unknown): ShellPanelProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellPanelSchema.parse(props);\n }\n return props as ShellPanelProps;\n}\n\nexport function parseShellSidebarProps(props: unknown): ShellSidebarProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellSidebarSchema.parse(props);\n }\n return props as ShellSidebarProps;\n}\n\nexport function parseShellContentProps(props: unknown): ShellContentProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellContentSchema.parse(props);\n }\n return props as ShellContentProps;\n}\n\nexport function parseShellInspectorProps(props: unknown): ShellInspectorProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellInspectorSchema.parse(props);\n }\n return props as ShellInspectorProps;\n}\n\nexport function parseShellBottomProps(props: unknown): ShellBottomProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellBottomSchema.parse(props);\n }\n return props as ShellBottomProps;\n}\n\nexport function parseShellTriggerProps(props: unknown): ShellTriggerProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellTriggerSchema.parse(props);\n }\n return props as ShellTriggerProps;\n}\n\nexport function parseShellHandleProps(props: unknown): ShellHandleProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellHandleSchema.parse(props);\n }\n return props as ShellHandleProps;\n}\n"],
5
+ "mappings": ";AAAA,OAAS,KAAAA,MAAS,MAsBlB,IAAMC,EAAiBD,EAAE,KAAK,CAAC,WAAY,WAAW,CAAC,EAAE,SAAS,iBAAiB,EAC7EE,EAAoBF,EAAE,KAAK,CAAC,YAAa,UAAU,CAAC,EAAE,SAAS,eAAe,EAC9EG,EAA0BH,EAAE,KAAK,CAAC,QAAS,UAAW,SAAS,CAAC,EAAE,SAAS,mBAAmB,EAC9FI,EAAoBJ,EAAE,KAAK,CAAC,UAAW,KAAM,KAAM,KAAM,KAAM,IAAI,CAAC,EAAE,SAAS,uBAAuB,EACtGK,EAAmBL,EAAE,KAAK,CAAC,O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BR,EAAmC,CAIxE,OAAOA,CACT,CAEO,SAASS,EAAsBT,EAAkC,CAItE,OAAOA,CACT",
6
+ "names": ["z", "PaneModeSchema", "SidebarModeSchema", "PresentationValueSchema", "_BreakpointSchema", "PaneTargetSchema", "TriggerActionSchema", "OpenChangeReasonSchema", "SizeChangeReasonSchema", "responsive", "value", "_ResponsiveModeSchema", "ResponsiveSidebarModeSchema", "ResponsivePresentationSchema", "ResponsiveOpenSchema", "StyleSchema", "OpenPropsSchema", "PaneBaseShape", "ResizeShape", "ShellRootSchema", "ShellHeaderSchema", "ShellRailSchema", "ShellPanelSchema", "ShellSidebarSchema", "ShellContentSchema", "ShellInspectorSchema", "ShellBottomSchema", "ShellTriggerSchema", "ShellHandleSchema", "parseShellRootProps", "props", "parseShellHeaderProps", "parseShellRailProps", "parseShellPanelProps", "parseShellSidebarProps", "parseShellContentProps", "parseShellInspectorProps", "parseShellBottomProps", "parseShellTriggerProps", "parseShellHandleProps"]
7
+ }
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as l,c as O,f as M}from"./chunk-SHDZYFUN.js";import{a as B,e as i}from"./chunk-RYXIRZQW.js";import{a as S,b as C,c as R}from"./chunk-UFYQC5XY.js";import{a as v,b as y,c as x}from"./chunk-MXNPCJPV.js";import{a as g}from"./chunk-S66WR5R7.js";import{a as z}from"./chunk-WJKCXGVN.js";import{b}from"./chunk-VWRPVM5K.js";import{m as h}from"./chunk-LBAC2X4U.js";import*as e from"react";import ee from"classnames";import{useComposedRefs as oe}from"radix-ui/internal";var te={controlled:"open",default:"defaultOpen"},H=e.forwardRef((N,T)=>{let{className:U,presentation:E="fixed",defaultOpen:k,open:w,onOpenChange:I,expandedSize:t=200,minSize:n=100,maxSize:a=400,resizable:r=!1,collapsible:V=!0,onResize:A,onResizeStart:L,onResizeEnd:$,children:D,style:F,size:s,defaultSize:m,onSizeChange:W,sizeUpdate:_,sizeUpdateMs:j=50,flush:p=!0,id:q,...d}=N,{table:u,attributes:G}=R(E,"fixed"),o=S({name:"bottom",label:"Bottom",propNames:te,id:q,controlled:l(w),defaultValue:l(k),presentationTable:u,builtIn:O,onChange:(Y,Z)=>I?.(Y!=="closed",{reason:Z}),size:t});h("bottom",p);let c=e.useRef(null),J=oe(T,o.setElement,c),K=y({name:"bottom",elementId:o.id,elementRef:c,cssVarName:"--bottom-size",orientation:"horizontal",edge:"start",growth:M,expandedSize:t,minSize:n,maxSize:a,resizable:r,collapsible:V,size:s,defaultSize:m,onSizeChange:W,sizeUpdate:_,sizeUpdateMs:j,onResize:A,onResizeStart:L,onResizeEnd:$,overlaying:o.overlaying,overlayingNow:()=>u[z()]==="overlay",requestToggle:()=>o.toggle("toggle")}),P=v(s,m,n,a),{handles:f,content:Q}=x(D,i),X=r&&o.shown!==!1&&!o.overlaying?e.createElement(g.Provider,{value:K},f.length>0?f:e.createElement(B,null)):null;return e.createElement("div",{...d,id:o.id,ref:J,className:ee("kui-ShellPane","kui-ShellBottom",U),...C(o,G),"data-flush":p||void 0,tabIndex:o.overlaying?-1:d.tabIndex,style:{...F,"--bottom-expanded-size":`${t}px`,...P?{"--bottom-size":P}:{},"--bottom-min-size":`${n}px`,"--bottom-max-size":`${a}px`}},e.createElement("div",{className:"kui-ShellBottomContent"},e.createElement(b,null,Q)),X)});H.displayName="Shell.Bottom";H.Handle=i;export{H as a};
3
+ //# sourceMappingURL=chunk-5U2LEJLU.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/_internal/shell-bottom.tsx"],
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { PaneResizeContext } from './shell-resize.js';\nimport { BottomHandle, PaneHandle } from './shell-handles.js';\nimport { usePane, paneAttributes, usePresentationTable } from './shell-pane.js';\nimport { splitHandles, useInitialPaneSize, useResizablePane, type SizeChangeMeta } from './shell-resizable.js';\nimport { useFrameRegistration } from './shell-store.js';\nimport { bottomAnchoredGrowth, detailRest, toPaneValue } from './shell-rest.js';\nimport { PageScope } from './page-scope.js';\nimport { readBreakpoint } from '../../hooks/use-breakpoint.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps, PaneOpenChangeReason } from '../shell.types.js';\n\ntype BottomOpenChangeMeta = { reason: PaneOpenChangeReason };\ntype BottomControlledProps = { open: boolean; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; defaultOpen?: never };\n/** Since 0.8.0 `defaultOpen` takes a responsive object here too, as the docs already said it did. */\ntype BottomUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; open?: never };\ntype BottomSizeControlledProps = { size: number | string; defaultSize?: never };\ntype BottomSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\ntype BottomPublicProps = PaneBaseProps &\n (BottomControlledProps | BottomUncontrolledProps) &\n (BottomSizeControlledProps | BottomSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: SizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n /**\n * Sets whether this pane joins the app frame. The default is `true`: the pane sits against its\n * neighbours with one hairline between them. Set `flush={false}` to pull it off the frame as a\n * card. It then floats over the content if the content is flush, and otherwise sits on the\n * Shell's background beside a card content.\n */\n flush?: boolean;\n };\n\ntype BottomComponent = React.ForwardRefExoticComponent<BottomPublicProps & React.RefAttributes<HTMLDivElement>> & { Handle: typeof BottomHandle };\n\nconst BOTTOM_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\nexport const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>((props, ref) => {\n const {\n className,\n presentation = 'fixed',\n defaultOpen,\n open,\n onOpenChange,\n expandedSize = 200,\n minSize = 100,\n maxSize = 400,\n resizable = false,\n collapsible = true,\n onResize,\n onResizeStart,\n onResizeEnd,\n children,\n style,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n flush = true,\n id,\n ...domProps\n } = props;\n\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'bottom',\n label: 'Bottom',\n propNames: BOTTOM_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable: table,\n builtIn: detailRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n size: expandedSize,\n });\n useFrameRegistration('bottom', flush);\n\n\n const elementRef = React.useRef<HTMLElement | null>(null);\n const composedRef = useComposedRefs(ref, pane.setElement, elementRef);\n\n const resize = useResizablePane({\n name: 'bottom',\n elementId: pane.id,\n elementRef,\n cssVarName: '--bottom-size',\n orientation: 'horizontal',\n edge: 'start',\n growth: bottomAnchoredGrowth,\n expandedSize,\n minSize,\n maxSize,\n resizable,\n collapsible,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs,\n onResize,\n onResizeStart,\n onResizeEnd,\n overlaying: pane.overlaying,\n overlayingNow: () => table[readBreakpoint()] === 'overlay',\n requestToggle: () => pane.toggle('toggle'),\n });\n\n // The starting size is in the server HTML, so the pane does not jump on hydration.\n const initialSize = useInitialPaneSize(size, defaultSize, minSize, maxSize);\n const { handles, content } = splitHandles(children, BottomHandle);\n const handle = resizable && pane.shown !== false && !pane.overlaying ? <PaneResizeContext.Provider value={resize}>{handles.length > 0 ? handles : <PaneHandle />}</PaneResizeContext.Provider> : null;\n\n return (\n <div\n {...domProps}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellBottom', className)}\n {...paneAttributes(pane, attributes)}\n data-flush={flush || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--bottom-expanded-size': `${expandedSize}px`,\n ...(initialSize ? { '--bottom-size': initialSize } : {}),\n '--bottom-min-size': `${minSize}px`,\n '--bottom-max-size': `${maxSize}px`,\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"kui-ShellBottomContent\">\n <PageScope>{content}</PageScope>\n </div>\n {handle}\n </div>\n );\n}) as BottomComponent;\n\nBottom.displayName = 'Shell.Bottom';\nBottom.Handle = BottomHandle;\n\nexport type { BottomPublicProps };\n"],
5
+ "mappings": ";4WAEA,UAAYA,MAAW,QACvB,OAAOC,OAAgB,aACvB,OAAS,mBAAAC,OAAuB,oBAkChC,IAAMC,GAAoB,CAAE,WAAY,OAAQ,QAAS,aAAc,EAE1DC,EAAe,aAA8C,CAACC,EAAOC,IAAQ,CACxF,GAAM,CACJ,UAAAC,EACA,aAAAC,EAAe,QACf,YAAAC,EACA,KAAAC,EACA,aAAAC,EACA,aAAAC,EAAe,IACf,QAAAC,EAAU,IACV,QAAAC,EAAU,IACV,UAAAC,EAAY,GACZ,YAAAC,EAAc,GACd,SAAAC,EACA,cAAAC,EACA,YAAAC,EACA,SAAAC,EACA,MAAAC,EACA,KAAAC,EACA,YAAAC,EACA,aAAAC,EACA,WAAAC,EACA,aAAAC,EAAe,GACf,MAAAC,EAAQ,GACR,GAAAC,EACA,GAAGC,CACL,EAAIxB,EAEE,CAAE,MAAAyB,EAAO,WAAAC,CAAW,EAAIC,EAAqBxB,EAAc,OAAO,EAClEyB,EAAOC,EAAQ,CACnB,KAAM,SACN,MAAO,SACP,UAAW/B,GACX,GAAAyB,EACA,WAAYO,EAAYzB,CAAI,EAC5B,aAAcyB,EAAY1B,CAAW,EACrC,kBAAmBqB,EACnB,QAASM,EACT,SAAU,CAACC,EAAOC,IAAW3B,IAAe0B,IAAU,SAAU,CAAE,OAAAC,CAAO,CAAC,EAC1E,KAAM1B,CACR,CAAC,EACD2B,EAAqB,SAAUZ,CAAK,EAGpC,IAAMa,EAAmB,SAA2B,IAAI,EAClDC,EAAcC,GAAgBpC,EAAK2B,EAAK,WAAYO,CAAU,EAE9DG,EAASC,EAAiB,CAC9B,KAAM,SACN,UAAWX,EAAK,GAChB,WAAAO,EACA,WAAY,gBACZ,YAAa,aACb,KAAM,QACN,OAAQK,EACR,aAAAjC,EACA,QAAAC,EACA,QAAAC,EACA,UAAAC,EACA,YAAAC,EACA,KAAAM,EACA,YAAAC,EACA,aAAAC,EACA,WAAAC,EACA,aAAAC,EACA,SAAAT,EACA,cAAAC,EACA,YAAAC,EACA,WAAYc,EAAK,WACjB,cAAe,IAAMH,EAAMgB,EAAe,CAAC,IAAM,UACjD,cAAe,IAAMb,EAAK,OAAO,QAAQ,CAC3C,CAAC,EAGKc,EAAcC,EAAmB1B,EAAMC,EAAaV,EAASC,CAAO,EACpE,CAAE,QAAAmC,EAAS,QAAAC,CAAQ,EAAIC,EAAa/B,EAAUgC,CAAY,EAC1DC,EAAStC,GAAakB,EAAK,QAAU,IAAS,CAACA,EAAK,WAAa,gBAACqB,EAAkB,SAAlB,CAA2B,MAAOX,GAASM,EAAQ,OAAS,EAAIA,EAAU,gBAACM,EAAA,IAAW,CAAG,EAAgC,KAEjM,OACE,gBAAC,OACE,GAAG1B,EACJ,GAAII,EAAK,GACT,IAAKQ,EACL,UAAWe,GAAW,gBAAiB,kBAAmBjD,CAAS,EAClE,GAAGkD,EAAexB,EAAMF,CAAU,EACnC,aAAYJ,GAAS,OACrB,SAAUM,EAAK,WAAa,GAAKJ,EAAS,SAC1C,MACE,CACE,GAAGR,EACH,yBAA0B,GAAGT,CAAY,KACzC,GAAImC,EAAc,CAAE,gBAAiBA,CAAY,EAAI,CAAC,EACtD,oBAAqB,GAAGlC,CAAO,KAC/B,oBAAqB,GAAGC,CAAO,IACjC,GAGF,gBAAC,OAAI,UAAU,0BACb,gBAAC4C,EAAA,KAAWR,CAAQ,CACtB,EACCG,CACH,CAEJ,CAAC,EAEDjD,EAAO,YAAc,eACrBA,EAAO,OAASgD",
6
+ "names": ["React", "classNames", "useComposedRefs", "BOTTOM_PROP_NAMES", "Bottom", "props", "ref", "className", "presentation", "defaultOpen", "open", "onOpenChange", "expandedSize", "minSize", "maxSize", "resizable", "collapsible", "onResize", "onResizeStart", "onResizeEnd", "children", "style", "size", "defaultSize", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "flush", "id", "domProps", "table", "attributes", "usePresentationTable", "pane", "usePane", "toPaneValue", "detailRest", "value", "reason", "useFrameRegistration", "elementRef", "composedRef", "useComposedRefs", "resize", "useResizablePane", "bottomAnchoredGrowth", "readBreakpoint", "initialSize", "useInitialPaneSize", "handles", "content", "splitHandles", "BottomHandle", "handle", "PaneResizeContext", "PaneHandle", "classNames", "paneAttributes", "PageScope"]
7
+ }
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as I,b as y,c as z,d as _,e as K}from"./chunk-2ACVWLFA.js";import{a as te}from"./chunk-TGRHRMQI.js";import{a as G}from"./chunk-3ZBEWLSO.js";import{b as re}from"./chunk-YOZXIUZY.js";import{b as H,c as U,d as k,e as Y,f as q}from"./chunk-GKDGNPBD.js";import{c as X}from"./chunk-5ON3XLRD.js";import{a as M,b as v,c as J,d as Q,e as E,f as Z,g as ee,h as N}from"./chunk-5JYSYTHA.js";import{c as B,e as oe,g,h as O,i as ne}from"./chunk-ISCZ57VL.js";import{b as h,c as $,d as T,e as x}from"./chunk-EB4AG3OL.js";import{a as L}from"./chunk-DFQIIYLD.js";import{c as S}from"./chunk-OKQAVYW4.js";import{a as he}from"./chunk-VQPANPMI.js";var Oe={};he(Oe,{CheckboxItem:()=>Me,Content:()=>de,Group:()=>me,Item:()=>ce,Label:()=>le,RadioGroup:()=>De,RadioItem:()=>we,Root:()=>ue,Separator:()=>be,Sub:()=>fe,SubContent:()=>Re,SubTrigger:()=>Pe,Trigger:()=>se,TriggerIcon:()=>Ie});import*as e from"react";import l from"classnames";import{DropdownMenu as s,Slot as W}from"radix-ui";import{useCallbackRef as ie}from"radix-ui/internal";var ae=e.createContext(!1),ue=o=>{let{open:n,defaultOpen:t=!1,onOpenChange:u}=o,[i,r]=e.useState(t),a=n??i,c=ie(u),p=e.useCallback(D=>{r(D),c(D)},[c]),m=e.useCallback(()=>p(!1),[p]);return e.createElement(ae.Provider,{value:a},e.createElement(oe,{value:m},e.createElement(s.Root,{...o,open:a,onOpenChange:p})))};ue.displayName="DropdownMenu.Root";var se=e.forwardRef(({children:o,...n},t)=>e.createElement(s.Trigger,{...n,ref:t,asChild:!0},te(o)));se.displayName="DropdownMenu.Trigger";var V=e.createContext({}),Te={ltr:"ArrowLeft",rtl:"ArrowRight"},xe={ltr:"ArrowRight",rtl:"ArrowLeft"};function Ee(o){return o instanceof HTMLElement&&(o.isContentEditable||o.tagName==="INPUT"||o.tagName==="TEXTAREA")}function pe(o){return o?.closest("[dir]")?.getAttribute("dir")==="rtl"?"rtl":"ltr"}var de=e.forwardRef((o,n)=>{let t=X(o,I.size),u=re(),{size:i=I.size.default}=t,{className:r,children:a,color:c,container:p,forceMount:m,submenuBehavior:D,virtualized:d=!1,onEscapeKeyDown:P,onKeyDown:R,...f}=S(t,I),b=c||u.accentColor,A=h(D,"cascade"),F=A==="drill-down",ge=e.useContext(ae),C=J(),ye=w=>{P?.(w),!(w.defaultPrevented||!F||C.getDepth()===0)&&(w.preventDefault(),C.pop("keyboard"))},Se=w=>{R?.(w),!(w.defaultPrevented||!F||C.getDepth()===0)&&(Ee(w.target)||w.key===Te[pe(w.currentTarget)]&&(w.preventDefault(),C.pop("keyboard")))},ke=e.useMemo(()=>({size:i,color:b}),[i,b]),j=e.createElement(B,{size:i},e.createElement(V.Provider,{value:ke},e.createElement(Q,{store:C,behavior:A,open:ge},a)));return e.createElement(s.Portal,{container:p,forceMount:m},e.createElement(G,{asChild:!0},e.createElement(s.Content,{"data-accent-color":b,align:"start",sideOffset:4,collisionPadding:10,...f,onEscapeKeyDown:ye,onKeyDown:Se,asChild:!1,ref:n,className:l("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-DropdownMenuContent",r)},d?e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport","kui-virtualized")},j):e.createElement(L,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport")},j)))))});de.displayName="DropdownMenu.Content";var le=e.forwardRef(({className:o,id:n,...t},u)=>{let i=e.useContext(M),r=ne(n,i);return i?e.createElement(s.Label,{...t,id:r,asChild:!1,ref:u,className:l("kui-BaseMenuLabel","kui-DropdownMenuLabel",o)}):null});le.displayName="DropdownMenu.Label";var ce=e.forwardRef((o,n)=>{let{className:t,children:u,color:i=z.color.default,shortcut:r,...a}=o;return e.useContext(M)?e.createElement(s.Item,{"data-accent-color":i,"aria-keyshortcuts":r?T(r):void 0,...a,ref:n,className:l("kui-reset","kui-BaseMenuItem","kui-DropdownMenuItem",t)},e.createElement(W.Slottable,null,u),r&&e.createElement(x,{shortcut:r,className:"kui-DropdownMenuShortcut"})):null});ce.displayName="DropdownMenu.Item";var me=e.forwardRef(({className:o,"aria-labelledby":n,...t},u)=>{let[i,r]=O(n),a=e.useContext(M);return e.createElement(g,{value:r},e.createElement(s.Group,{...a?{"aria-labelledby":i}:{role:"none"},...t,asChild:!1,ref:u,className:l("kui-BaseMenuGroup","kui-DropdownMenuGroup",o)}))});me.displayName="DropdownMenu.Group";var De=e.forwardRef(({className:o,"aria-labelledby":n,...t},u)=>{let[i,r]=O(n),a=e.useContext(M);return e.createElement(g,{value:r},e.createElement(s.RadioGroup,{...a?{"aria-labelledby":i}:{role:"none"},...t,asChild:!1,ref:u,className:l("kui-BaseMenuRadioGroup","kui-DropdownMenuRadioGroup",o)}))});De.displayName="DropdownMenu.RadioGroup";var we=e.forwardRef((o,n)=>{let{children:t,className:u,color:i=K.color.default,...r}=o;return e.useContext(M)?e.createElement(s.RadioItem,{...r,asChild:!1,ref:n,"data-accent-color":i,className:l("kui-BaseMenuItem","kui-BaseMenuRadioItem","kui-DropdownMenuItem","kui-DropdownMenuRadioItem",u)},e.createElement(W.Slottable,null,t),e.createElement(s.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-DropdownMenuItemIndicator"},e.createElement(q,{className:"kui-BaseMenuItemIndicatorIcon kui-DropdownMenuItemIndicatorIcon"}))):null});we.displayName="DropdownMenu.RadioItem";var Me=e.forwardRef((o,n)=>{let{children:t,className:u,shortcut:i,color:r=_.color.default,...a}=o;return e.useContext(M)?e.createElement(s.CheckboxItem,{"aria-keyshortcuts":i?T(i):void 0,...a,asChild:!1,ref:n,"data-accent-color":r,className:l("kui-BaseMenuItem","kui-BaseMenuCheckboxItem","kui-DropdownMenuItem","kui-DropdownMenuCheckboxItem",u)},e.createElement(W.Slottable,null,t),e.createElement(s.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-DropdownMenuItemIndicator"},e.createElement(H,{className:"kui-BaseMenuItemIndicatorIcon kui-DropdownMenuItemIndicatorIcon"})),i&&e.createElement(x,{shortcut:i,className:"kui-DropdownMenuShortcut"})):null});Me.displayName="DropdownMenu.CheckboxItem";var fe=({label:o="Back",open:n,defaultOpen:t,onOpenChange:u,children:i})=>{let r=v(),a=e.useId(),c=e.useMemo(()=>({id:a,label:o}),[a,o]),p=E(r,a)!=="closed",m=ie(u),D=n!==void 0;e.useLayoutEffect(()=>{if(!(!r||!D))return r.setController(a,m),()=>r.setController(a,null)},[r,D,a,m]),e.useLayoutEffect(()=>{!r||n===void 0||(n&&!r.isOpen(a)?r.open(a,r.takePendingModality(a)):!n&&r.isOpen(a)&&r.close(a,r.takePendingModality(a)))},[r,n,a]);let d=e.useRef(n===void 0&&!!t);e.useLayoutEffect(()=>{r&&d.current?r.open(a):d.current=!1},[]);let P=e.useRef(p);return e.useEffect(()=>{if(!(!r||P.current===p)){if(P.current=p,p&&d.current){d.current=!1;return}n!==void 0&&n===p||m(p)}},[r,p,m,n]),e.createElement(ee.Provider,{value:c},e.createElement(s.Sub,{open:n,defaultOpen:t,onOpenChange:r?void 0:u},i))};fe.displayName="DropdownMenu.Sub";var Pe=e.forwardRef((o,n)=>{let{className:t,children:u,onKeyDown:i,...r}=o,a=v(),c=N(),p=e.useContext(M);if(a&&c){if(!p)return null;let m=d=>{d.preventDefault(),a.push(c.id)},D=d=>{i?.(d),!(d.defaultPrevented||r.disabled)&&d.key===xe[pe(d.currentTarget)]&&(d.preventDefault(),a.push(c.id,"keyboard"))};return e.createElement(s.Item,{...r,"data-drill-down-trigger":c.id,"data-drill-down-name":r.textValue,onSelect:m,onKeyDown:D,ref:n,className:l("kui-reset","kui-BaseMenuItem","kui-BaseMenuSubTrigger","kui-DropdownMenuItem","kui-DropdownMenuSubTrigger","kui-DropdownMenuDrillDownSubTrigger",t)},u,e.createElement("div",{className:"kui-BaseMenuShortcut kui-DropdownMenuShortcut"},e.createElement(k,{className:"kui-BaseMenuSubTriggerIcon kui-DropdownMenuSubTriggerIcon"})))}return e.createElement(s.SubTrigger,{...r,onKeyDown:i,asChild:!1,ref:n,className:l("kui-BaseMenuItem","kui-BaseMenuSubTrigger","kui-DropdownMenuItem","kui-DropdownMenuSubTrigger",t)},u,e.createElement("div",{className:"kui-BaseMenuShortcut kui-DropdownMenuShortcut"},e.createElement(k,{className:"kui-BaseMenuSubTriggerIcon kui-DropdownMenuSubTriggerIcon"})))});Pe.displayName="DropdownMenu.SubTrigger";var be=e.forwardRef(({className:o,...n},t)=>e.useContext(M)?e.createElement(s.Separator,{...n,asChild:!1,ref:t,className:l("kui-BaseMenuSeparator","kui-DropdownMenuSeparator",o)}):null);be.displayName="DropdownMenu.Separator";function Ne({label:o,name:n}){let t=v(),u=e.useCallback(a=>{a.preventDefault(),t?.pop()},[t]),i=typeof o=="string"?o:n,r=i&&i!=="Back"?`Back from ${i}`:void 0;return e.createElement(s.Item,{"aria-label":r,textValue:i||"Back",onSelect:u,className:l("kui-reset","kui-BaseMenuItem","kui-DropdownMenuItem","kui-DropdownMenuDrillDownBackItem")},e.createElement(Y,{className:"kui-BaseMenuSubTriggerIcon kui-DropdownMenuDrillDownBackIcon"}),e.createElement("span",{className:"kui-DropdownMenuDrillDownBackLabel"},o))}function Be(o){let{loop:n,onEscapeKeyDown:t,onPointerDownOutside:u,onFocusOutside:i,onInteractOutside:r,sideOffset:a,alignOffset:c,avoidCollisions:p,collisionBoundary:m,collisionPadding:D,arrowPadding:d,sticky:P,hideWhenDetached:R,updatePositionStrategy:f,...b}=o;return b}var Re=e.forwardRef((o,n)=>{let t=v(),u=N();return t&&u?e.createElement(ve,{...o,ref:n,store:t,sub:u}):e.createElement(Ce,{...o,ref:n})});Re.displayName="DropdownMenu.SubContent";var Ce=e.forwardRef((o,n)=>{let t=e.useContext(V),u=o.size??t.size,i=o.color??t.color,{className:r,children:a,container:c,forceMount:p,color:m,virtualized:D=!1,...d}=S({...o,size:u},y),P=h(u,y.size.default),R=e.useMemo(()=>({size:u,color:i}),[u,i]),f=e.createElement(B,{size:u},e.createElement(V.Provider,{value:R},a));return e.createElement(s.Portal,{container:c,forceMount:p},e.createElement(G,{asChild:!0},e.createElement(s.SubContent,{"data-accent-color":i,alignOffset:$(P),sideOffset:1,collisionPadding:10,...d,asChild:!1,ref:n,className:l("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-BaseMenuSubContent","kui-DropdownMenuContent","kui-DropdownMenuSubContent",r)},D?e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport","kui-virtualized")},f):e.createElement(L,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport")},f)))))});Ce.displayName="DropdownMenu.CascadeSubContent";var ve=e.forwardRef(({store:o,sub:n,...t},u)=>{let i=E(o,n.id),r=Z(o,n.id);if(i==="closed")return null;let{className:a,children:c,container:p,forceMount:m,virtualized:D,size:d,color:P,...R}=Be(t),f=i==="top",b=r?.name||(typeof n.label=="string"?n.label:"");return e.createElement("div",{role:"group","aria-label":b||void 0,...R,ref:u,"data-drill-down-panel":n.id,"data-drill-down-active":f?!0:void 0,className:l("kui-DropdownMenuDrillDownPanel",a)},f&&e.createElement(e.Fragment,null,e.createElement(Ne,{label:n.label,name:b}),e.createElement(s.Separator,{className:"kui-BaseMenuSeparator kui-DropdownMenuSeparator"})),e.createElement(g,{value:null},e.createElement(M.Provider,{value:f},c)))});ve.displayName="DropdownMenu.DrillDownPanel";var Ie=e.forwardRef(({className:o,...n},t)=>e.createElement(U,{...n,ref:t,className:l("kui-DropdownMenuTriggerIcon",o)}));Ie.displayName="DropdownMenu.TriggerIcon";export{ue as a,se as b,de as c,le as d,ce as e,me as f,De as g,we as h,Me as i,fe as j,Pe as k,be as l,Re as m,Ie as n,Oe as o};
3
- //# sourceMappingURL=chunk-IN6D33TU.js.map
2
+ import{a as I,b as y,c as z,d as _,e as K}from"./chunk-2ACVWLFA.js";import{a as te}from"./chunk-TGRHRMQI.js";import{a as G}from"./chunk-3ZBEWLSO.js";import{b as re}from"./chunk-YOZXIUZY.js";import{b as H,c as U,d as k,e as Y,f as q}from"./chunk-GKDGNPBD.js";import{c as X}from"./chunk-5ON3XLRD.js";import{a as M,b as v,c as J,d as Q,e as E,f as Z,g as ee,h as N}from"./chunk-5JYSYTHA.js";import{c as B,e as oe,g,h as O,i as ne}from"./chunk-DJGZ4K3V.js";import{b as h,c as $,d as T,e as x}from"./chunk-REELD6CT.js";import{a as L}from"./chunk-DFQIIYLD.js";import{c as S}from"./chunk-OKQAVYW4.js";import{a as he}from"./chunk-VQPANPMI.js";var Oe={};he(Oe,{CheckboxItem:()=>Me,Content:()=>de,Group:()=>me,Item:()=>ce,Label:()=>le,RadioGroup:()=>De,RadioItem:()=>we,Root:()=>ue,Separator:()=>be,Sub:()=>fe,SubContent:()=>Re,SubTrigger:()=>Pe,Trigger:()=>se,TriggerIcon:()=>Ie});import*as e from"react";import l from"classnames";import{DropdownMenu as s,Slot as W}from"radix-ui";import{useCallbackRef as ie}from"radix-ui/internal";var ae=e.createContext(!1),ue=o=>{let{open:n,defaultOpen:t=!1,onOpenChange:u}=o,[i,r]=e.useState(t),a=n??i,c=ie(u),p=e.useCallback(D=>{r(D),c(D)},[c]),m=e.useCallback(()=>p(!1),[p]);return e.createElement(ae.Provider,{value:a},e.createElement(oe,{value:m},e.createElement(s.Root,{...o,open:a,onOpenChange:p})))};ue.displayName="DropdownMenu.Root";var se=e.forwardRef(({children:o,...n},t)=>e.createElement(s.Trigger,{...n,ref:t,asChild:!0},te(o)));se.displayName="DropdownMenu.Trigger";var V=e.createContext({}),Te={ltr:"ArrowLeft",rtl:"ArrowRight"},xe={ltr:"ArrowRight",rtl:"ArrowLeft"};function Ee(o){return o instanceof HTMLElement&&(o.isContentEditable||o.tagName==="INPUT"||o.tagName==="TEXTAREA")}function pe(o){return o?.closest("[dir]")?.getAttribute("dir")==="rtl"?"rtl":"ltr"}var de=e.forwardRef((o,n)=>{let t=X(o,I.size),u=re(),{size:i=I.size.default}=t,{className:r,children:a,color:c,container:p,forceMount:m,submenuBehavior:D,virtualized:d=!1,onEscapeKeyDown:P,onKeyDown:R,...f}=S(t,I),b=c||u.accentColor,A=h(D,"cascade"),F=A==="drill-down",ge=e.useContext(ae),C=J(),ye=w=>{P?.(w),!(w.defaultPrevented||!F||C.getDepth()===0)&&(w.preventDefault(),C.pop("keyboard"))},Se=w=>{R?.(w),!(w.defaultPrevented||!F||C.getDepth()===0)&&(Ee(w.target)||w.key===Te[pe(w.currentTarget)]&&(w.preventDefault(),C.pop("keyboard")))},ke=e.useMemo(()=>({size:i,color:b}),[i,b]),j=e.createElement(B,{size:i},e.createElement(V.Provider,{value:ke},e.createElement(Q,{store:C,behavior:A,open:ge},a)));return e.createElement(s.Portal,{container:p,forceMount:m},e.createElement(G,{asChild:!0},e.createElement(s.Content,{"data-accent-color":b,align:"start",sideOffset:4,collisionPadding:10,...f,onEscapeKeyDown:ye,onKeyDown:Se,asChild:!1,ref:n,className:l("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-DropdownMenuContent",r)},d?e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport","kui-virtualized")},j):e.createElement(L,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport")},j)))))});de.displayName="DropdownMenu.Content";var le=e.forwardRef(({className:o,id:n,...t},u)=>{let i=e.useContext(M),r=ne(n,i);return i?e.createElement(s.Label,{...t,id:r,asChild:!1,ref:u,className:l("kui-BaseMenuLabel","kui-DropdownMenuLabel",o)}):null});le.displayName="DropdownMenu.Label";var ce=e.forwardRef((o,n)=>{let{className:t,children:u,color:i=z.color.default,shortcut:r,...a}=o;return e.useContext(M)?e.createElement(s.Item,{"data-accent-color":i,"aria-keyshortcuts":r?T(r):void 0,...a,ref:n,className:l("kui-reset","kui-BaseMenuItem","kui-DropdownMenuItem",t)},e.createElement(W.Slottable,null,u),r&&e.createElement(x,{shortcut:r,className:"kui-DropdownMenuShortcut"})):null});ce.displayName="DropdownMenu.Item";var me=e.forwardRef(({className:o,"aria-labelledby":n,...t},u)=>{let[i,r]=O(n),a=e.useContext(M);return e.createElement(g,{value:r},e.createElement(s.Group,{...a?{"aria-labelledby":i}:{role:"none"},...t,asChild:!1,ref:u,className:l("kui-BaseMenuGroup","kui-DropdownMenuGroup",o)}))});me.displayName="DropdownMenu.Group";var De=e.forwardRef(({className:o,"aria-labelledby":n,...t},u)=>{let[i,r]=O(n),a=e.useContext(M);return e.createElement(g,{value:r},e.createElement(s.RadioGroup,{...a?{"aria-labelledby":i}:{role:"none"},...t,asChild:!1,ref:u,className:l("kui-BaseMenuRadioGroup","kui-DropdownMenuRadioGroup",o)}))});De.displayName="DropdownMenu.RadioGroup";var we=e.forwardRef((o,n)=>{let{children:t,className:u,color:i=K.color.default,...r}=o;return e.useContext(M)?e.createElement(s.RadioItem,{...r,asChild:!1,ref:n,"data-accent-color":i,className:l("kui-BaseMenuItem","kui-BaseMenuRadioItem","kui-DropdownMenuItem","kui-DropdownMenuRadioItem",u)},e.createElement(W.Slottable,null,t),e.createElement(s.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-DropdownMenuItemIndicator"},e.createElement(q,{className:"kui-BaseMenuItemIndicatorIcon kui-DropdownMenuItemIndicatorIcon"}))):null});we.displayName="DropdownMenu.RadioItem";var Me=e.forwardRef((o,n)=>{let{children:t,className:u,shortcut:i,color:r=_.color.default,...a}=o;return e.useContext(M)?e.createElement(s.CheckboxItem,{"aria-keyshortcuts":i?T(i):void 0,...a,asChild:!1,ref:n,"data-accent-color":r,className:l("kui-BaseMenuItem","kui-BaseMenuCheckboxItem","kui-DropdownMenuItem","kui-DropdownMenuCheckboxItem",u)},e.createElement(W.Slottable,null,t),e.createElement(s.ItemIndicator,{className:"kui-BaseMenuItemIndicator kui-DropdownMenuItemIndicator"},e.createElement(H,{className:"kui-BaseMenuItemIndicatorIcon kui-DropdownMenuItemIndicatorIcon"})),i&&e.createElement(x,{shortcut:i,className:"kui-DropdownMenuShortcut"})):null});Me.displayName="DropdownMenu.CheckboxItem";var fe=({label:o="Back",open:n,defaultOpen:t,onOpenChange:u,children:i})=>{let r=v(),a=e.useId(),c=e.useMemo(()=>({id:a,label:o}),[a,o]),p=E(r,a)!=="closed",m=ie(u),D=n!==void 0;e.useLayoutEffect(()=>{if(!(!r||!D))return r.setController(a,m),()=>r.setController(a,null)},[r,D,a,m]),e.useLayoutEffect(()=>{!r||n===void 0||(n&&!r.isOpen(a)?r.open(a,r.takePendingModality(a)):!n&&r.isOpen(a)&&r.close(a,r.takePendingModality(a)))},[r,n,a]);let d=e.useRef(n===void 0&&!!t);e.useLayoutEffect(()=>{r&&d.current?r.open(a):d.current=!1},[]);let P=e.useRef(p);return e.useEffect(()=>{if(!(!r||P.current===p)){if(P.current=p,p&&d.current){d.current=!1;return}n!==void 0&&n===p||m(p)}},[r,p,m,n]),e.createElement(ee.Provider,{value:c},e.createElement(s.Sub,{open:n,defaultOpen:t,onOpenChange:r?void 0:u},i))};fe.displayName="DropdownMenu.Sub";var Pe=e.forwardRef((o,n)=>{let{className:t,children:u,onKeyDown:i,...r}=o,a=v(),c=N(),p=e.useContext(M);if(a&&c){if(!p)return null;let m=d=>{d.preventDefault(),a.push(c.id)},D=d=>{i?.(d),!(d.defaultPrevented||r.disabled)&&d.key===xe[pe(d.currentTarget)]&&(d.preventDefault(),a.push(c.id,"keyboard"))};return e.createElement(s.Item,{...r,"data-drill-down-trigger":c.id,"data-drill-down-name":r.textValue,onSelect:m,onKeyDown:D,ref:n,className:l("kui-reset","kui-BaseMenuItem","kui-BaseMenuSubTrigger","kui-DropdownMenuItem","kui-DropdownMenuSubTrigger","kui-DropdownMenuDrillDownSubTrigger",t)},u,e.createElement("div",{className:"kui-BaseMenuShortcut kui-DropdownMenuShortcut"},e.createElement(k,{className:"kui-BaseMenuSubTriggerIcon kui-DropdownMenuSubTriggerIcon"})))}return e.createElement(s.SubTrigger,{...r,onKeyDown:i,asChild:!1,ref:n,className:l("kui-BaseMenuItem","kui-BaseMenuSubTrigger","kui-DropdownMenuItem","kui-DropdownMenuSubTrigger",t)},u,e.createElement("div",{className:"kui-BaseMenuShortcut kui-DropdownMenuShortcut"},e.createElement(k,{className:"kui-BaseMenuSubTriggerIcon kui-DropdownMenuSubTriggerIcon"})))});Pe.displayName="DropdownMenu.SubTrigger";var be=e.forwardRef(({className:o,...n},t)=>e.useContext(M)?e.createElement(s.Separator,{...n,asChild:!1,ref:t,className:l("kui-BaseMenuSeparator","kui-DropdownMenuSeparator",o)}):null);be.displayName="DropdownMenu.Separator";function Ne({label:o,name:n}){let t=v(),u=e.useCallback(a=>{a.preventDefault(),t?.pop()},[t]),i=typeof o=="string"?o:n,r=i&&i!=="Back"?`Back from ${i}`:void 0;return e.createElement(s.Item,{"aria-label":r,textValue:i||"Back",onSelect:u,className:l("kui-reset","kui-BaseMenuItem","kui-DropdownMenuItem","kui-DropdownMenuDrillDownBackItem")},e.createElement(Y,{className:"kui-BaseMenuSubTriggerIcon kui-DropdownMenuDrillDownBackIcon"}),e.createElement("span",{className:"kui-DropdownMenuDrillDownBackLabel"},o))}function Be(o){let{loop:n,onEscapeKeyDown:t,onPointerDownOutside:u,onFocusOutside:i,onInteractOutside:r,sideOffset:a,alignOffset:c,avoidCollisions:p,collisionBoundary:m,collisionPadding:D,arrowPadding:d,sticky:P,hideWhenDetached:R,updatePositionStrategy:f,...b}=o;return b}var Re=e.forwardRef((o,n)=>{let t=v(),u=N();return t&&u?e.createElement(ve,{...o,ref:n,store:t,sub:u}):e.createElement(Ce,{...o,ref:n})});Re.displayName="DropdownMenu.SubContent";var Ce=e.forwardRef((o,n)=>{let t=e.useContext(V),u=o.size??t.size,i=o.color??t.color,{className:r,children:a,container:c,forceMount:p,color:m,virtualized:D=!1,...d}=S({...o,size:u},y),P=h(u,y.size.default),R=e.useMemo(()=>({size:u,color:i}),[u,i]),f=e.createElement(B,{size:u},e.createElement(V.Provider,{value:R},a));return e.createElement(s.Portal,{container:c,forceMount:p},e.createElement(G,{asChild:!0},e.createElement(s.SubContent,{"data-accent-color":i,alignOffset:$(P),sideOffset:1,collisionPadding:10,...d,asChild:!1,ref:n,className:l("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-BaseMenuSubContent","kui-DropdownMenuContent","kui-DropdownMenuSubContent",r)},D?e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport","kui-virtualized")},f):e.createElement(L,{type:"auto",scrollbars:"vertical"},e.createElement("div",{className:l("kui-BaseMenuViewport","kui-DropdownMenuViewport")},f)))))});Ce.displayName="DropdownMenu.CascadeSubContent";var ve=e.forwardRef(({store:o,sub:n,...t},u)=>{let i=E(o,n.id),r=Z(o,n.id);if(i==="closed")return null;let{className:a,children:c,container:p,forceMount:m,virtualized:D,size:d,color:P,...R}=Be(t),f=i==="top",b=r?.name||(typeof n.label=="string"?n.label:"");return e.createElement("div",{role:"group","aria-label":b||void 0,...R,ref:u,"data-drill-down-panel":n.id,"data-drill-down-active":f?!0:void 0,className:l("kui-DropdownMenuDrillDownPanel",a)},f&&e.createElement(e.Fragment,null,e.createElement(Ne,{label:n.label,name:b}),e.createElement(s.Separator,{className:"kui-BaseMenuSeparator kui-DropdownMenuSeparator"})),e.createElement(g,{value:null},e.createElement(M.Provider,{value:f},c)))});ve.displayName="DropdownMenu.DrillDownPanel";var Ie=e.forwardRef(({className:o,...n},t)=>e.createElement(U,{...n,ref:t,className:l("kui-DropdownMenuTriggerIcon",o)}));Ie.displayName="DropdownMenu.TriggerIcon";export{ue as a,se as b,de as c,le as d,ce as e,me as f,De as g,we as h,Me as i,fe as j,Pe as k,be as l,Re as m,Ie as n,Oe as o};
3
+ //# sourceMappingURL=chunk-5XO3PLDH.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{c as i}from"./chunk-HBWBPBSA.js";import{b as f}from"./chunk-G66WDIIV.js";import{b as l}from"./chunk-MAA6LEE2.js";import{c as s}from"./chunk-OKQAVYW4.js";import*as e from"react";import S from"classnames";var v=["horizontal","vertical"],c={orientation:{type:"enum",className:"kui-r-orientation",values:v,default:"horizontal",responsive:!0},color:{...i.color,default:"gray"},decorative:{type:"boolean",default:!1},light:{type:"boolean",className:"kui-light",default:!1}};var D=e.forwardRef((o,m)=>{let{className:P,color:u,decorative:a,...d}=s(o,c),p=typeof o.orientation=="object"&&o.orientation!==null,{breakpoint:y}=f(p),r="horizontal";if(p){let n=o.orientation;for(let t of l)if(n[t]!==void 0&&(r=n[t]),t===y)break}else o.orientation==="vertical"&&(r="vertical");return e.createElement("span",{"data-accent-color":u,role:a?void 0:"separator","aria-orientation":a?void 0:r,...d,ref:m,className:S("kui-Separator",P)})});D.displayName="Separator";export{D as a};
3
- //# sourceMappingURL=chunk-COLJWVN7.js.map
2
+ import{c as i}from"./chunk-HBWBPBSA.js";import{b as f}from"./chunk-WJKCXGVN.js";import{b as l}from"./chunk-MDQ7ZHOS.js";import{c as s}from"./chunk-OKQAVYW4.js";import*as e from"react";import S from"classnames";var v=["horizontal","vertical"],c={orientation:{type:"enum",className:"kui-r-orientation",values:v,default:"horizontal",responsive:!0},color:{...i.color,default:"gray"},decorative:{type:"boolean",default:!1},light:{type:"boolean",className:"kui-light",default:!1}};var D=e.forwardRef((o,m)=>{let{className:P,color:u,decorative:a,...d}=s(o,c),p=typeof o.orientation=="object"&&o.orientation!==null,{breakpoint:y}=f(p),r="horizontal";if(p){let n=o.orientation;for(let t of l)if(n[t]!==void 0&&(r=n[t]),t===y)break}else o.orientation==="vertical"&&(r="vertical");return e.createElement("span",{"data-accent-color":u,role:a?void 0:"separator","aria-orientation":a?void 0:r,...d,ref:m,className:S("kui-Separator",P)})});D.displayName="Separator";export{D as a};
3
+ //# sourceMappingURL=chunk-AQR42GKA.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{b as P,d as _,f as $}from"./chunk-ISCZ57VL.js";import*as t from"react";import L from"classnames";import{useVirtualizer as oe}from"@tanstack/react-virtual";import{useLayoutEffect as A}from"radix-ui/internal";function B(r,i){if(r.style?.height!==i.style?.height||r.style?.transform!==i.style?.transform)return!1;let c=Object.keys(r);return c.length!==Object.keys(i).length?!1:c.every(s=>s==="style"||Object.is(r[s],i[s]))}var ce=t.memo(function({label:i,isHighlighted:c,id:s,style:m,tabIndex:f,"data-highlighted":u,"data-index":d,"aria-setsize":I,"aria-posinset":y,onMouseEnter:E,onMouseLeave:H,onClick:h,onKeyDown:T}){return t.createElement("div",{id:s,role:"menuitem",className:L("kui-reset","kui-BaseMenuItem","kui-VirtualMenuItem"),style:m,tabIndex:f,"data-highlighted":u,"data-index":d,"aria-setsize":I,"aria-posinset":y,onMouseEnter:E,onMouseLeave:H,onClick:h,onKeyDown:T},i)},B);function le(r,i,c){let[s,m]=t.useState(void 0);return A(()=>{let f=r.current;if(!i||!f)return;let u=document.createElement("div");u.className="kui-reset kui-BaseMenuItem kui-VirtualMenuItem",u.setAttribute("aria-hidden","true"),u.style.visibility="hidden",u.textContent="\xA0",f.appendChild(u);let d=u.getBoundingClientRect().height;u.remove(),m(d>0?d:void 0)},[r,i,c]),i?s:void 0}function de({items:r,itemLabel:i,renderItem:c,size:s,estimatedItemSize:m,overscan:f=5,onSelect:u,className:d,style:I,onKeyDown:y,onFocus:E,...H},h){let T=t.useId(),x=t.useRef(null),[S,g]=t.useState(-1),{isInsideMenu:l,size:C,itemHeight:U}=_(),D=$(),Y=t.useCallback(e=>{x.current=e,typeof h=="function"?h(e):h&&(h.current=e)},[h]),G=le(x,l&&s==null&&m==null,C),M=m??(s?P(s):G??U??P(C??"2"));if(!i&&!c)throw new Error("VirtualMenu requires either itemLabel or renderItem prop");let J=t.useMemo(()=>i?typeof i=="function"?i:e=>e[i]:null,[i]),v=t.useMemo(()=>r.length===0||S<0?-1:Math.min(S,r.length-1),[S,r.length]),Q=t.useMemo(()=>typeof M=="function"?M:()=>M,[M]),R=oe({count:r.length,getScrollElement:()=>x.current,estimateSize:Q,overscan:f}),X=R.getVirtualItems();A(()=>{R.measure()},[R,M]),t.useEffect(()=>{let e=x.current;if(!l||!e)return;let n=e.closest("[data-radix-menu-content]");if(!n)return;let a=o=>{o.target===n&&e.focus({preventScroll:!0})};return n.addEventListener("focusin",a),document.activeElement===n&&e.focus({preventScroll:!0}),()=>n.removeEventListener("focusin",a)},[l]);let z=t.useRef(y),w=t.useRef(E);z.current=y,w.current=E;let k=t.useRef(r),N=t.useRef(u),K=t.useRef(D);k.current=r,N.current=u,K.current=D;let p=t.useCallback(e=>{let n=k.current;e<0||e>=n.length||(N.current?.(n[e],e),K.current?.())},[]),b=t.useRef(R.scrollToIndex);b.current=R.scrollToIndex;let V=t.useRef(v);V.current=v;let Z=t.useCallback(e=>{let n=e.currentTarget.dataset.index;n!=null&&g(Number(n))},[]),ee=t.useCallback(e=>{let n=e.currentTarget.dataset.index;n!=null&&p(Number(n))},[p]),te=t.useCallback(e=>{let n=Number(e.currentTarget.dataset.index);g(a=>a===n?-1:a)},[]),ne=t.useCallback(e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault(),e.stopPropagation();let n=e.currentTarget.dataset.index;n!=null&&p(Number(n))}},[p]),re=t.useCallback(e=>{if(z.current?.(e),e.defaultPrevented)return;let n=k.current,a=V.current;switch(e.key){case"ArrowDown":{e.preventDefault();let o=a<n.length-1?a+1:0;g(o),b.current(o,{align:"auto"});break}case"ArrowUp":{e.preventDefault();let o=a>0?a-1:n.length-1;g(o),b.current(o,{align:"auto"});break}case"Home":{e.preventDefault(),g(0),b.current(0,{align:"start"});break}case"End":{e.preventDefault();let o=n.length-1;g(o),b.current(o,{align:"end"});break}case"Enter":case" ":{e.preventDefault(),p(a);break}case"Tab":{l&&e.preventDefault();break}case"Escape":{l||e.currentTarget.blur();break}default:l&&e.key.length===1&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.stopPropagation()}},[p,l]),ie=t.useCallback(e=>{w.current?.(e),e.target===e.currentTarget&&V.current<0&&k.current.length>0&&g(0)},[]),O=t.useCallback(e=>`${T}-item-${e}`,[T]),ae=t.useMemo(()=>({overflow:"auto",position:"relative",...I}),[I]),j=R.getTotalSize(),se=t.useMemo(()=>({height:`${j}px`,width:"100%",position:"relative"}),[j]);return t.createElement("div",{...H,ref:Y,role:l?"group":"menu","aria-activedescendant":v>=0?O(v):void 0,tabIndex:0,onKeyDown:re,onFocus:ie,className:L("kui-VirtualMenuRoot",!l&&`kui-r-size-${s??"2"}`,d),style:ae},t.createElement("div",{className:"kui-VirtualMenuViewport",style:se},X.map(e=>{let n=r[e.index],a=e.index,o=v===a,ue={height:e.size,transform:`translateY(${e.start}px)`},F={id:O(a),isHighlighted:o,style:ue,tabIndex:-1,"data-highlighted":o?!0:void 0,"data-index":a,"aria-setsize":r.length,"aria-posinset":a+1,onMouseEnter:Z,onMouseLeave:te,onClick:ee,onKeyDown:ne};return c?t.createElement(c,{key:e.key,item:n,index:a,...F}):t.createElement(ce,{key:e.key,label:J(n),...F})})))}var q=t.forwardRef(de);q.displayName="VirtualMenu";var W=t.forwardRef(({className:r,children:i,...c},s)=>{let{isHighlighted:m,index:f,item:u,...d}=c;return t.createElement("div",{ref:s,role:"menuitem",className:L("kui-reset","kui-BaseMenuItem","kui-VirtualMenuItem",r),...d},i)});W.displayName="VirtualMenu.Item";var me=t.memo(W,B),pe=Object.assign(q,{Item:me});export{pe as a};
3
- //# sourceMappingURL=chunk-FTNZWAPB.js.map
2
+ import{b as P,d as _,f as $}from"./chunk-DJGZ4K3V.js";import*as t from"react";import L from"classnames";import{useVirtualizer as oe}from"@tanstack/react-virtual";import{useLayoutEffect as A}from"radix-ui/internal";function B(r,i){if(r.style?.height!==i.style?.height||r.style?.transform!==i.style?.transform)return!1;let c=Object.keys(r);return c.length!==Object.keys(i).length?!1:c.every(s=>s==="style"||Object.is(r[s],i[s]))}var ce=t.memo(function({label:i,isHighlighted:c,id:s,style:m,tabIndex:f,"data-highlighted":u,"data-index":d,"aria-setsize":I,"aria-posinset":y,onMouseEnter:E,onMouseLeave:H,onClick:h,onKeyDown:T}){return t.createElement("div",{id:s,role:"menuitem",className:L("kui-reset","kui-BaseMenuItem","kui-VirtualMenuItem"),style:m,tabIndex:f,"data-highlighted":u,"data-index":d,"aria-setsize":I,"aria-posinset":y,onMouseEnter:E,onMouseLeave:H,onClick:h,onKeyDown:T},i)},B);function le(r,i,c){let[s,m]=t.useState(void 0);return A(()=>{let f=r.current;if(!i||!f)return;let u=document.createElement("div");u.className="kui-reset kui-BaseMenuItem kui-VirtualMenuItem",u.setAttribute("aria-hidden","true"),u.style.visibility="hidden",u.textContent="\xA0",f.appendChild(u);let d=u.getBoundingClientRect().height;u.remove(),m(d>0?d:void 0)},[r,i,c]),i?s:void 0}function de({items:r,itemLabel:i,renderItem:c,size:s,estimatedItemSize:m,overscan:f=5,onSelect:u,className:d,style:I,onKeyDown:y,onFocus:E,...H},h){let T=t.useId(),x=t.useRef(null),[S,g]=t.useState(-1),{isInsideMenu:l,size:C,itemHeight:U}=_(),D=$(),Y=t.useCallback(e=>{x.current=e,typeof h=="function"?h(e):h&&(h.current=e)},[h]),G=le(x,l&&s==null&&m==null,C),M=m??(s?P(s):G??U??P(C??"2"));if(!i&&!c)throw new Error("VirtualMenu requires either itemLabel or renderItem prop");let J=t.useMemo(()=>i?typeof i=="function"?i:e=>e[i]:null,[i]),v=t.useMemo(()=>r.length===0||S<0?-1:Math.min(S,r.length-1),[S,r.length]),Q=t.useMemo(()=>typeof M=="function"?M:()=>M,[M]),R=oe({count:r.length,getScrollElement:()=>x.current,estimateSize:Q,overscan:f}),X=R.getVirtualItems();A(()=>{R.measure()},[R,M]),t.useEffect(()=>{let e=x.current;if(!l||!e)return;let n=e.closest("[data-radix-menu-content]");if(!n)return;let a=o=>{o.target===n&&e.focus({preventScroll:!0})};return n.addEventListener("focusin",a),document.activeElement===n&&e.focus({preventScroll:!0}),()=>n.removeEventListener("focusin",a)},[l]);let z=t.useRef(y),w=t.useRef(E);z.current=y,w.current=E;let k=t.useRef(r),N=t.useRef(u),K=t.useRef(D);k.current=r,N.current=u,K.current=D;let p=t.useCallback(e=>{let n=k.current;e<0||e>=n.length||(N.current?.(n[e],e),K.current?.())},[]),b=t.useRef(R.scrollToIndex);b.current=R.scrollToIndex;let V=t.useRef(v);V.current=v;let Z=t.useCallback(e=>{let n=e.currentTarget.dataset.index;n!=null&&g(Number(n))},[]),ee=t.useCallback(e=>{let n=e.currentTarget.dataset.index;n!=null&&p(Number(n))},[p]),te=t.useCallback(e=>{let n=Number(e.currentTarget.dataset.index);g(a=>a===n?-1:a)},[]),ne=t.useCallback(e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault(),e.stopPropagation();let n=e.currentTarget.dataset.index;n!=null&&p(Number(n))}},[p]),re=t.useCallback(e=>{if(z.current?.(e),e.defaultPrevented)return;let n=k.current,a=V.current;switch(e.key){case"ArrowDown":{e.preventDefault();let o=a<n.length-1?a+1:0;g(o),b.current(o,{align:"auto"});break}case"ArrowUp":{e.preventDefault();let o=a>0?a-1:n.length-1;g(o),b.current(o,{align:"auto"});break}case"Home":{e.preventDefault(),g(0),b.current(0,{align:"start"});break}case"End":{e.preventDefault();let o=n.length-1;g(o),b.current(o,{align:"end"});break}case"Enter":case" ":{e.preventDefault(),p(a);break}case"Tab":{l&&e.preventDefault();break}case"Escape":{l||e.currentTarget.blur();break}default:l&&e.key.length===1&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.stopPropagation()}},[p,l]),ie=t.useCallback(e=>{w.current?.(e),e.target===e.currentTarget&&V.current<0&&k.current.length>0&&g(0)},[]),O=t.useCallback(e=>`${T}-item-${e}`,[T]),ae=t.useMemo(()=>({overflow:"auto",position:"relative",...I}),[I]),j=R.getTotalSize(),se=t.useMemo(()=>({height:`${j}px`,width:"100%",position:"relative"}),[j]);return t.createElement("div",{...H,ref:Y,role:l?"group":"menu","aria-activedescendant":v>=0?O(v):void 0,tabIndex:0,onKeyDown:re,onFocus:ie,className:L("kui-VirtualMenuRoot",!l&&`kui-r-size-${s??"2"}`,d),style:ae},t.createElement("div",{className:"kui-VirtualMenuViewport",style:se},X.map(e=>{let n=r[e.index],a=e.index,o=v===a,ue={height:e.size,transform:`translateY(${e.start}px)`},F={id:O(a),isHighlighted:o,style:ue,tabIndex:-1,"data-highlighted":o?!0:void 0,"data-index":a,"aria-setsize":r.length,"aria-posinset":a+1,onMouseEnter:Z,onMouseLeave:te,onClick:ee,onKeyDown:ne};return c?t.createElement(c,{key:e.key,item:n,index:a,...F}):t.createElement(ce,{key:e.key,label:J(n),...F})})))}var q=t.forwardRef(de);q.displayName="VirtualMenu";var W=t.forwardRef(({className:r,children:i,...c},s)=>{let{isHighlighted:m,index:f,item:u,...d}=c;return t.createElement("div",{ref:s,role:"menuitem",className:L("kui-reset","kui-BaseMenuItem","kui-VirtualMenuItem",r),...d},i)});W.displayName="VirtualMenu.Item";var me=t.memo(W,B),pe=Object.assign(q,{Item:me});export{pe as a};
3
+ //# sourceMappingURL=chunk-ARPUPT4M.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{b as s}from"./chunk-EB4AG3OL.js";import*as e from"react";import{useLayoutEffect as l}from"radix-ui/internal";var d=e.createContext({isInsideMenu:!1}),i=e.createContext(null),a={1:24,2:30,3:34,4:38};function p(t){return a[t]}function x({children:t,size:o}){let n=s(o,void 0),r=n?p(n):void 0,u=e.useMemo(()=>({isInsideMenu:!0,size:n,itemHeight:r}),[n,r]);return e.createElement(d.Provider,{value:u},e.createElement(i.Provider,{value:null},t))}function v(){return e.useContext(d)}var c=e.createContext(void 0),m=c.Provider;function C(){return e.useContext(c)}var R=i.Provider;function P(t){let[o,n]=e.useState(null);return[t??o??void 0,n]}function b(t,o=!0){let n=e.useContext(i),r=e.useId(),u=t??r;return l(()=>{if(!(!n||!o))return n(u),()=>n(null)},[n,u,o]),n?u:t}export{a,p as b,x as c,v as d,m as e,C as f,R as g,P as h,b as i};
3
- //# sourceMappingURL=chunk-ISCZ57VL.js.map
2
+ import{b as s}from"./chunk-REELD6CT.js";import*as e from"react";import{useLayoutEffect as l}from"radix-ui/internal";var d=e.createContext({isInsideMenu:!1}),i=e.createContext(null),a={1:24,2:30,3:34,4:38};function p(t){return a[t]}function x({children:t,size:o}){let n=s(o,void 0),r=n?p(n):void 0,u=e.useMemo(()=>({isInsideMenu:!0,size:n,itemHeight:r}),[n,r]);return e.createElement(d.Provider,{value:u},e.createElement(i.Provider,{value:null},t))}function v(){return e.useContext(d)}var c=e.createContext(void 0),m=c.Provider;function C(){return e.useContext(c)}var R=i.Provider;function P(t){let[o,n]=e.useState(null);return[t??o??void 0,n]}function b(t,o=!0){let n=e.useContext(i),r=e.useId(),u=t??r;return l(()=>{if(!(!n||!o))return n(u),()=>n(null)},[n,u,o]),n?u:t}export{a,p as b,x as c,v as d,m as e,C as f,R as g,P as h,b as i};
3
+ //# sourceMappingURL=chunk-DJGZ4K3V.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as d}from"./chunk-DFQIIYLD.js";import{b as p}from"./chunk-QEDKL23P.js";import{j as C}from"./chunk-5BXCPANF.js";import{a as s}from"./chunk-ANQLWGFN.js";import*as e from"react";import c from"classnames";var v=e.createContext(null);function u(){return e.useContext(v)}var S=e.createContext("2"),B=e.createContext(!1),N=e.createContext(!1);function W({children:t,presentation:n}){let a=e.useContext(S),o=e.useMemo(()=>({size:a,menuVariant:"soft",presentation:n}),[a,n]);return e.createElement(v.Provider,{value:o},t)}function P(){let t=u(),n=e.useContext(S),a=t?.size??n,o=t?.menuVariant??"soft";return["kui-ShellPaneChrome",`kui-r-size-${a}`,`kui-menu-variant-${o}`]}var H={1:"2",2:"3",3:"4",4:"4"};function f(){let t=u(),n=e.useContext(S);return H[t?.size??n]}function g(){let t=e.useContext(s),n=e.useContext(C)!==null,a=f();return t!==void 0?t:n?a:null}var y=e.forwardRef(({className:t,float:n,children:a,...o},i)=>{let l=P(),r=f();return e.createElement("div",{...o,ref:i,"data-float":n||void 0,className:c("kui-ShellPaneHeader","kui-SidebarHeader","kui-SidebarHeader--container",...l,t)},e.createElement(s.Provider,{value:r},a))});y.displayName="Shell.PaneHeader";var F=e.forwardRef(({className:t,float:n,children:a,...o},i)=>{let l=P(),r=f();return e.createElement("div",{...o,ref:i,"data-float":n||void 0,className:c("kui-ShellPaneFooter","kui-SidebarFooter","kui-SidebarFooter--container",...l,t)},e.createElement(s.Provider,{value:r},a))});F.displayName="Shell.PaneFooter";var M=e.forwardRef(({className:t,style:n,dir:a,children:o,fade:i=!1,pane:l=!1,...r},m)=>{let x=P(),h=e.useContext(B),R=u(),z=h&&R===null&&!l,b=e.useContext(N),V=p();if(z){let k=r.tabIndex??(b&&V?-1:void 0);return e.createElement(d,{...r,tabIndex:k,ref:m,type:"hover",fade:i,className:"kui-ShellScroll"},e.createElement("div",{style:n,dir:a,className:c("kui-ShellScrollContent",t)},o))}return e.createElement(d,{...r,ref:m,type:"hover",fade:i,className:"kui-ShellScroll"},e.createElement("div",{style:n,dir:a,className:c("kui-BaseMenuContent","kui-SidebarContent",...x,t)},e.createElement(s.Provider,{value:null},e.createElement("div",{className:"kui-BaseMenuViewport"},o))))});M.displayName="Shell.Scroll";export{v as a,u as b,S as c,B as d,N as e,W as f,H as g,g as h,y as i,F as j,M as k};
3
- //# sourceMappingURL=chunk-PMXIQ5B4.js.map
2
+ import{a as d}from"./chunk-DFQIIYLD.js";import{b as p}from"./chunk-QEDKL23P.js";import{i as C}from"./chunk-LBAC2X4U.js";import{a as s}from"./chunk-ANQLWGFN.js";import*as e from"react";import c from"classnames";var v=e.createContext(null);function u(){return e.useContext(v)}var S=e.createContext("2"),B=e.createContext(!1),N=e.createContext(!1);function W({children:t,presentation:n}){let a=e.useContext(S),o=e.useMemo(()=>({size:a,menuVariant:"soft",presentation:n}),[a,n]);return e.createElement(v.Provider,{value:o},t)}function P(){let t=u(),n=e.useContext(S),a=t?.size??n,o=t?.menuVariant??"soft";return["kui-ShellPaneChrome",`kui-r-size-${a}`,`kui-menu-variant-${o}`]}var H={1:"2",2:"3",3:"4",4:"4"};function f(){let t=u(),n=e.useContext(S);return H[t?.size??n]}function g(){let t=e.useContext(s),n=e.useContext(C)!==null,a=f();return t!==void 0?t:n?a:null}var y=e.forwardRef(({className:t,float:n,children:a,...o},i)=>{let l=P(),r=f();return e.createElement("div",{...o,ref:i,"data-float":n||void 0,className:c("kui-ShellPaneHeader","kui-SidebarHeader","kui-SidebarHeader--container",...l,t)},e.createElement(s.Provider,{value:r},a))});y.displayName="Shell.PaneHeader";var F=e.forwardRef(({className:t,float:n,children:a,...o},i)=>{let l=P(),r=f();return e.createElement("div",{...o,ref:i,"data-float":n||void 0,className:c("kui-ShellPaneFooter","kui-SidebarFooter","kui-SidebarFooter--container",...l,t)},e.createElement(s.Provider,{value:r},a))});F.displayName="Shell.PaneFooter";var M=e.forwardRef(({className:t,style:n,dir:a,children:o,fade:i=!1,pane:l=!1,...r},m)=>{let x=P(),h=e.useContext(B),R=u(),z=h&&R===null&&!l,b=e.useContext(N),V=p();if(z){let k=r.tabIndex??(b&&V?-1:void 0);return e.createElement(d,{...r,tabIndex:k,ref:m,type:"hover",fade:i,className:"kui-ShellScroll"},e.createElement("div",{style:n,dir:a,className:c("kui-ShellScrollContent",t)},o))}return e.createElement(d,{...r,ref:m,type:"hover",fade:i,className:"kui-ShellScroll"},e.createElement("div",{style:n,dir:a,className:c("kui-BaseMenuContent","kui-SidebarContent",...x,t)},e.createElement(s.Provider,{value:null},e.createElement("div",{className:"kui-BaseMenuViewport"},o))))});M.displayName="Shell.Scroll";export{v as a,u as b,S as c,B as d,N as e,W as f,H as g,g as h,y as i,F as j,M as k};
3
+ //# sourceMappingURL=chunk-FKCKELUB.js.map
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as i,c as O,e as N}from"./chunk-SHDZYFUN.js";import{a as S,d as a}from"./chunk-RYXIRZQW.js";import{a as b,b as C,c as R}from"./chunk-UFYQC5XY.js";import{a as v,b as y,c as x}from"./chunk-MXNPCJPV.js";import{a as I}from"./chunk-S66WR5R7.js";import{a as z}from"./chunk-WJKCXGVN.js";import{b as g}from"./chunk-VWRPVM5K.js";import{m as h}from"./chunk-LBAC2X4U.js";import*as e from"react";import ee from"classnames";import{useComposedRefs as ne}from"radix-ui/internal";var oe={controlled:"open",default:"defaultOpen"},te={initial:"overlay",sm:"fixed"},E=e.forwardRef((M,T)=>{let{className:H,presentation:U=te,defaultOpen:k,open:w,onOpenChange:A,expandedSize:o=320,minSize:t=200,maxSize:r=500,resizable:p=!1,collapsible:B=!0,onResize:V,onResizeStart:L,onResizeEnd:_,children:D,style:F,onSizeChange:$,sizeUpdate:W,sizeUpdateMs:j=50,size:l,defaultSize:c,flush:d=!0,id:q,...s}=M,{table:m,attributes:G}=R(U,"fixed"),n=b({name:"inspector",label:"Inspector",propNames:oe,id:q,controlled:i(w),defaultValue:i(k),presentationTable:m,builtIn:O,onChange:(Y,Z)=>A?.(Y!=="closed",{reason:Z}),size:o});h("inspector",d);let u=e.useRef(null),J=ne(T,n.setElement,u),K=y({name:"inspector",elementId:n.id,elementRef:u,cssVarName:"--inspector-size",orientation:"vertical",edge:"start",growth:N,expandedSize:o,minSize:t,maxSize:r,resizable:p,collapsible:B,size:l,defaultSize:c,onSizeChange:$,sizeUpdate:W,sizeUpdateMs:j,onResize:V,onResizeStart:L,onResizeEnd:_,overlaying:n.overlaying,overlayingNow:()=>m[z()]==="overlay",requestToggle:()=>n.toggle("toggle")}),{handles:P,content:Q}=x(D,a),X=p&&n.shown!==!1&&!n.overlaying?e.createElement(I.Provider,{value:K},P.length>0?P:e.createElement(S,null)):null,f=v(l,c,t,r);return e.createElement("div",{...s,role:s.role??"complementary",id:n.id,ref:J,className:ee("kui-ShellPane","kui-ShellInspector",H),...C(n,G),"data-flush":d||void 0,tabIndex:n.overlaying?-1:s.tabIndex,style:{...F,"--inspector-expanded-size":`${o}px`,...f?{"--inspector-size":f}:{},"--inspector-min-size":`${t}px`,"--inspector-max-size":`${r}px`}},e.createElement("div",{className:"kui-ShellInspectorContent"},e.createElement(g,null,Q)),X)});E.displayName="Shell.Inspector";E.Handle=a;export{E as a};
3
+ //# sourceMappingURL=chunk-H7GH3DTF.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/_internal/shell-inspector.tsx"],
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { PaneResizeContext } from './shell-resize.js';\nimport { InspectorHandle, PaneHandle } from './shell-handles.js';\nimport { usePane, paneAttributes, usePresentationTable } from './shell-pane.js';\nimport { splitHandles, useInitialPaneSize, useResizablePane, type SizeChangeMeta } from './shell-resizable.js';\nimport { useFrameRegistration } from './shell-store.js';\nimport { detailRest, endAnchoredGrowth, toPaneValue } from './shell-rest.js';\nimport { PageScope } from './page-scope.js';\nimport { readBreakpoint } from '../../hooks/use-breakpoint.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps, PaneOpenChangeReason } from '../shell.types.js';\n\ntype InspectorOpenChangeMeta = { reason: PaneOpenChangeReason };\ntype InspectorControlledProps = { open: boolean; onOpenChange?: (open: boolean, meta: InspectorOpenChangeMeta) => void; defaultOpen?: never };\ntype InspectorUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: InspectorOpenChangeMeta) => void; open?: never };\ntype InspectorSizeControlledProps = { size: number | string; defaultSize?: never };\ntype InspectorSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\ntype InspectorPublicProps = PaneBaseProps &\n (InspectorControlledProps | InspectorUncontrolledProps) &\n (InspectorSizeControlledProps | InspectorSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: SizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n /**\n * Sets whether this pane joins the app frame. The default is `true`: the pane sits against its\n * neighbours with one hairline between them. Set `flush={false}` to pull it off the frame as a\n * card. It then floats over the content if the content is flush, and otherwise sits on the\n * Shell's background beside a card content.\n */\n flush?: boolean;\n };\n\ntype InspectorComponent = React.ForwardRefExoticComponent<InspectorPublicProps & React.RefAttributes<HTMLDivElement>> & { Handle: typeof InspectorHandle };\n\nconst INSPECTOR_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\n/** Since 0.8.0 the Inspector is in the frame from 768px up, the boundary kookie-ui-v2 uses everywhere. It was 1280px. */\nconst INSPECTOR_DEFAULT_PRESENTATION = { initial: 'overlay', sm: 'fixed' } as const;\n\nexport const Inspector = React.forwardRef<HTMLDivElement, InspectorPublicProps>((props, ref) => {\n const {\n className,\n presentation = INSPECTOR_DEFAULT_PRESENTATION,\n defaultOpen,\n open,\n onOpenChange,\n expandedSize = 320,\n minSize = 200,\n maxSize = 500,\n resizable = false,\n collapsible = true,\n onResize,\n onResizeStart,\n onResizeEnd,\n children,\n style,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n size,\n defaultSize,\n flush = true,\n id,\n ...domProps\n } = props;\n\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'inspector',\n label: 'Inspector',\n propNames: INSPECTOR_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable: table,\n builtIn: detailRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n size: expandedSize,\n });\n useFrameRegistration('inspector', flush);\n\n\n const elementRef = React.useRef<HTMLElement | null>(null);\n const composedRef = useComposedRefs(ref, pane.setElement, elementRef);\n\n const resize = useResizablePane({\n name: 'inspector',\n elementId: pane.id,\n elementRef,\n cssVarName: '--inspector-size',\n orientation: 'vertical',\n edge: 'start',\n growth: endAnchoredGrowth,\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 overlaying: pane.overlaying,\n overlayingNow: () => table[readBreakpoint()] === 'overlay',\n requestToggle: () => pane.toggle('toggle'),\n });\n\n const { handles, content } = splitHandles(children, InspectorHandle);\n const handle = resizable && pane.shown !== false && !pane.overlaying ? <PaneResizeContext.Provider value={resize}>{handles.length > 0 ? handles : <PaneHandle />}</PaneResizeContext.Provider> : null;\n\n const initialSize = useInitialPaneSize(size, defaultSize, minSize, maxSize);\n return (\n <div\n {...domProps}\n role={domProps.role ?? 'complementary'}\n id={pane.id}\n ref={composedRef}\n className={classNames('kui-ShellPane', 'kui-ShellInspector', className)}\n {...paneAttributes(pane, attributes)}\n data-flush={flush || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--inspector-expanded-size': `${expandedSize}px`,\n ...(initialSize ? { '--inspector-size': initialSize } : {}),\n '--inspector-min-size': `${minSize}px`,\n '--inspector-max-size': `${maxSize}px`,\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"kui-ShellInspectorContent\">\n <PageScope>{content}</PageScope>\n </div>\n {handle}\n </div>\n );\n}) as InspectorComponent;\n\nInspector.displayName = 'Shell.Inspector';\nInspector.Handle = InspectorHandle;\n\nexport type { InspectorPublicProps };\n"],
5
+ "mappings": ";iXAEA,UAAYA,MAAW,QACvB,OAAOC,OAAgB,aACvB,OAAS,m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,EACA,WAAYc,EAAK,WACjB,cAAe,IAAMH,EAAMgB,EAAe,CAAC,IAAM,UACjD,cAAe,IAAMb,EAAK,OAAO,QAAQ,CAC3C,CAAC,EAEK,CAAE,QAAAc,EAAS,QAAAC,CAAQ,EAAIC,EAAa7B,EAAU8B,CAAe,EAC7DC,EAASpC,GAAakB,EAAK,QAAU,IAAS,CAACA,EAAK,WAAa,gBAACmB,EAAkB,SAAlB,CAA2B,MAAOT,GAASI,EAAQ,OAAS,EAAIA,EAAU,gBAACM,EAAA,IAAW,CAAG,EAAgC,KAE3LC,EAAcC,EAAmB9B,EAAMC,EAAab,EAASC,CAAO,EAC1E,OACE,gBAAC,OACE,GAAGe,EACJ,KAAMA,EAAS,MAAQ,gBACvB,GAAII,EAAK,GACT,IAAKQ,EACL,UAAWe,GAAW,gBAAiB,qBAAsBjD,CAAS,EACrE,GAAGkD,EAAexB,EAAMF,CAAU,EACnC,aAAYJ,GAAS,OACrB,SAAUM,EAAK,WAAa,GAAKJ,EAAS,SAC1C,MACE,CACE,GAAGR,EACH,4BAA6B,GAAGT,CAAY,KAC5C,GAAI0C,EAAc,CAAE,mBAAoBA,CAAY,EAAI,CAAC,EACzD,uBAAwB,GAAGzC,CAAO,KAClC,uBAAwB,GAAGC,CAAO,IACpC,GAGF,gBAAC,OAAI,UAAU,6BACb,gBAAC4C,EAAA,KAAWV,CAAQ,CACtB,EACCG,CACH,CAEJ,CAAC,EAED/C,EAAU,YAAc,kBACxBA,EAAU,OAAS8C",
6
+ "names": ["React", "classNames", "useComposedRefs", "INSPECTOR_PROP_NAMES", "INSPECTOR_DEFAULT_PRESENTATION", "Inspector", "props", "ref", "className", "presentation", "defaultOpen", "open", "onOpenChange", "expandedSize", "minSize", "maxSize", "resizable", "collapsible", "onResize", "onResizeStart", "onResizeEnd", "children", "style", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "size", "defaultSize", "flush", "id", "domProps", "table", "attributes", "usePresentationTable", "pane", "usePane", "toPaneValue", "detailRest", "value", "reason", "useFrameRegistration", "elementRef", "composedRef", "useComposedRefs", "resize", "useResizablePane", "endAnchoredGrowth", "readBreakpoint", "handles", "content", "splitHandles", "InspectorHandle", "handle", "PaneResizeContext", "PaneHandle", "initialSize", "useInitialPaneSize", "classNames", "paneAttributes", "PageScope"]
7
+ }
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as to,b as ro,c as no,e as W,f as ao,i as so,l as io}from"./chunk-IN6D33TU.js";import{a as B}from"./chunk-WT4IDG2W.js";import{a as eo}from"./chunk-FICBVI4M.js";import{a as q}from"./chunk-7N2Q5WOM.js";import{b as L}from"./chunk-5ON3XLRD.js";import{d as J,f as Q,g as X}from"./chunk-VWRPVM5K.js";import{h as oo}from"./chunk-PMXIQ5B4.js";import{c as U}from"./chunk-OKQAVYW4.js";import*as o from"react";import{useComposedRefs as vo,useLayoutEffect as D}from"radix-ui/internal";import g from"classnames";import{Toolbar as N}from"radix-ui";var Po=["1","2","3","4"],Ro=["horizontal","vertical"],x={size:{type:"enum",className:"kui-r-size",values:Po,default:"2"},orientation:{type:"enum",values:Ro,default:"horizontal"}};var M=o.createContext(null),F=o.createContext(null),E=o.createContext(!1);function Ho(){return o.useContext(E)}var H=o.forwardRef((e,t)=>{let r=oo(),a=L(e.size??r??void 0,x.size),s=e.orientation??x.orientation.default,{className:i,orientation:n,backdrop:l=!1,children:c,...d}=U({...e,size:a},x,q),u=o.useMemo(()=>({size:a,orientation:s,backdrop:l}),[a,s,l]);return o.createElement(N.Root,{...d,ref:t,orientation:s,"data-backdrop":l||void 0,className:g("kui-Toolbar",i)},o.createElement(M.Provider,{value:u},c))});H.displayName="Toolbar";var co=o.forwardRef(({className:e,disabled:t=!1,children:r,...a},s)=>{let i=o.useContext(M),n=o.useContext(E),l=o.useMemo(()=>({disabled:t}),[t]);return n?o.createElement(ao,{...a,ref:s,className:e},o.createElement(F.Provider,{value:l},r)):o.createElement("div",{role:"group","data-orientation":i?.orientation??"horizontal","data-disabled":t||void 0,...a,ref:s,className:g("kui-ToolbarGroup",e)},o.createElement(F.Provider,{value:l},r))});co.displayName="Toolbar.Group";var yo=new Set(["id","className","style","title"]);function lo(e){return e===!0||e==="true"}function wo(e){return o.isValidElement(e)&&e.type==="button"}var A=o.forwardRef((e,t)=>{let r=o.useContext(M),a=o.useContext(F),s=o.useContext(E),{iconOnly:i,size:n,variant:l,emphasis:c,color:d,disabled:u,asChild:f,onKeyDown:b,...y}=e,h=u||a?.disabled||void 0;if(s){let P={};for(let R of Object.keys(y))(/^on[A-Z]/.test(R)||R.startsWith("aria-")||R.startsWith("data-")||yo.has(R))&&(P[R]=y[R]);return b&&(P.onKeyDown=b),o.createElement(uo,{...P,ref:t,asChild:f,iconOnly:i,disabled:h,color:d,pressed:e["aria-pressed"]===void 0?void 0:lo(e["aria-pressed"])},y.children)}let O=r?.orientation==="vertical"&&b?P=>{P.key==="ArrowDown"||P.key==="ArrowUp"||b(P)}:b,I=lo(e["aria-pressed"]),p="data-state"in e||e["aria-pressed"]===void 0?{}:{"data-state":I?"on":"off"},m={size:n??r?.size,...c!==void 0?{emphasis:c}:{variant:l??(a?"ghost":r?.backdrop?"raised":"soft")},color:d??(l||c?void 0:"gray"),...p},T={...y,...i?{iconOnly:!0}:{},...f?{asChild:!0}:{},...O?{onKeyDown:O}:{},...m};return r?f&&!wo(y.children)?o.createElement(N.Link,{asChild:!0,ref:t},o.createElement(B,{...T,disabled:h})):o.createElement(N.Button,{asChild:!0,ref:t,disabled:h},o.createElement(B,{...T})):o.createElement(B,{...T,ref:t,disabled:h})});A.displayName="Toolbar.Button";var uo=o.forwardRef(({asChild:e,iconOnly:t,disabled:r,color:a,pressed:s,children:i,"aria-label":n,...l},c)=>{let d=t?n:void 0,u={...l,...t?{}:n?{"aria-label":n}:{},disabled:r,...a?{color:a}:{}};if(e&&o.isValidElement(i)){let f=d?o.cloneElement(i,void 0,i.props.children,o.createElement("span",null,d)):i;return o.createElement(W,{...u,ref:c,asChild:!0},f)}return s!==void 0?o.createElement(so,{...u,ref:c,checked:s},i,d):o.createElement(W,{...u,ref:c},i,d)});uo.displayName="Toolbar.OverflowItem";function ho(){return o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentcolor","aria-hidden":!0,xmlns:"http://www.w3.org/2000/svg"},o.createElement("circle",{cx:"3.25",cy:"8",r:"1.25"}),o.createElement("circle",{cx:"8",cy:"8",r:"1.25"}),o.createElement("circle",{cx:"12.75",cy:"8",r:"1.25"}))}var po=o.forwardRef(({label:e="More",className:t,children:r,...a},s)=>{let i=o.Children.toArray(r),n=i.length,l=o.useRef(null),c=o.useRef([]),d=o.useRef(0),[u,f]=o.useState(n),[b,y]=o.useState(0),[h,O]=o.useState(n);h!==n&&(O(n),f(n)),D(()=>{c.current=[]},[n]),D(()=>{let p=l.current;if(!p)return;let m=Array.from(p.children),T=Math.min(u,n);for(let v=0;v<T;v++){let w=m[v];w&&(c.current[v]=w.offsetWidth)}let P=m[T];P&&(d.current=P.offsetWidth);let R=Number.parseFloat(getComputedStyle(p).columnGap)||0,K=p.clientWidth,V=0,_=0;for(let v=0;v<n;v++){let w=c.current[v];if(w===void 0)return;w!==0&&(V+=w+(_>0?R:0),_+=1)}let k=n;if(V>K){let v=K-(d.current||p.clientHeight)-R,w=0,Y=0;k=0;for(let G=0;G<n;G++){let Z=c.current[G];if(Z>0){let $=Z+(Y>0?R:0);if(w+$>v)break;w+=$,Y+=1}k+=1}}k!==u&&f(k)},[u,n,b]),o.useEffect(()=>{let p=l.current;if(!p||typeof ResizeObserver>"u")return;let m=new ResizeObserver(()=>y(T=>T+1));m.observe(p);for(let T of Array.from(p.children))m.observe(T);return()=>m.disconnect()},[u,n]);let I=o.useCallback(p=>{l.current=p,typeof s=="function"?s(p):s&&(s.current=p)},[s]);return o.createElement("div",{...a,ref:I,className:g("kui-ToolbarOverflow",t)},i.slice(0,u).map((p,m)=>o.createElement("div",{key:m,className:"kui-ToolbarOverflowSeat"},p)),u<n?o.createElement(to,null,o.createElement(ro,null,o.createElement(A,{iconOnly:!0,"aria-label":e},o.createElement(ho,null))),o.createElement(no,{align:"end"},o.createElement(E.Provider,{value:!0},i.slice(u)))):null)});po.displayName="Toolbar.Overflow";var j=[],S=new Map,z=new Set,C=new Map;function So(e){return z.add(e),()=>{z.delete(e)}}function go(e,t,r){let a=S.get(e)??j,i=a.findIndex(n=>n.id===t)===-1?[...a,{id:t,node:r}]:a.map(n=>n.id===t?{id:t,node:r}:n);S.set(e,i),z.forEach(n=>n())}function xo(e,t){let r=S.get(e);if(!r)return;let a=r.filter(s=>s.id!==t);a.length===0?S.delete(e):S.set(e,a),z.forEach(s=>s())}function fo({name:e="default"}){D(()=>{let r=(C.get(e)??0)+1;return C.set(e,r),r>1,()=>{let a=(C.get(e)??1)-1;a>0?C.set(e,a):C.delete(e)}},[e]);let t=o.useSyncExternalStore(So,()=>S.get(e)??j,()=>j);return o.createElement(o.Fragment,null,t.map(r=>o.createElement(o.Fragment,{key:r.id},r.node)))}fo.displayName="Toolbar.Slot";function bo({name:e="default",children:t}){let r=o.useId();return D(()=>{go(e,r,t)},[e,r,t]),D(()=>()=>xo(e,r),[e,r]),null}bo.displayName="Toolbar.Fill";var mo=o.forwardRef(({className:e,...t},r)=>{let a=o.useContext(M);return o.useContext(E)?o.createElement(io,{...t,ref:r,className:e}):a?o.createElement(N.Separator,{...t,ref:r,className:g("kui-ToolbarSeparator",e)}):o.createElement("div",{role:"separator","aria-orientation":"vertical","data-orientation":"vertical",...t,ref:r,className:g("kui-ToolbarSeparator",e)})});mo.displayName="Toolbar.Separator";var Co={1:"2",2:"3",3:"4",4:"5"},To=o.forwardRef(({className:e,children:t,style:r,id:a},s)=>{let i=o.useContext(M),n=L(void 0,x.size),l=i?.size??n,c=J(),d=Q(c),u=X(c),f=t==null||t===!1,b=f?d:t,y=vo(s,f?u:void 0);return b==null?null:o.createElement(eo,{ref:y,as:"span",size:Co[l],weight:"medium",truncate:!0,id:a,style:r,className:g("kui-ToolbarTitle",e),"data-mirror":f||void 0},b)});To.displayName="Toolbar.Title";var jo=Object.assign(H,{Root:H,Group:co,Button:A,Separator:mo,Title:To,Overflow:po,Slot:fo,Fill:bo});export{Ho as a,H as b,co as c,A as d,po as e,fo as f,bo as g,mo as h,To as i,jo as j};
3
- //# sourceMappingURL=chunk-E6MOZSYV.js.map
2
+ import{a as to,b as ro,c as no,e as W,f as ao,i as so,l as io}from"./chunk-5XO3PLDH.js";import{a as B}from"./chunk-WT4IDG2W.js";import{a as eo}from"./chunk-FICBVI4M.js";import{a as q}from"./chunk-7N2Q5WOM.js";import{b as L}from"./chunk-5ON3XLRD.js";import{d as J,f as Q,g as X}from"./chunk-VWRPVM5K.js";import{h as oo}from"./chunk-FKCKELUB.js";import{c as U}from"./chunk-OKQAVYW4.js";import*as o from"react";import{useComposedRefs as vo,useLayoutEffect as D}from"radix-ui/internal";import g from"classnames";import{Toolbar as N}from"radix-ui";var Po=["1","2","3","4"],Ro=["horizontal","vertical"],x={size:{type:"enum",className:"kui-r-size",values:Po,default:"2"},orientation:{type:"enum",values:Ro,default:"horizontal"}};var M=o.createContext(null),F=o.createContext(null),E=o.createContext(!1);function Ho(){return o.useContext(E)}var H=o.forwardRef((e,t)=>{let r=oo(),a=L(e.size??r??void 0,x.size),s=e.orientation??x.orientation.default,{className:i,orientation:n,backdrop:l=!1,children:c,...d}=U({...e,size:a},x,q),u=o.useMemo(()=>({size:a,orientation:s,backdrop:l}),[a,s,l]);return o.createElement(N.Root,{...d,ref:t,orientation:s,"data-backdrop":l||void 0,className:g("kui-Toolbar",i)},o.createElement(M.Provider,{value:u},c))});H.displayName="Toolbar";var co=o.forwardRef(({className:e,disabled:t=!1,children:r,...a},s)=>{let i=o.useContext(M),n=o.useContext(E),l=o.useMemo(()=>({disabled:t}),[t]);return n?o.createElement(ao,{...a,ref:s,className:e},o.createElement(F.Provider,{value:l},r)):o.createElement("div",{role:"group","data-orientation":i?.orientation??"horizontal","data-disabled":t||void 0,...a,ref:s,className:g("kui-ToolbarGroup",e)},o.createElement(F.Provider,{value:l},r))});co.displayName="Toolbar.Group";var yo=new Set(["id","className","style","title"]);function lo(e){return e===!0||e==="true"}function wo(e){return o.isValidElement(e)&&e.type==="button"}var A=o.forwardRef((e,t)=>{let r=o.useContext(M),a=o.useContext(F),s=o.useContext(E),{iconOnly:i,size:n,variant:l,emphasis:c,color:d,disabled:u,asChild:f,onKeyDown:b,...y}=e,h=u||a?.disabled||void 0;if(s){let P={};for(let R of Object.keys(y))(/^on[A-Z]/.test(R)||R.startsWith("aria-")||R.startsWith("data-")||yo.has(R))&&(P[R]=y[R]);return b&&(P.onKeyDown=b),o.createElement(uo,{...P,ref:t,asChild:f,iconOnly:i,disabled:h,color:d,pressed:e["aria-pressed"]===void 0?void 0:lo(e["aria-pressed"])},y.children)}let O=r?.orientation==="vertical"&&b?P=>{P.key==="ArrowDown"||P.key==="ArrowUp"||b(P)}:b,I=lo(e["aria-pressed"]),p="data-state"in e||e["aria-pressed"]===void 0?{}:{"data-state":I?"on":"off"},m={size:n??r?.size,...c!==void 0?{emphasis:c}:{variant:l??(a?"ghost":r?.backdrop?"raised":"soft")},color:d??(l||c?void 0:"gray"),...p},T={...y,...i?{iconOnly:!0}:{},...f?{asChild:!0}:{},...O?{onKeyDown:O}:{},...m};return r?f&&!wo(y.children)?o.createElement(N.Link,{asChild:!0,ref:t},o.createElement(B,{...T,disabled:h})):o.createElement(N.Button,{asChild:!0,ref:t,disabled:h},o.createElement(B,{...T})):o.createElement(B,{...T,ref:t,disabled:h})});A.displayName="Toolbar.Button";var uo=o.forwardRef(({asChild:e,iconOnly:t,disabled:r,color:a,pressed:s,children:i,"aria-label":n,...l},c)=>{let d=t?n:void 0,u={...l,...t?{}:n?{"aria-label":n}:{},disabled:r,...a?{color:a}:{}};if(e&&o.isValidElement(i)){let f=d?o.cloneElement(i,void 0,i.props.children,o.createElement("span",null,d)):i;return o.createElement(W,{...u,ref:c,asChild:!0},f)}return s!==void 0?o.createElement(so,{...u,ref:c,checked:s},i,d):o.createElement(W,{...u,ref:c},i,d)});uo.displayName="Toolbar.OverflowItem";function ho(){return o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentcolor","aria-hidden":!0,xmlns:"http://www.w3.org/2000/svg"},o.createElement("circle",{cx:"3.25",cy:"8",r:"1.25"}),o.createElement("circle",{cx:"8",cy:"8",r:"1.25"}),o.createElement("circle",{cx:"12.75",cy:"8",r:"1.25"}))}var po=o.forwardRef(({label:e="More",className:t,children:r,...a},s)=>{let i=o.Children.toArray(r),n=i.length,l=o.useRef(null),c=o.useRef([]),d=o.useRef(0),[u,f]=o.useState(n),[b,y]=o.useState(0),[h,O]=o.useState(n);h!==n&&(O(n),f(n)),D(()=>{c.current=[]},[n]),D(()=>{let p=l.current;if(!p)return;let m=Array.from(p.children),T=Math.min(u,n);for(let v=0;v<T;v++){let w=m[v];w&&(c.current[v]=w.offsetWidth)}let P=m[T];P&&(d.current=P.offsetWidth);let R=Number.parseFloat(getComputedStyle(p).columnGap)||0,K=p.clientWidth,V=0,_=0;for(let v=0;v<n;v++){let w=c.current[v];if(w===void 0)return;w!==0&&(V+=w+(_>0?R:0),_+=1)}let k=n;if(V>K){let v=K-(d.current||p.clientHeight)-R,w=0,Y=0;k=0;for(let G=0;G<n;G++){let Z=c.current[G];if(Z>0){let $=Z+(Y>0?R:0);if(w+$>v)break;w+=$,Y+=1}k+=1}}k!==u&&f(k)},[u,n,b]),o.useEffect(()=>{let p=l.current;if(!p||typeof ResizeObserver>"u")return;let m=new ResizeObserver(()=>y(T=>T+1));m.observe(p);for(let T of Array.from(p.children))m.observe(T);return()=>m.disconnect()},[u,n]);let I=o.useCallback(p=>{l.current=p,typeof s=="function"?s(p):s&&(s.current=p)},[s]);return o.createElement("div",{...a,ref:I,className:g("kui-ToolbarOverflow",t)},i.slice(0,u).map((p,m)=>o.createElement("div",{key:m,className:"kui-ToolbarOverflowSeat"},p)),u<n?o.createElement(to,null,o.createElement(ro,null,o.createElement(A,{iconOnly:!0,"aria-label":e},o.createElement(ho,null))),o.createElement(no,{align:"end"},o.createElement(E.Provider,{value:!0},i.slice(u)))):null)});po.displayName="Toolbar.Overflow";var j=[],S=new Map,z=new Set,C=new Map;function So(e){return z.add(e),()=>{z.delete(e)}}function go(e,t,r){let a=S.get(e)??j,i=a.findIndex(n=>n.id===t)===-1?[...a,{id:t,node:r}]:a.map(n=>n.id===t?{id:t,node:r}:n);S.set(e,i),z.forEach(n=>n())}function xo(e,t){let r=S.get(e);if(!r)return;let a=r.filter(s=>s.id!==t);a.length===0?S.delete(e):S.set(e,a),z.forEach(s=>s())}function fo({name:e="default"}){D(()=>{let r=(C.get(e)??0)+1;return C.set(e,r),r>1,()=>{let a=(C.get(e)??1)-1;a>0?C.set(e,a):C.delete(e)}},[e]);let t=o.useSyncExternalStore(So,()=>S.get(e)??j,()=>j);return o.createElement(o.Fragment,null,t.map(r=>o.createElement(o.Fragment,{key:r.id},r.node)))}fo.displayName="Toolbar.Slot";function bo({name:e="default",children:t}){let r=o.useId();return D(()=>{go(e,r,t)},[e,r,t]),D(()=>()=>xo(e,r),[e,r]),null}bo.displayName="Toolbar.Fill";var mo=o.forwardRef(({className:e,...t},r)=>{let a=o.useContext(M);return o.useContext(E)?o.createElement(io,{...t,ref:r,className:e}):a?o.createElement(N.Separator,{...t,ref:r,className:g("kui-ToolbarSeparator",e)}):o.createElement("div",{role:"separator","aria-orientation":"vertical","data-orientation":"vertical",...t,ref:r,className:g("kui-ToolbarSeparator",e)})});mo.displayName="Toolbar.Separator";var Co={1:"2",2:"3",3:"4",4:"5"},To=o.forwardRef(({className:e,children:t,style:r,id:a},s)=>{let i=o.useContext(M),n=L(void 0,x.size),l=i?.size??n,c=J(),d=Q(c),u=X(c),f=t==null||t===!1,b=f?d:t,y=vo(s,f?u:void 0);return b==null?null:o.createElement(eo,{ref:y,as:"span",size:Co[l],weight:"medium",truncate:!0,id:a,style:r,className:g("kui-ToolbarTitle",e),"data-mirror":f||void 0},b)});To.displayName="Toolbar.Title";var jo=Object.assign(H,{Root:H,Group:co,Button:A,Separator:mo,Title:To,Overflow:po,Slot:fo,Fill:bo});export{Ho as a,H as b,co as c,A as d,po as e,fo as f,bo as g,mo as h,To as i,jo as j};
3
+ //# sourceMappingURL=chunk-HNOT2HS4.js.map
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{b as a}from"./chunk-MDQ7ZHOS.js";import*as i from"react";import{useLayoutEffect as u}from"radix-ui/internal";function l(e){return typeof e=="object"&&e!==null}function p(e,t){let n={},o=null;for(let r of a){if(e!==void 0&&!l(e)){n[r]=e;continue}let s=l(e)?e[r]:void 0;s!==void 0&&(o={value:s}),n[r]=o?o.value:t(r)}return n}function c(e){let t=e.initial;return a.every(n=>e[n]===t)?t:void 0}function m(e,t){let n=c(t);if(n!==void 0)return{[`data-${e}`]:n};let o={};for(let r of a)o[`data-${e}-${r}`]=t[r];return o}function T(e){return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}var g=p("fixed",()=>"fixed");function h(){return{entries:new Map,listeners:new Set,version:0}}function y(e){e.version+=1;for(let t of e.listeners)t()}function f(e,t){return e.listeners.add(t),()=>{e.listeners.delete(t)}}var d=i.createContext(null);function P(e){let t=i.useContext(d);if(!t)throw new Error(`${e} must be used within <Shell.Root>`);return t}function R(e,t){let n=i.useCallback(r=>f(e,r),[e]),o=i.useCallback(()=>e.entries.get(t),[e,t]);return i.useSyncExternalStore(n,o,()=>{})}var S=i.createContext(null);function v(e,t){let n=i.useContext(S);if(!n)throw new Error("Shell panes must be used within <Shell.Root>");let{registerOffFrame:o,unregisterOffFrame:r}=n;u(()=>{if(!t)return o(e),()=>r(e)},[e,t,o,r])}export{p as a,c as b,m as c,T as d,g as e,h as f,y as g,f as h,d as i,P as j,R as k,S as l,v as m};
3
+ //# sourceMappingURL=chunk-LBAC2X4U.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/_internal/shell-store.tsx"],
4
- "sourcesContent": ["'use client';\n\n/**\n * The Shell's state model (0.8.0), ported from kookie-ui-v2's Shell.\n *\n * - State lives on the pane. Each pane holds `auto | open | closed`.\n * `auto` means untouched: the stylesheet decides what\n * it shows at each breakpoint, so first paint is right with no script, the\n * server and the client render the same markup, and no open-state callback\n * can fire on mount or on a resize.\n * - The one thing that crosses the Shell is a registry keyed by pane name.\n * Each pane registers what it is and how to drive it; a Trigger looks its\n * pane up, and the Root reads the set of live overlays. Nothing scans\n * children and nothing checks `displayName`.\n * - The responsive props are resolved into a table with one value per\n * breakpoint, from the props alone, with no window. The table is written to\n * the DOM as data attributes for the stylesheet, and read again in JS by the\n * mirror that sets `aria-expanded`. One table, two readers, so they agree by\n * construction.\n */\nimport * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport { SHELL_BREAKPOINTS } from '../shell.types.js';\nimport type { Breakpoint, PaneName, PresentationValue } from '../shell.types.js';\n\n/* \u2500\u2500 Breakpoint tables \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 type Table<T> = Record<Breakpoint, T>;\n\n/** What a pane shows: open or closed. */\nexport type PaneValue = 'open' | 'closed';\n\ntype ResponsiveInput<T> = T | Partial<Record<Breakpoint, T>> | undefined;\n\nfunction isMap<T>(value: ResponsiveInput<T>): value is Partial<Record<Breakpoint, T>> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * A responsive value at every breakpoint. A breakpoint takes the largest key\n * at or below it, the same fallback `useResponsiveValue` used; a breakpoint\n * below every key takes `fallback`.\n */\nexport function tableOf<T>(value: ResponsiveInput<T>, fallback: (bp: Breakpoint) => T): Table<T> {\n const table = {} as Table<T>;\n let carried: { value: T } | null = null;\n for (const bp of SHELL_BREAKPOINTS) {\n if (value !== undefined && !isMap(value)) {\n table[bp] = value;\n continue;\n }\n const entry = isMap(value) ? value[bp] : undefined;\n if (entry !== undefined) carried = { value: entry };\n table[bp] = carried ? carried.value : fallback(bp);\n }\n return table;\n}\n\n/** The table's one value, when it has only one. */\nexport function constantOf<T>(table: Table<T>): T | undefined {\n const first = table.initial;\n return SHELL_BREAKPOINTS.every((bp) => table[bp] === first) ? first : undefined;\n}\n\n/**\n * The table as data attributes: `data-<name>` when it holds one value, one\n * `data-<name>-<bp>` per breakpoint when it holds several. The stylesheet has\n * a rule for each spelling.\n */\nexport function tableAttributes(name: string, table: Table<string>): Record<string, string> {\n const constant = constantOf(table);\n if (constant !== undefined) return { [`data-${name}`]: constant };\n const attributes: Record<string, string> = {};\n for (const bp of SHELL_BREAKPOINTS) attributes[`data-${name}-${bp}`] = table[bp];\n return attributes;\n}\n\n/**\n * A responsive prop object is usually an inline literal, a new identity every\n * render. Keying memoisation on its contents keeps the tables, and so the\n * registry entries, stable across renders that change nothing.\n */\nexport function useStableKey(value: unknown): string {\n return typeof value === 'object' && value !== null ? JSON.stringify(value) : String(value);\n}\n\nexport const FIXED_TABLE: Table<PresentationValue> = tableOf<PresentationValue>('fixed', () => 'fixed');\n\n/* \u2500\u2500 The registry \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 type OpenChangeReason = 'toggle' | 'dismiss';\n\nexport type PaneEntry = {\n name: PaneName;\n id: string;\n el: HTMLElement | null;\n /** What the pane shows now; `undefined` while an untouched pane cannot know (before the breakpoint is known). */\n value: PaneValue | undefined;\n /** How the pane is presented now, when known. */\n presentation: PresentationValue | undefined;\n /** The pane's own presentation at every breakpoint. A Panel with none of its own follows the Rail's. */\n presentationTable: Table<PresentationValue>;\n /** Open and presented as an overlay: what the scrim and Escape close, and what containment exempts. */\n overlayLive: boolean;\n /** The pane's designed open width, for panes that sit beside it when floating. */\n size: number;\n setValue: (value: PaneValue, reason: OpenChangeReason) => void;\n toggle: (reason: OpenChangeReason) => void;\n};\n\nexport type ShellStore = {\n entries: Map<PaneName, PaneEntry>;\n listeners: Set<() => void>;\n /**\n * What a subscriber reads. useSyncExternalStore needs a value that is stable\n * between notifications, and a number is; the Map, or anything derived from\n * it, would be a new identity on every read.\n */\n version: number;\n /** The pane a hovered Trigger is previewing, if any. Layout only. */\n peek: PaneName | null;\n};\n\nexport function createShellStore(): ShellStore {\n return { entries: new Map(), listeners: new Set(), version: 0, peek: null };\n}\n\nexport function notifyShellStore(store: ShellStore) {\n store.version += 1;\n for (const listener of store.listeners) listener();\n}\n\nexport function subscribeShellStore(store: ShellStore, listener: () => void) {\n store.listeners.add(listener);\n return () => {\n store.listeners.delete(listener);\n };\n}\n\nexport function setShellPeek(store: ShellStore, peek: PaneName | null) {\n if (store.peek === peek) return;\n store.peek = peek;\n notifyShellStore(store);\n}\n\nexport const ShellStoreContext = React.createContext<ShellStore | null>(null);\n\nexport function useShellStore(part: string): ShellStore {\n const store = React.useContext(ShellStoreContext);\n if (!store) throw new Error(`${part} must be used within <Shell.Root>`);\n return store;\n}\n\n/** One pane's registry entry. Re-renders only when that entry is replaced. */\nexport function usePaneEntry(store: ShellStore, name: PaneName): PaneEntry | undefined {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n const getSnapshot = React.useCallback(() => store.entries.get(name), [store, name]);\n return React.useSyncExternalStore(subscribe, getSnapshot, () => undefined);\n}\n\n/**\n * Whether this pane is the one being previewed. A boolean per pane rather than\n * the peek target itself, so hovering one Trigger re-renders one pane, not all.\n */\nexport function usePeeking(store: ShellStore, name: PaneName): boolean {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n return React.useSyncExternalStore(\n subscribe,\n () => store.peek === name,\n () => false,\n );\n}\n\n/* \u2500\u2500 Off the frame \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 type FramePaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';\n\nexport const ShellFrameContext = React.createContext<{\n registerOffFrame: (id: FramePaneId) => void;\n unregisterOffFrame: (id: FramePaneId) => void;\n} | null>(null);\n\n/** Tells the Root a pane is off the frame (`flush={false}`); the Rail's card moves a floating Panel over. */\nexport function useFrameRegistration(id: FramePaneId, flush: boolean) {\n const ctx = React.useContext(ShellFrameContext);\n if (!ctx) throw new Error('Shell panes must be used within <Shell.Root>');\n const { registerOffFrame, unregisterOffFrame } = ctx;\n useLayoutEffect(() => {\n if (flush) return;\n registerOffFrame(id);\n return () => unregisterOffFrame(id);\n }, [id, flush, registerOffFrame, unregisterOffFrame]);\n}\n\n/* \u2500\u2500 Development warnings \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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\nconst warned = new Set<string>();\n\n/** A deprecation warning, once per message per page load. Development only. */\nexport function warnOnce(message: string) {\n if (process.env.NODE_ENV === 'production') return;\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(`[kookie-ui] ${message}`);\n}\n"],
5
- "mappings": ";wCAoBA,UAAYA,MAAW,QACvB,OAAS,mBAAAC,MAAuB,oBAahC,SAASC,EAASC,EAAoE,CACpF,OAAO,OAAOA,GAAU,UAAYA,IAAU,IAChD,CAOO,SAASC,EAAWD,EAA2BE,EAA2C,CAC/F,IAAMC,EAAQ,CAAC,EACXC,EAA+B,KACnC,QAAWC,KAAMC,EAAmB,CAClC,GAAIN,IAAU,QAAa,CAACD,EAAMC,CAAK,EAAG,CACxCG,EAAME,CAAE,EAAIL,EACZ,QACF,CACA,IAAMO,EAAQR,EAAMC,CAAK,EAAIA,EAAMK,CAAE,EAAI,OACrCE,IAAU,SAAWH,EAAU,CAAE,MAAOG,CAAM,GAClDJ,EAAME,CAAE,EAAID,EAAUA,EAAQ,MAAQF,EAASG,CAAE,CACnD,CACA,OAAOF,CACT,CAGO,SAASK,EAAcL,EAAgC,CAC5D,IAAMM,EAAQN,EAAM,QACpB,OAAOG,EAAkB,MAAOD,GAAOF,EAAME,CAAE,IAAMI,CAAK,EAAIA,EAAQ,MACxE,CAOO,SAASC,EAAgBC,EAAcR,EAA8C,CAC1F,IAAMS,EAAWJ,EAAWL,CAAK,EACjC,GAAIS,IAAa,OAAW,MAAO,CAAE,CAAC,QAAQD,CAAI,EAAE,EAAGC,CAAS,EAChE,IAAMC,EAAqC,CAAC,EAC5C,QAAWR,KAAMC,EAAmBO,EAAW,QAAQF,CAAI,IAAIN,CAAE,EAAE,EAAIF,EAAME,CAAE,EAC/E,OAAOQ,CACT,CAOO,SAASC,EAAad,EAAwB,CACnD,OAAO,OAAOA,GAAU,UAAYA,IAAU,KAAO,KAAK,UAAUA,CAAK,EAAI,OAAOA,CAAK,CAC3F,CAEO,IAAMe,EAAwCd,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AM,8CAA8C,EACxE,GAAM,CAAE,iBAAAC,EAAkB,mBAAAC,CAAmB,EAAIF,EACjDG,EAAgB,IAAM,CACpB,GAAI,CAAAJ,EACJ,OAAAE,EAAiBH,CAAE,EACZ,IAAMI,EAAmBJ,CAAE,CACpC,EAAG,CAACA,EAAIC,EAAOE,EAAkBC,CAAkB,CAAC,CACtD,CAIA,IAAME,EAAS,IAAI,IAGZ,SAASC,EAASC,EAAiB,CAK1C",
6
- "names": ["React", "useLayoutEffect", "isMap", "value", "tableOf", "fallback", "table", "carried", "bp", "SHELL_BREAKPOINTS", "entry", "constantOf", "first", "tableAttributes", "name", "constant", "attributes", "useStableKey", "FIXED_TABLE", "createShellStore", "notifyShellStore", "store", "listener", "subscribeShellStore", "setShellPeek", "peek", "ShellStoreContext", "useShellStore", "part", "usePaneEntry", "subscribe", "getSnapshot", "usePeeking", "ShellFrameContext", "useFrameRegistration", "id", "flush", "ctx", "registerOffFrame", "unregisterOffFrame", "useLayoutEffect", "warned", "warnOnce", "message"]
4
+ "sourcesContent": ["'use client';\n\n/**\n * The Shell's state model (0.8.0), ported from kookie-ui-v2's Shell.\n *\n * - State lives on the pane. Each pane holds `auto | open | closed`.\n * `auto` means untouched: the stylesheet decides what\n * it shows at each breakpoint, so first paint is right with no script, the\n * server and the client render the same markup, and no open-state callback\n * can fire on mount or on a resize.\n * - The one thing that crosses the Shell is a registry keyed by pane name.\n * Each pane registers what it is and how to drive it; a Trigger looks its\n * pane up, and the Root reads the set of live overlays. Nothing scans\n * children and nothing checks `displayName`.\n * - The responsive props are resolved into a table with one value per\n * breakpoint, from the props alone, with no window. The table is written to\n * the DOM as data attributes for the stylesheet, and read again in JS by the\n * mirror that sets `aria-expanded`. One table, two readers, so they agree by\n * construction.\n */\nimport * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport { SHELL_BREAKPOINTS } from '../shell.types.js';\nimport type { Breakpoint, PaneName, PresentationValue } from '../shell.types.js';\n\n/* \u2500\u2500 Breakpoint tables \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 type Table<T> = Record<Breakpoint, T>;\n\n/** What a pane shows: open or closed. */\nexport type PaneValue = 'open' | 'closed';\n\ntype ResponsiveInput<T> = T | Partial<Record<Breakpoint, T>> | undefined;\n\nfunction isMap<T>(value: ResponsiveInput<T>): value is Partial<Record<Breakpoint, T>> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * A responsive value at every breakpoint. A breakpoint takes the largest key\n * at or below it, the same fallback `useResponsiveValue` used; a breakpoint\n * below every key takes `fallback`.\n */\nexport function tableOf<T>(value: ResponsiveInput<T>, fallback: (bp: Breakpoint) => T): Table<T> {\n const table = {} as Table<T>;\n let carried: { value: T } | null = null;\n for (const bp of SHELL_BREAKPOINTS) {\n if (value !== undefined && !isMap(value)) {\n table[bp] = value;\n continue;\n }\n const entry = isMap(value) ? value[bp] : undefined;\n if (entry !== undefined) carried = { value: entry };\n table[bp] = carried ? carried.value : fallback(bp);\n }\n return table;\n}\n\n/** The table's one value, when it has only one. */\nexport function constantOf<T>(table: Table<T>): T | undefined {\n const first = table.initial;\n return SHELL_BREAKPOINTS.every((bp) => table[bp] === first) ? first : undefined;\n}\n\n/**\n * The table as data attributes: `data-<name>` when it holds one value, one\n * `data-<name>-<bp>` per breakpoint when it holds several. The stylesheet has\n * a rule for each spelling.\n */\nexport function tableAttributes(name: string, table: Table<string>): Record<string, string> {\n const constant = constantOf(table);\n if (constant !== undefined) return { [`data-${name}`]: constant };\n const attributes: Record<string, string> = {};\n for (const bp of SHELL_BREAKPOINTS) attributes[`data-${name}-${bp}`] = table[bp];\n return attributes;\n}\n\n/**\n * A responsive prop object is usually an inline literal, a new identity every\n * render. Keying memoisation on its contents keeps the tables, and so the\n * registry entries, stable across renders that change nothing.\n */\nexport function useStableKey(value: unknown): string {\n return typeof value === 'object' && value !== null ? JSON.stringify(value) : String(value);\n}\n\nexport const FIXED_TABLE: Table<PresentationValue> = tableOf<PresentationValue>('fixed', () => 'fixed');\n\n/* \u2500\u2500 The registry \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 type OpenChangeReason = 'toggle' | 'dismiss';\n\nexport type PaneEntry = {\n name: PaneName;\n id: string;\n el: HTMLElement | null;\n /** What the pane shows now; `undefined` while an untouched pane cannot know (before the breakpoint is known). */\n value: PaneValue | undefined;\n /** How the pane is presented now, when known. */\n presentation: PresentationValue | undefined;\n /** The pane's own presentation at every breakpoint. A Panel with none of its own follows the Rail's. */\n presentationTable: Table<PresentationValue>;\n /** Open and presented as an overlay: what the scrim and Escape close, and what containment exempts. */\n overlayLive: boolean;\n /** The pane's designed open width, for panes that sit beside it when floating. */\n size: number;\n setValue: (value: PaneValue, reason: OpenChangeReason) => void;\n toggle: (reason: OpenChangeReason) => void;\n};\n\nexport type ShellStore = {\n entries: Map<PaneName, PaneEntry>;\n listeners: Set<() => void>;\n /**\n * What a subscriber reads. useSyncExternalStore needs a value that is stable\n * between notifications, and a number is; the Map, or anything derived from\n * it, would be a new identity on every read.\n */\n version: number;\n};\n\nexport function createShellStore(): ShellStore {\n return { entries: new Map(), listeners: new Set(), version: 0 };\n}\n\nexport function notifyShellStore(store: ShellStore) {\n store.version += 1;\n for (const listener of store.listeners) listener();\n}\n\nexport function subscribeShellStore(store: ShellStore, listener: () => void) {\n store.listeners.add(listener);\n return () => {\n store.listeners.delete(listener);\n };\n}\n\nexport const ShellStoreContext = React.createContext<ShellStore | null>(null);\n\nexport function useShellStore(part: string): ShellStore {\n const store = React.useContext(ShellStoreContext);\n if (!store) throw new Error(`${part} must be used within <Shell.Root>`);\n return store;\n}\n\n/** One pane's registry entry. Re-renders only when that entry is replaced. */\nexport function usePaneEntry(store: ShellStore, name: PaneName): PaneEntry | undefined {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n const getSnapshot = React.useCallback(() => store.entries.get(name), [store, name]);\n return React.useSyncExternalStore(subscribe, getSnapshot, () => undefined);\n}\n\n/* \u2500\u2500 Off the frame \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 type FramePaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';\n\nexport const ShellFrameContext = React.createContext<{\n registerOffFrame: (id: FramePaneId) => void;\n unregisterOffFrame: (id: FramePaneId) => void;\n} | null>(null);\n\n/** Tells the Root a pane is off the frame (`flush={false}`); the Rail's card moves a floating Panel over. */\nexport function useFrameRegistration(id: FramePaneId, flush: boolean) {\n const ctx = React.useContext(ShellFrameContext);\n if (!ctx) throw new Error('Shell panes must be used within <Shell.Root>');\n const { registerOffFrame, unregisterOffFrame } = ctx;\n useLayoutEffect(() => {\n if (flush) return;\n registerOffFrame(id);\n return () => unregisterOffFrame(id);\n }, [id, flush, registerOffFrame, unregisterOffFrame]);\n}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,SAAW,EACjB,QAAWC,KAAYD,EAAM,UAAWC,EAAS,CACnD,CAEO,SAASC,EAAoBF,EAAmBC,EAAsB,CAC3E,OAAAD,EAAM,UAAU,IAAIC,CAAQ,EACrB,IAAM,CACXD,EAAM,UAAU,OAAOC,CAAQ,CACjC,CACF,CAEO,IAAME,EAA0B,gBAAiC,IAAI,EAErE,SAASC,EAAcC,EAA0B,CACtD,IAAML,EAAc,aAAWG,CAAiB,EAChD,GAAI,CAACH,EAAO,MAAM,IAAI,MAAM,GAAGK,CAAI,mCAAmC,EACtE,OAAOL,CACT,CAGO,SAASM,EAAaN,EAAmBP,EAAuC,CACrF,IAAMc,EAAkB,cAAaN,GAAyBC,EAAoBF,EAAOC,CAAQ,EAAG,CAACD,CAAK,CAAC,EACrGQ,EAAoB,cAAY,IAAMR,EAAM,QAAQ,IAAIP,CAAI,EAAG,CAACO,EAAOP,CAAI,CAAC,EAClF,OAAa,uBAAqBc,EAAWC,EAAa,IAAG,EAAY,CAC3E,CAMO,IAAMC,EAA0B,gBAG7B,IAAI,EAGP,SAASC,EAAqBC,EAAiBC,EAAgB,CACpE,IAAMC,EAAY,aAAWJ,CAAiB,EAC9C,GAAI,CAACI,EAAK,MAAM,IAAI,MAAM,8CAA8C,EACxE,GAAM,CAAE,iBAAAC,EAAkB,mBAAAC,CAAmB,EAAIF,EACjDG,EAAgB,IAAM,CACpB,GAAI,CAAAJ,EACJ,OAAAE,EAAiBH,CAAE,EACZ,IAAMI,EAAmBJ,CAAE,CACpC,EAAG,CAACA,EAAIC,EAAOE,EAAkBC,CAAkB,CAAC,CACtD",
6
+ "names": ["React", "useLayoutEffect", "isMap", "value", "tableOf", "fallback", "table", "carried", "bp", "SHELL_BREAKPOINTS", "entry", "constantOf", "first", "tableAttributes", "name", "constant", "attributes", "useStableKey", "FIXED_TABLE", "createShellStore", "notifyShellStore", "store", "listener", "subscribeShellStore", "ShellStoreContext", "useShellStore", "part", "usePaneEntry", "subscribe", "getSnapshot", "ShellFrameContext", "useFrameRegistration", "id", "flush", "ctx", "registerOffFrame", "unregisterOffFrame", "useLayoutEffect"]
7
7
  }
@@ -1,3 +1,3 @@
1
1
  "use client";
2
2
  var e={xs:"(min-width: 520px)",sm:"(min-width: 768px)",md:"(min-width: 1024px)",lg:"(min-width: 1280px)",xl:"(min-width: 1640px)"},t=["initial","xs","sm","md","lg","xl"];export{e as a,t as b};
3
- //# sourceMappingURL=chunk-MAA6LEE2.js.map
3
+ //# sourceMappingURL=chunk-MDQ7ZHOS.js.map