@krizaka/ui 3.7.1 → 3.9.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 (303) hide show
  1. package/README.md +14 -12
  2. package/dist/action-bar.js +2 -1
  3. package/dist/action-bar.js.map +1 -1
  4. package/dist/app-shell.d.ts +81 -3
  5. package/dist/app-shell.js +163 -35
  6. package/dist/app-shell.js.map +1 -1
  7. package/dist/audio-player.js +1 -1
  8. package/dist/badge.d.ts +36 -39
  9. package/dist/badge.js +11 -2
  10. package/dist/badge.js.map +1 -1
  11. package/dist/blocks.css +56 -4
  12. package/dist/button-BmCrLCq7.d.ts +114 -0
  13. package/dist/button.d.ts +48 -48
  14. package/dist/button.js +2 -1
  15. package/dist/card.d.ts +111 -111
  16. package/dist/card.js +10 -2
  17. package/dist/card.js.map +1 -1
  18. package/dist/chip.d.ts +24 -24
  19. package/dist/chip.js +10 -2
  20. package/dist/chip.js.map +1 -1
  21. package/dist/{chunk-UOMP6VOZ.js → chunk-276PTQMQ.js} +10 -4
  22. package/dist/chunk-276PTQMQ.js.map +1 -0
  23. package/dist/{chunk-Z6FUPB3Q.js → chunk-2NB27LM7.js} +11 -3
  24. package/dist/chunk-2NB27LM7.js.map +1 -0
  25. package/dist/chunk-2VNYHG4E.js +9 -0
  26. package/dist/chunk-2VNYHG4E.js.map +1 -0
  27. package/dist/{chunk-ND3L5VHT.js → chunk-5Z7FWCV2.js} +2 -2
  28. package/dist/{chunk-YH4LMWRU.js → chunk-7UCPGXKN.js} +11 -3
  29. package/dist/chunk-7UCPGXKN.js.map +1 -0
  30. package/dist/{chunk-AZPKXP3O.js → chunk-AFY35UCB.js} +6 -1
  31. package/dist/{chunk-AZPKXP3O.js.map → chunk-AFY35UCB.js.map} +1 -1
  32. package/dist/{chunk-LCZXS6AK.js → chunk-CKSHLSDH.js} +5 -5
  33. package/dist/chunk-CKSHLSDH.js.map +1 -0
  34. package/dist/chunk-D3T54RSL.js +11 -0
  35. package/dist/chunk-D3T54RSL.js.map +1 -0
  36. package/dist/{chunk-ZKVQGXLD.js → chunk-FKBHWS4N.js} +2 -2
  37. package/dist/{chunk-BRKMQ6JV.js → chunk-FZBWEDQI.js} +1 -23
  38. package/dist/chunk-FZBWEDQI.js.map +1 -0
  39. package/dist/{chunk-HCNOOPZE.js → chunk-KVDB4GXV.js} +2 -2
  40. package/dist/{chunk-RUPNPMP3.js → chunk-OWC2LZD2.js} +11 -3
  41. package/dist/chunk-OWC2LZD2.js.map +1 -0
  42. package/dist/{chunk-FDCMBWUU.js → chunk-REPTKUJ6.js} +4 -4
  43. package/dist/chunk-REPTKUJ6.js.map +1 -0
  44. package/dist/{chunk-JZPVUJIX.js → chunk-UB2BI3AW.js} +1 -1
  45. package/dist/{chunk-JZPVUJIX.js.map → chunk-UB2BI3AW.js.map} +1 -1
  46. package/dist/code-block.d.ts +32 -10
  47. package/dist/code-block.js +51 -43
  48. package/dist/code-block.js.map +1 -1
  49. package/dist/combobox.d.ts +3 -3
  50. package/dist/combobox.js +4 -3
  51. package/dist/command.js +3 -2
  52. package/dist/command.js.map +1 -1
  53. package/dist/component-page.js.map +1 -1
  54. package/dist/confirm-button.d.ts +1 -1
  55. package/dist/confirm-button.js +2 -1
  56. package/dist/confirm-button.js.map +1 -1
  57. package/dist/continue-prompt.js +11 -3
  58. package/dist/continue-prompt.js.map +1 -1
  59. package/dist/data-table.js +7 -6
  60. package/dist/data-table.js.map +1 -1
  61. package/dist/date-picker.js +1 -1
  62. package/dist/dialog.js +3 -2
  63. package/dist/dialog.js.map +1 -1
  64. package/dist/file-upload.d.ts +12 -1
  65. package/dist/file-upload.js +73 -89
  66. package/dist/file-upload.js.map +1 -1
  67. package/dist/filter-bar.js +3 -2
  68. package/dist/{geometry-CbOU4rtL.d.ts → geometry-B2E8oFhg.d.ts} +1 -1
  69. package/dist/image-cropper.js +1 -1
  70. package/dist/index.d.ts +7 -5
  71. package/dist/index.js +26 -24
  72. package/dist/index.js.map +1 -1
  73. package/dist/list.js +1 -1
  74. package/dist/map.js +1 -1
  75. package/dist/map.js.map +1 -1
  76. package/dist/markdown.d.ts +38 -0
  77. package/dist/markdown.js +150 -0
  78. package/dist/markdown.js.map +1 -0
  79. package/dist/mascot-quote.d.ts +1 -1
  80. package/dist/mascot-quote.js.map +1 -1
  81. package/dist/mascot-state.d.ts +1 -1
  82. package/dist/mascot-state.js +1 -1
  83. package/dist/mascots.d.ts +2 -2
  84. package/dist/mascots.js +1 -1
  85. package/dist/match-dialog.js +2 -1
  86. package/dist/match-dialog.js.map +1 -1
  87. package/dist/media-capture.js +1 -1
  88. package/dist/native/map.js +1 -1
  89. package/dist/native/map.js.map +1 -1
  90. package/dist/native/markdown.d.ts +24 -0
  91. package/dist/native/markdown.js +200 -0
  92. package/dist/native/markdown.js.map +1 -0
  93. package/dist/native.d.ts +10 -14
  94. package/dist/native.js +383 -119
  95. package/dist/native.js.map +1 -1
  96. package/dist/recipes.d.ts +143 -0
  97. package/dist/recipes.js +180 -0
  98. package/dist/recipes.js.map +1 -0
  99. package/dist/search-field.js +2 -2
  100. package/dist/status-page.d.ts +1 -1
  101. package/dist/status-page.js.map +1 -1
  102. package/dist/swipe-deck.js +1 -1
  103. package/dist/tag-input.js +4 -3
  104. package/dist/tag-input.js.map +1 -1
  105. package/dist/tag-selector.js +2 -1
  106. package/dist/tag-selector.js.map +1 -1
  107. package/dist/theme.d.ts +1 -1
  108. package/dist/theme.js +2 -1
  109. package/dist/theme.js.map +1 -1
  110. package/dist/tree-view.js +1 -1
  111. package/dist/vertical-video.js +2 -1
  112. package/dist/vertical-video.js.map +1 -1
  113. package/dist/video-player.js +1 -1
  114. package/dist/video-trimmer.js +1 -1
  115. package/dist/virtual.js +2 -2
  116. package/package.json +49 -18
  117. package/registry/achievement.json +1 -1
  118. package/registry/action-bar.json +1 -1
  119. package/registry/activity-feed.json +1 -1
  120. package/registry/alert.json +1 -1
  121. package/registry/app-shell.json +135 -12
  122. package/registry/argument-card.json +1 -1
  123. package/registry/audio-player.json +2 -2
  124. package/registry/auth-layout.json +1 -1
  125. package/registry/avatar.json +1 -1
  126. package/registry/badge.json +9 -3
  127. package/registry/button.json +7 -2
  128. package/registry/card-grid.json +1 -1
  129. package/registry/card.json +8 -3
  130. package/registry/catalogue-page.json +1 -1
  131. package/registry/changelog-page.json +1 -1
  132. package/registry/chat.json +1 -1
  133. package/registry/checkbox.json +1 -1
  134. package/registry/chip-link.json +1 -1
  135. package/registry/chip.json +9 -3
  136. package/registry/choice-grid.json +1 -1
  137. package/registry/code-block.json +65 -21
  138. package/registry/combobox.json +4 -3
  139. package/registry/command.json +1 -1
  140. package/registry/component-page.json +4 -4
  141. package/registry/confirm-button.json +1 -1
  142. package/registry/contact-page.json +1 -1
  143. package/registry/continue-prompt.json +1 -1
  144. package/registry/countdown.json +1 -1
  145. package/registry/cta-panel.json +1 -1
  146. package/registry/dashboard-layout.json +1 -1
  147. package/registry/data-table.json +2 -2
  148. package/registry/date-picker.json +3 -3
  149. package/registry/decision-list.json +1 -1
  150. package/registry/description-list.json +1 -1
  151. package/registry/detail-layout.json +1 -1
  152. package/registry/dialog.json +1 -1
  153. package/registry/docs-article-page.json +1 -1
  154. package/registry/docs-hub-page.json +1 -1
  155. package/registry/docs-layout.json +1 -1
  156. package/registry/dropdown-menu.json +1 -1
  157. package/registry/empty-state.json +1 -1
  158. package/registry/error-page.json +1 -1
  159. package/registry/examples/app-shell/console.d.ts +4 -0
  160. package/registry/examples/app-shell/console.js +93 -0
  161. package/registry/examples/app-shell/console.tsx +103 -0
  162. package/registry/examples/badge/native/dot.dark.png +0 -0
  163. package/registry/examples/badge/native/dot.light.png +0 -0
  164. package/registry/examples/badge/native/scrim.dark.png +0 -0
  165. package/registry/examples/badge/native/scrim.light.png +0 -0
  166. package/registry/examples/badge/native/tones.dark.png +0 -0
  167. package/registry/examples/badge/native/tones.light.png +0 -0
  168. package/registry/examples/card/native/default.dark.png +0 -0
  169. package/registry/examples/card/native/default.light.png +0 -0
  170. package/registry/examples/card/native/elevated.light.png +0 -0
  171. package/registry/examples/chip/native/multiple.dark.png +0 -0
  172. package/registry/examples/chip/native/multiple.light.png +0 -0
  173. package/registry/examples/chip/native/removable.dark.png +0 -0
  174. package/registry/examples/chip/native/removable.light.png +0 -0
  175. package/registry/examples/chip/native/single.dark.png +0 -0
  176. package/registry/examples/chip/native/single.light.png +0 -0
  177. package/registry/examples/chip/native/toggle.dark.png +0 -0
  178. package/registry/examples/chip/native/toggle.light.png +0 -0
  179. package/registry/examples/code-block/annotated.d.ts +4 -0
  180. package/registry/examples/code-block/annotated.js +31 -0
  181. package/registry/examples/code-block/annotated.tsx +26 -0
  182. package/registry/examples/component-page/button.tsx +1 -1
  183. package/registry/examples/form/native/amount.dark.png +0 -0
  184. package/registry/examples/form/native/amount.light.png +0 -0
  185. package/registry/examples/landing-page/krizaka.js +1 -1
  186. package/registry/examples/landing-page/krizaka.tsx +1 -1
  187. package/registry/examples/markdown/ai-stream.d.ts +4 -0
  188. package/registry/examples/markdown/ai-stream.js +31 -0
  189. package/registry/examples/markdown/ai-stream.tsx +32 -0
  190. package/registry/examples/markdown/basic.d.ts +4 -0
  191. package/registry/examples/markdown/basic.js +26 -0
  192. package/registry/examples/markdown/basic.tsx +22 -0
  193. package/registry/examples/markdown/native/ai-stream.d.ts +4 -0
  194. package/registry/examples/markdown/native/ai-stream.dark.png +0 -0
  195. package/registry/examples/markdown/native/ai-stream.js +17 -0
  196. package/registry/examples/markdown/native/ai-stream.light.png +0 -0
  197. package/registry/examples/markdown/native/ai-stream.tsx +17 -0
  198. package/registry/examples/markdown/native/basic.d.ts +4 -0
  199. package/registry/examples/markdown/native/basic.dark.png +0 -0
  200. package/registry/examples/markdown/native/basic.js +28 -0
  201. package/registry/examples/markdown/native/basic.light.png +0 -0
  202. package/registry/examples/markdown/native/basic.tsx +27 -0
  203. package/registry/examples/mascots/flock.tsx +1 -1
  204. package/registry/examples/profile-card/match.js +1 -1
  205. package/registry/examples/profile-card/match.tsx +1 -1
  206. package/registry/examples/recipes/tone-chip.d.ts +4 -0
  207. package/registry/examples/recipes/tone-chip.js +46 -0
  208. package/registry/examples/recipes/tone-chip.tsx +32 -0
  209. package/registry/examples/screen/native/profile.dark.png +0 -0
  210. package/registry/examples/screen/native/profile.light.png +0 -0
  211. package/registry/examples/status-page/building.js +1 -1
  212. package/registry/examples/status-page/building.tsx +1 -1
  213. package/registry/examples/tag-selector/native/interests.dark.png +0 -0
  214. package/registry/examples/tag-selector/native/interests.light.png +0 -0
  215. package/registry/field.json +1 -1
  216. package/registry/file-upload.json +8 -3
  217. package/registry/filter-bar.json +1 -1
  218. package/registry/form.json +2 -2
  219. package/registry/gallery-page.json +1 -1
  220. package/registry/glow-card.json +1 -1
  221. package/registry/goal-gauge.json +1 -1
  222. package/registry/how-it-works-page.json +1 -1
  223. package/registry/image-cropper.json +2 -2
  224. package/registry/index.json +77 -17
  225. package/registry/iso.json +1 -1
  226. package/registry/kanban.json +1 -1
  227. package/registry/kbd.json +1 -1
  228. package/registry/landing-page.json +3 -3
  229. package/registry/landscape.json +1 -1
  230. package/registry/legal-page.json +1 -1
  231. package/registry/link-card.json +1 -1
  232. package/registry/list.json +2 -2
  233. package/registry/loader.json +4 -4
  234. package/registry/longform-page.json +1 -1
  235. package/registry/map.json +3 -3
  236. package/registry/markdown.json +266 -0
  237. package/registry/marketing-layout.json +1 -1
  238. package/registry/marquee.json +1 -1
  239. package/registry/mascot-quote.json +1 -1
  240. package/registry/mascot-state.json +1 -1
  241. package/registry/mascots.json +5 -5
  242. package/registry/match-dialog.json +1 -1
  243. package/registry/media-capture.json +2 -2
  244. package/registry/meter.json +1 -1
  245. package/registry/nav-bar.json +1 -1
  246. package/registry/number-ticker.json +1 -1
  247. package/registry/page-header.json +1 -1
  248. package/registry/page-hero.json +1 -1
  249. package/registry/page.json +1 -1
  250. package/registry/pagination.json +1 -1
  251. package/registry/photo-grid.json +1 -1
  252. package/registry/pointer-light.json +1 -1
  253. package/registry/popover.json +1 -1
  254. package/registry/pricing-page.json +1 -1
  255. package/registry/product-page.json +3 -3
  256. package/registry/profile-card.json +2 -2
  257. package/registry/progress.json +1 -1
  258. package/registry/promise-card.json +1 -1
  259. package/registry/radio-group.json +1 -1
  260. package/registry/recipes.json +99 -0
  261. package/registry/scroll-stage.json +1 -1
  262. package/registry/search-field.json +4 -3
  263. package/registry/section-backdrop.json +1 -1
  264. package/registry/separator.json +1 -1
  265. package/registry/settings-layout.json +1 -1
  266. package/registry/skeleton.json +1 -1
  267. package/registry/skip-link.json +1 -1
  268. package/registry/slider.json +1 -1
  269. package/registry/slot.json +1 -1
  270. package/registry/spinner.json +1 -1
  271. package/registry/split-view.json +1 -1
  272. package/registry/stage-banner.json +1 -1
  273. package/registry/stat.json +1 -1
  274. package/registry/status-page.json +7 -7
  275. package/registry/step-progress.json +1 -1
  276. package/registry/stepper.json +1 -1
  277. package/registry/swipe-deck.json +2 -2
  278. package/registry/switch.json +1 -1
  279. package/registry/tabs.json +1 -1
  280. package/registry/tag-input.json +2 -2
  281. package/registry/tag-selector.json +1 -1
  282. package/registry/terminal-replay.json +1 -1
  283. package/registry/theme.json +1 -1
  284. package/registry/toast.json +1 -1
  285. package/registry/toc.json +1 -1
  286. package/registry/tooltip.json +1 -1
  287. package/registry/tree-view.json +2 -2
  288. package/registry/verified-badge.json +1 -1
  289. package/registry/vertical-video.json +2 -2
  290. package/registry/video-player.json +2 -2
  291. package/registry/video-trimmer.json +2 -2
  292. package/registry/virtual.json +2 -2
  293. package/dist/button-BMAO7dKF.d.ts +0 -114
  294. package/dist/chunk-BRKMQ6JV.js.map +0 -1
  295. package/dist/chunk-FDCMBWUU.js.map +0 -1
  296. package/dist/chunk-LCZXS6AK.js.map +0 -1
  297. package/dist/chunk-RUPNPMP3.js.map +0 -1
  298. package/dist/chunk-UOMP6VOZ.js.map +0 -1
  299. package/dist/chunk-YH4LMWRU.js.map +0 -1
  300. package/dist/chunk-Z6FUPB3Q.js.map +0 -1
  301. /package/dist/{chunk-ND3L5VHT.js.map → chunk-5Z7FWCV2.js.map} +0 -0
  302. /package/dist/{chunk-ZKVQGXLD.js.map → chunk-FKBHWS4N.js.map} +0 -0
  303. /package/dist/{chunk-HCNOOPZE.js.map → chunk-KVDB4GXV.js.map} +0 -0
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  **The Krizaka front-end platform's components, shared by every product.**
11
11
  The primitives (button, badge, avatar, field, theme, countdown…) on the semantic `--kz-*` tokens, the animated marks
12
- of Krizaka, Orazaka, Orochia, Yazakia and Yororis, and the Krizaka motion signature — one easing, one way to enter, reveal, roll, shine
12
+ of Krizaka, Orazaka, Orochia, Yasakia and Yororis, and the Krizaka motion signature — one easing, one way to enter, reveal, roll, shine
13
13
  and open.
14
14
 
15
15
  [![npm](https://img.shields.io/npm/v/@krizaka/ui?color=196df5&label=npm)](https://www.npmjs.com/package/@krizaka/ui)
@@ -185,7 +185,7 @@ light or a product's — is a set of tokens.
185
185
  | `@krizaka/ui/date-picker` | `DatePicker`, `DateRangePicker` (`presets`), `Calendar` — ISO dates, the locale's names through `@krizaka/intl`, `min`/`max`/`isDateDisabled`, the APG grid keyboard | client |
186
186
  | `@krizaka/ui/search-field` | `SearchField` (`onSearch` debounced, `onSubmit`, `shortcut` ⌘K, `suggestions`, `clearLabel`, `landmark`) | client |
187
187
  | `@krizaka/ui/video-player` | `VideoPlayer` (`src` or a signed-source function, `loadHls={() => import("hls.js")}` (optional peer, loaded only without native HLS), `tracks`, `playbackRates`, `preload`, `pauseWhenHidden`, `overlay` for a gate, `labels`; keyboard Space/K, J/L, arrows, M, F, C) | client |
188
- | `@krizaka/ui/file-upload` | `Dropzone` (`accept`, `maxSize`, `maxFiles`, refusals with reasons), `UploadList` (preview, progress, speed, pause/resume/retry/cancel), `useUploadQueue` (`upload(file, { signal, onProgress, resumed })`: Tus-ready without depending on it), `acceptsFile`, `formatBytes` | client |
188
+ | `@krizaka/ui/file-upload` | `Dropzone` (`accept`, `maxSize`, `maxFiles`, refusals with reasons), `UploadList` (preview, progress, speed, pause/resume/retry/cancel), `useUploadQueue` (`upload(file, { signal, onProgress, resumed })`: Tus-ready without depending on it; `retries`, `backoff`, `shouldRetry` — a queue of `@krizaka/pacer`), `acceptsFile`, `formatBytes` | client |
189
189
  | `@krizaka/ui/media-capture` | `MediaCapture` (`mode` photo·video·both, `facing`, `maxDuration`, permission asked on a gesture, the file picker as the way out, `onCapture({ blob, kind, url })`) | client |
190
190
  | `@krizaka/ui/video-trimmer` | `VideoTrimmer` (`duration`, `value` [start, end], `minLength`, `step`/`largeStep`, `frames` or children, `time` + `onSeek`, `classNames` per part, `renderHandle`) | client |
191
191
  | `@krizaka/ui/audio-player` | `AudioPlayer` (a seekable waveform: `peaks` or `computePeaks`, `bars`, `playbackRates`, `duration`), `resamplePeaks`, `computeAudioPeaks` | client |
@@ -198,11 +198,13 @@ light or a product's — is a set of tokens.
198
198
  | `@krizaka/ui/argument-card` | `ArgumentCard` (compact: `icon`, `title`, `meta`, `facts`, `hook` — the trap in one line —, `more`, `actions`; in a panel: `points`, `rule`, `details`, `panelLabel`) | server |
199
199
  | `@krizaka/ui/mascot-quote` | `MascotQuote` (`bird`, `mood`, `label`, the sentence as children, `variant` inline·callout, `animated`) | client |
200
200
  | `@krizaka/ui/decision-list` | `DecisionList` (`decisions`: `chose`, `refused`, `because`, `cost`; `labels`, `reveal`) | server |
201
- | `@krizaka/ui/code-block` | `CodeBlock` (`code`, `language`, `file`, `copyLabel`, `copiedLabel`, `highlight`), `CodeTabs` (`label`, `tabs`), `highlight` | client |
201
+ | `@krizaka/ui/code-block` | `CodeBlock` (`code`, `language`, `file`, `lineNumbers`, `annotations` — highlight · added · removed · focus · dim · error · warning —, `copyLabel`, `copiedLabel`, `highlight`), `CodeTabs` (`label`, `tabs`), `highlight`, `normalizeCodeLanguage` — on TanStack Highlight (TS, TSX, JS, JSON, YAML, Bash, HTML, CSS, Java, Kotlin, diff) | client |
202
+ | `@krizaka/ui/markdown` | `Markdown` (the source as children; `streaming`, `headingIds`, `codeLabels`, `linkAs`), `parseSource`, `healStreaming` — TanStack Markdown on the tokens, raw HTML never rendered; `@krizaka/ui/native/markdown`: the same AST in `Text` and `View` (`onLinkPress`) | server |
203
+ | `@krizaka/ui/recipes` | `defineRecipe` (the variants of a component as classes of the tokens: `tv(recipe)` on the web), `nativeRecipe(recipe).resolve(props, theme)` (the phone's styles from the same classes), `ROLES`, `withAlpha` | server |
202
204
  | `@krizaka/ui/action-bar` | `ActionBar` (`actions`: `href`, `label`, `icon`; `variant` buttons·icons — the words in a CSS tooltip —, `primaryFirst`, `size`, `label`, `linkAs`) | server |
203
205
  | `@krizaka/ui/cta-panel` | `CtaPanel` (`id`, `title`, `body`, the actions as children, `level`, `reveal`) | server |
204
206
  | `@krizaka/ui/toc` | `Toc` (`label`, `items`; the section being read marked), `TocLayout` (`toc`, the sections as children) | client |
205
- | `@krizaka/ui/app-shell` | `AppShell.Root` (`defaultCollapsed`, `collapsed` + `onCollapsedChange`) `/Sidebar` (`label`, `brand`, `footer`, `collapseLabels`, `closeLabel`; a drawer on a phone) `/Group/Item` (`icon`, `label`, `current`, `badge`, `asChild`) `/Body/Header` (`title`, `menuLabel`, `actions`) `/Main` — see [Layouts and templates](#layouts-and-templates) | client |
207
+ | `@krizaka/ui/app-shell` | `AppShell.Root` (`defaultCollapsed`, `collapsed` + `onCollapsedChange`) `/Sidebar` (`label`, `brand`, `footer`, `collapseLabels`, `closeLabel`; a drawer on a phone) `/Group/Item` (`icon`, `label`, `current`, `badge`, `shortcut`, `asChild`) `/Body/Header` (`title`, `menuLabel`, `actions`) `/Search` (`label`, `onOpen`, `shortcut` ⌘K — opens the app's `CommandDialog`) `/Main`; `collapseShortcut` (⌘B), `useShortcuts` — see [Layouts and templates](#layouts-and-templates) | client |
206
208
  | `@krizaka/ui/dashboard-layout` | `DashboardLayout` (`title`, `eyebrow`, `description`, `actions`, `toolbar`, `headingAs`), `Widget` (`title`, `description`, `action`, `span` 1·2·3·full, `level`) | server |
207
209
  | `@krizaka/ui/settings-layout` | `SettingsLayout` (`title`, `description`, `nav`, `navLabel`, `linkAs`), `SettingsSection` (`title`, `description`, `footer`) | server |
208
210
  | `@krizaka/ui/auth-layout` | `AuthLayout` (`brand`, `title`, `description`, `footer`, `legal`, `promise`, `aside`, `asideFooter`) | server |
@@ -250,7 +252,7 @@ applies it before the first paint (no flash), the provider reports it. A persist
250
252
 
251
253
  ## Page blocks
252
254
 
253
- > Category **blocks** of krizaka.com/docs/ui. The pieces every page of a Krizaka site is made of — one frame, one hero,
255
+ > Category **blocks** of ui.krizaka.com. The pieces every page of a Krizaka site is made of — one frame, one hero,
254
256
  > sections on one rhythm, cards that lead or argue, decisions, code, calls to act — so every page reads the same.
255
257
 
256
258
  ```tsx
@@ -280,7 +282,7 @@ import { LinkCard } from "@krizaka/ui/link-card";
280
282
 
281
283
  ## Page templates
282
284
 
283
- > Category **templates** of krizaka.com/docs/ui: every page of a Krizaka site has its template.
285
+ > Category **templates** of ui.krizaka.com: every page of a Krizaka site has its template.
284
286
 
285
287
  Fifteen templates, each a **distinct composition** of the blocks — not the same card grid everywhere: `LandingPage`
286
288
  (split hero with the product alive, a band of proofs, a bento), `ProductPage` (split hero in the product's brand,
@@ -300,7 +302,7 @@ boundary stays where it is: a template is a Server Component.
300
302
 
301
303
  ## Layouts and screens
302
304
 
303
- > Category **layouts** of krizaka.com/docs/ui, and **templates**: whole screens composed from the platform.
305
+ > Category **layouts** of ui.krizaka.com, and **templates**: whole screens composed from the platform.
304
306
 
305
307
  The shells of the products' screens, read from their real screens (Orochia web, admin and mobile; Orazaka web-client,
306
308
  web-admin and mobile; krizaka.com): `AppShell` (sidebar that collapses, header, drawer on a phone), `DashboardLayout`
@@ -315,7 +317,7 @@ React Native shells are `@krizaka/ui/native`'s (DS4): same names where the conce
315
317
 
316
318
  ## Registry — the code drives the documentation
317
319
 
318
- Every component is also published as data: **[krizaka.com/docs/ui](https://www.krizaka.com/docs/ui)** is generated
320
+ Every component is also published as data: **[ui.krizaka.com](https://ui.krizaka.com)** is generated
319
321
  from it at every build of the site (one page per component: when to use it, live examples with their code for the web
320
322
  and React Native, props, accessibility), and, later, a `npx @krizaka/cli add <name>` may copy a primitive into a
321
323
  product that forks it knowingly. Built by `scripts/build-registry.mjs` after tsup, from three sources in the code:
@@ -405,7 +407,7 @@ const { theme, scheme, mode, setMode, radius } = useTheme(); // theme.surface1,
405
407
  | `Segmented` | `options` (`value`, `label`, `disabled`), `value`, `onValueChange`, `size` | The web `Tabs variant="segmented"` (a tab list). To filter, `Chip.Group`. |
406
408
  | `Progress` | `variant` bar·ring, `size`, `value`/`max`, `label`, `valueText`, a ring's centre as children | The fill is the `accent` → `accent2` gradient (react-native-svg); it animates to each new value. |
407
409
  | `Toaster`, `toast` | `toast(title, { description, tone, icon, action, onPress, id, duration, onDismiss })`, `toast.success/warning/error/info`, `toast.dismiss(id?)`; `Toaster closeLabel position offset duration max` | No sonner: a light queue of its own. `offset` takes the safe-area inset (no safe-area dependency). |
408
- | `KrizakaMark`, `OrazakaMark`, `OrochiaMark`, `YazakiaMark`, `YororisMark`, `ProductMark` (`id`) | `size`, `animated`, `title`, `neutral` (default `theme.textMuted`) | The brand marks, drawn with react-native-svg from the web marks' geometry. |
410
+ | `KrizakaMark`, `OrazakaMark`, `OrochiaMark`, `YasakiaMark`, `YororisMark`, `ProductMark` (`id`) | `size`, `animated`, `title`, `neutral` (default `theme.textMuted`) | The brand marks, drawn with react-native-svg from the web marks' geometry. |
409
411
 
410
412
  Every animation (skeleton, badge dot, urgent countdown, progress, toast entrance, the marks) stops when the system
411
413
  asks to reduce motion (`useReducedMotion()`). Accessibility goes through `role` and `aria-*` (RN ≥ 0.71): headings,
@@ -435,12 +437,12 @@ Testing Library (`src/native/*.test.tsx`); `scripts/native-dist.mjs` checks that
435
437
  ## The marks
436
438
 
437
439
  ```tsx
438
- import { KrizakaLogo, OrazakaLogo, OrochiaLogo, ProductLogo, YazakiaLogo, YororisLogo } from "@krizaka/ui";
440
+ import { KrizakaLogo, OrazakaLogo, OrochiaLogo, ProductLogo, YasakiaLogo, YororisLogo } from "@krizaka/ui";
439
441
 
440
442
  <OrochiaLogo size={36} /> // decorative (aria-hidden)
441
443
  <KrizakaLogo size={48} title="Krizaka" /> // an image with an accessible name
442
444
  <ProductLogo id="orazaka" animated={false} /> // by id, still
443
- <YazakiaLogo size={32} /> // Yazakia: emerald → turquoise, two voices that meet
445
+ <YasakiaLogo size={32} /> // Yasakia: emerald → turquoise, two voices that meet
444
446
  <YororisLogo size={32} /> // Yororis: sand → sage, the hold
445
447
  ```
446
448
 
@@ -497,7 +499,7 @@ classes the components use are generated in your stylesheet.
497
499
  ```
498
500
 
499
501
  Every component, with when to use it, live examples and their code (web and React Native) and its props:
500
- [krizaka.com/docs/ui](https://www.krizaka.com/docs/ui).
502
+ [ui.krizaka.com](https://ui.krizaka.com).
501
503
 
502
504
  ## Develop
503
505
 
@@ -7,7 +7,8 @@ import {
7
7
  } from "./chunk-XCBVFMNV.js";
8
8
  import {
9
9
  buttonVariants
10
- } from "./chunk-Z6FUPB3Q.js";
10
+ } from "./chunk-2NB27LM7.js";
11
+ import "./chunk-2VNYHG4E.js";
11
12
  import {
12
13
  cn
13
14
  } from "./chunk-4LOMIQVX.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/action-bar/action-bar.tsx"],"sourcesContent":["// Server-safe. A row of actions that leave or move on (blocks.css): discuss · propose · report, read the docs, see the\n// code. `buttons`: buttons with their words — the end of a page or a section. `icons`: icon buttons whose words are the\n// accessible name and a tooltip on hover and focus (CSS only: no script, no portal) — the foot of a card.\nimport type * as React from \"react\";\n\nimport { BlockLink, isExternal, type LinkComponent } from \"../block-link\";\nimport { buttonVariants } from \"../button/button\";\nimport { cn } from \"../cn\";\nimport { ExternalGlyph } from \"../glyphs\";\n\nexport interface Action {\n /** Where it leads. An absolute URL opens in a new tab, with the external mark. */\n href: string;\n /** Its words (the accessible name, and the tooltip of an icon action). */\n label: string;\n /** Its icon (a signature icon): decorative. Required by `variant=\"icons\"`. */\n icon?: React.ReactNode;\n}\n\nexport type ActionBarProps = React.HTMLAttributes<HTMLUListElement> & {\n /** The actions, in order of importance. */\n actions: readonly Action[];\n /**\n * `buttons` (with their words) or `icons` (icon buttons, the words in a tooltip).\n * @default \"buttons\"\n */\n variant?: \"buttons\" | \"icons\";\n /**\n * The first action as the primary button (the one action a block is about); the others stay secondary.\n * @default false\n */\n primaryFirst?: boolean;\n /**\n * The buttons' size: `sm` in a card, `md` in a section, `lg` on a hero or a closing call.\n * @default \"md\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\n /** What the actions are about (`Talk about Krizaka Java`): the list's accessible name. */\n label?: string;\n /** The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise. */\n linkAs?: LinkComponent;\n};\n\n/** A row of link actions: buttons with their words, or icon buttons with a tooltip. */\nexport function ActionBar({ actions, variant = \"buttons\", primaryFirst = false, size = \"md\", label, linkAs, className, ...props }: ActionBarProps) {\n const icons = variant === \"icons\";\n return (\n <ul className={cn(\"kz-actions\", className)} data-variant={icons ? \"icons\" : undefined} aria-label={label} {...props}>\n {actions.map((a, i) => {\n const external = isExternal(a.href);\n return (\n <li key={a.href}>\n {icons ? (\n <BlockLink\n href={a.href}\n linkAs={linkAs}\n external={external}\n aria-label={a.label}\n data-tip={a.label}\n className={buttonVariants({ variant: \"ghost\", size: \"icon\", shape: \"cut\", className: size === \"sm\" ? \"h-9 w-9\" : undefined })}\n >\n {a.icon}\n </BlockLink>\n ) : (\n <BlockLink\n href={a.href}\n linkAs={linkAs}\n external={external}\n className={buttonVariants({ variant: primaryFirst && i === 0 ? \"primary\" : \"secondary\", size, shape: \"cut\", className: \"gap-2\" })}\n >\n {a.icon}\n {a.label}\n {external && <ExternalGlyph className=\"h-3 w-3 opacity-70\" />}\n </BlockLink>\n )}\n </li>\n );\n })}\n </ul>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAqDc,cAWA,YAXA;AATP,SAAS,UAAU,EAAE,SAAS,UAAU,WAAW,eAAe,OAAO,OAAO,MAAM,OAAO,QAAQ,WAAW,GAAG,MAAM,GAAmB;AACjJ,QAAM,QAAQ,YAAY;AAC1B,SACE,oBAAC,QAAG,WAAW,GAAG,cAAc,SAAS,GAAG,gBAAc,QAAQ,UAAU,QAAW,cAAY,OAAQ,GAAG,OAC3G,kBAAQ,IAAI,CAAC,GAAG,MAAM;AACrB,UAAM,WAAW,WAAW,EAAE,IAAI;AAClC,WACE,oBAAC,QACE,kBACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,EAAE;AAAA,QACR;AAAA,QACA;AAAA,QACA,cAAY,EAAE;AAAA,QACd,YAAU,EAAE;AAAA,QACZ,WAAW,eAAe,EAAE,SAAS,SAAS,MAAM,QAAQ,OAAO,OAAO,WAAW,SAAS,OAAO,YAAY,OAAU,CAAC;AAAA,QAE3H,YAAE;AAAA;AAAA,IACL,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,EAAE;AAAA,QACR;AAAA,QACA;AAAA,QACA,WAAW,eAAe,EAAE,SAAS,gBAAgB,MAAM,IAAI,YAAY,aAAa,MAAM,OAAO,OAAO,WAAW,QAAQ,CAAC;AAAA,QAE/H;AAAA,YAAE;AAAA,UACF,EAAE;AAAA,UACF,YAAY,oBAAC,iBAAc,WAAU,sBAAqB;AAAA;AAAA;AAAA,IAC7D,KAtBK,EAAE,IAwBX;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/action-bar/action-bar.tsx"],"sourcesContent":["// Server-safe. A row of actions that leave or move on (blocks.css): discuss · propose · report, read the docs, see the\n// code. `buttons`: buttons with their words — the end of a page or a section. `icons`: icon buttons whose words are the\n// accessible name and a tooltip on hover and focus (CSS only: no script, no portal) — the foot of a card.\nimport type * as React from \"react\";\n\nimport { BlockLink, isExternal, type LinkComponent } from \"../block-link\";\nimport { buttonVariants } from \"../button/button\";\nimport { cn } from \"../cn\";\nimport { ExternalGlyph } from \"../glyphs\";\n\nexport interface Action {\n /** Where it leads. An absolute URL opens in a new tab, with the external mark. */\n href: string;\n /** Its words (the accessible name, and the tooltip of an icon action). */\n label: string;\n /** Its icon (a signature icon): decorative. Required by `variant=\"icons\"`. */\n icon?: React.ReactNode;\n}\n\nexport type ActionBarProps = React.HTMLAttributes<HTMLUListElement> & {\n /** The actions, in order of importance. */\n actions: readonly Action[];\n /**\n * `buttons` (with their words) or `icons` (icon buttons, the words in a tooltip).\n * @default \"buttons\"\n */\n variant?: \"buttons\" | \"icons\";\n /**\n * The first action as the primary button (the one action a block is about); the others stay secondary.\n * @default false\n */\n primaryFirst?: boolean;\n /**\n * The buttons' size: `sm` in a card, `md` in a section, `lg` on a hero or a closing call.\n * @default \"md\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\n /** What the actions are about (`Talk about Krizaka Java`): the list's accessible name. */\n label?: string;\n /** The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise. */\n linkAs?: LinkComponent;\n};\n\n/** A row of link actions: buttons with their words, or icon buttons with a tooltip. */\nexport function ActionBar({ actions, variant = \"buttons\", primaryFirst = false, size = \"md\", label, linkAs, className, ...props }: ActionBarProps) {\n const icons = variant === \"icons\";\n return (\n <ul className={cn(\"kz-actions\", className)} data-variant={icons ? \"icons\" : undefined} aria-label={label} {...props}>\n {actions.map((a, i) => {\n const external = isExternal(a.href);\n return (\n <li key={a.href}>\n {icons ? (\n <BlockLink\n href={a.href}\n linkAs={linkAs}\n external={external}\n aria-label={a.label}\n data-tip={a.label}\n className={buttonVariants({ variant: \"ghost\", size: \"icon\", shape: \"cut\", className: size === \"sm\" ? \"h-9 w-9\" : undefined })}\n >\n {a.icon}\n </BlockLink>\n ) : (\n <BlockLink\n href={a.href}\n linkAs={linkAs}\n external={external}\n className={buttonVariants({ variant: primaryFirst && i === 0 ? \"primary\" : \"secondary\", size, shape: \"cut\", className: \"gap-2\" })}\n >\n {a.icon}\n {a.label}\n {external && <ExternalGlyph className=\"h-3 w-3 opacity-70\" />}\n </BlockLink>\n )}\n </li>\n );\n })}\n </ul>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAqDc,cAWA,YAXA;AATP,SAAS,UAAU,EAAE,SAAS,UAAU,WAAW,eAAe,OAAO,OAAO,MAAM,OAAO,QAAQ,WAAW,GAAG,MAAM,GAAmB;AACjJ,QAAM,QAAQ,YAAY;AAC1B,SACE,oBAAC,QAAG,WAAW,GAAG,cAAc,SAAS,GAAG,gBAAc,QAAQ,UAAU,QAAW,cAAY,OAAQ,GAAG,OAC3G,kBAAQ,IAAI,CAAC,GAAG,MAAM;AACrB,UAAM,WAAW,WAAW,EAAE,IAAI;AAClC,WACE,oBAAC,QACE,kBACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,EAAE;AAAA,QACR;AAAA,QACA;AAAA,QACA,cAAY,EAAE;AAAA,QACd,YAAU,EAAE;AAAA,QACZ,WAAW,eAAe,EAAE,SAAS,SAAS,MAAM,QAAQ,OAAO,OAAO,WAAW,SAAS,OAAO,YAAY,OAAU,CAAC;AAAA,QAE3H,YAAE;AAAA;AAAA,IACL,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,EAAE;AAAA,QACR;AAAA,QACA;AAAA,QACA,WAAW,eAAe,EAAE,SAAS,gBAAgB,MAAM,IAAI,YAAY,aAAa,MAAM,OAAO,OAAO,WAAW,QAAQ,CAAC;AAAA,QAE/H;AAAA,YAAE;AAAA,UACF,EAAE;AAAA,UACF,YAAY,oBAAC,iBAAc,WAAU,sBAAqB;AAAA;AAAA;AAAA,IAC7D,KAtBK,EAAE,IAwBX;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
@@ -9,6 +9,7 @@ declare const appShell: tailwind_variants.TVReturnType<{
9
9
  header?: tailwind_variants.ClassValue;
10
10
  main?: tailwind_variants.ClassValue;
11
11
  nav?: tailwind_variants.ClassValue;
12
+ search?: tailwind_variants.ClassValue;
12
13
  title?: tailwind_variants.ClassValue;
13
14
  group?: tailwind_variants.ClassValue;
14
15
  root?: tailwind_variants.ClassValue;
@@ -16,6 +17,9 @@ declare const appShell: tailwind_variants.TVReturnType<{
16
17
  overlay?: tailwind_variants.ClassValue;
17
18
  brand?: tailwind_variants.ClassValue;
18
19
  itemLabel?: tailwind_variants.ClassValue;
20
+ itemHint?: tailwind_variants.ClassValue;
21
+ searchLabel?: tailwind_variants.ClassValue;
22
+ searchKeys?: tailwind_variants.ClassValue;
19
23
  actions?: tailwind_variants.ClassValue;
20
24
  sidebar?: tailwind_variants.ClassValue;
21
25
  item?: tailwind_variants.ClassValue;
@@ -32,6 +36,7 @@ declare const appShell: tailwind_variants.TVReturnType<{
32
36
  header?: tailwind_variants.ClassValue;
33
37
  main?: tailwind_variants.ClassValue;
34
38
  nav?: tailwind_variants.ClassValue;
39
+ search?: tailwind_variants.ClassValue;
35
40
  title?: tailwind_variants.ClassValue;
36
41
  group?: tailwind_variants.ClassValue;
37
42
  root?: tailwind_variants.ClassValue;
@@ -39,6 +44,9 @@ declare const appShell: tailwind_variants.TVReturnType<{
39
44
  overlay?: tailwind_variants.ClassValue;
40
45
  brand?: tailwind_variants.ClassValue;
41
46
  itemLabel?: tailwind_variants.ClassValue;
47
+ itemHint?: tailwind_variants.ClassValue;
48
+ searchLabel?: tailwind_variants.ClassValue;
49
+ searchKeys?: tailwind_variants.ClassValue;
42
50
  actions?: tailwind_variants.ClassValue;
43
51
  sidebar?: tailwind_variants.ClassValue;
44
52
  item?: tailwind_variants.ClassValue;
@@ -57,6 +65,7 @@ declare const appShell: tailwind_variants.TVReturnType<{
57
65
  group: string;
58
66
  item: string;
59
67
  itemLabel: string;
68
+ itemHint: string;
60
69
  itemBadge: string;
61
70
  footer: string;
62
71
  collapse: string;
@@ -64,6 +73,9 @@ declare const appShell: tailwind_variants.TVReturnType<{
64
73
  header: string;
65
74
  menuButton: string;
66
75
  title: string;
76
+ search: string;
77
+ searchLabel: string;
78
+ searchKeys: string;
67
79
  actions: string;
68
80
  main: string;
69
81
  }, undefined, {
@@ -74,6 +86,7 @@ declare const appShell: tailwind_variants.TVReturnType<{
74
86
  header?: tailwind_variants.ClassValue;
75
87
  main?: tailwind_variants.ClassValue;
76
88
  nav?: tailwind_variants.ClassValue;
89
+ search?: tailwind_variants.ClassValue;
77
90
  title?: tailwind_variants.ClassValue;
78
91
  group?: tailwind_variants.ClassValue;
79
92
  root?: tailwind_variants.ClassValue;
@@ -81,6 +94,9 @@ declare const appShell: tailwind_variants.TVReturnType<{
81
94
  overlay?: tailwind_variants.ClassValue;
82
95
  brand?: tailwind_variants.ClassValue;
83
96
  itemLabel?: tailwind_variants.ClassValue;
97
+ itemHint?: tailwind_variants.ClassValue;
98
+ searchLabel?: tailwind_variants.ClassValue;
99
+ searchKeys?: tailwind_variants.ClassValue;
84
100
  actions?: tailwind_variants.ClassValue;
85
101
  sidebar?: tailwind_variants.ClassValue;
86
102
  item?: tailwind_variants.ClassValue;
@@ -99,6 +115,7 @@ declare const appShell: tailwind_variants.TVReturnType<{
99
115
  group: string;
100
116
  item: string;
101
117
  itemLabel: string;
118
+ itemHint: string;
102
119
  itemBadge: string;
103
120
  footer: string;
104
121
  collapse: string;
@@ -106,6 +123,9 @@ declare const appShell: tailwind_variants.TVReturnType<{
106
123
  header: string;
107
124
  menuButton: string;
108
125
  title: string;
126
+ search: string;
127
+ searchLabel: string;
128
+ searchKeys: string;
109
129
  actions: string;
110
130
  main: string;
111
131
  }, tailwind_variants.TVReturnTypeLike<unknown, {
@@ -118,6 +138,7 @@ declare const appShell: tailwind_variants.TVReturnType<{
118
138
  group: string;
119
139
  item: string;
120
140
  itemLabel: string;
141
+ itemHint: string;
121
142
  itemBadge: string;
122
143
  footer: string;
123
144
  collapse: string;
@@ -125,6 +146,9 @@ declare const appShell: tailwind_variants.TVReturnType<{
125
146
  header: string;
126
147
  menuButton: string;
127
148
  title: string;
149
+ search: string;
150
+ searchLabel: string;
151
+ searchKeys: string;
128
152
  actions: string;
129
153
  main: string;
130
154
  }>>;
@@ -137,9 +161,15 @@ type AppShellRootProps = React.ComponentProps<"div"> & {
137
161
  onCollapsedChange?: (collapsed: boolean) => void;
138
162
  /** The words of the "skip to content" link (`Skip to content`), the first tab stop; it lands on `AppShell.Main`. Without it, no link. */
139
163
  skipLabel?: string;
164
+ /**
165
+ * The shortcut that folds and unfolds the sidebar (a combination: `mod+b` is ⌘B on a Mac, Ctrl+B elsewhere), or `false`
166
+ * for none.
167
+ * @default "mod+b"
168
+ */
169
+ collapseShortcut?: string | false;
140
170
  };
141
171
  /** The shell: holds the collapse (desktop) and the drawer (phone) state. Children: Sidebar, then Body. */
142
- declare function AppShellRoot({ defaultCollapsed, collapsed: controlled, onCollapsedChange, skipLabel, className, children, ...props }: AppShellRootProps): React.JSX.Element;
172
+ declare function AppShellRoot({ defaultCollapsed, collapsed: controlled, onCollapsedChange, skipLabel, collapseShortcut, className, children, ...props }: AppShellRootProps): React.JSX.Element;
143
173
  type AppShellSidebarProps = Omit<React.ComponentProps<"nav">, "children"> & {
144
174
  /** The navigation's accessible name (`Studio`, `Administration`). */
145
175
  label: string;
@@ -171,13 +201,18 @@ type AppShellItemProps = Omit<React.ComponentProps<"a">, "children"> & {
171
201
  current?: boolean;
172
202
  /** A count beside it (unread, pending): a number or a few characters. */
173
203
  badge?: React.ReactNode;
204
+ /**
205
+ * A keyboard shortcut that goes to it: a sequence (`g d`: G then D) or a combination (`mod+1`). It clicks the item, so a
206
+ * router link navigates. The keys are shown on hover and focus when the sidebar is open.
207
+ */
208
+ shortcut?: string;
174
209
  /** Renders your link (Next's `Link`) with the item's look: pass it as the only child. */
175
210
  asChild?: boolean;
176
211
  /** Your link element when `asChild`. */
177
212
  children?: React.ReactElement;
178
213
  };
179
214
  /** A destination of the sidebar: icon, words, a count. */
180
- declare function AppShellItem({ icon, label, current, badge, asChild, children, className, ...props }: AppShellItemProps): React.JSX.Element;
215
+ declare function AppShellItem({ icon, label, current, badge, shortcut, asChild, children, className, ...props }: AppShellItemProps): React.JSX.Element;
181
216
  /** The column right of the sidebar: Header, then Main. */
182
217
  declare function AppShellBody({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
183
218
  type AppShellHeaderProps = Omit<React.ComponentProps<"header">, "title"> & {
@@ -190,6 +225,19 @@ type AppShellHeaderProps = Omit<React.ComponentProps<"header">, "title"> & {
190
225
  };
191
226
  /** The top of the screen: the drawer's button (phone), the title, the actions. Sticky. */
192
227
  declare function AppShellHeader({ title, menuLabel, actions, className, children, ...props }: AppShellHeaderProps): React.JSX.Element;
228
+ type AppShellSearchProps = Omit<React.ComponentProps<"button">, "children" | "onClick"> & {
229
+ /** The words ("Search", "Search creators"): the accessible name, shown beside the keys on a desktop. */
230
+ label: string;
231
+ /** Called when the button is pressed or the shortcut is typed: open your command palette (`CommandDialog`) here. */
232
+ onOpen: () => void;
233
+ /**
234
+ * The shortcut that opens it (a combination); shown on its keys.
235
+ * @default "mod+k"
236
+ */
237
+ shortcut?: string;
238
+ };
239
+ /** The header's search: a button that looks like a field (a magnifier, its words, ⌘K) and opens the app's command palette. */
240
+ declare function AppShellSearch({ label, onOpen, shortcut, className, ...props }: AppShellSearchProps): React.JSX.Element;
193
241
  /** The screen's content. */
194
242
  declare function AppShellMain({ className, ...props }: React.ComponentProps<"main">): React.JSX.Element;
195
243
  declare const AppShell: {
@@ -199,7 +247,37 @@ declare const AppShell: {
199
247
  Item: typeof AppShellItem;
200
248
  Body: typeof AppShellBody;
201
249
  Header: typeof AppShellHeader;
250
+ Search: typeof AppShellSearch;
202
251
  Main: typeof AppShellMain;
203
252
  };
204
253
 
205
- export { AppShell, AppShellBody, AppShellGroup, type AppShellGroupProps, AppShellHeader, type AppShellHeaderProps, AppShellItem, type AppShellItemProps, AppShellMain, AppShellRoot, type AppShellRootProps, AppShellSidebar, type AppShellSidebarProps, appShell };
254
+ type ShortcutMap = Readonly<Record<string, ((event: KeyboardEvent) => void) | undefined>>;
255
+ type Combo = {
256
+ key: string;
257
+ mod: boolean;
258
+ ctrl: boolean;
259
+ alt: boolean;
260
+ shift: boolean;
261
+ meta: boolean;
262
+ };
263
+ /** `"mod+shift+k"` → its parts. A lone `+` key is written `plus`. */
264
+ declare function parseCombo(combo: string): Combo;
265
+ /** Whether a key event is this combination: its modifiers exactly (`mod` is ⌘ or Ctrl by platform), then its key. */
266
+ declare function matchesCombo(event: Pick<KeyboardEvent, "key" | "metaKey" | "ctrlKey" | "altKey" | "shiftKey">, combo: string, apple?: boolean): boolean;
267
+ /** The keys of a shortcut to show on a keycap: `["⌘", "K"]` on a Mac, `["Ctrl", "K"]` elsewhere; a sequence `g d` is `["G", "D"]`. */
268
+ declare function formatShortcut(shortcut: string, apple?: boolean): string[];
269
+ /** Whether the person is on an Apple device — `false` on the server and in the first client render (no mismatch), then right. */
270
+ declare function useApple(): boolean;
271
+ /** The `aria-keyshortcuts` of a combination (`Control+K`, `Meta+K` on a Mac); a sequence has none (it is not a chord). */
272
+ declare function ariaKeyShortcuts(shortcut: string, apple?: boolean): string | undefined;
273
+ /**
274
+ * Binds shortcuts for as long as the component lives (`enabled` turns them off). Each key is a combination or a sequence,
275
+ * each value runs when it is pressed; the handler may change on every render. A shortcut that fires is `preventDefault`ed.
276
+ * A sequence waits `timeout` ms for its next key.
277
+ */
278
+ declare function useShortcuts(map: ShortcutMap, { enabled, timeout }?: {
279
+ enabled?: boolean;
280
+ timeout?: number;
281
+ }): void;
282
+
283
+ export { AppShell, AppShellBody, AppShellGroup, type AppShellGroupProps, AppShellHeader, type AppShellHeaderProps, AppShellItem, type AppShellItemProps, AppShellMain, AppShellRoot, type AppShellRootProps, AppShellSearch, type AppShellSearchProps, AppShellSidebar, type AppShellSidebarProps, type ShortcutMap, appShell, ariaKeyShortcuts, formatShortcut, matchesCombo, parseCombo, useApple, useShortcuts };