@sesionario/blocks 1.30.1 → 1.31.1

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
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { FormEvent, KeyboardEvent, RefObject, CSSProperties, ReactNode, ComponentProps, PointerEvent, Dispatch, SetStateAction, SVGProps } from 'react';
2
+ import { FormEvent, KeyboardEvent, RefObject, CSSProperties, ReactNode, ComponentProps, ImgHTMLAttributes, SyntheticEvent, PointerEvent, Dispatch, SetStateAction, SVGProps } from 'react';
3
3
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
@@ -358,6 +358,18 @@ type MediaViewerDialogProps = {
358
358
  */
359
359
  declare function MediaViewerDialog({ open, onOpenChange, children, labels, className, contentClassName, showCloseButton, }: MediaViewerDialogProps): React.JSX.Element;
360
360
 
361
+ type SafeImageProps = Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "onError"> & {
362
+ src?: string | null;
363
+ /** Rendered when `src` is missing/empty or the image fails to load. */
364
+ fallback: ReactNode;
365
+ onError?: (event: SyntheticEvent<HTMLImageElement>) => void;
366
+ };
367
+ /**
368
+ * `<img>` that swaps to `fallback` when the source is missing or fails to load,
369
+ * so the browser never shows its default broken-image glyph.
370
+ */
371
+ declare function SafeImage({ src, fallback, alt, onError, ...imgProps }: SafeImageProps): React.JSX.Element;
372
+
361
373
  type ThemeSwitcherLabels = {
362
374
  /** Tooltip label for the theme switcher */
363
375
  theme?: string;
@@ -1675,4 +1687,4 @@ declare function useRealtimeChannel({ getWsUrl, onEvent, enabled, reconnectDelay
1675
1687
 
1676
1688
  declare function cn(...inputs: ClassValue[]): string;
1677
1689
 
1678
- 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 };
1690
+ 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, SafeImage, type SafeImageProps, 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, PointerEvent, Dispatch, SetStateAction, SVGProps } from 'react';
2
+ import { FormEvent, KeyboardEvent, RefObject, CSSProperties, ReactNode, ComponentProps, ImgHTMLAttributes, SyntheticEvent, PointerEvent, Dispatch, SetStateAction, SVGProps } from 'react';
3
3
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
@@ -358,6 +358,18 @@ type MediaViewerDialogProps = {
358
358
  */
359
359
  declare function MediaViewerDialog({ open, onOpenChange, children, labels, className, contentClassName, showCloseButton, }: MediaViewerDialogProps): React.JSX.Element;
360
360
 
361
+ type SafeImageProps = Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "onError"> & {
362
+ src?: string | null;
363
+ /** Rendered when `src` is missing/empty or the image fails to load. */
364
+ fallback: ReactNode;
365
+ onError?: (event: SyntheticEvent<HTMLImageElement>) => void;
366
+ };
367
+ /**
368
+ * `<img>` that swaps to `fallback` when the source is missing or fails to load,
369
+ * so the browser never shows its default broken-image glyph.
370
+ */
371
+ declare function SafeImage({ src, fallback, alt, onError, ...imgProps }: SafeImageProps): React.JSX.Element;
372
+
361
373
  type ThemeSwitcherLabels = {
362
374
  /** Tooltip label for the theme switcher */
363
375
  theme?: string;
@@ -1675,4 +1687,4 @@ declare function useRealtimeChannel({ getWsUrl, onEvent, enabled, reconnectDelay
1675
1687
 
1676
1688
  declare function cn(...inputs: ClassValue[]): string;
1677
1689
 
1678
- 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 };
1690
+ 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, SafeImage, type SafeImageProps, 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.js CHANGED
@@ -1142,6 +1142,45 @@ function useZoomPanGestures(options = {}) {
1142
1142
  clearSnapBack
1143
1143
  };
1144
1144
  }
1145
+ function isBrokenImage(img) {
1146
+ return img.complete && img.naturalWidth === 0;
1147
+ }
1148
+ function SafeImage({
1149
+ src,
1150
+ fallback,
1151
+ alt = "",
1152
+ onError,
1153
+ ...imgProps
1154
+ }) {
1155
+ const [failed, setFailed] = useState(false);
1156
+ const imgRef = useRef(null);
1157
+ const resolvedSrc = typeof src === "string" && src.length > 0 ? src : null;
1158
+ useLayoutEffect(() => {
1159
+ setFailed(false);
1160
+ }, [resolvedSrc]);
1161
+ useLayoutEffect(() => {
1162
+ const img = imgRef.current;
1163
+ if (img && isBrokenImage(img)) {
1164
+ setFailed(true);
1165
+ }
1166
+ }, [resolvedSrc, failed]);
1167
+ if (!resolvedSrc || failed) {
1168
+ return /* @__PURE__ */ jsx(Fragment, { children: fallback });
1169
+ }
1170
+ return /* @__PURE__ */ jsx(
1171
+ "img",
1172
+ {
1173
+ ...imgProps,
1174
+ ref: imgRef,
1175
+ src: resolvedSrc,
1176
+ alt,
1177
+ onError: (event) => {
1178
+ setFailed(true);
1179
+ onError?.(event);
1180
+ }
1181
+ }
1182
+ );
1183
+ }
1145
1184
  function ImageLightbox({
1146
1185
  images,
1147
1186
  index,
@@ -1265,7 +1304,7 @@ function ImageLightbox({
1265
1304
  onPointerUp: handlers.onPointerUp,
1266
1305
  onPointerCancel: handlers.onPointerCancel,
1267
1306
  children: /* @__PURE__ */ jsx(
1268
- "img",
1307
+ SafeImage,
1269
1308
  {
1270
1309
  src: images[index],
1271
1310
  alt: "",
@@ -1276,7 +1315,14 @@ function ImageLightbox({
1276
1315
  transition,
1277
1316
  cursor: scale > ZOOM_PAN_MIN_SCALE ? "grab" : "default"
1278
1317
  },
1279
- onTransitionEnd: clearSnapBack
1318
+ onTransitionEnd: clearSnapBack,
1319
+ fallback: /* @__PURE__ */ jsx(
1320
+ "div",
1321
+ {
1322
+ "aria-hidden": true,
1323
+ className: "h-48 w-full max-w-md rounded-lg bg-muted"
1324
+ }
1325
+ )
1280
1326
  }
1281
1327
  )
1282
1328
  }
@@ -1390,7 +1436,7 @@ function MediaCarousel({
1390
1436
  onPointerUp: handlers.onPointerUp,
1391
1437
  onPointerCancel: handlers.onPointerCancel,
1392
1438
  children: /* @__PURE__ */ jsx(
1393
- "img",
1439
+ SafeImage,
1394
1440
  {
1395
1441
  src: item.src,
1396
1442
  alt: item.alt ?? "",
@@ -1401,7 +1447,14 @@ function MediaCarousel({
1401
1447
  transition,
1402
1448
  cursor: scale > ZOOM_PAN_MIN_SCALE ? "grab" : "default"
1403
1449
  },
1404
- onTransitionEnd: clearSnapBack
1450
+ onTransitionEnd: clearSnapBack,
1451
+ fallback: /* @__PURE__ */ jsx(
1452
+ "div",
1453
+ {
1454
+ "aria-hidden": true,
1455
+ className: "h-48 w-full max-w-md rounded-lg bg-muted"
1456
+ }
1457
+ )
1405
1458
  }
1406
1459
  )
1407
1460
  }
@@ -2068,15 +2121,27 @@ function TenantAvatar({
2068
2121
  }) {
2069
2122
  const sizeClass = size === "sm" ? "size-6" : "size-8";
2070
2123
  const textClass = size === "sm" ? "text-xs" : "text-sm";
2071
- return /* @__PURE__ */ jsx(
2124
+ const initials = getInitials(name);
2125
+ return /* @__PURE__ */ jsxs(
2072
2126
  "div",
2073
2127
  {
2074
2128
  className: cn(
2075
- "flex shrink-0 items-center justify-center overflow-hidden rounded-full font-medium",
2129
+ "relative flex shrink-0 items-center justify-center overflow-hidden rounded-full font-medium",
2076
2130
  sizeClass
2077
2131
  ),
2078
- style: logo ? void 0 : avatarFallbackStyle(name),
2079
- children: logo ? /* @__PURE__ */ jsx("img", { src: logo, alt: "", className: "size-full object-cover" }) : /* @__PURE__ */ jsx("span", { className: textClass, children: getInitials(name) })
2132
+ style: avatarFallbackStyle(name),
2133
+ children: [
2134
+ /* @__PURE__ */ jsx("span", { className: textClass, children: initials }),
2135
+ logo ? /* @__PURE__ */ jsx(
2136
+ SafeImage,
2137
+ {
2138
+ src: logo,
2139
+ alt: "",
2140
+ className: "absolute inset-0 size-full object-cover",
2141
+ fallback: null
2142
+ }
2143
+ ) : null
2144
+ ]
2080
2145
  }
2081
2146
  );
2082
2147
  }
@@ -2596,28 +2661,26 @@ function MenuAvatar({
2596
2661
  sizeClass
2597
2662
  }) {
2598
2663
  const initials = getInitials(name);
2599
- return /* @__PURE__ */ jsx(
2664
+ return /* @__PURE__ */ jsxs(
2600
2665
  "span",
2601
2666
  {
2602
2667
  className: cn(
2603
2668
  "relative flex shrink-0 overflow-hidden rounded-full",
2604
2669
  sizeClass
2605
2670
  ),
2606
- children: image ? /* @__PURE__ */ jsx(
2607
- "img",
2608
- {
2609
- src: image,
2610
- alt: "",
2611
- className: "aspect-square size-full object-cover"
2612
- }
2613
- ) : /* @__PURE__ */ jsx(
2614
- "span",
2615
- {
2616
- className: "flex size-full items-center justify-center text-xs font-semibold",
2617
- style: avatarFallbackStyle(name),
2618
- children: initials
2619
- }
2620
- )
2671
+ style: avatarFallbackStyle(name),
2672
+ children: [
2673
+ /* @__PURE__ */ jsx("span", { className: "flex size-full items-center justify-center text-xs font-semibold", children: initials }),
2674
+ image ? /* @__PURE__ */ jsx(
2675
+ SafeImage,
2676
+ {
2677
+ src: image,
2678
+ alt: "",
2679
+ className: "absolute inset-0 aspect-square size-full object-cover",
2680
+ fallback: null
2681
+ }
2682
+ ) : null
2683
+ ]
2621
2684
  }
2622
2685
  );
2623
2686
  }
@@ -3709,30 +3772,31 @@ function AvatarEditorDialog({
3709
3772
  {
3710
3773
  className: "relative w-full h-full rounded-full overflow-hidden bg-muted border-2 border-border flex items-center justify-center",
3711
3774
  style: { width: displaySize, height: displaySize },
3712
- children: value ? /* @__PURE__ */ jsx(
3713
- "img",
3775
+ children: /* @__PURE__ */ jsx(
3776
+ SafeImage,
3714
3777
  {
3715
- src: value || "/placeholder.svg",
3778
+ src: value,
3716
3779
  alt: "Avatar",
3717
- className: "absolute -inset-px object-cover"
3718
- }
3719
- ) : /* @__PURE__ */ jsxs(
3720
- "div",
3721
- {
3722
- className: cn(
3723
- "flex flex-col items-center justify-center text-muted-foreground",
3724
- caption ? "gap-1" : "gap-0"
3725
- ),
3726
- children: [
3727
- /* @__PURE__ */ jsx(
3728
- User,
3729
- {
3730
- className: "h-1/2 w-1/2 max-h-[55%] max-w-[55%] shrink-0",
3731
- "aria-hidden": true
3732
- }
3733
- ),
3734
- caption ? /* @__PURE__ */ jsx("span", { className: "text-xs text-center px-1", children: caption }) : null
3735
- ]
3780
+ className: "absolute -inset-px object-cover",
3781
+ fallback: /* @__PURE__ */ jsxs(
3782
+ "div",
3783
+ {
3784
+ className: cn(
3785
+ "flex flex-col items-center justify-center text-muted-foreground",
3786
+ caption ? "gap-1" : "gap-0"
3787
+ ),
3788
+ children: [
3789
+ /* @__PURE__ */ jsx(
3790
+ User,
3791
+ {
3792
+ className: "h-1/2 w-1/2 max-h-[55%] max-w-[55%] shrink-0",
3793
+ "aria-hidden": true
3794
+ }
3795
+ ),
3796
+ caption ? /* @__PURE__ */ jsx("span", { className: "text-xs text-center px-1", children: caption }) : null
3797
+ ]
3798
+ }
3799
+ )
3736
3800
  }
3737
3801
  )
3738
3802
  }
@@ -8798,15 +8862,16 @@ function ListPanel({
8798
8862
  "span",
8799
8863
  {
8800
8864
  className: "flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-full text-xs font-semibold text-white",
8801
- style: item.avatarUrl ? void 0 : avatarFallbackStyle(item.title),
8802
- children: item.avatarUrl ? /* @__PURE__ */ jsx(
8803
- "img",
8865
+ style: avatarFallbackStyle(item.title),
8866
+ children: /* @__PURE__ */ jsx(
8867
+ SafeImage,
8804
8868
  {
8805
8869
  src: item.avatarUrl,
8806
8870
  alt: "",
8807
- className: "size-full object-cover"
8871
+ className: "size-full object-cover",
8872
+ fallback: getInitials(item.title)
8808
8873
  }
8809
- ) : getInitials(item.title)
8874
+ )
8810
8875
  }
8811
8876
  ),
8812
8877
  /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
@@ -9310,6 +9375,6 @@ function useRealtimeChannel({
9310
9375
  }, [enabled, reconnectDelayMs]);
9311
9376
  }
9312
9377
 
9313
- export { AvatarEditor, AvatarEditorDialog, BrandX, Bubble, BubbleContent, BubbleGroup, BubbleReactions, ChatMessageList, ConfirmDestructiveDialog, DEFAULT_EDITABLE_SECTION_LABELS, DataList, DataListItem, DropdownMenuItem, DropdownMenuSeparator, EditableSection, EmojiInput, EmojiPicker, EmojiPickerPopover, EmojiTextarea, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, ErrorState, ExpandableText, FeedVideoPlayer, FieldMessage, ImageLightbox, LanguageContext, LanguageSwitcher, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, MediaCarousel, MediaViewerDialog, Message, MessageAvatar, MessageComposer, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, OrgSwitcher, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT, PaymentIcon, PhoneInput, PlatformAccountMenu, PlatformNavbar, ScrollRestorationProvider, SearchCommand, SearchablePicker, SupportMessengerProvider, ThemeSwitcher, VerifiedProfessionalBadge, VideoPlayer, ZOOM_PAN_MAX_SCALE, ZOOM_PAN_MIN_SCALE, ZOOM_PAN_SWIPE_COMMIT_PX, ZOOM_PAN_SWIPE_SNAP_MS, avatarFallbackStyle, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, formatPaymentCardBrand, fuzzyMatch, getAvatarColors, getInitials, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, normalizePaymentCardBrand, paymentIconBrandFromStripe, paymentTypeFromStripeBrand, prefersReducedMotion, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery2 as useMediaQuery, usePlaybackStats, useRealtimeChannel, useRestorableState, useScrollFadeXEdges, useScrollRestorationContext, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional, useZoomPanGestures, zoomToward };
9378
+ export { AvatarEditor, AvatarEditorDialog, BrandX, Bubble, BubbleContent, BubbleGroup, BubbleReactions, ChatMessageList, ConfirmDestructiveDialog, DEFAULT_EDITABLE_SECTION_LABELS, DataList, DataListItem, DropdownMenuItem, DropdownMenuSeparator, EditableSection, EmojiInput, EmojiPicker, EmojiPickerPopover, EmojiTextarea, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, ErrorState, ExpandableText, FeedVideoPlayer, FieldMessage, ImageLightbox, LanguageContext, LanguageSwitcher, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, MediaCarousel, MediaViewerDialog, Message, MessageAvatar, MessageComposer, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, OrgSwitcher, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT, PaymentIcon, PhoneInput, PlatformAccountMenu, PlatformNavbar, SafeImage, ScrollRestorationProvider, SearchCommand, SearchablePicker, SupportMessengerProvider, ThemeSwitcher, VerifiedProfessionalBadge, VideoPlayer, ZOOM_PAN_MAX_SCALE, ZOOM_PAN_MIN_SCALE, ZOOM_PAN_SWIPE_COMMIT_PX, ZOOM_PAN_SWIPE_SNAP_MS, avatarFallbackStyle, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, formatPaymentCardBrand, fuzzyMatch, getAvatarColors, getInitials, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, normalizePaymentCardBrand, paymentIconBrandFromStripe, paymentTypeFromStripeBrand, prefersReducedMotion, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useEditableSection, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery2 as useMediaQuery, usePlaybackStats, useRealtimeChannel, useRestorableState, useScrollFadeXEdges, useScrollRestorationContext, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional, useZoomPanGestures, zoomToward };
9314
9379
  //# sourceMappingURL=index.js.map
9315
9380
  //# sourceMappingURL=index.js.map