@ngrok/mantle 0.88.0 → 0.89.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 (234) hide show
  1. package/dist/accordion.d.ts +10 -9
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +2 -1
  4. package/dist/{alert-DCVfviBx.d.ts → alert-BzPDUaU7.d.ts} +16 -15
  5. package/dist/alert-CZYYlx9q.js +1 -0
  6. package/dist/alert-center.d.ts +7 -7
  7. package/dist/alert-center.js +1 -1
  8. package/dist/alert-dialog.d.ts +17 -16
  9. package/dist/alert-dialog.js +1 -1
  10. package/dist/alert-vfeV_hso.js +1 -0
  11. package/dist/alert.d.ts +1 -1
  12. package/dist/alert.js +1 -1
  13. package/dist/anchor-CgcbWEUs.js +1 -0
  14. package/dist/anchor.js +1 -1
  15. package/dist/app-layout.d.ts +1128 -45
  16. package/dist/app-layout.js +1 -1
  17. package/dist/area-chart.d.ts +41 -18
  18. package/dist/area-chart.js +1 -1
  19. package/dist/avatar.js +1 -1
  20. package/dist/badge.d.ts +3 -2
  21. package/dist/badge.js +1 -1
  22. package/dist/bar-chart.d.ts +37 -13
  23. package/dist/bar-chart.js +1 -1
  24. package/dist/breadcrumb.js +1 -1
  25. package/dist/browser-only.js +1 -1
  26. package/dist/button-69InNC_m.js +1 -0
  27. package/dist/button-BMfUxs_j.js +1 -0
  28. package/dist/{button-DO53OA70.d.ts → button-CHoYpOzx.d.ts} +5 -4
  29. package/dist/{button-B52_vczK.js → button-D8rr-1AB.js} +1 -1
  30. package/dist/{button-crUf0hbR.d.ts → button-DL7V4bzW.d.ts} +5 -4
  31. package/dist/button-b2HKEIE2.js +1 -0
  32. package/dist/{button-B5i9n7Qp.d.ts → button-mzUR1U0Y.d.ts} +5 -4
  33. package/dist/button.d.ts +3 -3
  34. package/dist/button.js +1 -1
  35. package/dist/calendar.d.ts +3 -2
  36. package/dist/calendar.js +1 -1
  37. package/dist/card.d.ts +8 -7
  38. package/dist/card.js +1 -1
  39. package/dist/centered-layout.js +1 -1
  40. package/dist/{chart-DgaWVBqi.d.ts → chart-23KQ1ZNO.d.ts} +128 -62
  41. package/dist/chart-BRkJfptA.js +2 -0
  42. package/dist/checkbox-C3N2afhB.js +1 -0
  43. package/dist/checkbox.d.ts +3 -2
  44. package/dist/checkbox.js +1 -1
  45. package/dist/{choice-PESu-9s8.d.ts → choice-BCiyqLgO.d.ts} +12 -11
  46. package/dist/choice-DQmecLfy.js +1 -0
  47. package/dist/choice.d.ts +1 -1
  48. package/dist/choice.js +1 -1
  49. package/dist/code-block-4Esx_gV-.js +12 -0
  50. package/dist/code-block.d.ts +17 -16
  51. package/dist/code-block.js +6 -6
  52. package/dist/code-block_highlight-utils.js +1 -1
  53. package/dist/code.d.ts +2 -1
  54. package/dist/code.js +1 -1
  55. package/dist/combobox.d.ts +15 -14
  56. package/dist/combobox.js +1 -1
  57. package/dist/command.d.ts +13 -13
  58. package/dist/command.js +1 -1
  59. package/dist/cx-CK7o_rVv.js +1 -0
  60. package/dist/cx.js +1 -1
  61. package/dist/data-table.d.ts +32 -31
  62. package/dist/data-table.js +1 -1
  63. package/dist/description-list.d.ts +6 -6
  64. package/dist/description-list.js +1 -1
  65. package/dist/dialog-BDzapPLR.js +1 -0
  66. package/dist/{dialog-DXpqpdJj.d.ts → dialog-DQdeqvq-.d.ts} +28 -15
  67. package/dist/dialog.d.ts +1 -1
  68. package/dist/dialog.js +1 -1
  69. package/dist/dropdown-menu-CWUzGFgf.d.ts +1 -0
  70. package/dist/{dropdown-menu-BloQKE_y.d.ts → dropdown-menu-CpRsyt_F.d.ts} +17 -17
  71. package/dist/dropdown-menu-CutWQ0bl.js +1 -0
  72. package/dist/dropdown-menu.d.ts +2 -2
  73. package/dist/dropdown-menu.js +1 -1
  74. package/dist/empty.d.ts +7 -6
  75. package/dist/empty.js +1 -1
  76. package/dist/field.d.ts +16 -15
  77. package/dist/field.js +1 -1
  78. package/dist/flag.d.ts +3 -2
  79. package/dist/flag.js +1 -1
  80. package/dist/hooks.js +1 -1
  81. package/dist/hover-card.d.ts +5 -4
  82. package/dist/hover-card.js +1 -1
  83. package/dist/icon-BudQMD2S.js +1 -0
  84. package/dist/icon-kK0c-POG.js +1 -0
  85. package/dist/{icon-w0HUe7tr.d.ts → icon-r2NvfTWW.d.ts} +3 -2
  86. package/dist/{icon-BmJ57Tgh.d.ts → icon-ucVgZeXn.d.ts} +3 -2
  87. package/dist/icon.d.ts +2 -2
  88. package/dist/icon.js +1 -1
  89. package/dist/icons-BMZnm4hM.js +1 -0
  90. package/dist/{icons-Bu-2boul.js → icons-CH3tD_wq.js} +1 -1
  91. package/dist/icons-CSwTVV2m.js +1 -0
  92. package/dist/icons.js +1 -1
  93. package/dist/in-view-Dxv_GrUU.js +1 -0
  94. package/dist/input-D_DjD9lT.js +1 -0
  95. package/dist/{input-DpnC3Xgj.d.ts → input-bbB1tC0h.d.ts} +3 -2
  96. package/dist/input.d.ts +5 -4
  97. package/dist/input.js +1 -1
  98. package/dist/kbd-CLHsJ99p.js +1 -0
  99. package/dist/kbd.d.ts +2 -1
  100. package/dist/kbd.js +1 -1
  101. package/dist/label-5T8i7I4X.js +1 -0
  102. package/dist/{label-Bnfe9YJ6.d.ts → label-C-KbNls8.d.ts} +3 -2
  103. package/dist/label.d.ts +1 -1
  104. package/dist/label.js +1 -1
  105. package/dist/{layer-container-R7aux3n8.js → layer-container-DLf-6eBz.js} +1 -1
  106. package/dist/layer-container.js +1 -1
  107. package/dist/line-chart.d.ts +40 -15
  108. package/dist/line-chart.js +1 -1
  109. package/dist/list-DOVZoz9t.js +1 -0
  110. package/dist/list.d.ts +3 -2
  111. package/dist/list.js +1 -1
  112. package/dist/live-region-DQ1QLv3L.js +1 -0
  113. package/dist/live-region.d.ts +3 -2
  114. package/dist/live-region.js +1 -1
  115. package/dist/llms.txt +2 -1
  116. package/dist/{main-Dv2zuT_b.js → main-CC1L9IsH.js} +1 -1
  117. package/dist/main.js +1 -1
  118. package/dist/mantle.css +3 -0
  119. package/dist/media-object.js +1 -1
  120. package/dist/multi-select.d.ts +23 -22
  121. package/dist/multi-select.js +1 -1
  122. package/dist/otp-input.d.ts +9 -8
  123. package/dist/otp-input.js +1 -1
  124. package/dist/pagination.d.ts +9 -8
  125. package/dist/pagination.js +1 -1
  126. package/dist/{popover-Cco1nw8I.d.ts → popover-Dvls7-j4.d.ts} +5 -4
  127. package/dist/popover-oQDUvcZ2.js +1 -0
  128. package/dist/popover.d.ts +1 -1
  129. package/dist/popover.js +1 -1
  130. package/dist/primitive-B-6XILB2.js +1 -0
  131. package/dist/progress.d.ts +9 -8
  132. package/dist/progress.js +1 -1
  133. package/dist/qr-code.d.ts +9 -8
  134. package/dist/qr-code.js +1 -1
  135. package/dist/radio-group.d.ts +19 -18
  136. package/dist/radio-group.js +1 -1
  137. package/dist/sandbar.d.ts +7 -7
  138. package/dist/sandbar.js +1 -1
  139. package/dist/{sandboxed-on-click-BLvvSqOP.js → sandboxed-on-click-C7pPu-2M.js} +1 -1
  140. package/dist/sandboxed-on-click.js +1 -1
  141. package/dist/scatter-plot.d.ts +39 -14
  142. package/dist/scatter-plot.js +1 -1
  143. package/dist/{select-BITJP7I5.d.ts → select-CxXb3aiC.d.ts} +3 -3
  144. package/dist/select-DcL0-duV.js +1 -0
  145. package/dist/select.d.ts +1 -1
  146. package/dist/select.js +1 -1
  147. package/dist/selectable-list.d.ts +16 -15
  148. package/dist/selectable-list.js +1 -1
  149. package/dist/separator-DvPe27fH.js +1 -0
  150. package/dist/{separator-Bo4nY_3M.d.ts → separator-HzGvuD0B.d.ts} +4 -3
  151. package/dist/separator.d.ts +1 -1
  152. package/dist/separator.js +1 -1
  153. package/dist/sheet-DND_KjmS.js +1 -0
  154. package/dist/sheet.d.ts +13 -12
  155. package/dist/sheet.js +1 -1
  156. package/dist/sidebar.d.ts +147 -93
  157. package/dist/sidebar.js +1 -1
  158. package/dist/skeleton-zfqoDAxT.js +1 -0
  159. package/dist/skeleton.d.ts +3 -2
  160. package/dist/skeleton.js +1 -1
  161. package/dist/skip-to-main-link.js +1 -1
  162. package/dist/slider.d.ts +3 -2
  163. package/dist/slider.js +1 -1
  164. package/dist/{slot-BsvE2ntj.js → slot-DdYN1L1C.js} +1 -1
  165. package/dist/{slot-DdgxmuI5.d.ts → slot-Q996Hqk9.d.ts} +1 -1
  166. package/dist/slot.d.ts +1 -1
  167. package/dist/slot.js +1 -1
  168. package/dist/split-button.d.ts +6 -5
  169. package/dist/split-button.js +1 -1
  170. package/dist/switch.d.ts +3 -2
  171. package/dist/switch.js +1 -1
  172. package/dist/{table-DEI-qvSC.d.ts → table-BhzITa19.d.ts} +10 -9
  173. package/dist/table-DBbKqOVq.js +1 -0
  174. package/dist/table.d.ts +1 -1
  175. package/dist/table.js +1 -1
  176. package/dist/tabs.d.ts +2 -2
  177. package/dist/tabs.js +1 -1
  178. package/dist/text-area.d.ts +3 -2
  179. package/dist/text-area.js +1 -1
  180. package/dist/theme-BlCZHClJ.js +1 -0
  181. package/dist/theme-switcher.d.ts +3 -3
  182. package/dist/theme-switcher.js +1 -1
  183. package/dist/theme.js +1 -1
  184. package/dist/toast.d.ts +10 -9
  185. package/dist/toast.js +1 -1
  186. package/dist/{tooltip-nuUCoqq8.d.ts → tooltip-CngH7Kl6.d.ts} +7 -6
  187. package/dist/tooltip-NhYXqStK.js +1 -0
  188. package/dist/tooltip.d.ts +1 -1
  189. package/dist/tooltip.js +1 -1
  190. package/dist/truncated-text.d.ts +138 -0
  191. package/dist/truncated-text.js +1 -0
  192. package/dist/types.js +1 -1
  193. package/dist/use-breakpoint--mo7kr9d.js +1 -0
  194. package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +1 -0
  195. package/dist/utils.js +1 -1
  196. package/dist/visually-hidden.d.ts +2 -1
  197. package/dist/visually-hidden.js +1 -1
  198. package/dist/well.d.ts +3 -2
  199. package/dist/well.js +1 -1
  200. package/package.json +16 -15
  201. package/dist/alert-OP_-aGJD.js +0 -1
  202. package/dist/anchor-BnMhJYS4.js +0 -1
  203. package/dist/button-BFpCB99R.js +0 -1
  204. package/dist/button-Dij5vCQG.js +0 -1
  205. package/dist/button-pwkdtR3U.js +0 -1
  206. package/dist/chart-aZLMj4xx.js +0 -2
  207. package/dist/checkbox-DbJSqSNN.js +0 -1
  208. package/dist/choice-SRyLguqU.js +0 -1
  209. package/dist/code-block-BE3Q0iAo.js +0 -12
  210. package/dist/cx-0HCjnNv1.js +0 -1
  211. package/dist/dialog-HIdb5d3I.js +0 -1
  212. package/dist/dropdown-menu-BR_AQNMj.js +0 -1
  213. package/dist/dropdown-menu-Dlpb7600.d.ts +0 -1
  214. package/dist/icon-BT8FnkkJ.js +0 -1
  215. package/dist/icon-U24NfYv7.js +0 -1
  216. package/dist/icons-BQRcOU6J.js +0 -1
  217. package/dist/icons-C3rVfpx9.js +0 -1
  218. package/dist/in-view-T_AAYaaF.js +0 -1
  219. package/dist/input-yq0jLE4e.js +0 -1
  220. package/dist/kbd-CJ8hNZfS.js +0 -1
  221. package/dist/label-BAy0Mg59.js +0 -1
  222. package/dist/list-BleZ-43e.js +0 -1
  223. package/dist/live-region-B2vJRvPH.js +0 -1
  224. package/dist/popover-BJ5XNwzD.js +0 -1
  225. package/dist/primitive-w3wFk2La.js +0 -1
  226. package/dist/select-CUWLEeuf.js +0 -1
  227. package/dist/separator-D98be0gY.js +0 -1
  228. package/dist/sheet-B5x8EO9Y.js +0 -1
  229. package/dist/skeleton-bVDP8BzY.js +0 -1
  230. package/dist/table-D2jh52KA.js +0 -1
  231. package/dist/theme-C1kFFdIk.js +0 -1
  232. package/dist/tooltip-H03l7E4Y.js +0 -1
  233. package/dist/use-is-hydrated-after-paint-Drj0lNi4.js +0 -1
  234. /package/dist/{types-D85fCNV3.js → css-properties-D85fCNV3.js} +0 -0
@@ -1,6 +1,7 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
2
  import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
3
- import { ComponentProps } from "react";
3
+ import { n as IconButtonProps } from "./button-DL7V4bzW.js";
4
+ import { ComponentProps, ReactNode } from "react";
4
5
  //#region src/components/app-layout/app-layout.d.ts
5
6
  /**
6
7
  * The outer frame of an application shell. Renders a `<div>` with
@@ -108,14 +109,31 @@ declare const Notice: ({ asChild, children, className, "data-slot": dataSlot, ..
108
109
  /**
109
110
  * The region where the user actually works: everything below
110
111
  * `AppLayout.Notice`, laid out as a row of columns. Place a `Sidebar.Nav` (or
111
- * any other rail, on either side) beside an `AppLayout.Content` card. A flex row
112
- * (`flex min-h-0 flex-1`) whose `min-h-0` is what lets `AppLayout.Body` scroll
113
- * instead of the page.
112
+ * any other rail, on either side) beside an `AppLayout.Content` card, and an
113
+ * `AppLayout.SidePanel` after the card. A flex row
114
+ * (`relative mx-auto flex min-h-0 w-full min-w-0 flex-1`) whose `min-h-0` is
115
+ * what lets `AppLayout.Body` scroll instead of the page.
114
116
  *
115
117
  * It owns no gutter, deliberately: the card insets itself with its own margin,
116
118
  * so a rail stays flush against the window edge and a collapsed icon rail keeps
117
119
  * its flush geometry.
118
120
  *
121
+ * On a wide screen the row caps at `--app-layout-max-width` and centers in the
122
+ * frame, so the rail, the card, and the side panel stay one group instead of a
123
+ * card that stretches across an ultrawide monitor. `AppLayout.Root` still paints
124
+ * `bg-base` edge to edge, and `AppLayout.Notice` still spans the full window.
125
+ * Merge `className="ml-0"` to pin the group to the start edge instead, and set
126
+ * the variable to `none` to let the row fill any width.
127
+ *
128
+ * It is `relative`, so a floating `AppLayout.SidePanel` resolves against the row
129
+ * and covers the card, never the notice above it.
130
+ *
131
+ * **CSS variables (public API):**
132
+ *
133
+ * | CSS Variable | Default | Description |
134
+ * | --- | --- | --- |
135
+ * | `--app-layout-max-width` | `128rem` | The widest the row gets (2048px): a 13rem rail, a `max-w-7xl` page with its padding, and an open side panel at its 27rem cap, each at full size with nothing stretched. Set it on `AppLayout.Root` or on this part. `none` removes the cap. |
136
+ *
119
137
  * @see https://mantle.ngrok.com/layouts/app-layout#applayoutworkspace
120
138
  *
121
139
  * @example
@@ -172,7 +190,7 @@ declare const Workspace: ({ asChild, children, className, "data-slot": dataSlot,
172
190
  *
173
191
  * | CSS Variable | Default | Description |
174
192
  * | --- | --- | --- |
175
- * | `--app-layout-card-gutter` | `0.5rem` | The gap between the card and the window edge, the notice above it, and the rail beside it (8px). `AppLayout.Header` subtracts twice this value when deriving its height, so overriding it keeps the toolbar aligned with the sidebar header's band. |
193
+ * | `--app-layout-card-gutter` | `0.5rem` | The gap between the card and the window edge, the notice above it, and the rail beside it (8px). `AppLayout.Header` subtracts twice this value when deriving its height, so overriding it keeps the toolbar aligned with the sidebar header's band. Set it on `AppLayout.Root` or another common ancestor, not on this part: `AppLayout.SidePanel` and `AppLayout.SidePanelHeader` read it too, and custom properties inherit downward only. |
176
194
  *
177
195
  * @see https://mantle.ngrok.com/layouts/app-layout#applayoutcontent
178
196
  *
@@ -218,19 +236,19 @@ declare const Content: ({ asChild, children, className, "data-slot": dataSlot, .
218
236
  * It is pinned by construction, not by `sticky`: as a `shrink-0` flex sibling
219
237
  * *outside* the scrolling `AppLayout.Body`, it cannot scroll away, cannot be
220
238
  * overlapped by a page's own `sticky top-0`, and does not translate sideways
221
- * when the page scrolls horizontally. It also no longer steals height from a
222
- * page that asks for `h-full`.
239
+ * when the page scrolls horizontally. It takes no height from a page that asks
240
+ * for `h-full`.
223
241
  *
224
242
  * Renders a `<div>`, not a `<header>`: `AppLayout.Body` is the `main` landmark
225
243
  * and this row is its sibling, so a `<header>` here would have no sectioning
226
244
  * ancestor and would become the ARIA `banner` landmark, which a card toolbar is
227
- * not. Compose your own element with `asChild` if you need one.
245
+ * not. If you need one, compose your own element with `asChild`.
228
246
  *
229
247
  * **Sidebar alignment is an invariant, not a coincidence:** standalone, the
230
248
  * toolbar is `h-14`. When the shell contains a `Sidebar.Header` (detected via
231
249
  * `:has()` from `AppLayout.Root`), the toolbar instead derives its height from
232
250
  * the sidebar's public `--sidebar-header-height` token, subtracting twice the
233
- * card gutter and twice the card's hairline border — which keeps this toolbar's
251
+ * card gutter and twice the card's hairline border. That keeps this toolbar's
234
252
  * vertical center on the band that token names, by construction, for any band
235
253
  * height. The band belongs to the sidebar header's first row, so a header that
236
254
  * stacks a second row grows downward and this toolbar keeps matching the
@@ -241,7 +259,7 @@ declare const Content: ({ asChild, children, className, "data-slot": dataSlot, .
241
259
  *
242
260
  * | CSS Variable | Default | Description |
243
261
  * | --- | --- | --- |
244
- * | `--sidebar-header-height` | `4.5rem` | Read, not owned: `Sidebar.Header` owns this token — the band its first row sits on — and `AppLayout.Header` derives its own height from it whenever a sidebar header is present in the shell. Set it on a common ancestor of both rows (e.g. `AppLayout.Root`), never on one of them, since custom properties only inherit downward. |
262
+ * | `--sidebar-header-height` | `4.5rem` | Read, not owned: `Sidebar.Header` owns this token (the band its first row sits on), and `AppLayout.Header` derives its own height from it whenever a sidebar header is present in the shell. Set it on a common ancestor of both rows (e.g. `AppLayout.Root`), never on one of them, since custom properties only inherit downward. |
245
263
  * | `--app-layout-card-gutter` | `0.5rem` | Read, not owned: `AppLayout.Content` owns this token. The derived height subtracts twice its value, so changing the card gutter keeps the two rows aligned instead of drifting. |
246
264
  *
247
265
  * @see https://mantle.ngrok.com/layouts/app-layout#applayoutheader
@@ -474,27 +492,646 @@ declare const HeaderActions: ({ asChild, children, className, "data-slot": dataS
474
492
  * ```
475
493
  */
476
494
  declare const Body: ({ asChild, children, className, "data-slot": dataSlot, ...props }: Omit<ComponentProps<"main">, "id" | "tabIndex"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
495
+ /**
496
+ * The viewport width below which `AppLayout.SidePanel` floats over the card
497
+ * instead of taking width beside it. Tailwind's `sm` (40rem), `md` (48rem), and
498
+ * `lg` (64rem) breakpoints, the same set `Sidebar.Root` accepts.
499
+ *
500
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepanel
501
+ *
502
+ * @example
503
+ * ```tsx
504
+ * <AppLayout.SidePanel aria-label="Assistant" mobileBreakpoint="md">…</AppLayout.SidePanel>
505
+ * ```
506
+ */
507
+ type AppLayoutSidePanelMobileBreakpoint = "sm" | "md" | "lg";
508
+ /**
509
+ * The state and actions shared by every part under an
510
+ * `AppLayout.SidePanelRoot`, returned by {@link useSidePanel}. Use it to build
511
+ * a custom trigger, a close control, or close-on-navigate behavior.
512
+ *
513
+ * @see https://mantle.ngrok.com/layouts/app-layout#usesidepanel
514
+ *
515
+ * @example
516
+ * ```tsx
517
+ * function CloseAssistantOnNavigate() {
518
+ * const { setOpen } = useSidePanel();
519
+ * const location = useLocation();
520
+ * useEffect(() => {
521
+ * setOpen(false);
522
+ * }, [location.pathname, setOpen]);
523
+ * return null;
524
+ * }
525
+ * ```
526
+ */
527
+ type AppLayoutSidePanelState = {
528
+ /**
529
+ * Whether the panel is on screen. Mirrored as `data-state="open" | "closed"`
530
+ * on `AppLayout.SidePanel` and `AppLayout.SidePanelTrigger`.
531
+ */
532
+ open: boolean;
533
+ /**
534
+ * Set the open state. Calls `onOpenChange` and, when uncontrolled, updates
535
+ * the internal state. Keeps one identity across renders, so it is safe in an
536
+ * effect dependency list.
537
+ */
538
+ setOpen: (open: boolean) => void;
539
+ /**
540
+ * Flip the open state. This is what `AppLayout.SidePanelTrigger` calls.
541
+ */
542
+ toggle: () => void;
543
+ /**
544
+ * The generated id of the panel's `<aside>`. `AppLayout.SidePanelTrigger`
545
+ * references it with `aria-controls`; reuse it in a custom trigger.
546
+ */
547
+ panelId: string;
548
+ };
549
+ /**
550
+ * Read the nearest `AppLayout.SidePanelRoot` state. Throws when called
551
+ * outside one, so misuse fails loudly. Use it to build a custom trigger, a
552
+ * close control, or close-on-navigate behavior.
553
+ *
554
+ * @see https://mantle.ngrok.com/layouts/app-layout#usesidepanel
555
+ *
556
+ * @example
557
+ * ```tsx
558
+ * function CloseAssistantOnNavigate() {
559
+ * const { setOpen } = useSidePanel();
560
+ * const location = useLocation();
561
+ * useEffect(() => {
562
+ * setOpen(false);
563
+ * }, [location.pathname, setOpen]);
564
+ * return null;
565
+ * }
566
+ * ```
567
+ */
568
+ declare function useSidePanel(): AppLayoutSidePanelState;
569
+ /**
570
+ * The props for `AppLayout.SidePanelRoot`: the open state, controlled or
571
+ * uncontrolled, the same shape as `Sidebar.Root`.
572
+ *
573
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepanelroot
574
+ *
575
+ * @example
576
+ * ```tsx
577
+ * <AppLayout.SidePanelRoot
578
+ * defaultOpen={sidePanelOpen}
579
+ * onOpenChange={(open) => {
580
+ * document.cookie = serializeSidePanelStateCookie(open);
581
+ * }}
582
+ * >
583
+ * <AppLayout.Workspace>…</AppLayout.Workspace>
584
+ * </AppLayout.SidePanelRoot>
585
+ * ```
586
+ */
587
+ type AppLayoutSidePanelRootProps = {
588
+ /**
589
+ * The shell below it: `AppLayout.Workspace` with the trigger and the panel
590
+ * inside. The root renders no element of its own.
591
+ */
592
+ children?: ReactNode;
593
+ /**
594
+ * Whether the panel starts open, when uncontrolled. Read once at mount, so
595
+ * pass the value the server read from a cookie here and the first paint
596
+ * carries the right state.
597
+ *
598
+ * @default false
599
+ */
600
+ defaultOpen?: boolean;
601
+ /**
602
+ * Controlled open state. Pair with `onOpenChange`.
603
+ */
604
+ open?: boolean;
605
+ /**
606
+ * Called with the next open state whenever it changes. Write the cookie
607
+ * here with `serializeSidePanelStateCookie`.
608
+ */
609
+ onOpenChange?: (open: boolean) => void;
610
+ };
611
+ /**
612
+ * The state owner for `AppLayout.SidePanel` and `AppLayout.SidePanelTrigger`.
613
+ * Renderless: it only holds whether the panel is open, controlled (`open` +
614
+ * `onOpenChange`) or uncontrolled (`defaultOpen`), and hands it to the parts
615
+ * below through {@link useSidePanel}. Wrap `AppLayout.Workspace` with it, or
616
+ * anything above both the trigger and the panel. Closed by default: a side
617
+ * panel is a surface the user opens.
618
+ *
619
+ * To persist the state across visits with no first-frame correction, read
620
+ * `extractSidePanelStateCookie` in the server loader, pass the result to
621
+ * `defaultOpen`, and write `serializeSidePanelStateCookie` from
622
+ * `onOpenChange`. The server HTML then carries the right `data-state`, the
623
+ * same way `Sidebar.Root` persists the rail.
624
+ *
625
+ * When the panel closes while focus is inside it, the root moves focus to the
626
+ * first `AppLayout.SidePanelTrigger` outside the panel that can take focus. A
627
+ * closed panel is `inert` and cannot hold focus, so without this the browser
628
+ * drops focus to the document. The return runs on every close, whether a
629
+ * trigger, `setOpen`, or a controlled parent closed the panel. A trigger that
630
+ * CSS hides at the current breakpoint, or a disabled one, cannot take focus
631
+ * either, so a responsive header with one trigger per breakpoint lands on the
632
+ * visible one.
633
+ *
634
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepanelroot
635
+ *
636
+ * @example
637
+ * ```tsx
638
+ * <Sidebar.Root>
639
+ * <AppLayout.Root className="fixed inset-0">
640
+ * <SkipToMainLink />
641
+ * <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>
642
+ * <AppLayout.SidePanelRoot>
643
+ * <AppLayout.Workspace>
644
+ * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
645
+ * <AppLayout.Content>
646
+ * <AppLayout.Header>
647
+ * <AppLayout.HeaderStart>
648
+ * <Sidebar.Trigger />
649
+ * </AppLayout.HeaderStart>
650
+ * <AppLayout.HeaderContent>
651
+ * <Breadcrumbs />
652
+ * </AppLayout.HeaderContent>
653
+ * <AppLayout.HeaderActions>
654
+ * <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label="Toggle the assistant" />
655
+ * </AppLayout.HeaderActions>
656
+ * </AppLayout.Header>
657
+ * <AppLayout.Body>
658
+ * <Outlet />
659
+ * </AppLayout.Body>
660
+ * </AppLayout.Content>
661
+ * <AppLayout.SidePanel aria-label="Assistant">
662
+ * <AppLayout.SidePanelHeader>
663
+ * <p className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Assistant</p>
664
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
665
+ * </AppLayout.SidePanelHeader>
666
+ * <AppLayout.SidePanelBody>
667
+ * <AssistantConversation />
668
+ * </AppLayout.SidePanelBody>
669
+ * <AppLayout.SidePanelFooter>
670
+ * <AssistantComposer />
671
+ * </AppLayout.SidePanelFooter>
672
+ * </AppLayout.SidePanel>
673
+ * </AppLayout.Workspace>
674
+ * </AppLayout.SidePanelRoot>
675
+ * </AppLayout.Root>
676
+ * </Sidebar.Root>
677
+ * ```
678
+ */
679
+ declare const SidePanelRoot: ({ children, defaultOpen, onOpenChange, open: openProp }: AppLayoutSidePanelRootProps) => import("react").JSX.Element;
680
+ /**
681
+ * The props for `AppLayout.SidePanel`: an `<aside>`'s props except `id`, and
682
+ * the breakpoint the panel owns.
683
+ *
684
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepanel
685
+ */
686
+ type AppLayoutSidePanelProps = Omit<ComponentProps<"aside">, "id"> & WithDataSlot & {
687
+ /**
688
+ * The viewport width below which the panel floats over the card instead
689
+ * of taking width beside it. One breakpoint lower it covers the card from
690
+ * gutter to gutter; with `"sm"` there is no lower breakpoint, so it covers
691
+ * the card as soon as it floats. Match it to `Sidebar.Root`'s
692
+ * `mobileBreakpoint`, so the rail and the panel change presentation at
693
+ * one width.
694
+ *
695
+ * @default "lg"
696
+ */
697
+ mobileBreakpoint?: AppLayoutSidePanelMobileBreakpoint;
698
+ };
699
+ /**
700
+ * A second card beside `AppLayout.Content`, for an assistant, a details pane, or
701
+ * any surface that opens next to the page and closes again. Render it as the
702
+ * **last child of `AppLayout.Workspace`**, after the card, inside an
703
+ * `AppLayout.SidePanelRoot` that owns whether it is open. Renders an
704
+ * `<aside>`, so it is the `complementary` landmark; name it with `aria-label`.
705
+ * `id` is not a prop: the root generates it, and `AppLayout.SidePanelTrigger`
706
+ * points `aria-controls` at it.
707
+ *
708
+ * It takes the same card treatment as `AppLayout.Content` (`bg-card
709
+ * border-card-muted rounded-xl border shadow-sm overflow-clip`) and reads like
710
+ * a `Sheet` with no focus trap and no backdrop, because the page beside it
711
+ * stays usable. Three parts fill it:
712
+ *
713
+ * - `AppLayout.SidePanelHeader` for the title and the close control. It sits
714
+ * on the same band as `AppLayout.Header`, so the two rows center on one line.
715
+ * - `AppLayout.SidePanelBody` for the scroll region.
716
+ * - `AppLayout.SidePanelFooter`, optional, for a composer or an action row.
717
+ *
718
+ * It keeps the card gutter on its top, end, and bottom edges and none on its
719
+ * start edge, so the card's own end margin is the gap between the two, one
720
+ * gutter wide.
721
+ *
722
+ * It opens and closes the way `Sidebar.Nav` collapses, and nothing else moves:
723
+ *
724
+ * - The `<aside>` is a clip box whose `flex-basis` animates between the open
725
+ * width plus the end inset and zero over 200ms (`ease-out-strong`).
726
+ * - The card is an inner column pinned to the box's end inset at the open
727
+ * width, so the content never reflows or shifts.
728
+ * - The box's start edge sweeps across the card.
729
+ *
730
+ * A CSS transition reverses from wherever it is, so a second click mid-flight
731
+ * turns the panel around. `motion-reduce:transition-none` turns the slide into
732
+ * a cut. `not-data-hydrated:transition-none` holds the transition until one
733
+ * frame after hydration, so a state the client corrects after the server
734
+ * render snaps instead of sliding on page load. The `transition-*` and
735
+ * `duration-*` utilities are bare, so a merged `transition-none` or
736
+ * `duration-*` replaces them through tailwind-merge.
737
+ *
738
+ * Closed, the box is `basis-0 pointer-events-none` and `inert`,
739
+ * so nothing inside it is focusable, clickable, or read by assistive
740
+ * technology, and its children stay mounted: a conversation keeps its scroll
741
+ * position, its focus target, and its in-flight reply across a close and a
742
+ * reopen.
743
+ *
744
+ * Below `mobileBreakpoint` the panel floats over the card instead of taking
745
+ * width from it: `absolute`, pinned to the row's end edge inside the card
746
+ * gutter, `min(24rem, 100vw - 5rem)` wide, with a larger shadow and `z-20` so
747
+ * it paints above a page's own sticky rows. Closed, it slides off the end edge
748
+ * instead of collapsing and goes `invisible` the instant the slide ends, so a
749
+ * row that `--app-layout-max-width` caps inside the frame has no panel strip
750
+ * beside it. One breakpoint lower it covers the card from gutter to gutter,
751
+ * because a strip of page beside a 24rem panel is no page at all on a phone.
752
+ * With `"sm"` there is no lower breakpoint, so the panel covers the card as
753
+ * soon as it floats. Two cards side by side in 900px are two unusable cards.
754
+ *
755
+ * **CSS variables (public API):**
756
+ *
757
+ * | CSS Variable | Default | Description |
758
+ * | --- | --- | --- |
759
+ * | `--app-layout-side-panel-width` | `clamp(21rem, 24vw, 27rem)` | The panel's width beside the card: a quarter of the viewport, never narrower than 336px and never wider than 432px. Set it on `AppLayout.Root` or on this part. |
760
+ * | `--app-layout-card-gutter` | `0.5rem` | Read, not owned: `AppLayout.Content` owns this token. The panel keeps it on its top, end, and bottom edges, and the floating panel insets itself by it. Set it on `AppLayout.Root` or another common ancestor of the card and the panel, not on `AppLayout.Content`: custom properties inherit downward only, so a value on the card never reaches the panel. |
761
+ *
762
+ * **Data attributes (public API):**
763
+ *
764
+ * | Data Attribute | Value | Description |
765
+ * | --- | --- | --- |
766
+ * | `data-state` | `"open"` \| `"closed"` | Mirrors the root's open state. The collapse and the transition key off it in CSS, and consumers style against it. |
767
+ * | `data-hydrated` | present one frame after hydration | Presence-only. The transition keys off its absence in CSS (`not-data-hydrated:transition-none`), so a state correction after the server render snaps instead of animating. |
768
+ *
769
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepanel
770
+ *
771
+ * @example
772
+ * ```tsx
773
+ * <Sidebar.Root>
774
+ * <AppLayout.Root className="fixed inset-0">
775
+ * <SkipToMainLink />
776
+ * <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>
777
+ * <AppLayout.SidePanelRoot>
778
+ * <AppLayout.Workspace>
779
+ * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
780
+ * <AppLayout.Content>
781
+ * <AppLayout.Header>
782
+ * <AppLayout.HeaderStart>
783
+ * <Sidebar.Trigger />
784
+ * </AppLayout.HeaderStart>
785
+ * <AppLayout.HeaderContent>
786
+ * <Breadcrumbs />
787
+ * </AppLayout.HeaderContent>
788
+ * <AppLayout.HeaderActions>
789
+ * <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label="Toggle the assistant" />
790
+ * </AppLayout.HeaderActions>
791
+ * </AppLayout.Header>
792
+ * <AppLayout.Body>
793
+ * <Outlet />
794
+ * </AppLayout.Body>
795
+ * </AppLayout.Content>
796
+ * <AppLayout.SidePanel aria-label="Assistant">
797
+ * <AppLayout.SidePanelHeader>
798
+ * <p className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Assistant</p>
799
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
800
+ * </AppLayout.SidePanelHeader>
801
+ * <AppLayout.SidePanelBody>
802
+ * <AssistantConversation />
803
+ * </AppLayout.SidePanelBody>
804
+ * <AppLayout.SidePanelFooter>
805
+ * <AssistantComposer />
806
+ * </AppLayout.SidePanelFooter>
807
+ * </AppLayout.SidePanel>
808
+ * </AppLayout.Workspace>
809
+ * </AppLayout.SidePanelRoot>
810
+ * </AppLayout.Root>
811
+ * </Sidebar.Root>
812
+ * ```
813
+ */
814
+ declare const SidePanel: ({ children, className, "data-slot": dataSlot, mobileBreakpoint, onBlur, onFocus, ...props }: AppLayoutSidePanelProps) => import("react").JSX.Element;
815
+ /**
816
+ * The props for `AppLayout.SidePanelTrigger`: `IconButton`'s props, except the
817
+ * parts the trigger owns. The type omits `asChild` and `children` (the trigger
818
+ * renders only its icon and `aria-label`; build a custom trigger with
819
+ * `useSidePanel` instead). `appearance`, `icon`, `intent`, and `label` become
820
+ * optional with side panel defaults. `onClick` runs before the toggle; call
821
+ * `event.preventDefault()` in it to keep the panel where it is.
822
+ *
823
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepaneltrigger
824
+ *
825
+ * @example
826
+ * ```tsx
827
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
828
+ * ```
829
+ */
830
+ type AppLayoutSidePanelTriggerProps = Omit<IconButtonProps, "appearance" | "asChild" | "children" | "icon" | "intent" | "label"> & WithDataSlot & {
831
+ /**
832
+ * The visual style of the trigger `IconButton`.
833
+ *
834
+ * @default "ghost"
835
+ */
836
+ appearance?: IconButtonProps["appearance"];
837
+ /**
838
+ * The icon rendered inside the trigger.
839
+ *
840
+ * @default <SidebarSimpleIcon mirrored />
841
+ */
842
+ icon?: ReactNode;
843
+ /**
844
+ * The color intent of the trigger `IconButton`.
845
+ *
846
+ * @default "neutral"
847
+ */
848
+ intent?: IconButtonProps["intent"];
849
+ /**
850
+ * The accessible name of the trigger, also shown in its tooltip.
851
+ *
852
+ * @default "Toggle side panel"
853
+ */
854
+ label?: string;
855
+ };
856
+ /**
857
+ * The button that toggles `AppLayout.SidePanel`, the way `Sidebar.Trigger`
858
+ * toggles the rail. Renders a ghost neutral `IconButton` with `aria-expanded`
859
+ * and `aria-controls` wired to the panel's `<aside>`. Place one in
860
+ * `AppLayout.HeaderActions` to open the panel, and one more in
861
+ * `AppLayout.SidePanelHeader` with a close icon to close it from inside: when
862
+ * that one closes the panel, the root moves focus to the one outside. A
863
+ * consumer `onClick` runs before the toggle, and `event.preventDefault()` in
864
+ * it keeps the panel where it is.
865
+ *
866
+ * The button is icon-only, so it always renders a tooltip showing `label`.
867
+ * **That means it requires a `TooltipProvider` ancestor, like any
868
+ * `Tooltip.Root`, and throws without one.** Mount a single provider at your app
869
+ * root.
870
+ *
871
+ * **Data attributes (public API):**
872
+ *
873
+ * | Data Attribute | Value | Description |
874
+ * | --- | --- | --- |
875
+ * | `data-state` | `"open"` \| `"closed"` | Mirrors the root's open state. Pairs with `aria-expanded`. |
876
+ * | `data-slot` | `"app-layout-side-panel-trigger icon-button"` | On the button: the part's slot, joined ahead of `IconButton`'s own. |
877
+ * | `data-slot` | `"app-layout-side-panel-trigger-tooltip tooltip-content"` | On the tooltip surface, not the button: the styling hook for the label popup this part renders, joined ahead of `Tooltip.Content`'s own slot. |
878
+ * | `data-appearance` | `"filled"` \| `"ghost"` \| `"outlined"` | Read, not stamped: the underlying `IconButton` reflects its `appearance`, which this part defaults to `"ghost"`. |
879
+ * | `data-intent` | `"neutral"` | Read, not stamped: the underlying `IconButton` reflects its `intent`, which this part defaults to `"neutral"`. |
880
+ * | `data-size` | `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` | Read, not stamped: the underlying `IconButton` reflects its `size` and its own `"md"` default. |
881
+ * | `data-icon-button` | `"true"` | Read, not stamped: always present on the underlying `IconButton`. |
882
+ * | `data-loading` | present when `isLoading` | Read, not stamped: the underlying `IconButton` stamps it by presence, never `"false"`. |
883
+ * | `data-disabled` | present when disabled | Read, not stamped: the underlying `IconButton` stamps it by presence, never `"false"`, when it resolves disabled: `disabled`, `aria-disabled="true"`, or `isLoading` with no explicit `disabled`. |
884
+ *
885
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepaneltrigger
886
+ *
887
+ * @example
888
+ * ```tsx
889
+ * <Sidebar.Root>
890
+ * <AppLayout.Root className="fixed inset-0">
891
+ * <SkipToMainLink />
892
+ * <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>
893
+ * <AppLayout.SidePanelRoot>
894
+ * <AppLayout.Workspace>
895
+ * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
896
+ * <AppLayout.Content>
897
+ * <AppLayout.Header>
898
+ * <AppLayout.HeaderStart>
899
+ * <Sidebar.Trigger />
900
+ * </AppLayout.HeaderStart>
901
+ * <AppLayout.HeaderContent>
902
+ * <Breadcrumbs />
903
+ * </AppLayout.HeaderContent>
904
+ * <AppLayout.HeaderActions>
905
+ * <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label="Toggle the assistant" />
906
+ * </AppLayout.HeaderActions>
907
+ * </AppLayout.Header>
908
+ * <AppLayout.Body>
909
+ * <Outlet />
910
+ * </AppLayout.Body>
911
+ * </AppLayout.Content>
912
+ * <AppLayout.SidePanel aria-label="Assistant">
913
+ * <AppLayout.SidePanelHeader>
914
+ * <p className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Assistant</p>
915
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
916
+ * </AppLayout.SidePanelHeader>
917
+ * <AppLayout.SidePanelBody>
918
+ * <AssistantConversation />
919
+ * </AppLayout.SidePanelBody>
920
+ * <AppLayout.SidePanelFooter>
921
+ * <AssistantComposer />
922
+ * </AppLayout.SidePanelFooter>
923
+ * </AppLayout.SidePanel>
924
+ * </AppLayout.Workspace>
925
+ * </AppLayout.SidePanelRoot>
926
+ * </AppLayout.Root>
927
+ * </Sidebar.Root>
928
+ * ```
929
+ */
930
+ declare const SidePanelTrigger: ({ appearance, "data-slot": dataSlot, icon, intent, label, onClick, ...props }: AppLayoutSidePanelTriggerProps) => import("react").JSX.Element;
931
+ /**
932
+ * The toolbar row at the top of `AppLayout.SidePanel`: the panel's title at the
933
+ * start and its controls at the end, with the close control last. Render it as
934
+ * the **first child of `AppLayout.SidePanel`**. A flex row (`flex shrink-0
935
+ * items-center gap-2 border-b px-4`) on the same band as `AppLayout.Header`, so
936
+ * the two rows and a sidebar header's switcher row center on one line, by the
937
+ * same derivation (`h-14` standalone, the sidebar header's band minus twice the
938
+ * card gutter and twice the hairline border with a `Sidebar.Header` in the
939
+ * shell). Give the title `min-w-0 flex-1 truncate`, so it gives up width before
940
+ * a control does. Merge `border-b-0` for a header with no rule under it.
941
+ *
942
+ * Renders a `<div>`, not a `<header>`: the row is a toolbar, not the panel's
943
+ * introduction, and it keeps one element shape with `AppLayout.Header`. A
944
+ * `<header>` inside the `<aside>` scopes to the panel and claims no landmark,
945
+ * so if the row introduces the panel, compose a `<header>` with `asChild`.
946
+ *
947
+ * **CSS variables (public API):**
948
+ *
949
+ * | CSS Variable | Default | Description |
950
+ * | --- | --- | --- |
951
+ * | `--sidebar-header-height` | `4.5rem` | Read, not owned: `Sidebar.Header` owns this token. With a sidebar header in the shell, this row derives its height from it, the same way `AppLayout.Header` does. |
952
+ * | `--app-layout-card-gutter` | `0.5rem` | Read, not owned: `AppLayout.Content` owns this token. The derived height subtracts twice its value. |
953
+ *
954
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepanelheader
955
+ *
956
+ * @example
957
+ * ```tsx
958
+ * <Sidebar.Root>
959
+ * <AppLayout.Root className="fixed inset-0">
960
+ * <SkipToMainLink />
961
+ * <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>
962
+ * <AppLayout.SidePanelRoot>
963
+ * <AppLayout.Workspace>
964
+ * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
965
+ * <AppLayout.Content>
966
+ * <AppLayout.Header>
967
+ * <AppLayout.HeaderStart>
968
+ * <Sidebar.Trigger />
969
+ * </AppLayout.HeaderStart>
970
+ * <AppLayout.HeaderContent>
971
+ * <Breadcrumbs />
972
+ * </AppLayout.HeaderContent>
973
+ * <AppLayout.HeaderActions>
974
+ * <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label="Toggle the assistant" />
975
+ * </AppLayout.HeaderActions>
976
+ * </AppLayout.Header>
977
+ * <AppLayout.Body>
978
+ * <Outlet />
979
+ * </AppLayout.Body>
980
+ * </AppLayout.Content>
981
+ * <AppLayout.SidePanel aria-label="Assistant">
982
+ * <AppLayout.SidePanelHeader>
983
+ * <p className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Assistant</p>
984
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
985
+ * </AppLayout.SidePanelHeader>
986
+ * <AppLayout.SidePanelBody>
987
+ * <AssistantConversation />
988
+ * </AppLayout.SidePanelBody>
989
+ * <AppLayout.SidePanelFooter>
990
+ * <AssistantComposer />
991
+ * </AppLayout.SidePanelFooter>
992
+ * </AppLayout.SidePanel>
993
+ * </AppLayout.Workspace>
994
+ * </AppLayout.SidePanelRoot>
995
+ * </AppLayout.Root>
996
+ * </Sidebar.Root>
997
+ * ```
998
+ */
999
+ declare const SidePanelHeader: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
1000
+ /**
1001
+ * The scroll region of `AppLayout.SidePanel`, and the only part of the panel
1002
+ * that scrolls (`scrollbar relative min-h-0 w-full flex-1 overflow-y-auto
1003
+ * overscroll-none`). Render it after `AppLayout.SidePanelHeader`. It is the
1004
+ * same box as `AppLayout.Body` with no landmark: the page's body already owns
1005
+ * `main`, and a second scroll region beside it is plain content. It is block
1006
+ * inside, so a child that asks for `h-full` fills the panel between the header
1007
+ * and the footer, and `mx-auto max-w-*` still centers.
1008
+ *
1009
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepanelbody
1010
+ *
1011
+ * @example
1012
+ * ```tsx
1013
+ * <Sidebar.Root>
1014
+ * <AppLayout.Root className="fixed inset-0">
1015
+ * <SkipToMainLink />
1016
+ * <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>
1017
+ * <AppLayout.SidePanelRoot>
1018
+ * <AppLayout.Workspace>
1019
+ * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
1020
+ * <AppLayout.Content>
1021
+ * <AppLayout.Header>
1022
+ * <AppLayout.HeaderStart>
1023
+ * <Sidebar.Trigger />
1024
+ * </AppLayout.HeaderStart>
1025
+ * <AppLayout.HeaderContent>
1026
+ * <Breadcrumbs />
1027
+ * </AppLayout.HeaderContent>
1028
+ * <AppLayout.HeaderActions>
1029
+ * <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label="Toggle the assistant" />
1030
+ * </AppLayout.HeaderActions>
1031
+ * </AppLayout.Header>
1032
+ * <AppLayout.Body>
1033
+ * <Outlet />
1034
+ * </AppLayout.Body>
1035
+ * </AppLayout.Content>
1036
+ * <AppLayout.SidePanel aria-label="Assistant">
1037
+ * <AppLayout.SidePanelHeader>
1038
+ * <p className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Assistant</p>
1039
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
1040
+ * </AppLayout.SidePanelHeader>
1041
+ * <AppLayout.SidePanelBody>
1042
+ * <AssistantConversation />
1043
+ * </AppLayout.SidePanelBody>
1044
+ * <AppLayout.SidePanelFooter>
1045
+ * <AssistantComposer />
1046
+ * </AppLayout.SidePanelFooter>
1047
+ * </AppLayout.SidePanel>
1048
+ * </AppLayout.Workspace>
1049
+ * </AppLayout.SidePanelRoot>
1050
+ * </AppLayout.Root>
1051
+ * </Sidebar.Root>
1052
+ * ```
1053
+ */
1054
+ declare const SidePanelBody: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
1055
+ /**
1056
+ * The bar pinned to the bottom of `AppLayout.SidePanel`: a composer, a save
1057
+ * row, a status line. Render it after `AppLayout.SidePanelBody`. A `shrink-0`
1058
+ * column (`flex shrink-0 flex-col gap-2 px-3 pb-3`) outside the scroll
1059
+ * region, so the body scrolls under it and it never scrolls away. It draws no
1060
+ * rule above itself: the composer frame inside it is the edge. Merge
1061
+ * `flex-row justify-end` for an action row. Optional.
1062
+ *
1063
+ * The panel has a footer part where `AppLayout.Content` has none, because the
1064
+ * panel's author owns its whole subtree: no route renders through an
1065
+ * `<Outlet />` inside it, so a bar here is always the panel's own.
1066
+ *
1067
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepanelfooter
1068
+ *
1069
+ * @example
1070
+ * ```tsx
1071
+ * <Sidebar.Root>
1072
+ * <AppLayout.Root className="fixed inset-0">
1073
+ * <SkipToMainLink />
1074
+ * <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>
1075
+ * <AppLayout.SidePanelRoot>
1076
+ * <AppLayout.Workspace>
1077
+ * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
1078
+ * <AppLayout.Content>
1079
+ * <AppLayout.Header>
1080
+ * <AppLayout.HeaderStart>
1081
+ * <Sidebar.Trigger />
1082
+ * </AppLayout.HeaderStart>
1083
+ * <AppLayout.HeaderContent>
1084
+ * <Breadcrumbs />
1085
+ * </AppLayout.HeaderContent>
1086
+ * <AppLayout.HeaderActions>
1087
+ * <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label="Toggle the assistant" />
1088
+ * </AppLayout.HeaderActions>
1089
+ * </AppLayout.Header>
1090
+ * <AppLayout.Body>
1091
+ * <Outlet />
1092
+ * </AppLayout.Body>
1093
+ * </AppLayout.Content>
1094
+ * <AppLayout.SidePanel aria-label="Assistant">
1095
+ * <AppLayout.SidePanelHeader>
1096
+ * <p className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Assistant</p>
1097
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
1098
+ * </AppLayout.SidePanelHeader>
1099
+ * <AppLayout.SidePanelBody>
1100
+ * <AssistantConversation />
1101
+ * </AppLayout.SidePanelBody>
1102
+ * <AppLayout.SidePanelFooter>
1103
+ * <AssistantComposer />
1104
+ * </AppLayout.SidePanelFooter>
1105
+ * </AppLayout.SidePanel>
1106
+ * </AppLayout.Workspace>
1107
+ * </AppLayout.SidePanelRoot>
1108
+ * </AppLayout.Root>
1109
+ * </Sidebar.Root>
1110
+ * ```
1111
+ */
1112
+ declare const SidePanelFooter: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
477
1113
  /**
478
1114
  * A viewport-locked application shell: an optional full-width
479
1115
  * `AppLayout.Notice` strip on top, then an `AppLayout.Workspace` row holding the
480
- * app's columns — typically a `Sidebar.Nav` beside an `AppLayout.Content` card
481
- * whose `AppLayout.Body` is the only thing that scrolls. It owns structure only
1116
+ * app's columns, typically a `Sidebar.Nav` beside an `AppLayout.Content` card
1117
+ * whose `AppLayout.Body` is the only thing that scrolls, and an optional
1118
+ * `AppLayout.SidePanel` that opens beside the card. It owns structure only
482
1119
  * and is deliberately unaware of any sidebar: compose `Sidebar.Root` around it
483
1120
  * and place `Sidebar.Trigger` in `AppLayout.Header` to connect the two.
484
1121
  *
485
1122
  * Reach for it when a signed-in application needs navigation chrome that
486
1123
  * persists across routes. When the page is a single centered task surface with
487
- * no rail — sign in, sign up, onboarding, a standalone flow, a 404 — compose
1124
+ * no rail (sign in, sign up, onboarding, a standalone flow, a 404), compose
488
1125
  * [`CenteredLayout`](https://mantle.ngrok.com/layouts/centered-layout) instead.
489
1126
  *
490
1127
  * The card reads exactly like the column beside it and like every other mantle
491
- * surface — `Content > Header + Body`, the same shape as `Sidebar.Nav`,
1128
+ * surface: `Content > Header + Body`, the same shape as `Sidebar.Nav`,
492
1129
  * `Dialog.Content`, `Sheet.Content`, and `Card.Root`.
493
1130
  *
494
1131
  * There is deliberately no `Footer` part: a route rendering through an
495
1132
  * `<Outlet />` inside `AppLayout.Body` could never reach one, and a page-owned
496
1133
  * bottom bar is exactly what most consumers want. Make the page's root a flex
497
- * column instead — see the docs' "Sizing a page to the card".
1134
+ * column instead; see the docs' "Sizing a page to the card".
498
1135
  *
499
1136
  * @see https://mantle.ngrok.com/layouts/app-layout
500
1137
  *
@@ -503,13 +1140,19 @@ declare const Body: ({ asChild, children, className, "data-slot": dataSlot, ...p
503
1140
  * ```
504
1141
  * AppLayout.Root
505
1142
  * ├── AppLayout.Notice
506
- * └── AppLayout.Workspace
507
- * └── AppLayout.Content
508
- * ├── AppLayout.Header
509
- * │ ├── AppLayout.HeaderStart
510
- * │ ├── AppLayout.HeaderContent
511
- * │ └── AppLayout.HeaderActions
512
- * └── AppLayout.Body
1143
+ * └── AppLayout.SidePanelRoot
1144
+ * └── AppLayout.Workspace
1145
+ * ├── AppLayout.Content
1146
+ * │ ├── AppLayout.Header
1147
+ * │ │ ├── AppLayout.HeaderStart
1148
+ * │ │ ├── AppLayout.HeaderContent
1149
+ * │ │ └── AppLayout.HeaderActions
1150
+ * │ │ └── AppLayout.SidePanelTrigger
1151
+ * │ └── AppLayout.Body
1152
+ * └── AppLayout.SidePanel
1153
+ * ├── AppLayout.SidePanelHeader
1154
+ * ├── AppLayout.SidePanelBody
1155
+ * └── AppLayout.SidePanelFooter
513
1156
  * ```
514
1157
  *
515
1158
  * @example
@@ -518,25 +1161,39 @@ declare const Body: ({ asChild, children, className, "data-slot": dataSlot, ...p
518
1161
  * <AppLayout.Root className="fixed inset-0">
519
1162
  * <SkipToMainLink />
520
1163
  * <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>
521
- * <AppLayout.Workspace>
522
- * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
523
- * <AppLayout.Content>
524
- * <AppLayout.Header>
525
- * <AppLayout.HeaderStart>
526
- * <Sidebar.Trigger />
527
- * </AppLayout.HeaderStart>
528
- * <AppLayout.HeaderContent>
529
- * <Breadcrumbs />
530
- * </AppLayout.HeaderContent>
531
- * <AppLayout.HeaderActions>
532
- * <PageActions />
533
- * </AppLayout.HeaderActions>
534
- * </AppLayout.Header>
535
- * <AppLayout.Body>
536
- * <Outlet />
537
- * </AppLayout.Body>
538
- * </AppLayout.Content>
539
- * </AppLayout.Workspace>
1164
+ * <AppLayout.SidePanelRoot>
1165
+ * <AppLayout.Workspace>
1166
+ * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
1167
+ * <AppLayout.Content>
1168
+ * <AppLayout.Header>
1169
+ * <AppLayout.HeaderStart>
1170
+ * <Sidebar.Trigger />
1171
+ * </AppLayout.HeaderStart>
1172
+ * <AppLayout.HeaderContent>
1173
+ * <Breadcrumbs />
1174
+ * </AppLayout.HeaderContent>
1175
+ * <AppLayout.HeaderActions>
1176
+ * <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label="Toggle the assistant" />
1177
+ * </AppLayout.HeaderActions>
1178
+ * </AppLayout.Header>
1179
+ * <AppLayout.Body>
1180
+ * <Outlet />
1181
+ * </AppLayout.Body>
1182
+ * </AppLayout.Content>
1183
+ * <AppLayout.SidePanel aria-label="Assistant">
1184
+ * <AppLayout.SidePanelHeader>
1185
+ * <p className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Assistant</p>
1186
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
1187
+ * </AppLayout.SidePanelHeader>
1188
+ * <AppLayout.SidePanelBody>
1189
+ * <AssistantConversation />
1190
+ * </AppLayout.SidePanelBody>
1191
+ * <AppLayout.SidePanelFooter>
1192
+ * <AssistantComposer />
1193
+ * </AppLayout.SidePanelFooter>
1194
+ * </AppLayout.SidePanel>
1195
+ * </AppLayout.Workspace>
1196
+ * </AppLayout.SidePanelRoot>
540
1197
  * </AppLayout.Root>
541
1198
  * </Sidebar.Root>
542
1199
  * ```
@@ -615,8 +1272,9 @@ declare const AppLayout: {
615
1272
  */
616
1273
  readonly Notice: typeof Notice;
617
1274
  /**
618
- * The row below the notice where the user works — place a `Sidebar.Nav`
619
- * beside an `AppLayout.Content` card here.
1275
+ * The row below the notice where the user works: a `Sidebar.Nav` beside an
1276
+ * `AppLayout.Content` card, and an `AppLayout.SidePanel` after it. Caps at
1277
+ * `--app-layout-max-width` and centers on a wide screen.
620
1278
  *
621
1279
  * @see https://mantle.ngrok.com/layouts/app-layout#applayoutworkspace
622
1280
  *
@@ -688,7 +1346,7 @@ declare const AppLayout: {
688
1346
  */
689
1347
  readonly Content: typeof Content;
690
1348
  /**
691
- * The toolbar row at the top of the content card — `AppLayout.Content`'s
1349
+ * The toolbar row at the top of the content card: `AppLayout.Content`'s
692
1350
  * first child, with `Sidebar.Trigger` in its top-left followed by
693
1351
  * breadcrumbs. Pinned by `shrink-0`, not `sticky`.
694
1352
  *
@@ -871,6 +1529,431 @@ declare const AppLayout: {
871
1529
  * ```
872
1530
  */
873
1531
  readonly Body: typeof Body;
1532
+ /**
1533
+ * The renderless state owner for the side panel: `open`, `defaultOpen`,
1534
+ * `onOpenChange`. Wrap `AppLayout.Workspace` with it.
1535
+ *
1536
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepanelroot
1537
+ *
1538
+ * @example
1539
+ * ```tsx
1540
+ * <Sidebar.Root>
1541
+ * <AppLayout.Root className="fixed inset-0">
1542
+ * <SkipToMainLink />
1543
+ * <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>
1544
+ * <AppLayout.SidePanelRoot>
1545
+ * <AppLayout.Workspace>
1546
+ * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
1547
+ * <AppLayout.Content>
1548
+ * <AppLayout.Header>
1549
+ * <AppLayout.HeaderStart>
1550
+ * <Sidebar.Trigger />
1551
+ * </AppLayout.HeaderStart>
1552
+ * <AppLayout.HeaderContent>
1553
+ * <Breadcrumbs />
1554
+ * </AppLayout.HeaderContent>
1555
+ * <AppLayout.HeaderActions>
1556
+ * <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label="Toggle the assistant" />
1557
+ * </AppLayout.HeaderActions>
1558
+ * </AppLayout.Header>
1559
+ * <AppLayout.Body>
1560
+ * <Outlet />
1561
+ * </AppLayout.Body>
1562
+ * </AppLayout.Content>
1563
+ * <AppLayout.SidePanel aria-label="Assistant">
1564
+ * <AppLayout.SidePanelHeader>
1565
+ * <p className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Assistant</p>
1566
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
1567
+ * </AppLayout.SidePanelHeader>
1568
+ * <AppLayout.SidePanelBody>
1569
+ * <AssistantConversation />
1570
+ * </AppLayout.SidePanelBody>
1571
+ * <AppLayout.SidePanelFooter>
1572
+ * <AssistantComposer />
1573
+ * </AppLayout.SidePanelFooter>
1574
+ * </AppLayout.SidePanel>
1575
+ * </AppLayout.Workspace>
1576
+ * </AppLayout.SidePanelRoot>
1577
+ * </AppLayout.Root>
1578
+ * </Sidebar.Root>
1579
+ * ```
1580
+ */
1581
+ readonly SidePanelRoot: typeof SidePanelRoot;
1582
+ /**
1583
+ * A second card after `AppLayout.Content`, for an assistant or a details
1584
+ * pane. Reads its open state from `AppLayout.SidePanelRoot`: it slides in at
1585
+ * `--app-layout-side-panel-width`, collapses to nothing and goes `inert`
1586
+ * when closed, and floats over the card below `mobileBreakpoint`.
1587
+ *
1588
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepanel
1589
+ *
1590
+ * @example
1591
+ * ```tsx
1592
+ * <Sidebar.Root>
1593
+ * <AppLayout.Root className="fixed inset-0">
1594
+ * <SkipToMainLink />
1595
+ * <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>
1596
+ * <AppLayout.SidePanelRoot>
1597
+ * <AppLayout.Workspace>
1598
+ * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
1599
+ * <AppLayout.Content>
1600
+ * <AppLayout.Header>
1601
+ * <AppLayout.HeaderStart>
1602
+ * <Sidebar.Trigger />
1603
+ * </AppLayout.HeaderStart>
1604
+ * <AppLayout.HeaderContent>
1605
+ * <Breadcrumbs />
1606
+ * </AppLayout.HeaderContent>
1607
+ * <AppLayout.HeaderActions>
1608
+ * <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label="Toggle the assistant" />
1609
+ * </AppLayout.HeaderActions>
1610
+ * </AppLayout.Header>
1611
+ * <AppLayout.Body>
1612
+ * <Outlet />
1613
+ * </AppLayout.Body>
1614
+ * </AppLayout.Content>
1615
+ * <AppLayout.SidePanel aria-label="Assistant">
1616
+ * <AppLayout.SidePanelHeader>
1617
+ * <p className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Assistant</p>
1618
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
1619
+ * </AppLayout.SidePanelHeader>
1620
+ * <AppLayout.SidePanelBody>
1621
+ * <AssistantConversation />
1622
+ * </AppLayout.SidePanelBody>
1623
+ * <AppLayout.SidePanelFooter>
1624
+ * <AssistantComposer />
1625
+ * </AppLayout.SidePanelFooter>
1626
+ * </AppLayout.SidePanel>
1627
+ * </AppLayout.Workspace>
1628
+ * </AppLayout.SidePanelRoot>
1629
+ * </AppLayout.Root>
1630
+ * </Sidebar.Root>
1631
+ * ```
1632
+ */
1633
+ readonly SidePanel: typeof SidePanel;
1634
+ /**
1635
+ * The ghost `IconButton` that toggles the panel, with `aria-expanded` and
1636
+ * `aria-controls` wired to it. Needs a `TooltipProvider` ancestor.
1637
+ *
1638
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepaneltrigger
1639
+ *
1640
+ * @example
1641
+ * ```tsx
1642
+ * <Sidebar.Root>
1643
+ * <AppLayout.Root className="fixed inset-0">
1644
+ * <SkipToMainLink />
1645
+ * <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>
1646
+ * <AppLayout.SidePanelRoot>
1647
+ * <AppLayout.Workspace>
1648
+ * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
1649
+ * <AppLayout.Content>
1650
+ * <AppLayout.Header>
1651
+ * <AppLayout.HeaderStart>
1652
+ * <Sidebar.Trigger />
1653
+ * </AppLayout.HeaderStart>
1654
+ * <AppLayout.HeaderContent>
1655
+ * <Breadcrumbs />
1656
+ * </AppLayout.HeaderContent>
1657
+ * <AppLayout.HeaderActions>
1658
+ * <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label="Toggle the assistant" />
1659
+ * </AppLayout.HeaderActions>
1660
+ * </AppLayout.Header>
1661
+ * <AppLayout.Body>
1662
+ * <Outlet />
1663
+ * </AppLayout.Body>
1664
+ * </AppLayout.Content>
1665
+ * <AppLayout.SidePanel aria-label="Assistant">
1666
+ * <AppLayout.SidePanelHeader>
1667
+ * <p className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Assistant</p>
1668
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
1669
+ * </AppLayout.SidePanelHeader>
1670
+ * <AppLayout.SidePanelBody>
1671
+ * <AssistantConversation />
1672
+ * </AppLayout.SidePanelBody>
1673
+ * <AppLayout.SidePanelFooter>
1674
+ * <AssistantComposer />
1675
+ * </AppLayout.SidePanelFooter>
1676
+ * </AppLayout.SidePanel>
1677
+ * </AppLayout.Workspace>
1678
+ * </AppLayout.SidePanelRoot>
1679
+ * </AppLayout.Root>
1680
+ * </Sidebar.Root>
1681
+ * ```
1682
+ */
1683
+ readonly SidePanelTrigger: typeof SidePanelTrigger;
1684
+ /**
1685
+ * The panel's toolbar row, its first child: the title at the start, the
1686
+ * close control at the end, on the same band as `AppLayout.Header`.
1687
+ *
1688
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepanelheader
1689
+ *
1690
+ * @example
1691
+ * ```tsx
1692
+ * <Sidebar.Root>
1693
+ * <AppLayout.Root className="fixed inset-0">
1694
+ * <SkipToMainLink />
1695
+ * <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>
1696
+ * <AppLayout.SidePanelRoot>
1697
+ * <AppLayout.Workspace>
1698
+ * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
1699
+ * <AppLayout.Content>
1700
+ * <AppLayout.Header>
1701
+ * <AppLayout.HeaderStart>
1702
+ * <Sidebar.Trigger />
1703
+ * </AppLayout.HeaderStart>
1704
+ * <AppLayout.HeaderContent>
1705
+ * <Breadcrumbs />
1706
+ * </AppLayout.HeaderContent>
1707
+ * <AppLayout.HeaderActions>
1708
+ * <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label="Toggle the assistant" />
1709
+ * </AppLayout.HeaderActions>
1710
+ * </AppLayout.Header>
1711
+ * <AppLayout.Body>
1712
+ * <Outlet />
1713
+ * </AppLayout.Body>
1714
+ * </AppLayout.Content>
1715
+ * <AppLayout.SidePanel aria-label="Assistant">
1716
+ * <AppLayout.SidePanelHeader>
1717
+ * <p className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Assistant</p>
1718
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
1719
+ * </AppLayout.SidePanelHeader>
1720
+ * <AppLayout.SidePanelBody>
1721
+ * <AssistantConversation />
1722
+ * </AppLayout.SidePanelBody>
1723
+ * <AppLayout.SidePanelFooter>
1724
+ * <AssistantComposer />
1725
+ * </AppLayout.SidePanelFooter>
1726
+ * </AppLayout.SidePanel>
1727
+ * </AppLayout.Workspace>
1728
+ * </AppLayout.SidePanelRoot>
1729
+ * </AppLayout.Root>
1730
+ * </Sidebar.Root>
1731
+ * ```
1732
+ */
1733
+ readonly SidePanelHeader: typeof SidePanelHeader;
1734
+ /**
1735
+ * The panel's scroll region, after the header: the same box as
1736
+ * `AppLayout.Body` with no landmark.
1737
+ *
1738
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepanelbody
1739
+ *
1740
+ * @example
1741
+ * ```tsx
1742
+ * <Sidebar.Root>
1743
+ * <AppLayout.Root className="fixed inset-0">
1744
+ * <SkipToMainLink />
1745
+ * <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>
1746
+ * <AppLayout.SidePanelRoot>
1747
+ * <AppLayout.Workspace>
1748
+ * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
1749
+ * <AppLayout.Content>
1750
+ * <AppLayout.Header>
1751
+ * <AppLayout.HeaderStart>
1752
+ * <Sidebar.Trigger />
1753
+ * </AppLayout.HeaderStart>
1754
+ * <AppLayout.HeaderContent>
1755
+ * <Breadcrumbs />
1756
+ * </AppLayout.HeaderContent>
1757
+ * <AppLayout.HeaderActions>
1758
+ * <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label="Toggle the assistant" />
1759
+ * </AppLayout.HeaderActions>
1760
+ * </AppLayout.Header>
1761
+ * <AppLayout.Body>
1762
+ * <Outlet />
1763
+ * </AppLayout.Body>
1764
+ * </AppLayout.Content>
1765
+ * <AppLayout.SidePanel aria-label="Assistant">
1766
+ * <AppLayout.SidePanelHeader>
1767
+ * <p className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Assistant</p>
1768
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
1769
+ * </AppLayout.SidePanelHeader>
1770
+ * <AppLayout.SidePanelBody>
1771
+ * <AssistantConversation />
1772
+ * </AppLayout.SidePanelBody>
1773
+ * <AppLayout.SidePanelFooter>
1774
+ * <AssistantComposer />
1775
+ * </AppLayout.SidePanelFooter>
1776
+ * </AppLayout.SidePanel>
1777
+ * </AppLayout.Workspace>
1778
+ * </AppLayout.SidePanelRoot>
1779
+ * </AppLayout.Root>
1780
+ * </Sidebar.Root>
1781
+ * ```
1782
+ */
1783
+ readonly SidePanelBody: typeof SidePanelBody;
1784
+ /**
1785
+ * The bar pinned to the panel's bottom edge, after the body: a composer or
1786
+ * an action row, outside the scroll region. Optional.
1787
+ *
1788
+ * @see https://mantle.ngrok.com/layouts/app-layout#applayoutsidepanelfooter
1789
+ *
1790
+ * @example
1791
+ * ```tsx
1792
+ * <Sidebar.Root>
1793
+ * <AppLayout.Root className="fixed inset-0">
1794
+ * <SkipToMainLink />
1795
+ * <AppLayout.Notice>{isUnderMaintenance && <MaintenanceBanner />}</AppLayout.Notice>
1796
+ * <AppLayout.SidePanelRoot>
1797
+ * <AppLayout.Workspace>
1798
+ * <Sidebar.Nav aria-label="Main">…</Sidebar.Nav>
1799
+ * <AppLayout.Content>
1800
+ * <AppLayout.Header>
1801
+ * <AppLayout.HeaderStart>
1802
+ * <Sidebar.Trigger />
1803
+ * </AppLayout.HeaderStart>
1804
+ * <AppLayout.HeaderContent>
1805
+ * <Breadcrumbs />
1806
+ * </AppLayout.HeaderContent>
1807
+ * <AppLayout.HeaderActions>
1808
+ * <AppLayout.SidePanelTrigger icon={<SparkleIcon />} label="Toggle the assistant" />
1809
+ * </AppLayout.HeaderActions>
1810
+ * </AppLayout.Header>
1811
+ * <AppLayout.Body>
1812
+ * <Outlet />
1813
+ * </AppLayout.Body>
1814
+ * </AppLayout.Content>
1815
+ * <AppLayout.SidePanel aria-label="Assistant">
1816
+ * <AppLayout.SidePanelHeader>
1817
+ * <p className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Assistant</p>
1818
+ * <AppLayout.SidePanelTrigger icon={<XIcon />} label="Close the assistant" />
1819
+ * </AppLayout.SidePanelHeader>
1820
+ * <AppLayout.SidePanelBody>
1821
+ * <AssistantConversation />
1822
+ * </AppLayout.SidePanelBody>
1823
+ * <AppLayout.SidePanelFooter>
1824
+ * <AssistantComposer />
1825
+ * </AppLayout.SidePanelFooter>
1826
+ * </AppLayout.SidePanel>
1827
+ * </AppLayout.Workspace>
1828
+ * </AppLayout.SidePanelRoot>
1829
+ * </AppLayout.Root>
1830
+ * </Sidebar.Root>
1831
+ * ```
1832
+ */
1833
+ readonly SidePanelFooter: typeof SidePanelFooter;
874
1834
  };
875
1835
  //#endregion
876
- export { AppLayout };
1836
+ //#region src/components/app-layout/side-panel-state-cookie.d.ts
1837
+ /**
1838
+ * The cookie name {@link extractSidePanelStateCookie} reads and
1839
+ * {@link serializeSidePanelStateCookie} writes.
1840
+ *
1841
+ * Exported so an app can clear the cookie on sign-out, or read it with its own
1842
+ * cookie library, without hard-coding the name.
1843
+ *
1844
+ * @see https://mantle.ngrok.com/layouts/app-layout#side_panel_state_cookie_name
1845
+ *
1846
+ * @example
1847
+ * ```ts
1848
+ * // clear the persisted panel state on sign-out
1849
+ * headers.append("Set-Cookie", `${SIDE_PANEL_STATE_COOKIE_NAME}=; Max-Age=0; Path=/`);
1850
+ * ```
1851
+ */
1852
+ declare const SIDE_PANEL_STATE_COOKIE_NAME = "mantle-side-panel-state";
1853
+ /**
1854
+ * Parse the side panel's open state out of a raw `Cookie` header.
1855
+ *
1856
+ * This is the server half of cookie-backed persistence: a cookie is available
1857
+ * before the server renders, so the server HTML already carries the right
1858
+ * `data-state` and there is no first-frame correction to hide. Pass the result
1859
+ * straight to `AppLayout.SidePanelRoot`'s `defaultOpen`.
1860
+ *
1861
+ * Returns `undefined`, not `false`, when the cookie is absent or holds a value
1862
+ * this helper does not recognize, so a first-time visitor stays distinct from
1863
+ * one who closed the panel. Pick the default at the call site with `?? false`.
1864
+ *
1865
+ * Never throws: a header is client-controlled, and a value with a malformed
1866
+ * percent-escape is unparseable rather than fatal, so one corrupt cookie cannot
1867
+ * fail the server render on every page load.
1868
+ *
1869
+ * @see https://mantle.ngrok.com/layouts/app-layout#persisting-the-side-panel-to-a-cookie-ssr
1870
+ *
1871
+ * @example
1872
+ * ```ts
1873
+ * // app/root.tsx loader
1874
+ * export const loader = ({ request }: Route.LoaderArgs) => ({
1875
+ * sidePanelOpen: extractSidePanelStateCookie(request.headers.get("Cookie")) ?? false,
1876
+ * });
1877
+ * ```
1878
+ *
1879
+ * @param cookieHeader - The request's raw `Cookie` header.
1880
+ * @returns `true` when open, `false` when closed, `undefined` when unset, undecodable, or unparseable.
1881
+ */
1882
+ declare function extractSidePanelStateCookie(cookieHeader: string | null | undefined): boolean | undefined;
1883
+ /**
1884
+ * Attributes for {@link serializeSidePanelStateCookie}. Omits `HttpOnly` on
1885
+ * purpose: the browser writes this cookie from `onOpenChange`, so a
1886
+ * server-only cookie could never follow a toggle.
1887
+ *
1888
+ * @see https://mantle.ngrok.com/layouts/app-layout#serializesidepanelstatecookie
1889
+ *
1890
+ * @example
1891
+ * ```ts
1892
+ * serializeSidePanelStateCookie(open, { maxAge: 60 * 60 * 24 * 365, sameSite: "Lax" });
1893
+ * ```
1894
+ */
1895
+ type SerializeSidePanelStateCookieOptions = {
1896
+ /**
1897
+ * How long the preference survives, in seconds.
1898
+ *
1899
+ * @default 31_536_000 // one year
1900
+ */
1901
+ maxAge?: number;
1902
+ /**
1903
+ * The path the cookie applies to. Keep the default unless the panel only
1904
+ * exists under one route subtree.
1905
+ *
1906
+ * @default "/"
1907
+ */
1908
+ path?: string;
1909
+ /**
1910
+ * The domain the cookie applies to. Omitted by default, which scopes it to
1911
+ * the exact current host. Set it (e.g. `".example.com"`) to share the
1912
+ * preference across subdomains.
1913
+ */
1914
+ domain?: string;
1915
+ /**
1916
+ * `SameSite` policy. `"Lax"` is right for a UI preference: it survives
1917
+ * top-level navigations back to your app without riding along on
1918
+ * cross-site subrequests.
1919
+ *
1920
+ * @default "Lax"
1921
+ */
1922
+ sameSite?: "Lax" | "Strict" | "None";
1923
+ /**
1924
+ * Whether to add the `Secure` attribute. Omitted by default so the same call
1925
+ * works on `http://localhost`, where a `Secure` cookie is silently rejected.
1926
+ * If your policy requires it, set it to `true` in production; this cookie
1927
+ * holds no secret, only whether a panel is open.
1928
+ *
1929
+ * @default false
1930
+ */
1931
+ secure?: boolean;
1932
+ };
1933
+ /**
1934
+ * Serialize the side panel's open state as a cookie string.
1935
+ *
1936
+ * Framework-agnostic by design: the returned string is valid for both
1937
+ * `document.cookie` on the client and a `Set-Cookie` response header on the
1938
+ * server, so the same helper covers whichever side of your app owns the write.
1939
+ *
1940
+ * @see https://mantle.ngrok.com/layouts/app-layout#persisting-the-side-panel-to-a-cookie-ssr
1941
+ *
1942
+ * @example
1943
+ * ```tsx
1944
+ * // client: persist as the user toggles, and render from the loader value
1945
+ * const { sidePanelOpen } = useLoaderData<typeof loader>();
1946
+ * <AppLayout.SidePanelRoot
1947
+ * defaultOpen={sidePanelOpen}
1948
+ * onOpenChange={(open) => {
1949
+ * document.cookie = serializeSidePanelStateCookie(open);
1950
+ * }}
1951
+ * >
1952
+ * ```
1953
+ *
1954
+ * @param options - Cookie attributes; see {@link SerializeSidePanelStateCookieOptions}.
1955
+ * @returns A cookie string such as `mantle-side-panel-state=closed; Max-Age=31536000; Path=/; SameSite=Lax`.
1956
+ */
1957
+ declare function serializeSidePanelStateCookie(open: boolean, options?: SerializeSidePanelStateCookieOptions): string;
1958
+ //#endregion
1959
+ export { AppLayout, type AppLayoutSidePanelMobileBreakpoint, type AppLayoutSidePanelProps, type AppLayoutSidePanelRootProps, type AppLayoutSidePanelState, type AppLayoutSidePanelTriggerProps, SIDE_PANEL_STATE_COOKIE_NAME, type SerializeSidePanelStateCookieOptions, extractSidePanelStateCookie, serializeSidePanelStateCookie, useSidePanel };