@digilogiclabs/saas-factory-ui 2.0.0 → 2.1.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.mts +28 -2
- package/dist/index.d.ts +28 -2
- package/dist/index.js +98 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +98 -4
- package/dist/index.mjs.map +1 -1
- package/dist/web/index.d.mts +28 -2
- package/dist/web/index.d.ts +28 -2
- package/dist/web/index.js +98 -4
- package/dist/web/index.js.map +1 -1
- package/dist/web/index.mjs +98 -4
- package/dist/web/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/web/index.d.mts
CHANGED
|
@@ -5273,6 +5273,22 @@ interface BracketState {
|
|
|
5273
5273
|
rounds: number;
|
|
5274
5274
|
champion: BracketParticipant | null;
|
|
5275
5275
|
}
|
|
5276
|
+
/**
|
|
5277
|
+
* Serializable projection of a played (or partially played) match —
|
|
5278
|
+
* participant references by id instead of full objects. This is the
|
|
5279
|
+
* shape consumers typically persist from `onStateChange`; pass an array
|
|
5280
|
+
* of these back via `resumeMatches` to restore bracket progress.
|
|
5281
|
+
*/
|
|
5282
|
+
interface BracketResumeMatch {
|
|
5283
|
+
id: number;
|
|
5284
|
+
round: number;
|
|
5285
|
+
slot: number;
|
|
5286
|
+
aId: string | null;
|
|
5287
|
+
bId: string | null;
|
|
5288
|
+
scoreA: number | null;
|
|
5289
|
+
scoreB: number | null;
|
|
5290
|
+
winnerId: string | null;
|
|
5291
|
+
}
|
|
5276
5292
|
interface BracketThemeColors {
|
|
5277
5293
|
accent: string;
|
|
5278
5294
|
bg: string;
|
|
@@ -5299,6 +5315,16 @@ interface BracketGeneratorProps {
|
|
|
5299
5315
|
darkMode?: boolean;
|
|
5300
5316
|
/** Seeding strategy. Default: "standard". */
|
|
5301
5317
|
seedingStrategy?: BracketSeedingStrategy;
|
|
5318
|
+
/**
|
|
5319
|
+
* Previously recorded match results to restore instead of seeding a
|
|
5320
|
+
* fresh bracket. Captured once on mount (one-shot — later prop changes
|
|
5321
|
+
* are ignored, so persisting consumers can pass their live state
|
|
5322
|
+
* without creating a feedback loop through `onStateChange`). Applied
|
|
5323
|
+
* only when every referenced participant id resolves against
|
|
5324
|
+
* `participants` and the match count fits the bracket size; otherwise
|
|
5325
|
+
* the bracket seeds fresh as if the prop were omitted.
|
|
5326
|
+
*/
|
|
5327
|
+
resumeMatches?: BracketResumeMatch[];
|
|
5302
5328
|
/** Called when a match is completed. */
|
|
5303
5329
|
onMatchComplete?: (match: BracketMatch, winner: BracketParticipant) => void;
|
|
5304
5330
|
/** Called when the tournament champion is decided. */
|
|
@@ -5340,7 +5366,7 @@ declare function buildColorTokens(dark: boolean): {
|
|
|
5340
5366
|
seedBg: string;
|
|
5341
5367
|
grid: string;
|
|
5342
5368
|
};
|
|
5343
|
-
declare function BracketGenerator({ participants: participantsProp, size, theme, darkMode, seedingStrategy, onMatchComplete, onChampion, onStateChange, autoSimulate, simulateDelayMs, canvasHeight, minZoom, maxZoom, renderMatch, showControls, showStats, showMiniMap, className, ariaLabel, }: BracketGeneratorProps): react_jsx_runtime.JSX.Element;
|
|
5369
|
+
declare function BracketGenerator({ participants: participantsProp, size, theme, darkMode, seedingStrategy, resumeMatches, onMatchComplete, onChampion, onStateChange, autoSimulate, simulateDelayMs, canvasHeight, minZoom, maxZoom, renderMatch, showControls, showStats, showMiniMap, className, ariaLabel, }: BracketGeneratorProps): react_jsx_runtime.JSX.Element;
|
|
5344
5370
|
|
|
5345
5371
|
type CoinResult = "heads" | "tails";
|
|
5346
5372
|
type CoinThemePreset = "gold" | "silver" | "copper" | "red" | "blue" | "green" | "amber" | "purple";
|
|
@@ -6860,4 +6886,4 @@ declare class OptimizedStateManager {
|
|
|
6860
6886
|
}
|
|
6861
6887
|
declare const stateManager: OptimizedStateManager;
|
|
6862
6888
|
|
|
6863
|
-
export { ANIMATION_DURATION, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type ActivityType, type AdvancedAudioTrack, AdvancedPlayer, type AdvancedPlayerProps, Alert, AlertDescription, AlertTitle, AnalyticsDashboard, AnimatedSectionTitle, type AnimatedSectionTitleProps, type AnimationTokens, Breadcrumbs as AppBreadcrumbs, AppShell, AudioFeed, type AudioFeedProps, AudioPlayer, type AudioPlayerProps, SearchWithFilters as AudioSearch, type AudioTrack, type AudioTrackCardData, AuthLayout, Avatar, AvatarFallback, AvatarImage, Badge, BarChart, type BarChart3IconBand, type BarChartProps, type BaseAccordionItemProps, type BaseAccordionProps, type BaseBreadcrumbsProps, type BaseChartProps, type BaseComponentProps, type BaseEmptyStateProps, type BaseSliderProps, type BaseSwitchProps, type BaseTextareaProps, type BaseTheme, type BorderRadiusScale, BracketGenerator, type BracketGeneratorProps, type BracketMatch, type BracketMatchRenderContext, type BracketParticipant, type BracketSeedingStrategy, type BracketSize, type BracketState, type BracketThemeColors, type BracketThemePreset, BrandLoader, type BrandLoaderGradient, type BrandLoaderMode, type BrandLoaderPath, type BrandLoaderProps, type BreadcrumbItem$1 as BreadcrumbItem, Breadcrumbs$1 as Breadcrumbs, type BreadcrumbsProps$1 as BreadcrumbsProps, type BugReportPayload, BugReporter, type BugReporterProps, Button, type ButtonVariants, type CTAAction, CTACluster, type CTAClusterProps, type CacheStrategy, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Chart, type ChartDataPoint$1 as ChartDataPoint, type ChartProps, type ChartSeries, Checkbox, type CoinCustomTheme, CoinFlipper, type CoinFlipperProps, type CoinResult, type CoinTheme, type CoinThemePreset, type CoinTrigger, CollaborativePlaylist, type CollaborativePlaylistData, type CollaborativePlaylistProps, type Collaborator, type CollaboratorRole, type Column$1 as Column, CommandPalette, type Comment, type CommentData, CommentSystem, type CommentSystemProps, type CommentUser, type ComponentProps, type ComponentSize, type ComponentVariant, Container$1 as Container, ConversionKPI, type CrossfadeMode, DashboardGrid, DashboardLayout, DashboardWidget, type DashboardWidgetProps, DataGrid, type DataGridProps, type DataItem, DataTable, type Column as DataTableColumn, type DataTableProps, type DateFilter, type Delimiter, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, type DiceCount, type DiceCustomTheme, DiceRoller, type DiceRollerProps, type DiceTheme, type DiceThemePreset, type DiceTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, type DurationFilter, DynamicHeroBanner, EmptyState, type EmptyStateProps, EnhancedScrollToTop, type EnhancedScrollToTopProps, type EnvConfig, ErrorAnimation, ErrorBoundary, type ErrorBoundaryProps, ErrorFallback, type ErrorFallbackProps, type ExportOptions, type ExportService, FLOW_TREE_CSS, FLOW_TREE_ICON_NAMES, FeatureGrid, type FeatureGridProps, FeatureHighlight, type FeatureItem, type FeedFilter, type FeedItem, type FeedSortOrder, type FeedbackCategory, FilterChip, type FilterChipProps, type FilterConfig, FilterableGrid, type FilterableGridApplyMode, type FilterableGridCategory, type FilterableGridCategoryNavProps, type FilterableGridFilter, type FilterableGridFilterOption, type FilterableGridLabels, type FilterableGridLayout, type FilterableGridProps, type FilterableGridQuickTab, type FilterableGridRenderCardContext, type FilterableGridSectionOrder, type FilterableGridSort, type FilterableGridState, FixedAudioBar, type FixedAudioBarProps, FlowTree, type FlowTreeAction, type FlowTreeDetail, FlowTreeIcon, type FlowTreeIconName, type FlowTreeIconProps, type FlowTreeIconValue, type FlowTreeImageIcon, type FlowTreeLayoutOptions, type FlowTreeMetaRow, type FlowTreeNode, type FlowTreeProps, type FlowTreeTier, Form, FormBuilder, type FormBuilderProps, FormDescription, type FormField, FormGroup, FormLabel, FormMessage, FormProgress, type FormProps, type FormSchema, FormSection, GameTimer, type GameTimerCustomTheme, type GameTimerHandle, type GameTimerLap, type GameTimerMode, type GameTimerProps, type GameTimerTheme, type GameTimerThemePreset, type GenreFilter, type GlassmorphismTokens, GradientBorderCard, type GradientBorderCardProps, Grid$1 as Grid, GridItem, HamburgerIcon, type HamburgerIconProps, Header, HeaderActions, HeaderBrand, HeaderContainer, HeaderDesktopNav, HeaderMobileTrigger, HeaderNavLink, Hero, type HeroBannerCta, type HeroBannerCtaVariant, type HeroBannerCustomTheme, type HeroBannerImageFilter, type HeroBannerMouseEffect, type HeroBannerProps, type HeroBannerSlide, type HeroBannerStat, type HeroBannerStatsBackground, type HeroBannerStatsLayout, type HeroBannerStatsPosition, type HeroBannerStatsSize, type HeroBannerTextAlign, type HeroBannerThemePreset, type HeroBannerTransition, HeroCTA, HeroContent, type HeroProps, HeroSubtitle, HeroTitle, ImageCropDropZone, type ImageCropDropZoneProps, type ImageCropFormat, ImageCropModal, type ImageCropModalProps, type ImageCropOutput, ImageCropper, type ImageCropperHandle, type ImageCropperProps, InfoAnimation, Input, type InputVariants, type IntersectionObserverOptions, KPIDashboard, type KPIData, KPIWidget, type KPIWidgetProps, Label, LavaLamp, type LavaLampProps, LazyImage, type LazyImagePlaceholder, type LazyImageProps, LineChart, type LineChartProps, type LoadingOverlayApi, type LoadingOverlayContextValue, LoadingOverlayProvider, type LoadingOverlayProviderProps, LoadingSpinner, LogoCloud, type LogoCloudProps, type LogoItem, MobileContainer, type MobileContainerProps, MobileContent, MobileEmailInput, MobileForm, MobileFormActions, MobileFormField, MobileFormGroup, type MobileFormProps, MobileFormSection, MobileGrid, MobileHero, type MobileHeroProps, MobileNavButton, MobileNavContent, MobileNavDrawer, MobileNavFooter, MobileNavHeader, MobileNavLink, MobileNavOverlay, MobileNavTrigger, MobileNavigation, MobileOTPInput, MobilePage, MobilePhoneInput, MobileSection, MobileSticky, Modal, type NativeComponentProps, Container as NativeContainer, Grid as NativeGrid, Section as NativeSection, type NativeStyle, Pagination as NavigationPagination, Stepper as NavigationStepper, Tabs as NavigationTabs, NetworkAwareContent, type NetworkAwareContentProps, type NetworkInfo, type NetworkSpeed, type NetworkType, NewsTicker, type NewsTickerFilter, type NewsTickerFilterOption, type NewsTickerProps, type NewsTickerSort, NotificationCenter, type NotificationCenterProps, type NotificationItem, type NotificationType, type NotificationUser, TrackCard as NowPlayingCard, OSS_LOGO_GRADIENT, OSS_LOGO_PATHS, OSS_LOGO_TRANSFORM, OSS_LOGO_VIEWBOX, OfflineWrapper, type OfflineWrapperProps, Onboarding, OptimizedStateManager, type OptimizedStoreOptions, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, PageTransition, type PageTransitionDirection, type PageTransitionProps, type PageTransitionType, Pagination$1 as Pagination, type PaginationConfig, PaginationInfo, type PaginationInfoProps, type PaginationProps$1 as PaginationProps, type ParseRosterOptions, type ParsedTable, type PerformanceMetrics, type PieChartProps, PillToggle, type PillToggleMultiProps, type PillToggleOption, type PillToggleProps, type PillToggleSingleProps, Platform, type PlatformConfig, type PlatformSelect, type PlatformSelectMultiple, type PlatformType, type PlaybackQuality, type PlaybackState, type PlaylistActivity, PlaylistBuilder, type PlaylistBuilderProps, PlaylistBuilder as PlaylistCard, type PlaylistData, PlaylistBuilder as PlaylistSidebar, type PlaylistTrack, type PlaylistVisibility, Preloader, type PreloaderProps, PremiumCard, PremiumCardContent, PremiumCardFooter, PremiumCardHeader, type PremiumCardProps, PricingHero, type PricingHeroProps, type PricingPlan, Progress, ProgressiveImage, type ProgressiveImageProps, type ProgressiveImageStrategy, type ProgressiveImageTransition, PullToRefresh, type PullToRefreshProps, PulseIndicator, type PulseIndicatorProps, type PulseStatus, QuickForm, ROSTER_IMPORT_MAX_BYTES, type RandomPlayerIntensity, type RandomPlayerMode, type RandomPlayerParticipant, RandomPlayerPicker, type RandomPlayerPickerProps, type RandomPlayerPlaceholderMode, type RandomPlayerTheme, type RandomPlayerThemeColors, type RandomPlayerThemePreset, type RandomPlayerTrigger, type RefreshState, type RepeatMode, type ResponsiveColumns, ResponsiveFlex, ResponsiveGrid, type ResponsiveGridProps, ResponsiveHeader, type ResponsiveHeaderProps, RevenueKPI, RosterFileTooLargeError, RosterImport, type RosterImportLabels, type RosterImportProps, type RoundRobinCustomTheme, type RoundRobinLabels, type RoundRobinMatchup, type RoundRobinRound, RoundRobinScheduler, type RoundRobinSchedulerProps, type RoundRobinTheme, type RoundRobinThemePreset, SafeAreaWrapper, Scoreboard, type ScoreboardCustomTheme, type ScoreboardLabels, type ScoreboardProps, type ScoreboardRoundSnapshot, type ScoreboardTeam, type ScoreboardTheme, type ScoreboardThemePreset, ScrollProgressBar, type ScrollProgressBarProps, ScrollProgressLine, type ScrollProgressLineProps, ScrollToTop, type ScrollToTopProps, type SearchCategory, type SearchFilters, type SearchResult, type SearchSortBy, type SearchSuggestion, SearchWithFilters, type SearchWithFiltersProps, Section$1 as Section, SectionBlock, type SectionBlockProps, SectionLabel, type SectionLabelProps, SectionTitle, SectionedListEditor, type SectionedListEditorProps, type SectionedListSection, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type SelectionConfig, SettingsLayout, type ShareOption, Sidebar, SimpleHero, SimpleResponsiveHeader, type Size, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonText, Slider, type SliderProps, type SocialAction, SocialActions, type SocialActionsProps, type SocialLinks, type SortConfig, type SpacingScale, Stack, StepProgress, type StepProgressProps, StepWizard, type StepWizardProps, type StepWizardStep, SuccessAnimation, type SuccessAnimationProps, SuccessCheckmark, type SwipeAction, SwipeableCard, type SwipeableCardProps, Switch, type SwitchProps, THEME_COLORS, type TabItem$1 as TabItem, TabNavigation, type TabNavigationProps, Tabs$1 as Tabs, TabsContent, TabsList, TabsTrigger, TagInput, type TagInputProps, type TeamColorSwatch, TeamGenerator, type TeamGeneratorCustomTheme, type TeamGeneratorLabels, type TeamGeneratorProps, type TeamGeneratorTheme, type TeamGeneratorThemePreset, Textarea, type TextareaProps, type Theme, type ThemeColors, ThemeProvider, ThemeToggle, type ThemeToggleProps, TiltCard, type TiltCardAspectRatio, type TiltCardProps, type TiltCardStat, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, ToastIcon, type ToastIconProps, type ToastProps, ToastProvider, ToastTitle, type ToastVariant, ToastViewport, Toaster, Tooltip$1 as Tooltip, TooltipContent, type TooltipProps$1 as TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, TouchInput, type TouchInputProps, Tour, Tooltip as TourTooltip, type Track, TrackCard, type TrackCardProps, AudioFeed as TrackList, type TrendingSection, type TrendingTrack, TrendingTracks, type TrendingTracksProps, type TutorialAction, TutorialEmbed, type TutorialEmbedProps, TutorialGallery, type TutorialGalleryProps, type TutorialMedia, type TutorialMetadata, TutorialSequence, type TutorialSequenceProps, type TutorialStep, type UseIntersectionObserverResult, type UsePerformanceObserverOptions, UserProfile, type UserProfileData, type UserProfileProps, type UserStats, UsersKPI, VARIANT_ICONS, type Variant, type VideoAuthor, type VideoChapter, VideoPlayer, type VideoPlayerProps, type VideoQuality, type VideoSubtitle, type VideoTrack, VirtualScrollList, type VirtualScrollListProps, type VirtualizationConfig, type VirtualizedItem, type VisualizerType, WarningAnimation, type WaveformData, WaveformPlayer, type WaveformPlayerProps, type WebComponentProps, type WebStyle, WelcomeModal, Z_INDEX, accordionVariants, animationPresets, audioAppTabs, audioPlayerVariants, breadcrumbsVariants, cn, commonValidators, containerVariants, contentVariants, createDataStore, createFormStore, createOptimizedStore, cssAnimations, dailyTrendingConfig, detectAuthProvider, detectDelimiter, detectHeader, disableScroll, durations, emptyStateVariants, enableScroll, extractRoster, fadeInOut, formVariants, formatCurrency, formatDate, formatNumber, genreChartsConfigs, getConfig, getEnvInfo, getEnvVar, getScrollbarWidth, gridVariants, hamburgerVariants, headerVariants, heroVariants, inputVariants, isBrowser, isExpo, isNative, isWeb, labelVariants, musicAppTabs, nativeConfig, parseRoster, parseTable, podcastAppTabs, readRosterFile, scaleInOut, slideUp, sliderVariants, stateManager, stickyActionsVariants, switchVariants, textareaVariants, theme, themes, timingFunctions, toast, toastVariants, useAnimationTokens, useCache, useClickOutside, useCustomPerformanceTracking, useDebouncedCallback, useEscapeKey, useGlassmorphism, useInfiniteScroll, useIntersectionObserver, useLazyLoad, useLoadingOverlay, useLoadingOverlayApi, useLoadingOverlayVisible, useLockBody, useMediaQuery, useMobileNavigation, useMounted, useNetworkInfo, useOfflineState, useOptimizedMemo, useOptimizedStoreSelector, usePerformanceObserver, useRenderPerformanceTracking, useTheme, useThrottledCallback, useToast, useVirtualization, useVisibilityTracking, validateEmail, validateEnvConfig, validatePassword, videoPlayerVariants, webAnimations, webConfig, weeklyChartsConfig, withNetworkAware, withPageTransition };
|
|
6889
|
+
export { ANIMATION_DURATION, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type ActivityType, type AdvancedAudioTrack, AdvancedPlayer, type AdvancedPlayerProps, Alert, AlertDescription, AlertTitle, AnalyticsDashboard, AnimatedSectionTitle, type AnimatedSectionTitleProps, type AnimationTokens, Breadcrumbs as AppBreadcrumbs, AppShell, AudioFeed, type AudioFeedProps, AudioPlayer, type AudioPlayerProps, SearchWithFilters as AudioSearch, type AudioTrack, type AudioTrackCardData, AuthLayout, Avatar, AvatarFallback, AvatarImage, Badge, BarChart, type BarChart3IconBand, type BarChartProps, type BaseAccordionItemProps, type BaseAccordionProps, type BaseBreadcrumbsProps, type BaseChartProps, type BaseComponentProps, type BaseEmptyStateProps, type BaseSliderProps, type BaseSwitchProps, type BaseTextareaProps, type BaseTheme, type BorderRadiusScale, BracketGenerator, type BracketGeneratorProps, type BracketMatch, type BracketMatchRenderContext, type BracketParticipant, type BracketResumeMatch, type BracketSeedingStrategy, type BracketSize, type BracketState, type BracketThemeColors, type BracketThemePreset, BrandLoader, type BrandLoaderGradient, type BrandLoaderMode, type BrandLoaderPath, type BrandLoaderProps, type BreadcrumbItem$1 as BreadcrumbItem, Breadcrumbs$1 as Breadcrumbs, type BreadcrumbsProps$1 as BreadcrumbsProps, type BugReportPayload, BugReporter, type BugReporterProps, Button, type ButtonVariants, type CTAAction, CTACluster, type CTAClusterProps, type CacheStrategy, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Chart, type ChartDataPoint$1 as ChartDataPoint, type ChartProps, type ChartSeries, Checkbox, type CoinCustomTheme, CoinFlipper, type CoinFlipperProps, type CoinResult, type CoinTheme, type CoinThemePreset, type CoinTrigger, CollaborativePlaylist, type CollaborativePlaylistData, type CollaborativePlaylistProps, type Collaborator, type CollaboratorRole, type Column$1 as Column, CommandPalette, type Comment, type CommentData, CommentSystem, type CommentSystemProps, type CommentUser, type ComponentProps, type ComponentSize, type ComponentVariant, Container$1 as Container, ConversionKPI, type CrossfadeMode, DashboardGrid, DashboardLayout, DashboardWidget, type DashboardWidgetProps, DataGrid, type DataGridProps, type DataItem, DataTable, type Column as DataTableColumn, type DataTableProps, type DateFilter, type Delimiter, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, type DiceCount, type DiceCustomTheme, DiceRoller, type DiceRollerProps, type DiceTheme, type DiceThemePreset, type DiceTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, type DurationFilter, DynamicHeroBanner, EmptyState, type EmptyStateProps, EnhancedScrollToTop, type EnhancedScrollToTopProps, type EnvConfig, ErrorAnimation, ErrorBoundary, type ErrorBoundaryProps, ErrorFallback, type ErrorFallbackProps, type ExportOptions, type ExportService, FLOW_TREE_CSS, FLOW_TREE_ICON_NAMES, FeatureGrid, type FeatureGridProps, FeatureHighlight, type FeatureItem, type FeedFilter, type FeedItem, type FeedSortOrder, type FeedbackCategory, FilterChip, type FilterChipProps, type FilterConfig, FilterableGrid, type FilterableGridApplyMode, type FilterableGridCategory, type FilterableGridCategoryNavProps, type FilterableGridFilter, type FilterableGridFilterOption, type FilterableGridLabels, type FilterableGridLayout, type FilterableGridProps, type FilterableGridQuickTab, type FilterableGridRenderCardContext, type FilterableGridSectionOrder, type FilterableGridSort, type FilterableGridState, FixedAudioBar, type FixedAudioBarProps, FlowTree, type FlowTreeAction, type FlowTreeDetail, FlowTreeIcon, type FlowTreeIconName, type FlowTreeIconProps, type FlowTreeIconValue, type FlowTreeImageIcon, type FlowTreeLayoutOptions, type FlowTreeMetaRow, type FlowTreeNode, type FlowTreeProps, type FlowTreeTier, Form, FormBuilder, type FormBuilderProps, FormDescription, type FormField, FormGroup, FormLabel, FormMessage, FormProgress, type FormProps, type FormSchema, FormSection, GameTimer, type GameTimerCustomTheme, type GameTimerHandle, type GameTimerLap, type GameTimerMode, type GameTimerProps, type GameTimerTheme, type GameTimerThemePreset, type GenreFilter, type GlassmorphismTokens, GradientBorderCard, type GradientBorderCardProps, Grid$1 as Grid, GridItem, HamburgerIcon, type HamburgerIconProps, Header, HeaderActions, HeaderBrand, HeaderContainer, HeaderDesktopNav, HeaderMobileTrigger, HeaderNavLink, Hero, type HeroBannerCta, type HeroBannerCtaVariant, type HeroBannerCustomTheme, type HeroBannerImageFilter, type HeroBannerMouseEffect, type HeroBannerProps, type HeroBannerSlide, type HeroBannerStat, type HeroBannerStatsBackground, type HeroBannerStatsLayout, type HeroBannerStatsPosition, type HeroBannerStatsSize, type HeroBannerTextAlign, type HeroBannerThemePreset, type HeroBannerTransition, HeroCTA, HeroContent, type HeroProps, HeroSubtitle, HeroTitle, ImageCropDropZone, type ImageCropDropZoneProps, type ImageCropFormat, ImageCropModal, type ImageCropModalProps, type ImageCropOutput, ImageCropper, type ImageCropperHandle, type ImageCropperProps, InfoAnimation, Input, type InputVariants, type IntersectionObserverOptions, KPIDashboard, type KPIData, KPIWidget, type KPIWidgetProps, Label, LavaLamp, type LavaLampProps, LazyImage, type LazyImagePlaceholder, type LazyImageProps, LineChart, type LineChartProps, type LoadingOverlayApi, type LoadingOverlayContextValue, LoadingOverlayProvider, type LoadingOverlayProviderProps, LoadingSpinner, LogoCloud, type LogoCloudProps, type LogoItem, MobileContainer, type MobileContainerProps, MobileContent, MobileEmailInput, MobileForm, MobileFormActions, MobileFormField, MobileFormGroup, type MobileFormProps, MobileFormSection, MobileGrid, MobileHero, type MobileHeroProps, MobileNavButton, MobileNavContent, MobileNavDrawer, MobileNavFooter, MobileNavHeader, MobileNavLink, MobileNavOverlay, MobileNavTrigger, MobileNavigation, MobileOTPInput, MobilePage, MobilePhoneInput, MobileSection, MobileSticky, Modal, type NativeComponentProps, Container as NativeContainer, Grid as NativeGrid, Section as NativeSection, type NativeStyle, Pagination as NavigationPagination, Stepper as NavigationStepper, Tabs as NavigationTabs, NetworkAwareContent, type NetworkAwareContentProps, type NetworkInfo, type NetworkSpeed, type NetworkType, NewsTicker, type NewsTickerFilter, type NewsTickerFilterOption, type NewsTickerProps, type NewsTickerSort, NotificationCenter, type NotificationCenterProps, type NotificationItem, type NotificationType, type NotificationUser, TrackCard as NowPlayingCard, OSS_LOGO_GRADIENT, OSS_LOGO_PATHS, OSS_LOGO_TRANSFORM, OSS_LOGO_VIEWBOX, OfflineWrapper, type OfflineWrapperProps, Onboarding, OptimizedStateManager, type OptimizedStoreOptions, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, PageTransition, type PageTransitionDirection, type PageTransitionProps, type PageTransitionType, Pagination$1 as Pagination, type PaginationConfig, PaginationInfo, type PaginationInfoProps, type PaginationProps$1 as PaginationProps, type ParseRosterOptions, type ParsedTable, type PerformanceMetrics, type PieChartProps, PillToggle, type PillToggleMultiProps, type PillToggleOption, type PillToggleProps, type PillToggleSingleProps, Platform, type PlatformConfig, type PlatformSelect, type PlatformSelectMultiple, type PlatformType, type PlaybackQuality, type PlaybackState, type PlaylistActivity, PlaylistBuilder, type PlaylistBuilderProps, PlaylistBuilder as PlaylistCard, type PlaylistData, PlaylistBuilder as PlaylistSidebar, type PlaylistTrack, type PlaylistVisibility, Preloader, type PreloaderProps, PremiumCard, PremiumCardContent, PremiumCardFooter, PremiumCardHeader, type PremiumCardProps, PricingHero, type PricingHeroProps, type PricingPlan, Progress, ProgressiveImage, type ProgressiveImageProps, type ProgressiveImageStrategy, type ProgressiveImageTransition, PullToRefresh, type PullToRefreshProps, PulseIndicator, type PulseIndicatorProps, type PulseStatus, QuickForm, ROSTER_IMPORT_MAX_BYTES, type RandomPlayerIntensity, type RandomPlayerMode, type RandomPlayerParticipant, RandomPlayerPicker, type RandomPlayerPickerProps, type RandomPlayerPlaceholderMode, type RandomPlayerTheme, type RandomPlayerThemeColors, type RandomPlayerThemePreset, type RandomPlayerTrigger, type RefreshState, type RepeatMode, type ResponsiveColumns, ResponsiveFlex, ResponsiveGrid, type ResponsiveGridProps, ResponsiveHeader, type ResponsiveHeaderProps, RevenueKPI, RosterFileTooLargeError, RosterImport, type RosterImportLabels, type RosterImportProps, type RoundRobinCustomTheme, type RoundRobinLabels, type RoundRobinMatchup, type RoundRobinRound, RoundRobinScheduler, type RoundRobinSchedulerProps, type RoundRobinTheme, type RoundRobinThemePreset, SafeAreaWrapper, Scoreboard, type ScoreboardCustomTheme, type ScoreboardLabels, type ScoreboardProps, type ScoreboardRoundSnapshot, type ScoreboardTeam, type ScoreboardTheme, type ScoreboardThemePreset, ScrollProgressBar, type ScrollProgressBarProps, ScrollProgressLine, type ScrollProgressLineProps, ScrollToTop, type ScrollToTopProps, type SearchCategory, type SearchFilters, type SearchResult, type SearchSortBy, type SearchSuggestion, SearchWithFilters, type SearchWithFiltersProps, Section$1 as Section, SectionBlock, type SectionBlockProps, SectionLabel, type SectionLabelProps, SectionTitle, SectionedListEditor, type SectionedListEditorProps, type SectionedListSection, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type SelectionConfig, SettingsLayout, type ShareOption, Sidebar, SimpleHero, SimpleResponsiveHeader, type Size, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonText, Slider, type SliderProps, type SocialAction, SocialActions, type SocialActionsProps, type SocialLinks, type SortConfig, type SpacingScale, Stack, StepProgress, type StepProgressProps, StepWizard, type StepWizardProps, type StepWizardStep, SuccessAnimation, type SuccessAnimationProps, SuccessCheckmark, type SwipeAction, SwipeableCard, type SwipeableCardProps, Switch, type SwitchProps, THEME_COLORS, type TabItem$1 as TabItem, TabNavigation, type TabNavigationProps, Tabs$1 as Tabs, TabsContent, TabsList, TabsTrigger, TagInput, type TagInputProps, type TeamColorSwatch, TeamGenerator, type TeamGeneratorCustomTheme, type TeamGeneratorLabels, type TeamGeneratorProps, type TeamGeneratorTheme, type TeamGeneratorThemePreset, Textarea, type TextareaProps, type Theme, type ThemeColors, ThemeProvider, ThemeToggle, type ThemeToggleProps, TiltCard, type TiltCardAspectRatio, type TiltCardProps, type TiltCardStat, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, ToastIcon, type ToastIconProps, type ToastProps, ToastProvider, ToastTitle, type ToastVariant, ToastViewport, Toaster, Tooltip$1 as Tooltip, TooltipContent, type TooltipProps$1 as TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, TouchInput, type TouchInputProps, Tour, Tooltip as TourTooltip, type Track, TrackCard, type TrackCardProps, AudioFeed as TrackList, type TrendingSection, type TrendingTrack, TrendingTracks, type TrendingTracksProps, type TutorialAction, TutorialEmbed, type TutorialEmbedProps, TutorialGallery, type TutorialGalleryProps, type TutorialMedia, type TutorialMetadata, TutorialSequence, type TutorialSequenceProps, type TutorialStep, type UseIntersectionObserverResult, type UsePerformanceObserverOptions, UserProfile, type UserProfileData, type UserProfileProps, type UserStats, UsersKPI, VARIANT_ICONS, type Variant, type VideoAuthor, type VideoChapter, VideoPlayer, type VideoPlayerProps, type VideoQuality, type VideoSubtitle, type VideoTrack, VirtualScrollList, type VirtualScrollListProps, type VirtualizationConfig, type VirtualizedItem, type VisualizerType, WarningAnimation, type WaveformData, WaveformPlayer, type WaveformPlayerProps, type WebComponentProps, type WebStyle, WelcomeModal, Z_INDEX, accordionVariants, animationPresets, audioAppTabs, audioPlayerVariants, breadcrumbsVariants, cn, commonValidators, containerVariants, contentVariants, createDataStore, createFormStore, createOptimizedStore, cssAnimations, dailyTrendingConfig, detectAuthProvider, detectDelimiter, detectHeader, disableScroll, durations, emptyStateVariants, enableScroll, extractRoster, fadeInOut, formVariants, formatCurrency, formatDate, formatNumber, genreChartsConfigs, getConfig, getEnvInfo, getEnvVar, getScrollbarWidth, gridVariants, hamburgerVariants, headerVariants, heroVariants, inputVariants, isBrowser, isExpo, isNative, isWeb, labelVariants, musicAppTabs, nativeConfig, parseRoster, parseTable, podcastAppTabs, readRosterFile, scaleInOut, slideUp, sliderVariants, stateManager, stickyActionsVariants, switchVariants, textareaVariants, theme, themes, timingFunctions, toast, toastVariants, useAnimationTokens, useCache, useClickOutside, useCustomPerformanceTracking, useDebouncedCallback, useEscapeKey, useGlassmorphism, useInfiniteScroll, useIntersectionObserver, useLazyLoad, useLoadingOverlay, useLoadingOverlayApi, useLoadingOverlayVisible, useLockBody, useMediaQuery, useMobileNavigation, useMounted, useNetworkInfo, useOfflineState, useOptimizedMemo, useOptimizedStoreSelector, usePerformanceObserver, useRenderPerformanceTracking, useTheme, useThrottledCallback, useToast, useVirtualization, useVisibilityTracking, validateEmail, validateEnvConfig, validatePassword, videoPlayerVariants, webAnimations, webConfig, weeklyChartsConfig, withNetworkAware, withPageTransition };
|
package/dist/web/index.d.ts
CHANGED
|
@@ -5273,6 +5273,22 @@ interface BracketState {
|
|
|
5273
5273
|
rounds: number;
|
|
5274
5274
|
champion: BracketParticipant | null;
|
|
5275
5275
|
}
|
|
5276
|
+
/**
|
|
5277
|
+
* Serializable projection of a played (or partially played) match —
|
|
5278
|
+
* participant references by id instead of full objects. This is the
|
|
5279
|
+
* shape consumers typically persist from `onStateChange`; pass an array
|
|
5280
|
+
* of these back via `resumeMatches` to restore bracket progress.
|
|
5281
|
+
*/
|
|
5282
|
+
interface BracketResumeMatch {
|
|
5283
|
+
id: number;
|
|
5284
|
+
round: number;
|
|
5285
|
+
slot: number;
|
|
5286
|
+
aId: string | null;
|
|
5287
|
+
bId: string | null;
|
|
5288
|
+
scoreA: number | null;
|
|
5289
|
+
scoreB: number | null;
|
|
5290
|
+
winnerId: string | null;
|
|
5291
|
+
}
|
|
5276
5292
|
interface BracketThemeColors {
|
|
5277
5293
|
accent: string;
|
|
5278
5294
|
bg: string;
|
|
@@ -5299,6 +5315,16 @@ interface BracketGeneratorProps {
|
|
|
5299
5315
|
darkMode?: boolean;
|
|
5300
5316
|
/** Seeding strategy. Default: "standard". */
|
|
5301
5317
|
seedingStrategy?: BracketSeedingStrategy;
|
|
5318
|
+
/**
|
|
5319
|
+
* Previously recorded match results to restore instead of seeding a
|
|
5320
|
+
* fresh bracket. Captured once on mount (one-shot — later prop changes
|
|
5321
|
+
* are ignored, so persisting consumers can pass their live state
|
|
5322
|
+
* without creating a feedback loop through `onStateChange`). Applied
|
|
5323
|
+
* only when every referenced participant id resolves against
|
|
5324
|
+
* `participants` and the match count fits the bracket size; otherwise
|
|
5325
|
+
* the bracket seeds fresh as if the prop were omitted.
|
|
5326
|
+
*/
|
|
5327
|
+
resumeMatches?: BracketResumeMatch[];
|
|
5302
5328
|
/** Called when a match is completed. */
|
|
5303
5329
|
onMatchComplete?: (match: BracketMatch, winner: BracketParticipant) => void;
|
|
5304
5330
|
/** Called when the tournament champion is decided. */
|
|
@@ -5340,7 +5366,7 @@ declare function buildColorTokens(dark: boolean): {
|
|
|
5340
5366
|
seedBg: string;
|
|
5341
5367
|
grid: string;
|
|
5342
5368
|
};
|
|
5343
|
-
declare function BracketGenerator({ participants: participantsProp, size, theme, darkMode, seedingStrategy, onMatchComplete, onChampion, onStateChange, autoSimulate, simulateDelayMs, canvasHeight, minZoom, maxZoom, renderMatch, showControls, showStats, showMiniMap, className, ariaLabel, }: BracketGeneratorProps): react_jsx_runtime.JSX.Element;
|
|
5369
|
+
declare function BracketGenerator({ participants: participantsProp, size, theme, darkMode, seedingStrategy, resumeMatches, onMatchComplete, onChampion, onStateChange, autoSimulate, simulateDelayMs, canvasHeight, minZoom, maxZoom, renderMatch, showControls, showStats, showMiniMap, className, ariaLabel, }: BracketGeneratorProps): react_jsx_runtime.JSX.Element;
|
|
5344
5370
|
|
|
5345
5371
|
type CoinResult = "heads" | "tails";
|
|
5346
5372
|
type CoinThemePreset = "gold" | "silver" | "copper" | "red" | "blue" | "green" | "amber" | "purple";
|
|
@@ -6860,4 +6886,4 @@ declare class OptimizedStateManager {
|
|
|
6860
6886
|
}
|
|
6861
6887
|
declare const stateManager: OptimizedStateManager;
|
|
6862
6888
|
|
|
6863
|
-
export { ANIMATION_DURATION, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type ActivityType, type AdvancedAudioTrack, AdvancedPlayer, type AdvancedPlayerProps, Alert, AlertDescription, AlertTitle, AnalyticsDashboard, AnimatedSectionTitle, type AnimatedSectionTitleProps, type AnimationTokens, Breadcrumbs as AppBreadcrumbs, AppShell, AudioFeed, type AudioFeedProps, AudioPlayer, type AudioPlayerProps, SearchWithFilters as AudioSearch, type AudioTrack, type AudioTrackCardData, AuthLayout, Avatar, AvatarFallback, AvatarImage, Badge, BarChart, type BarChart3IconBand, type BarChartProps, type BaseAccordionItemProps, type BaseAccordionProps, type BaseBreadcrumbsProps, type BaseChartProps, type BaseComponentProps, type BaseEmptyStateProps, type BaseSliderProps, type BaseSwitchProps, type BaseTextareaProps, type BaseTheme, type BorderRadiusScale, BracketGenerator, type BracketGeneratorProps, type BracketMatch, type BracketMatchRenderContext, type BracketParticipant, type BracketSeedingStrategy, type BracketSize, type BracketState, type BracketThemeColors, type BracketThemePreset, BrandLoader, type BrandLoaderGradient, type BrandLoaderMode, type BrandLoaderPath, type BrandLoaderProps, type BreadcrumbItem$1 as BreadcrumbItem, Breadcrumbs$1 as Breadcrumbs, type BreadcrumbsProps$1 as BreadcrumbsProps, type BugReportPayload, BugReporter, type BugReporterProps, Button, type ButtonVariants, type CTAAction, CTACluster, type CTAClusterProps, type CacheStrategy, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Chart, type ChartDataPoint$1 as ChartDataPoint, type ChartProps, type ChartSeries, Checkbox, type CoinCustomTheme, CoinFlipper, type CoinFlipperProps, type CoinResult, type CoinTheme, type CoinThemePreset, type CoinTrigger, CollaborativePlaylist, type CollaborativePlaylistData, type CollaborativePlaylistProps, type Collaborator, type CollaboratorRole, type Column$1 as Column, CommandPalette, type Comment, type CommentData, CommentSystem, type CommentSystemProps, type CommentUser, type ComponentProps, type ComponentSize, type ComponentVariant, Container$1 as Container, ConversionKPI, type CrossfadeMode, DashboardGrid, DashboardLayout, DashboardWidget, type DashboardWidgetProps, DataGrid, type DataGridProps, type DataItem, DataTable, type Column as DataTableColumn, type DataTableProps, type DateFilter, type Delimiter, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, type DiceCount, type DiceCustomTheme, DiceRoller, type DiceRollerProps, type DiceTheme, type DiceThemePreset, type DiceTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, type DurationFilter, DynamicHeroBanner, EmptyState, type EmptyStateProps, EnhancedScrollToTop, type EnhancedScrollToTopProps, type EnvConfig, ErrorAnimation, ErrorBoundary, type ErrorBoundaryProps, ErrorFallback, type ErrorFallbackProps, type ExportOptions, type ExportService, FLOW_TREE_CSS, FLOW_TREE_ICON_NAMES, FeatureGrid, type FeatureGridProps, FeatureHighlight, type FeatureItem, type FeedFilter, type FeedItem, type FeedSortOrder, type FeedbackCategory, FilterChip, type FilterChipProps, type FilterConfig, FilterableGrid, type FilterableGridApplyMode, type FilterableGridCategory, type FilterableGridCategoryNavProps, type FilterableGridFilter, type FilterableGridFilterOption, type FilterableGridLabels, type FilterableGridLayout, type FilterableGridProps, type FilterableGridQuickTab, type FilterableGridRenderCardContext, type FilterableGridSectionOrder, type FilterableGridSort, type FilterableGridState, FixedAudioBar, type FixedAudioBarProps, FlowTree, type FlowTreeAction, type FlowTreeDetail, FlowTreeIcon, type FlowTreeIconName, type FlowTreeIconProps, type FlowTreeIconValue, type FlowTreeImageIcon, type FlowTreeLayoutOptions, type FlowTreeMetaRow, type FlowTreeNode, type FlowTreeProps, type FlowTreeTier, Form, FormBuilder, type FormBuilderProps, FormDescription, type FormField, FormGroup, FormLabel, FormMessage, FormProgress, type FormProps, type FormSchema, FormSection, GameTimer, type GameTimerCustomTheme, type GameTimerHandle, type GameTimerLap, type GameTimerMode, type GameTimerProps, type GameTimerTheme, type GameTimerThemePreset, type GenreFilter, type GlassmorphismTokens, GradientBorderCard, type GradientBorderCardProps, Grid$1 as Grid, GridItem, HamburgerIcon, type HamburgerIconProps, Header, HeaderActions, HeaderBrand, HeaderContainer, HeaderDesktopNav, HeaderMobileTrigger, HeaderNavLink, Hero, type HeroBannerCta, type HeroBannerCtaVariant, type HeroBannerCustomTheme, type HeroBannerImageFilter, type HeroBannerMouseEffect, type HeroBannerProps, type HeroBannerSlide, type HeroBannerStat, type HeroBannerStatsBackground, type HeroBannerStatsLayout, type HeroBannerStatsPosition, type HeroBannerStatsSize, type HeroBannerTextAlign, type HeroBannerThemePreset, type HeroBannerTransition, HeroCTA, HeroContent, type HeroProps, HeroSubtitle, HeroTitle, ImageCropDropZone, type ImageCropDropZoneProps, type ImageCropFormat, ImageCropModal, type ImageCropModalProps, type ImageCropOutput, ImageCropper, type ImageCropperHandle, type ImageCropperProps, InfoAnimation, Input, type InputVariants, type IntersectionObserverOptions, KPIDashboard, type KPIData, KPIWidget, type KPIWidgetProps, Label, LavaLamp, type LavaLampProps, LazyImage, type LazyImagePlaceholder, type LazyImageProps, LineChart, type LineChartProps, type LoadingOverlayApi, type LoadingOverlayContextValue, LoadingOverlayProvider, type LoadingOverlayProviderProps, LoadingSpinner, LogoCloud, type LogoCloudProps, type LogoItem, MobileContainer, type MobileContainerProps, MobileContent, MobileEmailInput, MobileForm, MobileFormActions, MobileFormField, MobileFormGroup, type MobileFormProps, MobileFormSection, MobileGrid, MobileHero, type MobileHeroProps, MobileNavButton, MobileNavContent, MobileNavDrawer, MobileNavFooter, MobileNavHeader, MobileNavLink, MobileNavOverlay, MobileNavTrigger, MobileNavigation, MobileOTPInput, MobilePage, MobilePhoneInput, MobileSection, MobileSticky, Modal, type NativeComponentProps, Container as NativeContainer, Grid as NativeGrid, Section as NativeSection, type NativeStyle, Pagination as NavigationPagination, Stepper as NavigationStepper, Tabs as NavigationTabs, NetworkAwareContent, type NetworkAwareContentProps, type NetworkInfo, type NetworkSpeed, type NetworkType, NewsTicker, type NewsTickerFilter, type NewsTickerFilterOption, type NewsTickerProps, type NewsTickerSort, NotificationCenter, type NotificationCenterProps, type NotificationItem, type NotificationType, type NotificationUser, TrackCard as NowPlayingCard, OSS_LOGO_GRADIENT, OSS_LOGO_PATHS, OSS_LOGO_TRANSFORM, OSS_LOGO_VIEWBOX, OfflineWrapper, type OfflineWrapperProps, Onboarding, OptimizedStateManager, type OptimizedStoreOptions, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, PageTransition, type PageTransitionDirection, type PageTransitionProps, type PageTransitionType, Pagination$1 as Pagination, type PaginationConfig, PaginationInfo, type PaginationInfoProps, type PaginationProps$1 as PaginationProps, type ParseRosterOptions, type ParsedTable, type PerformanceMetrics, type PieChartProps, PillToggle, type PillToggleMultiProps, type PillToggleOption, type PillToggleProps, type PillToggleSingleProps, Platform, type PlatformConfig, type PlatformSelect, type PlatformSelectMultiple, type PlatformType, type PlaybackQuality, type PlaybackState, type PlaylistActivity, PlaylistBuilder, type PlaylistBuilderProps, PlaylistBuilder as PlaylistCard, type PlaylistData, PlaylistBuilder as PlaylistSidebar, type PlaylistTrack, type PlaylistVisibility, Preloader, type PreloaderProps, PremiumCard, PremiumCardContent, PremiumCardFooter, PremiumCardHeader, type PremiumCardProps, PricingHero, type PricingHeroProps, type PricingPlan, Progress, ProgressiveImage, type ProgressiveImageProps, type ProgressiveImageStrategy, type ProgressiveImageTransition, PullToRefresh, type PullToRefreshProps, PulseIndicator, type PulseIndicatorProps, type PulseStatus, QuickForm, ROSTER_IMPORT_MAX_BYTES, type RandomPlayerIntensity, type RandomPlayerMode, type RandomPlayerParticipant, RandomPlayerPicker, type RandomPlayerPickerProps, type RandomPlayerPlaceholderMode, type RandomPlayerTheme, type RandomPlayerThemeColors, type RandomPlayerThemePreset, type RandomPlayerTrigger, type RefreshState, type RepeatMode, type ResponsiveColumns, ResponsiveFlex, ResponsiveGrid, type ResponsiveGridProps, ResponsiveHeader, type ResponsiveHeaderProps, RevenueKPI, RosterFileTooLargeError, RosterImport, type RosterImportLabels, type RosterImportProps, type RoundRobinCustomTheme, type RoundRobinLabels, type RoundRobinMatchup, type RoundRobinRound, RoundRobinScheduler, type RoundRobinSchedulerProps, type RoundRobinTheme, type RoundRobinThemePreset, SafeAreaWrapper, Scoreboard, type ScoreboardCustomTheme, type ScoreboardLabels, type ScoreboardProps, type ScoreboardRoundSnapshot, type ScoreboardTeam, type ScoreboardTheme, type ScoreboardThemePreset, ScrollProgressBar, type ScrollProgressBarProps, ScrollProgressLine, type ScrollProgressLineProps, ScrollToTop, type ScrollToTopProps, type SearchCategory, type SearchFilters, type SearchResult, type SearchSortBy, type SearchSuggestion, SearchWithFilters, type SearchWithFiltersProps, Section$1 as Section, SectionBlock, type SectionBlockProps, SectionLabel, type SectionLabelProps, SectionTitle, SectionedListEditor, type SectionedListEditorProps, type SectionedListSection, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type SelectionConfig, SettingsLayout, type ShareOption, Sidebar, SimpleHero, SimpleResponsiveHeader, type Size, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonText, Slider, type SliderProps, type SocialAction, SocialActions, type SocialActionsProps, type SocialLinks, type SortConfig, type SpacingScale, Stack, StepProgress, type StepProgressProps, StepWizard, type StepWizardProps, type StepWizardStep, SuccessAnimation, type SuccessAnimationProps, SuccessCheckmark, type SwipeAction, SwipeableCard, type SwipeableCardProps, Switch, type SwitchProps, THEME_COLORS, type TabItem$1 as TabItem, TabNavigation, type TabNavigationProps, Tabs$1 as Tabs, TabsContent, TabsList, TabsTrigger, TagInput, type TagInputProps, type TeamColorSwatch, TeamGenerator, type TeamGeneratorCustomTheme, type TeamGeneratorLabels, type TeamGeneratorProps, type TeamGeneratorTheme, type TeamGeneratorThemePreset, Textarea, type TextareaProps, type Theme, type ThemeColors, ThemeProvider, ThemeToggle, type ThemeToggleProps, TiltCard, type TiltCardAspectRatio, type TiltCardProps, type TiltCardStat, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, ToastIcon, type ToastIconProps, type ToastProps, ToastProvider, ToastTitle, type ToastVariant, ToastViewport, Toaster, Tooltip$1 as Tooltip, TooltipContent, type TooltipProps$1 as TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, TouchInput, type TouchInputProps, Tour, Tooltip as TourTooltip, type Track, TrackCard, type TrackCardProps, AudioFeed as TrackList, type TrendingSection, type TrendingTrack, TrendingTracks, type TrendingTracksProps, type TutorialAction, TutorialEmbed, type TutorialEmbedProps, TutorialGallery, type TutorialGalleryProps, type TutorialMedia, type TutorialMetadata, TutorialSequence, type TutorialSequenceProps, type TutorialStep, type UseIntersectionObserverResult, type UsePerformanceObserverOptions, UserProfile, type UserProfileData, type UserProfileProps, type UserStats, UsersKPI, VARIANT_ICONS, type Variant, type VideoAuthor, type VideoChapter, VideoPlayer, type VideoPlayerProps, type VideoQuality, type VideoSubtitle, type VideoTrack, VirtualScrollList, type VirtualScrollListProps, type VirtualizationConfig, type VirtualizedItem, type VisualizerType, WarningAnimation, type WaveformData, WaveformPlayer, type WaveformPlayerProps, type WebComponentProps, type WebStyle, WelcomeModal, Z_INDEX, accordionVariants, animationPresets, audioAppTabs, audioPlayerVariants, breadcrumbsVariants, cn, commonValidators, containerVariants, contentVariants, createDataStore, createFormStore, createOptimizedStore, cssAnimations, dailyTrendingConfig, detectAuthProvider, detectDelimiter, detectHeader, disableScroll, durations, emptyStateVariants, enableScroll, extractRoster, fadeInOut, formVariants, formatCurrency, formatDate, formatNumber, genreChartsConfigs, getConfig, getEnvInfo, getEnvVar, getScrollbarWidth, gridVariants, hamburgerVariants, headerVariants, heroVariants, inputVariants, isBrowser, isExpo, isNative, isWeb, labelVariants, musicAppTabs, nativeConfig, parseRoster, parseTable, podcastAppTabs, readRosterFile, scaleInOut, slideUp, sliderVariants, stateManager, stickyActionsVariants, switchVariants, textareaVariants, theme, themes, timingFunctions, toast, toastVariants, useAnimationTokens, useCache, useClickOutside, useCustomPerformanceTracking, useDebouncedCallback, useEscapeKey, useGlassmorphism, useInfiniteScroll, useIntersectionObserver, useLazyLoad, useLoadingOverlay, useLoadingOverlayApi, useLoadingOverlayVisible, useLockBody, useMediaQuery, useMobileNavigation, useMounted, useNetworkInfo, useOfflineState, useOptimizedMemo, useOptimizedStoreSelector, usePerformanceObserver, useRenderPerformanceTracking, useTheme, useThrottledCallback, useToast, useVirtualization, useVisibilityTracking, validateEmail, validateEnvConfig, validatePassword, videoPlayerVariants, webAnimations, webConfig, weeklyChartsConfig, withNetworkAware, withPageTransition };
|
|
6889
|
+
export { ANIMATION_DURATION, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type ActivityType, type AdvancedAudioTrack, AdvancedPlayer, type AdvancedPlayerProps, Alert, AlertDescription, AlertTitle, AnalyticsDashboard, AnimatedSectionTitle, type AnimatedSectionTitleProps, type AnimationTokens, Breadcrumbs as AppBreadcrumbs, AppShell, AudioFeed, type AudioFeedProps, AudioPlayer, type AudioPlayerProps, SearchWithFilters as AudioSearch, type AudioTrack, type AudioTrackCardData, AuthLayout, Avatar, AvatarFallback, AvatarImage, Badge, BarChart, type BarChart3IconBand, type BarChartProps, type BaseAccordionItemProps, type BaseAccordionProps, type BaseBreadcrumbsProps, type BaseChartProps, type BaseComponentProps, type BaseEmptyStateProps, type BaseSliderProps, type BaseSwitchProps, type BaseTextareaProps, type BaseTheme, type BorderRadiusScale, BracketGenerator, type BracketGeneratorProps, type BracketMatch, type BracketMatchRenderContext, type BracketParticipant, type BracketResumeMatch, type BracketSeedingStrategy, type BracketSize, type BracketState, type BracketThemeColors, type BracketThemePreset, BrandLoader, type BrandLoaderGradient, type BrandLoaderMode, type BrandLoaderPath, type BrandLoaderProps, type BreadcrumbItem$1 as BreadcrumbItem, Breadcrumbs$1 as Breadcrumbs, type BreadcrumbsProps$1 as BreadcrumbsProps, type BugReportPayload, BugReporter, type BugReporterProps, Button, type ButtonVariants, type CTAAction, CTACluster, type CTAClusterProps, type CacheStrategy, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Chart, type ChartDataPoint$1 as ChartDataPoint, type ChartProps, type ChartSeries, Checkbox, type CoinCustomTheme, CoinFlipper, type CoinFlipperProps, type CoinResult, type CoinTheme, type CoinThemePreset, type CoinTrigger, CollaborativePlaylist, type CollaborativePlaylistData, type CollaborativePlaylistProps, type Collaborator, type CollaboratorRole, type Column$1 as Column, CommandPalette, type Comment, type CommentData, CommentSystem, type CommentSystemProps, type CommentUser, type ComponentProps, type ComponentSize, type ComponentVariant, Container$1 as Container, ConversionKPI, type CrossfadeMode, DashboardGrid, DashboardLayout, DashboardWidget, type DashboardWidgetProps, DataGrid, type DataGridProps, type DataItem, DataTable, type Column as DataTableColumn, type DataTableProps, type DateFilter, type Delimiter, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, type DiceCount, type DiceCustomTheme, DiceRoller, type DiceRollerProps, type DiceTheme, type DiceThemePreset, type DiceTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, type DurationFilter, DynamicHeroBanner, EmptyState, type EmptyStateProps, EnhancedScrollToTop, type EnhancedScrollToTopProps, type EnvConfig, ErrorAnimation, ErrorBoundary, type ErrorBoundaryProps, ErrorFallback, type ErrorFallbackProps, type ExportOptions, type ExportService, FLOW_TREE_CSS, FLOW_TREE_ICON_NAMES, FeatureGrid, type FeatureGridProps, FeatureHighlight, type FeatureItem, type FeedFilter, type FeedItem, type FeedSortOrder, type FeedbackCategory, FilterChip, type FilterChipProps, type FilterConfig, FilterableGrid, type FilterableGridApplyMode, type FilterableGridCategory, type FilterableGridCategoryNavProps, type FilterableGridFilter, type FilterableGridFilterOption, type FilterableGridLabels, type FilterableGridLayout, type FilterableGridProps, type FilterableGridQuickTab, type FilterableGridRenderCardContext, type FilterableGridSectionOrder, type FilterableGridSort, type FilterableGridState, FixedAudioBar, type FixedAudioBarProps, FlowTree, type FlowTreeAction, type FlowTreeDetail, FlowTreeIcon, type FlowTreeIconName, type FlowTreeIconProps, type FlowTreeIconValue, type FlowTreeImageIcon, type FlowTreeLayoutOptions, type FlowTreeMetaRow, type FlowTreeNode, type FlowTreeProps, type FlowTreeTier, Form, FormBuilder, type FormBuilderProps, FormDescription, type FormField, FormGroup, FormLabel, FormMessage, FormProgress, type FormProps, type FormSchema, FormSection, GameTimer, type GameTimerCustomTheme, type GameTimerHandle, type GameTimerLap, type GameTimerMode, type GameTimerProps, type GameTimerTheme, type GameTimerThemePreset, type GenreFilter, type GlassmorphismTokens, GradientBorderCard, type GradientBorderCardProps, Grid$1 as Grid, GridItem, HamburgerIcon, type HamburgerIconProps, Header, HeaderActions, HeaderBrand, HeaderContainer, HeaderDesktopNav, HeaderMobileTrigger, HeaderNavLink, Hero, type HeroBannerCta, type HeroBannerCtaVariant, type HeroBannerCustomTheme, type HeroBannerImageFilter, type HeroBannerMouseEffect, type HeroBannerProps, type HeroBannerSlide, type HeroBannerStat, type HeroBannerStatsBackground, type HeroBannerStatsLayout, type HeroBannerStatsPosition, type HeroBannerStatsSize, type HeroBannerTextAlign, type HeroBannerThemePreset, type HeroBannerTransition, HeroCTA, HeroContent, type HeroProps, HeroSubtitle, HeroTitle, ImageCropDropZone, type ImageCropDropZoneProps, type ImageCropFormat, ImageCropModal, type ImageCropModalProps, type ImageCropOutput, ImageCropper, type ImageCropperHandle, type ImageCropperProps, InfoAnimation, Input, type InputVariants, type IntersectionObserverOptions, KPIDashboard, type KPIData, KPIWidget, type KPIWidgetProps, Label, LavaLamp, type LavaLampProps, LazyImage, type LazyImagePlaceholder, type LazyImageProps, LineChart, type LineChartProps, type LoadingOverlayApi, type LoadingOverlayContextValue, LoadingOverlayProvider, type LoadingOverlayProviderProps, LoadingSpinner, LogoCloud, type LogoCloudProps, type LogoItem, MobileContainer, type MobileContainerProps, MobileContent, MobileEmailInput, MobileForm, MobileFormActions, MobileFormField, MobileFormGroup, type MobileFormProps, MobileFormSection, MobileGrid, MobileHero, type MobileHeroProps, MobileNavButton, MobileNavContent, MobileNavDrawer, MobileNavFooter, MobileNavHeader, MobileNavLink, MobileNavOverlay, MobileNavTrigger, MobileNavigation, MobileOTPInput, MobilePage, MobilePhoneInput, MobileSection, MobileSticky, Modal, type NativeComponentProps, Container as NativeContainer, Grid as NativeGrid, Section as NativeSection, type NativeStyle, Pagination as NavigationPagination, Stepper as NavigationStepper, Tabs as NavigationTabs, NetworkAwareContent, type NetworkAwareContentProps, type NetworkInfo, type NetworkSpeed, type NetworkType, NewsTicker, type NewsTickerFilter, type NewsTickerFilterOption, type NewsTickerProps, type NewsTickerSort, NotificationCenter, type NotificationCenterProps, type NotificationItem, type NotificationType, type NotificationUser, TrackCard as NowPlayingCard, OSS_LOGO_GRADIENT, OSS_LOGO_PATHS, OSS_LOGO_TRANSFORM, OSS_LOGO_VIEWBOX, OfflineWrapper, type OfflineWrapperProps, Onboarding, OptimizedStateManager, type OptimizedStoreOptions, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, PageTransition, type PageTransitionDirection, type PageTransitionProps, type PageTransitionType, Pagination$1 as Pagination, type PaginationConfig, PaginationInfo, type PaginationInfoProps, type PaginationProps$1 as PaginationProps, type ParseRosterOptions, type ParsedTable, type PerformanceMetrics, type PieChartProps, PillToggle, type PillToggleMultiProps, type PillToggleOption, type PillToggleProps, type PillToggleSingleProps, Platform, type PlatformConfig, type PlatformSelect, type PlatformSelectMultiple, type PlatformType, type PlaybackQuality, type PlaybackState, type PlaylistActivity, PlaylistBuilder, type PlaylistBuilderProps, PlaylistBuilder as PlaylistCard, type PlaylistData, PlaylistBuilder as PlaylistSidebar, type PlaylistTrack, type PlaylistVisibility, Preloader, type PreloaderProps, PremiumCard, PremiumCardContent, PremiumCardFooter, PremiumCardHeader, type PremiumCardProps, PricingHero, type PricingHeroProps, type PricingPlan, Progress, ProgressiveImage, type ProgressiveImageProps, type ProgressiveImageStrategy, type ProgressiveImageTransition, PullToRefresh, type PullToRefreshProps, PulseIndicator, type PulseIndicatorProps, type PulseStatus, QuickForm, ROSTER_IMPORT_MAX_BYTES, type RandomPlayerIntensity, type RandomPlayerMode, type RandomPlayerParticipant, RandomPlayerPicker, type RandomPlayerPickerProps, type RandomPlayerPlaceholderMode, type RandomPlayerTheme, type RandomPlayerThemeColors, type RandomPlayerThemePreset, type RandomPlayerTrigger, type RefreshState, type RepeatMode, type ResponsiveColumns, ResponsiveFlex, ResponsiveGrid, type ResponsiveGridProps, ResponsiveHeader, type ResponsiveHeaderProps, RevenueKPI, RosterFileTooLargeError, RosterImport, type RosterImportLabels, type RosterImportProps, type RoundRobinCustomTheme, type RoundRobinLabels, type RoundRobinMatchup, type RoundRobinRound, RoundRobinScheduler, type RoundRobinSchedulerProps, type RoundRobinTheme, type RoundRobinThemePreset, SafeAreaWrapper, Scoreboard, type ScoreboardCustomTheme, type ScoreboardLabels, type ScoreboardProps, type ScoreboardRoundSnapshot, type ScoreboardTeam, type ScoreboardTheme, type ScoreboardThemePreset, ScrollProgressBar, type ScrollProgressBarProps, ScrollProgressLine, type ScrollProgressLineProps, ScrollToTop, type ScrollToTopProps, type SearchCategory, type SearchFilters, type SearchResult, type SearchSortBy, type SearchSuggestion, SearchWithFilters, type SearchWithFiltersProps, Section$1 as Section, SectionBlock, type SectionBlockProps, SectionLabel, type SectionLabelProps, SectionTitle, SectionedListEditor, type SectionedListEditorProps, type SectionedListSection, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type SelectionConfig, SettingsLayout, type ShareOption, Sidebar, SimpleHero, SimpleResponsiveHeader, type Size, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonText, Slider, type SliderProps, type SocialAction, SocialActions, type SocialActionsProps, type SocialLinks, type SortConfig, type SpacingScale, Stack, StepProgress, type StepProgressProps, StepWizard, type StepWizardProps, type StepWizardStep, SuccessAnimation, type SuccessAnimationProps, SuccessCheckmark, type SwipeAction, SwipeableCard, type SwipeableCardProps, Switch, type SwitchProps, THEME_COLORS, type TabItem$1 as TabItem, TabNavigation, type TabNavigationProps, Tabs$1 as Tabs, TabsContent, TabsList, TabsTrigger, TagInput, type TagInputProps, type TeamColorSwatch, TeamGenerator, type TeamGeneratorCustomTheme, type TeamGeneratorLabels, type TeamGeneratorProps, type TeamGeneratorTheme, type TeamGeneratorThemePreset, Textarea, type TextareaProps, type Theme, type ThemeColors, ThemeProvider, ThemeToggle, type ThemeToggleProps, TiltCard, type TiltCardAspectRatio, type TiltCardProps, type TiltCardStat, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, ToastIcon, type ToastIconProps, type ToastProps, ToastProvider, ToastTitle, type ToastVariant, ToastViewport, Toaster, Tooltip$1 as Tooltip, TooltipContent, type TooltipProps$1 as TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, TouchInput, type TouchInputProps, Tour, Tooltip as TourTooltip, type Track, TrackCard, type TrackCardProps, AudioFeed as TrackList, type TrendingSection, type TrendingTrack, TrendingTracks, type TrendingTracksProps, type TutorialAction, TutorialEmbed, type TutorialEmbedProps, TutorialGallery, type TutorialGalleryProps, type TutorialMedia, type TutorialMetadata, TutorialSequence, type TutorialSequenceProps, type TutorialStep, type UseIntersectionObserverResult, type UsePerformanceObserverOptions, UserProfile, type UserProfileData, type UserProfileProps, type UserStats, UsersKPI, VARIANT_ICONS, type Variant, type VideoAuthor, type VideoChapter, VideoPlayer, type VideoPlayerProps, type VideoQuality, type VideoSubtitle, type VideoTrack, VirtualScrollList, type VirtualScrollListProps, type VirtualizationConfig, type VirtualizedItem, type VisualizerType, WarningAnimation, type WaveformData, WaveformPlayer, type WaveformPlayerProps, type WebComponentProps, type WebStyle, WelcomeModal, Z_INDEX, accordionVariants, animationPresets, audioAppTabs, audioPlayerVariants, breadcrumbsVariants, cn, commonValidators, containerVariants, contentVariants, createDataStore, createFormStore, createOptimizedStore, cssAnimations, dailyTrendingConfig, detectAuthProvider, detectDelimiter, detectHeader, disableScroll, durations, emptyStateVariants, enableScroll, extractRoster, fadeInOut, formVariants, formatCurrency, formatDate, formatNumber, genreChartsConfigs, getConfig, getEnvInfo, getEnvVar, getScrollbarWidth, gridVariants, hamburgerVariants, headerVariants, heroVariants, inputVariants, isBrowser, isExpo, isNative, isWeb, labelVariants, musicAppTabs, nativeConfig, parseRoster, parseTable, podcastAppTabs, readRosterFile, scaleInOut, slideUp, sliderVariants, stateManager, stickyActionsVariants, switchVariants, textareaVariants, theme, themes, timingFunctions, toast, toastVariants, useAnimationTokens, useCache, useClickOutside, useCustomPerformanceTracking, useDebouncedCallback, useEscapeKey, useGlassmorphism, useInfiniteScroll, useIntersectionObserver, useLazyLoad, useLoadingOverlay, useLoadingOverlayApi, useLoadingOverlayVisible, useLockBody, useMediaQuery, useMobileNavigation, useMounted, useNetworkInfo, useOfflineState, useOptimizedMemo, useOptimizedStoreSelector, usePerformanceObserver, useRenderPerformanceTracking, useTheme, useThrottledCallback, useToast, useVirtualization, useVisibilityTracking, validateEmail, validateEnvConfig, validatePassword, videoPlayerVariants, webAnimations, webConfig, weeklyChartsConfig, withNetworkAware, withPageTransition };
|
package/dist/web/index.js
CHANGED
|
@@ -31126,9 +31126,26 @@ function standardSeeding(participants) {
|
|
|
31126
31126
|
const sorted = [...participants].sort(
|
|
31127
31127
|
(a, b) => (a.seed ?? 999) - (b.seed ?? 999)
|
|
31128
31128
|
);
|
|
31129
|
+
const n = sorted.length;
|
|
31129
31130
|
const pairs = [];
|
|
31130
|
-
|
|
31131
|
-
|
|
31131
|
+
if (n < 2 || (n & n - 1) !== 0) {
|
|
31132
|
+
for (let i = 0; i + 1 < n; i += 2) {
|
|
31133
|
+
pairs.push([sorted[i], sorted[i + 1]]);
|
|
31134
|
+
}
|
|
31135
|
+
return pairs;
|
|
31136
|
+
}
|
|
31137
|
+
let order = [1, 2];
|
|
31138
|
+
while (order.length < n) {
|
|
31139
|
+
const total = order.length * 2 + 1;
|
|
31140
|
+
const next = [];
|
|
31141
|
+
for (const r of order) {
|
|
31142
|
+
next.push(r);
|
|
31143
|
+
next.push(total - r);
|
|
31144
|
+
}
|
|
31145
|
+
order = next;
|
|
31146
|
+
}
|
|
31147
|
+
for (let i = 0; i < order.length; i += 2) {
|
|
31148
|
+
pairs.push([sorted[order[i] - 1], sorted[order[i + 1] - 1]]);
|
|
31132
31149
|
}
|
|
31133
31150
|
return pairs;
|
|
31134
31151
|
}
|
|
@@ -31482,6 +31499,7 @@ function BracketGenerator({
|
|
|
31482
31499
|
theme: theme5 = "blue",
|
|
31483
31500
|
darkMode,
|
|
31484
31501
|
seedingStrategy = "standard",
|
|
31502
|
+
resumeMatches,
|
|
31485
31503
|
onMatchComplete,
|
|
31486
31504
|
onChampion,
|
|
31487
31505
|
onStateChange,
|
|
@@ -31560,6 +31578,47 @@ function BracketGenerator({
|
|
|
31560
31578
|
);
|
|
31561
31579
|
const [miniMapHidden, setMiniMapHidden] = (0, import_react71.useState)(false);
|
|
31562
31580
|
const miniMapDragRef = (0, import_react71.useRef)(false);
|
|
31581
|
+
const resumeRef = (0, import_react71.useRef)(resumeMatches);
|
|
31582
|
+
const hydrateFromResume = (0, import_react71.useCallback)(() => {
|
|
31583
|
+
const resume = resumeRef.current;
|
|
31584
|
+
if (!resume?.length) return null;
|
|
31585
|
+
const n = effectiveParticipants.length;
|
|
31586
|
+
if (n < 2 || (n & n - 1) !== 0) return null;
|
|
31587
|
+
const rounds = Math.log2(n);
|
|
31588
|
+
if (resume.length !== n - 1) return null;
|
|
31589
|
+
const byId = new Map(effectiveParticipants.map((p) => [p.id, p]));
|
|
31590
|
+
const resolve = (id) => {
|
|
31591
|
+
if (!id) return null;
|
|
31592
|
+
const found = byId.get(id);
|
|
31593
|
+
if (found) return found;
|
|
31594
|
+
if (id.startsWith("__bye_")) {
|
|
31595
|
+
return { id, name: "BYE", seed: 999, isBye: true };
|
|
31596
|
+
}
|
|
31597
|
+
return void 0;
|
|
31598
|
+
};
|
|
31599
|
+
const matches = [];
|
|
31600
|
+
for (const rm of resume) {
|
|
31601
|
+
if (rm.round < 0 || rm.round >= rounds) return null;
|
|
31602
|
+
const a = resolve(rm.aId);
|
|
31603
|
+
const b = resolve(rm.bId);
|
|
31604
|
+
const winner = resolve(rm.winnerId);
|
|
31605
|
+
if (a === void 0 || b === void 0 || winner === void 0)
|
|
31606
|
+
return null;
|
|
31607
|
+
matches.push({
|
|
31608
|
+
id: rm.id,
|
|
31609
|
+
round: rm.round,
|
|
31610
|
+
slot: rm.slot,
|
|
31611
|
+
a,
|
|
31612
|
+
b,
|
|
31613
|
+
scoreA: rm.scoreA,
|
|
31614
|
+
scoreB: rm.scoreB,
|
|
31615
|
+
winner
|
|
31616
|
+
});
|
|
31617
|
+
}
|
|
31618
|
+
matches.sort((x, y) => x.round - y.round || x.slot - y.slot);
|
|
31619
|
+
const finalMatch = matches.find((m) => m.round === rounds - 1);
|
|
31620
|
+
return { matches, rounds, champion: finalMatch?.winner ?? null };
|
|
31621
|
+
}, [effectiveParticipants]);
|
|
31563
31622
|
const seedBracket = (0, import_react71.useCallback)(() => {
|
|
31564
31623
|
const { matches, rounds } = buildBracket(
|
|
31565
31624
|
effectiveParticipants,
|
|
@@ -31670,12 +31729,47 @@ function BracketGenerator({
|
|
|
31670
31729
|
onStateChange?.(next);
|
|
31671
31730
|
prevBracketStateRef.current = next;
|
|
31672
31731
|
}, [bracketState, onMatchComplete, onChampion, onStateChange]);
|
|
31732
|
+
const structuralKey = (0, import_react71.useMemo)(
|
|
31733
|
+
() => `${seedingStrategy}|${effectiveParticipants.map((p) => `${p.id}:${p.seed ?? ""}`).join(",")}`,
|
|
31734
|
+
[effectiveParticipants, seedingStrategy]
|
|
31735
|
+
);
|
|
31736
|
+
const seededKeyRef = (0, import_react71.useRef)(null);
|
|
31737
|
+
(0, import_react71.useEffect)(() => {
|
|
31738
|
+
if (seededKeyRef.current === structuralKey) {
|
|
31739
|
+
setBracketState((prev) => {
|
|
31740
|
+
if (!prev.matches.length) return prev;
|
|
31741
|
+
const byId = new Map(effectiveParticipants.map((p) => [p.id, p]));
|
|
31742
|
+
const swap = (p) => p && !p.isBye ? byId.get(p.id) ?? p : p;
|
|
31743
|
+
let changed = false;
|
|
31744
|
+
const matches = prev.matches.map((m) => {
|
|
31745
|
+
const a = swap(m.a);
|
|
31746
|
+
const b = swap(m.b);
|
|
31747
|
+
const winner = swap(m.winner);
|
|
31748
|
+
if (a === m.a && b === m.b && winner === m.winner) return m;
|
|
31749
|
+
changed = true;
|
|
31750
|
+
return { ...m, a, b, winner };
|
|
31751
|
+
});
|
|
31752
|
+
if (!changed) return prev;
|
|
31753
|
+
return { ...prev, matches, champion: swap(prev.champion) };
|
|
31754
|
+
});
|
|
31755
|
+
return;
|
|
31756
|
+
}
|
|
31757
|
+
seededKeyRef.current = structuralKey;
|
|
31758
|
+
if (autoRef.current) clearTimeout(autoRef.current);
|
|
31759
|
+
setSimulating(false);
|
|
31760
|
+
const resumed = hydrateFromResume();
|
|
31761
|
+
resumeRef.current = void 0;
|
|
31762
|
+
if (resumed) {
|
|
31763
|
+
setBracketState(resumed);
|
|
31764
|
+
} else {
|
|
31765
|
+
seedBracket();
|
|
31766
|
+
}
|
|
31767
|
+
}, [structuralKey, effectiveParticipants, hydrateFromResume, seedBracket]);
|
|
31673
31768
|
(0, import_react71.useEffect)(() => {
|
|
31674
|
-
seedBracket();
|
|
31675
31769
|
return () => {
|
|
31676
31770
|
if (autoRef.current) clearTimeout(autoRef.current);
|
|
31677
31771
|
};
|
|
31678
|
-
}, [
|
|
31772
|
+
}, []);
|
|
31679
31773
|
(0, import_react71.useLayoutEffect)(() => {
|
|
31680
31774
|
if (contentSize.w > 0) {
|
|
31681
31775
|
const timer = setTimeout(fit, 50);
|