@tastic/hud 0.25.0 → 0.25.1

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.
@@ -149,13 +149,7 @@ interface AlignResult {
149
149
  triggerRef: RefObject<ViewInstance | null>;
150
150
  }
151
151
  type ViewInstance = ComponentRef<typeof View>;
152
- declare function useAutoAlign(open: boolean, contentWidth: number, contentHeight: number, rotation?: PopoverRotation, bounds?: RefObject<ViewInstance | null>): {
153
- align: PopoverAlign;
154
- maxHeight: number;
155
- measured: boolean;
156
- triggerRef: RefObject<View | null>;
157
- verticalAlign: PopoverVerticalAlign;
158
- };
152
+ declare function useAutoAlign(open: boolean, contentWidth: number, contentHeight: number, rotation?: PopoverRotation, bounds?: RefObject<ViewInstance | null>): AlignResult;
159
153
 
160
154
  interface PopoverHost {
161
155
  openId: string | null;
@@ -149,13 +149,7 @@ interface AlignResult {
149
149
  triggerRef: RefObject<ViewInstance | null>;
150
150
  }
151
151
  type ViewInstance = ComponentRef<typeof View>;
152
- declare function useAutoAlign(open: boolean, contentWidth: number, contentHeight: number, rotation?: PopoverRotation, bounds?: RefObject<ViewInstance | null>): {
153
- align: PopoverAlign;
154
- maxHeight: number;
155
- measured: boolean;
156
- triggerRef: RefObject<View | null>;
157
- verticalAlign: PopoverVerticalAlign;
158
- };
152
+ declare function useAutoAlign(open: boolean, contentWidth: number, contentHeight: number, rotation?: PopoverRotation, bounds?: RefObject<ViewInstance | null>): AlignResult;
159
153
 
160
154
  interface PopoverHost {
161
155
  openId: string | null;
package/dist/index.mjs CHANGED
@@ -25,10 +25,6 @@ import {
25
25
  usePopoverHost,
26
26
  useWellColors
27
27
  } from "./chunk-AJD4FMG5.mjs";
28
- import {
29
- loadSkiaWeb,
30
- locateSkiaWebFile
31
- } from "./chunk-3TCJHMJP.mjs";
32
28
  import {
33
29
  COMPACT_DIALOG_HEIGHT,
34
30
  DialogHeader,
@@ -40,6 +36,10 @@ import {
40
36
  overlayStyles,
41
37
  useOverlayCardColors
42
38
  } from "./chunk-CBH7GQKI.mjs";
39
+ import {
40
+ loadSkiaWeb,
41
+ locateSkiaWebFile
42
+ } from "./chunk-3TCJHMJP.mjs";
43
43
 
44
44
  // src/AchievementUnlockList.tsx
45
45
  import { getContrastColor, useAutoPaperTheme } from "@rific/auto-paper";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tastic/hud",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "description": "Visual component kit for local-multiplayer React Native games: inline (non-modal) popovers, dropdowns, color pickers, gauges, ready buttons, and dialogs, built to stay scoped to one player's own zone on a shared screen",
5
5
  "keywords": [
6
6
  "react-native",
@@ -104,7 +104,10 @@ export function rotateRect(x: number, y: number, width: number, height: number,
104
104
  // column in a wide window). With it the room on every side is measured to the bounds' edges
105
105
  // instead of the window's (measured and rotated the same way as the trigger). Omit it for the
106
106
  // window, as before.
107
- export function useAutoAlign(open: boolean, contentWidth: number, contentHeight: number, rotation: PopoverRotation = 0, bounds?: RefObject<ViewInstance | null>) {
107
+ // Annotated as AlignResult rather than inferred: the declaration build prints an inferred ref type
108
+ // with the legacy types' name for it (`RefObject<View>`), which the strict types read as a ref to
109
+ // the View function.
110
+ export function useAutoAlign(open: boolean, contentWidth: number, contentHeight: number, rotation: PopoverRotation = 0, bounds?: RefObject<ViewInstance | null>): AlignResult {
108
111
  const triggerRef = useRef<ViewInstance>(null)
109
112
  const { width: windowWidth, height: windowHeight } = useWindowDimensions()
110
113
  const [align, setAlign] = useState<PopoverAlign>('center')