@noya-app/noya-multiplayer-react 0.1.87 → 0.1.89
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/.turbo/turbo-build.log +11 -11
- package/CHANGELOG.md +17 -0
- package/dist/index.bundle.js +29 -25
- package/dist/index.d.mts +124 -4
- package/dist/index.d.ts +124 -4
- package/dist/index.js +73 -46
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +73 -46
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/useResourceUrl.ts +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noya-app/noya-multiplayer-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.89",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"dev": "npm run build -- --watch"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@noya-app/state-manager": "0.
|
|
14
|
+
"@noya-app/state-manager": "0.2.0",
|
|
15
15
|
"@noya-app/emitter": "0.1.0",
|
|
16
16
|
"@noya-app/observable": "0.1.12",
|
|
17
17
|
"@noya-app/task-runner": "0.1.7",
|
|
18
|
-
"@noya-app/react-utils": "0.1.
|
|
18
|
+
"@noya-app/react-utils": "0.1.31",
|
|
19
19
|
"react-inspector": "6.0.2"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
package/src/useResourceUrl.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { getResourceUrl } from "@noya-app/state-manager";
|
|
3
|
+
import { getResourceUrl, ResourceUrlOptions } from "@noya-app/state-manager";
|
|
4
4
|
import { useAnyNoyaStateContext } from "./NoyaStateContext";
|
|
5
5
|
import { useObservable } from "./useObservable";
|
|
6
6
|
|
|
7
7
|
export function useResourceUrl(
|
|
8
|
-
idOrStableId: string | undefined
|
|
8
|
+
idOrStableId: string | undefined,
|
|
9
|
+
options?: ResourceUrlOptions
|
|
9
10
|
): string | undefined {
|
|
10
11
|
const { noyaManager } = useAnyNoyaStateContext();
|
|
11
12
|
const resources = useObservable(
|
|
@@ -15,5 +16,5 @@ export function useResourceUrl(
|
|
|
15
16
|
|
|
16
17
|
if (!idOrStableId) return undefined;
|
|
17
18
|
|
|
18
|
-
return getResourceUrl(idOrStableId, resources, assets);
|
|
19
|
+
return getResourceUrl(idOrStableId, resources, assets, options);
|
|
19
20
|
}
|