@threenative/ui 0.1.12 → 0.2.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +7 -8
  2. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -1,17 +1,16 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { Game } from '@threenative/core';
2
+ import { IGame } from '@threenative/core';
3
3
 
4
- interface GameCanvasProps<TState extends Record<string, unknown> = Record<string, unknown>, TPhysics = undefined> {
4
+ interface IGameCanvasProps<TState extends Record<string, unknown> = Record<string, unknown>, TPhysics = undefined> {
5
5
  className?: string;
6
- game: Game<TState, TPhysics>;
6
+ game: IGame<TState, TPhysics>;
7
7
  }
8
- declare function GameCanvas<TState extends Record<string, unknown>, TPhysics>({ className, game, }: GameCanvasProps<TState, TPhysics>): react_jsx_runtime.JSX.Element;
8
+ declare function GameCanvas<TState extends Record<string, unknown>, TPhysics>({ className, game, }: IGameCanvasProps<TState, TPhysics>): react_jsx_runtime.JSX.Element;
9
9
 
10
- type DebugSnapshot = Record<string, Record<string, unknown>>;
11
10
  declare function DebugOverlay(): react_jsx_runtime.JSX.Element | null;
12
11
 
13
12
  type GameSelector<TState, TSelected> = (state: TState) => TSelected;
14
- declare function useGameState<TState extends Record<string, unknown>, TPhysics, TSelected>(game: Game<TState, TPhysics>, selector: GameSelector<TState, TSelected>): TSelected;
15
- declare function useGameState<TState extends Record<string, unknown>, TPhysics>(game: Game<TState, TPhysics>): TState;
13
+ declare function useGameState<TState extends Record<string, unknown>, TPhysics, TSelected>(game: IGame<TState, TPhysics>, selector: GameSelector<TState, TSelected>): TSelected;
14
+ declare function useGameState<TState extends Record<string, unknown>, TPhysics>(game: IGame<TState, TPhysics>): TState;
16
15
 
17
- export { DebugOverlay, type DebugSnapshot, GameCanvas, type GameCanvasProps, useGameState };
16
+ export { DebugOverlay, GameCanvas, useGameState };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threenative/ui",
3
- "version": "0.1.12",
3
+ "version": "0.2.1",
4
4
  "description": "React bindings for mounting a ThreeNative game and reading throttled state.",
5
5
  "type": "module",
6
6
  "files": [
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "sideEffects": false,
23
23
  "peerDependencies": {
24
- "@threenative/core": ">=0.1.0 <0.2.0",
24
+ "@threenative/core": ">=0.2.0 <0.3.0",
25
25
  "react": ">=19.2.0 <20",
26
26
  "react-dom": ">=19.2.0 <20"
27
27
  },
@@ -35,7 +35,7 @@
35
35
  "react-test-renderer": "19.2.0",
36
36
  "tsup": "8.5.1",
37
37
  "typescript": "5.9.3",
38
- "@threenative/core": "0.1.0"
38
+ "@threenative/core": "0.2.0"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsup --config tsup.config.ts && publint",