@sesionario/blocks 1.18.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/index.cjs +62 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.js +59 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -7,6 +7,7 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
|
7
7
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
8
8
|
import { HlsConfig, RetryConfig, LoaderResponse } from 'hls.js';
|
|
9
9
|
import * as RPNInput from 'react-phone-number-input';
|
|
10
|
+
import { PaymentType } from 'react-svg-credit-card-payment-icons';
|
|
10
11
|
import { MessageScroller as MessageScroller$1 } from '@shadcn/react/message-scroller';
|
|
11
12
|
export { useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from '@shadcn/react/message-scroller';
|
|
12
13
|
import { ClassValue } from 'clsx';
|
|
@@ -1030,6 +1031,36 @@ interface MexicoMapProps {
|
|
|
1030
1031
|
}
|
|
1031
1032
|
declare function MexicoMap({ selected, onToggle, className }: MexicoMapProps): React.JSX.Element;
|
|
1032
1033
|
|
|
1034
|
+
type PaymentIconFormat = "flat" | "flatRounded" | "logo" | "logoBorder" | "mono" | "monoOutline";
|
|
1035
|
+
interface PaymentIconProps {
|
|
1036
|
+
/** Stripe `card.brand` (e.g. `"amex"`). Null/unknown → Generic. */
|
|
1037
|
+
brand: string | null | undefined;
|
|
1038
|
+
/** Visual style from react-svg-credit-card-payment-icons. */
|
|
1039
|
+
format?: PaymentIconFormat;
|
|
1040
|
+
width?: number;
|
|
1041
|
+
height?: number;
|
|
1042
|
+
className?: string;
|
|
1043
|
+
}
|
|
1044
|
+
/**
|
|
1045
|
+
* Stripe-friendly payment brand mark (wraps react-svg-credit-card-payment-icons).
|
|
1046
|
+
*
|
|
1047
|
+
* @example
|
|
1048
|
+
* ```tsx
|
|
1049
|
+
* <PaymentIcon brand="amex" />
|
|
1050
|
+
* <PaymentIcon brand={pm.cardBrand} format="flat" width={40} />
|
|
1051
|
+
* ```
|
|
1052
|
+
*/
|
|
1053
|
+
declare function PaymentIcon({ brand, format, width, height, className, }: PaymentIconProps): React.JSX.Element;
|
|
1054
|
+
|
|
1055
|
+
declare function normalizePaymentCardBrand(brand: string | null | undefined): string | null;
|
|
1056
|
+
/** Human-readable brand for UI (falls back to a tidy capitalization). */
|
|
1057
|
+
declare function formatPaymentCardBrand(brand: string | null | undefined): string;
|
|
1058
|
+
/**
|
|
1059
|
+
* Maps a Stripe `card.brand` (or similar) to an upstream payment-icon type.
|
|
1060
|
+
* Unknown / empty brands resolve to `Generic`.
|
|
1061
|
+
*/
|
|
1062
|
+
declare function paymentTypeFromStripeBrand(brand: string | null | undefined): PaymentType;
|
|
1063
|
+
|
|
1033
1064
|
declare const MEXICO_STATE_PATHS: Record<MexicoStateId, string>;
|
|
1034
1065
|
|
|
1035
1066
|
declare function MessageGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
@@ -1289,4 +1320,4 @@ declare function useRealtimeChannel({ getWsUrl, onEvent, enabled, reconnectDelay
|
|
|
1289
1320
|
|
|
1290
1321
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1291
1322
|
|
|
1292
|
-
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ConversationKind, type DescribedPlaybackError, DropdownMenuItem, DropdownMenuSeparator, 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, 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, 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, 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 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, fuzzyMatch, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats, useRealtimeChannel, useScrollFadeXEdges, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
|
1323
|
+
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ConversationKind, type DescribedPlaybackError, DropdownMenuItem, DropdownMenuSeparator, 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, 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, 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 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, paymentTypeFromStripeBrand, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats, useRealtimeChannel, useScrollFadeXEdges, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
|
7
7
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
8
8
|
import { HlsConfig, RetryConfig, LoaderResponse } from 'hls.js';
|
|
9
9
|
import * as RPNInput from 'react-phone-number-input';
|
|
10
|
+
import { PaymentType } from 'react-svg-credit-card-payment-icons';
|
|
10
11
|
import { MessageScroller as MessageScroller$1 } from '@shadcn/react/message-scroller';
|
|
11
12
|
export { useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from '@shadcn/react/message-scroller';
|
|
12
13
|
import { ClassValue } from 'clsx';
|
|
@@ -1030,6 +1031,36 @@ interface MexicoMapProps {
|
|
|
1030
1031
|
}
|
|
1031
1032
|
declare function MexicoMap({ selected, onToggle, className }: MexicoMapProps): React.JSX.Element;
|
|
1032
1033
|
|
|
1034
|
+
type PaymentIconFormat = "flat" | "flatRounded" | "logo" | "logoBorder" | "mono" | "monoOutline";
|
|
1035
|
+
interface PaymentIconProps {
|
|
1036
|
+
/** Stripe `card.brand` (e.g. `"amex"`). Null/unknown → Generic. */
|
|
1037
|
+
brand: string | null | undefined;
|
|
1038
|
+
/** Visual style from react-svg-credit-card-payment-icons. */
|
|
1039
|
+
format?: PaymentIconFormat;
|
|
1040
|
+
width?: number;
|
|
1041
|
+
height?: number;
|
|
1042
|
+
className?: string;
|
|
1043
|
+
}
|
|
1044
|
+
/**
|
|
1045
|
+
* Stripe-friendly payment brand mark (wraps react-svg-credit-card-payment-icons).
|
|
1046
|
+
*
|
|
1047
|
+
* @example
|
|
1048
|
+
* ```tsx
|
|
1049
|
+
* <PaymentIcon brand="amex" />
|
|
1050
|
+
* <PaymentIcon brand={pm.cardBrand} format="flat" width={40} />
|
|
1051
|
+
* ```
|
|
1052
|
+
*/
|
|
1053
|
+
declare function PaymentIcon({ brand, format, width, height, className, }: PaymentIconProps): React.JSX.Element;
|
|
1054
|
+
|
|
1055
|
+
declare function normalizePaymentCardBrand(brand: string | null | undefined): string | null;
|
|
1056
|
+
/** Human-readable brand for UI (falls back to a tidy capitalization). */
|
|
1057
|
+
declare function formatPaymentCardBrand(brand: string | null | undefined): string;
|
|
1058
|
+
/**
|
|
1059
|
+
* Maps a Stripe `card.brand` (or similar) to an upstream payment-icon type.
|
|
1060
|
+
* Unknown / empty brands resolve to `Generic`.
|
|
1061
|
+
*/
|
|
1062
|
+
declare function paymentTypeFromStripeBrand(brand: string | null | undefined): PaymentType;
|
|
1063
|
+
|
|
1033
1064
|
declare const MEXICO_STATE_PATHS: Record<MexicoStateId, string>;
|
|
1034
1065
|
|
|
1035
1066
|
declare function MessageGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
@@ -1289,4 +1320,4 @@ declare function useRealtimeChannel({ getWsUrl, onEvent, enabled, reconnectDelay
|
|
|
1289
1320
|
|
|
1290
1321
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1291
1322
|
|
|
1292
|
-
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ConversationKind, type DescribedPlaybackError, DropdownMenuItem, DropdownMenuSeparator, 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, 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, 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, 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 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, fuzzyMatch, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats, useRealtimeChannel, useScrollFadeXEdges, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
|
1323
|
+
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ConversationKind, type DescribedPlaybackError, DropdownMenuItem, DropdownMenuSeparator, 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, 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, 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 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, paymentTypeFromStripeBrand, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats, useRealtimeChannel, useScrollFadeXEdges, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import { Command as Command$1 } from 'cmdk';
|
|
|
21
21
|
import * as RPNInput from 'react-phone-number-input';
|
|
22
22
|
import flags from 'react-phone-number-input/flags';
|
|
23
23
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
24
|
+
import { PaymentIcon as PaymentIcon$1 } from 'react-svg-credit-card-payment-icons';
|
|
24
25
|
import { MessageScroller as MessageScroller$1 } from '@shadcn/react/message-scroller';
|
|
25
26
|
export { useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from '@shadcn/react/message-scroller';
|
|
26
27
|
|
|
@@ -6479,6 +6480,63 @@ function MexicoMap({ selected, onToggle, className }) {
|
|
|
6479
6480
|
}
|
|
6480
6481
|
);
|
|
6481
6482
|
}
|
|
6483
|
+
|
|
6484
|
+
// src/lib/paymentCardBrand.ts
|
|
6485
|
+
var CARD_BRAND_LABELS = {
|
|
6486
|
+
visa: "Visa",
|
|
6487
|
+
mastercard: "Mastercard",
|
|
6488
|
+
amex: "American Express",
|
|
6489
|
+
discover: "Discover",
|
|
6490
|
+
diners: "Diners Club",
|
|
6491
|
+
jcb: "JCB",
|
|
6492
|
+
unionpay: "UnionPay"
|
|
6493
|
+
};
|
|
6494
|
+
var STRIPE_TO_PAYMENT_TYPE = {
|
|
6495
|
+
visa: "Visa",
|
|
6496
|
+
mastercard: "Mastercard",
|
|
6497
|
+
amex: "AmericanExpress",
|
|
6498
|
+
discover: "Discover",
|
|
6499
|
+
diners: "DinersClub",
|
|
6500
|
+
jcb: "JCB",
|
|
6501
|
+
unionpay: "UnionPay"
|
|
6502
|
+
};
|
|
6503
|
+
function normalizePaymentCardBrand(brand) {
|
|
6504
|
+
if (!brand?.trim()) return null;
|
|
6505
|
+
return brand.trim().toLowerCase();
|
|
6506
|
+
}
|
|
6507
|
+
function formatPaymentCardBrand(brand) {
|
|
6508
|
+
if (!brand?.trim()) return "Card";
|
|
6509
|
+
const key = brand.trim().toLowerCase();
|
|
6510
|
+
const known = CARD_BRAND_LABELS[key];
|
|
6511
|
+
if (known) return known;
|
|
6512
|
+
return key.charAt(0).toUpperCase() + key.slice(1);
|
|
6513
|
+
}
|
|
6514
|
+
function paymentTypeFromStripeBrand(brand) {
|
|
6515
|
+
const key = normalizePaymentCardBrand(brand);
|
|
6516
|
+
if (!key) return "Generic";
|
|
6517
|
+
return STRIPE_TO_PAYMENT_TYPE[key] ?? "Generic";
|
|
6518
|
+
}
|
|
6519
|
+
var DEFAULT_FORMAT = "flatRounded";
|
|
6520
|
+
var DEFAULT_WIDTH = 36;
|
|
6521
|
+
function PaymentIcon({
|
|
6522
|
+
brand,
|
|
6523
|
+
format = DEFAULT_FORMAT,
|
|
6524
|
+
width = DEFAULT_WIDTH,
|
|
6525
|
+
height,
|
|
6526
|
+
className
|
|
6527
|
+
}) {
|
|
6528
|
+
return /* @__PURE__ */ jsx(
|
|
6529
|
+
PaymentIcon$1,
|
|
6530
|
+
{
|
|
6531
|
+
type: paymentTypeFromStripeBrand(brand),
|
|
6532
|
+
format,
|
|
6533
|
+
width,
|
|
6534
|
+
height,
|
|
6535
|
+
className: cn("inline-block shrink-0", className),
|
|
6536
|
+
"aria-hidden": true
|
|
6537
|
+
}
|
|
6538
|
+
);
|
|
6539
|
+
}
|
|
6482
6540
|
function MessageGroup({ className, ...props }) {
|
|
6483
6541
|
return /* @__PURE__ */ jsx(
|
|
6484
6542
|
"div",
|
|
@@ -7809,6 +7867,6 @@ function useRealtimeChannel({
|
|
|
7809
7867
|
}, [enabled, reconnectDelayMs]);
|
|
7810
7868
|
}
|
|
7811
7869
|
|
|
7812
|
-
export { AvatarEditor, AvatarEditorDialog, Bubble, BubbleContent, BubbleGroup, BubbleReactions, ChatMessageList, ConfirmDestructiveDialog, DropdownMenuItem, DropdownMenuSeparator, EmojiInput, EmojiPicker, EmojiPickerPopover, EmojiTextarea, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, ErrorState, ExpandableText, FeedVideoPlayer, ImageLightbox, LanguageContext, LanguageSwitcher, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageComposer, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, OrgSwitcher, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT, PhoneInput, PlatformAccountMenu, PlatformNavbar, SearchCommand, SearchablePicker, SupportMessengerProvider, ThemeSwitcher, VerifiedProfessionalBadge, VideoPlayer, avatarFallbackStyle, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, fuzzyMatch, getAvatarColors, getInitials, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery2 as useMediaQuery, usePlaybackStats, useRealtimeChannel, useScrollFadeXEdges, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
|
7870
|
+
export { AvatarEditor, AvatarEditorDialog, Bubble, BubbleContent, BubbleGroup, BubbleReactions, ChatMessageList, ConfirmDestructiveDialog, DropdownMenuItem, DropdownMenuSeparator, EmojiInput, EmojiPicker, EmojiPickerPopover, EmojiTextarea, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, ErrorState, ExpandableText, FeedVideoPlayer, ImageLightbox, LanguageContext, LanguageSwitcher, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageComposer, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, OrgSwitcher, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT, PaymentIcon, PhoneInput, PlatformAccountMenu, PlatformNavbar, SearchCommand, SearchablePicker, SupportMessengerProvider, ThemeSwitcher, VerifiedProfessionalBadge, VideoPlayer, avatarFallbackStyle, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, formatPaymentCardBrand, fuzzyMatch, getAvatarColors, getInitials, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, normalizePaymentCardBrand, paymentTypeFromStripeBrand, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useFeedExclusivePlayback, useHlsPlayback, useLanguageContext, useMediaQuery2 as useMediaQuery, usePlaybackStats, useRealtimeChannel, useScrollFadeXEdges, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
|
7813
7871
|
//# sourceMappingURL=index.js.map
|
|
7814
7872
|
//# sourceMappingURL=index.js.map
|