@pkhex-everywhere/react 0.6.0 → 0.7.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.
- package/CHANGELOG.md +23 -0
- package/dist/generated/hooks.d.ts +6 -0
- package/dist/index.js +6 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @pkhex-everywhere/react
|
|
2
2
|
|
|
3
|
+
## 0.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [56d8b03]
|
|
8
|
+
- @pkhex-everywhere/engine@0.7.1
|
|
9
|
+
|
|
10
|
+
## 0.7.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- de5202d: New `game.enableFormat(id)` turns on a save format the host registered off. Until then, `game.formats()` leaves it out, `game.load()` with its id fails with `not-found`, and a save it recognizes fails with `invalid-save`.
|
|
15
|
+
- Updated dependencies [de5202d]
|
|
16
|
+
- Updated dependencies [344875d]
|
|
17
|
+
- Updated dependencies [4118f50]
|
|
18
|
+
- Updated dependencies [5cd1cac]
|
|
19
|
+
- Updated dependencies [e850702]
|
|
20
|
+
- Updated dependencies [3bbcace]
|
|
21
|
+
- Updated dependencies [4888600]
|
|
22
|
+
- Updated dependencies [fda0ba5]
|
|
23
|
+
- Updated dependencies [563b057]
|
|
24
|
+
- @pkhex-everywhere/engine@0.7.0
|
|
25
|
+
|
|
3
26
|
## 0.6.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -19,6 +19,12 @@ export declare function useEvents(): {
|
|
|
19
19
|
};
|
|
20
20
|
export declare function useLoadedGame(): {
|
|
21
21
|
close: () => Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Turns on a save format that's registered off, such as a ROM hack that hasn't been validated yet. Until then, `game.formats()` leaves it out and a save it recognizes fails with `invalid-save`.
|
|
24
|
+
*
|
|
25
|
+
* @param id The format's id. An unknown id fails with `not-found`.
|
|
26
|
+
*/
|
|
27
|
+
enableFormat: (id: string) => Promise<void>;
|
|
22
28
|
/** Requires a loaded save; throws `no-save` otherwise. Wrap in `<RequireGame>`. */
|
|
23
29
|
export: () => Promise<import("@pkhex-everywhere/engine").ExportedSave>;
|
|
24
30
|
file: () => Promise<import("@pkhex-everywhere/engine").LoadedSave | null>;
|
package/dist/index.js
CHANGED
|
@@ -162,6 +162,12 @@ function useLoadedGame() {
|
|
|
162
162
|
game: useQuery("game.get"),
|
|
163
163
|
...useMemo(() => ({
|
|
164
164
|
close: () => engine.game.close(),
|
|
165
|
+
/**
|
|
166
|
+
* Turns on a save format that's registered off, such as a ROM hack that hasn't been validated yet. Until then, `game.formats()` leaves it out and a save it recognizes fails with `invalid-save`.
|
|
167
|
+
*
|
|
168
|
+
* @param id The format's id. An unknown id fails with `not-found`.
|
|
169
|
+
*/
|
|
170
|
+
enableFormat: (id) => engine.game.enableFormat(id),
|
|
165
171
|
/** Requires a loaded save; throws `no-save` otherwise. Wrap in `<RequireGame>`. */
|
|
166
172
|
export: () => engine.game.export(),
|
|
167
173
|
file: () => engine.game.file(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pkhex-everywhere/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "React hooks for @pkhex-everywhere/engine.",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"homepage": "https://docs.pkhex-everywhere.fyi/docs/",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test": "vitest run"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@pkhex-everywhere/engine": "^0.
|
|
33
|
+
"@pkhex-everywhere/engine": "^0.7.1",
|
|
34
34
|
"react": "^19.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|