@sesionario/blocks 1.30.0 → 1.31.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
@@ -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,34 @@ function useZoomPanGestures(options = {}) {
1142
1142
  clearSnapBack
1143
1143
  };
1144
1144
  }
1145
+ function SafeImage({
1146
+ src,
1147
+ fallback,
1148
+ alt = "",
1149
+ onError,
1150
+ ...imgProps
1151
+ }) {
1152
+ const [failed, setFailed] = useState(false);
1153
+ const resolvedSrc = typeof src === "string" && src.length > 0 ? src : null;
1154
+ useEffect(() => {
1155
+ setFailed(false);
1156
+ }, [resolvedSrc]);
1157
+ if (!resolvedSrc || failed) {
1158
+ return /* @__PURE__ */ jsx(Fragment, { children: fallback });
1159
+ }
1160
+ return /* @__PURE__ */ jsx(
1161
+ "img",
1162
+ {
1163
+ ...imgProps,
1164
+ src: resolvedSrc,
1165
+ alt,
1166
+ onError: (event) => {
1167
+ setFailed(true);
1168
+ onError?.(event);
1169
+ }
1170
+ }
1171
+ );
1172
+ }
1145
1173
  function ImageLightbox({
1146
1174
  images,
1147
1175
  index,
@@ -1265,7 +1293,7 @@ function ImageLightbox({
1265
1293
  onPointerUp: handlers.onPointerUp,
1266
1294
  onPointerCancel: handlers.onPointerCancel,
1267
1295
  children: /* @__PURE__ */ jsx(
1268
- "img",
1296
+ SafeImage,
1269
1297
  {
1270
1298
  src: images[index],
1271
1299
  alt: "",
@@ -1276,7 +1304,14 @@ function ImageLightbox({
1276
1304
  transition,
1277
1305
  cursor: scale > ZOOM_PAN_MIN_SCALE ? "grab" : "default"
1278
1306
  },
1279
- onTransitionEnd: clearSnapBack
1307
+ onTransitionEnd: clearSnapBack,
1308
+ fallback: /* @__PURE__ */ jsx(
1309
+ "div",
1310
+ {
1311
+ "aria-hidden": true,
1312
+ className: "h-48 w-full max-w-md rounded-lg bg-muted"
1313
+ }
1314
+ )
1280
1315
  }
1281
1316
  )
1282
1317
  }
@@ -1390,7 +1425,7 @@ function MediaCarousel({
1390
1425
  onPointerUp: handlers.onPointerUp,
1391
1426
  onPointerCancel: handlers.onPointerCancel,
1392
1427
  children: /* @__PURE__ */ jsx(
1393
- "img",
1428
+ SafeImage,
1394
1429
  {
1395
1430
  src: item.src,
1396
1431
  alt: item.alt ?? "",
@@ -1401,7 +1436,14 @@ function MediaCarousel({
1401
1436
  transition,
1402
1437
  cursor: scale > ZOOM_PAN_MIN_SCALE ? "grab" : "default"
1403
1438
  },
1404
- onTransitionEnd: clearSnapBack
1439
+ onTransitionEnd: clearSnapBack,
1440
+ fallback: /* @__PURE__ */ jsx(
1441
+ "div",
1442
+ {
1443
+ "aria-hidden": true,
1444
+ className: "h-48 w-full max-w-md rounded-lg bg-muted"
1445
+ }
1446
+ )
1405
1447
  }
1406
1448
  )
1407
1449
  }
@@ -2075,8 +2117,16 @@ function TenantAvatar({
2075
2117
  "flex shrink-0 items-center justify-center overflow-hidden rounded-full font-medium",
2076
2118
  sizeClass
2077
2119
  ),
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) })
2120
+ style: avatarFallbackStyle(name),
2121
+ children: /* @__PURE__ */ jsx(
2122
+ SafeImage,
2123
+ {
2124
+ src: logo,
2125
+ alt: "",
2126
+ className: "size-full object-cover",
2127
+ fallback: /* @__PURE__ */ jsx("span", { className: textClass, children: getInitials(name) })
2128
+ }
2129
+ )
2080
2130
  }
2081
2131
  );
2082
2132
  }
@@ -2596,6 +2646,14 @@ function MenuAvatar({
2596
2646
  sizeClass
2597
2647
  }) {
2598
2648
  const initials = getInitials(name);
2649
+ const initialsFallback = /* @__PURE__ */ jsx(
2650
+ "span",
2651
+ {
2652
+ className: "flex size-full items-center justify-center text-xs font-semibold",
2653
+ style: avatarFallbackStyle(name),
2654
+ children: initials
2655
+ }
2656
+ );
2599
2657
  return /* @__PURE__ */ jsx(
2600
2658
  "span",
2601
2659
  {
@@ -2603,19 +2661,13 @@ function MenuAvatar({
2603
2661
  "relative flex shrink-0 overflow-hidden rounded-full",
2604
2662
  sizeClass
2605
2663
  ),
2606
- children: image ? /* @__PURE__ */ jsx(
2607
- "img",
2664
+ children: /* @__PURE__ */ jsx(
2665
+ SafeImage,
2608
2666
  {
2609
2667
  src: image,
2610
2668
  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
2669
+ className: "aspect-square size-full object-cover",
2670
+ fallback: initialsFallback
2619
2671
  }
2620
2672
  )
2621
2673
  }
@@ -3709,30 +3761,31 @@ function AvatarEditorDialog({
3709
3761
  {
3710
3762
  className: "relative w-full h-full rounded-full overflow-hidden bg-muted border-2 border-border flex items-center justify-center",
3711
3763
  style: { width: displaySize, height: displaySize },
3712
- children: value ? /* @__PURE__ */ jsx(
3713
- "img",
3764
+ children: /* @__PURE__ */ jsx(
3765
+ SafeImage,
3714
3766
  {
3715
- src: value || "/placeholder.svg",
3767
+ src: value,
3716
3768
  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
- ]
3769
+ className: "absolute -inset-px object-cover",
3770
+ fallback: /* @__PURE__ */ jsxs(
3771
+ "div",
3772
+ {
3773
+ className: cn(
3774
+ "flex flex-col items-center justify-center text-muted-foreground",
3775
+ caption ? "gap-1" : "gap-0"
3776
+ ),
3777
+ children: [
3778
+ /* @__PURE__ */ jsx(
3779
+ User,
3780
+ {
3781
+ className: "h-1/2 w-1/2 max-h-[55%] max-w-[55%] shrink-0",
3782
+ "aria-hidden": true
3783
+ }
3784
+ ),
3785
+ caption ? /* @__PURE__ */ jsx("span", { className: "text-xs text-center px-1", children: caption }) : null
3786
+ ]
3787
+ }
3788
+ )
3736
3789
  }
3737
3790
  )
3738
3791
  }
@@ -8798,15 +8851,16 @@ function ListPanel({
8798
8851
  "span",
8799
8852
  {
8800
8853
  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",
8854
+ style: avatarFallbackStyle(item.title),
8855
+ children: /* @__PURE__ */ jsx(
8856
+ SafeImage,
8804
8857
  {
8805
8858
  src: item.avatarUrl,
8806
8859
  alt: "",
8807
- className: "size-full object-cover"
8860
+ className: "size-full object-cover",
8861
+ fallback: getInitials(item.title)
8808
8862
  }
8809
- ) : getInitials(item.title)
8863
+ )
8810
8864
  }
8811
8865
  ),
8812
8866
  /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
@@ -9310,6 +9364,6 @@ function useRealtimeChannel({
9310
9364
  }, [enabled, reconnectDelayMs]);
9311
9365
  }
9312
9366
 
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 };
9367
+ 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
9368
  //# sourceMappingURL=index.js.map
9315
9369
  //# sourceMappingURL=index.js.map