@sesionario/blocks 1.41.0 → 1.42.0-rc.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
@@ -1178,6 +1178,27 @@ type PhoneInputProps = Omit<React.ComponentProps<"input">, "onChange" | "value"
1178
1178
  };
1179
1179
  declare const PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps>;
1180
1180
 
1181
+ /** Mexican RFC (Registro Federal de Contribuyentes) helpers for form inputs. */
1182
+ type RfcKind = "fisica" | "moral" | "both";
1183
+ declare function normalizeRfc(rfc: string): string;
1184
+ /** Uppercase, keep RFC alphabet only, cap length for the given kind. */
1185
+ declare function formatRfcInput(raw: string, kind?: RfcKind): string;
1186
+ declare function isValidPersonaFisicaRfc(rfc: string): boolean;
1187
+ declare function isValidPersonaMoralRfc(rfc: string): boolean;
1188
+ declare function isValidRfc(rfc: string): boolean;
1189
+
1190
+ /**
1191
+ * Thin RFC text control: uppercase, RFC alphabet only, length capped by kind.
1192
+ * Callers keep their own Label / Field / FieldMessage chrome.
1193
+ */
1194
+
1195
+ type RfcInputProps = Omit<React.ComponentProps<"input">, "onChange" | "value" | "type" | "maxLength"> & {
1196
+ value: string;
1197
+ onChange: (next: string) => void;
1198
+ kind?: RfcKind;
1199
+ };
1200
+ declare const RfcInput: React.ForwardRefExoticComponent<Omit<RfcInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
1201
+
1181
1202
  type MexicoStateId = "MXAGU" | "MXBCN" | "MXBCS" | "MXCAM" | "MXCHP" | "MXCHH" | "MXCMX" | "MXCOA" | "MXCOL" | "MXDUR" | "MXGUA" | "MXGRO" | "MXHID" | "MXJAL" | "MXMEX" | "MXMIC" | "MXMOR" | "MXNAY" | "MXNLE" | "MXOAX" | "MXPUE" | "MXQUE" | "MXROO" | "MXSLP" | "MXSIN" | "MXSON" | "MXTAB" | "MXTAM" | "MXTLA" | "MXVER" | "MXYUC" | "MXZAC";
1182
1203
  interface MexicoState {
1183
1204
  id: MexicoStateId;
@@ -1522,4 +1543,4 @@ declare function MembershipInvitePanel({ basePath, query, onQueryChange, onNotif
1522
1543
 
1523
1544
  declare function cn(...inputs: ClassValue[]): string;
1524
1545
 
1525
- export { 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, 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, FieldMessage, type FieldMessageProps, type FindOrCreateConversationInput, 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, MembershipInvitePanel, type MembershipInvitePanelProps, 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 ProfessionalVerificationStatus, 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 UseRealtimeChannelOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, type UseSupportConversationOptions, type UseSupportConversationResult, type UseZoomPanGesturesOptions, type UseZoomPanGesturesResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, type VisualViewportMetrics, ZOOM_PAN_MAX_SCALE, ZOOM_PAN_MIN_SCALE, ZOOM_PAN_SWIPE_COMMIT_PX, ZOOM_PAN_SWIPE_SNAP_MS, type ZoomPanTransform, blurDataUrlFromBlob, bubbleVariants, cn, createSupportChatClient, defaultLanguages, formatPaymentCardBrand, fuzzyMatch, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, normalizePaymentCardBrand, paymentIconBrandFromStripe, paymentTypeFromStripeBrand, prefersReducedMotion, useDebouncedValue, useDebouncedValueStrict, useEditableSection, useLanguageContext, useMediaQuery, useRealtimeChannel, useRegisterScrollContainer, useRestorableState, useScrollFadeXEdges, useScrollRestorationContext, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional, useVisualViewportMetrics, useZoomPanGestures, zoomToward };
1546
+ export { 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, 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, FieldMessage, type FieldMessageProps, type FindOrCreateConversationInput, 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, MembershipInvitePanel, type MembershipInvitePanelProps, 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 ProfessionalVerificationStatus, type RealtimeEvent, RfcInput, type RfcInputProps, type RfcKind, 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 UseRealtimeChannelOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, type UseSupportConversationOptions, type UseSupportConversationResult, type UseZoomPanGesturesOptions, type UseZoomPanGesturesResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, type VisualViewportMetrics, ZOOM_PAN_MAX_SCALE, ZOOM_PAN_MIN_SCALE, ZOOM_PAN_SWIPE_COMMIT_PX, ZOOM_PAN_SWIPE_SNAP_MS, type ZoomPanTransform, blurDataUrlFromBlob, bubbleVariants, cn, createSupportChatClient, defaultLanguages, formatPaymentCardBrand, formatRfcInput, fuzzyMatch, insertAtCaret, isValidPersonaFisicaRfc, isValidPersonaMoralRfc, isValidRfc, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, normalizePaymentCardBrand, normalizeRfc, paymentIconBrandFromStripe, paymentTypeFromStripeBrand, prefersReducedMotion, useDebouncedValue, useDebouncedValueStrict, useEditableSection, useLanguageContext, useMediaQuery, useRealtimeChannel, useRegisterScrollContainer, useRestorableState, useScrollFadeXEdges, useScrollRestorationContext, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional, useVisualViewportMetrics, useZoomPanGestures, zoomToward };
package/dist/index.d.ts CHANGED
@@ -1178,6 +1178,27 @@ type PhoneInputProps = Omit<React.ComponentProps<"input">, "onChange" | "value"
1178
1178
  };
1179
1179
  declare const PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps>;
1180
1180
 
1181
+ /** Mexican RFC (Registro Federal de Contribuyentes) helpers for form inputs. */
1182
+ type RfcKind = "fisica" | "moral" | "both";
1183
+ declare function normalizeRfc(rfc: string): string;
1184
+ /** Uppercase, keep RFC alphabet only, cap length for the given kind. */
1185
+ declare function formatRfcInput(raw: string, kind?: RfcKind): string;
1186
+ declare function isValidPersonaFisicaRfc(rfc: string): boolean;
1187
+ declare function isValidPersonaMoralRfc(rfc: string): boolean;
1188
+ declare function isValidRfc(rfc: string): boolean;
1189
+
1190
+ /**
1191
+ * Thin RFC text control: uppercase, RFC alphabet only, length capped by kind.
1192
+ * Callers keep their own Label / Field / FieldMessage chrome.
1193
+ */
1194
+
1195
+ type RfcInputProps = Omit<React.ComponentProps<"input">, "onChange" | "value" | "type" | "maxLength"> & {
1196
+ value: string;
1197
+ onChange: (next: string) => void;
1198
+ kind?: RfcKind;
1199
+ };
1200
+ declare const RfcInput: React.ForwardRefExoticComponent<Omit<RfcInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
1201
+
1181
1202
  type MexicoStateId = "MXAGU" | "MXBCN" | "MXBCS" | "MXCAM" | "MXCHP" | "MXCHH" | "MXCMX" | "MXCOA" | "MXCOL" | "MXDUR" | "MXGUA" | "MXGRO" | "MXHID" | "MXJAL" | "MXMEX" | "MXMIC" | "MXMOR" | "MXNAY" | "MXNLE" | "MXOAX" | "MXPUE" | "MXQUE" | "MXROO" | "MXSLP" | "MXSIN" | "MXSON" | "MXTAB" | "MXTAM" | "MXTLA" | "MXVER" | "MXYUC" | "MXZAC";
1182
1203
  interface MexicoState {
1183
1204
  id: MexicoStateId;
@@ -1522,4 +1543,4 @@ declare function MembershipInvitePanel({ basePath, query, onQueryChange, onNotif
1522
1543
 
1523
1544
  declare function cn(...inputs: ClassValue[]): string;
1524
1545
 
1525
- export { 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, 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, FieldMessage, type FieldMessageProps, type FindOrCreateConversationInput, 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, MembershipInvitePanel, type MembershipInvitePanelProps, 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 ProfessionalVerificationStatus, 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 UseRealtimeChannelOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, type UseSupportConversationOptions, type UseSupportConversationResult, type UseZoomPanGesturesOptions, type UseZoomPanGesturesResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, type VisualViewportMetrics, ZOOM_PAN_MAX_SCALE, ZOOM_PAN_MIN_SCALE, ZOOM_PAN_SWIPE_COMMIT_PX, ZOOM_PAN_SWIPE_SNAP_MS, type ZoomPanTransform, blurDataUrlFromBlob, bubbleVariants, cn, createSupportChatClient, defaultLanguages, formatPaymentCardBrand, fuzzyMatch, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, normalizePaymentCardBrand, paymentIconBrandFromStripe, paymentTypeFromStripeBrand, prefersReducedMotion, useDebouncedValue, useDebouncedValueStrict, useEditableSection, useLanguageContext, useMediaQuery, useRealtimeChannel, useRegisterScrollContainer, useRestorableState, useScrollFadeXEdges, useScrollRestorationContext, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional, useVisualViewportMetrics, useZoomPanGestures, zoomToward };
1546
+ export { 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, 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, FieldMessage, type FieldMessageProps, type FindOrCreateConversationInput, 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, MembershipInvitePanel, type MembershipInvitePanelProps, 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 ProfessionalVerificationStatus, type RealtimeEvent, RfcInput, type RfcInputProps, type RfcKind, 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 UseRealtimeChannelOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, type UseSupportConversationOptions, type UseSupportConversationResult, type UseZoomPanGesturesOptions, type UseZoomPanGesturesResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, type VisualViewportMetrics, ZOOM_PAN_MAX_SCALE, ZOOM_PAN_MIN_SCALE, ZOOM_PAN_SWIPE_COMMIT_PX, ZOOM_PAN_SWIPE_SNAP_MS, type ZoomPanTransform, blurDataUrlFromBlob, bubbleVariants, cn, createSupportChatClient, defaultLanguages, formatPaymentCardBrand, formatRfcInput, fuzzyMatch, insertAtCaret, isValidPersonaFisicaRfc, isValidPersonaMoralRfc, isValidRfc, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, normalizePaymentCardBrand, normalizeRfc, paymentIconBrandFromStripe, paymentTypeFromStripeBrand, prefersReducedMotion, useDebouncedValue, useDebouncedValueStrict, useEditableSection, useLanguageContext, useMediaQuery, useRealtimeChannel, useRegisterScrollContainer, useRestorableState, useScrollFadeXEdges, useScrollRestorationContext, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional, useVisualViewportMetrics, useZoomPanGestures, zoomToward };
package/dist/index.js CHANGED
@@ -6438,6 +6438,59 @@ var FlagComponent = ({ country, countryName }) => {
6438
6438
  return /* @__PURE__ */ jsx("span", { className: "flex h-4 w-6 overflow-hidden rounded-sm bg-foreground/20 [&_svg:not([class*='size-'])]:size-full", children: Flag2 && /* @__PURE__ */ jsx(Flag2, { title: countryName }) });
6439
6439
  };
6440
6440
 
6441
+ // src/lib/rfc.ts
6442
+ var RFC_PERSONA_FISICA_RE = /^[A-ZÑ&]{4}\d{6}[A-Z0-9]{2}[0-9A]$/;
6443
+ var RFC_PERSONA_MORAL_RE = /^[A-ZÑ&]{3}\d{6}[A-Z0-9]{2}[0-9A]$/;
6444
+ var RFC_INPUT_CHARS_RE = /[^A-ZÑ&0-9]/g;
6445
+ function normalizeRfc(rfc) {
6446
+ return rfc.trim().toUpperCase().replace(/\s|-/g, "");
6447
+ }
6448
+ function formatRfcInput(raw, kind = "both") {
6449
+ const cleaned = raw.toUpperCase().replace(RFC_INPUT_CHARS_RE, "");
6450
+ const max = kind === "moral" ? 12 : 13;
6451
+ return cleaned.slice(0, max);
6452
+ }
6453
+ function isValidPersonaFisicaRfc(rfc) {
6454
+ const value = normalizeRfc(rfc);
6455
+ return value.length === 13 && RFC_PERSONA_FISICA_RE.test(value);
6456
+ }
6457
+ function isValidPersonaMoralRfc(rfc) {
6458
+ const value = normalizeRfc(rfc);
6459
+ return value.length === 12 && RFC_PERSONA_MORAL_RE.test(value);
6460
+ }
6461
+ function isValidRfc(rfc) {
6462
+ return isValidPersonaFisicaRfc(rfc) || isValidPersonaMoralRfc(rfc);
6463
+ }
6464
+ var RfcInput = React2.forwardRef(
6465
+ ({
6466
+ className,
6467
+ value,
6468
+ onChange,
6469
+ kind = "both",
6470
+ autoComplete = "off",
6471
+ ...props
6472
+ }, ref) => {
6473
+ const maxLength = kind === "moral" ? 12 : 13;
6474
+ return /* @__PURE__ */ jsx(
6475
+ Input,
6476
+ {
6477
+ ...props,
6478
+ ref,
6479
+ type: "text",
6480
+ autoCapitalize: "characters",
6481
+ autoCorrect: "off",
6482
+ spellCheck: false,
6483
+ autoComplete,
6484
+ maxLength,
6485
+ value,
6486
+ className: cn("uppercase tracking-wide", className),
6487
+ onChange: (event) => onChange(formatRfcInput(event.target.value, kind))
6488
+ }
6489
+ );
6490
+ }
6491
+ );
6492
+ RfcInput.displayName = "RfcInput";
6493
+
6441
6494
  // src/data/mexicoStates.ts
6442
6495
  var MEXICO_STATES = [
6443
6496
  { id: "MXAGU", name: "Aguascalientes" },
@@ -9092,6 +9145,6 @@ function MembershipInvitePanel({
9092
9145
  ] });
9093
9146
  }
9094
9147
 
9095
- 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, FieldMessage, ImageLightbox, LanguageContext, LanguageSwitcher, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, MediaCarousel, MediaViewerDialog, MembershipInvitePanel, 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, ZOOM_PAN_MAX_SCALE, ZOOM_PAN_MIN_SCALE, ZOOM_PAN_SWIPE_COMMIT_PX, ZOOM_PAN_SWIPE_SNAP_MS, avatarFallbackStyle, blurDataUrlFromBlob, bubbleVariants, cn, createSupportChatClient, defaultLanguages, formatPaymentCardBrand, fuzzyMatch, getAvatarColors, getInitials, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, normalizePaymentCardBrand, paymentIconBrandFromStripe, paymentTypeFromStripeBrand, prefersReducedMotion, useDebouncedValue, useDebouncedValueStrict, useEditableSection, useLanguageContext, useMediaQuery2 as useMediaQuery, useRealtimeChannel, useRegisterScrollContainer, useRestorableState, useScrollFadeXEdges, useScrollRestorationContext, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional, useVisualViewportMetrics, useZoomPanGestures, zoomToward };
9148
+ 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, FieldMessage, ImageLightbox, LanguageContext, LanguageSwitcher, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, MediaCarousel, MediaViewerDialog, MembershipInvitePanel, Message, MessageAvatar, MessageComposer, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, OrgSwitcher, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT, PaymentIcon, PhoneInput, PlatformAccountMenu, PlatformNavbar, RfcInput, SafeImage, ScrollRestorationProvider, SearchCommand, SearchablePicker, SupportMessengerProvider, ThemeSwitcher, VerifiedProfessionalBadge, ZOOM_PAN_MAX_SCALE, ZOOM_PAN_MIN_SCALE, ZOOM_PAN_SWIPE_COMMIT_PX, ZOOM_PAN_SWIPE_SNAP_MS, avatarFallbackStyle, blurDataUrlFromBlob, bubbleVariants, cn, createSupportChatClient, defaultLanguages, formatPaymentCardBrand, formatRfcInput, fuzzyMatch, getAvatarColors, getInitials, insertAtCaret, isValidPersonaFisicaRfc, isValidPersonaMoralRfc, isValidRfc, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, normalizePaymentCardBrand, normalizeRfc, paymentIconBrandFromStripe, paymentTypeFromStripeBrand, prefersReducedMotion, useDebouncedValue, useDebouncedValueStrict, useEditableSection, useLanguageContext, useMediaQuery2 as useMediaQuery, useRealtimeChannel, useRegisterScrollContainer, useRestorableState, useScrollFadeXEdges, useScrollRestorationContext, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional, useVisualViewportMetrics, useZoomPanGestures, zoomToward };
9096
9149
  //# sourceMappingURL=index.js.map
9097
9150
  //# sourceMappingURL=index.js.map