@krizaka/ui 3.64.1 → 3.66.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 (388) hide show
  1. package/README.md +3 -0
  2. package/dist/account-menu.d.ts +7 -3
  3. package/dist/account-menu.js +14 -10
  4. package/dist/account-menu.js.map +1 -1
  5. package/dist/account-settings.js +1 -1
  6. package/dist/action-bar.js +1 -1
  7. package/dist/app-frame/server.d.ts +123 -0
  8. package/dist/app-frame/server.js +109 -0
  9. package/dist/app-frame/server.js.map +1 -0
  10. package/dist/app-frame.d.ts +210 -0
  11. package/dist/app-frame.js +220 -0
  12. package/dist/app-frame.js.map +1 -0
  13. package/dist/app-header/search.js +1 -1
  14. package/dist/app-header.d.ts +3 -3
  15. package/dist/app-shell.js +1 -1
  16. package/dist/argument-card.js +2 -2
  17. package/dist/audio-player.js +1 -1
  18. package/dist/{chunk-5QEXOGO2.js → chunk-6BMKLAZ7.js} +1 -1
  19. package/dist/{chunk-XCBVFMNV.js.map → chunk-6BMKLAZ7.js.map} +1 -1
  20. package/dist/{chunk-SHBYNQFS.js → chunk-7DYZTEE3.js} +1 -1
  21. package/dist/{chunk-SHBYNQFS.js.map → chunk-7DYZTEE3.js.map} +1 -1
  22. package/dist/{chunk-YCZ7N6Q6.js → chunk-7MQNG35Q.js} +2 -2
  23. package/dist/{chunk-XCBVFMNV.js → chunk-C57KK5VB.js} +7 -2
  24. package/dist/chunk-C57KK5VB.js.map +1 -0
  25. package/dist/{chunk-VB7MWE2N.js → chunk-DSDFXPL6.js} +2 -2
  26. package/dist/{chunk-P7GZR5CU.js → chunk-GFRUTPGG.js} +1 -1
  27. package/dist/{chunk-P7GZR5CU.js.map → chunk-GFRUTPGG.js.map} +1 -1
  28. package/dist/{chunk-4GQH27IT.js → chunk-GW5EI7MI.js} +2 -2
  29. package/dist/{chunk-F6JTHPHE.js → chunk-I6EOLPSH.js} +2 -2
  30. package/dist/chunk-NG6G6V5E.js +33 -0
  31. package/dist/{chunk-5QEXOGO2.js.map → chunk-NG6G6V5E.js.map} +1 -1
  32. package/dist/{chunk-CPA5CF35.js → chunk-PGBF3UBX.js} +1 -1
  33. package/dist/{chunk-CPA5CF35.js.map → chunk-PGBF3UBX.js.map} +1 -1
  34. package/dist/{chunk-BG5APGX6.js → chunk-Q5DYWQ6S.js} +4 -4
  35. package/dist/{chunk-RCKXJEDQ.js → chunk-ST5P5HNI.js} +2 -2
  36. package/dist/code-block.js +1 -1
  37. package/dist/collection-switcher.d.ts +68 -0
  38. package/dist/collection-switcher.js +131 -0
  39. package/dist/collection-switcher.js.map +1 -0
  40. package/dist/combobox.js +2 -2
  41. package/dist/cover-hero.js +1 -1
  42. package/dist/data-table.js +4 -4
  43. package/dist/date-picker.js +1 -1
  44. package/dist/decision-list.js +1 -1
  45. package/dist/default-avatar-D9kiSFNB.d.ts +26 -0
  46. package/dist/desktop-window.d.ts +223 -0
  47. package/dist/desktop-window.js +261 -0
  48. package/dist/desktop-window.js.map +1 -0
  49. package/dist/docs-layout.js +1 -1
  50. package/dist/entity-header.d.ts +92 -0
  51. package/dist/entity-header.js +165 -0
  52. package/dist/entity-header.js.map +1 -0
  53. package/dist/file-upload.d.ts +2 -2
  54. package/dist/file-upload.js +1 -1
  55. package/dist/filter-bar.d.ts +3 -3
  56. package/dist/filter-bar.js +2 -2
  57. package/dist/genui.js +4 -4
  58. package/dist/language-switch.d.ts +9 -9
  59. package/dist/link-card.js +2 -2
  60. package/dist/list.js +1 -1
  61. package/dist/media-capture.js +1 -1
  62. package/dist/native.d.ts +337 -4
  63. package/dist/native.js +2841 -2111
  64. package/dist/native.js.map +1 -1
  65. package/dist/opening-hours.js +1 -1
  66. package/dist/page-hero.js +1 -1
  67. package/dist/pagination.js +1 -1
  68. package/dist/photo-grid.js +1 -1
  69. package/dist/pricing-page.js.map +1 -1
  70. package/dist/qr-code.d.ts +42 -0
  71. package/dist/qr-code.js +350 -0
  72. package/dist/qr-code.js.map +1 -0
  73. package/dist/radio-group.js +1 -1
  74. package/dist/rail-nav.js +1 -1
  75. package/dist/retro-tv.js +2 -2
  76. package/dist/search-field.js +2 -2
  77. package/dist/service-card.js +1 -1
  78. package/dist/shop-composer.js +1 -1
  79. package/dist/shop-composer.js.map +1 -1
  80. package/dist/site-cahier.js +1 -1
  81. package/dist/status-chip.js +1 -1
  82. package/dist/tag-input.js +2 -2
  83. package/dist/terminal-replay.js +1 -1
  84. package/dist/theme.d.ts +3 -1
  85. package/dist/theme.js +4 -0
  86. package/dist/theme.js.map +1 -1
  87. package/dist/tree-view.js +1 -1
  88. package/dist/video-player.js +2 -2
  89. package/dist/virtual.d.ts +3 -3
  90. package/package.json +91 -6
  91. package/registry/account-menu.json +22 -8
  92. package/registry/account-settings.json +2 -2
  93. package/registry/achievement.json +1 -1
  94. package/registry/action-bar.json +2 -2
  95. package/registry/activity-feed.json +1 -1
  96. package/registry/agenda.json +1 -1
  97. package/registry/alert.json +1 -1
  98. package/registry/analysis-report.json +1 -1
  99. package/registry/anatomy-plate.json +1 -1
  100. package/registry/app-frame.json +564 -0
  101. package/registry/app-header.json +2 -2
  102. package/registry/app-shell.json +2 -2
  103. package/registry/argument-card.json +2 -2
  104. package/registry/audio-player.json +2 -2
  105. package/registry/auth-layout.json +1 -1
  106. package/registry/avatar.json +1 -1
  107. package/registry/badge.json +1 -1
  108. package/registry/bird-plate.json +1 -1
  109. package/registry/button.json +1 -1
  110. package/registry/captcha.json +1 -1
  111. package/registry/card-grid.json +1 -1
  112. package/registry/card.json +1 -1
  113. package/registry/catalogue-page.json +1 -1
  114. package/registry/changelog-page.json +1 -1
  115. package/registry/chapter.json +1 -1
  116. package/registry/chat.json +1 -1
  117. package/registry/checkbox.json +1 -1
  118. package/registry/chip-link.json +1 -1
  119. package/registry/chip-row.json +1 -1
  120. package/registry/chip.json +1 -1
  121. package/registry/choice-grid.json +1 -1
  122. package/registry/code-block.json +2 -2
  123. package/registry/collection-switcher.json +436 -0
  124. package/registry/combobox.json +2 -2
  125. package/registry/command.json +1 -1
  126. package/registry/comparison-table.json +1 -1
  127. package/registry/component-page.json +1 -1
  128. package/registry/confirm-button.json +1 -1
  129. package/registry/contact-page.json +1 -1
  130. package/registry/continue-prompt.json +1 -1
  131. package/registry/countdown.json +1 -1
  132. package/registry/cover-hero.json +2 -2
  133. package/registry/cta-panel.json +1 -1
  134. package/registry/dashboard-layout.json +1 -1
  135. package/registry/data-table.json +2 -2
  136. package/registry/date-picker.json +4 -4
  137. package/registry/decision-list.json +2 -2
  138. package/registry/description-list.json +1 -1
  139. package/registry/desktop-window.json +407 -0
  140. package/registry/detail-layout.json +1 -1
  141. package/registry/dialog.json +1 -1
  142. package/registry/docs-article-page.json +1 -1
  143. package/registry/docs-hub-page.json +1 -1
  144. package/registry/docs-layout.json +2 -2
  145. package/registry/docs-nav.json +1 -1
  146. package/registry/document-viewer.json +1 -1
  147. package/registry/doodle.json +1 -1
  148. package/registry/drop-overlay.json +1 -1
  149. package/registry/dropdown-menu.json +1 -1
  150. package/registry/elephant.json +2 -2
  151. package/registry/embed-facade.json +1 -1
  152. package/registry/empty-state.json +1 -1
  153. package/registry/engine-flow.json +1 -1
  154. package/registry/entity-header.json +502 -0
  155. package/registry/environment-notice.json +1 -1
  156. package/registry/error-page.json +1 -1
  157. package/registry/examples/app-frame/admin.d.ts +4 -0
  158. package/registry/examples/app-frame/admin.js +32 -0
  159. package/registry/examples/app-frame/admin.tsx +33 -0
  160. package/registry/examples/app-frame/app.d.ts +4 -0
  161. package/registry/examples/app-frame/app.js +53 -0
  162. package/registry/examples/app-frame/app.tsx +56 -0
  163. package/registry/examples/collection-switcher/entity.d.ts +4 -0
  164. package/registry/examples/collection-switcher/entity.js +17 -0
  165. package/registry/examples/collection-switcher/entity.tsx +13 -0
  166. package/registry/examples/collection-switcher/list.d.ts +4 -0
  167. package/registry/examples/collection-switcher/list.js +32 -0
  168. package/registry/examples/collection-switcher/list.tsx +27 -0
  169. package/registry/examples/collection-switcher/native/list.d.ts +4 -0
  170. package/registry/examples/collection-switcher/native/list.dark.png +0 -0
  171. package/registry/examples/collection-switcher/native/list.js +18 -0
  172. package/registry/examples/collection-switcher/native/list.light.png +0 -0
  173. package/registry/examples/collection-switcher/native/list.tsx +14 -0
  174. package/registry/examples/collection-switcher/tree.d.ts +4 -0
  175. package/registry/examples/collection-switcher/tree.js +19 -0
  176. package/registry/examples/collection-switcher/tree.tsx +15 -0
  177. package/registry/examples/desktop-window/library.d.ts +4 -0
  178. package/registry/examples/desktop-window/library.js +49 -0
  179. package/registry/examples/desktop-window/library.tsx +58 -0
  180. package/registry/examples/entity-header/basic.d.ts +4 -0
  181. package/registry/examples/entity-header/basic.js +31 -0
  182. package/registry/examples/entity-header/basic.tsx +25 -0
  183. package/registry/examples/entity-header/native/basic.d.ts +4 -0
  184. package/registry/examples/entity-header/native/basic.dark.png +0 -0
  185. package/registry/examples/entity-header/native/basic.js +17 -0
  186. package/registry/examples/entity-header/native/basic.light.png +0 -0
  187. package/registry/examples/entity-header/native/basic.tsx +12 -0
  188. package/registry/examples/form-flow/native/signup.d.ts +4 -0
  189. package/registry/examples/form-flow/native/signup.dark.png +0 -0
  190. package/registry/examples/form-flow/native/signup.js +26 -0
  191. package/registry/examples/form-flow/native/signup.light.png +0 -0
  192. package/registry/examples/form-flow/native/signup.tsx +23 -0
  193. package/registry/examples/grid/native/columns.d.ts +4 -0
  194. package/registry/examples/grid/native/columns.dark.png +0 -0
  195. package/registry/examples/grid/native/columns.js +23 -0
  196. package/registry/examples/grid/native/columns.light.png +0 -0
  197. package/registry/examples/grid/native/columns.tsx +20 -0
  198. package/registry/examples/grid/native/photos.d.ts +4 -0
  199. package/registry/examples/grid/native/photos.dark.png +0 -0
  200. package/registry/examples/grid/native/photos.js +14 -0
  201. package/registry/examples/grid/native/photos.light.png +0 -0
  202. package/registry/examples/grid/native/photos.tsx +18 -0
  203. package/registry/examples/grid/native/stats.d.ts +4 -0
  204. package/registry/examples/grid/native/stats.dark.png +0 -0
  205. package/registry/examples/grid/native/stats.js +22 -0
  206. package/registry/examples/grid/native/stats.light.png +0 -0
  207. package/registry/examples/grid/native/stats.tsx +24 -0
  208. package/registry/examples/list-detail/native/inbox.d.ts +4 -0
  209. package/registry/examples/list-detail/native/inbox.dark.png +0 -0
  210. package/registry/examples/list-detail/native/inbox.js +35 -0
  211. package/registry/examples/list-detail/native/inbox.light.png +0 -0
  212. package/registry/examples/list-detail/native/inbox.tsx +35 -0
  213. package/registry/examples/qr-code/basic.d.ts +4 -0
  214. package/registry/examples/qr-code/basic.js +11 -0
  215. package/registry/examples/qr-code/basic.tsx +6 -0
  216. package/registry/examples/qr-code/calendar-feed.d.ts +4 -0
  217. package/registry/examples/qr-code/calendar-feed.js +24 -0
  218. package/registry/examples/qr-code/calendar-feed.tsx +18 -0
  219. package/registry/examples/qr-code/native/calendar-feed.d.ts +4 -0
  220. package/registry/examples/qr-code/native/calendar-feed.dark.png +0 -0
  221. package/registry/examples/qr-code/native/calendar-feed.js +25 -0
  222. package/registry/examples/qr-code/native/calendar-feed.light.png +0 -0
  223. package/registry/examples/qr-code/native/calendar-feed.tsx +19 -0
  224. package/registry/examples/screen/native/dashboard.d.ts +4 -0
  225. package/registry/examples/screen/native/dashboard.dark.png +0 -0
  226. package/registry/examples/screen/native/dashboard.js +48 -0
  227. package/registry/examples/screen/native/dashboard.light.png +0 -0
  228. package/registry/examples/screen/native/dashboard.tsx +52 -0
  229. package/registry/examples/screen/native/settings-home.d.ts +4 -0
  230. package/registry/examples/screen/native/settings-home.dark.png +0 -0
  231. package/registry/examples/screen/native/settings-home.js +26 -0
  232. package/registry/examples/screen/native/settings-home.light.png +0 -0
  233. package/registry/examples/screen/native/settings-home.tsx +25 -0
  234. package/registry/examples/shop/hero-tv.js +1 -1
  235. package/registry/examples/shop/hero-tv.tsx +1 -1
  236. package/registry/examples/state-screen/native/empty.d.ts +4 -0
  237. package/registry/examples/state-screen/native/empty.dark.png +0 -0
  238. package/registry/examples/state-screen/native/empty.js +12 -0
  239. package/registry/examples/state-screen/native/empty.light.png +0 -0
  240. package/registry/examples/state-screen/native/empty.tsx +11 -0
  241. package/registry/examples/state-screen/native/error.d.ts +4 -0
  242. package/registry/examples/state-screen/native/error.dark.png +0 -0
  243. package/registry/examples/state-screen/native/error.js +21 -0
  244. package/registry/examples/state-screen/native/error.light.png +0 -0
  245. package/registry/examples/state-screen/native/error.tsx +17 -0
  246. package/registry/examples/state-screen/native/offline.d.ts +4 -0
  247. package/registry/examples/state-screen/native/offline.dark.png +0 -0
  248. package/registry/examples/state-screen/native/offline.js +15 -0
  249. package/registry/examples/state-screen/native/offline.light.png +0 -0
  250. package/registry/examples/state-screen/native/offline.tsx +12 -0
  251. package/registry/field.json +1 -1
  252. package/registry/file-upload.json +2 -2
  253. package/registry/filter-bar.json +2 -2
  254. package/registry/flock.json +1 -1
  255. package/registry/footnote.json +1 -1
  256. package/registry/force-update-screen.json +1 -1
  257. package/registry/form-flow.json +152 -0
  258. package/registry/form.json +1 -1
  259. package/registry/gallery-page.json +1 -1
  260. package/registry/genui.json +1 -1
  261. package/registry/glossary-term.json +1 -1
  262. package/registry/glossary.json +1 -1
  263. package/registry/glow-card.json +1 -1
  264. package/registry/goal-gauge.json +1 -1
  265. package/registry/grade-stamp.json +1 -1
  266. package/registry/grid.json +262 -0
  267. package/registry/how-it-works-page.json +1 -1
  268. package/registry/image-cropper.json +1 -1
  269. package/registry/index.json +408 -12
  270. package/registry/iso.json +1 -1
  271. package/registry/kanban.json +1 -1
  272. package/registry/kbd.json +1 -1
  273. package/registry/kind-config-editor.json +1 -1
  274. package/registry/kpi-explained.json +1 -1
  275. package/registry/landing-page.json +1 -1
  276. package/registry/landscape.json +1 -1
  277. package/registry/language-switch.json +1 -1
  278. package/registry/legal-page.json +1 -1
  279. package/registry/link-card.json +2 -2
  280. package/registry/list-detail.json +188 -0
  281. package/registry/list.json +2 -2
  282. package/registry/loader.json +1 -1
  283. package/registry/longform-page.json +1 -1
  284. package/registry/maintenance-screen.json +1 -1
  285. package/registry/map.json +2 -2
  286. package/registry/margin-layout.json +1 -1
  287. package/registry/markdown.json +1 -1
  288. package/registry/marketing-layout.json +1 -1
  289. package/registry/marquee.json +1 -1
  290. package/registry/mascot-quote.json +1 -1
  291. package/registry/mascot-state.json +1 -1
  292. package/registry/mascots.json +1 -1
  293. package/registry/match-dialog.json +1 -1
  294. package/registry/media-capture.json +2 -2
  295. package/registry/media-gallery.json +1 -1
  296. package/registry/media-grid.json +1 -1
  297. package/registry/meta-row.json +1 -1
  298. package/registry/meter.json +1 -1
  299. package/registry/nav-bar.json +2 -2
  300. package/registry/next-actions.json +1 -1
  301. package/registry/notification-preferences.json +1 -1
  302. package/registry/number-ticker.json +1 -1
  303. package/registry/onboarding.json +3 -0
  304. package/registry/opening-hours.json +2 -2
  305. package/registry/page-header.json +1 -1
  306. package/registry/page-hero.json +2 -2
  307. package/registry/page-index.json +1 -1
  308. package/registry/page.json +1 -1
  309. package/registry/pagination.json +2 -2
  310. package/registry/photo-grid.json +2 -2
  311. package/registry/pointer-light.json +1 -1
  312. package/registry/popover.json +1 -1
  313. package/registry/pricing-page.json +2 -2
  314. package/registry/product-page.json +1 -1
  315. package/registry/profile-card.json +1 -1
  316. package/registry/progress.json +1 -1
  317. package/registry/promise-card.json +1 -1
  318. package/registry/qr-code.json +343 -0
  319. package/registry/quota-meter.json +1 -1
  320. package/registry/radio-group.json +2 -2
  321. package/registry/rail-nav.json +3 -3
  322. package/registry/recipes.json +1 -1
  323. package/registry/retro-tv.json +1 -1
  324. package/registry/reviews.json +1 -1
  325. package/registry/router.json +1 -1
  326. package/registry/screen.json +68 -4
  327. package/registry/scroll-stage.json +1 -1
  328. package/registry/search-field.json +2 -2
  329. package/registry/section-backdrop.json +1 -1
  330. package/registry/separator.json +1 -1
  331. package/registry/service-card.json +2 -2
  332. package/registry/settings-layout.json +5 -2
  333. package/registry/shop-composer.json +2 -2
  334. package/registry/shop.json +3 -3
  335. package/registry/showcase.json +1 -1
  336. package/registry/signature.json +1 -1
  337. package/registry/site-cahier.json +1 -1
  338. package/registry/site-footer.json +4 -4
  339. package/registry/sites.json +1 -1
  340. package/registry/skeleton.json +1 -1
  341. package/registry/skip-link.json +1 -1
  342. package/registry/slider.json +1 -1
  343. package/registry/slot-picker.json +1 -1
  344. package/registry/slot.json +1 -1
  345. package/registry/specimen-tag.json +1 -1
  346. package/registry/speed-lines.json +1 -1
  347. package/registry/spinner.json +1 -1
  348. package/registry/split-view.json +1 -1
  349. package/registry/stage-banner.json +1 -1
  350. package/registry/stat.json +1 -1
  351. package/registry/state-screen.json +224 -0
  352. package/registry/status-chip.json +2 -2
  353. package/registry/status-page.json +1 -1
  354. package/registry/step-progress.json +1 -1
  355. package/registry/step-showcase.json +1 -1
  356. package/registry/stepper.json +1 -1
  357. package/registry/sticky-action.json +1 -1
  358. package/registry/stuck.json +1 -1
  359. package/registry/swipe-deck.json +1 -1
  360. package/registry/switch.json +1 -1
  361. package/registry/tabs.json +1 -1
  362. package/registry/tag-input.json +1 -1
  363. package/registry/tag-selector.json +1 -1
  364. package/registry/taped-photo.json +1 -1
  365. package/registry/terminal-replay.json +2 -2
  366. package/registry/text-style.json +1 -1
  367. package/registry/theme.json +3 -3
  368. package/registry/toast.json +1 -1
  369. package/registry/toc.json +1 -1
  370. package/registry/tooltip.json +1 -1
  371. package/registry/tree-view.json +2 -2
  372. package/registry/update-prompt.json +1 -1
  373. package/registry/upload-queue.json +1 -1
  374. package/registry/usage.json +1 -1
  375. package/registry/verified-badge.json +1 -1
  376. package/registry/versus-card.json +1 -1
  377. package/registry/vertical-video.json +1 -1
  378. package/registry/video-player.json +2 -2
  379. package/registry/video-trimmer.json +1 -1
  380. package/registry/virtual.json +1 -1
  381. package/registry/wall.json +1 -1
  382. package/registry/waveform.json +1 -1
  383. /package/dist/{chunk-YCZ7N6Q6.js.map → chunk-7MQNG35Q.js.map} +0 -0
  384. /package/dist/{chunk-VB7MWE2N.js.map → chunk-DSDFXPL6.js.map} +0 -0
  385. /package/dist/{chunk-4GQH27IT.js.map → chunk-GW5EI7MI.js.map} +0 -0
  386. /package/dist/{chunk-F6JTHPHE.js.map → chunk-I6EOLPSH.js.map} +0 -0
  387. /package/dist/{chunk-BG5APGX6.js.map → chunk-Q5DYWQ6S.js.map} +0 -0
  388. /package/dist/{chunk-RCKXJEDQ.js.map → chunk-ST5P5HNI.js.map} +0 -0
@@ -0,0 +1,436 @@
1
+ {
2
+ "name": "collection-switcher",
3
+ "type": "primitive",
4
+ "title": "Collection switcher",
5
+ "summary": "Moves between the collections of a workspace, flat or nested, with the default one marked and never removable; in entity mode, a compact switcher for a shop or a studio.",
6
+ "description": "Moves between the collections of a workspace, flat or nested, with the default one marked and never removable; in entity mode, a compact switcher for a shop or a studio.",
7
+ "status": "beta",
8
+ "deprecated": null,
9
+ "category": "navigation",
10
+ "platforms": "both",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "yes"
17
+ },
18
+ "desktop": {
19
+ "state": "yes"
20
+ }
21
+ },
22
+ "whenToUse": [
23
+ "To move between the collections (folders, albums, lists) of a workspace, the current one being the URL's.",
24
+ "In the shell, `mode=\"entity\"`, to switch the shop or studio an owner is working on."
25
+ ],
26
+ "whenNotToUse": [
27
+ {
28
+ "when": "For the sections of one page.",
29
+ "use": "tabs"
30
+ },
31
+ {
32
+ "when": "For a long list of records to read and sort.",
33
+ "use": "data-table"
34
+ }
35
+ ],
36
+ "bestPractices": [
37
+ "The current collection is the route's: read `value` from the URL and navigate in `onValueChange`, or give `href` so each row is a real link.",
38
+ "Mark one collection `isDefault`: it carries the `defaultLabel` and has no remove action; the server refuses its removal with `DEFAULT_COLLECTION`.",
39
+ "Nest only when it helps (`layout=\"tree\"` with `parentId`); a list reads faster."
40
+ ],
41
+ "accessibility": {
42
+ "keyboard": [
43
+ {
44
+ "keys": "Tab",
45
+ "action": "Moves through the rows and their remove buttons, in the order of the list."
46
+ },
47
+ {
48
+ "keys": "Enter / Space",
49
+ "action": "Chooses a collection; in entity mode, opens and closes the list."
50
+ },
51
+ {
52
+ "keys": "Escape",
53
+ "action": "Closes the entity list and returns to its button."
54
+ }
55
+ ],
56
+ "notes": [
57
+ "A `nav` named by `label`; the current row has `aria-current=\"page\"`.",
58
+ "The default collection is said in text (`defaultLabel`), not by colour; each remove button is named for its collection."
59
+ ]
60
+ },
61
+ "related": [
62
+ "entity-header",
63
+ "tabs",
64
+ "list"
65
+ ],
66
+ "web": {
67
+ "entry": "@krizaka/ui/collection-switcher",
68
+ "import": "import { CollectionSwitcher } from \"@krizaka/ui/collection-switcher\";",
69
+ "props": [
70
+ {
71
+ "component": "CollectionSwitcher",
72
+ "description": "The collections of a workspace — or the shops of an account — to move between; the default one marked and never removable.",
73
+ "props": [
74
+ {
75
+ "name": "collections",
76
+ "type": "readonly CollectionItem[]",
77
+ "default": null,
78
+ "description": "The collections, flat; `parentId` nests them in the `tree` layout.",
79
+ "required": true
80
+ },
81
+ {
82
+ "name": "defaultLabel",
83
+ "type": "string",
84
+ "default": null,
85
+ "description": "The mark on the default collection (“Default”), passed translated.",
86
+ "required": true
87
+ },
88
+ {
89
+ "name": "label",
90
+ "type": "string",
91
+ "default": null,
92
+ "description": "The accessible name (“Collections”) — passed translated.",
93
+ "required": true
94
+ },
95
+ {
96
+ "name": "value",
97
+ "type": "string | null",
98
+ "default": null,
99
+ "description": "The current one (read from the URL), or `null`.",
100
+ "required": true
101
+ },
102
+ {
103
+ "name": "className",
104
+ "type": "string",
105
+ "default": null,
106
+ "description": "Classes merged last, on the switcher.",
107
+ "required": false
108
+ },
109
+ {
110
+ "name": "createLabel",
111
+ "type": "string",
112
+ "default": null,
113
+ "description": "The create row's words (“New collection”), passed translated.",
114
+ "required": false
115
+ },
116
+ {
117
+ "name": "href",
118
+ "type": "((id: string) => string)",
119
+ "default": null,
120
+ "description": "Gives each row of the `list` layout a real address (open in a new tab, SSR); a click still calls `onValueChange`.",
121
+ "required": false
122
+ },
123
+ {
124
+ "name": "layout",
125
+ "type": "\"list\" | \"tree\"",
126
+ "default": "list",
127
+ "description": "`list`: a flat list. `tree`: the nesting by `parentId`, as nested lists (every row stays a link or a button, in the tab order).",
128
+ "required": false
129
+ },
130
+ {
131
+ "name": "mode",
132
+ "type": "\"collection\" | \"entity\"",
133
+ "default": "collection",
134
+ "description": "`collection`: the list or the tree itself. `entity`: a compact button showing the current one that opens it, to switch shop or studio from the shell.",
135
+ "required": false
136
+ },
137
+ {
138
+ "name": "onCreate",
139
+ "type": "(() => void)",
140
+ "default": null,
141
+ "description": "Adds a collection: a row at the end. Without it there is none.",
142
+ "required": false
143
+ },
144
+ {
145
+ "name": "onRemove",
146
+ "type": "((id: string) => void)",
147
+ "default": null,
148
+ "description": "Removes a collection — never offered on the default one. Without it there is no remove action.",
149
+ "required": false
150
+ },
151
+ {
152
+ "name": "onValueChange",
153
+ "type": "((id: string) => void)",
154
+ "default": null,
155
+ "description": "The viewer chooses a collection: navigate (push the URL).",
156
+ "required": false
157
+ },
158
+ {
159
+ "name": "removeLabel",
160
+ "type": "((name: string) => string)",
161
+ "default": null,
162
+ "description": "The remove button's accessible name for a collection (“Remove Archive”), passed translated.",
163
+ "required": false
164
+ }
165
+ ]
166
+ }
167
+ ],
168
+ "examples": [
169
+ {
170
+ "name": "list",
171
+ "title": "A list",
172
+ "description": "Collections with counts, the default one marked, a remove action and a create row.",
173
+ "path": "examples/collection-switcher/list.tsx",
174
+ "module": "@krizaka/ui/registry/examples/collection-switcher/list",
175
+ "code": "import { CollectionSwitcher } from \"@krizaka/ui/collection-switcher\";\nimport * as React from \"react\";\n\nconst COLLECTIONS = [\n { id: \"all\", name: \"Everything\", isDefault: true, count: 42 },\n { id: \"spring\", name: \"Spring bookings\", count: 12 },\n { id: \"weddings\", name: \"Weddings\", count: 5 },\n];\n\n// The current collection is held by the URL: here a state stands in for it; a product pushes the route in `onValueChange`.\nexport default function CollectionSwitcherList() {\n const [value, setValue] = React.useState(\"spring\");\n return (\n <CollectionSwitcher\n collections={COLLECTIONS}\n value={value}\n onValueChange={setValue}\n label=\"Collections\"\n defaultLabel=\"Default\"\n onRemove={(id) => setValue(id === value ? \"all\" : value)}\n removeLabel={(name) => `Remove ${name}`}\n onCreate={() => undefined}\n createLabel=\"New collection\"\n className=\"w-72\"\n />\n );\n}\n"
176
+ },
177
+ {
178
+ "name": "tree",
179
+ "title": "Nested",
180
+ "description": "Collections under a parent, opened together.",
181
+ "path": "examples/collection-switcher/tree.tsx",
182
+ "module": "@krizaka/ui/registry/examples/collection-switcher/tree",
183
+ "code": "import { CollectionSwitcher } from \"@krizaka/ui/collection-switcher\";\nimport * as React from \"react\";\n\nconst COLLECTIONS = [\n { id: \"all\", name: \"Everything\", isDefault: true },\n { id: \"2026\", name: \"2026\", count: 17 },\n { id: \"spring\", name: \"Spring\", parentId: \"2026\", count: 12 },\n { id: \"summer\", name: \"Summer\", parentId: \"2026\", count: 5 },\n];\n\n// Nesting is optional: a collection with a `parentId` sits under its parent.\nexport default function CollectionSwitcherTree() {\n const [value, setValue] = React.useState(\"spring\");\n return <CollectionSwitcher collections={COLLECTIONS} value={value} onValueChange={setValue} label=\"Collections\" layout=\"tree\" defaultLabel=\"Default\" className=\"w-72\" />;\n}\n"
184
+ },
185
+ {
186
+ "name": "entity",
187
+ "title": "Shop switcher",
188
+ "description": "A compact button for the shell: switch the shop or studio.",
189
+ "path": "examples/collection-switcher/entity.tsx",
190
+ "module": "@krizaka/ui/registry/examples/collection-switcher/entity",
191
+ "code": "import { CollectionSwitcher } from \"@krizaka/ui/collection-switcher\";\nimport * as React from \"react\";\n\nconst SHOPS = [\n { id: \"atelier\", name: \"Atelier Lune\", isDefault: true, avatar: { defaultAvatar: { brand: \"akinaza\", kind: \"shop\", tone: 2 } as const } },\n { id: \"marche\", name: \"Marché du samedi\", avatar: { defaultAvatar: { brand: \"akinaza\", kind: \"shop\", tone: 5 } as const } },\n];\n\n// In the shell: a compact button that shows the current shop or studio and opens the others.\nexport default function CollectionSwitcherEntity() {\n const [value, setValue] = React.useState(\"atelier\");\n return <CollectionSwitcher mode=\"entity\" collections={SHOPS} value={value} onValueChange={setValue} label=\"Switch shop\" defaultLabel=\"Main\" onCreate={() => undefined} createLabel=\"New shop\" />;\n}\n"
192
+ }
193
+ ]
194
+ },
195
+ "native": {
196
+ "entry": "@krizaka/ui/native",
197
+ "import": "import { CollectionSwitcher } from \"@krizaka/ui/native\";",
198
+ "differences": [
199
+ "Same data and layouts. Rows are 44-point targets; in entity mode the list opens under the button instead of a popover."
200
+ ],
201
+ "deprecated": null,
202
+ "props": [
203
+ {
204
+ "component": "CollectionSwitcher",
205
+ "description": "The collections of a workspace — or the shops of an account — to move between; the default one marked and never removable.",
206
+ "props": [
207
+ {
208
+ "name": "collections",
209
+ "type": "readonly CollectionItem[]",
210
+ "default": null,
211
+ "description": "The collections, flat; `parentId` nests them in the `tree` layout.",
212
+ "required": true
213
+ },
214
+ {
215
+ "name": "defaultLabel",
216
+ "type": "string",
217
+ "default": null,
218
+ "description": "The mark on the default collection (“Default”), passed translated.",
219
+ "required": true
220
+ },
221
+ {
222
+ "name": "label",
223
+ "type": "string",
224
+ "default": null,
225
+ "description": "The accessible name (“Collections”), passed translated.",
226
+ "required": true
227
+ },
228
+ {
229
+ "name": "value",
230
+ "type": "string | null",
231
+ "default": null,
232
+ "description": "The current one (read from the route), or `null`.",
233
+ "required": true
234
+ },
235
+ {
236
+ "name": "createLabel",
237
+ "type": "string",
238
+ "default": null,
239
+ "description": "The create row's words, passed translated.",
240
+ "required": false
241
+ },
242
+ {
243
+ "name": "layout",
244
+ "type": "\"list\" | \"tree\"",
245
+ "default": null,
246
+ "description": "`list` (default) or `tree` (indented by `parentId`).",
247
+ "required": false
248
+ },
249
+ {
250
+ "name": "mode",
251
+ "type": "\"collection\" | \"entity\"",
252
+ "default": null,
253
+ "description": "`collection` (default), or `entity`: a compact button that opens the list, to switch shop or studio.",
254
+ "required": false
255
+ },
256
+ {
257
+ "name": "onCreate",
258
+ "type": "(() => void)",
259
+ "default": null,
260
+ "description": "Adds a collection: a row at the end.",
261
+ "required": false
262
+ },
263
+ {
264
+ "name": "onRemove",
265
+ "type": "((id: string) => void)",
266
+ "default": null,
267
+ "description": "Removes a collection — never offered on the default one.",
268
+ "required": false
269
+ },
270
+ {
271
+ "name": "onValueChange",
272
+ "type": "((id: string) => void)",
273
+ "default": null,
274
+ "description": "The viewer chooses a collection: navigate.",
275
+ "required": false
276
+ },
277
+ {
278
+ "name": "removeLabel",
279
+ "type": "((name: string) => string)",
280
+ "default": null,
281
+ "description": "The remove button's accessible name (“Remove Archive”), passed translated.",
282
+ "required": false
283
+ }
284
+ ]
285
+ }
286
+ ],
287
+ "examples": [
288
+ {
289
+ "name": "list",
290
+ "title": "Nested list",
291
+ "description": "Collections nested under a parent, the default one marked.",
292
+ "path": "examples/collection-switcher/native/list.tsx",
293
+ "module": "@krizaka/ui/registry/examples/collection-switcher/native/list",
294
+ "code": "import { CollectionSwitcher } from \"@krizaka/ui/native\";\nimport * as React from \"react\";\n\nconst COLLECTIONS = [\n { id: \"all\", name: \"Everything\", isDefault: true, count: 42 },\n { id: \"2026\", name: \"2026\", count: 17 },\n { id: \"spring\", name: \"Spring\", parentId: \"2026\", count: 12 },\n];\n\n// The current collection is held by the route; a state stands in for it here.\nexport default function NativeCollectionSwitcherList() {\n const [value, setValue] = React.useState(\"spring\");\n return <CollectionSwitcher collections={COLLECTIONS} value={value} onValueChange={setValue} label=\"Collections\" layout=\"tree\" defaultLabel=\"Default\" />;\n}\n",
295
+ "screenshots": {
296
+ "dark": "examples/collection-switcher/native/list.dark.png",
297
+ "light": "examples/collection-switcher/native/list.light.png"
298
+ }
299
+ }
300
+ ]
301
+ },
302
+ "files": [
303
+ {
304
+ "path": "collection-switcher/collection-switcher.tsx",
305
+ "content": "// Client (the open state of the entity popover, the tree's keyboard). Moves between the collections of a workspace — or,\n// in `entity` mode, between the shops or studios of an account. The current one is held by the URL: the product passes\n// `value` from it and navigates in `onValueChange` (or gives `href`, and each row is a real link).\nimport { Avatar } from \"@krizaka/ui/avatar\";\nimport { cn } from \"@krizaka/ui/cn\";\nimport { Popover } from \"@krizaka/ui/popover\";\nimport * as React from \"react\";\n\nimport { ChevronGlyph, CloseGlyph, PlusGlyph } from \"../glyphs\";\nimport { type CollectionBranch, type CollectionItem, collectionTree, isRemovable } from \"./tree\";\n\nexport type CollectionSwitcherProps = {\n /** The collections, flat; `parentId` nests them in the `tree` layout. */\n collections: readonly CollectionItem[];\n /** The current one (read from the URL), or `null`. */\n value: string | null;\n /** The viewer chooses a collection: navigate (push the URL). */\n onValueChange?: (id: string) => void;\n /** Gives each row of the `list` layout a real address (open in a new tab, SSR); a click still calls `onValueChange`. */\n href?: (id: string) => string;\n /** The accessible name (“Collections”) — passed translated. */\n label: string;\n /**\n * `list`: a flat list. `tree`: the nesting by `parentId`, as nested lists (every row stays a link or a button, in the tab order).\n * @default \"list\"\n */\n layout?: \"list\" | \"tree\";\n /**\n * `collection`: the list or the tree itself. `entity`: a compact button showing the current one that opens it, to switch shop or studio from the shell.\n * @default \"collection\"\n */\n mode?: \"collection\" | \"entity\";\n /** The mark on the default collection (“Default”), passed translated. */\n defaultLabel: string;\n /** Removes a collection — never offered on the default one. Without it there is no remove action. */\n onRemove?: (id: string) => void;\n /** The remove button's accessible name for a collection (“Remove Archive”), passed translated. */\n removeLabel?: (name: string) => string;\n /** Adds a collection: a row at the end. Without it there is none. */\n onCreate?: () => void;\n /** The create row's words (“New collection”), passed translated. */\n createLabel?: string;\n /** Classes merged last, on the switcher. */\n className?: string;\n};\n\nfunction Row({ branch, value, props }: { branch: CollectionBranch; value: string | null; props: CollectionSwitcherProps & { close?: () => void } }) {\n const { item, children } = branch;\n const current = item.id === value;\n const { href, onValueChange, defaultLabel, onRemove, removeLabel, close } = props;\n const content = (\n <>\n {item.avatar ? <Avatar size=\"xs\" alt=\"\" {...item.avatar} /> : null}\n <span className=\"min-w-0 flex-1 truncate\">{item.name}</span>\n {item.isDefault ? <span className=\"shrink-0 rounded-full border border-border-default px-1.5 text-[11px] text-fg-secondary\">{defaultLabel}</span> : null}\n {item.count !== undefined ? <span className=\"shrink-0 text-xs tabular-nums text-fg-muted\">{item.count}</span> : null}\n </>\n );\n const shared = {\n \"aria-current\": current ? (\"page\" as const) : undefined,\n className: cn(\n \"flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-start text-sm text-fg hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-ring\",\n current && \"bg-surface-2 font-medium\",\n ),\n onClick: () => {\n onValueChange?.(item.id);\n close?.();\n },\n };\n return (\n <li data-collection={item.id}>\n <div className=\"flex items-center gap-1\">\n {href ? (\n <a href={href(item.id)} {...shared}>\n {content}\n </a>\n ) : (\n <button type=\"button\" {...shared}>\n {content}\n </button>\n )}\n {onRemove && isRemovable(item) ? (\n <button\n type=\"button\"\n aria-label={removeLabel?.(item.name) ?? item.name}\n onClick={() => onRemove(item.id)}\n className=\"shrink-0 rounded-md p-1.5 text-fg-muted hover:bg-surface-2 hover:text-fg focus-visible:outline-2 focus-visible:outline-ring\"\n >\n <CloseGlyph aria-hidden className=\"h-3.5 w-3.5\" />\n </button>\n ) : null}\n </div>\n {children.length ? (\n <ul className=\"m-0 ms-4 flex list-none flex-col gap-0.5 border-s border-border-subtle p-0 ps-1\">\n {children.map((child) => (\n <Row key={child.item.id} branch={child} value={value} props={props} />\n ))}\n </ul>\n ) : null}\n </li>\n );\n}\n\nfunction Body(props: CollectionSwitcherProps & { close?: () => void }) {\n const { collections, value, label, layout = \"list\", onCreate, createLabel, close } = props;\n const branches = React.useMemo(() => (layout === \"tree\" ? collectionTree(collections) : collections.map((item) => ({ item, children: [] }))), [collections, layout]);\n const create = onCreate ? (\n <button\n type=\"button\"\n onClick={() => {\n onCreate();\n close?.();\n }}\n className=\"mt-1 flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-sm text-fg-secondary hover:bg-surface-2 hover:text-fg focus-visible:outline-2 focus-visible:outline-ring\"\n >\n <PlusGlyph aria-hidden className=\"h-3.5 w-3.5\" />\n {createLabel}\n </button>\n ) : null;\n return (\n <nav aria-label={label}>\n <ul className=\"m-0 flex list-none flex-col gap-0.5 p-0\">\n {branches.map((branch) => (\n <Row key={branch.item.id} branch={branch} value={value} props={props} />\n ))}\n </ul>\n {create}\n </nav>\n );\n}\n\n/** The collections of a workspace — or the shops of an account — to move between; the default one marked and never removable. */\nexport function CollectionSwitcher(props: CollectionSwitcherProps) {\n const { mode = \"collection\", collections, value, label, className } = props;\n const [open, setOpen] = React.useState(false);\n if (mode === \"collection\") {\n return (\n <div className={className} data-collection-switcher>\n <Body {...props} />\n </div>\n );\n }\n const current = collections.find((c) => c.id === value);\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger asChild>\n <button\n type=\"button\"\n aria-label={current ? `${current.name}, ${label}` : label}\n className={cn(\n \"inline-flex max-w-full items-center gap-2 rounded-md border border-border-control bg-surface-1 px-2.5 py-1.5 text-sm text-fg hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\",\n className,\n )}\n data-collection-switcher\n >\n {current?.avatar ? <Avatar size=\"xs\" alt=\"\" {...current.avatar} /> : null}\n <span className=\"min-w-0 truncate\">{current?.name ?? label}</span>\n <ChevronGlyph aria-hidden className=\"h-3.5 w-3.5 shrink-0 text-fg-muted\" />\n </button>\n </Popover.Trigger>\n <Popover.Content align=\"start\" className=\"w-72 p-2\">\n <Body {...props} close={() => setOpen(false)} />\n </Popover.Content>\n </Popover.Root>\n );\n}\n"
306
+ },
307
+ {
308
+ "path": "collection-switcher/index.ts",
309
+ "content": "/** @krizaka/ui/collection-switcher — `CollectionSwitcher` (list or tree; the default one marked and not removable; the current one from the URL; `mode=\"entity\"` for a shop or studio switcher), `collectionTree`. Client (\"use client\"). */\nexport { CollectionSwitcher, type CollectionSwitcherProps } from \"./collection-switcher\";\nexport { type CollectionBranch, type CollectionItem, collectionTree, isRemovable } from \"./tree\";\n"
310
+ },
311
+ {
312
+ "path": "collection-switcher/meta.ts",
313
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Collection switcher\",\n summary:\n \"Moves between the collections of a workspace, flat or nested, with the default one marked and never removable; in entity mode, a compact switcher for a shop or a studio.\",\n status: \"beta\",\n category: \"navigation\",\n platforms: \"both\",\n parity: { desktop: \"web\" },\n whenToUse: [\n \"To move between the collections (folders, albums, lists) of a workspace, the current one being the URL's.\",\n \"In the shell, `mode=\\\"entity\\\"`, to switch the shop or studio an owner is working on.\",\n ],\n whenNotToUse: [\n { when: \"For the sections of one page.\", use: \"tabs\" },\n { when: \"For a long list of records to read and sort.\", use: \"data-table\" },\n ],\n bestPractices: [\n \"The current collection is the route's: read `value` from the URL and navigate in `onValueChange`, or give `href` so each row is a real link.\",\n \"Mark one collection `isDefault`: it carries the `defaultLabel` and has no remove action; the server refuses its removal with `DEFAULT_COLLECTION`.\",\n \"Nest only when it helps (`layout=\\\"tree\\\"` with `parentId`); a list reads faster.\",\n ],\n accessibility: {\n keyboard: [\n { keys: \"Tab\", action: \"Moves through the rows and their remove buttons, in the order of the list.\" },\n { keys: \"Enter / Space\", action: \"Chooses a collection; in entity mode, opens and closes the list.\" },\n { keys: \"Escape\", action: \"Closes the entity list and returns to its button.\" },\n ],\n notes: [\n \"A `nav` named by `label`; the current row has `aria-current=\\\"page\\\"`.\",\n \"The default collection is said in text (`defaultLabel`), not by colour; each remove button is named for its collection.\",\n ],\n },\n related: [\"entity-header\", \"tabs\", \"list\"],\n web: {\n imports: [\"CollectionSwitcher\"],\n examples: [\n { name: \"list\", title: \"A list\", description: \"Collections with counts, the default one marked, a remove action and a create row.\" },\n { name: \"tree\", title: \"Nested\", description: \"Collections under a parent, opened together.\" },\n { name: \"entity\", title: \"Shop switcher\", description: \"A compact button for the shell: switch the shop or studio.\" },\n ],\n },\n native: {\n imports: [\"CollectionSwitcher\"],\n differences: [\"Same data and layouts. Rows are 44-point targets; in entity mode the list opens under the button instead of a popover.\"],\n examples: [{ name: \"list\", title: \"Nested list\", description: \"Collections nested under a parent, the default one marked.\" }],\n },\n} satisfies ComponentMeta;\n"
314
+ },
315
+ {
316
+ "path": "collection-switcher/tree.ts",
317
+ "content": "// Pure helpers of the collection switcher: the nesting of a flat list, and what may be removed. No React and no web\n// component: the native switcher imports this file.\nimport type { DefaultAvatar } from \"../avatar/default-avatar\";\n\nexport type CollectionItem = {\n /** A stable id. */\n id: string;\n /** Its name — it is the user's own text, never translated. */\n name: string;\n /** The collection it is nested in; `null`/missing for a root. An unknown parent makes it a root (nothing is lost). */\n parentId?: string | null;\n /** The default collection: marked, and never removable. */\n isDefault?: boolean;\n /** How many items it holds. */\n count?: number;\n /** Its picture (a shop or studio in `entity` mode). */\n avatar?: { src?: string | null; defaultAvatar?: DefaultAvatar };\n};\n\nexport type CollectionBranch = { item: CollectionItem; children: CollectionBranch[] };\n\n/** The forest of a flat list, in the order given; a cycle or an unknown parent never hides a collection. */\nexport function collectionTree(items: readonly CollectionItem[]): CollectionBranch[] {\n const byId = new Map(items.map((item) => [item.id, item]));\n const branches = new Map<string, CollectionBranch>(items.map((item) => [item.id, { item, children: [] }]));\n const roots: CollectionBranch[] = [];\n const reaches = (start: string, target: string): boolean => {\n const seen = new Set<string>();\n for (let id: string | null | undefined = start; id && !seen.has(id); id = byId.get(id)?.parentId) {\n if (id === target) return true;\n seen.add(id);\n }\n return false;\n };\n for (const item of items) {\n const parent = item.parentId && item.parentId !== item.id && byId.has(item.parentId) && !reaches(item.parentId, item.id) ? branches.get(item.parentId) : undefined;\n (parent ? parent.children : roots).push(branches.get(item.id)!);\n }\n return roots;\n}\n\n/** The default collection is never removable. */\nexport const isRemovable = (item: CollectionItem): boolean => !item.isDefault;\n"
318
+ },
319
+ {
320
+ "path": "glyphs.tsx",
321
+ "content": "// The small line glyphs the data and media primitives draw (play, volume, search, chevrons…): decorative, 24-unit\n// box, `currentColor`, sized by the caller's class. Shared by the entries that need them; never exported on its own —\n// a product draws its own icons with @krizaka/icons.\nimport type * as React from \"react\";\n\ntype GlyphProps = { className?: string };\n\nfunction Glyph({ className = \"h-4 w-4\", fill, children }: GlyphProps & { fill?: boolean; children: React.ReactNode }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n className={className}\n fill={fill ? \"currentColor\" : \"none\"}\n stroke={fill ? \"none\" : \"currentColor\"}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n >\n {children}\n </svg>\n );\n}\n\nexport const PlayGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <path d=\"M8 5.5v13a1 1 0 0 0 1.5.86l10.4-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5Z\" />\n </Glyph>\n);\nexport const PauseGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n <rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n </Glyph>\n);\nexport const VolumeGlyph = ({ muted, ...p }: GlyphProps & { muted?: boolean }) => (\n <Glyph {...p}>\n <path d=\"M11 5 6 9H3v6h3l5 4V5Z\" />\n {muted ? <path d=\"m22 9-6 6m0-6 6 6\" /> : <path d=\"M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13\" />}\n </Glyph>\n);\nexport const FullscreenGlyph = ({ exit, ...p }: GlyphProps & { exit?: boolean }) => (\n <Glyph {...p}>\n {exit ? <path d=\"M9 4v5H4m11-5v5h5M9 20v-5H4m11 5v-5h5\" /> : <path d=\"M4 9V4h5m6 0h5v5M4 15v5h5m11-5v5h-5\" />}\n </Glyph>\n);\nexport const CaptionsGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M10 10.5a2 2 0 1 0 0 3M17 10.5a2 2 0 1 0 0 3\" />\n </Glyph>\n);\nexport const PipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <rect x=\"12\" y=\"12\" width=\"6\" height=\"4\" rx=\"1\" />\n </Glyph>\n);\nexport const SearchGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </Glyph>\n);\nexport const CloseGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </Glyph>\n);\nexport const ChevronGlyph = ({ direction = \"down\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" | \"up\" | \"down\" }) => (\n <Glyph {...p}>\n <path d={{ left: \"m15 6-6 6 6 6\", right: \"m9 6 6 6-6 6\", up: \"m6 15 6-6 6 6\", down: \"m6 9 6 6 6-6\" }[direction]} />\n </Glyph>\n);\nexport const CheckGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M20 6 9 17l-5-5\" />\n </Glyph>\n);\nexport const PlusGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 5v14M5 12h14\" />\n </Glyph>\n);\nexport const CalendarGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M3 10h18M8 3v4M16 3v4\" />\n </Glyph>\n);\nexport const UploadGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 16V4m0 0L7 9m5-5 5 5\" />\n <path d=\"M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\" />\n </Glyph>\n);\nexport const FileGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8l-5-5Z\" />\n <path d=\"M14 3v5h5\" />\n </Glyph>\n);\nexport const CameraGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Z\" />\n <circle cx=\"12\" cy=\"13.5\" r=\"3.5\" />\n </Glyph>\n);\nexport const FlipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3\" />\n <path d=\"M18 3v4h-4M6 21v-4h4\" />\n </Glyph>\n);\nexport const RetryGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 1 0 2.3-5.7L4 8.5\" />\n <path d=\"M4 4v4.5h4.5\" />\n </Glyph>\n);\nexport const SortGlyph = ({ direction, ...p }: GlyphProps & { direction?: \"ascending\" | \"descending\" }) => (\n <Glyph {...p}>\n {direction === \"ascending\" ? <path d=\"m7 14 5-5 5 5\" /> : direction === \"descending\" ? <path d=\"m7 10 5 5 5-5\" /> : <path d=\"m8 9 4-4 4 4M8 15l4 4 4-4\" />}\n </Glyph>\n);\nexport const ArrowGlyph = ({ direction = \"right\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" }) => (\n <Glyph {...p}>\n <path d={direction === \"left\" ? \"M19 12H5m0 0 6-6m-6 6 6 6\" : \"M5 12h14m0 0-6-6m6 6-6 6\"} />\n </Glyph>\n);\nexport const ExternalGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 4h6v6M20 4l-9 9\" />\n <path d=\"M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4\" />\n </Glyph>\n);\nexport const WarningGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 4 2.5 20h19L12 4Z\" />\n <path d=\"M12 10v4M12 17.2v.1\" />\n </Glyph>\n);\nexport const CopyGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" />\n <path d=\"M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3\" />\n </Glyph>\n);\nexport const PencilGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 20h4L19 9a2.8 2.8 0 0 0-4-4L4 16v4zM13.5 6.5l4 4\" />\n </Glyph>\n);\n"
322
+ },
323
+ {
324
+ "path": "meta.ts",
325
+ "content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which ui.krizaka.com (apps/site) renders as\n// ui.krizaka.com/components/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"captcha\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"chip-row\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"docs-nav\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"engine-flow\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"meta-row\"\n | \"waveform\"\n | \"qr-code\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\"\n | \"wall\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
326
+ }
327
+ ],
328
+ "dependencies": [],
329
+ "registryDependencies": [
330
+ "avatar",
331
+ "popover"
332
+ ],
333
+ "demo": {
334
+ "path": "examples/collection-switcher/list.tsx",
335
+ "content": "import { CollectionSwitcher } from \"@krizaka/ui/collection-switcher\";\nimport * as React from \"react\";\n\nconst COLLECTIONS = [\n { id: \"all\", name: \"Everything\", isDefault: true, count: 42 },\n { id: \"spring\", name: \"Spring bookings\", count: 12 },\n { id: \"weddings\", name: \"Weddings\", count: 5 },\n];\n\n// The current collection is held by the URL: here a state stands in for it; a product pushes the route in `onValueChange`.\nexport default function CollectionSwitcherList() {\n const [value, setValue] = React.useState(\"spring\");\n return (\n <CollectionSwitcher\n collections={COLLECTIONS}\n value={value}\n onValueChange={setValue}\n label=\"Collections\"\n defaultLabel=\"Default\"\n onRemove={(id) => setValue(id === value ? \"all\" : value)}\n removeLabel={(name) => `Remove ${name}`}\n onCreate={() => undefined}\n createLabel=\"New collection\"\n className=\"w-72\"\n />\n );\n}\n"
336
+ },
337
+ "props": [
338
+ {
339
+ "component": "CollectionSwitcher",
340
+ "description": "The collections of a workspace — or the shops of an account — to move between; the default one marked and never removable.",
341
+ "props": [
342
+ {
343
+ "name": "collections",
344
+ "type": "readonly CollectionItem[]",
345
+ "default": null,
346
+ "description": "The collections, flat; `parentId` nests them in the `tree` layout.",
347
+ "required": true
348
+ },
349
+ {
350
+ "name": "defaultLabel",
351
+ "type": "string",
352
+ "default": null,
353
+ "description": "The mark on the default collection (“Default”), passed translated.",
354
+ "required": true
355
+ },
356
+ {
357
+ "name": "label",
358
+ "type": "string",
359
+ "default": null,
360
+ "description": "The accessible name (“Collections”) — passed translated.",
361
+ "required": true
362
+ },
363
+ {
364
+ "name": "value",
365
+ "type": "string | null",
366
+ "default": null,
367
+ "description": "The current one (read from the URL), or `null`.",
368
+ "required": true
369
+ },
370
+ {
371
+ "name": "className",
372
+ "type": "string",
373
+ "default": null,
374
+ "description": "Classes merged last, on the switcher.",
375
+ "required": false
376
+ },
377
+ {
378
+ "name": "createLabel",
379
+ "type": "string",
380
+ "default": null,
381
+ "description": "The create row's words (“New collection”), passed translated.",
382
+ "required": false
383
+ },
384
+ {
385
+ "name": "href",
386
+ "type": "((id: string) => string)",
387
+ "default": null,
388
+ "description": "Gives each row of the `list` layout a real address (open in a new tab, SSR); a click still calls `onValueChange`.",
389
+ "required": false
390
+ },
391
+ {
392
+ "name": "layout",
393
+ "type": "\"list\" | \"tree\"",
394
+ "default": "list",
395
+ "description": "`list`: a flat list. `tree`: the nesting by `parentId`, as nested lists (every row stays a link or a button, in the tab order).",
396
+ "required": false
397
+ },
398
+ {
399
+ "name": "mode",
400
+ "type": "\"collection\" | \"entity\"",
401
+ "default": "collection",
402
+ "description": "`collection`: the list or the tree itself. `entity`: a compact button showing the current one that opens it, to switch shop or studio from the shell.",
403
+ "required": false
404
+ },
405
+ {
406
+ "name": "onCreate",
407
+ "type": "(() => void)",
408
+ "default": null,
409
+ "description": "Adds a collection: a row at the end. Without it there is none.",
410
+ "required": false
411
+ },
412
+ {
413
+ "name": "onRemove",
414
+ "type": "((id: string) => void)",
415
+ "default": null,
416
+ "description": "Removes a collection — never offered on the default one. Without it there is no remove action.",
417
+ "required": false
418
+ },
419
+ {
420
+ "name": "onValueChange",
421
+ "type": "((id: string) => void)",
422
+ "default": null,
423
+ "description": "The viewer chooses a collection: navigate (push the URL).",
424
+ "required": false
425
+ },
426
+ {
427
+ "name": "removeLabel",
428
+ "type": "((name: string) => string)",
429
+ "default": null,
430
+ "description": "The remove button's accessible name for a collection (“Remove Archive”), passed translated.",
431
+ "required": false
432
+ }
433
+ ]
434
+ }
435
+ ]
436
+ }