@krizaka/ui 3.4.0 → 3.6.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 (337) hide show
  1. package/README.md +1 -0
  2. package/dist/app-shell.d.ts +24 -22
  3. package/dist/app-shell.js +9 -3
  4. package/dist/app-shell.js.map +1 -1
  5. package/dist/argument-card.js +3 -3
  6. package/dist/chat.d.ts +187 -0
  7. package/dist/chat.js +132 -0
  8. package/dist/chat.js.map +1 -0
  9. package/dist/chunk-3GODX3D6.js +25 -0
  10. package/dist/chunk-3GODX3D6.js.map +1 -0
  11. package/dist/chunk-ECSCA3CN.js +128 -0
  12. package/dist/chunk-ECSCA3CN.js.map +1 -0
  13. package/dist/chunk-F2GKFIYK.js +47 -0
  14. package/dist/chunk-F2GKFIYK.js.map +1 -0
  15. package/dist/{chunk-R6SDS7JM.js → chunk-ND3L5VHT.js} +25 -2
  16. package/dist/chunk-ND3L5VHT.js.map +1 -0
  17. package/dist/command.js +1 -1
  18. package/dist/data-table.js +20 -134
  19. package/dist/data-table.js.map +1 -1
  20. package/dist/dialog.js +7 -3
  21. package/dist/dialog.js.map +1 -1
  22. package/dist/loader.d.ts +21 -1
  23. package/dist/loader.js +7 -3
  24. package/dist/loader.js.map +1 -1
  25. package/dist/map.js +7 -1
  26. package/dist/map.js.map +1 -1
  27. package/dist/marketing-layout.d.ts +3 -9
  28. package/dist/marketing-layout.js +24 -7
  29. package/dist/marketing-layout.js.map +1 -1
  30. package/dist/match-dialog.d.ts +32 -0
  31. package/dist/match-dialog.js +168 -0
  32. package/dist/match-dialog.js.map +1 -0
  33. package/dist/native.d.ts +484 -106
  34. package/dist/native.js +1967 -1323
  35. package/dist/native.js.map +1 -1
  36. package/dist/page-hero.js +3 -3
  37. package/dist/photo-grid.d.ts +122 -0
  38. package/dist/photo-grid.js +94 -0
  39. package/dist/photo-grid.js.map +1 -0
  40. package/dist/skip-link.d.ts +15 -0
  41. package/dist/skip-link.js +10 -0
  42. package/dist/skip-link.js.map +1 -0
  43. package/dist/step-progress.d.ts +20 -0
  44. package/dist/step-progress.js +17 -0
  45. package/dist/step-progress.js.map +1 -0
  46. package/dist/swipe-deck.d.ts +183 -0
  47. package/dist/swipe-deck.js +144 -0
  48. package/dist/swipe-deck.js.map +1 -0
  49. package/dist/tag-selector.d.ts +26 -0
  50. package/dist/tag-selector.js +21 -0
  51. package/dist/tag-selector.js.map +1 -0
  52. package/dist/tree-view.d.ts +2 -0
  53. package/dist/tree-view.js.map +1 -1
  54. package/dist/verified-badge.d.ts +16 -0
  55. package/dist/verified-badge.js +23 -0
  56. package/dist/verified-badge.js.map +1 -0
  57. package/package.json +120 -8
  58. package/registry/achievement.json +2 -1
  59. package/registry/action-bar.json +2 -1
  60. package/registry/action-sheet.json +1 -0
  61. package/registry/activity-feed.json +2 -1
  62. package/registry/alert.json +2 -1
  63. package/registry/app-shell.json +27 -5
  64. package/registry/argument-card.json +2 -1
  65. package/registry/audio-player.json +2 -1
  66. package/registry/auth-layout.json +7 -2
  67. package/registry/avatar.json +2 -1
  68. package/registry/badge.json +2 -1
  69. package/registry/button.json +2 -1
  70. package/registry/card-grid.json +2 -1
  71. package/registry/card.json +2 -1
  72. package/registry/catalogue-page.json +5 -2
  73. package/registry/changelog-page.json +5 -2
  74. package/registry/chat.json +918 -0
  75. package/registry/checkbox.json +2 -1
  76. package/registry/chip-link.json +2 -1
  77. package/registry/chip.json +2 -1
  78. package/registry/choice-grid.json +2 -1
  79. package/registry/cn.json +1 -0
  80. package/registry/code-block.json +2 -1
  81. package/registry/combobox.json +2 -1
  82. package/registry/command.json +2 -1
  83. package/registry/component-page.json +5 -2
  84. package/registry/confirm-button.json +2 -1
  85. package/registry/contact-page.json +5 -2
  86. package/registry/continue-prompt.json +2 -1
  87. package/registry/countdown.json +2 -1
  88. package/registry/cta-panel.json +2 -1
  89. package/registry/dashboard-layout.json +5 -2
  90. package/registry/data-table.json +2 -1
  91. package/registry/date-picker.json +3 -2
  92. package/registry/decision-list.json +2 -1
  93. package/registry/description-list.json +2 -1
  94. package/registry/detail-layout.json +16 -2
  95. package/registry/dialog.json +10 -4
  96. package/registry/docs-article-page.json +16 -2
  97. package/registry/docs-hub-page.json +5 -2
  98. package/registry/docs-layout.json +2 -1
  99. package/registry/dropdown-menu.json +2 -1
  100. package/registry/empty-state.json +14 -2
  101. package/registry/error-page.json +5 -2
  102. package/registry/examples/chat/conversation.d.ts +4 -0
  103. package/registry/examples/chat/conversation.js +22 -0
  104. package/registry/examples/chat/conversation.tsx +21 -0
  105. package/registry/examples/chat/inbox.d.ts +4 -0
  106. package/registry/examples/chat/inbox.js +15 -0
  107. package/registry/examples/chat/inbox.tsx +12 -0
  108. package/registry/examples/chat/native/conversation.d.ts +4 -0
  109. package/registry/examples/chat/native/conversation.dark.png +0 -0
  110. package/registry/examples/chat/native/conversation.js +23 -0
  111. package/registry/examples/chat/native/conversation.light.png +0 -0
  112. package/registry/examples/chat/native/conversation.tsx +20 -0
  113. package/registry/examples/chat/native/inbox.d.ts +4 -0
  114. package/registry/examples/chat/native/inbox.dark.png +0 -0
  115. package/registry/examples/chat/native/inbox.js +16 -0
  116. package/registry/examples/chat/native/inbox.light.png +0 -0
  117. package/registry/examples/chat/native/inbox.tsx +13 -0
  118. package/registry/examples/detail-layout/checkout.d.ts +4 -0
  119. package/registry/examples/detail-layout/checkout.js +37 -0
  120. package/registry/examples/detail-layout/checkout.tsx +44 -0
  121. package/registry/examples/docs-article-page/faq.d.ts +4 -0
  122. package/registry/examples/docs-article-page/faq.js +31 -0
  123. package/registry/examples/docs-article-page/faq.tsx +40 -0
  124. package/registry/examples/empty-state/library.d.ts +4 -0
  125. package/registry/examples/empty-state/library.js +25 -0
  126. package/registry/examples/empty-state/library.tsx +20 -0
  127. package/registry/examples/loader/branded.d.ts +4 -0
  128. package/registry/examples/loader/branded.js +12 -0
  129. package/registry/examples/loader/branded.tsx +7 -0
  130. package/registry/examples/loader/native/branded.d.ts +4 -0
  131. package/registry/examples/loader/native/branded.dark.png +0 -0
  132. package/registry/examples/loader/native/branded.js +12 -0
  133. package/registry/examples/loader/native/branded.light.png +0 -0
  134. package/registry/examples/loader/native/branded.tsx +11 -0
  135. package/registry/examples/longform-page/case-study.d.ts +4 -0
  136. package/registry/examples/longform-page/case-study.js +41 -0
  137. package/registry/examples/longform-page/case-study.tsx +40 -0
  138. package/registry/examples/match-dialog/its-a-match.d.ts +4 -0
  139. package/registry/examples/match-dialog/its-a-match.js +29 -0
  140. package/registry/examples/match-dialog/its-a-match.tsx +25 -0
  141. package/registry/examples/match-dialog/native/its-a-match.d.ts +4 -0
  142. package/registry/examples/match-dialog/native/its-a-match.dark.png +0 -0
  143. package/registry/examples/match-dialog/native/its-a-match.js +28 -0
  144. package/registry/examples/match-dialog/native/its-a-match.light.png +0 -0
  145. package/registry/examples/match-dialog/native/its-a-match.tsx +22 -0
  146. package/registry/examples/photo-grid/native/profile-photos.d.ts +4 -0
  147. package/registry/examples/photo-grid/native/profile-photos.dark.png +0 -0
  148. package/registry/examples/photo-grid/native/profile-photos.js +27 -0
  149. package/registry/examples/photo-grid/native/profile-photos.light.png +0 -0
  150. package/registry/examples/photo-grid/native/profile-photos.tsx +24 -0
  151. package/registry/examples/photo-grid/profile-photos.d.ts +4 -0
  152. package/registry/examples/photo-grid/profile-photos.js +28 -0
  153. package/registry/examples/photo-grid/profile-photos.tsx +25 -0
  154. package/registry/examples/pull-to-refresh/native/branded.d.ts +4 -0
  155. package/registry/examples/pull-to-refresh/native/branded.dark.png +0 -0
  156. package/registry/examples/pull-to-refresh/native/branded.js +14 -0
  157. package/registry/examples/pull-to-refresh/native/branded.light.png +0 -0
  158. package/registry/examples/pull-to-refresh/native/branded.tsx +23 -0
  159. package/registry/examples/screen/native/app-shell.d.ts +4 -0
  160. package/registry/examples/screen/native/app-shell.dark.png +0 -0
  161. package/registry/examples/screen/native/app-shell.js +25 -0
  162. package/registry/examples/screen/native/app-shell.light.png +0 -0
  163. package/registry/examples/screen/native/app-shell.tsx +33 -0
  164. package/registry/examples/screen/native/auth.d.ts +4 -0
  165. package/registry/examples/screen/native/auth.dark.png +0 -0
  166. package/registry/examples/screen/native/auth.js +24 -0
  167. package/registry/examples/screen/native/auth.light.png +0 -0
  168. package/registry/examples/screen/native/auth.tsx +20 -0
  169. package/registry/examples/screen/native/chat.d.ts +4 -0
  170. package/registry/examples/screen/native/chat.dark.png +0 -0
  171. package/registry/examples/screen/native/chat.js +27 -0
  172. package/registry/examples/screen/native/chat.light.png +0 -0
  173. package/registry/examples/screen/native/chat.tsx +22 -0
  174. package/registry/examples/screen/native/feed.d.ts +4 -0
  175. package/registry/examples/screen/native/feed.dark.png +0 -0
  176. package/registry/examples/screen/native/feed.js +24 -0
  177. package/registry/examples/screen/native/feed.light.png +0 -0
  178. package/registry/examples/screen/native/feed.tsx +34 -0
  179. package/registry/examples/screen/native/map.d.ts +4 -0
  180. package/registry/examples/screen/native/map.dark.png +0 -0
  181. package/registry/examples/screen/native/map.js +26 -0
  182. package/registry/examples/screen/native/map.light.png +0 -0
  183. package/registry/examples/screen/native/map.tsx +31 -0
  184. package/registry/examples/screen/native/notifications.d.ts +4 -0
  185. package/registry/examples/screen/native/notifications.dark.png +0 -0
  186. package/registry/examples/screen/native/notifications.js +21 -0
  187. package/registry/examples/screen/native/notifications.light.png +0 -0
  188. package/registry/examples/screen/native/notifications.tsx +21 -0
  189. package/registry/examples/screen/native/profile.d.ts +4 -0
  190. package/registry/examples/screen/native/profile.dark.png +0 -0
  191. package/registry/examples/screen/native/profile.js +29 -0
  192. package/registry/examples/screen/native/profile.light.png +0 -0
  193. package/registry/examples/screen/native/profile.tsx +27 -0
  194. package/registry/examples/screen/native/settings.d.ts +4 -0
  195. package/registry/examples/screen/native/settings.dark.png +0 -0
  196. package/registry/examples/screen/native/settings.js +20 -0
  197. package/registry/examples/screen/native/settings.light.png +0 -0
  198. package/registry/examples/screen/native/settings.tsx +19 -0
  199. package/registry/examples/skip-link/default.d.ts +4 -0
  200. package/registry/examples/skip-link/default.js +19 -0
  201. package/registry/examples/skip-link/default.tsx +12 -0
  202. package/registry/examples/splash-handoff/native/default.d.ts +4 -0
  203. package/registry/examples/splash-handoff/native/default.dark.png +0 -0
  204. package/registry/examples/splash-handoff/native/default.js +12 -0
  205. package/registry/examples/splash-handoff/native/default.light.png +0 -0
  206. package/registry/examples/splash-handoff/native/default.tsx +11 -0
  207. package/registry/examples/split-view/nearby.d.ts +4 -0
  208. package/registry/examples/split-view/nearby.js +33 -0
  209. package/registry/examples/split-view/nearby.tsx +45 -0
  210. package/registry/examples/split-view/notifications.d.ts +4 -0
  211. package/registry/examples/split-view/notifications.js +33 -0
  212. package/registry/examples/split-view/notifications.tsx +31 -0
  213. package/registry/examples/status-page/maintenance.d.ts +4 -0
  214. package/registry/examples/status-page/maintenance.js +29 -0
  215. package/registry/examples/status-page/maintenance.tsx +24 -0
  216. package/registry/examples/step-progress/native/sign-up.d.ts +4 -0
  217. package/registry/examples/step-progress/native/sign-up.dark.png +0 -0
  218. package/registry/examples/step-progress/native/sign-up.js +12 -0
  219. package/registry/examples/step-progress/native/sign-up.light.png +0 -0
  220. package/registry/examples/step-progress/native/sign-up.tsx +11 -0
  221. package/registry/examples/step-progress/sign-up.d.ts +4 -0
  222. package/registry/examples/step-progress/sign-up.js +22 -0
  223. package/registry/examples/step-progress/sign-up.tsx +16 -0
  224. package/registry/examples/swipe-deck/discover.d.ts +4 -0
  225. package/registry/examples/swipe-deck/discover.js +41 -0
  226. package/registry/examples/swipe-deck/discover.tsx +37 -0
  227. package/registry/examples/swipe-deck/native/discover.d.ts +4 -0
  228. package/registry/examples/swipe-deck/native/discover.dark.png +0 -0
  229. package/registry/examples/swipe-deck/native/discover.js +39 -0
  230. package/registry/examples/swipe-deck/native/discover.light.png +0 -0
  231. package/registry/examples/swipe-deck/native/discover.tsx +35 -0
  232. package/registry/examples/tag-selector/interests.d.ts +4 -0
  233. package/registry/examples/tag-selector/interests.js +14 -0
  234. package/registry/examples/tag-selector/interests.tsx +12 -0
  235. package/registry/examples/tag-selector/native/interests.d.ts +4 -0
  236. package/registry/examples/tag-selector/native/interests.dark.png +0 -0
  237. package/registry/examples/tag-selector/native/interests.js +15 -0
  238. package/registry/examples/tag-selector/native/interests.light.png +0 -0
  239. package/registry/examples/tag-selector/native/interests.tsx +15 -0
  240. package/registry/examples/verified-badge/native/verified.d.ts +4 -0
  241. package/registry/examples/verified-badge/native/verified.dark.png +0 -0
  242. package/registry/examples/verified-badge/native/verified.js +18 -0
  243. package/registry/examples/verified-badge/native/verified.light.png +0 -0
  244. package/registry/examples/verified-badge/native/verified.tsx +15 -0
  245. package/registry/examples/verified-badge/verified.d.ts +4 -0
  246. package/registry/examples/verified-badge/verified.js +17 -0
  247. package/registry/examples/verified-badge/verified.tsx +13 -0
  248. package/registry/fab.json +1 -0
  249. package/registry/field.json +2 -1
  250. package/registry/file-upload.json +3 -2
  251. package/registry/filter-bar.json +2 -1
  252. package/registry/form.json +3 -2
  253. package/registry/gallery-page.json +5 -2
  254. package/registry/glow-card.json +2 -1
  255. package/registry/goal-gauge.json +2 -1
  256. package/registry/header.json +1 -0
  257. package/registry/how-it-works-page.json +5 -2
  258. package/registry/image-cropper.json +2 -1
  259. package/registry/image-viewer.json +1 -0
  260. package/registry/index.json +608 -19
  261. package/registry/iso.json +2 -1
  262. package/registry/kanban.json +2 -1
  263. package/registry/kbd.json +2 -1
  264. package/registry/landing-page.json +5 -2
  265. package/registry/landscape.json +2 -1
  266. package/registry/legal-page.json +5 -2
  267. package/registry/link-card.json +2 -1
  268. package/registry/list.json +2 -1
  269. package/registry/loader.json +47 -3
  270. package/registry/longform-page.json +16 -2
  271. package/registry/map.json +4 -3
  272. package/registry/marketing-layout.json +13 -4
  273. package/registry/marquee.json +2 -1
  274. package/registry/mascot-quote.json +2 -1
  275. package/registry/mascot-state.json +2 -1
  276. package/registry/mascots.json +2 -1
  277. package/registry/match-dialog.json +315 -0
  278. package/registry/media-capture.json +2 -1
  279. package/registry/media-picker.json +1 -0
  280. package/registry/meter.json +2 -1
  281. package/registry/nav-bar.json +2 -1
  282. package/registry/number-ticker.json +2 -1
  283. package/registry/onboarding.json +1 -0
  284. package/registry/otp-input.json +1 -0
  285. package/registry/page-header.json +2 -1
  286. package/registry/page-hero.json +2 -1
  287. package/registry/page.json +2 -1
  288. package/registry/pagination.json +2 -1
  289. package/registry/permission-prompt.json +1 -0
  290. package/registry/photo-grid.json +303 -0
  291. package/registry/pointer-light.json +2 -1
  292. package/registry/popover.json +2 -1
  293. package/registry/pricing-page.json +5 -2
  294. package/registry/product-page.json +5 -2
  295. package/registry/profile-card.json +2 -1
  296. package/registry/progress.json +2 -1
  297. package/registry/promise-card.json +2 -1
  298. package/registry/pull-to-refresh.json +68 -4
  299. package/registry/radio-group.json +2 -1
  300. package/registry/screen.json +233 -0
  301. package/registry/scroll-stage.json +2 -1
  302. package/registry/search-field.json +2 -1
  303. package/registry/section-backdrop.json +2 -1
  304. package/registry/segmented.json +1 -0
  305. package/registry/separator.json +2 -1
  306. package/registry/settings-layout.json +5 -2
  307. package/registry/skeleton.json +2 -1
  308. package/registry/skip-link.json +122 -0
  309. package/registry/slider.json +2 -1
  310. package/registry/slot.json +2 -1
  311. package/registry/spinner.json +2 -1
  312. package/registry/splash-handoff.json +138 -0
  313. package/registry/split-view.json +27 -2
  314. package/registry/stage-banner.json +2 -1
  315. package/registry/stat.json +2 -1
  316. package/registry/status-page.json +18 -2
  317. package/registry/step-progress.json +256 -0
  318. package/registry/stepper.json +2 -1
  319. package/registry/swipe-deck.json +513 -0
  320. package/registry/swipeable-row.json +1 -0
  321. package/registry/switch.json +2 -1
  322. package/registry/tab-bar.json +1 -0
  323. package/registry/tabs.json +2 -1
  324. package/registry/tag-input.json +2 -1
  325. package/registry/tag-selector.json +277 -0
  326. package/registry/terminal-replay.json +2 -1
  327. package/registry/theme.json +2 -1
  328. package/registry/toast.json +2 -1
  329. package/registry/toc.json +2 -1
  330. package/registry/tooltip.json +2 -1
  331. package/registry/tree-view.json +10 -4
  332. package/registry/txt.json +1 -0
  333. package/registry/verified-badge.json +203 -0
  334. package/registry/video-player.json +2 -1
  335. package/registry/video-trimmer.json +2 -1
  336. package/registry/virtual.json +2 -1
  337. package/dist/chunk-R6SDS7JM.js.map +0 -1
@@ -5,6 +5,7 @@
5
5
  "summary": "Records read top to bottom — a leading visual, a title and a line, details and actions beside — dense or comfortable, selectable, windowed when long.",
6
6
  "description": "Records read top to bottom — a leading visual, a title and a line, details and actions beside — dense or comfortable, selectable, windowed when long.",
7
7
  "status": "beta",
8
+ "deprecated": null,
8
9
  "category": "data-display",
9
10
  "platforms": "both",
10
11
  "whenToUse": [
@@ -436,7 +437,7 @@
436
437
  },
437
438
  {
438
439
  "path": "meta.ts",
439
- "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 krizaka.com renders as\n// /docs/ui/<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 | \"achievement\"\n | \"action-bar\"\n | \"activity-feed\"\n | \"action-sheet\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\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 | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"form\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"map\"\n | \"longform-page\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"media-capture\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\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 | \"radio-group\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"stepper\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\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/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\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/**\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 */\nexport interface Example {\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 * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its phone\n * version thought out), copied as a starting point — at most 160 lines, listed on krizaka.com/docs/ui/templates.\n */\n readonly template?: boolean;\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}\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 readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\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"
440
+ "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 krizaka.com renders as\n// /docs/ui/<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 | \"achievement\"\n | \"action-bar\"\n | \"activity-feed\"\n | \"action-sheet\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\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 | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"form\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"map\"\n | \"longform-page\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"radio-group\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\n | \"splash-handoff\"\n | \"stage-banner\"\n | \"stat\"\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 | \"verified-badge\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\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 * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on krizaka.com/docs/ui/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}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** 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"
440
441
  }
441
442
  ],
442
443
  "dependencies": [
@@ -5,6 +5,7 @@
5
5
  "summary": "A wait from start to end: nothing for the first instants, then the Krizaka glyph with its words, a percentage and an ETA, held long enough to read, ending on a check or a cross that is drawn and announced — and `LoadingRegion`, which hands a region over to a skeleton of its shape.",
6
6
  "description": "A wait from start to end: nothing for the first instants, then the Krizaka glyph with its words, a percentage and an ETA, held long enough to read, ending on a check or a cross that is drawn and announced — and `LoadingRegion`, which hands a region over to a skeleton of its shape.",
7
7
  "status": "beta",
8
+ "deprecated": null,
8
9
  "category": "feedback",
9
10
  "platforms": "both",
10
11
  "whenToUse": [
@@ -29,6 +30,7 @@
29
30
  ],
30
31
  "bestPractices": [
31
32
  "Say what is loading (“Loading your invoices”), not “Loading…”; say how it ended with `successLabel` / `errorLabel`.",
33
+ "Brand it in a product: `mark={<OrochiaLogo animated />}` (web) or `product=\"orochia\"` (native) — the mark replaces the glyph, never the words.",
32
34
  "Keep the defaults: 250 ms of delay, 600 ms at least once shown — the two numbers that stop flicker.",
33
35
  "Give an `eta` when you can estimate it (format durations with `@krizaka/intl`): a known wait feels shorter.",
34
36
  "With `LoadingRegion`, draw the skeleton the shape of the content: nothing moves when it arrives."
@@ -90,6 +92,13 @@
90
92
  "description": "The time left, in words (“About 20 s left”) — passed translated (`@krizaka/intl` formats durations).",
91
93
  "required": false
92
94
  },
95
+ {
96
+ "name": "mark",
97
+ "type": "ReactNode",
98
+ "default": null,
99
+ "description": "The product's mark in place of the Krizaka glyph while it waits — `<OrochiaLogo animated />` (or `ProductLogo`) of\n`@krizaka/ui`; it takes the loader's size. The ending (check or cross) stays the glyph's. Decorative: leave `title` off.",
100
+ "required": false
101
+ },
93
102
  {
94
103
  "name": "minDuration",
95
104
  "type": "number",
@@ -231,6 +240,14 @@
231
240
  "path": "examples/loader/minimal.tsx",
232
241
  "module": "@krizaka/ui/registry/examples/loader/minimal",
233
242
  "code": "import { Loader } from \"@krizaka/ui/loader\";\n\n// The minimal API: a label. It appears after 250 ms and stays at least 600 ms once shown.\nexport default function LoaderMinimal() {\n return <Loader label=\"Loading\" delay={0} />;\n}\n"
243
+ },
244
+ {
245
+ "name": "branded",
246
+ "title": "The product's mark",
247
+ "description": "`mark`: Orochia's animated mark in place of the Krizaka glyph; the ending stays the check.",
248
+ "path": "examples/loader/branded.tsx",
249
+ "module": "@krizaka/ui/registry/examples/loader/branded",
250
+ "code": "import { OrochiaLogo } from \"@krizaka/ui\";\nimport { Loader } from \"@krizaka/ui/loader\";\n\n// The product's mark in place of the Krizaka glyph: Orochia waits with its own animated mark. Words, delay and ending stay.\nexport default function LoaderBranded() {\n return <Loader label=\"Loading your videos\" delay={0} variant=\"block\" mark={<OrochiaLogo animated />} />;\n}\n"
234
251
  }
235
252
  ]
236
253
  },
@@ -238,6 +255,7 @@
238
255
  "entry": "@krizaka/ui/native",
239
256
  "import": "import { Loader, LoaderGlyph, useDelayedWait } from \"@krizaka/ui/native\";",
240
257
  "differences": [
258
+ "`product` (`orochia`, `orazaka`, `yazakia`, `yororis`, `krizaka`) draws the product's animated `ProductMark`; on the web it is the `mark` slot.",
241
259
  "Announced with the platform's announcement (and a polite live region) instead of `role=\"status\"`.",
242
260
  "No `LoadingRegion`: lists show their own skeleton rows (`List loading`).",
243
261
  "`overlay` and `page` cover their parent with the theme's surface at 90 %; no backdrop blur."
@@ -323,6 +341,13 @@
323
341
  "description": "Once shown, the least milliseconds it stays. Default 600.",
324
342
  "required": false
325
343
  },
344
+ {
345
+ "name": "product",
346
+ "type": "BrandId",
347
+ "default": null,
348
+ "description": "The product whose animated mark waits in place of the Krizaka glyph (`orochia`, `orazaka`, `yazakia`, `yororis`,\n`krizaka`). Still when the system reduces motion; the ending stays the check or the cross.",
349
+ "required": false
350
+ },
326
351
  {
327
352
  "name": "status",
328
353
  "type": "\"success\" | \"loading\" | \"error\"",
@@ -385,6 +410,18 @@
385
410
  "dark": "examples/loader/native/block.dark.png",
386
411
  "light": "examples/loader/native/block.light.png"
387
412
  }
413
+ },
414
+ {
415
+ "name": "branded",
416
+ "title": "The product's mark",
417
+ "description": "`product`: the animated mark of the app waits for you, still under reduced motion.",
418
+ "path": "examples/loader/native/branded.tsx",
419
+ "module": "@krizaka/ui/registry/examples/loader/native/branded",
420
+ "code": "import { Loader } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\n\n// The app's own mark waits for you: the animated `ProductMark` of Orochia, still when the system reduces motion.\nexport default function NativeLoaderBranded() {\n return (\n <View style={{ width: 340 }}>\n <Loader label=\"Loading your videos\" product=\"orochia\" variant=\"block\" delay={0} />\n </View>\n );\n}\n",
421
+ "screenshots": {
422
+ "dark": "examples/loader/native/branded.dark.png",
423
+ "light": "examples/loader/native/branded.light.png"
424
+ }
388
425
  }
389
426
  ]
390
427
  },
@@ -395,15 +432,15 @@
395
432
  },
396
433
  {
397
434
  "path": "loader/loader.tsx",
398
- "content": "// Client (timers). The whole life of a wait, done right once: nothing for the first instants (a fast answer never\n// flashes a spinner), then the Krizaka glyph with its words and an ETA, held long enough to be read, ending on a\n// check or a cross that is drawn and announced. `LoadingRegion` hands a region over from its content to a skeleton of\n// the same shape, then to words when the wait grows long, then back to the content.\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { LoaderGlyph } from \"../spinner/glyph\";\n\nexport const loader = tv({\n slots: {\n root: \"text-fg-secondary\",\n box: \"kz-fade flex items-center gap-3\",\n glyph: \"shrink-0 text-accent\",\n text: \"flex min-w-0 flex-col\",\n label: \"font-medium text-fg\",\n detail: \"text-xs text-fg-secondary tabular-nums\",\n },\n variants: {\n variant: {\n inline: { box: \"text-sm\", glyph: \"h-5 w-5\" },\n block: { box: \"flex-col justify-center py-10 text-center text-sm\", glyph: \"h-9 w-9\", text: \"items-center\" },\n overlay: {\n root: \"absolute inset-0 z-10 flex items-center justify-center rounded-[inherit] empty:hidden\",\n box: \"flex-col rounded-xl border border-border-default bg-surface-1/90 px-6 py-5 text-center text-sm shadow-lg backdrop-blur-sm\",\n glyph: \"h-9 w-9\",\n text: \"items-center\",\n },\n page: {\n root: \"fixed inset-0 z-50 flex items-center justify-center bg-surface-0/80 backdrop-blur-sm empty:hidden\",\n box: \"flex-col text-center\",\n glyph: \"h-14 w-14\",\n text: \"items-center\",\n label: \"font-display text-lg\",\n },\n },\n ended: {\n success: { glyph: \"text-fg-success\" },\n error: { glyph: \"text-fg-danger\" },\n },\n },\n defaultVariants: { variant: \"inline\" },\n});\n\nexport type LoaderVariants = VariantProps<typeof loader>;\n\n/**\n * `true` once `active` has lasted `delay` ms; then stays `true` at least `minDuration` ms — a wait that ends early never\n * shows, one that shows never blinks.\n */\nexport function useDelayedWait(active: boolean, delay = 250, minDuration = 600): boolean {\n const [shown, setShown] = React.useState(false);\n const since = React.useRef(0);\n React.useEffect(() => {\n if (active === shown) return;\n const wait = active ? delay : Math.max(0, minDuration - (Date.now() - since.current));\n const timer = setTimeout(() => {\n since.current = Date.now();\n setShown(active);\n }, wait);\n return () => clearTimeout(timer);\n }, [active, shown, delay, minDuration]);\n return shown;\n}\n\nexport interface LoaderProps extends Omit<React.ComponentProps<\"div\">, \"children\"> {\n /** What is loading, in words (“Loading your invoices”) — passed translated; shown and announced. */\n label: string;\n /**\n * loading · success · error. When the wait ends, the loader shows how it ended for `endDuration` ms, then disappears.\n * @default \"loading\"\n */\n status?: \"loading\" | \"success\" | \"error\";\n /** The words of a success (“Invoices loaded”) — passed translated. Default: nothing more than the check. */\n successLabel?: string;\n /** The words of a failure (“Could not load the invoices”) — passed translated. */\n errorLabel?: string;\n /** Between 0 and 1: a determinate wait — the trace grows to it and the percentage shows. */\n value?: number | null;\n /** The time left, in words (“About 20 s left”) — passed translated (`@krizaka/intl` formats durations). */\n eta?: string;\n /**\n * Milliseconds before anything shows: a wait shorter than this never flashes.\n * @default 250\n */\n delay?: number;\n /**\n * Once shown, the least milliseconds it stays: it never blinks.\n * @default 600\n */\n minDuration?: number;\n /**\n * Milliseconds the ending (check or cross) stays before the loader disappears; `0` never shows it, `Infinity` keeps it.\n * @default 1600\n */\n endDuration?: number;\n /**\n * inline (beside the content) · block (a region's centre) · overlay (over a `relative` parent, frosted) · page (the\n * whole screen).\n * @default \"inline\"\n */\n variant?: LoaderVariants[\"variant\"];\n}\n\n/**\n * A wait, from start to end. `role=\"status\"` (polite): its words are announced when it shows and when it ends. Under\n * prefers-reduced-motion the glyph rests on a still frame; the delay and the ending stay.\n */\nexport function Loader({\n label,\n status = \"loading\",\n successLabel,\n errorLabel,\n value,\n eta,\n delay = 250,\n minDuration = 600,\n endDuration = 1600,\n variant,\n className,\n ...props\n}: LoaderProps) {\n const waiting = useDelayedWait(status === \"loading\", delay, minDuration);\n // Rendered already ended (a result to show), it shows its ending; otherwise only a wait that was seen ends visibly.\n const [ending, setEnding] = React.useState<\"success\" | \"error\" | null>(() => (status !== \"loading\" && endDuration > 0 ? status : null));\n const wasWaiting = React.useRef(false);\n React.useEffect(() => {\n if (!Number.isFinite(endDuration)) return;\n const hide = setTimeout(() => setEnding((e) => (wasWaiting.current ? e : null)), endDuration);\n return () => clearTimeout(hide);\n // Only the ending a loader was mounted with: later endings have their own timer below.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n React.useEffect(() => {\n if (waiting) {\n wasWaiting.current = true;\n return;\n }\n if (!wasWaiting.current || status === \"loading\") return;\n wasWaiting.current = false;\n const end = status;\n const show = setTimeout(() => setEnding(endDuration > 0 ? end : null), 0);\n const hide = Number.isFinite(endDuration) ? setTimeout(() => setEnding(null), endDuration) : undefined;\n return () => {\n clearTimeout(show);\n clearTimeout(hide);\n };\n }, [waiting, status, endDuration]);\n\n const phase = waiting ? \"loading\" : ending;\n const s = loader({ variant, ended: phase === \"success\" || phase === \"error\" ? phase : undefined });\n const known = phase === \"loading\" && typeof value === \"number\" && Number.isFinite(value);\n const words = phase === \"success\" ? (successLabel ?? label) : phase === \"error\" ? (errorLabel ?? label) : label;\n const detail = phase === \"loading\" ? [known ? `${Math.round(Math.min(1, Math.max(0, value)) * 100)} %` : null, eta].filter(Boolean).join(\" · \") : \"\";\n return (\n <div role=\"status\" aria-live=\"polite\" data-phase={phase ?? \"idle\"} className={s.root({ className })} {...props}>\n {phase && (\n <div className={s.box()}>\n <LoaderGlyph state={phase} value={known ? value : null} className={s.glyph()} />\n <span className={s.text()}>\n <span className={s.label()}>{words}</span>\n {detail && <span className={s.detail()}>{detail}</span>}\n </span>\n </div>\n )}\n </div>\n );\n}\n\nexport interface LoadingRegionProps extends React.ComponentProps<\"div\"> {\n /** Whether the content is on its way. */\n loading: boolean;\n /** What stands in while it loads: skeletons the shape of the content (no layout shift when it arrives). */\n skeleton: React.ReactNode;\n /** What is loading, in words — passed translated; announced when the wait shows. */\n label: string;\n /** The words when the wait grows long (“Still loading — the server is busy”) — passed translated. */\n slowLabel?: string;\n /**\n * Milliseconds of skeleton before the words of a long wait appear over it.\n * @default 4000\n */\n slowAfter?: number;\n /**\n * Milliseconds before the skeleton shows: a fast answer goes straight to the content.\n * @default 200\n */\n delay?: number;\n /**\n * Once shown, the least milliseconds the skeleton stays.\n * @default 500\n */\n minDuration?: number;\n}\n\n/**\n * A region that hands over: its content → (after `delay`) a skeleton of the same shape → (after `slowAfter`) words over\n * the skeleton → its content again, fading in. `aria-busy` while it waits; the wait is announced once.\n */\nexport function LoadingRegion({\n loading,\n skeleton,\n label,\n slowLabel,\n slowAfter = 4000,\n delay = 200,\n minDuration = 500,\n className,\n children,\n ...props\n}: LoadingRegionProps) {\n const waiting = useDelayedWait(loading, delay, minDuration);\n const slow = useDelayedWait(waiting && loading, slowAfter, 0);\n const busy = loading || waiting;\n return (\n <div aria-busy={busy} data-phase={waiting ? (slow ? \"slow\" : \"skeleton\") : busy ? \"pending\" : \"ready\"} className={[\"relative\", className].filter(Boolean).join(\" \")} {...props}>\n <span role=\"status\" className=\"sr-only\">\n {waiting ? (slow ? (slowLabel ?? label) : label) : \"\"}\n </span>\n {waiting ? (\n <div aria-hidden className=\"kz-fade\">\n {skeleton}\n </div>\n ) : busy ? (\n // Within the delay: the skeleton holds the place, invisible — nothing flashes, nothing jumps.\n <div aria-hidden className=\"invisible\">\n {skeleton}\n </div>\n ) : (\n <div className=\"kz-fade\">{children}</div>\n )}\n {waiting && slow && <Loader label={slowLabel ?? label} variant=\"overlay\" delay={0} minDuration={0} endDuration={0} aria-live=\"off\" role=\"presentation\" />}\n </div>\n );\n}\n"
435
+ "content": "// Client (timers). The whole life of a wait, done right once: nothing for the first instants (a fast answer never\n// flashes a spinner), then the Krizaka glyph with its words and an ETA, held long enough to be read, ending on a\n// check or a cross that is drawn and announced. `LoadingRegion` hands a region over from its content to a skeleton of\n// the same shape, then to words when the wait grows long, then back to the content.\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { LoaderGlyph } from \"../spinner/glyph\";\n\nexport const loader = tv({\n slots: {\n root: \"text-fg-secondary\",\n box: \"kz-fade flex items-center gap-3\",\n glyph: \"shrink-0 text-accent\",\n mark: \"block shrink-0 [&>svg]:block [&>svg]:h-full [&>svg]:w-full\",\n text: \"flex min-w-0 flex-col\",\n label: \"font-medium text-fg\",\n detail: \"text-xs text-fg-secondary tabular-nums\",\n },\n variants: {\n variant: {\n inline: { box: \"text-sm\", glyph: \"h-5 w-5\", mark: \"h-5 w-5\" },\n block: { box: \"flex-col justify-center py-10 text-center text-sm\", glyph: \"h-9 w-9\", mark: \"h-9 w-9\", text: \"items-center\" },\n overlay: {\n root: \"absolute inset-0 z-10 flex items-center justify-center rounded-[inherit] empty:hidden\",\n box: \"flex-col rounded-xl border border-border-default bg-surface-1/90 px-6 py-5 text-center text-sm shadow-lg backdrop-blur-sm\",\n glyph: \"h-9 w-9\", mark: \"h-9 w-9\",\n text: \"items-center\",\n },\n page: {\n root: \"fixed inset-0 z-50 flex items-center justify-center bg-surface-0/80 backdrop-blur-sm empty:hidden\",\n box: \"flex-col text-center\",\n glyph: \"h-14 w-14\", mark: \"h-14 w-14\",\n text: \"items-center\",\n label: \"font-display text-lg\",\n },\n },\n ended: {\n success: { glyph: \"text-fg-success\" },\n error: { glyph: \"text-fg-danger\" },\n },\n },\n defaultVariants: { variant: \"inline\" },\n});\n\nexport type LoaderVariants = VariantProps<typeof loader>;\n\n/**\n * `true` once `active` has lasted `delay` ms; then stays `true` at least `minDuration` ms — a wait that ends early never\n * shows, one that shows never blinks.\n */\nexport function useDelayedWait(active: boolean, delay = 250, minDuration = 600): boolean {\n const [shown, setShown] = React.useState(false);\n const since = React.useRef(0);\n React.useEffect(() => {\n if (active === shown) return;\n const wait = active ? delay : Math.max(0, minDuration - (Date.now() - since.current));\n const timer = setTimeout(() => {\n since.current = Date.now();\n setShown(active);\n }, wait);\n return () => clearTimeout(timer);\n }, [active, shown, delay, minDuration]);\n return shown;\n}\n\nexport interface LoaderProps extends Omit<React.ComponentProps<\"div\">, \"children\"> {\n /** What is loading, in words (“Loading your invoices”) — passed translated; shown and announced. */\n label: string;\n /**\n * loading · success · error. When the wait ends, the loader shows how it ended for `endDuration` ms, then disappears.\n * @default \"loading\"\n */\n status?: \"loading\" | \"success\" | \"error\";\n /** The words of a success (“Invoices loaded”) — passed translated. Default: nothing more than the check. */\n successLabel?: string;\n /** The words of a failure (“Could not load the invoices”) — passed translated. */\n errorLabel?: string;\n /** Between 0 and 1: a determinate wait — the trace grows to it and the percentage shows. */\n value?: number | null;\n /** The time left, in words (“About 20 s left”) — passed translated (`@krizaka/intl` formats durations). */\n eta?: string;\n /**\n * Milliseconds before anything shows: a wait shorter than this never flashes.\n * @default 250\n */\n delay?: number;\n /**\n * Once shown, the least milliseconds it stays: it never blinks.\n * @default 600\n */\n minDuration?: number;\n /**\n * Milliseconds the ending (check or cross) stays before the loader disappears; `0` never shows it, `Infinity` keeps it.\n * @default 1600\n */\n endDuration?: number;\n /**\n * inline (beside the content) · block (a region's centre) · overlay (over a `relative` parent, frosted) · page (the\n * whole screen).\n * @default \"inline\"\n */\n variant?: LoaderVariants[\"variant\"];\n /**\n * The product's mark in place of the Krizaka glyph while it waits — `<OrochiaLogo animated />` (or `ProductLogo`) of\n * `@krizaka/ui`; it takes the loader's size. The ending (check or cross) stays the glyph's. Decorative: leave `title` off.\n */\n mark?: React.ReactNode;\n}\n\n/**\n * A wait, from start to end. `role=\"status\"` (polite): its words are announced when it shows and when it ends. Under\n * prefers-reduced-motion the glyph rests on a still frame; the delay and the ending stay.\n */\nexport function Loader({\n label,\n status = \"loading\",\n successLabel,\n errorLabel,\n value,\n eta,\n delay = 250,\n minDuration = 600,\n endDuration = 1600,\n variant,\n mark,\n className,\n ...props\n}: LoaderProps) {\n const waiting = useDelayedWait(status === \"loading\", delay, minDuration);\n // Rendered already ended (a result to show), it shows its ending; otherwise only a wait that was seen ends visibly.\n const [ending, setEnding] = React.useState<\"success\" | \"error\" | null>(() => (status !== \"loading\" && endDuration > 0 ? status : null));\n const wasWaiting = React.useRef(false);\n React.useEffect(() => {\n if (!Number.isFinite(endDuration)) return;\n const hide = setTimeout(() => setEnding((e) => (wasWaiting.current ? e : null)), endDuration);\n return () => clearTimeout(hide);\n // Only the ending a loader was mounted with: later endings have their own timer below.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n React.useEffect(() => {\n if (waiting) {\n wasWaiting.current = true;\n return;\n }\n if (!wasWaiting.current || status === \"loading\") return;\n wasWaiting.current = false;\n const end = status;\n const show = setTimeout(() => setEnding(endDuration > 0 ? end : null), 0);\n const hide = Number.isFinite(endDuration) ? setTimeout(() => setEnding(null), endDuration) : undefined;\n return () => {\n clearTimeout(show);\n clearTimeout(hide);\n };\n }, [waiting, status, endDuration]);\n\n const phase = waiting ? \"loading\" : ending;\n const s = loader({ variant, ended: phase === \"success\" || phase === \"error\" ? phase : undefined });\n const known = phase === \"loading\" && typeof value === \"number\" && Number.isFinite(value);\n const words = phase === \"success\" ? (successLabel ?? label) : phase === \"error\" ? (errorLabel ?? label) : label;\n const detail = phase === \"loading\" ? [known ? `${Math.round(Math.min(1, Math.max(0, value)) * 100)} %` : null, eta].filter(Boolean).join(\" · \") : \"\";\n return (\n <div role=\"status\" aria-live=\"polite\" data-phase={phase ?? \"idle\"} className={s.root({ className })} {...props}>\n {phase && (\n <div className={s.box()}>\n {mark && phase === \"loading\" ? (\n <span aria-hidden className={s.mark()} data-mark=\"\">\n {mark}\n </span>\n ) : (\n <LoaderGlyph state={phase} value={known ? value : null} className={s.glyph()} />\n )}\n <span className={s.text()}>\n <span className={s.label()}>{words}</span>\n {detail && <span className={s.detail()}>{detail}</span>}\n </span>\n </div>\n )}\n </div>\n );\n}\n\nexport interface LoadingRegionProps extends React.ComponentProps<\"div\"> {\n /** Whether the content is on its way. */\n loading: boolean;\n /** What stands in while it loads: skeletons the shape of the content (no layout shift when it arrives). */\n skeleton: React.ReactNode;\n /** What is loading, in words — passed translated; announced when the wait shows. */\n label: string;\n /** The words when the wait grows long (“Still loading — the server is busy”) — passed translated. */\n slowLabel?: string;\n /**\n * Milliseconds of skeleton before the words of a long wait appear over it.\n * @default 4000\n */\n slowAfter?: number;\n /**\n * Milliseconds before the skeleton shows: a fast answer goes straight to the content.\n * @default 200\n */\n delay?: number;\n /**\n * Once shown, the least milliseconds the skeleton stays.\n * @default 500\n */\n minDuration?: number;\n}\n\n/**\n * A region that hands over: its content → (after `delay`) a skeleton of the same shape → (after `slowAfter`) words over\n * the skeleton → its content again, fading in. `aria-busy` while it waits; the wait is announced once.\n */\nexport function LoadingRegion({\n loading,\n skeleton,\n label,\n slowLabel,\n slowAfter = 4000,\n delay = 200,\n minDuration = 500,\n className,\n children,\n ...props\n}: LoadingRegionProps) {\n const waiting = useDelayedWait(loading, delay, minDuration);\n const slow = useDelayedWait(waiting && loading, slowAfter, 0);\n const busy = loading || waiting;\n return (\n <div aria-busy={busy} data-phase={waiting ? (slow ? \"slow\" : \"skeleton\") : busy ? \"pending\" : \"ready\"} className={[\"relative\", className].filter(Boolean).join(\" \")} {...props}>\n <span role=\"status\" className=\"sr-only\">\n {waiting ? (slow ? (slowLabel ?? label) : label) : \"\"}\n </span>\n {waiting ? (\n <div aria-hidden className=\"kz-fade\">\n {skeleton}\n </div>\n ) : busy ? (\n // Within the delay: the skeleton holds the place, invisible — nothing flashes, nothing jumps.\n <div aria-hidden className=\"invisible\">\n {skeleton}\n </div>\n ) : (\n <div className=\"kz-fade\">{children}</div>\n )}\n {waiting && slow && <Loader label={slowLabel ?? label} variant=\"overlay\" delay={0} minDuration={0} endDuration={0} aria-live=\"off\" role=\"presentation\" />}\n </div>\n );\n}\n"
399
436
  },
400
437
  {
401
438
  "path": "loader/meta.ts",
402
- "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Loader\",\n summary:\n \"A wait from start to end: nothing for the first instants, then the Krizaka glyph with its words, a percentage and an ETA, held long enough to read, ending on a check or a cross that is drawn and announced — and `LoadingRegion`, which hands a region over to a skeleton of its shape.\",\n status: \"beta\",\n category: \"feedback\",\n platforms: \"both\",\n whenToUse: [\n \"Any wait whose length you do not control (a fetch, a refresh): the delay keeps fast answers from flashing a spinner.\",\n \"A wait that ends in a result worth saying — “12 invoices loaded”, “Could not publish”.\",\n \"Over a region that stays readable while it refreshes (`variant=\\\"overlay\\\"`), or over the whole screen at start-up (`page`).\",\n \"`LoadingRegion` for a card, a list or a panel: a skeleton of its shape while it loads, words when it lasts.\",\n ],\n whenNotToUse: [\n { when: \"Inside the button that started the action: the button draws the same glyph.\", use: \"button\" },\n { when: \"For a long task with steps or a known size the user follows.\", use: \"progress\" },\n { when: \"A tiny wait glyph with nothing else.\", use: \"spinner\" },\n ],\n bestPractices: [\n \"Say what is loading (“Loading your invoices”), not “Loading…”; say how it ended with `successLabel` / `errorLabel`.\",\n \"Keep the defaults: 250 ms of delay, 600 ms at least once shown — the two numbers that stop flicker.\",\n \"Give an `eta` when you can estimate it (format durations with `@krizaka/intl`): a known wait feels shorter.\",\n \"With `LoadingRegion`, draw the skeleton the shape of the content: nothing moves when it arrives.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\n \"`role=\\\"status\\\"` (polite) is present from the first render, so its words are announced when the wait shows and again when it ends.\",\n \"`LoadingRegion` sets `aria-busy` on the region while it waits; the skeleton is hidden from assistive technology and the wait is announced once.\",\n \"Under `prefers-reduced-motion` the glyph rests on a still frame and endings do not animate; the delay, the words and the announcements stay.\",\n ],\n },\n related: [\"spinner\", \"skeleton\", \"progress\", \"button\"],\n web: {\n imports: [\"Loader\", \"LoadingRegion\", \"useDelayedWait\"],\n examples: [\n { name: \"fetch-flow\", title: \"No flash, then a result\", description: \"A fast answer shows nothing; a slow one shows the wait, then “12 invoices loaded” with a check, then nothing.\" },\n { name: \"region-handover\", title: \"Hand-over to a skeleton\", description: \"`LoadingRegion`: a skeleton of the card's shape, words when it lasts, the card fading in.\" },\n { name: \"upload-eta\", title: \"Progress and ETA\", description: \"`value` and `eta`: the trace grows, the percentage and the time left read in tabular figures.\" },\n { name: \"overlay\", title: \"Over a region\", description: \"`variant=\\\"overlay\\\"`: the report stays readable behind frosted glass while it refreshes.\" },\n { name: \"endings\", title: \"Endings\", description: \"`status`: a success and a failure, drawn in their colour and said in words.\" },\n { name: \"minimal\", title: \"Minimal\", description: \"A label, nothing else: the defaults do the rest.\" },\n ],\n },\n native: {\n imports: [\"Loader\", \"LoaderGlyph\", \"useDelayedWait\"],\n differences: [\n \"Announced with the platform's announcement (and a polite live region) instead of `role=\\\"status\\\"`.\",\n \"No `LoadingRegion`: lists show their own skeleton rows (`List loading`).\",\n \"`overlay` and `page` cover their parent with the theme's surface at 90 %; no backdrop blur.\",\n ],\n examples: [\n { name: \"job-wait\", title: \"A job's wait\", description: \"Determinate, with the time left, ending on a check and its words.\" },\n { name: \"block\", title: \"Block\", description: \"The centre of a region whose content is on its way.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
439
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Loader\",\n summary:\n \"A wait from start to end: nothing for the first instants, then the Krizaka glyph with its words, a percentage and an ETA, held long enough to read, ending on a check or a cross that is drawn and announced — and `LoadingRegion`, which hands a region over to a skeleton of its shape.\",\n status: \"beta\",\n category: \"feedback\",\n platforms: \"both\",\n whenToUse: [\n \"Any wait whose length you do not control (a fetch, a refresh): the delay keeps fast answers from flashing a spinner.\",\n \"A wait that ends in a result worth saying — “12 invoices loaded”, “Could not publish”.\",\n \"Over a region that stays readable while it refreshes (`variant=\\\"overlay\\\"`), or over the whole screen at start-up (`page`).\",\n \"`LoadingRegion` for a card, a list or a panel: a skeleton of its shape while it loads, words when it lasts.\",\n ],\n whenNotToUse: [\n { when: \"Inside the button that started the action: the button draws the same glyph.\", use: \"button\" },\n { when: \"For a long task with steps or a known size the user follows.\", use: \"progress\" },\n { when: \"A tiny wait glyph with nothing else.\", use: \"spinner\" },\n ],\n bestPractices: [\n \"Say what is loading (“Loading your invoices”), not “Loading…”; say how it ended with `successLabel` / `errorLabel`.\",\n \"Brand it in a product: `mark={<OrochiaLogo animated />}` (web) or `product=\\\"orochia\\\"` (native) — the mark replaces the glyph, never the words.\",\n \"Keep the defaults: 250 ms of delay, 600 ms at least once shown — the two numbers that stop flicker.\",\n \"Give an `eta` when you can estimate it (format durations with `@krizaka/intl`): a known wait feels shorter.\",\n \"With `LoadingRegion`, draw the skeleton the shape of the content: nothing moves when it arrives.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\n \"`role=\\\"status\\\"` (polite) is present from the first render, so its words are announced when the wait shows and again when it ends.\",\n \"`LoadingRegion` sets `aria-busy` on the region while it waits; the skeleton is hidden from assistive technology and the wait is announced once.\",\n \"Under `prefers-reduced-motion` the glyph rests on a still frame and endings do not animate; the delay, the words and the announcements stay.\",\n ],\n },\n related: [\"spinner\", \"skeleton\", \"progress\", \"button\"],\n web: {\n imports: [\"Loader\", \"LoadingRegion\", \"useDelayedWait\"],\n examples: [\n { name: \"fetch-flow\", title: \"No flash, then a result\", description: \"A fast answer shows nothing; a slow one shows the wait, then “12 invoices loaded” with a check, then nothing.\" },\n { name: \"region-handover\", title: \"Hand-over to a skeleton\", description: \"`LoadingRegion`: a skeleton of the card's shape, words when it lasts, the card fading in.\" },\n { name: \"upload-eta\", title: \"Progress and ETA\", description: \"`value` and `eta`: the trace grows, the percentage and the time left read in tabular figures.\" },\n { name: \"overlay\", title: \"Over a region\", description: \"`variant=\\\"overlay\\\"`: the report stays readable behind frosted glass while it refreshes.\" },\n { name: \"endings\", title: \"Endings\", description: \"`status`: a success and a failure, drawn in their colour and said in words.\" },\n { name: \"minimal\", title: \"Minimal\", description: \"A label, nothing else: the defaults do the rest.\" },\n { name: \"branded\", title: \"The product's mark\", description: \"`mark`: Orochia's animated mark in place of the Krizaka glyph; the ending stays the check.\" },\n ],\n },\n native: {\n imports: [\"Loader\", \"LoaderGlyph\", \"useDelayedWait\"],\n differences: [\n \"`product` (`orochia`, `orazaka`, `yazakia`, `yororis`, `krizaka`) draws the product's animated `ProductMark`; on the web it is the `mark` slot.\",\n \"Announced with the platform's announcement (and a polite live region) instead of `role=\\\"status\\\"`.\",\n \"No `LoadingRegion`: lists show their own skeleton rows (`List loading`).\",\n \"`overlay` and `page` cover their parent with the theme's surface at 90 %; no backdrop blur.\",\n ],\n examples: [\n { name: \"job-wait\", title: \"A job's wait\", description: \"Determinate, with the time left, ending on a check and its words.\" },\n { name: \"block\", title: \"Block\", description: \"The centre of a region whose content is on its way.\" },\n { name: \"branded\", title: \"The product's mark\", description: \"`product`: the animated mark of the app waits for you, still under reduced motion.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
403
440
  },
404
441
  {
405
442
  "path": "meta.ts",
406
- "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 krizaka.com renders as\n// /docs/ui/<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 | \"achievement\"\n | \"action-bar\"\n | \"activity-feed\"\n | \"action-sheet\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\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 | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"form\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"map\"\n | \"longform-page\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"media-capture\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\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 | \"radio-group\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"stepper\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\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/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\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/**\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 */\nexport interface Example {\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 * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its phone\n * version thought out), copied as a starting point — at most 160 lines, listed on krizaka.com/docs/ui/templates.\n */\n readonly template?: boolean;\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}\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 readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\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"
443
+ "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 krizaka.com renders as\n// /docs/ui/<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 | \"achievement\"\n | \"action-bar\"\n | \"activity-feed\"\n | \"action-sheet\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\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 | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"form\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"map\"\n | \"longform-page\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"radio-group\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\n | \"splash-handoff\"\n | \"stage-banner\"\n | \"stat\"\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 | \"verified-badge\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\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 * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on krizaka.com/docs/ui/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}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** 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"
407
444
  }
408
445
  ],
409
446
  "dependencies": [
@@ -456,6 +493,13 @@
456
493
  "description": "The time left, in words (“About 20 s left”) — passed translated (`@krizaka/intl` formats durations).",
457
494
  "required": false
458
495
  },
496
+ {
497
+ "name": "mark",
498
+ "type": "ReactNode",
499
+ "default": null,
500
+ "description": "The product's mark in place of the Krizaka glyph while it waits — `<OrochiaLogo animated />` (or `ProductLogo`) of\n`@krizaka/ui`; it takes the loader's size. The ending (check or cross) stays the glyph's. Decorative: leave `title` off.",
501
+ "required": false
502
+ },
459
503
  {
460
504
  "name": "minDuration",
461
505
  "type": "number",
@@ -5,6 +5,7 @@
5
5
  "summary": "A long read — a story, an essay, a case: numbered chapters in a reading column, pull quotes in the margin, figures that break out.",
6
6
  "description": "A long read — a story, an essay, a case: numbered chapters in a reading column, pull quotes in the margin, figures that break out.",
7
7
  "status": "beta",
8
+ "deprecated": null,
8
9
  "category": "templates",
9
10
  "platforms": "web",
10
11
  "whenToUse": [
@@ -111,9 +112,22 @@
111
112
  "title": "Our story",
112
113
  "description": "Krizaka's story in chapters, a pull quote and the flamingo's rule.",
113
114
  "template": true,
115
+ "purpose": "show",
116
+ "why": "A reader follows a story in chapters, at their own pace, with a break for the key line.",
114
117
  "path": "examples/longform-page/story.tsx",
115
118
  "module": "@krizaka/ui/registry/examples/longform-page/story",
116
119
  "code": "import { LongformPage } from \"@krizaka/ui/longform-page\";\nimport { MascotQuote } from \"@krizaka/ui/mascot-quote\";\nimport { Mascot } from \"@krizaka/ui/mascots\";\n\n// TEMPLATE — a long read (Krizaka's story): numbered chapters in a reading column, a sentence pulled into the margin,\n// a bird's quote breaking out under the text. Editorial, not cards; one column on a phone.\nexport default function LongformPageStory() {\n return (\n <LongformPage\n eyebrow=\"Our story\"\n title=\"Why a studio in Montréal builds its own AI\"\n lead=\"Three products, one rule: what is yours stays yours.\"\n aside={<Mascot bird=\"owl\" mood=\"welcome\" size={112} />}\n chapters={[\n {\n id: \"start\",\n title: \"It started with a lease\",\n pull: \"The prompt crossed the ocean before the answer came back.\",\n children: (\n <>\n <p>A notary asked a chatbot to summarise a lease. The answer was good; the lease was now on someone else's server.</p>\n <p>We built Orazaka so that question never has to leave the office.</p>\n </>\n ),\n },\n {\n id: \"creators\",\n title: \"Then came the creators\",\n children: <p>Orochia pays creators 90 % of what their fans spend, every Monday — no algorithm in between.</p>,\n figure: <MascotQuote bird=\"flamingo\" label=\"The flamingo's rule\">Whoever does the work gets paid first.</MascotQuote>,\n },\n ]}\n />\n );\n}\n"
120
+ },
121
+ {
122
+ "name": "case-study",
123
+ "title": "Case study",
124
+ "description": "A customer's situation, what changed and the figures that prove it, in chapters.",
125
+ "template": true,
126
+ "purpose": "show",
127
+ "why": "A prospect trusts a result they can read: the before, the change, the proof in numbers.",
128
+ "path": "examples/longform-page/case-study.tsx",
129
+ "module": "@krizaka/ui/registry/examples/longform-page/case-study",
130
+ "code": "import { LongformPage } from \"@krizaka/ui/longform-page\";\nimport { Stat } from \"@krizaka/ui/stat\";\n\n// TEMPLATE — a case study (a notary's office on Orazaka): the situation, what was done, the figures that prove it. Chapters\n// in a reading column, the result as a figure that breaks out of the column; one column on a phone.\nexport default function LongformPageCaseStudy() {\n return (\n <LongformPage\n brand=\"orazaka\"\n eyebrow=\"Case study · Notary\"\n title=\"Eleven leases a day, none of them leaving the office\"\n lead=\"A four-person firm in Laval summarises contracts with its own AI, on its own server.\"\n chapters={[\n {\n id: \"before\",\n title: \"Before\",\n pull: \"The summary took twenty minutes. The cloud tools took the lease with them.\",\n children: <p>Each lease was read twice by hand. Pasting it into a public chatbot was faster, and not an option.</p>,\n },\n {\n id: \"after\",\n title: \"What changed\",\n children: (\n <>\n <p>Orazaka runs on a Mac mini in the back room. A pack reads the lease and drafts the summary; the notary signs it.</p>\n <p>Nothing is sent outside the building, and every request is logged for the audit.</p>\n </>\n ),\n figure: (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-3\">\n <Stat label=\"Per lease\" value=\"2 min\" trend=\"down\" trendLabel=\"was 20 min\" />\n <Stat label=\"Sent outside\" value=\"0\" hint=\"all answered locally\" />\n <Stat label=\"Hours a week\" value=\"14\" trend=\"up\" trendLabel=\"given back\" />\n </div>\n ),\n },\n ]}\n />\n );\n}\n"
117
131
  }
118
132
  ]
119
133
  },
@@ -129,11 +143,11 @@
129
143
  },
130
144
  {
131
145
  "path": "longform-page/meta.ts",
132
- "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Longform page\",\n summary: \"A long read — a story, an essay, a case: numbered chapters in a reading column, pull quotes in the margin, figures that break out.\",\n status: \"beta\",\n category: \"templates\",\n platforms: \"web\",\n whenToUse: [\"A company's story, a case study, an essay.\", \"Any text read from the top, chapter by chapter.\"],\n whenNotToUse: [\n { when: \"For a documentation article.\", use: \"docs-article-page\" },\n { when: \"For a policy.\", use: \"legal-page\" },\n ],\n bestPractices: [\"Chapters of three to six paragraphs; one pull quote at most each.\", \"Figures carry a promise (a bird's quote, a schema), never decoration.\", \"Words and content arrive as props; the motion is the platform's (`[data-reveal]`, still under reduced motion).\"],\n accessibility: {\n keyboard: [],\n notes: [\"Each chapter is a `section` named by its `h2`; the numbers are decorative.\", \"The pull quote repeats the text: it adds nothing a reader would miss.\"],\n },\n related: [\"mascot-quote\", \"page-hero\", \"legal-page\"],\n web: {\n imports: [\"LongformPage\"],\n examples: [\n { name: \"story\", title: \"Our story\", description: \"Krizaka's story in chapters, a pull quote and the flamingo's rule.\", template: true },\n ],\n },\n} satisfies ComponentMeta;\n"
146
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Longform page\",\n summary: \"A long read — a story, an essay, a case: numbered chapters in a reading column, pull quotes in the margin, figures that break out.\",\n status: \"beta\",\n category: \"templates\",\n platforms: \"web\",\n whenToUse: [\"A company's story, a case study, an essay.\", \"Any text read from the top, chapter by chapter.\"],\n whenNotToUse: [\n { when: \"For a documentation article.\", use: \"docs-article-page\" },\n { when: \"For a policy.\", use: \"legal-page\" },\n ],\n bestPractices: [\"Chapters of three to six paragraphs; one pull quote at most each.\", \"Figures carry a promise (a bird's quote, a schema), never decoration.\", \"Words and content arrive as props; the motion is the platform's (`[data-reveal]`, still under reduced motion).\"],\n accessibility: {\n keyboard: [],\n notes: [\"Each chapter is a `section` named by its `h2`; the numbers are decorative.\", \"The pull quote repeats the text: it adds nothing a reader would miss.\"],\n },\n related: [\"mascot-quote\", \"page-hero\", \"legal-page\"],\n web: {\n imports: [\"LongformPage\"],\n examples: [\n { name: \"story\", title: \"Our story\", description: \"Krizaka's story in chapters, a pull quote and the flamingo's rule.\", template: true, purpose: \"show\", why: \"A reader follows a story in chapters, at their own pace, with a break for the key line.\" },\n { name: \"case-study\", title: \"Case study\", description: \"A customer's situation, what changed and the figures that prove it, in chapters.\", template: true, purpose: \"show\", why: \"A prospect trusts a result they can read: the before, the change, the proof in numbers.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
133
147
  },
134
148
  {
135
149
  "path": "meta.ts",
136
- "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 krizaka.com renders as\n// /docs/ui/<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 | \"achievement\"\n | \"action-bar\"\n | \"activity-feed\"\n | \"action-sheet\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\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 | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"form\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"map\"\n | \"longform-page\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"media-capture\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\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 | \"radio-group\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"stepper\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\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/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\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/**\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 */\nexport interface Example {\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 * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its phone\n * version thought out), copied as a starting point — at most 160 lines, listed on krizaka.com/docs/ui/templates.\n */\n readonly template?: boolean;\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}\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 readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\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"
150
+ "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 krizaka.com renders as\n// /docs/ui/<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 | \"achievement\"\n | \"action-bar\"\n | \"activity-feed\"\n | \"action-sheet\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\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 | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"form\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"map\"\n | \"longform-page\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"radio-group\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\n | \"splash-handoff\"\n | \"stage-banner\"\n | \"stat\"\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 | \"verified-badge\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\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 * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on krizaka.com/docs/ui/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}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** 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"
137
151
  }
138
152
  ],
139
153
  "dependencies": [],