@tastic/hud 0.22.0 → 0.24.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 +85 -15
- package/dist/chrome/index.d.mts +87 -18
- package/dist/chrome/index.d.ts +87 -18
- package/dist/chrome/index.js +309 -22
- package/dist/chrome/index.mjs +13 -1
- package/dist/chunk-3TCJHMJP.mjs +14 -0
- package/dist/{chunk-N7A7W72S.mjs → chunk-BXG44LIA.mjs} +298 -19
- package/dist/index.d.mts +13 -84
- package/dist/index.d.ts +13 -84
- package/dist/index.js +120 -127
- package/dist/index.mjs +107 -374
- package/dist/skia/index.d.mts +5 -0
- package/dist/skia/index.d.ts +5 -0
- package/dist/{SkiaGate.js → skia/index.js} +17 -21
- package/dist/skia/index.mjs +8 -0
- package/package.json +9 -8
- package/src/BaseSettingsDialog.tsx +13 -13
- package/src/TriggerGaugeHost.tsx +20 -14
- package/src/chrome/index.ts +12 -4
- package/src/guide/index.ts +1 -1
- package/src/index.ts +2 -2
- package/src/loadSkiaWeb.web.ts +7 -4
- package/src/locateSkiaWebFile.ts +16 -0
- package/src/skia/index.ts +12 -0
- package/dist/SkiaGate.d.mts +0 -13
- package/dist/SkiaGate.d.ts +0 -13
- package/dist/SkiaGate.mjs +0 -6
- package/dist/chunk-XEOFR236.mjs +0 -21
- package/src/SkiaGate.tsx +0 -45
- package/src/SkiaGate.web.tsx +0 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { PopoverHost, AlignResult, PopoverRotation, useAutoAlign } from './chrome/index.js';
|
|
2
|
+
export { AchievementCatalogSection, AchievementRow, ActivityStatSection, BaseSettingsDialog, BaseSettingsDialogProps, BaseStatsScreen, COMPACT_DIALOG_HEIGHT, ConfirmDialog, ConfirmDialogProps, ContentGutter, CornerActionButtons, DialogHeader, DialogHeaderProps, InlineColorPicker, LOCKED_BADGE_COLOR, MONO_FONT, OverlayBackdrop, OverlayBackdropProps, OverlayCard, OverlayCardProps, OverlayCardThemeColors, PopoverAlign, PopoverBody, PopoverVerticalAlign, PressAwayOverlay, RotatedFrame, RotatedFrameProps, StaggeredWord, StaggeredWordProps, StatRow, StatSection, UpdateDialog, UpdateDialogProps, WELL_SHADOW, WellColors, getInlineColorPickerContentSize, getStaggeredWordDuration, isCompactDialogHeight, overlayActionStyles, overlayStyles, useCompactDialog, useOverlayCardColors, usePopoverHost, useWellColors } from './chrome/index.js';
|
|
2
3
|
import * as react from 'react';
|
|
3
|
-
import {
|
|
4
|
+
import { ReactNode } from 'react';
|
|
4
5
|
import { AchievementTier } from '@tastic/achievements';
|
|
5
6
|
import { Profile } from '@tastic/profile';
|
|
6
|
-
import { ViewStyle,
|
|
7
|
-
|
|
7
|
+
import { ViewStyle, StyleProp } from 'react-native';
|
|
8
|
+
export { loadSkiaWeb, locateSkiaWebFile } from './skia/index.js';
|
|
8
9
|
import { SeedColor } from '@rific/auto-paper';
|
|
9
|
-
|
|
10
|
+
import '@tastic/core';
|
|
10
11
|
|
|
11
12
|
interface UnlockedAchievement {
|
|
12
13
|
id: string;
|
|
@@ -18,7 +19,7 @@ interface AchievementUnlockOwner {
|
|
|
18
19
|
profile?: Profile | null;
|
|
19
20
|
color: string;
|
|
20
21
|
}
|
|
21
|
-
interface Props$
|
|
22
|
+
interface Props$4<Seat extends number> {
|
|
22
23
|
unlocks: Partial<Record<Seat, UnlockedAchievement[]>>;
|
|
23
24
|
seats: readonly Seat[];
|
|
24
25
|
owners: Record<Seat, AchievementUnlockOwner>;
|
|
@@ -26,32 +27,7 @@ interface Props$7<Seat extends number> {
|
|
|
26
27
|
fg?: string;
|
|
27
28
|
style?: ViewStyle;
|
|
28
29
|
}
|
|
29
|
-
declare function AchievementUnlockList<Seat extends number>({ unlocks, seats, owners, tierColors, fg: fgOverride, style }: Props$
|
|
30
|
-
|
|
31
|
-
type PopoverAlign = 'left' | 'right' | 'center';
|
|
32
|
-
type PopoverVerticalAlign = 'below' | 'above';
|
|
33
|
-
type PopoverRotation = ViewRotation;
|
|
34
|
-
interface AlignResult {
|
|
35
|
-
align: PopoverAlign;
|
|
36
|
-
verticalAlign: PopoverVerticalAlign;
|
|
37
|
-
maxHeight: number;
|
|
38
|
-
measured: boolean;
|
|
39
|
-
triggerRef: RefObject<View | null>;
|
|
40
|
-
}
|
|
41
|
-
declare function useAutoAlign(open: boolean, contentWidth: number, contentHeight: number, rotation?: PopoverRotation): {
|
|
42
|
-
align: PopoverAlign;
|
|
43
|
-
maxHeight: number;
|
|
44
|
-
measured: boolean;
|
|
45
|
-
triggerRef: RefObject<View | null>;
|
|
46
|
-
verticalAlign: PopoverVerticalAlign;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
interface PopoverHost {
|
|
50
|
-
openId: string | null;
|
|
51
|
-
toggle: (id: string) => void;
|
|
52
|
-
close: () => void;
|
|
53
|
-
}
|
|
54
|
-
declare function usePopoverHost(): PopoverHost;
|
|
30
|
+
declare function AchievementUnlockList<Seat extends number>({ unlocks, seats, owners, tierColors, fg: fgOverride, style }: Props$4<Seat>): react.JSX.Element | null;
|
|
55
31
|
|
|
56
32
|
interface MenuOption<T extends string | number> {
|
|
57
33
|
value: T;
|
|
@@ -77,7 +53,7 @@ interface MultiSelectSection<T extends string | number> {
|
|
|
77
53
|
allClear?: boolean;
|
|
78
54
|
}
|
|
79
55
|
type MenuSection = SingleSelectSection<any> | MultiSelectSection<any>;
|
|
80
|
-
interface Props$
|
|
56
|
+
interface Props$3 {
|
|
81
57
|
id: string;
|
|
82
58
|
host: PopoverHost;
|
|
83
59
|
icon: string;
|
|
@@ -97,7 +73,7 @@ interface Props$6 {
|
|
|
97
73
|
clear: string;
|
|
98
74
|
};
|
|
99
75
|
}
|
|
100
|
-
declare function SectionedDropdown({ id, host, icon, accessibilityLabel, sections, accentColor, mutedColor, onAccentColor, dark, align: forcedAlign, alignOverride, rotation: rotationOverride, autoDismiss, labelFontFamily, allClearLabels }: Props$
|
|
76
|
+
declare function SectionedDropdown({ id, host, icon, accessibilityLabel, sections, accentColor, mutedColor, onAccentColor, dark, align: forcedAlign, alignOverride, rotation: rotationOverride, autoDismiss, labelFontFamily, allClearLabels }: Props$3): react.JSX.Element;
|
|
101
77
|
|
|
102
78
|
interface ControlSchemePickerProps<T extends string | number> {
|
|
103
79
|
id: string;
|
|
@@ -129,32 +105,6 @@ interface CornerStatusBadgesProps {
|
|
|
129
105
|
}
|
|
130
106
|
declare function CornerStatusBadges({ orientationMode, p1OnRight, p1, p2 }: CornerStatusBadgesProps): react.JSX.Element;
|
|
131
107
|
|
|
132
|
-
declare function getInlineColorPickerContentSize(swatchCount: number, windowWidth: number, columns?: number): {
|
|
133
|
-
width: number;
|
|
134
|
-
height: number;
|
|
135
|
-
};
|
|
136
|
-
interface Props$5 {
|
|
137
|
-
id: string;
|
|
138
|
-
host: PopoverHost;
|
|
139
|
-
value: string;
|
|
140
|
-
onChange: (hex: string) => void;
|
|
141
|
-
previewValue?: (hex: string) => string;
|
|
142
|
-
swatches?: SeedColor[];
|
|
143
|
-
takenValue?: string;
|
|
144
|
-
allowSwapTaken?: boolean;
|
|
145
|
-
dark: boolean;
|
|
146
|
-
align?: 'left' | 'right' | 'center';
|
|
147
|
-
alignOverride?: AlignResult;
|
|
148
|
-
rotation?: PopoverRotation;
|
|
149
|
-
icon?: string;
|
|
150
|
-
tag?: string;
|
|
151
|
-
labelFontFamily?: string;
|
|
152
|
-
autoDismiss?: boolean;
|
|
153
|
-
columns?: number;
|
|
154
|
-
size?: number;
|
|
155
|
-
}
|
|
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;
|
|
157
|
-
|
|
158
108
|
declare const LABELED_DROPDOWN_POPOVER_WIDTH = 180;
|
|
159
109
|
declare function getLabeledDropdownContentHeight(optionCount: number): number;
|
|
160
110
|
interface LabeledDropdownOption<T extends string> {
|
|
@@ -162,7 +112,7 @@ interface LabeledDropdownOption<T extends string> {
|
|
|
162
112
|
label: string;
|
|
163
113
|
icon?: string;
|
|
164
114
|
}
|
|
165
|
-
interface Props$
|
|
115
|
+
interface Props$2<T extends string> {
|
|
166
116
|
id: string;
|
|
167
117
|
host: PopoverHost;
|
|
168
118
|
options: LabeledDropdownOption<T>[];
|
|
@@ -173,9 +123,7 @@ interface Props$4<T extends string> {
|
|
|
173
123
|
align?: 'left' | 'right' | 'center';
|
|
174
124
|
alignOverride?: AlignResult;
|
|
175
125
|
}
|
|
176
|
-
declare function LabeledDropdown<T extends string>({ id, host, options, value, onChange, color, dark, align: forcedAlign, alignOverride }: Props$
|
|
177
|
-
|
|
178
|
-
declare function loadSkiaWeb(): Promise<void>;
|
|
126
|
+
declare function LabeledDropdown<T extends string>({ id, host, options, value, onChange, color, dark, align: forcedAlign, alignOverride }: Props$2<T>): react.JSX.Element;
|
|
179
127
|
|
|
180
128
|
declare function getColorPopoverId(idPrefix: string): string;
|
|
181
129
|
declare function getProfilePopoverId(idPrefix: string): string;
|
|
@@ -215,25 +163,6 @@ interface PlayerSetupPanelProps<C extends string = string> {
|
|
|
215
163
|
}
|
|
216
164
|
declare function PlayerSetupPanel<C extends string = string>({ idPrefix, host, label, labelFontFamily, color, onColorChange, swatches, takenColor, allowSwapTaken, colorCaption, showColor, colorAlignOverride, colorRotation, isHuman, secondPicker, secondPickerId, ready, onToggleReady, dark, showReadyButton, profiles, selectedProfileId, takenProfileId, guestLabel, onProfileSelect, onManageProfiles, cpuDifficulty, cpuDifficultyOptions, onCpuDifficultyChange, humanIcon, cpuIcon }: PlayerSetupPanelProps<C>): react.JSX.Element;
|
|
217
165
|
|
|
218
|
-
interface Props$3 {
|
|
219
|
-
visible: boolean;
|
|
220
|
-
children: ReactNode;
|
|
221
|
-
align?: 'left' | 'right' | 'center';
|
|
222
|
-
verticalAlign?: 'below' | 'above';
|
|
223
|
-
caretColor?: string;
|
|
224
|
-
caretBorderColor?: string;
|
|
225
|
-
caretBorderWidth?: number;
|
|
226
|
-
triggerSize?: number;
|
|
227
|
-
}
|
|
228
|
-
declare function PopoverBody({ visible, children, align, verticalAlign, caretColor, caretBorderColor, caretBorderWidth, triggerSize }: Props$3): react.JSX.Element | null;
|
|
229
|
-
|
|
230
|
-
interface Props$2 {
|
|
231
|
-
active: boolean;
|
|
232
|
-
onPress: () => void;
|
|
233
|
-
style?: StyleProp<ViewStyle>;
|
|
234
|
-
}
|
|
235
|
-
declare function PressAwayOverlay({ active, onPress, style }: Props$2): react.JSX.Element | null;
|
|
236
|
-
|
|
237
166
|
interface Props$1 {
|
|
238
167
|
color: string;
|
|
239
168
|
ready: boolean;
|
|
@@ -279,4 +208,4 @@ declare function useQuitConfirmation(hasProgress: () => boolean, onConfirmedBack
|
|
|
279
208
|
|
|
280
209
|
declare function useZoneClampedAlign(open: boolean, contentWidth: number, contentHeight: number, rotation?: PopoverRotation): ReturnType<typeof useAutoAlign>;
|
|
281
210
|
|
|
282
|
-
export { AchievementUnlockList, type AchievementUnlockOwner,
|
|
211
|
+
export { AchievementUnlockList, type AchievementUnlockOwner, AlignResult, ControlSchemePicker, type ControlSchemePickerProps, type CornerStatusBadgeSeat, CornerStatusBadges, type CornerStatusBadgesProps, LABELED_DROPDOWN_POPOVER_WIDTH, LabeledDropdown, type LabeledDropdownOption, type MenuOption, type MenuSection, type MultiSelectSection, type OrientationMode, PlayerSetupPanel, type PlayerSetupPanelProps, PopoverHost, PopoverRotation, type QuitConfirmation, ReadyButton, SectionedDropdown, SharedActionBand, type SingleSelectSection, TriggerGaugeHost, type TriggerGaugeProps, type UnlockedAchievement, getColorPopoverId, getCpuDifficultyPopoverId, getLabeledDropdownContentHeight, getProfilePopoverId, useAutoAlign, useQuitConfirmation, useZoneClampedAlign };
|