@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/native/markdown.tsx","../../src/code-block/highlighter.ts","../../src/markdown/parse.ts"],"sourcesContent":["// React Native: the web `Markdown`'s AST (TanStack Markdown, via the same `parseSource`) drawn in Text and View. Raw HTML\n// is never rendered, executable URLs are dropped, `streaming` heals the unfinished end of a text that is arriving. Its own\n// entry (`@krizaka/ui/native/markdown`): the parser and the code grammars never load in an app that does not use it.\nimport { type Theme, Txt, useTheme } from \"@krizaka/ui/native\";\nimport * as React from \"react\";\nimport { Image, Linking, ScrollView, type StyleProp, StyleSheet, Text, View, type ViewStyle } from \"react-native\";\n\nimport { codeHighlighter } from \"../code-block/highlighter\";\nimport { type BlockNode, type InlineNode, parseSource, textOf } from \"../markdown/parse\";\n\nexport type MarkdownProps = {\n /** The Markdown source. */\n children: string;\n /** The text is still arriving (an AI answer): the unfinished end is closed, so no `**` or half a link shows. */\n streaming?: boolean;\n /** Called with the address of a link that is pressed. Default: opens `http(s)`, `mailto:` and `tel:` links with the system. */\n onLinkPress?: (href: string) => void;\n /** Styles merged on the container. */\n style?: StyleProp<ViewStyle>;\n};\n\ntype Context = { theme: Theme; mono: string | undefined; open: (href: string) => void };\n\nconst SYSTEM = /^(https?:|mailto:|tel:)/i;\n\nfunction Inlines({ nodes, ctx }: { nodes: readonly InlineNode[]; ctx: Context }) {\n return nodes.map((node, i) => <Inline key={i} node={node} ctx={ctx} />);\n}\n\nfunction Inline({ node, ctx }: { node: InlineNode; ctx: Context }): React.ReactNode {\n const { theme } = ctx;\n switch (node.type) {\n case \"text\":\n return node.value;\n case \"inlineCode\":\n return <Text style={{ fontFamily: ctx.mono, fontSize: 13.5, backgroundColor: theme.surface3 }}>{` ${node.value} `}</Text>;\n case \"strong\":\n return (\n <Text style={styles.strong}>\n <Inlines nodes={node.children} ctx={ctx} />\n </Text>\n );\n case \"emphasis\":\n return (\n <Text style={styles.em}>\n <Inlines nodes={node.children} ctx={ctx} />\n </Text>\n );\n case \"strike\":\n return (\n <Text style={styles.strike}>\n <Inlines nodes={node.children} ctx={ctx} />\n </Text>\n );\n case \"break\":\n return \"\\n\";\n case \"link\":\n return (\n <Text role=\"link\" onPress={() => ctx.open(node.href)} style={{ color: theme.accentText, textDecorationLine: \"underline\" }}>\n <Inlines nodes={node.children} ctx={ctx} />\n </Text>\n );\n // A picture inside a sentence cannot be drawn in a Text everywhere: its description stands in.\n case \"image\":\n return node.alt;\n case \"footnoteReference\":\n return <Text style={{ color: theme.accentText, fontSize: 11 }}>{` [${node.number}]`}</Text>;\n case \"inlineHtml\":\n return node.value;\n default:\n return null;\n }\n}\n\n/** Code, coloured by the web's grammars from the theme's text roles. */\nfunction Code({ node, ctx }: { node: Extract<BlockNode, { type: \"code\" }>; ctx: Context }) {\n const { theme } = ctx;\n const colour: Record<string, string> = {\n comment: theme.textSecondary,\n string: theme.successText,\n inserted: theme.successText,\n attr: theme.warningText,\n meta: theme.warningText,\n keyword: theme.accentText,\n tag: theme.accentText,\n selector: theme.accentText,\n command: theme.accentText,\n heading: theme.accentText,\n link: theme.accentText,\n type: theme.infoText,\n function: theme.infoText,\n number: theme.infoText,\n literal: theme.infoText,\n deleted: theme.dangerText,\n };\n const { tokens } = codeHighlighter.tokenize(node.value, { lang: node.lang ?? \"text\" });\n return (\n <View style={[styles.code, { backgroundColor: theme.surface1, borderColor: theme.borderDefault }]}>\n {node.title || node.file ? (\n <Txt variant=\"caption\" tone=\"secondary\" style={[styles.codeTitle, { backgroundColor: theme.surface2 }]}>\n {node.title ?? node.file}\n </Txt>\n ) : null}\n <ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.codeBody}>\n <Text style={{ fontFamily: ctx.mono, fontSize: 12.5, lineHeight: 20, color: theme.textPrimary }}>\n {tokens.map((token, i) => (\n <Text key={i} style={token.className && colour[token.className] ? { color: colour[token.className] } : null}>\n {token.value}\n </Text>\n ))}\n </Text>\n </ScrollView>\n </View>\n );\n}\n\nfunction Blocks({ nodes, ctx }: { nodes: readonly BlockNode[]; ctx: Context }) {\n return nodes.map((node, i) => <Block key={i} node={node} ctx={ctx} />);\n}\n\nfunction Block({ node, ctx }: { node: BlockNode; ctx: Context }): React.ReactNode {\n const { theme } = ctx;\n switch (node.type) {\n case \"heading\":\n return node.depth === 1 ? (\n <Txt variant=\"display\">\n <Inlines nodes={node.children} ctx={ctx} />\n </Txt>\n ) : node.depth === 2 ? (\n <Txt variant=\"title\" style={styles.h2}>\n <Inlines nodes={node.children} ctx={ctx} />\n </Txt>\n ) : (\n <Txt variant=\"label\" role=\"heading\" style={styles.h3}>\n <Inlines nodes={node.children} ctx={ctx} />\n </Txt>\n );\n case \"paragraph\": {\n const pictures = node.children.filter((child) => child.type === \"image\");\n const onlyPictures = pictures.length > 0 && node.children.every((child) => child.type === \"image\" || (child.type === \"text\" && !child.value.trim()));\n if (onlyPictures) {\n return pictures.map((picture, i) => <Image key={i} source={{ uri: picture.src }} alt={picture.alt} accessibilityLabel={picture.alt} resizeMode=\"contain\" style={styles.image} />);\n }\n return (\n <Txt>\n <Inlines nodes={node.children} ctx={ctx} />\n </Txt>\n );\n }\n case \"code\":\n return <Code node={node} ctx={ctx} />;\n case \"list\":\n return (\n <View role=\"list\" style={styles.list}>\n {node.items.map((item, i) => (\n <View key={i} role=\"listitem\" style={styles.item}>\n <Txt tone=\"secondary\" style={styles.marker}>\n {item.checked !== undefined ? (item.checked ? \"☑\" : \"☐\") : node.ordered ? `${(node.start ?? 1) + i}.` : \"•\"}\n </Txt>\n <View style={styles.itemBody}>\n <Blocks nodes={item.children} ctx={ctx} />\n </View>\n </View>\n ))}\n </View>\n );\n case \"blockquote\":\n return (\n <View style={[styles.quote, { borderLeftColor: theme.accent }]}>\n <Blocks nodes={node.children} ctx={ctx} />\n </View>\n );\n case \"table\":\n return (\n <ScrollView horizontal showsHorizontalScrollIndicator={false}>\n <View style={[styles.table, { borderColor: theme.borderSubtle }]}>\n {[node.header, ...node.rows].map((row, r) => (\n <View key={r} style={[styles.row, { borderBottomColor: theme.borderSubtle }, r === 0 ? { backgroundColor: theme.surface2 } : null]}>\n {row.map((cell, c) => (\n <Txt key={c} variant={r === 0 ? \"label\" : \"body\"} tone={r === 0 ? \"secondary\" : \"text\"} style={[styles.cell, { textAlign: node.align[c] ?? \"left\" }]}>\n <Inlines nodes={cell.children} ctx={ctx} />\n </Txt>\n ))}\n </View>\n ))}\n </View>\n </ScrollView>\n );\n case \"thematicBreak\":\n return <View style={[styles.rule, { backgroundColor: theme.borderDefault }]} />;\n case \"footnotes\":\n return (\n <View style={styles.list}>\n {node.items.map((item) => (\n <View key={item.id} style={styles.item}>\n <Txt variant=\"caption\" tone=\"secondary\" style={styles.marker}>{`${item.number}.`}</Txt>\n <View style={styles.itemBody}>\n <Blocks nodes={item.children} ctx={ctx} />\n </View>\n </View>\n ))}\n </View>\n );\n case \"html\":\n return <Txt>{node.value}</Txt>;\n default:\n return null;\n }\n}\n\n/** A Markdown text in Text and View: headings, paragraphs, lists (and tasks), quotes, tables, coloured code, links, pictures. */\nexport function Markdown({ children, streaming, onLinkPress, style }: MarkdownProps) {\n const { theme, fonts } = useTheme();\n const blocks = React.useMemo(() => parseSource(children, { streaming }), [children, streaming]);\n const open = React.useCallback(\n (href: string) => {\n if (onLinkPress) return onLinkPress(href);\n if (SYSTEM.test(href)) void Linking.openURL(href);\n },\n [onLinkPress],\n );\n const ctx: Context = { theme, mono: fonts.mono ?? \"Menlo\", open };\n return (\n <View aria-busy={streaming || undefined} style={[styles.root, style]}>\n <Blocks nodes={blocks} ctx={ctx} />\n </View>\n );\n}\n\nexport { textOf };\n\nconst styles = StyleSheet.create({\n root: { gap: 12 },\n strong: { fontWeight: \"700\" },\n em: { fontStyle: \"italic\" },\n strike: { textDecorationLine: \"line-through\" },\n h2: { marginTop: 8 },\n h3: { marginTop: 4 },\n image: { width: \"100%\", aspectRatio: 16 / 9, borderRadius: 12 },\n list: { gap: 6 },\n item: { flexDirection: \"row\", gap: 8 },\n marker: { minWidth: 20, textAlign: \"right\" },\n itemBody: { flex: 1, gap: 6 },\n quote: { gap: 8, paddingLeft: 12, borderLeftWidth: 3 },\n code: { overflow: \"hidden\", borderWidth: StyleSheet.hairlineWidth, borderRadius: 12 },\n codeTitle: { paddingHorizontal: 12, paddingVertical: 6 },\n codeBody: { padding: 12 },\n table: { borderWidth: StyleSheet.hairlineWidth, borderRadius: 8, overflow: \"hidden\" },\n row: { flexDirection: \"row\", borderBottomWidth: StyleSheet.hairlineWidth },\n cell: { width: 120, paddingHorizontal: 10, paddingVertical: 8 },\n rule: { height: StyleSheet.hairlineWidth },\n});\n","// The highlighter of every code sample: TanStack Highlight (a deterministic, synchronous tokenizer — the same markup on\n// the server and on the client) with the grammars a Krizaka page shows. Each grammar is registered by hand: nothing\n// else is bundled. An unknown language is plain text, never an error.\nimport { createHighlighter } from \"@tanstack/highlight/core\";\nimport { css } from \"@tanstack/highlight/languages/css\";\nimport { diff } from \"@tanstack/highlight/languages/diff\";\nimport { env } from \"@tanstack/highlight/languages/env\";\nimport { html } from \"@tanstack/highlight/languages/html\";\nimport { java } from \"@tanstack/highlight/languages/java\";\nimport { js } from \"@tanstack/highlight/languages/js\";\nimport { json } from \"@tanstack/highlight/languages/json\";\nimport { jsx } from \"@tanstack/highlight/languages/jsx\";\nimport { kotlin } from \"@tanstack/highlight/languages/kotlin\";\nimport { plaintext } from \"@tanstack/highlight/languages/plaintext\";\nimport { shell } from \"@tanstack/highlight/languages/shell\";\nimport { ts } from \"@tanstack/highlight/languages/ts\";\nimport { tsx } from \"@tanstack/highlight/languages/tsx\";\nimport { yaml } from \"@tanstack/highlight/languages/yaml\";\n\n/** The languages a sample can be written in, with the names they answer to (`bash`, `xml`, `yml`, `kt`, `properties`…). */\nexport const codeHighlighter = createHighlighter({\n languages: [css, diff, { ...env, aliases: [...(env.aliases ?? []), \"properties\"] }, html, java, js, json, jsx, kotlin, plaintext, shell, ts, tsx, yaml],\n fallbackLanguage: \"plaintext\",\n});\n","// The shared half of Markdown, web and React Native: the source becomes TanStack Markdown's serializable AST\n// (`@tanstack/markdown/parser`) — raw HTML is never enabled (it stays text), executable URLs are dropped (`javascript:`,\n// `data:`), and a text that is still arriving is healed so the half-written end reads like the finished one.\nimport type { BlockNode } from \"@tanstack/markdown\";\nimport { streamingMarkdownExtension } from \"@tanstack/markdown/extensions/streaming\";\nimport { parseMarkdown } from \"@tanstack/markdown/parser\";\n\nexport type { BlockNode, InlineNode, ListItemNode, TableNode } from \"@tanstack/markdown\";\n\nexport type ParseOptions = {\n /** The text is still arriving (an AI answer): the unfinished end is closed, so it never shows `**` or a half link. */\n streaming?: boolean;\n /** Gives every heading an `id` (`#section` links, a table of contents). */\n headingIds?: boolean;\n};\n\nconst FENCE = /^ {0,3}(```|~~~)/gm;\n\n/** A link or image cut at its end: `[label`, `[label]`, `[label](http…` become `label`, an image is dropped. Linear: one scan of the last `[`. */\nfunction healLink(text: string): string {\n const open = text.lastIndexOf(\"[\");\n if (open < 0) return text;\n const rest = text.slice(open + 1);\n if (rest.includes(\"\\n\")) return text;\n const image = open > 0 && text[open - 1] === \"!\";\n const close = rest.indexOf(\"]\");\n const after = close < 0 ? \"\" : rest.slice(close + 1);\n const cut = close < 0 || after === \"\" || (after.startsWith(\"(\") && !after.includes(\")\"));\n if (!cut) return text;\n const head = text.slice(0, image ? open - 1 : open);\n return image ? head : head + (close < 0 ? rest : rest.slice(0, close));\n}\n\n/**\n * Closes what a text cut in the middle leaves open: an emphasis (`**`, `~~`) or a code span, a link or image whose\n * address has not arrived. Inside an open code fence nothing is healed — it is shown as code as it comes.\n */\nexport function healStreaming(source: string): string {\n if (((source.match(FENCE) ?? []).length & 1) === 1) return source;\n let out = healLink(source);\n const cut = out.lastIndexOf(\"\\n\\n\");\n const block = cut < 0 ? out : out.slice(cut + 2);\n const open = (marker: string) => (block.split(marker).length - 1) % 2 === 1;\n // A marker just opened, with nothing after it yet, is dropped rather than shown as an empty emphasis.\n const close = (marker: string) => (out.endsWith(marker) ? out.slice(0, -marker.length) : `${out}${marker}`);\n if (open(\"`\")) return close(\"`\");\n for (const marker of [\"**\", \"~~\"]) if (open(marker)) out = close(marker);\n return out;\n}\n\n/** The blocks of a Markdown source. */\nexport function parseSource(source: string, { streaming = false, headingIds = false }: ParseOptions = {}): BlockNode[] {\n return parseMarkdown(streaming ? healStreaming(source) : source, { headingIds, ...(streaming && { extensions: [streamingMarkdownExtension()] }) }).children;\n}\n\n/** The text of inline nodes (a heading's label, an image's alt). */\nexport function textOf(nodes: readonly { type: string; value?: string; children?: readonly unknown[] }[]): string {\n return nodes\n .map((node) => (node.children ? textOf(node.children as typeof nodes) : (node.value ?? \"\")))\n .join(\"\");\n}\n"],"mappings":";AAGA,SAAqB,KAAK,gBAAgB;AAC1C,YAAY,WAAW;AACvB,SAAS,OAAO,SAAS,YAA4B,YAAY,MAAM,YAA4B;;;ACFnG,SAAS,yBAAyB;AAClC,SAAS,WAAW;AACpB,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,UAAU;AACnB,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B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ACrD,MAAM,EAAE,UAAU,UAAU,aAAa,WAAW,eAAe,cAAc,GAAG;AAAA,EACpF,WAAW,EAAE,mBAAmB,IAAI,iBAAiB,EAAE;AAAA,EACvD,UAAU,EAAE,SAAS,GAAG;AAAA,EACxB,OAAO,EAAE,aAAa,WAAW,eAAe,cAAc,GAAG,UAAU,SAAS;AAAA,EACpF,KAAK,EAAE,eAAe,OAAO,mBAAmB,WAAW,cAAc;AAAA,EACzE,MAAM,EAAE,OAAO,KAAK,mBAAmB,IAAI,iBAAiB,EAAE;AAAA,EAC9D,MAAM,EAAE,QAAQ,WAAW,cAAc;AAC3C,CAAC;","names":["jsx"]}
1
+ {"version":3,"sources":["../../src/native/markdown.tsx","../../src/code-block/highlighter.ts","../../src/markdown/parse.ts"],"sourcesContent":["// React Native: the web `Markdown`'s AST (TanStack Markdown, via the same `parseSource`) drawn in Text and View. Raw HTML\n// is never rendered, executable URLs are dropped, `streaming` heals the unfinished end of a text that is arriving. Its own\n// entry (`@krizaka/ui/native/markdown`): the parser and the code grammars never load in an app that does not use it.\nimport { Badge, type Theme, Txt, useTheme } from \"@krizaka/ui/native\";\nimport * as React from \"react\";\nimport { Image, Linking, ScrollView, type StyleProp, StyleSheet, Text, useWindowDimensions, View, type ViewStyle } from \"react-native\";\n\nimport { codeHighlighter } from \"../code-block/highlighter\";\nimport { warnDeprecated } from \"../deprecated\";\nimport { type BlockNode, type InlineNode, parseSource, textOf } from \"../markdown/parse\";\n\nexport type MarkdownProps = {\n /** The Markdown source. */\n children: string;\n /** The text is still arriving (an AI answer): the unfinished end is closed, so no `**` or half a link shows. */\n streaming?: boolean;\n /** Marks a generated document with a quiet chip, when `generatedLabel` is supplied. */\n generated?: boolean;\n /** The chip's words, passed translated by the host; no chip is rendered without them. */\n generatedLabel?: string;\n /** Called with the address of a link that is pressed. Default: opens `http(s)`, `mailto:` and `tel:` links with the system. */\n onLinkPress?: (href: string) => void;\n /** Styles merged on the container. */\n style?: StyleProp<ViewStyle>;\n};\n\ntype Context = { theme: Theme; mono: string | undefined; measureKey: string; open: (href: string) => void };\n\nconst SYSTEM = /^(https?:|mailto:|tel:)/i;\n\nfunction Inlines({ nodes, ctx }: { nodes: readonly InlineNode[]; ctx: Context }) {\n return nodes.map((node, i) => <Inline key={i} node={node} ctx={ctx} />);\n}\n\nfunction Inline({ node, ctx }: { node: InlineNode; ctx: Context }): React.ReactNode {\n const { theme } = ctx;\n switch (node.type) {\n case \"text\":\n return node.value;\n case \"inlineCode\":\n return <Text style={{ fontFamily: ctx.mono, fontSize: 13.5, backgroundColor: theme.surface3 }}>{` ${node.value} `}</Text>;\n case \"strong\":\n return (\n <Text style={styles.strong}>\n <Inlines nodes={node.children} ctx={ctx} />\n </Text>\n );\n case \"emphasis\":\n return (\n <Text style={styles.em}>\n <Inlines nodes={node.children} ctx={ctx} />\n </Text>\n );\n case \"strike\":\n return (\n <Text style={styles.strike}>\n <Inlines nodes={node.children} ctx={ctx} />\n </Text>\n );\n case \"break\":\n return \"\\n\";\n case \"link\":\n return (\n <Text role=\"link\" onPress={() => ctx.open(node.href)} style={{ color: theme.accentText, textDecorationLine: \"underline\" }}>\n <Inlines nodes={node.children} ctx={ctx} />\n </Text>\n );\n // A picture inside a sentence cannot be drawn in a Text everywhere: its description stands in.\n case \"image\":\n return node.alt;\n case \"footnoteReference\":\n return <Text style={{ color: theme.accentText, fontSize: 11 }}>{` [${node.number}]`}</Text>;\n case \"inlineHtml\":\n return node.value;\n default:\n return null;\n }\n}\n\n/** Code, coloured by the web's grammars from the theme's text roles. */\nfunction Code({ node, ctx }: { node: Extract<BlockNode, { type: \"code\" }>; ctx: Context }) {\n const { theme } = ctx;\n const colour: Record<string, string> = {\n comment: theme.textSecondary,\n string: theme.successText,\n inserted: theme.successText,\n attr: theme.warningText,\n meta: theme.warningText,\n keyword: theme.accentText,\n tag: theme.accentText,\n selector: theme.accentText,\n command: theme.accentText,\n heading: theme.accentText,\n link: theme.accentText,\n type: theme.infoText,\n function: theme.infoText,\n number: theme.infoText,\n literal: theme.infoText,\n deleted: theme.dangerText,\n };\n const { tokens } = codeHighlighter.tokenize(node.value, { lang: node.lang ?? \"text\" });\n return (\n <View style={[styles.code, { backgroundColor: theme.surface1, borderColor: theme.borderDefault }]}>\n {node.title || node.file ? (\n <Txt variant=\"caption\" tone=\"secondary\" style={[styles.codeTitle, { backgroundColor: theme.surface2 }]}>\n {node.title ?? node.file}\n </Txt>\n ) : null}\n <ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.codeBody}>\n <Text style={{ fontFamily: ctx.mono, fontSize: 12.5, lineHeight: 20, color: theme.textPrimary }}>\n {tokens.map((token, i) => (\n <Text key={i} style={token.className && colour[token.className] ? { color: colour[token.className] } : null}>\n {token.value}\n </Text>\n ))}\n </Text>\n </ScrollView>\n </View>\n );\n}\n\nfunction Blocks({ nodes, ctx }: { nodes: readonly BlockNode[]; ctx: Context }) {\n return nodes.map((node, i) => <Block key={i} node={node} ctx={ctx} />);\n}\n\nfunction Table({ node, ctx }: { node: Extract<BlockNode, { type: \"table\" }>; ctx: Context }) {\n const { theme } = ctx;\n const signature = JSON.stringify([node, ctx.measureKey]);\n const [measurement, setMeasurement] = React.useState<{ signature: string; widths: number[] }>({ signature, widths: [] });\n const activeSignature = React.useRef(signature);\n React.useLayoutEffect(() => {\n activeSignature.current = signature;\n }, [signature]);\n const widths = measurement.signature === signature ? measurement.widths : [];\n return (\n <ScrollView horizontal showsHorizontalScrollIndicator role=\"region\" tabIndex={0} aria-label={node.header.map((cell) => textOf(cell.children)).join(\", \")}>\n <View style={[styles.table, { borderColor: theme.borderSubtle }]}>\n {[node.header, ...node.rows].map((row, r) => (\n <View key={r} style={[styles.row, { borderBottomColor: theme.borderSubtle }, r === 0 ? { backgroundColor: theme.surface2 } : null]}>\n {row.map((cell, c) => (\n <Txt\n key={c}\n variant={r === 0 ? \"label\" : \"body\"}\n tone={r === 0 ? \"secondary\" : \"text\"}\n style={[styles.cell, { width: widths[c], textAlign: node.align[c] ?? \"left\" }]}\n onLayout={({ nativeEvent: { layout: { width } } }) => {\n setMeasurement((current) => {\n if (activeSignature.current !== signature) return current;\n const currentWidths = current.signature === signature ? current.widths : [];\n if (width <= (currentWidths[c] ?? 0)) return current;\n const next = [...currentWidths];\n next[c] = width;\n return { signature, widths: next };\n });\n }}\n >\n <Inlines nodes={cell.children} ctx={ctx} />\n </Txt>\n ))}\n </View>\n ))}\n </View>\n </ScrollView>\n );\n}\n\nfunction Block({ node, ctx }: { node: BlockNode; ctx: Context }): React.ReactNode {\n const { theme } = ctx;\n switch (node.type) {\n case \"heading\":\n return node.depth === 1 ? (\n <Txt variant=\"display\">\n <Inlines nodes={node.children} ctx={ctx} />\n </Txt>\n ) : node.depth === 2 ? (\n <Txt variant=\"title\" style={styles.h2}>\n <Inlines nodes={node.children} ctx={ctx} />\n </Txt>\n ) : (\n <Txt variant=\"label\" role=\"heading\" style={styles.h3}>\n <Inlines nodes={node.children} ctx={ctx} />\n </Txt>\n );\n case \"paragraph\": {\n const pictures = node.children.filter((child) => child.type === \"image\");\n const onlyPictures = pictures.length > 0 && node.children.every((child) => child.type === \"image\" || (child.type === \"text\" && !child.value.trim()));\n if (onlyPictures) {\n return pictures.map((picture, i) => <Image key={i} source={{ uri: picture.src }} alt={picture.alt} accessibilityLabel={picture.alt} resizeMode=\"contain\" style={styles.image} />);\n }\n return (\n <Txt>\n <Inlines nodes={node.children} ctx={ctx} />\n </Txt>\n );\n }\n case \"code\":\n return <Code node={node} ctx={ctx} />;\n case \"list\":\n return (\n <View role=\"list\" style={styles.list}>\n {node.items.map((item, i) => (\n <View key={i} role=\"listitem\" style={styles.item}>\n <Txt tone=\"secondary\" style={styles.marker}>\n {item.checked !== undefined ? (item.checked ? \"☑\" : \"☐\") : node.ordered ? `${(node.start ?? 1) + i}.` : \"•\"}\n </Txt>\n <View style={styles.itemBody}>\n <Blocks nodes={item.children} ctx={ctx} />\n </View>\n </View>\n ))}\n </View>\n );\n case \"blockquote\":\n return (\n <View style={[styles.quote, { borderLeftColor: theme.accent }]}>\n <Blocks nodes={node.children} ctx={ctx} />\n </View>\n );\n case \"table\":\n return <Table node={node} ctx={ctx} />;\n case \"thematicBreak\":\n return <View style={[styles.rule, { backgroundColor: theme.borderDefault }]} />;\n case \"footnotes\":\n return (\n <View style={styles.list}>\n {node.items.map((item) => (\n <View key={item.id} style={styles.item}>\n <Txt variant=\"caption\" tone=\"secondary\" style={styles.marker}>{`${item.number}.`}</Txt>\n <View style={styles.itemBody}>\n <Blocks nodes={item.children} ctx={ctx} />\n </View>\n </View>\n ))}\n </View>\n );\n case \"html\":\n return <Txt>{node.value}</Txt>;\n default:\n return null;\n }\n}\n\n/**\n * A Markdown text in Text and View: headings, paragraphs, lists (and tasks), quotes, tables, coloured code, links, pictures.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no app imports it. Removed in 4.0.\n */\nexport function Markdown({ children, streaming, generated, generatedLabel, onLinkPress, style }: MarkdownProps) {\n warnDeprecated(\"native/markdown\");\n const { theme, fonts } = useTheme();\n const { fontScale } = useWindowDimensions();\n const blocks = React.useMemo(() => parseSource(children, { streaming }), [children, streaming]);\n const open = React.useCallback(\n (href: string) => {\n if (onLinkPress) return onLinkPress(href);\n if (SYSTEM.test(href)) void Linking.openURL(href);\n },\n [onLinkPress],\n );\n const ctx: Context = { theme, mono: fonts.mono ?? \"Menlo\", measureKey: JSON.stringify([fonts.sans, fonts.mono, fontScale]), open };\n return (\n <View aria-busy={streaming || undefined} style={[styles.root, style]}>\n {generated && generatedLabel ? <Badge>{generatedLabel}</Badge> : null}\n <Blocks nodes={blocks} ctx={ctx} />\n </View>\n );\n}\n\nexport { textOf };\n\nconst styles = StyleSheet.create({\n root: { gap: 12 },\n strong: { fontWeight: \"700\" },\n em: { fontStyle: \"italic\" },\n strike: { textDecorationLine: \"line-through\" },\n h2: { marginTop: 8 },\n h3: { marginTop: 4 },\n image: { width: \"100%\", aspectRatio: 16 / 9, borderRadius: 12 },\n list: { gap: 6 },\n item: { flexDirection: \"row\", gap: 8 },\n marker: { minWidth: 20, textAlign: \"right\" },\n itemBody: { flex: 1, gap: 6 },\n quote: { gap: 8, paddingLeft: 12, borderLeftWidth: 3 },\n code: { overflow: \"hidden\", borderWidth: StyleSheet.hairlineWidth, borderRadius: 12 },\n codeTitle: { paddingHorizontal: 12, paddingVertical: 6 },\n codeBody: { padding: 12 },\n table: { borderWidth: StyleSheet.hairlineWidth, borderRadius: 8, overflow: \"hidden\" },\n row: { flexDirection: \"row\", borderBottomWidth: StyleSheet.hairlineWidth },\n cell: { flexShrink: 0, paddingHorizontal: 10, paddingVertical: 8 },\n rule: { height: StyleSheet.hairlineWidth },\n});\n","// The highlighter of every code sample: TanStack Highlight (a deterministic, synchronous tokenizer — the same markup on\n// the server and on the client) with the grammars a Krizaka page shows. Each grammar is registered by hand: nothing\n// else is bundled. An unknown language is plain text, never an error.\nimport { createHighlighter } from \"@tanstack/highlight/core\";\nimport { css } from \"@tanstack/highlight/languages/css\";\nimport { diff } from \"@tanstack/highlight/languages/diff\";\nimport { env } from \"@tanstack/highlight/languages/env\";\nimport { html } from \"@tanstack/highlight/languages/html\";\nimport { java } from \"@tanstack/highlight/languages/java\";\nimport { js } from \"@tanstack/highlight/languages/js\";\nimport { json } from \"@tanstack/highlight/languages/json\";\nimport { jsx } from \"@tanstack/highlight/languages/jsx\";\nimport { kotlin } from \"@tanstack/highlight/languages/kotlin\";\nimport { plaintext } from \"@tanstack/highlight/languages/plaintext\";\nimport { shell } from \"@tanstack/highlight/languages/shell\";\nimport { ts } from \"@tanstack/highlight/languages/ts\";\nimport { tsx } from \"@tanstack/highlight/languages/tsx\";\nimport { yaml } from \"@tanstack/highlight/languages/yaml\";\n\n/** The languages a sample can be written in, with the names they answer to (`bash`, `xml`, `yml`, `kt`, `properties`…). */\nexport const codeHighlighter = createHighlighter({\n languages: [css, diff, { ...env, aliases: [...(env.aliases ?? []), \"properties\"] }, html, java, js, json, jsx, kotlin, plaintext, shell, ts, tsx, yaml],\n fallbackLanguage: \"plaintext\",\n});\n","// The shared half of Markdown, web and React Native: the source becomes TanStack Markdown's serializable AST\n// (`@tanstack/markdown/parser`) — raw HTML is never enabled (it stays text), executable URLs are dropped (`javascript:`,\n// `data:`), and a text that is still arriving is healed so the half-written end reads like the finished one.\nimport type { BlockNode } from \"@tanstack/markdown\";\nimport { streamingMarkdownExtension } from \"@tanstack/markdown/extensions/streaming\";\nimport { parseMarkdown } from \"@tanstack/markdown/parser\";\n\nexport type { BlockNode, InlineNode, ListItemNode, TableNode } from \"@tanstack/markdown\";\n\nexport type ParseOptions = {\n /** The text is still arriving (an AI answer): the unfinished end is closed, so it never shows `**` or a half link. */\n streaming?: boolean;\n /** Gives every heading an `id` (`#section` links, a table of contents). */\n headingIds?: boolean;\n};\n\nconst FENCE = /^ {0,3}(```|~~~)/gm;\n\n/** A link or image cut at its end: `[label`, `[label]`, `[label](http…` become `label`, an image is dropped. Linear: one scan of the last `[`. */\nfunction healLink(text: string): string {\n const open = text.lastIndexOf(\"[\");\n if (open < 0) return text;\n const rest = text.slice(open + 1);\n if (rest.includes(\"\\n\")) return text;\n const image = open > 0 && text[open - 1] === \"!\";\n const close = rest.indexOf(\"]\");\n const after = close < 0 ? \"\" : rest.slice(close + 1);\n const cut = close < 0 || after === \"\" || (after.startsWith(\"(\") && !after.includes(\")\"));\n if (!cut) return text;\n const head = text.slice(0, image ? open - 1 : open);\n return image ? head : head + (close < 0 ? rest : rest.slice(0, close));\n}\n\n/**\n * Closes what a text cut in the middle leaves open: an emphasis (`**`, `~~`) or a code span, a link or image whose\n * address has not arrived. Inside an open code fence nothing is healed — it is shown as code as it comes.\n */\nexport function healStreaming(source: string): string {\n if (((source.match(FENCE) ?? []).length & 1) === 1) return source;\n let out = healLink(source);\n const cut = out.lastIndexOf(\"\\n\\n\");\n const block = cut < 0 ? out : out.slice(cut + 2);\n const open = (marker: string) => (block.split(marker).length - 1) % 2 === 1;\n // A marker just opened, with nothing after it yet, is dropped rather than shown as an empty emphasis.\n const close = (marker: string) => (out.endsWith(marker) ? out.slice(0, -marker.length) : `${out}${marker}`);\n if (open(\"`\")) return close(\"`\");\n for (const marker of [\"**\", \"~~\"]) if (open(marker)) out = close(marker);\n return out;\n}\n\n/** The blocks of a Markdown source. */\nexport function parseSource(source: string, { streaming = false, headingIds = false }: ParseOptions = {}): BlockNode[] {\n return parseMarkdown(streaming ? healStreaming(source) : source, { headingIds, ...(streaming && { extensions: [streamingMarkdownExtension()] }) }).children;\n}\n\n/** The text of inline nodes (a heading's label, an image's alt). */\nexport function textOf(nodes: readonly { type: string; value?: string; children?: readonly unknown[] }[]): string {\n return nodes\n .map((node) => (node.children ? textOf(node.children as typeof nodes) : (node.value ?? \"\")))\n .join(\"\");\n}\n"],"mappings":";;;;;AAGA,SAAS,OAAmB,KAAK,gBAAgB;AACjD,YAAY,WAAW;AACvB,SAAS,OAAO,SAAS,YAA4B,YAAY,MAAM,qBAAqB,YAA4B;;;ACFxH,SAAS,yBAAyB;AAClC,SAAS,WAAW;AACpB,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,UAAU;AACnB,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B,SAAS,aAAa;AACtB,SAAS,UAAU;AACnB,SAAS,WAAW;AACpB,SAAS,YAAY;AAGd,IAAM,kBAAkB,kBAAkB;AAAA,EAC/C,WAAW,CAAC,KAAK,MAAM,EAAE,GAAG,KAAK,SAAS,CAAC,GAAI,IAAI,WAAW,CAAC,GAAI,YAAY,EAAE,GAAG,MAAM,MAAM,IAAI,MAAM,KAAK,QAAQ,WAAW,OAAO,IAAI,KAAK,IAAI;AAAA,EACtJ,kBAAkB;AACpB,CAAC;;;ACnBD,SAAS,kCAAkC;AAC3C,SAAS,qBAAqB;AAW9B,IAAM,QAAQ;AAGd,SAAS,SAAS,MAAsB;AACtC,Q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,7 @@ type MediaCaptureProps = {
43
43
  * The camera in a screen, on expo-camera: asks for the permission only when the person presses the button, sends them
44
44
  * to Settings when it was refused for good, takes a photo or records a clip (and the microphone for a clip), switches
45
45
  * cameras. The web `MediaCapture` with the same words.
46
+ * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no app imports it. Removed in 4.0.
46
47
  */
47
48
  declare function MediaCapture({ mode, facing: initialFacing, maxDuration, onCapture, onError, aspectRatio, labels, style }: MediaCaptureProps): React.JSX.Element;
48
49
 
@@ -1,3 +1,7 @@
1
+ import {
2
+ warnDeprecated
3
+ } from "../chunk-KGLRZMCY.js";
4
+
1
5
  // src/native/media-capture.tsx
2
6
  import { Button, Txt, useReducedMotion, useTheme } from "@krizaka/ui/native";
3
7
  import { CameraView, useCameraPermissions, useMicrophonePermissions } from "expo-camera";
@@ -6,6 +10,7 @@ import { Linking, Pressable, StyleSheet, View } from "react-native";
6
10
  import Svg, { Path } from "react-native-svg";
7
11
  import { jsx, jsxs } from "react/jsx-runtime";
8
12
  function MediaCapture({ mode = "photo", facing: initialFacing = "front", maxDuration, onCapture, onError, aspectRatio = 3 / 4, labels, style }) {
13
+ warnDeprecated("native/media-capture");
9
14
  const { theme, radius } = useTheme();
10
15
  const reduce = useReducedMotion();
11
16
  const camera = React.useRef(null);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/native/media-capture.tsx"],"sourcesContent":["// @krizaka/ui/native/media-capture — its own entry, because it imports expo-camera: an optional peer, installed only\n// by the apps that use the camera. The theme and the buttons come from @krizaka/ui/native.\nimport { Button, Txt, useReducedMotion, useTheme } from \"@krizaka/ui/native\";\nimport { CameraView, useCameraPermissions, useMicrophonePermissions } from \"expo-camera\";\nimport * as React from \"react\";\nimport { Linking, Pressable, type StyleProp, StyleSheet, View, type ViewStyle } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nexport type MediaCaptureLabels = {\n /** Why the camera is asked for, before the request (\"Use your camera to take a photo\"). */\n prompt: string;\n /** The button that asks (\"Turn on the camera\"). */\n start: string;\n /** Permission refused for good (\"Camera access is off. Turn it on in Settings.\"). */\n denied: string;\n /** Opens the app's settings (\"Open Settings\"). */\n settings: string;\n takePhoto: string;\n startRecording: string;\n stopRecording: string;\n switchCamera: string;\n};\n\nexport type NativeCaptureResult = {\n /** The file of the photo or the clip, on the device. */\n uri: string;\n /** `photo` or `video`. */\n kind: \"photo\" | \"video\";\n};\n\nexport type MediaCaptureProps = {\n /** What it captures: `photo` (default) or `video`. */\n mode?: \"photo\" | \"video\";\n /** The camera at first: `front` (default) or `back`. */\n facing?: \"front\" | \"back\";\n /** The longest clip, in seconds. */\n maxDuration?: number;\n /** Called with the photo taken or the clip recorded. */\n onCapture: (result: NativeCaptureResult) => void;\n /** Called when a capture fails. */\n onError?: (error: unknown) => void;\n /** The width / height ratio of the preview. Default 3 / 4. */\n aspectRatio?: number;\n /** The words, passed translated. */\n labels: MediaCaptureLabels;\n /** Styles merged last, on the frame. */\n style?: StyleProp<ViewStyle>;\n};\n\n/**\n * The camera in a screen, on expo-camera: asks for the permission only when the person presses the button, sends them\n * to Settings when it was refused for good, takes a photo or records a clip (and the microphone for a clip), switches\n * cameras. The web `MediaCapture` with the same words.\n */\nexport function MediaCapture({ mode = \"photo\", facing: initialFacing = \"front\", maxDuration, onCapture, onError, aspectRatio = 3 / 4, labels, style }: MediaCaptureProps) {\n const { theme, radius } = useTheme();\n const reduce = useReducedMotion();\n const camera = React.useRef<CameraView>(null);\n const [permission, requestPermission] = useCameraPermissions();\n const [microphone, requestMicrophone] = useMicrophonePermissions();\n const [facing, setFacing] = React.useState(initialFacing);\n const [ready, setReady] = React.useState(false);\n const [recording, setRecording] = React.useState(false);\n\n const ask = async () => {\n const result = await requestPermission();\n if (result.granted && mode === \"video\" && !microphone?.granted) await requestMicrophone();\n };\n\n const shoot = async () => {\n if (!camera.current || !ready) return;\n try {\n if (mode === \"photo\") {\n const photo = await camera.current.takePictureAsync({ quality: 0.9 });\n if (photo) onCapture({ uri: photo.uri, kind: \"photo\" });\n } else if (recording) {\n camera.current.stopRecording();\n } else {\n setRecording(true);\n const clip = await camera.current.recordAsync(maxDuration ? { maxDuration } : undefined);\n setRecording(false);\n if (clip) onCapture({ uri: clip.uri, kind: \"video\" });\n }\n } catch (error) {\n setRecording(false);\n onError?.(error);\n }\n };\n\n const frame = [styles.frame, { aspectRatio, borderRadius: radius.md, backgroundColor: theme.media }, style];\n\n if (!permission?.granted) {\n const blocked = permission ? !permission.canAskAgain : false;\n return (\n <View style={[frame, styles.panel]}>\n <Txt style={styles.center}>\n {blocked ? labels.denied : labels.prompt}\n </Txt>\n {blocked ? (\n <Button label={labels.settings} variant=\"secondary\" onPress={() => void Linking.openSettings()} />\n ) : (\n <Button label={labels.start} variant=\"primary\" onPress={() => void ask()} />\n )}\n </View>\n );\n }\n\n return (\n <View style={frame}>\n <CameraView\n ref={camera}\n style={StyleSheet.absoluteFill}\n facing={facing}\n mode={mode === \"video\" ? \"video\" : \"picture\"}\n mirror={facing === \"front\"}\n onCameraReady={() => setReady(true)}\n aria-hidden\n />\n <View style={styles.bar}>\n <View style={styles.side} />\n <Pressable\n role=\"button\"\n aria-label={mode === \"photo\" ? labels.takePhoto : recording ? labels.stopRecording : labels.startRecording}\n aria-disabled={!ready}\n disabled={!ready}\n onPress={() => void shoot()}\n style={({ pressed }) => [styles.shutter, { borderColor: theme.textOnMedia, opacity: pressed && !reduce ? 0.8 : 1 }]}\n >\n <View\n style={[\n mode === \"video\" && recording ? styles.stop : styles.dot,\n { backgroundColor: mode === \"video\" ? theme.danger : theme.textOnMedia },\n ]}\n />\n </Pressable>\n <Pressable\n role=\"button\"\n aria-label={labels.switchCamera}\n aria-disabled={recording}\n disabled={recording}\n hitSlop={8}\n onPress={() => setFacing((f) => (f === \"front\" ? \"back\" : \"front\"))}\n style={[styles.side, styles.flip, { backgroundColor: theme.scrimStrong, opacity: recording ? 0 : 1 }]}\n >\n <Svg width={22} height={22} viewBox=\"0 0 24 24\" fill=\"none\" stroke={theme.textOnMedia} strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <Path d=\"M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3M18 3v4h-4M6 21v-4h4\" />\n </Svg>\n </Pressable>\n </View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n frame: { width: \"100%\", overflow: \"hidden\" },\n panel: { alignItems: \"center\", justifyContent: \"center\", gap: 16, padding: 24 },\n center: { textAlign: \"center\" },\n bar: { position: \"absolute\", left: 0, right: 0, bottom: 16, flexDirection: \"row\", alignItems: \"center\", justifyContent: \"space-evenly\" },\n side: { width: 48, height: 48 },\n flip: { borderRadius: 24, alignItems: \"center\", justifyContent: \"center\" },\n shutter: { width: 72, height: 72, borderRadius: 36, borderWidth: 4, alignItems: \"center\", justifyContent: \"center\" },\n dot: { width: 54, height: 54, borderRadius: 27 },\n stop: { width: 26, height: 26, borderRadius: 6 },\n});\n"],"mappings":";AAEA,SAAS,QAAQ,KAAK,kBAAkB,gBAAgB;AACxD,SAAS,YAAY,sBAAsB,gCAAgC;AAC3E,YAAY,WAAW;AACvB,SAAS,SAAS,WAA2B,YAAY,YAA4B;AACrF,OAAO,OAAO,YAAY;AAwFpB,SACE,KADF;AAxCC,SAAS,aAAa,EAAE,OAAO,SAAS,QAAQ,gBAAgB,SAAS,aAAa,WAAW,SAAS,cAAc,IAAI,GAAG,QAAQ,MAAM,GAAsB;AACxK,QAAM,EAAE,OAAO,OAAO,IAAI,SAAS;AACnC,QAAM,SAAS,iBAAiB;AAChC,QAAM,SAAe,aAAmB,IAAI;AAC5C,QAAM,CAAC,YAAY,iBAAiB,IAAI,qBAAqB;AAC7D,QAAM,CAAC,YAAY,iBAAiB,IAAI,yBAAyB;AACjE,QAAM,CAAC,QAAQ,SAAS,IAAU,eAAS,aAAa;AACxD,QAAM,CAAC,OAAO,QAAQ,IAAU,eAAS,KAAK;AAC9C,QAAM,CAAC,WAAW,YAAY,I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AK,QAAO,QAAQ,MAAM,aAAa,aAAa,GAAG,eAAc,SAAQ,gBAAe,SAAQ,eAAW,MAC7J,8BAAC,QAAK,GAAE,qEAAoE,GAC9E;AAAA;AAAA,MACF;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,IAAM,SAAS,WAAW,OAAO;AAAA,EAC/B,OAAO,EAAE,OAAO,QAAQ,UAAU,SAAS;AAAA,EAC3C,OAAO,EAAE,YAAY,UAAU,gBAAgB,UAAU,KAAK,IAAI,SAAS,GAAG;AAAA,EAC9E,QAAQ,EAAE,WAAW,SAAS;AAAA,EAC9B,KAAK,EAAE,UAAU,YAAY,MAAM,GAAG,OAAO,GAAG,QAAQ,IAAI,eAAe,OAAO,YAAY,UAAU,gBAAgB,eAAe;AAAA,EACvI,MAAM,EAAE,OAAO,IAAI,QAAQ,GAAG;AAAA,EAC9B,MAAM,EAAE,cAAc,IAAI,YAAY,UAAU,gBAAgB,SAAS;AAAA,EACzE,SAAS,EAAE,OAAO,IAAI,QAAQ,IAAI,cAAc,IAAI,aAAa,GAAG,YAAY,UAAU,gBAAgB,SAAS;AAAA,EACnH,KAAK,EAAE,OAAO,IAAI,QAAQ,IAAI,cAAc,GAAG;AAAA,EAC/C,MAAM,EAAE,OAAO,IAAI,QAAQ,IAAI,cAAc,EAAE;AACjD,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/native/media-capture.tsx"],"sourcesContent":["// @krizaka/ui/native/media-capture — its own entry, because it imports expo-camera: an optional peer, installed only\n// by the apps that use the camera. The theme and the buttons come from @krizaka/ui/native.\nimport { Button, Txt, useReducedMotion, useTheme } from \"@krizaka/ui/native\";\nimport { CameraView, useCameraPermissions, useMicrophonePermissions } from \"expo-camera\";\nimport * as React from \"react\";\nimport { Linking, Pressable, type StyleProp, StyleSheet, View, type ViewStyle } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nimport { warnDeprecated } from \"../deprecated\";\n\nexport type MediaCaptureLabels = {\n /** Why the camera is asked for, before the request (\"Use your camera to take a photo\"). */\n prompt: string;\n /** The button that asks (\"Turn on the camera\"). */\n start: string;\n /** Permission refused for good (\"Camera access is off. Turn it on in Settings.\"). */\n denied: string;\n /** Opens the app's settings (\"Open Settings\"). */\n settings: string;\n takePhoto: string;\n startRecording: string;\n stopRecording: string;\n switchCamera: string;\n};\n\nexport type NativeCaptureResult = {\n /** The file of the photo or the clip, on the device. */\n uri: string;\n /** `photo` or `video`. */\n kind: \"photo\" | \"video\";\n};\n\nexport type MediaCaptureProps = {\n /** What it captures: `photo` (default) or `video`. */\n mode?: \"photo\" | \"video\";\n /** The camera at first: `front` (default) or `back`. */\n facing?: \"front\" | \"back\";\n /** The longest clip, in seconds. */\n maxDuration?: number;\n /** Called with the photo taken or the clip recorded. */\n onCapture: (result: NativeCaptureResult) => void;\n /** Called when a capture fails. */\n onError?: (error: unknown) => void;\n /** The width / height ratio of the preview. Default 3 / 4. */\n aspectRatio?: number;\n /** The words, passed translated. */\n labels: MediaCaptureLabels;\n /** Styles merged last, on the frame. */\n style?: StyleProp<ViewStyle>;\n};\n\n/**\n * The camera in a screen, on expo-camera: asks for the permission only when the person presses the button, sends them\n * to Settings when it was refused for good, takes a photo or records a clip (and the microphone for a clip), switches\n * cameras. The web `MediaCapture` with the same words.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no app imports it. Removed in 4.0.\n */\nexport function MediaCapture({ mode = \"photo\", facing: initialFacing = \"front\", maxDuration, onCapture, onError, aspectRatio = 3 / 4, labels, style }: MediaCaptureProps) {\n warnDeprecated(\"native/media-capture\");\n const { theme, radius } = useTheme();\n const reduce = useReducedMotion();\n const camera = React.useRef<CameraView>(null);\n const [permission, requestPermission] = useCameraPermissions();\n const [microphone, requestMicrophone] = useMicrophonePermissions();\n const [facing, setFacing] = React.useState(initialFacing);\n const [ready, setReady] = React.useState(false);\n const [recording, setRecording] = React.useState(false);\n\n const ask = async () => {\n const result = await requestPermission();\n if (result.granted && mode === \"video\" && !microphone?.granted) await requestMicrophone();\n };\n\n const shoot = async () => {\n if (!camera.current || !ready) return;\n try {\n if (mode === \"photo\") {\n const photo = await camera.current.takePictureAsync({ quality: 0.9 });\n if (photo) onCapture({ uri: photo.uri, kind: \"photo\" });\n } else if (recording) {\n camera.current.stopRecording();\n } else {\n setRecording(true);\n const clip = await camera.current.recordAsync(maxDuration ? { maxDuration } : undefined);\n setRecording(false);\n if (clip) onCapture({ uri: clip.uri, kind: \"video\" });\n }\n } catch (error) {\n setRecording(false);\n onError?.(error);\n }\n };\n\n const frame = [styles.frame, { aspectRatio, borderRadius: radius.md, backgroundColor: theme.media }, style];\n\n if (!permission?.granted) {\n const blocked = permission ? !permission.canAskAgain : false;\n return (\n <View style={[frame, styles.panel]}>\n <Txt style={styles.center}>\n {blocked ? labels.denied : labels.prompt}\n </Txt>\n {blocked ? (\n <Button label={labels.settings} variant=\"secondary\" onPress={() => void Linking.openSettings()} />\n ) : (\n <Button label={labels.start} variant=\"primary\" onPress={() => void ask()} />\n )}\n </View>\n );\n }\n\n return (\n <View style={frame}>\n <CameraView\n ref={camera}\n style={StyleSheet.absoluteFill}\n facing={facing}\n mode={mode === \"video\" ? \"video\" : \"picture\"}\n mirror={facing === \"front\"}\n onCameraReady={() => setReady(true)}\n aria-hidden\n />\n <View style={styles.bar}>\n <View style={styles.side} />\n <Pressable\n role=\"button\"\n aria-label={mode === \"photo\" ? labels.takePhoto : recording ? labels.stopRecording : labels.startRecording}\n aria-disabled={!ready}\n disabled={!ready}\n onPress={() => void shoot()}\n style={({ pressed }) => [styles.shutter, { borderColor: theme.textOnMedia, opacity: pressed && !reduce ? 0.8 : 1 }]}\n >\n <View\n style={[\n mode === \"video\" && recording ? styles.stop : styles.dot,\n { backgroundColor: mode === \"video\" ? theme.danger : theme.textOnMedia },\n ]}\n />\n </Pressable>\n <Pressable\n role=\"button\"\n aria-label={labels.switchCamera}\n aria-disabled={recording}\n disabled={recording}\n hitSlop={8}\n onPress={() => setFacing((f) => (f === \"front\" ? \"back\" : \"front\"))}\n style={[styles.side, styles.flip, { backgroundColor: theme.scrimStrong, opacity: recording ? 0 : 1 }]}\n >\n <Svg width={22} height={22} viewBox=\"0 0 24 24\" fill=\"none\" stroke={theme.textOnMedia} strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <Path d=\"M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3M18 3v4h-4M6 21v-4h4\" />\n </Svg>\n </Pressable>\n </View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n frame: { width: \"100%\", overflow: \"hidden\" },\n panel: { alignItems: \"center\", justifyContent: \"center\", gap: 16, padding: 24 },\n center: { textAlign: \"center\" },\n bar: { position: \"absolute\", left: 0, right: 0, bottom: 16, flexDirection: \"row\", alignItems: \"center\", justifyContent: \"space-evenly\" },\n side: { width: 48, height: 48 },\n flip: { borderRadius: 24, alignItems: \"center\", justifyContent: \"center\" },\n shutter: { width: 72, height: 72, borderRadius: 36, borderWidth: 4, alignItems: \"center\", justifyContent: \"center\" },\n dot: { width: 54, height: 54, borderRadius: 27 },\n stop: { width: 26, height: 26, borderRadius: 6 },\n});\n"],"mappings":";;;;;AAEA,SAAS,QAAQ,KAAK,kBAAkB,gBAAgB;AACxD,SAAS,YAAY,sBAAsB,gCAAgC;AAC3E,YAAY,WAAW;AACvB,SAAS,SAAS,WAA2B,YAAY,YAA4B;AACrF,OAAO,OAAO,YAAY;AA4FpB,SACE,KADF;AAzCC,SAAS,aAAa,EAAE,OAAO,SAAS,QAAQ,gBAAgB,SAAS,aAAa,WAAW,SAAS,cAAc,IAAI,GAAG,QAAQ,MAAM,GAAsB;AACxK,iBAAe,sBAAsB;AACrC,QAAM,EAAE,OAAO,OAAO,IAAI,SAAS;AACnC,QAAM,SAAS,iBAAiB;AAChC,QAAM,SAAe,aAAmB,IAAI;AAC5C,QAAM,CAAC,YAAY,iBAAiB,IAAI,qBAAqB;AAC7D,QAAM,CAAC,YAAY,iBAAiB,I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O,MAAM,OAAO,MAAM,EAAE,iBAAiB,MAAM,aAAa,SAAS,YAAY,IAAI,EAAE,CAAC;AAAA,UAEpG,8BAAC,OAAI,OAAO,IAAI,QAAQ,IAAI,SAAQ,aAAY,MAAK,QAAO,QAAQ,MAAM,aAAa,aAAa,GAAG,eAAc,SAAQ,gBAAe,SAAQ,eAAW,MAC7J,8BAAC,QAAK,GAAE,qEAAoE,GAC9E;AAAA;AAAA,MACF;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,IAAM,SAAS,WAAW,OAAO;AAAA,EAC/B,OAAO,EAAE,OAAO,QAAQ,UAAU,SAAS;AAAA,EAC3C,OAAO,EAAE,YAAY,UAAU,gBAAgB,UAAU,KAAK,IAAI,SAAS,GAAG;AAAA,EAC9E,QAAQ,EAAE,WAAW,SAAS;AAAA,EAC9B,KAAK,EAAE,UAAU,YAAY,MAAM,GAAG,OAAO,GAAG,QAAQ,IAAI,eAAe,OAAO,YAAY,UAAU,gBAAgB,eAAe;AAAA,EACvI,MAAM,EAAE,OAAO,IAAI,QAAQ,GAAG;AAAA,EAC9B,MAAM,EAAE,cAAc,IAAI,YAAY,UAAU,gBAAgB,SAAS;AAAA,EACzE,SAAS,EAAE,OAAO,IAAI,QAAQ,IAAI,cAAc,IAAI,aAAa,GAAG,YAAY,UAAU,gBAAgB,SAAS;AAAA,EACnH,KAAK,EAAE,OAAO,IAAI,QAAQ,IAAI,cAAc,GAAG;AAAA,EAC/C,MAAM,EAAE,OAAO,IAAI,QAAQ,IAAI,cAAc,EAAE;AACjD,CAAC;","names":[]}
@@ -83,7 +83,10 @@ type VerticalVideoProps = VerticalVideoShared & {
83
83
  /** Styles merged last, on the frame. */
84
84
  style?: StyleProp<ViewStyle>;
85
85
  };
86
- /** One short video: 9:16, the rail of actions on the right, the creator's caption bottom-left. */
86
+ /**
87
+ * One short video: 9:16, the rail of actions on the right, the creator's caption bottom-left.
88
+ * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no app imports it. Removed in 4.0.
89
+ */
87
90
  declare function VerticalVideo({ title, uri, posterUri, active, creator, disclosure, caption, tags, credit, likes, comments, shares, liked, following, onLike, onComment, onShare, onFollow, onMore, tipSlot, topStart, aboveCaption, locale, labels: custom, style, }: VerticalVideoProps): React.JSX.Element;
88
91
  type ShortFeedProps<T> = {
89
92
  /** The feed's accessible name ("Videos"). */
@@ -104,7 +107,10 @@ type ShortFeedProps<T> = {
104
107
  /** Styles merged last. */
105
108
  style?: StyleProp<ViewStyle>;
106
109
  };
107
- /** A vertical paging feed: one video per screen, the one in view plays, the others pause. */
110
+ /**
111
+ * A vertical paging feed: one video per screen, the one in view plays, the others pause.
112
+ * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no app imports it. Removed in 4.0.
113
+ */
108
114
  declare function ShortFeed<T>({ label, items, getId, renderItem, height, onActiveChange, style }: ShortFeedProps<T>): React.JSX.Element;
109
115
 
110
116
  export { ShortFeed, type ShortFeedProps, VerticalVideo, type VerticalVideoLabels, type VerticalVideoProps, verticalVideoLabels };
@@ -1,3 +1,7 @@
1
+ import {
2
+ warnDeprecated
3
+ } from "../chunk-KGLRZMCY.js";
4
+
1
5
  // src/native/vertical-video.tsx
2
6
  import { formatCompact } from "@krizaka/intl";
3
7
  import { Avatar, Txt, useTheme, VerifiedBadge } from "@krizaka/ui/native";
@@ -65,6 +69,7 @@ function VerticalVideo({
65
69
  labels: custom,
66
70
  style
67
71
  }) {
72
+ warnDeprecated("native/vertical-video");
68
73
  const { theme } = useTheme();
69
74
  const labels = { ...verticalVideoLabels, ...custom };
70
75
  const [open, setOpen] = React.useState(false);
@@ -115,6 +120,7 @@ function VerticalVideo({
115
120
  ] });
116
121
  }
117
122
  function ShortFeed({ label, items, getId, renderItem, height, onActiveChange, style }) {
123
+ warnDeprecated("native/vertical-video");
118
124
  const [active, setActive] = React.useState(0);
119
125
  const [onViewable] = React.useState(() => ({ viewableItems }) => {
120
126
  const first = viewableItems.find((v) => v.isViewable && typeof v.index === "number");
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/native/vertical-video.tsx","../../src/vertical-video/model.ts"],"sourcesContent":["// @krizaka/ui/native/vertical-video — its own entry (it plays video on expo-video, an optional peer). A 9:16 clip filling\n// its frame, the action rail on the right (avatar + follow, like, comments, share, a slot for the product's tip), the\n// creator's caption bottom-left, a progress hairline; `ShortFeed` pages them vertically and plays the one in view.\n// Over the picture everything reads on the theme's invariant `scrim` / `textOnMedia`.\nimport { formatCompact } from \"@krizaka/intl\";\nimport { Avatar, Txt, useTheme, VerifiedBadge } from \"@krizaka/ui/native\";\nimport { VideoPlayer } from \"@krizaka/ui/native/video-player\";\nimport * as React from \"react\";\nimport { FlatList, Image,Pressable, type StyleProp, StyleSheet, View, type ViewStyle, type ViewToken } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nimport { type VerticalVideoLabels, verticalVideoLabels, type VerticalVideoShared } from \"../vertical-video/model\";\n\nexport { type VerticalVideoLabels, verticalVideoLabels };\n\nexport type VerticalVideoProps = VerticalVideoShared & {\n /** The clip's address (MP4 or HLS). Absent, the poster alone shows. */\n uri?: string;\n /** The picture until the first frame. */\n posterUri?: string;\n /** Who made it: name, portrait, the seal's words. */\n creator: { name: string; avatarUri?: string; verifiedLabel?: string };\n /** Styles merged last, on the frame. */\n style?: StyleProp<ViewStyle>;\n};\n\nconst HEART = \"M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z\";\nconst COMMENT = \"M4 5h16v11H9l-5 4z\";\nconst SHARE = \"M4 12v7h16v-7M12 3v12M7 8l5-5 5 5\";\nconst MORE = \"M5 12h.01M12 12h.01M19 12h.01\";\n\nfunction Glyph({ d, color, filled }: { d: string; color: string; filled?: boolean }) {\n return (\n <Svg width={24} height={24} viewBox=\"0 0 24 24\" fill={filled ? color : \"none\"} stroke={color} strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <Path d={d} />\n </Svg>\n );\n}\n\nfunction RailButton({ label, count, pressed, onPress, children }: { label: string; count?: string | undefined; pressed?: boolean | undefined; onPress?: (() => void) | undefined; children: React.ReactNode }) {\n const { theme } = useTheme();\n return (\n <View style={styles.railItem}>\n <Pressable role=\"button\" aria-label={label} aria-pressed={pressed} onPress={onPress} hitSlop={4} style={[styles.railButton, { backgroundColor: theme.scrim }]}>\n {children}\n </Pressable>\n {count !== undefined ? (\n <Txt variant=\"caption\" tone=\"onMedia\" style={styles.count}>\n {count}\n </Txt>\n ) : null}\n </View>\n );\n}\n\n/** One short video: 9:16, the rail of actions on the right, the creator's caption bottom-left. */\nexport function VerticalVideo({\n title,\n uri,\n posterUri,\n active = true,\n creator,\n disclosure,\n caption,\n tags = [],\n credit,\n likes,\n comments,\n shares,\n liked = false,\n following = false,\n onLike,\n onComment,\n onShare,\n onFollow,\n onMore,\n tipSlot,\n topStart,\n aboveCaption,\n locale = \"en\",\n labels: custom,\n style,\n}: VerticalVideoProps) {\n const { theme } = useTheme();\n const labels = { ...verticalVideoLabels, ...custom };\n const [open, setOpen] = React.useState(false);\n const [paused, setPaused] = React.useState(false);\n const count = (n?: number) => (n === undefined ? undefined : formatCompact(n, { locale }));\n const on = theme.textOnMedia;\n return (\n <View role=\"group\" aria-label={title} style={[styles.frame, { backgroundColor: theme.media }, style]}>\n {uri ? (\n <VideoPlayer source={{ uri }} title={title} aspectRatio={9 / 16} contentFit=\"cover\" nativeControls={false} fullscreen={false} autoPlay loop muted paused={!active || paused} style={StyleSheet.absoluteFill} {...(posterUri ? { poster: { uri: posterUri } } : {})} />\n ) : posterUri ? (\n <Image source={{ uri: posterUri }} aria-hidden resizeMode=\"cover\" style={StyleSheet.absoluteFill} />\n ) : null}\n <Pressable role=\"button\" aria-label={paused ? labels.play : labels.pause} onPress={() => setPaused((p) => !p)} onLongPress={() => onLike?.(!liked)} style={StyleSheet.absoluteFill} />\n <View pointerEvents=\"none\" style={[styles.shade, { backgroundColor: theme.scrim }]} />\n {topStart ? <View style={styles.topStart}>{topStart}</View> : null}\n\n <View role=\"group\" aria-label={labels.actions} style={styles.rail}>\n <View>\n <Avatar alt={creator.name} {...(creator.avatarUri ? { src: creator.avatarUri } : {})} size=\"md\" />\n {onFollow ? (\n <Pressable\n role=\"button\"\n aria-label={(following ? labels.following : labels.follow).replace(\"{name}\", creator.name)}\n aria-pressed={following}\n onPress={() => onFollow(!following)}\n hitSlop={12}\n style={[styles.follow, { backgroundColor: following ? theme.surface2 : theme.accent }]}\n >\n <Glyph d={following ? \"M5 12l5 5 9-10\" : \"M12 5v14M5 12h14\"} color={following ? theme.textPrimary : theme.onAccent} />\n </Pressable>\n ) : null}\n </View>\n <RailButton label={labels.like} count={count(likes)} pressed={liked} onPress={() => onLike?.(!liked)}>\n <Glyph d={HEART} color={liked ? theme.accent : on} filled={liked} />\n </RailButton>\n <RailButton label={labels.comment} count={count(comments)} onPress={onComment}>\n <Glyph d={COMMENT} color={on} />\n </RailButton>\n <RailButton label={labels.share} count={count(shares)} onPress={onShare}>\n <Glyph d={SHARE} color={on} />\n </RailButton>\n {tipSlot}\n {onMore ? (\n <RailButton label={labels.more} onPress={onMore}>\n <Glyph d={MORE} color={on} />\n </RailButton>\n ) : null}\n </View>\n\n <View style={styles.caption}>\n {aboveCaption}\n <View style={styles.nameRow}>\n <Txt variant=\"label\" tone=\"onMedia\">\n {creator.name}\n </Txt>\n {creator.verifiedLabel ? <VerifiedBadge label={creator.verifiedLabel} on=\"media\" size={14} /> : null}\n {disclosure ? (\n <View style={[styles.pill, { backgroundColor: theme.scrim }]}>\n <Txt variant=\"caption\" tone=\"onMedia\" style={styles.pillText}>\n {disclosure.toUpperCase()}\n </Txt>\n </View>\n ) : null}\n </View>\n {caption ? (\n <Txt tone=\"onMedia\" numberOfLines={open ? undefined : 2}>\n {caption}\n {tags.length > 0 ? ` ${tags.map((tag) => `#${tag}`).join(\" \")}` : \"\"}\n </Txt>\n ) : null}\n {caption && caption.length > 90 ? (\n <Pressable role=\"button\" aria-label={open ? labels.collapse : labels.expand} aria-expanded={open} onPress={() => setOpen((v) => !v)} hitSlop={10}>\n <Txt variant=\"caption\" tone=\"onMedia\" style={styles.underline}>\n {open ? labels.collapse : labels.expand}\n </Txt>\n </Pressable>\n ) : null}\n {credit ? (\n <Txt variant=\"caption\" tone=\"onMedia\">\n {credit}\n </Txt>\n ) : null}\n </View>\n </View>\n );\n}\n\nexport type ShortFeedProps<T> = {\n /** The feed's accessible name (\"Videos\"). */\n label: string;\n /** The videos, in order. */\n items: readonly T[];\n /** A stable key for an item. */\n getId: (item: T) => string;\n /** One slide: `active` is true for the one in view. */\n renderItem: (item: T, state: { active: boolean; index: number }) => React.ReactElement;\n /** The page's height in points (the feed's own height; one slide per page). */\n height: number;\n /** Called when the slide in view changes. */\n onActiveChange?: (index: number, item: T) => void;\n /** Styles merged last. */\n style?: StyleProp<ViewStyle>;\n};\n\n/** A vertical paging feed: one video per screen, the one in view plays, the others pause. */\nexport function ShortFeed<T>({ label, items, getId, renderItem, height, onActiveChange, style }: ShortFeedProps<T>) {\n const [active, setActive] = React.useState(0);\n // FlatList wants one stable callback for its whole life.\n const [onViewable] = React.useState(() => ({ viewableItems }: { viewableItems: ViewToken[] }) => {\n const first = viewableItems.find((v) => v.isViewable && typeof v.index === \"number\");\n if (first && typeof first.index === \"number\") setActive(first.index);\n });\n React.useEffect(() => {\n const item = items[active];\n if (item !== undefined) onActiveChange?.(active, item);\n // Only a change of the slide in view is an event.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [active]);\n return (\n <View role=\"list\" aria-label={label} style={[{ height }, style]}>\n <FlatList\n data={items as T[]}\n keyExtractor={getId}\n pagingEnabled\n showsVerticalScrollIndicator={false}\n snapToInterval={height}\n decelerationRate=\"fast\"\n getItemLayout={(_, index) => ({ length: height, offset: height * index, index })}\n windowSize={3}\n initialNumToRender={2}\n viewabilityConfig={{ itemVisiblePercentThreshold: 60 }}\n onViewableItemsChanged={onViewable}\n extraData={active}\n style={{ height }}\n renderItem={({ item, index }) => <View style={{ height }}>{renderItem(item, { active: index === active, index })}</View>}\n />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n frame: { width: \"100%\", aspectRatio: 9 / 16, overflow: \"hidden\" },\n shade: { position: \"absolute\", left: 0, right: 0, bottom: 0, height: \"30%\", opacity: 0.55 },\n topStart: { position: \"absolute\", left: 12, top: 12 },\n rail: { position: \"absolute\", right: 8, bottom: 20, alignItems: \"center\", gap: 12 },\n railItem: { alignItems: \"center\", gap: 2 },\n railButton: { width: 44, height: 44, borderRadius: 22, alignItems: \"center\", justifyContent: \"center\" },\n count: { fontVariant: [\"lining-nums\", \"tabular-nums\"], fontWeight: \"600\" },\n follow: { position: \"absolute\", bottom: -10, alignSelf: \"center\", width: 22, height: 22, borderRadius: 11, alignItems: \"center\", justifyContent: \"center\", overflow: \"hidden\" },\n caption: { position: \"absolute\", left: 12, right: 76, bottom: 16, gap: 6 },\n nameRow: { flexDirection: \"row\", alignItems: \"center\", gap: 6 },\n pill: { paddingHorizontal: 8, paddingVertical: 2, borderRadius: 999 },\n pillText: { fontWeight: \"700\", letterSpacing: 0.4 },\n underline: { textDecorationLine: \"underline\", fontWeight: \"600\" },\n});\n","// Headless: what the web (`vertical-video.tsx`) and the native (`native/vertical-video.tsx`) VerticalVideo share — the words,\n// the content and the callbacks. Each platform adds its media (`src`/`poster` · `uri`/`posterUri`) and its frame.\nimport type * as React from \"react\";\n\nexport interface VerticalVideoLabels {\n /** \"Play\" / \"Pause\" — the tap target over the picture. */\n play: string;\n pause: string;\n /** \"Like\" / \"Unlike\" (the button's name; the state is `aria-pressed`). */\n like: string;\n comment: string;\n share: string;\n more: string;\n /** \"Follow Elena\" — `{name}` is replaced by the creator's name. */\n follow: string;\n /** \"Following Elena\". */\n following: string;\n /** \"More\" / \"Less\" on a long caption. */\n expand: string;\n collapse: string;\n /** The progress bar's name (\"Progress\"). */\n progress: string;\n /** The rail's name (\"Actions\"). */\n actions: string;\n}\n\nexport const verticalVideoLabels: VerticalVideoLabels = {\n play: \"Play\",\n pause: \"Pause\",\n like: \"Like\",\n comment: \"Comments\",\n share: \"Share\",\n more: \"More\",\n follow: \"Follow {name}\",\n following: \"Following {name}\",\n expand: \"More\",\n collapse: \"Less\",\n progress: \"Progress\",\n actions: \"Actions\",\n};\n\n/** The props both platforms read: the same content, counts, state, callbacks and slots. */\nexport interface VerticalVideoShared {\n /** The video's accessible name (\"Video: Night shoot, part 2\"), passed translated. */\n title: string;\n /** Plays while `true`; a `ShortFeed` passes it for the slide in view. Default `true`. */\n active?: boolean;\n /** A pill beside the name: \"AI-GENERATED\" — said on the picture, never only in a page's footnote. */\n disclosure?: string;\n /** The caption: collapsed to two lines, expandable when long. */\n caption?: string;\n /** Tags under the caption (without `#`). */\n tags?: readonly string[];\n /** The sound or credit line (\"Original sound — Elena\"). */\n credit?: string;\n /** The like count under its button, compact (`12.4K`) in `locale`. */\n likes?: number;\n /** The comment count under its button. */\n comments?: number;\n /** The share count under its button. */\n shares?: number;\n /** Whether the viewer likes it: `aria-pressed` on the like button. */\n liked?: boolean;\n /** Whether the viewer follows the creator: the \"+\" on the avatar becomes a check. */\n following?: boolean;\n /** The viewer likes or unlikes (the button, `L`, a double tap). */\n onLike?: (liked: boolean) => void;\n /** Opens the comments; without it the button still shows. */\n onComment?: () => void;\n /** Opens the share sheet. */\n onShare?: () => void;\n /** The viewer follows or unfollows; without it the avatar has no \"+\". */\n onFollow?: (following: boolean) => void;\n /** The \"more\" button's action (report, hide); without it the button is not drawn. */\n onMore?: () => void;\n /** The product's own action on the rail: a tip, an unlock — a button of yours (≥ 44 px, named). */\n tipSlot?: React.ReactNode;\n /** Top left: a chip over the picture (an auction's time left). */\n topStart?: React.ReactNode;\n /** Above the caption: a goal gauge, a challenge's progress. */\n aboveCaption?: React.ReactNode;\n /** The locale of the counts. Default `en`. */\n locale?: string;\n /** Every word, passed translated. */\n labels?: Partial<VerticalVideoLabels>;\n}\n"],"mappings":";AAIA,SAAS,qBAAqB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AU,YAAY,OAAO,GAAG,QAAQ,IAAI,YAAY,UAAU,KAAK,GAAG;AAAA,EAClF,UAAU,EAAE,YAAY,UAAU,KAAK,EAAE;AAAA,EACzC,YAAY,EAAE,OAAO,IAAI,QAAQ,IAAI,cAAc,IAAI,YAAY,UAAU,gBAAgB,SAAS;AAAA,EACtG,OAAO,EAAE,aAAa,CAAC,eAAe,cAAc,GAAG,YAAY,MAAM;AAAA,EACzE,QAAQ,EAAE,UAAU,YAAY,QAAQ,KAAK,WAAW,UAAU,OAAO,IAAI,QAAQ,IAAI,cAAc,IAAI,YAAY,UAAU,gBAAgB,UAAU,UAAU,SAAS;AAAA,EAC9K,SAAS,EAAE,UAAU,YAAY,MAAM,IAAI,OAAO,IAAI,QAAQ,IAAI,KAAK,EAAE;AAAA,EACzE,SAAS,EAAE,eAAe,OAAO,YAAY,UAAU,KAAK,EAAE;AAAA,EAC9D,MAAM,EAAE,mBAAmB,GAAG,iBAAiB,GAAG,cAAc,IAAI;AAAA,EACpE,UAAU,EAAE,YAAY,OAAO,eAAe,IAAI;AAAA,EAClD,WAAW,EAAE,oBAAoB,aAAa,YAAY,MAAM;AAClE,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/native/vertical-video.tsx","../../src/vertical-video/model.ts"],"sourcesContent":["// @krizaka/ui/native/vertical-video — its own entry (it plays video on expo-video, an optional peer). A 9:16 clip filling\n// its frame, the action rail on the right (avatar + follow, like, comments, share, a slot for the product's tip), the\n// creator's caption bottom-left, a progress hairline; `ShortFeed` pages them vertically and plays the one in view.\n// Over the picture everything reads on the theme's invariant `scrim` / `textOnMedia`.\nimport { formatCompact } from \"@krizaka/intl\";\nimport { Avatar, Txt, useTheme, VerifiedBadge } from \"@krizaka/ui/native\";\nimport { VideoPlayer } from \"@krizaka/ui/native/video-player\";\nimport * as React from \"react\";\nimport { FlatList, Image,Pressable, type StyleProp, StyleSheet, View, type ViewStyle, type ViewToken } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nimport { warnDeprecated } from \"../deprecated\";\nimport { type VerticalVideoLabels, verticalVideoLabels, type VerticalVideoShared } from \"../vertical-video/model\";\n\nexport { type VerticalVideoLabels, verticalVideoLabels };\n\nexport type VerticalVideoProps = VerticalVideoShared & {\n /** The clip's address (MP4 or HLS). Absent, the poster alone shows. */\n uri?: string;\n /** The picture until the first frame. */\n posterUri?: string;\n /** Who made it: name, portrait, the seal's words. */\n creator: { name: string; avatarUri?: string; verifiedLabel?: string };\n /** Styles merged last, on the frame. */\n style?: StyleProp<ViewStyle>;\n};\n\nconst HEART = \"M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z\";\nconst COMMENT = \"M4 5h16v11H9l-5 4z\";\nconst SHARE = \"M4 12v7h16v-7M12 3v12M7 8l5-5 5 5\";\nconst MORE = \"M5 12h.01M12 12h.01M19 12h.01\";\n\nfunction Glyph({ d, color, filled }: { d: string; color: string; filled?: boolean }) {\n return (\n <Svg width={24} height={24} viewBox=\"0 0 24 24\" fill={filled ? color : \"none\"} stroke={color} strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <Path d={d} />\n </Svg>\n );\n}\n\nfunction RailButton({ label, count, pressed, onPress, children }: { label: string; count?: string | undefined; pressed?: boolean | undefined; onPress?: (() => void) | undefined; children: React.ReactNode }) {\n const { theme } = useTheme();\n return (\n <View style={styles.railItem}>\n <Pressable role=\"button\" aria-label={label} aria-pressed={pressed} onPress={onPress} hitSlop={4} style={[styles.railButton, { backgroundColor: theme.scrim }]}>\n {children}\n </Pressable>\n {count !== undefined ? (\n <Txt variant=\"caption\" tone=\"onMedia\" style={styles.count}>\n {count}\n </Txt>\n ) : null}\n </View>\n );\n}\n\n/**\n * One short video: 9:16, the rail of actions on the right, the creator's caption bottom-left.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no app imports it. Removed in 4.0.\n */\nexport function VerticalVideo({\n title,\n uri,\n posterUri,\n active = true,\n creator,\n disclosure,\n caption,\n tags = [],\n credit,\n likes,\n comments,\n shares,\n liked = false,\n following = false,\n onLike,\n onComment,\n onShare,\n onFollow,\n onMore,\n tipSlot,\n topStart,\n aboveCaption,\n locale = \"en\",\n labels: custom,\n style,\n}: VerticalVideoProps) {\n warnDeprecated(\"native/vertical-video\");\n const { theme } = useTheme();\n const labels = { ...verticalVideoLabels, ...custom };\n const [open, setOpen] = React.useState(false);\n const [paused, setPaused] = React.useState(false);\n const count = (n?: number) => (n === undefined ? undefined : formatCompact(n, { locale }));\n const on = theme.textOnMedia;\n return (\n <View role=\"group\" aria-label={title} style={[styles.frame, { backgroundColor: theme.media }, style]}>\n {uri ? (\n <VideoPlayer source={{ uri }} title={title} aspectRatio={9 / 16} contentFit=\"cover\" nativeControls={false} fullscreen={false} autoPlay loop muted paused={!active || paused} style={StyleSheet.absoluteFill} {...(posterUri ? { poster: { uri: posterUri } } : {})} />\n ) : posterUri ? (\n <Image source={{ uri: posterUri }} aria-hidden resizeMode=\"cover\" style={StyleSheet.absoluteFill} />\n ) : null}\n <Pressable role=\"button\" aria-label={paused ? labels.play : labels.pause} onPress={() => setPaused((p) => !p)} onLongPress={() => onLike?.(!liked)} style={StyleSheet.absoluteFill} />\n <View pointerEvents=\"none\" style={[styles.shade, { backgroundColor: theme.scrim }]} />\n {topStart ? <View style={styles.topStart}>{topStart}</View> : null}\n\n <View role=\"group\" aria-label={labels.actions} style={styles.rail}>\n <View>\n <Avatar alt={creator.name} {...(creator.avatarUri ? { src: creator.avatarUri } : {})} size=\"md\" />\n {onFollow ? (\n <Pressable\n role=\"button\"\n aria-label={(following ? labels.following : labels.follow).replace(\"{name}\", creator.name)}\n aria-pressed={following}\n onPress={() => onFollow(!following)}\n hitSlop={12}\n style={[styles.follow, { backgroundColor: following ? theme.surface2 : theme.accent }]}\n >\n <Glyph d={following ? \"M5 12l5 5 9-10\" : \"M12 5v14M5 12h14\"} color={following ? theme.textPrimary : theme.onAccent} />\n </Pressable>\n ) : null}\n </View>\n <RailButton label={labels.like} count={count(likes)} pressed={liked} onPress={() => onLike?.(!liked)}>\n <Glyph d={HEART} color={liked ? theme.accent : on} filled={liked} />\n </RailButton>\n <RailButton label={labels.comment} count={count(comments)} onPress={onComment}>\n <Glyph d={COMMENT} color={on} />\n </RailButton>\n <RailButton label={labels.share} count={count(shares)} onPress={onShare}>\n <Glyph d={SHARE} color={on} />\n </RailButton>\n {tipSlot}\n {onMore ? (\n <RailButton label={labels.more} onPress={onMore}>\n <Glyph d={MORE} color={on} />\n </RailButton>\n ) : null}\n </View>\n\n <View style={styles.caption}>\n {aboveCaption}\n <View style={styles.nameRow}>\n <Txt variant=\"label\" tone=\"onMedia\">\n {creator.name}\n </Txt>\n {creator.verifiedLabel ? <VerifiedBadge label={creator.verifiedLabel} on=\"media\" size={14} /> : null}\n {disclosure ? (\n <View style={[styles.pill, { backgroundColor: theme.scrim }]}>\n <Txt variant=\"caption\" tone=\"onMedia\" style={styles.pillText}>\n {disclosure.toUpperCase()}\n </Txt>\n </View>\n ) : null}\n </View>\n {caption ? (\n <Txt tone=\"onMedia\" numberOfLines={open ? undefined : 2}>\n {caption}\n {tags.length > 0 ? ` ${tags.map((tag) => `#${tag}`).join(\" \")}` : \"\"}\n </Txt>\n ) : null}\n {caption && caption.length > 90 ? (\n <Pressable role=\"button\" aria-label={open ? labels.collapse : labels.expand} aria-expanded={open} onPress={() => setOpen((v) => !v)} hitSlop={10}>\n <Txt variant=\"caption\" tone=\"onMedia\" style={styles.underline}>\n {open ? labels.collapse : labels.expand}\n </Txt>\n </Pressable>\n ) : null}\n {credit ? (\n <Txt variant=\"caption\" tone=\"onMedia\">\n {credit}\n </Txt>\n ) : null}\n </View>\n </View>\n );\n}\n\nexport type ShortFeedProps<T> = {\n /** The feed's accessible name (\"Videos\"). */\n label: string;\n /** The videos, in order. */\n items: readonly T[];\n /** A stable key for an item. */\n getId: (item: T) => string;\n /** One slide: `active` is true for the one in view. */\n renderItem: (item: T, state: { active: boolean; index: number }) => React.ReactElement;\n /** The page's height in points (the feed's own height; one slide per page). */\n height: number;\n /** Called when the slide in view changes. */\n onActiveChange?: (index: number, item: T) => void;\n /** Styles merged last. */\n style?: StyleProp<ViewStyle>;\n};\n\n/**\n * A vertical paging feed: one video per screen, the one in view plays, the others pause.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no app imports it. Removed in 4.0.\n */\nexport function ShortFeed<T>({ label, items, getId, renderItem, height, onActiveChange, style }: ShortFeedProps<T>) {\n warnDeprecated(\"native/vertical-video\");\n const [active, setActive] = React.useState(0);\n // FlatList wants one stable callback for its whole life.\n const [onViewable] = React.useState(() => ({ viewableItems }: { viewableItems: ViewToken[] }) => {\n const first = viewableItems.find((v) => v.isViewable && typeof v.index === \"number\");\n if (first && typeof first.index === \"number\") setActive(first.index);\n });\n React.useEffect(() => {\n const item = items[active];\n if (item !== undefined) onActiveChange?.(active, item);\n // Only a change of the slide in view is an event.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [active]);\n return (\n <View role=\"list\" aria-label={label} style={[{ height }, style]}>\n <FlatList\n data={items as T[]}\n keyExtractor={getId}\n pagingEnabled\n showsVerticalScrollIndicator={false}\n snapToInterval={height}\n decelerationRate=\"fast\"\n getItemLayout={(_, index) => ({ length: height, offset: height * index, index })}\n windowSize={3}\n initialNumToRender={2}\n viewabilityConfig={{ itemVisiblePercentThreshold: 60 }}\n onViewableItemsChanged={onViewable}\n extraData={active}\n style={{ height }}\n renderItem={({ item, index }) => <View style={{ height }}>{renderItem(item, { active: index === active, index })}</View>}\n />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n frame: { width: \"100%\", aspectRatio: 9 / 16, overflow: \"hidden\" },\n shade: { position: \"absolute\", left: 0, right: 0, bottom: 0, height: \"30%\", opacity: 0.55 },\n topStart: { position: \"absolute\", left: 12, top: 12 },\n rail: { position: \"absolute\", right: 8, bottom: 20, alignItems: \"center\", gap: 12 },\n railItem: { alignItems: \"center\", gap: 2 },\n railButton: { width: 44, height: 44, borderRadius: 22, alignItems: \"center\", justifyContent: \"center\" },\n count: { fontVariant: [\"lining-nums\", \"tabular-nums\"], fontWeight: \"600\" },\n follow: { position: \"absolute\", bottom: -10, alignSelf: \"center\", width: 22, height: 22, borderRadius: 11, alignItems: \"center\", justifyContent: \"center\", overflow: \"hidden\" },\n caption: { position: \"absolute\", left: 12, right: 76, bottom: 16, gap: 6 },\n nameRow: { flexDirection: \"row\", alignItems: \"center\", gap: 6 },\n pill: { paddingHorizontal: 8, paddingVertical: 2, borderRadius: 999 },\n pillText: { fontWeight: \"700\", letterSpacing: 0.4 },\n underline: { textDecorationLine: \"underline\", fontWeight: \"600\" },\n});\n","// Headless: what the web (`vertical-video.tsx`) and the native (`native/vertical-video.tsx`) VerticalVideo share — the words,\n// the content and the callbacks. Each platform adds its media (`src`/`poster` · `uri`/`posterUri`) and its frame.\nimport type * as React from \"react\";\n\nexport interface VerticalVideoLabels {\n /** \"Play\" / \"Pause\" — the tap target over the picture. */\n play: string;\n pause: string;\n /** \"Like\" / \"Unlike\" (the button's name; the state is `aria-pressed`). */\n like: string;\n comment: string;\n share: string;\n more: string;\n /** \"Follow Elena\" — `{name}` is replaced by the creator's name. */\n follow: string;\n /** \"Following Elena\". */\n following: string;\n /** \"More\" / \"Less\" on a long caption. */\n expand: string;\n collapse: string;\n /** The progress bar's name (\"Progress\"). */\n progress: string;\n /** The rail's name (\"Actions\"). */\n actions: string;\n}\n\nexport const verticalVideoLabels: VerticalVideoLabels = {\n play: \"Play\",\n pause: \"Pause\",\n like: \"Like\",\n comment: \"Comments\",\n share: \"Share\",\n more: \"More\",\n follow: \"Follow {name}\",\n following: \"Following {name}\",\n expand: \"More\",\n collapse: \"Less\",\n progress: \"Progress\",\n actions: \"Actions\",\n};\n\n/** The props both platforms read: the same content, counts, state, callbacks and slots. */\nexport interface VerticalVideoShared {\n /** The video's accessible name (\"Video: Night shoot, part 2\"), passed translated. */\n title: string;\n /** Plays while `true`; a `ShortFeed` passes it for the slide in view. Default `true`. */\n active?: boolean;\n /** A pill beside the name: \"AI-GENERATED\" — said on the picture, never only in a page's footnote. */\n disclosure?: string;\n /** The caption: collapsed to two lines, expandable when long. */\n caption?: string;\n /** Tags under the caption (without `#`). */\n tags?: readonly string[];\n /** The sound or credit line (\"Original sound — Elena\"). */\n credit?: string;\n /** The like count under its button, compact (`12.4K`) in `locale`. */\n likes?: number;\n /** The comment count under its button. */\n comments?: number;\n /** The share count under its button. */\n shares?: number;\n /** Whether the viewer likes it: `aria-pressed` on the like button. */\n liked?: boolean;\n /** Whether the viewer follows the creator: the \"+\" on the avatar becomes a check. */\n following?: boolean;\n /** The viewer likes or unlikes (the button, `L`, a double tap). */\n onLike?: (liked: boolean) => void;\n /** Opens the comments; without it the button still shows. */\n onComment?: () => void;\n /** Opens the share sheet. */\n onShare?: () => void;\n /** The viewer follows or unfollows; without it the avatar has no \"+\". */\n onFollow?: (following: boolean) => void;\n /** The \"more\" button's action (report, hide); without it the button is not drawn. */\n onMore?: () => void;\n /** The product's own action on the rail: a tip, an unlock — a button of yours (≥ 44 px, named). */\n tipSlot?: React.ReactNode;\n /** Top left: a chip over the picture (an auction's time left). */\n topStart?: React.ReactNode;\n /** Above the caption: a goal gauge, a challenge's progress. */\n aboveCaption?: React.ReactNode;\n /** The locale of the counts. Default `en`. */\n locale?: string;\n /** Every word, passed translated. */\n labels?: Partial<VerticalVideoLabels>;\n}\n"],"mappings":";;;;;AAIA,SAAS,qBAAqB;AAC9B,SAAS,QAAQ,KAAK,UAAU,qBAAqB;AACrD,SAAS,mBAAmB;AAC5B,YAAY,WAAW;AACvB,SAAS,UAAU,OAAM,WAA2B,YAAY,YAA4C;AAC5G,OAAO,OAAO,YAAY;;;ACiBnB,IAAM,sBAA2C;AAAA,EACtD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA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M;AAAA,EACzE,QAAQ,EAAE,UAAU,YAAY,QAAQ,KAAK,WAAW,UAAU,OAAO,IAAI,QAAQ,IAAI,cAAc,IAAI,YAAY,UAAU,gBAAgB,UAAU,UAAU,SAAS;AAAA,EAC9K,SAAS,EAAE,UAAU,YAAY,MAAM,IAAI,OAAO,IAAI,QAAQ,IAAI,KAAK,EAAE;AAAA,EACzE,SAAS,EAAE,eAAe,OAAO,YAAY,UAAU,KAAK,EAAE;AAAA,EAC9D,MAAM,EAAE,mBAAmB,GAAG,iBAAiB,GAAG,cAAc,IAAI;AAAA,EACpE,UAAU,EAAE,YAAY,OAAO,eAAe,IAAI;AAAA,EAClD,WAAW,EAAE,oBAAoB,aAAa,YAAY,MAAM;AAClE,CAAC;","names":[]}
package/dist/native.d.ts CHANGED
@@ -186,6 +186,63 @@ interface NativeMarkProps {
186
186
  */
187
187
  declare function AkinazaMark({ size, animated, title, neutral }: NativeMarkProps): React__default.JSX.Element;
188
188
 
189
+ type AppHeaderProps = {
190
+ /** The product's name, as text (`Yomizaka`). */
191
+ name: string;
192
+ /** The product's mark (`<ProductMark id="yomizaka" size={24} />`), before the name. */
193
+ mark?: React$1.ReactNode;
194
+ /** Makes the name a button home; its accessible name is `name`. */
195
+ onHome?: () => void;
196
+ /** The search trigger, first of the controls: `AppHeaderSearch`. */
197
+ search?: React$1.ReactNode;
198
+ /** The language (« FR »): the host's control, labelled. */
199
+ language?: React$1.ReactNode;
200
+ /** The host's own controls, after the language. */
201
+ actions?: React$1.ReactNode;
202
+ /** Messages: an `AppHeaderCount`. Empty: hidden. */
203
+ messages?: React$1.ReactNode;
204
+ /** Notifications: an `AppHeaderCount`. Empty: hidden. */
205
+ notifications?: React$1.ReactNode;
206
+ /** The one primary action, before the account. */
207
+ primary?: React$1.ReactNode;
208
+ /** The account, last (an `Avatar` in a button, named). */
209
+ account?: React$1.ReactNode;
210
+ /** Styles merged last. */
211
+ style?: StyleProp<ViewStyle>;
212
+ };
213
+ /**
214
+ * The app's top bar, the web's `AppHeader` on a phone: the mark and the name, then the controls in the family's fixed order —
215
+ * search · language · actions · messages · notifications · primary · account — under the status bar's safe area. The
216
+ * name truncates first; the controls keep their size.
217
+ */
218
+ declare function AppHeader({ name, mark, onHome, search, language, actions, messages, notifications, primary, account, style }: AppHeaderProps): React$1.JSX.Element;
219
+ type AppHeaderCountProps = {
220
+ /** What it is (« Notifications ») — passed translated; its accessible name, with the count. */
221
+ label: string;
222
+ /** The icon (an `@krizaka/icons/native` glyph): decorative. */
223
+ icon: React$1.ReactNode;
224
+ /** The unread count; 0 or absent draws no badge. */
225
+ count?: number;
226
+ /** The count in words (« 3 new ») — passed translated, with its plural. Default: the number. */
227
+ countLabel?: string;
228
+ /** Above it the badge shows `max+`. Default 99. */
229
+ max?: number;
230
+ /** Opens the screen (Notifications, Messages). */
231
+ onPress?: () => void;
232
+ /** The screen it leads to is on view (drawn as pressed). */
233
+ current?: boolean;
234
+ };
235
+ /** An icon button of the top bar with an unread count, the count said in its name (« Notifications, 3 new »). */
236
+ declare function AppHeaderCount({ label, icon, count, countLabel, max, onPress, current }: AppHeaderCountProps): React$1.JSX.Element;
237
+ type AppHeaderSearchProps = {
238
+ /** What it searches (« Search files and checks ») — passed translated: the button's name. */
239
+ label: string;
240
+ /** Opens the app's search screen or palette. */
241
+ onOpen: () => void;
242
+ };
243
+ /** The top bar's search trigger on a phone: a magnifier, named by `label`, that opens the app's search. */
244
+ declare function AppHeaderSearch({ label, onOpen }: AppHeaderSearchProps): React$1.JSX.Element;
245
+
189
246
  type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
190
247
  type AvatarProps = Omit<ViewProps, "children"> & {
191
248
  /**
@@ -1599,6 +1656,27 @@ type ProfileCardProps = Omit<ViewProps, "children"> & {
1599
1656
  };
1600
1657
  /** A profile at a glance for React Native: portrait, name, a headline gauge, stats in words, a line, actions. */
1601
1658
  declare function ProfileCard({ visual, name, statLabel, value, valueText, stats, caption, children, animated, style, ...props }: ProfileCardProps): React$1.JSX.Element;
1659
+ type ProfileBannerProps = Omit<ViewProps, "children"> & {
1660
+ /** The cover: an `Image` (decorative). Absent: a tint of the brand's accent. */
1661
+ banner?: React$1.ReactNode;
1662
+ /** The avatar overlapping the cover (`Avatar` with the family's default). */
1663
+ avatar: React$1.ReactNode;
1664
+ /** A line above the name: what it is (« Client »). */
1665
+ eyebrow?: string;
1666
+ /** The name: the screen's heading. */
1667
+ title: string;
1668
+ /** Beside the name: a `Badge`. */
1669
+ status?: React$1.ReactNode;
1670
+ /** Under the name: its facts. */
1671
+ meta?: string;
1672
+ /** The actions, under the name. */
1673
+ actions?: React$1.ReactNode;
1674
+ };
1675
+ /**
1676
+ * The top of a person's or a place's screen — the web's `ProfileBanner`: a slim cover, the avatar overlapping its lower
1677
+ * edge, then the name (the screen's heading), its facts and the actions. No text on the cover.
1678
+ */
1679
+ declare function ProfileBanner({ banner, avatar, eyebrow, title, status, meta, actions, style, ...props }: ProfileBannerProps): React$1.JSX.Element;
1602
1680
 
1603
1681
  type ProgressProps = {
1604
1682
  /** `bar` (default) or `ring`. */
@@ -2183,7 +2261,11 @@ type TabItem<T extends string> = {
2183
2261
  content?: React$1.ReactNode;
2184
2262
  /** Cannot be selected. */
2185
2263
  disabled?: boolean;
2264
+ /** `variant="binder"`: the divider's colour (the accent by default). Never the only signal: the words say it. */
2265
+ hue?: TabsHue;
2186
2266
  };
2267
+ /** A divider's colour: a role of the theme, ≥ 3:1 on both themes (the web's `TabsHue`). */
2268
+ type TabsHue = "accent" | "success" | "warning" | "danger" | "neutral";
2187
2269
  type TabsProps<T extends string> = {
2188
2270
  /** The tabs, in order. */
2189
2271
  items: readonly TabItem<T>[];
@@ -2195,8 +2277,13 @@ type TabsProps<T extends string> = {
2195
2277
  onValueChange?: (value: T) => void;
2196
2278
  /** The accessible name of the tab list — passed translated. */
2197
2279
  "aria-label"?: string;
2198
- /** `underline` (default: sections of a screen, scrolls sideways when they do not fit) or `segmented` (two to four views). */
2199
- variant?: "underline" | "segmented";
2280
+ /** `underline` (default: sections of a screen, scrolls sideways when they do not fit), `segmented` (two to four views) or `binder` (dividers that organise collections, tags, statuses; they scroll sideways). */
2281
+ variant?: "underline" | "segmented" | "binder";
2282
+ /** `variant="binder"`: a « + » button after the dividers (« Intercalaire »): its words and what it does. */
2283
+ add?: {
2284
+ label: string;
2285
+ onAdd: () => void;
2286
+ };
2200
2287
  /** Styles merged last, on the root. */
2201
2288
  style?: StyleProp<ViewStyle>;
2202
2289
  };
@@ -2204,7 +2291,7 @@ type TabsProps<T extends string> = {
2204
2291
  * Sections of one screen — the web `Tabs`: a tab list (underlined, scrolling sideways when long, or segmented) and the
2205
2292
  * selected panel under it. For the app's main sections, use `TabBar`.
2206
2293
  */
2207
- declare function Tabs<T extends string>({ items, value, defaultValue, onValueChange, "aria-label": label, variant, style }: TabsProps<T>): React$1.JSX.Element;
2294
+ declare function Tabs<T extends string>({ items, value, defaultValue, onValueChange, "aria-label": label, variant, add, style }: TabsProps<T>): React$1.JSX.Element;
2208
2295
 
2209
2296
  type TagOption = {
2210
2297
  value: string;
@@ -2240,6 +2327,9 @@ type Theme = {
2240
2327
  readonly borderSubtle: string;
2241
2328
  readonly borderDefault: string;
2242
2329
  readonly borderStrong: string;
2330
+ readonly borderControl: string;
2331
+ readonly borderHover: string;
2332
+ readonly textTitle: string;
2243
2333
  readonly textPrimary: string;
2244
2334
  readonly textSecondary: string;
2245
2335
  readonly textMuted: string;
@@ -2554,4 +2644,4 @@ declare function YomizakaMark({ size, animated, title, neutral }: NativeMarkProp
2554
2644
  */
2555
2645
  declare function YororisMark({ size, animated, title, neutral }: NativeMarkProps): React__default.JSX.Element;
2556
2646
 
2557
- export { ActionSheet, type ActionSheetAction, type ActionSheetProps, type ActivityEvent, ActivityFeed, type ActivityFeedLabels, type ActivityFeedProps, type ActivityTone, AkinazaMark, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, AvatarRoot, type AvatarSize, Badge, type BadgeProps, type BadgeTone, type BrandId, BrandedRefresh, type BrandedRefreshProps, type BrandedRefreshScrollProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarLabels, type CalendarProps, Card, CardBody, type CardBodyProps, CardDescription, CardFooter, CardImage, type CardImageProps, CardMedia, type CardMediaProps, CardOverlay, type CardOverlayProps, CardRoot, type CardRootProps, CardTitle, Checkbox, type CheckboxProps, Chip, type ChipGroupProps, type ChipProps, type ChipSize, Combobox, type ComboboxLabels, type ComboboxProps, ComposerMeta, type ComposerMetaProps, ConversationItem, type ConversationItemProps, Countdown, type CountdownProps, type CountdownUnits, DateField, type DateFieldLabels, type DateFieldProps, type DatePart, DateWheel, type DateWheelProps, DayStrip, type DayStripProps, type DefaultAvatar, type DefaultAvatarBrand, type DescriptionItem, DescriptionList, type DescriptionListProps, EmptyState, type EmptyStateProps, ErrorState, Fab, type FabProps, ForceUpdateScreen, type ForceUpdateScreenProps, GoalGauge, type GoalGaugeProps, type GridPhoto, type HapticKind, Header, type HeaderProps, IconButton, type IconButtonProps, ImageViewer, type ImageViewerProps, type Insets, KachizakaMark, KrizakaMark, Loader, LoaderGlyph, type LoaderGlyphProps, type LoaderProps, LoadingState, MaintenanceScreen, type MaintenanceScreenProps, Mascot, type MascotProps, MascotState, type MascotStateProps, MatchDialog, type MatchDialogProps, MessageBubble, type MessageBubbleLabels, type MessageBubbleProps, MessageComposer, type MessageComposerProps, type MessageStatus, MetaRow, type MetaRowProps, Meter, type MeterPart, type MeterProps, type Mode, MonthPicker, type MonthPickerProps, type Motion, type NativeMarkProps, NumberTicker, type NumberTickerProps, Onboarding, type OnboardingProps, type OnboardingSlide, OrazakaMark, OrochiaMark, OtpInput, type OtpInputProps, Pagination, type PaginationLabels, type PaginationProps, PermissionPrompt, type PermissionPromptProps, type PermissionStatus, PersonCard, type PersonCardProps, Phoenix, type PhoenixProps, PhotoGrid, type PhotoGridLabels, type PhotoGridProps, ProductMark, ProfileCard, type ProfileCardProps, type ProfileStat, Progress, type ProgressProps, PullToRefresh, type PullToRefreshProps, RadioGroup, type RadioGroupProps, type RadioOption, type Radius, Screen, type ScreenProps, SearchField, type SearchFieldProps, Segmented, type SegmentedOption, type SegmentedProps, Select, type SelectOption, type SelectProps, SettingsGroup, type SettingsGroupProps, SettingsRow, type SettingsRowProps, Sheet, type SheetProps, Showcase, type ShowcaseLabels, type ShowcaseProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, SplashHandoff, type SplashHandoffProps, type Step, StepProgress, type StepProgressProps, type StepStatus, Stepper, type StepperProps, SuccessState, type SwipeAction, SwipeDeck, type SwipeDeckLabels, type SwipeDeckProps, type SwipeDirection, SwipeableRow, type SwipeableRowProps, Switch, type SwitchProps, TabBar, type TabBarItem, type TabBarProps, type TabItem, Tabs, type TabsProps, type TagOption, TagSelector, type TagSelectorProps, TextField, type TextFieldProps, type Theme, type ThemeContextValue, type ThemeFonts, type ThemeName, type ThemeOverrides, ThemeProvider, type ThemeProviderProps, TimePicker, type TimePickerLabels, type TimePickerProps, type TimeValue, type ToastItem, type ToastOptions, type ToastTone, Toaster, type ToasterProps, Txt, type TxtProps, type TxtTone, type TxtVariant, TypingIndicator, type TypingIndicatorProps, UpdatePrompt, type UpdatePromptProps, VerifiedBadge, type VerifiedBadgeProps, type ViewerImage, Waveform, type WaveformProps, WelcomeState, Wheel, WheelDivider, type WheelOption, WheelPicker, type WheelPickerProps, type WheelProps, YasakiaMark, YazakiaMark, YomizakaMark, YororisMark, addDays, addMonths, ageOn, alpha, calendarLabels, comboboxLabels, composeDate, dateFieldLabels, datePartsOrder, daysInMonth, defaultAvatarUrl, formatTime, isRealDate, latestBirthDate, monthNames, prefetchNeighbours, showcaseLabels, splitDuration, textStyles, timeSlots, timeToMinutes, toast, todayIso, useCollapsingHeader, useCountdown, useDelayedWait, useReducedMotion, useTheme, uses12Hours };
2647
+ export { ActionSheet, type ActionSheetAction, type ActionSheetProps, type ActivityEvent, ActivityFeed, type ActivityFeedLabels, type ActivityFeedProps, type ActivityTone, AkinazaMark, AppHeader, AppHeaderCount, type AppHeaderCountProps, type AppHeaderProps, AppHeaderSearch, type AppHeaderSearchProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, AvatarRoot, type AvatarSize, Badge, type BadgeProps, type BadgeTone, type BrandId, BrandedRefresh, type BrandedRefreshProps, type BrandedRefreshScrollProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarLabels, type CalendarProps, Card, CardBody, type CardBodyProps, CardDescription, CardFooter, CardImage, type CardImageProps, CardMedia, type CardMediaProps, CardOverlay, type CardOverlayProps, CardRoot, type CardRootProps, CardTitle, Checkbox, type CheckboxProps, Chip, type ChipGroupProps, type ChipProps, type ChipSize, Combobox, type ComboboxLabels, type ComboboxProps, ComposerMeta, type ComposerMetaProps, ConversationItem, type ConversationItemProps, Countdown, type CountdownProps, type CountdownUnits, DateField, type DateFieldLabels, type DateFieldProps, type DatePart, DateWheel, type DateWheelProps, DayStrip, type DayStripProps, type DefaultAvatar, type DefaultAvatarBrand, type DescriptionItem, DescriptionList, type DescriptionListProps, EmptyState, type EmptyStateProps, ErrorState, Fab, type FabProps, ForceUpdateScreen, type ForceUpdateScreenProps, GoalGauge, type GoalGaugeProps, type GridPhoto, type HapticKind, Header, type HeaderProps, IconButton, type IconButtonProps, ImageViewer, type ImageViewerProps, type Insets, KachizakaMark, KrizakaMark, Loader, LoaderGlyph, type LoaderGlyphProps, type LoaderProps, LoadingState, MaintenanceScreen, type MaintenanceScreenProps, Mascot, type MascotProps, MascotState, type MascotStateProps, MatchDialog, type MatchDialogProps, MessageBubble, type MessageBubbleLabels, type MessageBubbleProps, MessageComposer, type MessageComposerProps, type MessageStatus, MetaRow, type MetaRowProps, Meter, type MeterPart, type MeterProps, type Mode, MonthPicker, type MonthPickerProps, type Motion, type NativeMarkProps, NumberTicker, type NumberTickerProps, Onboarding, type OnboardingProps, type OnboardingSlide, OrazakaMark, OrochiaMark, OtpInput, type OtpInputProps, Pagination, type PaginationLabels, type PaginationProps, PermissionPrompt, type PermissionPromptProps, type PermissionStatus, PersonCard, type PersonCardProps, Phoenix, type PhoenixProps, PhotoGrid, type PhotoGridLabels, type PhotoGridProps, ProductMark, ProfileBanner, type ProfileBannerProps, ProfileCard, type ProfileCardProps, type ProfileStat, Progress, type ProgressProps, PullToRefresh, type PullToRefreshProps, RadioGroup, type RadioGroupProps, type RadioOption, type Radius, Screen, type ScreenProps, SearchField, type SearchFieldProps, Segmented, type SegmentedOption, type SegmentedProps, Select, type SelectOption, type SelectProps, SettingsGroup, type SettingsGroupProps, SettingsRow, type SettingsRowProps, Sheet, type SheetProps, Showcase, type ShowcaseLabels, type ShowcaseProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, SplashHandoff, type SplashHandoffProps, type Step, StepProgress, type StepProgressProps, type StepStatus, Stepper, type StepperProps, SuccessState, type SwipeAction, SwipeDeck, type SwipeDeckLabels, type SwipeDeckProps, type SwipeDirection, SwipeableRow, type SwipeableRowProps, Switch, type SwitchProps, TabBar, type TabBarItem, type TabBarProps, type TabItem, Tabs, type TabsHue, type TabsProps, type TagOption, TagSelector, type TagSelectorProps, TextField, type TextFieldProps, type Theme, type ThemeContextValue, type ThemeFonts, type ThemeName, type ThemeOverrides, ThemeProvider, type ThemeProviderProps, TimePicker, type TimePickerLabels, type TimePickerProps, type TimeValue, type ToastItem, type ToastOptions, type ToastTone, Toaster, type ToasterProps, Txt, type TxtProps, type TxtTone, type TxtVariant, TypingIndicator, type TypingIndicatorProps, UpdatePrompt, type UpdatePromptProps, VerifiedBadge, type VerifiedBadgeProps, type ViewerImage, Waveform, type WaveformProps, WelcomeState, Wheel, WheelDivider, type WheelOption, WheelPicker, type WheelPickerProps, type WheelProps, YasakiaMark, YazakiaMark, YomizakaMark, YororisMark, addDays, addMonths, ageOn, alpha, calendarLabels, comboboxLabels, composeDate, dateFieldLabels, datePartsOrder, daysInMonth, defaultAvatarUrl, formatTime, isRealDate, latestBirthDate, monthNames, prefetchNeighbours, showcaseLabels, splitDuration, textStyles, timeSlots, timeToMinutes, toast, todayIso, useCollapsingHeader, useCountdown, useDelayedWait, useReducedMotion, useTheme, uses12Hours };