@tastic/hud 0.8.5 → 0.13.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 CHANGED
@@ -1,12 +1,22 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, RefObject } from 'react';
3
+ import { AchievementCatalogRow, AchievementTier } from '@tastic/achievements';
4
+ import { Profile } from '@tastic/profile';
5
+ import { ViewStyle, StyleProp, View, TextStyle, LayoutChangeEvent } from 'react-native';
3
6
  import { ViewRotation } from '@tastic/core';
4
- import { StyleProp, ViewStyle, View } from 'react-native';
5
7
  import { SeedColor } from '@rific/auto-paper';
6
8
  export { SkiaGate, SkiaGateProps } from './SkiaGate.mjs';
7
9
 
10
+ interface Props$f {
11
+ rows: AchievementCatalogRow[];
12
+ label?: string;
13
+ fg?: string;
14
+ fgMuted?: string;
15
+ }
16
+ declare function AchievementCatalogSection({ rows, label, fg, fgMuted: fgMutedOverride }: Props$f): react.JSX.Element;
17
+
8
18
  declare const LOCKED_BADGE_COLOR = "rgba(128,128,128,0.3)";
9
- interface Props$c {
19
+ interface Props$e {
10
20
  icon: string;
11
21
  title: string;
12
22
  description: string;
@@ -19,7 +29,37 @@ interface Props$c {
19
29
  fgMuted?: string;
20
30
  sectionBg?: string;
21
31
  }
22
- declare function AchievementRow({ icon, title, description, badgeColor, unlockedLabel, checkColor, progress, deviceMarker, fg: fgOverride, fgMuted: fgMutedOverride, sectionBg: sectionBgOverride }: Props$c): react.JSX.Element;
32
+ declare function AchievementRow({ icon, title, description, badgeColor, unlockedLabel, checkColor, progress, deviceMarker, fg: fgOverride, fgMuted: fgMutedOverride, sectionBg: sectionBgOverride }: Props$e): react.JSX.Element;
33
+
34
+ interface UnlockedAchievement {
35
+ id: string;
36
+ icon: string;
37
+ title: string;
38
+ tier: AchievementTier;
39
+ }
40
+ interface AchievementUnlockOwner {
41
+ profile?: Profile | null;
42
+ color: string;
43
+ }
44
+ interface Props$d<Seat extends number> {
45
+ unlocks: Partial<Record<Seat, UnlockedAchievement[]>>;
46
+ seats: readonly Seat[];
47
+ owners: Record<Seat, AchievementUnlockOwner>;
48
+ tierColors: Record<AchievementTier, string>;
49
+ fg?: string;
50
+ style?: ViewStyle;
51
+ }
52
+ declare function AchievementUnlockList<Seat extends number>({ unlocks, seats, owners, tierColors, fg: fgOverride, style }: Props$d<Seat>): react.JSX.Element | null;
53
+
54
+ interface ActivityStats {
55
+ distinctDaysPlayed: number;
56
+ currentDayStreak: number;
57
+ bestDayStreak: number;
58
+ }
59
+ interface Props$c {
60
+ stats: ActivityStats;
61
+ }
62
+ declare function ActivityStatSection({ stats }: Props$c): react.JSX.Element;
23
63
 
24
64
  interface BaseSettingsDialogProps {
25
65
  visible: boolean;
@@ -35,9 +75,10 @@ interface BaseSettingsDialogProps {
35
75
  hideAppearance?: boolean;
36
76
  hideUpdateCheck?: boolean;
37
77
  onUpdateError?: (message: string) => void;
78
+ onShowHowToPlay?: () => void;
38
79
  children?: ReactNode;
39
80
  }
40
- declare function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, version, lockOrientation, onLockOrientationChange, deferBottomEdgeGestures, onDeferBottomEdgeGestures, hideSound, hideHaptics, hideAppearance, hideUpdateCheck, onUpdateError, children }: BaseSettingsDialogProps): react.JSX.Element;
81
+ declare function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, version, lockOrientation, onLockOrientationChange, deferBottomEdgeGestures, onDeferBottomEdgeGestures, hideSound, hideHaptics, hideAppearance, hideUpdateCheck, onUpdateError, onShowHowToPlay, children }: BaseSettingsDialogProps): react.JSX.Element;
41
82
 
42
83
  type MD3TextVariant = 'displayLarge' | 'displayMedium' | 'displaySmall' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'titleLarge' | 'titleMedium' | 'titleSmall' | 'labelLarge' | 'labelMedium' | 'labelSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall';
43
84
  interface Props$b {
@@ -87,11 +128,18 @@ declare function ContentGutter({ maxContentWidth, leftGutter, rightGutter, style
87
128
  type PopoverAlign = 'left' | 'right' | 'center';
88
129
  type PopoverVerticalAlign = 'below' | 'above';
89
130
  type PopoverRotation = ViewRotation;
131
+ interface AlignResult {
132
+ align: PopoverAlign;
133
+ verticalAlign: PopoverVerticalAlign;
134
+ maxHeight: number;
135
+ measured: boolean;
136
+ triggerRef: RefObject<View | null>;
137
+ }
90
138
  declare function useAutoAlign(open: boolean, contentWidth: number, contentHeight: number, rotation?: PopoverRotation): {
91
139
  align: PopoverAlign;
92
140
  maxHeight: number;
93
141
  measured: boolean;
94
- triggerRef: react.RefObject<View | null>;
142
+ triggerRef: RefObject<View | null>;
95
143
  verticalAlign: PopoverVerticalAlign;
96
144
  };
97
145
 
@@ -137,6 +185,7 @@ interface Props$9 {
137
185
  onAccentColor?: string;
138
186
  dark: boolean;
139
187
  align?: 'left' | 'right' | 'center';
188
+ alignOverride?: AlignResult;
140
189
  rotation?: PopoverRotation;
141
190
  autoDismiss?: boolean;
142
191
  labelFontFamily?: string;
@@ -145,7 +194,7 @@ interface Props$9 {
145
194
  clear: string;
146
195
  };
147
196
  }
148
- declare function SectionedDropdown({ id, host, icon, accessibilityLabel, sections, accentColor, mutedColor, onAccentColor, dark, align: alignOverride, rotation: rotationOverride, autoDismiss, labelFontFamily, allClearLabels }: Props$9): react.JSX.Element;
197
+ declare function SectionedDropdown({ id, host, icon, accessibilityLabel, sections, accentColor, mutedColor, onAccentColor, dark, align: forcedAlign, alignOverride, rotation: rotationOverride, autoDismiss, labelFontFamily, allClearLabels }: Props$9): react.JSX.Element;
149
198
 
150
199
  interface ControlSchemePickerProps<T extends string | number> {
151
200
  id: string;
@@ -159,9 +208,11 @@ interface ControlSchemePickerProps<T extends string | number> {
159
208
  onAccentColor?: string;
160
209
  dark: boolean;
161
210
  align?: 'left' | 'right' | 'center';
211
+ alignOverride?: AlignResult;
212
+ rotation?: PopoverRotation;
162
213
  labelFontFamily?: string;
163
214
  }
164
- declare function ControlSchemePicker<T extends string | number>({ id, host, value, onChange, options, takenValue, accentColor, mutedColor, onAccentColor, dark, align, labelFontFamily }: ControlSchemePickerProps<T>): react.JSX.Element | null;
215
+ declare function ControlSchemePicker<T extends string | number>({ id, host, value, onChange, options, takenValue, accentColor, mutedColor, onAccentColor, dark, align, alignOverride, rotation, labelFontFamily }: ControlSchemePickerProps<T>): react.JSX.Element | null;
165
216
 
166
217
  interface Props$8 {
167
218
  onBack: () => void;
@@ -191,6 +242,10 @@ declare function CornerStatusBadges({ orientationMode, p1OnRight, p1, p2 }: Corn
191
242
 
192
243
  declare const MONO_FONT: string;
193
244
 
245
+ declare function getInlineColorPickerContentSize(swatchCount: number, windowWidth: number, columns?: number): {
246
+ width: number;
247
+ height: number;
248
+ };
194
249
  interface Props$7 {
195
250
  id: string;
196
251
  host: PopoverHost;
@@ -202,6 +257,7 @@ interface Props$7 {
202
257
  allowSwapTaken?: boolean;
203
258
  dark: boolean;
204
259
  align?: 'left' | 'right' | 'center';
260
+ alignOverride?: AlignResult;
205
261
  rotation?: PopoverRotation;
206
262
  icon?: string;
207
263
  tag?: string;
@@ -210,7 +266,7 @@ interface Props$7 {
210
266
  columns?: number;
211
267
  size?: number;
212
268
  }
213
- declare function InlineColorPicker({ id, host, value, onChange, previewValue, swatches, takenValue, allowSwapTaken, dark, align: alignOverride, rotation: rotationOverride, icon, tag, labelFontFamily, autoDismiss, columns, size }: Props$7): react.JSX.Element;
269
+ declare function InlineColorPicker({ id, host, value, onChange, previewValue, swatches, takenValue, allowSwapTaken, dark, align: forcedAlign, alignOverride, rotation: rotationOverride, icon, tag, labelFontFamily, autoDismiss, columns, size }: Props$7): react.JSX.Element;
214
270
 
215
271
  declare const LABELED_DROPDOWN_POPOVER_WIDTH = 180;
216
272
  declare function getLabeledDropdownContentHeight(optionCount: number): number;
@@ -219,13 +275,6 @@ interface LabeledDropdownOption<T extends string> {
219
275
  label: string;
220
276
  icon?: string;
221
277
  }
222
- interface AlignResult {
223
- align: PopoverAlign;
224
- verticalAlign: PopoverVerticalAlign;
225
- maxHeight: number;
226
- measured: boolean;
227
- triggerRef: RefObject<View | null>;
228
- }
229
278
  interface Props$6<T extends string> {
230
279
  id: string;
231
280
  host: PopoverHost;
@@ -268,6 +317,58 @@ declare const overlayStyles: {
268
317
  top: number;
269
318
  };
270
319
  };
320
+ declare const overlayActionStyles: {
321
+ actionButton: {
322
+ flexGrow: number;
323
+ minWidth: number;
324
+ };
325
+ actionButtonSingle: {
326
+ minWidth: number;
327
+ };
328
+ actions: {
329
+ flexDirection: "row";
330
+ flexWrap: "wrap";
331
+ gap: number;
332
+ justifyContent: "center";
333
+ width: "100%";
334
+ };
335
+ };
336
+
337
+ declare function getColorPopoverId(idPrefix: string): string;
338
+ declare function getCpuDifficultyPopoverId(idPrefix: string): string;
339
+ interface PlayerSetupPanelProps<C extends string = string> {
340
+ idPrefix: string;
341
+ host?: PopoverHost;
342
+ label?: string;
343
+ labelFontFamily?: string;
344
+ color: string;
345
+ onColorChange: (hex: string) => void;
346
+ swatches: SeedColor[];
347
+ takenColor?: string;
348
+ allowSwapTaken?: boolean;
349
+ colorAlignOverride?: AlignResult;
350
+ colorRotation?: PopoverRotation;
351
+ isHuman: boolean;
352
+ secondPicker?: ReactNode;
353
+ secondPickerId?: string;
354
+ ready?: boolean;
355
+ onToggleReady?: () => void;
356
+ dark: boolean;
357
+ showReadyButton?: boolean;
358
+ profiles?: Profile[];
359
+ selectedProfileId?: string | null;
360
+ takenProfileId?: string | null;
361
+ guestLabel?: string;
362
+ onProfileSelect?: (profile: Profile | null) => void;
363
+ onManageProfiles?: () => void;
364
+ cpuDifficulty?: C;
365
+ cpuDifficultyOptions?: LabeledDropdownOption<C>[];
366
+ onCpuDifficultyChange?: (value: C) => void;
367
+ cpuDifficultyAlignOverride?: AlignResult;
368
+ humanIcon?: string;
369
+ cpuIcon?: string;
370
+ }
371
+ declare function PlayerSetupPanel<C extends string = string>({ idPrefix, host, label, labelFontFamily, color, onColorChange, swatches, takenColor, allowSwapTaken, colorAlignOverride, colorRotation, isHuman, secondPicker, secondPickerId, ready, onToggleReady, dark, showReadyButton, profiles, selectedProfileId, takenProfileId, guestLabel, onProfileSelect, onManageProfiles, cpuDifficulty, cpuDifficultyOptions, onCpuDifficultyChange, cpuDifficultyAlignOverride, humanIcon, cpuIcon }: PlayerSetupPanelProps<C>): react.JSX.Element;
271
372
 
272
373
  interface Props$5 {
273
374
  visible: boolean;
@@ -308,6 +409,22 @@ interface Props$2 {
308
409
  }
309
410
  declare function SharedActionBand({ onBack, onSettings, onRandomize, onReset, fg, popoverOpen, children }: Props$2): react.JSX.Element;
310
411
 
412
+ declare function getStaggeredWordDuration(letterCount: number): number;
413
+ interface StaggeredWordProps {
414
+ word: string;
415
+ color: string;
416
+ fontFamily: string;
417
+ fontSize: number;
418
+ lineHeight: number;
419
+ reducedMotion: boolean;
420
+ startIndex?: number;
421
+ fontWeight?: TextStyle['fontWeight'];
422
+ letterSpacing?: number;
423
+ style?: StyleProp<ViewStyle>;
424
+ onLayout?: (e: LayoutChangeEvent) => void;
425
+ }
426
+ declare function StaggeredWord({ word, color, fontFamily, fontSize, lineHeight, reducedMotion, startIndex, fontWeight, letterSpacing, style, onLayout }: StaggeredWordProps): react.JSX.Element;
427
+
311
428
  interface Props$1 {
312
429
  label: string;
313
430
  value: string;
@@ -345,4 +462,16 @@ interface UpdateDialogProps {
345
462
  }
346
463
  declare function UpdateDialog({ rotation, autoCheck, autoPrompt, onError }: UpdateDialogProps): react.JSX.Element;
347
464
 
348
- export { AchievementRow, BaseSettingsDialog, type BaseSettingsDialogProps, BaseStatsScreen, ConfirmDialog, type ConfirmDialogProps, ContentGutter, ControlSchemePicker, type ControlSchemePickerProps, CornerActionButtons, type CornerStatusBadgeSeat, CornerStatusBadges, type CornerStatusBadgesProps, InlineColorPicker, LABELED_DROPDOWN_POPOVER_WIDTH, LOCKED_BADGE_COLOR, LabeledDropdown, type LabeledDropdownOption, MONO_FONT, type MenuOption, type MenuSection, type MultiSelectSection, type OrientationMode, type OverlayCardColors, type PopoverAlign, PopoverBody, type PopoverHost, type PopoverRotation, type PopoverVerticalAlign, PressAwayOverlay, ReadyButton, SectionedDropdown, SharedActionBand, type SingleSelectSection, StatRow, StatSection, TriggerGaugeHost, type TriggerGaugeProps, UpdateDialog, type UpdateDialogProps, getLabeledDropdownContentHeight, getOverlayCardColors, loadSkiaWeb, overlayStyles, useAutoAlign, usePopoverHost };
465
+ interface QuitConfirmation {
466
+ /** Wire directly to <ConfirmDialog visible={...}>. */
467
+ confirmVisible: boolean;
468
+ /** Wire directly to the back button's onPress (GameActionChips/IconButton onBack/onPress). */
469
+ requestBack: () => void;
470
+ /** Wire directly to <ConfirmDialog onCancel={...}>. */
471
+ cancelBack: () => void;
472
+ }
473
+ declare function useQuitConfirmation(hasProgress: () => boolean, onConfirmedBack: () => void): QuitConfirmation;
474
+
475
+ declare function useZoneClampedAlign(open: boolean, contentWidth: number, contentHeight: number, rotation?: PopoverRotation): ReturnType<typeof useAutoAlign>;
476
+
477
+ export { AchievementCatalogSection, AchievementRow, AchievementUnlockList, type AchievementUnlockOwner, ActivityStatSection, type AlignResult, BaseSettingsDialog, type BaseSettingsDialogProps, BaseStatsScreen, ConfirmDialog, type ConfirmDialogProps, ContentGutter, ControlSchemePicker, type ControlSchemePickerProps, CornerActionButtons, type CornerStatusBadgeSeat, CornerStatusBadges, type CornerStatusBadgesProps, InlineColorPicker, LABELED_DROPDOWN_POPOVER_WIDTH, LOCKED_BADGE_COLOR, LabeledDropdown, type LabeledDropdownOption, MONO_FONT, type MenuOption, type MenuSection, type MultiSelectSection, type OrientationMode, type OverlayCardColors, PlayerSetupPanel, type PlayerSetupPanelProps, type PopoverAlign, PopoverBody, type PopoverHost, type PopoverRotation, type PopoverVerticalAlign, PressAwayOverlay, type QuitConfirmation, ReadyButton, SectionedDropdown, SharedActionBand, type SingleSelectSection, StaggeredWord, type StaggeredWordProps, StatRow, StatSection, TriggerGaugeHost, type TriggerGaugeProps, type UnlockedAchievement, UpdateDialog, type UpdateDialogProps, getColorPopoverId, getCpuDifficultyPopoverId, getInlineColorPickerContentSize, getLabeledDropdownContentHeight, getOverlayCardColors, getStaggeredWordDuration, loadSkiaWeb, overlayActionStyles, overlayStyles, useAutoAlign, usePopoverHost, useQuitConfirmation, useZoneClampedAlign };
package/dist/index.d.ts CHANGED
@@ -1,12 +1,22 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, RefObject } from 'react';
3
+ import { AchievementCatalogRow, AchievementTier } from '@tastic/achievements';
4
+ import { Profile } from '@tastic/profile';
5
+ import { ViewStyle, StyleProp, View, TextStyle, LayoutChangeEvent } from 'react-native';
3
6
  import { ViewRotation } from '@tastic/core';
4
- import { StyleProp, ViewStyle, View } from 'react-native';
5
7
  import { SeedColor } from '@rific/auto-paper';
6
8
  export { SkiaGate, SkiaGateProps } from './SkiaGate.js';
7
9
 
10
+ interface Props$f {
11
+ rows: AchievementCatalogRow[];
12
+ label?: string;
13
+ fg?: string;
14
+ fgMuted?: string;
15
+ }
16
+ declare function AchievementCatalogSection({ rows, label, fg, fgMuted: fgMutedOverride }: Props$f): react.JSX.Element;
17
+
8
18
  declare const LOCKED_BADGE_COLOR = "rgba(128,128,128,0.3)";
9
- interface Props$c {
19
+ interface Props$e {
10
20
  icon: string;
11
21
  title: string;
12
22
  description: string;
@@ -19,7 +29,37 @@ interface Props$c {
19
29
  fgMuted?: string;
20
30
  sectionBg?: string;
21
31
  }
22
- declare function AchievementRow({ icon, title, description, badgeColor, unlockedLabel, checkColor, progress, deviceMarker, fg: fgOverride, fgMuted: fgMutedOverride, sectionBg: sectionBgOverride }: Props$c): react.JSX.Element;
32
+ declare function AchievementRow({ icon, title, description, badgeColor, unlockedLabel, checkColor, progress, deviceMarker, fg: fgOverride, fgMuted: fgMutedOverride, sectionBg: sectionBgOverride }: Props$e): react.JSX.Element;
33
+
34
+ interface UnlockedAchievement {
35
+ id: string;
36
+ icon: string;
37
+ title: string;
38
+ tier: AchievementTier;
39
+ }
40
+ interface AchievementUnlockOwner {
41
+ profile?: Profile | null;
42
+ color: string;
43
+ }
44
+ interface Props$d<Seat extends number> {
45
+ unlocks: Partial<Record<Seat, UnlockedAchievement[]>>;
46
+ seats: readonly Seat[];
47
+ owners: Record<Seat, AchievementUnlockOwner>;
48
+ tierColors: Record<AchievementTier, string>;
49
+ fg?: string;
50
+ style?: ViewStyle;
51
+ }
52
+ declare function AchievementUnlockList<Seat extends number>({ unlocks, seats, owners, tierColors, fg: fgOverride, style }: Props$d<Seat>): react.JSX.Element | null;
53
+
54
+ interface ActivityStats {
55
+ distinctDaysPlayed: number;
56
+ currentDayStreak: number;
57
+ bestDayStreak: number;
58
+ }
59
+ interface Props$c {
60
+ stats: ActivityStats;
61
+ }
62
+ declare function ActivityStatSection({ stats }: Props$c): react.JSX.Element;
23
63
 
24
64
  interface BaseSettingsDialogProps {
25
65
  visible: boolean;
@@ -35,9 +75,10 @@ interface BaseSettingsDialogProps {
35
75
  hideAppearance?: boolean;
36
76
  hideUpdateCheck?: boolean;
37
77
  onUpdateError?: (message: string) => void;
78
+ onShowHowToPlay?: () => void;
38
79
  children?: ReactNode;
39
80
  }
40
- declare function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, version, lockOrientation, onLockOrientationChange, deferBottomEdgeGestures, onDeferBottomEdgeGestures, hideSound, hideHaptics, hideAppearance, hideUpdateCheck, onUpdateError, children }: BaseSettingsDialogProps): react.JSX.Element;
81
+ declare function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, version, lockOrientation, onLockOrientationChange, deferBottomEdgeGestures, onDeferBottomEdgeGestures, hideSound, hideHaptics, hideAppearance, hideUpdateCheck, onUpdateError, onShowHowToPlay, children }: BaseSettingsDialogProps): react.JSX.Element;
41
82
 
42
83
  type MD3TextVariant = 'displayLarge' | 'displayMedium' | 'displaySmall' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'titleLarge' | 'titleMedium' | 'titleSmall' | 'labelLarge' | 'labelMedium' | 'labelSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall';
43
84
  interface Props$b {
@@ -87,11 +128,18 @@ declare function ContentGutter({ maxContentWidth, leftGutter, rightGutter, style
87
128
  type PopoverAlign = 'left' | 'right' | 'center';
88
129
  type PopoverVerticalAlign = 'below' | 'above';
89
130
  type PopoverRotation = ViewRotation;
131
+ interface AlignResult {
132
+ align: PopoverAlign;
133
+ verticalAlign: PopoverVerticalAlign;
134
+ maxHeight: number;
135
+ measured: boolean;
136
+ triggerRef: RefObject<View | null>;
137
+ }
90
138
  declare function useAutoAlign(open: boolean, contentWidth: number, contentHeight: number, rotation?: PopoverRotation): {
91
139
  align: PopoverAlign;
92
140
  maxHeight: number;
93
141
  measured: boolean;
94
- triggerRef: react.RefObject<View | null>;
142
+ triggerRef: RefObject<View | null>;
95
143
  verticalAlign: PopoverVerticalAlign;
96
144
  };
97
145
 
@@ -137,6 +185,7 @@ interface Props$9 {
137
185
  onAccentColor?: string;
138
186
  dark: boolean;
139
187
  align?: 'left' | 'right' | 'center';
188
+ alignOverride?: AlignResult;
140
189
  rotation?: PopoverRotation;
141
190
  autoDismiss?: boolean;
142
191
  labelFontFamily?: string;
@@ -145,7 +194,7 @@ interface Props$9 {
145
194
  clear: string;
146
195
  };
147
196
  }
148
- declare function SectionedDropdown({ id, host, icon, accessibilityLabel, sections, accentColor, mutedColor, onAccentColor, dark, align: alignOverride, rotation: rotationOverride, autoDismiss, labelFontFamily, allClearLabels }: Props$9): react.JSX.Element;
197
+ declare function SectionedDropdown({ id, host, icon, accessibilityLabel, sections, accentColor, mutedColor, onAccentColor, dark, align: forcedAlign, alignOverride, rotation: rotationOverride, autoDismiss, labelFontFamily, allClearLabels }: Props$9): react.JSX.Element;
149
198
 
150
199
  interface ControlSchemePickerProps<T extends string | number> {
151
200
  id: string;
@@ -159,9 +208,11 @@ interface ControlSchemePickerProps<T extends string | number> {
159
208
  onAccentColor?: string;
160
209
  dark: boolean;
161
210
  align?: 'left' | 'right' | 'center';
211
+ alignOverride?: AlignResult;
212
+ rotation?: PopoverRotation;
162
213
  labelFontFamily?: string;
163
214
  }
164
- declare function ControlSchemePicker<T extends string | number>({ id, host, value, onChange, options, takenValue, accentColor, mutedColor, onAccentColor, dark, align, labelFontFamily }: ControlSchemePickerProps<T>): react.JSX.Element | null;
215
+ declare function ControlSchemePicker<T extends string | number>({ id, host, value, onChange, options, takenValue, accentColor, mutedColor, onAccentColor, dark, align, alignOverride, rotation, labelFontFamily }: ControlSchemePickerProps<T>): react.JSX.Element | null;
165
216
 
166
217
  interface Props$8 {
167
218
  onBack: () => void;
@@ -191,6 +242,10 @@ declare function CornerStatusBadges({ orientationMode, p1OnRight, p1, p2 }: Corn
191
242
 
192
243
  declare const MONO_FONT: string;
193
244
 
245
+ declare function getInlineColorPickerContentSize(swatchCount: number, windowWidth: number, columns?: number): {
246
+ width: number;
247
+ height: number;
248
+ };
194
249
  interface Props$7 {
195
250
  id: string;
196
251
  host: PopoverHost;
@@ -202,6 +257,7 @@ interface Props$7 {
202
257
  allowSwapTaken?: boolean;
203
258
  dark: boolean;
204
259
  align?: 'left' | 'right' | 'center';
260
+ alignOverride?: AlignResult;
205
261
  rotation?: PopoverRotation;
206
262
  icon?: string;
207
263
  tag?: string;
@@ -210,7 +266,7 @@ interface Props$7 {
210
266
  columns?: number;
211
267
  size?: number;
212
268
  }
213
- declare function InlineColorPicker({ id, host, value, onChange, previewValue, swatches, takenValue, allowSwapTaken, dark, align: alignOverride, rotation: rotationOverride, icon, tag, labelFontFamily, autoDismiss, columns, size }: Props$7): react.JSX.Element;
269
+ declare function InlineColorPicker({ id, host, value, onChange, previewValue, swatches, takenValue, allowSwapTaken, dark, align: forcedAlign, alignOverride, rotation: rotationOverride, icon, tag, labelFontFamily, autoDismiss, columns, size }: Props$7): react.JSX.Element;
214
270
 
215
271
  declare const LABELED_DROPDOWN_POPOVER_WIDTH = 180;
216
272
  declare function getLabeledDropdownContentHeight(optionCount: number): number;
@@ -219,13 +275,6 @@ interface LabeledDropdownOption<T extends string> {
219
275
  label: string;
220
276
  icon?: string;
221
277
  }
222
- interface AlignResult {
223
- align: PopoverAlign;
224
- verticalAlign: PopoverVerticalAlign;
225
- maxHeight: number;
226
- measured: boolean;
227
- triggerRef: RefObject<View | null>;
228
- }
229
278
  interface Props$6<T extends string> {
230
279
  id: string;
231
280
  host: PopoverHost;
@@ -268,6 +317,58 @@ declare const overlayStyles: {
268
317
  top: number;
269
318
  };
270
319
  };
320
+ declare const overlayActionStyles: {
321
+ actionButton: {
322
+ flexGrow: number;
323
+ minWidth: number;
324
+ };
325
+ actionButtonSingle: {
326
+ minWidth: number;
327
+ };
328
+ actions: {
329
+ flexDirection: "row";
330
+ flexWrap: "wrap";
331
+ gap: number;
332
+ justifyContent: "center";
333
+ width: "100%";
334
+ };
335
+ };
336
+
337
+ declare function getColorPopoverId(idPrefix: string): string;
338
+ declare function getCpuDifficultyPopoverId(idPrefix: string): string;
339
+ interface PlayerSetupPanelProps<C extends string = string> {
340
+ idPrefix: string;
341
+ host?: PopoverHost;
342
+ label?: string;
343
+ labelFontFamily?: string;
344
+ color: string;
345
+ onColorChange: (hex: string) => void;
346
+ swatches: SeedColor[];
347
+ takenColor?: string;
348
+ allowSwapTaken?: boolean;
349
+ colorAlignOverride?: AlignResult;
350
+ colorRotation?: PopoverRotation;
351
+ isHuman: boolean;
352
+ secondPicker?: ReactNode;
353
+ secondPickerId?: string;
354
+ ready?: boolean;
355
+ onToggleReady?: () => void;
356
+ dark: boolean;
357
+ showReadyButton?: boolean;
358
+ profiles?: Profile[];
359
+ selectedProfileId?: string | null;
360
+ takenProfileId?: string | null;
361
+ guestLabel?: string;
362
+ onProfileSelect?: (profile: Profile | null) => void;
363
+ onManageProfiles?: () => void;
364
+ cpuDifficulty?: C;
365
+ cpuDifficultyOptions?: LabeledDropdownOption<C>[];
366
+ onCpuDifficultyChange?: (value: C) => void;
367
+ cpuDifficultyAlignOverride?: AlignResult;
368
+ humanIcon?: string;
369
+ cpuIcon?: string;
370
+ }
371
+ declare function PlayerSetupPanel<C extends string = string>({ idPrefix, host, label, labelFontFamily, color, onColorChange, swatches, takenColor, allowSwapTaken, colorAlignOverride, colorRotation, isHuman, secondPicker, secondPickerId, ready, onToggleReady, dark, showReadyButton, profiles, selectedProfileId, takenProfileId, guestLabel, onProfileSelect, onManageProfiles, cpuDifficulty, cpuDifficultyOptions, onCpuDifficultyChange, cpuDifficultyAlignOverride, humanIcon, cpuIcon }: PlayerSetupPanelProps<C>): react.JSX.Element;
271
372
 
272
373
  interface Props$5 {
273
374
  visible: boolean;
@@ -308,6 +409,22 @@ interface Props$2 {
308
409
  }
309
410
  declare function SharedActionBand({ onBack, onSettings, onRandomize, onReset, fg, popoverOpen, children }: Props$2): react.JSX.Element;
310
411
 
412
+ declare function getStaggeredWordDuration(letterCount: number): number;
413
+ interface StaggeredWordProps {
414
+ word: string;
415
+ color: string;
416
+ fontFamily: string;
417
+ fontSize: number;
418
+ lineHeight: number;
419
+ reducedMotion: boolean;
420
+ startIndex?: number;
421
+ fontWeight?: TextStyle['fontWeight'];
422
+ letterSpacing?: number;
423
+ style?: StyleProp<ViewStyle>;
424
+ onLayout?: (e: LayoutChangeEvent) => void;
425
+ }
426
+ declare function StaggeredWord({ word, color, fontFamily, fontSize, lineHeight, reducedMotion, startIndex, fontWeight, letterSpacing, style, onLayout }: StaggeredWordProps): react.JSX.Element;
427
+
311
428
  interface Props$1 {
312
429
  label: string;
313
430
  value: string;
@@ -345,4 +462,16 @@ interface UpdateDialogProps {
345
462
  }
346
463
  declare function UpdateDialog({ rotation, autoCheck, autoPrompt, onError }: UpdateDialogProps): react.JSX.Element;
347
464
 
348
- export { AchievementRow, BaseSettingsDialog, type BaseSettingsDialogProps, BaseStatsScreen, ConfirmDialog, type ConfirmDialogProps, ContentGutter, ControlSchemePicker, type ControlSchemePickerProps, CornerActionButtons, type CornerStatusBadgeSeat, CornerStatusBadges, type CornerStatusBadgesProps, InlineColorPicker, LABELED_DROPDOWN_POPOVER_WIDTH, LOCKED_BADGE_COLOR, LabeledDropdown, type LabeledDropdownOption, MONO_FONT, type MenuOption, type MenuSection, type MultiSelectSection, type OrientationMode, type OverlayCardColors, type PopoverAlign, PopoverBody, type PopoverHost, type PopoverRotation, type PopoverVerticalAlign, PressAwayOverlay, ReadyButton, SectionedDropdown, SharedActionBand, type SingleSelectSection, StatRow, StatSection, TriggerGaugeHost, type TriggerGaugeProps, UpdateDialog, type UpdateDialogProps, getLabeledDropdownContentHeight, getOverlayCardColors, loadSkiaWeb, overlayStyles, useAutoAlign, usePopoverHost };
465
+ interface QuitConfirmation {
466
+ /** Wire directly to <ConfirmDialog visible={...}>. */
467
+ confirmVisible: boolean;
468
+ /** Wire directly to the back button's onPress (GameActionChips/IconButton onBack/onPress). */
469
+ requestBack: () => void;
470
+ /** Wire directly to <ConfirmDialog onCancel={...}>. */
471
+ cancelBack: () => void;
472
+ }
473
+ declare function useQuitConfirmation(hasProgress: () => boolean, onConfirmedBack: () => void): QuitConfirmation;
474
+
475
+ declare function useZoneClampedAlign(open: boolean, contentWidth: number, contentHeight: number, rotation?: PopoverRotation): ReturnType<typeof useAutoAlign>;
476
+
477
+ export { AchievementCatalogSection, AchievementRow, AchievementUnlockList, type AchievementUnlockOwner, ActivityStatSection, type AlignResult, BaseSettingsDialog, type BaseSettingsDialogProps, BaseStatsScreen, ConfirmDialog, type ConfirmDialogProps, ContentGutter, ControlSchemePicker, type ControlSchemePickerProps, CornerActionButtons, type CornerStatusBadgeSeat, CornerStatusBadges, type CornerStatusBadgesProps, InlineColorPicker, LABELED_DROPDOWN_POPOVER_WIDTH, LOCKED_BADGE_COLOR, LabeledDropdown, type LabeledDropdownOption, MONO_FONT, type MenuOption, type MenuSection, type MultiSelectSection, type OrientationMode, type OverlayCardColors, PlayerSetupPanel, type PlayerSetupPanelProps, type PopoverAlign, PopoverBody, type PopoverHost, type PopoverRotation, type PopoverVerticalAlign, PressAwayOverlay, type QuitConfirmation, ReadyButton, SectionedDropdown, SharedActionBand, type SingleSelectSection, StaggeredWord, type StaggeredWordProps, StatRow, StatSection, TriggerGaugeHost, type TriggerGaugeProps, type UnlockedAchievement, UpdateDialog, type UpdateDialogProps, getColorPopoverId, getCpuDifficultyPopoverId, getInlineColorPickerContentSize, getLabeledDropdownContentHeight, getOverlayCardColors, getStaggeredWordDuration, loadSkiaWeb, overlayActionStyles, overlayStyles, useAutoAlign, usePopoverHost, useQuitConfirmation, useZoneClampedAlign };