@womp/kookie-ui 0.32.0 → 0.34.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 (136) hide show
  1. package/components.css +288 -35
  2. package/dist/cjs/components/_internal/pane-chrome.js +1 -1
  3. package/dist/cjs/components/_internal/pane-chrome.js.map +2 -2
  4. package/dist/cjs/components/_internal/shell-bottom.d.ts +7 -2
  5. package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
  6. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  7. package/dist/cjs/components/_internal/shell-bottom.js.map +3 -3
  8. package/dist/cjs/components/_internal/shell-inspector.d.ts +7 -2
  9. package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
  10. package/dist/cjs/components/_internal/shell-inspector.js +1 -1
  11. package/dist/cjs/components/_internal/shell-inspector.js.map +3 -3
  12. package/dist/cjs/components/_internal/shell-pane.js +1 -1
  13. package/dist/cjs/components/_internal/shell-pane.js.map +2 -2
  14. package/dist/cjs/components/_internal/shell-sidebar.d.ts +7 -2
  15. package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
  16. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  17. package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
  18. package/dist/cjs/components/_internal/shell-store.d.ts +6 -6
  19. package/dist/cjs/components/_internal/shell-store.d.ts.map +1 -1
  20. package/dist/cjs/components/_internal/shell-store.js +1 -1
  21. package/dist/cjs/components/_internal/shell-store.js.map +3 -3
  22. package/dist/cjs/components/command.d.ts +133 -0
  23. package/dist/cjs/components/command.d.ts.map +1 -0
  24. package/dist/cjs/components/command.js +3 -0
  25. package/dist/cjs/components/command.js.map +7 -0
  26. package/dist/cjs/components/index.d.ts +1 -0
  27. package/dist/cjs/components/index.d.ts.map +1 -1
  28. package/dist/cjs/components/index.js +2 -2
  29. package/dist/cjs/components/index.js.map +4 -4
  30. package/dist/cjs/components/navigator.js +1 -1
  31. package/dist/cjs/components/navigator.js.map +2 -2
  32. package/dist/cjs/components/shell.context.js +1 -1
  33. package/dist/cjs/components/shell.context.js.map +2 -2
  34. package/dist/cjs/components/shell.d.ts +25 -7
  35. package/dist/cjs/components/shell.d.ts.map +1 -1
  36. package/dist/cjs/components/shell.hooks.js +1 -1
  37. package/dist/cjs/components/shell.hooks.js.map +2 -2
  38. package/dist/cjs/components/shell.js +1 -1
  39. package/dist/cjs/components/shell.js.map +3 -3
  40. package/dist/cjs/components/toolbar.js +1 -1
  41. package/dist/cjs/components/toolbar.js.map +2 -2
  42. package/dist/cjs/index.js +5 -5
  43. package/dist/cjs/index.js.map +4 -4
  44. package/dist/esm/chunk-5BXCPANF.js +3 -0
  45. package/dist/esm/{chunk-GHWEXMF6.js.map → chunk-5BXCPANF.js.map} +3 -3
  46. package/dist/esm/{chunk-K35JUIUT.js → chunk-API4DAPY.js} +2 -2
  47. package/dist/esm/{chunk-ZG2XQUOH.js → chunk-B447PNRD.js} +2 -2
  48. package/dist/esm/{chunk-QDAM2I6O.js → chunk-BR6Z2CAE.js} +2 -2
  49. package/dist/esm/{chunk-W35ZKQMQ.js → chunk-CAM66IXC.js} +2 -2
  50. package/dist/esm/chunk-GZPB6MRQ.js +3 -0
  51. package/dist/esm/chunk-GZPB6MRQ.js.map +7 -0
  52. package/dist/esm/{chunk-4G3FJUER.js → chunk-INGT6DB6.js} +2 -2
  53. package/dist/esm/{chunk-4ZHBNYXM.js → chunk-J6B7UCZN.js} +2 -2
  54. package/dist/esm/chunk-KDJM4NQQ.js +3 -0
  55. package/dist/esm/chunk-KDJM4NQQ.js.map +7 -0
  56. package/dist/esm/{chunk-LTUW36HM.js → chunk-KGCGT4MJ.js} +2 -2
  57. package/dist/esm/chunk-NO2JCJWI.js +3 -0
  58. package/dist/esm/chunk-NO2JCJWI.js.map +7 -0
  59. package/dist/esm/{chunk-6WHKGVWY.js → chunk-NZJRXZYX.js} +2 -2
  60. package/dist/esm/{chunk-NFSW36RG.js → chunk-ODHCDJ3Y.js} +2 -2
  61. package/dist/esm/chunk-SHKPQ3RI.js +2 -0
  62. package/dist/esm/chunk-UMQOTGJC.js +3 -0
  63. package/dist/esm/chunk-UMQOTGJC.js.map +7 -0
  64. package/dist/esm/chunk-XD676L6S.js +3 -0
  65. package/dist/esm/chunk-XD676L6S.js.map +7 -0
  66. package/dist/esm/{chunk-6SGJWML7.js → chunk-XKYPJTRN.js} +2 -2
  67. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  68. package/dist/esm/components/_internal/shell-bottom.d.ts +7 -2
  69. package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
  70. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  71. package/dist/esm/components/_internal/shell-inspector.d.ts +7 -2
  72. package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
  73. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  74. package/dist/esm/components/_internal/shell-pane.js +1 -1
  75. package/dist/esm/components/_internal/shell-sidebar.d.ts +7 -2
  76. package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
  77. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  78. package/dist/esm/components/_internal/shell-store.d.ts +6 -6
  79. package/dist/esm/components/_internal/shell-store.d.ts.map +1 -1
  80. package/dist/esm/components/_internal/shell-store.js +1 -1
  81. package/dist/esm/components/alert-dialog.js +1 -1
  82. package/dist/esm/components/command.d.ts +133 -0
  83. package/dist/esm/components/command.d.ts.map +1 -0
  84. package/dist/esm/components/command.js +3 -0
  85. package/dist/esm/components/command.js.map +7 -0
  86. package/dist/esm/components/dialog.js +1 -1
  87. package/dist/esm/components/index.d.ts +1 -0
  88. package/dist/esm/components/index.d.ts.map +1 -1
  89. package/dist/esm/components/index.js +1 -1
  90. package/dist/esm/components/navigator.js +1 -1
  91. package/dist/esm/components/sheet.js +1 -1
  92. package/dist/esm/components/shell.context.js +1 -1
  93. package/dist/esm/components/shell.d.ts +25 -7
  94. package/dist/esm/components/shell.d.ts.map +1 -1
  95. package/dist/esm/components/shell.hooks.js +1 -1
  96. package/dist/esm/components/shell.js +1 -1
  97. package/dist/esm/components/sidebar.js +1 -1
  98. package/dist/esm/components/toolbar.js +1 -1
  99. package/dist/esm/hooks/index.js +1 -1
  100. package/dist/esm/index.js +1 -1
  101. package/package.json +1 -1
  102. package/src/components/_internal/shell-bottom.tsx +11 -6
  103. package/src/components/_internal/shell-inspector.tsx +11 -6
  104. package/src/components/_internal/shell-sidebar.tsx +11 -6
  105. package/src/components/_internal/shell-store.tsx +13 -13
  106. package/src/components/command.css +197 -0
  107. package/src/components/command.tsx +432 -0
  108. package/src/components/index.css +1 -0
  109. package/src/components/index.tsx +24 -0
  110. package/src/components/shell.css +133 -47
  111. package/src/components/shell.tsx +50 -32
  112. package/src/styles/tokens/color.css +2 -0
  113. package/styles.css +289 -35
  114. package/tokens/base.css +1 -0
  115. package/tokens.css +1 -0
  116. package/dist/esm/chunk-4B3S2DM7.js +0 -3
  117. package/dist/esm/chunk-4B3S2DM7.js.map +0 -7
  118. package/dist/esm/chunk-AKMRPGNP.js +0 -3
  119. package/dist/esm/chunk-AKMRPGNP.js.map +0 -7
  120. package/dist/esm/chunk-GHWEXMF6.js +0 -3
  121. package/dist/esm/chunk-RSG4XWHU.js +0 -2
  122. package/dist/esm/chunk-ZBSGH74F.js +0 -3
  123. package/dist/esm/chunk-ZBSGH74F.js.map +0 -7
  124. package/dist/esm/chunk-ZHXEEOGI.js +0 -3
  125. package/dist/esm/chunk-ZHXEEOGI.js.map +0 -7
  126. /package/dist/esm/{chunk-K35JUIUT.js.map → chunk-API4DAPY.js.map} +0 -0
  127. /package/dist/esm/{chunk-ZG2XQUOH.js.map → chunk-B447PNRD.js.map} +0 -0
  128. /package/dist/esm/{chunk-QDAM2I6O.js.map → chunk-BR6Z2CAE.js.map} +0 -0
  129. /package/dist/esm/{chunk-W35ZKQMQ.js.map → chunk-CAM66IXC.js.map} +0 -0
  130. /package/dist/esm/{chunk-4G3FJUER.js.map → chunk-INGT6DB6.js.map} +0 -0
  131. /package/dist/esm/{chunk-4ZHBNYXM.js.map → chunk-J6B7UCZN.js.map} +0 -0
  132. /package/dist/esm/{chunk-LTUW36HM.js.map → chunk-KGCGT4MJ.js.map} +0 -0
  133. /package/dist/esm/{chunk-6WHKGVWY.js.map → chunk-NZJRXZYX.js.map} +0 -0
  134. /package/dist/esm/{chunk-NFSW36RG.js.map → chunk-ODHCDJ3Y.js.map} +0 -0
  135. /package/dist/esm/{chunk-RSG4XWHU.js.map → chunk-SHKPQ3RI.js.map} +0 -0
  136. /package/dist/esm/{chunk-6SGJWML7.js.map → chunk-XKYPJTRN.js.map} +0 -0
@@ -86,13 +86,13 @@ export declare function usePaneEntry(store: ShellStore, name: PaneName): PaneEnt
86
86
  * the peek target itself, so hovering one Trigger re-renders one pane, not all.
87
87
  */
88
88
  export declare function usePeeking(store: ShellStore, name: PaneName): boolean;
89
- export type InsetPaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';
90
- export declare const ShellInsetContext: React.Context<{
91
- registerInset: (id: InsetPaneId) => void;
92
- unregisterInset: (id: InsetPaneId) => void;
89
+ export type FramePaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';
90
+ export declare const ShellFrameContext: React.Context<{
91
+ registerOffFrame: (id: FramePaneId) => void;
92
+ unregisterOffFrame: (id: FramePaneId) => void;
93
93
  } | null>;
94
- /** Registers a pane's `inset` with the Root, which paints the backdrop while any pane is inset. */
95
- export declare function useInsetRegistration(id: InsetPaneId, inset: boolean | undefined): void;
94
+ /** Tells the Root a pane is off the frame (`flush={false}`); the Rail's card moves a floating Panel over. */
95
+ export declare function useFrameRegistration(id: FramePaneId, flush: boolean): void;
96
96
  /** A deprecation warning, once per message per page load. Development only. */
97
97
  export declare function warnOnce(message: string): void;
98
98
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"shell-store.d.ts","sourceRoot":"","sources":["../../../../src/components/_intern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C;CACvB,CAAC;AAEF,wBAAgB,gBAAgB,IAAI,UAAU,CAE7C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,QAGjD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,IAAI,cAK1E;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,QAIpE;AAED,eAAO,MAAM,iBAAiB,kCAA+C,CAAC;AAE9E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAItD;AAED,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,CAIrF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAOrE;AAID,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE5F,eAAO,MAAM,iBAAiB;sBACV,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI;wBACvB,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI;SAChC,CAAC;AAEhB,6GAA6G;AAC7G,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,QASnE;AAMD,+EAA+E;AAC/E,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,QAKvC"}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";"use client";var y=Object.create;var s=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var v=(e,n)=>{for(var t in n)s(e,t,{get:n[t],enumerable:!0})},d=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of g(n))!T.call(e,o)&&o!==t&&s(e,o,{get:()=>n[o],enumerable:!(r=R(n,o))||r.enumerable});return e};var E=(e,n,t)=>(t=e!=null?y(h(e)):{},d(n||!e||!e.__esModule?s(t,"default",{value:e,enumerable:!0}):t,e)),I=e=>d(s({},"__esModule",{value:!0}),e);var A={};v(A,{FIXED_TABLE:()=>w,ShellInsetContext:()=>b,ShellStoreContext:()=>P,constantOf:()=>S,createShellStore:()=>N,notifyShellStore:()=>m,setShellPeek:()=>z,subscribeShellStore:()=>l,tableAttributes:()=>k,tableOf:()=>f,useInsetRegistration:()=>M,usePaneEntry:()=>B,usePeeking:()=>O,useShellStore:()=>V,useStableKey:()=>C,warnOnce:()=>L});module.exports=I(A);var i=E(require("react")),x=require("radix-ui/internal");var a=["initial","xs","sm","md","lg","xl"];function u(e){return typeof e=="object"&&e!==null}function f(e,n){let t={},r=null;for(let o of a){if(e!==void 0&&!u(e)){t[o]=e;continue}let p=u(e)?e[o]:void 0;p!==void 0&&(r={value:p}),t[o]=r?r.value:n(o)}return t}function S(e){let n=e.initial;return a.every(t=>e[t]===n)?n:void 0}function k(e,n){let t=S(n);if(t!==void 0)return{[`data-${e}`]:t};let r={};for(let o of a)r[`data-${e}-${o}`]=n[o];return r}function C(e){return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}var w=f("fixed",()=>"fixed");function N(){return{entries:new Map,listeners:new Set,version:0,peek:null}}function m(e){e.version+=1;for(let n of e.listeners)n()}function l(e,n){return e.listeners.add(n),()=>{e.listeners.delete(n)}}function z(e,n){e.peek!==n&&(e.peek=n,m(e))}var P=i.createContext(null);function V(e){let n=i.useContext(P);if(!n)throw new Error(`${e} must be used within <Shell.Root>`);return n}function B(e,n){let t=i.useCallback(o=>l(e,o),[e]),r=i.useCallback(()=>e.entries.get(n),[e,n]);return i.useSyncExternalStore(t,r,()=>{})}function O(e,n){let t=i.useCallback(r=>l(e,r),[e]);return i.useSyncExternalStore(t,()=>e.peek===n,()=>!1)}var b=i.createContext(null);function M(e,n){let t=i.useContext(b);if(!t)throw new Error("Shell panes must be used within <Shell.Root>");let{registerInset:r,unregisterInset:o}=t;(0,x.useLayoutEffect)(()=>{if(n)return r(e),()=>o(e)},[e,n,r,o])}var c=new Set;function L(e){}
2
+ "use strict";"use client";var y=Object.create;var a=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var v=(e,n)=>{for(var t in n)a(e,t,{get:n[t],enumerable:!0})},d=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of g(n))!T.call(e,r)&&r!==t&&a(e,r,{get:()=>n[r],enumerable:!(o=R(n,r))||o.enumerable});return e};var E=(e,n,t)=>(t=e!=null?y(h(e)):{},d(n||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),k=e=>d(a({},"__esModule",{value:!0}),e);var L={};v(L,{FIXED_TABLE:()=>O,ShellFrameContext:()=>b,ShellStoreContext:()=>P,constantOf:()=>m,createShellStore:()=>N,notifyShellStore:()=>S,setShellPeek:()=>z,subscribeShellStore:()=>l,tableAttributes:()=>C,tableOf:()=>f,useFrameRegistration:()=>M,usePaneEntry:()=>B,usePeeking:()=>I,useShellStore:()=>V,useStableKey:()=>w,warnOnce:()=>F});module.exports=k(L);var i=E(require("react")),x=require("radix-ui/internal");var s=["initial","xs","sm","md","lg","xl"];function u(e){return typeof e=="object"&&e!==null}function f(e,n){let t={},o=null;for(let r of s){if(e!==void 0&&!u(e)){t[r]=e;continue}let p=u(e)?e[r]:void 0;p!==void 0&&(o={value:p}),t[r]=o?o.value:n(r)}return t}function m(e){let n=e.initial;return s.every(t=>e[t]===n)?n:void 0}function C(e,n){let t=m(n);if(t!==void 0)return{[`data-${e}`]:t};let o={};for(let r of s)o[`data-${e}-${r}`]=n[r];return o}function w(e){return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}var O=f("fixed",()=>"fixed");function N(){return{entries:new Map,listeners:new Set,version:0,peek:null}}function S(e){e.version+=1;for(let n of e.listeners)n()}function l(e,n){return e.listeners.add(n),()=>{e.listeners.delete(n)}}function z(e,n){e.peek!==n&&(e.peek=n,S(e))}var P=i.createContext(null);function V(e){let n=i.useContext(P);if(!n)throw new Error(`${e} must be used within <Shell.Root>`);return n}function B(e,n){let t=i.useCallback(r=>l(e,r),[e]),o=i.useCallback(()=>e.entries.get(n),[e,n]);return i.useSyncExternalStore(t,o,()=>{})}function I(e,n){let t=i.useCallback(o=>l(e,o),[e]);return i.useSyncExternalStore(t,()=>e.peek===n,()=>!1)}var b=i.createContext(null);function M(e,n){let t=i.useContext(b);if(!t)throw new Error("Shell panes must be used within <Shell.Root>");let{registerOffFrame:o,unregisterOffFrame:r}=t;(0,x.useLayoutEffect)(()=>{if(!n)return o(e),()=>r(e)},[e,n,o,r])}var c=new Set;function F(e){}
3
3
  //# sourceMappingURL=shell-store.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/shell-store.tsx", "../../../../src/components/shell.types.ts"],
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 Inset \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 InsetPaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';\n\nexport const ShellInsetContext = React.createContext<{\n registerInset: (id: InsetPaneId) => void;\n unregisterInset: (id: InsetPaneId) => void;\n} | null>(null);\n\n/** Registers a pane's `inset` with the Root, which paints the backdrop while any pane is inset. */\nexport function useInsetRegistration(id: InsetPaneId, inset: boolean | undefined) {\n const ctx = React.useContext(ShellInsetContext);\n if (!ctx) throw new Error('Shell panes must be used within <Shell.Root>');\n const { registerInset, unregisterInset } = ctx;\n useLayoutEffect(() => {\n if (!inset) return;\n registerInset(id);\n return () => unregisterInset(id);\n }, [id, inset, registerInset, unregisterInset]);\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", "import type * as React from 'react';\n\nexport type PresentationValue = 'fixed' | 'overlay' | 'stacked';\n\nexport type ResponsivePresentation = PresentationValue | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PresentationValue>>;\n\nexport type PaneMode = 'expanded' | 'collapsed';\nexport type SidebarMode = 'collapsed' | 'expanded';\n\nexport type ResponsiveMode = PaneMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PaneMode>>;\n\nexport type ResponsiveSidebarMode = SidebarMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', SidebarMode>>;\n\nexport type Responsive<T> = T | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', T>>;\n\nexport type PaneSizePersistence = {\n load?: () => number | Promise<number | undefined> | undefined;\n save?: (size: number) => void | Promise<void>;\n};\n\n/**\n * Why a pane's open state changed. Since 0.8.0 only a user action is reported:\n * `toggle` for a Trigger, a handle double-click or a drag past\n * `collapseThreshold`, and `dismiss` for Escape or a press on the scrim.\n * `init`, `responsive`, `panel` and `left` are kept in the types for\n * compatibility and are never sent.\n */\nexport type PaneOpenChangeReason = 'toggle' | 'dismiss' | 'init' | 'responsive';\n\nexport interface PaneBaseProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onExpand?: () => void;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n /** @deprecated Removed in 1.0. Snap in your own `onSizeChange` and pass `size`. */\n snapPoints?: number[];\n /** @deprecated Removed in 1.0, with `snapPoints`. */\n snapTolerance?: number;\n /** @deprecated Removed in 1.0. Close the pane from your own `onResizeEnd`. */\n collapseThreshold?: number;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n paneId?: string;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n persistence?: PaneSizePersistence;\n}\n\nexport const _BREAKPOINTS = {\n xs: '(min-width: 520px)',\n sm: '(min-width: 768px)',\n md: '(min-width: 1024px)',\n lg: '(min-width: 1280px)',\n xl: '(min-width: 1640px)',\n} as const;\n\nexport type Breakpoint = 'initial' | keyof typeof _BREAKPOINTS;\n\n/** Every breakpoint, smallest first. The stylesheet's @media blocks follow this order. */\nexport const SHELL_BREAKPOINTS: readonly Breakpoint[] = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'];\n\nexport type PaneTarget = 'left' | 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\n/** The panes a Trigger can drive. `left` is the deprecated name for `rail`. */\nexport type PaneName = Exclude<PaneTarget, 'left'>;\n\n/**\n * CSS custom property key type for type-safe style objects.\n * Allows any string prefixed with '--'.\n */\nexport type CSSCustomProperty = `--${string}`;\n\n/**\n * Style object that supports CSS custom properties.\n */\nexport type CSSPropertiesWithVars = React.CSSProperties & {\n [key: CSSCustomProperty]: string | number | undefined;\n};\n"],
5
- "mappings": ";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,sBAAAC,EAAA,sBAAAC,EAAA,eAAAC,EAAA,qBAAAC,EAAA,qBAAAC,EAAA,iBAAAC,EAAA,wBAAAC,EAAA,oBAAAC,EAAA,YAAAC,EAAA,yBAAAC,EAAA,iBAAAC,EAAA,eAAAC,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,aAAAC,IAAA,eAAAC,EAAAlB,GAoBA,IAAAmB,EAAuB,oBACvBC,EAAgC,6BC6CzB,IAAMC,EAA2C,CAAC,UAAW,KAAM,KAAM,KAAM,KAAM,IAAI,EDhChG,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,GA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,GAAGO,CAAI,mCAAmC,EACtE,OAAOP,CACT,CAGO,SAASQ,EAAaR,EAAmBP,EAAuC,CACrF,IAAMgB,EAAkB,cAAaR,GAAyBC,EAAoBF,EAAOC,CAAQ,EAAG,CAACD,CAAK,CAAC,EACrGU,EAAoB,cAAY,IAAMV,EAAM,QAAQ,IAAIP,CAAI,EAAG,CAACO,EAAOP,CAAI,CAAC,EAClF,OAAa,uBAAqBgB,EAAWC,EAAa,IAAG,EAAY,CAC3E,CAMO,SAASC,EAAWX,EAAmBP,EAAyB,CACrE,IAAMgB,EAAkB,cAAaR,GAAyBC,EAAoBF,EAAOC,CAAQ,EAAG,CAACD,CAAK,CAAC,EAC3G,OAAa,uBACXS,EACA,IAAMT,EAAM,OAASP,EACrB,IAAM,EACR,CACF,CAMO,IAAMmB,EAA0B,gBAG7B,IAAI,EAGP,SAASC,EAAqBC,EAAiBC,EAA4B,CAChF,IAAMC,EAAY,aAAWJ,CAAiB,EAC9C,GAAI,CAACI,EAAK,MAAM,IAAI,MAAM,8CAA8C,EACxE,GAAM,CAAE,cAAAC,EAAe,gBAAAC,CAAgB,EAAIF,KAC3C,mBAAgB,IAAM,CACpB,GAAKD,EACL,OAAAE,EAAcH,CAAE,EACT,IAAMI,EAAgBJ,CAAE,CACjC,EAAG,CAACA,EAAIC,EAAOE,EAAeC,CAAe,CAAC,CAChD,CAIA,IAAMC,EAAS,IAAI,IAGZ,SAASC,EAASC,EAAiB,CAK1C",
6
- "names": ["shell_store_exports", "__export", "FIXED_TABLE", "ShellInsetContext", "ShellStoreContext", "constantOf", "createShellStore", "notifyShellStore", "setShellPeek", "subscribeShellStore", "tableAttributes", "tableOf", "useInsetRegistration", "usePaneEntry", "usePeeking", "useShellStore", "useStableKey", "warnOnce", "__toCommonJS", "React", "import_internal", "SHELL_BREAKPOINTS", "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", "ShellInsetContext", "useInsetRegistration", "id", "inset", "ctx", "registerInset", "unregisterInset", "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 /** 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", "import type * as React from 'react';\n\nexport type PresentationValue = 'fixed' | 'overlay' | 'stacked';\n\nexport type ResponsivePresentation = PresentationValue | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PresentationValue>>;\n\nexport type PaneMode = 'expanded' | 'collapsed';\nexport type SidebarMode = 'collapsed' | 'expanded';\n\nexport type ResponsiveMode = PaneMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PaneMode>>;\n\nexport type ResponsiveSidebarMode = SidebarMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', SidebarMode>>;\n\nexport type Responsive<T> = T | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', T>>;\n\nexport type PaneSizePersistence = {\n load?: () => number | Promise<number | undefined> | undefined;\n save?: (size: number) => void | Promise<void>;\n};\n\n/**\n * Why a pane's open state changed. Since 0.8.0 only a user action is reported:\n * `toggle` for a Trigger, a handle double-click or a drag past\n * `collapseThreshold`, and `dismiss` for Escape or a press on the scrim.\n * `init`, `responsive`, `panel` and `left` are kept in the types for\n * compatibility and are never sent.\n */\nexport type PaneOpenChangeReason = 'toggle' | 'dismiss' | 'init' | 'responsive';\n\nexport interface PaneBaseProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onExpand?: () => void;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n /** @deprecated Removed in 1.0. Snap in your own `onSizeChange` and pass `size`. */\n snapPoints?: number[];\n /** @deprecated Removed in 1.0, with `snapPoints`. */\n snapTolerance?: number;\n /** @deprecated Removed in 1.0. Close the pane from your own `onResizeEnd`. */\n collapseThreshold?: number;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n paneId?: string;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n persistence?: PaneSizePersistence;\n}\n\nexport const _BREAKPOINTS = {\n xs: '(min-width: 520px)',\n sm: '(min-width: 768px)',\n md: '(min-width: 1024px)',\n lg: '(min-width: 1280px)',\n xl: '(min-width: 1640px)',\n} as const;\n\nexport type Breakpoint = 'initial' | keyof typeof _BREAKPOINTS;\n\n/** Every breakpoint, smallest first. The stylesheet's @media blocks follow this order. */\nexport const SHELL_BREAKPOINTS: readonly Breakpoint[] = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'];\n\nexport type PaneTarget = 'left' | 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\n/** The panes a Trigger can drive. `left` is the deprecated name for `rail`. */\nexport type PaneName = Exclude<PaneTarget, 'left'>;\n\n/**\n * CSS custom property key type for type-safe style objects.\n * Allows any string prefixed with '--'.\n */\nexport type CSSCustomProperty = `--${string}`;\n\n/**\n * Style object that supports CSS custom properties.\n */\nexport type CSSPropertiesWithVars = React.CSSProperties & {\n [key: CSSCustomProperty]: string | number | undefined;\n};\n"],
5
+ "mappings": ";ukBAAA,IAAAA,EAAA,GAAA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,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,KACjD,mBAAgB,IAAM,CACpB,GAAI,CAAAD,EACJ,OAAAE,EAAiBH,CAAE,EACZ,IAAMI,EAAmBJ,CAAE,CACpC,EAAG,CAACA,EAAIC,EAAOE,EAAkBC,CAAkB,CAAC,CACtD,CAIA,IAAMC,EAAS,IAAI,IAGZ,SAASC,EAASC,EAAiB,CAK1C",
6
+ "names": ["shell_store_exports", "__export", "FIXED_TABLE", "ShellFrameContext", "ShellStoreContext", "constantOf", "createShellStore", "notifyShellStore", "setShellPeek", "subscribeShellStore", "tableAttributes", "tableOf", "useFrameRegistration", "usePaneEntry", "usePeeking", "useShellStore", "useStableKey", "warnOnce", "__toCommonJS", "React", "import_internal", "SHELL_BREAKPOINTS", "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", "warned", "warnOnce", "message"]
7
7
  }
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Command, from v2 (2026-11-03): a command palette, one field over everything the app can do.
3
+ *
4
+ * It is a Dialog: it covers the app, traps focus, locks the page and leaves on Escape. Inside are
5
+ * two panes in a column anchored to the top, the search bar and the results, so a result count
6
+ * never moves the field. The keyboard model is the package's: a row is highlighted from the first
7
+ * frame and after every keystroke, the arrows move it, Enter runs it, and running a row closes the
8
+ * palette. What rows exist and what they do is the app's.
9
+ *
10
+ * Filtering keeps the order of `items`: a palette is used by muscle memory, so typing never
11
+ * reorders it. Pass `filter={null}` to narrow and rank `items` yourself.
12
+ *
13
+ * Differs from v2 in its machine only: v1 builds on cmdk where v2 builds on Base UI's Autocomplete.
14
+ * A row that should be a link takes `asChild` around the app's link, where v2 takes `render`.
15
+ */
16
+ import * as React from 'react';
17
+ import { Command as CommandPrimitive } from 'cmdk';
18
+ import { Dialog as DialogPrimitive } from 'radix-ui';
19
+ type Size = '1' | '2' | '3' | '4';
20
+ /** The rows stand one step above the palette: it is the one object on screen, read from a distance. */
21
+ declare const ROW_STEP: Record<Size, Size>;
22
+ type CommandOpenChangeReason = 'item-press' | 'dismiss';
23
+ type CommandOpenChangeDetails = {
24
+ reason: CommandOpenChangeReason;
25
+ };
26
+ type Filter = (item: unknown, query: string, itemToString: (item: unknown) => string) => boolean;
27
+ interface CommandProps {
28
+ /**
29
+ * The size step of the palette, from `"1"` to `"4"`. The rows are one step larger than the
30
+ * app's controls at the same step, and the search text larger again. The default comes from
31
+ * the theme.
32
+ */
33
+ size?: Size;
34
+ /**
35
+ * Every item the palette can show, before filtering. `CommandList` takes a function that turns
36
+ * an item into a row. An item with its own `items` array is a group. Keep the array stable.
37
+ */
38
+ items: readonly unknown[];
39
+ /** Whether the palette is open, for a controlled palette. Most are, because a key handler opens them. */
40
+ open?: boolean;
41
+ /** Whether the palette is open at the start, for an uncontrolled palette. */
42
+ defaultOpen?: boolean;
43
+ /** Called each time the palette opens or closes. `reason` is `"item-press"` when a row ran. */
44
+ onOpenChange?: (open: boolean, details: CommandOpenChangeDetails) => void;
45
+ /** A `CommandTrigger`, if there is one, and a `CommandContent`. */
46
+ children: React.ReactNode;
47
+ }
48
+ /** A command palette: a field over a list of rows, in a dialog. Running a row closes it. */
49
+ declare function Command({ size: sizeProp, items, open, defaultOpen, onOpenChange, children }: CommandProps): React.JSX.Element;
50
+ interface CommandTriggerProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger> {
51
+ }
52
+ /** Opens the palette. Most palettes open from a key handler instead, and render none. */
53
+ declare function CommandTrigger({ children, ...props }: CommandTriggerProps): React.JSX.Element;
54
+ interface CommandContentProps {
55
+ /** The palette's accessible name, such as "Search the documentation". */
56
+ 'aria-label': string;
57
+ /**
58
+ * How an item matches the query. The default keeps an item whose text contains the query.
59
+ * `null` turns filtering off, for an app that narrows and ranks `items` itself.
60
+ */
61
+ filter?: Filter | null;
62
+ /** What an item says, for the filter. The default reads a string, or an object's label, title or value. */
63
+ itemToString?: (item: unknown) => string;
64
+ /** Called with the query on every keystroke, and with `""` when the palette closes. */
65
+ onQueryChange?: (query: string) => void;
66
+ /** Keep the portal in a container of your own. */
67
+ container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];
68
+ children: React.ReactNode;
69
+ className?: string;
70
+ style?: React.CSSProperties;
71
+ }
72
+ /** The palette: a column of the search bar over the results, anchored to the top of the window. */
73
+ declare function CommandContent({ 'aria-label': label, filter, itemToString, onQueryChange, container, children, className, style }: CommandContentProps): React.JSX.Element;
74
+ interface CommandInputProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>, 'value' | 'onValueChange' | 'aria-label'> {
75
+ /** The field's accessible name. */
76
+ 'aria-label': string;
77
+ /** An icon before the text, such as a search glyph. */
78
+ leading?: React.ReactNode;
79
+ }
80
+ /** The search bar, a pane of its own. The palette opens with the caret in it. */
81
+ declare function CommandInput({ leading, className, ...props }: CommandInputProps): React.JSX.Element;
82
+ interface CommandListProps<T> {
83
+ /** Turns an item into a row (a `CommandItem`) or a group (a `CommandGroup`). */
84
+ children: (item: T) => React.ReactNode;
85
+ className?: string;
86
+ }
87
+ /** The results, a pane of their own under the search bar. Its height follows the results. */
88
+ declare function CommandList<T>({ children, className }: CommandListProps<T>): React.JSX.Element;
89
+ interface CommandGroupProps {
90
+ /** The group's own items, after filtering. Render them with `CommandCollection`. */
91
+ items: readonly unknown[];
92
+ children: React.ReactNode;
93
+ className?: string;
94
+ }
95
+ /** A labelled run of rows. A group with no matching rows is left out. */
96
+ declare function CommandGroup({ items, children, className }: CommandGroupProps): React.JSX.Element;
97
+ interface CommandGroupLabelProps {
98
+ children: React.ReactNode;
99
+ className?: string;
100
+ }
101
+ /** The group's name, above its rows. */
102
+ declare function CommandGroupLabel({ children, className }: CommandGroupLabelProps): React.JSX.Element;
103
+ interface CommandCollectionProps<T> {
104
+ /** Turns one of the group's items into a row. */
105
+ children: (item: T) => React.ReactNode;
106
+ }
107
+ /** The group's rows. */
108
+ declare function CommandCollection<T>({ children }: CommandCollectionProps<T>): React.JSX.Element;
109
+ interface CommandItemProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>, 'value' | 'onSelect'> {
110
+ /** The item this row shows. A string is also the row's identity for the highlight. */
111
+ value?: unknown;
112
+ /** Runs when the row is pressed or Enter is pressed on it. The palette then closes. */
113
+ onSelect?: () => void;
114
+ /** An icon before the label. */
115
+ leading?: React.ReactNode;
116
+ /** Something after the label, such as a shortcut. */
117
+ trailing?: React.ReactNode;
118
+ /** Set when running the row destroys something. */
119
+ tone?: 'destructive';
120
+ /** Renders the child, such as your router's link, as the row. Enter follows the link. */
121
+ asChild?: boolean;
122
+ }
123
+ /** One row. Running it, by press or by Enter, runs `onSelect` and closes the palette. */
124
+ declare function CommandItem({ value, onSelect, leading, trailing, tone, asChild, children, className, ...props }: CommandItemProps): React.JSX.Element;
125
+ interface CommandEmptyProps {
126
+ children: React.ReactNode;
127
+ className?: string;
128
+ }
129
+ /** What the results pane says when nothing matches. It renders inside that pane. */
130
+ declare function CommandEmpty({ children, className }: CommandEmptyProps): React.ReactPortal | null;
131
+ export { Command, CommandTrigger, CommandContent, CommandInput, CommandList, CommandGroup, CommandGroupLabel, CommandCollection, CommandItem, CommandEmpty, ROW_STEP as COMMAND_ROW_STEP };
132
+ export type { CommandProps, CommandTriggerProps, CommandContentProps, CommandInputProps, CommandListProps, CommandGroupProps, CommandGroupLabelProps, CommandCollectionProps, CommandItemProps, CommandEmptyProps, CommandOpenChangeDetails, CommandOpenChangeReason, };
133
+ //# sourceMappingURL=command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/components/command.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrD,KAAK,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAElC,uGAAuG;AACvG,QAAA,MAAM,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,CAA8C,CAAC;AAEhF,KAAK,uBAAuB,GAAG,YAAY,GAAG,SAAS,CAAC;AACxD,KAAK,wBAAwB,GAAG;IAAE,MAAM,EAAE,uBAAuB,CAAA;CAAE,CAAC;AAEpE,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,MAAM,KAAK,OAAO,CAAC;AAgDjG,UAAU,YAAY;IACpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ;;;OAGG;IACH,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;IAC1B,yGAAyG;IACzG,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6EAA6E;IAC7E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+FAA+F;IAC/F,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC1E,mEAAmE;IACnE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,4FAA4F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object.create;var L=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty;var Se=(e,n)=>{for(var o in n)L(e,o,{get:n[o],enumerable:!0})},U=(e,n,o,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of ve(n))!Te.call(e,a)&&a!==o&&L(e,a,{get:()=>n[a],enumerable:!(i=Pe(n,a))||i.enumerable});return e};var R=(e,n,o)=>(o=e!=null?he(Re(e)):{},U(n||!e||!e.__esModule?L(o,"default",{value:e,enumerable:!0}):o,e)),be=e=>U(L({},"__esModule",{value:!0}),e);var Qe={};Se(Qe,{COMMAND_ROW_STEP:()=>de,Command:()=>Ae,CommandCollection:()=>We,CommandContent:()=>Oe,CommandEmpty:()=>qe,CommandGroup:()=>Ve,CommandGroupLabel:()=>je,CommandInput:()=>Be,CommandItem:()=>_e,CommandList:()=>He,CommandTrigger:()=>Me});module.exports=be(Qe);var t=R(require("react")),ue=require("react-dom"),S=R(require("classnames")),z=require("cmdk"),k=require("radix-ui");var E=R(require("react"));var f=R(require("react")),ae=R(require("classnames")),N=require("radix-ui");function Z(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var G=R(require("react"));function J(e,n){if(n.includes(e))return e;let o=Number(e),i=n[0],a=1/0;for(let r=0;r<n.length;r++){let s=Math.abs(Number(n[r])-o);s<a&&(a=s,i=n[r])}return i}var A=G.createContext("2");A.displayName="ThemeSizeContext";function X(e,n){let o=G.useContext(A);return e!==void 0?e:J(o,n.values)}var j=R(require("react"));function F(e){let[n,o]=j.useState(e),[i,a]=j.useState(e);return Object.is(e,i)||(a(e),o(e)),[n,o]}var Y={asChild:{type:"boolean"}};var ee=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],te=["auto","gray","mauve","slate","sage","olive","sand"];var oe=["none","small","medium","large","full"];var Fe=["inherit","light","dark"],ne=["sans","mono","serif"],ke=["1","2","3","4"],c={...Y,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:Fe,default:"inherit"},accentColor:{type:"enum",values:ee,default:"gray"},grayColor:{type:"enum",values:te,default:"gray"},radius:{type:"enum",values:oe,default:"full"},fontFamily:{type:"enum",values:ne,default:"sans"},headingFontFamily:{type:"enum",values:ne},size:{type:"enum",values:ke,default:"2"}};var g=()=>{},ct={appearance:c.appearance.default,accentColor:c.accentColor.default,grayColor:c.grayColor.default,resolvedGrayColor:c.grayColor.default,radius:c.radius.default,fontFamily:c.fontFamily.default,headingFontFamily:void 0,size:c.size.default,onAppearanceChange:g,onAccentColorChange:g,onGrayColorChange:g,onRadiusChange:g,onFontFamilyChange:g,onHeadingFontFamilyChange:g,onSizeChange:g},W=f.createContext(void 0);var _=f.forwardRef((e,n)=>{let o=f.useContext(W),i=N.Direction.useDirection();return o===void 0?f.createElement(N.Direction.Provider,{dir:i},f.createElement(re,{...e,ref:n})):f.createElement(q,{...e,ref:n})});_.displayName="Theme";var re=f.forwardRef((e,n)=>{let{appearance:o=c.appearance.default,accentColor:i=c.accentColor.default,grayColor:a=c.grayColor.default,radius:r=c.radius.default,fontFamily:s=c.fontFamily.default,headingFontFamily:u,size:m=c.size.default,hasBackground:p=c.hasBackground.default,...y}=e,[l,d]=F(o),[C,h]=F(i),[x,P]=F(a),[v,b]=F(r),[I,w]=F(s),[B,D]=F(u),[H,V]=F(m);return f.createElement(q,{...y,ref:n,isRoot:!0,hasBackground:p,appearance:l,accentColor:C,grayColor:x,radius:v,fontFamily:I,headingFontFamily:B,size:H,onAppearanceChange:d,onAccentColorChange:h,onGrayColorChange:P,onRadiusChange:b,onFontFamilyChange:w,onHeadingFontFamilyChange:D,onSizeChange:V})});re.displayName="ThemeRoot";var q=f.forwardRef((e,n)=>{let o=f.useContext(W),{asChild:i,isRoot:a,hasBackground:r,appearance:s=e.appearance??o?.appearance??c.appearance.default,accentColor:u=e.accentColor??o?.accentColor??c.accentColor.default,grayColor:m=e.grayColor??o?.resolvedGrayColor??c.grayColor.default,radius:p=e.radius??o?.radius??c.radius.default,fontFamily:y=e.fontFamily??o?.fontFamily??c.fontFamily.default,headingFontFamily:l=e.headingFontFamily??o?.headingFontFamily,size:d=e.size??o?.size??c.size.default,onAppearanceChange:C=o?.onAppearanceChange??g,onAccentColorChange:h=o?.onAccentColorChange??g,onGrayColorChange:x=o?.onGrayColorChange??g,onRadiusChange:P=o?.onRadiusChange??g,onFontFamilyChange:v=o?.onFontFamilyChange??g,onHeadingFontFamilyChange:b=o?.onHeadingFontFamilyChange??g,onSizeChange:I=o?.onSizeChange??g,...w}=e,B=i?N.Slot.Root:"div",D=m==="auto"?Z(u):m,H=e.appearance==="light"||e.appearance==="dark",V=r===void 0?a||H:r;return f.createElement(W.Provider,{value:f.useMemo(()=>({appearance:s,accentColor:u,grayColor:m,resolvedGrayColor:D,radius:p,fontFamily:y,headingFontFamily:l,size:d,onAppearanceChange:C,onAccentColorChange:h,onGrayColorChange:x,onRadiusChange:P,onFontFamilyChange:v,onHeadingFontFamilyChange:b,onSizeChange:I}),[s,u,m,D,p,y,l,d,C,h,x,P,v,b,I])},f.createElement(A.Provider,{value:d},f.createElement(B,{"data-is-root-theme":a?"true":"false","data-accent-color":u,"data-gray-color":D,"data-has-background":V?"true":"false","data-radius":p,"data-font-family":y,"data-heading-font-family":l,ref:n,...w,className:(0,ae.default)("kui-theme",{light:s==="light",dark:s==="dark"},w.className)})))});q.displayName="ThemeImpl";var ie=R(require("react")),se=ie.createContext(void 0);var T=R(require("react")),ze=T.createContext(null);function le({children:e}){return T.createElement(ze.Provider,{value:null},e)}var Q=E.forwardRef((e,n)=>E.createElement(se.Provider,{value:null},E.createElement(le,null,E.createElement(_,{...e,ref:n}))));Q.displayName="PortalTheme";var me=R(require("react")),M=0,$=null,Ee=e=>{};function De(){let e=new Set,n=(l,d)=>{let C=setTimeout(()=>{e.delete(C),l()},d);e.add(C)},o=()=>document.body.style.pointerEvents==="none",i=()=>{let l=!!document.querySelector('[role="dialog"][aria-modal="true"], [role="alertdialog"][aria-modal="true"]'),d=!!document.querySelector('[data-radix-popper-content-wrapper], [role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]');return l||d},a=()=>{o()&&!i()&&(Ee("[KookieUI] Cleaning stuck pointer-events: none from body"),document.body.style.pointerEvents="")},r=l=>{o()&&n(a,l)},s=l=>{let d=l.target;d&&!d.closest('[role="dialog"], [role="alertdialog"], [data-radix-popper-content-wrapper]')&&r(100)},u=l=>{l.key==="Escape"&&r(200)},m=()=>{r(50)};document.addEventListener("click",s,!0),document.addEventListener("keydown",u,!0),document.addEventListener("pointerup",m,!0),document.addEventListener("transitionend",m,!0),document.addEventListener("animationend",m,!0);let p=new MutationObserver(()=>{r(0)});p.observe(document.body,{childList:!0,attributes:!0,attributeFilter:["style"]});let y=setInterval(a,1e3);return r(100),()=>{clearInterval(y),e.forEach(clearTimeout),e.clear(),p.disconnect(),document.removeEventListener("click",s,!0),document.removeEventListener("keydown",u,!0),document.removeEventListener("pointerup",m,!0),document.removeEventListener("transitionend",m,!0),document.removeEventListener("animationend",m,!0)}}function ce(){me.useEffect(()=>{if(!(typeof document>"u"))return M+=1,M===1&&($=De()),()=>{M-=1,M===0&&($?.(),$=null)}},[])}var de={1:"2",2:"3",3:"4",4:"4"},Ne={values:["1","2","3","4"],default:"2"},O=t.createContext("2"),pe=t.createContext(()=>{}),fe=t.createContext([]),Ce=t.createContext(null),ye=t.createContext({query:"",filter:null,itemToString:String}),K=t.createContext(null);function Ie(e){if(typeof e=="string"||typeof e=="number")return String(e);if(e&&typeof e=="object"){let n=e;for(let o of["label","title","value","name"])if(typeof n[o]=="string")return n[o]}return""}var we=(e,n,o)=>o(e).toLowerCase().includes(n.trim().toLowerCase());function Le(e){return!!(e&&typeof e=="object"&&Array.isArray(e.items))}function Ge(e,n,o,i){if(o===null||n.trim()==="")return[...e];let a=[];for(let r of e)if(Le(r)){let s=r.items.filter(u=>o(u,n,i));s.length>0&&a.push({...r,items:s})}else o(r,n,i)&&a.push(r);return a}function Ae({size:e,items:n,open:o,defaultOpen:i,onOpenChange:a,children:r}){let s=X(e,Ne),[u,m]=t.useState(i??!1),p=o!==void 0,y=p?o:u,l=t.useCallback((C,h)=>{a?.(C,{reason:h}),p||m(C)},[a,p]),d=t.useCallback(()=>l(!1,"item-press"),[l]);return t.createElement(O.Provider,{value:s},t.createElement(fe.Provider,{value:n},t.createElement(Ce.Provider,{value:d},t.createElement(k.Dialog.Root,{open:y,onOpenChange:C=>l(C,"dismiss"),modal:!0},r))))}function Me({children:e,...n}){return t.createElement(k.Dialog.Trigger,{asChild:!0,...n},e)}function Oe({"aria-label":e,filter:n=we,itemToString:o=Ie,onQueryChange:i,container:a,children:r,className:s,style:u}){let m=t.useContext(O),[p,y]=t.useState(""),[l,d]=t.useState(null),C=t.useRef(i);t.useEffect(()=>{C.current=i}),t.useEffect(()=>()=>C.current?.(""),[]),ce();let h=t.useCallback(v=>{y(v),C.current?.(v)},[]),x=t.useMemo(()=>({query:p,filter:n,itemToString:o}),[p,n,o]),P=t.useMemo(()=>({seat:l,setSeat:d}),[l]);return t.createElement(k.Dialog.Portal,{container:a},t.createElement(Q,{asChild:!0},t.createElement(k.Dialog.Overlay,{className:"kui-BaseDialogOverlay kui-CommandOverlay"},t.createElement(k.Dialog.Content,{"aria-label":e,"aria-describedby":void 0,className:(0,S.default)("kui-CommandContent",`kui-r-size-${m}`,s),style:u,onCloseAutoFocus:()=>{document.body.style.pointerEvents=""}},t.createElement(k.Dialog.Title,{className:"kui-sr-only"},e),t.createElement(z.Command,{label:e,shouldFilter:!1,loop:!0,className:"kui-CommandRoot"},t.createElement(ye.Provider,{value:x},t.createElement(pe.Provider,{value:h},t.createElement(K.Provider,{value:P},r))))))))}function Be({leading:e,className:n,...o}){let i=t.useContext(O),a=t.useContext(pe),r=t.useRef(null);return t.createElement("div",{className:(0,S.default)("kui-CommandSearch",`kui-r-size-${i}`),onMouseDown:s=>{s.target!==r.current&&(s.preventDefault(),r.current?.focus())}},e?t.createElement("span",{className:"kui-CommandSearchSlot","aria-hidden":!0},e):null,t.createElement(z.Command.Input,{ref:r,autoFocus:!0,...o,onValueChange:a,className:(0,S.default)("kui-reset","kui-CommandInput",n)}))}function He({children:e,className:n}){let o=t.useContext(O),i=t.useContext(fe),{query:a,filter:r,itemToString:s}=t.useContext(ye),u=t.useContext(K),m=t.useMemo(()=>Ge(i,a,r,s),[i,a,r,s]);return t.createElement("div",{className:(0,S.default)("kui-BaseMenuContent","kui-variant-soft",`kui-r-size-${de[o]}`,"kui-CommandPanel",n)},t.createElement(z.Command.List,{className:(0,S.default)("kui-BaseMenuViewport","kui-CommandList")},m.map(p=>e(p)),t.createElement("div",{className:"kui-CommandSeat",ref:u?u.setSeat:void 0})))}var ge=t.createContext([]);function Ve({items:e,children:n,className:o}){return t.createElement(ge.Provider,{value:e},t.createElement(z.Command.Group,{className:(0,S.default)("kui-BaseMenuGroup","kui-CommandGroup",o)},n))}function je({children:e,className:n}){return t.createElement("div",{className:(0,S.default)("kui-BaseMenuLabel","kui-CommandGroupLabel",n),"aria-hidden":!0},e)}function We({children:e}){let n=t.useContext(ge);return t.createElement(t.Fragment,null,n.map(o=>e(o)))}function _e({value:e,onSelect:n,leading:o,trailing:i,tone:a,asChild:r,children:s,className:u,...m}){let p=t.useContext(Ce),y=t.useId(),l=t.useRef(null),d=t.useRef(!1),C=typeof e=="string"?e:y,h=()=>{n?.(),p?.()},x=()=>{if(d.current){d.current=!1,h();return}let b=l.current??document.querySelector(`[data-kui-command-item="${CSS.escape(y)}"]`);if(r&&b instanceof HTMLAnchorElement){b.click();return}h()},P=r&&t.isValidElement(s)?s:null,v=b=>t.createElement(t.Fragment,null,o?t.createElement("span",{className:"kui-CommandItemSlot","data-slot":"leading","aria-hidden":!0},o):null,t.createElement("span",{className:"kui-CommandItemLabel"},b),i?t.createElement("span",{className:"kui-CommandItemSlot","data-slot":"trailing"},i):null);return t.createElement(z.Command.Item,{...m,ref:l,"data-kui-command-item":y,value:C,asChild:!!P,onSelect:x,onClickCapture:()=>{d.current=!0},"data-tone":a,className:(0,S.default)("kui-reset","kui-BaseMenuItem","kui-CommandItem",u)},P?t.cloneElement(P,void 0,v(P.props.children)):v(s))}function qe({children:e,className:n}){let o=t.useContext(K);return o?.seat?(0,ue.createPortal)(t.createElement(z.Command.Empty,{className:(0,S.default)("kui-CommandEmpty",n)},e),o.seat):null}
3
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/command.tsx", "../../../src/components/_internal/portal-theme.tsx", "../../../src/components/theme.tsx", "../../../src/helpers/get-matching-gray-color.ts", "../../../src/hooks/theme-size.ts", "../../../src/helpers/theme-size.ts", "../../../src/hooks/use-prop-synced-state.ts", "../../../src/props/as-child.prop.ts", "../../../src/props/color.prop.ts", "../../../src/props/radius.prop.ts", "../../../src/components/theme.props.tsx", "../../../src/components/_internal/pane-band-context.ts", "../../../src/components/_internal/page-scope.tsx", "../../../src/hooks/use-body-pointer-events-cleanup.ts"],
4
+ "sourcesContent": ["'use client';\n\n/**\n * Command, from v2 (2026-11-03): a command palette, one field over everything the app can do.\n *\n * It is a Dialog: it covers the app, traps focus, locks the page and leaves on Escape. Inside are\n * two panes in a column anchored to the top, the search bar and the results, so a result count\n * never moves the field. The keyboard model is the package's: a row is highlighted from the first\n * frame and after every keystroke, the arrows move it, Enter runs it, and running a row closes the\n * palette. What rows exist and what they do is the app's.\n *\n * Filtering keeps the order of `items`: a palette is used by muscle memory, so typing never\n * reorders it. Pass `filter={null}` to narrow and rank `items` yourself.\n *\n * Differs from v2 in its machine only: v1 builds on cmdk where v2 builds on Base UI's Autocomplete.\n * A row that should be a link takes `asChild` around the app's link, where v2 takes `render`.\n */\n\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport classNames from 'classnames';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { PortalTheme } from './_internal/portal-theme.js';\nimport { useBodyPointerEventsCleanup } from '../hooks/use-body-pointer-events-cleanup.js';\nimport { useThemeSize } from '../hooks/theme-size.js';\n\ntype Size = '1' | '2' | '3' | '4';\n\n/** The rows stand one step above the palette: it is the one object on screen, read from a distance. */\nconst ROW_STEP: Record<Size, Size> = { '1': '2', '2': '3', '3': '4', '4': '4' };\n\ntype CommandOpenChangeReason = 'item-press' | 'dismiss';\ntype CommandOpenChangeDetails = { reason: CommandOpenChangeReason };\n\ntype Filter = (item: unknown, query: string, itemToString: (item: unknown) => string) => boolean;\n\nconst SIZE_DEF = { values: ['1', '2', '3', '4'], default: '2' } as const;\n\nconst CommandSizeContext = React.createContext<Size>('2');\nconst CommandQueryContext = React.createContext<(query: string) => void>(() => {});\nconst CommandItemsContext = React.createContext<readonly unknown[]>([]);\nconst CommandCloseContext = React.createContext<(() => void) | null>(null);\nconst CommandListContext = React.createContext<{ query: string; filter: Filter | null; itemToString: (item: unknown) => string }>({\n query: '',\n filter: null,\n itemToString: String,\n});\nconst CommandSeatContext = React.createContext<{ seat: HTMLElement | null; setSeat: (node: HTMLElement | null) => void } | null>(null);\n\n/** What an item says, for the default filter: a string as itself, an object by its label, title or value. */\nfunction defaultItemToString(item: unknown): string {\n if (typeof item === 'string' || typeof item === 'number') return String(item);\n if (item && typeof item === 'object') {\n const record = item as Record<string, unknown>;\n for (const key of ['label', 'title', 'value', 'name']) {\n if (typeof record[key] === 'string') return record[key] as string;\n }\n }\n return '';\n}\n\nconst defaultFilter: Filter = (item, query, itemToString) => itemToString(item).toLowerCase().includes(query.trim().toLowerCase());\n\n/** A group is an item that carries its own `items`; it stays while any of them matches. */\nfunction isGroup(item: unknown): item is { items: readonly unknown[] } {\n return Boolean(item && typeof item === 'object' && Array.isArray((item as { items?: unknown }).items));\n}\n\nfunction narrow(items: readonly unknown[], query: string, filter: Filter | null, itemToString: (item: unknown) => string): unknown[] {\n if (filter === null || query.trim() === '') return [...items];\n const out: unknown[] = [];\n for (const item of items) {\n if (isGroup(item)) {\n const kept = item.items.filter((member) => filter(member, query, itemToString));\n if (kept.length > 0) out.push({ ...item, items: kept });\n } else if (filter(item, query, itemToString)) {\n out.push(item);\n }\n }\n return out;\n}\n\ninterface CommandProps {\n /**\n * The size step of the palette, from `\"1\"` to `\"4\"`. The rows are one step larger than the\n * app's controls at the same step, and the search text larger again. The default comes from\n * the theme.\n */\n size?: Size;\n /**\n * Every item the palette can show, before filtering. `CommandList` takes a function that turns\n * an item into a row. An item with its own `items` array is a group. Keep the array stable.\n */\n items: readonly unknown[];\n /** Whether the palette is open, for a controlled palette. Most are, because a key handler opens them. */\n open?: boolean;\n /** Whether the palette is open at the start, for an uncontrolled palette. */\n defaultOpen?: boolean;\n /** Called each time the palette opens or closes. `reason` is `\"item-press\"` when a row ran. */\n onOpenChange?: (open: boolean, details: CommandOpenChangeDetails) => void;\n /** A `CommandTrigger`, if there is one, and a `CommandContent`. */\n children: React.ReactNode;\n}\n\n/** A command palette: a field over a list of rows, in a dialog. Running a row closes it. */\nfunction Command({ size: sizeProp, items, open, defaultOpen, onOpenChange, children }: CommandProps) {\n const size = useThemeSize<Size>(sizeProp, SIZE_DEF);\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen ?? false);\n const controlled = open !== undefined;\n const isOpen = controlled ? open : internalOpen;\n\n const change = React.useCallback(\n (next: boolean, reason: CommandOpenChangeReason) => {\n onOpenChange?.(next, { reason });\n if (!controlled) setInternalOpen(next);\n },\n [onOpenChange, controlled],\n );\n const close = React.useCallback(() => change(false, 'item-press'), [change]);\n\n return (\n <CommandSizeContext.Provider value={size}>\n <CommandItemsContext.Provider value={items}>\n <CommandCloseContext.Provider value={close}>\n <DialogPrimitive.Root open={isOpen} onOpenChange={(next) => change(next, 'dismiss')} modal>\n {children}\n </DialogPrimitive.Root>\n </CommandCloseContext.Provider>\n </CommandItemsContext.Provider>\n </CommandSizeContext.Provider>\n );\n}\n\ninterface CommandTriggerProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger> {}\n\n/** Opens the palette. Most palettes open from a key handler instead, and render none. */\nfunction CommandTrigger({ children, ...props }: CommandTriggerProps) {\n return (\n <DialogPrimitive.Trigger asChild {...props}>\n {children}\n </DialogPrimitive.Trigger>\n );\n}\n\ninterface CommandContentProps {\n /** The palette's accessible name, such as \"Search the documentation\". */\n 'aria-label': string;\n /**\n * How an item matches the query. The default keeps an item whose text contains the query.\n * `null` turns filtering off, for an app that narrows and ranks `items` itself.\n */\n filter?: Filter | null;\n /** What an item says, for the filter. The default reads a string, or an object's label, title or value. */\n itemToString?: (item: unknown) => string;\n /** Called with the query on every keystroke, and with `\"\"` when the palette closes. */\n onQueryChange?: (query: string) => void;\n /** Keep the portal in a container of your own. */\n container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];\n children: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** The palette: a column of the search bar over the results, anchored to the top of the window. */\nfunction CommandContent({ 'aria-label': label, filter = defaultFilter, itemToString = defaultItemToString, onQueryChange, container, children, className, style }: CommandContentProps) {\n const size = React.useContext(CommandSizeContext);\n const [query, setQuery] = React.useState('');\n const [seat, setSeat] = React.useState<HTMLElement | null>(null);\n const report = React.useRef(onQueryChange);\n React.useEffect(() => {\n report.current = onQueryChange;\n });\n\n // Closing clears the query, so the palette opens fresh.\n React.useEffect(() => () => report.current?.(''), []);\n useBodyPointerEventsCleanup();\n\n const changeQuery = React.useCallback((next: string) => {\n setQuery(next);\n report.current?.(next);\n }, []);\n const listValue = React.useMemo(() => ({ query, filter, itemToString }), [query, filter, itemToString]);\n const seatValue = React.useMemo(() => ({ seat, setSeat }), [seat]);\n\n return (\n <DialogPrimitive.Portal container={container}>\n <PortalTheme asChild>\n <DialogPrimitive.Overlay className=\"kui-BaseDialogOverlay kui-CommandOverlay\">\n <DialogPrimitive.Content\n aria-label={label}\n aria-describedby={undefined}\n className={classNames('kui-CommandContent', `kui-r-size-${size}`, className)}\n style={style}\n onCloseAutoFocus={() => {\n document.body.style.pointerEvents = '';\n }}\n >\n <DialogPrimitive.Title className=\"kui-sr-only\">{label}</DialogPrimitive.Title>\n {/* cmdk owns the highlight and Enter; this file owns the filter, so order never changes. */}\n <CommandPrimitive label={label} shouldFilter={false} loop className=\"kui-CommandRoot\">\n <CommandListContext.Provider value={listValue}>\n <CommandQueryContext.Provider value={changeQuery}>\n <CommandSeatContext.Provider value={seatValue}>{children}</CommandSeatContext.Provider>\n </CommandQueryContext.Provider>\n </CommandListContext.Provider>\n </CommandPrimitive>\n </DialogPrimitive.Content>\n </DialogPrimitive.Overlay>\n </PortalTheme>\n </DialogPrimitive.Portal>\n );\n}\n\ninterface CommandInputProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>, 'value' | 'onValueChange' | 'aria-label'> {\n /** The field's accessible name. */\n 'aria-label': string;\n /** An icon before the text, such as a search glyph. */\n leading?: React.ReactNode;\n}\n\n/** The search bar, a pane of its own. The palette opens with the caret in it. */\nfunction CommandInput({ leading, className, ...props }: CommandInputProps) {\n const size = React.useContext(CommandSizeContext);\n const setQuery = React.useContext(CommandQueryContext);\n const inputRef = React.useRef<HTMLInputElement>(null);\n return (\n // A press anywhere on the bar puts the caret in the field.\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n className={classNames('kui-CommandSearch', `kui-r-size-${size}`)}\n onMouseDown={(event) => {\n if (event.target === inputRef.current) return;\n event.preventDefault();\n inputRef.current?.focus();\n }}\n >\n {leading ? (\n <span className=\"kui-CommandSearchSlot\" aria-hidden>\n {leading}\n </span>\n ) : null}\n {/* `autoFocus` focuses inside the tap's own task, which is what raises the keyboard on iOS. */}\n <CommandPrimitive.Input\n ref={inputRef}\n // The palette is the field: it opens to type into, the one place autofocus is the design.\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus\n {...props}\n onValueChange={setQuery}\n className={classNames('kui-reset', 'kui-CommandInput', className)}\n />\n </div>\n );\n}\n\ninterface CommandListProps<T> {\n /** Turns an item into a row (a `CommandItem`) or a group (a `CommandGroup`). */\n children: (item: T) => React.ReactNode;\n className?: string;\n}\n\n/** The results, a pane of their own under the search bar. Its height follows the results. */\nfunction CommandList<T>({ children, className }: CommandListProps<T>) {\n const size = React.useContext(CommandSizeContext);\n const items = React.useContext(CommandItemsContext);\n const { query, filter, itemToString } = React.useContext(CommandListContext);\n const seat = React.useContext(CommandSeatContext);\n const shown = React.useMemo(() => narrow(items, query, filter, itemToString), [items, query, filter, itemToString]);\n return (\n <div className={classNames('kui-BaseMenuContent', 'kui-variant-soft', `kui-r-size-${ROW_STEP[size]}`, 'kui-CommandPanel', className)}>\n <CommandPrimitive.List className={classNames('kui-BaseMenuViewport', 'kui-CommandList')}>\n {shown.map((item) => children(item as T))}\n {/* The empty state's seat, inside this pane, so it is the same box as the results. */}\n <div className=\"kui-CommandSeat\" ref={seat ? seat.setSeat : undefined} />\n </CommandPrimitive.List>\n </div>\n );\n}\n\nconst CommandGroupItemsContext = React.createContext<readonly unknown[]>([]);\n\ninterface CommandGroupProps {\n /** The group's own items, after filtering. Render them with `CommandCollection`. */\n items: readonly unknown[];\n children: React.ReactNode;\n className?: string;\n}\n\n/** A labelled run of rows. A group with no matching rows is left out. */\nfunction CommandGroup({ items, children, className }: CommandGroupProps) {\n return (\n <CommandGroupItemsContext.Provider value={items}>\n <CommandPrimitive.Group className={classNames('kui-BaseMenuGroup', 'kui-CommandGroup', className)}>{children}</CommandPrimitive.Group>\n </CommandGroupItemsContext.Provider>\n );\n}\n\ninterface CommandGroupLabelProps {\n children: React.ReactNode;\n className?: string;\n}\n\n/** The group's name, above its rows. */\nfunction CommandGroupLabel({ children, className }: CommandGroupLabelProps) {\n return (\n <div className={classNames('kui-BaseMenuLabel', 'kui-CommandGroupLabel', className)} aria-hidden>\n {children}\n </div>\n );\n}\n\ninterface CommandCollectionProps<T> {\n /** Turns one of the group's items into a row. */\n children: (item: T) => React.ReactNode;\n}\n\n/** The group's rows. */\nfunction CommandCollection<T>({ children }: CommandCollectionProps<T>) {\n const items = React.useContext(CommandGroupItemsContext);\n return <>{items.map((item) => children(item as T))}</>;\n}\n\ninterface CommandItemProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>, 'value' | 'onSelect'> {\n /** The item this row shows. A string is also the row's identity for the highlight. */\n value?: unknown;\n /** Runs when the row is pressed or Enter is pressed on it. The palette then closes. */\n onSelect?: () => void;\n /** An icon before the label. */\n leading?: React.ReactNode;\n /** Something after the label, such as a shortcut. */\n trailing?: React.ReactNode;\n /** Set when running the row destroys something. */\n tone?: 'destructive';\n /** Renders the child, such as your router's link, as the row. Enter follows the link. */\n asChild?: boolean;\n}\n\n/** One row. Running it, by press or by Enter, runs `onSelect` and closes the palette. */\nfunction CommandItem({ value, onSelect, leading, trailing, tone, asChild, children, className, ...props }: CommandItemProps) {\n const close = React.useContext(CommandCloseContext);\n const id = React.useId();\n const element = React.useRef<HTMLDivElement>(null);\n const clicked = React.useRef(false);\n const itemValue = typeof value === 'string' ? value : id;\n\n const run = () => {\n onSelect?.();\n close?.();\n };\n\n // cmdk runs a row from Enter without a click. A link has to be clicked to navigate, so Enter\n // clicks it, and the click comes back through here as the run.\n const handleSelect = () => {\n if (clicked.current) {\n clicked.current = false;\n run();\n return;\n }\n // Found by attribute, not by ref: an app's link component need not forward a ref.\n const node = element.current ?? document.querySelector(`[data-kui-command-item=\"${CSS.escape(id)}\"]`);\n if (asChild && node instanceof HTMLAnchorElement) {\n node.click();\n return;\n }\n run();\n };\n\n const child = asChild && React.isValidElement<{ children?: React.ReactNode }>(children) ? children : null;\n const inner = (label: React.ReactNode) => (\n <>\n {leading ? (\n <span className=\"kui-CommandItemSlot\" data-slot=\"leading\" aria-hidden>\n {leading}\n </span>\n ) : null}\n <span className=\"kui-CommandItemLabel\">{label}</span>\n {trailing ? (\n <span className=\"kui-CommandItemSlot\" data-slot=\"trailing\">\n {trailing}\n </span>\n ) : null}\n </>\n );\n\n return (\n <CommandPrimitive.Item\n {...props}\n ref={element}\n data-kui-command-item={id}\n value={itemValue}\n asChild={Boolean(child)}\n onSelect={handleSelect}\n onClickCapture={() => {\n clicked.current = true;\n }}\n data-tone={tone}\n className={classNames('kui-reset', 'kui-BaseMenuItem', 'kui-CommandItem', className)}\n >\n {child ? React.cloneElement(child, undefined, inner(child.props.children)) : inner(children)}\n </CommandPrimitive.Item>\n );\n}\n\ninterface CommandEmptyProps {\n children: React.ReactNode;\n className?: string;\n}\n\n/** What the results pane says when nothing matches. It renders inside that pane. */\nfunction CommandEmpty({ children, className }: CommandEmptyProps) {\n const seat = React.useContext(CommandSeatContext);\n if (!seat?.seat) return null;\n return createPortal(<CommandPrimitive.Empty className={classNames('kui-CommandEmpty', className)}>{children}</CommandPrimitive.Empty>, seat.seat);\n}\n\nexport { Command, CommandTrigger, CommandContent, CommandInput, CommandList, CommandGroup, CommandGroupLabel, CommandCollection, CommandItem, CommandEmpty, ROW_STEP as COMMAND_ROW_STEP };\nexport type {\n CommandProps,\n CommandTriggerProps,\n CommandContentProps,\n CommandInputProps,\n CommandListProps,\n CommandGroupProps,\n CommandGroupLabelProps,\n CommandCollectionProps,\n CommandItemProps,\n CommandEmptyProps,\n CommandOpenChangeDetails,\n CommandOpenChangeReason,\n};\n", "import * as React from 'react';\n\nimport { Theme } from '../theme.js';\nimport { PaneBandSizeContext } from './pane-band-context.js';\nimport { NoPageScope } from './page-scope.js';\n\n/**\n * The Theme at the root of a portalled surface (Popover, Dialog, Sheet, menus, Tooltip). The\n * surface renders outside any Shell pane even though context flows into it, so a Toolbar in it\n * does not take the pane's band size, and a title in it does not take over the pane's page. A\n * `Theme asChild` an app nests in a pane keeps both.\n */\nconst PortalTheme = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<typeof Theme>>((props, forwardedRef) => (\n <PaneBandSizeContext.Provider value={null}>\n <NoPageScope>\n <Theme {...props} ref={forwardedRef} />\n </NoPageScope>\n </PaneBandSizeContext.Provider>\n));\nPortalTheme.displayName = 'PortalTheme';\n\nexport { PortalTheme };\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot } from 'radix-ui';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { ThemeSizeContext } from '../hooks/theme-size.js';\nimport { usePropSyncedState } from '../hooks/use-prop-synced-state.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\ntype ThemeSize = (typeof themePropDefs.size.values)[number];\n// Headings follow the body font until something sets this, so `undefined` is a\n// meaningful value here rather than a missing one.\ntype ThemeHeadingFontFamily = ThemeFontFamily | undefined;\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n onHeadingFontFamilyChange: (headingFontFamily: ThemeHeadingFontFamily) => void;\n onSizeChange: (size: ThemeSize) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n radius: ThemeRadius;\n fontFamily: ThemeFontFamily;\n headingFontFamily: ThemeHeadingFontFamily;\n size: ThemeSize;\n}\n// Default theme values used when components render outside a Theme provider\nconst defaultThemeContext: ThemeContextValue = {\n appearance: themePropDefs.appearance.default,\n accentColor: themePropDefs.accentColor.default,\n grayColor: themePropDefs.grayColor.default,\n resolvedGrayColor: themePropDefs.grayColor.default,\n radius: themePropDefs.radius.default,\n fontFamily: themePropDefs.fontFamily.default,\n headingFontFamily: undefined,\n size: themePropDefs.size.default,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onRadiusChange: noop,\n onFontFamilyChange: noop,\n onHeadingFontFamilyChange: noop,\n onSizeChange: noop,\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n // Return default context if used outside Theme provider (e.g., during SSR)\n return context ?? defaultThemeContext;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n // Direction is inherited: a Radix DirectionProvider above the Theme (for a right-to-left app)\n // wins, and left-to-right stays the default when there is none.\n const dir = Direction.useDirection();\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <Direction.Provider dir={dir}>\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>((props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n radius: radiusProp = themePropDefs.radius.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n headingFontFamily: headingFontFamilyProp,\n size: sizeProp = themePropDefs.size.default,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n\n // Each of these follows its prop but stays independently settable, so\n // the context setters can change the theme at runtime. Syncing during render\n // rather than in an effect matters here: an effect would commit the old\n // theme first and re-render every consumer of the context a second time.\n const [appearance, setAppearance] = usePropSyncedState(appearanceProp);\n const [accentColor, setAccentColor] = usePropSyncedState(accentColorProp);\n const [grayColor, setGrayColor] = usePropSyncedState(grayColorProp);\n const [radius, setRadius] = usePropSyncedState(radiusProp);\n const [fontFamily, setFontFamily] = usePropSyncedState(fontFamilyProp);\n const [headingFontFamily, setHeadingFontFamily] = usePropSyncedState(headingFontFamilyProp);\n const [size, setSize] = usePropSyncedState(sizeProp);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n radius={radius}\n fontFamily={fontFamily}\n headingFontFamily={headingFontFamily}\n size={size}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onRadiusChange={setRadius}\n onFontFamilyChange={setFontFamily}\n onHeadingFontFamilyChange={setHeadingFontFamily}\n onSizeChange={setSize}\n />\n );\n});\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps extends ComponentPropsWithout<'div', RemovedProps | 'dir'>, ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = props.appearance ?? context?.appearance ?? themePropDefs.appearance.default,\n accentColor = props.accentColor ?? context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = props.grayColor ?? context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n headingFontFamily = props.headingFontFamily ?? context?.headingFontFamily,\n size = props.size ?? context?.size ?? themePropDefs.size.default,\n // A nested Theme forwards changes to the one above it, so a switcher\n // inside a portal (Dialog, Popover, menus) still reaches the root.\n onAppearanceChange = context?.onAppearanceChange ?? noop,\n onAccentColorChange = context?.onAccentColorChange ?? noop,\n onGrayColorChange = context?.onGrayColorChange ?? noop,\n onRadiusChange = context?.onRadiusChange ?? noop,\n onFontFamilyChange = context?.onFontFamilyChange ?? noop,\n onHeadingFontFamilyChange = context?.onHeadingFontFamilyChange ?? noop,\n onSizeChange = context?.onSizeChange ?? noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground = hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n radius,\n fontFamily,\n headingFontFamily,\n size,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onRadiusChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n onSizeChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n radius,\n fontFamily,\n headingFontFamily,\n size,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onRadiusChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n onSizeChange,\n ],\n )}\n >\n {/* Size travels on its own context as a bare string, so the components\n that read it do not re-render when another theme value changes. */}\n <ThemeSizeContext.Provider value={size}>\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-radius={radius}\n data-font-family={fontFamily}\n data-heading-font-family={headingFontFamily}\n ref={forwardedRef}\n {...themeProps}\n className={classNames(\n 'kui-theme',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className,\n )}\n />\n </ThemeSizeContext.Provider>\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps, ThemeContextValue };\n", "import type { accentColors } from '../props/color.prop.js';\n\ntype ThemeAccentColor = (typeof accentColors)[number];\n\nexport function getMatchingGrayColor(accentColor: ThemeAccentColor) {\n switch (accentColor) {\n case 'tomato':\n case 'red':\n case 'ruby':\n case 'crimson':\n case 'pink':\n case 'plum':\n case 'purple':\n case 'violet':\n return 'mauve';\n case 'iris':\n case 'indigo':\n case 'blue':\n case 'sky':\n case 'cyan':\n return 'slate';\n case 'teal':\n case 'jade':\n case 'mint':\n case 'green':\n return 'sage';\n case 'grass':\n case 'lime':\n return 'olive';\n case 'yellow':\n case 'amber':\n case 'orange':\n case 'brown':\n case 'gold':\n case 'bronze':\n return 'sand';\n case 'gray':\n return 'gray';\n }\n}\n", "'use client';\n\nimport * as React from 'react';\n\nimport { THEME_SIZE_DEFAULT, clampSize } from '../helpers/theme-size.js';\nimport type { ThemeSize } from '../helpers/theme-size.js';\n\n/**\n * The app-wide size index, provided by `Theme` beside `ThemeContext`.\n *\n * It is its own context, holding one string, so a component that only needs\n * the size does not re-render when the accent colour or appearance changes.\n */\nconst ThemeSizeContext = React.createContext<ThemeSize>(THEME_SIZE_DEFAULT);\nThemeSizeContext.displayName = 'ThemeSizeContext';\n\ninterface SizePropDef {\n values: readonly string[];\n default?: string;\n}\n\n/**\n * The size a component on the 1-4 index takes: what the caller said, else the\n * nearest Theme's size, mapped into the component's range.\n */\nfunction useThemeSize<V>(explicit: V | undefined, propDef: SizePropDef): V {\n const themeSize = React.useContext(ThemeSizeContext);\n if (explicit !== undefined) return explicit;\n // The clamped value is one of `propDef.values`, which is what `V` ranges over.\n return clampSize(themeSize, propDef.values) as V;\n}\n\n/**\n * Fills `size` from the nearest Theme when the caller left it unset, so the\n * result can go straight into `extractProps`. An explicit size, responsive\n * object included, wins.\n *\n * Returns the same props object when there is nothing to fill: when a size is\n * set, or when the theme size resolves to the prop def's own default (the\n * common case, a Theme with no size), so `extractProps` applies it as before.\n */\nfunction useThemeSizeProps<P extends { size?: unknown }>(props: P, propDef: SizePropDef): P {\n const themeSize = React.useContext(ThemeSizeContext);\n if (props.size !== undefined) return props;\n const size = clampSize(themeSize, propDef.values);\n if (size === propDef.default) return props;\n return { ...props, size };\n}\n\nexport { ThemeSizeContext, useThemeSize, useThemeSizeProps };\n", "/**\n * The pure half of the theme size: the type, the default and the clamp. Server-safe.\n *\n * The context and the hooks that read it live in `hooks/theme-size.ts`, a client module, so there\n * is one `ThemeSizeContext` and importing `/helpers` from a server component does not call\n * `createContext`.\n */\n\ntype ThemeSize = '1' | '2' | '3' | '4';\n\n/** The rest of the 1-4 index when no Theme states a size. */\nconst THEME_SIZE_DEFAULT: ThemeSize = '2';\n\n/**\n * Maps the theme size onto a component's own range: the value itself when the\n * component has it, otherwise the nearest end of the range (`4` on a 1-3 scale\n * is `3`, on a 1-2 scale it is `2`).\n */\nfunction clampSize(size: ThemeSize, values: readonly string[]): string {\n if (values.includes(size)) return size;\n const n = Number(size);\n let nearest = values[0];\n let distance = Infinity;\n for (let i = 0; i < values.length; i++) {\n const d = Math.abs(Number(values[i]) - n);\n if (d < distance) {\n distance = d;\n nearest = values[i];\n }\n }\n return nearest;\n}\n\nexport { THEME_SIZE_DEFAULT, clampSize };\nexport type { ThemeSize };\n", "import * as React from 'react';\n\n/**\n * State that tracks a prop but can also be set imperatively \u2014 the shape `Theme`\n * needs, where a prop sets the value and the context setters can change it at runtime.\n *\n * Adjusts state during render rather than syncing in a `useEffect`. An effect\n * would commit one render carrying the *old* value and schedule a second one,\n * which for a provider means every consumer renders twice and the browser can\n * paint the stale value in between.\n *\n * @see https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\nexport function usePropSyncedState<T>(propValue: T) {\n const [value, setValue] = React.useState(propValue);\n const [previousPropValue, setPreviousPropValue] = React.useState(propValue);\n\n if (!Object.is(propValue, previousPropValue)) {\n setPreviousPropValue(propValue);\n setValue(propValue);\n }\n\n return [value, setValue] as const;\n}\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Chip, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColors, grayColors } from '../props/color.prop.js';\nimport { radii } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst appearances = ['inherit', 'light', 'dark'] as const;\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\nconst sizes = ['1', '2', '3', '4'] as const;\n\nconst themePropDefs = {\n ...asChildPropDef,\n /**\n * Whether to apply background color to the Theme element.\n *\n * Defaults to true for the root Theme and for Theme elements that\n * have an explicit light or dark appearance prop.\n */\n hasBackground: { type: 'boolean', default: true },\n /**\n * Sets the color scheme of the theme, typcially referred to as light and dark mode.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/dark-mode\n */\n appearance: { type: 'enum', values: appearances, default: 'inherit' },\n /**\n * Selects one of the accent color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n accentColor: { type: 'enum', values: accentColors, default: 'gray' },\n /**\n * Selects one of the gray color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n grayColor: { type: 'enum', values: grayColors, default: 'gray' },\n /**\n * Sets the default radius of the components.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n radius: { type: 'enum', values: radii, default: 'full' },\n /**\n * Sets the font family used for body text in the theme.\n *\n * Headings follow this unless `headingFontFamily` (or the `--font-heading`\n * token) says otherwise.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n /**\n * Sets the font family used for `Heading`, independently of body text.\n *\n * Deliberately has no default: when it is left unset no attribute is\n * emitted and `--font-heading` keeps following `--font-body`, so a\n * `--font-heading` override in your own CSS survives a `fontFamily` switch.\n */\n headingFontFamily: { type: 'enum', values: fontFamilies },\n /**\n * The app-wide size index. Every component on the 1-4 control and surface\n * scale that states no `size` of its own takes this one; an explicit\n * `size` always wins. Nested Themes override it for their subtree.\n *\n * @default '2'\n */\n size: { type: 'enum', values: sizes, default: '2' },\n} satisfies {\n hasBackground: PropDef<boolean>;\n appearance: PropDef<(typeof appearances)[number]>;\n accentColor: PropDef<(typeof accentColors)[number]>;\n grayColor: PropDef<(typeof grayColors)[number]>;\n radius: PropDef<(typeof radii)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n headingFontFamily: PropDef<(typeof fontFamilies)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\n", "import * as React from 'react';\n\ntype BandSize = '1' | '2' | '3' | '4';\n\n/**\n * Set by `Shell.PaneHeader` and `Shell.PaneFooter` to their band size, and by `Shell.Scroll` to\n * null (a scrolling list has no band). `PortalTheme`, the root of every portalled surface\n * (Popover, Dialog, Sheet, menus), sets null too, so a Toolbar in one does not take the Shell's\n * step; a `Theme asChild` an app nests in a pane leaves it alone. `Shell.Root` clears it again.\n * Unset (`undefined`) everywhere else.\n *\n * Its own module so PortalTheme can reset it without bringing the Shell.\n */\nconst PaneBandSizeContext = React.createContext<BandSize | null | undefined>(undefined);\n\nexport { PaneBandSizeContext };\nexport type { BandSize };\n", "'use client';\n\nimport * as React from 'react';\n\n/**\n * What page is in a pane, and whether its title has scrolled away (from v2, 2026-11-03).\n *\n * A page's large title lives inside the scroller and the band that shows it again lives beside\n * it, so context, which only flows down, cannot carry it from one to the other. The store sits\n * at their common ancestor, the pane. Each pane provides its own, so two panes can each hold a\n * titled page; `Shell.Header` provides none, so a `Toolbar.Title` there always speaks for itself.\n * Outside a Shell there is no scope: a `Page` still draws its heading and a `Toolbar.Title` still\n * shows its own words.\n */\ntype PageStore = {\n /** The words of the page in this pane, or null while nothing has claimed it. */\n title: string | null;\n /** Every `Toolbar.Title` mirroring this pane's page, as elements: the collapse is written onto them. */\n mirrors: Set<HTMLElement>;\n /** Whether the page's own title has scrolled up behind the band. */\n collapsed: boolean;\n listeners: Set<() => void>;\n /** What a subscriber reads: a stable value between notifications. */\n version: number;\n};\n\nconst PageScopeContext = React.createContext<PageStore | null>(null);\n\nfunction notify(store: PageStore) {\n store.version += 1;\n for (const listener of store.listeners) listener();\n}\n\n/**\n * The collapse is an attribute write, not a render: only CSS reads it, and an observer sends it\n * twice per visit to a page.\n */\nfunction setPageCollapsed(store: PageStore, collapsed: boolean): void {\n if (store.collapsed === collapsed) return;\n store.collapsed = collapsed;\n for (const el of store.mirrors) {\n if (collapsed) el.setAttribute('data-collapsed', '');\n else el.removeAttribute('data-collapsed');\n }\n}\n\n/** Every pane renders one. It draws nothing. */\nfunction PageScope({ children }: { children: React.ReactNode }) {\n const store = React.useMemo<PageStore>(() => ({ title: null, mirrors: new Set(), collapsed: false, listeners: new Set(), version: 0 }), []);\n return <PageScopeContext.Provider value={store}>{children}</PageScopeContext.Provider>;\n}\n\n/** Cuts the scope off below a portal: a panel over a pane is not in it, so its title must not take the pane's band. */\nfunction NoPageScope({ children }: { children: React.ReactNode }) {\n return <PageScopeContext.Provider value={null}>{children}</PageScopeContext.Provider>;\n}\n\nfunction usePageScope(): PageStore | null {\n return React.useContext(PageScopeContext);\n}\n\n/** A `Page` claims the pane it is in, in an effect, so no subscriber's snapshot changes mid-render. */\nfunction useClaimPage(store: PageStore | null, title: string): void {\n React.useEffect(() => {\n if (!store) return;\n store.title = title;\n notify(store);\n return () => {\n if (store.title === title) {\n store.title = null;\n notify(store);\n }\n };\n }, [store, title]);\n}\n\n/** What a `Toolbar.Title` shows when it is given no words of its own. */\nfunction usePageTitle(store: PageStore | null): string | null {\n const subscribe = React.useCallback(\n (cb: () => void) => {\n if (!store) return () => {};\n store.listeners.add(cb);\n return () => {\n store.listeners.delete(cb);\n };\n },\n [store],\n );\n // The version is read so the subscription re-renders this consumer; the title itself is the value.\n React.useSyncExternalStore(\n subscribe,\n () => store?.version ?? 0,\n () => 0,\n );\n return store?.title ?? null;\n}\n\n/**\n * Registers a mirroring title's element, stamped with what the page is doing now: a title that\n * mounts after its page has scrolled arrives collapsed.\n */\nfunction usePageMirror(store: PageStore | null): React.RefCallback<HTMLElement> {\n const current = React.useRef<HTMLElement | null>(null);\n return React.useCallback(\n (el: HTMLElement | null) => {\n if (!store) return;\n if (current.current) store.mirrors.delete(current.current);\n current.current = el;\n if (!el) return;\n store.mirrors.add(el);\n if (store.collapsed) el.setAttribute('data-collapsed', '');\n else el.removeAttribute('data-collapsed');\n },\n [store],\n );\n}\n\nexport { PageScope, NoPageScope, usePageScope, useClaimPage, usePageTitle, usePageMirror, setPageCollapsed };\nexport type { PageStore };\n", "import * as React from 'react';\n\n// How many overlays currently use the hook. The listeners are shared: the first mount installs\n// them and the last unmount removes them, so closing one overlay never strips the fallback from\n// another that is still mounted.\nlet mountCount = 0;\nlet teardown: (() => void) | null = null;\n\nconst devLog = (message: string) => {\n if (process.env.NODE_ENV !== 'production') {\n console.log(message);\n }\n};\n\nfunction install(): () => void {\n // Deferred cleanups are tracked so teardown can cancel the ones still queued. A timer that\n // outlives the document reaches for `document.body` after it is gone; under jsdom that surfaces\n // as an unhandled ReferenceError attributed to whichever test happened to be running.\n const pending = new Set<ReturnType<typeof setTimeout>>();\n\n const defer = (fn: () => void, delay: number) => {\n const id = setTimeout(() => {\n pending.delete(id);\n fn();\n }, delay);\n pending.add(id);\n };\n\n const isStuck = () => document.body.style.pointerEvents === 'none';\n\n const hasOpenModal = (): boolean => {\n // Open dialogs and alert dialogs\n const hasDialogs = Boolean(\n document.querySelector('[role=\"dialog\"][aria-modal=\"true\"], [role=\"alertdialog\"][aria-modal=\"true\"]'),\n );\n\n // Any Radix overlay that is still mounted. Only overlays count: an open Accordion or\n // Collapsible also carries data-state=\"open\" and must not keep a stuck page blocked.\n const hasRadixOverlays = Boolean(\n document.querySelector(\n '[data-radix-popper-content-wrapper], [role=\"dialog\"][data-state=\"open\"], [role=\"alertdialog\"][data-state=\"open\"]',\n ),\n );\n\n return hasDialogs || hasRadixOverlays;\n };\n\n // Only clears pointer-events when no modal is open. Scroll-lock attributes belong to\n // react-remove-scroll and are never touched here.\n const safeCleanup = () => {\n if (isStuck() && !hasOpenModal()) {\n devLog('[KookieUI] Cleaning stuck pointer-events: none from body');\n document.body.style.pointerEvents = '';\n }\n };\n\n // Every trigger queues a check only while the body is actually blocked.\n const scheduleCleanup = (delay: number) => {\n if (isStuck()) defer(safeCleanup, delay);\n };\n\n const onDocumentClick = (event: Event) => {\n const target = event.target as Element;\n if (target && !target.closest('[role=\"dialog\"], [role=\"alertdialog\"], [data-radix-popper-content-wrapper]')) {\n scheduleCleanup(100);\n }\n };\n\n const onEscapeKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n scheduleCleanup(200);\n }\n };\n\n const onInteraction = () => {\n scheduleCleanup(50);\n };\n\n document.addEventListener('click', onDocumentClick, true);\n document.addEventListener('keydown', onEscapeKey, true);\n document.addEventListener('pointerup', onInteraction, true);\n document.addEventListener('transitionend', onInteraction, true);\n document.addEventListener('animationend', onInteraction, true);\n\n // Portals mount and unmount as direct children of body, and the stuck value lives in body's\n // style, so body's own children and style are all that need watching.\n const observer = new MutationObserver(() => {\n scheduleCleanup(0);\n });\n observer.observe(document.body, { childList: true, attributes: true, attributeFilter: ['style'] });\n\n // Fallback periodic cleanup\n const intervalId = setInterval(safeCleanup, 1000);\n\n // Initial cleanup\n scheduleCleanup(100);\n\n // Tear everything down together. The observer is the important one: it fires while React\n // unmounts the tree, so leaving it connected keeps queueing work against a document that is\n // about to go away.\n return () => {\n clearInterval(intervalId);\n\n pending.forEach(clearTimeout);\n pending.clear();\n\n observer.disconnect();\n\n document.removeEventListener('click', onDocumentClick, true);\n document.removeEventListener('keydown', onEscapeKey, true);\n document.removeEventListener('pointerup', onInteraction, true);\n document.removeEventListener('transitionend', onInteraction, true);\n document.removeEventListener('animationend', onInteraction, true);\n };\n}\n\n/**\n * Hook to cleanup stuck pointer-events: none on document.body\n *\n * This addresses an issue where react-remove-scroll (used by Radix UI Dialog)\n * sometimes fails to restore body pointer-events after dialog closes,\n * leaving the page unclickable. It never clears the value while a modal is open.\n */\nexport function useBodyPointerEventsCleanup() {\n React.useEffect(() => {\n if (typeof document === 'undefined') return;\n\n mountCount += 1;\n if (mountCount === 1) {\n teardown = install();\n }\n\n return () => {\n mountCount -= 1;\n if (mountCount === 0) {\n teardown?.();\n teardown = null;\n }\n };\n }, []);\n}\n"],
5
+ "mappings": ";mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,sBAAAE,GAAA,YAAAC,GAAA,sBAAAC,GAAA,mBAAAC,GAAA,iBAAAC,GAAA,iBAAAC,GAAA,sBAAAC,GAAA,iBAAAC,GAAA,gBAAAC,GAAA,gBAAAC,GAAA,mBAAAC,KAAA,eAAAC,GAAAb,IAkBA,IAAAc,EAAuB,oBACvBC,GAA6B,qBAC7BC,EAAuB,yBACvBC,EAA4C,gBAC5CC,EAA0C,oBCtB1C,IAAAC,EAAuB,oBCEvB,IAAAC,EAAuB,oBACvBC,GAAuB,yBACvBC,EAAgC,oBCAzB,SAASC,EAAqBC,EAA+B,CAClE,OAAQA,EAAa,CACnB,IAAK,SACL,IAAK,MACL,IAAK,OACL,IAAK,UACL,IAAK,OACL,IAAK,OACL,IAAK,SACL,IAAK,SACH,MAAO,QACT,IAAK,OACL,IAAK,SACL,IAAK,OACL,IAAK,MACL,IAAK,OACH,MAAO,QAC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EAAM,IAAM,CAChBR,IAAW,EACXjC,IAAQ,CACV,EAIM0C,EAAe,IAAM,CACzB,GAAIH,EAAQ,QAAS,CACnBA,EAAQ,QAAU,GAClBE,EAAI,EACJ,MACF,CAEA,IAAME,EAAOL,EAAQ,SAAW,SAAS,cAAc,2BAA2B,IAAI,OAAOD,CAAE,CAAC,IAAI,EACpG,GAAID,GAAWO,aAAgB,kBAAmB,CAChDA,EAAK,MAAM,EACX,MACF,CACAF,EAAI,CACN,EAEMG,EAAQR,GAAiB,iBAA+C9C,CAAQ,EAAIA,EAAW,KAC/FuD,EAASxC,GACb,gCACGiB,EACC,gBAAC,QAAK,UAAU,sBAAsB,YAAU,UAAU,cAAW,IAClEA,CACH,EACE,KACJ,gBAAC,QAAK,UAAU,wBAAwBjB,CAAM,EAC7C6B,EACC,gBAAC,QAAK,UAAU,sBAAsB,YAAU,YAC7CA,CACH,EACE,IACN,EAGF,OACE,gBAAC,EAAAd,QAAiB,KAAjB,CACE,GAAGjB,EACJ,IAAKmC,EACL,wBAAuBD,EACvB,MAAOG,EACP,QAAS,EAAQI,EACjB,SAAUF,EACV,eAAgB,IAAM,CACpBH,EAAQ,QAAU,EACpB,EACA,YAAWJ,EACX,aAAW,EAAAhB,SAAW,YAAa,mBAAoB,kBAAmBX,CAAS,GAElFoC,EAAc,eAAaA,EAAO,OAAWC,EAAMD,EAAM,MAAM,QAAQ,CAAC,EAAIC,EAAMvD,CAAQ,CAC7F,CAEJ,CAQA,SAASwD,GAAa,CAAE,SAAAxD,EAAU,UAAAkB,CAAU,EAAsB,CAChE,IAAMG,EAAa,aAAWzC,CAAkB,EAChD,OAAKyC,GAAM,QACJ,iBAAa,gBAAC,EAAAS,QAAiB,MAAjB,CAAuB,aAAW,EAAAD,SAAW,mBAAoBX,CAAS,GAAIlB,CAAS,EAA2BqB,EAAK,IAAI,EADxH,IAE1B",
6
+ "names": ["command_exports", "__export", "ROW_STEP", "Command", "CommandCollection", "CommandContent", "CommandEmpty", "CommandGroup", "CommandGroupLabel", "CommandInput", "CommandItem", "CommandList", "CommandTrigger", "__toCommonJS", "React", "import_react_dom", "import_classnames", "import_cmdk", "import_radix_ui", "React", "React", "import_classnames", "import_radix_ui", "getMatchingGrayColor", "accentColor", "React", "clampSize", "size", "values", "n", "nearest", "distance", "i", "d", "ThemeSizeContext", "useThemeSize", "explicit", "propDef", "themeSize", "clampSize", "React", "usePropSyncedState", "propValue", "value", "setValue", "previousPropValue", "setPreviousPropValue", "asChildPropDef", "accentColors", "grayColors", "radii", "appearances", "fontFamilies", "sizes", "themePropDefs", "asChildPropDef", "accentColors", "grayColors", "radii", "noop", "defaultThemeContext", "themePropDefs", "ThemeContext", "Theme", "props", "forwardedRef", "context", "ThemeContext", "dir", "ThemeRoot", "ThemeImpl", "appearanceProp", "themePropDefs", "accentColorProp", "grayColorProp", "radiusProp", "fontFamilyProp", "headingFontFamilyProp", "sizeProp", "hasBackground", "rootProps", "appearance", "setAppearance", "usePropSyncedState", "accentColor", "setAccentColor", "grayColor", "setGrayColor", "radius", "setRadius", "fontFamily", "setFontFamily", "headingFontFamily", "setHeadingFontFamily", "size", "setSize", "asChild", "isRoot", "hasBackgroundProp", "onAppearanceChange", "noop", "onAccentColorChange", "onGrayColorChange", "onRadiusChange", "onFontFamilyChange", "onHeadingFontFamilyChange", "onSizeChange", "themeProps", "Comp", "resolvedGrayColor", "getMatchingGrayColor", "isExplicitAppearance", "ThemeSizeContext", "classNames", "React", "PaneBandSizeContext", "React", "PageScopeContext", "NoPageScope", "children", "PageScopeContext", "PortalTheme", "props", "forwardedRef", "PaneBandSizeContext", "NoPageScope", "Theme", "React", "mountCount", "teardown", "devLog", "message", "install", "pending", "defer", "fn", "delay", "id", "isStuck", "hasOpenModal", "hasDialogs", "hasRadixOverlays", "safeCleanup", "scheduleCleanup", "onDocumentClick", "event", "target", "onEscapeKey", "onInteraction", "observer", "intervalId", "useBodyPointerEventsCleanup", "ROW_STEP", "SIZE_DEF", "CommandSizeContext", "CommandQueryContext", "CommandItemsContext", "CommandCloseContext", "CommandListContext", "CommandSeatContext", "defaultItemToString", "item", "record", "key", "defaultFilter", "query", "itemToString", "isGroup", "narrow", "items", "filter", "out", "kept", "member", "Command", "sizeProp", "open", "defaultOpen", "onOpenChange", "children", "size", "useThemeSize", "internalOpen", "setInternalOpen", "controlled", "isOpen", "change", "next", "reason", "close", "DialogPrimitive", "CommandTrigger", "props", "CommandContent", "label", "onQueryChange", "container", "className", "style", "setQuery", "seat", "setSeat", "report", "useBodyPointerEventsCleanup", "changeQuery", "listValue", "seatValue", "PortalTheme", "classNames", "CommandPrimitive", "CommandInput", "leading", "inputRef", "event", "CommandList", "shown", "CommandGroupItemsContext", "CommandGroup", "CommandGroupLabel", "CommandCollection", "CommandItem", "value", "onSelect", "trailing", "tone", "asChild", "id", "element", "clicked", "itemValue", "run", "handleSelect", "node", "child", "inner", "CommandEmpty"]
7
+ }
@@ -45,6 +45,7 @@ export { Theme, ThemeContext, type ThemeContextValue, type ThemeProps, useThemeC
45
45
  export { Toggle, type ToggleProps } from './toggle.js';
46
46
  export { Toolbar, ToolbarGroup, ToolbarButton, ToolbarSeparator, ToolbarTitle, ToolbarOverflow, ToolbarSlot, ToolbarFill, useToolbarOverflow, type ToolbarProps, type ToolbarGroupProps, type ToolbarButtonProps, type ToolbarSeparatorProps, type ToolbarTitleProps, type ToolbarOverflowProps, type ToolbarSlotProps, type ToolbarFillProps, } from './toolbar.js';
47
47
  export { Page, type PageProps } from './page.js';
48
+ export { Command, CommandTrigger, CommandContent, CommandInput, CommandList, CommandGroup, CommandGroupLabel, CommandCollection, CommandItem, CommandEmpty, type CommandProps, type CommandTriggerProps, type CommandContentProps, type CommandInputProps, type CommandListProps, type CommandGroupProps, type CommandGroupLabelProps, type CommandCollectionProps, type CommandItemProps, type CommandEmptyProps, type CommandOpenChangeDetails, type CommandOpenChangeReason, } from './command.js';
48
49
  export { Navigator, NavigatorOutlet, NavigatorBack, NavigatorTitle, NavigatorScreen, NavigatorLink, useNavigator, type NavigatorProps, type NavigatorBackProps, type NavigatorScreenProps, type NavigatorLinkProps, type NavigatorApi, } from './navigator.js';
49
50
  export { Tooltip, TooltipProvider, type TooltipProps, type TooltipProviderProps } from './tooltip.js';
50
51
  export { VirtualMenu, type VirtualMenuProps, type VirtualMenuItemProps, type VirtualMenuRenderItemProps } from './virtual-menu.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,GAAG,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC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