@krizaka/ui 2.5.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/README.md +44 -1
  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-XUMJA5ZI.js → chunk-X6TW3X6Y.js} +2 -2
  25. package/dist/chunk-XCBVFMNV.js +41 -0
  26. package/dist/{chunk-YX6CNVJA.js.map → chunk-XCBVFMNV.js.map} +1 -1
  27. package/dist/chunk-XVLWVTQA.js +28 -0
  28. package/dist/chunk-XVLWVTQA.js.map +1 -0
  29. package/dist/chunk-Z6FUPB3Q.js +102 -0
  30. package/dist/chunk-Z6FUPB3Q.js.map +1 -0
  31. package/dist/code-block.d.ts +42 -0
  32. package/dist/code-block.js +202 -0
  33. package/dist/code-block.js.map +1 -0
  34. package/dist/combobox.js +2 -2
  35. package/dist/cta-panel.d.ts +23 -0
  36. package/dist/cta-panel.js +20 -0
  37. package/dist/cta-panel.js.map +1 -0
  38. package/dist/data-table.js +1 -1
  39. package/dist/date-picker.js +1 -1
  40. package/dist/decision-list.d.ts +34 -0
  41. package/dist/decision-list.js +67 -0
  42. package/dist/decision-list.js.map +1 -0
  43. package/dist/file-upload.js +1 -1
  44. package/dist/filter-bar.js +1 -1
  45. package/dist/link-card.d.ts +35 -0
  46. package/dist/link-card.js +46 -0
  47. package/dist/link-card.js.map +1 -0
  48. package/dist/mascot-quote.d.ts +42 -0
  49. package/dist/mascot-quote.js +267 -0
  50. package/dist/mascot-quote.js.map +1 -0
  51. package/dist/media-capture.js +1 -1
  52. package/dist/motion.css +25 -1
  53. package/dist/page-hero.d.ts +44 -0
  54. package/dist/page-hero.js +41 -0
  55. package/dist/page-hero.js.map +1 -0
  56. package/dist/page.d.ts +116 -0
  57. package/dist/page.js +17 -0
  58. package/dist/page.js.map +1 -0
  59. package/dist/pagination.js +25 -44
  60. package/dist/pagination.js.map +1 -1
  61. package/dist/pointer-light.d.ts +20 -0
  62. package/dist/pointer-light.js +12 -0
  63. package/dist/pointer-light.js.map +1 -0
  64. package/dist/search-field.js +1 -1
  65. package/dist/section-backdrop.js +4 -22
  66. package/dist/section-backdrop.js.map +1 -1
  67. package/dist/tag-input.js +2 -2
  68. package/dist/terminal-replay.d.ts +68 -0
  69. package/dist/terminal-replay.js +231 -0
  70. package/dist/terminal-replay.js.map +1 -0
  71. package/dist/toc.d.ts +23 -0
  72. package/dist/toc.js +39 -0
  73. package/dist/toc.js.map +1 -0
  74. package/dist/video-player.js +1 -1
  75. package/package.json +192 -7
  76. package/registry/action-bar.json +205 -0
  77. package/registry/alert.json +1 -1
  78. package/registry/argument-card.json +327 -0
  79. package/registry/audio-player.json +2 -2
  80. package/registry/avatar.json +1 -1
  81. package/registry/badge.json +1 -1
  82. package/registry/button.json +5 -5
  83. package/registry/card-grid.json +221 -0
  84. package/registry/card.json +3 -3
  85. package/registry/checkbox.json +1 -1
  86. package/registry/chip-link.json +1 -1
  87. package/registry/chip.json +1 -1
  88. package/registry/code-block.json +262 -0
  89. package/registry/combobox.json +2 -2
  90. package/registry/command.json +1 -1
  91. package/registry/confirm-button.json +3 -3
  92. package/registry/countdown.json +1 -1
  93. package/registry/cta-panel.json +154 -0
  94. package/registry/data-table.json +2 -2
  95. package/registry/date-picker.json +2 -2
  96. package/registry/decision-list.json +144 -0
  97. package/registry/dialog.json +1 -1
  98. package/registry/dropdown-menu.json +1 -1
  99. package/registry/empty-state.json +1 -1
  100. package/registry/examples/action-bar/buttons.d.ts +4 -0
  101. package/registry/examples/action-bar/buttons.js +22 -0
  102. package/registry/examples/action-bar/buttons.tsx +17 -0
  103. package/registry/examples/action-bar/icons.d.ts +4 -0
  104. package/registry/examples/action-bar/icons.js +24 -0
  105. package/registry/examples/action-bar/icons.tsx +23 -0
  106. package/registry/examples/argument-card/building-block.d.ts +4 -0
  107. package/registry/examples/argument-card/building-block.js +29 -0
  108. package/registry/examples/argument-card/building-block.tsx +29 -0
  109. package/registry/examples/argument-card/grid.d.ts +4 -0
  110. package/registry/examples/argument-card/grid.js +17 -0
  111. package/registry/examples/argument-card/grid.tsx +19 -0
  112. package/registry/examples/argument-card/unfold.d.ts +4 -0
  113. package/registry/examples/argument-card/unfold.js +26 -0
  114. package/registry/examples/argument-card/unfold.tsx +21 -0
  115. package/registry/examples/card-grid/products.d.ts +4 -0
  116. package/registry/examples/card-grid/products.js +16 -0
  117. package/registry/examples/card-grid/products.tsx +13 -0
  118. package/registry/examples/card-grid/reveal.d.ts +4 -0
  119. package/registry/examples/card-grid/reveal.js +13 -0
  120. package/registry/examples/card-grid/reveal.tsx +16 -0
  121. package/registry/examples/code-block/build-tools.d.ts +4 -0
  122. package/registry/examples/code-block/build-tools.js +30 -0
  123. package/registry/examples/code-block/build-tools.tsx +25 -0
  124. package/registry/examples/code-block/file.d.ts +4 -0
  125. package/registry/examples/code-block/file.js +17 -0
  126. package/registry/examples/code-block/file.tsx +13 -0
  127. package/registry/examples/cta-panel/discuss.d.ts +4 -0
  128. package/registry/examples/cta-panel/discuss.js +31 -0
  129. package/registry/examples/cta-panel/discuss.tsx +23 -0
  130. package/registry/examples/decision-list/product.d.ts +4 -0
  131. package/registry/examples/decision-list/product.js +35 -0
  132. package/registry/examples/decision-list/product.tsx +30 -0
  133. package/registry/examples/link-card/docs-hub.d.ts +4 -0
  134. package/registry/examples/link-card/docs-hub.js +18 -0
  135. package/registry/examples/link-card/docs-hub.tsx +20 -0
  136. package/registry/examples/link-card/external.d.ts +4 -0
  137. package/registry/examples/link-card/external.js +22 -0
  138. package/registry/examples/link-card/external.tsx +16 -0
  139. package/registry/examples/link-card/stack.d.ts +4 -0
  140. package/registry/examples/link-card/stack.js +26 -0
  141. package/registry/examples/link-card/stack.tsx +21 -0
  142. package/registry/examples/mascot-quote/callout.d.ts +4 -0
  143. package/registry/examples/mascot-quote/callout.js +11 -0
  144. package/registry/examples/mascot-quote/callout.tsx +10 -0
  145. package/registry/examples/mascot-quote/inline.d.ts +4 -0
  146. package/registry/examples/mascot-quote/inline.js +11 -0
  147. package/registry/examples/mascot-quote/inline.tsx +10 -0
  148. package/registry/examples/page/backdrop.d.ts +4 -0
  149. package/registry/examples/page/backdrop.js +23 -0
  150. package/registry/examples/page/backdrop.tsx +18 -0
  151. package/registry/examples/page/facts.d.ts +4 -0
  152. package/registry/examples/page/facts.js +24 -0
  153. package/registry/examples/page/facts.tsx +21 -0
  154. package/registry/examples/page/frame.d.ts +4 -0
  155. package/registry/examples/page/frame.js +15 -0
  156. package/registry/examples/page/frame.tsx +17 -0
  157. package/registry/examples/page/sections.d.ts +4 -0
  158. package/registry/examples/page/sections.js +14 -0
  159. package/registry/examples/page/sections.tsx +15 -0
  160. package/registry/examples/page-hero/building-block.d.ts +4 -0
  161. package/registry/examples/page-hero/building-block.js +24 -0
  162. package/registry/examples/page-hero/building-block.tsx +20 -0
  163. package/registry/examples/page-hero/hub.d.ts +4 -0
  164. package/registry/examples/page-hero/hub.js +21 -0
  165. package/registry/examples/page-hero/hub.tsx +15 -0
  166. package/registry/examples/pointer-light/list.d.ts +4 -0
  167. package/registry/examples/pointer-light/list.js +16 -0
  168. package/registry/examples/pointer-light/list.tsx +14 -0
  169. package/registry/examples/terminal-replay/at-rest.d.ts +4 -0
  170. package/registry/examples/terminal-replay/at-rest.js +32 -0
  171. package/registry/examples/terminal-replay/at-rest.tsx +26 -0
  172. package/registry/examples/terminal-replay/session.d.ts +4 -0
  173. package/registry/examples/terminal-replay/session.js +34 -0
  174. package/registry/examples/terminal-replay/session.tsx +28 -0
  175. package/registry/examples/toc/reading-page.d.ts +4 -0
  176. package/registry/examples/toc/reading-page.js +21 -0
  177. package/registry/examples/toc/reading-page.tsx +21 -0
  178. package/registry/field.json +1 -1
  179. package/registry/file-upload.json +2 -2
  180. package/registry/filter-bar.json +2 -2
  181. package/registry/glow-card.json +1 -1
  182. package/registry/image-cropper.json +1 -1
  183. package/registry/index.json +241 -1
  184. package/registry/iso.json +1 -1
  185. package/registry/kbd.json +1 -1
  186. package/registry/link-card.json +279 -0
  187. package/registry/loader.json +1 -1
  188. package/registry/marquee.json +1 -1
  189. package/registry/mascot-quote.json +191 -0
  190. package/registry/mascots.json +1 -1
  191. package/registry/media-capture.json +4 -4
  192. package/registry/meter.json +1 -1
  193. package/registry/nav-bar.json +1 -1
  194. package/registry/number-ticker.json +1 -1
  195. package/registry/page-header.json +1 -1
  196. package/registry/page-hero.json +254 -0
  197. package/registry/page.json +497 -0
  198. package/registry/pagination.json +2 -2
  199. package/registry/pointer-light.json +119 -0
  200. package/registry/popover.json +1 -1
  201. package/registry/progress.json +1 -1
  202. package/registry/radio-group.json +1 -1
  203. package/registry/search-field.json +2 -2
  204. package/registry/section-backdrop.json +1 -1
  205. package/registry/separator.json +1 -1
  206. package/registry/skeleton.json +3 -3
  207. package/registry/slider.json +1 -1
  208. package/registry/slot.json +1 -1
  209. package/registry/spinner.json +1 -1
  210. package/registry/stat.json +1 -1
  211. package/registry/stepper.json +1 -1
  212. package/registry/switch.json +1 -1
  213. package/registry/tabs.json +1 -1
  214. package/registry/tag-input.json +1 -1
  215. package/registry/terminal-replay.json +317 -0
  216. package/registry/theme.json +1 -1
  217. package/registry/toast.json +1 -1
  218. package/registry/toc.json +157 -0
  219. package/registry/tooltip.json +1 -1
  220. package/registry/video-player.json +4 -4
  221. package/registry/video-trimmer.json +3 -3
  222. /package/dist/{chunk-XUMJA5ZI.js.map → chunk-X6TW3X6Y.js.map} +0 -0
@@ -0,0 +1,205 @@
1
+ {
2
+ "name": "action-bar",
3
+ "type": "primitive",
4
+ "title": "Action bar",
5
+ "summary": "A row of link actions — discuss, propose, report, read the docs, see the code: buttons with their words at the end of a page, or icon buttons whose words are a tooltip at the foot of a card.",
6
+ "description": "A row of link actions — discuss, propose, report, read the docs, see the code: buttons with their words at the end of a page, or icon buttons whose words are a tooltip at the foot of a card.",
7
+ "status": "beta",
8
+ "category": "blocks",
9
+ "platforms": "web",
10
+ "whenToUse": [
11
+ "The ways to answer at the end of a page or in a `CtaPanel`.",
12
+ "Secondary actions at the foot of a card, where room is short (`variant=\"icons\"`)."
13
+ ],
14
+ "whenNotToUse": [
15
+ {
16
+ "when": "For actions that run in the app (save, delete): those are buttons, not links.",
17
+ "use": "button"
18
+ },
19
+ {
20
+ "when": "For a menu of many choices.",
21
+ "use": "dropdown-menu"
22
+ }
23
+ ],
24
+ "bestPractices": [
25
+ "Order by importance; `primaryFirst` when one action is what the block is about.",
26
+ "Two or three actions; more belong in a menu or a page.",
27
+ "Icons from the signature set, the same icon for the same action everywhere."
28
+ ],
29
+ "accessibility": {
30
+ "keyboard": [
31
+ {
32
+ "keys": "Tab",
33
+ "action": "Moves between the actions; an icon action shows its words while focused."
34
+ }
35
+ ],
36
+ "notes": [
37
+ "A list named by `label`; each action is a link with its words as its accessible name.",
38
+ "An absolute address opens in a new tab and wears the external mark.",
39
+ "The tooltip of an icon action is CSS only (no portal, no script): it repeats the accessible name."
40
+ ]
41
+ },
42
+ "related": [
43
+ "cta-panel",
44
+ "button",
45
+ "argument-card"
46
+ ],
47
+ "web": {
48
+ "entry": "@krizaka/ui/action-bar",
49
+ "import": "import { ActionBar } from \"@krizaka/ui/action-bar\";",
50
+ "props": [
51
+ {
52
+ "component": "ActionBar",
53
+ "description": "A row of link actions: buttons with their words, or icon buttons with a tooltip.",
54
+ "props": [
55
+ {
56
+ "name": "actions",
57
+ "type": "readonly Action[]",
58
+ "default": null,
59
+ "description": "The actions, in order of importance.",
60
+ "required": true
61
+ },
62
+ {
63
+ "name": "label",
64
+ "type": "string",
65
+ "default": null,
66
+ "description": "What the actions are about (`Talk about Krizaka Java`): the list's accessible name.",
67
+ "required": false
68
+ },
69
+ {
70
+ "name": "linkAs",
71
+ "type": "LinkComponent",
72
+ "default": null,
73
+ "description": "The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise.",
74
+ "required": false
75
+ },
76
+ {
77
+ "name": "primaryFirst",
78
+ "type": "boolean",
79
+ "default": "false",
80
+ "description": "The first action as the primary button (the one action a block is about); the others stay secondary.",
81
+ "required": false
82
+ },
83
+ {
84
+ "name": "size",
85
+ "type": "\"sm\" | \"md\" | \"lg\"",
86
+ "default": "md",
87
+ "description": "The buttons' size: `sm` in a card, `md` in a section, `lg` on a hero or a closing call.",
88
+ "required": false
89
+ },
90
+ {
91
+ "name": "variant",
92
+ "type": "\"buttons\" | \"icons\"",
93
+ "default": "buttons",
94
+ "description": "`buttons` (with their words) or `icons` (icon buttons, the words in a tooltip).",
95
+ "required": false
96
+ }
97
+ ]
98
+ }
99
+ ],
100
+ "examples": [
101
+ {
102
+ "name": "buttons",
103
+ "title": "Buttons",
104
+ "description": "Read, see the code, discuss — the first one primary.",
105
+ "path": "examples/action-bar/buttons.tsx",
106
+ "module": "@krizaka/ui/registry/examples/action-bar/buttons",
107
+ "code": "import { ActionBar } from \"@krizaka/ui/action-bar\";\n\n// `buttons`: the actions of the end of a page, with their words. The first one is the page's action (`primaryFirst`);\n// an absolute address opens in a new tab and wears the external mark.\nexport default function ActionBarButtons() {\n return (\n <ActionBar\n label=\"What next\"\n primaryFirst\n actions={[\n { href: \"#docs\", label: \"Read the documentation\" },\n { href: \"https://github.com/krizaka/krizaka-java\", label: \"See the code\" },\n { href: \"https://github.com/krizaka/krizaka-java/discussions\", label: \"Discuss\" },\n ]}\n />\n );\n}\n"
108
+ },
109
+ {
110
+ "name": "icons",
111
+ "title": "Icon actions",
112
+ "description": "Discuss, propose, report: icon buttons with their words in a tooltip.",
113
+ "path": "examples/action-bar/icons.tsx",
114
+ "module": "@krizaka/ui/registry/examples/action-bar/icons",
115
+ "code": "import { ActionBar } from \"@krizaka/ui/action-bar\";\n\nconst glyph = (d: string) => (\n <svg viewBox=\"0 0 24 24\" width=\"17\" height=\"17\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden>\n <path d={d} />\n </svg>\n);\nconst repo = \"https://github.com/krizaka/krizaka-java\";\n\n// `icons`: where room is short (the foot of a card) — the words are the accessible name and a tooltip on hover and focus.\nexport default function ActionBarIcons() {\n return (\n <ActionBar\n variant=\"icons\"\n label=\"Talk about Krizaka Java\"\n actions={[\n { href: `${repo}/discussions`, label: \"Discuss\", icon: glyph(\"M4 5h16v11H9l-5 4V5Z\") },\n { href: `${repo}/issues/new?template=idea.yml`, label: \"Propose\", icon: glyph(\"M12 3v4M5 12H3m18 0h-2M8 17h8m-6 4h4M12 7a5 5 0 0 0-3 9h6a5 5 0 0 0-3-9Z\") },\n { href: `${repo}/issues/new?template=bug.yml`, label: \"Report a problem\", icon: glyph(\"M12 4 2.5 20h19L12 4Zm0 6v4m0 3v.1\") },\n ]}\n />\n );\n}\n"
116
+ }
117
+ ]
118
+ },
119
+ "native": null,
120
+ "files": [
121
+ {
122
+ "path": "action-bar/action-bar.tsx",
123
+ "content": "// Server-safe. A row of actions that leave or move on (blocks.css): discuss · propose · report, read the docs, see the\n// code. `buttons`: buttons with their words — the end of a page or a section. `icons`: icon buttons whose words are the\n// accessible name and a tooltip on hover and focus (CSS only: no script, no portal) — the foot of a card.\nimport type * as React from \"react\";\n\nimport { BlockLink, isExternal, type LinkComponent } from \"../block-link\";\nimport { buttonVariants } from \"../button/button\";\nimport { cn } from \"../cn\";\nimport { ExternalGlyph } from \"../glyphs\";\n\nexport interface Action {\n /** Where it leads. An absolute URL opens in a new tab, with the external mark. */\n href: string;\n /** Its words (the accessible name, and the tooltip of an icon action). */\n label: string;\n /** Its icon (a signature icon): decorative. Required by `variant=\"icons\"`. */\n icon?: React.ReactNode;\n}\n\nexport type ActionBarProps = React.HTMLAttributes<HTMLUListElement> & {\n /** The actions, in order of importance. */\n actions: readonly Action[];\n /**\n * `buttons` (with their words) or `icons` (icon buttons, the words in a tooltip).\n * @default \"buttons\"\n */\n variant?: \"buttons\" | \"icons\";\n /**\n * The first action as the primary button (the one action a block is about); the others stay secondary.\n * @default false\n */\n primaryFirst?: boolean;\n /**\n * The buttons' size: `sm` in a card, `md` in a section, `lg` on a hero or a closing call.\n * @default \"md\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\n /** What the actions are about (`Talk about Krizaka Java`): the list's accessible name. */\n label?: string;\n /** The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise. */\n linkAs?: LinkComponent;\n};\n\n/** A row of link actions: buttons with their words, or icon buttons with a tooltip. */\nexport function ActionBar({ actions, variant = \"buttons\", primaryFirst = false, size = \"md\", label, linkAs, className, ...props }: ActionBarProps) {\n const icons = variant === \"icons\";\n return (\n <ul className={cn(\"kz-actions\", className)} data-variant={icons ? \"icons\" : undefined} aria-label={label} {...props}>\n {actions.map((a, i) => {\n const external = isExternal(a.href);\n return (\n <li key={a.href}>\n {icons ? (\n <BlockLink\n href={a.href}\n linkAs={linkAs}\n external={external}\n aria-label={a.label}\n data-tip={a.label}\n className={buttonVariants({ variant: \"ghost\", size: \"icon\", shape: \"cut\", className: size === \"sm\" ? \"h-9 w-9\" : undefined })}\n >\n {a.icon}\n </BlockLink>\n ) : (\n <BlockLink\n href={a.href}\n linkAs={linkAs}\n external={external}\n className={buttonVariants({ variant: primaryFirst && i === 0 ? \"primary\" : \"secondary\", size, shape: \"cut\", className: \"gap-2\" })}\n >\n {a.icon}\n {a.label}\n {external && <ExternalGlyph className=\"h-3 w-3 opacity-70\" />}\n </BlockLink>\n )}\n </li>\n );\n })}\n </ul>\n );\n}\n"
124
+ },
125
+ {
126
+ "path": "action-bar/index.ts",
127
+ "content": "/** @krizaka/ui/action-bar — `ActionBar`: link actions as buttons with their words, or icon buttons with a tooltip. Server-safe. */\nexport { type Action, ActionBar, type ActionBarProps } from \"./action-bar\";\n"
128
+ },
129
+ {
130
+ "path": "action-bar/meta.ts",
131
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Action bar\",\n summary:\n \"A row of link actions — discuss, propose, report, read the docs, see the code: buttons with their words at the end of a page, or icon buttons whose words are a tooltip at the foot of a card.\",\n status: \"beta\",\n category: \"blocks\",\n platforms: \"web\",\n whenToUse: [\n \"The ways to answer at the end of a page or in a `CtaPanel`.\",\n \"Secondary actions at the foot of a card, where room is short (`variant=\\\"icons\\\"`).\",\n ],\n whenNotToUse: [\n { when: \"For actions that run in the app (save, delete): those are buttons, not links.\", use: \"button\" },\n { when: \"For a menu of many choices.\", use: \"dropdown-menu\" },\n ],\n bestPractices: [\n \"Order by importance; `primaryFirst` when one action is what the block is about.\",\n \"Two or three actions; more belong in a menu or a page.\",\n \"Icons from the signature set, the same icon for the same action everywhere.\",\n ],\n accessibility: {\n keyboard: [{ keys: \"Tab\", action: \"Moves between the actions; an icon action shows its words while focused.\" }],\n notes: [\n \"A list named by `label`; each action is a link with its words as its accessible name.\",\n \"An absolute address opens in a new tab and wears the external mark.\",\n \"The tooltip of an icon action is CSS only (no portal, no script): it repeats the accessible name.\",\n ],\n },\n related: [\"cta-panel\", \"button\", \"argument-card\"],\n web: {\n imports: [\"ActionBar\"],\n examples: [\n { name: \"buttons\", title: \"Buttons\", description: \"Read, see the code, discuss — the first one primary.\" },\n { name: \"icons\", title: \"Icon actions\", description: \"Discuss, propose, report: icon buttons with their words in a tooltip.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
132
+ },
133
+ {
134
+ "path": "block-link.tsx",
135
+ "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"
136
+ },
137
+ {
138
+ "path": "glyphs.tsx",
139
+ "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"
140
+ },
141
+ {
142
+ "path": "meta.ts",
143
+ "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 | \"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"
144
+ }
145
+ ],
146
+ "dependencies": [],
147
+ "registryDependencies": [
148
+ "button",
149
+ "cn"
150
+ ],
151
+ "demo": {
152
+ "path": "examples/action-bar/buttons.tsx",
153
+ "content": "import { ActionBar } from \"@krizaka/ui/action-bar\";\n\n// `buttons`: the actions of the end of a page, with their words. The first one is the page's action (`primaryFirst`);\n// an absolute address opens in a new tab and wears the external mark.\nexport default function ActionBarButtons() {\n return (\n <ActionBar\n label=\"What next\"\n primaryFirst\n actions={[\n { href: \"#docs\", label: \"Read the documentation\" },\n { href: \"https://github.com/krizaka/krizaka-java\", label: \"See the code\" },\n { href: \"https://github.com/krizaka/krizaka-java/discussions\", label: \"Discuss\" },\n ]}\n />\n );\n}\n"
154
+ },
155
+ "props": [
156
+ {
157
+ "component": "ActionBar",
158
+ "description": "A row of link actions: buttons with their words, or icon buttons with a tooltip.",
159
+ "props": [
160
+ {
161
+ "name": "actions",
162
+ "type": "readonly Action[]",
163
+ "default": null,
164
+ "description": "The actions, in order of importance.",
165
+ "required": true
166
+ },
167
+ {
168
+ "name": "label",
169
+ "type": "string",
170
+ "default": null,
171
+ "description": "What the actions are about (`Talk about Krizaka Java`): the list's accessible name.",
172
+ "required": false
173
+ },
174
+ {
175
+ "name": "linkAs",
176
+ "type": "LinkComponent",
177
+ "default": null,
178
+ "description": "The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise.",
179
+ "required": false
180
+ },
181
+ {
182
+ "name": "primaryFirst",
183
+ "type": "boolean",
184
+ "default": "false",
185
+ "description": "The first action as the primary button (the one action a block is about); the others stay secondary.",
186
+ "required": false
187
+ },
188
+ {
189
+ "name": "size",
190
+ "type": "\"sm\" | \"md\" | \"lg\"",
191
+ "default": "md",
192
+ "description": "The buttons' size: `sm` in a card, `md` in a section, `lg` on a hero or a closing call.",
193
+ "required": false
194
+ },
195
+ {
196
+ "name": "variant",
197
+ "type": "\"buttons\" | \"icons\"",
198
+ "default": "buttons",
199
+ "description": "`buttons` (with their words) or `icons` (icon buttons, the words in a tooltip).",
200
+ "required": false
201
+ }
202
+ ]
203
+ }
204
+ ]
205
+ }
@@ -147,7 +147,7 @@
147
147
  },
148
148
  {
149
149
  "path": "meta.ts",
150
- "content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"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"
150
+ "content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"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 | \"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"
151
151
  }
152
152
  ],
153
153
  "dependencies": [