@sesionario/blocks 1.23.0 → 1.24.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 +509 -204
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +114 -2
- package/dist/index.d.ts +114 -2
- package/dist/index.js +501 -205
- package/dist/index.js.map +1 -1
- package/dist/pdf.cjs +1045 -0
- package/dist/pdf.cjs.map +1 -0
- package/dist/pdf.d.cts +68 -0
- package/dist/pdf.d.ts +68 -0
- package/dist/pdf.js +1021 -0
- package/dist/pdf.js.map +1 -0
- package/package.json +21 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { FormEvent, KeyboardEvent, RefObject, CSSProperties, ReactNode, ComponentProps, Dispatch, SetStateAction, SVGProps } from 'react';
|
|
2
|
+
import { FormEvent, KeyboardEvent, RefObject, CSSProperties, ReactNode, ComponentProps, PointerEvent, Dispatch, SetStateAction, SVGProps } from 'react';
|
|
3
3
|
import { LucideIcon } from 'lucide-react';
|
|
4
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -289,6 +289,70 @@ type ImageLightboxProps = {
|
|
|
289
289
|
*/
|
|
290
290
|
declare function ImageLightbox({ images, index, onIndexChange, onClose, labels, }: ImageLightboxProps): React.ReactPortal;
|
|
291
291
|
|
|
292
|
+
type MediaCarouselItem = {
|
|
293
|
+
kind: "image";
|
|
294
|
+
src: string;
|
|
295
|
+
alt?: string;
|
|
296
|
+
} | {
|
|
297
|
+
kind: "video";
|
|
298
|
+
node: ReactNode;
|
|
299
|
+
} | {
|
|
300
|
+
kind: "pdf";
|
|
301
|
+
fileUrl: string;
|
|
302
|
+
fileName: string;
|
|
303
|
+
downloadUrl?: string;
|
|
304
|
+
};
|
|
305
|
+
type MediaCarouselLabels = {
|
|
306
|
+
previous?: string;
|
|
307
|
+
next?: string;
|
|
308
|
+
counter?: (current: number, total: number) => string;
|
|
309
|
+
};
|
|
310
|
+
type MediaCarouselPdfRenderProps = {
|
|
311
|
+
fileUrl: string;
|
|
312
|
+
fileName: string;
|
|
313
|
+
downloadUrl?: string;
|
|
314
|
+
};
|
|
315
|
+
type MediaCarouselProps = {
|
|
316
|
+
items: MediaCarouselItem[];
|
|
317
|
+
index: number;
|
|
318
|
+
onIndexChange: (index: number) => void;
|
|
319
|
+
labels?: MediaCarouselLabels;
|
|
320
|
+
className?: string;
|
|
321
|
+
/**
|
|
322
|
+
* Slot for PDF rendering so this component can live in the root barrel
|
|
323
|
+
* without pulling pdfjs into every consumer.
|
|
324
|
+
*/
|
|
325
|
+
renderPdf?: (props: MediaCarouselPdfRenderProps) => ReactNode;
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* Presentational media pane for image / video-slot / pdf items. Images use
|
|
329
|
+
* pinch/swipe gestures; video and pdf are opaque slots supplied by the
|
|
330
|
+
* consumer.
|
|
331
|
+
*/
|
|
332
|
+
declare function MediaCarousel({ items, index, onIndexChange, labels, className, renderPdf, }: MediaCarouselProps): React.JSX.Element | null;
|
|
333
|
+
|
|
334
|
+
type MediaViewerDialogLabels = {
|
|
335
|
+
close?: string;
|
|
336
|
+
title?: string;
|
|
337
|
+
description?: string;
|
|
338
|
+
};
|
|
339
|
+
type MediaViewerDialogProps = {
|
|
340
|
+
open: boolean;
|
|
341
|
+
onOpenChange: (open: boolean) => void;
|
|
342
|
+
children: ReactNode;
|
|
343
|
+
labels?: MediaViewerDialogLabels;
|
|
344
|
+
className?: string;
|
|
345
|
+
/** Extra classes for the dialog content shell. */
|
|
346
|
+
contentClassName?: string;
|
|
347
|
+
showCloseButton?: boolean;
|
|
348
|
+
};
|
|
349
|
+
/**
|
|
350
|
+
* Edge-to-edge fullscreen dialog shell for media viewers (post detail, PDF,
|
|
351
|
+
* etc.). Uses the shared Radix dialog for focus trap, Esc and `aria-modal`.
|
|
352
|
+
* Pass `contentClassName` to opt into a contained desktop card when needed.
|
|
353
|
+
*/
|
|
354
|
+
declare function MediaViewerDialog({ open, onOpenChange, children, labels, className, contentClassName, showCloseButton, }: MediaViewerDialogProps): React.JSX.Element;
|
|
355
|
+
|
|
292
356
|
type ThemeSwitcherLabels = {
|
|
293
357
|
/** Tooltip label for the theme switcher */
|
|
294
358
|
theme?: string;
|
|
@@ -958,6 +1022,54 @@ declare function useDebouncedValueStrict<T>(value: T, delayMs: number): T | unde
|
|
|
958
1022
|
|
|
959
1023
|
declare function useMediaQuery(query: string): boolean;
|
|
960
1024
|
|
|
1025
|
+
declare const ZOOM_PAN_MIN_SCALE = 1;
|
|
1026
|
+
declare const ZOOM_PAN_MAX_SCALE = 4;
|
|
1027
|
+
declare const ZOOM_PAN_SWIPE_COMMIT_PX = 56;
|
|
1028
|
+
declare const ZOOM_PAN_SWIPE_SNAP_MS = 180;
|
|
1029
|
+
type ZoomPanTransform = {
|
|
1030
|
+
scale: number;
|
|
1031
|
+
tx: number;
|
|
1032
|
+
ty: number;
|
|
1033
|
+
};
|
|
1034
|
+
type SwipeDirection = "prev" | "next";
|
|
1035
|
+
type UseZoomPanGesturesOptions = {
|
|
1036
|
+
minScale?: number;
|
|
1037
|
+
maxScale?: number;
|
|
1038
|
+
/** When false, horizontal swipe never commits (still pans when zoomed). */
|
|
1039
|
+
swipeEnabled?: boolean;
|
|
1040
|
+
onSwipeCommit?: (direction: SwipeDirection) => void;
|
|
1041
|
+
/** When true, wheel zoom is attached to the stage. Defaults to true. */
|
|
1042
|
+
wheelZoom?: boolean;
|
|
1043
|
+
/**
|
|
1044
|
+
* Double-tap behavior at min scale: "reset" (default — ImageLightbox) or
|
|
1045
|
+
* "toggle" (zoom in toward tap, then reset).
|
|
1046
|
+
*/
|
|
1047
|
+
doubleTap?: "reset" | "toggle";
|
|
1048
|
+
};
|
|
1049
|
+
type UseZoomPanGesturesResult = {
|
|
1050
|
+
stageRef: RefObject<HTMLDivElement | null>;
|
|
1051
|
+
transform: ZoomPanTransform;
|
|
1052
|
+
isDragging: boolean;
|
|
1053
|
+
snapBack: boolean;
|
|
1054
|
+
handlers: {
|
|
1055
|
+
onPointerDown: (e: PointerEvent<HTMLDivElement>) => void;
|
|
1056
|
+
onPointerMove: (e: PointerEvent<HTMLDivElement>) => void;
|
|
1057
|
+
onPointerUp: (e: PointerEvent<HTMLDivElement>) => void;
|
|
1058
|
+
onPointerCancel: (e: PointerEvent<HTMLDivElement>) => void;
|
|
1059
|
+
};
|
|
1060
|
+
reset: () => void;
|
|
1061
|
+
setScale: (scale: number) => void;
|
|
1062
|
+
clearSnapBack: () => void;
|
|
1063
|
+
};
|
|
1064
|
+
declare function zoomToward(prev: ZoomPanTransform, nextScale: number, originX: number, originY: number, minScale?: number, maxScale?: number): ZoomPanTransform;
|
|
1065
|
+
declare function prefersReducedMotion(): boolean;
|
|
1066
|
+
/**
|
|
1067
|
+
* Pointer-driven pinch zoom, double-tap zoom toggle/reset, pan while zoomed,
|
|
1068
|
+
* and horizontal swipe-to-commit. Shared by ImageLightbox, MediaCarousel and
|
|
1069
|
+
* PdfViewer.
|
|
1070
|
+
*/
|
|
1071
|
+
declare function useZoomPanGestures(options?: UseZoomPanGesturesOptions): UseZoomPanGesturesResult;
|
|
1072
|
+
|
|
961
1073
|
type ScrollFadeXEdges = {
|
|
962
1074
|
canScrollLeft: boolean;
|
|
963
1075
|
canScrollRight: boolean;
|
|
@@ -1552,4 +1664,4 @@ declare function useRealtimeChannel({ getWsUrl, onEvent, enabled, reconnectDelay
|
|
|
1552
1664
|
|
|
1553
1665
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1554
1666
|
|
|
1555
|
-
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, BrandX, type BrandXProps, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ConversationKind, DEFAULT_EDITABLE_SECTION_LABELS, DataList, DataListItem, type DataListItemProps, type DataListProps, type DescribedPlaybackError, DropdownMenuItem, DropdownMenuSeparator, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiInput, type EmojiInputProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmojiTextarea, type EmojiTextareaProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, ExpandableText, type ExpandableTextProps, type FeatureEntry, FeedVideoPlayer, type FeedVideoPlayerProps, FieldMessage, type FieldMessageProps, type FindOrCreateConversationInput, type HlsPlayerMode, ImageLightbox, type ImageLightboxLabels, type ImageLightboxProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, type MergedPlatformAccountOrg, Message, MessageAvatar, MessageComposer, type MessageComposerProps, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, type OpenThreadRequest, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT, PaymentIcon, type PaymentIconFormat, type PaymentIconProps, PhoneInput, type PhoneInputProps, PlatformAccountMenu, type PlatformAccountMenuLabels, type PlatformAccountMenuOrg, type PlatformAccountMenuProps, type PlatformAccountMenuUrls, type PlatformAccountMenuUser, type PlatformAccountMenuVariant, PlatformNavbar, type PlatformNavbarProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, type RealtimeEvent, type ScrollFadeXEdges, type ScrollMark, type ScrollRestorationContextValue, ScrollRestorationProvider, type ScrollRestorationProviderProps, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, SearchablePicker, type SearchablePickerCreateOption, type SearchablePickerLabels, type SearchablePickerMultipleProps, type SearchablePickerPinned, type SearchablePickerProps, type SearchablePickerSingleProps, type SupportChatClient, type SupportConversation, type SupportMessage, type SupportMessengerItem, type SupportMessengerLabels, SupportMessengerProvider, type SupportMessengerProviderProps, type SupportMessengerTab, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseEditableSectionOptions, type UseEditableSectionResult, type UseFeedExclusivePlaybackResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseRealtimeChannelOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, type UseSupportConversationOptions, type UseSupportConversationResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, formatPaymentCardBrand, fuzzyMatch, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, normalizePaymentCardBrand, paymentIconBrandFromStripe, paymentTypeFromStripeBrand, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats, useRealtimeChannel, useRestorableState, useScrollFadeXEdges, useScrollRestorationContext, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
|
1667
|
+
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, BrandX, type BrandXProps, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ConversationKind, DEFAULT_EDITABLE_SECTION_LABELS, DataList, DataListItem, type DataListItemProps, type DataListProps, type DescribedPlaybackError, DropdownMenuItem, DropdownMenuSeparator, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiInput, type EmojiInputProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmojiTextarea, type EmojiTextareaProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, ExpandableText, type ExpandableTextProps, type FeatureEntry, FeedVideoPlayer, type FeedVideoPlayerProps, FieldMessage, type FieldMessageProps, type FindOrCreateConversationInput, type HlsPlayerMode, ImageLightbox, type ImageLightboxLabels, type ImageLightboxProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, MediaCarousel, type MediaCarouselItem, type MediaCarouselLabels, type MediaCarouselPdfRenderProps, type MediaCarouselProps, MediaViewerDialog, type MediaViewerDialogLabels, type MediaViewerDialogProps, type MergedPlatformAccountOrg, Message, MessageAvatar, MessageComposer, type MessageComposerProps, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, type OpenThreadRequest, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT, PaymentIcon, type PaymentIconFormat, type PaymentIconProps, PhoneInput, type PhoneInputProps, PlatformAccountMenu, type PlatformAccountMenuLabels, type PlatformAccountMenuOrg, type PlatformAccountMenuProps, type PlatformAccountMenuUrls, type PlatformAccountMenuUser, type PlatformAccountMenuVariant, PlatformNavbar, type PlatformNavbarProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, type RealtimeEvent, type ScrollFadeXEdges, type ScrollMark, type ScrollRestorationContextValue, ScrollRestorationProvider, type ScrollRestorationProviderProps, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, SearchablePicker, type SearchablePickerCreateOption, type SearchablePickerLabels, type SearchablePickerMultipleProps, type SearchablePickerPinned, type SearchablePickerProps, type SearchablePickerSingleProps, type SupportChatClient, type SupportConversation, type SupportMessage, type SupportMessengerItem, type SupportMessengerLabels, SupportMessengerProvider, type SupportMessengerProviderProps, type SupportMessengerTab, type SwipeDirection, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseEditableSectionOptions, type UseEditableSectionResult, type UseFeedExclusivePlaybackResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseRealtimeChannelOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, type UseSupportConversationOptions, type UseSupportConversationResult, type UseZoomPanGesturesOptions, type UseZoomPanGesturesResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, ZOOM_PAN_MAX_SCALE, ZOOM_PAN_MIN_SCALE, ZOOM_PAN_SWIPE_COMMIT_PX, ZOOM_PAN_SWIPE_SNAP_MS, type ZoomPanTransform, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, formatPaymentCardBrand, fuzzyMatch, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, normalizePaymentCardBrand, paymentIconBrandFromStripe, paymentTypeFromStripeBrand, prefersReducedMotion, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats, useRealtimeChannel, useRestorableState, useScrollFadeXEdges, useScrollRestorationContext, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional, useZoomPanGestures, zoomToward };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { FormEvent, KeyboardEvent, RefObject, CSSProperties, ReactNode, ComponentProps, Dispatch, SetStateAction, SVGProps } from 'react';
|
|
2
|
+
import { FormEvent, KeyboardEvent, RefObject, CSSProperties, ReactNode, ComponentProps, PointerEvent, Dispatch, SetStateAction, SVGProps } from 'react';
|
|
3
3
|
import { LucideIcon } from 'lucide-react';
|
|
4
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -289,6 +289,70 @@ type ImageLightboxProps = {
|
|
|
289
289
|
*/
|
|
290
290
|
declare function ImageLightbox({ images, index, onIndexChange, onClose, labels, }: ImageLightboxProps): React.ReactPortal;
|
|
291
291
|
|
|
292
|
+
type MediaCarouselItem = {
|
|
293
|
+
kind: "image";
|
|
294
|
+
src: string;
|
|
295
|
+
alt?: string;
|
|
296
|
+
} | {
|
|
297
|
+
kind: "video";
|
|
298
|
+
node: ReactNode;
|
|
299
|
+
} | {
|
|
300
|
+
kind: "pdf";
|
|
301
|
+
fileUrl: string;
|
|
302
|
+
fileName: string;
|
|
303
|
+
downloadUrl?: string;
|
|
304
|
+
};
|
|
305
|
+
type MediaCarouselLabels = {
|
|
306
|
+
previous?: string;
|
|
307
|
+
next?: string;
|
|
308
|
+
counter?: (current: number, total: number) => string;
|
|
309
|
+
};
|
|
310
|
+
type MediaCarouselPdfRenderProps = {
|
|
311
|
+
fileUrl: string;
|
|
312
|
+
fileName: string;
|
|
313
|
+
downloadUrl?: string;
|
|
314
|
+
};
|
|
315
|
+
type MediaCarouselProps = {
|
|
316
|
+
items: MediaCarouselItem[];
|
|
317
|
+
index: number;
|
|
318
|
+
onIndexChange: (index: number) => void;
|
|
319
|
+
labels?: MediaCarouselLabels;
|
|
320
|
+
className?: string;
|
|
321
|
+
/**
|
|
322
|
+
* Slot for PDF rendering so this component can live in the root barrel
|
|
323
|
+
* without pulling pdfjs into every consumer.
|
|
324
|
+
*/
|
|
325
|
+
renderPdf?: (props: MediaCarouselPdfRenderProps) => ReactNode;
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* Presentational media pane for image / video-slot / pdf items. Images use
|
|
329
|
+
* pinch/swipe gestures; video and pdf are opaque slots supplied by the
|
|
330
|
+
* consumer.
|
|
331
|
+
*/
|
|
332
|
+
declare function MediaCarousel({ items, index, onIndexChange, labels, className, renderPdf, }: MediaCarouselProps): React.JSX.Element | null;
|
|
333
|
+
|
|
334
|
+
type MediaViewerDialogLabels = {
|
|
335
|
+
close?: string;
|
|
336
|
+
title?: string;
|
|
337
|
+
description?: string;
|
|
338
|
+
};
|
|
339
|
+
type MediaViewerDialogProps = {
|
|
340
|
+
open: boolean;
|
|
341
|
+
onOpenChange: (open: boolean) => void;
|
|
342
|
+
children: ReactNode;
|
|
343
|
+
labels?: MediaViewerDialogLabels;
|
|
344
|
+
className?: string;
|
|
345
|
+
/** Extra classes for the dialog content shell. */
|
|
346
|
+
contentClassName?: string;
|
|
347
|
+
showCloseButton?: boolean;
|
|
348
|
+
};
|
|
349
|
+
/**
|
|
350
|
+
* Edge-to-edge fullscreen dialog shell for media viewers (post detail, PDF,
|
|
351
|
+
* etc.). Uses the shared Radix dialog for focus trap, Esc and `aria-modal`.
|
|
352
|
+
* Pass `contentClassName` to opt into a contained desktop card when needed.
|
|
353
|
+
*/
|
|
354
|
+
declare function MediaViewerDialog({ open, onOpenChange, children, labels, className, contentClassName, showCloseButton, }: MediaViewerDialogProps): React.JSX.Element;
|
|
355
|
+
|
|
292
356
|
type ThemeSwitcherLabels = {
|
|
293
357
|
/** Tooltip label for the theme switcher */
|
|
294
358
|
theme?: string;
|
|
@@ -958,6 +1022,54 @@ declare function useDebouncedValueStrict<T>(value: T, delayMs: number): T | unde
|
|
|
958
1022
|
|
|
959
1023
|
declare function useMediaQuery(query: string): boolean;
|
|
960
1024
|
|
|
1025
|
+
declare const ZOOM_PAN_MIN_SCALE = 1;
|
|
1026
|
+
declare const ZOOM_PAN_MAX_SCALE = 4;
|
|
1027
|
+
declare const ZOOM_PAN_SWIPE_COMMIT_PX = 56;
|
|
1028
|
+
declare const ZOOM_PAN_SWIPE_SNAP_MS = 180;
|
|
1029
|
+
type ZoomPanTransform = {
|
|
1030
|
+
scale: number;
|
|
1031
|
+
tx: number;
|
|
1032
|
+
ty: number;
|
|
1033
|
+
};
|
|
1034
|
+
type SwipeDirection = "prev" | "next";
|
|
1035
|
+
type UseZoomPanGesturesOptions = {
|
|
1036
|
+
minScale?: number;
|
|
1037
|
+
maxScale?: number;
|
|
1038
|
+
/** When false, horizontal swipe never commits (still pans when zoomed). */
|
|
1039
|
+
swipeEnabled?: boolean;
|
|
1040
|
+
onSwipeCommit?: (direction: SwipeDirection) => void;
|
|
1041
|
+
/** When true, wheel zoom is attached to the stage. Defaults to true. */
|
|
1042
|
+
wheelZoom?: boolean;
|
|
1043
|
+
/**
|
|
1044
|
+
* Double-tap behavior at min scale: "reset" (default — ImageLightbox) or
|
|
1045
|
+
* "toggle" (zoom in toward tap, then reset).
|
|
1046
|
+
*/
|
|
1047
|
+
doubleTap?: "reset" | "toggle";
|
|
1048
|
+
};
|
|
1049
|
+
type UseZoomPanGesturesResult = {
|
|
1050
|
+
stageRef: RefObject<HTMLDivElement | null>;
|
|
1051
|
+
transform: ZoomPanTransform;
|
|
1052
|
+
isDragging: boolean;
|
|
1053
|
+
snapBack: boolean;
|
|
1054
|
+
handlers: {
|
|
1055
|
+
onPointerDown: (e: PointerEvent<HTMLDivElement>) => void;
|
|
1056
|
+
onPointerMove: (e: PointerEvent<HTMLDivElement>) => void;
|
|
1057
|
+
onPointerUp: (e: PointerEvent<HTMLDivElement>) => void;
|
|
1058
|
+
onPointerCancel: (e: PointerEvent<HTMLDivElement>) => void;
|
|
1059
|
+
};
|
|
1060
|
+
reset: () => void;
|
|
1061
|
+
setScale: (scale: number) => void;
|
|
1062
|
+
clearSnapBack: () => void;
|
|
1063
|
+
};
|
|
1064
|
+
declare function zoomToward(prev: ZoomPanTransform, nextScale: number, originX: number, originY: number, minScale?: number, maxScale?: number): ZoomPanTransform;
|
|
1065
|
+
declare function prefersReducedMotion(): boolean;
|
|
1066
|
+
/**
|
|
1067
|
+
* Pointer-driven pinch zoom, double-tap zoom toggle/reset, pan while zoomed,
|
|
1068
|
+
* and horizontal swipe-to-commit. Shared by ImageLightbox, MediaCarousel and
|
|
1069
|
+
* PdfViewer.
|
|
1070
|
+
*/
|
|
1071
|
+
declare function useZoomPanGestures(options?: UseZoomPanGesturesOptions): UseZoomPanGesturesResult;
|
|
1072
|
+
|
|
961
1073
|
type ScrollFadeXEdges = {
|
|
962
1074
|
canScrollLeft: boolean;
|
|
963
1075
|
canScrollRight: boolean;
|
|
@@ -1552,4 +1664,4 @@ declare function useRealtimeChannel({ getWsUrl, onEvent, enabled, reconnectDelay
|
|
|
1552
1664
|
|
|
1553
1665
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1554
1666
|
|
|
1555
|
-
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, BrandX, type BrandXProps, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ConversationKind, DEFAULT_EDITABLE_SECTION_LABELS, DataList, DataListItem, type DataListItemProps, type DataListProps, type DescribedPlaybackError, DropdownMenuItem, DropdownMenuSeparator, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiInput, type EmojiInputProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmojiTextarea, type EmojiTextareaProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, ExpandableText, type ExpandableTextProps, type FeatureEntry, FeedVideoPlayer, type FeedVideoPlayerProps, FieldMessage, type FieldMessageProps, type FindOrCreateConversationInput, type HlsPlayerMode, ImageLightbox, type ImageLightboxLabels, type ImageLightboxProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, type MergedPlatformAccountOrg, Message, MessageAvatar, MessageComposer, type MessageComposerProps, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, type OpenThreadRequest, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT, PaymentIcon, type PaymentIconFormat, type PaymentIconProps, PhoneInput, type PhoneInputProps, PlatformAccountMenu, type PlatformAccountMenuLabels, type PlatformAccountMenuOrg, type PlatformAccountMenuProps, type PlatformAccountMenuUrls, type PlatformAccountMenuUser, type PlatformAccountMenuVariant, PlatformNavbar, type PlatformNavbarProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, type RealtimeEvent, type ScrollFadeXEdges, type ScrollMark, type ScrollRestorationContextValue, ScrollRestorationProvider, type ScrollRestorationProviderProps, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, SearchablePicker, type SearchablePickerCreateOption, type SearchablePickerLabels, type SearchablePickerMultipleProps, type SearchablePickerPinned, type SearchablePickerProps, type SearchablePickerSingleProps, type SupportChatClient, type SupportConversation, type SupportMessage, type SupportMessengerItem, type SupportMessengerLabels, SupportMessengerProvider, type SupportMessengerProviderProps, type SupportMessengerTab, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseEditableSectionOptions, type UseEditableSectionResult, type UseFeedExclusivePlaybackResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseRealtimeChannelOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, type UseSupportConversationOptions, type UseSupportConversationResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, formatPaymentCardBrand, fuzzyMatch, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, normalizePaymentCardBrand, paymentIconBrandFromStripe, paymentTypeFromStripeBrand, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats, useRealtimeChannel, useRestorableState, useScrollFadeXEdges, useScrollRestorationContext, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
|
1667
|
+
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, BrandX, type BrandXProps, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ConversationKind, DEFAULT_EDITABLE_SECTION_LABELS, DataList, DataListItem, type DataListItemProps, type DataListProps, type DescribedPlaybackError, DropdownMenuItem, DropdownMenuSeparator, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiInput, type EmojiInputProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmojiTextarea, type EmojiTextareaProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, ExpandableText, type ExpandableTextProps, type FeatureEntry, FeedVideoPlayer, type FeedVideoPlayerProps, FieldMessage, type FieldMessageProps, type FindOrCreateConversationInput, type HlsPlayerMode, ImageLightbox, type ImageLightboxLabels, type ImageLightboxProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, MediaCarousel, type MediaCarouselItem, type MediaCarouselLabels, type MediaCarouselPdfRenderProps, type MediaCarouselProps, MediaViewerDialog, type MediaViewerDialogLabels, type MediaViewerDialogProps, type MergedPlatformAccountOrg, Message, MessageAvatar, MessageComposer, type MessageComposerProps, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, type OpenThreadRequest, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT, PaymentIcon, type PaymentIconFormat, type PaymentIconProps, PhoneInput, type PhoneInputProps, PlatformAccountMenu, type PlatformAccountMenuLabels, type PlatformAccountMenuOrg, type PlatformAccountMenuProps, type PlatformAccountMenuUrls, type PlatformAccountMenuUser, type PlatformAccountMenuVariant, PlatformNavbar, type PlatformNavbarProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, type RealtimeEvent, type ScrollFadeXEdges, type ScrollMark, type ScrollRestorationContextValue, ScrollRestorationProvider, type ScrollRestorationProviderProps, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, SearchablePicker, type SearchablePickerCreateOption, type SearchablePickerLabels, type SearchablePickerMultipleProps, type SearchablePickerPinned, type SearchablePickerProps, type SearchablePickerSingleProps, type SupportChatClient, type SupportConversation, type SupportMessage, type SupportMessengerItem, type SupportMessengerLabels, SupportMessengerProvider, type SupportMessengerProviderProps, type SupportMessengerTab, type SwipeDirection, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseEditableSectionOptions, type UseEditableSectionResult, type UseFeedExclusivePlaybackResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseRealtimeChannelOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, type UseSupportConversationOptions, type UseSupportConversationResult, type UseZoomPanGesturesOptions, type UseZoomPanGesturesResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, ZOOM_PAN_MAX_SCALE, ZOOM_PAN_MIN_SCALE, ZOOM_PAN_SWIPE_COMMIT_PX, ZOOM_PAN_SWIPE_SNAP_MS, type ZoomPanTransform, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, formatPaymentCardBrand, fuzzyMatch, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, normalizePaymentCardBrand, paymentIconBrandFromStripe, paymentTypeFromStripeBrand, prefersReducedMotion, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats, useRealtimeChannel, useRestorableState, useScrollFadeXEdges, useScrollRestorationContext, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional, useZoomPanGestures, zoomToward };
|