@tastic/hud 0.14.2 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +110 -79
- package/dist/chrome/index.d.mts +239 -0
- package/dist/chrome/index.d.ts +239 -0
- package/dist/chrome/index.js +772 -0
- package/dist/chrome/index.mjs +44 -0
- package/dist/chunk-OTMMST5M.mjs +645 -0
- package/dist/guide/index.js +3 -3
- package/dist/guide/index.mjs +3 -3
- package/dist/index.d.mts +21 -252
- package/dist/index.d.ts +21 -252
- package/dist/index.js +20 -20
- package/dist/index.mjs +186 -791
- package/package.json +8 -1
- package/src/AchievementCatalogSection.tsx +1 -1
- package/src/AchievementRow.tsx +9 -9
- package/src/BaseSettingsDialog.tsx +31 -31
- package/src/BaseStatsScreen.tsx +13 -13
- package/src/ConfirmDialog.tsx +2 -2
- package/src/ControlSchemePicker.tsx +9 -9
- package/src/CornerActionButtons.tsx +6 -6
- package/src/CornerStatusBadges.tsx +8 -8
- package/src/InlineColorPicker.tsx +30 -30
- package/src/LabeledDropdown.tsx +8 -8
- package/src/PlayerSetupPanel.tsx +25 -25
- package/src/PopoverBody.tsx +16 -16
- package/src/PressAwayOverlay.tsx +2 -2
- package/src/ReadyButton.tsx +3 -3
- package/src/SectionedDropdown.tsx +31 -31
- package/src/SharedActionBand.tsx +6 -6
- package/src/SkiaGate.tsx +5 -5
- package/src/SkiaGate.web.tsx +2 -2
- package/src/StaggeredWord.tsx +9 -9
- package/src/StatRow.tsx +3 -3
- package/src/StatSection.tsx +3 -3
- package/src/TriggerGauge.tsx +54 -54
- package/src/TriggerGaugeHost.tsx +2 -2
- package/src/chrome/index.ts +22 -0
- package/src/fonts.ts +1 -1
- package/src/guide/DirectionKeysHint.tsx +3 -3
- package/src/guide/GuideProvider.tsx +7 -7
- package/src/guide/HowToPlayDialog.tsx +7 -7
- package/src/guide/SeatDiagram.tsx +3 -3
- package/src/guide/SwipeHint.tsx +4 -4
- package/src/guide/guideSlice.ts +7 -7
- package/src/guide/index.ts +4 -3
- package/src/guide/types.ts +1 -1
- package/src/index.ts +1 -1
- package/src/loadSkiaWeb.ts +2 -2
- package/src/loadSkiaWeb.web.ts +2 -2
- package/src/overlayCard.ts +3 -3
- package/src/useAutoAlign.ts +23 -23
- package/src/usePopoverHost.ts +1 -1
- package/src/useZoneClampedAlign.ts +23 -23
package/dist/guide/index.mjs
CHANGED
|
@@ -156,7 +156,7 @@ var styles2 = StyleSheet2.create({
|
|
|
156
156
|
body: {
|
|
157
157
|
textAlign: "center"
|
|
158
158
|
},
|
|
159
|
-
// Additive on top of overlayCard's own shared `card` shape
|
|
159
|
+
// Additive on top of overlayCard's own shared `card` shape - its default 32px padding is tighter
|
|
160
160
|
// here (a paged card wants more width for its art) and the shared 16px gap is right.
|
|
161
161
|
card: {
|
|
162
162
|
padding: CARD_PADDING
|
|
@@ -334,7 +334,7 @@ var styles4 = StyleSheet4.create({
|
|
|
334
334
|
label: {
|
|
335
335
|
fontWeight: "bold"
|
|
336
336
|
},
|
|
337
|
-
// A wash of the seat color behind its own label rather than an rgba() fill
|
|
337
|
+
// A wash of the seat color behind its own label rather than an rgba() fill - the theme's colors
|
|
338
338
|
// aren't guaranteed to be 6-digit hex, so an opacity layer is the only alpha that always works.
|
|
339
339
|
tint: {
|
|
340
340
|
opacity: 0.2
|
|
@@ -394,7 +394,7 @@ var styles5 = StyleSheet5.create({
|
|
|
394
394
|
justifyContent: "space-between"
|
|
395
395
|
},
|
|
396
396
|
// Centered on the whole path (not on the dots row alone) by the container's own alignItems/
|
|
397
|
-
// justifyContent, then pushed along the axis by its own animated translate
|
|
397
|
+
// justifyContent, then pushed along the axis by its own animated translate - absolute so it never
|
|
398
398
|
// takes space from the dots and arrowhead it's drawn over.
|
|
399
399
|
finger: {
|
|
400
400
|
borderRadius: FINGER_SIZE / 2,
|
package/dist/index.d.mts
CHANGED
|
@@ -1,36 +1,13 @@
|
|
|
1
|
+
export { AchievementCatalogSection, AchievementRow, ActivityStatSection, BaseSettingsDialog, BaseSettingsDialogProps, BaseStatsScreen, ConfirmDialog, ConfirmDialogProps, ContentGutter, CornerActionButtons, LOCKED_BADGE_COLOR, MONO_FONT, OverlayCardColors, RotatedFrame, RotatedFrameProps, StaggeredWord, StaggeredWordProps, StatRow, StatSection, UpdateDialog, UpdateDialogProps, getOverlayCardColors, getStaggeredWordDuration, overlayActionStyles, overlayStyles } from './chrome/index.mjs';
|
|
1
2
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
3
|
+
import { RefObject, ReactNode } from 'react';
|
|
4
|
+
import { AchievementTier } from '@tastic/achievements';
|
|
4
5
|
import { Profile } from '@tastic/profile';
|
|
5
|
-
import { ViewStyle,
|
|
6
|
+
import { ViewStyle, View, StyleProp } from 'react-native';
|
|
6
7
|
import { ViewRotation } from '@tastic/core';
|
|
7
8
|
import { SeedColor } from '@rific/auto-paper';
|
|
8
9
|
export { SkiaGate, SkiaGateProps } from './SkiaGate.mjs';
|
|
9
10
|
|
|
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
|
-
|
|
18
|
-
declare const LOCKED_BADGE_COLOR = "rgba(128,128,128,0.3)";
|
|
19
|
-
interface Props$e {
|
|
20
|
-
icon: string;
|
|
21
|
-
title: string;
|
|
22
|
-
description: string;
|
|
23
|
-
badgeColor: string;
|
|
24
|
-
unlockedLabel?: string;
|
|
25
|
-
checkColor?: string;
|
|
26
|
-
progress?: number;
|
|
27
|
-
deviceMarker?: boolean;
|
|
28
|
-
fg?: string;
|
|
29
|
-
fgMuted?: string;
|
|
30
|
-
sectionBg?: string;
|
|
31
|
-
}
|
|
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
11
|
interface UnlockedAchievement {
|
|
35
12
|
id: string;
|
|
36
13
|
icon: string;
|
|
@@ -41,7 +18,7 @@ interface AchievementUnlockOwner {
|
|
|
41
18
|
profile?: Profile | null;
|
|
42
19
|
color: string;
|
|
43
20
|
}
|
|
44
|
-
interface Props$
|
|
21
|
+
interface Props$7<Seat extends number> {
|
|
45
22
|
unlocks: Partial<Record<Seat, UnlockedAchievement[]>>;
|
|
46
23
|
seats: readonly Seat[];
|
|
47
24
|
owners: Record<Seat, AchievementUnlockOwner>;
|
|
@@ -49,81 +26,7 @@ interface Props$d<Seat extends number> {
|
|
|
49
26
|
fg?: string;
|
|
50
27
|
style?: ViewStyle;
|
|
51
28
|
}
|
|
52
|
-
declare function AchievementUnlockList<Seat extends number>({ unlocks, seats, owners, tierColors, fg: fgOverride, style }: Props$
|
|
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;
|
|
63
|
-
|
|
64
|
-
interface BaseSettingsDialogProps {
|
|
65
|
-
visible: boolean;
|
|
66
|
-
onDismiss: () => void;
|
|
67
|
-
rotation?: ViewRotation;
|
|
68
|
-
version: string | number;
|
|
69
|
-
lockOrientation?: boolean;
|
|
70
|
-
onLockOrientationChange?: (value: boolean) => void;
|
|
71
|
-
deferBottomEdgeGestures?: boolean;
|
|
72
|
-
onDeferBottomEdgeGestures?: (value: boolean) => void;
|
|
73
|
-
hideSound?: boolean;
|
|
74
|
-
hideHaptics?: boolean;
|
|
75
|
-
hideAppearance?: boolean;
|
|
76
|
-
hideUpdateCheck?: boolean;
|
|
77
|
-
onUpdateError?: (message: string) => void;
|
|
78
|
-
onShowHowToPlay?: () => void;
|
|
79
|
-
children?: ReactNode;
|
|
80
|
-
}
|
|
81
|
-
declare function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, version, lockOrientation, onLockOrientationChange, deferBottomEdgeGestures, onDeferBottomEdgeGestures, hideSound, hideHaptics, hideAppearance, hideUpdateCheck, onUpdateError, onShowHowToPlay, children }: BaseSettingsDialogProps): react.JSX.Element | null;
|
|
82
|
-
|
|
83
|
-
type MD3TextVariant = 'displayLarge' | 'displayMedium' | 'displaySmall' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'titleLarge' | 'titleMedium' | 'titleSmall' | 'labelLarge' | 'labelMedium' | 'labelSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall';
|
|
84
|
-
interface Props$b {
|
|
85
|
-
rotation?: ViewRotation;
|
|
86
|
-
title?: string;
|
|
87
|
-
titleVariant?: MD3TextVariant;
|
|
88
|
-
onBack: () => void;
|
|
89
|
-
insets: {
|
|
90
|
-
top: number;
|
|
91
|
-
left: number;
|
|
92
|
-
bottom: number;
|
|
93
|
-
right: number;
|
|
94
|
-
};
|
|
95
|
-
onReset?: () => void;
|
|
96
|
-
resetLabel?: string;
|
|
97
|
-
resetConfirmTitle?: string;
|
|
98
|
-
resetConfirmBody?: string;
|
|
99
|
-
fg?: string;
|
|
100
|
-
bg?: string;
|
|
101
|
-
children: ReactNode;
|
|
102
|
-
}
|
|
103
|
-
declare function BaseStatsScreen({ rotation: rotationOverride, title, titleVariant, onBack, insets, onReset, resetLabel, resetConfirmTitle, resetConfirmBody, fg: fgOverride, bg: bgOverride, children }: Props$b): react.JSX.Element;
|
|
104
|
-
|
|
105
|
-
interface ConfirmDialogProps {
|
|
106
|
-
visible: boolean;
|
|
107
|
-
title: string;
|
|
108
|
-
message: ReactNode;
|
|
109
|
-
confirmLabel: string;
|
|
110
|
-
cancelLabel?: string;
|
|
111
|
-
onConfirm: () => void;
|
|
112
|
-
onCancel?: () => void;
|
|
113
|
-
rotation?: ViewRotation;
|
|
114
|
-
icon?: string;
|
|
115
|
-
destructive?: boolean;
|
|
116
|
-
}
|
|
117
|
-
declare function ConfirmDialog({ visible, title, message, confirmLabel, cancelLabel, onConfirm, onCancel, rotation, icon, destructive }: ConfirmDialogProps): react.JSX.Element | null;
|
|
118
|
-
|
|
119
|
-
interface Props$a {
|
|
120
|
-
maxContentWidth?: number;
|
|
121
|
-
leftGutter?: ReactNode;
|
|
122
|
-
rightGutter?: ReactNode;
|
|
123
|
-
style?: StyleProp<ViewStyle>;
|
|
124
|
-
children: ReactNode;
|
|
125
|
-
}
|
|
126
|
-
declare function ContentGutter({ maxContentWidth, leftGutter, rightGutter, style, children }: Props$a): react.JSX.Element;
|
|
29
|
+
declare function AchievementUnlockList<Seat extends number>({ unlocks, seats, owners, tierColors, fg: fgOverride, style }: Props$7<Seat>): react.JSX.Element | null;
|
|
127
30
|
|
|
128
31
|
type PopoverAlign = 'left' | 'right' | 'center';
|
|
129
32
|
type PopoverVerticalAlign = 'below' | 'above';
|
|
@@ -174,7 +77,7 @@ interface MultiSelectSection<T extends string | number> {
|
|
|
174
77
|
allClear?: boolean;
|
|
175
78
|
}
|
|
176
79
|
type MenuSection = SingleSelectSection<any> | MultiSelectSection<any>;
|
|
177
|
-
interface Props$
|
|
80
|
+
interface Props$6 {
|
|
178
81
|
id: string;
|
|
179
82
|
host: PopoverHost;
|
|
180
83
|
icon: string;
|
|
@@ -194,7 +97,7 @@ interface Props$9 {
|
|
|
194
97
|
clear: string;
|
|
195
98
|
};
|
|
196
99
|
}
|
|
197
|
-
declare function SectionedDropdown({ id, host, icon, accessibilityLabel, sections, accentColor, mutedColor, onAccentColor, dark, align: forcedAlign, alignOverride, rotation: rotationOverride, autoDismiss, labelFontFamily, allClearLabels }: Props$
|
|
100
|
+
declare function SectionedDropdown({ id, host, icon, accessibilityLabel, sections, accentColor, mutedColor, onAccentColor, dark, align: forcedAlign, alignOverride, rotation: rotationOverride, autoDismiss, labelFontFamily, allClearLabels }: Props$6): react.JSX.Element;
|
|
198
101
|
|
|
199
102
|
interface ControlSchemePickerProps<T extends string | number> {
|
|
200
103
|
id: string;
|
|
@@ -214,20 +117,6 @@ interface ControlSchemePickerProps<T extends string | number> {
|
|
|
214
117
|
}
|
|
215
118
|
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;
|
|
216
119
|
|
|
217
|
-
interface Props$8 {
|
|
218
|
-
onBack: () => void;
|
|
219
|
-
onSettings: () => void;
|
|
220
|
-
fg: string;
|
|
221
|
-
insets: {
|
|
222
|
-
top: number;
|
|
223
|
-
left: number;
|
|
224
|
-
right: number;
|
|
225
|
-
};
|
|
226
|
-
backIcon?: string;
|
|
227
|
-
backLabel?: string;
|
|
228
|
-
}
|
|
229
|
-
declare function CornerActionButtons({ onBack, onSettings, fg, insets, backIcon, backLabel }: Props$8): react.JSX.Element;
|
|
230
|
-
|
|
231
120
|
type OrientationMode = 'faceToFace' | 'sideBySide';
|
|
232
121
|
interface CornerStatusBadgeSeat {
|
|
233
122
|
icon?: string;
|
|
@@ -240,13 +129,11 @@ interface CornerStatusBadgesProps {
|
|
|
240
129
|
}
|
|
241
130
|
declare function CornerStatusBadges({ orientationMode, p1OnRight, p1, p2 }: CornerStatusBadgesProps): react.JSX.Element;
|
|
242
131
|
|
|
243
|
-
declare const MONO_FONT: string;
|
|
244
|
-
|
|
245
132
|
declare function getInlineColorPickerContentSize(swatchCount: number, windowWidth: number, columns?: number): {
|
|
246
133
|
width: number;
|
|
247
134
|
height: number;
|
|
248
135
|
};
|
|
249
|
-
interface Props$
|
|
136
|
+
interface Props$5 {
|
|
250
137
|
id: string;
|
|
251
138
|
host: PopoverHost;
|
|
252
139
|
value: string;
|
|
@@ -266,7 +153,7 @@ interface Props$7 {
|
|
|
266
153
|
columns?: number;
|
|
267
154
|
size?: number;
|
|
268
155
|
}
|
|
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$
|
|
156
|
+
declare function InlineColorPicker({ id, host, value, onChange, previewValue, swatches, takenValue, allowSwapTaken, dark, align: forcedAlign, alignOverride, rotation: rotationOverride, icon, tag, labelFontFamily, autoDismiss, columns, size }: Props$5): react.JSX.Element;
|
|
270
157
|
|
|
271
158
|
declare const LABELED_DROPDOWN_POPOVER_WIDTH = 180;
|
|
272
159
|
declare function getLabeledDropdownContentHeight(optionCount: number): number;
|
|
@@ -275,7 +162,7 @@ interface LabeledDropdownOption<T extends string> {
|
|
|
275
162
|
label: string;
|
|
276
163
|
icon?: string;
|
|
277
164
|
}
|
|
278
|
-
interface Props$
|
|
165
|
+
interface Props$4<T extends string> {
|
|
279
166
|
id: string;
|
|
280
167
|
host: PopoverHost;
|
|
281
168
|
options: LabeledDropdownOption<T>[];
|
|
@@ -286,54 +173,10 @@ interface Props$6<T extends string> {
|
|
|
286
173
|
align?: 'left' | 'right' | 'center';
|
|
287
174
|
alignOverride?: AlignResult;
|
|
288
175
|
}
|
|
289
|
-
declare function LabeledDropdown<T extends string>({ id, host, options, value, onChange, color, dark, align: forcedAlign, alignOverride }: Props$
|
|
176
|
+
declare function LabeledDropdown<T extends string>({ id, host, options, value, onChange, color, dark, align: forcedAlign, alignOverride }: Props$4<T>): react.JSX.Element;
|
|
290
177
|
|
|
291
178
|
declare function loadSkiaWeb(): Promise<void>;
|
|
292
179
|
|
|
293
|
-
interface OverlayCardColors {
|
|
294
|
-
fg: string;
|
|
295
|
-
fgMuted: string;
|
|
296
|
-
cardBg: string;
|
|
297
|
-
cardBorder: string;
|
|
298
|
-
}
|
|
299
|
-
declare function getOverlayCardColors(dark: boolean): OverlayCardColors;
|
|
300
|
-
declare const overlayStyles: {
|
|
301
|
-
card: {
|
|
302
|
-
alignItems: "center";
|
|
303
|
-
borderRadius: number;
|
|
304
|
-
borderWidth: number;
|
|
305
|
-
gap: number;
|
|
306
|
-
maxWidth: number;
|
|
307
|
-
padding: number;
|
|
308
|
-
};
|
|
309
|
-
overlay: {
|
|
310
|
-
alignItems: "center";
|
|
311
|
-
backgroundColor: string;
|
|
312
|
-
bottom: number;
|
|
313
|
-
justifyContent: "center";
|
|
314
|
-
left: number;
|
|
315
|
-
position: "absolute";
|
|
316
|
-
right: number;
|
|
317
|
-
top: number;
|
|
318
|
-
};
|
|
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
180
|
declare function getColorPopoverId(idPrefix: string): string;
|
|
338
181
|
declare function getCpuDifficultyPopoverId(idPrefix: string): string;
|
|
339
182
|
interface PlayerSetupPanelProps<C extends string = string> {
|
|
@@ -370,7 +213,7 @@ interface PlayerSetupPanelProps<C extends string = string> {
|
|
|
370
213
|
}
|
|
371
214
|
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;
|
|
372
215
|
|
|
373
|
-
interface Props$
|
|
216
|
+
interface Props$3 {
|
|
374
217
|
visible: boolean;
|
|
375
218
|
children: ReactNode;
|
|
376
219
|
align?: 'left' | 'right' | 'center';
|
|
@@ -380,59 +223,25 @@ interface Props$5 {
|
|
|
380
223
|
caretBorderWidth?: number;
|
|
381
224
|
triggerSize?: number;
|
|
382
225
|
}
|
|
383
|
-
declare function PopoverBody({ visible, children, align, verticalAlign, caretColor, caretBorderColor, caretBorderWidth, triggerSize }: Props$
|
|
226
|
+
declare function PopoverBody({ visible, children, align, verticalAlign, caretColor, caretBorderColor, caretBorderWidth, triggerSize }: Props$3): react.JSX.Element | null;
|
|
384
227
|
|
|
385
|
-
interface Props$
|
|
228
|
+
interface Props$2 {
|
|
386
229
|
active: boolean;
|
|
387
230
|
onPress: () => void;
|
|
388
231
|
style?: StyleProp<ViewStyle>;
|
|
389
232
|
}
|
|
390
|
-
declare function PressAwayOverlay({ active, onPress, style }: Props$
|
|
233
|
+
declare function PressAwayOverlay({ active, onPress, style }: Props$2): react.JSX.Element | null;
|
|
391
234
|
|
|
392
|
-
interface Props$
|
|
235
|
+
interface Props$1 {
|
|
393
236
|
color: string;
|
|
394
237
|
ready: boolean;
|
|
395
238
|
onToggleReady: () => void;
|
|
396
239
|
style?: StyleProp<ViewStyle>;
|
|
397
240
|
labelFontFamily?: string;
|
|
398
241
|
}
|
|
399
|
-
declare function ReadyButton({ color, ready, onToggleReady, style, labelFontFamily }: Props$
|
|
242
|
+
declare function ReadyButton({ color, ready, onToggleReady, style, labelFontFamily }: Props$1): react.JSX.Element;
|
|
400
243
|
|
|
401
|
-
interface
|
|
402
|
-
children: ReactNode;
|
|
403
|
-
/** The angle to turn the frame by. Defaults to the live physical hold (@tastic/core's useRotation); pass it
|
|
404
|
-
* when the caller already has the exact angle it wants, e.g. a dialog handed its caller's rotation, or 0 for
|
|
405
|
-
* one that already sits inside a turned frame. */
|
|
406
|
-
rotation?: ViewRotation;
|
|
407
|
-
/** Give everything inside the frame the safe-area insets already remapped onto the frame's own edges (see
|
|
408
|
-
* @tastic/core's rotateInsets), so a component that reads `useSafeAreaInsets()` itself (a library screen,
|
|
409
|
-
* Paper's Modal, a toaster) lands on the right edge when the frame is turned. Leave it off for content that
|
|
410
|
-
* rotates the insets itself, which would otherwise rotate them twice. */
|
|
411
|
-
rotatedSafeArea?: boolean;
|
|
412
|
-
/** Mount a Paper Portal.Host INSIDE the frame, so a dialog (Paper's Portal otherwise mounts at the app root,
|
|
413
|
-
* outside the frame) is laid out against the frame's footprint and turned with it. The dialog must then be
|
|
414
|
-
* told `rotation={0}`. */
|
|
415
|
-
portalHost?: boolean;
|
|
416
|
-
/** Let touches fall through the frame to whatever is beneath it, so only its children claim them. For a frame
|
|
417
|
-
* laid OVER other content (a dialog layer, a root-level overlay); a screen that owns the window leaves it off. */
|
|
418
|
-
passThrough?: boolean;
|
|
419
|
-
/** Cap on the content column's width in the WIDE layout only (the rotated footprint is landscape), centred: a
|
|
420
|
-
* stats list or a roster stretched across an 874pt-wide landscape screen reads badly. Portrait is never capped,
|
|
421
|
-
* so a portrait iPad or desktop window keeps its full width. Omit for no cap. */
|
|
422
|
-
maxContentWidth?: number;
|
|
423
|
-
}
|
|
424
|
-
/** A frame turned to follow the phone while the OS stays portrait-locked (see @tastic/core's FakeLandscapeView),
|
|
425
|
-
* sized to the turned footprint so its content lays out against the short edge at +/-90. The tree is IDENTICAL
|
|
426
|
-
* at every angle, so a rotation never remounts what is inside: `FakeLandscapeView > SafeArea provider >
|
|
427
|
-
* [Portal.Host] > column`. `rotation`, `rotatedSafeArea`, `passThrough` and `maxContentWidth` only change styles
|
|
428
|
-
* and values, but `portalHost` adds or removes the Portal.Host element, so it must be STATIC per call site
|
|
429
|
-
* (flipping it at runtime would remount everything inside).
|
|
430
|
-
*
|
|
431
|
-
* Safe for tap-driven content only: react-native-gesture-handler's translation deltas are untransformed, so
|
|
432
|
-
* never put a gesture-tracked game board inside it. */
|
|
433
|
-
declare function RotatedFrame({ children, rotation: rotationOverride, rotatedSafeArea, portalHost, passThrough, maxContentWidth }: RotatedFrameProps): react.JSX.Element;
|
|
434
|
-
|
|
435
|
-
interface Props$2 {
|
|
244
|
+
interface Props {
|
|
436
245
|
onBack: () => void;
|
|
437
246
|
onSettings: () => void;
|
|
438
247
|
onRandomize?: () => void;
|
|
@@ -441,39 +250,7 @@ interface Props$2 {
|
|
|
441
250
|
popoverOpen: boolean;
|
|
442
251
|
children: ReactNode;
|
|
443
252
|
}
|
|
444
|
-
declare function SharedActionBand({ onBack, onSettings, onRandomize, onReset, fg, popoverOpen, children }: Props
|
|
445
|
-
|
|
446
|
-
declare function getStaggeredWordDuration(letterCount: number): number;
|
|
447
|
-
interface StaggeredWordProps {
|
|
448
|
-
word: string;
|
|
449
|
-
color: string;
|
|
450
|
-
fontFamily: string;
|
|
451
|
-
fontSize: number;
|
|
452
|
-
lineHeight: number;
|
|
453
|
-
reducedMotion: boolean;
|
|
454
|
-
startIndex?: number;
|
|
455
|
-
fontWeight?: TextStyle['fontWeight'];
|
|
456
|
-
letterSpacing?: number;
|
|
457
|
-
style?: StyleProp<ViewStyle>;
|
|
458
|
-
onLayout?: (e: LayoutChangeEvent) => void;
|
|
459
|
-
}
|
|
460
|
-
declare function StaggeredWord({ word, color, fontFamily, fontSize, lineHeight, reducedMotion, startIndex, fontWeight, letterSpacing, style, onLayout }: StaggeredWordProps): react.JSX.Element;
|
|
461
|
-
|
|
462
|
-
interface Props$1 {
|
|
463
|
-
label: string;
|
|
464
|
-
value: string;
|
|
465
|
-
fg?: string;
|
|
466
|
-
fgMuted?: string;
|
|
467
|
-
}
|
|
468
|
-
declare function StatRow({ label, value, fg: fgOverride, fgMuted: fgMutedOverride }: Props$1): react.JSX.Element;
|
|
469
|
-
|
|
470
|
-
interface Props {
|
|
471
|
-
label: string;
|
|
472
|
-
fg?: string;
|
|
473
|
-
sectionBg?: string;
|
|
474
|
-
children: ReactNode;
|
|
475
|
-
}
|
|
476
|
-
declare function StatSection({ label, fg: fgOverride, sectionBg: sectionBgOverride, children }: Props): react.JSX.Element;
|
|
253
|
+
declare function SharedActionBand({ onBack, onSettings, onRandomize, onReset, fg, popoverOpen, children }: Props): react.JSX.Element;
|
|
477
254
|
|
|
478
255
|
interface TriggerGaugeProps {
|
|
479
256
|
segments: number;
|
|
@@ -488,14 +265,6 @@ interface TriggerGaugeProps {
|
|
|
488
265
|
|
|
489
266
|
declare function TriggerGaugeHost(props: TriggerGaugeProps): react.JSX.Element;
|
|
490
267
|
|
|
491
|
-
interface UpdateDialogProps {
|
|
492
|
-
rotation?: ViewRotation;
|
|
493
|
-
autoCheck?: boolean;
|
|
494
|
-
autoPrompt?: boolean;
|
|
495
|
-
onError?: (message: string) => void;
|
|
496
|
-
}
|
|
497
|
-
declare function UpdateDialog({ rotation, autoCheck, autoPrompt, onError }: UpdateDialogProps): react.JSX.Element;
|
|
498
|
-
|
|
499
268
|
interface QuitConfirmation {
|
|
500
269
|
/** Wire directly to <ConfirmDialog visible={...}>. */
|
|
501
270
|
confirmVisible: boolean;
|
|
@@ -508,4 +277,4 @@ declare function useQuitConfirmation(hasProgress: () => boolean, onConfirmedBack
|
|
|
508
277
|
|
|
509
278
|
declare function useZoneClampedAlign(open: boolean, contentWidth: number, contentHeight: number, rotation?: PopoverRotation): ReturnType<typeof useAutoAlign>;
|
|
510
279
|
|
|
511
|
-
export {
|
|
280
|
+
export { AchievementUnlockList, type AchievementUnlockOwner, type AlignResult, ControlSchemePicker, type ControlSchemePickerProps, type CornerStatusBadgeSeat, CornerStatusBadges, type CornerStatusBadgesProps, InlineColorPicker, LABELED_DROPDOWN_POPOVER_WIDTH, LabeledDropdown, type LabeledDropdownOption, type MenuOption, type MenuSection, type MultiSelectSection, type OrientationMode, PlayerSetupPanel, type PlayerSetupPanelProps, type PopoverAlign, PopoverBody, type PopoverHost, type PopoverRotation, type PopoverVerticalAlign, PressAwayOverlay, type QuitConfirmation, ReadyButton, SectionedDropdown, SharedActionBand, type SingleSelectSection, TriggerGaugeHost, type TriggerGaugeProps, type UnlockedAchievement, getColorPopoverId, getCpuDifficultyPopoverId, getInlineColorPickerContentSize, getLabeledDropdownContentHeight, loadSkiaWeb, useAutoAlign, usePopoverHost, useQuitConfirmation, useZoneClampedAlign };
|