@krizaka/ui 3.74.0 → 3.75.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 (278) hide show
  1. package/README.md +2 -6
  2. package/dist/{chunk-GSQRSWOE.js → chunk-RI3AA2E3.js} +3 -3
  3. package/dist/{chunk-E4FMPPDL.js → chunk-WC3SO4CE.js} +2 -2
  4. package/dist/{chunk-KF7UB3LM.js → chunk-YQWYGQTV.js} +11 -9
  5. package/dist/{chunk-KF7UB3LM.js.map → chunk-YQWYGQTV.js.map} +1 -1
  6. package/dist/{chunk-M3GEYLMR.js → chunk-ZPOVOEO3.js} +1 -2
  7. package/dist/data-table.js +3 -3
  8. package/dist/filter-bar.d.ts +12 -4
  9. package/dist/filter-bar.js +1 -1
  10. package/dist/gallery-page.js +3 -3
  11. package/dist/genui.js +101 -35
  12. package/dist/genui.js.map +1 -1
  13. package/dist/language-switch.d.ts +9 -9
  14. package/dist/{lightbox-D5NAHFEA.js → lightbox-Q45BZ3HW.js} +3 -3
  15. package/dist/match-dialog.js +2 -2
  16. package/dist/motion.css +1 -25
  17. package/dist/native/list.js +1 -1
  18. package/dist/native/list.js.map +1 -1
  19. package/dist/native.d.ts +2 -54
  20. package/dist/native.js +464 -560
  21. package/dist/native.js.map +1 -1
  22. package/dist/product-page.js +3 -3
  23. package/dist/shop-gallery.js +1 -1
  24. package/dist/tag-selector.js +16 -10
  25. package/dist/tag-selector.js.map +1 -1
  26. package/dist/vertical-video.js +1 -1
  27. package/dist/waveform.js.map +1 -1
  28. package/package.json +5 -81
  29. package/registry/account-menu.json +1 -1
  30. package/registry/account-settings.json +1 -1
  31. package/registry/achievement.json +1 -1
  32. package/registry/action-bar.json +1 -1
  33. package/registry/activity-feed.json +1 -1
  34. package/registry/agenda.json +1 -1
  35. package/registry/alert.json +1 -1
  36. package/registry/analysis-report.json +1 -1
  37. package/registry/anatomy-plate.json +1 -1
  38. package/registry/app-frame.json +2 -2
  39. package/registry/app-header.json +1 -1
  40. package/registry/app-shell.json +1 -1
  41. package/registry/argument-card.json +1 -1
  42. package/registry/auth-layout.json +1 -1
  43. package/registry/avatar.json +1 -1
  44. package/registry/badge.json +1 -1
  45. package/registry/bird-plate.json +1 -1
  46. package/registry/button.json +1 -1
  47. package/registry/captcha.json +1 -1
  48. package/registry/card-grid.json +1 -1
  49. package/registry/card.json +1 -1
  50. package/registry/catalogue-page.json +1 -1
  51. package/registry/changelog-page.json +1 -1
  52. package/registry/chapter.json +1 -1
  53. package/registry/chat.json +3 -3
  54. package/registry/checkbox.json +1 -1
  55. package/registry/chip-link.json +1 -1
  56. package/registry/chip-row.json +1 -1
  57. package/registry/chip.json +1 -1
  58. package/registry/choice-grid.json +1 -1
  59. package/registry/code-block.json +1 -1
  60. package/registry/collection-switcher.json +1 -1
  61. package/registry/combobox.json +1 -1
  62. package/registry/command.json +1 -1
  63. package/registry/comparison-table.json +1 -1
  64. package/registry/component-page.json +1 -1
  65. package/registry/confirm-button.json +1 -1
  66. package/registry/contact-page.json +1 -1
  67. package/registry/continue-prompt.json +1 -1
  68. package/registry/copy-button.json +1 -1
  69. package/registry/countdown.json +1 -1
  70. package/registry/cover-hero.json +1 -1
  71. package/registry/cta-panel.json +1 -1
  72. package/registry/dashboard-layout.json +1 -1
  73. package/registry/data-table.json +1 -1
  74. package/registry/date-picker.json +1 -1
  75. package/registry/decision-list.json +1 -1
  76. package/registry/description-list.json +1 -1
  77. package/registry/desktop-window.json +1 -1
  78. package/registry/detail-layout.json +1 -1
  79. package/registry/dialog.json +1 -1
  80. package/registry/docs-article-page.json +1 -1
  81. package/registry/docs-hub-page.json +1 -1
  82. package/registry/docs-layout.json +1 -1
  83. package/registry/docs-nav.json +1 -1
  84. package/registry/document-viewer.json +1 -1
  85. package/registry/doodle.json +1 -1
  86. package/registry/drop-overlay.json +1 -1
  87. package/registry/dropdown-menu.json +1 -1
  88. package/registry/elephant.json +1 -1
  89. package/registry/embed-facade.json +1 -1
  90. package/registry/empty-state.json +1 -1
  91. package/registry/engine-flow.json +1 -1
  92. package/registry/entity-header.json +1 -1
  93. package/registry/environment-notice.json +1 -1
  94. package/registry/error-page.json +1 -1
  95. package/registry/field.json +1 -1
  96. package/registry/file-upload.json +1 -1
  97. package/registry/filter-bar.json +2 -2
  98. package/registry/flock.json +1 -1
  99. package/registry/footnote.json +1 -1
  100. package/registry/force-update-screen.json +1 -1
  101. package/registry/form.json +1 -1
  102. package/registry/gallery-page.json +1 -1
  103. package/registry/genui.json +1 -1
  104. package/registry/glossary-term.json +1 -1
  105. package/registry/glossary.json +1 -1
  106. package/registry/glow-card.json +1 -1
  107. package/registry/goal-gauge.json +1 -1
  108. package/registry/grade-stamp.json +1 -1
  109. package/registry/image-cropper.json +1 -1
  110. package/registry/index.json +10 -185
  111. package/registry/kanban.json +1 -1
  112. package/registry/kbd.json +1 -1
  113. package/registry/kind-config-editor.json +1 -1
  114. package/registry/kpi-explained.json +1 -1
  115. package/registry/landing-page.json +1 -1
  116. package/registry/landscape.json +1 -1
  117. package/registry/language-switch.json +1 -1
  118. package/registry/legal-page.json +1 -1
  119. package/registry/link-card.json +1 -1
  120. package/registry/list.json +1 -1
  121. package/registry/loader.json +1 -1
  122. package/registry/longform-page.json +1 -1
  123. package/registry/maintenance-screen.json +1 -1
  124. package/registry/map.json +2 -2
  125. package/registry/margin-layout.json +1 -1
  126. package/registry/markdown.json +1 -1
  127. package/registry/marketing-layout.json +1 -1
  128. package/registry/mascot-quote.json +1 -1
  129. package/registry/mascot-state.json +1 -1
  130. package/registry/mascots.json +1 -1
  131. package/registry/match-dialog.json +1 -1
  132. package/registry/media-capture.json +1 -1
  133. package/registry/media-gallery.json +3 -14
  134. package/registry/meter.json +1 -1
  135. package/registry/money-input.json +1 -1
  136. package/registry/nav-bar.json +2 -2
  137. package/registry/next-actions.json +1 -1
  138. package/registry/notification-preferences.json +1 -1
  139. package/registry/number-ticker.json +1 -1
  140. package/registry/opening-hours.json +1 -1
  141. package/registry/page-header.json +1 -1
  142. package/registry/page-hero.json +1 -1
  143. package/registry/page-index.json +1 -1
  144. package/registry/page.json +1 -1
  145. package/registry/pagination.json +1 -1
  146. package/registry/pointer-light.json +1 -1
  147. package/registry/popover.json +1 -1
  148. package/registry/price-catalogue-editor.json +1 -1
  149. package/registry/pricing-page.json +1 -1
  150. package/registry/product-page.json +2 -6
  151. package/registry/profile-card.json +1 -1
  152. package/registry/progress.json +1 -1
  153. package/registry/promise-card.json +1 -1
  154. package/registry/promo-code-field.json +1 -1
  155. package/registry/proposal.json +1 -1
  156. package/registry/qr-code.json +1 -1
  157. package/registry/quota-meter.json +1 -1
  158. package/registry/radio-group.json +1 -1
  159. package/registry/rail-nav.json +2 -2
  160. package/registry/recipes.json +1 -1
  161. package/registry/retro-tv.json +2 -3
  162. package/registry/reviews.json +1 -1
  163. package/registry/router.json +1 -1
  164. package/registry/schema-form.json +1 -1
  165. package/registry/scroll-stage.json +1 -1
  166. package/registry/search-field.json +1 -1
  167. package/registry/section-backdrop.json +1 -1
  168. package/registry/separator.json +1 -1
  169. package/registry/service-card.json +1 -1
  170. package/registry/settings-layout.json +1 -1
  171. package/registry/shop-composer.json +1 -1
  172. package/registry/shop-gallery.json +3 -8
  173. package/registry/shop.json +2 -2
  174. package/registry/showcase.json +2 -7
  175. package/registry/signature.json +1 -1
  176. package/registry/site-cahier.json +1 -1
  177. package/registry/site-footer.json +2 -2
  178. package/registry/sites.json +1 -1
  179. package/registry/skeleton.json +1 -1
  180. package/registry/skip-link.json +1 -1
  181. package/registry/slider.json +1 -1
  182. package/registry/slot-picker.json +1 -1
  183. package/registry/slot.json +1 -1
  184. package/registry/specimen-tag.json +1 -1
  185. package/registry/speed-lines.json +1 -1
  186. package/registry/spinner.json +1 -1
  187. package/registry/split-view.json +1 -1
  188. package/registry/stage-banner.json +1 -1
  189. package/registry/stat.json +1 -1
  190. package/registry/status-chip.json +1 -1
  191. package/registry/status-page.json +1 -1
  192. package/registry/step-progress.json +1 -1
  193. package/registry/step-showcase.json +1 -1
  194. package/registry/stepper.json +1 -1
  195. package/registry/sticky-action.json +1 -1
  196. package/registry/stuck.json +1 -1
  197. package/registry/swipe-deck.json +3 -4
  198. package/registry/switch.json +1 -1
  199. package/registry/tabs.json +1 -1
  200. package/registry/tag-input.json +1 -1
  201. package/registry/tag-selector.json +2 -2
  202. package/registry/taped-photo.json +1 -1
  203. package/registry/terminal-replay.json +1 -1
  204. package/registry/text-style.json +1 -1
  205. package/registry/theme.json +1 -1
  206. package/registry/toast.json +1 -1
  207. package/registry/toc.json +1 -1
  208. package/registry/tooltip.json +1 -1
  209. package/registry/tree-view.json +1 -1
  210. package/registry/update-prompt.json +1 -1
  211. package/registry/upload-queue.json +1 -1
  212. package/registry/usage.json +1 -1
  213. package/registry/verified-badge.json +1 -1
  214. package/registry/versus-card.json +1 -1
  215. package/registry/vertical-video.json +2 -6
  216. package/registry/video-player.json +2 -7
  217. package/registry/video-trimmer.json +3 -4
  218. package/registry/virtual.json +1 -1
  219. package/registry/wall.json +3 -9
  220. package/registry/waveform.json +4 -9
  221. package/dist/audio-player.d.ts +0 -115
  222. package/dist/audio-player.js +0 -211
  223. package/dist/audio-player.js.map +0 -1
  224. package/dist/chunk-YKOLME7R.js +0 -126
  225. package/dist/chunk-YKOLME7R.js.map +0 -1
  226. package/dist/how-it-works-page.d.ts +0 -49
  227. package/dist/how-it-works-page.js +0 -28
  228. package/dist/how-it-works-page.js.map +0 -1
  229. package/dist/marquee.d.ts +0 -34
  230. package/dist/marquee.js +0 -52
  231. package/dist/marquee.js.map +0 -1
  232. package/dist/media-grid.d.ts +0 -246
  233. package/dist/media-grid.js +0 -468
  234. package/dist/media-grid.js.map +0 -1
  235. package/dist/photo-grid.d.ts +0 -123
  236. package/dist/photo-grid.js +0 -94
  237. package/dist/photo-grid.js.map +0 -1
  238. package/registry/audio-player.json +0 -300
  239. package/registry/examples/audio-player/podcast.d.ts +0 -4
  240. package/registry/examples/audio-player/podcast.js +0 -22
  241. package/registry/examples/audio-player/podcast.tsx +0 -19
  242. package/registry/examples/audio-player/voice-note.d.ts +0 -4
  243. package/registry/examples/audio-player/voice-note.js +0 -12
  244. package/registry/examples/audio-player/voice-note.tsx +0 -12
  245. package/registry/examples/how-it-works-page/orazaka.d.ts +0 -4
  246. package/registry/examples/how-it-works-page/orazaka.js +0 -30
  247. package/registry/examples/how-it-works-page/orazaka.tsx +0 -26
  248. package/registry/examples/marquee/cards.d.ts +0 -4
  249. package/registry/examples/marquee/cards.js +0 -23
  250. package/registry/examples/marquee/cards.tsx +0 -21
  251. package/registry/examples/marquee/logos.d.ts +0 -4
  252. package/registry/examples/marquee/logos.js +0 -12
  253. package/registry/examples/marquee/logos.tsx +0 -17
  254. package/registry/examples/media-grid/feed.d.ts +0 -4
  255. package/registry/examples/media-grid/feed.js +0 -31
  256. package/registry/examples/media-grid/feed.tsx +0 -30
  257. package/registry/examples/media-grid/loading.d.ts +0 -4
  258. package/registry/examples/media-grid/loading.js +0 -28
  259. package/registry/examples/media-grid/loading.tsx +0 -25
  260. package/registry/examples/media-grid/uniform.d.ts +0 -4
  261. package/registry/examples/media-grid/uniform.js +0 -29
  262. package/registry/examples/media-grid/uniform.tsx +0 -26
  263. package/registry/examples/photo-grid/native/profile-photos.d.ts +0 -4
  264. package/registry/examples/photo-grid/native/profile-photos.dark.png +0 -0
  265. package/registry/examples/photo-grid/native/profile-photos.js +0 -27
  266. package/registry/examples/photo-grid/native/profile-photos.light.png +0 -0
  267. package/registry/examples/photo-grid/native/profile-photos.tsx +0 -24
  268. package/registry/examples/photo-grid/profile-photos.d.ts +0 -4
  269. package/registry/examples/photo-grid/profile-photos.js +0 -28
  270. package/registry/examples/photo-grid/profile-photos.tsx +0 -25
  271. package/registry/how-it-works-page.json +0 -258
  272. package/registry/marquee.json +0 -241
  273. package/registry/media-grid.json +0 -1034
  274. package/registry/photo-grid.json +0 -316
  275. /package/dist/{chunk-GSQRSWOE.js.map → chunk-RI3AA2E3.js.map} +0 -0
  276. /package/dist/{chunk-E4FMPPDL.js.map → chunk-WC3SO4CE.js.map} +0 -0
  277. /package/dist/{chunk-M3GEYLMR.js.map → chunk-ZPOVOEO3.js.map} +0 -0
  278. /package/dist/{lightbox-D5NAHFEA.js.map → lightbox-Q45BZ3HW.js.map} +0 -0
@@ -1,246 +0,0 @@
1
- import * as React from 'react';
2
- import { L as LinkComponent } from './block-link-BAg4eoZk.js';
3
-
4
- interface LoadMoreProps extends Omit<React.ComponentProps<"div">, "children" | "onError"> {
5
- /** Asks for the next page. Not called while `loading`, nor once `hasMore` is false. */
6
- onLoadMore: () => void;
7
- /** There is a next page. */
8
- hasMore: boolean;
9
- /** A page is on its way. */
10
- loading?: boolean;
11
- /** The last page failed: the button reads `retryLabel`, and nothing loads by itself until it is pressed. */
12
- failed?: boolean;
13
- /** The button, passed translated ("Load more"). */
14
- label: string;
15
- /** The wait, passed translated ("Loading more videos"). */
16
- loadingLabel: string;
17
- /** The button after a failure, passed translated ("Try again"). Defaults to `label`. */
18
- retryLabel?: string;
19
- /** Shown instead of the button when the list is over, passed translated ("You have seen everything"). Nothing if absent. */
20
- endLabel?: string;
21
- /**
22
- * How far below the viewport the page is already requested (an IntersectionObserver `rootMargin`).
23
- * @default "900px 0px"
24
- */
25
- rootMargin?: string;
26
- }
27
- /** Infinite scroll with a visible "Load more" under it. */
28
- declare function LoadMore({ onLoadMore, hasMore, loading, failed, label, loadingLabel, retryLabel, endLabel, rootMargin, className, ...props }: LoadMoreProps): React.JSX.Element;
29
-
30
- interface SectionHintProps {
31
- /** The button's accessible name, passed translated (“What are Shorts?”). */
32
- label: string;
33
- /** The definition, in one line. */
34
- text: string;
35
- /** A link to the full definition (the glossary). */
36
- link?: {
37
- href: string;
38
- label: string;
39
- linkAs?: LinkComponent;
40
- };
41
- }
42
- /** The definition of a section, one tap away from its heading. */
43
- declare function SectionHint({ label, text, link }: SectionHintProps): React.JSX.Element;
44
-
45
- interface ShortsShelfProps<T> extends Omit<React.ComponentProps<"section">, "children" | "title"> {
46
- /** The shelf's accessible name ("Shorts"), passed translated; shown as its heading unless `title` is set. */
47
- label: string;
48
- /** A heading different from the name. */
49
- title?: React.ReactNode;
50
- /** A small “i” beside the heading: the one-line definition of the section and a link to the glossary. */
51
- hint?: SectionHintProps;
52
- /** The clips, in order. */
53
- items: readonly T[];
54
- /** A stable key for an item. */
55
- getId: (item: T) => string;
56
- /** One card: use `VideoCard aspect="portrait"`. */
57
- renderItem: (item: T, index: number) => React.ReactNode;
58
- /** Opens the vertical feed. */
59
- seeAll?: {
60
- href: string;
61
- label: string;
62
- linkAs?: LinkComponent;
63
- };
64
- /** The arrows' names, passed translated. */
65
- previousLabel: string;
66
- /** The next arrow's name. */
67
- nextLabel: string;
68
- }
69
- /** A Shorts shelf: equal-height 9:16 cards in a snap-scrolling row. */
70
- declare function ShortsShelf<T>({ label, title, hint, items, getId, renderItem, seeAll, previousLabel, nextLabel, className, ...props }: ShortsShelfProps<T>): React.JSX.Element | null;
71
-
72
- /** A brand of the default avatars. */
73
- type DefaultAvatarBrand = "krizaka" | "orazaka" | "yomizaka" | "akinaza";
74
- /**
75
- * What the picture is of. `person`: a neutral silhouette. `plain`: the brand's gradient alone, ready for initials.
76
- * `folder`, `organisation` and `shop` are the pictures of a thing that is not a person (a folder or collection, a company, a shop):
77
- * a glyph on the gradient, never a silhouette. The central sets of these kinds are in the Krizaka org JSON (`defaults`, `@krizaka/org`).
78
- */
79
- type DefaultAvatarKind = "person" | "plain" | "folder" | "organisation" | "shop";
80
- interface DefaultAvatar {
81
- /** The brand of the product showing the avatar: its gradient, its hues. */
82
- brand: DefaultAvatarBrand;
83
- /** Any stable text or number of the person (their id): the same seed gives the same tone everywhere. */
84
- seed?: string | number;
85
- /** Force a tone, 1 to 6, instead of deriving it from `seed`. */
86
- tone?: number;
87
- /**
88
- * `person` (default): a silhouette. `plain`: the gradient alone. `folder`, `organisation`, `shop`: that thing's glyph, drawn here
89
- * (a data URL, no request) — a folder is never given a person.
90
- * @default "person"
91
- */
92
- kind?: DefaultAvatarKind;
93
- /**
94
- * The family's central set (`listDefaults("person")` of `@krizaka/org`): when given with a `seed`, the avatar is the set's picture for that seed —
95
- * the same person has the same picture in every product — instead of the brand's silhouette. An empty set, or no seed, draws the silhouette.
96
- */
97
- set?: readonly DefaultAvatarPicture[];
98
- }
99
- /**
100
- * One picture of the family's central set, as `@krizaka/org` lists it (`listDefaults("person")` items fit as they are): the sizes it is served in.
101
- * `disabled` pictures are never picked.
102
- */
103
- interface DefaultAvatarPicture {
104
- id: string;
105
- disabled?: boolean;
106
- urls: {
107
- webp: Readonly<Record<string, string>>;
108
- };
109
- }
110
-
111
- type VideoCardAspect = "landscape" | "portrait";
112
- interface VideoCardCreator {
113
- /** The creator's name. */
114
- name: string;
115
- /** Their photo. */
116
- avatarSrc?: string | null;
117
- /** Their profile. */
118
- href?: string;
119
- /** The Krizaka default picture when there is no photo (a brand and a seed). */
120
- defaultAvatar?: DefaultAvatar;
121
- }
122
- interface VideoCardProps extends Omit<React.ComponentProps<"article">, "title"> {
123
- /** The title; it names the card and is its link. */
124
- title: string;
125
- /** Where the card opens. */
126
- href: string;
127
- /** The app's router link (Next's `Link`). */
128
- linkAs?: LinkComponent;
129
- /**
130
- * The frame: `landscape` (16:9) or `portrait` (9:16).
131
- * @default "landscape"
132
- */
133
- aspect?: VideoCardAspect;
134
- /**
135
- * `stack` (picture over text) or `row` (picture beside the text: the list mode of a section).
136
- * @default "stack"
137
- */
138
- layout?: "stack" | "row";
139
- /** The picture. */
140
- poster?: string | null;
141
- /**
142
- * An animated picture (WebP, a few hundred kB) that fades in over the poster once the pointer has rested on the card
143
- * (or it is focused) for `previewDelay`, and is removed again on leave. It is never requested before. On a phone (no
144
- * hover) only the card most inside the viewport plays it, unless the person asked for less data or less motion.
145
- */
146
- previewSrc?: string | null;
147
- /**
148
- * How long the pointer must rest before the preview is requested, in ms: a pointer crossing the grid loads nothing.
149
- * @default 200
150
- */
151
- previewDelay?: number;
152
- /**
153
- * `fetchPriority` of the poster: `high` for the first row (the largest contentful paint).
154
- * @default "auto"
155
- */
156
- posterPriority?: "high" | "low" | "auto";
157
- /**
158
- * `cover` fills the frame; `contain` draws the whole picture over a blurred copy of itself (a source of the other
159
- * orientation: no cropped face, no black bar).
160
- * @default "cover"
161
- */
162
- fit?: "cover" | "contain";
163
- /** The length, already formatted (`3:42`). */
164
- duration?: string;
165
- /** Badges at the top-left of the picture (Free, a price, 18+). Put them on `scrim` so they read in both themes. */
166
- badges?: React.ReactNode;
167
- /** Who made it: name, photo, profile. */
168
- creator?: VideoCardCreator;
169
- /** What is counted (`12.4K views`), already formatted. */
170
- meta?: React.ReactNode;
171
- /** One quick action at the end of the footer (a tip, a save). Its clicks must not follow the card's link. */
172
- action?: React.ReactNode;
173
- /** A sensitive picture: blurred and scaled so nothing shows (put the reveal button in `overlay`). */
174
- blurred?: boolean;
175
- /** Over the whole picture, above the card's link (a veil, a reveal button). */
176
- overlay?: React.ReactNode;
177
- /** Shown instead of the picture while there is none. */
178
- fallback?: React.ReactNode;
179
- /** `eager` for the first cards of a page. */
180
- loading?: "lazy" | "eager";
181
- }
182
- /** A video card whose frame, body and footer have one height per aspect, so a grid row or a shelf never staggers. */
183
- declare function VideoCard({ title, href, linkAs, aspect, layout, poster, previewSrc, previewDelay, posterPriority, fit, duration, badges, creator, meta, action, fallback, blurred, overlay, loading, className, onMouseEnter, onMouseLeave, onFocus, onBlur, ref, ...props }: VideoCardProps): React.JSX.Element;
184
-
185
- interface MediaGridState {
186
- /** The frame the card is drawn in (`aspect` of `VideoCard`). */
187
- aspect: VideoCardAspect;
188
- /** The card's `layout`. */
189
- layout: "stack" | "row";
190
- /** The source's orientation differs from the frame: pass `fit="contain"`. */
191
- mismatch: boolean;
192
- }
193
- interface MediaGridProps<T> extends Omit<React.ComponentProps<"div">, "children"> {
194
- /** The videos, in order. */
195
- items: readonly T[];
196
- /** A stable key for an item. */
197
- getId: (item: T) => string;
198
- /** The source's orientation (from its width and height). */
199
- orientationOf: (item: T) => VideoCardAspect;
200
- /** One card, drawn in the frame the grid gives (`state`): use `VideoCard`. */
201
- renderItem: (item: T, state: MediaGridState) => React.ReactNode;
202
- /**
203
- * `split`: verticals on the shelf, the others in the grid · `uniform`: all in one frame (`frame`).
204
- * @default "split"
205
- */
206
- mode?: "split" | "uniform";
207
- /** The frame of `uniform`. @default "landscape" */
208
- frame?: VideoCardAspect;
209
- /** `grid` or `list` (one row per video). @default "grid" */
210
- layout?: "grid" | "list";
211
- /** The shelf of `split`: its name, "See all" and arrows, passed translated. */
212
- shelf: Pick<ShortsShelfProps<unknown>, "label" | "title" | "hint" | "seeAll" | "previousLabel" | "nextLabel">;
213
- /** A heading for the grid of the others (“Videos”), in the style of the shelf's, with an optional definition. */
214
- grid?: {
215
- label: string;
216
- hint?: SectionHintProps;
217
- };
218
- }
219
- /** A media grid that never mixes heights badly: a shelf for the 9:16, a uniform grid for the rest. */
220
- declare function MediaGrid<T>({ items, getId, orientationOf, renderItem, mode, frame, layout, shelf, grid, className, ...props }: MediaGridProps<T>): React.JSX.Element;
221
-
222
- interface VideoCardSkeletonProps extends React.ComponentProps<"div"> {
223
- /** `landscape` (16:9) or `portrait` (9:16), as the card it stands for. @default "landscape" */
224
- aspect?: VideoCardAspect;
225
- /** `stack` or `row`, as the card it stands for. @default "stack" */
226
- layout?: "stack" | "row";
227
- }
228
- /** The placeholder of a `VideoCard` (decorative: announce the wait on the list, with `MediaGridSkeleton`). */
229
- declare function VideoCardSkeleton({ aspect, layout, className, ...props }: VideoCardSkeletonProps): React.JSX.Element;
230
- interface MediaGridSkeletonProps extends Omit<React.ComponentProps<"div">, "children"> {
231
- /** What is loading, passed translated ("Loading videos"): announced once, the cards are hidden from assistive technology. */
232
- label: string;
233
- /** Cards in the grid. @default 8 */
234
- count?: number;
235
- /** Cards on the Shorts shelf above the grid (`split` mode); 0 for none. @default 0 */
236
- shelfCount?: number;
237
- /** `grid` or `list`. @default "grid" */
238
- layout?: "grid" | "list";
239
- /** The frame of the grid. @default "landscape" */
240
- frame?: VideoCardAspect;
241
- }
242
- /** The placeholder of a `MediaGrid`: the same shelf and grid, skeleton cards, one polite announcement. */
243
- declare function MediaGridSkeleton({ label, count, shelfCount, layout, frame, className, ...props }: MediaGridSkeletonProps): React.JSX.Element;
244
-
245
- export { LoadMore, MediaGrid, MediaGridSkeleton, SectionHint, ShortsShelf, VideoCard, VideoCardSkeleton };
246
- export type { LoadMoreProps, MediaGridProps, MediaGridSkeletonProps, MediaGridState, SectionHintProps, ShortsShelfProps, VideoCardAspect, VideoCardCreator, VideoCardProps, VideoCardSkeletonProps };