@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
@@ -0,0 +1,157 @@
1
+ {
2
+ "name": "toc",
3
+ "type": "primitive",
4
+ "title": "Table of contents",
5
+ "summary": "The sections of a reading page: sticky beside the content on a wide screen, a row of chips that scrolls sideways on a phone, the section being read marked — with `TocLayout` to place it.",
6
+ "description": "The sections of a reading page: sticky beside the content on a wide screen, a row of chips that scrolls sideways on a phone, the section being read marked — with `TocLayout` to place it.",
7
+ "status": "beta",
8
+ "category": "blocks",
9
+ "platforms": "web",
10
+ "whenToUse": [
11
+ "A long page read in sections: a building block's page, a guide, a policy.",
12
+ "When readers jump to one part (install, decisions, status) more than they read from the top."
13
+ ],
14
+ "whenNotToUse": [
15
+ {
16
+ "when": "For the navigation between pages.",
17
+ "use": "nav-bar"
18
+ },
19
+ {
20
+ "when": "For a short page of two or three screens: the headings are enough.",
21
+ "use": "page"
22
+ }
23
+ ],
24
+ "bestPractices": [
25
+ "Three to eight entries, the words of the section titles.",
26
+ "Every entry points at a heading's `id` (a `Section`'s): its anchor.",
27
+ "Set `--kz-anchor-offset` once to clear a fixed navigation bar."
28
+ ],
29
+ "accessibility": {
30
+ "keyboard": [
31
+ {
32
+ "keys": "Tab",
33
+ "action": "Moves through the sections' links; Enter jumps to the section."
34
+ }
35
+ ],
36
+ "notes": [
37
+ "A `nav` named by its label, with an ordered list of links.",
38
+ "The section being read carries `aria-current=\"location\"`, found by one IntersectionObserver."
39
+ ]
40
+ },
41
+ "related": [
42
+ "page",
43
+ "nav-bar",
44
+ "tabs"
45
+ ],
46
+ "web": {
47
+ "entry": "@krizaka/ui/toc",
48
+ "import": "import { Toc, TocLayout } from \"@krizaka/ui/toc\";",
49
+ "props": [
50
+ {
51
+ "component": "Toc",
52
+ "description": "The sections of the page, the one being read marked.",
53
+ "props": [
54
+ {
55
+ "name": "items",
56
+ "type": "readonly { id: string; label: ReactNode; }[]",
57
+ "default": null,
58
+ "description": "The sections, in order: the id of each section's title and its words.",
59
+ "required": true
60
+ },
61
+ {
62
+ "name": "label",
63
+ "type": "string",
64
+ "default": null,
65
+ "description": "The navigation's name and visible label: `On this page`.",
66
+ "required": true
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "component": "TocLayout",
72
+ "description": "A reading page: the table of contents in a sticky column on the left, the sections beside it (one column on a phone).",
73
+ "props": [
74
+ {
75
+ "name": "toc",
76
+ "type": "ReactNode",
77
+ "default": null,
78
+ "description": "The table of contents (a `Toc`).",
79
+ "required": true
80
+ }
81
+ ]
82
+ }
83
+ ],
84
+ "examples": [
85
+ {
86
+ "name": "reading-page",
87
+ "title": "A reading page",
88
+ "description": "Three sections, the contents in a sticky column beside them.",
89
+ "path": "examples/toc/reading-page.tsx",
90
+ "module": "@krizaka/ui/registry/examples/toc/reading-page",
91
+ "code": "import { Section } from \"@krizaka/ui/page\";\nimport { Toc, TocLayout } from \"@krizaka/ui/toc\";\n\nconst sections = [\n { id: \"install\", label: \"Install\" },\n { id: \"decisions\", label: \"Decisions\" },\n { id: \"status\", label: \"Status\" },\n];\n\n// A reading page: the contents in a sticky column, the section being read marked; a row of chips on a phone.\nexport default function TocReadingPage() {\n return (\n <TocLayout className=\"w-full max-w-4xl\" toc={<Toc label=\"On this page\" items={sections} />}>\n {sections.map((s, i) => (\n <Section key={s.id} id={s.id} title={s.label} headingSize=\"sm\" spacing=\"sm\" size=\"full\" divider={i > 0}>\n <p className=\"text-sm text-fg-secondary\">The {s.label.toLowerCase()} of the building block.</p>\n </Section>\n ))}\n </TocLayout>\n );\n}\n"
92
+ }
93
+ ]
94
+ },
95
+ "native": null,
96
+ "files": [
97
+ {
98
+ "path": "meta.ts",
99
+ "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"
100
+ },
101
+ {
102
+ "path": "toc/index.ts",
103
+ "content": "/** @krizaka/ui/toc — `Toc` (the sections of a reading page, the one being read marked) and `TocLayout`. Client. */\nexport { Toc, TocLayout, type TocLayoutProps, type TocProps } from \"./toc\";\n"
104
+ },
105
+ {
106
+ "path": "toc/meta.ts",
107
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Table of contents\",\n summary:\n \"The sections of a reading page: sticky beside the content on a wide screen, a row of chips that scrolls sideways on a phone, the section being read marked — with `TocLayout` to place it.\",\n status: \"beta\",\n category: \"blocks\",\n platforms: \"web\",\n whenToUse: [\n \"A long page read in sections: a building block's page, a guide, a policy.\",\n \"When readers jump to one part (install, decisions, status) more than they read from the top.\",\n ],\n whenNotToUse: [\n { when: \"For the navigation between pages.\", use: \"nav-bar\" },\n { when: \"For a short page of two or three screens: the headings are enough.\", use: \"page\" },\n ],\n bestPractices: [\n \"Three to eight entries, the words of the section titles.\",\n \"Every entry points at a heading's `id` (a `Section`'s): its anchor.\",\n \"Set `--kz-anchor-offset` once to clear a fixed navigation bar.\",\n ],\n accessibility: {\n keyboard: [{ keys: \"Tab\", action: \"Moves through the sections' links; Enter jumps to the section.\" }],\n notes: [\n \"A `nav` named by its label, with an ordered list of links.\",\n \"The section being read carries `aria-current=\\\"location\\\"`, found by one IntersectionObserver.\",\n ],\n },\n related: [\"page\", \"nav-bar\", \"tabs\"],\n web: {\n imports: [\"Toc\", \"TocLayout\"],\n examples: [{ name: \"reading-page\", title: \"A reading page\", description: \"Three sections, the contents in a sticky column beside them.\" }],\n },\n} satisfies ComponentMeta;\n"
108
+ },
109
+ {
110
+ "path": "toc/toc.tsx",
111
+ "content": "// Client (one IntersectionObserver). The table of contents of a reading page (blocks.css): sticky beside the content on\n// a wide screen, a row of chips that scrolls sideways on a phone. The section being read is marked (`aria-current`).\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport type TocProps = Omit<React.HTMLAttributes<HTMLElement>, \"children\"> & {\n /** The navigation's name and visible label: `On this page`. */\n label: string;\n /** The sections, in order: the id of each section's title and its words. */\n items: readonly { id: string; label: React.ReactNode }[];\n};\n\n/** The sections of the page, the one being read marked. */\nexport function Toc({ label, items, className, ...props }: TocProps) {\n const [active, setActive] = React.useState(items[0]?.id);\n React.useEffect(() => {\n if (typeof IntersectionObserver === \"undefined\") return;\n const targets = items.map((i) => document.getElementById(i.id)).filter((el): el is HTMLElement => el !== null);\n const io = new IntersectionObserver(\n (entries) => {\n const visible = entries.filter((e) => e.isIntersecting).sort((a, b) => a.boundingClientRect.top - b.boundingClientRect.top);\n if (visible[0]) setActive(visible[0].target.id);\n },\n { rootMargin: \"-15% 0px -70% 0px\" },\n );\n targets.forEach((t) => io.observe(t));\n return () => io.disconnect();\n }, [items]);\n return (\n <nav className={cn(\"kz-toc\", className)} aria-label={label} {...props}>\n <p className=\"kz-label\">{label}</p>\n <ol>\n {items.map((i) => (\n <li key={i.id}>\n <a href={`#${i.id}`} aria-current={active === i.id ? \"location\" : undefined} onClick={() => setActive(i.id)}>\n {i.label}\n </a>\n </li>\n ))}\n </ol>\n </nav>\n );\n}\n\nexport type TocLayoutProps = React.HTMLAttributes<HTMLDivElement> & {\n /** The table of contents (a `Toc`). */\n toc: React.ReactNode;\n /** The page's sections. */\n children: React.ReactNode;\n};\n\n/** A reading page: the table of contents in a sticky column on the left, the sections beside it (one column on a phone). */\nexport function TocLayout({ toc, children, className, ...props }: TocLayoutProps) {\n return (\n <div className={cn(\"kz-toc-layout\", className)} {...props}>\n <aside className=\"kz-toc-aside\">{toc}</aside>\n <div className=\"kz-toc-main\">{children}</div>\n </div>\n );\n}\n"
112
+ }
113
+ ],
114
+ "dependencies": [],
115
+ "registryDependencies": [
116
+ "cn"
117
+ ],
118
+ "demo": {
119
+ "path": "examples/toc/reading-page.tsx",
120
+ "content": "import { Section } from \"@krizaka/ui/page\";\nimport { Toc, TocLayout } from \"@krizaka/ui/toc\";\n\nconst sections = [\n { id: \"install\", label: \"Install\" },\n { id: \"decisions\", label: \"Decisions\" },\n { id: \"status\", label: \"Status\" },\n];\n\n// A reading page: the contents in a sticky column, the section being read marked; a row of chips on a phone.\nexport default function TocReadingPage() {\n return (\n <TocLayout className=\"w-full max-w-4xl\" toc={<Toc label=\"On this page\" items={sections} />}>\n {sections.map((s, i) => (\n <Section key={s.id} id={s.id} title={s.label} headingSize=\"sm\" spacing=\"sm\" size=\"full\" divider={i > 0}>\n <p className=\"text-sm text-fg-secondary\">The {s.label.toLowerCase()} of the building block.</p>\n </Section>\n ))}\n </TocLayout>\n );\n}\n"
121
+ },
122
+ "props": [
123
+ {
124
+ "component": "Toc",
125
+ "description": "The sections of the page, the one being read marked.",
126
+ "props": [
127
+ {
128
+ "name": "items",
129
+ "type": "readonly { id: string; label: ReactNode; }[]",
130
+ "default": null,
131
+ "description": "The sections, in order: the id of each section's title and its words.",
132
+ "required": true
133
+ },
134
+ {
135
+ "name": "label",
136
+ "type": "string",
137
+ "default": null,
138
+ "description": "The navigation's name and visible label: `On this page`.",
139
+ "required": true
140
+ }
141
+ ]
142
+ },
143
+ {
144
+ "component": "TocLayout",
145
+ "description": "A reading page: the table of contents in a sticky column on the left, the sections beside it (one column on a phone).",
146
+ "props": [
147
+ {
148
+ "name": "toc",
149
+ "type": "ReactNode",
150
+ "default": null,
151
+ "description": "The table of contents (a `Toc`).",
152
+ "required": true
153
+ }
154
+ ]
155
+ }
156
+ ]
157
+ }
@@ -141,7 +141,7 @@
141
141
  },
142
142
  {
143
143
  "path": "meta.ts",
144
- "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"
144
+ "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"
145
145
  },
146
146
  {
147
147
  "path": "tooltip/index.ts",
@@ -211,7 +211,7 @@
211
211
  },
212
212
  {
213
213
  "name": "preload",
214
- "type": "\"metadata\" | \"none\" | \"auto\"",
214
+ "type": "\"none\" | \"auto\" | \"metadata\"",
215
215
  "default": "metadata",
216
216
  "description": "How much to fetch before playback: `none` (a list of many videos), `metadata` (default), `auto`.",
217
217
  "required": false
@@ -400,7 +400,7 @@
400
400
  "files": [
401
401
  {
402
402
  "path": "glyphs.tsx",
403
- "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);\n"
403
+ "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"
404
404
  },
405
405
  {
406
406
  "path": "media.ts",
@@ -408,7 +408,7 @@
408
408
  },
409
409
  {
410
410
  "path": "meta.ts",
411
- "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"
411
+ "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"
412
412
  },
413
413
  {
414
414
  "path": "video-player/index.ts",
@@ -573,7 +573,7 @@
573
573
  },
574
574
  {
575
575
  "name": "preload",
576
- "type": "\"metadata\" | \"none\" | \"auto\"",
576
+ "type": "\"none\" | \"auto\" | \"metadata\"",
577
577
  "default": "metadata",
578
578
  "description": "How much to fetch before playback: `none` (a list of many videos), `metadata` (default), `auto`.",
579
579
  "required": false
@@ -77,7 +77,7 @@
77
77
  },
78
78
  {
79
79
  "name": "classNames",
80
- "type": "Partial<Record<\"root\" | \"base\" | \"header\" | \"track\" | \"range\" | \"frame\" | \"kept\" | \"strip\" | \"shade\" | \"grip\" | \"handle\" | \"playhead\", string>>",
80
+ "type": "Partial<Record<\"base\" | \"header\" | \"track\" | \"root\" | \"range\" | \"frame\" | \"kept\" | \"strip\" | \"shade\" | \"grip\" | \"handle\" | \"playhead\", string>>",
81
81
  "default": "{}",
82
82
  "description": "Classes per part: `root`, `header`, `kept`, `track`, `strip`, `frame`, `shade`, `range`, `handle`, `grip`, `playhead`.",
83
83
  "required": false
@@ -225,7 +225,7 @@
225
225
  },
226
226
  {
227
227
  "path": "meta.ts",
228
- "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"
228
+ "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"
229
229
  },
230
230
  {
231
231
  "path": "video-trimmer/index.ts",
@@ -269,7 +269,7 @@
269
269
  },
270
270
  {
271
271
  "name": "classNames",
272
- "type": "Partial<Record<\"root\" | \"base\" | \"header\" | \"track\" | \"range\" | \"frame\" | \"kept\" | \"strip\" | \"shade\" | \"grip\" | \"handle\" | \"playhead\", string>>",
272
+ "type": "Partial<Record<\"base\" | \"header\" | \"track\" | \"root\" | \"range\" | \"frame\" | \"kept\" | \"strip\" | \"shade\" | \"grip\" | \"handle\" | \"playhead\", string>>",
273
273
  "default": "{}",
274
274
  "description": "Classes per part: `root`, `header`, `kept`, `track`, `strip`, `frame`, `shade`, `range`, `handle`, `grip`, `playhead`.",
275
275
  "required": false