@krizaka/ui 3.86.0 → 4.0.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 (655) hide show
  1. package/README.md +14 -14
  2. package/dist/account-menu.d.ts +1 -1
  3. package/dist/account-menu.js +1 -1
  4. package/dist/account-settings.d.ts +1 -1
  5. package/dist/account-settings.js +1 -1
  6. package/dist/achievement.d.ts +2 -2
  7. package/dist/achievement.js +1 -1
  8. package/dist/achievement.js.map +1 -1
  9. package/dist/activity-feed.d.ts +4 -4
  10. package/dist/activity-feed.js +11 -5
  11. package/dist/activity-feed.js.map +1 -1
  12. package/dist/app-frame.d.ts +4 -4
  13. package/dist/app-frame.js.map +1 -1
  14. package/dist/app-header.d.ts +2 -2
  15. package/dist/app-header.js.map +1 -1
  16. package/dist/app-shell.d.ts +1 -1
  17. package/dist/app-shell.js +1 -1
  18. package/dist/app-shell.js.map +1 -1
  19. package/dist/auth-layout.d.ts +1 -1
  20. package/dist/auth-layout.js.map +1 -1
  21. package/dist/avatar/defaults.d.ts +2 -2
  22. package/dist/avatar/defaults.js +4 -4
  23. package/dist/avatar/defaults.js.map +1 -1
  24. package/dist/{avatar-CNV6ld8l.d.ts → avatar-Cd2uJgRh.d.ts} +2 -2
  25. package/dist/avatar.d.ts +3 -3
  26. package/dist/avatar.js +4 -4
  27. package/dist/avatar.js.map +1 -1
  28. package/dist/bird-plate.d.ts +1 -1
  29. package/dist/bird-plate.js +1 -1
  30. package/dist/blocks.css +5 -5
  31. package/dist/card-grid.d.ts +1 -1
  32. package/dist/card-grid.js.map +1 -1
  33. package/dist/changelog-page.d.ts +1 -1
  34. package/dist/changelog-page.js +18 -6
  35. package/dist/changelog-page.js.map +1 -1
  36. package/dist/chat.js +1 -1
  37. package/dist/chip.js +1 -1
  38. package/dist/choice-grid.d.ts +2 -2
  39. package/dist/choice-grid.js +1 -1
  40. package/dist/choice-grid.js.map +1 -1
  41. package/dist/{chunk-RCHKIOVV.js → chunk-2DHL7NJW.js} +2 -2
  42. package/dist/chunk-2DHL7NJW.js.map +1 -0
  43. package/dist/{chunk-TN5JJ6JI.js → chunk-2YBG4ZCY.js} +23 -2
  44. package/dist/{chunk-TN5JJ6JI.js.map → chunk-2YBG4ZCY.js.map} +1 -1
  45. package/dist/{chunk-6KZDARNX.js → chunk-54WTUZWE.js} +16 -12
  46. package/dist/chunk-54WTUZWE.js.map +1 -0
  47. package/dist/{chunk-DSDFXPL6.js → chunk-757ZTGU5.js} +2 -2
  48. package/dist/chunk-CDNOT2KR.js +310 -0
  49. package/dist/chunk-CDNOT2KR.js.map +1 -0
  50. package/dist/{chunk-IOTY5HYG.js → chunk-EOWV6BNQ.js} +4 -4
  51. package/dist/chunk-EOWV6BNQ.js.map +1 -0
  52. package/dist/{chunk-DRTIE44Z.js → chunk-FM42KOAU.js} +2 -2
  53. package/dist/chunk-FM42KOAU.js.map +1 -0
  54. package/dist/{chunk-CEW3LQOZ.js → chunk-IEGTRCDI.js} +5 -5
  55. package/dist/{chunk-KVDB4GXV.js → chunk-KR2W4ONJ.js} +2 -2
  56. package/dist/{chunk-TPITVAUW.js → chunk-LH5J3VLZ.js} +1 -1
  57. package/dist/{chunk-TPITVAUW.js.map → chunk-LH5J3VLZ.js.map} +1 -1
  58. package/dist/{chunk-E46AEUPH.js → chunk-PK3L6WQT.js} +4 -4
  59. package/dist/chunk-PK3L6WQT.js.map +1 -0
  60. package/dist/{chunk-GOGEYAYK.js → chunk-PRD7JRQX.js} +3 -3
  61. package/dist/{chunk-VYZFQE3P.js → chunk-QD6SNXF5.js} +2 -2
  62. package/dist/{chunk-M3T5RQYV.js → chunk-SB5WSVPI.js} +1 -1
  63. package/dist/chunk-SB5WSVPI.js.map +1 -0
  64. package/dist/{chunk-UYGUSYIC.js → chunk-SNSQLGGS.js} +1 -1
  65. package/dist/{chunk-BQ4EOR2O.js.map → chunk-SNSQLGGS.js.map} +1 -1
  66. package/dist/{chunk-YQWYGQTV.js → chunk-UIP3WX5O.js} +2 -2
  67. package/dist/{chunk-EHTXLZSM.js → chunk-VS3MWRBX.js} +1 -1
  68. package/dist/{chunk-EHTXLZSM.js.map → chunk-VS3MWRBX.js.map} +1 -1
  69. package/dist/{chunk-BQ4EOR2O.js → chunk-XWJDBQU7.js} +1 -1
  70. package/dist/{chunk-UYGUSYIC.js.map → chunk-XWJDBQU7.js.map} +1 -1
  71. package/dist/{chunk-ZKKMYIDN.js → chunk-Y3P5B4XS.js} +2 -2
  72. package/dist/{chunk-GW5EI7MI.js → chunk-YXETEQQJ.js} +3 -3
  73. package/dist/{chunk-FZBWEDQI.js → chunk-ZSCNMFE6.js} +1 -1
  74. package/dist/{chunk-FZBWEDQI.js.map → chunk-ZSCNMFE6.js.map} +1 -1
  75. package/dist/collection-switcher.d.ts +1 -1
  76. package/dist/combobox.js +3 -3
  77. package/dist/continue-prompt.js +1 -1
  78. package/dist/dashboard-layout.js +1 -1
  79. package/dist/dashboard-layout.js.map +1 -1
  80. package/dist/data-table.js +6 -6
  81. package/dist/date-picker.js +1 -1
  82. package/dist/{default-avatar-Bh4atFDo.d.ts → default-avatar-DHv7g-K1.d.ts} +1 -1
  83. package/dist/detail-layout.js.map +1 -1
  84. package/dist/docs-hub-page.d.ts +1 -1
  85. package/dist/docs-hub-page.js.map +1 -1
  86. package/dist/document-viewer.js +1 -1
  87. package/dist/engine-flow.d.ts +6 -6
  88. package/dist/engine-flow.js.map +1 -1
  89. package/dist/entity-header.d.ts +1 -1
  90. package/dist/file-upload.js +1 -1
  91. package/dist/filter-bar.d.ts +3 -3
  92. package/dist/filter-bar.js +2 -2
  93. package/dist/flock.js +1 -1
  94. package/dist/{frame-CNZ5VgDD.d.ts → frame-CmDztC_y.d.ts} +1 -1
  95. package/dist/genui.js +6 -6
  96. package/dist/genui.js.map +1 -1
  97. package/dist/{geometry-DDlFDtiQ.d.ts → geometry-8O5Nq-yA.d.ts} +2 -2
  98. package/dist/{geometry-DuUQyHZ1.d.ts → geometry-haB2EgO4.d.ts} +2 -2
  99. package/dist/goal-gauge.d.ts +1 -1
  100. package/dist/goal-gauge.js +1 -1
  101. package/dist/goal-gauge.js.map +1 -1
  102. package/dist/image-cropper.js +1 -1
  103. package/dist/index.d.ts +26 -26
  104. package/dist/index.js +8 -11
  105. package/dist/index.js.map +1 -1
  106. package/dist/kind-config-editor.js +1 -1
  107. package/dist/list.js +1 -1
  108. package/dist/loader.d.ts +1 -1
  109. package/dist/loader.js +2 -2
  110. package/dist/loader.js.map +1 -1
  111. package/dist/map.js +3 -3
  112. package/dist/map.js.map +1 -1
  113. package/dist/mascot-quote.d.ts +1 -1
  114. package/dist/mascot-quote.js +1 -1
  115. package/dist/mascot-state.js +1 -1
  116. package/dist/mascots.d.ts +2 -2
  117. package/dist/mascots.js +1 -1
  118. package/dist/match-dialog.js +1 -1
  119. package/dist/media-capture.js +1 -1
  120. package/dist/media-carousel.d.ts +115 -45
  121. package/dist/media-carousel.js +378 -56
  122. package/dist/media-carousel.js.map +1 -1
  123. package/dist/media-gallery.d.ts +3 -3
  124. package/dist/media-guard-bin.js +171 -0
  125. package/dist/media-guard-bin.js.map +1 -0
  126. package/dist/media-guard.d.ts +88 -0
  127. package/dist/media-guard.js +153 -0
  128. package/dist/media-guard.js.map +1 -0
  129. package/dist/media-player.d.ts +3 -3
  130. package/dist/media-player.js +3 -3
  131. package/dist/native/map.js +3 -3
  132. package/dist/native/map.js.map +1 -1
  133. package/dist/native.d.ts +43 -43
  134. package/dist/native.js +1233 -1210
  135. package/dist/native.js.map +1 -1
  136. package/dist/nav-bar.d.ts +1 -1
  137. package/dist/nav-bar.js +2 -2
  138. package/dist/notification-preferences.js +1 -1
  139. package/dist/pausable-loop.js +3 -13
  140. package/dist/pausable-loop.js.map +1 -1
  141. package/dist/{player-lightbox-ASFOSUSD.js → player-lightbox-BYQ57OXT.js} +3 -3
  142. package/dist/product-page.d.ts +1 -1
  143. package/dist/product-page.js.map +1 -1
  144. package/dist/profile-card.d.ts +2 -2
  145. package/dist/profile-card.js +1 -1
  146. package/dist/profile-card.js.map +1 -1
  147. package/dist/promise-card.d.ts +1 -1
  148. package/dist/promise-card.js +1 -1
  149. package/dist/promise-card.js.map +1 -1
  150. package/dist/rail-nav.d.ts +6 -6
  151. package/dist/rail-nav.js.map +1 -1
  152. package/dist/retro-tv-playlist.js.map +1 -1
  153. package/dist/retro-tv.js +2 -2
  154. package/dist/schema-form.d.ts +13 -1
  155. package/dist/schema-form.js +24 -13
  156. package/dist/schema-form.js.map +1 -1
  157. package/dist/scroll-stage.d.ts +1 -1
  158. package/dist/scroll-stage.js +1 -1
  159. package/dist/scroll-stage.js.map +1 -1
  160. package/dist/search-field.js +2 -2
  161. package/dist/shop/booking.js +1 -1
  162. package/dist/shop/bulletin.js +1 -1
  163. package/dist/shop/faq.js +1 -1
  164. package/dist/shop/gallery.js +1 -1
  165. package/dist/shop/look.js.map +1 -1
  166. package/dist/shop/policies.js +1 -1
  167. package/dist/shop/reviews.js +1 -1
  168. package/dist/shop/services.js +1 -1
  169. package/dist/shop/social.js +1 -1
  170. package/dist/shop/story.js +1 -1
  171. package/dist/shop/team.js +1 -1
  172. package/dist/shop/video.js +1 -1
  173. package/dist/shop/visit.js +1 -1
  174. package/dist/shop-composer.d.ts +1 -1
  175. package/dist/shop-composer.js +2 -2
  176. package/dist/shop-composer.js.map +1 -1
  177. package/dist/shop.d.ts +1 -1
  178. package/dist/shop.js +2 -2
  179. package/dist/shop.js.map +1 -1
  180. package/dist/site-cahier.d.ts +1 -1
  181. package/dist/site-cahier.js +188 -181
  182. package/dist/site-cahier.js.map +1 -1
  183. package/dist/site-footer.d.ts +1 -1
  184. package/dist/site-footer.js +2 -2
  185. package/dist/{sites-CSBwUnbJ.d.ts → sites-A5cNWG2Z.d.ts} +1 -1
  186. package/dist/sites.d.ts +2 -2
  187. package/dist/sites.js +15 -11
  188. package/dist/sites.js.map +1 -1
  189. package/dist/stage-banner.d.ts +1 -1
  190. package/dist/stage-banner.js +1 -1
  191. package/dist/stage-banner.js.map +1 -1
  192. package/dist/status-page.d.ts +1 -1
  193. package/dist/status-page.js.map +1 -1
  194. package/dist/step-showcase.d.ts +2 -2
  195. package/dist/step-showcase.js.map +1 -1
  196. package/dist/swipe-deck.js +1 -1
  197. package/dist/tag-input.js +3 -3
  198. package/dist/tag-selector.js +1 -1
  199. package/dist/terminal-replay.d.ts +1 -1
  200. package/dist/terminal-replay.js.map +1 -1
  201. package/dist/tree-view.js +1 -1
  202. package/dist/update-prompt.d.ts +1 -1
  203. package/dist/update-prompt.js.map +1 -1
  204. package/dist/versus-card.js +1 -1
  205. package/dist/vertical-video.js +1 -1
  206. package/dist/video-player.js +2 -2
  207. package/dist/video-trimmer.js +1 -1
  208. package/dist/virtual.js +2 -2
  209. package/dist/waveform.js.map +1 -1
  210. package/package.json +25 -12
  211. package/registry/account-menu.json +3 -3
  212. package/registry/account-settings.json +6 -6
  213. package/registry/achievement.json +8 -8
  214. package/registry/action-bar.json +4 -4
  215. package/registry/activity-feed.json +24 -24
  216. package/registry/agenda.json +3 -3
  217. package/registry/alert.json +1 -1
  218. package/registry/analysis-report.json +3 -3
  219. package/registry/anatomy-plate.json +1 -1
  220. package/registry/app-frame.json +33 -29
  221. package/registry/app-header.json +16 -16
  222. package/registry/app-shell.json +13 -13
  223. package/registry/argument-card.json +3 -3
  224. package/registry/auth-layout.json +9 -9
  225. package/registry/avatar.json +8 -8
  226. package/registry/badge.json +1 -1
  227. package/registry/bird-plate.json +2 -2
  228. package/registry/button.json +1 -1
  229. package/registry/captcha.json +1 -1
  230. package/registry/card-grid.json +9 -9
  231. package/registry/card.json +1 -1
  232. package/registry/catalogue-page.json +2 -2
  233. package/registry/changelog-page.json +2 -2
  234. package/registry/chapter.json +5 -5
  235. package/registry/chat.json +1 -1
  236. package/registry/checkbox.json +1 -1
  237. package/registry/chip-link.json +1 -1
  238. package/registry/chip-row.json +1 -1
  239. package/registry/chip.json +2 -2
  240. package/registry/choice-grid.json +6 -6
  241. package/registry/code-block.json +1 -1
  242. package/registry/collection-switcher.json +2 -2
  243. package/registry/combobox.json +2 -2
  244. package/registry/command.json +1 -1
  245. package/registry/comparison-table.json +5 -5
  246. package/registry/component-page.json +1 -1
  247. package/registry/confirm-button.json +1 -1
  248. package/registry/contact-page.json +1 -1
  249. package/registry/continue-prompt.json +2 -2
  250. package/registry/copy-button.json +1 -1
  251. package/registry/countdown.json +1 -1
  252. package/registry/cover-hero.json +1 -1
  253. package/registry/cta-panel.json +3 -3
  254. package/registry/dashboard-layout.json +11 -11
  255. package/registry/data-table.json +2 -2
  256. package/registry/date-picker.json +2 -2
  257. package/registry/decision-list.json +1 -1
  258. package/registry/description-list.json +1 -1
  259. package/registry/desktop-window.json +5 -5
  260. package/registry/detail-layout.json +7 -7
  261. package/registry/dialog.json +1 -1
  262. package/registry/docs-article-page.json +6 -6
  263. package/registry/docs-hub-page.json +4 -4
  264. package/registry/docs-layout.json +3 -3
  265. package/registry/docs-nav.json +1 -1
  266. package/registry/document-viewer.json +4 -4
  267. package/registry/doodle.json +1 -1
  268. package/registry/drop-overlay.json +3 -3
  269. package/registry/dropdown-menu.json +1 -1
  270. package/registry/elephant.json +1 -1
  271. package/registry/embed-facade.json +1 -1
  272. package/registry/empty-state.json +2 -2
  273. package/registry/engine-flow.json +8 -8
  274. package/registry/entity-header.json +1 -1
  275. package/registry/environment-notice.json +1 -1
  276. package/registry/error-page.json +1 -1
  277. package/registry/examples/account-menu/default.js +2 -2
  278. package/registry/examples/account-menu/default.tsx +2 -2
  279. package/registry/examples/account-settings/appearance.js +2 -2
  280. package/registry/examples/account-settings/appearance.tsx +2 -2
  281. package/registry/examples/account-settings/avatar-picker-folder.js +1 -1
  282. package/registry/examples/account-settings/avatar-picker-folder.tsx +1 -1
  283. package/registry/examples/account-settings/avatar-picker.js +1 -1
  284. package/registry/examples/account-settings/avatar-picker.tsx +1 -1
  285. package/registry/examples/account-settings/profile.js +2 -2
  286. package/registry/examples/account-settings/profile.tsx +3 -3
  287. package/registry/examples/achievement/arcade.js +1 -1
  288. package/registry/examples/achievement/arcade.tsx +1 -1
  289. package/registry/examples/action-bar/buttons.js +1 -1
  290. package/registry/examples/action-bar/buttons.tsx +1 -1
  291. package/registry/examples/action-bar/icons.js +1 -1
  292. package/registry/examples/action-bar/icons.tsx +1 -1
  293. package/registry/examples/activity-feed/job-activity.tsx +1 -1
  294. package/registry/examples/app-frame/admin.js +3 -3
  295. package/registry/examples/app-frame/admin.tsx +3 -3
  296. package/registry/examples/app-frame/app.js +5 -5
  297. package/registry/examples/app-frame/app.tsx +6 -6
  298. package/registry/examples/app-frame/touch.js +3 -3
  299. package/registry/examples/app-frame/touch.tsx +3 -3
  300. package/registry/examples/app-header/basic.js +2 -2
  301. package/registry/examples/app-header/basic.tsx +2 -2
  302. package/registry/examples/app-header/family.js +3 -3
  303. package/registry/examples/app-header/family.tsx +3 -3
  304. package/registry/examples/app-header/native/family.dark.png +0 -0
  305. package/registry/examples/app-header/native/family.js +2 -2
  306. package/registry/examples/app-header/native/family.light.png +0 -0
  307. package/registry/examples/app-header/native/family.tsx +2 -2
  308. package/registry/examples/app-shell/admin-console.js +1 -1
  309. package/registry/examples/app-shell/admin-console.tsx +1 -1
  310. package/registry/examples/app-shell/basic.js +1 -1
  311. package/registry/examples/app-shell/basic.tsx +1 -1
  312. package/registry/examples/app-shell/collapse-overflow.js +4 -4
  313. package/registry/examples/app-shell/collapse-overflow.tsx +4 -4
  314. package/registry/examples/app-shell/creator-studio.js +2 -2
  315. package/registry/examples/app-shell/creator-studio.tsx +2 -2
  316. package/registry/examples/app-shell/desktop.js +3 -3
  317. package/registry/examples/app-shell/desktop.tsx +1 -1
  318. package/registry/examples/argument-card/building-block.js +1 -1
  319. package/registry/examples/argument-card/building-block.tsx +1 -1
  320. package/registry/examples/auth-layout/onboarding.js +2 -2
  321. package/registry/examples/auth-layout/onboarding.tsx +2 -2
  322. package/registry/examples/auth-layout/sign-in.js +2 -2
  323. package/registry/examples/auth-layout/sign-in.tsx +2 -2
  324. package/registry/examples/avatar/default.js +1 -1
  325. package/registry/examples/avatar/default.tsx +1 -1
  326. package/registry/examples/bird-plate/single.tsx +1 -1
  327. package/registry/examples/card-grid/aligned.js +3 -3
  328. package/registry/examples/card-grid/aligned.tsx +3 -3
  329. package/registry/examples/card-grid/foundation.js +6 -6
  330. package/registry/examples/card-grid/foundation.tsx +6 -6
  331. package/registry/examples/card-grid/hover-quiet.js +3 -3
  332. package/registry/examples/card-grid/hover-quiet.tsx +3 -3
  333. package/registry/examples/card-grid/products.js +2 -2
  334. package/registry/examples/card-grid/products.tsx +2 -2
  335. package/registry/examples/catalogue-page/clients.js +1 -1
  336. package/registry/examples/catalogue-page/clients.tsx +1 -1
  337. package/registry/examples/chapter/detail.js +1 -1
  338. package/registry/examples/chapter/detail.tsx +1 -1
  339. package/registry/examples/chapter/foot.js +1 -1
  340. package/registry/examples/chapter/foot.tsx +1 -1
  341. package/registry/examples/chapter/index.js +1 -1
  342. package/registry/examples/chapter/index.tsx +1 -1
  343. package/registry/examples/choice-grid/line-up.js +2 -2
  344. package/registry/examples/choice-grid/line-up.tsx +2 -2
  345. package/registry/examples/collection-switcher/entity.js +2 -2
  346. package/registry/examples/collection-switcher/entity.tsx +2 -2
  347. package/registry/examples/comparison-table/versus.js +5 -5
  348. package/registry/examples/comparison-table/versus.tsx +5 -5
  349. package/registry/examples/cta-panel/discuss.js +1 -1
  350. package/registry/examples/cta-panel/discuss.tsx +1 -1
  351. package/registry/examples/dashboard-layout/{orazaka-eric.js → sovkora-eric.js} +4 -4
  352. package/registry/examples/dashboard-layout/{orazaka-eric.tsx → sovkora-eric.tsx} +3 -3
  353. package/registry/examples/dashboard-layout/today.js +1 -1
  354. package/registry/examples/dashboard-layout/today.tsx +1 -1
  355. package/registry/examples/desktop-window/library.js +2 -2
  356. package/registry/examples/desktop-window/library.tsx +1 -1
  357. package/registry/examples/detail-layout/checkout.js +1 -1
  358. package/registry/examples/detail-layout/checkout.tsx +1 -1
  359. package/registry/examples/detail-layout/client.js +1 -1
  360. package/registry/examples/detail-layout/client.tsx +1 -1
  361. package/registry/examples/detail-layout/new-invoice.js +1 -1
  362. package/registry/examples/detail-layout/new-invoice.tsx +1 -1
  363. package/registry/examples/detail-layout/profile.js +1 -1
  364. package/registry/examples/detail-layout/profile.tsx +1 -1
  365. package/registry/examples/detail-layout/video.js +1 -1
  366. package/registry/examples/detail-layout/video.tsx +1 -1
  367. package/registry/examples/docs-article-page/cli.js +5 -5
  368. package/registry/examples/docs-article-page/cli.tsx +6 -6
  369. package/registry/examples/docs-article-page/faq.js +4 -4
  370. package/registry/examples/docs-article-page/faq.tsx +4 -4
  371. package/registry/examples/docs-hub-page/krizaka.js +5 -5
  372. package/registry/examples/docs-hub-page/krizaka.tsx +5 -5
  373. package/registry/examples/docs-layout/page.js +1 -1
  374. package/registry/examples/docs-layout/page.tsx +1 -1
  375. package/registry/examples/empty-state/library.js +1 -1
  376. package/registry/examples/empty-state/library.tsx +1 -1
  377. package/registry/examples/engine-flow/calm.js +4 -4
  378. package/registry/examples/engine-flow/calm.tsx +4 -4
  379. package/registry/examples/engine-flow/compact.js +5 -5
  380. package/registry/examples/engine-flow/compact.tsx +5 -5
  381. package/registry/examples/engine-flow/radial.js +6 -6
  382. package/registry/examples/engine-flow/radial.tsx +6 -6
  383. package/registry/examples/force-update-screen/default.js +1 -1
  384. package/registry/examples/force-update-screen/default.tsx +1 -1
  385. package/registry/examples/force-update-screen/native/default.js +1 -1
  386. package/registry/examples/force-update-screen/native/default.tsx +1 -1
  387. package/registry/examples/form/native/sign-up.js +1 -1
  388. package/registry/examples/form/native/sign-up.tsx +1 -1
  389. package/registry/examples/gallery-page/made-here.js +2 -2
  390. package/registry/examples/gallery-page/made-here.tsx +3 -3
  391. package/registry/examples/goal-gauge/arcade.js +1 -1
  392. package/registry/examples/goal-gauge/arcade.tsx +1 -1
  393. package/registry/examples/landing-page/krizaka.js +5 -5
  394. package/registry/examples/landing-page/krizaka.tsx +5 -5
  395. package/registry/examples/landscape/brand.js +1 -1
  396. package/registry/examples/landscape/brand.tsx +1 -1
  397. package/registry/examples/link-card/docs-hub.js +3 -3
  398. package/registry/examples/link-card/docs-hub.tsx +3 -3
  399. package/registry/examples/link-card/hover-quiet.js +3 -3
  400. package/registry/examples/link-card/hover-quiet.tsx +3 -3
  401. package/registry/examples/link-card/stack.js +3 -3
  402. package/registry/examples/link-card/stack.tsx +3 -3
  403. package/registry/examples/list/jobs.tsx +1 -1
  404. package/registry/examples/loader/branded.js +2 -2
  405. package/registry/examples/loader/branded.tsx +3 -3
  406. package/registry/examples/loader/native/branded.js +1 -1
  407. package/registry/examples/loader/native/branded.tsx +2 -2
  408. package/registry/examples/loader/native/job-wait.tsx +1 -1
  409. package/registry/examples/longform-page/case-study.js +2 -2
  410. package/registry/examples/longform-page/case-study.tsx +3 -3
  411. package/registry/examples/longform-page/story.js +2 -2
  412. package/registry/examples/longform-page/story.tsx +2 -2
  413. package/registry/examples/maintenance-screen/default.js +1 -1
  414. package/registry/examples/maintenance-screen/default.tsx +1 -1
  415. package/registry/examples/maintenance-screen/native/default.js +1 -1
  416. package/registry/examples/maintenance-screen/native/default.tsx +1 -1
  417. package/registry/examples/marketing-layout/docs-hub.js +3 -3
  418. package/registry/examples/marketing-layout/docs-hub.tsx +3 -3
  419. package/registry/examples/marketing-layout/product-page.js +3 -3
  420. package/registry/examples/marketing-layout/product-page.tsx +3 -3
  421. package/registry/examples/mascots/flock.tsx +2 -2
  422. package/registry/examples/media-gallery/carousel-autoplay.js +23 -0
  423. package/registry/examples/media-gallery/carousel-autoplay.tsx +21 -0
  424. package/registry/examples/media-gallery/carousel-cahier.d.ts +4 -0
  425. package/registry/examples/media-gallery/carousel-cahier.js +27 -0
  426. package/registry/examples/media-gallery/carousel-cahier.tsx +26 -0
  427. package/registry/examples/media-gallery/carousel-demo.d.ts +4 -0
  428. package/registry/examples/media-gallery/carousel-demo.js +36 -0
  429. package/registry/examples/media-gallery/carousel-demo.tsx +34 -0
  430. package/registry/examples/nav-bar/family-admin.js +5 -5
  431. package/registry/examples/nav-bar/family-admin.tsx +4 -4
  432. package/registry/examples/nav-bar/family-java.js +1 -1
  433. package/registry/examples/nav-bar/family-java.tsx +1 -1
  434. package/registry/examples/nav-bar/family-product.js +4 -4
  435. package/registry/examples/nav-bar/family-product.tsx +3 -3
  436. package/registry/examples/nav-bar/site.js +2 -2
  437. package/registry/examples/nav-bar/site.tsx +2 -2
  438. package/registry/examples/pricing-page/credits.js +1 -1
  439. package/registry/examples/pricing-page/credits.tsx +2 -2
  440. package/registry/examples/product-page/sovkora.d.ts +4 -0
  441. package/registry/examples/product-page/{orazaka.js → sovkora.js} +7 -7
  442. package/registry/examples/product-page/{orazaka.tsx → sovkora.tsx} +5 -5
  443. package/registry/examples/profile-card/arcade.js +2 -2
  444. package/registry/examples/profile-card/arcade.tsx +2 -2
  445. package/registry/examples/profile-card/banner.js +2 -2
  446. package/registry/examples/profile-card/banner.tsx +2 -2
  447. package/registry/examples/profile-card/match.js +1 -1
  448. package/registry/examples/profile-card/match.tsx +1 -1
  449. package/registry/examples/profile-card/native/banner.js +1 -1
  450. package/registry/examples/profile-card/native/banner.tsx +1 -1
  451. package/registry/examples/promise-card/arcade.js +1 -1
  452. package/registry/examples/promise-card/arcade.tsx +1 -1
  453. package/registry/examples/pull-to-refresh/native/branded.js +1 -1
  454. package/registry/examples/pull-to-refresh/native/branded.tsx +1 -1
  455. package/registry/examples/rail-nav/expandable.js +3 -3
  456. package/registry/examples/rail-nav/expandable.tsx +3 -3
  457. package/registry/examples/rail-nav/shortcuts.js +6 -6
  458. package/registry/examples/rail-nav/shortcuts.tsx +6 -6
  459. package/registry/examples/rail-nav/studio.js +5 -5
  460. package/registry/examples/rail-nav/studio.tsx +5 -5
  461. package/registry/examples/scroll-stage/arcade.js +1 -1
  462. package/registry/examples/scroll-stage/arcade.tsx +1 -1
  463. package/registry/examples/shop/booking-closing-mark.js +2 -2
  464. package/registry/examples/shop/booking-closing-mark.tsx +2 -2
  465. package/registry/examples/site-footer/app.js +1 -1
  466. package/registry/examples/site-footer/app.tsx +2 -2
  467. package/registry/examples/site-footer/configured.js +1 -1
  468. package/registry/examples/site-footer/configured.tsx +1 -1
  469. package/registry/examples/site-footer/product.js +3 -3
  470. package/registry/examples/site-footer/product.tsx +4 -4
  471. package/registry/examples/sites/french.js +1 -1
  472. package/registry/examples/sites/french.tsx +1 -1
  473. package/registry/examples/specimen-tag/product.js +4 -4
  474. package/registry/examples/specimen-tag/product.tsx +4 -4
  475. package/registry/examples/specimen-tag/wire.js +3 -3
  476. package/registry/examples/specimen-tag/wire.tsx +3 -3
  477. package/registry/examples/splash-handoff/native/default.js +1 -1
  478. package/registry/examples/splash-handoff/native/default.tsx +1 -1
  479. package/registry/examples/split-view/notifications.js +1 -1
  480. package/registry/examples/split-view/notifications.tsx +1 -1
  481. package/registry/examples/stage-banner/steps.js +1 -1
  482. package/registry/examples/stage-banner/steps.tsx +1 -1
  483. package/registry/examples/status-page/building.js +1 -1
  484. package/registry/examples/status-page/building.tsx +1 -1
  485. package/registry/examples/status-page/operational.js +1 -1
  486. package/registry/examples/status-page/operational.tsx +1 -1
  487. package/registry/examples/step-showcase/desktop.js +2 -2
  488. package/registry/examples/step-showcase/desktop.tsx +2 -2
  489. package/registry/examples/step-showcase/phone.js +1 -1
  490. package/registry/examples/step-showcase/phone.tsx +1 -1
  491. package/registry/examples/stepper/native/run.tsx +1 -1
  492. package/registry/examples/stuck/card.js +1 -1
  493. package/registry/examples/stuck/card.tsx +1 -1
  494. package/registry/examples/stuck/tag.js +1 -1
  495. package/registry/examples/stuck/tag.tsx +2 -2
  496. package/registry/examples/tree-view/docs.js +4 -4
  497. package/registry/examples/tree-view/docs.tsx +4 -4
  498. package/registry/examples/update-prompt/default.js +1 -1
  499. package/registry/examples/update-prompt/default.tsx +1 -1
  500. package/registry/examples/update-prompt/native/default.js +1 -1
  501. package/registry/examples/update-prompt/native/default.tsx +1 -1
  502. package/registry/examples/video-player/signed-source.js +1 -1
  503. package/registry/examples/video-player/signed-source.tsx +1 -1
  504. package/registry/field.json +1 -1
  505. package/registry/file-upload.json +2 -2
  506. package/registry/filter-bar.json +1 -1
  507. package/registry/flock.json +1 -1
  508. package/registry/footnote.json +1 -1
  509. package/registry/force-update-screen.json +4 -4
  510. package/registry/form-flow.json +1 -1
  511. package/registry/form.json +2 -2
  512. package/registry/gallery-page.json +5 -5
  513. package/registry/genui.json +4 -4
  514. package/registry/glossary-term.json +1 -1
  515. package/registry/glossary.json +1 -1
  516. package/registry/glow-card.json +1 -1
  517. package/registry/goal-gauge.json +6 -6
  518. package/registry/grade-stamp.json +1 -1
  519. package/registry/identity-card.json +1 -1
  520. package/registry/image-cropper.json +2 -2
  521. package/registry/index.json +33 -33
  522. package/registry/kanban.json +1 -1
  523. package/registry/kbd.json +1 -1
  524. package/registry/kind-config-editor.json +1 -1
  525. package/registry/kpi-explained.json +1 -1
  526. package/registry/landing-page.json +3 -3
  527. package/registry/landscape.json +2 -2
  528. package/registry/language-switch.json +1 -1
  529. package/registry/legal-page.json +1 -1
  530. package/registry/link-card.json +5 -5
  531. package/registry/list.json +7 -7
  532. package/registry/loader.json +12 -12
  533. package/registry/longform-page.json +4 -4
  534. package/registry/maintenance-screen.json +4 -4
  535. package/registry/map.json +3 -3
  536. package/registry/margin-layout.json +1 -1
  537. package/registry/markdown.json +1 -1
  538. package/registry/marketing-layout.json +6 -6
  539. package/registry/mascot-quote.json +1 -1
  540. package/registry/mascot-state.json +1 -1
  541. package/registry/mascots.json +5 -5
  542. package/registry/match-dialog.json +1 -1
  543. package/registry/media-capture.json +2 -2
  544. package/registry/media-gallery.json +62 -10
  545. package/registry/meter.json +1 -1
  546. package/registry/money-input.json +1 -1
  547. package/registry/nav-bar.json +27 -23
  548. package/registry/next-actions.json +1 -1
  549. package/registry/notification-preferences.json +1 -1
  550. package/registry/number-ticker.json +1 -1
  551. package/registry/opening-hours.json +1 -1
  552. package/registry/page-header.json +1 -1
  553. package/registry/page-hero.json +1 -1
  554. package/registry/page-index.json +1 -1
  555. package/registry/page.json +1 -1
  556. package/registry/pagination.json +1 -1
  557. package/registry/pointer-light.json +1 -1
  558. package/registry/popover.json +1 -1
  559. package/registry/price-catalogue-editor.json +3 -3
  560. package/registry/pricing-page.json +5 -5
  561. package/registry/product-page.json +13 -13
  562. package/registry/profile-card.json +12 -12
  563. package/registry/progress.json +1 -1
  564. package/registry/promise-card.json +6 -6
  565. package/registry/promo-code-field.json +3 -3
  566. package/registry/proposal.json +4 -4
  567. package/registry/pull-to-refresh.json +2 -2
  568. package/registry/qr-code.json +1 -1
  569. package/registry/quota-meter.json +3 -3
  570. package/registry/radio-group.json +1 -1
  571. package/registry/rail-nav.json +38 -34
  572. package/registry/recipes.json +1 -1
  573. package/registry/retro-tv.json +2 -2
  574. package/registry/reviews.json +1 -1
  575. package/registry/router.json +1 -1
  576. package/registry/schema-form.json +4 -4
  577. package/registry/scroll-stage.json +6 -6
  578. package/registry/search-field.json +2 -2
  579. package/registry/section-backdrop.json +1 -1
  580. package/registry/separator.json +3 -3
  581. package/registry/service-card.json +1 -1
  582. package/registry/settings-layout.json +1 -1
  583. package/registry/shop-composer.json +8 -8
  584. package/registry/shop-gallery.json +3 -3
  585. package/registry/shop.json +12 -12
  586. package/registry/showcase.json +1 -1
  587. package/registry/signature.json +1 -1
  588. package/registry/site-cahier.json +1 -1
  589. package/registry/site-footer.json +29 -25
  590. package/registry/sites.json +3 -3
  591. package/registry/skeleton.json +1 -1
  592. package/registry/skip-link.json +1 -1
  593. package/registry/slider.json +1 -1
  594. package/registry/slot-picker.json +1 -1
  595. package/registry/slot.json +1 -1
  596. package/registry/specimen-tag.json +4 -4
  597. package/registry/speed-lines.json +1 -1
  598. package/registry/spinner.json +1 -1
  599. package/registry/splash-handoff.json +4 -4
  600. package/registry/split-view.json +2 -2
  601. package/registry/stage-banner.json +7 -7
  602. package/registry/stat.json +3 -3
  603. package/registry/state-screen.json +1 -1
  604. package/registry/status-chip.json +1 -1
  605. package/registry/status-page.json +9 -9
  606. package/registry/step-progress.json +1 -1
  607. package/registry/step-showcase.json +10 -10
  608. package/registry/stepper.json +2 -2
  609. package/registry/sticky-action.json +1 -1
  610. package/registry/stuck.json +4 -4
  611. package/registry/swipe-deck.json +2 -2
  612. package/registry/switch.json +1 -1
  613. package/registry/tabs.json +1 -1
  614. package/registry/tag-input.json +2 -2
  615. package/registry/tag-selector.json +1 -1
  616. package/registry/taped-photo.json +1 -1
  617. package/registry/terminal-replay.json +2 -2
  618. package/registry/text-style.json +1 -1
  619. package/registry/theme.json +1 -1
  620. package/registry/toast.json +1 -1
  621. package/registry/toc.json +1 -1
  622. package/registry/tooltip.json +1 -1
  623. package/registry/tree-view.json +4 -4
  624. package/registry/update-prompt.json +8 -8
  625. package/registry/upload-queue.json +3 -3
  626. package/registry/usage.json +3 -3
  627. package/registry/verified-badge.json +1 -1
  628. package/registry/versus-card.json +1 -1
  629. package/registry/vertical-video.json +1 -1
  630. package/registry/video-player.json +3 -3
  631. package/registry/video-trimmer.json +2 -2
  632. package/registry/virtual.json +2 -2
  633. package/registry/wall.json +1 -1
  634. package/registry/waveform.json +2 -2
  635. package/skills/form/SKILL.md +1 -1
  636. package/skills/map/SKILL.md +2 -2
  637. package/dist/chunk-6KZDARNX.js.map +0 -1
  638. package/dist/chunk-DRTIE44Z.js.map +0 -1
  639. package/dist/chunk-E46AEUPH.js.map +0 -1
  640. package/dist/chunk-IOTY5HYG.js.map +0 -1
  641. package/dist/chunk-LZK4IRVW.js +0 -307
  642. package/dist/chunk-LZK4IRVW.js.map +0 -1
  643. package/dist/chunk-M3T5RQYV.js.map +0 -1
  644. package/dist/chunk-RCHKIOVV.js.map +0 -1
  645. /package/dist/{chunk-DSDFXPL6.js.map → chunk-757ZTGU5.js.map} +0 -0
  646. /package/dist/{chunk-CEW3LQOZ.js.map → chunk-IEGTRCDI.js.map} +0 -0
  647. /package/dist/{chunk-KVDB4GXV.js.map → chunk-KR2W4ONJ.js.map} +0 -0
  648. /package/dist/{chunk-GOGEYAYK.js.map → chunk-PRD7JRQX.js.map} +0 -0
  649. /package/dist/{chunk-VYZFQE3P.js.map → chunk-QD6SNXF5.js.map} +0 -0
  650. /package/dist/{chunk-YQWYGQTV.js.map → chunk-UIP3WX5O.js.map} +0 -0
  651. /package/dist/{chunk-ZKKMYIDN.js.map → chunk-Y3P5B4XS.js.map} +0 -0
  652. /package/dist/{chunk-GW5EI7MI.js.map → chunk-YXETEQQJ.js.map} +0 -0
  653. /package/dist/{player-lightbox-ASFOSUSD.js.map → player-lightbox-BYQ57OXT.js.map} +0 -0
  654. /package/registry/examples/dashboard-layout/{orazaka-eric.d.ts → sovkora-eric.d.ts} +0 -0
  655. /package/registry/examples/{product-page/orazaka.d.ts → media-gallery/carousel-autoplay.d.ts} +0 -0
@@ -2,8 +2,8 @@
2
2
  "name": "media-gallery",
3
3
  "type": "primitive",
4
4
  "title": "Media gallery",
5
- "summary": "Also `MediaCarousel` (3 to 4 realisations, one at a time), `MediaPlayer` (the one video frame: inline, lightbox, 9:16) and `PausableLoop` (a silent loop with a visible pause, its own entry). A shop's own photos and loops in tiles, the first featured, a caption on the foot of a tile.",
6
- "description": "Also `MediaCarousel` (3 to 4 realisations, one at a time), `MediaPlayer` (the one video frame: inline, lightbox, 9:16) and `PausableLoop` (a silent loop with a visible pause, its own entry). A shop's own photos and loops in tiles, the first featured, a caption on the foot of a tile.",
5
+ "summary": "Also `MediaCarousel` (clips, screen demos and stills one at a time; `autoplay` with a visible pause, optional sound, its files checked by `krizaka-media-guard`), `MediaPlayer` (the one video frame: inline, lightbox, 9:16) and `PausableLoop` (a silent loop with a visible pause). A shop's own photos and loops in tiles, the first featured.",
6
+ "description": "Also `MediaCarousel` (clips, screen demos and stills one at a time; `autoplay` with a visible pause, optional sound, its files checked by `krizaka-media-guard`), `MediaPlayer` (the one video frame: inline, lightbox, 9:16) and `PausableLoop` (a silent loop with a visible pause). A shop's own photos and loops in tiles, the first featured.",
7
7
  "status": "beta",
8
8
  "deprecated": null,
9
9
  "category": "media",
@@ -33,7 +33,11 @@
33
33
  "bestPractices": [
34
34
  "Real photos only; every tile has `alt` text that says what it shows.",
35
35
  "Give a landscape source `shape=\"wide\"` so it is not cropped to a portrait.",
36
- "Keep loops short and few: one or two per gallery."
36
+ "Keep loops short and few: one or two per gallery.",
37
+ "Carousel: 16:9 files only, checked before they ship — `krizaka-media-guard slides.json` refuses a vertical reel in a wide file (pillarbox), a letterbox, a black end card, an mp4 that is not H.264 yuv420p fast start, and an `audio` or `duration` that does not match the file.",
38
+ "Carousel: give each clip its `duration` (the guard reports it): with `autoplay` a slide stays for it, within 5–45 s; a still stays 6.5 s. The clip loops while its slide stays, so it never holds a last frame.",
39
+ "Carousel: `sound` only for slides whose file has sound; it plays after the visitor presses « Sound on », then only under the pointer or the focus.",
40
+ "Carousel on a company site: `frame=\"cahier\"`, `caption=\"bar\"`, `textVersion`, and the product's `data-hue` on the carousel or an ancestor."
37
41
  ],
38
42
  "accessibility": {
39
43
  "keyboard": [],
@@ -44,7 +48,11 @@
44
48
  "One slide draws no toolbar and no count. A loop (`PausableLoop` of `@krizaka/ui/pausable-loop`, handed to the carousel's `renderLoop` for a slide's `video`, also on a film slide, where it previews the film, or to `MediaPlayer`'s `preview`) is fetched after the page's `load`, plays only while on screen and on the slide in view, and has a visible pause / play button (the words of `PausableLoop`'s `labels`); under reduced motion or Save-Data the poster stays alone and there is no control, since nothing moves.",
45
49
  "Every word is a prop: the carousel's `labels`, the lightbox player's `playerLabels` (or a film's own `labels`), `MediaPlayer`'s `labels`, `playLabel`, `closeLabel`, and `PausableLoop`'s `labels`; English by default.",
46
50
  "`MediaPlayer` in a lightbox opens on the poster, waiting for a press on play, under reduced motion. `trigger` swaps the poster for the page's own opener (focus returns to it on close), `open` / `onOpenChange` drive it from outside, `ratio` takes any frame (`19 / 16`).",
47
- "Nothing moves under the pointer and nothing advances by itself; a loop plays only on the slide in view, never under reduced motion (the still shows, the buttons stay).",
51
+ "Nothing moves under the pointer; without `autoplay` nothing advances by itself; a loop plays only on the slide in view, never under reduced motion (the still shows, the buttons stay).",
52
+ "`autoplay` (WCAG 2.2.2): a visible pause / play in the toolbar; it also holds under the pointer (not a touch), on a keyboard focus inside, while the tab is hidden and off screen; the count is announced only while held; it wraps. The clock is the current tick's CSS animation, so a hold keeps it where it stood. Under reduced motion or Save-Data: no clock, no clip, no pause button, the current tick full.",
53
+ "The carousel draws a slide's `video` itself (v2): one `<video>`, the current slide's, muted, mounted after the page's `load`, `webm` before `mp4`; if no source plays it unmounts and the poster stays. Only the posters seen and the next one are drawn, the first eagerly.",
54
+ "`sound`: « Sound on » is a toggle (`aria-pressed`) shown only when a slide declares `audio`; after the press, the pointer or the focus in the carousel unmutes that slide's clip, leaving mutes it; the choice lasts the session; never under reduced motion.",
55
+ "Only the buttons take the focus, and their ring shows for the keyboard only (`:focus-visible`): no frame around the stage. `textVersion` adds a native `<details>` with every caption, text and chapter.",
48
56
  "A loop is decorative (`aria-hidden`), starts only while its tile is on screen and never under reduced motion."
49
57
  ]
50
58
  },
@@ -93,6 +101,30 @@
93
101
  "module": "@krizaka/ui/registry/examples/media-gallery/carousel",
94
102
  "code": "import { MediaCarousel } from \"@krizaka/ui/media-carousel\";\n\n// Drawn pictures (data URIs, no network); a page passes its own realisations.\nconst PIC = (a: string, b: string) => `data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 500'><defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='${a}'/><stop offset='1' stop-color='${b}'/></linearGradient></defs><rect width='800' height='500' fill='url(#g)'/></svg>`)}`;\n\n// Three realisations, one at a time; the first opens its film in a lightbox. Nothing advances by itself.\nexport default function MediaCarouselExample() {\n return (\n <div className=\"max-w-xl\">\n <MediaCarousel\n label=\"Realisations\"\n slides={[\n { id: \"a\", src: PIC(\"#1d3f6b\", \"#4d7fb8\"), alt: \"The brand film\", caption: \"Fig. 1a\", film: { src: \"https://krizaka-assets.b-cdn.net/org/v1/films/film/le-monde-de-krizaka-16x9.b1c7c4ee51.mp4\", title: \"Film: the world of Krizaka\", playLabel: \"Play the film\" } },\n { id: \"b\", src: PIC(\"#23496f\", \"#6b9bc9\"), alt: \"A lease read in a minute\", caption: \"Fig. 1b\" },\n { id: \"c\", src: PIC(\"#2a3f5c\", \"#7aa5d6\"), alt: \"A return prepared, never filed\", caption: \"Fig. 1c\" },\n ]}\n />\n </div>\n );\n}\n"
95
103
  },
104
+ {
105
+ "name": "carousel-autoplay",
106
+ "title": "Carousel v2, autoplay",
107
+ "description": "It advances by itself at each slide's pace, with ticks and a visible pause; holds under the pointer, on keyboard focus and off screen; nothing moves under reduced motion.",
108
+ "path": "examples/media-gallery/carousel-autoplay.tsx",
109
+ "module": "@krizaka/ui/registry/examples/media-gallery/carousel-autoplay",
110
+ "code": "import { MediaCarousel } from \"@krizaka/ui/media-carousel\";\n\nconst PIC = (a: string, b: string) => `data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900'><defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='${a}'/><stop offset='1' stop-color='${b}'/></linearGradient></defs><rect width='1600' height='900' fill='url(#g)'/></svg>`)}`;\n\n// Carousel v2: it advances by itself at each slide's pace (a clip for its duration, a still for a reading time), with ticks\n// and a visible pause; it holds under the pointer, on keyboard focus and off screen. Nothing moves under reduced motion.\nexport default function MediaCarouselAutoplayExample() {\n return (\n <div className=\"max-w-2xl\">\n <MediaCarousel\n label=\"What the engine made\"\n autoplay\n slides={[\n { id: \"a\", kind: \"still\", src: PIC(\"#1d3f6b\", \"#4d7fb8\"), alt: \"A tea pour, the steam lit from the left\", caption: \"Fig. 2a — a product shot\" },\n { id: \"b\", kind: \"still\", src: PIC(\"#23496f\", \"#6b9bc9\"), alt: \"A storyboard of six frames\", caption: \"Fig. 2b — a storyboard\" },\n { id: \"c\", kind: \"still\", src: PIC(\"#2a3f5c\", \"#7aa5d6\"), alt: \"A finished cut on the timeline\", caption: \"Fig. 2c — the cut\" },\n ]}\n />\n </div>\n );\n}\n"
111
+ },
112
+ {
113
+ "name": "carousel-cahier",
114
+ "title": "Carousel v2, Cahier frame and sound",
115
+ "description": "The company's sites: square frame with a paper shadow, the caption in the bar, a hue, the text version, « Sound on » for the slides with sound.",
116
+ "path": "examples/media-gallery/carousel-cahier.tsx",
117
+ "module": "@krizaka/ui/registry/examples/media-gallery/carousel-cahier",
118
+ "code": "import { MediaCarousel } from \"@krizaka/ui/media-carousel\";\n\nconst PIC = (a: string) => `data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900'><rect width='1600' height='900' fill='${a}'/></svg>`)}`;\n\n// The company's sites: the Cahier frame (square, a solid paper shadow), the caption in the bar, a hue per product, the\n// text version under it, and « Sound on » for the slides that have sound (pressed first, then hover or focus plays it).\nexport default function MediaCarouselCahierExample() {\n return (\n <div className=\"max-w-2xl\" data-hue=\"cobalt\">\n <MediaCarousel\n label=\"Sovkora, what it made\"\n autoplay\n sound\n frame=\"cahier\"\n caption=\"bar\"\n textVersion\n slides={[\n { id: \"a\", src: PIC(\"#1d3f6b\"), alt: \"A duck builds a shelf in a workshop\", caption: \"Fig. 3a — a clip from one prompt\", audio: true },\n { id: \"b\", src: PIC(\"#2a3f5c\"), alt: \"The run's cost and model, side by side\", caption: \"Fig. 3b — the run, accounted for\", text: \"The run's page: the model, the cost and the time, line by line.\" },\n ]}\n >\n <p>Clips generated with Sovkora; stills drawn for this example.</p>\n </MediaCarousel>\n </div>\n );\n}\n"
119
+ },
120
+ {
121
+ "name": "carousel-demo",
122
+ "title": "Carousel v2, screen demo with chapters",
123
+ "description": "A 30 s product journey: chapter marks on the tick, the caption follows the step under the playhead, the steps in the text version.",
124
+ "path": "examples/media-gallery/carousel-demo.tsx",
125
+ "module": "@krizaka/ui/registry/examples/media-gallery/carousel-demo",
126
+ "code": "import { MediaCarousel } from \"@krizaka/ui/media-carousel\";\n\nconst PIC = `data:image/svg+xml,${encodeURIComponent(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900'><rect width='1600' height='900' fill='#23496f'/></svg>\")}`;\n\n// A screen demo: a product journey of 30 s with its chapters — marks on the tick, the caption follows the step under the\n// playhead, the steps listed in the text version. Its files pass `krizaka-media-guard` (16:9, no bars, no black end card).\nexport default function MediaCarouselDemoExample() {\n return (\n <div className=\"max-w-2xl\">\n <MediaCarousel\n label=\"Verikora, a lease read\"\n autoplay\n caption=\"bar\"\n textVersion\n slides={[\n {\n id: \"journey\",\n kind: \"screen-demo\",\n src: PIC,\n alt: \"Eric drops a lease and reads its report\",\n caption: \"Fig. 4 — a lease read in a minute\",\n duration: 30,\n chapters: [\n { at: 0, label: \"Drop the lease\" },\n { at: 9, label: \"The clauses found\" },\n { at: 21, label: \"The report\" },\n ],\n },\n { id: \"report\", kind: \"still\", src: PIC, alt: \"The report, page one\", caption: \"Fig. 4b — the report\" },\n ]}\n />\n </div>\n );\n}\n"
127
+ },
96
128
  {
97
129
  "name": "carousel-single",
98
130
  "title": "Carousel, one slide",
@@ -135,7 +167,27 @@
135
167
  },
136
168
  {
137
169
  "path": "media-gallery/carousel-index.ts",
138
- "content": "/** @krizaka/ui/media-carousel — `MediaCarousel` (`slides`, `label`): 3–4 realisations one at a time, a slide may open its film. Client. */\nexport { type CarouselSlide, MediaCarousel, mediaCarousel, type MediaCarouselLabels, mediaCarouselLabels, type MediaCarouselProps } from \"./media-carousel\";\n"
170
+ "content": "/** @krizaka/ui/media-carousel — `MediaCarousel` (`slides`, `label`; v2, ADR-010: `autoplay`, `sound`, `frame`, `caption`, `textVersion`): a sequence of clips, screen demos and stills given as data, one at a time; `carouselDwell`, `chapterAt`. Its files are checked by `@krizaka/ui/media-guard`. Client. */\nexport {\n CAROUSEL_MAX_DWELL,\n CAROUSEL_MIN_DWELL,\n type CarouselAutoplay,\n type CarouselChapter,\n carouselDwell,\n type CarouselSlide,\n type CarouselSlideKind,\n chapterAt,\n MediaCarousel,\n mediaCarousel,\n type MediaCarouselLabels,\n mediaCarouselLabels,\n type MediaCarouselProps,\n} from \"./media-carousel\";\n"
171
+ },
172
+ {
173
+ "path": "media-gallery/guard/bin.ts",
174
+ "content": "// krizaka-media-guard <slides.json> [--base <url>] [--json] — runs the media guard (ADR-010 §4) on a carousel's real files.\n// slides.json: an array of { id, src, video: { webm, mp4 }, audio, duration } (relative URLs resolved against --base).\n// Needs ffprobe and ffmpeg on the PATH and the network. Exit 1 when a file is unfit; --json prints the measured lengths and audio.\nimport { execFileSync } from \"node:child_process\";\nimport { readFile } from \"node:fs/promises\";\n\nimport { ffmpegPort } from \"./ffmpeg\";\nimport { guardSlides } from \"./guard\";\nimport type { GuardSlide } from \"./rules\";\n\n// @fixed: ffmpeg reads a remote clip; a stalled one is reported after two minutes.\nconst TOOL_TIMEOUT_MS = 120_000;\n\nconst args = process.argv.slice(2);\nconst option = (flag: string) => (args.includes(flag) ? args[args.indexOf(flag) + 1] : undefined);\nconst file = args.find((a, i) => !a.startsWith(\"--\") && args[i - 1] !== \"--base\");\nif (!file) {\n console.error(\"usage: krizaka-media-guard <slides.json> [--base <url>] [--json]\");\n process.exit(2);\n}\nconst base = option(\"--base\");\nconst at = (url: string) => (base ? new URL(url, base).href : url);\nconst slides = (JSON.parse(await readFile(file, \"utf8\")) as GuardSlide[]).map((s) => ({\n ...s,\n src: at(s.src),\n video: s.video && { webm: s.video.webm && at(s.video.webm), mp4: s.video.mp4 && at(s.video.mp4) },\n}));\nconst run = (command: string, list: readonly string[]) => execFileSync(command, list, { encoding: \"utf8\", stdio: [\"ignore\", \"pipe\", \"pipe\"], timeout: TOOL_TIMEOUT_MS, maxBuffer: 1 << 26 });\nconst report = await guardSlides(slides, ffmpegPort(run));\nif (args.includes(\"--json\")) console.log(JSON.stringify(report, null, 2));\nif (report.problems.length > 0) {\n console.error(report.problems.join(\"\\n\"));\n process.exitCode = 1;\n} else if (!args.includes(\"--json\")) {\n console.log(`media guard: ${slides.length} slide(s) fit for a carousel — 16:9, clean frames, Safari and Chrome encodes, truthful audio`);\n}\n"
175
+ },
176
+ {
177
+ "path": "media-gallery/guard/ffmpeg.ts",
178
+ "content": "import { type FileFacts, type FrameBands, type MediaPort, type StreamFacts, StreamKind } from \"./rules\";\n\n/** Runs a command and returns its standard output (the bin passes `execFileSync`; tests pass a fake). */\nexport type Run = (command: string, args: readonly string[]) => string;\n\nconst CROPS = {\n left: \"iw*0.2:ih:0:0\",\n right: \"iw*0.2:ih:iw*0.8:0\",\n centre: \"iw*0.3:ih:iw*0.35:0\",\n top: \"iw:ih*0.12:0:0\",\n bottom: \"iw:ih*0.12:0:ih*0.88\",\n middle: \"iw:ih*0.3:0:ih*0.35\",\n} as const;\n\nconst KINDS: Record<string, StreamFacts[\"kind\"]> = { video: StreamKind.Video, audio: StreamKind.Audio };\n\n/** ffprobe's JSON (`-show_entries stream=…:format=duration -of json`) as the guard's facts. */\nexport function parseProbe(json: string): FileFacts {\n const raw = JSON.parse(json) as { streams?: Record<string, unknown>[]; format?: { duration?: string } };\n const streams = (raw.streams ?? []).map((s) => ({\n kind: KINDS[String(s.codec_type)] ?? StreamKind.Other,\n codec: typeof s.codec_name === \"string\" ? s.codec_name : \"\",\n width: typeof s.width === \"number\" ? s.width : undefined,\n height: typeof s.height === \"number\" ? s.height : undefined,\n pixFmt: typeof s.pix_fmt === \"string\" ? s.pix_fmt : undefined,\n }));\n const duration = raw.format?.duration ? Number.parseFloat(raw.format.duration) : undefined;\n return { streams, duration: Number.isFinite(duration) ? duration : undefined };\n}\n\n/** The values of one signalstats key printed by ffmpeg's `metadata=print`, in frame order. */\nexport const statValues = (out: string, key: string) =>\n out\n .split(`${key}=`)\n .slice(1)\n .map((chunk) => Number.parseFloat(chunk));\n\n/** A `MediaPort` on ffprobe and ffmpeg (both on the PATH) and `fetch`. */\nexport function ffmpegPort(run: Run, fetcher: typeof fetch = fetch): MediaPort {\n const stat = (url: string, crop: string, key: string) =>\n statValues(run(\"ffmpeg\", [\"-v\", \"error\", \"-i\", url, \"-vf\", `fps=5,crop=${crop},signalstats,metadata=print:key=lavfi.signalstats.${key}:file=-`, \"-f\", \"null\", \"-\"]), key);\n return {\n head: async (url) => {\n const r = await fetcher(url, { method: \"HEAD\" });\n return { status: r.status, contentType: r.headers.get(\"content-type\") ?? \"\" };\n },\n facts: async (url) => parseProbe(run(\"ffprobe\", [\"-v\", \"error\", \"-show_entries\", \"stream=codec_type,codec_name,width,height,pix_fmt:format=duration\", \"-of\", \"json\", url])),\n bands: async (url) => {\n const columns = Object.fromEntries(Object.entries(CROPS).map(([band, crop]) => [band, stat(url, crop, \"YMAX\")])) as Record<keyof FrameBands, number[]>;\n return columns.left.map((_, i) => Object.fromEntries(Object.keys(CROPS).map((band) => [band, columns[band as keyof FrameBands][i] ?? 0])) as FrameBands);\n },\n lastFrameLuma: async (url) =>\n statValues(run(\"ffmpeg\", [\"-v\", \"error\", \"-sseof\", \"-0.1\", \"-i\", url, \"-frames:v\", \"1\", \"-vf\", \"signalstats,metadata=print:key=lavfi.signalstats.YAVG:file=-\", \"-f\", \"null\", \"-\"]), \"YAVG\")[0] ?? 0,\n firstBytes: async (url) => {\n const r = await fetcher(url, { headers: { range: \"bytes=0-65535\" } });\n return new Uint8Array(await r.arrayBuffer());\n },\n };\n}\n"
179
+ },
180
+ {
181
+ "path": "media-gallery/guard/guard.ts",
182
+ "content": "import { encodeProblems, expectedType, fastStart, type GuardSlide, type MediaPort, pictureProblems, StreamKind } from \"./rules\";\n\n/** What the guard measured on a slide: its length and whether it has sound, to write back into the slides' data. */\nexport type Measured = { id: string; duration?: number; audio: boolean };\nexport type GuardReport = { problems: string[]; measured: Measured[] };\n\nasync function httpProblems(name: string, url: string, port: MediaPort): Promise<string[]> {\n const { status, contentType } = await port.head(url);\n if (status !== 200) return [`${name}: ${url} answers HTTP ${status}`];\n const type = expectedType(url);\n return contentType.startsWith(type) ? [] : [`${name}: ${url} is ${contentType || \"untyped\"}, expected ${type}`];\n}\n\nasync function slideReport(slide: GuardSlide, port: MediaPort): Promise<GuardReport> {\n const problems = await httpProblems(`${slide.id} poster`, slide.src, port);\n const encodes = ([\"webm\", \"mp4\"] as const).filter((ext) => slide.video?.[ext]);\n if (slide.video && !slide.video.mp4) problems.push(`${slide.id}: no mp4 (H.264) — Safari plays no webm on iOS before 17.4`);\n let measured: Measured = { id: slide.id, audio: false };\n for (const ext of encodes) {\n const url = slide.video![ext]!;\n const http = await httpProblems(`${slide.id}.${ext}`, url, port);\n problems.push(...http);\n if (http.length > 0) continue;\n const facts = await port.facts(url);\n problems.push(...encodeProblems(slide.id, ext, facts, slide));\n measured = { id: slide.id, duration: facts.duration, audio: facts.streams.some((s) => s.kind === StreamKind.Audio) };\n if (ext === \"mp4\" && fastStart(await port.firstBytes(url)) === false) problems.push(`${slide.id}.mp4: moov after mdat — encode with -movflags +faststart`);\n }\n const picture = slide.video?.mp4 ?? slide.video?.webm;\n if (picture && problems.length === 0) problems.push(...pictureProblems(slide.id, await port.bands(picture), await port.lastFrameLuma(picture)));\n return { problems, measured: slide.video ? [measured] : [] };\n}\n\n/** Runs every rule of ADR-010 §4 on the slides' real files, through `port`. Empty `problems`: the files are fit for a carousel. */\nexport async function guardSlides(slides: readonly GuardSlide[], port: MediaPort): Promise<GuardReport> {\n const report: GuardReport = { problems: [], measured: [] };\n for (const slide of slides) {\n const one = await slideReport(slide, port);\n report.problems.push(...one.problems);\n report.measured.push(...one.measured);\n }\n return report;\n}\n"
183
+ },
184
+ {
185
+ "path": "media-gallery/guard/index.ts",
186
+ "content": "/** @krizaka/ui/media-guard — the media guard of `MediaCarousel` (ADR-010 §4): `guardSlides(slides, port)` checks a carousel's real files (16:9 by pixels, H.264 yuv420p fast start + VP9, no pillarbox / letterbox, no black end card, a truthful `audio` and `duration`); `ffmpegPort(run)` measures with ffprobe / ffmpeg; the bin `krizaka-media-guard` runs it. Node, no React. */\nexport { ffmpegPort, parseProbe, type Run, statValues } from \"./ffmpeg\";\nexport { type GuardReport, guardSlides, type Measured } from \"./guard\";\nexport {\n blackEndCard,\n encodeProblems,\n fastStart,\n type FileFacts,\n type FrameBands,\n type GuardSlide,\n isSixteenNine,\n letterboxed,\n type MediaPort,\n pictureProblems,\n pillarboxed,\n type StreamFacts,\n StreamKind,\n} from \"./rules\";\n"
187
+ },
188
+ {
189
+ "path": "media-gallery/guard/rules.ts",
190
+ "content": "// The rules of the media guard (ADR-010 §4), as pure functions over what ffprobe / ffmpeg measured. No I/O here: the\n// measures come through a `MediaPort` (`./ffmpeg` builds one from a command runner), so every rule is tested on numbers.\n\n// @fixed: encoder rounding — a frame may be off 16:9 by this much in |w·9 − h·16| (1280×720 and 1920×1080 are exact).\nexport const RATIO_TOLERANCE = 16;\n// @fixed: a band is « black » under this peak luma (0–255).\nexport const BLACK_PEAK = 24;\n// @fixed: the middle of a frame is a picture over this peak luma.\nexport const PICTURE_PEAK = 60;\n// @fixed: a last frame whose average luma is under this is a black end card, not a picture.\nexport const DARK_LAST_FRAME = 6;\n// @fixed: a declared duration may differ from the file's by this many seconds (the last frame's rounding).\nexport const DURATION_TOLERANCE = 0.25;\n\n/** What a carousel slide says about its files: the guard checks that it says the truth. */\nexport type GuardSlide = { id: string; src: string; video?: { webm?: string; mp4?: string }; audio?: boolean; duration?: number };\n\n/** The kinds of stream ffprobe reports that the guard reads. */\nexport const StreamKind = { Video: \"video\", Audio: \"audio\", Other: \"other\" } as const;\nexport type StreamKind = (typeof StreamKind)[keyof typeof StreamKind];\nexport type StreamFacts = { kind: StreamKind; codec: string; width?: number; height?: number; pixFmt?: string };\nexport type FileFacts = { streams: StreamFacts[]; duration?: number };\n/** One sampled frame's peak luma in six bands: the side bars, the top and bottom bands, and the middles they frame. */\nexport type FrameBands = { left: number; right: number; centre: number; top: number; bottom: number; middle: number };\n\n/** The measures the guard needs, one file at a time (an HTTP client and ffprobe / ffmpeg in the bin; fakes in tests). */\nexport type MediaPort = {\n head: (url: string) => Promise<{ status: number; contentType: string }>;\n facts: (url: string) => Promise<FileFacts>;\n bands: (url: string) => Promise<FrameBands[]>;\n lastFrameLuma: (url: string) => Promise<number>;\n firstBytes: (url: string) => Promise<Uint8Array>;\n};\n\nconst EXPECTED = {\n mp4: { type: \"video/mp4\", codec: \"h264\", pixFmt: \"yuv420p\" },\n webm: { type: \"video/webm\", codec: \"vp9\" },\n} as const;\n\n/** Is a width and height a 16:9, within the encoder's rounding? */\nexport const isSixteenNine = (width: number, height: number) => width > 0 && height > 0 && Math.abs(width * 9 - height * 16) <= RATIO_TOLERANCE;\n\n/** The frames that are a picture between two black side bars (a vertical reel in a wide file). */\nexport const pillarboxed = (frames: readonly FrameBands[]) => frames.filter((f) => f.left < BLACK_PEAK && f.right < BLACK_PEAK && f.centre > PICTURE_PEAK);\n\n/** The frames that are a picture between a black top and bottom band (a wider picture in a 16:9 file). */\nexport const letterboxed = (frames: readonly FrameBands[]) => frames.filter((f) => f.top < BLACK_PEAK && f.bottom < BLACK_PEAK && f.middle > PICTURE_PEAK);\n\n/** Is the average luma of the last frame a black end card? */\nexport const blackEndCard = (luma: number) => luma < DARK_LAST_FRAME;\n\nconst box = (bytes: Uint8Array, at: number) => ({\n size: ((bytes[at]! << 24) >>> 0) + (bytes[at + 1]! << 16) + (bytes[at + 2]! << 8) + bytes[at + 3]!,\n type: String.fromCodePoint(bytes[at + 4]!, bytes[at + 5]!, bytes[at + 6]!, bytes[at + 7]!),\n});\n\n/** Walks an MP4's top-level boxes: `true` when `moov` comes before `mdat` (it plays before it is downloaded), `false` after, `undefined` if the bytes do not tell. */\nexport function fastStart(bytes: Uint8Array): boolean | undefined {\n let at = 0;\n while (at + 8 <= bytes.length) {\n const { size, type } = box(bytes, at);\n if (type === \"moov\") return true;\n if (type === \"mdat\") return false;\n if (size < 8) return undefined;\n at += size;\n }\n return undefined;\n}\n\n/** What is wrong with one encode of a slide's clip, as sentences (empty: fine). */\nexport function encodeProblems(name: string, ext: \"mp4\" | \"webm\", facts: FileFacts, slide: GuardSlide): string[] {\n const problems: string[] = [];\n const video = facts.streams.find((s) => s.kind === StreamKind.Video);\n if (!video) return [`${name}.${ext}: no video stream`];\n const expected = EXPECTED[ext];\n if (video.codec !== expected.codec) problems.push(`${name}.${ext}: codec ${video.codec}, expected ${expected.codec}`);\n if (\"pixFmt\" in expected && video.pixFmt && video.pixFmt !== expected.pixFmt) problems.push(`${name}.${ext}: pixel format ${video.pixFmt}, Safari needs ${expected.pixFmt}`);\n if (!isSixteenNine(video.width ?? 0, video.height ?? 0)) problems.push(`${name}.${ext}: ${video.width}x${video.height} is not 16:9`);\n const hasAudio = facts.streams.some((s) => s.kind === StreamKind.Audio);\n if (hasAudio !== Boolean(slide.audio)) problems.push(`${name}.${ext}: ${hasAudio ? \"has\" : \"has no\"} audio track, the slide says audio: ${Boolean(slide.audio)}`);\n if (slide.duration !== undefined && facts.duration !== undefined && Math.abs(slide.duration - facts.duration) > DURATION_TOLERANCE)\n problems.push(`${name}.${ext}: lasts ${facts.duration.toFixed(2)} s, the slide says ${slide.duration} s`);\n return problems;\n}\n\n/** What is wrong with what a clip shows, as sentences (empty: fine). */\nexport function pictureProblems(name: string, frames: readonly FrameBands[], lastLuma: number): string[] {\n const problems: string[] = [];\n const pillars = pillarboxed(frames).length;\n if (pillars > 0) problems.push(`${name}: ${pillars} frame(s) are a picture between black side bars (pillarbox)`);\n const letters = letterboxed(frames).length;\n if (letters > 0) problems.push(`${name}: ${letters} frame(s) are a picture between black top and bottom bands (letterbox)`);\n if (blackEndCard(lastLuma)) problems.push(`${name}: the last frame is black (an end card)`);\n return problems;\n}\n\n/** The type a URL must answer with. */\nexport function expectedType(url: string): string {\n const path = url.split(\"?\")[0] ?? url;\n if (path.endsWith(\".webm\")) return EXPECTED.webm.type;\n if (path.endsWith(\".mp4\")) return EXPECTED.mp4.type;\n return \"image/\";\n}\n"
139
191
  },
140
192
  {
141
193
  "path": "media-gallery/index.ts",
@@ -147,7 +199,7 @@
147
199
  },
148
200
  {
149
201
  "path": "media-gallery/media-carousel.tsx",
150
- "content": "// Client (the slide in view, the reader's motion preference). A few realisations in one frame: a scroll-snap track moved by\n// a swipe, previous / next buttons in a toolbar that also takes the arrow keys, a « n / N » count. Nothing advances by itself and nothing moves under the pointer; a loop plays only on the\n// slide in view (a still under reduced motion); a slide with a film opens it in the MediaPlayer lightbox.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { IconButton } from \"../button/button\";\nimport { ChevronGlyph } from \"../glyphs\";\nimport { usePrefersReducedMotion } from \"../media\";\nimport { MediaPlayer, type MediaPlayerProps } from \"./media-player\";\n\nexport const mediaCarousel = tv({\n slots: {\n root: \"relative isolate w-full\",\n track: \"m-0 flex list-none snap-x snap-mandatory gap-3 overflow-hidden p-0 touch-pan-y\",\n slide: \"relative m-0 w-full shrink-0 snap-center overflow-hidden rounded-xl border border-border-default bg-media\",\n media: \"absolute inset-0 h-full w-full object-cover\",\n caption: \"absolute inset-x-0 bottom-0 bg-linear-to-t from-scrim-strong to-transparent p-3 pt-8 text-xs font-semibold text-fg-on-media\",\n bar: \"mt-3 flex items-center justify-between gap-3\",\n count: \"text-xs tabular-nums text-fg-secondary\",\n buttons: \"flex gap-2\",\n },\n});\nconst s = mediaCarousel();\n\nexport type CarouselSlide = {\n /** A stable id. */\n id: string;\n /** The still, or the poster of a loop or a film. */\n src: string;\n /** What it shows, in words. */\n alt: string;\n /** « Fig. 1a »: one line over the foot of the slide. */\n caption?: string;\n /** A muted loop playing while the slide is the one in view and on screen, after the page's `load`, with a visible pause; a still under reduced motion. On a `film` slide it previews the film. */\n video?: { webm?: string; mp4?: string };\n /** A film opened by a press, with sound, in the lightbox of the MediaPlayer. */\n film?: Pick<MediaPlayerProps, \"src\" | \"title\" | \"tracks\" | \"loadHls\" | \"labels\" | \"ratio\"> & { playLabel: string; vertical?: boolean };\n};\n\nexport type MediaCarouselLabels = { previous: string; next: string; close: string; slide: string };\nexport const mediaCarouselLabels: MediaCarouselLabels = { previous: \"Previous\", next: \"Next\", close: \"Close\", slide: \"{n} of {total}\" };\n\nexport type MediaCarouselProps = Omit<React.ComponentProps<\"section\">, \"children\"> & {\n /** The slides, in order: 3 to 4 realisations. */\n slides: readonly CarouselSlide[];\n /** The carousel's accessible name, passed translated. */\n label: string;\n /** The frame ratio of every slide (width / height). Default `16 / 10`. */\n ratio?: string;\n /** The words, passed translated; English by default. `slide` takes `{n}` and `{total}`. */\n labels?: Partial<MediaCarouselLabels>;\n /** The words of the lightbox player of every film (speed, captions, time…), passed translated; a slide's own `film.labels` wins. */\n playerLabels?: MediaPlayerProps[\"labels\"];\n /** Draws a slide's `video`: `(video, { poster, inView }) => <PausableLoop sources={video} poster={poster} active={inView} />` (`@krizaka/ui/pausable-loop`, which brings the pause and play). Without it a slide stays a still, and this entry stays light. */\n renderLoop?: (video: NonNullable<CarouselSlide[\"video\"]>, context: { poster: string; inView: boolean }) => React.ReactNode;\n};\n\n/** How far a swipe travels, in CSS pixels, before it turns the slide. */\nconst SWIPE_DISTANCE = 40;\n\n/** The slide in view and the one way to change it: the track scrolls only from here, so it holds no scroll of its own to reach. */\nfunction useActiveSlide(track: React.RefObject<HTMLUListElement | null>, count: number) {\n const [active, setActive] = React.useState(0);\n const reduce = usePrefersReducedMotion();\n const go = (to: number) => {\n const el = track.current;\n if (!el) return active;\n const next = Math.min(count - 1, Math.max(0, to));\n el.scrollTo({ left: next * (el.scrollWidth / count), behavior: reduce ? \"auto\" : \"smooth\" });\n setActive(next);\n return next;\n };\n return { active, go };\n}\n\n/** A horizontal swipe on the track turns one slide; a vertical one stays the page's scroll (`touch-action: pan-y`). */\nfunction useSwipe(turn: (delta: 1 | -1) => void) {\n const from = React.useRef<number | null>(null);\n return {\n onPointerDown: (event: React.PointerEvent) => {\n from.current = event.clientX;\n },\n onPointerUp: (event: React.PointerEvent) => {\n const start = from.current;\n from.current = null;\n if (start === null) return;\n const distance = event.clientX - start;\n if (Math.abs(distance) >= SWIPE_DISTANCE) turn(distance < 0 ? 1 : -1);\n },\n onPointerCancel: () => {\n from.current = null;\n },\n };\n}\n\n/** At an end the button just used is disabled: the focus moves to the other one, never to the page. */\nfunction keepFocus(toolbar: HTMLElement | null, at: number, count: number) {\n if (!toolbar?.contains(document.activeElement)) return;\n const [previous, next] = toolbar.querySelectorAll(\"button\");\n if (at === 0) next?.focus();\n if (at === count - 1) previous?.focus();\n}\n\n/** The arrow keys of the toolbar: right turns forward, left back. */\nconst ARROWS: Partial<Record<string, 1 | -1>> = { ArrowRight: 1, ArrowLeft: -1 };\n\ntype SlideMediaProps = Readonly<{ slide: CarouselSlide; loop: React.ReactNode; ratio: string; closeLabel: string; playerLabels?: MediaPlayerProps[\"labels\"] }>;\n\n/** A poster that opens its film, or a still; its loop, when `renderLoop` draws one, previews the film or plays over the still while the slide is the one in view. */\nfunction SlideMedia({ slide, loop, ratio, closeLabel, playerLabels }: SlideMediaProps) {\n if (slide.film) {\n return (\n <MediaPlayer\n {...slide.film}\n labels={slide.film.labels ?? playerLabels}\n mode=\"lightbox\"\n poster={slide.src}\n posterAlt={slide.alt}\n caption={slide.caption}\n closeLabel={closeLabel}\n preview={loop}\n className=\"h-full rounded-none border-0\"\n />\n );\n }\n return (\n <>\n <img src={slide.src} alt={slide.alt} loading=\"lazy\" decoding=\"async\" draggable={false} className={s.media()} style={{ aspectRatio: ratio }} />\n {loop}\n {slide.caption && <figcaption className={s.caption()}>{slide.caption}</figcaption>}\n </>\n );\n}\n\n/** A few realisations in one frame, one at a time: swipe, buttons or arrow keys on them; nothing advances by itself. */\nexport function MediaCarousel({ slides, label, ratio = \"16 / 10\", labels: given, playerLabels, renderLoop, className, ...props }: Readonly<MediaCarouselProps>) {\n const labels = { ...mediaCarouselLabels, ...given };\n const track = React.useRef<HTMLUListElement>(null);\n const toolbar = React.useRef<HTMLDivElement>(null);\n const { active, go } = useActiveSlide(track, slides.length);\n const turn = (delta: 1 | -1) => keepFocus(toolbar.current, go(active + delta), slides.length);\n const swipe = useSwipe(turn);\n const keys = (event: React.KeyboardEvent<HTMLDivElement>) => {\n const delta = ARROWS[event.key];\n if (!delta) return;\n event.preventDefault();\n turn(delta);\n };\n const name = (i: number) => labels.slide.replace(\"{n}\", String(i + 1)).replace(\"{total}\", String(slides.length));\n return (\n <section aria-roledescription=\"carousel\" aria-label={label} className={s.root({ className })} {...props}>\n <ul ref={track} className={s.track()} {...swipe}>\n {slides.map((slide, i) => (\n <li key={slide.id} aria-roledescription=\"slide\" aria-label={name(i)} className={s.slide()} style={{ aspectRatio: ratio }} aria-hidden={i === active ? undefined : true} inert={i === active ? undefined : true}>\n <figure className=\"m-0 h-full w-full\">\n <SlideMedia slide={slide} loop={slide.video && renderLoop?.(slide.video, { poster: slide.src, inView: i === active })} ratio={ratio} closeLabel={labels.close} playerLabels={playerLabels} />\n </figure>\n </li>\n ))}\n </ul>\n {slides.length > 1 && (\n <div className={s.bar()}>\n <span className={s.count()} aria-live=\"polite\">{active + 1} / {slides.length}</span>\n <div ref={toolbar} role=\"toolbar\" aria-orientation=\"horizontal\" className={s.buttons()} onKeyDown={keys}>\n <IconButton variant=\"secondary\" label={labels.previous} disabled={active === 0} onClick={() => turn(-1)}>\n <ChevronGlyph direction=\"left\" className=\"h-5 w-5\" />\n </IconButton>\n <IconButton variant=\"secondary\" label={labels.next} disabled={active === slides.length - 1} onClick={() => turn(1)}>\n <ChevronGlyph direction=\"right\" className=\"h-5 w-5\" />\n </IconButton>\n </div>\n </div>\n )}\n </section>\n );\n}\n"
202
+ "content": "// Client (the slide in view, the clock, the reader's motion, data and sound choices). Carousel v2 (ADR-010): a sequence of\n// clips, screen demos and stills given as data, one at a time in one frame. The slides cross-fade in place (nothing\n// travels); previous / next sit in a toolbar that also takes ← → Home End, a swipe turns one slide, a « n / N » count.\n// With `autoplay` it advances by itself at the media's pace — the clock IS the CSS animation of the current progress\n// tick, so holding it (the pause button, the pointer, the keyboard focus, a hidden tab, off screen) keeps it where it\n// stood. Under reduced motion or Save-Data nothing advances and no clip is mounted: the posters and the buttons.\n// Posters first, one clip (the slide in view) after the page's `load`; a clip that cannot play leaves its poster. Sound is\n// an option: after a press on « Sound on », hovering or focusing the carousel plays the slide's audio.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { IconButton } from \"../button/button\";\nimport { ChevronGlyph, PauseGlyph, PlayGlyph, VolumeGlyph } from \"../glyphs\";\nimport { clamp, playSafely, useCalm, useInView, usePageHidden, usePageLoaded } from \"../media\";\nimport { MediaPlayer, type MediaPlayerProps } from \"./media-player\";\n\nexport const mediaCarousel = tv({\n slots: {\n root: \"relative isolate w-full min-w-0\",\n stage: \"relative isolate w-full overflow-hidden bg-media\",\n track: \"m-0 grid list-none p-0 touch-pan-y\",\n slide: \"relative col-start-1 row-start-1 m-0 w-full overflow-hidden opacity-0 transition-opacity duration-500 motion-reduce:transition-none data-[active]:opacity-100\",\n media: \"absolute inset-0 h-full w-full object-cover\",\n caption: \"absolute inset-x-0 bottom-0 bg-linear-to-t from-scrim-strong to-transparent p-3 pt-8 text-xs font-semibold text-fg-on-media\",\n ticks: \"pointer-events-none absolute inset-x-3 bottom-2.5 z-10 flex gap-1.5\",\n tick: \"relative h-0.5 flex-1 overflow-hidden bg-fg-on-media/30 data-[state=done]:bg-fg-on-media data-[state=full]:bg-[var(--kz-hue,var(--kz-accent))]\",\n fill: \"kz-media-carousel-fill absolute inset-0 bg-[var(--kz-hue,var(--kz-accent))]\",\n mark: \"absolute top-0 h-full w-px bg-media\",\n bar: \"mt-3 flex items-start justify-between gap-3\",\n barCaption: \"m-0 min-w-0 font-mono text-[13px] leading-[19px] text-fg-secondary [overflow-wrap:anywhere]\",\n count: \"text-xs tabular-nums text-fg-secondary\",\n buttons: \"flex flex-none gap-2\",\n text: \"mt-2.5 text-sm text-fg-secondary [&_li]:my-1\",\n },\n variants: {\n frame: {\n product: { stage: \"rounded-xl border border-border-default\" },\n cahier: { stage: \"rounded-none border border-border-strong shadow-[4px_4px_0_var(--kz-border-strong)]\", count: \"mr-2.5 font-mono text-fg-primary\" },\n },\n },\n defaultVariants: { frame: \"product\" },\n});\n\n/** What a slide is: a clip (a short generated or filmed shot), a screen demo (a product journey, often with chapters), a still. */\nexport type CarouselSlideKind = \"clip\" | \"screen-demo\" | \"still\";\n/** A step of a screen demo: where it starts, in seconds, and its name. */\nexport type CarouselChapter = { at: number; label: string };\n\nexport type CarouselSlide = {\n /** A stable id. */\n id: string;\n /** What it is. Default: `clip` with a `video`, `still` without. */\n kind?: CarouselSlideKind;\n /** The poster of a clip or a film, or the still: 16:9, drawn first. */\n src: string;\n /** What it shows, in words. */\n alt: string;\n /** « Fig. 1a — … »: over the foot of the slide, or in the bar with `caption=\"bar\"`. */\n caption?: string;\n /** The slide's line in the text version; `alt` when absent. */\n text?: string;\n /** The clip: one rendition, two encodes (VP9 `webm` first, H.264 `mp4` for Safari). Muted; plays while the slide is in view, on screen, after the page's `load`; never under reduced motion or Save-Data. */\n video?: { webm?: string; mp4?: string };\n /** The clip's length in seconds, as measured on the file (`krizaka-media-guard` reports it): with `autoplay`, the slide's time on screen. */\n duration?: number;\n /** The clip's file has an audio track (the guard checks it says the truth): « Sound on » can then play it. */\n audio?: boolean;\n /** A screen demo's steps: marks on the progress tick, the caption follows the step under the playhead, listed in the text version. */\n chapters?: readonly CarouselChapter[];\n /** A film opened by a press, with sound, in the lightbox of the MediaPlayer. */\n film?: Pick<MediaPlayerProps, \"src\" | \"title\" | \"tracks\" | \"loadHls\" | \"labels\" | \"ratio\"> & { playLabel: string; vertical?: boolean };\n};\n\nexport type MediaCarouselLabels = {\n previous: string;\n next: string;\n close: string;\n /** A slide's name, with `{n}` and `{total}`. */\n slide: string;\n /** The pause button while something moves. */\n pause: string;\n /** The same button once paused. */\n play: string;\n /** The sound toggle (pressed or not). */\n soundOn: string;\n /** The summary of the text version. */\n textVersion: string;\n /** The carousel's role description (`aria-roledescription`). */\n carousel: string;\n /** A slide's role description. */\n slideRole: string;\n};\nexport const mediaCarouselLabels: MediaCarouselLabels = {\n previous: \"Previous\",\n next: \"Next\",\n close: \"Close\",\n slide: \"{n} of {total}\",\n pause: \"Pause the carousel\",\n play: \"Play the carousel\",\n soundOn: \"Sound on\",\n textVersion: \"Text version\",\n carousel: \"carousel\",\n slideRole: \"slide\",\n};\n\n/** The bounds of a slide's time on screen, in seconds. */\nexport type CarouselAutoplay = { minDwell?: number; maxDwell?: number };\n\n// @fixed: the shortest time a slide stays, in seconds: reading a caption (ADR-010 §3), not a setting.\nexport const CAROUSEL_MIN_DWELL = 5;\n// @fixed: the longest, in seconds: the longest screen journey of a product demo (krizaka-internal#2655).\nexport const CAROUSEL_MAX_DWELL = 45;\n// @fixed: a still (or a clip of unknown length) stays a reading time and a breath, in seconds.\nconst STILL_EXTRA = 1.5;\n\n/** How long a slide stays with `autoplay`, in milliseconds: its media's duration within the bounds, or a reading time for a still. */\nexport function carouselDwell(slide: Pick<CarouselSlide, \"duration\" | \"video\">, bounds: CarouselAutoplay = {}): number {\n const min = bounds.minDwell ?? CAROUSEL_MIN_DWELL;\n const max = Math.max(min, bounds.maxDwell ?? CAROUSEL_MAX_DWELL);\n const seconds = slide.video && slide.duration && slide.duration > 0 ? clamp(slide.duration, min, max) : clamp(min + STILL_EXTRA, min, max);\n return Math.round(seconds * 1000);\n}\n\n/** The chapter under the playhead: the last one that has started. */\nexport function chapterAt(chapters: readonly CarouselChapter[] | undefined, seconds: number): number {\n if (!chapters?.length) return -1;\n let found = -1;\n chapters.forEach((c, i) => {\n if (seconds >= c.at) found = i;\n });\n return found;\n}\n\nexport type MediaCarouselProps = Omit<React.ComponentProps<\"section\">, \"children\"> & {\n /** The slides, in order. */\n slides: readonly CarouselSlide[];\n /** The carousel's accessible name, passed translated. */\n label: string;\n /** The frame ratio of every slide (width / height). Default `16 / 9`, the house ratio. */\n ratio?: string;\n /** Advances by itself (wrapping), each slide for its `duration` within the bounds (`true`: 5–45 s). Never under reduced motion or Save-Data; held by the pause button, the pointer, the keyboard focus, a hidden tab, off screen. */\n autoplay?: boolean | CarouselAutoplay;\n /** Offers « Sound on » when a slide declares `audio`: after the press, hovering or focusing the carousel plays that slide's sound. Never without the press. */\n sound?: boolean;\n /** `product` (default): the product register's rounded frame. `cahier`: the company's sites — square, a solid paper shadow, the count in the typewriter face. */\n frame?: \"product\" | \"cahier\";\n /** Where a slide's caption sits: over its foot (`overlay`, default) or in the bar under the frame (`bar`). */\n caption?: \"overlay\" | \"bar\";\n /** Renders the text version under the carousel: every slide's caption and text (and chapters), in a native `<details>`. */\n textVersion?: boolean;\n /** Rendered inside the text version (the host's sources, a link to the film); after the carousel without one. */\n children?: React.ReactNode;\n /** The words, passed translated; English by default. `slide` takes `{n}` and `{total}`. */\n labels?: Partial<MediaCarouselLabels>;\n /** The words of the lightbox player of every film (speed, captions, time…), passed translated; a slide's own `film.labels` wins. */\n playerLabels?: MediaPlayerProps[\"labels\"];\n /** Called with the index of the slide in view when it changes. */\n onSlideChange?: (index: number) => void;\n /**\n * Draws a slide's `video` in place of the carousel's own clip.\n * @deprecated Since carousel v2 (ADR-010) the carousel draws its clips itself, with its pause in the toolbar. Removed in 4.0.\n */\n renderLoop?: (video: NonNullable<CarouselSlide[\"video\"]>, context: { poster: string; inView: boolean }) => React.ReactNode;\n};\n\nconst CLOCK_CSS =\n \".kz-media-carousel-fill{transform-origin:left;transform:scaleX(0);animation-name:kz-media-carousel-fill;animation-timing-function:linear;animation-fill-mode:forwards}\" +\n \"@keyframes kz-media-carousel-fill{from{transform:scaleX(0)}to{transform:scaleX(1)}}\";\n\n/** How far a swipe travels, in CSS pixels, before it turns the slide. */\nconst SWIPE_DISTANCE = 40;\nconst SOUND_KEY = \"kz-media-carousel-sound\";\nconst SOUND_EVENT = \"kz-media-carousel-sound\";\n\n/** A horizontal swipe turns one slide; a vertical one stays the page's scroll (`touch-action: pan-y`). */\nfunction useSwipe(turn: (delta: 1 | -1) => void) {\n const from = React.useRef<number | null>(null);\n return {\n onPointerDown: (event: React.PointerEvent) => {\n from.current = event.clientX;\n },\n onPointerUp: (event: React.PointerEvent) => {\n const start = from.current;\n from.current = null;\n if (start === null) return;\n const distance = event.clientX - start;\n if (Math.abs(distance) >= SWIPE_DISTANCE) turn(distance < 0 ? 1 : -1);\n },\n onPointerCancel: () => {\n from.current = null;\n },\n };\n}\n\nconst subscribeSound = (notify: () => void) => {\n globalThis.addEventListener(SOUND_EVENT, notify);\n return () => globalThis.removeEventListener(SOUND_EVENT, notify);\n};\nconst readSound = () => {\n try {\n return globalThis.sessionStorage.getItem(SOUND_KEY) === \"1\";\n } catch {\n return false;\n }\n};\n/** The visitor's choice of sound, for this session (off on the server and before any press). */\nfunction useSoundChoice(): [boolean, () => void] {\n const on = React.useSyncExternalStore(subscribeSound, readSound, () => false);\n const toggle = () => {\n try {\n globalThis.sessionStorage.setItem(SOUND_KEY, on ? \"0\" : \"1\");\n } catch {\n // No storage (a private window): the choice holds until the next render only.\n }\n globalThis.dispatchEvent(new Event(SOUND_EVENT));\n };\n return [on, toggle];\n}\n\n/** The keyboard put the focus there (`:focus-visible`): only then does a focus hold the clock; a click does not. */\nfunction keyboardFocus(target: EventTarget | null): boolean {\n try {\n return target instanceof Element && target.matches(\":focus-visible\");\n } catch {\n return true;\n }\n}\n\n/** At an end the button just used is disabled: the focus moves to the other one, never to the page. */\nfunction keepFocus(toolbar: HTMLElement | null, at: number, count: number) {\n if (!toolbar?.contains(document.activeElement)) return;\n const buttons = toolbar.querySelectorAll(\"button\");\n const previous = buttons[0];\n const next = buttons[buttons.length - 1];\n if (at === 0) next?.focus();\n if (at === count - 1) previous?.focus();\n}\n\ntype ClipProps = Readonly<{\n video: NonNullable<CarouselSlide[\"video\"]>;\n poster: string;\n playing: boolean;\n muted: boolean;\n onBroken: () => void;\n onTime?: (seconds: number) => void;\n}>;\n\n/** The slide's clip: muted until the sound is chosen, looping while its slide stays (never a held last frame), gone if no source plays. */\nfunction SlideClip({ video, poster, playing, muted, onBroken, onTime }: ClipProps) {\n const ref = React.useRef<HTMLVideoElement>(null);\n React.useEffect(() => {\n if (ref.current) ref.current.muted = muted;\n }, [muted]);\n React.useEffect(() => {\n if (!ref.current) return;\n if (playing) playSafely(ref.current);\n else ref.current.pause?.();\n }, [playing]);\n const last = video.mp4 ? \"mp4\" : \"webm\";\n return (\n <video\n ref={ref}\n className={mediaCarousel().media()}\n poster={poster}\n muted\n loop\n playsInline\n preload=\"auto\"\n aria-hidden\n tabIndex={-1}\n onTimeUpdate={onTime ? (e) => onTime(e.currentTarget.currentTime) : undefined}\n >\n {video.webm && <source src={video.webm} type=\"video/webm\" onError={last === \"webm\" ? onBroken : undefined} />}\n {video.mp4 && <source src={video.mp4} type=\"video/mp4\" onError={onBroken} />}\n </video>\n );\n}\n\ntype SlideMediaProps = Readonly<{ slide: CarouselSlide; first: boolean; drawn: boolean; clip: React.ReactNode; ratio: string; closeLabel: string; overlay: boolean; playerLabels?: MediaPlayerProps[\"labels\"] }>;\n\n/** A poster that opens its film, or a still; its clip plays over it while the slide is the one in view. */\nfunction SlideMedia({ slide, first, drawn, clip, ratio, closeLabel, overlay, playerLabels }: SlideMediaProps) {\n const s = mediaCarousel();\n if (slide.film) {\n return (\n <MediaPlayer\n {...slide.film}\n labels={slide.film.labels ?? playerLabels}\n mode=\"lightbox\"\n poster={slide.src}\n posterAlt={slide.alt}\n caption={overlay ? slide.caption : undefined}\n closeLabel={closeLabel}\n preview={clip}\n className=\"h-full rounded-none border-0\"\n />\n );\n }\n return (\n <>\n {drawn && <img src={slide.src} alt={slide.alt} loading={first ? undefined : \"lazy\"} decoding=\"async\" draggable={false} className={s.media()} style={{ aspectRatio: ratio }} />}\n {clip}\n {overlay && slide.caption && <figcaption className={s.caption()}>{slide.caption}</figcaption>}\n </>\n );\n}\n\n/** A tick's state: before the current one, the current one (filling, or full when nothing advances), still to come. */\nfunction tickState(i: number, active: number, filling: boolean): \"done\" | \"now\" | \"full\" | undefined {\n if (i < active) return \"done\";\n if (i !== active) return undefined;\n return filling ? \"now\" : \"full\";\n}\n\n/** A screen demo's steps, as marks on its progress tick (where each starts, over the clip's length). */\nfunction ChapterMarks({ slide, className }: Readonly<{ slide: CarouselSlide; className: string }>) {\n const length = slide.duration ?? 0;\n if (!slide.chapters?.length || length <= 0) return null;\n return slide.chapters.map((c) => <i key={c.at} className={className} style={{ left: `${(c.at / length) * 100}%` }} />);\n}\n\n/** The step of the current slide under the playhead, followed only for a slide with chapters. */\nfunction useChapter(slide: CarouselSlide | undefined) {\n const [chapter, setChapter] = React.useState(-1);\n const [shown, setShown] = React.useState(slide?.id);\n if (shown !== slide?.id) {\n setShown(slide?.id);\n setChapter(-1);\n }\n const onTime = slide?.chapters?.length ? (seconds: number) => setChapter(chapterAt(slide.chapters, seconds)) : undefined;\n return { chapter: slide?.chapters?.[chapter], onTime };\n}\n\n/** What holds the clock and what lets the sound play: the pointer (not a touch), any focus inside, a keyboard focus inside. */\nfunction useHolds() {\n const [hovered, setHovered] = React.useState(false);\n const [focusIn, setFocusIn] = React.useState(false);\n const [keyboardIn, setKeyboardIn] = React.useState(false);\n const handlers = {\n onPointerEnter: (e: React.PointerEvent) => setHovered(e.pointerType !== \"touch\"),\n onPointerLeave: () => setHovered(false),\n onFocus: (e: React.FocusEvent) => {\n setFocusIn(true);\n setKeyboardIn(keyboardFocus(e.target));\n },\n onBlur: (e: React.FocusEvent) => {\n if (e.currentTarget.contains(e.relatedTarget as Node | null)) return;\n setFocusIn(false);\n setKeyboardIn(false);\n },\n };\n return { hovered, focusIn, keyboardIn, handlers };\n}\n\ntype TicksProps = Readonly<{ slides: readonly CarouselSlide[]; active: number; calm: boolean; dwell: number; advancing: boolean; onEnd: () => void; s: ReturnType<typeof mediaCarousel> }>;\n\n/** One hairline per slide; the current one fills over its dwell — the clock — and holds with the carousel. */\nfunction CarouselTicks({ slides, active, calm, dwell, advancing, onEnd, s }: TicksProps) {\n return (\n <div className={s.ticks()} aria-hidden>\n {slides.map((slide, i) => (\n <span key={slide.id} className={s.tick()} data-state={tickState(i, active, !calm)}>\n {i === active && !calm && (\n <span\n key={`${active}`}\n className={s.fill()}\n style={{ animationDuration: `${dwell}ms`, animationPlayState: advancing ? \"running\" : \"paused\" }}\n onAnimationEnd={() => advancing && onEnd()}\n />\n )}\n {i === active && <ChapterMarks slide={slide} className={s.mark()} />}\n </span>\n ))}\n </div>\n );\n}\n\ntype ToolbarProps = Readonly<{\n labels: MediaCarouselLabels;\n turns: boolean;\n atStart: boolean;\n atEnd: boolean;\n moving: boolean;\n paused: boolean;\n onPause: () => void;\n sound: { shown: boolean; on: boolean; toggle: () => void };\n onTurn: (delta: number) => void;\n onKeyDown: (event: React.KeyboardEvent<HTMLDivElement>) => void;\n className: string;\n}>;\n\n/** Previous, pause / play, « Sound on », next: one toolbar that also takes ← → Home End. */\nconst CarouselToolbar = React.forwardRef<HTMLDivElement, ToolbarProps>(function CarouselToolbar(\n { labels, turns, atStart, atEnd, moving, paused, onPause, sound, onTurn, onKeyDown, className },\n ref,\n) {\n return (\n <div ref={ref} role=\"toolbar\" aria-orientation=\"horizontal\" className={className} onKeyDown={onKeyDown}>\n {turns && (\n <IconButton variant=\"secondary\" label={labels.previous} disabled={atStart} onClick={() => onTurn(-1)}>\n <ChevronGlyph direction=\"left\" className=\"h-5 w-5\" />\n </IconButton>\n )}\n {moving && (\n <IconButton variant=\"secondary\" label={paused ? labels.play : labels.pause} onClick={onPause}>\n {paused ? <PlayGlyph className=\"h-4 w-4\" /> : <PauseGlyph className=\"h-4 w-4\" />}\n </IconButton>\n )}\n {sound.shown && (\n <IconButton variant=\"secondary\" label={labels.soundOn} aria-pressed={sound.on} onClick={sound.toggle}>\n <VolumeGlyph muted={!sound.on} className=\"h-4 w-4\" />\n </IconButton>\n )}\n {turns && (\n <IconButton variant=\"secondary\" label={labels.next} disabled={atEnd} onClick={() => onTurn(1)}>\n <ChevronGlyph direction=\"right\" className=\"h-5 w-5\" />\n </IconButton>\n )}\n </div>\n );\n});\n\n/** Every slide's caption and text, and a screen demo's chapters, in a native `<details>`; the host's `children` inside. */\nfunction TextVersion({ slides, summary, className, children }: Readonly<{ slides: readonly CarouselSlide[]; summary: string; className: string; children?: React.ReactNode }>) {\n return (\n <details className={className}>\n <summary>{summary}</summary>\n <ol>\n {slides.map((slide) => (\n <li key={slide.id}>\n {slide.caption && <b>{slide.caption}</b>} {slide.text ?? slide.alt}\n {slide.chapters?.length ? (\n <ol>\n {slide.chapters.map((c) => (\n <li key={c.at}>{c.label}</li>\n ))}\n </ol>\n ) : null}\n </li>\n ))}\n </ol>\n {children}\n </details>\n );\n}\n\n/** The caption shown in the bar: the slide's, with the chapter under the playhead. */\nfunction barCaptionOf(placement: \"overlay\" | \"bar\", slide: CarouselSlide | undefined, chapter: CarouselChapter | undefined) {\n if (placement !== \"bar\" || !slide?.caption) return undefined;\n return chapter ? [slide.caption, chapter.label].join(\" · \") : slide.caption;\n}\n\n/** A sequence of clips, screen demos and stills, one at a time: buttons, arrow keys, swipe, and with `autoplay` it advances at the media's pace. */\nexport function MediaCarousel({\n slides,\n label,\n ratio = \"16 / 9\",\n autoplay,\n sound,\n frame = \"product\",\n caption = \"overlay\",\n textVersion,\n children,\n labels: given,\n playerLabels,\n onSlideChange,\n renderLoop,\n className,\n ...props\n}: Readonly<MediaCarouselProps>) {\n const labels = { ...mediaCarouselLabels, ...given };\n const s = mediaCarousel({ frame });\n const total = slides.length;\n const root = React.useRef<HTMLElement>(null);\n const toolbar = React.useRef<HTMLDivElement>(null);\n const calm = useCalm();\n const loaded = usePageLoaded();\n const hidden = usePageHidden();\n const [soundChosen, toggleSound] = useSoundChoice();\n const [active, setActive] = React.useState(0);\n const [seen, setSeen] = React.useState<ReadonlySet<number>>(() => new Set([0]));\n const [broken, setBroken] = React.useState<ReadonlySet<string>>(() => new Set());\n const [paused, setPaused] = React.useState(false);\n const { hovered, focusIn, keyboardIn, handlers } = useHolds();\n const [onScreen, setOnScreen] = React.useState(() => typeof IntersectionObserver === \"undefined\");\n useInView(root, setOnScreen);\n\n const current = slides[active];\n const { chapter, onTime } = useChapter(current);\n const bounds = typeof autoplay === \"object\" ? autoplay : {};\n const wraps = Boolean(autoplay) && total > 1;\n const ownClips = !renderLoop && slides.some((slide) => slide.video);\n const moving = !calm && (wraps || ownClips);\n const advancing = wraps && !calm && !paused && !hovered && !keyboardIn && onScreen && !hidden;\n const clipPlaying = onScreen && !paused && !hidden;\n const hasAudio = Boolean(sound) && !calm && ownClips && slides.some((slide) => slide.audio && slide.video);\n const audible = hasAudio && soundChosen && Boolean(current?.audio) && (hovered || focusIn);\n\n const show = (to: number) => {\n setActive(to);\n setSeen((before) => new Set(before).add(to));\n onSlideChange?.(to);\n };\n const turn = (delta: number) => {\n const to = wraps ? (active + delta + total) % total : clamp(active + delta, 0, total - 1);\n if (to === active) return;\n show(to);\n if (!wraps) keepFocus(toolbar.current, to, total);\n };\n const swipe = useSwipe(turn);\n const keys = (event: React.KeyboardEvent<HTMLDivElement>) => {\n const moves: Partial<Record<string, () => void>> = {\n ArrowRight: () => turn(1),\n ArrowLeft: () => turn(-1),\n Home: () => turn(-active),\n End: () => turn(total - 1 - active),\n };\n const move = moves[event.key];\n if (!move) return;\n event.preventDefault();\n move();\n };\n const name = (i: number) => labels.slide.replace(\"{n}\", String(i + 1)).replace(\"{total}\", String(total));\n const clipOf = (slide: CarouselSlide, i: number): React.ReactNode => {\n if (!slide.video) return null;\n if (renderLoop) return renderLoop(slide.video, { poster: slide.src, inView: i === active });\n if (i !== active || calm || !loaded || broken.has(slide.id)) return null;\n return (\n <SlideClip\n key={slide.id}\n video={slide.video}\n poster={slide.src}\n playing={clipPlaying}\n muted={!audible}\n onTime={onTime}\n onBroken={() => setBroken((before) => new Set(before).add(slide.id))}\n />\n );\n };\n const dwell = current ? carouselDwell(current, bounds) : 0;\n const barCaption = barCaptionOf(caption, current, chapter);\n const showBar = total > 1 || moving || Boolean(barCaption);\n\n return (\n <section\n ref={root}\n aria-roledescription={labels.carousel}\n aria-label={label}\n data-frame={frame}\n data-advancing={advancing ? \"\" : undefined}\n className={s.root({ className })}\n {...handlers}\n {...props}\n >\n {wraps && (\n <style href=\"kz-media-carousel\" precedence=\"medium\">\n {CLOCK_CSS}\n </style>\n )}\n <div className={s.stage()} style={{ aspectRatio: ratio }}>\n <ul className={s.track()} {...swipe}>\n {slides.map((slide, i) => {\n const here = i === active;\n return (\n <li\n key={slide.id}\n aria-roledescription={labels.slideRole}\n aria-label={name(i)}\n data-kind={slide.kind ?? (slide.video ? \"clip\" : \"still\")}\n data-active={here ? \"\" : undefined}\n className={s.slide()}\n style={{ aspectRatio: ratio }}\n aria-hidden={here ? undefined : true}\n inert={here ? undefined : true}\n >\n <figure className=\"m-0 h-full w-full\">\n <SlideMedia\n slide={slide}\n first={i === 0}\n drawn={seen.has(i) || i === (active + 1) % total}\n clip={clipOf(slide, i)}\n ratio={ratio}\n closeLabel={labels.close}\n overlay={caption === \"overlay\"}\n playerLabels={playerLabels}\n />\n </figure>\n </li>\n );\n })}\n </ul>\n {wraps && <CarouselTicks slides={slides} active={active} calm={calm} dwell={dwell} advancing={advancing} onEnd={() => turn(1)} s={s} />}\n </div>\n {showBar && (\n <div className={s.bar()}>\n <p className={s.barCaption()} aria-live={advancing ? \"off\" : \"polite\"}>\n {total > 1 && (\n <span className={s.count()}>\n {active + 1} / {total}\n </span>\n )}\n {barCaption && <> {barCaption}</>}\n </p>\n <CarouselToolbar\n ref={toolbar}\n labels={labels}\n turns={total > 1}\n atStart={!wraps && active === 0}\n atEnd={!wraps && active === total - 1}\n moving={moving}\n paused={paused}\n onPause={() => setPaused((p) => !p)}\n sound={{ shown: hasAudio, on: soundChosen, toggle: toggleSound }}\n onTurn={turn}\n onKeyDown={keys}\n className={s.buttons()}\n />\n </div>\n )}\n {textVersion ? (\n <TextVersion slides={slides} summary={labels.textVersion} className={s.text()}>\n {children}\n </TextVersion>\n ) : (\n children\n )}\n </section>\n );\n}\n"
151
203
  },
152
204
  {
153
205
  "path": "media-gallery/media-gallery.tsx",
@@ -159,11 +211,11 @@
159
211
  },
160
212
  {
161
213
  "path": "media-gallery/meta.ts",
162
- "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Media gallery\",\n summary: \"Also `MediaCarousel` (3 to 4 realisations, one at a time), `MediaPlayer` (the one video frame: inline, lightbox, 9:16) and `PausableLoop` (a silent loop with a visible pause, its own entry). A shop's own photos and loops in tiles, the first featured, a caption on the foot of a tile.\",\n status: \"beta\",\n category: \"media\",\n domain: \"media\",\n platforms: \"web\",\n parity: { native: { status: \"n/a\", reason: \"A shop's public storefront is a web page.\" }, desktop: \"web\" },\n whenToUse: [\"The « look inside » of a business page: its real photos and short clips.\"],\n whenNotToUse: [\n { when: \"A demo gallery with titles and captions per piece.\" },\n ],\n bestPractices: [\n \"Real photos only; every tile has `alt` text that says what it shows.\",\n \"Give a landscape source `shape=\\\"wide\\\"` so it is not cropped to a portrait.\",\n \"Keep loops short and few: one or two per gallery.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\n \"A list named by `label`; each tile is a figure with the photo's `alt` and its caption.\",\n \"`MediaCarousel` is a `carousel` region named by `label`; each slide is a numbered group, only the one in view is exposed (`inert` on the others); previous / next are buttons in a `toolbar` that also takes ← / → (at an end the focus moves to the other button), a swipe turns one slide, the track has no scroll of its own to reach, the count is polite.\",\n \"`MediaPlayer` in a lightbox: one button named `playLabel` opens a modal dialog (focus trapped, Escape closes, focus returns) holding the VideoPlayer; the press starts it with sound.\",\n \"One slide draws no toolbar and no count. A loop (`PausableLoop` of `@krizaka/ui/pausable-loop`, handed to the carousel's `renderLoop` for a slide's `video`, also on a film slide, where it previews the film, or to `MediaPlayer`'s `preview`) is fetched after the page's `load`, plays only while on screen and on the slide in view, and has a visible pause / play button (the words of `PausableLoop`'s `labels`); under reduced motion or Save-Data the poster stays alone and there is no control, since nothing moves.\",\n \"Every word is a prop: the carousel's `labels`, the lightbox player's `playerLabels` (or a film's own `labels`), `MediaPlayer`'s `labels`, `playLabel`, `closeLabel`, and `PausableLoop`'s `labels`; English by default.\",\n \"`MediaPlayer` in a lightbox opens on the poster, waiting for a press on play, under reduced motion. `trigger` swaps the poster for the page's own opener (focus returns to it on close), `open` / `onOpenChange` drive it from outside, `ratio` takes any frame (`19 / 16`).\",\n \"Nothing moves under the pointer and nothing advances by itself; a loop plays only on the slide in view, never under reduced motion (the still shows, the buttons stay).\",\n \"A loop is decorative (`aria-hidden`), starts only while its tile is on screen and never under reduced motion.\",\n ],\n },\n related: [\"cover-hero\"],\n web: {\n imports: [\"MediaGallery\", \"MediaCarousel\", \"MediaPlayer\", \"PausableLoop\"],\n examples: [\n { name: \"shop\", title: \"Shop\", description: \"Three photos, the first featured, one with a caption.\" },\n { name: \"carousel\", title: \"Carousel\", description: \"Three realisations one at a time, the first opens its film; buttons (and ← / → on them), swipe, nothing advances by itself.\" },\n { name: \"carousel-single\", title: \"Carousel, one slide\", description: \"A single slide draws no arrows and no count.\" },\n { name: \"carousel-loop\", title: \"Carousel, loop and French words\", description: \"A film slide previewed by a silent loop with a visible pause (after load, on screen only), the carousel and the lightbox player in French.\" },\n { name: \"player\", title: \"Player\", description: \"The one video frame: a poster that opens a lightbox started by the press (with sound), 16:9 and vertical 9:16.\" },\n { name: \"player-trigger\", title: \"Player, own trigger\", description: \"The page's button opens the lightbox (`trigger`); another drives a 19 / 16 one from outside (`open`, `onOpenChange`).\" },\n ],\n },\n} satisfies ComponentMeta;\n"
214
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Media gallery\",\n summary: \"Also `MediaCarousel` (clips, screen demos and stills one at a time; `autoplay` with a visible pause, optional sound, its files checked by `krizaka-media-guard`), `MediaPlayer` (the one video frame: inline, lightbox, 9:16) and `PausableLoop` (a silent loop with a visible pause). A shop's own photos and loops in tiles, the first featured.\",\n status: \"beta\",\n category: \"media\",\n domain: \"media\",\n platforms: \"web\",\n parity: { native: { status: \"n/a\", reason: \"A shop's public storefront is a web page.\" }, desktop: \"web\" },\n whenToUse: [\"The « look inside » of a business page: its real photos and short clips.\"],\n whenNotToUse: [\n { when: \"A demo gallery with titles and captions per piece.\" },\n ],\n bestPractices: [\n \"Real photos only; every tile has `alt` text that says what it shows.\",\n \"Give a landscape source `shape=\\\"wide\\\"` so it is not cropped to a portrait.\",\n \"Keep loops short and few: one or two per gallery.\",\n \"Carousel: 16:9 files only, checked before they ship — `krizaka-media-guard slides.json` refuses a vertical reel in a wide file (pillarbox), a letterbox, a black end card, an mp4 that is not H.264 yuv420p fast start, and an `audio` or `duration` that does not match the file.\",\n \"Carousel: give each clip its `duration` (the guard reports it): with `autoplay` a slide stays for it, within 5–45 s; a still stays 6.5 s. The clip loops while its slide stays, so it never holds a last frame.\",\n \"Carousel: `sound` only for slides whose file has sound; it plays after the visitor presses « Sound on », then only under the pointer or the focus.\",\n \"Carousel on a company site: `frame=\\\"cahier\\\"`, `caption=\\\"bar\\\"`, `textVersion`, and the product's `data-hue` on the carousel or an ancestor.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\n \"A list named by `label`; each tile is a figure with the photo's `alt` and its caption.\",\n \"`MediaCarousel` is a `carousel` region named by `label`; each slide is a numbered group, only the one in view is exposed (`inert` on the others); previous / next are buttons in a `toolbar` that also takes ← / → (at an end the focus moves to the other button), a swipe turns one slide, the track has no scroll of its own to reach, the count is polite.\",\n \"`MediaPlayer` in a lightbox: one button named `playLabel` opens a modal dialog (focus trapped, Escape closes, focus returns) holding the VideoPlayer; the press starts it with sound.\",\n \"One slide draws no toolbar and no count. A loop (`PausableLoop` of `@krizaka/ui/pausable-loop`, handed to the carousel's `renderLoop` for a slide's `video`, also on a film slide, where it previews the film, or to `MediaPlayer`'s `preview`) is fetched after the page's `load`, plays only while on screen and on the slide in view, and has a visible pause / play button (the words of `PausableLoop`'s `labels`); under reduced motion or Save-Data the poster stays alone and there is no control, since nothing moves.\",\n \"Every word is a prop: the carousel's `labels`, the lightbox player's `playerLabels` (or a film's own `labels`), `MediaPlayer`'s `labels`, `playLabel`, `closeLabel`, and `PausableLoop`'s `labels`; English by default.\",\n \"`MediaPlayer` in a lightbox opens on the poster, waiting for a press on play, under reduced motion. `trigger` swaps the poster for the page's own opener (focus returns to it on close), `open` / `onOpenChange` drive it from outside, `ratio` takes any frame (`19 / 16`).\",\n \"Nothing moves under the pointer; without `autoplay` nothing advances by itself; a loop plays only on the slide in view, never under reduced motion (the still shows, the buttons stay).\",\n \"`autoplay` (WCAG 2.2.2): a visible pause / play in the toolbar; it also holds under the pointer (not a touch), on a keyboard focus inside, while the tab is hidden and off screen; the count is announced only while held; it wraps. The clock is the current tick's CSS animation, so a hold keeps it where it stood. Under reduced motion or Save-Data: no clock, no clip, no pause button, the current tick full.\",\n \"The carousel draws a slide's `video` itself (v2): one `<video>`, the current slide's, muted, mounted after the page's `load`, `webm` before `mp4`; if no source plays it unmounts and the poster stays. Only the posters seen and the next one are drawn, the first eagerly.\",\n \"`sound`: « Sound on » is a toggle (`aria-pressed`) shown only when a slide declares `audio`; after the press, the pointer or the focus in the carousel unmutes that slide's clip, leaving mutes it; the choice lasts the session; never under reduced motion.\",\n \"Only the buttons take the focus, and their ring shows for the keyboard only (`:focus-visible`): no frame around the stage. `textVersion` adds a native `<details>` with every caption, text and chapter.\",\n \"A loop is decorative (`aria-hidden`), starts only while its tile is on screen and never under reduced motion.\",\n ],\n },\n related: [\"cover-hero\"],\n web: {\n imports: [\"MediaGallery\", \"MediaCarousel\", \"MediaPlayer\", \"PausableLoop\"],\n examples: [\n { name: \"shop\", title: \"Shop\", description: \"Three photos, the first featured, one with a caption.\" },\n { name: \"carousel\", title: \"Carousel\", description: \"Three realisations one at a time, the first opens its film; buttons (and ← / → on them), swipe, nothing advances by itself.\" },\n { name: \"carousel-autoplay\", title: \"Carousel v2, autoplay\", description: \"It advances by itself at each slide's pace, with ticks and a visible pause; holds under the pointer, on keyboard focus and off screen; nothing moves under reduced motion.\" },\n { name: \"carousel-cahier\", title: \"Carousel v2, Cahier frame and sound\", description: \"The company's sites: square frame with a paper shadow, the caption in the bar, a hue, the text version, « Sound on » for the slides with sound.\" },\n { name: \"carousel-demo\", title: \"Carousel v2, screen demo with chapters\", description: \"A 30 s product journey: chapter marks on the tick, the caption follows the step under the playhead, the steps in the text version.\" },\n { name: \"carousel-single\", title: \"Carousel, one slide\", description: \"A single slide draws no arrows and no count.\" },\n { name: \"carousel-loop\", title: \"Carousel, loop and French words\", description: \"A film slide previewed by a silent loop with a visible pause (after load, on screen only), the carousel and the lightbox player in French.\" },\n { name: \"player\", title: \"Player\", description: \"The one video frame: a poster that opens a lightbox started by the press (with sound), 16:9 and vertical 9:16.\" },\n { name: \"player-trigger\", title: \"Player, own trigger\", description: \"The page's button opens the lightbox (`trigger`); another drives a 19 / 16 one from outside (`open`, `onOpenChange`).\" },\n ],\n },\n} satisfies ComponentMeta;\n"
163
215
  },
164
216
  {
165
217
  "path": "media-gallery/pausable-loop.tsx",
166
- "content": "// @krizaka/ui/pausable-loop. Client (the page's load, the viewport, the reader's motion and data preferences). A muted, silent loop that previews a still or a\n// film: poster first, nothing fetched before the page's `load`, playing only while on screen, with a visible pause / play\n// control (WCAG 2.2.2). Under reduced motion or Save-Data the poster stays alone and there is nothing to pause.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { PauseGlyph, PlayGlyph } from \"../glyphs\";\nimport { playSafely, useInView, usePrefersReducedMotion } from \"../media\";\n\nexport type LoopSources = { webm?: string; mp4?: string };\nexport type LoopLabels = { pause: string; play: string };\nexport const loopLabels: LoopLabels = { pause: \"Pause the animation\", play: \"Play the animation\" };\n\nconst subscribeLoad = (notify: () => void) => {\n window.addEventListener(\"load\", notify);\n return () => window.removeEventListener(\"load\", notify);\n};\n/** `true` once the page has finished loading: a loop is not worth bytes before it. */\nfunction usePageLoaded(): boolean {\n return React.useSyncExternalStore(subscribeLoad, () => document.readyState === \"complete\", () => false);\n}\n\ntype SaveDataNavigator = Navigator & { connection?: { saveData?: boolean } };\n/** `true` when the person asked for less motion or less data: a loop stays a poster. */\nfunction useCalm(): boolean {\n const reduce = usePrefersReducedMotion();\n return reduce || (typeof navigator !== \"undefined\" && Boolean((navigator as SaveDataNavigator).connection?.saveData));\n}\n\nexport type PausableLoopProps = {\n /** The loop's files; `mp4` and / or `webm`. */\n sources: LoopSources;\n /** The still under the loop, shown first and kept under reduced motion or Save-Data. */\n poster: string;\n /** Plays only while `true` (e.g. the slide in view). Default `true`. */\n active?: boolean;\n /** The pause / play words, passed translated. English by default. */\n labels?: LoopLabels;\n /** Classes of the `<video>`; default fills its frame, cropped. */\n className?: string;\n};\n\n/** A muted, silent loop over a still, with a visible pause / play. Drop it into a frame that is `relative`: `MediaPlayer`'s `preview`, `MediaCarousel`'s `renderLoop`. */\nexport function PausableLoop({ sources, poster, active = true, labels = loopLabels, className = \"absolute inset-0 h-full w-full object-cover\" }: Readonly<PausableLoopProps>) {\n const calm = useCalm();\n const loaded = usePageLoaded();\n const mounted = !calm && loaded;\n const holder = React.useRef<HTMLDivElement>(null);\n const video = React.useRef<HTMLVideoElement>(null);\n const [onScreen, setOnScreen] = React.useState(() => typeof IntersectionObserver === \"undefined\");\n const [paused, setPaused] = React.useState(false);\n useInView(holder, setOnScreen, mounted);\n const playing = mounted && onScreen && active && !paused;\n React.useEffect(() => {\n if (!video.current) return;\n if (playing) playSafely(video.current);\n else video.current.pause?.();\n }, [playing]);\n const Glyph = paused ? PlayGlyph : PauseGlyph;\n return (\n <>\n <div ref={holder} className=\"absolute inset-0\">\n {mounted && (\n <video ref={video} className={className} poster={poster} muted loop playsInline preload=\"metadata\" aria-hidden tabIndex={-1}>\n {sources.webm && <source src={sources.webm} type=\"video/webm\" />}\n {sources.mp4 && <source src={sources.mp4} type=\"video/mp4\" />}\n </video>\n )}\n </div>\n {!calm && (\n <button\n type=\"button\"\n aria-label={paused ? labels.play : labels.pause}\n onClick={() => setPaused((p) => !p)}\n className={cn(\n \"absolute right-2 top-2 z-10 flex h-9 w-9 items-center justify-center rounded-full bg-scrim-strong text-fg-on-media transition-colors hover:bg-scrim \" +\n \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none\",\n )}\n >\n <Glyph className=\"h-4 w-4\" />\n </button>\n )}\n </>\n );\n}\n"
218
+ "content": "// @krizaka/ui/pausable-loop. Client (the page's load, the viewport, the reader's motion and data preferences). A muted, silent loop that previews a still or a\n// film: poster first, nothing fetched before the page's `load`, playing only while on screen, with a visible pause / play\n// control (WCAG 2.2.2). Under reduced motion or Save-Data the poster stays alone and there is nothing to pause.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { PauseGlyph, PlayGlyph } from \"../glyphs\";\nimport { playSafely, useCalm, useInView, usePageLoaded } from \"../media\";\n\nexport type LoopSources = { webm?: string; mp4?: string };\nexport type LoopLabels = { pause: string; play: string };\nexport const loopLabels: LoopLabels = { pause: \"Pause the animation\", play: \"Play the animation\" };\n\nexport type PausableLoopProps = {\n /** The loop's files; `mp4` and / or `webm`. */\n sources: LoopSources;\n /** The still under the loop, shown first and kept under reduced motion or Save-Data. */\n poster: string;\n /** Plays only while `true` (e.g. the slide in view). Default `true`. */\n active?: boolean;\n /** The pause / play words, passed translated. English by default. */\n labels?: LoopLabels;\n /** Classes of the `<video>`; default fills its frame, cropped. */\n className?: string;\n};\n\n/** A muted, silent loop over a still, with a visible pause / play. Drop it into a frame that is `relative`: `MediaPlayer`'s `preview`, `MediaCarousel`'s `renderLoop`. */\nexport function PausableLoop({ sources, poster, active = true, labels = loopLabels, className = \"absolute inset-0 h-full w-full object-cover\" }: Readonly<PausableLoopProps>) {\n const calm = useCalm();\n const loaded = usePageLoaded();\n const mounted = !calm && loaded;\n const holder = React.useRef<HTMLDivElement>(null);\n const video = React.useRef<HTMLVideoElement>(null);\n const [onScreen, setOnScreen] = React.useState(() => typeof IntersectionObserver === \"undefined\");\n const [paused, setPaused] = React.useState(false);\n useInView(holder, setOnScreen, mounted);\n const playing = mounted && onScreen && active && !paused;\n React.useEffect(() => {\n if (!video.current) return;\n if (playing) playSafely(video.current);\n else video.current.pause?.();\n }, [playing]);\n const Glyph = paused ? PlayGlyph : PauseGlyph;\n return (\n <>\n <div ref={holder} className=\"absolute inset-0\">\n {mounted && (\n <video ref={video} className={className} poster={poster} muted loop playsInline preload=\"metadata\" aria-hidden tabIndex={-1}>\n {sources.webm && <source src={sources.webm} type=\"video/webm\" />}\n {sources.mp4 && <source src={sources.mp4} type=\"video/mp4\" />}\n </video>\n )}\n </div>\n {!calm && (\n <button\n type=\"button\"\n aria-label={paused ? labels.play : labels.pause}\n onClick={() => setPaused((p) => !p)}\n className={cn(\n \"absolute right-2 top-2 z-10 flex h-9 w-9 items-center justify-center rounded-full bg-scrim-strong text-fg-on-media transition-colors hover:bg-scrim \" +\n \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none\",\n )}\n >\n <Glyph className=\"h-4 w-4\" />\n </button>\n )}\n </>\n );\n}\n"
167
219
  },
168
220
  {
169
221
  "path": "media-gallery/player-index.ts",
@@ -175,11 +227,11 @@
175
227
  },
176
228
  {
177
229
  "path": "media.ts",
178
- "content": "// Shared by the data and media primitives (client): the clock format, the reduced-motion preference, the\n// in-view observer, a debounced callback. Never an entry of its own.\nimport * as React from \"react\";\n\n/** Seconds as a clock: `75` → `1:15`, `3725` → `1:02:05`. Negative or unknown values read `0:00`. */\nexport function formatClock(seconds: number): string {\n const s = Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0;\n const h = Math.floor(s / 3600);\n const m = Math.floor((s % 3600) / 60);\n const rest = String(s % 60).padStart(2, \"0\");\n return h > 0 ? `${h}:${String(m).padStart(2, \"0\")}:${rest}` : `${m}:${rest}`;\n}\n\n/** Clamps `value` between `min` and `max`. */\nexport const clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value));\n\nconst REDUCE = \"(prefers-reduced-motion: reduce)\";\nconst subscribeReduce = (notify: () => void) => {\n if (typeof window === \"undefined\" || !window.matchMedia) return () => undefined;\n const query = window.matchMedia(REDUCE);\n query.addEventListener?.(\"change\", notify);\n return () => query.removeEventListener?.(\"change\", notify);\n};\n\n/** `true` when the person asked for less motion (`prefers-reduced-motion: reduce`); follows a change of the setting. */\nexport function usePrefersReducedMotion(): boolean {\n return React.useSyncExternalStore(\n subscribeReduce,\n () => (typeof window !== \"undefined\" && window.matchMedia ? window.matchMedia(REDUCE).matches : false),\n () => false,\n );\n}\n\n/** The latest value of a callback, for an effect or an event that must not re-subscribe when it changes. */\nexport function useLatest<T>(value: T) {\n const ref = React.useRef(value);\n React.useLayoutEffect(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/** Calls `onChange(visible)` when at least `threshold` of the element enters or leaves the viewport. */\nexport function useInView(ref: React.RefObject<Element | null>, onChange: (visible: boolean) => void, enabled = true, threshold = 0.25) {\n const latest = useLatest(onChange);\n React.useEffect(() => {\n const element = ref.current;\n if (!enabled || !element || typeof IntersectionObserver === \"undefined\") return;\n const observer = new IntersectionObserver(([entry]) => entry && latest.current(entry.isIntersecting), { threshold });\n observer.observe(element);\n return () => observer.disconnect();\n }, [ref, enabled, threshold, latest]);\n}\n\n/** A value controlled by a prop when it is given, held inside otherwise; `set` calls `onChange` either way. */\nexport function useControllable<T>(value: T | undefined, defaultValue: T, onChange?: (next: T) => void) {\n const [inner, setInner] = React.useState(defaultValue);\n const controlled = value !== undefined;\n const current = controlled ? value : inner;\n const set = React.useCallback(\n (next: T) => {\n if (!controlled) setInner(next);\n onChange?.(next);\n },\n [controlled, onChange],\n );\n return [current, set] as const;\n}\n\n/** Starts a media element without an unhandled rejection (autoplay refused, the source replaced meanwhile). */\nexport function playSafely(media: HTMLMediaElement | null | undefined) {\n try {\n const started = media?.play() as Promise<void> | undefined;\n started?.catch?.(() => undefined);\n } catch {\n // Not playable here (no media support): the controls stay as they are.\n }\n}\n"
230
+ "content": "// Shared by the data and media primitives (client): the clock format, the reduced-motion preference, the\n// in-view observer, a debounced callback. Never an entry of its own.\nimport * as React from \"react\";\n\n/** Seconds as a clock: `75` → `1:15`, `3725` → `1:02:05`. Negative or unknown values read `0:00`. */\nexport function formatClock(seconds: number): string {\n const s = Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0;\n const h = Math.floor(s / 3600);\n const m = Math.floor((s % 3600) / 60);\n const rest = String(s % 60).padStart(2, \"0\");\n return h > 0 ? `${h}:${String(m).padStart(2, \"0\")}:${rest}` : `${m}:${rest}`;\n}\n\n/** Clamps `value` between `min` and `max`. */\nexport const clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value));\n\nconst REDUCE = \"(prefers-reduced-motion: reduce)\";\nconst subscribeReduce = (notify: () => void) => {\n if (typeof window === \"undefined\" || !window.matchMedia) return () => undefined;\n const query = window.matchMedia(REDUCE);\n query.addEventListener?.(\"change\", notify);\n return () => query.removeEventListener?.(\"change\", notify);\n};\n\n/** `true` when the person asked for less motion (`prefers-reduced-motion: reduce`); follows a change of the setting. */\nexport function usePrefersReducedMotion(): boolean {\n return React.useSyncExternalStore(\n subscribeReduce,\n () => (typeof window !== \"undefined\" && window.matchMedia ? window.matchMedia(REDUCE).matches : false),\n () => false,\n );\n}\n\n/** The latest value of a callback, for an effect or an event that must not re-subscribe when it changes. */\nexport function useLatest<T>(value: T) {\n const ref = React.useRef(value);\n React.useLayoutEffect(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/** Calls `onChange(visible)` when at least `threshold` of the element enters or leaves the viewport. */\nexport function useInView(ref: React.RefObject<Element | null>, onChange: (visible: boolean) => void, enabled = true, threshold = 0.25) {\n const latest = useLatest(onChange);\n React.useEffect(() => {\n const element = ref.current;\n if (!enabled || !element || typeof IntersectionObserver === \"undefined\") return;\n const observer = new IntersectionObserver(([entry]) => entry && latest.current(entry.isIntersecting), { threshold });\n observer.observe(element);\n return () => observer.disconnect();\n }, [ref, enabled, threshold, latest]);\n}\n\n/** A value controlled by a prop when it is given, held inside otherwise; `set` calls `onChange` either way. */\nexport function useControllable<T>(value: T | undefined, defaultValue: T, onChange?: (next: T) => void) {\n const [inner, setInner] = React.useState(defaultValue);\n const controlled = value !== undefined;\n const current = controlled ? value : inner;\n const set = React.useCallback(\n (next: T) => {\n if (!controlled) setInner(next);\n onChange?.(next);\n },\n [controlled, onChange],\n );\n return [current, set] as const;\n}\n\n/** Starts a media element without an unhandled rejection (autoplay refused, the source replaced meanwhile). */\nexport function playSafely(media: HTMLMediaElement | null | undefined) {\n try {\n const started = media?.play() as Promise<void> | undefined;\n started?.catch?.(() => undefined);\n } catch {\n // Not playable here (no media support): the controls stay as they are.\n }\n}\n\nconst subscribeLoad = (notify: () => void) => {\n window.addEventListener(\"load\", notify);\n return () => window.removeEventListener(\"load\", notify);\n};\n/** `true` once the page has finished loading: a clip or a loop is not worth bytes before it (the page's LCP comes first). */\nexport function usePageLoaded(): boolean {\n return React.useSyncExternalStore(subscribeLoad, () => document.readyState === \"complete\", () => false);\n}\n\ntype SaveDataNavigator = Navigator & { connection?: { saveData?: boolean } };\n/** `true` when the person asked for less motion or less data: nothing plays, the posters stay. */\nexport function useCalm(): boolean {\n const reduce = usePrefersReducedMotion();\n return reduce || (typeof navigator !== \"undefined\" && Boolean((navigator as SaveDataNavigator).connection?.saveData));\n}\n\nconst subscribeVisibility = (notify: () => void) => {\n document.addEventListener(\"visibilitychange\", notify);\n return () => document.removeEventListener(\"visibilitychange\", notify);\n};\n/** `true` while the tab is hidden: what moves waits for it. */\nexport function usePageHidden(): boolean {\n return React.useSyncExternalStore(subscribeVisibility, () => document.visibilityState === \"hidden\", () => false);\n}\n"
179
231
  },
180
232
  {
181
233
  "path": "meta.ts",
182
- "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 | \"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 | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\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 | \"image-cropper\"\n | \"image-viewer\"\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 | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"identity-card\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\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 | \"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 | \"shop-gallery\"\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 | \"schema-form\"\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 * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `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 = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the thirteen domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"abuse\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\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 /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\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"
234
+ "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 | \"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 | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\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 | \"image-cropper\"\n | \"image-viewer\"\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 | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"identity-card\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\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 | \"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 | \"shop-gallery\"\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 | \"schema-form\"\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 Sovkora 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 * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `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 = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the thirteen domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"abuse\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\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 /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\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"
183
235
  }
184
236
  ],
185
237
  "dependencies": [
@@ -333,7 +333,7 @@
333
333
  "files": [
334
334
  {
335
335
  "path": "meta.ts",
336
- "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 | \"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 | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\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 | \"image-cropper\"\n | \"image-viewer\"\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 | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"identity-card\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\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 | \"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 | \"shop-gallery\"\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 | \"schema-form\"\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 * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `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 = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the thirteen domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"abuse\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\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 /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\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"
336
+ "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 | \"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 | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\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 | \"image-cropper\"\n | \"image-viewer\"\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 | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"identity-card\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\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 | \"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 | \"shop-gallery\"\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 | \"schema-form\"\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 Sovkora 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 * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `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 = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the thirteen domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"abuse\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\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 /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\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"
337
337
  },
338
338
  {
339
339
  "path": "meter/index.ts",