@algenium/blocks 1.7.0-rc.7 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +164 -1055
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -166
- package/dist/index.d.ts +15 -166
- package/dist/index.js +166 -1051
- package/dist/index.js.map +1 -1
- package/package.json +1 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -11,8 +11,6 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
|
11
11
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
12
12
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
13
13
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
14
|
-
import { PDFDocumentProxy } from 'pdfjs-dist';
|
|
15
|
-
import { DocumentInitParameters } from 'pdfjs-dist/types/src/display/api';
|
|
16
14
|
import { ClassValue } from 'clsx';
|
|
17
15
|
|
|
18
16
|
interface CalendarEvent {
|
|
@@ -217,16 +215,16 @@ type ThemeSwitcherProps = {
|
|
|
217
215
|
align?: "start" | "center" | "end";
|
|
218
216
|
/** Dropdown side (for mini variant) */
|
|
219
217
|
side?: "top" | "bottom" | "left" | "right";
|
|
220
|
-
/**
|
|
218
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
221
219
|
tooltipSide?: "top" | "right" | "bottom" | "left";
|
|
222
|
-
/**
|
|
220
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
223
221
|
tooltipAlign?: "start" | "center" | "end";
|
|
224
|
-
/**
|
|
222
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
225
223
|
tooltipSideOffset?: number;
|
|
226
224
|
/** Translation labels - consumers can pass their own t() values */
|
|
227
225
|
labels?: ThemeSwitcherLabels;
|
|
228
226
|
};
|
|
229
|
-
declare function ThemeSwitcher({ className, size, shape, variant, align, side,
|
|
227
|
+
declare function ThemeSwitcher({ className, size, shape, variant, align, side, labels: userLabels, }: ThemeSwitcherProps): react_jsx_runtime.JSX.Element;
|
|
230
228
|
|
|
231
229
|
type Language = {
|
|
232
230
|
/** Language key/code (e.g., "en", "es") */
|
|
@@ -276,14 +274,14 @@ type LanguageSwitcherProps = {
|
|
|
276
274
|
align?: "start" | "center" | "end";
|
|
277
275
|
/** Dropdown side */
|
|
278
276
|
side?: "top" | "bottom" | "left" | "right";
|
|
279
|
-
/**
|
|
277
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
280
278
|
tooltipSide?: "top" | "right" | "bottom" | "left";
|
|
281
|
-
/**
|
|
279
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
282
280
|
tooltipAlign?: "start" | "center" | "end";
|
|
283
|
-
/**
|
|
281
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
284
282
|
tooltipSideOffset?: number;
|
|
285
283
|
};
|
|
286
|
-
declare function LanguageSwitcher({ languages: propLanguages, currentLanguage: propCurrentLanguage, onLanguageChange: propOnLanguageChange, labels, className, size, shape, variant, showIcon, align, side,
|
|
284
|
+
declare function LanguageSwitcher({ languages: propLanguages, currentLanguage: propCurrentLanguage, onLanguageChange: propOnLanguageChange, labels, className, size, shape, variant, showIcon, align, side, }: LanguageSwitcherProps): react_jsx_runtime.JSX.Element;
|
|
287
285
|
|
|
288
286
|
type EnvironmentSwitcherLabels = {
|
|
289
287
|
/** Tooltip / aria for the control */
|
|
@@ -338,11 +336,14 @@ type EnvironmentSwitcherProps = {
|
|
|
338
336
|
variant?: "default" | "mini";
|
|
339
337
|
align?: "start" | "center" | "end";
|
|
340
338
|
side?: "top" | "bottom" | "left" | "right";
|
|
339
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
341
340
|
tooltipSide?: "top" | "right" | "bottom" | "left";
|
|
341
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
342
342
|
tooltipAlign?: "start" | "center" | "end";
|
|
343
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
343
344
|
tooltipSideOffset?: number;
|
|
344
345
|
};
|
|
345
|
-
declare function EnvironmentSwitcher({ className, environment: propEnvironment, onEnvironmentChange: propOnEnvironmentChange, environments: propEnvironments, labels: userLabels, size, shape, variant, align, side,
|
|
346
|
+
declare function EnvironmentSwitcher({ className, environment: propEnvironment, onEnvironmentChange: propOnEnvironmentChange, environments: propEnvironments, labels: userLabels, size, shape, variant, align, side, }: EnvironmentSwitcherProps): react_jsx_runtime.JSX.Element;
|
|
346
347
|
|
|
347
348
|
type EnvironmentBannerLabels = {
|
|
348
349
|
stagingMessage?: string;
|
|
@@ -809,62 +810,6 @@ interface CardInputProps {
|
|
|
809
810
|
}
|
|
810
811
|
declare function CardInput({ tokenize, value, onChange, acceptedBrands, requireHolderName, labels, disabled, largeText, className, onError, }: CardInputProps): react_jsx_runtime.JSX.Element;
|
|
811
812
|
|
|
812
|
-
/**
|
|
813
|
-
* Helpers for US address handling shared across blocks components.
|
|
814
|
-
*
|
|
815
|
-
* These utilities are intentionally pure (no React dependencies) so they
|
|
816
|
-
* can be tested in isolation and reused in server-side code.
|
|
817
|
-
*/
|
|
818
|
-
/**
|
|
819
|
-
* Legacy US address shape used by backends that store street number and name
|
|
820
|
-
* as separate fields (e.g. auth-svc /api/pre-approval → NLS AddressLine1).
|
|
821
|
-
*/
|
|
822
|
-
interface USAddressLegacyValue {
|
|
823
|
-
streetNumber: string;
|
|
824
|
-
streetName: string;
|
|
825
|
-
apt?: string;
|
|
826
|
-
city: string;
|
|
827
|
-
state: string;
|
|
828
|
-
zipCode: string;
|
|
829
|
-
country: "US";
|
|
830
|
-
}
|
|
831
|
-
/**
|
|
832
|
-
* Splits a combined street string into number and name parts.
|
|
833
|
-
*
|
|
834
|
-
* Assumes standard US format where the number comes first:
|
|
835
|
-
* "123 Main St" → { number: "123", name: "Main St" }
|
|
836
|
-
* "100-B Oak Ave" → { number: "100-B", name: "Oak Ave" }
|
|
837
|
-
* "Main St" → { number: "", name: "Main St" } (no leading number)
|
|
838
|
-
*/
|
|
839
|
-
declare function splitStreet(street: string): {
|
|
840
|
-
number: string;
|
|
841
|
-
name: string;
|
|
842
|
-
};
|
|
843
|
-
/**
|
|
844
|
-
* Joins street number and name back into a single combined street string.
|
|
845
|
-
* Skips empty parts so "'' + 'Main St'" → "Main St".
|
|
846
|
-
*/
|
|
847
|
-
declare function joinStreet(streetNumber: string, streetName: string): string;
|
|
848
|
-
/**
|
|
849
|
-
* Sanitizes a string for safe transmission to NLS.
|
|
850
|
-
*
|
|
851
|
-
* Keeps only printable ASCII characters that are valid in US postal addresses:
|
|
852
|
-
* letters, digits, spaces, period, comma, apostrophe, hash, dash, forward-slash.
|
|
853
|
-
* Collapses multiple spaces and trims.
|
|
854
|
-
*
|
|
855
|
-
* NOTE: does NOT truncate — apply slice(0, 40) at the NLS boundary using
|
|
856
|
-
* composeAddressLine1ForNls to avoid silently deforming stored data.
|
|
857
|
-
*/
|
|
858
|
-
declare function sanitizeForNls(input: string): string;
|
|
859
|
-
/**
|
|
860
|
-
* Composes and sanitizes the AddressLine1 field exactly as NLS expects it,
|
|
861
|
-
* truncating to 40 characters maximum.
|
|
862
|
-
*
|
|
863
|
-
* Use this at the NLS boundary in auth-svc/src/lib/nls/customer.ts rather
|
|
864
|
-
* than in the client, so stored DB values remain untruncated.
|
|
865
|
-
*/
|
|
866
|
-
declare function composeAddressLine1ForNls(v: USAddressLegacyValue): string;
|
|
867
|
-
|
|
868
813
|
interface USAddressValue {
|
|
869
814
|
street: string;
|
|
870
815
|
street2?: string;
|
|
@@ -930,105 +875,9 @@ interface USAddressInputProps {
|
|
|
930
875
|
largeText?: boolean;
|
|
931
876
|
className?: string;
|
|
932
877
|
onError?: (message: string) => void;
|
|
933
|
-
/**
|
|
934
|
-
* When true, the component also emits `onChangeLegacy` after every
|
|
935
|
-
* `onChange` call with the address converted to the legacy split shape
|
|
936
|
-
* ({ streetNumber, streetName, apt, city, state, zipCode }).
|
|
937
|
-
* The UI and internal state remain unchanged — this is a purely additive
|
|
938
|
-
* output transform. Default: false (backward-compatible).
|
|
939
|
-
*/
|
|
940
|
-
legacyMode?: boolean;
|
|
941
|
-
/**
|
|
942
|
-
* Initial value in legacy format. Converted to the modern shape internally.
|
|
943
|
-
* Ignored when `value` (modern) is provided — modern takes precedence.
|
|
944
|
-
*/
|
|
945
|
-
valueLegacy?: USAddressLegacyValue;
|
|
946
|
-
/**
|
|
947
|
-
* Called alongside `onChange` when `legacyMode` is true.
|
|
948
|
-
* Receives the address in the split legacy shape, sanitized for NLS.
|
|
949
|
-
*/
|
|
950
|
-
onChangeLegacy?: (value: USAddressLegacyValue) => void;
|
|
951
|
-
}
|
|
952
|
-
declare function USAddressInput({ value, onChange, lookupZip, validateAddress, autocomplete, labels, disabled, largeText, className, onError, legacyMode, valueLegacy, onChangeLegacy, }: USAddressInputProps): react_jsx_runtime.JSX.Element;
|
|
953
|
-
|
|
954
|
-
/** User-visible copy; localize from your application. */
|
|
955
|
-
interface PdfViewerLabels {
|
|
956
|
-
pageOf?: (page: number, total: number) => string;
|
|
957
|
-
goToPage?: string;
|
|
958
|
-
zoomIn?: string;
|
|
959
|
-
zoomOut?: string;
|
|
960
|
-
resetZoom?: string;
|
|
961
|
-
fitToWidth?: string;
|
|
962
|
-
toolbar?: string;
|
|
963
|
-
loading?: string;
|
|
964
|
-
error?: string;
|
|
965
|
-
workerMissing?: string;
|
|
966
|
-
/** Accessible label for the thumbnail sidebar container. */
|
|
967
|
-
thumbnailSidebar?: string;
|
|
968
|
-
/** Accessible label for the control that shows / hides the thumbnail sidebar. */
|
|
969
|
-
toggleThumbnailSidebar?: string;
|
|
970
|
-
/** Accessible label for one thumbnail button; receives 1-based page index. */
|
|
971
|
-
pageThumbnail?: (pageNumber: number) => string;
|
|
972
|
-
}
|
|
973
|
-
type PdfViewerDocumentOptions = Omit<Partial<DocumentInitParameters>, "url" | "data">;
|
|
974
|
-
interface PdfViewerProps {
|
|
975
|
-
src: string | ArrayBuffer | Uint8Array;
|
|
976
|
-
workerSrc: string;
|
|
977
|
-
documentOptions?: PdfViewerDocumentOptions;
|
|
978
|
-
initialPage?: number;
|
|
979
|
-
initialScale?: number;
|
|
980
|
-
minScale?: number;
|
|
981
|
-
maxScale?: number;
|
|
982
|
-
scaleStep?: number;
|
|
983
|
-
enableKeyboardShortcuts?: boolean;
|
|
984
|
-
/**
|
|
985
|
-
* Trackpad pinch (Ctrl/Cmd+wheel) and two-finger touch pinch on the page area.
|
|
986
|
-
* @defaultValue true
|
|
987
|
-
*/
|
|
988
|
-
enablePinchZoom?: boolean;
|
|
989
|
-
/**
|
|
990
|
-
* Collapsible scrollable thumbnail column for quick navigation.
|
|
991
|
-
* @defaultValue true
|
|
992
|
-
*/
|
|
993
|
-
enableThumbnailSidebar?: boolean;
|
|
994
|
-
/** Initial visibility of the thumbnail sidebar when enabled. @defaultValue true */
|
|
995
|
-
thumbnailSidebarDefaultOpen?: boolean;
|
|
996
|
-
labels?: PdfViewerLabels;
|
|
997
|
-
onLoad?: (pdf: PDFDocumentProxy) => void;
|
|
998
|
-
onError?: (error: Error) => void;
|
|
999
|
-
onPageChange?: (page: number) => void;
|
|
1000
|
-
onScaleChange?: (scale: number) => void;
|
|
1001
|
-
className?: string;
|
|
1002
|
-
toolbarClassName?: string;
|
|
1003
|
-
pageClassName?: string;
|
|
1004
|
-
toolbarEndSlot?: ReactNode;
|
|
1005
|
-
}
|
|
1006
|
-
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;
|
|
1007
|
-
|
|
1008
|
-
interface PdfViewerDialogLabels extends PdfViewerLabels {
|
|
1009
|
-
/** Accessible label for the close control (toolbar). Defaults to `"Close"`. */
|
|
1010
|
-
close?: string;
|
|
1011
|
-
/** Screen-reader title for the dialog surface. */
|
|
1012
|
-
dialogTitle?: string;
|
|
1013
|
-
/** Screen-reader description for the dialog surface. */
|
|
1014
|
-
dialogDescription?: string;
|
|
1015
|
-
}
|
|
1016
|
-
type PdfViewerDialogForwardedProps = Omit<PdfViewerProps, "src" | "workerSrc" | "documentOptions" | "toolbarEndSlot">;
|
|
1017
|
-
interface PdfViewerDialogProps {
|
|
1018
|
-
open: boolean;
|
|
1019
|
-
onOpenChange: (open: boolean) => void;
|
|
1020
|
-
src: PdfViewerProps["src"];
|
|
1021
|
-
workerSrc: string;
|
|
1022
|
-
documentOptions?: PdfViewerDocumentOptions;
|
|
1023
|
-
/** Optional trigger wrapped by Radix `DialogTrigger`. */
|
|
1024
|
-
trigger?: ReactNode;
|
|
1025
|
-
/** Shortcut for `labels.dialogTitle`. */
|
|
1026
|
-
title?: string;
|
|
1027
|
-
labels?: PdfViewerDialogLabels;
|
|
1028
|
-
forwardedProps?: PdfViewerDialogForwardedProps;
|
|
1029
878
|
}
|
|
1030
|
-
declare function
|
|
879
|
+
declare function USAddressInput({ value, onChange, lookupZip, validateAddress, autocomplete, labels, disabled, largeText, className, onError, }: USAddressInputProps): react_jsx_runtime.JSX.Element;
|
|
1031
880
|
|
|
1032
881
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1033
882
|
|
|
1034
|
-
export { type AddressAutocompleteAdapter, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, 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, 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, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps,
|
|
883
|
+
export { type AddressAutocompleteAdapter, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, 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, 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, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, USAddressInput, type USAddressInputLabels, type USAddressInputProps, type USAddressValue, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, buttonVariants, cn, defaultLanguages, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useLanguageContext, useNotificationsContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -11,8 +11,6 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
|
11
11
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
12
12
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
13
13
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
14
|
-
import { PDFDocumentProxy } from 'pdfjs-dist';
|
|
15
|
-
import { DocumentInitParameters } from 'pdfjs-dist/types/src/display/api';
|
|
16
14
|
import { ClassValue } from 'clsx';
|
|
17
15
|
|
|
18
16
|
interface CalendarEvent {
|
|
@@ -217,16 +215,16 @@ type ThemeSwitcherProps = {
|
|
|
217
215
|
align?: "start" | "center" | "end";
|
|
218
216
|
/** Dropdown side (for mini variant) */
|
|
219
217
|
side?: "top" | "bottom" | "left" | "right";
|
|
220
|
-
/**
|
|
218
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
221
219
|
tooltipSide?: "top" | "right" | "bottom" | "left";
|
|
222
|
-
/**
|
|
220
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
223
221
|
tooltipAlign?: "start" | "center" | "end";
|
|
224
|
-
/**
|
|
222
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
225
223
|
tooltipSideOffset?: number;
|
|
226
224
|
/** Translation labels - consumers can pass their own t() values */
|
|
227
225
|
labels?: ThemeSwitcherLabels;
|
|
228
226
|
};
|
|
229
|
-
declare function ThemeSwitcher({ className, size, shape, variant, align, side,
|
|
227
|
+
declare function ThemeSwitcher({ className, size, shape, variant, align, side, labels: userLabels, }: ThemeSwitcherProps): react_jsx_runtime.JSX.Element;
|
|
230
228
|
|
|
231
229
|
type Language = {
|
|
232
230
|
/** Language key/code (e.g., "en", "es") */
|
|
@@ -276,14 +274,14 @@ type LanguageSwitcherProps = {
|
|
|
276
274
|
align?: "start" | "center" | "end";
|
|
277
275
|
/** Dropdown side */
|
|
278
276
|
side?: "top" | "bottom" | "left" | "right";
|
|
279
|
-
/**
|
|
277
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
280
278
|
tooltipSide?: "top" | "right" | "bottom" | "left";
|
|
281
|
-
/**
|
|
279
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
282
280
|
tooltipAlign?: "start" | "center" | "end";
|
|
283
|
-
/**
|
|
281
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
284
282
|
tooltipSideOffset?: number;
|
|
285
283
|
};
|
|
286
|
-
declare function LanguageSwitcher({ languages: propLanguages, currentLanguage: propCurrentLanguage, onLanguageChange: propOnLanguageChange, labels, className, size, shape, variant, showIcon, align, side,
|
|
284
|
+
declare function LanguageSwitcher({ languages: propLanguages, currentLanguage: propCurrentLanguage, onLanguageChange: propOnLanguageChange, labels, className, size, shape, variant, showIcon, align, side, }: LanguageSwitcherProps): react_jsx_runtime.JSX.Element;
|
|
287
285
|
|
|
288
286
|
type EnvironmentSwitcherLabels = {
|
|
289
287
|
/** Tooltip / aria for the control */
|
|
@@ -338,11 +336,14 @@ type EnvironmentSwitcherProps = {
|
|
|
338
336
|
variant?: "default" | "mini";
|
|
339
337
|
align?: "start" | "center" | "end";
|
|
340
338
|
side?: "top" | "bottom" | "left" | "right";
|
|
339
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
341
340
|
tooltipSide?: "top" | "right" | "bottom" | "left";
|
|
341
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
342
342
|
tooltipAlign?: "start" | "center" | "end";
|
|
343
|
+
/** @deprecated No longer used; mini variant no longer renders a tooltip. */
|
|
343
344
|
tooltipSideOffset?: number;
|
|
344
345
|
};
|
|
345
|
-
declare function EnvironmentSwitcher({ className, environment: propEnvironment, onEnvironmentChange: propOnEnvironmentChange, environments: propEnvironments, labels: userLabels, size, shape, variant, align, side,
|
|
346
|
+
declare function EnvironmentSwitcher({ className, environment: propEnvironment, onEnvironmentChange: propOnEnvironmentChange, environments: propEnvironments, labels: userLabels, size, shape, variant, align, side, }: EnvironmentSwitcherProps): react_jsx_runtime.JSX.Element;
|
|
346
347
|
|
|
347
348
|
type EnvironmentBannerLabels = {
|
|
348
349
|
stagingMessage?: string;
|
|
@@ -809,62 +810,6 @@ interface CardInputProps {
|
|
|
809
810
|
}
|
|
810
811
|
declare function CardInput({ tokenize, value, onChange, acceptedBrands, requireHolderName, labels, disabled, largeText, className, onError, }: CardInputProps): react_jsx_runtime.JSX.Element;
|
|
811
812
|
|
|
812
|
-
/**
|
|
813
|
-
* Helpers for US address handling shared across blocks components.
|
|
814
|
-
*
|
|
815
|
-
* These utilities are intentionally pure (no React dependencies) so they
|
|
816
|
-
* can be tested in isolation and reused in server-side code.
|
|
817
|
-
*/
|
|
818
|
-
/**
|
|
819
|
-
* Legacy US address shape used by backends that store street number and name
|
|
820
|
-
* as separate fields (e.g. auth-svc /api/pre-approval → NLS AddressLine1).
|
|
821
|
-
*/
|
|
822
|
-
interface USAddressLegacyValue {
|
|
823
|
-
streetNumber: string;
|
|
824
|
-
streetName: string;
|
|
825
|
-
apt?: string;
|
|
826
|
-
city: string;
|
|
827
|
-
state: string;
|
|
828
|
-
zipCode: string;
|
|
829
|
-
country: "US";
|
|
830
|
-
}
|
|
831
|
-
/**
|
|
832
|
-
* Splits a combined street string into number and name parts.
|
|
833
|
-
*
|
|
834
|
-
* Assumes standard US format where the number comes first:
|
|
835
|
-
* "123 Main St" → { number: "123", name: "Main St" }
|
|
836
|
-
* "100-B Oak Ave" → { number: "100-B", name: "Oak Ave" }
|
|
837
|
-
* "Main St" → { number: "", name: "Main St" } (no leading number)
|
|
838
|
-
*/
|
|
839
|
-
declare function splitStreet(street: string): {
|
|
840
|
-
number: string;
|
|
841
|
-
name: string;
|
|
842
|
-
};
|
|
843
|
-
/**
|
|
844
|
-
* Joins street number and name back into a single combined street string.
|
|
845
|
-
* Skips empty parts so "'' + 'Main St'" → "Main St".
|
|
846
|
-
*/
|
|
847
|
-
declare function joinStreet(streetNumber: string, streetName: string): string;
|
|
848
|
-
/**
|
|
849
|
-
* Sanitizes a string for safe transmission to NLS.
|
|
850
|
-
*
|
|
851
|
-
* Keeps only printable ASCII characters that are valid in US postal addresses:
|
|
852
|
-
* letters, digits, spaces, period, comma, apostrophe, hash, dash, forward-slash.
|
|
853
|
-
* Collapses multiple spaces and trims.
|
|
854
|
-
*
|
|
855
|
-
* NOTE: does NOT truncate — apply slice(0, 40) at the NLS boundary using
|
|
856
|
-
* composeAddressLine1ForNls to avoid silently deforming stored data.
|
|
857
|
-
*/
|
|
858
|
-
declare function sanitizeForNls(input: string): string;
|
|
859
|
-
/**
|
|
860
|
-
* Composes and sanitizes the AddressLine1 field exactly as NLS expects it,
|
|
861
|
-
* truncating to 40 characters maximum.
|
|
862
|
-
*
|
|
863
|
-
* Use this at the NLS boundary in auth-svc/src/lib/nls/customer.ts rather
|
|
864
|
-
* than in the client, so stored DB values remain untruncated.
|
|
865
|
-
*/
|
|
866
|
-
declare function composeAddressLine1ForNls(v: USAddressLegacyValue): string;
|
|
867
|
-
|
|
868
813
|
interface USAddressValue {
|
|
869
814
|
street: string;
|
|
870
815
|
street2?: string;
|
|
@@ -930,105 +875,9 @@ interface USAddressInputProps {
|
|
|
930
875
|
largeText?: boolean;
|
|
931
876
|
className?: string;
|
|
932
877
|
onError?: (message: string) => void;
|
|
933
|
-
/**
|
|
934
|
-
* When true, the component also emits `onChangeLegacy` after every
|
|
935
|
-
* `onChange` call with the address converted to the legacy split shape
|
|
936
|
-
* ({ streetNumber, streetName, apt, city, state, zipCode }).
|
|
937
|
-
* The UI and internal state remain unchanged — this is a purely additive
|
|
938
|
-
* output transform. Default: false (backward-compatible).
|
|
939
|
-
*/
|
|
940
|
-
legacyMode?: boolean;
|
|
941
|
-
/**
|
|
942
|
-
* Initial value in legacy format. Converted to the modern shape internally.
|
|
943
|
-
* Ignored when `value` (modern) is provided — modern takes precedence.
|
|
944
|
-
*/
|
|
945
|
-
valueLegacy?: USAddressLegacyValue;
|
|
946
|
-
/**
|
|
947
|
-
* Called alongside `onChange` when `legacyMode` is true.
|
|
948
|
-
* Receives the address in the split legacy shape, sanitized for NLS.
|
|
949
|
-
*/
|
|
950
|
-
onChangeLegacy?: (value: USAddressLegacyValue) => void;
|
|
951
|
-
}
|
|
952
|
-
declare function USAddressInput({ value, onChange, lookupZip, validateAddress, autocomplete, labels, disabled, largeText, className, onError, legacyMode, valueLegacy, onChangeLegacy, }: USAddressInputProps): react_jsx_runtime.JSX.Element;
|
|
953
|
-
|
|
954
|
-
/** User-visible copy; localize from your application. */
|
|
955
|
-
interface PdfViewerLabels {
|
|
956
|
-
pageOf?: (page: number, total: number) => string;
|
|
957
|
-
goToPage?: string;
|
|
958
|
-
zoomIn?: string;
|
|
959
|
-
zoomOut?: string;
|
|
960
|
-
resetZoom?: string;
|
|
961
|
-
fitToWidth?: string;
|
|
962
|
-
toolbar?: string;
|
|
963
|
-
loading?: string;
|
|
964
|
-
error?: string;
|
|
965
|
-
workerMissing?: string;
|
|
966
|
-
/** Accessible label for the thumbnail sidebar container. */
|
|
967
|
-
thumbnailSidebar?: string;
|
|
968
|
-
/** Accessible label for the control that shows / hides the thumbnail sidebar. */
|
|
969
|
-
toggleThumbnailSidebar?: string;
|
|
970
|
-
/** Accessible label for one thumbnail button; receives 1-based page index. */
|
|
971
|
-
pageThumbnail?: (pageNumber: number) => string;
|
|
972
|
-
}
|
|
973
|
-
type PdfViewerDocumentOptions = Omit<Partial<DocumentInitParameters>, "url" | "data">;
|
|
974
|
-
interface PdfViewerProps {
|
|
975
|
-
src: string | ArrayBuffer | Uint8Array;
|
|
976
|
-
workerSrc: string;
|
|
977
|
-
documentOptions?: PdfViewerDocumentOptions;
|
|
978
|
-
initialPage?: number;
|
|
979
|
-
initialScale?: number;
|
|
980
|
-
minScale?: number;
|
|
981
|
-
maxScale?: number;
|
|
982
|
-
scaleStep?: number;
|
|
983
|
-
enableKeyboardShortcuts?: boolean;
|
|
984
|
-
/**
|
|
985
|
-
* Trackpad pinch (Ctrl/Cmd+wheel) and two-finger touch pinch on the page area.
|
|
986
|
-
* @defaultValue true
|
|
987
|
-
*/
|
|
988
|
-
enablePinchZoom?: boolean;
|
|
989
|
-
/**
|
|
990
|
-
* Collapsible scrollable thumbnail column for quick navigation.
|
|
991
|
-
* @defaultValue true
|
|
992
|
-
*/
|
|
993
|
-
enableThumbnailSidebar?: boolean;
|
|
994
|
-
/** Initial visibility of the thumbnail sidebar when enabled. @defaultValue true */
|
|
995
|
-
thumbnailSidebarDefaultOpen?: boolean;
|
|
996
|
-
labels?: PdfViewerLabels;
|
|
997
|
-
onLoad?: (pdf: PDFDocumentProxy) => void;
|
|
998
|
-
onError?: (error: Error) => void;
|
|
999
|
-
onPageChange?: (page: number) => void;
|
|
1000
|
-
onScaleChange?: (scale: number) => void;
|
|
1001
|
-
className?: string;
|
|
1002
|
-
toolbarClassName?: string;
|
|
1003
|
-
pageClassName?: string;
|
|
1004
|
-
toolbarEndSlot?: ReactNode;
|
|
1005
|
-
}
|
|
1006
|
-
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;
|
|
1007
|
-
|
|
1008
|
-
interface PdfViewerDialogLabels extends PdfViewerLabels {
|
|
1009
|
-
/** Accessible label for the close control (toolbar). Defaults to `"Close"`. */
|
|
1010
|
-
close?: string;
|
|
1011
|
-
/** Screen-reader title for the dialog surface. */
|
|
1012
|
-
dialogTitle?: string;
|
|
1013
|
-
/** Screen-reader description for the dialog surface. */
|
|
1014
|
-
dialogDescription?: string;
|
|
1015
|
-
}
|
|
1016
|
-
type PdfViewerDialogForwardedProps = Omit<PdfViewerProps, "src" | "workerSrc" | "documentOptions" | "toolbarEndSlot">;
|
|
1017
|
-
interface PdfViewerDialogProps {
|
|
1018
|
-
open: boolean;
|
|
1019
|
-
onOpenChange: (open: boolean) => void;
|
|
1020
|
-
src: PdfViewerProps["src"];
|
|
1021
|
-
workerSrc: string;
|
|
1022
|
-
documentOptions?: PdfViewerDocumentOptions;
|
|
1023
|
-
/** Optional trigger wrapped by Radix `DialogTrigger`. */
|
|
1024
|
-
trigger?: ReactNode;
|
|
1025
|
-
/** Shortcut for `labels.dialogTitle`. */
|
|
1026
|
-
title?: string;
|
|
1027
|
-
labels?: PdfViewerDialogLabels;
|
|
1028
|
-
forwardedProps?: PdfViewerDialogForwardedProps;
|
|
1029
878
|
}
|
|
1030
|
-
declare function
|
|
879
|
+
declare function USAddressInput({ value, onChange, lookupZip, validateAddress, autocomplete, labels, disabled, largeText, className, onError, }: USAddressInputProps): react_jsx_runtime.JSX.Element;
|
|
1031
880
|
|
|
1032
881
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1033
882
|
|
|
1034
|
-
export { type AddressAutocompleteAdapter, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, 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, 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, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps,
|
|
883
|
+
export { type AddressAutocompleteAdapter, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, 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, 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, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, USAddressInput, type USAddressInputLabels, type USAddressInputProps, type USAddressValue, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, buttonVariants, cn, defaultLanguages, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useLanguageContext, useNotificationsContext };
|