@tastic/hud 0.17.0 → 0.19.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 +31 -16
- package/dist/{TriggerGauge-2OJOOF6I.mjs → TriggerGauge-GIHKGAZE.mjs} +5 -5
- package/dist/chrome/index.d.mts +23 -17
- package/dist/chrome/index.d.ts +23 -17
- package/dist/chrome/index.js +298 -211
- package/dist/chrome/index.mjs +11 -5
- package/dist/{chunk-27FIA26F.mjs → chunk-HGJKNLMD.mjs} +165 -114
- package/dist/{chunk-AX4GC5KU.mjs → chunk-PUF6TABL.mjs} +60 -24
- package/dist/guide/index.d.mts +3 -0
- package/dist/guide/index.d.ts +3 -0
- package/dist/guide/index.js +122 -74
- package/dist/guide/index.mjs +16 -8
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +471 -384
- package/dist/index.mjs +12 -6
- package/package.json +12 -12
- package/src/BaseSettingsDialog.tsx +224 -146
- package/src/ConfirmDialog.tsx +8 -15
- package/src/DialogHeader.tsx +72 -0
- package/src/OverlaySurface.tsx +21 -13
- package/src/TriggerGauge.tsx +9 -9
- package/src/chrome/index.ts +3 -1
- package/src/guide/HowToPlayDialog.tsx +23 -9
- package/src/index.ts +3 -1
- package/src/overlayCard.ts +11 -34
- package/src/useCompactDialog.ts +23 -0
package/README.md
CHANGED
|
@@ -79,6 +79,8 @@ corner of the screen.
|
|
|
79
79
|
- **`OverlayCard`** / **`OverlayBackdrop`** / **`useOverlayCardColors`** - the card and dim behind
|
|
80
80
|
`ConfirmDialog` and the how-to-play guide, in the app's own theme colors and blurred when the
|
|
81
81
|
player's Blur setting allows it. See Overlay cards below.
|
|
82
|
+
- **`DialogHeader`** / **`useCompactDialog`** - the one header every dialog opens with (an icon over
|
|
83
|
+
a bold title in the theme's primary), and the rule for its compact form. See Overlay cards below.
|
|
82
84
|
|
|
83
85
|
## Rotation
|
|
84
86
|
|
|
@@ -205,9 +207,11 @@ the fleet with real Redux Toolkit state - reads `lockOrientation`/`deferBottomEd
|
|
|
205
207
|
`useSelector` and writes them back via `dispatch(gameActions.setLockOrientation(...))` directly
|
|
206
208
|
inside the adapter, with nothing threaded through props at all. `BaseSettingsDialog` doesn't care
|
|
207
209
|
which of these an app uses: sound, haptics, appearance, and update-checking are identical across
|
|
208
|
-
every app and live entirely inside this package now, so `lockOrientation`/`onLockOrientationChange
|
|
209
|
-
|
|
210
|
-
actually needs to source itself, however it does that.
|
|
210
|
+
every app and live entirely inside this package now, so `lockOrientation`/`onLockOrientationChange`,
|
|
211
|
+
`deferBottomEdgeGestures`/`onDeferBottomEdgeGestures` and `keepAwake`/`onKeepAwakeChange` are the only
|
|
212
|
+
settings an adapter actually needs to source itself, however it does that. Each pair is optional: omit
|
|
213
|
+
one and its row doesn't show. The Keep Awake row only toggles the value; the app keeps the screen awake
|
|
214
|
+
itself while it's on (for example with `expo-keep-awake` on its match screen).
|
|
211
215
|
|
|
212
216
|
Every adapter also passes `version={release.otaVersion}` (so the dialog's own update-check button
|
|
213
217
|
knows what it's currently running) and `onUpdateError`, wired to a real `useToast()` call. Wire this
|
|
@@ -232,6 +236,8 @@ export function SettingsDialog({ visible, onDismiss, rotation = 0, settings, set
|
|
|
232
236
|
onLockOrientationChange={(value) => setSettings({ lockOrientation: value })}
|
|
233
237
|
deferBottomEdgeGestures={settings.deferBottomEdgeGestures}
|
|
234
238
|
onDeferBottomEdgeGestures={(value) => setSettings({ deferBottomEdgeGestures: value })}
|
|
239
|
+
keepAwake={settings.keepAwake}
|
|
240
|
+
onKeepAwakeChange={(value) => setSettings({ keepAwake: value })}
|
|
235
241
|
onUpdateError={(message) => error('Update check failed', message)}
|
|
236
242
|
/>
|
|
237
243
|
)
|
|
@@ -244,14 +250,15 @@ export function SettingsDialog({ visible, onDismiss, rotation = 0, settings, set
|
|
|
244
250
|
own overlay (a result banner, a game-over card) should too, so every card in the fleet looks the same:
|
|
245
251
|
|
|
246
252
|
```tsx
|
|
247
|
-
import { OverlayBackdrop, OverlayCard, overlayActionStyles, useOverlayCardColors } from '@tastic/hud'
|
|
253
|
+
import { DialogHeader, OverlayBackdrop, OverlayCard, overlayActionStyles, useCompactDialog, useOverlayCardColors } from '@tastic/hud'
|
|
248
254
|
|
|
249
255
|
function GameOverCard({ onRestart }: { onRestart: () => void }) {
|
|
250
|
-
const {
|
|
256
|
+
const { fgMuted } = useOverlayCardColors()
|
|
257
|
+
const { compact, onLayout } = useCompactDialog()
|
|
251
258
|
return (
|
|
252
|
-
<OverlayBackdrop>
|
|
259
|
+
<OverlayBackdrop onLayout={onLayout}>
|
|
253
260
|
<OverlayCard accessibilityViewIsModal>
|
|
254
|
-
<
|
|
261
|
+
<DialogHeader icon='flag-checkered' title='Game Over' compact={compact} />
|
|
255
262
|
<Text style={{ color: fgMuted }}>Score 42</Text>
|
|
256
263
|
<View style={overlayActionStyles.actions}>...</View>
|
|
257
264
|
</OverlayCard>
|
|
@@ -261,9 +268,18 @@ function GameOverCard({ onRestart }: { onRestart: () => void }) {
|
|
|
261
268
|
```
|
|
262
269
|
|
|
263
270
|
- **Colors come from the app's theme.** Text is `onSurface` (`fg`) and `onSurfaceVariant` (`fgMuted`),
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
wash of
|
|
271
|
+
and the dim is the theme's `backdrop`, the same scrim auto-paper's own `Dialog` uses. The card is the
|
|
272
|
+
Settings sheet's surface: auto-paper's `BlurView` with no elevation (the theme's plain surface, no
|
|
273
|
+
wash of the primary), no border, and the `Dialog`'s corner radius. So every card and the Settings
|
|
274
|
+
sheet look like one family, in each game's palette and light/dark mode.
|
|
275
|
+
- **Every dialog opens with `DialogHeader`.** A 64pt icon over a large bold title, both in the theme's
|
|
276
|
+
primary (pass `color` for another role, as `ConfirmDialog` does with danger when `destructive`).
|
|
277
|
+
`ConfirmDialog`, the how-to-play guide (titled "How to Play") and `BaseSettingsDialog` all use it;
|
|
278
|
+
an app's own cards should too. With `compact` the icon shrinks to 32pt and sits beside a smaller
|
|
279
|
+
title. `useCompactDialog(rotation?)` decides it: put its `onLayout` on the `OverlayBackdrop`, and it
|
|
280
|
+
is compact when the space the dialog lays out in is under `COMPACT_DIALOG_HEIGHT` (528pt) along the
|
|
281
|
+
card's own vertical axis, so a phone held sideways. One-button dialogs end in a single contained
|
|
282
|
+
primary button (`overlayActionStyles.actionButtonSingle`), the Settings sheet's Done included.
|
|
267
283
|
- **Blur is automatic.** The card blurs what's behind it when the player's Blur setting is on and the
|
|
268
284
|
app hands `expo-blur` to auto-paper's `Provider` (`expoBlur={ExpoBlur}`). Otherwise it paints that
|
|
269
285
|
raised surface color instead: on Android (`BlurView` needs a blur target there, which a card has
|
|
@@ -273,9 +289,8 @@ function GameOverCard({ onRestart }: { onRestart: () => void }) {
|
|
|
273
289
|
appearance picker that flips auto-paper's own `blur` theme setting, which the settings sheet, Paper
|
|
274
290
|
menus and these cards all follow. The row only shows where blur can actually happen: not on
|
|
275
291
|
Android, not in an app that never passed `expoBlur`, and not with `hideAppearance`.
|
|
276
|
-
- **`getOverlayCardColors
|
|
277
|
-
|
|
278
|
-
its own cards onto `OverlayCard`.
|
|
292
|
+
- **`getOverlayCardColors` is gone.** It returned the old fixed black/white card (`#F2F2F2`/`#111111`),
|
|
293
|
+
which ignored the theme and never blurred. Use `useOverlayCardColors` for a card's text and edges.
|
|
279
294
|
|
|
280
295
|
## Zone-aware popovers (`useZoneClampedAlign`)
|
|
281
296
|
|
|
@@ -607,8 +622,8 @@ touches the main barrel. It's for an app that has `@tastic/core` and `@rific/upd
|
|
|
607
622
|
- Stats: `BaseStatsScreen`, `StatSection`, `StatRow`, `AchievementRow`, `LOCKED_BADGE_COLOR`,
|
|
608
623
|
`AchievementCatalogSection`, `ActivityStatSection`
|
|
609
624
|
- Chrome: `CornerActionButtons`, `ContentGutter`, `StaggeredWord`, `getStaggeredWordDuration`
|
|
610
|
-
- Overlay cards: `OverlayCard`, `OverlayBackdrop`, `useOverlayCardColors`
|
|
611
|
-
- Style tokens: `overlayStyles`, `overlayActionStyles`, `MONO_FONT
|
|
625
|
+
- Overlay cards: `OverlayCard`, `OverlayBackdrop`, `useOverlayCardColors`, `DialogHeader`, `useCompactDialog`, `isCompactDialogHeight`, `COMPACT_DIALOG_HEIGHT`
|
|
626
|
+
- Style tokens: `overlayStyles`, `overlayActionStyles`, `MONO_FONT`
|
|
612
627
|
|
|
613
628
|
Each is the same component the main entry exports and is documented above. Only the import path changes:
|
|
614
629
|
|
|
@@ -669,5 +684,5 @@ resolve module".
|
|
|
669
684
|
| `@rific/updater` | >=0.4.0, optional | main entry and `./chrome`: `BaseSettingsDialog`, `UpdateDialog` |
|
|
670
685
|
| `@tastic/profile` | >=0.4.0, optional | main entry: `PlayerSetupPanel`, `AchievementUnlockList` (`ProfileChip`) |
|
|
671
686
|
| `@tastic/split-screen` | >=0.5.0, optional | main entry: `useZoneClampedAlign` |
|
|
672
|
-
| `@shopify/react-native-skia` | >=
|
|
687
|
+
| `@shopify/react-native-skia` | >=2.6.0, optional | `TriggerGaugeHost`'s gauge (lazy-loaded behind `SkiaGate`) and `./skia-gate` |
|
|
673
688
|
| `@tastic/achievements` | >=0.2.0, optional | `AchievementCatalogSection`, `AchievementUnlockList`, type-only (`AchievementCatalogRow`, first exported in 0.2.0; `AchievementTier`); `./chrome` needs it installed only to type-check |
|
|
@@ -54,7 +54,7 @@ function TriggerGauge({ segments, litIndices, size, accentColor, mutedColor, das
|
|
|
54
54
|
const canvasSize = diameter + LIT_THICKNESS;
|
|
55
55
|
const oval = Skia.XYWHRect(LIT_THICKNESS / 2, LIT_THICKNESS / 2, diameter, diameter);
|
|
56
56
|
const unlitPath = useDerivedValue(() => {
|
|
57
|
-
const path = Skia.
|
|
57
|
+
const path = Skia.PathBuilder.Make();
|
|
58
58
|
for (let i = 0; i < segments; i++) {
|
|
59
59
|
if (litIndices.includes(i)) continue;
|
|
60
60
|
let local = 1;
|
|
@@ -68,13 +68,13 @@ function TriggerGauge({ segments, litIndices, size, accentColor, mutedColor, das
|
|
|
68
68
|
const dashCenterDeg = startDeg + (i + 0.5) * step;
|
|
69
69
|
path.addArc(oval, dashCenterDeg - 90 - sweep / 2, sweep);
|
|
70
70
|
}
|
|
71
|
-
return path;
|
|
71
|
+
return path.detach();
|
|
72
72
|
}, [segments, litIndicesKey, step, startDeg, dashAngleDeg, totalDurationMs, oval.x, oval.y, oval.width, oval.height]);
|
|
73
73
|
const litPath = useDerivedValue(() => {
|
|
74
|
-
const path = Skia.
|
|
74
|
+
const path = Skia.PathBuilder.Make();
|
|
75
75
|
if (mountProgress.value >= 1 && singleSelect) {
|
|
76
76
|
path.addArc(oval, angleDeg.value - 90 - dashAngleDeg / 2, dashAngleDeg);
|
|
77
|
-
return path;
|
|
77
|
+
return path.detach();
|
|
78
78
|
}
|
|
79
79
|
for (let i = 0; i < segments; i++) {
|
|
80
80
|
const isLitNow = litIndices.includes(i);
|
|
@@ -98,7 +98,7 @@ function TriggerGauge({ segments, litIndices, size, accentColor, mutedColor, das
|
|
|
98
98
|
const dashCenterDeg = startDeg + (i + 0.5) * step;
|
|
99
99
|
path.addArc(oval, dashCenterDeg - 90 - sweep / 2, sweep);
|
|
100
100
|
}
|
|
101
|
-
return path;
|
|
101
|
+
return path.detach();
|
|
102
102
|
}, [segments, litIndicesKey, transitionFromKey, singleSelect, step, startDeg, dashAngleDeg, totalDurationMs, oval.x, oval.y, oval.width, oval.height]);
|
|
103
103
|
if (segments < 2) return null;
|
|
104
104
|
const gaugeSizeStyle = {
|
package/dist/chrome/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { AchievementCatalogRow } from '@tastic/achievements';
|
|
4
4
|
import { ViewRotation } from '@tastic/core';
|
|
5
|
-
import { StyleProp, ViewStyle, Insets,
|
|
5
|
+
import { StyleProp, ViewStyle, Insets, LayoutChangeEvent, TextStyle } from 'react-native';
|
|
6
6
|
|
|
7
7
|
interface Props$7 {
|
|
8
8
|
rows: AchievementCatalogRow[];
|
|
@@ -47,6 +47,8 @@ interface BaseSettingsDialogProps {
|
|
|
47
47
|
onLockOrientationChange?: (value: boolean) => void;
|
|
48
48
|
deferBottomEdgeGestures?: boolean;
|
|
49
49
|
onDeferBottomEdgeGestures?: (value: boolean) => void;
|
|
50
|
+
keepAwake?: boolean;
|
|
51
|
+
onKeepAwakeChange?: (value: boolean) => void;
|
|
50
52
|
hideSound?: boolean;
|
|
51
53
|
hideHaptics?: boolean;
|
|
52
54
|
hideAppearance?: boolean;
|
|
@@ -55,7 +57,7 @@ interface BaseSettingsDialogProps {
|
|
|
55
57
|
onShowHowToPlay?: () => void;
|
|
56
58
|
children?: ReactNode;
|
|
57
59
|
}
|
|
58
|
-
declare function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, version, lockOrientation, onLockOrientationChange, deferBottomEdgeGestures, onDeferBottomEdgeGestures, hideSound, hideHaptics, hideAppearance, hideUpdateCheck, onUpdateError, onShowHowToPlay, children }: BaseSettingsDialogProps): react.JSX.Element | null;
|
|
60
|
+
declare function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, version, lockOrientation, onLockOrientationChange, deferBottomEdgeGestures, onDeferBottomEdgeGestures, keepAwake, onKeepAwakeChange, hideSound, hideHaptics, hideAppearance, hideUpdateCheck, onUpdateError, onShowHowToPlay, children }: BaseSettingsDialogProps): react.JSX.Element | null;
|
|
59
61
|
|
|
60
62
|
type MD3TextVariant = 'displayLarge' | 'displayMedium' | 'displaySmall' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'titleLarge' | 'titleMedium' | 'titleSmall' | 'labelLarge' | 'labelMedium' | 'labelSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall';
|
|
61
63
|
interface Props$4 {
|
|
@@ -117,25 +119,23 @@ interface Props$2 {
|
|
|
117
119
|
}
|
|
118
120
|
declare function CornerActionButtons({ onBack, onSettings, fg, insets, backIcon, backLabel, hitSlop }: Props$2): react.JSX.Element;
|
|
119
121
|
|
|
122
|
+
declare const COMPACT_DIALOG_HEIGHT = 528;
|
|
123
|
+
declare function isCompactDialogHeight(height: number): boolean;
|
|
124
|
+
interface DialogHeaderProps {
|
|
125
|
+
icon: string;
|
|
126
|
+
title: string;
|
|
127
|
+
color?: string;
|
|
128
|
+
compact?: boolean;
|
|
129
|
+
style?: StyleProp<ViewStyle>;
|
|
130
|
+
}
|
|
131
|
+
declare function DialogHeader({ icon, title, color, compact, style }: DialogHeaderProps): react.JSX.Element;
|
|
132
|
+
|
|
120
133
|
declare const MONO_FONT: string;
|
|
121
134
|
|
|
122
|
-
interface OverlayCardColors {
|
|
123
|
-
fg: string;
|
|
124
|
-
fgMuted: string;
|
|
125
|
-
cardBg: string;
|
|
126
|
-
cardBorder: string;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* @deprecated The literal black/white card colors. hud's own cards moved to the theme-driven, blur-aware
|
|
130
|
-
* OverlayCard / OverlayBackdrop / useOverlayCardColors (OverlaySurface.tsx) on 2026-10-15; this stays
|
|
131
|
-
* only until every app's own result cards have moved over too.
|
|
132
|
-
*/
|
|
133
|
-
declare function getOverlayCardColors(dark: boolean): OverlayCardColors;
|
|
134
135
|
declare const overlayStyles: {
|
|
135
136
|
card: {
|
|
136
137
|
alignItems: "center";
|
|
137
138
|
borderRadius: number;
|
|
138
|
-
borderWidth: number;
|
|
139
139
|
gap: number;
|
|
140
140
|
maxWidth: number;
|
|
141
141
|
padding: number;
|
|
@@ -178,8 +178,9 @@ declare function useOverlayCardColors(): OverlayCardThemeColors;
|
|
|
178
178
|
interface OverlayBackdropProps {
|
|
179
179
|
children?: ReactNode;
|
|
180
180
|
style?: StyleProp<ViewStyle>;
|
|
181
|
+
onLayout?: (e: LayoutChangeEvent) => void;
|
|
181
182
|
}
|
|
182
|
-
declare function OverlayBackdrop({ children, style }: OverlayBackdropProps): react.JSX.Element;
|
|
183
|
+
declare function OverlayBackdrop({ children, style, onLayout }: OverlayBackdropProps): react.JSX.Element;
|
|
183
184
|
interface OverlayCardProps {
|
|
184
185
|
children?: ReactNode;
|
|
185
186
|
style?: StyleProp<ViewStyle>;
|
|
@@ -262,4 +263,9 @@ interface UpdateDialogProps {
|
|
|
262
263
|
}
|
|
263
264
|
declare function UpdateDialog({ rotation, autoCheck, autoPrompt, onError }: UpdateDialogProps): react.JSX.Element;
|
|
264
265
|
|
|
265
|
-
|
|
266
|
+
declare function useCompactDialog(rotation?: ViewRotation): {
|
|
267
|
+
compact: boolean;
|
|
268
|
+
onLayout: (e: LayoutChangeEvent) => void;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
export { AchievementCatalogSection, AchievementRow, ActivityStatSection, BaseSettingsDialog, type BaseSettingsDialogProps, BaseStatsScreen, COMPACT_DIALOG_HEIGHT, ConfirmDialog, type ConfirmDialogProps, ContentGutter, CornerActionButtons, DialogHeader, type DialogHeaderProps, LOCKED_BADGE_COLOR, MONO_FONT, OverlayBackdrop, type OverlayBackdropProps, OverlayCard, type OverlayCardProps, type OverlayCardThemeColors, RotatedFrame, type RotatedFrameProps, StaggeredWord, type StaggeredWordProps, StatRow, StatSection, UpdateDialog, type UpdateDialogProps, getStaggeredWordDuration, isCompactDialogHeight, overlayActionStyles, overlayStyles, useCompactDialog, useOverlayCardColors };
|
package/dist/chrome/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { AchievementCatalogRow } from '@tastic/achievements';
|
|
4
4
|
import { ViewRotation } from '@tastic/core';
|
|
5
|
-
import { StyleProp, ViewStyle, Insets,
|
|
5
|
+
import { StyleProp, ViewStyle, Insets, LayoutChangeEvent, TextStyle } from 'react-native';
|
|
6
6
|
|
|
7
7
|
interface Props$7 {
|
|
8
8
|
rows: AchievementCatalogRow[];
|
|
@@ -47,6 +47,8 @@ interface BaseSettingsDialogProps {
|
|
|
47
47
|
onLockOrientationChange?: (value: boolean) => void;
|
|
48
48
|
deferBottomEdgeGestures?: boolean;
|
|
49
49
|
onDeferBottomEdgeGestures?: (value: boolean) => void;
|
|
50
|
+
keepAwake?: boolean;
|
|
51
|
+
onKeepAwakeChange?: (value: boolean) => void;
|
|
50
52
|
hideSound?: boolean;
|
|
51
53
|
hideHaptics?: boolean;
|
|
52
54
|
hideAppearance?: boolean;
|
|
@@ -55,7 +57,7 @@ interface BaseSettingsDialogProps {
|
|
|
55
57
|
onShowHowToPlay?: () => void;
|
|
56
58
|
children?: ReactNode;
|
|
57
59
|
}
|
|
58
|
-
declare function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, version, lockOrientation, onLockOrientationChange, deferBottomEdgeGestures, onDeferBottomEdgeGestures, hideSound, hideHaptics, hideAppearance, hideUpdateCheck, onUpdateError, onShowHowToPlay, children }: BaseSettingsDialogProps): react.JSX.Element | null;
|
|
60
|
+
declare function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOverride, version, lockOrientation, onLockOrientationChange, deferBottomEdgeGestures, onDeferBottomEdgeGestures, keepAwake, onKeepAwakeChange, hideSound, hideHaptics, hideAppearance, hideUpdateCheck, onUpdateError, onShowHowToPlay, children }: BaseSettingsDialogProps): react.JSX.Element | null;
|
|
59
61
|
|
|
60
62
|
type MD3TextVariant = 'displayLarge' | 'displayMedium' | 'displaySmall' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'titleLarge' | 'titleMedium' | 'titleSmall' | 'labelLarge' | 'labelMedium' | 'labelSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall';
|
|
61
63
|
interface Props$4 {
|
|
@@ -117,25 +119,23 @@ interface Props$2 {
|
|
|
117
119
|
}
|
|
118
120
|
declare function CornerActionButtons({ onBack, onSettings, fg, insets, backIcon, backLabel, hitSlop }: Props$2): react.JSX.Element;
|
|
119
121
|
|
|
122
|
+
declare const COMPACT_DIALOG_HEIGHT = 528;
|
|
123
|
+
declare function isCompactDialogHeight(height: number): boolean;
|
|
124
|
+
interface DialogHeaderProps {
|
|
125
|
+
icon: string;
|
|
126
|
+
title: string;
|
|
127
|
+
color?: string;
|
|
128
|
+
compact?: boolean;
|
|
129
|
+
style?: StyleProp<ViewStyle>;
|
|
130
|
+
}
|
|
131
|
+
declare function DialogHeader({ icon, title, color, compact, style }: DialogHeaderProps): react.JSX.Element;
|
|
132
|
+
|
|
120
133
|
declare const MONO_FONT: string;
|
|
121
134
|
|
|
122
|
-
interface OverlayCardColors {
|
|
123
|
-
fg: string;
|
|
124
|
-
fgMuted: string;
|
|
125
|
-
cardBg: string;
|
|
126
|
-
cardBorder: string;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* @deprecated The literal black/white card colors. hud's own cards moved to the theme-driven, blur-aware
|
|
130
|
-
* OverlayCard / OverlayBackdrop / useOverlayCardColors (OverlaySurface.tsx) on 2026-10-15; this stays
|
|
131
|
-
* only until every app's own result cards have moved over too.
|
|
132
|
-
*/
|
|
133
|
-
declare function getOverlayCardColors(dark: boolean): OverlayCardColors;
|
|
134
135
|
declare const overlayStyles: {
|
|
135
136
|
card: {
|
|
136
137
|
alignItems: "center";
|
|
137
138
|
borderRadius: number;
|
|
138
|
-
borderWidth: number;
|
|
139
139
|
gap: number;
|
|
140
140
|
maxWidth: number;
|
|
141
141
|
padding: number;
|
|
@@ -178,8 +178,9 @@ declare function useOverlayCardColors(): OverlayCardThemeColors;
|
|
|
178
178
|
interface OverlayBackdropProps {
|
|
179
179
|
children?: ReactNode;
|
|
180
180
|
style?: StyleProp<ViewStyle>;
|
|
181
|
+
onLayout?: (e: LayoutChangeEvent) => void;
|
|
181
182
|
}
|
|
182
|
-
declare function OverlayBackdrop({ children, style }: OverlayBackdropProps): react.JSX.Element;
|
|
183
|
+
declare function OverlayBackdrop({ children, style, onLayout }: OverlayBackdropProps): react.JSX.Element;
|
|
183
184
|
interface OverlayCardProps {
|
|
184
185
|
children?: ReactNode;
|
|
185
186
|
style?: StyleProp<ViewStyle>;
|
|
@@ -262,4 +263,9 @@ interface UpdateDialogProps {
|
|
|
262
263
|
}
|
|
263
264
|
declare function UpdateDialog({ rotation, autoCheck, autoPrompt, onError }: UpdateDialogProps): react.JSX.Element;
|
|
264
265
|
|
|
265
|
-
|
|
266
|
+
declare function useCompactDialog(rotation?: ViewRotation): {
|
|
267
|
+
compact: boolean;
|
|
268
|
+
onLayout: (e: LayoutChangeEvent) => void;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
export { AchievementCatalogSection, AchievementRow, ActivityStatSection, BaseSettingsDialog, type BaseSettingsDialogProps, BaseStatsScreen, COMPACT_DIALOG_HEIGHT, ConfirmDialog, type ConfirmDialogProps, ContentGutter, CornerActionButtons, DialogHeader, type DialogHeaderProps, LOCKED_BADGE_COLOR, MONO_FONT, OverlayBackdrop, type OverlayBackdropProps, OverlayCard, type OverlayCardProps, type OverlayCardThemeColors, RotatedFrame, type RotatedFrameProps, StaggeredWord, type StaggeredWordProps, StatRow, StatSection, UpdateDialog, type UpdateDialogProps, getStaggeredWordDuration, isCompactDialogHeight, overlayActionStyles, overlayStyles, useCompactDialog, useOverlayCardColors };
|