@tastic/hud 0.8.1 → 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 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?: number;
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?: number;
44
+ rotation?: ViewRotation;
45
45
  title?: string;
46
46
  titleVariant?: MD3TextVariant;
47
47
  onBack: () => void;
@@ -57,11 +57,9 @@ interface Props$b {
57
57
  resetConfirmBody?: string;
58
58
  fg?: string;
59
59
  bg?: string;
60
- cardBg?: string;
61
- accentColor?: string;
62
60
  children: ReactNode;
63
61
  }
64
- declare function BaseStatsScreen({ rotation: rotationOverride, title, titleVariant, onBack, insets, onReset, resetLabel, resetConfirmTitle, resetConfirmBody, fg: fgOverride, bg: bgOverride, cardBg: cardBgOverride, accentColor: accentColorOverride, children }: Props$b): react.JSX.Element;
62
+ declare function BaseStatsScreen({ rotation: rotationOverride, title, titleVariant, onBack, insets, onReset, resetLabel, resetConfirmTitle, resetConfirmBody, fg: fgOverride, bg: bgOverride, children }: Props$b): react.JSX.Element;
65
63
 
66
64
  interface ConfirmDialogProps {
67
65
  visible: boolean;
@@ -71,7 +69,7 @@ interface ConfirmDialogProps {
71
69
  cancelLabel: string;
72
70
  onConfirm: () => void;
73
71
  onCancel: () => void;
74
- rotation?: number;
72
+ rotation?: ViewRotation;
75
73
  icon?: string;
76
74
  destructive?: boolean;
77
75
  }
@@ -243,6 +241,34 @@ declare function LabeledDropdown<T extends string>({ id, host, options, value, o
243
241
 
244
242
  declare function loadSkiaWeb(): Promise<void>;
245
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
+
246
272
  interface Props$5 {
247
273
  visible: boolean;
248
274
  children: ReactNode;
@@ -311,4 +337,4 @@ interface TriggerGaugeProps {
311
337
 
312
338
  declare function TriggerGaugeHost(props: TriggerGaugeProps): react.JSX.Element;
313
339
 
314
- 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?: number;
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?: number;
44
+ rotation?: ViewRotation;
45
45
  title?: string;
46
46
  titleVariant?: MD3TextVariant;
47
47
  onBack: () => void;
@@ -57,11 +57,9 @@ interface Props$b {
57
57
  resetConfirmBody?: string;
58
58
  fg?: string;
59
59
  bg?: string;
60
- cardBg?: string;
61
- accentColor?: string;
62
60
  children: ReactNode;
63
61
  }
64
- declare function BaseStatsScreen({ rotation: rotationOverride, title, titleVariant, onBack, insets, onReset, resetLabel, resetConfirmTitle, resetConfirmBody, fg: fgOverride, bg: bgOverride, cardBg: cardBgOverride, accentColor: accentColorOverride, children }: Props$b): react.JSX.Element;
62
+ declare function BaseStatsScreen({ rotation: rotationOverride, title, titleVariant, onBack, insets, onReset, resetLabel, resetConfirmTitle, resetConfirmBody, fg: fgOverride, bg: bgOverride, children }: Props$b): react.JSX.Element;
65
63
 
66
64
  interface ConfirmDialogProps {
67
65
  visible: boolean;
@@ -71,7 +69,7 @@ interface ConfirmDialogProps {
71
69
  cancelLabel: string;
72
70
  onConfirm: () => void;
73
71
  onCancel: () => void;
74
- rotation?: number;
72
+ rotation?: ViewRotation;
75
73
  icon?: string;
76
74
  destructive?: boolean;
77
75
  }
@@ -243,6 +241,34 @@ declare function LabeledDropdown<T extends string>({ id, host, options, value, o
243
241
 
244
242
  declare function loadSkiaWeb(): Promise<void>;
245
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
+
246
272
  interface Props$5 {
247
273
  visible: boolean;
248
274
  children: ReactNode;
@@ -311,4 +337,4 @@ interface TriggerGaugeProps {
311
337
 
312
338
  declare function TriggerGaugeHost(props: TriggerGaugeProps): react.JSX.Element;
313
339
 
314
- 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 };