@krizaka/ui 3.55.0 → 3.59.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 (576) hide show
  1. package/dist/{RotatingWord-D9s7FXFD.d.ts → RotatingWord-COSabR2c.d.ts} +2 -1
  2. package/dist/account-menu.d.ts +2 -1
  3. package/dist/account-settings.d.ts +153 -61
  4. package/dist/account-settings.js +240 -97
  5. package/dist/account-settings.js.map +1 -1
  6. package/dist/achievement.d.ts +2 -1
  7. package/dist/action-bar.d.ts +3 -2
  8. package/dist/activity-feed.d.ts +2 -1
  9. package/dist/agenda.d.ts +2 -1
  10. package/dist/alert.d.ts +2 -1
  11. package/dist/anatomy-plate.d.ts +2 -1
  12. package/dist/app-header/search.d.ts +8 -7
  13. package/dist/app-header.d.ts +2 -1
  14. package/dist/app-shell.d.ts +26 -25
  15. package/dist/argument-card.d.ts +3 -2
  16. package/dist/audio-player.d.ts +2 -1
  17. package/dist/auth-layout.d.ts +11 -10
  18. package/dist/avatar/defaults.d.ts +2 -1
  19. package/dist/avatar.d.ts +2 -1
  20. package/dist/badge.d.ts +2 -1
  21. package/dist/bird-plate.d.ts +4 -2
  22. package/dist/blocks.css +77 -4
  23. package/dist/button.d.ts +2 -1
  24. package/dist/captcha.d.ts +2 -1
  25. package/dist/captcha.js +1 -0
  26. package/dist/captcha.js.map +1 -1
  27. package/dist/card-grid.d.ts +2 -1
  28. package/dist/card.d.ts +2 -1
  29. package/dist/catalogue-page.d.ts +82 -2
  30. package/dist/catalogue-page.js +156 -13
  31. package/dist/catalogue-page.js.map +1 -1
  32. package/dist/changelog-page.d.ts +2 -1
  33. package/dist/chapter.d.ts +2 -1
  34. package/dist/chat.d.ts +14 -13
  35. package/dist/checkbox.d.ts +2 -1
  36. package/dist/chip-link.d.ts +2 -1
  37. package/dist/chip-row.d.ts +8 -7
  38. package/dist/chip.d.ts +55 -1
  39. package/dist/chip.js +10 -1
  40. package/dist/choice-grid.d.ts +3 -2
  41. package/dist/chunk-27AWSJTK.js +46 -0
  42. package/dist/chunk-27AWSJTK.js.map +1 -0
  43. package/dist/{chunk-AEP3K4YD.js → chunk-4GQH27IT.js} +2 -2
  44. package/dist/{chunk-QWKCNSPF.js → chunk-5LANVCK7.js} +125 -73
  45. package/dist/chunk-5LANVCK7.js.map +1 -0
  46. package/dist/{chunk-KDXRYUD3.js → chunk-5QEXOGO2.js} +3 -1
  47. package/dist/{chunk-KDXRYUD3.js.map → chunk-5QEXOGO2.js.map} +1 -1
  48. package/dist/chunk-7J2L4HOD.js +340 -0
  49. package/dist/chunk-7J2L4HOD.js.map +1 -0
  50. package/dist/{chunk-7U5TXA5Q.js → chunk-BQ4EOR2O.js} +74 -2
  51. package/dist/chunk-BQ4EOR2O.js.map +1 -0
  52. package/dist/chunk-F6JTHPHE.js +399 -0
  53. package/dist/chunk-F6JTHPHE.js.map +1 -0
  54. package/dist/chunk-OGWB76BR.js +90 -0
  55. package/dist/chunk-OGWB76BR.js.map +1 -0
  56. package/dist/{chunk-VIPSZXO4.js → chunk-UYGUSYIC.js} +72 -2
  57. package/dist/chunk-UYGUSYIC.js.map +1 -0
  58. package/dist/chunk-WOZP3JLW.js +51 -0
  59. package/dist/chunk-WOZP3JLW.js.map +1 -0
  60. package/dist/chunk-XVXFMVG3.js +27 -0
  61. package/dist/chunk-XVXFMVG3.js.map +1 -0
  62. package/dist/code-block.d.ts +2 -1
  63. package/dist/combobox.d.ts +20 -19
  64. package/dist/combobox.js +3 -2
  65. package/dist/command.d.ts +21 -20
  66. package/dist/comparison-table.d.ts +2 -1
  67. package/dist/component-page.d.ts +2 -1
  68. package/dist/confirm-button.d.ts +2 -1
  69. package/dist/contact-page.d.ts +2 -1
  70. package/dist/continue-prompt.d.ts +2 -1
  71. package/dist/countdown.d.ts +2 -1
  72. package/dist/cover-hero.d.ts +20 -19
  73. package/dist/cover-hero.js +25 -42
  74. package/dist/cover-hero.js.map +1 -1
  75. package/dist/cta-panel.d.ts +2 -1
  76. package/dist/dashboard-layout.d.ts +50 -2
  77. package/dist/dashboard-layout.js +66 -11
  78. package/dist/dashboard-layout.js.map +1 -1
  79. package/dist/data-table.d.ts +45 -2
  80. package/dist/data-table.js +7 -3
  81. package/dist/date-picker.d.ts +29 -28
  82. package/dist/decision-list.d.ts +2 -1
  83. package/dist/description-list.d.ts +2 -1
  84. package/dist/detail-layout.d.ts +153 -20
  85. package/dist/detail-layout.js +73 -4
  86. package/dist/detail-layout.js.map +1 -1
  87. package/dist/{dialog-D42QwYb_.d.ts → dialog-DpUwec2g.d.ts} +2 -1
  88. package/dist/dialog.d.ts +3 -2
  89. package/dist/docs-article-page.d.ts +2 -1
  90. package/dist/docs-hub-page.d.ts +2 -1
  91. package/dist/docs-layout.d.ts +2 -1
  92. package/dist/docs-nav.d.ts +3 -10
  93. package/dist/document-viewer.d.ts +5 -4
  94. package/dist/doodle.d.ts +17 -6
  95. package/dist/doodle.js +40 -9
  96. package/dist/doodle.js.map +1 -1
  97. package/dist/drop-overlay.d.ts +2 -1
  98. package/dist/dropdown-menu.d.ts +2 -1
  99. package/dist/dropdown-menu.js +13 -74
  100. package/dist/dropdown-menu.js.map +1 -1
  101. package/dist/elephant.d.ts +2 -1
  102. package/dist/empty-state.d.ts +2 -1
  103. package/dist/engine-flow.d.ts +2 -1
  104. package/dist/error-page.d.ts +2 -1
  105. package/dist/file-upload.d.ts +14 -13
  106. package/dist/filter-bar.d.ts +84 -11
  107. package/dist/filter-bar.js +6 -2
  108. package/dist/flock.d.ts +3 -2
  109. package/dist/footnote.d.ts +2 -1
  110. package/dist/force-update-screen.d.ts +8 -7
  111. package/dist/form/server.d.ts +2 -1
  112. package/dist/form.d.ts +2 -1
  113. package/dist/gallery-page.d.ts +2 -1
  114. package/dist/genui.d.ts +2 -1
  115. package/dist/genui.js +3 -3
  116. package/dist/{geometry-DX-W-Yyf.d.ts → geometry-DZ4Q3hDQ.d.ts} +2 -1
  117. package/dist/glossary-term.d.ts +2 -1
  118. package/dist/glossary.d.ts +2 -1
  119. package/dist/glow-card.d.ts +2 -1
  120. package/dist/goal-gauge.d.ts +2 -1
  121. package/dist/grade-stamp.d.ts +23 -0
  122. package/dist/grade-stamp.js +42 -0
  123. package/dist/grade-stamp.js.map +1 -0
  124. package/dist/how-it-works-page.d.ts +2 -1
  125. package/dist/image-cropper.d.ts +5 -4
  126. package/dist/index.d.ts +3 -2
  127. package/dist/index.js +4 -4
  128. package/dist/iso.d.ts +2 -1
  129. package/dist/kanban.d.ts +2 -1
  130. package/dist/kbd.d.ts +2 -1
  131. package/dist/kind-config-editor.d.ts +152 -0
  132. package/dist/kind-config-editor.js +574 -0
  133. package/dist/kind-config-editor.js.map +1 -0
  134. package/dist/kpi-explained.d.ts +2 -1
  135. package/dist/landing-page.d.ts +2 -1
  136. package/dist/landscape.d.ts +2 -1
  137. package/dist/language-switch/server.d.ts +2 -1
  138. package/dist/language-switch.d.ts +11 -10
  139. package/dist/legal-page.d.ts +2 -1
  140. package/dist/link-card.d.ts +2 -1
  141. package/dist/list.d.ts +2 -1
  142. package/dist/loader.d.ts +2 -1
  143. package/dist/longform-page.d.ts +2 -1
  144. package/dist/maintenance-screen.d.ts +5 -4
  145. package/dist/map.d.ts +8 -7
  146. package/dist/map.js +24 -0
  147. package/dist/map.js.map +1 -1
  148. package/dist/markdown.d.ts +2 -1
  149. package/dist/marketing-layout.d.ts +5 -4
  150. package/dist/marquee.d.ts +2 -1
  151. package/dist/mascot-quote.d.ts +2 -1
  152. package/dist/mascot-state.d.ts +3 -2
  153. package/dist/mascots.d.ts +4 -3
  154. package/dist/match-dialog.d.ts +2 -1
  155. package/dist/media-capture.d.ts +5 -4
  156. package/dist/media-gallery.d.ts +2 -1
  157. package/dist/media-grid.d.ts +3 -10
  158. package/dist/meta-row.d.ts +2 -1
  159. package/dist/meter.d.ts +2 -1
  160. package/dist/motion.d.ts +3 -2
  161. package/dist/native/form.d.ts +2 -1
  162. package/dist/native/list.d.ts +2 -1
  163. package/dist/native/map.d.ts +2 -1
  164. package/dist/native/map.js +24 -0
  165. package/dist/native/map.js.map +1 -1
  166. package/dist/native/markdown.d.ts +2 -1
  167. package/dist/native/media-capture.d.ts +2 -1
  168. package/dist/native/media-picker.d.ts +2 -1
  169. package/dist/native/vertical-video.d.ts +2 -1
  170. package/dist/native/video-player.d.ts +2 -1
  171. package/dist/native.d.ts +230 -1
  172. package/dist/native.js +1465 -965
  173. package/dist/native.js.map +1 -1
  174. package/dist/nav-bar/me.d.ts +2 -1
  175. package/dist/nav-bar.d.ts +2 -1
  176. package/dist/next-actions.d.ts +2 -1
  177. package/dist/notification-preferences.d.ts +23 -22
  178. package/dist/notification-preferences.js +4 -3
  179. package/dist/notification-preferences.js.map +1 -1
  180. package/dist/number-ticker.d.ts +2 -1
  181. package/dist/opening-hours.d.ts +2 -1
  182. package/dist/page-header.d.ts +2 -1
  183. package/dist/page-hero.d.ts +2 -1
  184. package/dist/page-index.d.ts +2 -1
  185. package/dist/page.d.ts +2 -1
  186. package/dist/pagination.d.ts +2 -1
  187. package/dist/photo-grid.d.ts +2 -1
  188. package/dist/pointer-light.d.ts +2 -1
  189. package/dist/popover.d.ts +2 -1
  190. package/dist/pricing-page.d.ts +2 -1
  191. package/dist/product-page.d.ts +2 -1
  192. package/dist/profile-card.d.ts +2 -1
  193. package/dist/progress.d.ts +2 -1
  194. package/dist/promise-card.d.ts +2 -1
  195. package/dist/quota-meter.d.ts +2 -1
  196. package/dist/radio-group.d.ts +2 -1
  197. package/dist/radio-group.js +3 -3
  198. package/dist/rail-nav.d.ts +17 -16
  199. package/dist/rail-nav.js +22 -56
  200. package/dist/rail-nav.js.map +1 -1
  201. package/dist/recipes.d.ts +2 -1
  202. package/dist/retro-tv.d.ts +2 -1
  203. package/dist/router.d.ts +2 -1
  204. package/dist/scroll-stage.d.ts +2 -1
  205. package/dist/search-field.d.ts +2 -1
  206. package/dist/section-backdrop.d.ts +2 -1
  207. package/dist/separator.d.ts +2 -1
  208. package/dist/service-card.d.ts +9 -8
  209. package/dist/settings-layout.d.ts +2 -1
  210. package/dist/settings-layout.js +10 -324
  211. package/dist/settings-layout.js.map +1 -1
  212. package/dist/showcase.d.ts +2 -1
  213. package/dist/signature.d.ts +2 -1
  214. package/dist/site-cahier.d.ts +187 -0
  215. package/dist/site-cahier.js +844 -0
  216. package/dist/site-cahier.js.map +1 -0
  217. package/dist/site-footer.d.ts +2 -1
  218. package/dist/sites.d.ts +2 -1
  219. package/dist/skeleton.d.ts +2 -1
  220. package/dist/skip-link.d.ts +2 -1
  221. package/dist/slider.d.ts +2 -1
  222. package/dist/slot-picker.d.ts +86 -13
  223. package/dist/slot-picker.js +98 -16
  224. package/dist/slot-picker.js.map +1 -1
  225. package/dist/specimen-tag.d.ts +2 -1
  226. package/dist/speed-lines.d.ts +19 -0
  227. package/dist/speed-lines.js +45 -0
  228. package/dist/speed-lines.js.map +1 -0
  229. package/dist/spinner.d.ts +2 -1
  230. package/dist/split-view.d.ts +2 -1
  231. package/dist/stage-banner.d.ts +2 -1
  232. package/dist/stat.d.ts +2 -1
  233. package/dist/status-chip.d.ts +44 -0
  234. package/dist/status-chip.js +137 -0
  235. package/dist/status-chip.js.map +1 -0
  236. package/dist/status-page.d.ts +2 -1
  237. package/dist/step-progress.d.ts +2 -1
  238. package/dist/step-showcase.d.ts +2 -1
  239. package/dist/stepper.d.ts +2 -1
  240. package/dist/sticky-action.d.ts +28 -5
  241. package/dist/sticky-action.js +10 -4
  242. package/dist/sticky-action.js.map +1 -1
  243. package/dist/stuck.d.ts +2 -1
  244. package/dist/swipe-deck.d.ts +2 -1
  245. package/dist/switch.d.ts +2 -1
  246. package/dist/tabs.d.ts +2 -1
  247. package/dist/tag-input.d.ts +2 -1
  248. package/dist/tag-input.js +3 -2
  249. package/dist/tag-input.js.map +1 -1
  250. package/dist/tag-selector.d.ts +30 -4
  251. package/dist/tag-selector.js +90 -8
  252. package/dist/tag-selector.js.map +1 -1
  253. package/dist/taped-photo.d.ts +2 -1
  254. package/dist/taped-photo.js +3 -20
  255. package/dist/taped-photo.js.map +1 -1
  256. package/dist/terminal-replay.d.ts +2 -1
  257. package/dist/terminal-replay.js +1 -1
  258. package/dist/text-style/server.d.ts +2 -1
  259. package/dist/text-style.d.ts +2 -1
  260. package/dist/theme.d.ts +21 -1
  261. package/dist/theme.js +37 -1
  262. package/dist/theme.js.map +1 -1
  263. package/dist/toast.d.ts +2 -1
  264. package/dist/toc.d.ts +2 -1
  265. package/dist/tooltip.d.ts +2 -1
  266. package/dist/tree-view.d.ts +2 -1
  267. package/dist/update-prompt.d.ts +11 -10
  268. package/dist/upload-queue.d.ts +2 -1
  269. package/dist/verified-badge.d.ts +2 -1
  270. package/dist/versus-card.d.ts +40 -0
  271. package/dist/versus-card.js +40 -0
  272. package/dist/versus-card.js.map +1 -0
  273. package/dist/vertical-video.d.ts +2 -1
  274. package/dist/video-player.d.ts +20 -19
  275. package/dist/video-trimmer.d.ts +2 -1
  276. package/dist/virtual.d.ts +8 -7
  277. package/dist/waveform.d.ts +2 -1
  278. package/package.json +124 -39
  279. package/registry/account-menu.json +1 -1
  280. package/registry/account-settings.json +257 -5
  281. package/registry/achievement.json +1 -1
  282. package/registry/action-bar.json +1 -1
  283. package/registry/activity-feed.json +1 -1
  284. package/registry/agenda.json +1 -1
  285. package/registry/alert.json +1 -1
  286. package/registry/anatomy-plate.json +1 -1
  287. package/registry/app-header.json +1 -1
  288. package/registry/app-shell.json +1 -1
  289. package/registry/argument-card.json +1 -1
  290. package/registry/audio-player.json +1 -1
  291. package/registry/auth-layout.json +1 -1
  292. package/registry/avatar.json +1 -1
  293. package/registry/badge.json +1 -1
  294. package/registry/bird-plate.json +1 -1
  295. package/registry/button.json +1 -1
  296. package/registry/captcha.json +1 -1
  297. package/registry/card-grid.json +1 -1
  298. package/registry/card.json +1 -1
  299. package/registry/catalogue-page.json +116 -6
  300. package/registry/changelog-page.json +1 -1
  301. package/registry/chapter.json +1 -1
  302. package/registry/chat.json +1 -1
  303. package/registry/checkbox.json +1 -1
  304. package/registry/chip-link.json +1 -1
  305. package/registry/chip-row.json +1 -1
  306. package/registry/chip.json +386 -11
  307. package/registry/choice-grid.json +1 -1
  308. package/registry/code-block.json +1 -1
  309. package/registry/combobox.json +1 -1
  310. package/registry/command.json +1 -1
  311. package/registry/comparison-table.json +1 -1
  312. package/registry/component-page.json +1 -1
  313. package/registry/confirm-button.json +1 -1
  314. package/registry/contact-page.json +1 -1
  315. package/registry/continue-prompt.json +1 -1
  316. package/registry/countdown.json +1 -1
  317. package/registry/cover-hero.json +1 -1
  318. package/registry/cta-panel.json +1 -1
  319. package/registry/dashboard-layout.json +91 -5
  320. package/registry/data-table.json +156 -5
  321. package/registry/date-picker.json +1 -1
  322. package/registry/decision-list.json +1 -1
  323. package/registry/description-list.json +1 -1
  324. package/registry/detail-layout.json +199 -5
  325. package/registry/dialog.json +1 -1
  326. package/registry/docs-article-page.json +1 -1
  327. package/registry/docs-hub-page.json +1 -1
  328. package/registry/docs-layout.json +1 -1
  329. package/registry/docs-nav.json +1 -1
  330. package/registry/document-viewer.json +1 -1
  331. package/registry/doodle.json +115 -22
  332. package/registry/drop-overlay.json +1 -1
  333. package/registry/dropdown-menu.json +1 -1
  334. package/registry/elephant.json +2 -2
  335. package/registry/empty-state.json +1 -1
  336. package/registry/engine-flow.json +1 -1
  337. package/registry/error-page.json +1 -1
  338. package/registry/examples/account-settings/appearance.d.ts +4 -0
  339. package/registry/examples/account-settings/appearance.js +40 -0
  340. package/registry/examples/account-settings/appearance.tsx +30 -0
  341. package/registry/examples/catalogue-page/clients.d.ts +4 -0
  342. package/registry/examples/catalogue-page/clients.js +49 -0
  343. package/registry/examples/catalogue-page/clients.tsx +61 -0
  344. package/registry/examples/chip/marker-picker.d.ts +4 -0
  345. package/registry/examples/chip/marker-picker.js +17 -0
  346. package/registry/examples/chip/marker-picker.tsx +17 -0
  347. package/registry/examples/chip/native/marker-picker.d.ts +4 -0
  348. package/registry/examples/chip/native/marker-picker.dark.png +0 -0
  349. package/registry/examples/chip/native/marker-picker.js +18 -0
  350. package/registry/examples/chip/native/marker-picker.light.png +0 -0
  351. package/registry/examples/chip/native/marker-picker.tsx +16 -0
  352. package/registry/examples/chip/native/tags.d.ts +4 -0
  353. package/registry/examples/chip/native/tags.dark.png +0 -0
  354. package/registry/examples/chip/native/tags.js +22 -0
  355. package/registry/examples/chip/native/tags.light.png +0 -0
  356. package/registry/examples/chip/native/tags.tsx +20 -0
  357. package/registry/examples/chip/tags.d.ts +4 -0
  358. package/registry/examples/chip/tags.js +26 -0
  359. package/registry/examples/chip/tags.tsx +23 -0
  360. package/registry/examples/dashboard-layout/today.d.ts +4 -0
  361. package/registry/examples/dashboard-layout/today.js +54 -0
  362. package/registry/examples/dashboard-layout/today.tsx +63 -0
  363. package/registry/examples/data-table/bulk.d.ts +4 -0
  364. package/registry/examples/data-table/bulk.js +45 -0
  365. package/registry/examples/data-table/bulk.tsx +34 -0
  366. package/registry/examples/detail-layout/client.d.ts +4 -0
  367. package/registry/examples/detail-layout/client.js +40 -0
  368. package/registry/examples/detail-layout/client.tsx +39 -0
  369. package/registry/examples/detail-layout/new-invoice.d.ts +4 -0
  370. package/registry/examples/detail-layout/new-invoice.js +44 -0
  371. package/registry/examples/detail-layout/new-invoice.tsx +34 -0
  372. package/registry/examples/doodle/bird-sketch.d.ts +4 -0
  373. package/registry/examples/doodle/bird-sketch.js +11 -0
  374. package/registry/examples/doodle/bird-sketch.tsx +12 -0
  375. package/registry/examples/doodle/margin-marks.d.ts +4 -0
  376. package/registry/examples/doodle/margin-marks.js +27 -0
  377. package/registry/examples/doodle/margin-marks.tsx +19 -0
  378. package/registry/examples/filter-bar/views.d.ts +4 -0
  379. package/registry/examples/filter-bar/views.js +39 -0
  380. package/registry/examples/filter-bar/views.tsx +30 -0
  381. package/registry/examples/grade-stamp/coverage.d.ts +4 -0
  382. package/registry/examples/grade-stamp/coverage.js +12 -0
  383. package/registry/examples/grade-stamp/coverage.tsx +8 -0
  384. package/registry/examples/grade-stamp/lighthouse.d.ts +4 -0
  385. package/registry/examples/grade-stamp/lighthouse.js +12 -0
  386. package/registry/examples/grade-stamp/lighthouse.tsx +14 -0
  387. package/registry/examples/kind-config-editor/derived.d.ts +4 -0
  388. package/registry/examples/kind-config-editor/derived.js +26 -0
  389. package/registry/examples/kind-config-editor/derived.tsx +16 -0
  390. package/registry/examples/kind-config-editor/native/status-set.d.ts +4 -0
  391. package/registry/examples/kind-config-editor/native/status-set.dark.png +0 -0
  392. package/registry/examples/kind-config-editor/native/status-set.js +22 -0
  393. package/registry/examples/kind-config-editor/native/status-set.light.png +0 -0
  394. package/registry/examples/kind-config-editor/native/status-set.tsx +19 -0
  395. package/registry/examples/kind-config-editor/native/tag-set.d.ts +4 -0
  396. package/registry/examples/kind-config-editor/native/tag-set.dark.png +0 -0
  397. package/registry/examples/kind-config-editor/native/tag-set.js +20 -0
  398. package/registry/examples/kind-config-editor/native/tag-set.light.png +0 -0
  399. package/registry/examples/kind-config-editor/native/tag-set.tsx +18 -0
  400. package/registry/examples/kind-config-editor/status-set.d.ts +4 -0
  401. package/registry/examples/kind-config-editor/status-set.js +29 -0
  402. package/registry/examples/kind-config-editor/status-set.tsx +25 -0
  403. package/registry/examples/kind-config-editor/tag-set.d.ts +4 -0
  404. package/registry/examples/kind-config-editor/tag-set.js +20 -0
  405. package/registry/examples/kind-config-editor/tag-set.tsx +18 -0
  406. package/registry/examples/site-cahier/java-releases.d.ts +4 -0
  407. package/registry/examples/site-cahier/java-releases.js +33 -0
  408. package/registry/examples/site-cahier/java-releases.tsx +32 -0
  409. package/registry/examples/site-cahier/motion-lab.d.ts +4 -0
  410. package/registry/examples/site-cahier/motion-lab.js +32 -0
  411. package/registry/examples/site-cahier/motion-lab.tsx +29 -0
  412. package/registry/examples/site-cahier/ts-changelog.d.ts +4 -0
  413. package/registry/examples/site-cahier/ts-changelog.js +24 -0
  414. package/registry/examples/site-cahier/ts-changelog.tsx +20 -0
  415. package/registry/examples/site-cahier/ts-doc.d.ts +4 -0
  416. package/registry/examples/site-cahier/ts-doc.js +38 -0
  417. package/registry/examples/site-cahier/ts-doc.tsx +27 -0
  418. package/registry/examples/site-cahier/ui-home.d.ts +4 -0
  419. package/registry/examples/site-cahier/ui-home.js +46 -0
  420. package/registry/examples/site-cahier/ui-home.tsx +40 -0
  421. package/registry/examples/slot-picker/weeks.d.ts +4 -0
  422. package/registry/examples/slot-picker/weeks.js +45 -0
  423. package/registry/examples/slot-picker/weeks.tsx +28 -0
  424. package/registry/examples/speed-lines/hero.d.ts +4 -0
  425. package/registry/examples/speed-lines/hero.js +11 -0
  426. package/registry/examples/speed-lines/hero.tsx +12 -0
  427. package/registry/examples/speed-lines/streaks.d.ts +4 -0
  428. package/registry/examples/speed-lines/streaks.js +11 -0
  429. package/registry/examples/speed-lines/streaks.tsx +12 -0
  430. package/registry/examples/status-chip/default.d.ts +4 -0
  431. package/registry/examples/status-chip/default.js +35 -0
  432. package/registry/examples/status-chip/default.tsx +32 -0
  433. package/registry/examples/status-chip/native/default.d.ts +4 -0
  434. package/registry/examples/status-chip/native/default.dark.png +0 -0
  435. package/registry/examples/status-chip/native/default.js +26 -0
  436. package/registry/examples/status-chip/native/default.light.png +0 -0
  437. package/registry/examples/status-chip/native/default.tsx +20 -0
  438. package/registry/examples/tag-selector/creatable.d.ts +4 -0
  439. package/registry/examples/tag-selector/creatable.js +41 -0
  440. package/registry/examples/tag-selector/creatable.tsx +29 -0
  441. package/registry/examples/tag-selector/native/tags.d.ts +4 -0
  442. package/registry/examples/tag-selector/native/tags.dark.png +0 -0
  443. package/registry/examples/tag-selector/native/tags.js +19 -0
  444. package/registry/examples/tag-selector/native/tags.light.png +0 -0
  445. package/registry/examples/tag-selector/native/tags.tsx +19 -0
  446. package/registry/examples/versus-card/alternatives.d.ts +4 -0
  447. package/registry/examples/versus-card/alternatives.js +20 -0
  448. package/registry/examples/versus-card/alternatives.tsx +14 -0
  449. package/registry/examples/versus-card/releases.d.ts +4 -0
  450. package/registry/examples/versus-card/releases.js +35 -0
  451. package/registry/examples/versus-card/releases.tsx +29 -0
  452. package/registry/field.json +1 -1
  453. package/registry/file-upload.json +1 -1
  454. package/registry/filter-bar.json +208 -8
  455. package/registry/flock.json +1 -1
  456. package/registry/footnote.json +1 -1
  457. package/registry/force-update-screen.json +1 -1
  458. package/registry/form.json +1 -1
  459. package/registry/gallery-page.json +1 -1
  460. package/registry/genui.json +1 -1
  461. package/registry/glossary-term.json +1 -1
  462. package/registry/glossary.json +1 -1
  463. package/registry/glow-card.json +1 -1
  464. package/registry/goal-gauge.json +1 -1
  465. package/registry/grade-stamp.json +227 -0
  466. package/registry/how-it-works-page.json +1 -1
  467. package/registry/image-cropper.json +1 -1
  468. package/registry/index.json +323 -30
  469. package/registry/iso.json +1 -1
  470. package/registry/kanban.json +1 -1
  471. package/registry/kbd.json +1 -1
  472. package/registry/kind-config-editor.json +565 -0
  473. package/registry/kpi-explained.json +1 -1
  474. package/registry/landing-page.json +1 -1
  475. package/registry/landscape.json +1 -1
  476. package/registry/language-switch.json +1 -1
  477. package/registry/legal-page.json +1 -1
  478. package/registry/link-card.json +1 -1
  479. package/registry/list.json +1 -1
  480. package/registry/loader.json +1 -1
  481. package/registry/longform-page.json +1 -1
  482. package/registry/maintenance-screen.json +1 -1
  483. package/registry/map.json +2 -2
  484. package/registry/markdown.json +1 -1
  485. package/registry/marketing-layout.json +1 -1
  486. package/registry/marquee.json +1 -1
  487. package/registry/mascot-quote.json +1 -1
  488. package/registry/mascot-state.json +1 -1
  489. package/registry/mascots.json +1 -1
  490. package/registry/match-dialog.json +1 -1
  491. package/registry/media-capture.json +1 -1
  492. package/registry/media-gallery.json +1 -1
  493. package/registry/media-grid.json +1 -1
  494. package/registry/meta-row.json +1 -1
  495. package/registry/meter.json +1 -1
  496. package/registry/nav-bar.json +2 -2
  497. package/registry/next-actions.json +1 -1
  498. package/registry/notification-preferences.json +1 -1
  499. package/registry/number-ticker.json +1 -1
  500. package/registry/opening-hours.json +1 -1
  501. package/registry/page-header.json +1 -1
  502. package/registry/page-hero.json +1 -1
  503. package/registry/page-index.json +1 -1
  504. package/registry/page.json +1 -1
  505. package/registry/pagination.json +1 -1
  506. package/registry/photo-grid.json +1 -1
  507. package/registry/pointer-light.json +1 -1
  508. package/registry/popover.json +1 -1
  509. package/registry/pricing-page.json +1 -1
  510. package/registry/product-page.json +1 -1
  511. package/registry/profile-card.json +1 -1
  512. package/registry/progress.json +1 -1
  513. package/registry/promise-card.json +1 -1
  514. package/registry/quota-meter.json +1 -1
  515. package/registry/radio-group.json +1 -1
  516. package/registry/rail-nav.json +2 -2
  517. package/registry/recipes.json +1 -1
  518. package/registry/retro-tv.json +1 -1
  519. package/registry/router.json +1 -1
  520. package/registry/scroll-stage.json +1 -1
  521. package/registry/search-field.json +1 -1
  522. package/registry/section-backdrop.json +1 -1
  523. package/registry/separator.json +1 -1
  524. package/registry/service-card.json +1 -1
  525. package/registry/settings-layout.json +1 -1
  526. package/registry/showcase.json +1 -1
  527. package/registry/signature.json +1 -1
  528. package/registry/site-cahier.json +548 -0
  529. package/registry/site-footer.json +2 -2
  530. package/registry/sites.json +1 -1
  531. package/registry/skeleton.json +1 -1
  532. package/registry/skip-link.json +1 -1
  533. package/registry/slider.json +1 -1
  534. package/registry/slot-picker.json +156 -10
  535. package/registry/slot.json +1 -1
  536. package/registry/specimen-tag.json +1 -1
  537. package/registry/speed-lines.json +174 -0
  538. package/registry/spinner.json +1 -1
  539. package/registry/split-view.json +1 -1
  540. package/registry/stage-banner.json +1 -1
  541. package/registry/stat.json +1 -1
  542. package/registry/status-chip.json +350 -0
  543. package/registry/status-page.json +1 -1
  544. package/registry/step-progress.json +1 -1
  545. package/registry/step-showcase.json +1 -1
  546. package/registry/stepper.json +1 -1
  547. package/registry/sticky-action.json +38 -8
  548. package/registry/stuck.json +1 -1
  549. package/registry/swipe-deck.json +1 -1
  550. package/registry/switch.json +1 -1
  551. package/registry/tabs.json +1 -1
  552. package/registry/tag-input.json +1 -1
  553. package/registry/tag-selector.json +189 -12
  554. package/registry/taped-photo.json +1 -1
  555. package/registry/terminal-replay.json +1 -1
  556. package/registry/text-style.json +1 -1
  557. package/registry/theme.json +3 -3
  558. package/registry/toast.json +1 -1
  559. package/registry/toc.json +1 -1
  560. package/registry/tooltip.json +1 -1
  561. package/registry/tree-view.json +1 -1
  562. package/registry/update-prompt.json +1 -1
  563. package/registry/upload-queue.json +1 -1
  564. package/registry/verified-badge.json +1 -1
  565. package/registry/versus-card.json +194 -0
  566. package/registry/vertical-video.json +1 -1
  567. package/registry/video-player.json +1 -1
  568. package/registry/video-trimmer.json +1 -1
  569. package/registry/virtual.json +2 -2
  570. package/registry/waveform.json +1 -1
  571. package/dist/chunk-7U5TXA5Q.js.map +0 -1
  572. package/dist/chunk-OIMXKRXF.js +0 -179
  573. package/dist/chunk-OIMXKRXF.js.map +0 -1
  574. package/dist/chunk-QWKCNSPF.js.map +0 -1
  575. package/dist/chunk-VIPSZXO4.js.map +0 -1
  576. /package/dist/{chunk-AEP3K4YD.js.map → chunk-4GQH27IT.js.map} +0 -0
@@ -0,0 +1,565 @@
1
+ {
2
+ "name": "kind-config-editor",
3
+ "type": "primitive",
4
+ "title": "Kind config editor",
5
+ "summary": "The admin's editors of a kind's vocabulary (`@krizaka/organize` `KindConfig`, krizaka-ts#89): `TagSetEditor` — the tags offered, who manages them, whether people add their own, the most — and `StatusSetEditor` — the states in their order, the initial state, the moves from × to with their roles, confirmation and reasons. Value in, `onChange` out; the product posts the save.",
6
+ "description": "The admin's editors of a kind's vocabulary (`@krizaka/organize` `KindConfig`, krizaka-ts#89): `TagSetEditor` — the tags offered, who manages them, whether people add their own, the most — and `StatusSetEditor` — the states in their order, the initial state, the moves from × to with their roles, confirmation and reasons. Value in, `onChange` out; the product posts the save.",
7
+ "status": "beta",
8
+ "deprecated": null,
9
+ "category": "forms",
10
+ "platforms": "both",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "yes"
17
+ },
18
+ "desktop": {
19
+ "state": "yes"
20
+ }
21
+ },
22
+ "whenToUse": [
23
+ "A product's settings where the admin sets the tags and the statuses of a kind (clients, invoices, applicant files): « the admin configures everything ».",
24
+ "To show the problems the server's own rules found (`kindConfigProblems`) in the place where they are fixed."
25
+ ],
26
+ "whenNotToUse": [
27
+ {
28
+ "when": "For a person's own tags on a file.",
29
+ "use": "tag-selector"
30
+ },
31
+ {
32
+ "when": "To change the state of one entity.",
33
+ "use": "status-chip"
34
+ },
35
+ {
36
+ "when": "For any other setting.",
37
+ "use": "settings-layout"
38
+ }
39
+ ],
40
+ "bestPractices": [
41
+ "Keep the descriptor in state, pass it as `value` and post it yourself with the `version` you read: a `CONFLICT` (409) says someone else changed it, a `STATE_IN_USE` (409) names the states entities still hold.",
42
+ "Pass `problems={kindConfigProblems(config)}`: the same rules as the server, shown above the list.",
43
+ "A colour is a name of the closed palette (`blue · green · amber · red · violet · gray`), never a colour picker; a status never takes a tag's colour.",
44
+ "A reason is a list the admin writes in both languages, off by default; there is never a free-text reason.",
45
+ "The order of the states is the order of the status column: reorder with the handle, the buttons, or Alt + ↑ ↓ in a field."
46
+ ],
47
+ "accessibility": {
48
+ "keyboard": [
49
+ {
50
+ "keys": "Tab",
51
+ "action": "Reaches each field, switch and button in reading order."
52
+ },
53
+ {
54
+ "keys": "Alt + ↑ / Alt + ↓",
55
+ "action": "In a name or a label, moves the row up or down; the focus follows the field."
56
+ },
57
+ {
58
+ "keys": "Arrow keys",
59
+ "action": "In a colour group, move between the six swatches."
60
+ },
61
+ {
62
+ "keys": "Enter",
63
+ "action": "In the field that adds a tag, adds it."
64
+ }
65
+ ],
66
+ "notes": [
67
+ "Every control has its own accessible name: a field says its position and its language (« Label in French of state 2 »), a move says its two states and its roles.",
68
+ "Dragging is an extra: the move-up and move-down buttons do the same, and the handle is not drawn on a phone.",
69
+ "A final state's row of moves says « Final: no way out » instead of offering buttons; the initial state's « final » switch is off and says why.",
70
+ "Problems are an alert above the list; a field with an empty label or a duplicate name is `aria-invalid` and says so."
71
+ ]
72
+ },
73
+ "related": [
74
+ "tag-selector",
75
+ "status-chip",
76
+ "chip",
77
+ "settings-layout",
78
+ "switch"
79
+ ],
80
+ "web": {
81
+ "entry": "@krizaka/ui/kind-config-editor",
82
+ "import": "import { TagSetEditor, StatusSetEditor } from \"@krizaka/ui/kind-config-editor\";",
83
+ "props": [
84
+ {
85
+ "component": "StatusSetEditor",
86
+ "description": "The admin's status set: the states in their order (FR and EN, tone, final), the initial state, and the moves from × to.",
87
+ "props": [
88
+ {
89
+ "name": "onChange",
90
+ "type": "(value: StatusSet) => void",
91
+ "default": null,
92
+ "description": "Called with the whole set after every change.",
93
+ "required": true
94
+ },
95
+ {
96
+ "name": "roles",
97
+ "type": "readonly EditorRole[]",
98
+ "default": null,
99
+ "description": "The roles of the product that can make a move.",
100
+ "required": true
101
+ },
102
+ {
103
+ "name": "value",
104
+ "type": "StatusSet",
105
+ "default": null,
106
+ "description": "The kind's status set (`KindConfig.status`).",
107
+ "required": true
108
+ },
109
+ {
110
+ "name": "className",
111
+ "type": "string",
112
+ "default": null,
113
+ "description": "Classes merged on the root.",
114
+ "required": false
115
+ },
116
+ {
117
+ "name": "disabled",
118
+ "type": "boolean",
119
+ "default": null,
120
+ "description": "Not available.",
121
+ "required": false
122
+ },
123
+ {
124
+ "name": "labels",
125
+ "type": "Partial<StatusSetEditorLabels>",
126
+ "default": null,
127
+ "description": "The words, passed translated (English by default).",
128
+ "required": false
129
+ },
130
+ {
131
+ "name": "locale",
132
+ "type": "keyof Label",
133
+ "default": "en",
134
+ "description": "The language the states are named in elsewhere in the editor (the moves' names).",
135
+ "required": false
136
+ },
137
+ {
138
+ "name": "problems",
139
+ "type": "readonly string[]",
140
+ "default": null,
141
+ "description": "What `kindConfigProblems` found (the server's own rules), shown above the list.",
142
+ "required": false
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ "component": "TagSetEditor",
148
+ "description": "The admin's tag set: the presets of a variant (name, colour, order), who writes, whether people add their own, the most.",
149
+ "props": [
150
+ {
151
+ "name": "onChange",
152
+ "type": "(value: TagSetValue) => void",
153
+ "default": null,
154
+ "description": "Called with the whole set after every change.",
155
+ "required": true
156
+ },
157
+ {
158
+ "name": "roles",
159
+ "type": "readonly EditorRole[]",
160
+ "default": null,
161
+ "description": "The roles of the product that can write tags.",
162
+ "required": true
163
+ },
164
+ {
165
+ "name": "value",
166
+ "type": "TagSetValue",
167
+ "default": null,
168
+ "description": "The `tags` of the kind's configuration (`KindConfig.tags`).",
169
+ "required": true
170
+ },
171
+ {
172
+ "name": "variant",
173
+ "type": "string",
174
+ "default": null,
175
+ "description": "The variant whose presets are edited (a trade, or `default`).",
176
+ "required": true
177
+ },
178
+ {
179
+ "name": "className",
180
+ "type": "string",
181
+ "default": null,
182
+ "description": "Classes merged on the root.",
183
+ "required": false
184
+ },
185
+ {
186
+ "name": "disabled",
187
+ "type": "boolean",
188
+ "default": null,
189
+ "description": "Not available.",
190
+ "required": false
191
+ },
192
+ {
193
+ "name": "labels",
194
+ "type": "Partial<TagSetEditorLabels>",
195
+ "default": null,
196
+ "description": "The words, passed translated (English by default).",
197
+ "required": false
198
+ },
199
+ {
200
+ "name": "problems",
201
+ "type": "readonly string[]",
202
+ "default": null,
203
+ "description": "What `kindConfigProblems` found (the server's own rules), shown above the list.",
204
+ "required": false
205
+ }
206
+ ]
207
+ }
208
+ ],
209
+ "examples": [
210
+ {
211
+ "name": "tag-set",
212
+ "title": "Tag set",
213
+ "description": "The presets of a hair studio's clients (name, colour, order), who manages tags, « people can add their own », the most; the server's problems in place.",
214
+ "path": "examples/kind-config-editor/tag-set.tsx",
215
+ "module": "@krizaka/ui/registry/examples/kind-config-editor/tag-set",
216
+ "code": "\"use client\";\n\nimport { TagSetEditor, type TagSetValue } from \"@krizaka/ui/kind-config-editor\";\nimport * as React from \"react\";\n\nconst ROLES = [{ key: \"owner\", label: \"Owner\" }, { key: \"manager\", label: \"Manager\" }, { key: \"staff\", label: \"Staff\" }];\n\n// The client tags of a fictitious hair studio, per trade: the presets, who writes, whether people add their own. The editor hands\n// the value back; the product posts it. The problems are shown in place.\nexport default function TagSetEditorExample() {\n const [tags, setTags] = React.useState<TagSetValue>({\n writers: [\"owner\", \"manager\"], userTags: true, max: 30,\n presets: { default: [{ name: \"Regular\", marker: \"blue\" }, { name: \"To follow up\", marker: \"amber\" }, { name: \"Gift cards\", marker: \"violet\" }] },\n });\n // In a product: `kindConfigProblems(config)` of @krizaka/organize/contract, the server's own rules.\n const problems = tags.max < 1 || tags.max > 200 ? [\"tags.max: 1 to 200\"] : [];\n return <TagSetEditor value={tags} onChange={setTags} variant=\"default\" roles={ROLES} problems={problems} />;\n}\n"
217
+ },
218
+ {
219
+ "name": "status-set",
220
+ "title": "Status set",
221
+ "description": "Applicant files: states in order with both labels, tone and final, the initial state, and the moves from × to with roles, confirmation and reasons.",
222
+ "path": "examples/kind-config-editor/status-set.tsx",
223
+ "module": "@krizaka/ui/registry/examples/kind-config-editor/status-set",
224
+ "code": "\"use client\";\n\nimport { StatusSetEditor, type StatusSetEditorProps } from \"@krizaka/ui/kind-config-editor\";\nimport * as React from \"react\";\n\nconst ROLES = [{ key: \"owner\", label: \"Owner\" }, { key: \"manager\", label: \"Manager\" }];\nconst label = (fr: string, en: string) => ({ fr, en });\n\n// The statuses of applicant files for a fictitious landlord: « To decide → Selected | Declined ». The order is the column's order,\n// a final state has no way out, a move can ask for a second press and a reason picked from a list.\nexport default function StatusSetEditorExample() {\n const [set, setSet] = React.useState<StatusSetEditorProps[\"value\"]>({\n key: \"applicant_file\", label: label(\"Dossier\", \"File\"), mode: \"editable\", initial: \"to_decide\",\n states: [\n { key: \"to_decide\", label: label(\"À décider\", \"To decide\"), tone: \"accent\" },\n { key: \"selected\", label: label(\"Retenu\", \"Selected\"), tone: \"success\", final: true },\n { key: \"declined\", label: label(\"Non retenu\", \"Declined\"), tone: \"neutral\", final: true },\n ],\n transitions: [\n { from: \"to_decide\", to: \"selected\", roles: [\"owner\"], confirm: true },\n { from: \"to_decide\", to: \"declined\", roles: [\"owner\", \"manager\"], reasons: [{ key: \"incomplete\", label: label(\"Dossier incomplet\", \"Incomplete file\") }] },\n ],\n });\n return <StatusSetEditor value={set} onChange={setSet} roles={ROLES} />;\n}\n"
225
+ },
226
+ {
227
+ "name": "derived",
228
+ "title": "Derived set",
229
+ "description": "An invoice's statuses come from the ledger: shown, with nothing to move.",
230
+ "path": "examples/kind-config-editor/derived.tsx",
231
+ "module": "@krizaka/ui/registry/examples/kind-config-editor/derived",
232
+ "code": "import { StatusSetEditor } from \"@krizaka/ui/kind-config-editor\";\n\nconst label = (fr: string, en: string) => ({ fr, en });\n\n// A derived set (an invoice's status comes from the ledger): shown read-only, with no moves to edit.\nexport default function StatusSetEditorDerived() {\n return (\n <StatusSetEditor\n roles={[]} onChange={() => {}}\n value={{\n key: \"invoice\", label: label(\"Facture\", \"Invoice\"), mode: \"derived\", transitions: [],\n states: [{ key: \"sent\", label: label(\"Envoyée\", \"Sent\"), tone: \"accent\" }, { key: \"paid\", label: label(\"Payée\", \"Paid\"), tone: \"success\" }],\n }}\n />\n );\n}\n"
233
+ }
234
+ ]
235
+ },
236
+ "native": {
237
+ "entry": "@krizaka/ui/native",
238
+ "import": "import { TagSetEditor, StatusSetEditor } from \"@krizaka/ui/native\";",
239
+ "differences": [
240
+ "The same props. Reorder with the up and down buttons (no drag).",
241
+ "A tone is picked in a sheet; the moves are chips, the one chosen opens its roles, confirmation and reasons below."
242
+ ],
243
+ "deprecated": null,
244
+ "props": [
245
+ {
246
+ "component": "TagSetEditor",
247
+ "description": "The admin's tag set: the presets of a variant (name, colour, order), who writes, whether people add their own, the most.",
248
+ "props": [
249
+ {
250
+ "name": "onChange",
251
+ "type": "(value: TagSetValue) => void",
252
+ "default": null,
253
+ "description": "Called with the whole descriptor after every change.",
254
+ "required": true
255
+ },
256
+ {
257
+ "name": "roles",
258
+ "type": "readonly EditorRole[]",
259
+ "default": null,
260
+ "description": "The roles of the product.",
261
+ "required": true
262
+ },
263
+ {
264
+ "name": "value",
265
+ "type": "TagSetValue",
266
+ "default": null,
267
+ "description": "The `tags` of the kind's configuration.",
268
+ "required": true
269
+ },
270
+ {
271
+ "name": "variant",
272
+ "type": "string",
273
+ "default": null,
274
+ "description": "The variant whose presets are edited (a trade, or `default`).",
275
+ "required": true
276
+ },
277
+ {
278
+ "name": "disabled",
279
+ "type": "boolean",
280
+ "default": null,
281
+ "description": "Not available.",
282
+ "required": false
283
+ },
284
+ {
285
+ "name": "labels",
286
+ "type": "Partial<TagSetEditorLabels>",
287
+ "default": null,
288
+ "description": "The words, passed translated (English by default).",
289
+ "required": false
290
+ },
291
+ {
292
+ "name": "problems",
293
+ "type": "readonly string[]",
294
+ "default": null,
295
+ "description": "What `kindConfigProblems` found, shown in place.",
296
+ "required": false
297
+ }
298
+ ]
299
+ },
300
+ {
301
+ "component": "StatusSetEditor",
302
+ "description": "The admin's status set: the states in their order (FR and EN, tone, final), the initial state, and the moves from × to.",
303
+ "props": [
304
+ {
305
+ "name": "onChange",
306
+ "type": "(value: StatusSet) => void",
307
+ "default": null,
308
+ "description": "Called with the whole descriptor after every change.",
309
+ "required": true
310
+ },
311
+ {
312
+ "name": "roles",
313
+ "type": "readonly EditorRole[]",
314
+ "default": null,
315
+ "description": "The roles of the product.",
316
+ "required": true
317
+ },
318
+ {
319
+ "name": "value",
320
+ "type": "StatusSet",
321
+ "default": null,
322
+ "description": "The kind's status set.",
323
+ "required": true
324
+ },
325
+ {
326
+ "name": "disabled",
327
+ "type": "boolean",
328
+ "default": null,
329
+ "description": "Not available.",
330
+ "required": false
331
+ },
332
+ {
333
+ "name": "labels",
334
+ "type": "Partial<StatusSetEditorLabels>",
335
+ "default": null,
336
+ "description": "The words, passed translated (English by default).",
337
+ "required": false
338
+ },
339
+ {
340
+ "name": "locale",
341
+ "type": "keyof Label",
342
+ "default": "en",
343
+ "description": "The language the states are named in elsewhere in the editor.",
344
+ "required": false
345
+ },
346
+ {
347
+ "name": "problems",
348
+ "type": "readonly string[]",
349
+ "default": null,
350
+ "description": "What `kindConfigProblems` found, shown in place.",
351
+ "required": false
352
+ }
353
+ ]
354
+ },
355
+ {
356
+ "component": "EditorRole",
357
+ "description": "A role of the product (`owner`, `manager`…), its key and its name in the person's language.",
358
+ "props": []
359
+ },
360
+ {
361
+ "component": "Lang",
362
+ "description": "The language of a label.",
363
+ "props": []
364
+ },
365
+ {
366
+ "component": "TagSetValue",
367
+ "description": "The `tags` part of a `KindConfig`.",
368
+ "props": []
369
+ }
370
+ ],
371
+ "examples": [
372
+ {
373
+ "name": "tag-set",
374
+ "title": "Tag set",
375
+ "description": "The presets, who manages them, the most.",
376
+ "path": "examples/kind-config-editor/native/tag-set.tsx",
377
+ "module": "@krizaka/ui/registry/examples/kind-config-editor/native/tag-set",
378
+ "code": "import { TagSetEditor, type TagSetValue } from \"@krizaka/ui/native\";\nimport { useState } from \"react\";\nimport { View } from \"react-native\";\n\nconst ROLES = [{ key: \"owner\", label: \"Owner\" }, { key: \"manager\", label: \"Manager\" }];\n\n// The client tags of a fictitious hair studio: presets, who writes, whether people add their own, the most.\nexport default function NativeTagSetEditor() {\n const [tags, setTags] = useState<TagSetValue>({\n writers: [\"owner\"], userTags: true, max: 30,\n presets: { default: [{ name: \"Regular\", marker: \"blue\" }, { name: \"To follow up\", marker: \"amber\" }] },\n });\n return (\n <View style={{ width: 340 }}>\n <TagSetEditor value={tags} onChange={setTags} variant=\"default\" roles={ROLES} />\n </View>\n );\n}\n",
379
+ "screenshots": {
380
+ "dark": "examples/kind-config-editor/native/tag-set.dark.png",
381
+ "light": "examples/kind-config-editor/native/tag-set.light.png"
382
+ }
383
+ },
384
+ {
385
+ "name": "status-set",
386
+ "title": "Status set",
387
+ "description": "The states in order and the moves by role.",
388
+ "path": "examples/kind-config-editor/native/status-set.tsx",
389
+ "module": "@krizaka/ui/registry/examples/kind-config-editor/native/status-set",
390
+ "code": "import { StatusSetEditor,type StatusSetEditorProps } from \"@krizaka/ui/native\";\nimport { useState } from \"react\";\nimport { View } from \"react-native\";\n\nconst label = (fr: string, en: string) => ({ fr, en });\n\n// The statuses of applicant files for a fictitious landlord: states in order, a final state with no way out, the moves by role.\nexport default function NativeStatusSetEditor() {\n const [set, setSet] = useState<StatusSetEditorProps[\"value\"]>({\n key: \"applicant_file\", label: label(\"Dossier\", \"File\"), mode: \"editable\", initial: \"to_decide\",\n states: [{ key: \"to_decide\", label: label(\"À décider\", \"To decide\"), tone: \"accent\" }, { key: \"selected\", label: label(\"Retenu\", \"Selected\"), tone: \"success\", final: true }],\n transitions: [{ from: \"to_decide\", to: \"selected\", roles: [\"owner\"], confirm: true }],\n });\n return (\n <View style={{ width: 340 }}>\n <StatusSetEditor value={set} onChange={setSet} roles={[{ key: \"owner\", label: \"Owner\" }]} />\n </View>\n );\n}\n",
391
+ "screenshots": {
392
+ "dark": "examples/kind-config-editor/native/status-set.dark.png",
393
+ "light": "examples/kind-config-editor/native/status-set.light.png"
394
+ }
395
+ }
396
+ ]
397
+ },
398
+ "files": [
399
+ {
400
+ "path": "kind-config-editor/index.ts",
401
+ "content": "/** @krizaka/ui/kind-config-editor — `TagSetEditor` and `StatusSetEditor`: the admin's editors of a kind's tags and statuses (`@krizaka/organize` `KindConfig`), value in / onChange out, the server's problems shown in place; `model` — the pure changes they make. Client (\"use client\"). */\nexport {\n type EditorRole,\n type Lang,\n StatusSetEditor,\n type StatusSetEditorLabels,\n statusSetEditorLabels,\n type StatusSetEditorProps,\n TagSetEditor,\n type TagSetEditorLabels,\n tagSetEditorLabels,\n type TagSetEditorProps,\n type TagSetValue,\n} from \"./kind-config-editor\";\n"
402
+ },
403
+ {
404
+ "path": "kind-config-editor/kind-config-editor.tsx",
405
+ "content": "// Client (state, drag). The admin's editors of a kind's vocabulary (krizaka-ts#89, ADR-003 of krizaka-ts: « admin configures\n// everything »): the tag set (the presets of a variant, who writes, may people add their own, the most) and the status set\n// (the states in their order, each in French and English, its tone, final; the initial state; the moves from × to with the\n// roles, a confirmation and the reasons). Each takes the descriptor and gives it back (`value` / `onChange`) and never holds the\n// save logic: the product posts it, with the `version` it read. `problems` (from `kindConfigProblems`, the server's own rules)\n// are shown in place. What the contract forbids is kept by construction (model.ts): a final state has no way out, the initial\n// state is never final, a move goes to another state. Reorder: drag the handle, or the buttons, or Alt + ↑ ↓ in a name.\nimport type { Marker, StatusSet, StatusTone } from \"@krizaka/organize/contract\";\nimport * as React from \"react\";\n\nimport { Button } from \"../button\";\nimport { Chip, MarkerPicker, TagMarker } from \"../chip\";\nimport { cn } from \"../cn\";\nimport { Input, Select } from \"../field\";\nimport { SettingsRow } from \"../settings-layout\";\nimport { Switch } from \"../switch\";\nimport { type EditorRole, STATUS_TONES, type StatusSetEditorLabels, statusSetEditorLabels, type TagSetEditorLabels, tagSetEditorLabels } from \"./labels\";\nimport {\n addPreset,\n addReason,\n addState,\n clampMax,\n duplicatePresetNames,\n type Lang,\n movePreset,\n moveState,\n recolorPreset,\n removePreset,\n removeState,\n renamePreset,\n setFinal,\n setInitial,\n setStateLabel,\n setStateTone,\n setTransitionConfirm,\n setTransitionReasons,\n setTransitionRoles,\n type TagSetValue,\n transitionOf,\n} from \"./model\";\n\nexport type { EditorRole, Lang, StatusSetEditorLabels, TagSetEditorLabels, TagSetValue };\nexport { statusSetEditorLabels, tagSetEditorLabels };\n\n\n// --- shared ----------------------------------------------------------------------------------------------------------------\n\n/** The problems the server's rules found, shown where the admin is working: a polite alert above the list. */\nfunction Problems({ title, problems }: { title: string; problems: readonly string[] | undefined }) {\n if (!problems || problems.length === 0) return null;\n return (\n <div role=\"alert\" className=\"flex flex-col gap-1 rounded-lg border border-danger/40 bg-danger/10 px-3 py-2.5\">\n <p className=\"m-0 text-xs font-semibold text-fg-danger\">{title}</p>\n <ul className=\"m-0 flex list-disc flex-col gap-0.5 pl-5 text-xs text-fg\">\n {problems.map((problem) => (\n <li key={problem}>{problem}</li>\n ))}\n </ul>\n </div>\n );\n}\n\n/** Drag a row by its handle, or move it with Alt + ↑ ↓ from a field: one pair of helpers for both lists. */\nfunction useReorder(onMove: (from: number, to: number) => void) {\n const dragging = React.useRef<number | null>(null);\n return {\n row: (index: number) => ({\n onDragOver: (event: React.DragEvent) => {\n if (dragging.current !== null) event.preventDefault();\n },\n onDrop: (event: React.DragEvent) => {\n event.preventDefault();\n if (dragging.current !== null) onMove(dragging.current, index);\n dragging.current = null;\n },\n }),\n handle: (index: number) => ({\n draggable: true,\n onDragStart: (event: React.DragEvent) => {\n dragging.current = index;\n event.dataTransfer.effectAllowed = \"move\";\n event.dataTransfer.setData(\"text/plain\", String(index));\n },\n onDragEnd: () => {\n dragging.current = null;\n },\n }),\n keys: (index: number, last: number) => (event: React.KeyboardEvent) => {\n if (!event.altKey || (event.key !== \"ArrowUp\" && event.key !== \"ArrowDown\")) return;\n event.preventDefault();\n const to = event.key === \"ArrowUp\" ? index - 1 : index + 1;\n if (to < 0 || to > last) return;\n onMove(index, to);\n // The row has moved: its field is a new element, keep the focus on it for the next press.\n const field = event.currentTarget as HTMLElement;\n requestAnimationFrame(() => field.closest(\"ol\")?.querySelectorAll<HTMLElement>(`[data-reorder-field=\"${field.dataset.reorderField}\"]`)[to]?.focus());\n },\n };\n}\n\nconst grip = (\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"currentColor\" aria-hidden>\n {[7, 12, 17].flatMap((y) => [9, 15].map((x) => <circle key={`${x}-${y}`} cx={x} cy={y} r=\"1.4\" />))}\n </svg>\n);\nconst arrow = (up: boolean) => (\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d={up ? \"m6 15 6-6 6 6\" : \"m6 9 6 6 6-6\"} />\n </svg>\n);\nconst IconButton = ({ label, className, ...props }: React.ComponentProps<\"button\"> & { label: string }) => (\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n className={cn(\n \"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-fg-secondary transition-colors hover:bg-surface-3 hover:text-fg\",\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-30\",\n className,\n )}\n {...props}\n />\n);\nconst Cross = () => (\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" aria-hidden>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n);\n\n// --- the tag set -----------------------------------------------------------------------------------------------------------\n\nexport type TagSetEditorProps = {\n /** The `tags` of the kind's configuration (`KindConfig.tags`). */\n value: TagSetValue;\n /** Called with the whole set after every change. */\n onChange: (value: TagSetValue) => void;\n /** The variant whose presets are edited (a trade, or `default`). */\n variant: string;\n /** The roles of the product that can write tags. */\n roles: readonly EditorRole[];\n /** What `kindConfigProblems` found (the server's own rules), shown above the list. */\n problems?: readonly string[];\n /** The words, passed translated (English by default). */\n labels?: Partial<TagSetEditorLabels>;\n /** Not available. */\n disabled?: boolean;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** The admin's tag set: the presets of a variant (name, colour, order), who writes, whether people add their own, the most. */\nexport function TagSetEditor({ value, onChange, variant, roles, problems, labels: given, disabled, className }: TagSetEditorProps) {\n const labels: TagSetEditorLabels = { ...tagSetEditorLabels, ...given, markerNames: { ...tagSetEditorLabels.markerNames, ...given?.markerNames } };\n const presets = value.presets[variant] ?? [];\n const twins = duplicatePresetNames(presets);\n const [draft, setDraft] = React.useState(\"\");\n const [draftMarker, setDraftMarker] = React.useState<Marker>(\"blue\");\n const reorder = useReorder((from, to) => onChange(movePreset(value, variant, from, to)));\n const id = React.useId();\n const add = () => {\n const next = addPreset(value, variant, draft, draftMarker);\n if (next === value) return;\n onChange(next);\n setDraft(\"\");\n };\n return (\n <div className={cn(\"flex flex-col gap-4\", className)}>\n <Problems title={labels.problems} problems={problems} />\n <section aria-labelledby={`${id}-presets`} className=\"flex flex-col gap-2\">\n <h3 id={`${id}-presets`} className=\"m-0 text-sm font-semibold text-fg\">\n {labels.presets}\n </h3>\n {presets.length === 0 ? (\n <p className=\"m-0 text-sm text-fg-secondary\">{labels.empty}</p>\n ) : (\n <ol className=\"m-0 flex list-none flex-col gap-2 p-0\">\n {presets.map((preset, index) => {\n const shown = preset.name || String(index + 1);\n const twin = twins.has(index);\n return (\n <li key={index} {...reorder.row(index)} className=\"flex flex-wrap items-center gap-x-2 gap-y-1 rounded-lg border border-border-default bg-surface-1 px-2 py-1.5\">\n <span {...reorder.handle(index)} aria-hidden title={labels.drag(shown)} className=\"inline-flex h-9 w-6 cursor-grab items-center justify-center text-fg-muted active:cursor-grabbing max-md:hidden\">\n {grip}\n </span>\n <TagMarker marker={preset.marker} />\n <div className=\"flex min-w-40 flex-1 flex-col gap-1\">\n <Input\n aria-label={labels.name(index + 1)}\n data-reorder-field=\"name\"\n value={preset.name}\n disabled={disabled}\n invalid={twin || !preset.name.trim()}\n aria-describedby={twin ? `${id}-dup-${index}` : undefined}\n onChange={(event) => onChange(renamePreset(value, variant, index, event.target.value))}\n onBlur={(event) => event.target.value !== event.target.value.replace(/\\s+/g, \" \").trim() && onChange(renamePreset(value, variant, index, event.target.value.replace(/\\s+/g, \" \").trim()))}\n onKeyDown={reorder.keys(index, presets.length - 1)}\n className=\"h-9\"\n />\n {twin ? (\n <span id={`${id}-dup-${index}`} className=\"text-xs text-fg-danger\">\n {labels.duplicate}\n </span>\n ) : null}\n </div>\n <MarkerPicker label={labels.marker(shown)} names={labels.markerNames} value={preset.marker} disabled={disabled} onValueChange={(marker) => onChange(recolorPreset(value, variant, index, marker))} />\n <IconButton label={labels.moveUp(shown)} disabled={disabled || index === 0} onClick={() => onChange(movePreset(value, variant, index, index - 1))}>\n {arrow(true)}\n </IconButton>\n <IconButton label={labels.moveDown(shown)} disabled={disabled || index === presets.length - 1} onClick={() => onChange(movePreset(value, variant, index, index + 1))}>\n {arrow(false)}\n </IconButton>\n <IconButton label={labels.remove(shown)} disabled={disabled} onClick={() => onChange(removePreset(value, variant, index))}>\n <Cross />\n </IconButton>\n </li>\n );\n })}\n </ol>\n )}\n <div className=\"flex flex-wrap items-center gap-2\">\n <Input\n aria-label={labels.add}\n value={draft}\n maxLength={80}\n disabled={disabled}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Enter\") {\n event.preventDefault();\n add();\n }\n }}\n placeholder={labels.add}\n className=\"h-9 min-w-40 flex-1\"\n />\n <MarkerPicker label={labels.marker(draft.trim() || labels.add)} names={labels.markerNames} value={draftMarker} disabled={disabled} onValueChange={setDraftMarker} />\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" disabled={disabled || !draft.trim()} onClick={add}>\n {labels.addButton}\n </Button>\n </div>\n </section>\n <div className=\"flex flex-col\">\n <SettingsRow label={labels.writers} description={labels.writersHint}>\n <Chip.Group type=\"multiple\" size=\"sm\" label={labels.writers} value={value.writers} disabled={disabled} onValueChange={(writers) => onChange({ ...value, writers })}>\n {roles.map((role) => (\n <Chip key={role.key} value={role.key}>\n {role.label}\n </Chip>\n ))}\n </Chip.Group>\n </SettingsRow>\n <SettingsRow label={labels.userTags} description={labels.userTagsHint}>\n <Switch label={labels.userTags} checked={value.userTags} disabled={disabled} onCheckedChange={(userTags) => onChange({ ...value, userTags })} />\n </SettingsRow>\n <SettingsRow label={labels.max} description={labels.maxHint} htmlFor={`${id}-max`}>\n <Input\n id={`${id}-max`}\n type=\"number\"\n inputMode=\"numeric\"\n min={1}\n max={200}\n value={value.max}\n disabled={disabled}\n invalid={!Number.isInteger(value.max) || value.max < 1 || value.max > 200}\n onChange={(event) => onChange({ ...value, max: event.target.value === \"\" ? 0 : Number(event.target.value) })}\n onBlur={() => onChange({ ...value, max: clampMax(value.max) })}\n className=\"h-9 w-24\"\n />\n </SettingsRow>\n </div>\n </div>\n );\n}\n\n// --- the status set --------------------------------------------------------------------------------------------------------\n\nexport type StatusSetEditorProps = {\n /** The kind's status set (`KindConfig.status`). */\n value: StatusSet;\n /** Called with the whole set after every change. */\n onChange: (value: StatusSet) => void;\n /** The roles of the product that can make a move. */\n roles: readonly EditorRole[];\n /** The language the states are named in elsewhere in the editor (the moves' names). */\n locale?: Lang;\n /** What `kindConfigProblems` found (the server's own rules), shown above the list. */\n problems?: readonly string[];\n /** The words, passed translated (English by default). */\n labels?: Partial<StatusSetEditorLabels>;\n /** Not available. */\n disabled?: boolean;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** The admin's status set: the states in their order (FR and EN, tone, final), the initial state, and the moves from × to. */\nexport function StatusSetEditor({ value, onChange, roles, locale = \"en\", problems, labels: given, disabled, className }: StatusSetEditorProps) {\n const labels: StatusSetEditorLabels = { ...statusSetEditorLabels, ...given };\n const [chosen, setChosen] = React.useState<{ from: string; to: string } | null>(null);\n const reorder = useReorder((from, to) => onChange(moveState(value, from, to)));\n const id = React.useId();\n const nameOf = (key: string) => value.states.find((s) => s.key === key)?.label[locale] || key;\n const roleLabel = (key: string) => roles.find((r) => r.key === key)?.label ?? key;\n const open = chosen && value.states.some((x) => x.key === chosen.from) && value.states.some((x) => x.key === chosen.to) ? chosen : null;\n const detail = open ? transitionOf(value, open.from, open.to) : undefined;\n\n if (value.mode === \"derived\") {\n return (\n <div className={cn(\"flex flex-col gap-3\", className)}>\n <Problems title={labels.problems} problems={problems} />\n <p className=\"m-0 text-sm text-fg-secondary\">{labels.derived}</p>\n <ol aria-label={labels.states} className=\"m-0 flex list-none flex-wrap gap-2 p-0\">\n {value.states.map((state) => (\n <li key={state.key} className=\"inline-flex items-center gap-1.5 rounded-sm bg-surface-3 px-2 py-0.5 text-[11px] font-semibold text-fg-secondary\" data-tone={state.tone}>\n <span aria-hidden className=\"h-1.5 w-1.5 rounded-full bg-current\" />\n {state.label[locale]}\n </li>\n ))}\n </ol>\n </div>\n );\n }\n\n return (\n <div className={cn(\"flex flex-col gap-5\", className)}>\n <Problems title={labels.problems} problems={problems} />\n <section aria-labelledby={`${id}-states`} className=\"flex flex-col gap-2\">\n <h3 id={`${id}-states`} className=\"m-0 text-sm font-semibold text-fg\">\n {labels.states}\n </h3>\n <ol className=\"m-0 flex list-none flex-col gap-2 p-0\">\n {value.states.map((state, index) => {\n const n = index + 1;\n const isInitial = value.initial === state.key;\n const name = state.label[locale] || String(n);\n return (\n <li key={state.key} {...reorder.row(index)} data-state-key={state.key} className=\"flex flex-wrap items-start gap-x-3 gap-y-2 rounded-lg border border-border-default bg-surface-1 p-2.5\">\n <span {...reorder.handle(index)} aria-hidden title={labels.drag(name)} className=\"mt-1.5 inline-flex h-9 w-6 cursor-grab items-center justify-center text-fg-muted active:cursor-grabbing max-md:hidden\">\n {grip}\n </span>\n {([\"fr\", \"en\"] as const).map((lang) => (\n <Input\n key={lang}\n aria-label={labels.stateLabel(labels.languages[lang], n)}\n data-reorder-field={lang}\n lang={lang}\n value={state.label[lang]}\n maxLength={40}\n disabled={disabled}\n invalid={!state.label[lang].trim()}\n onChange={(event) => onChange(setStateLabel(value, state.key, lang, event.target.value))}\n onKeyDown={reorder.keys(index, value.states.length - 1)}\n className=\"h-9 min-w-36 flex-1\"\n />\n ))}\n <Select aria-label={labels.tone(n)} value={state.tone} disabled={disabled} onChange={(event) => onChange(setStateTone(value, state.key, event.target.value as StatusTone))} className=\"h-9 w-36\">\n {STATUS_TONES.map((tone) => (\n <option key={tone} value={tone}>\n {labels.tones[tone]}\n </option>\n ))}\n </Select>\n <div className=\"flex items-center gap-1.5 text-xs text-fg-secondary\">\n <Switch size=\"sm\" label={labels.final(n)} checked={Boolean(state.final)} disabled={disabled || isInitial} onCheckedChange={(final) => onChange(setFinal(value, state.key, final))} />\n <span aria-hidden>{isInitial ? labels.initialNotFinal : labels.finalHint}</span>\n </div>\n <label className=\"flex items-center gap-1.5 text-xs text-fg-secondary\">\n <input type=\"radio\" name={`${id}-initial`} aria-label={labels.initial(n)} checked={isInitial} disabled={disabled || Boolean(state.final)} onChange={() => onChange(setInitial(value, state.key))} className=\"h-4 w-4 accent-(--kz-accent)\" />\n <span aria-hidden>{labels.initial(n)}</span>\n </label>\n <code className=\"text-[11px] text-fg-muted\">{state.key}</code>\n <div className=\"ml-auto flex\">\n <IconButton label={labels.moveUp(name)} disabled={disabled || index === 0} onClick={() => onChange(moveState(value, index, index - 1))}>\n {arrow(true)}\n </IconButton>\n <IconButton label={labels.moveDown(name)} disabled={disabled || index === value.states.length - 1} onClick={() => onChange(moveState(value, index, index + 1))}>\n {arrow(false)}\n </IconButton>\n <IconButton label={labels.remove(name)} disabled={disabled || value.states.length <= 2} onClick={() => onChange(removeState(value, state.key))}>\n <Cross />\n </IconButton>\n </div>\n </li>\n );\n })}\n </ol>\n <div>\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" disabled={disabled || value.states.length >= 12} onClick={() => onChange(addState(value, labels.newState))}>\n {labels.addState}\n </Button>\n </div>\n </section>\n\n <section aria-labelledby={`${id}-moves`} className=\"flex flex-col gap-3\">\n <div className=\"flex flex-col gap-0.5\">\n <h3 id={`${id}-moves`} className=\"m-0 text-sm font-semibold text-fg\">\n {labels.moves}\n </h3>\n <p className=\"m-0 text-xs text-fg-secondary\">{labels.movesHint}</p>\n </div>\n {value.states.map((from) => (\n <div key={from.key} role=\"group\" aria-label={labels.from(nameOf(from.key))} className=\"flex flex-wrap items-center gap-2\">\n <span className=\"min-w-28 text-xs font-semibold text-fg\">{nameOf(from.key)}</span>\n {from.final ? (\n <span className=\"text-xs text-fg-secondary\">{labels.noWayOut}</span>\n ) : (\n value.states\n .filter((to) => to.key !== from.key)\n .map((to) => {\n const move = transitionOf(value, from.key, to.key);\n const summary = move ? move.roles.map(roleLabel).join(\", \") : labels.none;\n const on = open?.from === from.key && open.to === to.key;\n return (\n <button\n key={to.key}\n type=\"button\"\n aria-pressed={on}\n data-on={move ? \"\" : undefined}\n disabled={disabled}\n onClick={() => setChosen(on ? null : { from: from.key, to: to.key })}\n className={cn(\n \"inline-flex min-h-9 items-center gap-1.5 rounded-sm border px-2.5 py-1 text-xs transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40\",\n move ? \"border-accent bg-accent-soft text-fg\" : \"border-dashed border-border-control text-fg-secondary hover:border-border-strong\",\n on && \"ring-2 ring-ring\",\n )}\n >\n {/* The name is the sentence for a screen reader; the arrow and the short words are what the eye reads. */}\n <span className=\"sr-only\">{labels.move(nameOf(from.key), nameOf(to.key), summary)}</span>\n <span aria-hidden>→ {nameOf(to.key)}</span>\n <span aria-hidden className=\"text-fg\">\n {summary}\n </span>\n </button>\n );\n })\n )}\n </div>\n ))}\n\n {open && chosen ? (\n <div role=\"region\" aria-label={labels.moveDetail(nameOf(open.from), nameOf(open.to))} className=\"flex flex-col gap-3 rounded-lg border border-border-default bg-surface-1 p-3\">\n <h4 className=\"m-0 text-sm font-semibold text-fg\">{labels.moveDetail(nameOf(open.from), nameOf(open.to))}</h4>\n <div className=\"flex flex-col gap-1.5\">\n <span className=\"text-xs font-semibold text-fg-secondary\">{labels.roles}</span>\n <Chip.Group\n type=\"multiple\"\n size=\"sm\"\n label={labels.roles}\n value={detail?.roles ? [...detail.roles] : []}\n disabled={disabled}\n onValueChange={(next) => {\n onChange(setTransitionRoles(value, open.from, open.to, next));\n }}\n >\n {roles.map((role) => (\n <Chip key={role.key} value={role.key}>\n {role.label}\n </Chip>\n ))}\n </Chip.Group>\n </div>\n {detail ? (\n <>\n <div className=\"flex items-center gap-2 text-xs text-fg-secondary\">\n <Switch size=\"sm\" label={labels.confirm} checked={Boolean(detail?.confirm)} disabled={disabled} onCheckedChange={(on) => onChange(setTransitionConfirm(value, open.from, open.to, on))} />\n <span aria-hidden>{labels.confirm}</span>\n </div>\n <div className=\"flex flex-col gap-2\">\n <span className=\"text-xs font-semibold text-fg-secondary\">{labels.reasons}</span>\n {(detail?.reasons ?? []).map((reason, at) => (\n <div key={reason.key} className=\"flex flex-wrap items-center gap-2\">\n {([\"fr\", \"en\"] as const).map((lang) => (\n <Input\n key={lang}\n lang={lang}\n aria-label={labels.reasonLabel(labels.languages[lang], at + 1)}\n value={reason.label[lang]}\n maxLength={40}\n disabled={disabled}\n invalid={!reason.label[lang].trim()}\n onChange={(event) =>\n onChange(setTransitionReasons(value, open.from, open.to, (detail?.reasons ?? []).map((r) => (r.key === reason.key ? { ...r, label: { ...r.label, [lang]: event.target.value } } : r))))\n }\n className=\"h-9 min-w-36 flex-1\"\n />\n ))}\n <IconButton label={labels.removeReason(at + 1)} disabled={disabled} onClick={() => onChange(setTransitionReasons(value, open.from, open.to, (detail?.reasons ?? []).filter((r) => r.key !== reason.key)))}>\n <Cross />\n </IconButton>\n </div>\n ))}\n <div>\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" disabled={disabled || (detail?.reasons?.length ?? 0) >= 12} onClick={() => onChange(addReason(value, open.from, open.to, { fr: \"\", en: \"\" }))}>\n {labels.addReason}\n </Button>\n </div>\n </div>\n </>\n ) : null}\n </div>\n ) : null}\n </section>\n </div>\n );\n}\n"
406
+ },
407
+ {
408
+ "path": "kind-config-editor/labels.ts",
409
+ "content": "// The words of the admin's editors, in English, and the shape of the ones a product passes translated. Pure data and types: the\n// web and React Native editors both read them (/native adds no dependency, so this imports types only).\nimport type { Label, Marker, StatusTone } from \"@krizaka/organize/contract\";\n\nimport type { Lang } from \"./model\";\n\n/** A role of the product (`owner`, `manager`…), its key and its name in the person's language. */\nexport type EditorRole = { key: string; label: string };\n\n/** The tones of a status, in the contract's order. */\nexport const STATUS_TONES: readonly StatusTone[] = [\"neutral\", \"accent\", \"success\", \"warning\", \"danger\"];\n\nexport type TagSetEditorLabels = {\n /** The name of the list of presets (\"Tags offered\"). */\n presets: string;\n /** A preset's name field: `(position) => \"Name of tag \" + position`. */\n name: (position: number) => string;\n /** A preset's colour group: `(name) => \"Colour of the tag \" + name`. */\n marker: (name: string) => string;\n /** The name of each colour of the closed palette. */\n markerNames: Readonly<Record<Marker, string>>;\n /** `(name) => \"Move \" + name + \" up\"`. */\n moveUp: (name: string) => string;\n /** `(name) => \"Move \" + name + \" down\"`. */\n moveDown: (name: string) => string;\n /** `(name) => \"Remove \" + name`. */\n remove: (name: string) => string;\n /** The handle that drags a row: `(name) => \"Drag \" + name`. */\n drag: (name: string) => string;\n /** The field that adds a preset (\"New tag\"). */\n add: string;\n /** Its button (\"Add\"). */\n addButton: string;\n /** Said on a name another tag has (\"Another tag has this name\"). */\n duplicate: string;\n /** Said when the list is empty (\"No tag offered yet\"). */\n empty: string;\n /** The roles that write (\"Who can manage tags\") and its help. */\n writers: string;\n writersHint: string;\n /** The switch \"People can add their own tags\" and its help. */\n userTags: string;\n userTagsHint: string;\n /** The most tags (\"Most tags\") and its help. */\n max: string;\n maxHint: string;\n /** The title of the problems (\"To fix before saving\"). */\n problems: string;\n};\n\nexport const tagSetEditorLabels: TagSetEditorLabels = {\n presets: \"Tags offered\",\n name: (position) => `Name of tag ${position}`,\n marker: (name) => `Colour of the tag ${name}`,\n markerNames: { blue: \"Blue\", green: \"Green\", amber: \"Amber\", red: \"Red\", violet: \"Violet\", gray: \"Gray\" },\n moveUp: (name) => `Move ${name} up`,\n moveDown: (name) => `Move ${name} down`,\n remove: (name) => `Remove ${name}`,\n drag: (name) => `Drag ${name}`,\n add: \"New tag\",\n addButton: \"Add\",\n duplicate: \"Another tag has this name\",\n empty: \"No tag offered yet\",\n writers: \"Who manages the tags\",\n writersHint: \"These roles create, rename, remove and assign tags.\",\n userTags: \"People can add their own tags\",\n userTagsHint: \"Beyond the tags offered here.\",\n max: \"Most tags\",\n maxHint: \"Per kind, from 1 to 200.\",\n problems: \"To fix before saving\",\n};\n\nexport type StatusSetEditorLabels = {\n /** The language of a field, spoken: `{ fr: \"French\", en: \"English\" }`. */\n languages: Record<Lang, string>;\n /** A state's label field: `(language, position) => \"Label in French of state 2\"`. */\n stateLabel: (language: string, position: number) => string;\n /** A state's tone: `(position) => \"Tone of state 2\"`; and the name of each tone. */\n tone: (position: number) => string;\n tones: Record<StatusTone, string>;\n /** The \"final\" switch: `(position) => \"State 2 is final\"`, and what it means. */\n final: (position: number) => string;\n finalHint: string;\n /** The radio of the initial state: `(position) => \"State 2 is the initial state\"`. */\n initial: (position: number) => string;\n /** Said on the initial state's final switch, which cannot be on (\"The initial state is never final\"). */\n initialNotFinal: string;\n /** The names of the list (\"States, in the order of the column\"). */\n states: string;\n /** `(name) => \"Move \" + name + \" up\"` etc. */\n moveUp: (name: string) => string;\n moveDown: (name: string) => string;\n remove: (name: string) => string;\n drag: (name: string) => string;\n /** The button that adds a state (\"Add a state\"), and the label a new state starts with. */\n addState: string;\n newState: Label;\n /** The title of the moves (\"Moves\") and their help. */\n moves: string;\n movesHint: string;\n /** The group of a state's moves, named by the state: `(name) => `Moves out of ${name}``. */\n from: (name: string) => string;\n /** Said of a final state (\"Final: no way out\"). */\n noWayOut: string;\n /** A move's button name: `(from, to, roles) => \"From A to B: owner\"`; `none` says no role may make it. */\n move: (from: string, to: string, roles: string) => string;\n none: string;\n /** The panel of the move chosen: `(from, to) => \"Move from A to B\"`. */\n moveDetail: (from: string, to: string) => string;\n /** The roles of the move (\"Roles that can make this move\"). */\n roles: string;\n /** The switch \"Ask for a second press\". */\n confirm: string;\n /** The reasons (\"Reasons to pick from\"), the button to add one (\"Add a reason\") and a reason's fields. */\n reasons: string;\n addReason: string;\n reasonLabel: (language: string, position: number) => string;\n removeReason: (position: number) => string;\n /** Said of a derived set (\"Derived: the product computes this status; nobody moves it\"). */\n derived: string;\n /** \"To fix before saving\". */\n problems: string;\n};\n\nexport const statusSetEditorLabels: StatusSetEditorLabels = {\n languages: { fr: \"French\", en: \"English\" },\n stateLabel: (language, position) => `Label in ${language} of state ${position}`,\n tone: (position) => `Tone of state ${position}`,\n tones: { neutral: \"Neutral\", accent: \"Accent\", success: \"Success\", warning: \"Warning\", danger: \"Danger\" },\n final: (position) => `State ${position} is final`,\n finalHint: \"A final state has no way out.\",\n initial: (position) => `State ${position} is the initial state`,\n initialNotFinal: \"The initial state is never final.\",\n states: \"States, in the order of the column\",\n moveUp: (name) => `Move ${name} up`,\n moveDown: (name) => `Move ${name} down`,\n remove: (name) => `Remove ${name}`,\n drag: (name) => `Drag ${name}`,\n addState: \"Add a state\",\n newState: { fr: \"New state\", en: \"New state\" },\n moves: \"Moves\",\n movesHint: \"Choose a move to set who can make it, whether it asks for a confirmation, and the reasons to pick from.\",\n from: (name) => `Moves from ${name}`,\n noWayOut: \"Final: no way out\",\n move: (from, to, roles) => `From ${from} to ${to}: ${roles}`,\n none: \"nobody\",\n moveDetail: (from, to) => `Move from ${from} to ${to}`,\n roles: \"Roles that can make this move\",\n confirm: \"Ask for a second press\",\n reasons: \"Reasons to pick from\",\n addReason: \"Add a reason\",\n reasonLabel: (language, position) => `Reason ${position} in ${language}`,\n removeReason: (position) => `Remove reason ${position}`,\n derived: \"Derived: the product computes this status, and nobody moves it.\",\n problems: \"To fix before saving\",\n};\n\n"
410
+ },
411
+ {
412
+ "path": "kind-config-editor/meta.ts",
413
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Kind config editor\",\n summary:\n \"The admin's editors of a kind's vocabulary (`@krizaka/organize` `KindConfig`, krizaka-ts#89): `TagSetEditor` — the tags offered, who manages them, whether people add their own, the most — and `StatusSetEditor` — the states in their order, the initial state, the moves from × to with their roles, confirmation and reasons. Value in, `onChange` out; the product posts the save.\",\n status: \"beta\",\n category: \"forms\",\n platforms: \"both\",\n parity: { desktop: \"web\" },\n whenToUse: [\n \"A product's settings where the admin sets the tags and the statuses of a kind (clients, invoices, applicant files): « the admin configures everything ».\",\n \"To show the problems the server's own rules found (`kindConfigProblems`) in the place where they are fixed.\",\n ],\n whenNotToUse: [\n { when: \"For a person's own tags on a file.\", use: \"tag-selector\" },\n { when: \"To change the state of one entity.\", use: \"status-chip\" },\n { when: \"For any other setting.\", use: \"settings-layout\" },\n ],\n bestPractices: [\n \"Keep the descriptor in state, pass it as `value` and post it yourself with the `version` you read: a `CONFLICT` (409) says someone else changed it, a `STATE_IN_USE` (409) names the states entities still hold.\",\n \"Pass `problems={kindConfigProblems(config)}`: the same rules as the server, shown above the list.\",\n \"A colour is a name of the closed palette (`blue · green · amber · red · violet · gray`), never a colour picker; a status never takes a tag's colour.\",\n \"A reason is a list the admin writes in both languages, off by default; there is never a free-text reason.\",\n \"The order of the states is the order of the status column: reorder with the handle, the buttons, or Alt + ↑ ↓ in a field.\",\n ],\n accessibility: {\n keyboard: [\n { keys: \"Tab\", action: \"Reaches each field, switch and button in reading order.\" },\n { keys: \"Alt + ↑ / Alt + ↓\", action: \"In a name or a label, moves the row up or down; the focus follows the field.\" },\n { keys: \"Arrow keys\", action: \"In a colour group, move between the six swatches.\" },\n { keys: \"Enter\", action: \"In the field that adds a tag, adds it.\" },\n ],\n notes: [\n \"Every control has its own accessible name: a field says its position and its language (« Label in French of state 2 »), a move says its two states and its roles.\",\n \"Dragging is an extra: the move-up and move-down buttons do the same, and the handle is not drawn on a phone.\",\n \"A final state's row of moves says « Final: no way out » instead of offering buttons; the initial state's « final » switch is off and says why.\",\n \"Problems are an alert above the list; a field with an empty label or a duplicate name is `aria-invalid` and says so.\",\n ],\n },\n related: [\"tag-selector\", \"status-chip\", \"chip\", \"settings-layout\", \"switch\"],\n web: {\n imports: [\"TagSetEditor\", \"StatusSetEditor\"],\n examples: [\n { name: \"tag-set\", title: \"Tag set\", description: \"The presets of a hair studio's clients (name, colour, order), who manages tags, « people can add their own », the most; the server's problems in place.\" },\n { name: \"status-set\", title: \"Status set\", description: \"Applicant files: states in order with both labels, tone and final, the initial state, and the moves from × to with roles, confirmation and reasons.\" },\n { name: \"derived\", title: \"Derived set\", description: \"An invoice's statuses come from the ledger: shown, with nothing to move.\" },\n ],\n },\n native: {\n imports: [\"TagSetEditor\", \"StatusSetEditor\"],\n differences: [\"The same props. Reorder with the up and down buttons (no drag).\", \"A tone is picked in a sheet; the moves are chips, the one chosen opens its roles, confirmation and reasons below.\"],\n examples: [\n { name: \"tag-set\", title: \"Tag set\", description: \"The presets, who manages them, the most.\" },\n { name: \"status-set\", title: \"Status set\", description: \"The states in order and the moves by role.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
414
+ },
415
+ {
416
+ "path": "kind-config-editor/model.ts",
417
+ "content": "// The pure changes of the admin's editors (krizaka-ts#89, `@krizaka/organize/contract`): each takes a descriptor and gives a new one,\n// never mutating, never throwing. The rules of the contract that the editors can keep by construction are kept here — a final state has\n// no way out, the initial state is never final, a move goes to another state, a transition exists when a role may make it — and the\n// rest (`kindConfigProblems`) is shown by the editor in place. Shared by the web and React Native editors; imports types only.\nimport type { Label, Marker, StatusSet, StatusState, StatusTone, StatusTransition, TagPreset } from \"@krizaka/organize/contract\";\n\n/** The `tags` part of a `KindConfig`. */\nexport type TagSetValue = {\n writers: string[];\n userTags: boolean;\n max: number;\n presets: Record<string, TagPreset[]>;\n};\n\n/** The language of a label. */\nexport type Lang = keyof Label;\n\n/** A list with the item at `from` put at `to` (the same list when either is out of range). */\nexport function move<T>(list: readonly T[], from: number, to: number): T[] {\n if (from === to || from < 0 || to < 0 || from >= list.length || to >= list.length) return [...list];\n const next = [...list];\n const [item] = next.splice(from, 1);\n next.splice(to, 0, item as T);\n return next;\n}\n\n// --- tags ------------------------------------------------------------------------------------------------------------------\n\nconst presetsOf = (tags: TagSetValue, variant: string): TagPreset[] => tags.presets[variant] ?? [];\nconst withPresets = (tags: TagSetValue, variant: string, list: TagPreset[]): TagSetValue => ({ ...tags, presets: { ...tags.presets, [variant]: list } });\n\n/** A name as the contract keeps it: spaces collapsed, trimmed. */\nexport const cleanName = (raw: string) => raw.replace(/\\s+/g, \" \").trim();\n\n/** Adds a preset at the end — refused (same value) for an empty name or one the variant already has (case ignored). */\nexport function addPreset(tags: TagSetValue, variant: string, name: string, marker: Marker): TagSetValue {\n const clean = cleanName(name);\n if (!clean || presetsOf(tags, variant).some((p) => p.name.toLocaleLowerCase() === clean.toLocaleLowerCase())) return tags;\n return withPresets(tags, variant, [...presetsOf(tags, variant), { name: clean, marker }]);\n}\n\n/** Renames the preset at `index` (kept as typed: the editor trims on blur, so a half-typed name is not lost). */\nexport const renamePreset = (tags: TagSetValue, variant: string, index: number, name: string): TagSetValue =>\n withPresets(tags, variant, presetsOf(tags, variant).map((p, i) => (i === index ? { ...p, name } : p)));\n\nexport const recolorPreset = (tags: TagSetValue, variant: string, index: number, marker: Marker): TagSetValue =>\n withPresets(tags, variant, presetsOf(tags, variant).map((p, i) => (i === index ? { ...p, marker } : p)));\n\nexport const removePreset = (tags: TagSetValue, variant: string, index: number): TagSetValue =>\n withPresets(tags, variant, presetsOf(tags, variant).filter((_, i) => i !== index));\n\nexport const movePreset = (tags: TagSetValue, variant: string, from: number, to: number): TagSetValue => withPresets(tags, variant, move(presetsOf(tags, variant), from, to));\n\n/** The names a variant has twice (case ignored): the editor marks them in place. */\nexport function duplicatePresetNames(list: readonly TagPreset[]): Set<number> {\n const seen = new Map<string, number>();\n const twins = new Set<number>();\n list.forEach((p, i) => {\n const key = cleanName(p.name).toLocaleLowerCase();\n if (!key) return;\n const first = seen.get(key);\n if (first === undefined) seen.set(key, i);\n else twins.add(first).add(i);\n });\n return twins;\n}\n\n/** The most tags per scope and kind: the contract's 1 to 200. */\nexport const clampMax = (value: number, ceiling = 200) => (Number.isFinite(value) ? Math.min(ceiling, Math.max(1, Math.round(value))) : 1);\n\nexport const toggleRole = (roles: readonly string[], role: string): string[] => (roles.includes(role) ? roles.filter((r) => r !== role) : [...roles, role]);\n\n// --- statuses --------------------------------------------------------------------------------------------------------------\n\n/** The smallest `<prefix>_<n>` key no one holds yet. */\nexport function freshKey(taken: readonly string[], prefix = \"state\"): string {\n let n = taken.length + 1;\n while (taken.includes(`${prefix}_${n}`)) n += 1;\n return `${prefix}_${n}`;\n}\n\nexport const transitionOf = (set: StatusSet, from: string, to: string): StatusTransition | undefined => set.transitions.find((t) => t.from === from && t.to === to);\nexport const isFinal = (set: StatusSet, key: string) => Boolean(set.states.find((s) => s.key === key)?.final);\n\nconst withStates = (set: StatusSet, states: StatusState[], rest: Partial<StatusSet> = {}): StatusSet => ({ ...set, states, ...rest });\n\n/** Adds a state at the end (its key is fresh, its tone neutral); refused past `limit` (the contract's 12). */\nexport function addState(set: StatusSet, label: Label, limit = 12): StatusSet {\n if (set.states.length >= limit) return set;\n return withStates(set, [...set.states, { key: freshKey(set.states.map((s) => s.key)), label: { ...label }, tone: \"neutral\" }]);\n}\n\n/** Removes a state with every move that touches it; the initial state falls back to the first state that is not final. */\nexport function removeState(set: StatusSet, key: string): StatusSet {\n const states = set.states.filter((s) => s.key !== key);\n const transitions = set.transitions.filter((t) => t.from !== key && t.to !== key);\n const initial = set.initial === key ? states.find((s) => !s.final)?.key : set.initial;\n return withStates(set, states, { transitions, initial });\n}\n\nexport const setStateLabel = (set: StatusSet, key: string, lang: Lang, text: string): StatusSet =>\n withStates(set, set.states.map((s) => (s.key === key ? { ...s, label: { ...s.label, [lang]: text } } : s)));\n\nexport const setStateTone = (set: StatusSet, key: string, tone: StatusTone): StatusSet =>\n withStates(set, set.states.map((s) => (s.key === key ? { ...s, tone } : s)));\n\n/** Moves a state in the set's order — the order of a status column. */\nexport const moveState = (set: StatusSet, from: number, to: number): StatusSet => withStates(set, move(set.states, from, to));\n\n/** Makes a state final (its moves out are dropped: a final state has no way out) or not. Refused for the initial state: it is never final. */\nexport function setFinal(set: StatusSet, key: string, final: boolean): StatusSet {\n if (final && set.initial === key) return set;\n const states = set.states.map((s) => (s.key === key ? { ...s, final } : s));\n return withStates(set, states, final ? { transitions: set.transitions.filter((t) => t.from !== key) } : {});\n}\n\n/** The state of an entity nobody moved yet. Refused for a final state. */\nexport const setInitial = (set: StatusSet, key: string): StatusSet => (isFinal(set, key) || !set.states.some((s) => s.key === key) ? set : { ...set, initial: key });\n\nconst replaceTransition = (set: StatusSet, from: string, to: string, next: StatusTransition | null): StatusSet => {\n const kept = set.transitions.filter((t) => !(t.from === from && t.to === to));\n return { ...set, transitions: next ? [...kept, next] : kept };\n};\n\n/** The roles that may make `from → to`. No role removes the move. Refused out of a final state and onto itself. */\nexport function setTransitionRoles(set: StatusSet, from: string, to: string, roles: readonly string[]): StatusSet {\n if (from === to || isFinal(set, from)) return set;\n if (roles.length === 0) return replaceTransition(set, from, to, null);\n const current = transitionOf(set, from, to);\n return replaceTransition(set, from, to, { ...current, from, to, roles: [...roles] });\n}\n\n/** Asks for a second press on this move (off by default). */\nexport function setTransitionConfirm(set: StatusSet, from: string, to: string, confirm: boolean): StatusSet {\n const current = transitionOf(set, from, to);\n if (!current) return set;\n const { confirm: _old, ...rest } = current;\n return replaceTransition(set, from, to, confirm ? { ...rest, confirm: true } : rest);\n}\n\n/** The reasons a mover may pick for this move, as data; none removes the list (no reason is accepted). */\nexport function setTransitionReasons(set: StatusSet, from: string, to: string, reasons: StatusTransition[\"reasons\"]): StatusSet {\n const current = transitionOf(set, from, to);\n if (!current) return set;\n const { reasons: _old, ...rest } = current;\n return replaceTransition(set, from, to, reasons && reasons.length > 0 ? { ...rest, reasons: [...reasons] } : rest);\n}\n\n/** Adds an empty reason to a move (the editor then asks for its two labels). */\nexport function addReason(set: StatusSet, from: string, to: string, label: Label): StatusSet {\n const current = transitionOf(set, from, to);\n if (!current) return set;\n const reasons = current.reasons ?? [];\n return setTransitionReasons(set, from, to, [...reasons, { key: freshKey(reasons.map((r) => r.key), \"reason\"), label: { ...label } }]);\n}\n"
418
+ },
419
+ {
420
+ "path": "meta.ts",
421
+ "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 ui.krizaka.com (apps/site) renders as\n// ui.krizaka.com/components/<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 | \"notification-preferences\"\n | \"quota-meter\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"captcha\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"chip-row\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"docs-nav\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"engine-flow\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"meta-row\"\n | \"waveform\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\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"
422
+ }
423
+ ],
424
+ "dependencies": [
425
+ "@krizaka/organize@^0.4.0"
426
+ ],
427
+ "registryDependencies": [
428
+ "button",
429
+ "chip",
430
+ "cn",
431
+ "field",
432
+ "settings-layout",
433
+ "switch"
434
+ ],
435
+ "demo": {
436
+ "path": "examples/kind-config-editor/tag-set.tsx",
437
+ "content": "\"use client\";\n\nimport { TagSetEditor, type TagSetValue } from \"@krizaka/ui/kind-config-editor\";\nimport * as React from \"react\";\n\nconst ROLES = [{ key: \"owner\", label: \"Owner\" }, { key: \"manager\", label: \"Manager\" }, { key: \"staff\", label: \"Staff\" }];\n\n// The client tags of a fictitious hair studio, per trade: the presets, who writes, whether people add their own. The editor hands\n// the value back; the product posts it. The problems are shown in place.\nexport default function TagSetEditorExample() {\n const [tags, setTags] = React.useState<TagSetValue>({\n writers: [\"owner\", \"manager\"], userTags: true, max: 30,\n presets: { default: [{ name: \"Regular\", marker: \"blue\" }, { name: \"To follow up\", marker: \"amber\" }, { name: \"Gift cards\", marker: \"violet\" }] },\n });\n // In a product: `kindConfigProblems(config)` of @krizaka/organize/contract, the server's own rules.\n const problems = tags.max < 1 || tags.max > 200 ? [\"tags.max: 1 to 200\"] : [];\n return <TagSetEditor value={tags} onChange={setTags} variant=\"default\" roles={ROLES} problems={problems} />;\n}\n"
438
+ },
439
+ "props": [
440
+ {
441
+ "component": "StatusSetEditor",
442
+ "description": "The admin's status set: the states in their order (FR and EN, tone, final), the initial state, and the moves from × to.",
443
+ "props": [
444
+ {
445
+ "name": "onChange",
446
+ "type": "(value: StatusSet) => void",
447
+ "default": null,
448
+ "description": "Called with the whole set after every change.",
449
+ "required": true
450
+ },
451
+ {
452
+ "name": "roles",
453
+ "type": "readonly EditorRole[]",
454
+ "default": null,
455
+ "description": "The roles of the product that can make a move.",
456
+ "required": true
457
+ },
458
+ {
459
+ "name": "value",
460
+ "type": "StatusSet",
461
+ "default": null,
462
+ "description": "The kind's status set (`KindConfig.status`).",
463
+ "required": true
464
+ },
465
+ {
466
+ "name": "className",
467
+ "type": "string",
468
+ "default": null,
469
+ "description": "Classes merged on the root.",
470
+ "required": false
471
+ },
472
+ {
473
+ "name": "disabled",
474
+ "type": "boolean",
475
+ "default": null,
476
+ "description": "Not available.",
477
+ "required": false
478
+ },
479
+ {
480
+ "name": "labels",
481
+ "type": "Partial<StatusSetEditorLabels>",
482
+ "default": null,
483
+ "description": "The words, passed translated (English by default).",
484
+ "required": false
485
+ },
486
+ {
487
+ "name": "locale",
488
+ "type": "keyof Label",
489
+ "default": "en",
490
+ "description": "The language the states are named in elsewhere in the editor (the moves' names).",
491
+ "required": false
492
+ },
493
+ {
494
+ "name": "problems",
495
+ "type": "readonly string[]",
496
+ "default": null,
497
+ "description": "What `kindConfigProblems` found (the server's own rules), shown above the list.",
498
+ "required": false
499
+ }
500
+ ]
501
+ },
502
+ {
503
+ "component": "TagSetEditor",
504
+ "description": "The admin's tag set: the presets of a variant (name, colour, order), who writes, whether people add their own, the most.",
505
+ "props": [
506
+ {
507
+ "name": "onChange",
508
+ "type": "(value: TagSetValue) => void",
509
+ "default": null,
510
+ "description": "Called with the whole set after every change.",
511
+ "required": true
512
+ },
513
+ {
514
+ "name": "roles",
515
+ "type": "readonly EditorRole[]",
516
+ "default": null,
517
+ "description": "The roles of the product that can write tags.",
518
+ "required": true
519
+ },
520
+ {
521
+ "name": "value",
522
+ "type": "TagSetValue",
523
+ "default": null,
524
+ "description": "The `tags` of the kind's configuration (`KindConfig.tags`).",
525
+ "required": true
526
+ },
527
+ {
528
+ "name": "variant",
529
+ "type": "string",
530
+ "default": null,
531
+ "description": "The variant whose presets are edited (a trade, or `default`).",
532
+ "required": true
533
+ },
534
+ {
535
+ "name": "className",
536
+ "type": "string",
537
+ "default": null,
538
+ "description": "Classes merged on the root.",
539
+ "required": false
540
+ },
541
+ {
542
+ "name": "disabled",
543
+ "type": "boolean",
544
+ "default": null,
545
+ "description": "Not available.",
546
+ "required": false
547
+ },
548
+ {
549
+ "name": "labels",
550
+ "type": "Partial<TagSetEditorLabels>",
551
+ "default": null,
552
+ "description": "The words, passed translated (English by default).",
553
+ "required": false
554
+ },
555
+ {
556
+ "name": "problems",
557
+ "type": "readonly string[]",
558
+ "default": null,
559
+ "description": "What `kindConfigProblems` found (the server's own rules), shown above the list.",
560
+ "required": false
561
+ }
562
+ ]
563
+ }
564
+ ]
565
+ }