@algenium/blocks 1.22.0 → 1.23.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
@@ -15,6 +15,8 @@ import { Drawer as Drawer$1 } from 'vaul';
15
15
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
16
16
  import { Command as Command$1 } from 'cmdk';
17
17
  import * as RPNInput from 'react-phone-number-input';
18
+ import { PDFDocumentProxy } from 'pdfjs-dist';
19
+ import { DocumentInitParameters } from 'pdfjs-dist/types/src/display/api';
18
20
  import { ClassValue } from 'clsx';
19
21
 
20
22
  interface EventCategory {
@@ -1351,6 +1353,62 @@ interface CardInputProps {
1351
1353
  }
1352
1354
  declare function CardInput({ tokenize, value, onChange, acceptedBrands, requireHolderName, labels, disabled, largeText, className, onError, }: CardInputProps): react_jsx_runtime.JSX.Element;
1353
1355
 
1356
+ /**
1357
+ * Helpers for US address handling shared across blocks components.
1358
+ *
1359
+ * These utilities are intentionally pure (no React dependencies) so they
1360
+ * can be tested in isolation and reused in server-side code.
1361
+ */
1362
+ /**
1363
+ * Legacy US address shape used by backends that store street number and name
1364
+ * as separate fields (e.g. auth-svc /api/pre-approval → NLS AddressLine1).
1365
+ */
1366
+ interface USAddressLegacyValue {
1367
+ streetNumber: string;
1368
+ streetName: string;
1369
+ apt?: string;
1370
+ city: string;
1371
+ state: string;
1372
+ zipCode: string;
1373
+ country: "US";
1374
+ }
1375
+ /**
1376
+ * Splits a combined street string into number and name parts.
1377
+ *
1378
+ * Assumes standard US format where the number comes first:
1379
+ * "123 Main St" → { number: "123", name: "Main St" }
1380
+ * "100-B Oak Ave" → { number: "100-B", name: "Oak Ave" }
1381
+ * "Main St" → { number: "", name: "Main St" } (no leading number)
1382
+ */
1383
+ declare function splitStreet(street: string): {
1384
+ number: string;
1385
+ name: string;
1386
+ };
1387
+ /**
1388
+ * Joins street number and name back into a single combined street string.
1389
+ * Skips empty parts so "'' + 'Main St'" → "Main St".
1390
+ */
1391
+ declare function joinStreet(streetNumber: string, streetName: string): string;
1392
+ /**
1393
+ * Sanitizes a string for safe transmission to NLS.
1394
+ *
1395
+ * Keeps only printable ASCII characters that are valid in US postal addresses:
1396
+ * letters, digits, spaces, period, comma, apostrophe, hash, dash, forward-slash.
1397
+ * Collapses multiple spaces and trims.
1398
+ *
1399
+ * NOTE: does NOT truncate — apply slice(0, 40) at the NLS boundary using
1400
+ * composeAddressLine1ForNls to avoid silently deforming stored data.
1401
+ */
1402
+ declare function sanitizeForNls(input: string): string;
1403
+ /**
1404
+ * Composes and sanitizes the AddressLine1 field exactly as NLS expects it,
1405
+ * truncating to 40 characters maximum.
1406
+ *
1407
+ * Use this at the NLS boundary in auth-svc/src/lib/nls/customer.ts rather
1408
+ * than in the client, so stored DB values remain untruncated.
1409
+ */
1410
+ declare function composeAddressLine1ForNls(v: USAddressLegacyValue): string;
1411
+
1354
1412
  interface USAddressValue {
1355
1413
  street: string;
1356
1414
  street2?: string;
@@ -1416,8 +1474,26 @@ interface USAddressInputProps {
1416
1474
  largeText?: boolean;
1417
1475
  className?: string;
1418
1476
  onError?: (message: string) => void;
1477
+ /**
1478
+ * When true, the component also emits `onChangeLegacy` after every
1479
+ * `onChange` call with the address converted to the legacy split shape
1480
+ * ({ streetNumber, streetName, apt, city, state, zipCode }).
1481
+ * The UI and internal state remain unchanged — this is a purely additive
1482
+ * output transform. Default: false (backward-compatible).
1483
+ */
1484
+ legacyMode?: boolean;
1485
+ /**
1486
+ * Initial value in legacy format. Converted to the modern shape internally.
1487
+ * Ignored when `value` (modern) is provided — modern takes precedence.
1488
+ */
1489
+ valueLegacy?: USAddressLegacyValue;
1490
+ /**
1491
+ * Called alongside `onChange` when `legacyMode` is true.
1492
+ * Receives the address in the split legacy shape, sanitized for NLS.
1493
+ */
1494
+ onChangeLegacy?: (value: USAddressLegacyValue) => void;
1419
1495
  }
1420
- declare function USAddressInput({ value, onChange, lookupZip, validateAddress, autocomplete, labels, disabled, largeText, className, onError, }: USAddressInputProps): react_jsx_runtime.JSX.Element;
1496
+ declare function USAddressInput({ value, onChange, lookupZip, validateAddress, autocomplete, labels, disabled, largeText, className, onError, legacyMode, valueLegacy, onChangeLegacy, }: USAddressInputProps): react_jsx_runtime.JSX.Element;
1421
1497
 
1422
1498
  /**
1423
1499
  * International phone input with country picker (default: Mexico).
@@ -1430,6 +1506,84 @@ type PhoneInputProps = Omit<React.ComponentProps<"input">, "onChange" | "value"
1430
1506
  };
1431
1507
  declare const PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps>;
1432
1508
 
1509
+ /** User-visible copy; localize from your application. */
1510
+ interface PdfViewerLabels {
1511
+ pageOf?: (page: number, total: number) => string;
1512
+ goToPage?: string;
1513
+ zoomIn?: string;
1514
+ zoomOut?: string;
1515
+ resetZoom?: string;
1516
+ fitToWidth?: string;
1517
+ toolbar?: string;
1518
+ loading?: string;
1519
+ error?: string;
1520
+ workerMissing?: string;
1521
+ /** Accessible label for the thumbnail sidebar container. */
1522
+ thumbnailSidebar?: string;
1523
+ /** Accessible label for the control that shows / hides the thumbnail sidebar. */
1524
+ toggleThumbnailSidebar?: string;
1525
+ /** Accessible label for one thumbnail button; receives 1-based page index. */
1526
+ pageThumbnail?: (pageNumber: number) => string;
1527
+ }
1528
+ type PdfViewerDocumentOptions = Omit<Partial<DocumentInitParameters>, "url" | "data">;
1529
+ interface PdfViewerProps {
1530
+ src: string | ArrayBuffer | Uint8Array;
1531
+ workerSrc: string;
1532
+ documentOptions?: PdfViewerDocumentOptions;
1533
+ initialPage?: number;
1534
+ initialScale?: number;
1535
+ minScale?: number;
1536
+ maxScale?: number;
1537
+ scaleStep?: number;
1538
+ enableKeyboardShortcuts?: boolean;
1539
+ /**
1540
+ * Trackpad pinch (Ctrl/Cmd+wheel) and two-finger touch pinch on the page area.
1541
+ * @defaultValue true
1542
+ */
1543
+ enablePinchZoom?: boolean;
1544
+ /**
1545
+ * Collapsible scrollable thumbnail column for quick navigation.
1546
+ * @defaultValue true
1547
+ */
1548
+ enableThumbnailSidebar?: boolean;
1549
+ /** Initial visibility of the thumbnail sidebar when enabled. @defaultValue true */
1550
+ thumbnailSidebarDefaultOpen?: boolean;
1551
+ labels?: PdfViewerLabels;
1552
+ onLoad?: (pdf: PDFDocumentProxy) => void;
1553
+ onError?: (error: Error) => void;
1554
+ onPageChange?: (page: number) => void;
1555
+ onScaleChange?: (scale: number) => void;
1556
+ className?: string;
1557
+ toolbarClassName?: string;
1558
+ pageClassName?: string;
1559
+ toolbarEndSlot?: ReactNode;
1560
+ }
1561
+ declare function PdfViewer({ src, workerSrc, documentOptions, initialPage, initialScale, minScale, maxScale, scaleStep, enableKeyboardShortcuts, enablePinchZoom, enableThumbnailSidebar, thumbnailSidebarDefaultOpen, labels, onLoad, onError, onPageChange, onScaleChange, className, toolbarClassName, pageClassName, toolbarEndSlot, }: PdfViewerProps): react_jsx_runtime.JSX.Element;
1562
+
1563
+ interface PdfViewerDialogLabels extends PdfViewerLabels {
1564
+ /** Accessible label for the close control (toolbar). Defaults to `"Close"`. */
1565
+ close?: string;
1566
+ /** Screen-reader title for the dialog surface. */
1567
+ dialogTitle?: string;
1568
+ /** Screen-reader description for the dialog surface. */
1569
+ dialogDescription?: string;
1570
+ }
1571
+ type PdfViewerDialogForwardedProps = Omit<PdfViewerProps, "src" | "workerSrc" | "documentOptions" | "toolbarEndSlot">;
1572
+ interface PdfViewerDialogProps {
1573
+ open: boolean;
1574
+ onOpenChange: (open: boolean) => void;
1575
+ src: PdfViewerProps["src"];
1576
+ workerSrc: string;
1577
+ documentOptions?: PdfViewerDocumentOptions;
1578
+ /** Optional trigger wrapped by Radix `DialogTrigger`. */
1579
+ trigger?: ReactNode;
1580
+ /** Shortcut for `labels.dialogTitle`. */
1581
+ title?: string;
1582
+ labels?: PdfViewerDialogLabels;
1583
+ forwardedProps?: PdfViewerDialogForwardedProps;
1584
+ }
1585
+ declare function PdfViewerDialog({ open, onOpenChange, src, workerSrc, documentOptions, trigger, title, labels, forwardedProps, }: PdfViewerDialogProps): react_jsx_runtime.JSX.Element;
1586
+
1433
1587
  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";
1434
1588
  interface MexicoState {
1435
1589
  id: MexicoStateId;
@@ -1459,4 +1613,4 @@ declare const MEXICO_STATE_PATHS: Record<MexicoStateId, string>;
1459
1613
 
1460
1614
  declare function cn(...inputs: ClassValue[]): string;
1461
1615
 
1462
- export { type AddressAutocompleteAdapter, type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, type CalendarLinkOption, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, CardInput, type CardInputLabels, type CardInputProps, type CardTokenResult, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, type ChatStatusTone, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type DescribedPlaybackError, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmptyState, type EmptyStateProps, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, ErrorState, type EventCategory, EventDialog, type EventDialogLabels, type EventDialogLinkSearch, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type ProfessionalVerificationStatus, type QualityLevel, ScrollArea, ScrollBar, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, USAddressInput, type USAddressInputLabels, type USAddressInputProps, type USAddressValue, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, buttonVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, normalizeEmojiQuery, shouldRetryLiveEdge404, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useHlsPlayback, useLanguageContext, useNotificationsContext, usePlaybackStats, useSearchHotkey };
1616
+ export { type AddressAutocompleteAdapter, type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, type CalendarLinkOption, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, CardInput, type CardInputLabels, type CardInputProps, type CardTokenResult, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, type ChatStatusTone, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type DescribedPlaybackError, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmptyState, type EmptyStateProps, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, ErrorState, type EventCategory, EventDialog, type EventDialogLabels, type EventDialogLinkSearch, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PdfViewer, PdfViewerDialog, type PdfViewerDialogForwardedProps, type PdfViewerDialogLabels, type PdfViewerDialogProps, type PdfViewerDocumentOptions, type PdfViewerLabels, type PdfViewerProps, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type ProfessionalVerificationStatus, type QualityLevel, ScrollArea, ScrollBar, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, USAddressInput, type USAddressInputLabels, type USAddressInputProps, type USAddressLegacyValue, type USAddressValue, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, buttonVariants, cn, composeAddressLine1ForNls, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, joinStreet, normalizeEmojiQuery, sanitizeForNls, shouldRetryLiveEdge404, splitStreet, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useHlsPlayback, useLanguageContext, useNotificationsContext, usePlaybackStats, useSearchHotkey };
package/dist/index.d.ts CHANGED
@@ -15,6 +15,8 @@ import { Drawer as Drawer$1 } from 'vaul';
15
15
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
16
16
  import { Command as Command$1 } from 'cmdk';
17
17
  import * as RPNInput from 'react-phone-number-input';
18
+ import { PDFDocumentProxy } from 'pdfjs-dist';
19
+ import { DocumentInitParameters } from 'pdfjs-dist/types/src/display/api';
18
20
  import { ClassValue } from 'clsx';
19
21
 
20
22
  interface EventCategory {
@@ -1351,6 +1353,62 @@ interface CardInputProps {
1351
1353
  }
1352
1354
  declare function CardInput({ tokenize, value, onChange, acceptedBrands, requireHolderName, labels, disabled, largeText, className, onError, }: CardInputProps): react_jsx_runtime.JSX.Element;
1353
1355
 
1356
+ /**
1357
+ * Helpers for US address handling shared across blocks components.
1358
+ *
1359
+ * These utilities are intentionally pure (no React dependencies) so they
1360
+ * can be tested in isolation and reused in server-side code.
1361
+ */
1362
+ /**
1363
+ * Legacy US address shape used by backends that store street number and name
1364
+ * as separate fields (e.g. auth-svc /api/pre-approval → NLS AddressLine1).
1365
+ */
1366
+ interface USAddressLegacyValue {
1367
+ streetNumber: string;
1368
+ streetName: string;
1369
+ apt?: string;
1370
+ city: string;
1371
+ state: string;
1372
+ zipCode: string;
1373
+ country: "US";
1374
+ }
1375
+ /**
1376
+ * Splits a combined street string into number and name parts.
1377
+ *
1378
+ * Assumes standard US format where the number comes first:
1379
+ * "123 Main St" → { number: "123", name: "Main St" }
1380
+ * "100-B Oak Ave" → { number: "100-B", name: "Oak Ave" }
1381
+ * "Main St" → { number: "", name: "Main St" } (no leading number)
1382
+ */
1383
+ declare function splitStreet(street: string): {
1384
+ number: string;
1385
+ name: string;
1386
+ };
1387
+ /**
1388
+ * Joins street number and name back into a single combined street string.
1389
+ * Skips empty parts so "'' + 'Main St'" → "Main St".
1390
+ */
1391
+ declare function joinStreet(streetNumber: string, streetName: string): string;
1392
+ /**
1393
+ * Sanitizes a string for safe transmission to NLS.
1394
+ *
1395
+ * Keeps only printable ASCII characters that are valid in US postal addresses:
1396
+ * letters, digits, spaces, period, comma, apostrophe, hash, dash, forward-slash.
1397
+ * Collapses multiple spaces and trims.
1398
+ *
1399
+ * NOTE: does NOT truncate — apply slice(0, 40) at the NLS boundary using
1400
+ * composeAddressLine1ForNls to avoid silently deforming stored data.
1401
+ */
1402
+ declare function sanitizeForNls(input: string): string;
1403
+ /**
1404
+ * Composes and sanitizes the AddressLine1 field exactly as NLS expects it,
1405
+ * truncating to 40 characters maximum.
1406
+ *
1407
+ * Use this at the NLS boundary in auth-svc/src/lib/nls/customer.ts rather
1408
+ * than in the client, so stored DB values remain untruncated.
1409
+ */
1410
+ declare function composeAddressLine1ForNls(v: USAddressLegacyValue): string;
1411
+
1354
1412
  interface USAddressValue {
1355
1413
  street: string;
1356
1414
  street2?: string;
@@ -1416,8 +1474,26 @@ interface USAddressInputProps {
1416
1474
  largeText?: boolean;
1417
1475
  className?: string;
1418
1476
  onError?: (message: string) => void;
1477
+ /**
1478
+ * When true, the component also emits `onChangeLegacy` after every
1479
+ * `onChange` call with the address converted to the legacy split shape
1480
+ * ({ streetNumber, streetName, apt, city, state, zipCode }).
1481
+ * The UI and internal state remain unchanged — this is a purely additive
1482
+ * output transform. Default: false (backward-compatible).
1483
+ */
1484
+ legacyMode?: boolean;
1485
+ /**
1486
+ * Initial value in legacy format. Converted to the modern shape internally.
1487
+ * Ignored when `value` (modern) is provided — modern takes precedence.
1488
+ */
1489
+ valueLegacy?: USAddressLegacyValue;
1490
+ /**
1491
+ * Called alongside `onChange` when `legacyMode` is true.
1492
+ * Receives the address in the split legacy shape, sanitized for NLS.
1493
+ */
1494
+ onChangeLegacy?: (value: USAddressLegacyValue) => void;
1419
1495
  }
1420
- declare function USAddressInput({ value, onChange, lookupZip, validateAddress, autocomplete, labels, disabled, largeText, className, onError, }: USAddressInputProps): react_jsx_runtime.JSX.Element;
1496
+ declare function USAddressInput({ value, onChange, lookupZip, validateAddress, autocomplete, labels, disabled, largeText, className, onError, legacyMode, valueLegacy, onChangeLegacy, }: USAddressInputProps): react_jsx_runtime.JSX.Element;
1421
1497
 
1422
1498
  /**
1423
1499
  * International phone input with country picker (default: Mexico).
@@ -1430,6 +1506,84 @@ type PhoneInputProps = Omit<React.ComponentProps<"input">, "onChange" | "value"
1430
1506
  };
1431
1507
  declare const PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps>;
1432
1508
 
1509
+ /** User-visible copy; localize from your application. */
1510
+ interface PdfViewerLabels {
1511
+ pageOf?: (page: number, total: number) => string;
1512
+ goToPage?: string;
1513
+ zoomIn?: string;
1514
+ zoomOut?: string;
1515
+ resetZoom?: string;
1516
+ fitToWidth?: string;
1517
+ toolbar?: string;
1518
+ loading?: string;
1519
+ error?: string;
1520
+ workerMissing?: string;
1521
+ /** Accessible label for the thumbnail sidebar container. */
1522
+ thumbnailSidebar?: string;
1523
+ /** Accessible label for the control that shows / hides the thumbnail sidebar. */
1524
+ toggleThumbnailSidebar?: string;
1525
+ /** Accessible label for one thumbnail button; receives 1-based page index. */
1526
+ pageThumbnail?: (pageNumber: number) => string;
1527
+ }
1528
+ type PdfViewerDocumentOptions = Omit<Partial<DocumentInitParameters>, "url" | "data">;
1529
+ interface PdfViewerProps {
1530
+ src: string | ArrayBuffer | Uint8Array;
1531
+ workerSrc: string;
1532
+ documentOptions?: PdfViewerDocumentOptions;
1533
+ initialPage?: number;
1534
+ initialScale?: number;
1535
+ minScale?: number;
1536
+ maxScale?: number;
1537
+ scaleStep?: number;
1538
+ enableKeyboardShortcuts?: boolean;
1539
+ /**
1540
+ * Trackpad pinch (Ctrl/Cmd+wheel) and two-finger touch pinch on the page area.
1541
+ * @defaultValue true
1542
+ */
1543
+ enablePinchZoom?: boolean;
1544
+ /**
1545
+ * Collapsible scrollable thumbnail column for quick navigation.
1546
+ * @defaultValue true
1547
+ */
1548
+ enableThumbnailSidebar?: boolean;
1549
+ /** Initial visibility of the thumbnail sidebar when enabled. @defaultValue true */
1550
+ thumbnailSidebarDefaultOpen?: boolean;
1551
+ labels?: PdfViewerLabels;
1552
+ onLoad?: (pdf: PDFDocumentProxy) => void;
1553
+ onError?: (error: Error) => void;
1554
+ onPageChange?: (page: number) => void;
1555
+ onScaleChange?: (scale: number) => void;
1556
+ className?: string;
1557
+ toolbarClassName?: string;
1558
+ pageClassName?: string;
1559
+ toolbarEndSlot?: ReactNode;
1560
+ }
1561
+ declare function PdfViewer({ src, workerSrc, documentOptions, initialPage, initialScale, minScale, maxScale, scaleStep, enableKeyboardShortcuts, enablePinchZoom, enableThumbnailSidebar, thumbnailSidebarDefaultOpen, labels, onLoad, onError, onPageChange, onScaleChange, className, toolbarClassName, pageClassName, toolbarEndSlot, }: PdfViewerProps): react_jsx_runtime.JSX.Element;
1562
+
1563
+ interface PdfViewerDialogLabels extends PdfViewerLabels {
1564
+ /** Accessible label for the close control (toolbar). Defaults to `"Close"`. */
1565
+ close?: string;
1566
+ /** Screen-reader title for the dialog surface. */
1567
+ dialogTitle?: string;
1568
+ /** Screen-reader description for the dialog surface. */
1569
+ dialogDescription?: string;
1570
+ }
1571
+ type PdfViewerDialogForwardedProps = Omit<PdfViewerProps, "src" | "workerSrc" | "documentOptions" | "toolbarEndSlot">;
1572
+ interface PdfViewerDialogProps {
1573
+ open: boolean;
1574
+ onOpenChange: (open: boolean) => void;
1575
+ src: PdfViewerProps["src"];
1576
+ workerSrc: string;
1577
+ documentOptions?: PdfViewerDocumentOptions;
1578
+ /** Optional trigger wrapped by Radix `DialogTrigger`. */
1579
+ trigger?: ReactNode;
1580
+ /** Shortcut for `labels.dialogTitle`. */
1581
+ title?: string;
1582
+ labels?: PdfViewerDialogLabels;
1583
+ forwardedProps?: PdfViewerDialogForwardedProps;
1584
+ }
1585
+ declare function PdfViewerDialog({ open, onOpenChange, src, workerSrc, documentOptions, trigger, title, labels, forwardedProps, }: PdfViewerDialogProps): react_jsx_runtime.JSX.Element;
1586
+
1433
1587
  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";
1434
1588
  interface MexicoState {
1435
1589
  id: MexicoStateId;
@@ -1459,4 +1613,4 @@ declare const MEXICO_STATE_PATHS: Record<MexicoStateId, string>;
1459
1613
 
1460
1614
  declare function cn(...inputs: ClassValue[]): string;
1461
1615
 
1462
- export { type AddressAutocompleteAdapter, type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, type CalendarLinkOption, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, CardInput, type CardInputLabels, type CardInputProps, type CardTokenResult, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, type ChatStatusTone, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type DescribedPlaybackError, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmptyState, type EmptyStateProps, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, ErrorState, type EventCategory, EventDialog, type EventDialogLabels, type EventDialogLinkSearch, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type ProfessionalVerificationStatus, type QualityLevel, ScrollArea, ScrollBar, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, USAddressInput, type USAddressInputLabels, type USAddressInputProps, type USAddressValue, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, buttonVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, normalizeEmojiQuery, shouldRetryLiveEdge404, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useHlsPlayback, useLanguageContext, useNotificationsContext, usePlaybackStats, useSearchHotkey };
1616
+ export { type AddressAutocompleteAdapter, type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, type CalendarLinkOption, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, CardInput, type CardInputLabels, type CardInputProps, type CardTokenResult, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, type ChatStatusTone, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type DescribedPlaybackError, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmptyState, type EmptyStateProps, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, ErrorState, type EventCategory, EventDialog, type EventDialogLabels, type EventDialogLinkSearch, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PdfViewer, PdfViewerDialog, type PdfViewerDialogForwardedProps, type PdfViewerDialogLabels, type PdfViewerDialogProps, type PdfViewerDocumentOptions, type PdfViewerLabels, type PdfViewerProps, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type ProfessionalVerificationStatus, type QualityLevel, ScrollArea, ScrollBar, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, USAddressInput, type USAddressInputLabels, type USAddressInputProps, type USAddressLegacyValue, type USAddressValue, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, buttonVariants, cn, composeAddressLine1ForNls, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, joinStreet, normalizeEmojiQuery, sanitizeForNls, shouldRetryLiveEdge404, splitStreet, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useHlsPlayback, useLanguageContext, useNotificationsContext, usePlaybackStats, useSearchHotkey };