@krizaka/ui 2.5.0 → 2.8.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 (267) hide show
  1. package/README.md +49 -5
  2. package/dist/action-bar.d.ts +38 -0
  3. package/dist/action-bar.js +52 -0
  4. package/dist/action-bar.js.map +1 -0
  5. package/dist/argument-card.d.ts +67 -0
  6. package/dist/argument-card.js +69 -0
  7. package/dist/argument-card.js.map +1 -0
  8. package/dist/audio-player.js +1 -1
  9. package/dist/block-link-BAg4eoZk.d.ts +12 -0
  10. package/dist/blocks.css +529 -0
  11. package/dist/button.js +5 -94
  12. package/dist/button.js.map +1 -1
  13. package/dist/card-grid.d.ts +42 -0
  14. package/dist/card-grid.js +47 -0
  15. package/dist/card-grid.js.map +1 -0
  16. package/dist/chunk-2AGSO3WH.js +20 -0
  17. package/dist/chunk-2AGSO3WH.js.map +1 -0
  18. package/dist/chunk-AB5D3KBG.js +37 -0
  19. package/dist/chunk-AB5D3KBG.js.map +1 -0
  20. package/dist/{chunk-YX6CNVJA.js → chunk-CPA5CF35.js} +1 -1
  21. package/dist/chunk-CPA5CF35.js.map +1 -0
  22. package/dist/chunk-K3SWZXYT.js +92 -0
  23. package/dist/chunk-K3SWZXYT.js.map +1 -0
  24. package/dist/chunk-NOVUREEC.js +274 -0
  25. package/dist/chunk-NOVUREEC.js.map +1 -0
  26. package/dist/{chunk-XUMJA5ZI.js → chunk-X6TW3X6Y.js} +2 -2
  27. package/dist/chunk-XCBVFMNV.js +41 -0
  28. package/dist/{chunk-YX6CNVJA.js.map → chunk-XCBVFMNV.js.map} +1 -1
  29. package/dist/chunk-XVLWVTQA.js +28 -0
  30. package/dist/chunk-XVLWVTQA.js.map +1 -0
  31. package/dist/chunk-Z6FUPB3Q.js +102 -0
  32. package/dist/chunk-Z6FUPB3Q.js.map +1 -0
  33. package/dist/code-block.d.ts +42 -0
  34. package/dist/code-block.js +202 -0
  35. package/dist/code-block.js.map +1 -0
  36. package/dist/combobox.js +2 -2
  37. package/dist/cta-panel.d.ts +23 -0
  38. package/dist/cta-panel.js +20 -0
  39. package/dist/cta-panel.js.map +1 -0
  40. package/dist/data-table.js +1 -1
  41. package/dist/date-picker.js +1 -1
  42. package/dist/decision-list.d.ts +34 -0
  43. package/dist/decision-list.js +67 -0
  44. package/dist/decision-list.js.map +1 -0
  45. package/dist/file-upload.js +1 -1
  46. package/dist/filter-bar.js +1 -1
  47. package/dist/geometry-CXrAW34x.d.ts +19 -0
  48. package/dist/index.d.ts +10 -2
  49. package/dist/index.js +86 -4
  50. package/dist/index.js.map +1 -1
  51. package/dist/link-card.d.ts +35 -0
  52. package/dist/link-card.js +46 -0
  53. package/dist/link-card.js.map +1 -0
  54. package/dist/mascot-quote.d.ts +43 -0
  55. package/dist/mascot-quote.js +287 -0
  56. package/dist/mascot-quote.js.map +1 -0
  57. package/dist/mascot-state.d.ts +128 -0
  58. package/dist/mascot-state.js +95 -0
  59. package/dist/mascot-state.js.map +1 -0
  60. package/dist/mascots.d.ts +5 -20
  61. package/dist/mascots.js +5 -246
  62. package/dist/mascots.js.map +1 -1
  63. package/dist/media-capture.js +1 -1
  64. package/dist/motion.css +25 -1
  65. package/dist/native.d.ts +54 -7
  66. package/dist/native.js +334 -166
  67. package/dist/native.js.map +1 -1
  68. package/dist/page-hero.d.ts +44 -0
  69. package/dist/page-hero.js +41 -0
  70. package/dist/page-hero.js.map +1 -0
  71. package/dist/page.d.ts +116 -0
  72. package/dist/page.js +17 -0
  73. package/dist/page.js.map +1 -0
  74. package/dist/pagination.js +25 -44
  75. package/dist/pagination.js.map +1 -1
  76. package/dist/pointer-light.d.ts +20 -0
  77. package/dist/pointer-light.js +12 -0
  78. package/dist/pointer-light.js.map +1 -0
  79. package/dist/search-field.js +1 -1
  80. package/dist/section-backdrop.js +4 -22
  81. package/dist/section-backdrop.js.map +1 -1
  82. package/dist/tag-input.js +2 -2
  83. package/dist/terminal-replay.d.ts +68 -0
  84. package/dist/terminal-replay.js +231 -0
  85. package/dist/terminal-replay.js.map +1 -0
  86. package/dist/toc.d.ts +23 -0
  87. package/dist/toc.js +39 -0
  88. package/dist/toc.js.map +1 -0
  89. package/dist/video-player.js +1 -1
  90. package/package.json +208 -8
  91. package/registry/action-bar.json +205 -0
  92. package/registry/alert.json +1 -1
  93. package/registry/argument-card.json +327 -0
  94. package/registry/audio-player.json +2 -2
  95. package/registry/avatar.json +1 -1
  96. package/registry/badge.json +1 -1
  97. package/registry/button.json +5 -5
  98. package/registry/card-grid.json +221 -0
  99. package/registry/card.json +3 -3
  100. package/registry/checkbox.json +1 -1
  101. package/registry/chip-link.json +1 -1
  102. package/registry/chip.json +1 -1
  103. package/registry/code-block.json +262 -0
  104. package/registry/combobox.json +2 -2
  105. package/registry/command.json +1 -1
  106. package/registry/confirm-button.json +3 -3
  107. package/registry/countdown.json +1 -1
  108. package/registry/cta-panel.json +154 -0
  109. package/registry/data-table.json +2 -2
  110. package/registry/date-picker.json +2 -2
  111. package/registry/decision-list.json +144 -0
  112. package/registry/dialog.json +1 -1
  113. package/registry/dropdown-menu.json +1 -1
  114. package/registry/empty-state.json +1 -1
  115. package/registry/examples/action-bar/buttons.d.ts +4 -0
  116. package/registry/examples/action-bar/buttons.js +22 -0
  117. package/registry/examples/action-bar/buttons.tsx +17 -0
  118. package/registry/examples/action-bar/icons.d.ts +4 -0
  119. package/registry/examples/action-bar/icons.js +24 -0
  120. package/registry/examples/action-bar/icons.tsx +23 -0
  121. package/registry/examples/argument-card/building-block.d.ts +4 -0
  122. package/registry/examples/argument-card/building-block.js +29 -0
  123. package/registry/examples/argument-card/building-block.tsx +29 -0
  124. package/registry/examples/argument-card/grid.d.ts +4 -0
  125. package/registry/examples/argument-card/grid.js +17 -0
  126. package/registry/examples/argument-card/grid.tsx +19 -0
  127. package/registry/examples/argument-card/unfold.d.ts +4 -0
  128. package/registry/examples/argument-card/unfold.js +26 -0
  129. package/registry/examples/argument-card/unfold.tsx +21 -0
  130. package/registry/examples/card-grid/products.d.ts +4 -0
  131. package/registry/examples/card-grid/products.js +16 -0
  132. package/registry/examples/card-grid/products.tsx +13 -0
  133. package/registry/examples/card-grid/reveal.d.ts +4 -0
  134. package/registry/examples/card-grid/reveal.js +13 -0
  135. package/registry/examples/card-grid/reveal.tsx +16 -0
  136. package/registry/examples/code-block/build-tools.d.ts +4 -0
  137. package/registry/examples/code-block/build-tools.js +30 -0
  138. package/registry/examples/code-block/build-tools.tsx +25 -0
  139. package/registry/examples/code-block/file.d.ts +4 -0
  140. package/registry/examples/code-block/file.js +17 -0
  141. package/registry/examples/code-block/file.tsx +13 -0
  142. package/registry/examples/cta-panel/discuss.d.ts +4 -0
  143. package/registry/examples/cta-panel/discuss.js +31 -0
  144. package/registry/examples/cta-panel/discuss.tsx +23 -0
  145. package/registry/examples/decision-list/product.d.ts +4 -0
  146. package/registry/examples/decision-list/product.js +35 -0
  147. package/registry/examples/decision-list/product.tsx +30 -0
  148. package/registry/examples/link-card/docs-hub.d.ts +4 -0
  149. package/registry/examples/link-card/docs-hub.js +18 -0
  150. package/registry/examples/link-card/docs-hub.tsx +20 -0
  151. package/registry/examples/link-card/external.d.ts +4 -0
  152. package/registry/examples/link-card/external.js +22 -0
  153. package/registry/examples/link-card/external.tsx +16 -0
  154. package/registry/examples/link-card/stack.d.ts +4 -0
  155. package/registry/examples/link-card/stack.js +26 -0
  156. package/registry/examples/link-card/stack.tsx +21 -0
  157. package/registry/examples/mascot-quote/callout.d.ts +4 -0
  158. package/registry/examples/mascot-quote/callout.js +11 -0
  159. package/registry/examples/mascot-quote/callout.tsx +10 -0
  160. package/registry/examples/mascot-quote/inline.d.ts +4 -0
  161. package/registry/examples/mascot-quote/inline.js +11 -0
  162. package/registry/examples/mascot-quote/inline.tsx +10 -0
  163. package/registry/examples/mascot-state/empty.d.ts +4 -0
  164. package/registry/examples/mascot-state/empty.js +22 -0
  165. package/registry/examples/mascot-state/empty.tsx +20 -0
  166. package/registry/examples/mascot-state/error.d.ts +4 -0
  167. package/registry/examples/mascot-state/error.js +23 -0
  168. package/registry/examples/mascot-state/error.tsx +21 -0
  169. package/registry/examples/mascot-state/loading.d.ts +4 -0
  170. package/registry/examples/mascot-state/loading.js +22 -0
  171. package/registry/examples/mascot-state/loading.tsx +16 -0
  172. package/registry/examples/mascot-state/native/default.d.ts +4 -0
  173. package/registry/examples/mascot-state/native/default.dark.png +0 -0
  174. package/registry/examples/mascot-state/native/default.js +25 -0
  175. package/registry/examples/mascot-state/native/default.light.png +0 -0
  176. package/registry/examples/mascot-state/native/default.tsx +19 -0
  177. package/registry/examples/mascot-state/success.d.ts +4 -0
  178. package/registry/examples/mascot-state/success.js +21 -0
  179. package/registry/examples/mascot-state/success.tsx +19 -0
  180. package/registry/examples/mascot-state/welcome.d.ts +4 -0
  181. package/registry/examples/mascot-state/welcome.js +21 -0
  182. package/registry/examples/mascot-state/welcome.tsx +19 -0
  183. package/registry/examples/mascots/flock.tsx +1 -1
  184. package/registry/examples/mascots/lovebird.d.ts +4 -0
  185. package/registry/examples/mascots/lovebird.js +19 -0
  186. package/registry/examples/mascots/lovebird.tsx +18 -0
  187. package/registry/examples/mascots/native/lovebird.d.ts +4 -0
  188. package/registry/examples/mascots/native/lovebird.dark.png +0 -0
  189. package/registry/examples/mascots/native/lovebird.js +21 -0
  190. package/registry/examples/mascots/native/lovebird.light.png +0 -0
  191. package/registry/examples/mascots/native/lovebird.tsx +18 -0
  192. package/registry/examples/page/backdrop.d.ts +4 -0
  193. package/registry/examples/page/backdrop.js +23 -0
  194. package/registry/examples/page/backdrop.tsx +18 -0
  195. package/registry/examples/page/facts.d.ts +4 -0
  196. package/registry/examples/page/facts.js +24 -0
  197. package/registry/examples/page/facts.tsx +21 -0
  198. package/registry/examples/page/frame.d.ts +4 -0
  199. package/registry/examples/page/frame.js +15 -0
  200. package/registry/examples/page/frame.tsx +17 -0
  201. package/registry/examples/page/sections.d.ts +4 -0
  202. package/registry/examples/page/sections.js +14 -0
  203. package/registry/examples/page/sections.tsx +15 -0
  204. package/registry/examples/page-hero/building-block.d.ts +4 -0
  205. package/registry/examples/page-hero/building-block.js +24 -0
  206. package/registry/examples/page-hero/building-block.tsx +20 -0
  207. package/registry/examples/page-hero/hub.d.ts +4 -0
  208. package/registry/examples/page-hero/hub.js +21 -0
  209. package/registry/examples/page-hero/hub.tsx +15 -0
  210. package/registry/examples/pointer-light/list.d.ts +4 -0
  211. package/registry/examples/pointer-light/list.js +16 -0
  212. package/registry/examples/pointer-light/list.tsx +14 -0
  213. package/registry/examples/terminal-replay/at-rest.d.ts +4 -0
  214. package/registry/examples/terminal-replay/at-rest.js +32 -0
  215. package/registry/examples/terminal-replay/at-rest.tsx +26 -0
  216. package/registry/examples/terminal-replay/session.d.ts +4 -0
  217. package/registry/examples/terminal-replay/session.js +34 -0
  218. package/registry/examples/terminal-replay/session.tsx +28 -0
  219. package/registry/examples/toc/reading-page.d.ts +4 -0
  220. package/registry/examples/toc/reading-page.js +21 -0
  221. package/registry/examples/toc/reading-page.tsx +21 -0
  222. package/registry/field.json +1 -1
  223. package/registry/file-upload.json +2 -2
  224. package/registry/filter-bar.json +2 -2
  225. package/registry/glow-card.json +1 -1
  226. package/registry/image-cropper.json +1 -1
  227. package/registry/index.json +265 -5
  228. package/registry/iso.json +1 -1
  229. package/registry/kbd.json +1 -1
  230. package/registry/link-card.json +279 -0
  231. package/registry/loader.json +1 -1
  232. package/registry/marquee.json +1 -1
  233. package/registry/mascot-quote.json +191 -0
  234. package/registry/mascot-state.json +1249 -0
  235. package/registry/mascots.json +41 -21
  236. package/registry/media-capture.json +4 -4
  237. package/registry/meter.json +1 -1
  238. package/registry/nav-bar.json +1 -1
  239. package/registry/number-ticker.json +1 -1
  240. package/registry/page-header.json +1 -1
  241. package/registry/page-hero.json +254 -0
  242. package/registry/page.json +497 -0
  243. package/registry/pagination.json +2 -2
  244. package/registry/pointer-light.json +119 -0
  245. package/registry/popover.json +1 -1
  246. package/registry/progress.json +1 -1
  247. package/registry/radio-group.json +1 -1
  248. package/registry/search-field.json +2 -2
  249. package/registry/section-backdrop.json +1 -1
  250. package/registry/separator.json +1 -1
  251. package/registry/skeleton.json +3 -3
  252. package/registry/slider.json +1 -1
  253. package/registry/slot.json +1 -1
  254. package/registry/spinner.json +1 -1
  255. package/registry/stat.json +1 -1
  256. package/registry/stepper.json +1 -1
  257. package/registry/switch.json +1 -1
  258. package/registry/tabs.json +1 -1
  259. package/registry/tag-input.json +1 -1
  260. package/registry/terminal-replay.json +317 -0
  261. package/registry/theme.json +1 -1
  262. package/registry/toast.json +1 -1
  263. package/registry/toc.json +157 -0
  264. package/registry/tooltip.json +1 -1
  265. package/registry/video-player.json +4 -4
  266. package/registry/video-trimmer.json +3 -3
  267. /package/dist/{chunk-XUMJA5ZI.js.map → chunk-X6TW3X6Y.js.map} +0 -0
@@ -115,7 +115,7 @@
115
115
  "files": [
116
116
  {
117
117
  "path": "meta.ts",
118
- "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 | \"alert\"\n | \"audio-player\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"cn\"\n | \"combobox\"\n | \"command\"\n | \"confirm-button\"\n | \"countdown\"\n | \"data-table\"\n | \"date-picker\"\n | \"dialog\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"glow-card\"\n | \"image-cropper\"\n | \"iso\"\n | \"kbd\"\n | \"loader\"\n | \"marquee\"\n | \"mascots\"\n | \"media-capture\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"page-header\"\n | \"pagination\"\n | \"popover\"\n | \"progress\"\n | \"radio-group\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"stat\"\n | \"stepper\"\n | \"switch\"\n | \"tabs\"\n | \"tag-input\"\n | \"theme\"\n | \"toast\"\n | \"tooltip\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\";\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/** The group of the catalogue. `media`: video, sound, camera, files, cropping. */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"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\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"
118
+ "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 | \"action-bar\"\n | \"alert\"\n | \"argument-card\"\n | \"audio-player\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"confirm-button\"\n | \"countdown\"\n | \"cta-panel\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"dialog\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"glow-card\"\n | \"image-cropper\"\n | \"iso\"\n | \"kbd\"\n | \"link-card\"\n | \"loader\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"media-capture\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"pointer-light\"\n | \"popover\"\n | \"progress\"\n | \"radio-group\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"stat\"\n | \"stepper\"\n | \"switch\"\n | \"tabs\"\n | \"tag-input\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\";\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 */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"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\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"
119
119
  },
120
120
  {
121
121
  "path": "page-header/index.ts",
@@ -0,0 +1,254 @@
1
+ {
2
+ "name": "page-hero",
3
+ "type": "primitive",
4
+ "title": "Page hero",
5
+ "summary": "The first screen of a page: the way back, an eyebrow, the `h1`, a lead, what follows them (facts, actions) and an aside (the page's bird) — on the brand's backdrop, painted at once.",
6
+ "description": "The first screen of a page: the way back, an eyebrow, the `h1`, a lead, what follows them (facts, actions) and an aside (the page's bird) — on the brand's backdrop, painted at once.",
7
+ "status": "beta",
8
+ "category": "blocks",
9
+ "platforms": "web",
10
+ "whenToUse": [
11
+ "At the top of every page of a site that is not the home: a product's sub-page, a building block, a hub, contact.",
12
+ "When the page belongs to a parent (`back`): the reader always knows where they are and how to go up."
13
+ ],
14
+ "whenNotToUse": [
15
+ {
16
+ "when": "At the top of an app's screen: a working view needs a calm header.",
17
+ "use": "page-header"
18
+ },
19
+ {
20
+ "when": "For a section further down the page.",
21
+ "use": "page"
22
+ }
23
+ ],
24
+ "bestPractices": [
25
+ "One sentence of lead: what the page gives the reader, not what it is.",
26
+ "The eyebrow says where the reader is (`Open source · building block`); the title says the subject.",
27
+ "Never reveal it: it is the page's largest paint. Put the bird in `aside`, facts or actions in the children.",
28
+ "Set `--kz-hero-top` once to clear a fixed navigation bar."
29
+ ],
30
+ "accessibility": {
31
+ "keyboard": [],
32
+ "notes": [
33
+ "Renders the page's `h1` inside a `header`; keep one hero per page.",
34
+ "The backdrop's layers are decorative and hidden from assistive technology; the aside is yours to label or hide.",
35
+ "The back link is a plain link with its words; its arrow is decorative."
36
+ ]
37
+ },
38
+ "related": [
39
+ "page",
40
+ "section-backdrop",
41
+ "mascots"
42
+ ],
43
+ "web": {
44
+ "entry": "@krizaka/ui/page-hero",
45
+ "import": "import { PageHero } from \"@krizaka/ui/page-hero\";",
46
+ "props": [
47
+ {
48
+ "component": "LinkComponent",
49
+ "description": "The app's link component (Next's `Link`, React Router's `Link`…): receives `href`, `className` and the children.",
50
+ "props": []
51
+ },
52
+ {
53
+ "component": "PageHero",
54
+ "description": "The first screen of a page: back link, eyebrow, `h1`, lead, what follows them (facts, actions) and an aside.",
55
+ "props": [
56
+ {
57
+ "name": "title",
58
+ "type": "ReactNode",
59
+ "default": null,
60
+ "description": "The page's title: the `h1`.",
61
+ "required": true
62
+ },
63
+ {
64
+ "name": "align",
65
+ "type": "\"center\" | \"start\"",
66
+ "default": "start",
67
+ "description": "`center` for a page that opens on its title alone (a hub, a contact page).",
68
+ "required": false
69
+ },
70
+ {
71
+ "name": "aside",
72
+ "type": "ReactNode",
73
+ "default": null,
74
+ "description": "Beside the text, on the right (above it on a phone): the page's bird, an illustration. Decorative or labelled by you.",
75
+ "required": false
76
+ },
77
+ {
78
+ "name": "back",
79
+ "type": "{ href: string; label: string; }",
80
+ "default": null,
81
+ "description": "The way back to the parent page, above the eyebrow.",
82
+ "required": false
83
+ },
84
+ {
85
+ "name": "backdrop",
86
+ "type": "\"none\" | \"grid\" | \"plain\"",
87
+ "default": "grid",
88
+ "description": "The brand's backdrop behind the hero (the gradient, the dome; `grid` adds the perspective floor).",
89
+ "required": false
90
+ },
91
+ {
92
+ "name": "eyebrow",
93
+ "type": "ReactNode",
94
+ "default": null,
95
+ "description": "A short mono line above the title (where the reader is: `Open source · building block`).",
96
+ "required": false
97
+ },
98
+ {
99
+ "name": "lead",
100
+ "type": "ReactNode",
101
+ "default": null,
102
+ "description": "One or two sentences under the title: what the page gives the reader.",
103
+ "required": false
104
+ },
105
+ {
106
+ "name": "linkAs",
107
+ "type": "LinkComponent",
108
+ "default": null,
109
+ "description": "The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise.",
110
+ "required": false
111
+ },
112
+ {
113
+ "name": "size",
114
+ "type": "PageSize",
115
+ "default": "default",
116
+ "description": "The width of the content.",
117
+ "required": false
118
+ }
119
+ ]
120
+ }
121
+ ],
122
+ "examples": [
123
+ {
124
+ "name": "building-block",
125
+ "title": "A sub-page",
126
+ "description": "Back link, eyebrow, title, lead, facts under it and the page's bird beside it.",
127
+ "path": "examples/page-hero/building-block.tsx",
128
+ "module": "@krizaka/ui/registry/examples/page-hero/building-block",
129
+ "code": "import { Mascot } from \"@krizaka/ui/mascots\";\nimport { Facts } from \"@krizaka/ui/page\";\nimport { PageHero } from \"@krizaka/ui/page-hero\";\n\n// The first screen of a sub-page: the way back, where the reader is, the title, what the page gives — the facts under\n// it and the page's bird beside it. Painted at once: never revealed.\nexport default function PageHeroBuildingBlock() {\n return (\n <PageHero\n className=\"w-full\"\n back={{ href: \"#open-source\", label: \"Open source\" }}\n eyebrow=\"Building block · Java\"\n title=\"Krizaka Java\"\n lead=\"The Spring Boot foundation every Krizaka service starts from: one parent, one BOM, starters that agree.\"\n aside={<Mascot bird=\"duck\" mood=\"welcome\" size={112} />}\n >\n <Facts items={[{ label: \"Maven Central 0.1.0\", tone: \"ok\" }, { label: \"Java 21\" }, { label: \"Apache-2.0\" }]} />\n </PageHero>\n );\n}\n"
130
+ },
131
+ {
132
+ "name": "hub",
133
+ "title": "A hub",
134
+ "description": "`align=\"center\"` on the plain backdrop: a title alone.",
135
+ "path": "examples/page-hero/hub.tsx",
136
+ "module": "@krizaka/ui/registry/examples/page-hero/hub",
137
+ "code": "import { PageHero } from \"@krizaka/ui/page-hero\";\n\n// A hub opens on its title alone, centred, on the brand's plain gradient.\nexport default function PageHeroHub() {\n return (\n <PageHero\n className=\"w-full\"\n align=\"center\"\n backdrop=\"plain\"\n eyebrow=\"Documentation\"\n title=\"Build with Krizaka\"\n lead=\"The building blocks the products are made of, documented from their source.\"\n />\n );\n}\n"
138
+ }
139
+ ]
140
+ },
141
+ "native": null,
142
+ "files": [
143
+ {
144
+ "path": "block-link.tsx",
145
+ "content": "// The links of the page blocks (PageHero's back link, LinkCard, ArgumentCard, ActionBar): an internal path renders\n// through the app's router link (`linkAs`, e.g. Next's `Link`), anything else is an `<a>` that opens in a new tab.\n// Shared by the block entries; never exported on its own.\nimport type * as React from \"react\";\n\n/** The app's link component (Next's `Link`, React Router's `Link`…): receives `href`, `className` and the children. */\nexport type LinkComponent = React.ElementType<{ href: string; className?: string; children?: React.ReactNode; \"aria-label\"?: string; \"aria-describedby\"?: string }>;\n\n/** An address that leaves the app: an absolute URL or a protocol (`mailto:`). */\nexport const isExternal = (href: string) => /^[a-z][a-z0-9+.-]*:/i.test(href);\n\nexport function BlockLink({\n href,\n linkAs: Link = \"a\",\n external = isExternal(href),\n rel,\n ...props\n}: Omit<React.ComponentProps<\"a\">, \"href\"> & { href: string; linkAs?: LinkComponent; external?: boolean }) {\n if (external) return <a href={href} target=\"_blank\" rel={rel ?? \"noopener noreferrer\"} {...props} />;\n const Comp = Link as React.ElementType;\n return <Comp href={href} {...props} />;\n}\n"
146
+ },
147
+ {
148
+ "path": "glyphs.tsx",
149
+ "content": "// The small line glyphs the data and media primitives draw (play, volume, search, chevrons…): decorative, 24-unit\n// box, `currentColor`, sized by the caller's class. Shared by the entries that need them; never exported on its own —\n// a product draws its own icons with @krizaka/icons.\nimport type * as React from \"react\";\n\ntype GlyphProps = { className?: string };\n\nfunction Glyph({ className = \"h-4 w-4\", fill, children }: GlyphProps & { fill?: boolean; children: React.ReactNode }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n className={className}\n fill={fill ? \"currentColor\" : \"none\"}\n stroke={fill ? \"none\" : \"currentColor\"}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n >\n {children}\n </svg>\n );\n}\n\nexport const PlayGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <path d=\"M8 5.5v13a1 1 0 0 0 1.5.86l10.4-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5Z\" />\n </Glyph>\n);\nexport const PauseGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n <rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n </Glyph>\n);\nexport const VolumeGlyph = ({ muted, ...p }: GlyphProps & { muted?: boolean }) => (\n <Glyph {...p}>\n <path d=\"M11 5 6 9H3v6h3l5 4V5Z\" />\n {muted ? <path d=\"m22 9-6 6m0-6 6 6\" /> : <path d=\"M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13\" />}\n </Glyph>\n);\nexport const FullscreenGlyph = ({ exit, ...p }: GlyphProps & { exit?: boolean }) => (\n <Glyph {...p}>\n {exit ? <path d=\"M9 4v5H4m11-5v5h5M9 20v-5H4m11 5v-5h5\" /> : <path d=\"M4 9V4h5m6 0h5v5M4 15v5h5m11-5v5h-5\" />}\n </Glyph>\n);\nexport const CaptionsGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M10 10.5a2 2 0 1 0 0 3M17 10.5a2 2 0 1 0 0 3\" />\n </Glyph>\n);\nexport const PipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <rect x=\"12\" y=\"12\" width=\"6\" height=\"4\" rx=\"1\" />\n </Glyph>\n);\nexport const SearchGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </Glyph>\n);\nexport const CloseGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </Glyph>\n);\nexport const ChevronGlyph = ({ direction = \"down\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" | \"up\" | \"down\" }) => (\n <Glyph {...p}>\n <path d={{ left: \"m15 6-6 6 6 6\", right: \"m9 6 6 6-6 6\", up: \"m6 15 6-6 6 6\", down: \"m6 9 6 6 6-6\" }[direction]} />\n </Glyph>\n);\nexport const CheckGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M20 6 9 17l-5-5\" />\n </Glyph>\n);\nexport const PlusGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 5v14M5 12h14\" />\n </Glyph>\n);\nexport const CalendarGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M3 10h18M8 3v4M16 3v4\" />\n </Glyph>\n);\nexport const UploadGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 16V4m0 0L7 9m5-5 5 5\" />\n <path d=\"M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\" />\n </Glyph>\n);\nexport const FileGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8l-5-5Z\" />\n <path d=\"M14 3v5h5\" />\n </Glyph>\n);\nexport const CameraGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Z\" />\n <circle cx=\"12\" cy=\"13.5\" r=\"3.5\" />\n </Glyph>\n);\nexport const FlipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3\" />\n <path d=\"M18 3v4h-4M6 21v-4h4\" />\n </Glyph>\n);\nexport const RetryGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 1 0 2.3-5.7L4 8.5\" />\n <path d=\"M4 4v4.5h4.5\" />\n </Glyph>\n);\nexport const SortGlyph = ({ direction, ...p }: GlyphProps & { direction?: \"ascending\" | \"descending\" }) => (\n <Glyph {...p}>\n {direction === \"ascending\" ? <path d=\"m7 14 5-5 5 5\" /> : direction === \"descending\" ? <path d=\"m7 10 5 5 5-5\" /> : <path d=\"m8 9 4-4 4 4M8 15l4 4 4-4\" />}\n </Glyph>\n);\nexport const ArrowGlyph = ({ direction = \"right\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" }) => (\n <Glyph {...p}>\n <path d={direction === \"left\" ? \"M19 12H5m0 0 6-6m-6 6 6 6\" : \"M5 12h14m0 0-6-6m6 6-6 6\"} />\n </Glyph>\n);\nexport const ExternalGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 4h6v6M20 4l-9 9\" />\n <path d=\"M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4\" />\n </Glyph>\n);\nexport const WarningGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 4 2.5 20h19L12 4Z\" />\n <path d=\"M12 10v4M12 17.2v.1\" />\n </Glyph>\n);\nexport const CopyGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" />\n <path d=\"M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3\" />\n </Glyph>\n);\n"
150
+ },
151
+ {
152
+ "path": "meta.ts",
153
+ "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 | \"action-bar\"\n | \"alert\"\n | \"argument-card\"\n | \"audio-player\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"confirm-button\"\n | \"countdown\"\n | \"cta-panel\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"dialog\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"glow-card\"\n | \"image-cropper\"\n | \"iso\"\n | \"kbd\"\n | \"link-card\"\n | \"loader\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"media-capture\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"pointer-light\"\n | \"popover\"\n | \"progress\"\n | \"radio-group\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"stat\"\n | \"stepper\"\n | \"switch\"\n | \"tabs\"\n | \"tag-input\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\";\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 */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"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\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"
154
+ },
155
+ {
156
+ "path": "page-hero/index.ts",
157
+ "content": "/** @krizaka/ui/page-hero — `PageHero`: the first screen of a page (back link, eyebrow, h1, lead, aside). Server-safe. */\nexport type { LinkComponent } from \"../block-link\";\nexport { PageHero, type PageHeroProps } from \"./page-hero\";\n"
158
+ },
159
+ {
160
+ "path": "page-hero/meta.ts",
161
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Page hero\",\n summary:\n \"The first screen of a page: the way back, an eyebrow, the `h1`, a lead, what follows them (facts, actions) and an aside (the page's bird) — on the brand's backdrop, painted at once.\",\n status: \"beta\",\n category: \"blocks\",\n platforms: \"web\",\n whenToUse: [\n \"At the top of every page of a site that is not the home: a product's sub-page, a building block, a hub, contact.\",\n \"When the page belongs to a parent (`back`): the reader always knows where they are and how to go up.\",\n ],\n whenNotToUse: [\n { when: \"At the top of an app's screen: a working view needs a calm header.\", use: \"page-header\" },\n { when: \"For a section further down the page.\", use: \"page\" },\n ],\n bestPractices: [\n \"One sentence of lead: what the page gives the reader, not what it is.\",\n \"The eyebrow says where the reader is (`Open source · building block`); the title says the subject.\",\n \"Never reveal it: it is the page's largest paint. Put the bird in `aside`, facts or actions in the children.\",\n \"Set `--kz-hero-top` once to clear a fixed navigation bar.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\n \"Renders the page's `h1` inside a `header`; keep one hero per page.\",\n \"The backdrop's layers are decorative and hidden from assistive technology; the aside is yours to label or hide.\",\n \"The back link is a plain link with its words; its arrow is decorative.\",\n ],\n },\n related: [\"page\", \"section-backdrop\", \"mascots\"],\n web: {\n imports: [\"PageHero\"],\n examples: [\n { name: \"building-block\", title: \"A sub-page\", description: \"Back link, eyebrow, title, lead, facts under it and the page's bird beside it.\" },\n { name: \"hub\", title: \"A hub\", description: \"`align=\\\"center\\\"` on the plain backdrop: a title alone.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
162
+ },
163
+ {
164
+ "path": "page-hero/page-hero.tsx",
165
+ "content": "// Server-safe. The first screen of a page (blocks.css): painted at once — never revealed, it is the LCP.\nimport type * as React from \"react\";\n\nimport { BlockLink, type LinkComponent } from \"../block-link\";\nimport { cn } from \"../cn\";\nimport { ArrowGlyph } from \"../glyphs\";\nimport { Page, type PageSize } from \"../page/page\";\nimport { SectionBackdrop } from \"../section-backdrop/section-backdrop\";\n\nexport type PageHeroProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The page's title: the `h1`. */\n title: React.ReactNode;\n /** A short mono line above the title (where the reader is: `Open source · building block`). */\n eyebrow?: React.ReactNode;\n /** One or two sentences under the title: what the page gives the reader. */\n lead?: React.ReactNode;\n /** The way back to the parent page, above the eyebrow. */\n back?: { href: string; label: string };\n /** The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise. */\n linkAs?: LinkComponent;\n /** Beside the text, on the right (above it on a phone): the page's bird, an illustration. Decorative or labelled by you. */\n aside?: React.ReactNode;\n /**\n * The brand's backdrop behind the hero (the gradient, the dome; `grid` adds the perspective floor).\n * @default \"grid\"\n */\n backdrop?: \"grid\" | \"plain\" | \"none\";\n /**\n * `center` for a page that opens on its title alone (a hub, a contact page).\n * @default \"start\"\n */\n align?: \"start\" | \"center\";\n /**\n * The width of the content.\n * @default \"default\"\n */\n size?: PageSize;\n /** Under the lead: facts (`Facts`), actions (`ActionBar`), a search field. */\n children?: React.ReactNode;\n};\n\n/** The first screen of a page: back link, eyebrow, `h1`, lead, what follows them (facts, actions) and an aside. */\nexport function PageHero({ title, eyebrow, lead, back, linkAs, aside, backdrop = \"grid\", align = \"start\", size, className, children, ...props }: PageHeroProps) {\n const body = (\n <Page size={size}>\n <div className=\"kz-hero-text\">\n {back && (\n <BlockLink href={back.href} linkAs={linkAs} className=\"kz-hero-back\">\n <ArrowGlyph direction=\"left\" className=\"h-3.5 w-3.5\" /> {back.label}\n </BlockLink>\n )}\n {eyebrow && <p className=\"kz-eyebrow\">{eyebrow}</p>}\n <h1 className=\"kz-hero-title\">{title}</h1>\n {lead && <p className=\"kz-hero-lead\">{lead}</p>}\n {children && <div className=\"kz-hero-extra\">{children}</div>}\n </div>\n {aside && align === \"start\" && <div className=\"kz-hero-aside\">{aside}</div>}\n </Page>\n );\n const shared = { className: cn(\"kz-hero\", className), \"data-align\": align === \"start\" ? undefined : align, ...props };\n if (backdrop === \"none\") return <header {...shared}>{body}</header>;\n return (\n <SectionBackdrop as=\"header\" grid={backdrop === \"grid\"} {...shared}>\n {body}\n </SectionBackdrop>\n );\n}\n"
166
+ }
167
+ ],
168
+ "dependencies": [],
169
+ "registryDependencies": [
170
+ "cn",
171
+ "page",
172
+ "section-backdrop"
173
+ ],
174
+ "demo": {
175
+ "path": "examples/page-hero/building-block.tsx",
176
+ "content": "import { Mascot } from \"@krizaka/ui/mascots\";\nimport { Facts } from \"@krizaka/ui/page\";\nimport { PageHero } from \"@krizaka/ui/page-hero\";\n\n// The first screen of a sub-page: the way back, where the reader is, the title, what the page gives — the facts under\n// it and the page's bird beside it. Painted at once: never revealed.\nexport default function PageHeroBuildingBlock() {\n return (\n <PageHero\n className=\"w-full\"\n back={{ href: \"#open-source\", label: \"Open source\" }}\n eyebrow=\"Building block · Java\"\n title=\"Krizaka Java\"\n lead=\"The Spring Boot foundation every Krizaka service starts from: one parent, one BOM, starters that agree.\"\n aside={<Mascot bird=\"duck\" mood=\"welcome\" size={112} />}\n >\n <Facts items={[{ label: \"Maven Central 0.1.0\", tone: \"ok\" }, { label: \"Java 21\" }, { label: \"Apache-2.0\" }]} />\n </PageHero>\n );\n}\n"
177
+ },
178
+ "props": [
179
+ {
180
+ "component": "LinkComponent",
181
+ "description": "The app's link component (Next's `Link`, React Router's `Link`…): receives `href`, `className` and the children.",
182
+ "props": []
183
+ },
184
+ {
185
+ "component": "PageHero",
186
+ "description": "The first screen of a page: back link, eyebrow, `h1`, lead, what follows them (facts, actions) and an aside.",
187
+ "props": [
188
+ {
189
+ "name": "title",
190
+ "type": "ReactNode",
191
+ "default": null,
192
+ "description": "The page's title: the `h1`.",
193
+ "required": true
194
+ },
195
+ {
196
+ "name": "align",
197
+ "type": "\"center\" | \"start\"",
198
+ "default": "start",
199
+ "description": "`center` for a page that opens on its title alone (a hub, a contact page).",
200
+ "required": false
201
+ },
202
+ {
203
+ "name": "aside",
204
+ "type": "ReactNode",
205
+ "default": null,
206
+ "description": "Beside the text, on the right (above it on a phone): the page's bird, an illustration. Decorative or labelled by you.",
207
+ "required": false
208
+ },
209
+ {
210
+ "name": "back",
211
+ "type": "{ href: string; label: string; }",
212
+ "default": null,
213
+ "description": "The way back to the parent page, above the eyebrow.",
214
+ "required": false
215
+ },
216
+ {
217
+ "name": "backdrop",
218
+ "type": "\"none\" | \"grid\" | \"plain\"",
219
+ "default": "grid",
220
+ "description": "The brand's backdrop behind the hero (the gradient, the dome; `grid` adds the perspective floor).",
221
+ "required": false
222
+ },
223
+ {
224
+ "name": "eyebrow",
225
+ "type": "ReactNode",
226
+ "default": null,
227
+ "description": "A short mono line above the title (where the reader is: `Open source · building block`).",
228
+ "required": false
229
+ },
230
+ {
231
+ "name": "lead",
232
+ "type": "ReactNode",
233
+ "default": null,
234
+ "description": "One or two sentences under the title: what the page gives the reader.",
235
+ "required": false
236
+ },
237
+ {
238
+ "name": "linkAs",
239
+ "type": "LinkComponent",
240
+ "default": null,
241
+ "description": "The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise.",
242
+ "required": false
243
+ },
244
+ {
245
+ "name": "size",
246
+ "type": "PageSize",
247
+ "default": "default",
248
+ "description": "The width of the content.",
249
+ "required": false
250
+ }
251
+ ]
252
+ }
253
+ ]
254
+ }