@livo-tv/blocks 1.1.0 → 1.2.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/README.md +23 -0
- package/dist/index.cjs +463 -128
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +80 -1
- package/dist/index.d.ts +80 -1
- package/dist/index.js +401 -70
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -455,6 +455,85 @@ interface CurtainStageProps {
|
|
|
455
455
|
*/
|
|
456
456
|
declare function CurtainStage({ kind, url, alt, className, reducedMotion, }: CurtainStageProps): React.JSX.Element;
|
|
457
457
|
|
|
458
|
+
type CurtainPreviewProps = {
|
|
459
|
+
kind: CurtainKind | string;
|
|
460
|
+
url: string | null;
|
|
461
|
+
alt?: string;
|
|
462
|
+
className?: string;
|
|
463
|
+
/**
|
|
464
|
+
* When true (default), video curtains loop only while the tile is on
|
|
465
|
+
* screen. Off-screen and `prefers-reduced-motion` tiles stay on a
|
|
466
|
+
* static first frame so a large grid does not play every loop at once.
|
|
467
|
+
*/
|
|
468
|
+
playWhenVisible?: boolean;
|
|
469
|
+
};
|
|
470
|
+
/**
|
|
471
|
+
* Thumbnail for a curtain asset: still image, or a muted looping video
|
|
472
|
+
* that plays only while visible (unless reduced motion is on).
|
|
473
|
+
*/
|
|
474
|
+
declare function CurtainPreview({ kind, url, alt, className, playWhenVisible, }: CurtainPreviewProps): React.JSX.Element;
|
|
475
|
+
|
|
476
|
+
type CurtainPickerOwnerType = "organization" | "platform" | string;
|
|
477
|
+
type CurtainPickerItem = {
|
|
478
|
+
id: string;
|
|
479
|
+
title: string;
|
|
480
|
+
kind: CurtainKind | string;
|
|
481
|
+
publicUrl: string | null;
|
|
482
|
+
ownerType?: CurtainPickerOwnerType;
|
|
483
|
+
/** Consumer-computed default (org setting or platform `isDefault`). */
|
|
484
|
+
isDefault?: boolean;
|
|
485
|
+
};
|
|
486
|
+
type CurtainPickerLabels = {
|
|
487
|
+
select?: string;
|
|
488
|
+
none?: string;
|
|
489
|
+
noneDescription?: string;
|
|
490
|
+
defaultBadge?: string;
|
|
491
|
+
makeDefault?: string;
|
|
492
|
+
delete?: string;
|
|
493
|
+
image?: string;
|
|
494
|
+
video?: string;
|
|
495
|
+
organization?: string;
|
|
496
|
+
platform?: string;
|
|
497
|
+
groupOrganization?: string;
|
|
498
|
+
groupPlatform?: string;
|
|
499
|
+
groupOther?: string;
|
|
500
|
+
emptyTitle?: string;
|
|
501
|
+
emptyDescription?: string;
|
|
502
|
+
};
|
|
503
|
+
declare const DEFAULT_CURTAIN_PICKER_LABELS: Required<CurtainPickerLabels>;
|
|
504
|
+
type CurtainPickerProps = {
|
|
505
|
+
curtains: CurtainPickerItem[];
|
|
506
|
+
/** Selected curtain id. `null` / `""` means the optional None tile. */
|
|
507
|
+
value?: string | null;
|
|
508
|
+
onChange?: (id: string | null) => void;
|
|
509
|
+
allowNone?: boolean;
|
|
510
|
+
disabled?: boolean;
|
|
511
|
+
/** `compact` is for dialogs (tighter grid). */
|
|
512
|
+
variant?: "default" | "compact";
|
|
513
|
+
/** Split the grid into organization / platform / other sections. */
|
|
514
|
+
groupByOwner?: boolean;
|
|
515
|
+
onMakeDefault?: (item: CurtainPickerItem) => void;
|
|
516
|
+
onDelete?: (item: CurtainPickerItem) => void;
|
|
517
|
+
canMakeDefault?: (item: CurtainPickerItem) => boolean;
|
|
518
|
+
canDelete?: (item: CurtainPickerItem) => boolean;
|
|
519
|
+
labels?: CurtainPickerLabels;
|
|
520
|
+
emptyAction?: React.ReactNode;
|
|
521
|
+
className?: string;
|
|
522
|
+
/** Disable action buttons while a mutation is in flight. */
|
|
523
|
+
actionsPending?: boolean;
|
|
524
|
+
};
|
|
525
|
+
declare function CurtainPickerSkeleton({ count, variant, className, }: {
|
|
526
|
+
count?: number;
|
|
527
|
+
variant?: "default" | "compact";
|
|
528
|
+
className?: string;
|
|
529
|
+
}): React.JSX.Element;
|
|
530
|
+
/**
|
|
531
|
+
* Presentational curtain catalog: visual image / looping-video tiles,
|
|
532
|
+
* optional selection (including None), and optional manage actions.
|
|
533
|
+
* Consumers fetch, upload, and confirm deletes themselves.
|
|
534
|
+
*/
|
|
535
|
+
declare function CurtainPicker({ curtains, value, onChange, allowNone, disabled, variant, groupByOwner, onMakeDefault, onDelete, canMakeDefault, canDelete, labels, emptyAction, className, actionsPending, }: CurtainPickerProps): React.JSX.Element;
|
|
536
|
+
|
|
458
537
|
interface WaitingRoomCurtain {
|
|
459
538
|
kind: CurtainKind;
|
|
460
539
|
url: string;
|
|
@@ -768,4 +847,4 @@ declare function useMediaQuery(query: string): boolean;
|
|
|
768
847
|
|
|
769
848
|
declare function cn(...inputs: ClassValue[]): string;
|
|
770
849
|
|
|
771
|
-
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type CurtainKind, CurtainStage, type CurtainStageProps, 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 };
|
|
850
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -455,6 +455,85 @@ interface CurtainStageProps {
|
|
|
455
455
|
*/
|
|
456
456
|
declare function CurtainStage({ kind, url, alt, className, reducedMotion, }: CurtainStageProps): React.JSX.Element;
|
|
457
457
|
|
|
458
|
+
type CurtainPreviewProps = {
|
|
459
|
+
kind: CurtainKind | string;
|
|
460
|
+
url: string | null;
|
|
461
|
+
alt?: string;
|
|
462
|
+
className?: string;
|
|
463
|
+
/**
|
|
464
|
+
* When true (default), video curtains loop only while the tile is on
|
|
465
|
+
* screen. Off-screen and `prefers-reduced-motion` tiles stay on a
|
|
466
|
+
* static first frame so a large grid does not play every loop at once.
|
|
467
|
+
*/
|
|
468
|
+
playWhenVisible?: boolean;
|
|
469
|
+
};
|
|
470
|
+
/**
|
|
471
|
+
* Thumbnail for a curtain asset: still image, or a muted looping video
|
|
472
|
+
* that plays only while visible (unless reduced motion is on).
|
|
473
|
+
*/
|
|
474
|
+
declare function CurtainPreview({ kind, url, alt, className, playWhenVisible, }: CurtainPreviewProps): React.JSX.Element;
|
|
475
|
+
|
|
476
|
+
type CurtainPickerOwnerType = "organization" | "platform" | string;
|
|
477
|
+
type CurtainPickerItem = {
|
|
478
|
+
id: string;
|
|
479
|
+
title: string;
|
|
480
|
+
kind: CurtainKind | string;
|
|
481
|
+
publicUrl: string | null;
|
|
482
|
+
ownerType?: CurtainPickerOwnerType;
|
|
483
|
+
/** Consumer-computed default (org setting or platform `isDefault`). */
|
|
484
|
+
isDefault?: boolean;
|
|
485
|
+
};
|
|
486
|
+
type CurtainPickerLabels = {
|
|
487
|
+
select?: string;
|
|
488
|
+
none?: string;
|
|
489
|
+
noneDescription?: string;
|
|
490
|
+
defaultBadge?: string;
|
|
491
|
+
makeDefault?: string;
|
|
492
|
+
delete?: string;
|
|
493
|
+
image?: string;
|
|
494
|
+
video?: string;
|
|
495
|
+
organization?: string;
|
|
496
|
+
platform?: string;
|
|
497
|
+
groupOrganization?: string;
|
|
498
|
+
groupPlatform?: string;
|
|
499
|
+
groupOther?: string;
|
|
500
|
+
emptyTitle?: string;
|
|
501
|
+
emptyDescription?: string;
|
|
502
|
+
};
|
|
503
|
+
declare const DEFAULT_CURTAIN_PICKER_LABELS: Required<CurtainPickerLabels>;
|
|
504
|
+
type CurtainPickerProps = {
|
|
505
|
+
curtains: CurtainPickerItem[];
|
|
506
|
+
/** Selected curtain id. `null` / `""` means the optional None tile. */
|
|
507
|
+
value?: string | null;
|
|
508
|
+
onChange?: (id: string | null) => void;
|
|
509
|
+
allowNone?: boolean;
|
|
510
|
+
disabled?: boolean;
|
|
511
|
+
/** `compact` is for dialogs (tighter grid). */
|
|
512
|
+
variant?: "default" | "compact";
|
|
513
|
+
/** Split the grid into organization / platform / other sections. */
|
|
514
|
+
groupByOwner?: boolean;
|
|
515
|
+
onMakeDefault?: (item: CurtainPickerItem) => void;
|
|
516
|
+
onDelete?: (item: CurtainPickerItem) => void;
|
|
517
|
+
canMakeDefault?: (item: CurtainPickerItem) => boolean;
|
|
518
|
+
canDelete?: (item: CurtainPickerItem) => boolean;
|
|
519
|
+
labels?: CurtainPickerLabels;
|
|
520
|
+
emptyAction?: React.ReactNode;
|
|
521
|
+
className?: string;
|
|
522
|
+
/** Disable action buttons while a mutation is in flight. */
|
|
523
|
+
actionsPending?: boolean;
|
|
524
|
+
};
|
|
525
|
+
declare function CurtainPickerSkeleton({ count, variant, className, }: {
|
|
526
|
+
count?: number;
|
|
527
|
+
variant?: "default" | "compact";
|
|
528
|
+
className?: string;
|
|
529
|
+
}): React.JSX.Element;
|
|
530
|
+
/**
|
|
531
|
+
* Presentational curtain catalog: visual image / looping-video tiles,
|
|
532
|
+
* optional selection (including None), and optional manage actions.
|
|
533
|
+
* Consumers fetch, upload, and confirm deletes themselves.
|
|
534
|
+
*/
|
|
535
|
+
declare function CurtainPicker({ curtains, value, onChange, allowNone, disabled, variant, groupByOwner, onMakeDefault, onDelete, canMakeDefault, canDelete, labels, emptyAction, className, actionsPending, }: CurtainPickerProps): React.JSX.Element;
|
|
536
|
+
|
|
458
537
|
interface WaitingRoomCurtain {
|
|
459
538
|
kind: CurtainKind;
|
|
460
539
|
url: string;
|
|
@@ -768,4 +847,4 @@ declare function useMediaQuery(query: string): boolean;
|
|
|
768
847
|
|
|
769
848
|
declare function cn(...inputs: ClassValue[]): string;
|
|
770
849
|
|
|
771
|
-
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type CurtainKind, CurtainStage, type CurtainStageProps, 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 };
|
|
850
|
+
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 };
|