@stealthscale/component-media 0.1.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.
@@ -0,0 +1,700 @@
1
+ import { ComponentProps, ReactElement, ReactNode } from "react";
2
+ import * as avatar from "@zag-js/avatar";
3
+ import * as carousel from "@zag-js/carousel";
4
+ import { AutoplayStatusDetails, DragStatusDetails, ItemProps, PageChangeDetails, ProgressTextDetails, ProgressTextDetails as ProgressTextDetails$1, Props } from "@zag-js/carousel";
5
+ import { ButtonProps } from "@stealthscale/component-actions";
6
+ import * as imageCropper from "@zag-js/image-cropper";
7
+ import { CropChangeDetails, CropData, FlipChangeDetails, FlipState, GetCroppedImageOptions, HandlePosition, HandlePosition as HandlePosition$1, RotationChangeDetails, ZoomChangeDetails, handles } from "@zag-js/image-cropper";
8
+ //#region src/audio/audio.d.ts
9
+ /**
10
+ * Renders the `audio` element with the recipe's class.
11
+ */
12
+ declare const Drawn$13: import("@stealthscale/theme").StyledComponent<"audio", {}>;
13
+ /**
14
+ * Describes the props of `Audio`: the props of an `audio` element.
15
+ */
16
+ type AudioProps = ComponentProps<typeof Drawn$13>;
17
+ /**
18
+ * Renders the element with the browser's controls unless the caller turns them off.
19
+ *
20
+ * @param props - The props of an `audio` element.
21
+ * @returns The `audio` element.
22
+ */
23
+ export declare function Audio({ controls, ...rest }: AudioProps): ReactElement;
24
+ //#endregion
25
+ //#region src/avatar/badge.d.ts
26
+ /**
27
+ * Renders the badge `span` with the badge recipe's variants.
28
+ */
29
+ declare const Marked: import("@stealthscale/theme").StyledComponent<"span", {
30
+ readonly palette?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning";
31
+ readonly placement?: "bottom-end" | "bottom-start" | "top-end" | "top-start";
32
+ readonly variant?: "solid" | "subtle";
33
+ }>;
34
+ /**
35
+ * Describes the props of `Badge`: the label, the variants and the `span` props.
36
+ */
37
+ interface BadgeProps extends Omit<ComponentProps<typeof Marked>, "id"> {
38
+ /**
39
+ * Meaning of the badge in words, such as `Online`, `3 unread messages` or `On holiday`.
40
+ */
41
+ readonly label?: string | undefined;
42
+ }
43
+ /**
44
+ * Renders the badge, named by `label` and describing the avatar around it.
45
+ *
46
+ * @param props - The label, the variants and the `span` element's props.
47
+ * @returns The `span` element.
48
+ */
49
+ declare function Badge({ label, ...rest }: BadgeProps): ReactElement;
50
+ //#endregion
51
+ //#region src/avatar/fallback.d.ts
52
+ /**
53
+ * Renders the fallback `span`.
54
+ */
55
+ declare const Lettered: import("@stealthscale/theme").StyledComponent<"span", {}>;
56
+ /**
57
+ * Describes the props of `Fallback`.
58
+ */
59
+ type FallbackProps = ComponentProps<typeof Lettered>;
60
+ /**
61
+ * Renders the children, or the initials of the root's name.
62
+ *
63
+ * @param props - The `span` element's props.
64
+ * @returns The `span` element, hidden once the picture loads.
65
+ */
66
+ declare function Fallback({ children, ...rest }: FallbackProps): ReactElement;
67
+ //#endregion
68
+ //#region src/avatar/group.d.ts
69
+ /**
70
+ * Renders the group `span`.
71
+ */
72
+ declare const Grouped: import("@stealthscale/theme").StyledComponent<"span", {
73
+ readonly effect?: "glow" | "pulse";
74
+ readonly palette?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning";
75
+ readonly shape?: "circle" | "rounded" | "square";
76
+ readonly size?: "2xl" | "2xs" | "lg" | "md" | "sm" | "xl" | "xs";
77
+ readonly variant?: "outline" | "solid" | "subtle" | "surface";
78
+ }>;
79
+ /**
80
+ * Describes the props of `Group`: the variants its avatars default to and the `span` props.
81
+ */
82
+ type GroupProps = ComponentProps<typeof Grouped>;
83
+ /**
84
+ * Renders the row and provides its variants to the avatars in it.
85
+ *
86
+ * @param props - The variants and the `span` element's props.
87
+ * @returns The `span` element.
88
+ */
89
+ declare function Group({ palette, shape, size, variant, ...rest }: GroupProps): ReactElement;
90
+ //#endregion
91
+ //#region src/avatar/image.d.ts
92
+ /**
93
+ * Renders the picture `img`.
94
+ */
95
+ declare const Pictured: import("@stealthscale/theme").StyledComponent<"img", {}>;
96
+ /**
97
+ * Describes the props of `Image`.
98
+ */
99
+ type ImageProps$1 = ComponentProps<typeof Pictured>;
100
+ /**
101
+ * Renders the picture with the machine's load handlers merged under the caller's.
102
+ *
103
+ * @param props - The `img` element's props.
104
+ * @returns The `img` element, hidden until it loads.
105
+ */
106
+ declare function Image$1({ alt, ...rest }: ImageProps$1): ReactElement;
107
+ //#endregion
108
+ //#region src/avatar/machine.d.ts
109
+ /**
110
+ * Machine settings a caller passes to the root, `id` included, all optional.
111
+ */
112
+ type AvatarOptions = Partial<avatar.Props>;
113
+ //#endregion
114
+ //#region src/avatar/root.d.ts
115
+ /**
116
+ * Renders the root `span` and provides the variants to the image and the fallback.
117
+ */
118
+ declare const Boxed: import("@stealthscale/theme").StyledComponent<"span", {
119
+ readonly effect?: "glow" | "pulse";
120
+ readonly palette?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning";
121
+ readonly shape?: "circle" | "rounded" | "square";
122
+ readonly size?: "2xl" | "2xs" | "lg" | "md" | "sm" | "xl" | "xs";
123
+ readonly variant?: "outline" | "solid" | "subtle" | "surface";
124
+ }>;
125
+ /**
126
+ * Describes the props of `Root`: the machine settings, the name and the styled `span` props.
127
+ */
128
+ interface RootProps$2 extends AvatarOptions, Omit<ComponentProps<typeof Boxed>, "dir" | "id"> {
129
+ /**
130
+ * Name of the person or the thing: the initials in the fallback and the avatar's accessible
131
+ * name.
132
+ */
133
+ readonly name?: string | undefined;
134
+ }
135
+ /**
136
+ * Renders the box, named by `name` when one is passed.
137
+ *
138
+ * @param props - The machine settings, the name, the recipe's variants and the `span` props.
139
+ * @returns The `span` element, with the connected API in context.
140
+ */
141
+ declare function Root$2(props: RootProps$2): ReactElement;
142
+ declare namespace index_d_exports {
143
+ export { Badge, BadgeProps, Fallback, FallbackProps, Group, GroupProps, Image$1 as Image, ImageProps$1 as ImageProps, Root$2 as Root, RootProps$2 as RootProps };
144
+ }
145
+ //#endregion
146
+ //#region src/carousel/autoplay-indicator.d.ts
147
+ /**
148
+ * Describes the props of the glyph: one node per action.
149
+ */
150
+ interface AutoplayIndicatorProps {
151
+ /**
152
+ * Glyph shown while the carousel rotates, the action a press takes.
153
+ */
154
+ readonly pause: ReactNode;
155
+ /**
156
+ * Glyph shown while the carousel does not rotate.
157
+ */
158
+ readonly play: ReactNode;
159
+ }
160
+ /**
161
+ * Renders the glyph of the rotation control's next action.
162
+ *
163
+ * @param props - The glyph of each action.
164
+ * @returns The glyph for the rotation's state.
165
+ */
166
+ declare function AutoplayIndicator({ pause, play }: AutoplayIndicatorProps): ReactNode;
167
+ //#endregion
168
+ //#region src/carousel/autoplay-trigger.d.ts
169
+ /**
170
+ * Describes the props of the rotation control: the names of its two actions and the props of a
171
+ * `Button`.
172
+ */
173
+ interface AutoplayTriggerProps extends ButtonProps {
174
+ /**
175
+ * Name of the control while the carousel does not rotate, "Start slide rotation" unless the
176
+ * caller passes another.
177
+ */
178
+ readonly startLabel?: string | undefined;
179
+ /**
180
+ * Name of the control while the carousel rotates, "Stop slide rotation" unless the caller passes
181
+ * another.
182
+ */
183
+ readonly stopLabel?: string | undefined;
184
+ }
185
+ /**
186
+ * Renders the rotation control with the machine's props merged under the caller's.
187
+ *
188
+ * @param props - The names of the two actions and the props of a `Button`.
189
+ * @returns The `button` element.
190
+ */
191
+ declare function AutoplayTrigger({ startLabel, stopLabel, ...rest }: AutoplayTriggerProps): ReactElement;
192
+ //#endregion
193
+ //#region src/carousel/control.d.ts
194
+ /**
195
+ * Renders the `div` with the carousel's control class.
196
+ */
197
+ declare const Drawn$12: import("@stealthscale/theme").StyledComponent<"div", {}>;
198
+ /**
199
+ * Describes the props of the control row: the props of a `div`.
200
+ */
201
+ type ControlProps = ComponentProps<typeof Drawn$12>;
202
+ /**
203
+ * Renders the control row with the machine's props merged under the caller's.
204
+ *
205
+ * @param props - The props of a `div`, the controls among its children.
206
+ * @returns The `div` element.
207
+ */
208
+ declare function Control(props: ControlProps): ReactElement;
209
+ //#endregion
210
+ //#region src/carousel/indicator-group.d.ts
211
+ /**
212
+ * Renders the `div` with the carousel's dot group class.
213
+ */
214
+ declare const Drawn$11: import("@stealthscale/theme").StyledComponent<"div", {}>;
215
+ /**
216
+ * Describes the props of the dot group: the props of a `div`, the dots among its children.
217
+ */
218
+ type IndicatorGroupProps = ComponentProps<typeof Drawn$11>;
219
+ /**
220
+ * Renders the dot group with the machine's props merged under the caller's.
221
+ *
222
+ * @param props - The props of a `div`, the dots among its children.
223
+ * @returns The `div` element.
224
+ */
225
+ declare function IndicatorGroup(props: IndicatorGroupProps): ReactElement;
226
+ //#endregion
227
+ //#region src/carousel/indicator.d.ts
228
+ /**
229
+ * Renders the `button` with the carousel's dot class.
230
+ */
231
+ declare const Drawn$10: import("@stealthscale/theme").StyledComponent<"button", {}>;
232
+ /**
233
+ * Describes the props of a dot: its page, its name, whether it only shows the page, and the props
234
+ * of a `button`.
235
+ */
236
+ interface IndicatorProps extends ComponentProps<typeof Drawn$10> {
237
+ /**
238
+ * Index of the page the dot moves to, from zero.
239
+ */
240
+ readonly index: number;
241
+ /**
242
+ * Accessible name of the dot, "Go to slide N" unless the caller passes another.
243
+ */
244
+ readonly label?: string | undefined;
245
+ /**
246
+ * Whether the dot only shows its page and a press does nothing.
247
+ */
248
+ readonly readOnly?: boolean | undefined;
249
+ }
250
+ /**
251
+ * Renders the dot with the machine's props merged under the caller's.
252
+ *
253
+ * @param props - The page, the name, the read-only flag and the props of a `button`.
254
+ * @returns The `button` element.
255
+ */
256
+ declare function Indicator({ index, label, readOnly, ...rest }: IndicatorProps): ReactElement;
257
+ //#endregion
258
+ //#region src/carousel/indicators.d.ts
259
+ /**
260
+ * Describes the props of the dots: the words that name a dot.
261
+ */
262
+ interface IndicatorsProps {
263
+ /**
264
+ * Returns the accessible name of a dot from its page, counted from one. "Go to slide N" unless
265
+ * the caller passes another function.
266
+ */
267
+ readonly label?: ((page: number) => string) | undefined;
268
+ }
269
+ /**
270
+ * Renders the dots.
271
+ *
272
+ * @param props - The function that returns a dot's accessible name.
273
+ * @returns A dot per page, in order.
274
+ */
275
+ declare function Indicators({ label }: IndicatorsProps): ReactElement;
276
+ //#endregion
277
+ //#region src/carousel/item-group.d.ts
278
+ /**
279
+ * Renders the `div` with the carousel's scroller class.
280
+ */
281
+ declare const Drawn$9: import("@stealthscale/theme").StyledComponent<"div", {}>;
282
+ /**
283
+ * Describes the props of the scroller: the props of a `div`, the slides among its children.
284
+ */
285
+ type ItemGroupProps = ComponentProps<typeof Drawn$9>;
286
+ /**
287
+ * Renders the scroller with the machine's props merged under the caller's.
288
+ *
289
+ * @param props - The props of a `div`, the slides among its children.
290
+ * @returns The `div` element.
291
+ */
292
+ declare function ItemGroup(props: ItemGroupProps): ReactElement;
293
+ //#endregion
294
+ //#region src/carousel/item.d.ts
295
+ /**
296
+ * Renders the `div` with the carousel's slide class.
297
+ */
298
+ declare const Drawn$8: import("@stealthscale/theme").StyledComponent<"div", {}>;
299
+ /**
300
+ * Describes the props of a slide: its index, where it snaps, and the props of a `div`.
301
+ */
302
+ interface ItemProps$1 extends ComponentProps<typeof Drawn$8> {
303
+ /**
304
+ * Position of the slide among the slides, from zero.
305
+ */
306
+ readonly index: number;
307
+ /**
308
+ * Edge of the slide the scroller snaps to, `start` unless the caller passes another.
309
+ */
310
+ readonly snapAlign?: ItemProps["snapAlign"];
311
+ }
312
+ /**
313
+ * Renders the slide with the machine's props merged under the caller's.
314
+ *
315
+ * @param props - The index, the snap edge and the props of a `div`.
316
+ * @returns The `div` element.
317
+ */
318
+ declare function Item({ index, snapAlign, ...props }: ItemProps$1): ReactElement;
319
+ //#endregion
320
+ //#region src/carousel/next-trigger.d.ts
321
+ /**
322
+ * Describes the props of the next trigger: its accessible name and the props of a `Button`.
323
+ */
324
+ interface NextTriggerProps extends ButtonProps {
325
+ /**
326
+ * Accessible name of the trigger, "Next slide" unless the caller passes another.
327
+ */
328
+ readonly label?: string | undefined;
329
+ }
330
+ /**
331
+ * Renders the next trigger with the machine's props merged under the caller's.
332
+ *
333
+ * @param props - The trigger's name and the props of a `Button`.
334
+ * @returns The `button` element.
335
+ */
336
+ declare function NextTrigger({ label, ...rest }: NextTriggerProps): ReactElement;
337
+ //#endregion
338
+ //#region src/carousel/prev-trigger.d.ts
339
+ /**
340
+ * Describes the props of the previous trigger: its accessible name and the props of a `Button`.
341
+ */
342
+ interface PrevTriggerProps extends ButtonProps {
343
+ /**
344
+ * Accessible name of the trigger, "Previous slide" unless the caller passes another.
345
+ */
346
+ readonly label?: string | undefined;
347
+ }
348
+ /**
349
+ * Renders the previous trigger with the machine's props merged under the caller's.
350
+ *
351
+ * @param props - The trigger's name and the props of a `Button`.
352
+ * @returns The `button` element.
353
+ */
354
+ declare function PrevTrigger({ label, ...rest }: PrevTriggerProps): ReactElement;
355
+ //#endregion
356
+ //#region src/carousel/progress-text.d.ts
357
+ /**
358
+ * Renders the `span` with the carousel's progress text class.
359
+ */
360
+ declare const Drawn$7: import("@stealthscale/theme").StyledComponent<"span", {}>;
361
+ /**
362
+ * Describes the props of the progress text: its words and the props of a `span` without children.
363
+ */
364
+ interface ProgressTextProps extends Omit<ComponentProps<typeof Drawn$7>, "children"> {
365
+ /**
366
+ * Returns the text from the current page and the number of pages, both counted from one.
367
+ */
368
+ readonly text?: ((details: ProgressTextDetails) => string) | undefined;
369
+ }
370
+ /**
371
+ * Renders the progress text.
372
+ *
373
+ * @param props - The words and the props of a `span`.
374
+ * @returns The `span` element.
375
+ */
376
+ declare function ProgressText({ text, ...rest }: ProgressTextProps): ReactElement;
377
+ //#endregion
378
+ //#region src/carousel/machine.d.ts
379
+ /**
380
+ * Describes the machine settings the root passes to the machine.
381
+ *
382
+ * @remarks
383
+ * `translations` is left out, because a component's words are props: each trigger, dot and slide
384
+ * takes its own label. The root's props require `slideCount`.
385
+ */
386
+ type CarouselOptions = Omit<Partial<carousel.Props>, "translations">;
387
+ //#endregion
388
+ //#region src/carousel/root.d.ts
389
+ /**
390
+ * Renders the `div` that provides the recipe's variants.
391
+ */
392
+ declare const Framed$1: import("@stealthscale/theme").StyledComponent<"div", {
393
+ readonly controls?: "outside" | "overlay";
394
+ readonly palette?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning";
395
+ readonly radius?: "l1" | "l2" | "l3";
396
+ readonly ratio?: import("@stealthscale/theme/authoring").Ratio;
397
+ }>;
398
+ /**
399
+ * Describes the props of the root: the machine's options with the number of slides, the recipe's
400
+ * variants and the props of a `div`.
401
+ *
402
+ * @remarks
403
+ * The element's `dir`, `id`, `padding` and `page` are left out, because the machine takes all
404
+ * four. `padding` and `page` are otherwise the CSS properties of those names.
405
+ */
406
+ type RootProps$1 = CarouselOptions & Omit<ComponentProps<typeof Framed$1>, "dir" | "id" | "padding" | "page"> & Pick<Props, "slideCount">;
407
+ /**
408
+ * Renders the root and provides the running machine, the rotation and the motion setting to the
409
+ * parts.
410
+ *
411
+ * @param props - The machine's options, the recipe's variants and the props of a `div`.
412
+ * @returns The `div` element inside the provider.
413
+ */
414
+ declare function Root$1({ autoplay, controls, loop, spacing, ...props }: RootProps$1): ReactElement;
415
+ declare namespace index_d_exports$1 {
416
+ export { AutoplayIndicator, AutoplayIndicatorProps, AutoplayStatusDetails, AutoplayTrigger, AutoplayTriggerProps, Control, ControlProps, DragStatusDetails, Indicator, IndicatorGroup, IndicatorGroupProps, IndicatorProps, Indicators, IndicatorsProps, Item, ItemGroup, ItemGroupProps, ItemProps$1 as ItemProps, NextTrigger, NextTriggerProps, PageChangeDetails, PrevTrigger, PrevTriggerProps, ProgressText, ProgressTextDetails$1 as ProgressTextDetails, ProgressTextProps, Root$1 as Root, RootProps$1 as RootProps };
417
+ }
418
+ //#endregion
419
+ //#region src/iframe/iframe.d.ts
420
+ /**
421
+ * Renders the `iframe` element with the recipe's class.
422
+ */
423
+ declare const Drawn$6: import("@stealthscale/theme").StyledComponent<"iframe", {
424
+ readonly radius?: "l1" | "l2" | "l3";
425
+ readonly ratio?: import("@stealthscale/theme/authoring").Ratio;
426
+ }>;
427
+ /**
428
+ * Describes the props of `Iframe`: the props of an `iframe` element, with `title` required.
429
+ */
430
+ interface IframeProps extends Omit<ComponentProps<typeof Drawn$6>, "title"> {
431
+ /**
432
+ * Accessible name of the frame: what it shows, such as "Preview of the March invoice email", for
433
+ * a reader who cannot see it.
434
+ */
435
+ readonly title: string;
436
+ }
437
+ /**
438
+ * Renders the frame with the sandbox, the referrer policy and the lazy loading it defaults to.
439
+ *
440
+ * @param props - The props of an `iframe` element, with `title` required.
441
+ * @returns The `iframe` element.
442
+ */
443
+ export declare function Iframe({ loading, referrerPolicy, sandbox, ...rest }: IframeProps): ReactElement;
444
+ //#endregion
445
+ //#region src/image-cropper/grid.d.ts
446
+ /**
447
+ * Renders the `div` with the image cropper's grid class.
448
+ */
449
+ declare const Drawn$5: import("@stealthscale/theme").StyledComponent<"div", {}>;
450
+ /**
451
+ * Describes the props of the grid: its axis and the props of a `div`.
452
+ */
453
+ interface GridProps extends ComponentProps<typeof Drawn$5> {
454
+ /**
455
+ * Axis the two lines run along.
456
+ */
457
+ readonly axis: "horizontal" | "vertical";
458
+ }
459
+ /**
460
+ * Renders the grid with the machine's grid props merged over the caller's.
461
+ *
462
+ * @param props - The axis and the props of a `div`.
463
+ * @returns The `div` element.
464
+ */
465
+ declare function Grid({ axis, ...props }: GridProps): ReactElement;
466
+ //#endregion
467
+ //#region src/image-cropper/handle.d.ts
468
+ /**
469
+ * Renders the `div` with the image cropper's handle class.
470
+ */
471
+ declare const Drawn$4: import("@stealthscale/theme").StyledComponent<"div", {}>;
472
+ /**
473
+ * Describes the props of a handle: its position and the props of a `div`.
474
+ */
475
+ interface HandleProps extends Omit<ComponentProps<typeof Drawn$4>, "position"> {
476
+ /**
477
+ * Edge or corner of the selection the handle resizes, as a compass point.
478
+ */
479
+ readonly position: HandlePosition;
480
+ }
481
+ /**
482
+ * Renders the handle with the machine's handle props merged over the caller's.
483
+ *
484
+ * @param props - The position and the props of a `div`.
485
+ * @returns The `div` element.
486
+ */
487
+ declare function Handle({ position, ...props }: HandleProps): ReactElement;
488
+ //#endregion
489
+ //#region src/image-cropper/image.d.ts
490
+ /**
491
+ * Renders the `img` with the image cropper's image class.
492
+ */
493
+ declare const Drawn$3: import("@stealthscale/theme").StyledComponent<"img", {}>;
494
+ /**
495
+ * Describes the props of the picture: the props of an `img`.
496
+ */
497
+ type ImageProps = ComponentProps<typeof Drawn$3>;
498
+ /**
499
+ * Renders the picture with the machine's image props merged over the caller's.
500
+ *
501
+ * @param props - The props of an `img`, the source among them.
502
+ * @returns The `img` element.
503
+ */
504
+ declare function Image(props: ImageProps): ReactElement;
505
+ //#endregion
506
+ //#region src/image-cropper/machine.d.ts
507
+ /**
508
+ * Describes the api `useImageCropper` returns: the crop, the transforms, their setters, the export
509
+ * and a prop getter per part.
510
+ *
511
+ * @remarks
512
+ * The type is the return type of `connect`, so it follows the installed machine version. That
513
+ * type references `@zag-js/types`, so the package declares that package as a dependency.
514
+ */
515
+ type ImageCropperApi = ReturnType<typeof imageCropper.connect>;
516
+ /**
517
+ * Describes the machine settings a caller passes to `useImageCropper`, all optional.
518
+ */
519
+ type ImageCropperOptions = Omit<Partial<imageCropper.Props>, "translations">;
520
+ /**
521
+ * Starts the image cropper machine and returns its connected api.
522
+ *
523
+ * @param options - The machine settings. A generated id is used when `id` is absent.
524
+ * @returns The api the root provides to its parts.
525
+ */
526
+ declare function useImageCropper(options?: ImageCropperOptions): ImageCropperApi;
527
+ //#endregion
528
+ //#region src/image-cropper/rounded.d.ts
529
+ /**
530
+ * Rounds the crop the machine reports to whole pixels, as the words a screen reader hears use it.
531
+ */
532
+ /**
533
+ * Describes a crop in the viewport's pixels.
534
+ */
535
+ interface Crop {
536
+ /**
537
+ * Height of the crop.
538
+ */
539
+ readonly height: number;
540
+ /**
541
+ * Width of the crop.
542
+ */
543
+ readonly width: number;
544
+ /**
545
+ * Distance of the crop from the viewport's left edge.
546
+ */
547
+ readonly x: number;
548
+ /**
549
+ * Distance of the crop from the viewport's top edge.
550
+ */
551
+ readonly y: number;
552
+ }
553
+ //#endregion
554
+ //#region src/image-cropper/root.d.ts
555
+ /**
556
+ * Renders the `div` that provides the recipe's variants.
557
+ */
558
+ declare const Framed: import("@stealthscale/theme").StyledComponent<"div", {
559
+ readonly radius?: "l1" | "l2" | "l3";
560
+ }>;
561
+ /**
562
+ * Describes what `description` receives: the crop in whole pixels, the zoom and the rotation.
563
+ */
564
+ interface DescriptionDetails {
565
+ /**
566
+ * The crop in the viewport's pixels.
567
+ */
568
+ readonly crop: Crop;
569
+ /**
570
+ * Rotation of the picture in degrees.
571
+ */
572
+ readonly rotation: number;
573
+ /**
574
+ * Zoom factor of the picture.
575
+ */
576
+ readonly zoom: number;
577
+ }
578
+ /**
579
+ * Describes the props of the root: the api, the description's words, the recipe's variants and
580
+ * the props of a `div`.
581
+ */
582
+ interface RootProps extends ComponentProps<typeof Framed> {
583
+ /**
584
+ * Api `useImageCropper` returns.
585
+ */
586
+ readonly cropper: ImageCropperApi;
587
+ /**
588
+ * Returns the description a screen reader hears once the picture has loaded. Defaults to the
589
+ * machine's English.
590
+ */
591
+ readonly description?: ((details: DescriptionDetails) => string) | undefined;
592
+ /**
593
+ * Description a screen reader hears while the picture loads. Defaults to the machine's English.
594
+ */
595
+ readonly loadingDescription?: string | undefined;
596
+ }
597
+ /**
598
+ * Renders the root with the machine's root props, and provides the api to the parts.
599
+ *
600
+ * @param props - The api, the description's words, the recipe's variants and the props of a
601
+ * `div`.
602
+ * @returns The `div` element inside the api provider.
603
+ */
604
+ declare function Root({ cropper, description, loadingDescription, ...props }: RootProps): ReactElement;
605
+ //#endregion
606
+ //#region src/image-cropper/selection.d.ts
607
+ /**
608
+ * Renders the `div` with the image cropper's selection class.
609
+ */
610
+ declare const Drawn$2: import("@stealthscale/theme").StyledComponent<"div", {}>;
611
+ /**
612
+ * Describes the props of the selection: the value text's words and the props of a `div`.
613
+ */
614
+ interface SelectionProps extends ComponentProps<typeof Drawn$2> {
615
+ /**
616
+ * Returns the value text a screen reader hears from the crop in whole pixels. Defaults to the
617
+ * machine's English.
618
+ */
619
+ readonly valueText?: ((crop: Crop) => string) | undefined;
620
+ }
621
+ /**
622
+ * Renders the selection with the machine's selection props, the value text and the caller's props.
623
+ *
624
+ * @param props - The value text's words and the props of a `div`, the handles and grid among its
625
+ * children.
626
+ * @returns The `div` element.
627
+ */
628
+ declare function Selection({ valueText, ...props }: SelectionProps): ReactElement;
629
+ //#endregion
630
+ //#region src/image-cropper/viewport.d.ts
631
+ /**
632
+ * Renders the `div` with the image cropper's viewport class.
633
+ */
634
+ declare const Drawn$1: import("@stealthscale/theme").StyledComponent<"div", {}>;
635
+ /**
636
+ * Describes the props of the viewport: the props of a `div`.
637
+ */
638
+ type ViewportProps = ComponentProps<typeof Drawn$1>;
639
+ /**
640
+ * Renders the viewport with the machine's viewport props merged over the caller's.
641
+ *
642
+ * @param props - The props of a `div`.
643
+ * @returns The `div` element.
644
+ */
645
+ declare function Viewport(props: ViewportProps): ReactElement;
646
+ declare namespace index_d_exports$2 {
647
+ export { Crop, CropChangeDetails, CropData, DescriptionDetails, FlipChangeDetails, FlipState, GetCroppedImageOptions, Grid, GridProps, Handle, HandlePosition$1 as HandlePosition, HandleProps, Image, ImageCropperApi, ImageCropperOptions, ImageProps, Root, RootProps, RotationChangeDetails, Selection, SelectionProps, Viewport, ViewportProps, ZoomChangeDetails, handles, useImageCropper };
648
+ }
649
+ //#endregion
650
+ //#region src/video/context.d.ts
651
+ /**
652
+ * Binds the video recipe to React.
653
+ *
654
+ * @remarks
655
+ * The binding is a separate module from the recipe, because the theme compiler imports the recipe
656
+ * at build time and must not load the React runtime.
657
+ */
658
+ /**
659
+ * Creates the video recipe's `withContext` binding and its `PropsProvider`.
660
+ *
661
+ * @remarks
662
+ * `PropsProvider` sets variants on every video below it. The package exports it as
663
+ * `VideoPropsProvider`.
664
+ */
665
+ declare const PropsProvider: import("react").Provider<import("@stealthscale/theme").DataAttrs & Partial<{
666
+ readonly fit?: "contain" | "cover";
667
+ readonly radius?: import("@stealthscale/theme/authoring").Corner;
668
+ readonly ratio?: import("@stealthscale/theme/authoring").Ratio;
669
+ }>>, withContext: <Tag extends import("react").ElementType>(Component: Tag, options?: import("@stealthscale/theme").JsxFactoryOptions<import("@stealthscale/theme").ComponentProps<Tag> & Partial<{
670
+ readonly fit?: "contain" | "cover";
671
+ readonly radius?: import("@stealthscale/theme/authoring").Corner;
672
+ readonly ratio?: import("@stealthscale/theme/authoring").Ratio;
673
+ }>> | undefined) => import("@stealthscale/theme").StyledComponent<Tag, {
674
+ readonly fit?: "contain" | "cover";
675
+ readonly radius?: import("@stealthscale/theme/authoring").Corner;
676
+ readonly ratio?: import("@stealthscale/theme/authoring").Ratio;
677
+ }>;
678
+ //#endregion
679
+ //#region src/video/video.d.ts
680
+ /**
681
+ * Renders a `video` element with the classes of the video recipe.
682
+ */
683
+ declare const Drawn: import("@stealthscale/theme").StyledComponent<"video", {
684
+ readonly fit?: "contain" | "cover";
685
+ readonly radius?: import("@stealthscale/theme/authoring").Corner;
686
+ readonly ratio?: import("@stealthscale/theme/authoring").Ratio;
687
+ }>;
688
+ /**
689
+ * Describes the props of Video: the recipe's variants and the props of a `video` element.
690
+ */
691
+ type VideoProps = ComponentProps<typeof Drawn>;
692
+ /**
693
+ * Renders the video, starting it by itself only while the reader allows motion.
694
+ *
695
+ * @param props - The recipe's variants and the props of a `video` element.
696
+ * @returns The `video` element.
697
+ */
698
+ export declare function Video({ autoPlay, controls, muted, playsInline, ...rest }: VideoProps): ReactElement;
699
+ //#endregion
700
+ export { type AudioProps, index_d_exports as Avatar, index_d_exports$1 as Carousel, type IframeProps, index_d_exports$2 as ImageCropper, type VideoProps, PropsProvider as VideoPropsProvider };