@manybitsbyte/nesplayer-svelte 0.8.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.
@@ -0,0 +1,42 @@
1
+ type GamepadInfo = {
2
+ id: string;
3
+ index: number;
4
+ name: string;
5
+ };
6
+ type GamepadProfile = {
7
+ id: string;
8
+ buttonMap: Record<number, number>;
9
+ quickSaveBtn?: number | null;
10
+ quickLoadBtn?: number | null;
11
+ };
12
+ type PlayerInput = {
13
+ type: 'keyboard';
14
+ } | {
15
+ type: 'gamepad';
16
+ id: string;
17
+ } | {
18
+ type: 'none';
19
+ };
20
+ interface Props {
21
+ defaultKeyMap: Record<string, number>;
22
+ defaultGamepadButtonMap: Record<number, number>;
23
+ detectedGamepads: GamepadInfo[];
24
+ gamepadProfiles: GamepadProfile[];
25
+ player1Input: PlayerInput;
26
+ player2Input: PlayerInput;
27
+ player1KeyMap: Record<string, number>;
28
+ player2KeyMap: Record<string, number>;
29
+ quickSaveKey: string;
30
+ quickLoadKey: string;
31
+ onquicksavekeychange: (key: string) => void;
32
+ onquickloadkeychange: (key: string) => void;
33
+ onplayer1inputchange: (v: PlayerInput) => void;
34
+ onplayer2inputchange: (v: PlayerInput) => void;
35
+ onplayer1keymapchange: (m: Record<string, number>) => void;
36
+ onplayer2keymapchange: (m: Record<string, number>) => void;
37
+ ongpprofilechange: (p: GamepadProfile) => void;
38
+ onclose: () => void;
39
+ }
40
+ declare const ControllerPanel: import("svelte").Component<Props, {}, "">;
41
+ type ControllerPanel = ReturnType<typeof ControllerPanel>;
42
+ export default ControllerPanel;