@livo-tv/blocks 1.1.0 → 1.3.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.d.cts CHANGED
@@ -455,6 +455,87 @@ 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
+ /** Force a static first frame even when the tile is visible. */
470
+ frozen?: boolean;
471
+ };
472
+ /**
473
+ * Thumbnail for a curtain asset: still image, or a muted looping video
474
+ * that plays only while visible (unless reduced motion is on).
475
+ */
476
+ declare function CurtainPreview({ kind, url, alt, className, playWhenVisible, frozen, }: CurtainPreviewProps): React.JSX.Element;
477
+
478
+ type CurtainPickerOwnerType = "organization" | "platform" | string;
479
+ type CurtainPickerItem = {
480
+ id: string;
481
+ title: string;
482
+ kind: CurtainKind | string;
483
+ publicUrl: string | null;
484
+ ownerType?: CurtainPickerOwnerType;
485
+ /** Consumer-computed default (org setting or platform `isDefault`). */
486
+ isDefault?: boolean;
487
+ };
488
+ type CurtainPickerLabels = {
489
+ select?: string;
490
+ none?: string;
491
+ noneDescription?: string;
492
+ defaultBadge?: string;
493
+ makeDefault?: string;
494
+ delete?: string;
495
+ image?: string;
496
+ video?: string;
497
+ organization?: string;
498
+ platform?: string;
499
+ groupOrganization?: string;
500
+ groupPlatform?: string;
501
+ groupOther?: string;
502
+ emptyTitle?: string;
503
+ emptyDescription?: string;
504
+ };
505
+ declare const DEFAULT_CURTAIN_PICKER_LABELS: Required<CurtainPickerLabels>;
506
+ type CurtainPickerProps = {
507
+ curtains: CurtainPickerItem[];
508
+ /** Selected curtain id. `null` / `""` means the optional None tile. */
509
+ value?: string | null;
510
+ onChange?: (id: string | null) => void;
511
+ allowNone?: boolean;
512
+ disabled?: boolean;
513
+ /** `compact` is a selected preview plus a dense thumbnail grid. */
514
+ variant?: "default" | "compact";
515
+ /** Split the grid into organization / platform / other sections. */
516
+ groupByOwner?: boolean;
517
+ onMakeDefault?: (item: CurtainPickerItem) => void;
518
+ onDelete?: (item: CurtainPickerItem) => void;
519
+ canMakeDefault?: (item: CurtainPickerItem) => boolean;
520
+ canDelete?: (item: CurtainPickerItem) => boolean;
521
+ labels?: CurtainPickerLabels;
522
+ emptyAction?: React.ReactNode;
523
+ className?: string;
524
+ /** Disable action buttons while a mutation is in flight. */
525
+ actionsPending?: boolean;
526
+ };
527
+ declare function CurtainPickerSkeleton({ count, variant, className, }: {
528
+ count?: number;
529
+ variant?: "default" | "compact";
530
+ className?: string;
531
+ }): React.JSX.Element;
532
+ /**
533
+ * Presentational curtain catalog: visual image / looping-video tiles,
534
+ * optional selection (including None), and optional manage actions.
535
+ * Consumers fetch, upload, and confirm deletes themselves.
536
+ */
537
+ declare function CurtainPicker({ curtains, value, onChange, allowNone, disabled, variant, groupByOwner, onMakeDefault, onDelete, canMakeDefault, canDelete, labels, emptyAction, className, actionsPending, }: CurtainPickerProps): React.JSX.Element;
538
+
458
539
  interface WaitingRoomCurtain {
459
540
  kind: CurtainKind;
460
541
  url: string;
@@ -768,4 +849,4 @@ declare function useMediaQuery(query: string): boolean;
768
849
 
769
850
  declare function cn(...inputs: ClassValue[]): string;
770
851
 
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 };
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 };
package/dist/index.d.ts CHANGED
@@ -455,6 +455,87 @@ 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
+ /** Force a static first frame even when the tile is visible. */
470
+ frozen?: boolean;
471
+ };
472
+ /**
473
+ * Thumbnail for a curtain asset: still image, or a muted looping video
474
+ * that plays only while visible (unless reduced motion is on).
475
+ */
476
+ declare function CurtainPreview({ kind, url, alt, className, playWhenVisible, frozen, }: CurtainPreviewProps): React.JSX.Element;
477
+
478
+ type CurtainPickerOwnerType = "organization" | "platform" | string;
479
+ type CurtainPickerItem = {
480
+ id: string;
481
+ title: string;
482
+ kind: CurtainKind | string;
483
+ publicUrl: string | null;
484
+ ownerType?: CurtainPickerOwnerType;
485
+ /** Consumer-computed default (org setting or platform `isDefault`). */
486
+ isDefault?: boolean;
487
+ };
488
+ type CurtainPickerLabels = {
489
+ select?: string;
490
+ none?: string;
491
+ noneDescription?: string;
492
+ defaultBadge?: string;
493
+ makeDefault?: string;
494
+ delete?: string;
495
+ image?: string;
496
+ video?: string;
497
+ organization?: string;
498
+ platform?: string;
499
+ groupOrganization?: string;
500
+ groupPlatform?: string;
501
+ groupOther?: string;
502
+ emptyTitle?: string;
503
+ emptyDescription?: string;
504
+ };
505
+ declare const DEFAULT_CURTAIN_PICKER_LABELS: Required<CurtainPickerLabels>;
506
+ type CurtainPickerProps = {
507
+ curtains: CurtainPickerItem[];
508
+ /** Selected curtain id. `null` / `""` means the optional None tile. */
509
+ value?: string | null;
510
+ onChange?: (id: string | null) => void;
511
+ allowNone?: boolean;
512
+ disabled?: boolean;
513
+ /** `compact` is a selected preview plus a dense thumbnail grid. */
514
+ variant?: "default" | "compact";
515
+ /** Split the grid into organization / platform / other sections. */
516
+ groupByOwner?: boolean;
517
+ onMakeDefault?: (item: CurtainPickerItem) => void;
518
+ onDelete?: (item: CurtainPickerItem) => void;
519
+ canMakeDefault?: (item: CurtainPickerItem) => boolean;
520
+ canDelete?: (item: CurtainPickerItem) => boolean;
521
+ labels?: CurtainPickerLabels;
522
+ emptyAction?: React.ReactNode;
523
+ className?: string;
524
+ /** Disable action buttons while a mutation is in flight. */
525
+ actionsPending?: boolean;
526
+ };
527
+ declare function CurtainPickerSkeleton({ count, variant, className, }: {
528
+ count?: number;
529
+ variant?: "default" | "compact";
530
+ className?: string;
531
+ }): React.JSX.Element;
532
+ /**
533
+ * Presentational curtain catalog: visual image / looping-video tiles,
534
+ * optional selection (including None), and optional manage actions.
535
+ * Consumers fetch, upload, and confirm deletes themselves.
536
+ */
537
+ declare function CurtainPicker({ curtains, value, onChange, allowNone, disabled, variant, groupByOwner, onMakeDefault, onDelete, canMakeDefault, canDelete, labels, emptyAction, className, actionsPending, }: CurtainPickerProps): React.JSX.Element;
538
+
458
539
  interface WaitingRoomCurtain {
459
540
  kind: CurtainKind;
460
541
  url: string;
@@ -768,4 +849,4 @@ declare function useMediaQuery(query: string): boolean;
768
849
 
769
850
  declare function cn(...inputs: ClassValue[]): string;
770
851
 
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 };
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 };