@algenium/blocks 1.14.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -13,6 +13,7 @@ import * as TogglePrimitive from '@radix-ui/react-toggle';
13
13
  import * as DialogPrimitive from '@radix-ui/react-dialog';
14
14
  import { Drawer as Drawer$1 } from 'vaul';
15
15
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
16
+ import { Command as Command$1 } from 'cmdk';
16
17
  import { ClassValue } from 'clsx';
17
18
 
18
19
  interface CalendarEvent {
@@ -1103,6 +1104,132 @@ declare function DrawerDescription({ className, ...props }: React.ComponentProps
1103
1104
  declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): react_jsx_runtime.JSX.Element;
1104
1105
  declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
1105
1106
 
1107
+ declare function Command({ className, ...props }: React.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
1108
+ declare function CommandDialog({ title, description, children, className, showCloseButton, commandProps, ...props }: React.ComponentProps<typeof Dialog> & {
1109
+ title?: string;
1110
+ description?: string;
1111
+ className?: string;
1112
+ showCloseButton?: boolean;
1113
+ /** Extra props forwarded to the inner `Command` (e.g. `shouldFilter`). */
1114
+ commandProps?: Omit<React.ComponentProps<typeof Command>, "className" | "children">;
1115
+ }): react_jsx_runtime.JSX.Element;
1116
+ declare function CommandInput({ className, ...props }: React.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
1117
+ declare function CommandList({ className, ...props }: React.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
1118
+ declare function CommandEmpty({ ...props }: React.ComponentProps<typeof Command$1.Empty>): react_jsx_runtime.JSX.Element;
1119
+ declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof Command$1.Group>): react_jsx_runtime.JSX.Element;
1120
+ declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof Command$1.Separator>): react_jsx_runtime.JSX.Element;
1121
+ declare function CommandItem({ className, ...props }: React.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
1122
+ declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
1123
+
1124
+ /**
1125
+ * A search result returned by search-svc's `GET /search` after ACL
1126
+ * hydration. Mirrors `search-svc/src/domain/search/types.ts` `SearchHit` —
1127
+ * kept duplicated (not imported) since blocks has no dependency on any
1128
+ * backend service.
1129
+ */
1130
+ interface SearchHit {
1131
+ id: string;
1132
+ type: string;
1133
+ service: string;
1134
+ entityId: string;
1135
+ orgId: string | null;
1136
+ userId: string | null;
1137
+ visibility: string;
1138
+ title: string;
1139
+ snippet: string;
1140
+ url: string;
1141
+ payload: Record<string, unknown>;
1142
+ score: number;
1143
+ }
1144
+ /** A static, per-app navigable feature/functionality (not user content). */
1145
+ interface FeatureEntry {
1146
+ id: string;
1147
+ label: string;
1148
+ href: string;
1149
+ icon?: ReactNode;
1150
+ /** Extra terms matched against the query (aliases, section name, etc). */
1151
+ keywords?: string[];
1152
+ /** Optional sub-group label, e.g. "Configuración" vs "Navegación". */
1153
+ group?: string;
1154
+ }
1155
+ /** What the caller's `onSelect` receives — a feature or a hydrated search hit. */
1156
+ type SearchCommandSelection = {
1157
+ kind: "feature";
1158
+ feature: FeatureEntry;
1159
+ } | {
1160
+ kind: "hit";
1161
+ hit: SearchHit;
1162
+ };
1163
+ interface SearchCommandLabels {
1164
+ /** Input placeholder. */
1165
+ placeholder?: string;
1166
+ /** Dialog title (visually hidden, read by screen readers). */
1167
+ dialogTitle?: string;
1168
+ /** Dialog description (visually hidden, read by screen readers). */
1169
+ dialogDescription?: string;
1170
+ /** Shown while `fetchResults` is in flight. */
1171
+ loading?: string;
1172
+ /** Shown when there are no features and no hits for the current query. */
1173
+ empty?: string;
1174
+ /** Shown when `fetchResults` rejects. */
1175
+ error?: string;
1176
+ /** Heading for the static features group. */
1177
+ featuresGroup?: string;
1178
+ /** Fallback heading for a hit type with no entry in `typeLabels`. */
1179
+ defaultResultsGroup?: string;
1180
+ }
1181
+
1182
+ interface SearchCommandProps {
1183
+ open: boolean;
1184
+ onOpenChange: (open: boolean) => void;
1185
+ /** Transport-agnostic fetcher — each app supplies its own (proxy route, RPC, etc). */
1186
+ fetchResults: (query: string) => Promise<SearchHit[]>;
1187
+ onSelect: (selection: SearchCommandSelection) => void;
1188
+ /** Static per-app registry of navigable features, filtered client-side. */
1189
+ features?: FeatureEntry[];
1190
+ /** Maps a `SearchHit.type` to a display group heading, e.g. `{ event: "Eventos" }`. */
1191
+ typeLabels?: Record<string, string>;
1192
+ labels?: SearchCommandLabels;
1193
+ /** Query must reach this length before `fetchResults` is called. Default 2. */
1194
+ minQueryLength?: number;
1195
+ /** Debounce delay before calling `fetchResults`. Default 200ms. */
1196
+ debounceMs?: number;
1197
+ className?: string;
1198
+ }
1199
+ declare function SearchCommand({ open, onOpenChange, fetchResults, onSelect, features, typeLabels, labels: userLabels, minQueryLength, debounceMs, className, }: SearchCommandProps): react_jsx_runtime.JSX.Element;
1200
+
1201
+ /**
1202
+ * Minimal, accent-insensitive fuzzy match for the static feature registry.
1203
+ * Not used for server-returned search hits — those come back already
1204
+ * relevance-ranked (vector + keyword RRF) and must never be hidden by a
1205
+ * literal-substring filter, since semantic matches often don't share
1206
+ * substrings with the query.
1207
+ */
1208
+ /**
1209
+ * True if `query` is a substring of `target`, or a subsequence of it (i.e.
1210
+ * every query character appears in `target`, in order, possibly with gaps).
1211
+ * Both comparisons are case- and accent-insensitive.
1212
+ */
1213
+ declare function fuzzyMatch(query: string, target: string): boolean;
1214
+
1215
+ interface UseSearchHotkeyOptions {
1216
+ /** Initial open state. Defaults to `false`. */
1217
+ defaultOpen?: boolean;
1218
+ /** Disables the keyboard listener without unmounting the palette. */
1219
+ disabled?: boolean;
1220
+ }
1221
+ interface UseSearchHotkeyResult {
1222
+ open: boolean;
1223
+ setOpen: (open: boolean) => void;
1224
+ toggle: () => void;
1225
+ }
1226
+ /**
1227
+ * Manages open state for a global command palette and wires up the
1228
+ * Ctrl/Cmd+K shortcut to toggle it. Ctrl+F is deliberately left alone —
1229
+ * overriding the browser's native find is bad UX.
1230
+ */
1231
+ declare function useSearchHotkey(options?: UseSearchHotkeyOptions): UseSearchHotkeyResult;
1232
+
1106
1233
  interface CardTokenResult {
1107
1234
  tokenId: string;
1108
1235
  brand: string;
@@ -1242,4 +1369,4 @@ declare const MEXICO_STATE_PATHS: Record<MexicoStateId, string>;
1242
1369
 
1243
1370
  declare function cn(...inputs: ClassValue[]): string;
1244
1371
 
1245
- 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, 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 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, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, 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, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type ProfessionalVerificationStatus, type QualityLevel, 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, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, buttonVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, normalizeEmojiQuery, shouldRetryLiveEdge404, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useHlsPlayback, useLanguageContext, useNotificationsContext, usePlaybackStats };
1372
+ 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, 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, 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, EventDialog, type EventDialogLabels, 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, 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 };
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ import * as TogglePrimitive from '@radix-ui/react-toggle';
13
13
  import * as DialogPrimitive from '@radix-ui/react-dialog';
14
14
  import { Drawer as Drawer$1 } from 'vaul';
15
15
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
16
+ import { Command as Command$1 } from 'cmdk';
16
17
  import { ClassValue } from 'clsx';
17
18
 
18
19
  interface CalendarEvent {
@@ -1103,6 +1104,132 @@ declare function DrawerDescription({ className, ...props }: React.ComponentProps
1103
1104
  declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): react_jsx_runtime.JSX.Element;
1104
1105
  declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
1105
1106
 
1107
+ declare function Command({ className, ...props }: React.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
1108
+ declare function CommandDialog({ title, description, children, className, showCloseButton, commandProps, ...props }: React.ComponentProps<typeof Dialog> & {
1109
+ title?: string;
1110
+ description?: string;
1111
+ className?: string;
1112
+ showCloseButton?: boolean;
1113
+ /** Extra props forwarded to the inner `Command` (e.g. `shouldFilter`). */
1114
+ commandProps?: Omit<React.ComponentProps<typeof Command>, "className" | "children">;
1115
+ }): react_jsx_runtime.JSX.Element;
1116
+ declare function CommandInput({ className, ...props }: React.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
1117
+ declare function CommandList({ className, ...props }: React.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
1118
+ declare function CommandEmpty({ ...props }: React.ComponentProps<typeof Command$1.Empty>): react_jsx_runtime.JSX.Element;
1119
+ declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof Command$1.Group>): react_jsx_runtime.JSX.Element;
1120
+ declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof Command$1.Separator>): react_jsx_runtime.JSX.Element;
1121
+ declare function CommandItem({ className, ...props }: React.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
1122
+ declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
1123
+
1124
+ /**
1125
+ * A search result returned by search-svc's `GET /search` after ACL
1126
+ * hydration. Mirrors `search-svc/src/domain/search/types.ts` `SearchHit` —
1127
+ * kept duplicated (not imported) since blocks has no dependency on any
1128
+ * backend service.
1129
+ */
1130
+ interface SearchHit {
1131
+ id: string;
1132
+ type: string;
1133
+ service: string;
1134
+ entityId: string;
1135
+ orgId: string | null;
1136
+ userId: string | null;
1137
+ visibility: string;
1138
+ title: string;
1139
+ snippet: string;
1140
+ url: string;
1141
+ payload: Record<string, unknown>;
1142
+ score: number;
1143
+ }
1144
+ /** A static, per-app navigable feature/functionality (not user content). */
1145
+ interface FeatureEntry {
1146
+ id: string;
1147
+ label: string;
1148
+ href: string;
1149
+ icon?: ReactNode;
1150
+ /** Extra terms matched against the query (aliases, section name, etc). */
1151
+ keywords?: string[];
1152
+ /** Optional sub-group label, e.g. "Configuración" vs "Navegación". */
1153
+ group?: string;
1154
+ }
1155
+ /** What the caller's `onSelect` receives — a feature or a hydrated search hit. */
1156
+ type SearchCommandSelection = {
1157
+ kind: "feature";
1158
+ feature: FeatureEntry;
1159
+ } | {
1160
+ kind: "hit";
1161
+ hit: SearchHit;
1162
+ };
1163
+ interface SearchCommandLabels {
1164
+ /** Input placeholder. */
1165
+ placeholder?: string;
1166
+ /** Dialog title (visually hidden, read by screen readers). */
1167
+ dialogTitle?: string;
1168
+ /** Dialog description (visually hidden, read by screen readers). */
1169
+ dialogDescription?: string;
1170
+ /** Shown while `fetchResults` is in flight. */
1171
+ loading?: string;
1172
+ /** Shown when there are no features and no hits for the current query. */
1173
+ empty?: string;
1174
+ /** Shown when `fetchResults` rejects. */
1175
+ error?: string;
1176
+ /** Heading for the static features group. */
1177
+ featuresGroup?: string;
1178
+ /** Fallback heading for a hit type with no entry in `typeLabels`. */
1179
+ defaultResultsGroup?: string;
1180
+ }
1181
+
1182
+ interface SearchCommandProps {
1183
+ open: boolean;
1184
+ onOpenChange: (open: boolean) => void;
1185
+ /** Transport-agnostic fetcher — each app supplies its own (proxy route, RPC, etc). */
1186
+ fetchResults: (query: string) => Promise<SearchHit[]>;
1187
+ onSelect: (selection: SearchCommandSelection) => void;
1188
+ /** Static per-app registry of navigable features, filtered client-side. */
1189
+ features?: FeatureEntry[];
1190
+ /** Maps a `SearchHit.type` to a display group heading, e.g. `{ event: "Eventos" }`. */
1191
+ typeLabels?: Record<string, string>;
1192
+ labels?: SearchCommandLabels;
1193
+ /** Query must reach this length before `fetchResults` is called. Default 2. */
1194
+ minQueryLength?: number;
1195
+ /** Debounce delay before calling `fetchResults`. Default 200ms. */
1196
+ debounceMs?: number;
1197
+ className?: string;
1198
+ }
1199
+ declare function SearchCommand({ open, onOpenChange, fetchResults, onSelect, features, typeLabels, labels: userLabels, minQueryLength, debounceMs, className, }: SearchCommandProps): react_jsx_runtime.JSX.Element;
1200
+
1201
+ /**
1202
+ * Minimal, accent-insensitive fuzzy match for the static feature registry.
1203
+ * Not used for server-returned search hits — those come back already
1204
+ * relevance-ranked (vector + keyword RRF) and must never be hidden by a
1205
+ * literal-substring filter, since semantic matches often don't share
1206
+ * substrings with the query.
1207
+ */
1208
+ /**
1209
+ * True if `query` is a substring of `target`, or a subsequence of it (i.e.
1210
+ * every query character appears in `target`, in order, possibly with gaps).
1211
+ * Both comparisons are case- and accent-insensitive.
1212
+ */
1213
+ declare function fuzzyMatch(query: string, target: string): boolean;
1214
+
1215
+ interface UseSearchHotkeyOptions {
1216
+ /** Initial open state. Defaults to `false`. */
1217
+ defaultOpen?: boolean;
1218
+ /** Disables the keyboard listener without unmounting the palette. */
1219
+ disabled?: boolean;
1220
+ }
1221
+ interface UseSearchHotkeyResult {
1222
+ open: boolean;
1223
+ setOpen: (open: boolean) => void;
1224
+ toggle: () => void;
1225
+ }
1226
+ /**
1227
+ * Manages open state for a global command palette and wires up the
1228
+ * Ctrl/Cmd+K shortcut to toggle it. Ctrl+F is deliberately left alone —
1229
+ * overriding the browser's native find is bad UX.
1230
+ */
1231
+ declare function useSearchHotkey(options?: UseSearchHotkeyOptions): UseSearchHotkeyResult;
1232
+
1106
1233
  interface CardTokenResult {
1107
1234
  tokenId: string;
1108
1235
  brand: string;
@@ -1242,4 +1369,4 @@ declare const MEXICO_STATE_PATHS: Record<MexicoStateId, string>;
1242
1369
 
1243
1370
  declare function cn(...inputs: ClassValue[]): string;
1244
1371
 
1245
- 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, 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 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, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, 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, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type ProfessionalVerificationStatus, type QualityLevel, 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, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, buttonVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, normalizeEmojiQuery, shouldRetryLiveEdge404, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useHlsPlayback, useLanguageContext, useNotificationsContext, usePlaybackStats };
1372
+ 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, 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, 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, EventDialog, type EventDialogLabels, 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, 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 };