@livo-tv/blocks 1.3.0 → 1.5.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.
- package/dist/index.cjs +840 -84
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +158 -4
- package/dist/index.d.ts +158 -4
- package/dist/index.js +830 -86
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -96,6 +96,33 @@ type ConfirmDestructiveDialogProps = {
|
|
|
96
96
|
*/
|
|
97
97
|
declare function ConfirmDestructiveDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, }: ConfirmDestructiveDialogProps): React.JSX.Element;
|
|
98
98
|
|
|
99
|
+
type NotificationBellItem = {
|
|
100
|
+
id: string;
|
|
101
|
+
title: string;
|
|
102
|
+
message: string;
|
|
103
|
+
read: boolean;
|
|
104
|
+
createdAt: string;
|
|
105
|
+
href?: string | null;
|
|
106
|
+
};
|
|
107
|
+
type NotificationBellLabels = {
|
|
108
|
+
title: string;
|
|
109
|
+
empty: string;
|
|
110
|
+
viewAll: string;
|
|
111
|
+
};
|
|
112
|
+
declare const DEFAULT_NOTIFICATION_BELL_LABELS: NotificationBellLabels;
|
|
113
|
+
type NotificationBellProps = {
|
|
114
|
+
items: NotificationBellItem[];
|
|
115
|
+
unreadCount: number;
|
|
116
|
+
isLoading?: boolean;
|
|
117
|
+
labels?: Partial<NotificationBellLabels>;
|
|
118
|
+
viewAllHref: string;
|
|
119
|
+
formatTime?: (iso: string) => string;
|
|
120
|
+
onOpenChange?: (open: boolean) => void;
|
|
121
|
+
align?: "start" | "end";
|
|
122
|
+
className?: string;
|
|
123
|
+
};
|
|
124
|
+
declare function NotificationBell({ items, unreadCount, isLoading, labels: labelOverrides, viewAllHref, formatTime, onOpenChange, align, className, }: NotificationBellProps): React.JSX.Element;
|
|
125
|
+
|
|
99
126
|
type EditableSectionMode = "reading" | "editing" | "saving";
|
|
100
127
|
type EditableSectionLabels = {
|
|
101
128
|
/** Visible Edit button label. Default: "Edit" */
|
|
@@ -440,6 +467,12 @@ interface AvatarEditorDialogProps {
|
|
|
440
467
|
declare function AvatarEditorDialog({ value, onChange, onSave, displaySize, editorSize, outputSize, placeholder, editLabel, dialogTitle, acceptText, cancelText, savingText, savedText, successMessage, errorMessage, className, editorLabels, }: AvatarEditorDialogProps): React.JSX.Element;
|
|
441
468
|
|
|
442
469
|
type CurtainKind = "image" | "video";
|
|
470
|
+
interface CurtainStageLabels {
|
|
471
|
+
play?: string;
|
|
472
|
+
tapToUnmute?: string;
|
|
473
|
+
mute?: string;
|
|
474
|
+
unmute?: string;
|
|
475
|
+
}
|
|
443
476
|
interface CurtainStageProps {
|
|
444
477
|
kind: CurtainKind;
|
|
445
478
|
url: string;
|
|
@@ -447,13 +480,20 @@ interface CurtainStageProps {
|
|
|
447
480
|
className?: string;
|
|
448
481
|
/** When true, video curtains show a static frame instead of looping. */
|
|
449
482
|
reducedMotion?: boolean;
|
|
483
|
+
/**
|
|
484
|
+
* Waiting-room only. Starts muted, then offers tap-to-unmute when the
|
|
485
|
+
* file has (or may have) an audio track. Picker tiles leave this off.
|
|
486
|
+
*/
|
|
487
|
+
allowSound?: boolean;
|
|
488
|
+
labels?: CurtainStageLabels;
|
|
450
489
|
}
|
|
451
490
|
/**
|
|
452
|
-
* Waiting-room backdrop: a still image or a
|
|
491
|
+
* Waiting-room backdrop: a still image or a looping video that starts muted.
|
|
453
492
|
* Honors `prefers-reduced-motion` (or an explicit `reducedMotion` prop)
|
|
454
|
-
* by freezing video on the first frame.
|
|
493
|
+
* by freezing video on the first frame. `allowSound` offers tap-to-unmute
|
|
494
|
+
* when the file has audio.
|
|
455
495
|
*/
|
|
456
|
-
declare function CurtainStage({ kind, url, alt, className, reducedMotion, }: CurtainStageProps): React.JSX.Element;
|
|
496
|
+
declare function CurtainStage({ kind, url, alt, className, reducedMotion, allowSound, labels, }: CurtainStageProps): React.JSX.Element;
|
|
457
497
|
|
|
458
498
|
type CurtainPreviewProps = {
|
|
459
499
|
kind: CurtainKind | string;
|
|
@@ -845,8 +885,122 @@ declare function createLiveHlsConfig(): Partial<HlsConfig>;
|
|
|
845
885
|
*/
|
|
846
886
|
declare function createVodHlsConfig(): Partial<HlsConfig>;
|
|
847
887
|
|
|
888
|
+
type MultipartUploadPart = {
|
|
889
|
+
partNumber: number;
|
|
890
|
+
etag: string;
|
|
891
|
+
};
|
|
892
|
+
type MultipartUploadAdapter = {
|
|
893
|
+
requestPartUrl: (partNumber: number) => Promise<string>;
|
|
894
|
+
complete: (parts: MultipartUploadPart[]) => Promise<void>;
|
|
895
|
+
abort?: () => Promise<void>;
|
|
896
|
+
};
|
|
897
|
+
type UploadProgress = {
|
|
898
|
+
loaded: number;
|
|
899
|
+
total: number;
|
|
900
|
+
percent: number;
|
|
901
|
+
};
|
|
902
|
+
type UploadControllerStatus = "idle" | "uploading" | "paused" | "completing" | "completed" | "cancelled" | "error";
|
|
903
|
+
type UploadJobStatus = Exclude<UploadControllerStatus, "idle">;
|
|
904
|
+
type UploadJob = {
|
|
905
|
+
id: string;
|
|
906
|
+
name: string;
|
|
907
|
+
status: UploadJobStatus;
|
|
908
|
+
loaded: number;
|
|
909
|
+
total: number;
|
|
910
|
+
percent: number;
|
|
911
|
+
error?: string;
|
|
912
|
+
};
|
|
913
|
+
type FileDropzoneLabels = {
|
|
914
|
+
idle: string;
|
|
915
|
+
hint: string;
|
|
916
|
+
browse: string;
|
|
917
|
+
rejectType: string;
|
|
918
|
+
rejectSize: string;
|
|
919
|
+
};
|
|
920
|
+
type FileUploadTrayLabels = {
|
|
921
|
+
title: string;
|
|
922
|
+
pause: string;
|
|
923
|
+
resume: string;
|
|
924
|
+
cancel: string;
|
|
925
|
+
uploading: string;
|
|
926
|
+
paused: string;
|
|
927
|
+
completing: string;
|
|
928
|
+
completed: string;
|
|
929
|
+
cancelled: string;
|
|
930
|
+
error: string;
|
|
931
|
+
};
|
|
932
|
+
declare const DEFAULT_FILE_DROPZONE_LABELS: FileDropzoneLabels;
|
|
933
|
+
declare const DEFAULT_FILE_UPLOAD_TRAY_LABELS: FileUploadTrayLabels;
|
|
934
|
+
declare const DEFAULT_FILE_UPLOAD_LABELS: {
|
|
935
|
+
dropzone: FileDropzoneLabels;
|
|
936
|
+
tray: FileUploadTrayLabels;
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
type FileDropzoneProps = {
|
|
940
|
+
accept?: string;
|
|
941
|
+
maxSize?: number;
|
|
942
|
+
disabled?: boolean;
|
|
943
|
+
labels?: Partial<FileDropzoneLabels>;
|
|
944
|
+
onFile: (file: File) => void;
|
|
945
|
+
onReject?: (reason: "type" | "size") => void;
|
|
946
|
+
className?: string;
|
|
947
|
+
};
|
|
948
|
+
declare function FileDropzone({ accept, maxSize, disabled, labels: labelOverrides, onFile, onReject, className, }: FileDropzoneProps): React.JSX.Element;
|
|
949
|
+
|
|
950
|
+
type FileUploadTrayProps = {
|
|
951
|
+
jobs: UploadJob[];
|
|
952
|
+
labels?: Partial<FileUploadTrayLabels>;
|
|
953
|
+
onPause: (id: string) => void;
|
|
954
|
+
onResume: (id: string) => void;
|
|
955
|
+
onCancel: (id: string) => void;
|
|
956
|
+
className?: string;
|
|
957
|
+
};
|
|
958
|
+
declare function FileUploadTray({ jobs, labels: labelOverrides, onPause, onResume, onCancel, className, }: FileUploadTrayProps): React.JSX.Element | null;
|
|
959
|
+
|
|
960
|
+
type FileUploadMenuProps = {
|
|
961
|
+
jobs: UploadJob[];
|
|
962
|
+
labels?: Partial<FileUploadTrayLabels>;
|
|
963
|
+
onPause: (id: string) => void;
|
|
964
|
+
onResume: (id: string) => void;
|
|
965
|
+
onCancel: (id: string) => void;
|
|
966
|
+
open?: boolean;
|
|
967
|
+
onOpenChange?: (open: boolean) => void;
|
|
968
|
+
align?: "start" | "end";
|
|
969
|
+
className?: string;
|
|
970
|
+
};
|
|
971
|
+
declare function FileUploadMenu({ jobs, labels: labelOverrides, onPause, onResume, onCancel, open, onOpenChange, align, className, }: FileUploadMenuProps): React.JSX.Element | null;
|
|
972
|
+
|
|
973
|
+
type CreateMultipartUploadControllerOptions = {
|
|
974
|
+
file: Blob;
|
|
975
|
+
partSize: number;
|
|
976
|
+
adapter: MultipartUploadAdapter;
|
|
977
|
+
onProgress?: (progress: UploadProgress) => void;
|
|
978
|
+
xhrFactory?: () => XMLHttpRequest;
|
|
979
|
+
};
|
|
980
|
+
type MultipartUploadController = {
|
|
981
|
+
start: () => Promise<void>;
|
|
982
|
+
pause: () => void;
|
|
983
|
+
resume: () => Promise<void>;
|
|
984
|
+
cancel: () => Promise<void>;
|
|
985
|
+
getStatus: () => UploadControllerStatus;
|
|
986
|
+
};
|
|
987
|
+
declare function createMultipartUploadController(options: CreateMultipartUploadControllerOptions): MultipartUploadController;
|
|
988
|
+
|
|
989
|
+
type PartRange = {
|
|
990
|
+
partNumber: number;
|
|
991
|
+
start: number;
|
|
992
|
+
end: number;
|
|
993
|
+
};
|
|
994
|
+
declare function partRanges(fileSize: number, partSize: number): PartRange[];
|
|
995
|
+
declare function progressFromBytes(loaded: number, total: number): {
|
|
996
|
+
loaded: number;
|
|
997
|
+
total: number;
|
|
998
|
+
percent: number;
|
|
999
|
+
};
|
|
1000
|
+
declare function fileMatchesAccept(file: File, accept?: string): boolean;
|
|
1001
|
+
|
|
848
1002
|
declare function useMediaQuery(query: string): boolean;
|
|
849
1003
|
|
|
850
1004
|
declare function cn(...inputs: ClassValue[]): string;
|
|
851
1005
|
|
|
852
|
-
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type CurtainKind, CurtainPicker, type CurtainPickerItem, type CurtainPickerLabels, type CurtainPickerOwnerType, type CurtainPickerProps, CurtainPickerSkeleton, CurtainPreview, type CurtainPreviewProps, CurtainStage, type CurtainStageProps, DEFAULT_CURTAIN_PICKER_LABELS, DEFAULT_EDITABLE_SECTION_LABELS, DataList, DataListItem, type DataListItemProps, type DataListProps, type DescribedPlaybackError, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, FeedVideoPlayer, type FeedVideoPlayerProps, FieldMessage, type FieldMessageProps, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type QualityLevel, SafeImage, type SafeImageProps, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseEditableSectionOptions, type UseEditableSectionResult, type UseFeedExclusivePlaybackResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, WaitingRoom, type WaitingRoomCurtain, type WaitingRoomProps, castHlsUrl, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, loadCastSender, shouldRetryLiveEdge404, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats };
|
|
1006
|
+
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type CreateMultipartUploadControllerOptions, type CurtainKind, CurtainPicker, type CurtainPickerItem, type CurtainPickerLabels, type CurtainPickerOwnerType, type CurtainPickerProps, CurtainPickerSkeleton, CurtainPreview, type CurtainPreviewProps, CurtainStage, type CurtainStageLabels, type CurtainStageProps, DEFAULT_CURTAIN_PICKER_LABELS, DEFAULT_EDITABLE_SECTION_LABELS, DEFAULT_FILE_DROPZONE_LABELS, DEFAULT_FILE_UPLOAD_LABELS, DEFAULT_FILE_UPLOAD_TRAY_LABELS, DEFAULT_NOTIFICATION_BELL_LABELS, DataList, DataListItem, type DataListItemProps, type DataListProps, type DescribedPlaybackError, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, FeedVideoPlayer, type FeedVideoPlayerProps, FieldMessage, type FieldMessageProps, FileDropzone, type FileDropzoneLabels, type FileDropzoneProps, FileUploadMenu, type FileUploadMenuProps, FileUploadTray, type FileUploadTrayLabels, type FileUploadTrayProps, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, type MultipartUploadAdapter, type MultipartUploadController, type MultipartUploadPart, NotificationBell, type NotificationBellItem, type NotificationBellLabels, type NotificationBellProps, type PartRange, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type QualityLevel, SafeImage, type SafeImageProps, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UploadControllerStatus, type UploadJob, type UploadJobStatus, type UploadProgress, type UseEditableSectionOptions, type UseEditableSectionResult, type UseFeedExclusivePlaybackResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, WaitingRoom, type WaitingRoomCurtain, type WaitingRoomProps, castHlsUrl, cn, createLiveHlsConfig, createMultipartUploadController, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, fileMatchesAccept, loadCastSender, partRanges, progressFromBytes, shouldRetryLiveEdge404, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats };
|
package/dist/index.d.ts
CHANGED
|
@@ -96,6 +96,33 @@ type ConfirmDestructiveDialogProps = {
|
|
|
96
96
|
*/
|
|
97
97
|
declare function ConfirmDestructiveDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, }: ConfirmDestructiveDialogProps): React.JSX.Element;
|
|
98
98
|
|
|
99
|
+
type NotificationBellItem = {
|
|
100
|
+
id: string;
|
|
101
|
+
title: string;
|
|
102
|
+
message: string;
|
|
103
|
+
read: boolean;
|
|
104
|
+
createdAt: string;
|
|
105
|
+
href?: string | null;
|
|
106
|
+
};
|
|
107
|
+
type NotificationBellLabels = {
|
|
108
|
+
title: string;
|
|
109
|
+
empty: string;
|
|
110
|
+
viewAll: string;
|
|
111
|
+
};
|
|
112
|
+
declare const DEFAULT_NOTIFICATION_BELL_LABELS: NotificationBellLabels;
|
|
113
|
+
type NotificationBellProps = {
|
|
114
|
+
items: NotificationBellItem[];
|
|
115
|
+
unreadCount: number;
|
|
116
|
+
isLoading?: boolean;
|
|
117
|
+
labels?: Partial<NotificationBellLabels>;
|
|
118
|
+
viewAllHref: string;
|
|
119
|
+
formatTime?: (iso: string) => string;
|
|
120
|
+
onOpenChange?: (open: boolean) => void;
|
|
121
|
+
align?: "start" | "end";
|
|
122
|
+
className?: string;
|
|
123
|
+
};
|
|
124
|
+
declare function NotificationBell({ items, unreadCount, isLoading, labels: labelOverrides, viewAllHref, formatTime, onOpenChange, align, className, }: NotificationBellProps): React.JSX.Element;
|
|
125
|
+
|
|
99
126
|
type EditableSectionMode = "reading" | "editing" | "saving";
|
|
100
127
|
type EditableSectionLabels = {
|
|
101
128
|
/** Visible Edit button label. Default: "Edit" */
|
|
@@ -440,6 +467,12 @@ interface AvatarEditorDialogProps {
|
|
|
440
467
|
declare function AvatarEditorDialog({ value, onChange, onSave, displaySize, editorSize, outputSize, placeholder, editLabel, dialogTitle, acceptText, cancelText, savingText, savedText, successMessage, errorMessage, className, editorLabels, }: AvatarEditorDialogProps): React.JSX.Element;
|
|
441
468
|
|
|
442
469
|
type CurtainKind = "image" | "video";
|
|
470
|
+
interface CurtainStageLabels {
|
|
471
|
+
play?: string;
|
|
472
|
+
tapToUnmute?: string;
|
|
473
|
+
mute?: string;
|
|
474
|
+
unmute?: string;
|
|
475
|
+
}
|
|
443
476
|
interface CurtainStageProps {
|
|
444
477
|
kind: CurtainKind;
|
|
445
478
|
url: string;
|
|
@@ -447,13 +480,20 @@ interface CurtainStageProps {
|
|
|
447
480
|
className?: string;
|
|
448
481
|
/** When true, video curtains show a static frame instead of looping. */
|
|
449
482
|
reducedMotion?: boolean;
|
|
483
|
+
/**
|
|
484
|
+
* Waiting-room only. Starts muted, then offers tap-to-unmute when the
|
|
485
|
+
* file has (or may have) an audio track. Picker tiles leave this off.
|
|
486
|
+
*/
|
|
487
|
+
allowSound?: boolean;
|
|
488
|
+
labels?: CurtainStageLabels;
|
|
450
489
|
}
|
|
451
490
|
/**
|
|
452
|
-
* Waiting-room backdrop: a still image or a
|
|
491
|
+
* Waiting-room backdrop: a still image or a looping video that starts muted.
|
|
453
492
|
* Honors `prefers-reduced-motion` (or an explicit `reducedMotion` prop)
|
|
454
|
-
* by freezing video on the first frame.
|
|
493
|
+
* by freezing video on the first frame. `allowSound` offers tap-to-unmute
|
|
494
|
+
* when the file has audio.
|
|
455
495
|
*/
|
|
456
|
-
declare function CurtainStage({ kind, url, alt, className, reducedMotion, }: CurtainStageProps): React.JSX.Element;
|
|
496
|
+
declare function CurtainStage({ kind, url, alt, className, reducedMotion, allowSound, labels, }: CurtainStageProps): React.JSX.Element;
|
|
457
497
|
|
|
458
498
|
type CurtainPreviewProps = {
|
|
459
499
|
kind: CurtainKind | string;
|
|
@@ -845,8 +885,122 @@ declare function createLiveHlsConfig(): Partial<HlsConfig>;
|
|
|
845
885
|
*/
|
|
846
886
|
declare function createVodHlsConfig(): Partial<HlsConfig>;
|
|
847
887
|
|
|
888
|
+
type MultipartUploadPart = {
|
|
889
|
+
partNumber: number;
|
|
890
|
+
etag: string;
|
|
891
|
+
};
|
|
892
|
+
type MultipartUploadAdapter = {
|
|
893
|
+
requestPartUrl: (partNumber: number) => Promise<string>;
|
|
894
|
+
complete: (parts: MultipartUploadPart[]) => Promise<void>;
|
|
895
|
+
abort?: () => Promise<void>;
|
|
896
|
+
};
|
|
897
|
+
type UploadProgress = {
|
|
898
|
+
loaded: number;
|
|
899
|
+
total: number;
|
|
900
|
+
percent: number;
|
|
901
|
+
};
|
|
902
|
+
type UploadControllerStatus = "idle" | "uploading" | "paused" | "completing" | "completed" | "cancelled" | "error";
|
|
903
|
+
type UploadJobStatus = Exclude<UploadControllerStatus, "idle">;
|
|
904
|
+
type UploadJob = {
|
|
905
|
+
id: string;
|
|
906
|
+
name: string;
|
|
907
|
+
status: UploadJobStatus;
|
|
908
|
+
loaded: number;
|
|
909
|
+
total: number;
|
|
910
|
+
percent: number;
|
|
911
|
+
error?: string;
|
|
912
|
+
};
|
|
913
|
+
type FileDropzoneLabels = {
|
|
914
|
+
idle: string;
|
|
915
|
+
hint: string;
|
|
916
|
+
browse: string;
|
|
917
|
+
rejectType: string;
|
|
918
|
+
rejectSize: string;
|
|
919
|
+
};
|
|
920
|
+
type FileUploadTrayLabels = {
|
|
921
|
+
title: string;
|
|
922
|
+
pause: string;
|
|
923
|
+
resume: string;
|
|
924
|
+
cancel: string;
|
|
925
|
+
uploading: string;
|
|
926
|
+
paused: string;
|
|
927
|
+
completing: string;
|
|
928
|
+
completed: string;
|
|
929
|
+
cancelled: string;
|
|
930
|
+
error: string;
|
|
931
|
+
};
|
|
932
|
+
declare const DEFAULT_FILE_DROPZONE_LABELS: FileDropzoneLabels;
|
|
933
|
+
declare const DEFAULT_FILE_UPLOAD_TRAY_LABELS: FileUploadTrayLabels;
|
|
934
|
+
declare const DEFAULT_FILE_UPLOAD_LABELS: {
|
|
935
|
+
dropzone: FileDropzoneLabels;
|
|
936
|
+
tray: FileUploadTrayLabels;
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
type FileDropzoneProps = {
|
|
940
|
+
accept?: string;
|
|
941
|
+
maxSize?: number;
|
|
942
|
+
disabled?: boolean;
|
|
943
|
+
labels?: Partial<FileDropzoneLabels>;
|
|
944
|
+
onFile: (file: File) => void;
|
|
945
|
+
onReject?: (reason: "type" | "size") => void;
|
|
946
|
+
className?: string;
|
|
947
|
+
};
|
|
948
|
+
declare function FileDropzone({ accept, maxSize, disabled, labels: labelOverrides, onFile, onReject, className, }: FileDropzoneProps): React.JSX.Element;
|
|
949
|
+
|
|
950
|
+
type FileUploadTrayProps = {
|
|
951
|
+
jobs: UploadJob[];
|
|
952
|
+
labels?: Partial<FileUploadTrayLabels>;
|
|
953
|
+
onPause: (id: string) => void;
|
|
954
|
+
onResume: (id: string) => void;
|
|
955
|
+
onCancel: (id: string) => void;
|
|
956
|
+
className?: string;
|
|
957
|
+
};
|
|
958
|
+
declare function FileUploadTray({ jobs, labels: labelOverrides, onPause, onResume, onCancel, className, }: FileUploadTrayProps): React.JSX.Element | null;
|
|
959
|
+
|
|
960
|
+
type FileUploadMenuProps = {
|
|
961
|
+
jobs: UploadJob[];
|
|
962
|
+
labels?: Partial<FileUploadTrayLabels>;
|
|
963
|
+
onPause: (id: string) => void;
|
|
964
|
+
onResume: (id: string) => void;
|
|
965
|
+
onCancel: (id: string) => void;
|
|
966
|
+
open?: boolean;
|
|
967
|
+
onOpenChange?: (open: boolean) => void;
|
|
968
|
+
align?: "start" | "end";
|
|
969
|
+
className?: string;
|
|
970
|
+
};
|
|
971
|
+
declare function FileUploadMenu({ jobs, labels: labelOverrides, onPause, onResume, onCancel, open, onOpenChange, align, className, }: FileUploadMenuProps): React.JSX.Element | null;
|
|
972
|
+
|
|
973
|
+
type CreateMultipartUploadControllerOptions = {
|
|
974
|
+
file: Blob;
|
|
975
|
+
partSize: number;
|
|
976
|
+
adapter: MultipartUploadAdapter;
|
|
977
|
+
onProgress?: (progress: UploadProgress) => void;
|
|
978
|
+
xhrFactory?: () => XMLHttpRequest;
|
|
979
|
+
};
|
|
980
|
+
type MultipartUploadController = {
|
|
981
|
+
start: () => Promise<void>;
|
|
982
|
+
pause: () => void;
|
|
983
|
+
resume: () => Promise<void>;
|
|
984
|
+
cancel: () => Promise<void>;
|
|
985
|
+
getStatus: () => UploadControllerStatus;
|
|
986
|
+
};
|
|
987
|
+
declare function createMultipartUploadController(options: CreateMultipartUploadControllerOptions): MultipartUploadController;
|
|
988
|
+
|
|
989
|
+
type PartRange = {
|
|
990
|
+
partNumber: number;
|
|
991
|
+
start: number;
|
|
992
|
+
end: number;
|
|
993
|
+
};
|
|
994
|
+
declare function partRanges(fileSize: number, partSize: number): PartRange[];
|
|
995
|
+
declare function progressFromBytes(loaded: number, total: number): {
|
|
996
|
+
loaded: number;
|
|
997
|
+
total: number;
|
|
998
|
+
percent: number;
|
|
999
|
+
};
|
|
1000
|
+
declare function fileMatchesAccept(file: File, accept?: string): boolean;
|
|
1001
|
+
|
|
848
1002
|
declare function useMediaQuery(query: string): boolean;
|
|
849
1003
|
|
|
850
1004
|
declare function cn(...inputs: ClassValue[]): string;
|
|
851
1005
|
|
|
852
|
-
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type CurtainKind, CurtainPicker, type CurtainPickerItem, type CurtainPickerLabels, type CurtainPickerOwnerType, type CurtainPickerProps, CurtainPickerSkeleton, CurtainPreview, type CurtainPreviewProps, CurtainStage, type CurtainStageProps, DEFAULT_CURTAIN_PICKER_LABELS, DEFAULT_EDITABLE_SECTION_LABELS, DataList, DataListItem, type DataListItemProps, type DataListProps, type DescribedPlaybackError, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, FeedVideoPlayer, type FeedVideoPlayerProps, FieldMessage, type FieldMessageProps, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type QualityLevel, SafeImage, type SafeImageProps, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseEditableSectionOptions, type UseEditableSectionResult, type UseFeedExclusivePlaybackResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, WaitingRoom, type WaitingRoomCurtain, type WaitingRoomProps, castHlsUrl, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, loadCastSender, shouldRetryLiveEdge404, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats };
|
|
1006
|
+
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type CreateMultipartUploadControllerOptions, type CurtainKind, CurtainPicker, type CurtainPickerItem, type CurtainPickerLabels, type CurtainPickerOwnerType, type CurtainPickerProps, CurtainPickerSkeleton, CurtainPreview, type CurtainPreviewProps, CurtainStage, type CurtainStageLabels, type CurtainStageProps, DEFAULT_CURTAIN_PICKER_LABELS, DEFAULT_EDITABLE_SECTION_LABELS, DEFAULT_FILE_DROPZONE_LABELS, DEFAULT_FILE_UPLOAD_LABELS, DEFAULT_FILE_UPLOAD_TRAY_LABELS, DEFAULT_NOTIFICATION_BELL_LABELS, DataList, DataListItem, type DataListItemProps, type DataListProps, type DescribedPlaybackError, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, FeedVideoPlayer, type FeedVideoPlayerProps, FieldMessage, type FieldMessageProps, FileDropzone, type FileDropzoneLabels, type FileDropzoneProps, FileUploadMenu, type FileUploadMenuProps, FileUploadTray, type FileUploadTrayLabels, type FileUploadTrayProps, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, type MultipartUploadAdapter, type MultipartUploadController, type MultipartUploadPart, NotificationBell, type NotificationBellItem, type NotificationBellLabels, type NotificationBellProps, type PartRange, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type QualityLevel, SafeImage, type SafeImageProps, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UploadControllerStatus, type UploadJob, type UploadJobStatus, type UploadProgress, type UseEditableSectionOptions, type UseEditableSectionResult, type UseFeedExclusivePlaybackResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, WaitingRoom, type WaitingRoomCurtain, type WaitingRoomProps, castHlsUrl, cn, createLiveHlsConfig, createMultipartUploadController, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, fileMatchesAccept, loadCastSender, partRanges, progressFromBytes, shouldRetryLiveEdge404, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats };
|