@krizaka/ui 3.5.0 → 3.7.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 (285) 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/chat.js +2 -1
  6. package/dist/chat.js.map +1 -1
  7. package/dist/chunk-3GODX3D6.js +25 -0
  8. package/dist/chunk-3GODX3D6.js.map +1 -0
  9. package/dist/{chunk-F2GKFIYK.js → chunk-CURW36FI.js} +1 -1
  10. package/dist/chunk-JXLDUDTD.js +2 -0
  11. package/dist/chunk-JXLDUDTD.js.map +1 -0
  12. package/dist/{chunk-R6SDS7JM.js → chunk-ND3L5VHT.js} +25 -2
  13. package/dist/chunk-ND3L5VHT.js.map +1 -0
  14. package/dist/chunk-NPF3OHE2.js +2 -0
  15. package/dist/chunk-NPF3OHE2.js.map +1 -0
  16. package/dist/{chunk-ECSCA3CN.js → chunk-UOMP6VOZ.js} +1 -1
  17. package/dist/command.js +1 -1
  18. package/dist/data-table.js +2 -1
  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 +3 -1
  31. package/dist/match-dialog.js +29 -5
  32. package/dist/match-dialog.js.map +1 -1
  33. package/dist/native/vertical-video.d.ts +102 -0
  34. package/dist/native/vertical-video.js +163 -0
  35. package/dist/native/vertical-video.js.map +1 -0
  36. package/dist/native.d.ts +65 -2
  37. package/dist/native.js +960 -878
  38. package/dist/native.js.map +1 -1
  39. package/dist/skip-link.d.ts +15 -0
  40. package/dist/skip-link.js +10 -0
  41. package/dist/skip-link.js.map +1 -0
  42. package/dist/tree-view.d.ts +2 -0
  43. package/dist/tree-view.js.map +1 -1
  44. package/dist/vertical-video.d.ts +112 -0
  45. package/dist/vertical-video.js +307 -0
  46. package/dist/vertical-video.js.map +1 -0
  47. package/package.json +56 -8
  48. package/registry/achievement.json +2 -1
  49. package/registry/action-bar.json +2 -1
  50. package/registry/action-sheet.json +1 -0
  51. package/registry/activity-feed.json +2 -1
  52. package/registry/alert.json +2 -1
  53. package/registry/app-shell.json +27 -5
  54. package/registry/argument-card.json +2 -1
  55. package/registry/audio-player.json +2 -1
  56. package/registry/auth-layout.json +7 -2
  57. package/registry/avatar.json +7 -6
  58. package/registry/badge.json +2 -1
  59. package/registry/button.json +2 -1
  60. package/registry/card-grid.json +2 -1
  61. package/registry/card.json +2 -1
  62. package/registry/catalogue-page.json +5 -2
  63. package/registry/changelog-page.json +5 -2
  64. package/registry/chat.json +2 -1
  65. package/registry/checkbox.json +2 -1
  66. package/registry/chip-link.json +2 -1
  67. package/registry/chip.json +2 -1
  68. package/registry/choice-grid.json +2 -1
  69. package/registry/cn.json +1 -0
  70. package/registry/code-block.json +2 -1
  71. package/registry/combobox.json +2 -1
  72. package/registry/command.json +2 -1
  73. package/registry/component-page.json +5 -2
  74. package/registry/confirm-button.json +2 -1
  75. package/registry/contact-page.json +5 -2
  76. package/registry/continue-prompt.json +2 -1
  77. package/registry/countdown.json +2 -1
  78. package/registry/cta-panel.json +2 -1
  79. package/registry/dashboard-layout.json +5 -2
  80. package/registry/data-table.json +2 -1
  81. package/registry/date-picker.json +3 -2
  82. package/registry/decision-list.json +2 -1
  83. package/registry/description-list.json +2 -1
  84. package/registry/detail-layout.json +16 -2
  85. package/registry/dialog.json +10 -4
  86. package/registry/docs-article-page.json +16 -2
  87. package/registry/docs-hub-page.json +5 -2
  88. package/registry/docs-layout.json +2 -1
  89. package/registry/dropdown-menu.json +2 -1
  90. package/registry/empty-state.json +14 -2
  91. package/registry/error-page.json +5 -2
  92. package/registry/examples/avatar/group.js +4 -7
  93. package/registry/examples/avatar/group.tsx +4 -11
  94. package/registry/examples/avatar/native/group.dark.png +0 -0
  95. package/registry/examples/avatar/native/group.js +4 -4
  96. package/registry/examples/avatar/native/group.light.png +0 -0
  97. package/registry/examples/avatar/native/group.tsx +4 -4
  98. package/registry/examples/avatar/native/presence.dark.png +0 -0
  99. package/registry/examples/avatar/native/presence.js +8 -5
  100. package/registry/examples/avatar/native/presence.light.png +0 -0
  101. package/registry/examples/avatar/native/presence.tsx +9 -5
  102. package/registry/examples/avatar/with-image.js +1 -4
  103. package/registry/examples/avatar/with-image.tsx +2 -9
  104. package/registry/examples/detail-layout/checkout.d.ts +4 -0
  105. package/registry/examples/detail-layout/checkout.js +37 -0
  106. package/registry/examples/detail-layout/checkout.tsx +44 -0
  107. package/registry/examples/docs-article-page/faq.d.ts +4 -0
  108. package/registry/examples/docs-article-page/faq.js +31 -0
  109. package/registry/examples/docs-article-page/faq.tsx +40 -0
  110. package/registry/examples/empty-state/library.d.ts +4 -0
  111. package/registry/examples/empty-state/library.js +25 -0
  112. package/registry/examples/empty-state/library.tsx +20 -0
  113. package/registry/examples/loader/branded.d.ts +4 -0
  114. package/registry/examples/loader/branded.js +12 -0
  115. package/registry/examples/loader/branded.tsx +7 -0
  116. package/registry/examples/loader/native/branded.d.ts +4 -0
  117. package/registry/examples/loader/native/branded.dark.png +0 -0
  118. package/registry/examples/loader/native/branded.js +12 -0
  119. package/registry/examples/loader/native/branded.light.png +0 -0
  120. package/registry/examples/loader/native/branded.tsx +11 -0
  121. package/registry/examples/longform-page/case-study.d.ts +4 -0
  122. package/registry/examples/longform-page/case-study.js +41 -0
  123. package/registry/examples/longform-page/case-study.tsx +40 -0
  124. package/registry/examples/profile-card/creator.js +2 -2
  125. package/registry/examples/profile-card/creator.tsx +2 -2
  126. package/registry/examples/profile-card/match.js +2 -2
  127. package/registry/examples/profile-card/match.tsx +2 -2
  128. package/registry/examples/profile-card/native/default.dark.png +0 -0
  129. package/registry/examples/profile-card/native/default.js +2 -2
  130. package/registry/examples/profile-card/native/default.light.png +0 -0
  131. package/registry/examples/profile-card/native/default.tsx +2 -2
  132. package/registry/examples/pull-to-refresh/native/branded.d.ts +4 -0
  133. package/registry/examples/pull-to-refresh/native/branded.dark.png +0 -0
  134. package/registry/examples/pull-to-refresh/native/branded.js +14 -0
  135. package/registry/examples/pull-to-refresh/native/branded.light.png +0 -0
  136. package/registry/examples/pull-to-refresh/native/branded.tsx +23 -0
  137. package/registry/examples/screen/native/app-shell.dark.png +0 -0
  138. package/registry/examples/screen/native/app-shell.js +1 -1
  139. package/registry/examples/screen/native/app-shell.light.png +0 -0
  140. package/registry/examples/screen/native/app-shell.tsx +1 -1
  141. package/registry/examples/screen/native/feed.dark.png +0 -0
  142. package/registry/examples/screen/native/feed.js +31 -14
  143. package/registry/examples/screen/native/feed.light.png +0 -0
  144. package/registry/examples/screen/native/feed.tsx +28 -24
  145. package/registry/examples/screen/native/map.d.ts +4 -0
  146. package/registry/examples/screen/native/map.dark.png +0 -0
  147. package/registry/examples/screen/native/map.js +26 -0
  148. package/registry/examples/screen/native/map.light.png +0 -0
  149. package/registry/examples/screen/native/map.tsx +31 -0
  150. package/registry/examples/screen/native/notifications.d.ts +4 -0
  151. package/registry/examples/screen/native/notifications.dark.png +0 -0
  152. package/registry/examples/screen/native/notifications.js +21 -0
  153. package/registry/examples/screen/native/notifications.light.png +0 -0
  154. package/registry/examples/screen/native/notifications.tsx +21 -0
  155. package/registry/examples/screen/native/profile.dark.png +0 -0
  156. package/registry/examples/screen/native/profile.js +2 -2
  157. package/registry/examples/screen/native/profile.light.png +0 -0
  158. package/registry/examples/screen/native/profile.tsx +2 -2
  159. package/registry/examples/skip-link/default.d.ts +4 -0
  160. package/registry/examples/skip-link/default.js +19 -0
  161. package/registry/examples/skip-link/default.tsx +12 -0
  162. package/registry/examples/splash-handoff/native/default.d.ts +4 -0
  163. package/registry/examples/splash-handoff/native/default.dark.png +0 -0
  164. package/registry/examples/splash-handoff/native/default.js +12 -0
  165. package/registry/examples/splash-handoff/native/default.light.png +0 -0
  166. package/registry/examples/splash-handoff/native/default.tsx +11 -0
  167. package/registry/examples/split-view/nearby.d.ts +4 -0
  168. package/registry/examples/split-view/nearby.js +33 -0
  169. package/registry/examples/split-view/nearby.tsx +45 -0
  170. package/registry/examples/split-view/notifications.d.ts +4 -0
  171. package/registry/examples/split-view/notifications.js +33 -0
  172. package/registry/examples/split-view/notifications.tsx +31 -0
  173. package/registry/examples/status-page/maintenance.d.ts +4 -0
  174. package/registry/examples/status-page/maintenance.js +29 -0
  175. package/registry/examples/status-page/maintenance.tsx +24 -0
  176. package/registry/examples/swipe-deck/discover.js +2 -3
  177. package/registry/examples/swipe-deck/discover.tsx +2 -3
  178. package/registry/examples/swipe-deck/native/discover.dark.png +0 -0
  179. package/registry/examples/swipe-deck/native/discover.js +2 -3
  180. package/registry/examples/swipe-deck/native/discover.light.png +0 -0
  181. package/registry/examples/swipe-deck/native/discover.tsx +2 -3
  182. package/registry/examples/vertical-video/feed.d.ts +4 -0
  183. package/registry/examples/vertical-video/feed.js +40 -0
  184. package/registry/examples/vertical-video/feed.tsx +36 -0
  185. package/registry/examples/vertical-video/native/rail.d.ts +4 -0
  186. package/registry/examples/vertical-video/native/rail.dark.png +0 -0
  187. package/registry/examples/vertical-video/native/rail.js +39 -0
  188. package/registry/examples/vertical-video/native/rail.light.png +0 -0
  189. package/registry/examples/vertical-video/native/rail.tsx +37 -0
  190. package/registry/examples/vertical-video/rail.d.ts +4 -0
  191. package/registry/examples/vertical-video/rail.js +39 -0
  192. package/registry/examples/vertical-video/rail.tsx +39 -0
  193. package/registry/fab.json +1 -0
  194. package/registry/field.json +2 -1
  195. package/registry/file-upload.json +3 -2
  196. package/registry/filter-bar.json +2 -1
  197. package/registry/form.json +3 -2
  198. package/registry/gallery-page.json +5 -2
  199. package/registry/glow-card.json +2 -1
  200. package/registry/goal-gauge.json +2 -1
  201. package/registry/header.json +1 -0
  202. package/registry/how-it-works-page.json +5 -2
  203. package/registry/image-cropper.json +2 -1
  204. package/registry/image-viewer.json +1 -0
  205. package/registry/index.json +492 -22
  206. package/registry/iso.json +2 -1
  207. package/registry/kanban.json +2 -1
  208. package/registry/kbd.json +2 -1
  209. package/registry/landing-page.json +5 -2
  210. package/registry/landscape.json +2 -1
  211. package/registry/legal-page.json +5 -2
  212. package/registry/link-card.json +2 -1
  213. package/registry/list.json +2 -1
  214. package/registry/loader.json +47 -3
  215. package/registry/longform-page.json +16 -2
  216. package/registry/map.json +4 -3
  217. package/registry/marketing-layout.json +13 -4
  218. package/registry/marquee.json +2 -1
  219. package/registry/mascot-quote.json +2 -1
  220. package/registry/mascot-state.json +2 -1
  221. package/registry/mascots.json +2 -1
  222. package/registry/match-dialog.json +17 -2
  223. package/registry/media-capture.json +2 -1
  224. package/registry/media-picker.json +1 -0
  225. package/registry/meter.json +2 -1
  226. package/registry/nav-bar.json +2 -1
  227. package/registry/number-ticker.json +2 -1
  228. package/registry/onboarding.json +1 -0
  229. package/registry/otp-input.json +1 -0
  230. package/registry/page-header.json +2 -1
  231. package/registry/page-hero.json +2 -1
  232. package/registry/page.json +2 -1
  233. package/registry/pagination.json +2 -1
  234. package/registry/permission-prompt.json +1 -0
  235. package/registry/photo-grid.json +2 -1
  236. package/registry/pointer-light.json +2 -1
  237. package/registry/popover.json +2 -1
  238. package/registry/pricing-page.json +5 -2
  239. package/registry/product-page.json +5 -2
  240. package/registry/profile-card.json +6 -5
  241. package/registry/progress.json +2 -1
  242. package/registry/promise-card.json +2 -1
  243. package/registry/pull-to-refresh.json +68 -4
  244. package/registry/radio-group.json +2 -1
  245. package/registry/screen.json +55 -6
  246. package/registry/scroll-stage.json +2 -1
  247. package/registry/search-field.json +2 -1
  248. package/registry/section-backdrop.json +2 -1
  249. package/registry/segmented.json +1 -0
  250. package/registry/separator.json +2 -1
  251. package/registry/settings-layout.json +5 -2
  252. package/registry/skeleton.json +2 -1
  253. package/registry/skip-link.json +122 -0
  254. package/registry/slider.json +2 -1
  255. package/registry/slot.json +2 -1
  256. package/registry/spinner.json +2 -1
  257. package/registry/splash-handoff.json +138 -0
  258. package/registry/split-view.json +27 -2
  259. package/registry/stage-banner.json +2 -1
  260. package/registry/stat.json +2 -1
  261. package/registry/status-page.json +18 -2
  262. package/registry/step-progress.json +2 -1
  263. package/registry/stepper.json +2 -1
  264. package/registry/swipe-deck.json +5 -4
  265. package/registry/swipeable-row.json +1 -0
  266. package/registry/switch.json +2 -1
  267. package/registry/tab-bar.json +1 -0
  268. package/registry/tabs.json +2 -1
  269. package/registry/tag-input.json +2 -1
  270. package/registry/tag-selector.json +2 -1
  271. package/registry/terminal-replay.json +2 -1
  272. package/registry/theme.json +2 -1
  273. package/registry/toast.json +2 -1
  274. package/registry/toc.json +2 -1
  275. package/registry/tooltip.json +2 -1
  276. package/registry/tree-view.json +10 -4
  277. package/registry/txt.json +1 -0
  278. package/registry/verified-badge.json +2 -1
  279. package/registry/vertical-video.json +871 -0
  280. package/registry/video-player.json +2 -1
  281. package/registry/video-trimmer.json +2 -1
  282. package/registry/virtual.json +2 -1
  283. package/dist/chunk-R6SDS7JM.js.map +0 -1
  284. /package/dist/{chunk-F2GKFIYK.js.map → chunk-CURW36FI.js.map} +0 -0
  285. /package/dist/{chunk-ECSCA3CN.js.map → chunk-UOMP6VOZ.js.map} +0 -0
@@ -2,9 +2,10 @@
2
2
  "name": "screen",
3
3
  "type": "native",
4
4
  "title": "Screen",
5
- "summary": "A screen of the app — a header, the content (scrolling, rising with the keyboard), a footer — and the templates built on it: app shell, sign-in, profile, feed, chat, settings.",
6
- "description": "A screen of the app — a header, the content (scrolling, rising with the keyboard), a footer — and the templates built on it: app shell, sign-in, profile, feed, chat, settings.",
5
+ "summary": "A screen of the app — a header, the content (scrolling, rising with the keyboard), a footer — and the templates built on it: app shell, sign-in, profile, feed, chat, settings, a map, notifications.",
6
+ "description": "A screen of the app — a header, the content (scrolling, rising with the keyboard), a footer — and the templates built on it: app shell, sign-in, profile, feed, chat, settings, a map, notifications.",
7
7
  "status": "beta",
8
+ "deprecated": null,
8
9
  "category": "layout",
9
10
  "platforms": "native",
10
11
  "whenToUse": [
@@ -106,9 +107,12 @@
106
107
  "name": "app-shell",
107
108
  "title": "App shell",
108
109
  "description": "A header, a section's content, the tab bar.",
110
+ "template": true,
111
+ "purpose": "operate",
112
+ "why": "A person moves between the main sections of the app with one thumb, the tab bar always in reach.",
109
113
  "path": "examples/screen/native/app-shell.tsx",
110
114
  "module": "@krizaka/ui/registry/examples/screen/native/app-shell",
111
- "code": "import { Header, Screen, TabBar, Txt } from \"@krizaka/ui/native\";\nimport { useState } from \"react\";\nimport { View } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nconst icon = (d: string) => (on: boolean, color: string) => (\n <Svg width={24} height={24} viewBox=\"0 0 24 24\" fill={on ? color : \"none\"} stroke={color} strokeWidth={2} strokeLinejoin=\"round\">\n <Path d={d} />\n </Svg>\n);\nconst TABS = [\n { value: \"discover\", label: \"Discover\", icon: icon(\"M12 3l2.6 6.4L21 12l-6.4 2.6L12 21l-2.6-6.4L3 12l6.4-2.6z\") },\n { value: \"likes\", label: \"Likes\", badge: 4, badgeLabel: \"4 new\", icon: icon(\"M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z\") },\n { value: \"chats\", label: \"Chats\", badge: 2, badgeLabel: \"2 unread\", icon: icon(\"M4 5h16v11H8l-4 4z\") },\n { value: \"me\", label: \"Me\", icon: icon(\"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21a8 8 0 0 1 16 0\") },\n];\n\n// The app shell: a header with its large title, the section's content, the tab bar clear of the home indicator.\nexport default function NativeScreenAppShell() {\n const [tab, setTab] = useState(\"likes\");\n return (\n <View style={{ width: 360, height: 640 }}>\n <Screen header={<Header title=\"Likes\" subtitle=\"4 people liked you\" />} footer={<TabBar aria-label=\"Main sections\" items={TABS} value={tab} onValueChange={setTab} />} padding={0}>\n {[\"Elena, 29\", \"Noah, 31\", \"Mina, 27\", \"Alex, 33\"].map((name) => (\n <View key={name} style={{ gap: 2, paddingHorizontal: 16, paddingVertical: 12 }}>\n <Txt variant=\"label\">{name}</Txt>\n <Txt variant=\"caption\" tone=\"secondary\">Liked you today</Txt>\n </View>\n ))}\n </Screen>\n </View>\n );\n}\n",
115
+ "code": "import { Header, Screen, TabBar, Txt } from \"@krizaka/ui/native\";\nimport { useState } from \"react\";\nimport { View } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nconst icon = (d: string) => (on: boolean, color: string) => (\n <Svg width={24} height={24} viewBox=\"0 0 24 24\" fill={on ? color : \"none\"} stroke={color} strokeWidth={2} strokeLinejoin=\"round\">\n <Path d={d} />\n </Svg>\n);\nconst TABS = [\n { value: \"discover\", label: \"Discover\", icon: icon(\"M12 3l2.6 6.4L21 12l-6.4 2.6L12 21l-2.6-6.4L3 12l6.4-2.6z\") },\n { value: \"likes\", label: \"Likes\", badge: 4, badgeLabel: \"4 new\", icon: icon(\"M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z\") },\n { value: \"chats\", label: \"Chats\", badge: 2, badgeLabel: \"2 unread\", icon: icon(\"M4 5h16v11H8l-4 4z\") },\n { value: \"me\", label: \"Me\", icon: icon(\"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21a8 8 0 0 1 16 0\") },\n];\n\n// The app shell: a header with its large title, the section's content, the tab bar clear of the home indicator.\nexport default function NativeScreenAppShell() {\n const [tab, setTab] = useState(\"likes\");\n return (\n <View style={{ width: 360, height: 640 }}>\n <Screen header={<Header title=\"Likes\" subtitle=\"4 people liked you\" />} footer={<TabBar aria-label=\"Main sections\" items={TABS} value={tab} onValueChange={setTab} />} padding={0}>\n {[\"Camille, 29\", \"Tomás, 31\", \"Noor, 27\", \"Ada, 33\"].map((name) => (\n <View key={name} style={{ gap: 2, paddingHorizontal: 16, paddingVertical: 12 }}>\n <Txt variant=\"label\">{name}</Txt>\n <Txt variant=\"caption\" tone=\"secondary\">Liked you today</Txt>\n </View>\n ))}\n </Screen>\n </View>\n );\n}\n",
112
116
  "screenshots": {
113
117
  "dark": "examples/screen/native/app-shell.dark.png",
114
118
  "light": "examples/screen/native/app-shell.light.png"
@@ -118,6 +122,9 @@
118
122
  "name": "auth",
119
123
  "title": "Sign in",
120
124
  "description": "The mark, two fields, the main action pinned.",
125
+ "template": true,
126
+ "purpose": "act",
127
+ "why": "A person signs in with the least typing: the brand, two fields, the main action pinned above the keyboard.",
121
128
  "path": "examples/screen/native/auth.tsx",
122
129
  "module": "@krizaka/ui/registry/examples/screen/native/auth",
123
130
  "code": "import { Button, KrizakaMark, Screen, TextField, Txt } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\n\n// Sign in: the mark, the promise, two fields, the main action pinned above the keyboard, the legal words.\nexport default function NativeScreenAuth() {\n return (\n <View style={{ width: 360, height: 640 }}>\n <Screen footer={<View style={{ padding: 16, gap: 8 }}><Button label=\"Sign in\" variant=\"gradient\" size=\"lg\" /><Button label=\"Create an account\" variant=\"ghost\" /></View>}>\n <View style={{ alignItems: \"center\", gap: 8, marginVertical: 24 }}>\n <KrizakaMark size={64} />\n <Txt variant=\"display\">Welcome back</Txt>\n <Txt tone=\"secondary\" style={{ textAlign: \"center\" }}>Meet people who like what you like.</Txt>\n </View>\n <TextField label=\"Email\" autoComplete=\"email\" keyboardType=\"email-address\" placeholder=\"you@example.com\" />\n <TextField label=\"Password\" hint=\"At least 12 characters\" autoComplete=\"current-password\" secureTextEntry />\n <Txt variant=\"caption\" tone=\"secondary\" style={{ textAlign: \"center\" }}>By continuing you accept the terms and the privacy policy.</Txt>\n </Screen>\n </View>\n );\n}\n",
@@ -130,9 +137,12 @@
130
137
  "name": "profile",
131
138
  "title": "Profile",
132
139
  "description": "The photo and its ring, the facts, the interests.",
140
+ "template": true,
141
+ "purpose": "show",
142
+ "why": "A person is recognised at a glance: the photo first, then the facts and interests that start a conversation.",
133
143
  "path": "examples/screen/native/profile.tsx",
134
144
  "module": "@krizaka/ui/registry/examples/screen/native/profile",
135
- "code": "import { Avatar, Button, Chip, Screen, Txt, VerifiedBadge } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\n\n// A profile: the photo with its story ring, the name and seal, the facts, the interests, the actions.\nexport default function NativeScreenProfile() {\n return (\n <View style={{ width: 360, height: 640 }}>\n <Screen footer={<View style={{ flexDirection: \"row\", gap: 8, padding: 16 }}><Button label=\"Edit profile\" style={{ flex: 1 }} /><Button label=\"Preview\" variant=\"outline\" style={{ flex: 1 }} /></View>}>\n <View style={{ alignItems: \"center\", gap: 6 }}>\n <Avatar src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQCAIAAACtAwlQAAABaklEQVR42mWMy24UQQxF7arqlwLhIbJhwZZf5I/4IISEBIsIRSKTMOmZnp7uqrJ9zYIeIeCsrqzjw+vHDwYCCM6wbfy5gABKatsysJqLuoHciZ2dGE4ApSrbnyidVn06lVyQUrweur5pmAJAqVQGSEGnRb79mD5/H6dzuRq6929fv7t5MTSd+6VUK3Zj/XQ7frkblyJ926jwkIab6yZw3Eq58rzaz6nMq1RVA+3nMmd73nMMfCkJiRBA7u5O7g6QCFfhyLyVRJg89U3bxKiGJsQ+te6pCge+lETYPT3rujalotqkNLSdexRhJk6lshjOWXeH+WE6Z1HAi+p+Pr+czuxtG0PKlZesd+P09f5xd5iKqrlX1cfpGCiqhDdXr9Ja8DSX24f9/eG4VDGAiAzIIrvpwJ6C96FUXrId15Ivxm8MKCpzKUvRUCpXJTOHO/2Nu6uhqocqLMr4V9iAkxoHMzZjgP7XnMjBZvQLMEROG5iV3IMAAAAASUVORK5CYII=\" alt=\"Elena\" size={112} ring=\"story\" />\n <View style={{ flexDirection: \"row\", alignItems: \"center\", gap: 6 }}>\n <Txt variant=\"title\">Elena, 29</Txt>\n <VerifiedBadge label=\"Verified\" size={18} />\n </View>\n <Txt tone=\"secondary\">Lisbon · Sound engineer</Txt>\n </View>\n <View style={{ flexDirection: \"row\", justifyContent: \"center\", gap: 32 }}>\n <Txt variant=\"label\">128 likes</Txt>\n <Txt variant=\"label\">14 matches</Txt>\n </View>\n <View style={{ flexDirection: \"row\", flexWrap: \"wrap\", gap: 8 }}>\n {[\"Music\", \"Surf\", \"Travel\", \"Vinyl\"].map((t) => <Chip key={t}>{t}</Chip>)}\n </View>\n </Screen>\n </View>\n );\n}\n",
145
+ "code": "import { Avatar, Button, Chip, Screen, Txt, VerifiedBadge } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\n\n// A profile: the photo with its story ring, the name and seal, the facts, the interests, the actions.\nexport default function NativeScreenProfile() {\n return (\n <View style={{ width: 360, height: 640 }}>\n <Screen footer={<View style={{ flexDirection: \"row\", gap: 8, padding: 16 }}><Button label=\"Edit profile\" style={{ flex: 1 }} /><Button label=\"Preview\" variant=\"outline\" style={{ flex: 1 }} /></View>}>\n <View style={{ alignItems: \"center\", gap: 6 }}>\n <Avatar src=\"https://krizaka-assets.b-cdn.net/site/people/ui/camille-512.9573eaa0b8.webp\" alt=\"Camille\" size={112} ring=\"story\" />\n <View style={{ flexDirection: \"row\", alignItems: \"center\", gap: 6 }}>\n <Txt variant=\"title\">Camille, 29</Txt>\n <VerifiedBadge label=\"Verified\" size={18} />\n </View>\n <Txt tone=\"secondary\">Lisbon · Sound engineer</Txt>\n </View>\n <View style={{ flexDirection: \"row\", justifyContent: \"center\", gap: 32 }}>\n <Txt variant=\"label\">128 likes</Txt>\n <Txt variant=\"label\">14 matches</Txt>\n </View>\n <View style={{ flexDirection: \"row\", flexWrap: \"wrap\", gap: 8 }}>\n {[\"Music\", \"Surf\", \"Travel\", \"Vinyl\"].map((t) => <Chip key={t}>{t}</Chip>)}\n </View>\n </Screen>\n </View>\n );\n}\n",
136
146
  "screenshots": {
137
147
  "dark": "examples/screen/native/profile.dark.png",
138
148
  "light": "examples/screen/native/profile.light.png"
@@ -141,10 +151,13 @@
141
151
  {
142
152
  "name": "feed",
143
153
  "title": "Feed",
144
- "description": "A large title over a list of cards.",
154
+ "description": "A vertical feed: one clip per screen, the action rail on the right, the caption bottom-left; the one in view plays.",
155
+ "template": true,
156
+ "purpose": "show",
157
+ "why": "A person watches what is new one clip at a time, with every action under the thumb.",
145
158
  "path": "examples/screen/native/feed.tsx",
146
159
  "module": "@krizaka/ui/registry/examples/screen/native/feed",
147
- "code": "import { Avatar, Card, Header, Screen, Txt } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\n\nconst POSTS = [\n { id: \"1\", who: \"Elena\", what: \"Sunset session at Cabo da Roca\", when: \"2 h\" },\n { id: \"2\", who: \"Noah\", what: \"Best ramen in Porto? I have a list.\", when: \"5 h\" },\n { id: \"3\", who: \"Mina\", what: \"Free tickets for the jazz night!\", when: \"Yesterday\" },\n];\n\n// A feed: a large title, cards under it (a long feed uses the list of `@krizaka/ui/native/list` in `scroll={false}`).\nexport default function NativeScreenFeed() {\n return (\n <View style={{ width: 360, height: 640 }}>\n <Screen header={<Header title=\"Moments\" subtitle=\"From people you matched with\" />}>\n {POSTS.map((p) => (\n <Card.Root key={p.id}>\n <Card.Body>\n <View style={{ flexDirection: \"row\", alignItems: \"center\", gap: 10 }}>\n <Avatar alt={p.who} size=\"sm\" />\n <Txt variant=\"label\" style={{ flex: 1 }}>\n {p.who}\n </Txt>\n <Txt variant=\"caption\" tone=\"secondary\">\n {p.when}\n </Txt>\n </View>\n <Txt>{p.what}</Txt>\n </Card.Body>\n </Card.Root>\n ))}\n </Screen>\n </View>\n );\n}\n",
160
+ "code": "import { ShortFeed, VerticalVideo } from \"@krizaka/ui/native/vertical-video\";\nimport { View } from \"react-native\";\n\nconst CDN = \"https://krizaka-assets.b-cdn.net/site/people/ui\";\nconst CLIPS = [\n { id: \"1\", who: \"Camille\", face: `${CDN}/camille-256.dc2943029a.webp`, poster: `${CDN}/camille-512.9573eaa0b8.webp`, caption: \"Sunset session at Cabo da Roca.\" },\n { id: \"2\", who: \"Tomás\", face: `${CDN}/tomas-256.7eaab80903.webp`, poster: `${CDN}/tomas-512.dd7c4fd230.webp`, caption: \"Best ramen in Porto? I have a list.\" },\n];\n\n// A feed in the vertical format: one clip per screen with the action rail on the right and the caption bottom-left; the one\n// in view plays and the others pause (`uri` is your clip — here the poster stands for it).\nexport default function NativeScreenFeed() {\n return (\n <View style={{ width: 360, height: 640 }}>\n <ShortFeed\n label=\"Moments\"\n height={640}\n items={CLIPS}\n getId={(clip) => clip.id}\n renderItem={(clip, { active }) => (\n <VerticalVideo\n title={`Video by ${clip.who}`}\n active={active}\n posterUri={clip.poster}\n creator={{ name: clip.who, avatarUri: clip.face }}\n caption={clip.caption}\n likes={1200}\n comments={48}\n onLike={() => undefined}\n onComment={() => undefined}\n onShare={() => undefined}\n style={{ height: 640, aspectRatio: undefined }}\n />\n )}\n />\n </View>\n );\n}\n",
148
161
  "screenshots": {
149
162
  "dark": "examples/screen/native/feed.dark.png",
150
163
  "light": "examples/screen/native/feed.light.png"
@@ -154,6 +167,9 @@
154
167
  "name": "chat",
155
168
  "title": "Chat",
156
169
  "description": "The person, the messages, the composer.",
170
+ "template": true,
171
+ "purpose": "converse",
172
+ "why": "A person reads the thread and answers from the composer, which stays in reach.",
157
173
  "path": "examples/screen/native/chat.tsx",
158
174
  "module": "@krizaka/ui/registry/examples/screen/native/chat",
159
175
  "code": "import { Avatar, Header, MessageBubble, MessageComposer, Screen, TypingIndicator } from \"@krizaka/ui/native\";\nimport { useState } from \"react\";\nimport { View } from \"react-native\";\n\n// A chat: the person in the header with their presence, the messages, the composer above the keyboard.\nexport default function NativeScreenChat() {\n const [draft, setDraft] = useState(\"\");\n return (\n <View style={{ width: 360, height: 640 }}>\n <Screen\n header={<Header size=\"inline\" title=\"Elena\" backLabel=\"Chats\" onBack={() => undefined} actions={<Avatar alt=\"Elena, online\" size=\"sm\" presence=\"online\" presenceLabel=\"online\" />} />}\n footer={<MessageComposer value={draft} onValueChange={setDraft} onSend={() => setDraft(\"\")} placeholder=\"Message\" sendLabel=\"Send\" />}\n contentStyle={{ gap: 4, justifyContent: \"flex-end\", flexGrow: 1 }}\n >\n <MessageBubble text=\"Hey! Loved your sunset photo 🌅\" time=\"19:02\" />\n <MessageBubble mine text=\"Thanks! Cabo da Roca, last Sunday\" time=\"19:05\" grouped=\"first\" />\n <MessageBubble mine text=\"We should go together\" time=\"19:05\" grouped=\"last\" status=\"delivered\" showStatus />\n <TypingIndicator label=\"Elena is typing\" />\n </Screen>\n </View>\n );\n}\n",
@@ -166,6 +182,9 @@
166
182
  "name": "settings",
167
183
  "title": "Settings",
168
184
  "description": "Sections of switches that apply at once.",
185
+ "template": true,
186
+ "purpose": "operate",
187
+ "why": "A person changes a preference and sees it apply at once, grouped by what it concerns.",
169
188
  "path": "examples/screen/native/settings.tsx",
170
189
  "module": "@krizaka/ui/registry/examples/screen/native/settings",
171
190
  "code": "import { Header, Screen, Switch, Txt } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\n\n// Settings: sections with their headings, switches that apply at once.\nexport default function NativeScreenSettings() {\n return (\n <View style={{ width: 360, height: 640 }}>\n <Screen header={<Header size=\"inline\" title=\"Settings\" backLabel=\"Me\" onBack={() => undefined} />}>\n <Txt variant=\"caption\" tone=\"secondary\" role=\"heading\">DISCOVERY</Txt>\n <Switch label=\"Show me in Discover\" defaultChecked />\n <Txt variant=\"caption\" tone=\"secondary\" role=\"heading\">NOTIFICATIONS</Txt>\n <Switch label=\"New likes\" defaultChecked />\n <Switch label=\"Messages\" description=\"Even when the app is closed\" defaultChecked />\n <Txt variant=\"caption\" tone=\"secondary\" role=\"heading\">ACCOUNT</Txt>\n <Switch label=\"Show my distance\" description=\"Rounded to the kilometre\" />\n </Screen>\n </View>\n );\n}\n",
@@ -173,6 +192,36 @@
173
192
  "dark": "examples/screen/native/settings.dark.png",
174
193
  "light": "examples/screen/native/settings.light.png"
175
194
  }
195
+ },
196
+ {
197
+ "name": "map",
198
+ "title": "Map",
199
+ "description": "The map fills the screen; a marker opens its place in a bottom sheet with the one action.",
200
+ "template": true,
201
+ "purpose": "act",
202
+ "why": "A person chooses a place by where it is, with every marker also a named button.",
203
+ "path": "examples/screen/native/map.tsx",
204
+ "module": "@krizaka/ui/registry/examples/screen/native/map",
205
+ "code": "import { Button, Header, Screen, Sheet, Txt } from \"@krizaka/ui/native\";\nimport { Map, Marker } from \"@krizaka/ui/native/map\";\nimport { useState } from \"react\";\nimport { View } from \"react-native\";\n\nconst SPOTS = [\n { id: \"olimpico\", label: \"Café Olimpico\", where: \"Mile End · 450 m\", position: [-73.6005, 45.5229] as const },\n { id: \"parc\", label: \"Parc La Fontaine\", where: \"Plateau · 2 km\", position: [-73.5695, 45.5268] as const },\n { id: \"talon\", label: \"Marché Jean-Talon\", where: \"Little Italy · 1.2 km\", position: [-73.6147, 45.5363] as const },\n];\n\n// A map-centric screen: the map fills the screen under a header, a marker pressed opens its place in a bottom sheet\n// with the one action; every marker is also a named button, so the places are read as a list.\nexport default function NativeScreenMap() {\n const [open, setOpen] = useState<(typeof SPOTS)[number] | null>(null);\n return (\n <View style={{ width: 360, height: 640 }}>\n <Screen header={<Header title=\"Pick-up points\" subtitle=\"Near Mile End\" />} scroll={false} padding={0}>\n <Map label=\"Pick-up points in Montréal\" center={[-73.59, 45.527]} zoom={12.5} style={{ flex: 1 }}>\n {SPOTS.map((s) => (\n <Marker key={s.id} position={s.position} label={s.label} selected={open?.id === s.id} onPress={() => setOpen(s)} />\n ))}\n </Map>\n </Screen>\n <Sheet open={Boolean(open)} onOpenChange={(o) => !o && setOpen(null)} title={open?.label}>\n <Txt tone=\"secondary\">{open?.where}</Txt>\n <Button label=\"Pick up here\" variant=\"primary\" onPress={() => setOpen(null)} />\n </Sheet>\n </View>\n );\n}\n",
206
+ "screenshots": {
207
+ "dark": "examples/screen/native/map.dark.png",
208
+ "light": "examples/screen/native/map.light.png"
209
+ }
210
+ },
211
+ {
212
+ "name": "notifications",
213
+ "title": "Notifications",
214
+ "description": "What happened, newest first and by day, with mark-all-as-read as a button.",
215
+ "template": true,
216
+ "purpose": "converse",
217
+ "why": "A person catches up on what happened without hunting for it.",
218
+ "path": "examples/screen/native/notifications.tsx",
219
+ "module": "@krizaka/ui/registry/examples/screen/native/notifications",
220
+ "code": "import { ActivityFeed, Button, Header, Screen } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\n\nconst EVENTS = [\n { id: \"e1\", at: \"2026-10-13T09:40:00Z\", title: \"Mina unlocked “Night shoot, part 2”\", tone: \"success\" as const },\n { id: \"e2\", at: \"2026-10-13T08:15:00Z\", title: \"Your payout of €120 was sent\", tone: \"info\" as const },\n { id: \"e3\", at: \"2026-10-12T19:02:00Z\", title: \"Léa bid €25 on the auction\", tone: \"accent\" as const },\n { id: \"e4\", at: \"2026-10-12T11:30:00Z\", title: \"Clip job failed\", description: \"The source is too short\", tone: \"danger\" as const },\n];\n\n// A notifications centre: what happened, newest first, grouped by day; marking all as read is a button, never a hidden gesture.\nexport default function NativeScreenNotifications() {\n return (\n <View style={{ width: 360, height: 640 }}>\n <Screen header={<Header title=\"Notifications\" subtitle=\"2 new\" />}>\n <Button label=\"Mark all as read\" variant=\"ghost\" size=\"sm\" />\n <ActivityFeed aria-label=\"Notifications\" events={EVENTS} now={new Date(\"2026-10-13T10:00:00Z\")} />\n </Screen>\n </View>\n );\n}\n",
221
+ "screenshots": {
222
+ "dark": "examples/screen/native/notifications.dark.png",
223
+ "light": "examples/screen/native/notifications.light.png"
224
+ }
176
225
  }
177
226
  ]
178
227
  },
@@ -5,6 +5,7 @@
5
5
  "summary": "The conductor of a told page: chapters (`Scene`) that play their entrance once, in order, as they scroll into view — the visual, then the announcement, then the words — with one slow loop each, running only while on screen.",
6
6
  "description": "The conductor of a told page: chapters (`Scene`) that play their entrance once, in order, as they scroll into view — the visual, then the announcement, then the words — with one slow loop each, running only while on screen.",
7
7
  "status": "beta",
8
+ "deprecated": null,
8
9
  "category": "layout",
9
10
  "platforms": "web",
10
11
  "whenToUse": [
@@ -118,7 +119,7 @@
118
119
  "files": [
119
120
  {
120
121
  "path": "meta.ts",
121
- "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 | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\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/** `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"
122
+ "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 | \"vertical-video\"\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"
122
123
  },
123
124
  {
124
125
  "path": "scroll-stage/index.ts",
@@ -5,6 +5,7 @@
5
5
  "summary": "A search box: a clear button, a global ⌘K / Ctrl+K shortcut, a debounced `onSearch`, Enter to submit, and suggestions with the keyboard.",
6
6
  "description": "A search box: a clear button, a global ⌘K / Ctrl+K shortcut, a debounced `onSearch`, Enter to submit, and suggestions with the keyboard.",
7
7
  "status": "beta",
8
+ "deprecated": null,
8
9
  "category": "forms",
9
10
  "platforms": "both",
10
11
  "whenToUse": [
@@ -329,7 +330,7 @@
329
330
  },
330
331
  {
331
332
  "path": "meta.ts",
332
- "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 | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\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/** `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"
333
+ "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 | \"vertical-video\"\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"
333
334
  },
334
335
  {
335
336
  "path": "search-field/index.ts",
@@ -5,6 +5,7 @@
5
5
  "summary": "The backdrop of a page section: the brand's gradient, a light dome, an optional perspective grid and a blurred foreground.",
6
6
  "description": "The backdrop of a page section: the brand's gradient, a light dome, an optional perspective grid and a blurred foreground.",
7
7
  "status": "beta",
8
+ "deprecated": null,
8
9
  "category": "layout",
9
10
  "platforms": "web",
10
11
  "whenToUse": [
@@ -138,7 +139,7 @@
138
139
  "files": [
139
140
  {
140
141
  "path": "meta.ts",
141
- "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 | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\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/** `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"
142
+ "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 | \"vertical-video\"\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"
142
143
  },
143
144
  {
144
145
  "path": "section-backdrop/index.ts",
@@ -5,6 +5,7 @@
5
5
  "summary": "A segmented control that switches between views of a screen — the native counterpart of the web's segmented tabs.",
6
6
  "description": "A segmented control that switches between views of a screen — the native counterpart of the web's segmented tabs.",
7
7
  "status": "beta",
8
+ "deprecated": null,
8
9
  "category": "navigation",
9
10
  "platforms": "native",
10
11
  "whenToUse": [
@@ -5,6 +5,7 @@
5
5
  "summary": "A line between groups of content, horizontal or vertical, decorative by default.",
6
6
  "description": "A line between groups of content, horizontal or vertical, decorative by default.",
7
7
  "status": "stable",
8
+ "deprecated": null,
8
9
  "category": "layout",
9
10
  "platforms": "web",
10
11
  "whenToUse": [
@@ -61,7 +62,7 @@
61
62
  "files": [
62
63
  {
63
64
  "path": "meta.ts",
64
- "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 | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\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/** `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"
65
+ "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 | \"vertical-video\"\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"
65
66
  },
66
67
  {
67
68
  "path": "separator/index.ts",
@@ -5,6 +5,7 @@
5
5
  "summary": "Settings: the sections on the side (a row of chips that scrolls on a phone) and the current section's forms, each a titled card with its own save.",
6
6
  "description": "Settings: the sections on the side (a row of chips that scrolls on a phone) and the current section's forms, each a titled card with its own save.",
7
7
  "status": "beta",
8
+ "deprecated": null,
8
9
  "category": "layouts",
9
10
  "platforms": "web",
10
11
  "whenToUse": [
@@ -117,6 +118,8 @@
117
118
  "title": "Account settings",
118
119
  "description": "Profile and notifications, each with its own save; the sections as chips on a phone.",
119
120
  "template": true,
121
+ "purpose": "operate",
122
+ "why": "A person changes one setting at a time, saves it at once and knows where each lives.",
120
123
  "path": "examples/settings-layout/account.tsx",
121
124
  "module": "@krizaka/ui/registry/examples/settings-layout/account",
122
125
  "code": "import { Button } from \"@krizaka/ui/button\";\nimport { Field, Input, Select } from \"@krizaka/ui/field\";\nimport { SettingsLayout, SettingsSection } from \"@krizaka/ui/settings-layout\";\nimport { Switch } from \"@krizaka/ui/switch\";\n\nconst NAV = [\n { id: \"profile\", label: \"Profile\", href: \"#profile\", current: true },\n { id: \"notifications\", label: \"Notifications\", href: \"#notifications\" },\n { id: \"payouts\", label: \"Payouts\", href: \"#payouts\" },\n { id: \"security\", label: \"Security\", href: \"#security\" },\n];\n\n// TEMPLATE — account settings: the sections on the left (a row of chips that scrolls on a phone), each form a titled\n// card with its own save, so a change in one never waits for another.\nexport default function SettingsLayoutAccount() {\n return (\n <SettingsLayout className=\"w-full\" title=\"Settings\" description=\"Your profile, what we tell you and how you are paid.\" nav={NAV} navLabel=\"Settings sections\">\n <SettingsSection\n id=\"profile\"\n title=\"Profile\"\n description=\"What your fans see.\"\n footer={<Button size=\"sm\" variant=\"primary\" shape=\"cut\">Save the profile</Button>}\n >\n <Field.Root>\n <Field.Label htmlFor=\"settings-name\">Display name</Field.Label>\n <Input id=\"settings-name\" defaultValue=\"Elena Varga\" />\n </Field.Root>\n <Field.Root>\n <Field.Label htmlFor=\"settings-language\">Language</Field.Label>\n <Select id=\"settings-language\" defaultValue=\"fr\">\n <option value=\"en\">English</option>\n <option value=\"fr\">Français</option>\n </Select>\n </Field.Root>\n </SettingsSection>\n <SettingsSection id=\"notifications\" title=\"Notifications\" description=\"Only what you ask for.\">\n {[\n { id: \"unlock\", label: \"A fan unlocks a video\", on: true },\n { id: \"auction\", label: \"An auction ends\", on: true },\n { id: \"weekly\", label: \"Weekly summary by email\", on: false },\n ].map((n) => (\n <div key={n.id} className=\"flex items-center justify-between gap-4 text-sm text-fg\">\n <span id={`notify-${n.id}`}>{n.label}</span>\n <Switch aria-labelledby={`notify-${n.id}`} defaultChecked={n.on} />\n </div>\n ))}\n </SettingsSection>\n </SettingsLayout>\n );\n}\n"
@@ -135,7 +138,7 @@
135
138
  "files": [
136
139
  {
137
140
  "path": "meta.ts",
138
- "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 | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\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/** `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"
141
+ "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 | \"vertical-video\"\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"
139
142
  },
140
143
  {
141
144
  "path": "settings-layout/index.ts",
@@ -143,7 +146,7 @@
143
146
  },
144
147
  {
145
148
  "path": "settings-layout/meta.ts",
146
- "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Settings layout\",\n summary: \"Settings: the sections on the side (a row of chips that scrolls on a phone) and the current section's forms, each a titled card with its own save.\",\n status: \"beta\",\n category: \"layouts\",\n platforms: \"web\",\n whenToUse: [\"Account, workspace and administration settings.\", \"Any long form that splits into independent groups.\"],\n whenNotToUse: [\n { when: \"For a step-by-step setup the user follows once.\", use: \"stepper\" },\n { when: \"For one small form.\", use: \"field\" },\n ],\n bestPractices: [\"One save per section, at its foot: a change never waits for another.\", \"Sections as pages (`/settings/billing`) or as anchors of one long page (`#billing`).\", \"Say in the description what the section changes for the user.\"],\n accessibility: {\n keyboard: [],\n notes: [\"The sections are a `nav` named by `navLabel`; the current one has `aria-current` (page or location).\", \"Each section is a `section` named by its `h2`.\"],\n },\n related: [\"field\", \"switch\", \"app-shell\"],\n web: {\n imports: [\"SettingsLayout\", \"SettingsSection\"],\n examples: [\n { name: \"account\", title: \"Account settings\", description: \"Profile and notifications, each with its own save; the sections as chips on a phone.\", template: true },\n { name: \"sections\", title: \"One section per page\", description: \"A workspace's settings, the current section marked.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
149
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Settings layout\",\n summary: \"Settings: the sections on the side (a row of chips that scrolls on a phone) and the current section's forms, each a titled card with its own save.\",\n status: \"beta\",\n category: \"layouts\",\n platforms: \"web\",\n whenToUse: [\"Account, workspace and administration settings.\", \"Any long form that splits into independent groups.\"],\n whenNotToUse: [\n { when: \"For a step-by-step setup the user follows once.\", use: \"stepper\" },\n { when: \"For one small form.\", use: \"field\" },\n ],\n bestPractices: [\"One save per section, at its foot: a change never waits for another.\", \"Sections as pages (`/settings/billing`) or as anchors of one long page (`#billing`).\", \"Say in the description what the section changes for the user.\"],\n accessibility: {\n keyboard: [],\n notes: [\"The sections are a `nav` named by `navLabel`; the current one has `aria-current` (page or location).\", \"Each section is a `section` named by its `h2`.\"],\n },\n related: [\"field\", \"switch\", \"app-shell\"],\n web: {\n imports: [\"SettingsLayout\", \"SettingsSection\"],\n examples: [\n { name: \"account\", title: \"Account settings\", description: \"Profile and notifications, each with its own save; the sections as chips on a phone.\", template: true, purpose: \"operate\", why: \"A person changes one setting at a time, saves it at once and knows where each lives.\" },\n { name: \"sections\", title: \"One section per page\", description: \"A workspace's settings, the current section marked.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
147
150
  },
148
151
  {
149
152
  "path": "settings-layout/settings-layout.tsx",