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