@krizaka/ui 3.53.0 → 3.55.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 (504) hide show
  1. package/README.md +1 -0
  2. package/dist/account-menu.d.ts +6 -2
  3. package/dist/account-menu.js +8 -1
  4. package/dist/account-menu.js.map +1 -1
  5. package/dist/account-settings.js +28 -88
  6. package/dist/account-settings.js.map +1 -1
  7. package/dist/anatomy-plate.d.ts +4 -1
  8. package/dist/anatomy-plate.js +4 -0
  9. package/dist/anatomy-plate.js.map +1 -1
  10. package/dist/app-header/search.d.ts +63 -0
  11. package/dist/app-header/search.js +70 -0
  12. package/dist/app-header/search.js.map +1 -0
  13. package/dist/app-header.d.ts +88 -4
  14. package/dist/app-header.js +63 -5
  15. package/dist/app-header.js.map +1 -1
  16. package/dist/app-shell.js +31 -40
  17. package/dist/app-shell.js.map +1 -1
  18. package/dist/argument-card.js +3 -3
  19. package/dist/bird-plate.d.ts +3 -1
  20. package/dist/bird-plate.js +2 -2
  21. package/dist/bird-plate.js.map +1 -1
  22. package/dist/blocks.css +202 -27
  23. package/dist/chapter.d.ts +20 -3
  24. package/dist/chapter.js +82 -31
  25. package/dist/chapter.js.map +1 -1
  26. package/dist/chat.js +2 -2
  27. package/dist/chat.js.map +1 -1
  28. package/dist/checkbox.js +1 -1
  29. package/dist/checkbox.js.map +1 -1
  30. package/dist/chip.js +5 -98
  31. package/dist/chip.js.map +1 -1
  32. package/dist/choice-grid.js +28 -88
  33. package/dist/choice-grid.js.map +1 -1
  34. package/dist/{chunk-YGIN2YIY.js → chunk-3X3OF4TI.js} +2 -2
  35. package/dist/chunk-3X3OF4TI.js.map +1 -0
  36. package/dist/chunk-5VEVYDVC.js +11 -0
  37. package/dist/chunk-5VEVYDVC.js.map +1 -0
  38. package/dist/chunk-7U5TXA5Q.js +105 -0
  39. package/dist/chunk-7U5TXA5Q.js.map +1 -0
  40. package/dist/{chunk-KBQD6HE3.js → chunk-AEP3K4YD.js} +3 -3
  41. package/dist/{chunk-KBQD6HE3.js.map → chunk-AEP3K4YD.js.map} +1 -1
  42. package/dist/chunk-BDIU5LZB.js +18 -0
  43. package/dist/chunk-BDIU5LZB.js.map +1 -0
  44. package/dist/chunk-CSRKYZ53.js +39 -0
  45. package/dist/chunk-CSRKYZ53.js.map +1 -0
  46. package/dist/chunk-HEKDKM5Y.js +128 -0
  47. package/dist/chunk-HEKDKM5Y.js.map +1 -0
  48. package/dist/chunk-KGLRZMCY.js +16 -0
  49. package/dist/chunk-KGLRZMCY.js.map +1 -0
  50. package/dist/chunk-KID32IRJ.js +18 -0
  51. package/dist/chunk-KID32IRJ.js.map +1 -0
  52. package/dist/{chunk-ZQW7LF4Y.js → chunk-OIMXKRXF.js} +2 -2
  53. package/dist/{chunk-YHKTYFOQ.js → chunk-QWKCNSPF.js} +271 -47
  54. package/dist/chunk-QWKCNSPF.js.map +1 -0
  55. package/dist/{chunk-4LYKBSOG.js → chunk-USPOIQV5.js} +2 -2
  56. package/dist/chunk-USPOIQV5.js.map +1 -0
  57. package/dist/{chunk-7NRSPHAF.js → chunk-VB7MWE2N.js} +2 -2
  58. package/dist/{chunk-7NRSPHAF.js.map → chunk-VB7MWE2N.js.map} +1 -1
  59. package/dist/chunk-VIPSZXO4.js +103 -0
  60. package/dist/chunk-VIPSZXO4.js.map +1 -0
  61. package/dist/chunk-YCZ7N6Q6.js +385 -0
  62. package/dist/chunk-YCZ7N6Q6.js.map +1 -0
  63. package/dist/code-block.js +81 -98
  64. package/dist/code-block.js.map +1 -1
  65. package/dist/combobox.js +2 -2
  66. package/dist/component-page.d.ts +4 -1
  67. package/dist/component-page.js +5 -0
  68. package/dist/component-page.js.map +1 -1
  69. package/dist/continue-prompt.d.ts +4 -1
  70. package/dist/continue-prompt.js +4 -0
  71. package/dist/continue-prompt.js.map +1 -1
  72. package/dist/data-table.d.ts +60 -4
  73. package/dist/data-table.js +19 -7
  74. package/dist/date-picker.js +2 -2
  75. package/dist/date-picker.js.map +1 -1
  76. package/dist/detail-layout.d.ts +28 -17
  77. package/dist/detail-layout.js +73 -16
  78. package/dist/detail-layout.js.map +1 -1
  79. package/dist/doodle.d.ts +21 -0
  80. package/dist/doodle.js +39 -0
  81. package/dist/doodle.js.map +1 -0
  82. package/dist/drop-overlay.d.ts +12 -4
  83. package/dist/drop-overlay.js +16 -6
  84. package/dist/drop-overlay.js.map +1 -1
  85. package/dist/elephant.d.ts +2 -0
  86. package/dist/elephant.js +4 -0
  87. package/dist/elephant.js.map +1 -1
  88. package/dist/field.js +1 -1
  89. package/dist/field.js.map +1 -1
  90. package/dist/filter-bar.js +2 -2
  91. package/dist/force-update-screen.d.ts +5 -1
  92. package/dist/force-update-screen.js +4 -0
  93. package/dist/force-update-screen.js.map +1 -1
  94. package/dist/gallery-page.d.ts +4 -1
  95. package/dist/gallery-page.js +4 -0
  96. package/dist/gallery-page.js.map +1 -1
  97. package/dist/genui.js +5 -5
  98. package/dist/image-cropper.d.ts +10 -2
  99. package/dist/image-cropper.js +4 -0
  100. package/dist/image-cropper.js.map +1 -1
  101. package/dist/kanban.d.ts +3 -0
  102. package/dist/kanban.js +4 -0
  103. package/dist/kanban.js.map +1 -1
  104. package/dist/landscape.d.ts +4 -1
  105. package/dist/landscape.js +4 -0
  106. package/dist/landscape.js.map +1 -1
  107. package/dist/list.js +1 -1
  108. package/dist/maintenance-screen.d.ts +5 -1
  109. package/dist/maintenance-screen.js +4 -0
  110. package/dist/maintenance-screen.js.map +1 -1
  111. package/dist/map.js +6 -0
  112. package/dist/map.js.map +1 -1
  113. package/dist/markdown.d.ts +5 -1
  114. package/dist/markdown.js +12 -5
  115. package/dist/markdown.js.map +1 -1
  116. package/dist/match-dialog.d.ts +4 -1
  117. package/dist/match-dialog.js +4 -0
  118. package/dist/match-dialog.js.map +1 -1
  119. package/dist/media-capture.d.ts +6 -1
  120. package/dist/media-capture.js +4 -0
  121. package/dist/media-capture.js.map +1 -1
  122. package/dist/meter.js +5 -121
  123. package/dist/meter.js.map +1 -1
  124. package/dist/native/map.js +6 -0
  125. package/dist/native/map.js.map +1 -1
  126. package/dist/native/markdown.d.ts +9 -2
  127. package/dist/native/markdown.js +46 -7
  128. package/dist/native/markdown.js.map +1 -1
  129. package/dist/native/media-capture.d.ts +1 -0
  130. package/dist/native/media-capture.js +5 -0
  131. package/dist/native/media-capture.js.map +1 -1
  132. package/dist/native/vertical-video.d.ts +8 -2
  133. package/dist/native/vertical-video.js +6 -0
  134. package/dist/native/vertical-video.js.map +1 -1
  135. package/dist/native.d.ts +94 -4
  136. package/dist/native.js +1236 -1110
  137. package/dist/native.js.map +1 -1
  138. package/dist/nav-bar/me.d.ts +32 -0
  139. package/dist/nav-bar/me.js +23 -0
  140. package/dist/nav-bar/me.js.map +1 -0
  141. package/dist/nav-bar.d.ts +60 -2
  142. package/dist/nav-bar.js +92 -48
  143. package/dist/nav-bar.js.map +1 -1
  144. package/dist/notification-preferences.d.ts +151 -0
  145. package/dist/notification-preferences.js +77 -0
  146. package/dist/notification-preferences.js.map +1 -0
  147. package/dist/page-header.js +1 -1
  148. package/dist/page-header.js.map +1 -1
  149. package/dist/pointer-light.js +5 -0
  150. package/dist/pointer-light.js.map +1 -1
  151. package/dist/product-page.d.ts +4 -1
  152. package/dist/product-page.js +4 -0
  153. package/dist/product-page.js.map +1 -1
  154. package/dist/profile-card.d.ts +119 -1
  155. package/dist/profile-card.js +68 -21
  156. package/dist/profile-card.js.map +1 -1
  157. package/dist/promise-card.d.ts +4 -1
  158. package/dist/promise-card.js +4 -0
  159. package/dist/promise-card.js.map +1 -1
  160. package/dist/quota-meter.d.ts +113 -0
  161. package/dist/quota-meter.js +58 -0
  162. package/dist/quota-meter.js.map +1 -0
  163. package/dist/radio-group.js +6 -8
  164. package/dist/radio-group.js.map +1 -1
  165. package/dist/rail-nav.d.ts +18 -2
  166. package/dist/rail-nav.js +25 -2
  167. package/dist/rail-nav.js.map +1 -1
  168. package/dist/retro-tv.d.ts +30 -0
  169. package/dist/retro-tv.js +124 -0
  170. package/dist/retro-tv.js.map +1 -0
  171. package/dist/router.d.ts +12 -1
  172. package/dist/router.js +85 -8
  173. package/dist/router.js.map +1 -1
  174. package/dist/scroll-stage.d.ts +5 -1
  175. package/dist/scroll-stage.js +5 -0
  176. package/dist/scroll-stage.js.map +1 -1
  177. package/dist/search-field.js +1 -1
  178. package/dist/showcase.d.ts +9 -2
  179. package/dist/showcase.js +5 -0
  180. package/dist/showcase.js.map +1 -1
  181. package/dist/signature.d.ts +19 -0
  182. package/dist/signature.js +39 -0
  183. package/dist/signature.js.map +1 -0
  184. package/dist/site-footer.js +1 -1
  185. package/dist/sites.js +1 -1
  186. package/dist/sites.js.map +1 -1
  187. package/dist/slot.d.ts +1 -1
  188. package/dist/stat.js +1 -1
  189. package/dist/stat.js.map +1 -1
  190. package/dist/status-page.d.ts +4 -1
  191. package/dist/status-page.js +5 -0
  192. package/dist/status-page.js.map +1 -1
  193. package/dist/stuck.d.ts +27 -0
  194. package/dist/stuck.js +26 -0
  195. package/dist/stuck.js.map +1 -0
  196. package/dist/swipe-deck.d.ts +9 -2
  197. package/dist/swipe-deck.js +5 -0
  198. package/dist/swipe-deck.js.map +1 -1
  199. package/dist/switch.js +4 -32
  200. package/dist/switch.js.map +1 -1
  201. package/dist/tabs.d.ts +47 -8
  202. package/dist/tabs.js +62 -12
  203. package/dist/tabs.js.map +1 -1
  204. package/dist/tag-input.js +2 -2
  205. package/dist/tag-selector.js +1 -1
  206. package/dist/terminal-replay.d.ts +4 -1
  207. package/dist/terminal-replay.js +4 -0
  208. package/dist/terminal-replay.js.map +1 -1
  209. package/dist/tree-view.js +4 -0
  210. package/dist/tree-view.js.map +1 -1
  211. package/dist/update-prompt.d.ts +5 -1
  212. package/dist/update-prompt.js +4 -0
  213. package/dist/update-prompt.js.map +1 -1
  214. package/dist/video-player.js +7 -376
  215. package/dist/video-player.js.map +1 -1
  216. package/dist/video-trimmer.d.ts +6 -1
  217. package/dist/video-trimmer.js +4 -0
  218. package/dist/video-trimmer.js.map +1 -1
  219. package/package.json +143 -31
  220. package/registry/account-menu.json +9 -8
  221. package/registry/account-settings.json +2 -2
  222. package/registry/achievement.json +3 -4
  223. package/registry/action-bar.json +3 -3
  224. package/registry/action-sheet.json +1 -0
  225. package/registry/activity-feed.json +2 -1
  226. package/registry/agenda.json +1 -1
  227. package/registry/alert.json +1 -1
  228. package/registry/anatomy-plate.json +13 -5
  229. package/registry/app-header.json +470 -23
  230. package/registry/app-shell.json +2 -2
  231. package/registry/argument-card.json +1 -1
  232. package/registry/audio-player.json +1 -1
  233. package/registry/auth-layout.json +1 -1
  234. package/registry/avatar.json +3 -2
  235. package/registry/badge.json +2 -1
  236. package/registry/bird-plate.json +16 -2
  237. package/registry/button.json +7 -6
  238. package/registry/captcha.json +1 -1
  239. package/registry/card-grid.json +1 -1
  240. package/registry/card.json +7 -6
  241. package/registry/catalogue-page.json +3 -4
  242. package/registry/changelog-page.json +3 -5
  243. package/registry/chapter.json +46 -10
  244. package/registry/chat.json +3 -2
  245. package/registry/checkbox.json +4 -3
  246. package/registry/chip-link.json +2 -2
  247. package/registry/chip-row.json +2 -2
  248. package/registry/chip.json +3 -2
  249. package/registry/choice-grid.json +3 -4
  250. package/registry/code-block.json +1 -1
  251. package/registry/combobox.json +3 -2
  252. package/registry/command.json +2 -2
  253. package/registry/comparison-table.json +1 -1
  254. package/registry/component-page.json +14 -5
  255. package/registry/confirm-button.json +4 -4
  256. package/registry/contact-page.json +1 -1
  257. package/registry/continue-prompt.json +13 -5
  258. package/registry/countdown.json +4 -3
  259. package/registry/cover-hero.json +3 -4
  260. package/registry/cta-panel.json +1 -1
  261. package/registry/dashboard-layout.json +1 -1
  262. package/registry/data-table.json +63 -7
  263. package/registry/date-picker.json +5 -4
  264. package/registry/decision-list.json +1 -1
  265. package/registry/description-list.json +2 -1
  266. package/registry/detail-layout.json +30 -6
  267. package/registry/dialog.json +7 -6
  268. package/registry/docs-article-page.json +3 -4
  269. package/registry/docs-hub-page.json +1 -1
  270. package/registry/docs-layout.json +1 -1
  271. package/registry/docs-nav.json +1 -1
  272. package/registry/document-viewer.json +3 -5
  273. package/registry/doodle.json +209 -0
  274. package/registry/drop-overlay.json +30 -16
  275. package/registry/dropdown-menu.json +2 -2
  276. package/registry/elephant.json +15 -7
  277. package/registry/empty-state.json +2 -1
  278. package/registry/engine-flow.json +1 -1
  279. package/registry/error-page.json +3 -5
  280. package/registry/examples/app-header/family.d.ts +4 -0
  281. package/registry/examples/app-header/family.js +41 -0
  282. package/registry/examples/app-header/family.tsx +37 -0
  283. package/registry/examples/app-header/native/family.d.ts +4 -0
  284. package/registry/examples/app-header/native/family.dark.png +0 -0
  285. package/registry/examples/app-header/native/family.js +25 -0
  286. package/registry/examples/app-header/native/family.light.png +0 -0
  287. package/registry/examples/app-header/native/family.tsx +33 -0
  288. package/registry/examples/chapter/album.d.ts +4 -0
  289. package/registry/examples/chapter/album.js +34 -0
  290. package/registry/examples/chapter/album.tsx +30 -0
  291. package/registry/examples/chapter/in-ruled-page.d.ts +4 -0
  292. package/registry/examples/chapter/in-ruled-page.js +23 -0
  293. package/registry/examples/chapter/in-ruled-page.tsx +19 -0
  294. package/registry/examples/data-table/applicant-files.d.ts +4 -0
  295. package/registry/examples/data-table/applicant-files.js +24 -0
  296. package/registry/examples/data-table/applicant-files.tsx +23 -0
  297. package/registry/examples/data-table/checks.d.ts +4 -0
  298. package/registry/examples/data-table/checks.js +25 -0
  299. package/registry/examples/data-table/checks.tsx +24 -0
  300. package/registry/examples/detail-layout/profile.d.ts +4 -0
  301. package/registry/examples/detail-layout/profile.js +26 -0
  302. package/registry/examples/detail-layout/profile.tsx +21 -0
  303. package/registry/examples/doodle/kinds.d.ts +4 -0
  304. package/registry/examples/doodle/kinds.js +17 -0
  305. package/registry/examples/doodle/kinds.tsx +14 -0
  306. package/registry/examples/doodle/margin.d.ts +4 -0
  307. package/registry/examples/doodle/margin.js +17 -0
  308. package/registry/examples/doodle/margin.tsx +17 -0
  309. package/registry/examples/markdown/native/basic.dark.png +0 -0
  310. package/registry/examples/markdown/native/basic.light.png +0 -0
  311. package/registry/examples/markdown/native/wide-table.d.ts +4 -0
  312. package/registry/examples/markdown/native/wide-table.dark.png +0 -0
  313. package/registry/examples/markdown/native/wide-table.js +23 -0
  314. package/registry/examples/markdown/native/wide-table.light.png +0 -0
  315. package/registry/examples/markdown/native/wide-table.tsx +22 -0
  316. package/registry/examples/markdown/wide-table.d.ts +4 -0
  317. package/registry/examples/markdown/wide-table.js +28 -0
  318. package/registry/examples/markdown/wide-table.tsx +23 -0
  319. package/registry/examples/nav-bar/family-product.js +2 -4
  320. package/registry/examples/nav-bar/family-product.tsx +3 -5
  321. package/registry/examples/notification-preferences/default.d.ts +4 -0
  322. package/registry/examples/notification-preferences/default.js +29 -0
  323. package/registry/examples/notification-preferences/default.tsx +28 -0
  324. package/registry/examples/profile-card/banner.d.ts +4 -0
  325. package/registry/examples/profile-card/banner.js +28 -0
  326. package/registry/examples/profile-card/banner.tsx +24 -0
  327. package/registry/examples/profile-card/native/banner.d.ts +4 -0
  328. package/registry/examples/profile-card/native/banner.dark.png +0 -0
  329. package/registry/examples/profile-card/native/banner.js +22 -0
  330. package/registry/examples/profile-card/native/banner.light.png +0 -0
  331. package/registry/examples/profile-card/native/banner.tsx +18 -0
  332. package/registry/examples/quota-meter/default.d.ts +4 -0
  333. package/registry/examples/quota-meter/default.js +26 -0
  334. package/registry/examples/quota-meter/default.tsx +20 -0
  335. package/registry/examples/quota-meter/full.d.ts +4 -0
  336. package/registry/examples/quota-meter/full.js +25 -0
  337. package/registry/examples/quota-meter/full.tsx +18 -0
  338. package/registry/examples/rail-nav/shortcuts.d.ts +4 -0
  339. package/registry/examples/rail-nav/shortcuts.js +49 -0
  340. package/registry/examples/rail-nav/shortcuts.tsx +40 -0
  341. package/registry/examples/retro-tv/cabinet.d.ts +4 -0
  342. package/registry/examples/retro-tv/cabinet.js +12 -0
  343. package/registry/examples/retro-tv/cabinet.tsx +7 -0
  344. package/registry/examples/retro-tv/portable.d.ts +4 -0
  345. package/registry/examples/retro-tv/portable.js +12 -0
  346. package/registry/examples/retro-tv/portable.tsx +7 -0
  347. package/registry/examples/signature/both.d.ts +4 -0
  348. package/registry/examples/signature/both.js +11 -0
  349. package/registry/examples/signature/both.tsx +6 -0
  350. package/registry/examples/signature/variants.d.ts +4 -0
  351. package/registry/examples/signature/variants.js +14 -0
  352. package/registry/examples/signature/variants.tsx +11 -0
  353. package/registry/examples/stuck/card.d.ts +4 -0
  354. package/registry/examples/stuck/card.js +13 -0
  355. package/registry/examples/stuck/card.tsx +14 -0
  356. package/registry/examples/stuck/holds.d.ts +4 -0
  357. package/registry/examples/stuck/holds.js +12 -0
  358. package/registry/examples/stuck/holds.tsx +16 -0
  359. package/registry/examples/stuck/tag.d.ts +4 -0
  360. package/registry/examples/stuck/tag.js +12 -0
  361. package/registry/examples/stuck/tag.tsx +13 -0
  362. package/registry/examples/tabs/binder.d.ts +4 -0
  363. package/registry/examples/tabs/binder.js +22 -0
  364. package/registry/examples/tabs/binder.tsx +20 -0
  365. package/registry/examples/tabs/native/binder.d.ts +4 -0
  366. package/registry/examples/tabs/native/binder.dark.png +0 -0
  367. package/registry/examples/tabs/native/binder.js +26 -0
  368. package/registry/examples/tabs/native/binder.light.png +0 -0
  369. package/registry/examples/tabs/native/binder.tsx +22 -0
  370. package/registry/fab.json +1 -0
  371. package/registry/field.json +3 -2
  372. package/registry/file-upload.json +6 -11
  373. package/registry/filter-bar.json +2 -2
  374. package/registry/flock.json +3 -4
  375. package/registry/footnote.json +2 -3
  376. package/registry/force-update-screen.json +14 -5
  377. package/registry/form.json +5 -4
  378. package/registry/gallery-page.json +14 -5
  379. package/registry/genui.json +2 -2
  380. package/registry/glossary-term.json +1 -1
  381. package/registry/glossary.json +1 -1
  382. package/registry/glow-card.json +2 -2
  383. package/registry/goal-gauge.json +2 -1
  384. package/registry/header.json +1 -0
  385. package/registry/how-it-works-page.json +3 -5
  386. package/registry/image-cropper.json +13 -5
  387. package/registry/image-viewer.json +3 -4
  388. package/registry/index.json +306 -91
  389. package/registry/iso.json +1 -1
  390. package/registry/kanban.json +13 -5
  391. package/registry/kbd.json +1 -1
  392. package/registry/kpi-explained.json +2 -2
  393. package/registry/landing-page.json +3 -5
  394. package/registry/landscape.json +13 -5
  395. package/registry/language-switch.json +1 -1
  396. package/registry/legal-page.json +1 -1
  397. package/registry/link-card.json +1 -1
  398. package/registry/list.json +2 -1
  399. package/registry/loader.json +2 -1
  400. package/registry/longform-page.json +1 -1
  401. package/registry/maintenance-screen.json +14 -5
  402. package/registry/map.json +3 -2
  403. package/registry/markdown.json +86 -9
  404. package/registry/marketing-layout.json +1 -1
  405. package/registry/marquee.json +1 -1
  406. package/registry/mascot-quote.json +1 -1
  407. package/registry/mascot-state.json +12 -11
  408. package/registry/mascots.json +2 -1
  409. package/registry/match-dialog.json +14 -5
  410. package/registry/media-capture.json +14 -5
  411. package/registry/media-gallery.json +3 -5
  412. package/registry/media-grid.json +1 -1
  413. package/registry/media-picker.json +2 -3
  414. package/registry/meta-row.json +2 -1
  415. package/registry/meter.json +4 -3
  416. package/registry/nav-bar.json +100 -9
  417. package/registry/next-actions.json +1 -1
  418. package/registry/notification-preferences.json +250 -0
  419. package/registry/number-ticker.json +2 -1
  420. package/registry/onboarding.json +1 -0
  421. package/registry/opening-hours.json +1 -1
  422. package/registry/otp-input.json +1 -0
  423. package/registry/page-header.json +2 -2
  424. package/registry/page-hero.json +1 -1
  425. package/registry/page-index.json +1 -1
  426. package/registry/page.json +3 -3
  427. package/registry/pagination.json +2 -1
  428. package/registry/permission-prompt.json +2 -2
  429. package/registry/photo-grid.json +4 -4
  430. package/registry/pointer-light.json +6 -2
  431. package/registry/popover.json +2 -2
  432. package/registry/pricing-page.json +4 -6
  433. package/registry/product-page.json +14 -5
  434. package/registry/profile-card.json +232 -8
  435. package/registry/progress.json +4 -3
  436. package/registry/promise-card.json +13 -5
  437. package/registry/pull-to-refresh.json +1 -0
  438. package/registry/quota-meter.json +308 -0
  439. package/registry/radio-group.json +4 -3
  440. package/registry/rail-nav.json +48 -10
  441. package/registry/recipes.json +1 -1
  442. package/registry/retro-tv.json +478 -0
  443. package/registry/router.json +3 -3
  444. package/registry/screen.json +1 -0
  445. package/registry/scroll-stage.json +14 -5
  446. package/registry/search-field.json +3 -2
  447. package/registry/section-backdrop.json +1 -1
  448. package/registry/segmented.json +1 -0
  449. package/registry/separator.json +2 -2
  450. package/registry/service-card.json +1 -1
  451. package/registry/settings-layout.json +2 -1
  452. package/registry/showcase.json +14 -5
  453. package/registry/signature.json +185 -0
  454. package/registry/site-footer.json +3 -3
  455. package/registry/sites.json +2 -2
  456. package/registry/skeleton.json +2 -1
  457. package/registry/skip-link.json +1 -1
  458. package/registry/slider.json +5 -4
  459. package/registry/slot-picker.json +1 -1
  460. package/registry/slot.json +2 -2
  461. package/registry/specimen-tag.json +1 -1
  462. package/registry/spinner.json +4 -3
  463. package/registry/splash-handoff.json +1 -0
  464. package/registry/split-view.json +1 -1
  465. package/registry/stage-banner.json +2 -3
  466. package/registry/stat.json +2 -2
  467. package/registry/status-page.json +13 -5
  468. package/registry/step-progress.json +2 -1
  469. package/registry/step-showcase.json +3 -5
  470. package/registry/stepper.json +2 -1
  471. package/registry/sticky-action.json +1 -1
  472. package/registry/stuck.json +219 -0
  473. package/registry/swipe-deck.json +14 -5
  474. package/registry/swipeable-row.json +1 -0
  475. package/registry/switch.json +3 -2
  476. package/registry/tab-bar.json +1 -0
  477. package/registry/tabs.json +154 -22
  478. package/registry/tag-input.json +1 -1
  479. package/registry/tag-selector.json +2 -1
  480. package/registry/taped-photo.json +1 -1
  481. package/registry/terminal-replay.json +14 -5
  482. package/registry/text-style.json +5 -5
  483. package/registry/theme.json +2 -1
  484. package/registry/toast.json +2 -1
  485. package/registry/toc.json +1 -1
  486. package/registry/tooltip.json +2 -2
  487. package/registry/tree-view.json +6 -2
  488. package/registry/txt.json +1 -0
  489. package/registry/update-prompt.json +14 -5
  490. package/registry/upload-queue.json +1 -1
  491. package/registry/verified-badge.json +6 -6
  492. package/registry/vertical-video.json +8 -3
  493. package/registry/video-player.json +5 -6
  494. package/registry/video-trimmer.json +13 -5
  495. package/registry/virtual.json +2 -2
  496. package/registry/waveform.json +4 -3
  497. package/dist/chunk-4LYKBSOG.js.map +0 -1
  498. package/dist/chunk-HHFWK2HH.js +0 -163
  499. package/dist/chunk-HHFWK2HH.js.map +0 -1
  500. package/dist/chunk-R3LTSMS5.js +0 -75
  501. package/dist/chunk-R3LTSMS5.js.map +0 -1
  502. package/dist/chunk-YGIN2YIY.js.map +0 -1
  503. package/dist/chunk-YHKTYFOQ.js.map +0 -1
  504. /package/dist/{chunk-ZQW7LF4Y.js.map → chunk-OIMXKRXF.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/force-update-screen/force-update-screen.tsx"],"sourcesContent":["// Server-safe. The blocking screen: this version can no longer run. It replaces the app, it is not laid over it —\n// nothing behind it is reachable. Every word is a prop; the store URL and the versions come from the backend.\nimport { Button } from \"@krizaka/ui/button\";\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const forceUpdateScreen = tv({\n slots: {\n root: \"mx-auto flex min-h-dvh w-full max-w-md flex-col items-center justify-center gap-4 px-6 py-12 text-center text-fg\",\n mark: \"flex h-24 w-24 items-center justify-center [&>svg]:h-24 [&>svg]:w-24\",\n title: \"text-2xl font-semibold text-fg\",\n message: \"text-fg-secondary\",\n version: \"font-mono text-xs text-fg-tertiary\",\n actions: \"mt-2 flex w-full flex-col gap-2\",\n },\n});\n\nexport type ForceUpdateScreenProps = Omit<React.ComponentProps<\"main\">, \"title\"> & {\n /** The headline (“Update to keep going”). */\n title: React.ReactNode;\n /** Why, in a sentence — the backend's localized `message`. */\n message?: React.ReactNode;\n /** The versions, in words and mono (“You have 1.1.0 · 1.2.0 or later is required”). */\n versionLabel?: React.ReactNode;\n /** The product's mark or mascot (decorative). */\n mark?: React.ReactNode;\n /** The button that updates (“Update the app”). */\n updateLabel: string;\n /** Opens the store page. */\n onUpdate: () => void;\n /** A secondary way (“Check again”) once the update is installed — optional. */\n retryLabel?: string;\n /** Checks the backend again. */\n onRetry?: () => void;\n};\n\n/** The forced update: one thing to do, and the way to do it. */\nexport function ForceUpdateScreen({ title, message, versionLabel, mark, updateLabel, onUpdate, retryLabel, onRetry, className, ...props }: ForceUpdateScreenProps) {\n const s = forceUpdateScreen();\n return (\n <main data-kind=\"update-force\" className={s.root({ className })} {...props}>\n {mark && (\n <div aria-hidden className={s.mark()}>\n {mark}\n </div>\n )}\n <h1 className={s.title()}>{title}</h1>\n {message && <p className={s.message()}>{message}</p>}\n {versionLabel && <p className={s.version()}>{versionLabel}</p>}\n <div className={s.actions()}>\n <Button variant=\"primary\" size=\"lg\" autoFocus onClick={onUpdate}>\n {updateLabel}\n </Button>\n {retryLabel && onRetry && (\n <Button variant=\"ghost\" onClick={onRetry}>\n {retryLabel}\n </Button>\n )}\n </div>\n </main>\n );\n}\n"],"mappings":";;;;;;;;;AAIA,SAAS,UAAU;AAsCX,cAOF,YAPE;AApCD,IAAM,oBAAoB,GAAG;AAAA,EAClC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AACF,CAAC;AAsBM,SAAS,kBAAkB,EAAE,OAAO,SAAS,cAAc,MAAM,aAAa,UAAU,YAAY,SAAS,WAAW,GAAG,MAAM,GAA2B;AACjK,QAAM,IAAI,kBAAkB;AAC5B,SACE,qBAAC,UAAK,aAAU,gBAAe,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAClE;AAAA,YACC,oBAAC,SAAI,eAAW,MAAC,WAAW,EAAE,KAAK,GAChC,gBACH;AAAA,IAEF,oBAAC,QAAG,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,IAChC,WAAW,oBAAC,OAAE,WAAW,EAAE,QAAQ,GAAI,mBAAQ;AAAA,IAC/C,gBAAgB,oBAAC,OAAE,WAAW,EAAE,QAAQ,GAAI,wBAAa;AAAA,IAC1D,qBAAC,SAAI,WAAW,EAAE,QAAQ,GACxB;AAAA,0BAAC,UAAO,SAAQ,WAAU,MAAK,MAAK,WAAS,MAAC,SAAS,UACpD,uBACH;AAAA,MACC,cAAc,WACb,oBAAC,UAAO,SAAQ,SAAQ,SAAS,SAC9B,sBACH;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/force-update-screen/force-update-screen.tsx"],"sourcesContent":["// Server-safe. The blocking screen: this version can no longer run. It replaces the app, it is not laid over it —\n// nothing behind it is reachable. Every word is a prop; the store URL and the versions come from the backend.\nimport { Button } from \"@krizaka/ui/button\";\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { warnDeprecated } from \"../deprecated\";\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const forceUpdateScreen = tv({\n slots: {\n root: \"mx-auto flex min-h-dvh w-full max-w-md flex-col items-center justify-center gap-4 px-6 py-12 text-center text-fg\",\n mark: \"flex h-24 w-24 items-center justify-center [&>svg]:h-24 [&>svg]:w-24\",\n title: \"text-2xl font-semibold text-fg\",\n message: \"text-fg-secondary\",\n version: \"font-mono text-xs text-fg-tertiary\",\n actions: \"mt-2 flex w-full flex-col gap-2\",\n },\n});\n\nexport type ForceUpdateScreenProps = Omit<React.ComponentProps<\"main\">, \"title\"> & {\n /** The headline (“Update to keep going”). */\n title: React.ReactNode;\n /** Why, in a sentence — the backend's localized `message`. */\n message?: React.ReactNode;\n /** The versions, in words and mono (“You have 1.1.0 · 1.2.0 or later is required”). */\n versionLabel?: React.ReactNode;\n /** The product's mark or mascot (decorative). */\n mark?: React.ReactNode;\n /** The button that updates (“Update the app”). */\n updateLabel: string;\n /** Opens the store page. */\n onUpdate: () => void;\n /** A secondary way (“Check again”) once the update is installed — optional. */\n retryLabel?: string;\n /** Checks the backend again. */\n onRetry?: () => void;\n};\n\n/**\n * The forced update: one thing to do, and the way to do it.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function ForceUpdateScreen({ title, message, versionLabel, mark, updateLabel, onUpdate, retryLabel, onRetry, className, ...props }: ForceUpdateScreenProps) {\n warnDeprecated(\"force-update-screen\");\n const s = forceUpdateScreen();\n return (\n <main data-kind=\"update-force\" className={s.root({ className })} {...props}>\n {mark && (\n <div aria-hidden className={s.mark()}>\n {mark}\n </div>\n )}\n <h1 className={s.title()}>{title}</h1>\n {message && <p className={s.message()}>{message}</p>}\n {versionLabel && <p className={s.version()}>{versionLabel}</p>}\n <div className={s.actions()}>\n <Button variant=\"primary\" size=\"lg\" autoFocus onClick={onUpdate}>\n {updateLabel}\n </Button>\n {retryLabel && onRetry && (\n <Button variant=\"ghost\" onClick={onRetry}>\n {retryLabel}\n </Button>\n )}\n </div>\n </main>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAIA,SAAS,UAAU;AA6CX,cAOF,YAPE;AAxCD,IAAM,oBAAoB,GAAG;AAAA,EAClC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AACF,CAAC;AAyBM,SAAS,kBAAkB,EAAE,OAAO,SAAS,cAAc,MAAM,aAAa,UAAU,YAAY,SAAS,WAAW,GAAG,MAAM,GAA2B;AACjK,iBAAe,qBAAqB;AACpC,QAAM,IAAI,kBAAkB;AAC5B,SACE,qBAAC,UAAK,aAAU,gBAAe,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAClE;AAAA,YACC,oBAAC,SAAI,eAAW,MAAC,WAAW,EAAE,KAAK,GAChC,gBACH;AAAA,IAEF,oBAAC,QAAG,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,IAChC,WAAW,oBAAC,OAAE,WAAW,EAAE,QAAQ,GAAI,mBAAQ;AAAA,IAC/C,gBAAgB,oBAAC,OAAE,WAAW,EAAE,QAAQ,GAAI,wBAAa;AAAA,IAC1D,qBAAC,SAAI,WAAW,EAAE,QAAQ,GACxB;AAAA,0BAAC,UAAO,SAAQ,WAAU,MAAK,MAAK,WAAS,MAAC,SAAS,UACpD,uBACH;AAAA,MACC,cAAc,WACb,oBAAC,UAAO,SAAQ,SAAQ,SAAS,SAC9B,sBACH;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
@@ -44,7 +44,10 @@ type GalleryPageProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
44
44
  /** The app's link component (Next's `Link`). */
45
45
  linkAs?: LinkComponent;
46
46
  };
47
- /** A demo or a gallery: hero, filters, media in staggered columns, closing call. */
47
+ /**
48
+ * A demo or a gallery: hero, filters, media in staggered columns, closing call.
49
+ * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.
50
+ */
48
51
  declare function GalleryPage({ brand, back, eyebrow, title, lead, actions, filters, galleryLabel, items, closing, linkAs, className, children, ...props }: GalleryPageProps): React.JSX.Element;
49
52
 
50
53
  export { type GalleryItem, GalleryPage, type GalleryPageProps };
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  cn
3
3
  } from "./chunk-KH3JOEPY.js";
4
+ import {
5
+ warnDeprecated
6
+ } from "./chunk-KGLRZMCY.js";
4
7
 
5
8
  // src/gallery-page/gallery-page.tsx
6
9
  import { CtaPanel } from "@krizaka/ui/cta-panel";
@@ -8,6 +11,7 @@ import { Section } from "@krizaka/ui/page";
8
11
  import { PageHero } from "@krizaka/ui/page-hero";
9
12
  import { jsx, jsxs } from "react/jsx-runtime";
10
13
  function GalleryPage({ brand, back, eyebrow, title, lead, actions, filters, galleryLabel, items, closing, linkAs, className, children, ...props }) {
14
+ warnDeprecated("gallery-page");
11
15
  return /* @__PURE__ */ jsxs("div", { className: cn(brand && "brand-" + brand, className), ...props, children: [
12
16
  /* @__PURE__ */ jsx(PageHero, { back, linkAs, eyebrow, title, lead, align: "center", backdrop: "plain", children: actions }),
13
17
  /* @__PURE__ */ jsxs(Section, { "aria-label": galleryLabel, spacing: "sm", children: [
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/gallery-page/gallery-page.tsx"],"sourcesContent":["// Server-safe. A demo or a gallery (blocks.css `.kz-tpl-gallery`): the hero, the filters as chips, then the pieces in\n// columns of different heights — each a framed media with its title and caption (a recording of the real product, an\n// image it generated, with its prompt) — and the closing call.\nimport { CtaPanel } from \"@krizaka/ui/cta-panel\";\nimport { Section } from \"@krizaka/ui/page\";\nimport type { LinkComponent } from \"@krizaka/ui/page-hero\";\nimport { PageHero } from \"@krizaka/ui/page-hero\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport interface GalleryItem {\n /** A stable key. */\n id: string;\n /** The media: an `<img>` with its `alt`, a `<video>` with its label, a VideoPlayer. */\n media: React.ReactNode;\n /** Its title. */\n title: React.ReactNode;\n /** One line: what it shows, how it was made (a prompt, a seed). */\n caption?: React.ReactNode;\n}\n\nexport type GalleryPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The brand the page wears (`.brand-<id>`). */\n brand?: string;\n /** The way back. */\n back?: { href: string; label: string };\n /** A mono line above the title. */\n eyebrow?: React.ReactNode;\n /** The page's `h1`. */\n title: React.ReactNode;\n /** One or two sentences under it. */\n lead?: React.ReactNode;\n /** The hero's actions. */\n actions?: React.ReactNode;\n /** Above the pieces: the filters (ChipLink, a Chip group) — the address says which one is on. */\n filters?: React.ReactNode;\n /** The gallery's accessible name. */\n galleryLabel: string;\n /** The pieces, featured first. */\n items: readonly GalleryItem[];\n /** After the gallery: how it was made, the facts. */\n children?: React.ReactNode;\n /** The closing call. */\n closing?: { title: React.ReactNode; body?: React.ReactNode; actions: React.ReactNode };\n /** The app's link component (Next's `Link`). */\n linkAs?: LinkComponent;\n};\n\n/** A demo or a gallery: hero, filters, media in staggered columns, closing call. */\nexport function GalleryPage({ brand, back, eyebrow, title, lead, actions, filters, galleryLabel, items, closing, linkAs, className, children, ...props }: GalleryPageProps) {\n return (\n <div className={cn(brand && \"brand-\" + brand, className)} {...props}>\n <PageHero back={back} linkAs={linkAs} eyebrow={eyebrow} title={title} lead={lead} align=\"center\" backdrop=\"plain\">\n {actions}\n </PageHero>\n <Section aria-label={galleryLabel} spacing=\"sm\">\n {filters && <div className=\"kz-tpl-filters\">{filters}</div>}\n <ul className=\"kz-tpl-gallery\">\n {items.map((item) => (\n <li key={item.id}>\n <figure className=\"kz-tpl-figure\">\n <div className=\"kz-tpl-figure-media\">{item.media}</div>\n <figcaption>\n <strong>{item.title}</strong>\n {item.caption && <span>{item.caption}</span>}\n </figcaption>\n </figure>\n </li>\n ))}\n </ul>\n </Section>\n {children}\n {closing && (\n <Section spacing=\"sm\" aria-labelledby=\"gallery-closing\">\n <CtaPanel id=\"gallery-closing\" title={closing.title} body={closing.body} reveal>\n {closing.actions}\n </CtaPanel>\n </Section>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;AAGA,SAAS,gBAAgB;AACzB,SAAS,eAAe;AAExB,SAAS,gBAAgB;AA+CnB,cAUU,YAVV;AAHC,SAAS,YAAY,EAAE,OAAO,MAAM,SAAS,OAAO,MAAM,SAAS,SAAS,cAAc,OAAO,SAAS,QAAQ,WAAW,UAAU,GAAG,MAAM,GAAqB;AAC1K,SACE,qBAAC,SAAI,WAAW,GAAG,SAAS,WAAW,OAAO,SAAS,GAAI,GAAG,OAC5D;AAAA,wBAAC,YAAS,MAAY,QAAgB,SAAkB,OAAc,MAAY,OAAM,UAAS,UAAS,SACvG,mBACH;AAAA,IACA,qBAAC,WAAQ,cAAY,cAAc,SAAQ,MACxC;AAAA,iBAAW,oBAAC,SAAI,WAAU,kBAAkB,mBAAQ;AAAA,MACrD,oBAAC,QAAG,WAAU,kBACX,gBAAM,IAAI,CAAC,SACV,oBAAC,QACC,+BAAC,YAAO,WAAU,iBAChB;AAAA,4BAAC,SAAI,WAAU,uBAAuB,eAAK,OAAM;AAAA,QACjD,qBAAC,gBACC;AAAA,8BAAC,YAAQ,eAAK,OAAM;AAAA,UACnB,KAAK,WAAW,oBAAC,UAAM,eAAK,SAAQ;AAAA,WACvC;AAAA,SACF,KAPO,KAAK,EAQd,CACD,GACH;AAAA,OACF;AAAA,IACC;AAAA,IACA,WACC,oBAAC,WAAQ,SAAQ,MAAK,mBAAgB,mBACpC,8BAAC,YAAS,IAAG,mBAAkB,OAAO,QAAQ,OAAO,MAAM,QAAQ,MAAM,QAAM,MAC5E,kBAAQ,SACX,GACF;AAAA,KAEJ;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/gallery-page/gallery-page.tsx"],"sourcesContent":["// Server-safe. A demo or a gallery (blocks.css `.kz-tpl-gallery`): the hero, the filters as chips, then the pieces in\n// columns of different heights — each a framed media with its title and caption (a recording of the real product, an\n// image it generated, with its prompt) — and the closing call.\nimport { CtaPanel } from \"@krizaka/ui/cta-panel\";\nimport { Section } from \"@krizaka/ui/page\";\nimport type { LinkComponent } from \"@krizaka/ui/page-hero\";\nimport { PageHero } from \"@krizaka/ui/page-hero\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { warnDeprecated } from \"../deprecated\";\n\nexport interface GalleryItem {\n /** A stable key. */\n id: string;\n /** The media: an `<img>` with its `alt`, a `<video>` with its label, a VideoPlayer. */\n media: React.ReactNode;\n /** Its title. */\n title: React.ReactNode;\n /** One line: what it shows, how it was made (a prompt, a seed). */\n caption?: React.ReactNode;\n}\n\nexport type GalleryPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The brand the page wears (`.brand-<id>`). */\n brand?: string;\n /** The way back. */\n back?: { href: string; label: string };\n /** A mono line above the title. */\n eyebrow?: React.ReactNode;\n /** The page's `h1`. */\n title: React.ReactNode;\n /** One or two sentences under it. */\n lead?: React.ReactNode;\n /** The hero's actions. */\n actions?: React.ReactNode;\n /** Above the pieces: the filters (ChipLink, a Chip group) — the address says which one is on. */\n filters?: React.ReactNode;\n /** The gallery's accessible name. */\n galleryLabel: string;\n /** The pieces, featured first. */\n items: readonly GalleryItem[];\n /** After the gallery: how it was made, the facts. */\n children?: React.ReactNode;\n /** The closing call. */\n closing?: { title: React.ReactNode; body?: React.ReactNode; actions: React.ReactNode };\n /** The app's link component (Next's `Link`). */\n linkAs?: LinkComponent;\n};\n\n/**\n * A demo or a gallery: hero, filters, media in staggered columns, closing call.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function GalleryPage({ brand, back, eyebrow, title, lead, actions, filters, galleryLabel, items, closing, linkAs, className, children, ...props }: GalleryPageProps) {\n warnDeprecated(\"gallery-page\");\n return (\n <div className={cn(brand && \"brand-\" + brand, className)} {...props}>\n <PageHero back={back} linkAs={linkAs} eyebrow={eyebrow} title={title} lead={lead} align=\"center\" backdrop=\"plain\">\n {actions}\n </PageHero>\n <Section aria-label={galleryLabel} spacing=\"sm\">\n {filters && <div className=\"kz-tpl-filters\">{filters}</div>}\n <ul className=\"kz-tpl-gallery\">\n {items.map((item) => (\n <li key={item.id}>\n <figure className=\"kz-tpl-figure\">\n <div className=\"kz-tpl-figure-media\">{item.media}</div>\n <figcaption>\n <strong>{item.title}</strong>\n {item.caption && <span>{item.caption}</span>}\n </figcaption>\n </figure>\n </li>\n ))}\n </ul>\n </Section>\n {children}\n {closing && (\n <Section spacing=\"sm\" aria-labelledby=\"gallery-closing\">\n <CtaPanel id=\"gallery-closing\" title={closing.title} body={closing.body} reveal>\n {closing.actions}\n </CtaPanel>\n </Section>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAGA,SAAS,gBAAgB;AACzB,SAAS,eAAe;AAExB,SAAS,gBAAgB;AAoDnB,cAUU,YAVV;AAJC,SAAS,YAAY,EAAE,OAAO,MAAM,SAAS,OAAO,MAAM,SAAS,SAAS,cAAc,OAAO,SAAS,QAAQ,WAAW,UAAU,GAAG,MAAM,GAAqB;AAC1K,iBAAe,cAAc;AAC7B,SACE,qBAAC,SAAI,WAAW,GAAG,SAAS,WAAW,OAAO,SAAS,GAAI,GAAG,OAC5D;AAAA,wBAAC,YAAS,MAAY,QAAgB,SAAkB,OAAc,MAAY,OAAM,UAAS,UAAS,SACvG,mBACH;AAAA,IACA,qBAAC,WAAQ,cAAY,cAAc,SAAQ,MACxC;AAAA,iBAAW,oBAAC,SAAI,WAAU,kBAAkB,mBAAQ;AAAA,MACrD,oBAAC,QAAG,WAAU,kBACX,gBAAM,IAAI,CAAC,SACV,oBAAC,QACC,+BAAC,YAAO,WAAU,iBAChB;AAAA,4BAAC,SAAI,WAAU,uBAAuB,eAAK,OAAM;AAAA,QACjD,qBAAC,gBACC;AAAA,8BAAC,YAAQ,eAAK,OAAM;AAAA,UACnB,KAAK,WAAW,oBAAC,UAAM,eAAK,SAAQ;AAAA,WACvC;AAAA,SACF,KAPO,KAAK,EAQd,CACD,GACH;AAAA,OACF;AAAA,IACC;AAAA,IACA,WACC,oBAAC,WAAQ,SAAQ,MAAK,mBAAgB,mBACpC,8BAAC,YAAS,IAAG,mBAAkB,OAAO,QAAQ,OAAO,MAAM,QAAQ,MAAM,QAAM,MAC5E,kBAAQ,SACX,GACF;AAAA,KAEJ;AAEJ;","names":[]}
package/dist/genui.js CHANGED
@@ -7,19 +7,19 @@ import {
7
7
  } from "./chunk-YKOLME7R.js";
8
8
  import {
9
9
  DataTable
10
- } from "./chunk-YHKTYFOQ.js";
11
- import "./chunk-YGIN2YIY.js";
10
+ } from "./chunk-QWKCNSPF.js";
11
+ import "./chunk-3X3OF4TI.js";
12
12
  import "./chunk-JXLDUDTD.js";
13
13
  import "./chunk-3DHNN5V7.js";
14
14
  import "./chunk-KVDB4GXV.js";
15
- import "./chunk-ZQW7LF4Y.js";
16
- import "./chunk-HHFWK2HH.js";
15
+ import "./chunk-OIMXKRXF.js";
16
+ import "./chunk-VIPSZXO4.js";
17
17
  import "./chunk-D3T54RSL.js";
18
18
  import "./chunk-J3NC6ER4.js";
19
19
  import {
20
20
  cn
21
21
  } from "./chunk-NSLXEDIS.js";
22
- import "./chunk-7NRSPHAF.js";
22
+ import "./chunk-VB7MWE2N.js";
23
23
  import "./chunk-ZIXB33X7.js";
24
24
  import "./chunk-FZBWEDQI.js";
25
25
  import "./chunk-CPA5CF35.js";
@@ -1,6 +1,7 @@
1
1
  import * as tailwind_variants from 'tailwind-variants';
2
2
  import * as React from 'react';
3
3
 
4
+ /** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */
4
5
  declare const imageCropper: tailwind_variants.TVReturnType<{
5
6
  [key: string]: {
6
7
  [key: string]: tailwind_variants.ClassValue | {
@@ -56,7 +57,10 @@ type CropValue = {
56
57
  y: number;
57
58
  zoom: number;
58
59
  };
59
- /** The crop in pixels of the source: what to cut from an image of `width` × `height` for a frame of `aspect`. */
60
+ /**
61
+ * The crop in pixels of the source: what to cut from an image of `width` × `height` for a frame of `aspect`.
62
+ * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.
63
+ */
60
64
  declare function cropRect(value: CropValue, source: {
61
65
  width: number;
62
66
  height: number;
@@ -74,6 +78,7 @@ type ImageCropperLabels = {
74
78
  /** The zoom slider ("Zoom"). */
75
79
  zoom: string;
76
80
  };
81
+ /** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */
77
82
  declare const imageCropperLabels: ImageCropperLabels;
78
83
  type ImageCropperProps = {
79
84
  /** The picture to crop. Or `children`: a `<video>` (with the class it is given through `mediaClassName`). */
@@ -109,7 +114,10 @@ type ImageCropperProps = {
109
114
  /** Classes merged on the root. */
110
115
  className?: string;
111
116
  };
112
- /** Chooses what a fixed frame keeps of a picture or a video: drag, zoom, keyboard; a focus point and a zoom out. */
117
+ /**
118
+ * Chooses what a fixed frame keeps of a picture or a video: drag, zoom, keyboard; a focus point and a zoom out.
119
+ * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.
120
+ */
113
121
  declare function ImageCropper({ src, alt, children, naturalSize, aspect, round, value: valueProp, defaultValue, onValueChange, maxZoom, showZoom, labels: given, className, }: ImageCropperProps): React.JSX.Element;
114
122
 
115
123
  export { type CropValue, ImageCropper, type ImageCropperLabels, type ImageCropperProps, cropRect, imageCropper, imageCropperLabels };
@@ -2,6 +2,9 @@
2
2
  import {
3
3
  Slider
4
4
  } from "./chunk-ADRUEPYC.js";
5
+ import {
6
+ warnDeprecated
7
+ } from "./chunk-BDIU5LZB.js";
5
8
  import "./chunk-HJFRHYCI.js";
6
9
  import "./chunk-NSLXEDIS.js";
7
10
  import {
@@ -49,6 +52,7 @@ function ImageCropper({
49
52
  labels: given,
50
53
  className
51
54
  }) {
55
+ warnDeprecated("image-cropper");
52
56
  const labels = { ...imageCropperLabels, ...given };
53
57
  const s = imageCropper();
54
58
  const frame = React.useRef(null);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/image-cropper/image-cropper.tsx"],"sourcesContent":["// Client. A fixed frame (a profile picture's square, a vertical 9:16, a banner) over a picture or a video the person\n// drags and zooms to choose what stays in. The value is a focus point (0–1 on each axis) and a zoom — independent of\n// the screen, the same on the server — and `cropRect` turns it into pixels of the source. Keyboard: the frame takes the\n// focus, the arrows move (Shift: faster), + / − zoom; the zoom is also a slider. No motion but the person's own.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { clamp } from \"../media\";\nimport { Slider } from \"../slider\";\n\nexport const imageCropper = tv({\n slots: {\n root: \"flex w-full flex-col gap-3\",\n frame:\n \"relative w-full cursor-grab touch-none overflow-hidden rounded-xl bg-media active:cursor-grabbing \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0\",\n media: \"pointer-events-none absolute max-w-none select-none\",\n grid:\n \"pointer-events-none absolute inset-0 rounded-xl border-2 border-fg-on-media/80 \" +\n \"bg-[linear-gradient(to_right,transparent_33.2%,var(--kz-text-on-media)_33.3%,transparent_33.5%,transparent_66.5%,var(--kz-text-on-media)_66.6%,transparent_66.8%),linear-gradient(to_bottom,transparent_33.2%,var(--kz-text-on-media)_33.3%,transparent_33.5%,transparent_66.5%,var(--kz-text-on-media)_66.6%,transparent_66.8%)] opacity-40\",\n round: \"pointer-events-none absolute inset-0 rounded-full shadow-[0_0_0_9999px_var(--kz-scrim-strong)]\",\n },\n});\n\n/** Where the frame looks: the focus point (0–1 from the left and the top of the source) and the zoom (1 = covers). */\nexport type CropValue = { x: number; y: number; zoom: number };\n\n/** The crop in pixels of the source: what to cut from an image of `width` × `height` for a frame of `aspect`. */\nexport function cropRect(value: CropValue, source: { width: number; height: number }, aspect: number) {\n const mediaAspect = source.width / source.height;\n const width = (mediaAspect > aspect ? source.height * aspect : source.width) / value.zoom;\n const height = width / aspect;\n const x = clamp(value.x * source.width - width / 2, 0, source.width - width);\n const y = clamp(value.y * source.height - height / 2, 0, source.height - height);\n return { x: Math.round(x), y: Math.round(y), width: Math.round(width), height: Math.round(height) };\n}\n\nexport type ImageCropperLabels = {\n /** The frame's accessible name (\"Crop area\"). */\n frame: string;\n /** How to use it with the keyboard, read with the frame (\"Use the arrow keys to move the picture, + and − to zoom.\"). */\n instructions: string;\n /** The zoom slider (\"Zoom\"). */\n zoom: string;\n};\n\nexport const imageCropperLabels: ImageCropperLabels = {\n frame: \"Crop area\",\n instructions: \"Drag or use the arrow keys to move the picture, + and − to zoom.\",\n zoom: \"Zoom\",\n};\n\nexport type ImageCropperProps = {\n /** The picture to crop. Or `children`: a `<video>` (with the class it is given through `mediaClassName`). */\n src?: string;\n /** The picture's alternative text, passed translated (empty when the frame's name says enough). */\n alt?: string;\n /** A media element instead of `src` — a `<video>` to choose the frame of a clip. Its natural size is in `naturalSize`. */\n children?: React.ReactElement<{ className?: string; style?: React.CSSProperties }>;\n /** The source's size when `children` is a video: `{ width: video.videoWidth, height: video.videoHeight }`. */\n naturalSize?: { width: number; height: number };\n /** The frame's width / height: 1 (a square), 9 / 16 (vertical), 3 (a banner). */\n aspect: number;\n /** A round mask over the square frame (a profile picture). */\n round?: boolean;\n /** The crop (controlled). */\n value?: CropValue;\n /** The crop at first, uncontrolled. Default: centred, no zoom. */\n defaultValue?: CropValue;\n /** Called on every move. */\n onValueChange?: (value: CropValue) => void;\n /** The largest zoom. Default 4. */\n maxZoom?: number;\n /** Shows the zoom slider under the frame. Default `true`. */\n showZoom?: boolean;\n /** The words, passed translated; English by default. */\n labels?: Partial<ImageCropperLabels>;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** Chooses what a fixed frame keeps of a picture or a video: drag, zoom, keyboard; a focus point and a zoom out. */\nexport function ImageCropper({\n src,\n alt = \"\",\n children,\n naturalSize,\n aspect,\n round,\n value: valueProp,\n defaultValue = { x: 0.5, y: 0.5, zoom: 1 },\n onValueChange,\n maxZoom = 4,\n showZoom = true,\n labels: given,\n className,\n}: ImageCropperProps) {\n const labels = { ...imageCropperLabels, ...given };\n const s = imageCropper();\n const frame = React.useRef<HTMLDivElement>(null);\n const drag = React.useRef<{ x: number; y: number; from: CropValue } | null>(null);\n const [inner, setInner] = React.useState(defaultValue);\n const [loaded, setLoaded] = React.useState<{ width: number; height: number } | null>(null);\n const value = valueProp ?? inner;\n const id = React.useId();\n const size = naturalSize ?? loaded;\n const mediaAspect = size ? size.width / size.height : aspect;\n\n // The media's box, in % of the frame: it covers the frame at zoom 1.\n const widthPct = (mediaAspect > aspect ? (mediaAspect / aspect) * 100 : 100) * value.zoom;\n const heightPct = (mediaAspect > aspect ? 100 : (aspect / mediaAspect) * 100) * value.zoom;\n // The focus point's limits: the media never leaves a gap in the frame.\n const halfX = 50 / widthPct;\n const halfY = 50 / heightPct;\n\n const set = (next: CropValue) => {\n const zoom = clamp(next.zoom, 1, maxZoom);\n const wPct = (mediaAspect > aspect ? (mediaAspect / aspect) * 100 : 100) * zoom;\n const hPct = (mediaAspect > aspect ? 100 : (aspect / mediaAspect) * 100) * zoom;\n const fixed = { x: clamp(next.x, 50 / wPct, 1 - 50 / wPct), y: clamp(next.y, 50 / hPct, 1 - 50 / hPct), zoom };\n if (!valueProp) setInner(fixed);\n onValueChange?.(fixed);\n };\n\n const x = clamp(value.x, halfX, 1 - halfX);\n const y = clamp(value.y, halfY, 1 - halfY);\n // Rounded: float noise (5e-15) is not a length every parser takes, and a dropped `top` is a gap.\n const pct = (n: number) => `${Math.round(n * 1e4) / 1e4}%`;\n const style: React.CSSProperties = {\n width: pct(widthPct),\n height: pct(heightPct),\n left: pct(50 - x * widthPct),\n top: pct(50 - y * heightPct),\n };\n\n return (\n <div className={s.root({ className })}>\n <div\n ref={frame}\n role=\"group\"\n tabIndex={0}\n aria-label={labels.frame}\n aria-describedby={`${id}-help`}\n className={s.frame()}\n style={{ aspectRatio: String(aspect) }}\n onPointerDown={(event) => {\n frame.current?.setPointerCapture?.(event.pointerId);\n drag.current = { x: event.clientX, y: event.clientY, from: { x, y, zoom: value.zoom } };\n }}\n onPointerMove={(event) => {\n const start = drag.current;\n const box = frame.current?.getBoundingClientRect();\n if (!start || !box?.width) return;\n set({\n x: start.from.x - (event.clientX - start.x) / ((box.width * widthPct) / 100),\n y: start.from.y - (event.clientY - start.y) / ((box.height * heightPct) / 100),\n zoom: value.zoom,\n });\n }}\n onPointerUp={() => {\n drag.current = null;\n }}\n onWheel={(event) => {\n if (!event.ctrlKey && !event.metaKey) return;\n event.preventDefault();\n set({ x, y, zoom: value.zoom - event.deltaY * 0.01 });\n }}\n onKeyDown={(event) => {\n const nudge = event.shiftKey ? 0.1 : 0.02;\n const moves: Record<string, CropValue> = {\n ArrowLeft: { x: x - nudge, y, zoom: value.zoom },\n ArrowRight: { x: x + nudge, y, zoom: value.zoom },\n ArrowUp: { x, y: y - nudge, zoom: value.zoom },\n ArrowDown: { x, y: y + nudge, zoom: value.zoom },\n \"+\": { x, y, zoom: value.zoom + 0.1 },\n \"=\": { x, y, zoom: value.zoom + 0.1 },\n \"-\": { x, y, zoom: value.zoom - 0.1 },\n };\n const next = moves[event.key];\n if (!next) return;\n event.preventDefault();\n set(next);\n }}\n >\n {children ? (\n React.cloneElement(children, { className: s.media({ className: children.props.className }), style: { ...children.props.style, ...style } })\n ) : src ? (\n <img\n src={src}\n alt={alt}\n draggable={false}\n className={s.media()}\n style={style}\n // A picture already in the cache (or rendered on the server) is complete before React attaches: no load event.\n ref={(img) => {\n if (img?.complete && img.naturalWidth > 0) setLoaded((was) => (was?.width === img.naturalWidth && was.height === img.naturalHeight ? was : { width: img.naturalWidth, height: img.naturalHeight }));\n }}\n onLoad={(event) => setLoaded({ width: event.currentTarget.naturalWidth, height: event.currentTarget.naturalHeight })}\n />\n ) : null}\n <span className={round ? s.round() : s.grid()} aria-hidden />\n <span id={`${id}-help`} className=\"sr-only\">\n {labels.instructions}\n </span>\n </div>\n {showZoom && (\n <Slider\n label={labels.zoom}\n min={1}\n max={maxZoom}\n step={0.05}\n value={value.zoom}\n onValueChange={(zoom) => set({ x, y, zoom })}\n formatValue={(v) => `${Math.round(v * 100)} %`}\n />\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAIA,YAAY,WAAW;AACvB,SAAS,UAAU;AAoIb,SAkDI,KAlDJ;AA/HC,IAAM,eAAe,GAAG;AAAA,EAC7B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OACE;AAAA,IAEF,OAAO;AAAA,IACP,MACE;AAAA,IAEF,OAAO;AAAA,EACT;AACF,CAAC;AAMM,SAAS,SAAS,OAAkB,QAA2C,QAAgB;AACpG,QAAM,cAAc,OAAO,QAAQ,OAAO;AAC1C,QAAM,SAAS,cAAc,SAAS,OAAO,SAAS,SAAS,OAAO,SAAS,MAAM;AACrF,QAAM,SAAS,QAAQ;AACvB,QAAM,IAAI,MAAM,MAAM,IAAI,OAAO,QAAQ,QAAQ,GAAG,GAAG,O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AM,UAAU,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,IACxI,MACF;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA;AAAA,cACA,WAAW;AAAA,cACX,WAAW,EAAE,MAAM;AAAA,cACnB;AAAA,cAEA,KAAK,CAAC,QAAQ;AACZ,oBAAI,KAAK,YAAY,IAAI,eAAe,EAAG,WAAU,CAAC,QAAS,KAAK,UAAU,IAAI,gBAAgB,IAAI,WAAW,IAAI,gBAAgB,MAAM,EAAE,OAAO,IAAI,cAAc,QAAQ,IAAI,cAAc,CAAE;AAAA,cACpM;AAAA,cACA,QAAQ,CAAC,UAAU,UAAU,EAAE,OAAO,MAAM,cAAc,cAAc,QAAQ,MAAM,cAAc,cAAc,CAAC;AAAA;AAAA,UACrH,IACE;AAAA,UACJ,oBAAC,UAAK,WAAW,QAAQ,EAAE,MAAM,IAAI,EAAE,KAAK,GAAG,eAAW,MAAC;AAAA,UAC3D,oBAAC,UAAK,IAAI,GAAG,EAAE,SAAS,WAAU,WAC/B,iBAAO,cACV;AAAA;AAAA;AAAA,IACF;AAAA,IACC,YACC;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,OAAO;AAAA,QACd,KAAK;AAAA,QACL,KAAK;AAAA,QACL,MAAM;AAAA,QACN,OAAO,MAAM;AAAA,QACb,eAAe,CAAC,SAAS,IAAI,EAAE,GAAG,GAAG,KAAK,CAAC;AAAA,QAC3C,aAAa,CAAC,MAAM,GAAG,KAAK,MAAM,IAAI,GAAG,CAAC;AAAA;AAAA,IAC5C;AAAA,KAEJ;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/image-cropper/image-cropper.tsx"],"sourcesContent":["// Client. A fixed frame (a profile picture's square, a vertical 9:16, a banner) over a picture or a video the person\n// drags and zooms to choose what stays in. The value is a focus point (0–1 on each axis) and a zoom — independent of\n// the screen, the same on the server — and `cropRect` turns it into pixels of the source. Keyboard: the frame takes the\n// focus, the arrows move (Shift: faster), + / − zoom; the zoom is also a slider. No motion but the person's own.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { warnDeprecated } from \"../deprecated\";\nimport { clamp } from \"../media\";\nimport { Slider } from \"../slider\";\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const imageCropper = tv({\n slots: {\n root: \"flex w-full flex-col gap-3\",\n frame:\n \"relative w-full cursor-grab touch-none overflow-hidden rounded-xl bg-media active:cursor-grabbing \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0\",\n media: \"pointer-events-none absolute max-w-none select-none\",\n grid:\n \"pointer-events-none absolute inset-0 rounded-xl border-2 border-fg-on-media/80 \" +\n \"bg-[linear-gradient(to_right,transparent_33.2%,var(--kz-text-on-media)_33.3%,transparent_33.5%,transparent_66.5%,var(--kz-text-on-media)_66.6%,transparent_66.8%),linear-gradient(to_bottom,transparent_33.2%,var(--kz-text-on-media)_33.3%,transparent_33.5%,transparent_66.5%,var(--kz-text-on-media)_66.6%,transparent_66.8%)] opacity-40\",\n round: \"pointer-events-none absolute inset-0 rounded-full shadow-[0_0_0_9999px_var(--kz-scrim-strong)]\",\n },\n});\n\n/** Where the frame looks: the focus point (0–1 from the left and the top of the source) and the zoom (1 = covers). */\nexport type CropValue = { x: number; y: number; zoom: number };\n\n/**\n * The crop in pixels of the source: what to cut from an image of `width` × `height` for a frame of `aspect`.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function cropRect(value: CropValue, source: { width: number; height: number }, aspect: number) {\n const mediaAspect = source.width / source.height;\n const width = (mediaAspect > aspect ? source.height * aspect : source.width) / value.zoom;\n const height = width / aspect;\n const x = clamp(value.x * source.width - width / 2, 0, source.width - width);\n const y = clamp(value.y * source.height - height / 2, 0, source.height - height);\n return { x: Math.round(x), y: Math.round(y), width: Math.round(width), height: Math.round(height) };\n}\n\nexport type ImageCropperLabels = {\n /** The frame's accessible name (\"Crop area\"). */\n frame: string;\n /** How to use it with the keyboard, read with the frame (\"Use the arrow keys to move the picture, + and − to zoom.\"). */\n instructions: string;\n /** The zoom slider (\"Zoom\"). */\n zoom: string;\n};\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const imageCropperLabels: ImageCropperLabels = {\n frame: \"Crop area\",\n instructions: \"Drag or use the arrow keys to move the picture, + and − to zoom.\",\n zoom: \"Zoom\",\n};\n\nexport type ImageCropperProps = {\n /** The picture to crop. Or `children`: a `<video>` (with the class it is given through `mediaClassName`). */\n src?: string;\n /** The picture's alternative text, passed translated (empty when the frame's name says enough). */\n alt?: string;\n /** A media element instead of `src` — a `<video>` to choose the frame of a clip. Its natural size is in `naturalSize`. */\n children?: React.ReactElement<{ className?: string; style?: React.CSSProperties }>;\n /** The source's size when `children` is a video: `{ width: video.videoWidth, height: video.videoHeight }`. */\n naturalSize?: { width: number; height: number };\n /** The frame's width / height: 1 (a square), 9 / 16 (vertical), 3 (a banner). */\n aspect: number;\n /** A round mask over the square frame (a profile picture). */\n round?: boolean;\n /** The crop (controlled). */\n value?: CropValue;\n /** The crop at first, uncontrolled. Default: centred, no zoom. */\n defaultValue?: CropValue;\n /** Called on every move. */\n onValueChange?: (value: CropValue) => void;\n /** The largest zoom. Default 4. */\n maxZoom?: number;\n /** Shows the zoom slider under the frame. Default `true`. */\n showZoom?: boolean;\n /** The words, passed translated; English by default. */\n labels?: Partial<ImageCropperLabels>;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/**\n * Chooses what a fixed frame keeps of a picture or a video: drag, zoom, keyboard; a focus point and a zoom out.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function ImageCropper({\n src,\n alt = \"\",\n children,\n naturalSize,\n aspect,\n round,\n value: valueProp,\n defaultValue = { x: 0.5, y: 0.5, zoom: 1 },\n onValueChange,\n maxZoom = 4,\n showZoom = true,\n labels: given,\n className,\n}: ImageCropperProps) {\n warnDeprecated(\"image-cropper\");\n const labels = { ...imageCropperLabels, ...given };\n const s = imageCropper();\n const frame = React.useRef<HTMLDivElement>(null);\n const drag = React.useRef<{ x: number; y: number; from: CropValue } | null>(null);\n const [inner, setInner] = React.useState(defaultValue);\n const [loaded, setLoaded] = React.useState<{ width: number; height: number } | null>(null);\n const value = valueProp ?? inner;\n const id = React.useId();\n const size = naturalSize ?? loaded;\n const mediaAspect = size ? size.width / size.height : aspect;\n\n // The media's box, in % of the frame: it covers the frame at zoom 1.\n const widthPct = (mediaAspect > aspect ? (mediaAspect / aspect) * 100 : 100) * value.zoom;\n const heightPct = (mediaAspect > aspect ? 100 : (aspect / mediaAspect) * 100) * value.zoom;\n // The focus point's limits: the media never leaves a gap in the frame.\n const halfX = 50 / widthPct;\n const halfY = 50 / heightPct;\n\n const set = (next: CropValue) => {\n const zoom = clamp(next.zoom, 1, maxZoom);\n const wPct = (mediaAspect > aspect ? (mediaAspect / aspect) * 100 : 100) * zoom;\n const hPct = (mediaAspect > aspect ? 100 : (aspect / mediaAspect) * 100) * zoom;\n const fixed = { x: clamp(next.x, 50 / wPct, 1 - 50 / wPct), y: clamp(next.y, 50 / hPct, 1 - 50 / hPct), zoom };\n if (!valueProp) setInner(fixed);\n onValueChange?.(fixed);\n };\n\n const x = clamp(value.x, halfX, 1 - halfX);\n const y = clamp(value.y, halfY, 1 - halfY);\n // Rounded: float noise (5e-15) is not a length every parser takes, and a dropped `top` is a gap.\n const pct = (n: number) => `${Math.round(n * 1e4) / 1e4}%`;\n const style: React.CSSProperties = {\n width: pct(widthPct),\n height: pct(heightPct),\n left: pct(50 - x * widthPct),\n top: pct(50 - y * heightPct),\n };\n\n return (\n <div className={s.root({ className })}>\n <div\n ref={frame}\n role=\"group\"\n tabIndex={0}\n aria-label={labels.frame}\n aria-describedby={`${id}-help`}\n className={s.frame()}\n style={{ aspectRatio: String(aspect) }}\n onPointerDown={(event) => {\n frame.current?.setPointerCapture?.(event.pointerId);\n drag.current = { x: event.clientX, y: event.clientY, from: { x, y, zoom: value.zoom } };\n }}\n onPointerMove={(event) => {\n const start = drag.current;\n const box = frame.current?.getBoundingClientRect();\n if (!start || !box?.width) return;\n set({\n x: start.from.x - (event.clientX - start.x) / ((box.width * widthPct) / 100),\n y: start.from.y - (event.clientY - start.y) / ((box.height * heightPct) / 100),\n zoom: value.zoom,\n });\n }}\n onPointerUp={() => {\n drag.current = null;\n }}\n onWheel={(event) => {\n if (!event.ctrlKey && !event.metaKey) return;\n event.preventDefault();\n set({ x, y, zoom: value.zoom - event.deltaY * 0.01 });\n }}\n onKeyDown={(event) => {\n const nudge = event.shiftKey ? 0.1 : 0.02;\n const moves: Record<string, CropValue> = {\n ArrowLeft: { x: x - nudge, y, zoom: value.zoom },\n ArrowRight: { x: x + nudge, y, zoom: value.zoom },\n ArrowUp: { x, y: y - nudge, zoom: value.zoom },\n ArrowDown: { x, y: y + nudge, zoom: value.zoom },\n \"+\": { x, y, zoom: value.zoom + 0.1 },\n \"=\": { x, y, zoom: value.zoom + 0.1 },\n \"-\": { x, y, zoom: value.zoom - 0.1 },\n };\n const next = moves[event.key];\n if (!next) return;\n event.preventDefault();\n set(next);\n }}\n >\n {children ? (\n React.cloneElement(children, { className: s.media({ className: children.props.className }), style: { ...children.props.style, ...style } })\n ) : src ? (\n <img\n src={src}\n alt={alt}\n draggable={false}\n className={s.media()}\n style={style}\n // A picture already in the cache (or rendered on the server) is complete before React attaches: no load event.\n ref={(img) => {\n if (img?.complete && img.naturalWidth > 0) setLoaded((was) => (was?.width === img.naturalWidth && was.height === img.naturalHeight ? was : { width: img.naturalWidth, height: img.naturalHeight }));\n }}\n onLoad={(event) => setLoaded({ width: event.currentTarget.naturalWidth, height: event.currentTarget.naturalHeight })}\n />\n ) : null}\n <span className={round ? s.round() : s.grid()} aria-hidden />\n <span id={`${id}-help`} className=\"sr-only\">\n {labels.instructions}\n </span>\n </div>\n {showZoom && (\n <Slider\n label={labels.zoom}\n min={1}\n max={maxZoom}\n step={0.05}\n value={value.zoom}\n onValueChange={(zoom) => set({ x, y, zoom })}\n formatValue={(v) => `${Math.round(v * 100)} %`}\n />\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAIA,YAAY,WAAW;AACvB,SAAS,UAAU;AA8Ib,SAkDI,KAlDJ;AAvIC,IAAM,eAAe,GAAG;AAAA,EAC7B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OACE;AAAA,IAEF,OAAO;AAAA,IACP,MACE;AAAA,IAEF,OAAO;AAAA,EACT;AACF,CAAC;AASM,SAAS,SAAS,OAAkB,QAA2C,QAAgB;AACpG,QAAM,cAAc,OAAO,QAAQ,OAAO;AAC1C,QAAM,SAAS,cAAc,SAAS,OAAO,SAAS,SAAS,OAAO,SAAS,MAAM;AACrF,QAAM,SAAS,QAAQ;AACvB,QAAM,IAAI,MAAM,MAAM,IAAI,OAAO,QAAQ,QAAQ,GAAG,GAAG,OAAO,QAAQ,KAAK;AAC3E,QAAM,IAAI,MAAM,MAAM,IAAI,OAAO,SAAS,SAAS,GAAG,GAAG,OAAO,SAAS,MAAM;AAC/E,SAAO,EAAE,GAAG,KAAK,MAAM,CAAC,GAAG,GAAG,KAAK,MAAM,CAAC,GAAG,OAAO,KAAK,MAAM,KAAK,GAAG,QAAQ,KAAK,MAAM,MAAM,EAAE;AACpG;AAYO,IAAM,qBAAyC;AAAA,EACpD,OAAO;AAAA,EACP,cAAc;AAAA,EACd,MAAM;AACR;AAmCO,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA,MAAM;AAAA,EACN;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,eAAe,EAAE,GAAG,KAAK,GAAG,KAAK,MAAM,EAAE;AAAA,EACzC;AAAA,EACA,UAAU;AAAA,EACV,WAAW;AAAA,EACX,QAAQ;AAAA,EACR;AACF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,QAAQ,EAAE,MAAM,IAAI,EAAE,KAAK,GAAG,eAAW,MAAC;AAAA,UAC3D,oBAAC,UAAK,IAAI,GAAG,EAAE,SAAS,WAAU,WAC/B,iBAAO,cACV;AAAA;AAAA;AAAA,IACF;AAAA,IACC,YACC;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,OAAO;AAAA,QACd,KAAK;AAAA,QACL,KAAK;AAAA,QACL,MAAM;AAAA,QACN,OAAO,MAAM;AAAA,QACb,eAAe,CAAC,SAAS,IAAI,EAAE,GAAG,GAAG,KAAK,CAAC;AAAA,QAC3C,aAAa,CAAC,MAAM,GAAG,KAAK,MAAM,IAAI,GAAG,CAAC;AAAA;AAAA,IAC5C;AAAA,KAEJ;AAEJ;","names":[]}
package/dist/kanban.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as tailwind_variants from 'tailwind-variants';
2
2
  import * as React from 'react';
3
3
 
4
+ /** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */
4
5
  declare const kanban: tailwind_variants.TVReturnType<{
5
6
  [key: string]: {
6
7
  [key: string]: tailwind_variants.ClassValue | {
@@ -100,6 +101,7 @@ type KanbanLabels = {
100
101
  /** A column without card (“No card”). */
101
102
  empty: string;
102
103
  };
104
+ /** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */
103
105
  declare const kanbanLabels: KanbanLabels;
104
106
  type KanbanProps<T> = {
105
107
  /** The columns, in order. */
@@ -126,6 +128,7 @@ type KanbanProps<T> = {
126
128
  /**
127
129
  * A board of cards in columns — a moderation queue, a release plan: drag and drop with the pointer, or Space and the
128
130
  * arrow keys, every step announced. Column limits show in the counts.
131
+ * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.
129
132
  */
130
133
  declare function Kanban<T>({ columns, cards, getId, getColumn, getTitle, renderCard, onMove, "aria-label": label, labels: words, className }: KanbanProps<T>): React.JSX.Element;
131
134
 
package/dist/kanban.js CHANGED
@@ -1,4 +1,7 @@
1
1
  "use client";
2
+ import {
3
+ warnDeprecated
4
+ } from "./chunk-BDIU5LZB.js";
2
5
 
3
6
  // src/kanban/kanban.tsx
4
7
  import * as React from "react";
@@ -25,6 +28,7 @@ var kanbanLabels = {
25
28
  empty: "No card"
26
29
  };
27
30
  function Kanban({ columns, cards, getId, getColumn, getTitle, renderCard, onMove, "aria-label": label, labels: words, className }) {
31
+ warnDeprecated("kanban");
28
32
  const labels = { ...kanbanLabels, ...words };
29
33
  const s = kanban();
30
34
  const instructionsId = React.useId();
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/kanban/kanban.tsx"],"sourcesContent":["// Client (the drag, the keyboard move, the announcements). Cards in columns that move by drag and drop — and by the\n// keyboard: Space picks a card up, the arrows carry it (← → between columns, ↑ ↓ within one), Space drops it, Esc puts it\n// back. Every move is announced in words. The app owns the data: `onMove` says where a card went.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const kanban = tv({\n slots: {\n root: \"flex w-full gap-3 overflow-x-auto pb-2\",\n column: \"flex w-72 shrink-0 flex-col rounded-xl border border-border-default bg-surface-1 data-[over]:border-accent data-[over]:bg-accent-soft/40\",\n header: \"flex items-center gap-2 px-3 pb-2 pt-3\",\n title: \"min-w-0 flex-1 truncate text-sm font-semibold text-fg\",\n count: \"rounded-sm bg-surface-3 px-2 text-xs font-semibold tabular-nums text-fg-secondary data-[over-limit]:bg-danger data-[over-limit]:text-on-accent\",\n list: \"m-0 flex min-h-16 list-none flex-col gap-2 p-2 pt-0\",\n card:\n \"cursor-grab rounded-lg border border-border-default bg-surface-0 p-3 text-sm text-fg shadow-xs outline-hidden transition-shadow \" +\n \"focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing data-[grabbed]:ring-2 data-[grabbed]:ring-accent data-[grabbed]:shadow-lg data-[dragging]:opacity-40\",\n empty: \"rounded-lg border border-dashed border-border-default px-3 py-4 text-center text-xs text-fg-secondary\",\n },\n});\n\nexport type KanbanColumn = {\n /** A stable id. */\n id: string;\n /** Its name — passed translated (“To review”). */\n title: string;\n /** The most cards it should hold: the count turns to danger past it. */\n limit?: number;\n};\n\nexport type KanbanMove = {\n /** The card moved. */\n cardId: string;\n /** Where it came from. */\n from: string;\n /** The column it went to. */\n to: string;\n /** Its position in that column (0 = top). */\n index: number;\n};\n\nexport type KanbanLabels = {\n /** The hint read on a card: how to move it with the keyboard. */\n instructions: string;\n /** Announced when a card is picked up: `(card, column) => …`. */\n grabbed: (card: string, column: string) => string;\n /** Announced as it moves: `(card, column, position, total) => …`. */\n moved: (card: string, column: string, position: number, total: number) => string;\n /** Announced when it is dropped. */\n dropped: (card: string, column: string, position: number) => string;\n /** Announced when the move is cancelled. */\n cancelled: (card: string) => string;\n /** A column without card (“No card”). */\n empty: string;\n};\n\nexport const kanbanLabels: KanbanLabels = {\n instructions: \"Press Space to pick it up, the arrow keys to move it, Space to drop it, Escape to cancel.\",\n grabbed: (card, column) => `${card} picked up, in ${column}.`,\n moved: (card, column, position, total) => `${card}: ${column}, position ${position} of ${total}.`,\n dropped: (card, column, position) => `${card} dropped in ${column}, position ${position}.`,\n cancelled: (card) => `Move of ${card} cancelled.`,\n empty: \"No card\",\n};\n\nexport type KanbanProps<T> = {\n /** The columns, in order. */\n columns: readonly KanbanColumn[];\n /** The cards, in their order within each column. */\n cards: readonly T[];\n /** A card's id. */\n getId: (card: T) => string;\n /** A card's column. */\n getColumn: (card: T) => string;\n /** A card's name, for the announcements. */\n getTitle: (card: T) => string;\n /** What a card shows. */\n renderCard: (card: T) => React.ReactNode;\n /** Called when a card is dropped somewhere new: update the data here. */\n onMove: (move: KanbanMove) => void;\n /** The board's accessible name (“Moderation queue”). */\n \"aria-label\": string;\n /** The words, passed translated; English by default. */\n labels?: Partial<KanbanLabels>;\n /** Classes merged on the root. */\n className?: string;\n};\n\ntype Placement = { column: string; index: number };\n\n/**\n * A board of cards in columns — a moderation queue, a release plan: drag and drop with the pointer, or Space and the\n * arrow keys, every step announced. Column limits show in the counts.\n */\nexport function Kanban<T>({ columns, cards, getId, getColumn, getTitle, renderCard, onMove, \"aria-label\": label, labels: words, className }: KanbanProps<T>) {\n const labels = { ...kanbanLabels, ...words };\n const s = kanban();\n const instructionsId = React.useId();\n const [grab, setGrab] = React.useState<{ id: string; origin: Placement; at: Placement } | null>(null);\n const [dragging, setDragging] = React.useState<string | null>(null);\n const [over, setOver] = React.useState<Placement | null>(null);\n const [message, setMessage] = React.useState(\"\");\n const refs = React.useRef(new Map<string, HTMLLIElement>());\n const byColumn = (column: string, without?: string) => cards.filter((c) => getColumn(c) === column && getId(c) !== without);\n const titleOf = (id: string) => {\n const card = cards.find((c) => getId(c) === id);\n return card ? getTitle(card) : id;\n };\n const columnTitle = (id: string) => columns.find((c) => c.id === id)?.title ?? id;\n const placementOf = (id: string): Placement => {\n const card = cards.find((c) => getId(c) === id)!;\n const column = getColumn(card);\n return { column, index: byColumn(column).findIndex((c) => getId(c) === id) };\n };\n const commit = (id: string, from: Placement, to: Placement) => {\n if (from.column !== to.column || from.index !== to.index) onMove({ cardId: id, from: from.column, to: to.column, index: to.index });\n };\n // The cards of a column as shown, with the grabbed card at its keyboard position.\n const shown = (column: string) => {\n const list = byColumn(column, grab?.id);\n if (grab && grab.at.column === column) {\n const card = cards.find((c) => getId(c) === grab.id);\n if (card) list.splice(grab.at.index, 0, card);\n }\n return list;\n };\n React.useEffect(() => {\n if (grab) refs.current.get(grab.id)?.focus();\n }, [grab]);\n\n const onKeyDown = (event: React.KeyboardEvent, id: string) => {\n const title = titleOf(id);\n if (!grab) {\n if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n const origin = placementOf(id);\n setGrab({ id, origin, at: origin });\n setMessage(labels.grabbed(title, columnTitle(origin.column)));\n }\n return;\n }\n const { at, origin } = grab;\n const columnIndex = columns.findIndex((c) => c.id === at.column);\n let next: Placement | null = null;\n if (event.key === \"ArrowLeft\" && columnIndex > 0) next = { column: columns[columnIndex - 1]!.id, index: Math.min(at.index, byColumn(columns[columnIndex - 1]!.id, id).length) };\n if (event.key === \"ArrowRight\" && columnIndex < columns.length - 1) next = { column: columns[columnIndex + 1]!.id, index: Math.min(at.index, byColumn(columns[columnIndex + 1]!.id, id).length) };\n if (event.key === \"ArrowUp\" && at.index > 0) next = { ...at, index: at.index - 1 };\n if (event.key === \"ArrowDown\" && at.index < byColumn(at.column, id).length) next = { ...at, index: at.index + 1 };\n if (next) {\n event.preventDefault();\n setGrab({ ...grab, at: next });\n setMessage(labels.moved(title, columnTitle(next.column), next.index + 1, byColumn(next.column, id).length + 1));\n return;\n }\n if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n setGrab(null);\n commit(id, origin, at);\n setMessage(labels.dropped(title, columnTitle(at.column), at.index + 1));\n } else if (event.key === \"Escape\") {\n event.preventDefault();\n setGrab(null);\n setMessage(labels.cancelled(title));\n }\n };\n\n const indexAt = (column: string, y: number) => {\n const list = byColumn(column, dragging ?? undefined);\n const i = list.findIndex((c) => {\n const box = refs.current.get(getId(c))?.getBoundingClientRect();\n return box ? y < box.top + box.height / 2 : false;\n });\n return i === -1 ? list.length : i;\n };\n\n return (\n <div role=\"group\" aria-label={label} className={s.root({ className })}>\n <p id={instructionsId} className=\"sr-only\">\n {labels.instructions}\n </p>\n <p className=\"sr-only\" aria-live=\"assertive\">\n {message}\n </p>\n {columns.map((column) => {\n const list = shown(column.id);\n const overLimit = column.limit !== undefined && list.length > column.limit;\n return (\n <section\n key={column.id}\n aria-label={column.title}\n data-over={over?.column === column.id || undefined}\n className={s.column()}\n onDragOver={(e) => {\n if (!dragging) return;\n e.preventDefault();\n setOver({ column: column.id, index: indexAt(column.id, e.clientY) });\n }}\n onDragLeave={(e) => {\n if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setOver(null);\n }}\n onDrop={(e) => {\n e.preventDefault();\n if (dragging) commit(dragging, placementOf(dragging), { column: column.id, index: indexAt(column.id, e.clientY) });\n setDragging(null);\n setOver(null);\n }}\n >\n <header className={s.header()}>\n <h3 className={s.title()}>{column.title}</h3>\n <span className={s.count()} data-over-limit={overLimit || undefined}>\n {column.limit !== undefined ? `${list.length}/${column.limit}` : list.length}\n </span>\n </header>\n <ul className={s.list()}>\n {list.length === 0 ? <li className={s.empty()}>{labels.empty}</li> : null}\n {list.map((card) => {\n const id = getId(card);\n return (\n <li\n key={id}\n ref={(el) => {\n if (el) refs.current.set(id, el);\n else refs.current.delete(id);\n }}\n tabIndex={0}\n draggable\n aria-describedby={instructionsId}\n aria-roledescription=\"card\"\n data-grabbed={grab?.id === id || undefined}\n data-dragging={dragging === id || undefined}\n className={s.card()}\n onKeyDown={(e) => onKeyDown(e, id)}\n onFocus={() => {\n // Tab to another card while one is carried: the carried one goes back.\n if (grab && grab.id !== id) {\n setMessage(labels.cancelled(titleOf(grab.id)));\n setGrab(null);\n }\n }}\n onDragStart={(e) => {\n e.dataTransfer.effectAllowed = \"move\";\n e.dataTransfer.setData(\"text/plain\", id);\n setDragging(id);\n }}\n onDragEnd={() => {\n setDragging(null);\n setOver(null);\n }}\n >\n {renderCard(card)}\n </li>\n );\n })}\n </ul>\n </section>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;AAGA,YAAY,WAAW;AACvB,SAAS,UAAU;AA6Kb,cA8BM,YA9BN;AA3KC,IAAM,SAAS,GAAG;AAAA,EACvB,OAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MACE;AAAA,IAEF,OAAO;AAAA,EACT;AACF,CAAC;AAqCM,IAAM,eAA6B;AAAA,EACxC,cAAc;AAAA,EACd,SAAS,CAAC,MAAM,WAAW,GAAG,IAAI,kBAAkB,MAAM;AAAA,EAC1D,OAAO,CAAC,MAAM,QAAQ,UAAU,UAAU,GAAG,IAAI,KAAK,MAAM,cAAc,QAAQ,OAAO,KAAK;AAAA,EAC9F,SAA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kanban/kanban.tsx"],"sourcesContent":["// Client (the drag, the keyboard move, the announcements). Cards in columns that move by drag and drop — and by the\n// keyboard: Space picks a card up, the arrows carry it (← → between columns, ↑ ↓ within one), Space drops it, Esc puts it\n// back. Every move is announced in words. The app owns the data: `onMove` says where a card went.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { warnDeprecated } from \"../deprecated\";\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const kanban = tv({\n slots: {\n root: \"flex w-full gap-3 overflow-x-auto pb-2\",\n column: \"flex w-72 shrink-0 flex-col rounded-xl border border-border-default bg-surface-1 data-[over]:border-accent data-[over]:bg-accent-soft/40\",\n header: \"flex items-center gap-2 px-3 pb-2 pt-3\",\n title: \"min-w-0 flex-1 truncate text-sm font-semibold text-fg\",\n count: \"rounded-sm bg-surface-3 px-2 text-xs font-semibold tabular-nums text-fg-secondary data-[over-limit]:bg-danger data-[over-limit]:text-on-accent\",\n list: \"m-0 flex min-h-16 list-none flex-col gap-2 p-2 pt-0\",\n card:\n \"cursor-grab rounded-lg border border-border-default bg-surface-0 p-3 text-sm text-fg shadow-xs outline-hidden transition-shadow \" +\n \"focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing data-[grabbed]:ring-2 data-[grabbed]:ring-accent data-[grabbed]:shadow-lg data-[dragging]:opacity-40\",\n empty: \"rounded-lg border border-dashed border-border-default px-3 py-4 text-center text-xs text-fg-secondary\",\n },\n});\n\nexport type KanbanColumn = {\n /** A stable id. */\n id: string;\n /** Its name — passed translated (“To review”). */\n title: string;\n /** The most cards it should hold: the count turns to danger past it. */\n limit?: number;\n};\n\nexport type KanbanMove = {\n /** The card moved. */\n cardId: string;\n /** Where it came from. */\n from: string;\n /** The column it went to. */\n to: string;\n /** Its position in that column (0 = top). */\n index: number;\n};\n\nexport type KanbanLabels = {\n /** The hint read on a card: how to move it with the keyboard. */\n instructions: string;\n /** Announced when a card is picked up: `(card, column) => …`. */\n grabbed: (card: string, column: string) => string;\n /** Announced as it moves: `(card, column, position, total) => …`. */\n moved: (card: string, column: string, position: number, total: number) => string;\n /** Announced when it is dropped. */\n dropped: (card: string, column: string, position: number) => string;\n /** Announced when the move is cancelled. */\n cancelled: (card: string) => string;\n /** A column without card (“No card”). */\n empty: string;\n};\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const kanbanLabels: KanbanLabels = {\n instructions: \"Press Space to pick it up, the arrow keys to move it, Space to drop it, Escape to cancel.\",\n grabbed: (card, column) => `${card} picked up, in ${column}.`,\n moved: (card, column, position, total) => `${card}: ${column}, position ${position} of ${total}.`,\n dropped: (card, column, position) => `${card} dropped in ${column}, position ${position}.`,\n cancelled: (card) => `Move of ${card} cancelled.`,\n empty: \"No card\",\n};\n\nexport type KanbanProps<T> = {\n /** The columns, in order. */\n columns: readonly KanbanColumn[];\n /** The cards, in their order within each column. */\n cards: readonly T[];\n /** A card's id. */\n getId: (card: T) => string;\n /** A card's column. */\n getColumn: (card: T) => string;\n /** A card's name, for the announcements. */\n getTitle: (card: T) => string;\n /** What a card shows. */\n renderCard: (card: T) => React.ReactNode;\n /** Called when a card is dropped somewhere new: update the data here. */\n onMove: (move: KanbanMove) => void;\n /** The board's accessible name (“Moderation queue”). */\n \"aria-label\": string;\n /** The words, passed translated; English by default. */\n labels?: Partial<KanbanLabels>;\n /** Classes merged on the root. */\n className?: string;\n};\n\ntype Placement = { column: string; index: number };\n\n/**\n * A board of cards in columns — a moderation queue, a release plan: drag and drop with the pointer, or Space and the\n * arrow keys, every step announced. Column limits show in the counts.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function Kanban<T>({ columns, cards, getId, getColumn, getTitle, renderCard, onMove, \"aria-label\": label, labels: words, className }: KanbanProps<T>) {\n warnDeprecated(\"kanban\");\n const labels = { ...kanbanLabels, ...words };\n const s = kanban();\n const instructionsId = React.useId();\n const [grab, setGrab] = React.useState<{ id: string; origin: Placement; at: Placement } | null>(null);\n const [dragging, setDragging] = React.useState<string | null>(null);\n const [over, setOver] = React.useState<Placement | null>(null);\n const [message, setMessage] = React.useState(\"\");\n const refs = React.useRef(new Map<string, HTMLLIElement>());\n const byColumn = (column: string, without?: string) => cards.filter((c) => getColumn(c) === column && getId(c) !== without);\n const titleOf = (id: string) => {\n const card = cards.find((c) => getId(c) === id);\n return card ? getTitle(card) : id;\n };\n const columnTitle = (id: string) => columns.find((c) => c.id === id)?.title ?? id;\n const placementOf = (id: string): Placement => {\n const card = cards.find((c) => getId(c) === id)!;\n const column = getColumn(card);\n return { column, index: byColumn(column).findIndex((c) => getId(c) === id) };\n };\n const commit = (id: string, from: Placement, to: Placement) => {\n if (from.column !== to.column || from.index !== to.index) onMove({ cardId: id, from: from.column, to: to.column, index: to.index });\n };\n // The cards of a column as shown, with the grabbed card at its keyboard position.\n const shown = (column: string) => {\n const list = byColumn(column, grab?.id);\n if (grab && grab.at.column === column) {\n const card = cards.find((c) => getId(c) === grab.id);\n if (card) list.splice(grab.at.index, 0, card);\n }\n return list;\n };\n React.useEffect(() => {\n if (grab) refs.current.get(grab.id)?.focus();\n }, [grab]);\n\n const onKeyDown = (event: React.KeyboardEvent, id: string) => {\n const title = titleOf(id);\n if (!grab) {\n if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n const origin = placementOf(id);\n setGrab({ id, origin, at: origin });\n setMessage(labels.grabbed(title, columnTitle(origin.column)));\n }\n return;\n }\n const { at, origin } = grab;\n const columnIndex = columns.findIndex((c) => c.id === at.column);\n let next: Placement | null = null;\n if (event.key === \"ArrowLeft\" && columnIndex > 0) next = { column: columns[columnIndex - 1]!.id, index: Math.min(at.index, byColumn(columns[columnIndex - 1]!.id, id).length) };\n if (event.key === \"ArrowRight\" && columnIndex < columns.length - 1) next = { column: columns[columnIndex + 1]!.id, index: Math.min(at.index, byColumn(columns[columnIndex + 1]!.id, id).length) };\n if (event.key === \"ArrowUp\" && at.index > 0) next = { ...at, index: at.index - 1 };\n if (event.key === \"ArrowDown\" && at.index < byColumn(at.column, id).length) next = { ...at, index: at.index + 1 };\n if (next) {\n event.preventDefault();\n setGrab({ ...grab, at: next });\n setMessage(labels.moved(title, columnTitle(next.column), next.index + 1, byColumn(next.column, id).length + 1));\n return;\n }\n if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n setGrab(null);\n commit(id, origin, at);\n setMessage(labels.dropped(title, columnTitle(at.column), at.index + 1));\n } else if (event.key === \"Escape\") {\n event.preventDefault();\n setGrab(null);\n setMessage(labels.cancelled(title));\n }\n };\n\n const indexAt = (column: string, y: number) => {\n const list = byColumn(column, dragging ?? undefined);\n const i = list.findIndex((c) => {\n const box = refs.current.get(getId(c))?.getBoundingClientRect();\n return box ? y < box.top + box.height / 2 : false;\n });\n return i === -1 ? list.length : i;\n };\n\n return (\n <div role=\"group\" aria-label={label} className={s.root({ className })}>\n <p id={instructionsId} className=\"sr-only\">\n {labels.instructions}\n </p>\n <p className=\"sr-only\" aria-live=\"assertive\">\n {message}\n </p>\n {columns.map((column) => {\n const list = shown(column.id);\n const overLimit = column.limit !== undefined && list.length > column.limit;\n return (\n <section\n key={column.id}\n aria-label={column.title}\n data-over={over?.column === column.id || undefined}\n className={s.column()}\n onDragOver={(e) => {\n if (!dragging) return;\n e.preventDefault();\n setOver({ column: column.id, index: indexAt(column.id, e.clientY) });\n }}\n onDragLeave={(e) => {\n if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setOver(null);\n }}\n onDrop={(e) => {\n e.preventDefault();\n if (dragging) commit(dragging, placementOf(dragging), { column: column.id, index: indexAt(column.id, e.clientY) });\n setDragging(null);\n setOver(null);\n }}\n >\n <header className={s.header()}>\n <h3 className={s.title()}>{column.title}</h3>\n <span className={s.count()} data-over-limit={overLimit || undefined}>\n {column.limit !== undefined ? `${list.length}/${column.limit}` : list.length}\n </span>\n </header>\n <ul className={s.list()}>\n {list.length === 0 ? <li className={s.empty()}>{labels.empty}</li> : null}\n {list.map((card) => {\n const id = getId(card);\n return (\n <li\n key={id}\n ref={(el) => {\n if (el) refs.current.set(id, el);\n else refs.current.delete(id);\n }}\n tabIndex={0}\n draggable\n aria-describedby={instructionsId}\n aria-roledescription=\"card\"\n data-grabbed={grab?.id === id || undefined}\n data-dragging={dragging === id || undefined}\n className={s.card()}\n onKeyDown={(e) => onKeyDown(e, id)}\n onFocus={() => {\n // Tab to another card while one is carried: the carried one goes back.\n if (grab && grab.id !== id) {\n setMessage(labels.cancelled(titleOf(grab.id)));\n setGrab(null);\n }\n }}\n onDragStart={(e) => {\n e.dataTransfer.effectAllowed = \"move\";\n e.dataTransfer.setData(\"text/plain\", id);\n setDragging(id);\n }}\n onDragEnd={() => {\n setDragging(null);\n setOver(null);\n }}\n >\n {renderCard(card)}\n </li>\n );\n })}\n </ul>\n </section>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;;;;AAGA,YAAY,WAAW;AACvB,SAAS,UAAU;AAmLb,cA8BM,YA9BN;AA9KC,IAAM,SAAS,GAAG;AAAA,EACvB,OAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MACE;AAAA,IAEF,OAAO;AAAA,EACT;AACF,CAAC;AAsCM,IAAM,eAA6B;AAAA,EACxC,cAAc;AAAA,EACd,SAAS,CAAC,MAAM,WAAW,GAAG,IAAI,kBAAkB,MAAM;AAAA,EAC1D,OAAO,CAAC,MAAM,QAAQ,UAAU,UAAU,GAAG,IAAI,KAAK,MAAM,cAAc,QAAQ,OAAO,KAAK;AAAA,EAC9F,SAAS,CAAC,MAAM,QAAQ,aAAa,GAAG,IAAI,eAAe,MAAM,cAAc,QAAQ;AAAA,EACvF,WAAW,CAAC,SAAS,WAAW,IAAI;AAAA,EACpC,OAAO;AACT;AAgCO,SAAS,OAAU,EAAE,SAAS,OAAO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WAAW,EAAE,MAAM,GAAI,iBAAO,OAAM,IAAQ;AAAA,cACpE,KAAK,IAAI,CAAC,SAAS;AAClB,sBAAM,KAAK,MAAM,IAAI;AACrB,uBACE;AAAA,kBAAC;AAAA;AAAA,oBAEC,KAAK,CAAC,OAAO;AACX,0BAAI,GAAI,MAAK,QAAQ,IAAI,IAAI,EAAE;AAAA,0BAC1B,MAAK,QAAQ,OAAO,EAAE;AAAA,oBAC7B;AAAA,oBACA,UAAU;AAAA,oBACV,WAAS;AAAA,oBACT,oBAAkB;AAAA,oBAClB,wBAAqB;AAAA,oBACrB,gBAAc,MAAM,OAAO,MAAM;AAAA,oBACjC,iBAAe,aAAa,MAAM;AAAA,oBAClC,WAAW,EAAE,KAAK;AAAA,oBAClB,WAAW,CAAC,MAAM,UAAU,GAAG,EAAE;AAAA,oBACjC,SAAS,MAAM;AAEb,0BAAI,QAAQ,KAAK,OAAO,IAAI;AAC1B,mCAAW,OAAO,UAAU,QAAQ,KAAK,EAAE,CAAC,CAAC;AAC7C,gCAAQ,IAAI;AAAA,sBACd;AAAA,oBACF;AAAA,oBACA,aAAa,CAAC,MAAM;AAClB,wBAAE,aAAa,gBAAgB;AAC/B,wBAAE,aAAa,QAAQ,cAAc,EAAE;AACvC,kCAAY,EAAE;AAAA,oBAChB;AAAA,oBACA,WAAW,MAAM;AACf,kCAAY,IAAI;AAChB,8BAAQ,IAAI;AAAA,oBACd;AAAA,oBAEC,qBAAW,IAAI;AAAA;AAAA,kBA9BX;AAAA,gBA+BP;AAAA,cAEJ,CAAC;AAAA,eACH;AAAA;AAAA;AAAA,QAjEK,OAAO;AAAA,MAkEd;AAAA,IAEJ,CAAC;AAAA,KACH;AAEJ;","names":["origin"]}
@@ -35,7 +35,10 @@ type LandscapeProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & {
35
35
  */
36
36
  fade?: boolean;
37
37
  };
38
- /** The Krizaka landscape: a decorative backdrop for a hero or a page's end (`aria-hidden`). */
38
+ /**
39
+ * The Krizaka landscape: a decorative backdrop for a hero or a page's end (`aria-hidden`).
40
+ * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.
41
+ */
39
42
  declare function Landscape({ tone, flock, phoenix, animated, position, fade, className, style, ...props }: LandscapeProps): React.JSX.Element;
40
43
 
41
44
  export { Landscape, type LandscapeProps };
package/dist/landscape.js CHANGED
@@ -1,4 +1,7 @@
1
1
  "use client";
2
+ import {
3
+ warnDeprecated
4
+ } from "./chunk-BDIU5LZB.js";
2
5
  import {
3
6
  cn
4
7
  } from "./chunk-WU4VLSEA.js";
@@ -318,6 +321,7 @@ var CSS = `
318
321
  }
319
322
  `;
320
323
  function Landscape({ tone = "own", flock = true, phoenix = true, animated = true, position = "absolute", fade = true, className, style, ...props }) {
324
+ warnDeprecated("landscape");
321
325
  const u = "kzl" + useId().replace(/[^a-zA-Z0-9_-]/g, "");
322
326
  const box = position === "absolute" ? { position: "absolute", inset: "auto 0 0 0", height: "100%", width: "100%" } : { position: "relative", width: "100%", height: 440 };
323
327
  return /* @__PURE__ */ jsxs(