react-native-wgpu 0.5.15 → 0.5.16
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/lib/typescript/webgpu/src/Canvas.d.ts +5 -0
- package/lib/typescript/webgpu/src/Canvas.d.ts.map +1 -1
- package/lib/typescript/webgpu/src/GPUDeviceProvider.d.ts +15 -0
- package/lib/typescript/webgpu/src/GPUDeviceProvider.d.ts.map +1 -0
- package/lib/typescript/webgpu/src/constants.d.ts.map +1 -1
- package/lib/typescript/webgpu/src/hooks.d.ts +2 -17
- package/lib/typescript/webgpu/src/hooks.d.ts.map +1 -1
- package/lib/typescript/webgpu/src/main/index.d.ts +1 -0
- package/lib/typescript/webgpu/src/main/index.d.ts.map +1 -1
- package/lib/typescript/webgpu/src/types.d.ts +5 -0
- package/lib/typescript/webgpu/src/types.d.ts.map +1 -1
- package/package.json +5 -3
|
@@ -7,6 +7,11 @@ export interface NativeCanvas {
|
|
|
7
7
|
height: number;
|
|
8
8
|
clientWidth: number;
|
|
9
9
|
clientHeight: number;
|
|
10
|
+
addEventListener(type: string, listener: EventListener): void;
|
|
11
|
+
removeEventListener(type: string, listener: EventListener): void;
|
|
12
|
+
dispatchEvent(event: Event): void;
|
|
13
|
+
setPointerCapture(pointerId: number): void;
|
|
14
|
+
releasePointerCapture(pointerId: number): void;
|
|
10
15
|
}
|
|
11
16
|
export type RNCanvasContext = GPUCanvasContext & {
|
|
12
17
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Canvas.d.ts","sourceRoot":"","sources":["../../../../../webgpu/src/Canvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgD,MAAM,OAAO,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAU9C,KAAK,cAAc,GAAG,MAAM,CAAC;AAE7B,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,MAAM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SAAS,CAAC,CAAC;CAC5B;AAED,eAAO,MAAM,MAAM,GAAI,gCAAgC,WAAW,sBAuCjE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
interface DeviceContextValue {
|
|
4
|
+
device: GPUDevice | null;
|
|
5
|
+
adapter: GPUAdapter | null;
|
|
6
|
+
}
|
|
7
|
+
interface DeviceProviderProps {
|
|
8
|
+
children?: ReactNode | ReactNode[];
|
|
9
|
+
adapterOptions?: GPURequestAdapterOptions;
|
|
10
|
+
deviceDescriptor?: GPUDeviceDescriptor;
|
|
11
|
+
}
|
|
12
|
+
export declare const GPUDeviceProvider: ({ children, adapterOptions, deviceDescriptor, }: DeviceProviderProps) => React.JSX.Element | null;
|
|
13
|
+
export declare const useMainDevice: () => DeviceContextValue;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=GPUDeviceProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GPUDeviceProvider.d.ts","sourceRoot":"","sources":["../../../../../webgpu/src/GPUDeviceProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,UAAU,kBAAkB;IAC1B,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;CAC5B;AAID,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;IACnC,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAC1C,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;CACxC;AAED,eAAO,MAAM,iBAAiB,GAAI,iDAI/B,mBAAmB,6BAQrB,CAAC;AAEF,eAAO,MAAM,aAAa,0BAMzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../webgpu/src/constants.ts"],"names":[],"mappings":"AA4BA,eAAO,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../webgpu/src/constants.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAQ,cAAc,gBAAe,CAAC;AAE7C,eAAO,MAAQ,eAAe,iBAAe,CAAC;AAE9C,eAAO,MAAQ,cAAc,gBAAe,CAAC;AAE7C,eAAO,MAAQ,aAAa,eAAe,CAAC;AAE5C,eAAO,MAAQ,UAAU,YAAe,CAAC"}
|
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
1
|
import type { CanvasRef, NativeCanvas } from "./Canvas";
|
|
4
2
|
export declare const warnIfNotHardwareAccelerated: (adapter: GPUAdapter) => void;
|
|
5
|
-
interface DeviceContext {
|
|
6
|
-
device: GPUDevice | null;
|
|
7
|
-
adapter: GPUAdapter | null;
|
|
8
|
-
}
|
|
9
|
-
declare const DeviceContext: React.Context<DeviceContext | null>;
|
|
10
|
-
interface DeviceProviderProps {
|
|
11
|
-
children?: ReactNode | ReactNode[];
|
|
12
|
-
adapterOptions?: GPURequestAdapterOptions;
|
|
13
|
-
deviceDescriptor?: GPUDeviceDescriptor;
|
|
14
|
-
}
|
|
15
|
-
export declare const GPUDeviceProvider: ({ children, adapterOptions, deviceDescriptor, }: DeviceProviderProps) => React.JSX.Element | null;
|
|
16
3
|
export declare const useSurface: () => {
|
|
17
|
-
ref:
|
|
4
|
+
ref: import("react").RefObject<CanvasRef>;
|
|
18
5
|
surface: NativeCanvas | null;
|
|
19
6
|
};
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const useCanvasRef: () => React.RefObject<CanvasRef>;
|
|
7
|
+
export declare const useCanvasRef: () => import("react").RefObject<CanvasRef>;
|
|
22
8
|
export declare const useDevice: (adapterOptions?: GPURequestAdapterOptions, deviceDescriptor?: GPUDeviceDescriptor) => {
|
|
23
9
|
adapter: GPUAdapter | null;
|
|
24
10
|
device: GPUDevice | null;
|
|
25
11
|
};
|
|
26
|
-
export {};
|
|
27
12
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../webgpu/src/hooks.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../webgpu/src/hooks.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,4BAA4B,GAAI,SAAS,UAAU,SAQ/D,CAAC;AAOF,eAAO,MAAM,UAAU;;;CAQtB,CAAC;AAEF,eAAO,MAAM,YAAY,4CAAgC,CAAC;AAE1D,eAAO,MAAM,SAAS,GACpB,iBAAiB,wBAAwB,EACzC,mBAAmB,mBAAmB;;;CAqBvC,CAAC"}
|
|
@@ -2,5 +2,6 @@ export * from "../Canvas";
|
|
|
2
2
|
export * from "../Offscreen";
|
|
3
3
|
export * from "../WebGPUViewNativeComponent";
|
|
4
4
|
export * from "../hooks";
|
|
5
|
+
export * from "../GPUDeviceProvider";
|
|
5
6
|
export { default as WebGPUModule } from "../NativeWebGPUModule";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../webgpu/src/main/index.tsx"],"names":[],"mappings":"AAGA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../webgpu/src/main/index.tsx"],"names":[],"mappings":"AAGA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AAErC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -5,6 +5,11 @@ export interface NativeCanvas {
|
|
|
5
5
|
height: number;
|
|
6
6
|
clientWidth: number;
|
|
7
7
|
clientHeight: number;
|
|
8
|
+
addEventListener(type: string, listener: EventListener): void;
|
|
9
|
+
removeEventListener(type: string, listener: EventListener): void;
|
|
10
|
+
dispatchEvent(event: Event): void;
|
|
11
|
+
setPointerCapture(pointerId: number): void;
|
|
12
|
+
releasePointerCapture(pointerId: number): void;
|
|
8
13
|
}
|
|
9
14
|
export type RNCanvasContext = GPUCanvasContext & {
|
|
10
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../webgpu/src/types.ts"],"names":[],"mappings":"AAAA,KAAK,cAAc,GAAG,MAAM,CAAC;AAE7B,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../webgpu/src/types.ts"],"names":[],"mappings":"AAAA,KAAK,cAAc,GAAG,MAAM,CAAC;AAE7B,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IAGrB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IAC9D,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAA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B;IAGvC,IAAI,EAAE,kBAAkB,CAAC;IAGzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,kBAAkB,CAAC;IAIzB,MAAM,EAAE,MAAM,CAAC;CAChB;AAKD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,IAAI,wBAAwB,CAAC;CACpC;AAGD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,cAAc,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAID,MAAM,WAAW,oCAAoC;IACnD,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,mBAAmB,EAAE,CAAC;CAC/B;AAQD,MAAM,WAAW,wBAAwB;IACvC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAMD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,UAAU,CAAC,EAAE,oBAAoB,GAAG,UAAU,CAAC;IAM7D,WAAW,CACT,OAAO,EAAE,UAAU,EACnB,WAAW,EAAE,OAAO,EACpB,MAAM,CAAC,EAAE,mBAAmB,EAAE,GAC7B,IAAI,CAAC;IAGR,SAAS,CAAC,OAAO,EAAE,UAAU,GAAG,oCAAoC,CAAC;CACtE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-wgpu",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.16",
|
|
4
4
|
"description": "Shim that re-exports react-native-webgpu under its previous package name",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -34,10 +34,12 @@
|
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://github.com/wcandillon/react-native-webgpu#readme",
|
|
36
36
|
"publishConfig": {
|
|
37
|
-
"registry": "https://registry.npmjs.org/"
|
|
37
|
+
"registry": "https://registry.npmjs.org/",
|
|
38
|
+
"access": "public",
|
|
39
|
+
"provenance": true
|
|
38
40
|
},
|
|
39
41
|
"dependencies": {
|
|
40
|
-
"react-native-webgpu": "
|
|
42
|
+
"react-native-webgpu": "0.5.16"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
43
45
|
"@types/node": "^20.14.7",
|