@tastic/hud 0.8.2 → 0.8.3
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 +33 -5
- package/dist/index.d.ts +33 -5
- package/dist/index.js +158 -154
- package/dist/index.mjs +83 -81
- package/package.json +2 -2
- package/src/BaseSettingsDialog.tsx +8 -28
- package/src/BaseStatsScreen.tsx +2 -2
- package/src/ConfirmDialog.tsx +18 -31
- package/src/index.ts +1 -0
- package/src/overlayCard.ts +48 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, RefObject } from 'react';
|
|
3
|
-
import { StyleProp, ViewStyle, View } from 'react-native';
|
|
4
3
|
import { ViewRotation } from '@tastic/core';
|
|
4
|
+
import { StyleProp, ViewStyle, View } from 'react-native';
|
|
5
5
|
import { SeedColor } from '@rific/auto-paper';
|
|
6
6
|
export { SkiaGate, SkiaGateProps } from './SkiaGate.mjs';
|
|
7
7
|
|
|
@@ -24,7 +24,7 @@ declare function AchievementRow({ icon, title, description, badgeColor, unlocked
|
|
|
24
24
|
interface BaseSettingsDialogProps {
|
|
25
25
|
visible: boolean;
|
|
26
26
|
onDismiss: () => void;
|
|
27
|
-
rotation?:
|
|
27
|
+
rotation?: ViewRotation;
|
|
28
28
|
version: string | number;
|
|
29
29
|
lockOrientation?: boolean;
|
|
30
30
|
onLockOrientationChange?: (value: boolean) => void;
|
|
@@ -41,7 +41,7 @@ declare function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOver
|
|
|
41
41
|
|
|
42
42
|
type MD3TextVariant = 'displayLarge' | 'displayMedium' | 'displaySmall' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'titleLarge' | 'titleMedium' | 'titleSmall' | 'labelLarge' | 'labelMedium' | 'labelSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall';
|
|
43
43
|
interface Props$b {
|
|
44
|
-
rotation?:
|
|
44
|
+
rotation?: ViewRotation;
|
|
45
45
|
title?: string;
|
|
46
46
|
titleVariant?: MD3TextVariant;
|
|
47
47
|
onBack: () => void;
|
|
@@ -69,7 +69,7 @@ interface ConfirmDialogProps {
|
|
|
69
69
|
cancelLabel: string;
|
|
70
70
|
onConfirm: () => void;
|
|
71
71
|
onCancel: () => void;
|
|
72
|
-
rotation?:
|
|
72
|
+
rotation?: ViewRotation;
|
|
73
73
|
icon?: string;
|
|
74
74
|
destructive?: boolean;
|
|
75
75
|
}
|
|
@@ -241,6 +241,34 @@ declare function LabeledDropdown<T extends string>({ id, host, options, value, o
|
|
|
241
241
|
|
|
242
242
|
declare function loadSkiaWeb(): Promise<void>;
|
|
243
243
|
|
|
244
|
+
interface OverlayCardColors {
|
|
245
|
+
fg: string;
|
|
246
|
+
fgMuted: string;
|
|
247
|
+
cardBg: string;
|
|
248
|
+
cardBorder: string;
|
|
249
|
+
}
|
|
250
|
+
declare function getOverlayCardColors(dark: boolean): OverlayCardColors;
|
|
251
|
+
declare const overlayStyles: {
|
|
252
|
+
card: {
|
|
253
|
+
alignItems: "center";
|
|
254
|
+
borderRadius: number;
|
|
255
|
+
borderWidth: number;
|
|
256
|
+
gap: number;
|
|
257
|
+
maxWidth: number;
|
|
258
|
+
padding: number;
|
|
259
|
+
};
|
|
260
|
+
overlay: {
|
|
261
|
+
alignItems: "center";
|
|
262
|
+
backgroundColor: string;
|
|
263
|
+
bottom: number;
|
|
264
|
+
justifyContent: "center";
|
|
265
|
+
left: number;
|
|
266
|
+
position: "absolute";
|
|
267
|
+
right: number;
|
|
268
|
+
top: number;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
|
|
244
272
|
interface Props$5 {
|
|
245
273
|
visible: boolean;
|
|
246
274
|
children: ReactNode;
|
|
@@ -309,4 +337,4 @@ interface TriggerGaugeProps {
|
|
|
309
337
|
|
|
310
338
|
declare function TriggerGaugeHost(props: TriggerGaugeProps): react.JSX.Element;
|
|
311
339
|
|
|
312
|
-
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 PopoverAlign, PopoverBody, type PopoverHost, type PopoverRotation, type PopoverVerticalAlign, PressAwayOverlay, ReadyButton, SectionedDropdown, SharedActionBand, type SingleSelectSection, StatRow, StatSection, TriggerGaugeHost, type TriggerGaugeProps, getLabeledDropdownContentHeight, loadSkiaWeb, useAutoAlign, usePopoverHost };
|
|
340
|
+
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, getLabeledDropdownContentHeight, getOverlayCardColors, loadSkiaWeb, overlayStyles, useAutoAlign, usePopoverHost };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, RefObject } from 'react';
|
|
3
|
-
import { StyleProp, ViewStyle, View } from 'react-native';
|
|
4
3
|
import { ViewRotation } from '@tastic/core';
|
|
4
|
+
import { StyleProp, ViewStyle, View } from 'react-native';
|
|
5
5
|
import { SeedColor } from '@rific/auto-paper';
|
|
6
6
|
export { SkiaGate, SkiaGateProps } from './SkiaGate.js';
|
|
7
7
|
|
|
@@ -24,7 +24,7 @@ declare function AchievementRow({ icon, title, description, badgeColor, unlocked
|
|
|
24
24
|
interface BaseSettingsDialogProps {
|
|
25
25
|
visible: boolean;
|
|
26
26
|
onDismiss: () => void;
|
|
27
|
-
rotation?:
|
|
27
|
+
rotation?: ViewRotation;
|
|
28
28
|
version: string | number;
|
|
29
29
|
lockOrientation?: boolean;
|
|
30
30
|
onLockOrientationChange?: (value: boolean) => void;
|
|
@@ -41,7 +41,7 @@ declare function BaseSettingsDialog({ visible, onDismiss, rotation: rotationOver
|
|
|
41
41
|
|
|
42
42
|
type MD3TextVariant = 'displayLarge' | 'displayMedium' | 'displaySmall' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'titleLarge' | 'titleMedium' | 'titleSmall' | 'labelLarge' | 'labelMedium' | 'labelSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall';
|
|
43
43
|
interface Props$b {
|
|
44
|
-
rotation?:
|
|
44
|
+
rotation?: ViewRotation;
|
|
45
45
|
title?: string;
|
|
46
46
|
titleVariant?: MD3TextVariant;
|
|
47
47
|
onBack: () => void;
|
|
@@ -69,7 +69,7 @@ interface ConfirmDialogProps {
|
|
|
69
69
|
cancelLabel: string;
|
|
70
70
|
onConfirm: () => void;
|
|
71
71
|
onCancel: () => void;
|
|
72
|
-
rotation?:
|
|
72
|
+
rotation?: ViewRotation;
|
|
73
73
|
icon?: string;
|
|
74
74
|
destructive?: boolean;
|
|
75
75
|
}
|
|
@@ -241,6 +241,34 @@ declare function LabeledDropdown<T extends string>({ id, host, options, value, o
|
|
|
241
241
|
|
|
242
242
|
declare function loadSkiaWeb(): Promise<void>;
|
|
243
243
|
|
|
244
|
+
interface OverlayCardColors {
|
|
245
|
+
fg: string;
|
|
246
|
+
fgMuted: string;
|
|
247
|
+
cardBg: string;
|
|
248
|
+
cardBorder: string;
|
|
249
|
+
}
|
|
250
|
+
declare function getOverlayCardColors(dark: boolean): OverlayCardColors;
|
|
251
|
+
declare const overlayStyles: {
|
|
252
|
+
card: {
|
|
253
|
+
alignItems: "center";
|
|
254
|
+
borderRadius: number;
|
|
255
|
+
borderWidth: number;
|
|
256
|
+
gap: number;
|
|
257
|
+
maxWidth: number;
|
|
258
|
+
padding: number;
|
|
259
|
+
};
|
|
260
|
+
overlay: {
|
|
261
|
+
alignItems: "center";
|
|
262
|
+
backgroundColor: string;
|
|
263
|
+
bottom: number;
|
|
264
|
+
justifyContent: "center";
|
|
265
|
+
left: number;
|
|
266
|
+
position: "absolute";
|
|
267
|
+
right: number;
|
|
268
|
+
top: number;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
|
|
244
272
|
interface Props$5 {
|
|
245
273
|
visible: boolean;
|
|
246
274
|
children: ReactNode;
|
|
@@ -309,4 +337,4 @@ interface TriggerGaugeProps {
|
|
|
309
337
|
|
|
310
338
|
declare function TriggerGaugeHost(props: TriggerGaugeProps): react.JSX.Element;
|
|
311
339
|
|
|
312
|
-
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 PopoverAlign, PopoverBody, type PopoverHost, type PopoverRotation, type PopoverVerticalAlign, PressAwayOverlay, ReadyButton, SectionedDropdown, SharedActionBand, type SingleSelectSection, StatRow, StatSection, TriggerGaugeHost, type TriggerGaugeProps, getLabeledDropdownContentHeight, loadSkiaWeb, useAutoAlign, usePopoverHost };
|
|
340
|
+
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, getLabeledDropdownContentHeight, getOverlayCardColors, loadSkiaWeb, overlayStyles, useAutoAlign, usePopoverHost };
|