react-native-wgpu 0.4.2 → 0.5.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 (186) hide show
  1. package/README.md +31 -0
  2. package/android/CMakeLists.txt +3 -3
  3. package/cpp/jsi/{RNFEnumMapper.h → EnumMapper.h} +2 -6
  4. package/cpp/jsi/{RNFJSIConverter.h → JSIConverter.h} +27 -110
  5. package/cpp/jsi/NativeObject.h +607 -0
  6. package/cpp/jsi/{RNFPromise.cpp → Promise.cpp} +3 -6
  7. package/cpp/jsi/{RNFPromise.h → Promise.h} +2 -5
  8. package/cpp/jsi/RuntimeAwareCache.cpp +7 -0
  9. package/cpp/jsi/RuntimeAwareCache.h +100 -0
  10. package/cpp/jsi/RuntimeLifecycleMonitor.cpp +72 -0
  11. package/cpp/jsi/RuntimeLifecycleMonitor.h +32 -0
  12. package/cpp/rnwgpu/ArrayBuffer.h +8 -12
  13. package/cpp/rnwgpu/RNWebGPUManager.cpp +187 -28
  14. package/cpp/rnwgpu/RNWebGPUManager.h +7 -0
  15. package/cpp/rnwgpu/api/Canvas.h +14 -12
  16. package/cpp/rnwgpu/api/GPU.cpp +4 -6
  17. package/cpp/rnwgpu/api/GPU.h +13 -11
  18. package/cpp/rnwgpu/api/GPUAdapter.cpp +9 -9
  19. package/cpp/rnwgpu/api/GPUAdapter.h +14 -11
  20. package/cpp/rnwgpu/api/GPUAdapterInfo.h +17 -15
  21. package/cpp/rnwgpu/api/GPUBindGroup.h +11 -10
  22. package/cpp/rnwgpu/api/GPUBindGroupLayout.h +12 -11
  23. package/cpp/rnwgpu/api/GPUBuffer.h +19 -16
  24. package/cpp/rnwgpu/api/GPUCanvasContext.h +17 -13
  25. package/cpp/rnwgpu/api/GPUCommandBuffer.h +12 -10
  26. package/cpp/rnwgpu/api/GPUCommandEncoder.h +35 -32
  27. package/cpp/rnwgpu/api/GPUCompilationInfo.h +19 -19
  28. package/cpp/rnwgpu/api/GPUCompilationMessage.h +10 -7
  29. package/cpp/rnwgpu/api/GPUComputePassEncoder.h +28 -27
  30. package/cpp/rnwgpu/api/GPUComputePipeline.h +14 -13
  31. package/cpp/rnwgpu/api/GPUDevice.cpp +111 -95
  32. package/cpp/rnwgpu/api/GPUDevice.h +51 -43
  33. package/cpp/rnwgpu/api/GPUDeviceLostInfo.h +12 -10
  34. package/cpp/rnwgpu/api/GPUError.h +19 -29
  35. package/cpp/rnwgpu/api/GPUExtent3D.h +7 -10
  36. package/cpp/rnwgpu/api/GPUExternalTexture.h +12 -11
  37. package/cpp/rnwgpu/api/GPUInternalError.h +31 -0
  38. package/cpp/rnwgpu/api/GPUOrigin2D.h +6 -10
  39. package/cpp/rnwgpu/api/GPUOrigin3D.h +6 -10
  40. package/cpp/rnwgpu/api/GPUOutOfMemoryError.h +33 -0
  41. package/cpp/rnwgpu/api/GPUPipelineLayout.h +12 -10
  42. package/cpp/rnwgpu/api/GPUQuerySet.h +14 -12
  43. package/cpp/rnwgpu/api/GPUQueue.h +18 -17
  44. package/cpp/rnwgpu/api/GPURenderBundle.h +11 -10
  45. package/cpp/rnwgpu/api/GPURenderBundleEncoder.h +36 -33
  46. package/cpp/rnwgpu/api/GPURenderPassEncoder.h +49 -47
  47. package/cpp/rnwgpu/api/GPURenderPipeline.h +14 -12
  48. package/cpp/rnwgpu/api/GPUSampler.h +11 -10
  49. package/cpp/rnwgpu/api/GPUShaderModule.cpp +7 -8
  50. package/cpp/rnwgpu/api/GPUShaderModule.h +13 -12
  51. package/cpp/rnwgpu/api/GPUSupportedLimits.h +73 -93
  52. package/cpp/rnwgpu/api/GPUTexture.h +24 -20
  53. package/cpp/rnwgpu/api/GPUTextureView.h +11 -10
  54. package/cpp/rnwgpu/api/GPUValidationError.h +32 -0
  55. package/cpp/rnwgpu/api/ImageBitmap.h +10 -6
  56. package/cpp/rnwgpu/api/RNWebGPU.h +21 -21
  57. package/cpp/rnwgpu/api/descriptors/GPUBindGroupDescriptor.h +3 -7
  58. package/cpp/rnwgpu/api/descriptors/GPUBindGroupEntry.h +7 -11
  59. package/cpp/rnwgpu/api/descriptors/GPUBindGroupLayoutDescriptor.h +3 -7
  60. package/cpp/rnwgpu/api/descriptors/GPUBindGroupLayoutEntry.h +3 -7
  61. package/cpp/rnwgpu/api/descriptors/GPUBlendComponent.h +3 -8
  62. package/cpp/rnwgpu/api/descriptors/GPUBlendState.h +3 -7
  63. package/cpp/rnwgpu/api/descriptors/GPUBufferBinding.h +3 -7
  64. package/cpp/rnwgpu/api/descriptors/GPUBufferBindingLayout.h +3 -8
  65. package/cpp/rnwgpu/api/descriptors/GPUBufferDescriptor.h +3 -8
  66. package/cpp/rnwgpu/api/descriptors/GPUBufferUsage.h +28 -32
  67. package/cpp/rnwgpu/api/descriptors/GPUCanvasConfiguration.h +3 -7
  68. package/cpp/rnwgpu/api/descriptors/GPUColor.h +3 -8
  69. package/cpp/rnwgpu/api/descriptors/GPUColorTargetState.h +3 -7
  70. package/cpp/rnwgpu/api/descriptors/GPUColorWrite.h +18 -20
  71. package/cpp/rnwgpu/api/descriptors/GPUCommandBufferDescriptor.h +3 -8
  72. package/cpp/rnwgpu/api/descriptors/GPUCommandEncoderDescriptor.h +3 -8
  73. package/cpp/rnwgpu/api/descriptors/GPUComputePassDescriptor.h +3 -7
  74. package/cpp/rnwgpu/api/descriptors/GPUComputePassTimestampWrites.h +3 -7
  75. package/cpp/rnwgpu/api/descriptors/GPUComputePipelineDescriptor.h +3 -7
  76. package/cpp/rnwgpu/api/descriptors/GPUDepthStencilState.h +3 -7
  77. package/cpp/rnwgpu/api/descriptors/GPUDeviceDescriptor.h +3 -7
  78. package/cpp/rnwgpu/api/descriptors/GPUExternalTextureBindingLayout.h +3 -8
  79. package/cpp/rnwgpu/api/descriptors/GPUExternalTextureDescriptor.h +3 -7
  80. package/cpp/rnwgpu/api/descriptors/GPUFragmentState.h +3 -7
  81. package/cpp/rnwgpu/api/descriptors/GPUImageCopyBuffer.h +3 -7
  82. package/cpp/rnwgpu/api/descriptors/GPUImageCopyExternalImage.h +3 -7
  83. package/cpp/rnwgpu/api/descriptors/GPUImageCopyTexture.h +3 -7
  84. package/cpp/rnwgpu/api/descriptors/GPUImageCopyTextureTagged.h +3 -7
  85. package/cpp/rnwgpu/api/descriptors/GPUImageDataLayout.h +3 -8
  86. package/cpp/rnwgpu/api/descriptors/GPUMapMode.h +11 -14
  87. package/cpp/rnwgpu/api/descriptors/GPUMultisampleState.h +3 -8
  88. package/cpp/rnwgpu/api/descriptors/GPUPipelineLayoutDescriptor.h +3 -7
  89. package/cpp/rnwgpu/api/descriptors/GPUPrimitiveState.h +3 -8
  90. package/cpp/rnwgpu/api/descriptors/GPUProgrammableStage.h +3 -7
  91. package/cpp/rnwgpu/api/descriptors/GPUQuerySetDescriptor.h +3 -8
  92. package/cpp/rnwgpu/api/descriptors/GPUQueueDescriptor.h +3 -8
  93. package/cpp/rnwgpu/api/descriptors/GPURenderBundleDescriptor.h +3 -8
  94. package/cpp/rnwgpu/api/descriptors/GPURenderBundleEncoderDescriptor.h +3 -8
  95. package/cpp/rnwgpu/api/descriptors/GPURenderPassColorAttachment.h +3 -7
  96. package/cpp/rnwgpu/api/descriptors/GPURenderPassDepthStencilAttachment.h +3 -7
  97. package/cpp/rnwgpu/api/descriptors/GPURenderPassDescriptor.h +3 -7
  98. package/cpp/rnwgpu/api/descriptors/GPURenderPassTimestampWrites.h +3 -7
  99. package/cpp/rnwgpu/api/descriptors/GPURenderPipelineDescriptor.h +3 -7
  100. package/cpp/rnwgpu/api/descriptors/GPURequestAdapterOptions.h +3 -8
  101. package/cpp/rnwgpu/api/descriptors/GPUSamplerBindingLayout.h +3 -8
  102. package/cpp/rnwgpu/api/descriptors/GPUSamplerDescriptor.h +3 -8
  103. package/cpp/rnwgpu/api/descriptors/GPUShaderModuleCompilationHint.h +3 -7
  104. package/cpp/rnwgpu/api/descriptors/GPUShaderModuleDescriptor.h +3 -7
  105. package/cpp/rnwgpu/api/descriptors/GPUShaderStage.h +14 -16
  106. package/cpp/rnwgpu/api/descriptors/GPUStencilFaceState.h +3 -8
  107. package/cpp/rnwgpu/api/descriptors/GPUStorageTextureBindingLayout.h +3 -8
  108. package/cpp/rnwgpu/api/descriptors/GPUTextureBindingLayout.h +3 -8
  109. package/cpp/rnwgpu/api/descriptors/GPUTextureDescriptor.h +3 -7
  110. package/cpp/rnwgpu/api/descriptors/GPUTextureUsage.h +18 -29
  111. package/cpp/rnwgpu/api/descriptors/GPUTextureViewDescriptor.h +3 -8
  112. package/cpp/rnwgpu/api/descriptors/GPUUncapturedErrorEventInit.h +3 -7
  113. package/cpp/rnwgpu/api/descriptors/GPUVertexAttribute.h +3 -8
  114. package/cpp/rnwgpu/api/descriptors/GPUVertexBufferLayout.h +3 -7
  115. package/cpp/rnwgpu/api/descriptors/GPUVertexState.h +3 -7
  116. package/cpp/rnwgpu/api/descriptors/Unions.h +3 -3
  117. package/cpp/rnwgpu/async/AsyncTaskHandle.cpp +10 -10
  118. package/cpp/rnwgpu/async/AsyncTaskHandle.h +2 -2
  119. package/lib/commonjs/external/ModuleProxy.js +36 -0
  120. package/lib/commonjs/external/ModuleProxy.js.map +1 -0
  121. package/lib/commonjs/external/index.js +17 -0
  122. package/lib/commonjs/external/index.js.map +1 -0
  123. package/lib/commonjs/external/reanimated/ReanimatedProxy.js +18 -0
  124. package/lib/commonjs/external/reanimated/ReanimatedProxy.js.map +1 -0
  125. package/lib/commonjs/external/reanimated/index.js +21 -0
  126. package/lib/commonjs/external/reanimated/index.js.map +1 -0
  127. package/lib/commonjs/external/reanimated/registerWebGPUForReanimated.js +50 -0
  128. package/lib/commonjs/external/reanimated/registerWebGPUForReanimated.js.map +1 -0
  129. package/lib/commonjs/main/index.js +2 -142
  130. package/lib/commonjs/main/index.js.map +1 -1
  131. package/lib/module/external/ModuleProxy.js +28 -0
  132. package/lib/module/external/ModuleProxy.js.map +1 -0
  133. package/lib/module/external/index.js +2 -0
  134. package/lib/module/external/index.js.map +1 -0
  135. package/lib/module/external/reanimated/ReanimatedProxy.js +12 -0
  136. package/lib/module/external/reanimated/ReanimatedProxy.js.map +1 -0
  137. package/lib/module/external/reanimated/index.js +3 -0
  138. package/lib/module/external/reanimated/index.js.map +1 -0
  139. package/lib/module/external/reanimated/registerWebGPUForReanimated.js +43 -0
  140. package/lib/module/external/reanimated/registerWebGPUForReanimated.js.map +1 -0
  141. package/lib/module/main/index.js +2 -141
  142. package/lib/module/main/index.js.map +1 -1
  143. package/lib/typescript/babel.config.d.ts +1 -0
  144. package/lib/typescript/lib/commonjs/external/ModuleProxy.d.ts +12 -0
  145. package/lib/typescript/lib/commonjs/external/ModuleProxy.d.ts.map +1 -0
  146. package/lib/typescript/lib/commonjs/external/index.d.ts +2 -0
  147. package/lib/typescript/lib/commonjs/external/index.d.ts.map +1 -0
  148. package/lib/typescript/lib/commonjs/external/reanimated/ReanimatedProxy.d.ts +6 -0
  149. package/lib/typescript/lib/commonjs/external/reanimated/ReanimatedProxy.d.ts.map +1 -0
  150. package/lib/typescript/lib/commonjs/external/reanimated/index.d.ts +4 -0
  151. package/lib/typescript/lib/commonjs/external/reanimated/index.d.ts.map +1 -0
  152. package/lib/typescript/lib/commonjs/external/reanimated/registerWebGPUForReanimated.d.ts +9 -0
  153. package/lib/typescript/lib/commonjs/external/reanimated/registerWebGPUForReanimated.d.ts.map +1 -0
  154. package/lib/typescript/lib/module/external/ModuleProxy.d.ts +7 -0
  155. package/lib/typescript/lib/module/external/ModuleProxy.d.ts.map +1 -0
  156. package/lib/typescript/lib/module/external/index.d.ts +2 -0
  157. package/lib/typescript/lib/module/external/index.d.ts.map +1 -0
  158. package/lib/typescript/lib/module/external/reanimated/ReanimatedProxy.d.ts +5 -0
  159. package/lib/typescript/lib/module/external/reanimated/ReanimatedProxy.d.ts.map +1 -0
  160. package/lib/typescript/lib/module/external/reanimated/index.d.ts +3 -0
  161. package/lib/typescript/lib/module/external/reanimated/index.d.ts.map +1 -0
  162. package/lib/typescript/lib/module/external/reanimated/registerWebGPUForReanimated.d.ts +2 -0
  163. package/lib/typescript/lib/module/external/reanimated/registerWebGPUForReanimated.d.ts.map +1 -0
  164. package/lib/typescript/src/external/ModuleProxy.d.ts +11 -0
  165. package/lib/typescript/src/external/ModuleProxy.d.ts.map +1 -0
  166. package/lib/typescript/src/external/index.d.ts +2 -0
  167. package/lib/typescript/src/external/index.d.ts.map +1 -0
  168. package/lib/typescript/src/external/reanimated/ReanimatedProxy.d.ts +4 -0
  169. package/lib/typescript/src/external/reanimated/ReanimatedProxy.d.ts.map +1 -0
  170. package/lib/typescript/src/external/reanimated/index.d.ts +3 -0
  171. package/lib/typescript/src/external/reanimated/index.d.ts.map +1 -0
  172. package/lib/typescript/src/external/reanimated/registerWebGPUForReanimated.d.ts +8 -0
  173. package/lib/typescript/src/external/reanimated/registerWebGPUForReanimated.d.ts.map +1 -0
  174. package/package.json +16 -3
  175. package/src/external/ModuleProxy.ts +30 -0
  176. package/src/external/index.ts +1 -0
  177. package/src/external/reanimated/ReanimatedProxy.ts +19 -0
  178. package/src/external/reanimated/index.ts +2 -0
  179. package/src/external/reanimated/registerWebGPUForReanimated.ts +43 -0
  180. package/src/main/index.tsx +3 -170
  181. package/cpp/jsi/RNFHybridObject.cpp +0 -150
  182. package/cpp/jsi/RNFHybridObject.h +0 -181
  183. package/cpp/jsi/RNFJSIHelper.h +0 -51
  184. package/cpp/jsi/RNFPointerHolder.h +0 -95
  185. package/cpp/jsi/RNFRuntimeState.cpp +0 -18
  186. package/cpp/jsi/RNFRuntimeState.h +0 -106
@@ -1 +1 @@
1
- {"version":3,"names":["_NativeWebGPUModule","_interopRequireDefault","require","_Canvas","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Offscreen","_WebGPUViewNativeComponent","_hooks","e","__esModule","default","GPU","Symbol","hasInstance","instance","__brand","GPUAdapter","GPUAdapterInfo","GPUBindGroup","GPUBindGroupLayout","GPUBuffer","GPUCanvasContext","GPUCommandBuffer","GPUCommandEncoder","GPUCompilationInfo","GPUCompilationMessage","GPUComputePassEncoder","GPUComputePipeline","GPUDevice","GPUDeviceLostInfo","GPUError","GPUExternalTexture","GPUPipelineLayout","GPUQuerySet","GPUQueue","GPURenderBundle","GPURenderBundleEncoder","GPURenderPassEncoder","GPURenderPipeline","GPUSampler","GPUShaderModule","GPUTexture","GPUTextureView","global","WebGPUModule","install","navigator","gpu","RNWebGPU","userAgent","createImageBitmap","params","Promise","resolve"],"sourceRoot":"../../../src","sources":["main/index.tsx"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,OAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,OAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,OAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,UAAA,GAAAd,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAW,UAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,UAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAA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GAAGA,WAAW;AAChCU,MAAM,CAACT,QAAQ,GAAGA,QAAQ;AAC1BS,MAAM,CAACR,eAAe,GAAGA,eAAe;AACxCQ,MAAM,CAACP,sBAAsB,GAAGA,sBAAsB;AACtDO,MAAM,CAACN,oBAAoB,GAAGA,oBAAoB;AAClDM,MAAM,CAACL,iBAAiB,GAAGA,iBAAiB;AAC5CK,MAAM,CAACJ,UAAU,GAAGA,UAAU;AAC9BI,MAAM,CAACH,eAAe,GAAGA,eAAe;AACxCG,MAAM,CAACF,UAAU,GAAGA,UAAU;AAC9BE,MAAM,CAACD,cAAc,GAAGA,cAAc;AAEtCE,2BAAY,CAACC,OAAO,CAAC,CAAC;AAEtB,IAAI,CAACC,SAAS,EAAE;EACd;EACAA,SAAS,GAAG;IACVC,GAAG,EAAEC,QAAQ,CAACD,GAAG;IACjBE,SAAS,EAAE;EACb,CAAC;AACH,CAAC,MAAM;EACLH,SAAS,CAACC,GAAG,GAAGC,QAAQ,CAACD,GAAG;EAC5B,IAAI,OAAOD,SAAS,CAACG,SAAS,KAAK,QAAQ,EAAE;IAC3C,IAAI;MACF;MACA;MACAH,SAAS,CAACG,SAAS,GAAG,cAAc;IACtC,CAAC,CAAC,MAAM;MACN;IAAA;EAEJ;AACF;AAEAN,MAAM,CAACO,iBAAiB,GACtBP,MAAM,CAACO,iBAAiB,KACvB,CAAC,GAAGC,MAA4C,KAC/C,IAAIC,OAAO,CAAEC,OAAO,IAAKA,OAAO,CAACL,QAAQ,CAACE,iBAAiB,CAAC,GAAGC,MAAM,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_external","require","_NativeWebGPUModule","_interopRequireDefault","_Canvas","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Offscreen","_WebGPUViewNativeComponent","_hooks","e","__esModule","default","WebGPUModule","install","registerWebGPUForReanimated","navigator","gpu","RNWebGPU","userAgent","global","createImageBitmap","params","Promise","resolve"],"sourceR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;AAEAC,MAAM,CAACC,iBAAiB,GACtBD,MAAM,CAACC,iBAAiB,KACvB,CAAC,GAAGC,MAA4C,KAC/C,IAAIC,OAAO,CAAEC,OAAO,IAAKA,OAAO,CAACN,QAAQ,CAACG,iBAAiB,CAAC,GAAGC,MAAM,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ // https://github.com/mrousavy/react-native-vision-camera/blob/main/package/src/dependencies/ModuleProxy.ts
2
+
3
+ /**
4
+ * Create a lazily-imported module proxy.
5
+ * This is useful for lazily requiring optional dependencies.
6
+ */
7
+ export const createModuleProxy = getModule => {
8
+ const holder = {
9
+ module: undefined
10
+ };
11
+ const proxy = new Proxy(holder, {
12
+ get: (target, property) => {
13
+ if (target.module == null) {
14
+ // lazy initialize module via require()
15
+ // caller needs to make sure the require() call is wrapped in a try/catch
16
+ target.module = getModule();
17
+ }
18
+ return target.module[property];
19
+ }
20
+ });
21
+ return proxy;
22
+ };
23
+ export class OptionalDependencyNotInstalledError extends Error {
24
+ constructor(name) {
25
+ super(`${name} is not installed!`);
26
+ }
27
+ }
28
+ //# sourceMappingURL=ModuleProxy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createModuleProxy","getModule","holder","module","undefined","proxy","Proxy","get","target","property","OptionalDependencyNotInstalledError","Error","constructor","name"],"sourceRoot":"../../../src","sources":["external/ModuleProxy.ts"],"mappings":"AAAA;;AAGA;AACA;AACA;AACA;AACA,OAAO,MAAMA,iBAAiB,GAC5BC,SAA2B,IACf;EACZ,MAAMC,MAAuC,GAAG;IAAEC,MAAM,EAAEC;EAAU,CAAC;EAErE,MAAMC,KAAK,GAAG,IAAIC,KAAK,CAACJ,MAAM,EAAE;IAC9BK,GAAG,EAAEA,CAACC,MAAM,EAAEC,QAAQ,KAAK;MACzB,IAAID,MAAM,CAACL,MAAM,IAAI,IAAI,EAAE;QACzB;QACA;QACAK,MAAM,CAACL,MAAM,GAAGF,SAAS,CAAC,CAAY;MACxC;MACA,OAAOO,MAAM,CAACL,MAAM,CAACM,QAAQ,CAA+B;IAC9D;EACF,CAAC,CAAC;EACF,OAAOJ,KAAK;AACd,CAAC;AAED,OAAO,MAAMK,mCAAmC,SAASC,KAAK,CAAC;EAC7DC,WAAWA,CAACC,IAAY,EAAE;IACxB,KAAK,CAAC,GAAGA,IAAI,oBAAoB,CAAC;EACpC;AACF","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from "./reanimated";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["external/index.ts"],"mappings":"AAAA,cAAc,cAAc","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ import { OptionalDependencyNotInstalledError, createModuleProxy } from "../ModuleProxy";
2
+ const Reanimated = createModuleProxy(() => {
3
+ try {
4
+ return require("react-native-reanimated");
5
+ } catch (e) {
6
+ throw new OptionalDependencyNotInstalledError("react-native-reanimated");
7
+ }
8
+ });
9
+
10
+ // eslint-disable-next-line import/no-default-export
11
+ export default Reanimated;
12
+ //# sourceMappingURL=ReanimatedProxy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["OptionalDependencyNotInstalledError","createModuleProxy","Reanimated","require","e"],"sourceRoot":"../../../../src","sources":["external/reanimated/ReanimatedProxy.ts"],"mappings":"AAEA,SACEA,mCAAmC,EACnCC,iBAAiB,QACZ,gBAAgB;AAIvB,MAAMC,UAAU,GAAGD,iBAAiB,CAAc,MAAM;EACtD,IAAI;IACF,OAAOE,OAAO,CAAC,yBAAyB,CAAC;EAC3C,CAAC,CAAC,OAAOC,CAAC,EAAE;IACV,MAAM,IAAIJ,mCAAmC,CAAC,yBAAyB,CAAC;EAC1E;AACF,CAAC,CAAC;;AAEF;AACA,eAAeE,UAAU","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ export { registerWebGPUForReanimated } from "./registerWebGPUForReanimated";
2
+ export { default as Reanimated } from "./ReanimatedProxy";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["registerWebGPUForReanimated","default","Reanimated"],"sourceRoot":"../../../../src","sources":["external/reanimated/index.ts"],"mappings":"AAAA,SAASA,2BAA2B,QAAQ,+BAA+B;AAC3E,SAASC,OAAO,IAAIC,UAAU,QAAQ,mBAAmB","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ // Declare global WebGPU worklet helper functions (installed by native module)
2
+
3
+ let isRegistered = false;
4
+
5
+ /**
6
+ * Register WebGPU objects for Worklets serialization.
7
+ * This allows GPUDevice, GPUCanvasContext, etc. to be passed to worklets.
8
+ *
9
+ * This is called automatically when the module loads if react-native-worklets is installed.
10
+ */
11
+ export const registerWebGPUForReanimated = () => {
12
+ if (isRegistered) {
13
+ return;
14
+ }
15
+ isRegistered = true;
16
+ try {
17
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
18
+ const {
19
+ registerCustomSerializable
20
+ } = require("react-native-worklets");
21
+ registerCustomSerializable({
22
+ name: "WebGPU",
23
+ determine: value => {
24
+ "worklet";
25
+
26
+ return __webgpuIsWebGPUObject(value);
27
+ },
28
+ pack: value => {
29
+ "worklet";
30
+
31
+ return __webgpuBox(value);
32
+ },
33
+ unpack: boxed => {
34
+ "worklet";
35
+
36
+ return boxed.unbox();
37
+ }
38
+ });
39
+ } catch {
40
+ // react-native-worklets not installed, skip registration
41
+ }
42
+ };
43
+ //# sourceMappingURL=registerWebGPUForReanimated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isRegistered","registerWebGPUForReanimated","registerCustomSerializable","require","name","determine","value","__webgpuIsWebGPUObject","pack","__webgpuBox","unpack","boxed","unbox"],"sourceRoot":"../../../../src","sources":["external/reanimated/registerWebGPUForReanimated.ts"],"mappings":"AAAA;;AAMA,IAAIA,YAAY,GAAG,KAAK;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,2BAA2B,GAAGA,CAAA,KAAM;EAC/C,IAAID,YAAY,EAAE;IAChB;EACF;EACAA,YAAY,GAAG,IAAI;EAEnB,IAAI;IACF;IACA,MAAM;MAAEE;IAA2B,CAAC,GAAGC,OAAO,CAAC,uBAAuB,CAAC;IAEvED,0BAA0B,CAAC;MACzBE,IAAI,EAAE,QAAQ;MACdC,SAAS,EAAGC,KAAa,IAAsB;QAC7C,SAAS;;QACT,OAAOC,sBAAsB,CAACD,KAAK,CAAC;MACtC,CAAC;MACDE,IAAI,EAAGF,KAAa,IAAK;QACvB,SAAS;;QACT,OAAOG,WAAW,CAACH,KAAK,CAAC;MAC3B,CAAC;MACDI,MAAM,EAAGC,KAA8B,IAAK;QAC1C,SAAS;;QACT,OAAOA,KAAK,CAACC,KAAK,CAAC,CAAC;MACtB;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,MAAM;IACN;EAAA;AAEJ,CAAC","ignoreList":[]}
@@ -1,151 +1,12 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
1
+ import { registerWebGPUForReanimated } from "../external";
2
2
  import WebGPUModule from "../NativeWebGPUModule";
3
3
  export * from "../Canvas";
4
4
  export * from "../Offscreen";
5
5
  export * from "../WebGPUViewNativeComponent";
6
6
  export * from "../hooks";
7
7
  export { default as WebGPUModule } from "../NativeWebGPUModule";
8
- const GPU = {};
9
- GPU[Symbol.hasInstance] = function (instance) {
10
- return "__brand" in instance && instance.__brand === "GPU";
11
- };
12
- const GPUAdapter = {};
13
- GPUAdapter[Symbol.hasInstance] = function (instance) {
14
- return "__brand" in instance && instance.__brand === "GPUAdapter";
15
- };
16
- const GPUAdapterInfo = {};
17
- GPUAdapterInfo[Symbol.hasInstance] = function (instance) {
18
- return "__brand" in instance && instance.__brand === "GPUAdapterInfo";
19
- };
20
- const GPUBindGroup = {};
21
- GPUBindGroup[Symbol.hasInstance] = function (instance) {
22
- return "__brand" in instance && instance.__brand === "GPUBindGroup";
23
- };
24
- const GPUBindGroupLayout = {};
25
- GPUBindGroupLayout[Symbol.hasInstance] = function (instance) {
26
- return "__brand" in instance && instance.__brand === "GPUBindGroupLayout";
27
- };
28
- const GPUBuffer = {};
29
- GPUBuffer[Symbol.hasInstance] = function (instance) {
30
- return "__brand" in instance && instance.__brand === "GPUBuffer";
31
- };
32
- const GPUCanvasContext = {};
33
- GPUCanvasContext[Symbol.hasInstance] = function (instance) {
34
- return "__brand" in instance && instance.__brand === "GPUCanvasContext";
35
- };
36
- const GPUCommandBuffer = {};
37
- GPUCommandBuffer[Symbol.hasInstance] = function (instance) {
38
- return "__brand" in instance && instance.__brand === "GPUCommandBuffer";
39
- };
40
- const GPUCommandEncoder = {};
41
- GPUCommandEncoder[Symbol.hasInstance] = function (instance) {
42
- return "__brand" in instance && instance.__brand === "GPUCommandEncoder";
43
- };
44
- const GPUCompilationInfo = {};
45
- GPUCompilationInfo[Symbol.hasInstance] = function (instance) {
46
- return "__brand" in instance && instance.__brand === "GPUCompilationInfo";
47
- };
48
- const GPUCompilationMessage = {};
49
- GPUCompilationMessage[Symbol.hasInstance] = function (instance) {
50
- return "__brand" in instance && instance.__brand === "GPUCompilationMessage";
51
- };
52
- const GPUComputePassEncoder = {};
53
- GPUComputePassEncoder[Symbol.hasInstance] = function (instance) {
54
- return "__brand" in instance && instance.__brand === "GPUComputePassEncoder";
55
- };
56
- const GPUComputePipeline = {};
57
- GPUComputePipeline[Symbol.hasInstance] = function (instance) {
58
- return "__brand" in instance && instance.__brand === "GPUComputePipeline";
59
- };
60
- const GPUDevice = {};
61
- GPUDevice[Symbol.hasInstance] = function (instance) {
62
- return "__brand" in instance && instance.__brand === "GPUDevice";
63
- };
64
- const GPUDeviceLostInfo = {};
65
- GPUDeviceLostInfo[Symbol.hasInstance] = function (instance) {
66
- return "__brand" in instance && instance.__brand === "GPUDeviceLostInfo";
67
- };
68
- const GPUError = {};
69
- GPUError[Symbol.hasInstance] = function (instance) {
70
- return "__brand" in instance && instance.__brand === "GPUError";
71
- };
72
- const GPUExternalTexture = {};
73
- GPUExternalTexture[Symbol.hasInstance] = function (instance) {
74
- return "__brand" in instance && instance.__brand === "GPUExternalTexture";
75
- };
76
- const GPUPipelineLayout = {};
77
- GPUPipelineLayout[Symbol.hasInstance] = function (instance) {
78
- return "__brand" in instance && instance.__brand === "GPUPipelineLayout";
79
- };
80
- const GPUQuerySet = {};
81
- GPUQuerySet[Symbol.hasInstance] = function (instance) {
82
- return "__brand" in instance && instance.__brand === "GPUQuerySet";
83
- };
84
- const GPUQueue = {};
85
- GPUQueue[Symbol.hasInstance] = function (instance) {
86
- return "__brand" in instance && instance.__brand === "GPUQueue";
87
- };
88
- const GPURenderBundle = {};
89
- GPURenderBundle[Symbol.hasInstance] = function (instance) {
90
- return "__brand" in instance && instance.__brand === "GPURenderBundle";
91
- };
92
- const GPURenderBundleEncoder = {};
93
- GPURenderBundleEncoder[Symbol.hasInstance] = function (instance) {
94
- return "__brand" in instance && instance.__brand === "GPURenderBundleEncoder";
95
- };
96
- const GPURenderPassEncoder = {};
97
- GPURenderPassEncoder[Symbol.hasInstance] = function (instance) {
98
- return "__brand" in instance && instance.__brand === "GPURenderPassEncoder";
99
- };
100
- const GPURenderPipeline = {};
101
- GPURenderPipeline[Symbol.hasInstance] = function (instance) {
102
- return "__brand" in instance && instance.__brand === "GPURenderPipeline";
103
- };
104
- const GPUSampler = {};
105
- GPUSampler[Symbol.hasInstance] = function (instance) {
106
- return "__brand" in instance && instance.__brand === "GPUSampler";
107
- };
108
- const GPUShaderModule = {};
109
- GPUShaderModule[Symbol.hasInstance] = function (instance) {
110
- return "__brand" in instance && instance.__brand === "GPUShaderModule";
111
- };
112
- const GPUTexture = {};
113
- GPUTexture[Symbol.hasInstance] = function (instance) {
114
- return "__brand" in instance && instance.__brand === "GPUTexture";
115
- };
116
- const GPUTextureView = {};
117
- GPUTextureView[Symbol.hasInstance] = function (instance) {
118
- return "__brand" in instance && instance.__brand === "GPUTextureView";
119
- };
120
- global.GPU = GPU;
121
- global.GPUAdapter = GPUAdapter;
122
- global.GPUAdapterInfo = GPUAdapterInfo;
123
- global.GPUBindGroup = GPUBindGroup;
124
- global.GPUBindGroupLayout = GPUBindGroupLayout;
125
- global.GPUBuffer = GPUBuffer;
126
- global.GPUCanvasContext = GPUCanvasContext;
127
- global.GPUCommandBuffer = GPUCommandBuffer;
128
- global.GPUCommandEncoder = GPUCommandEncoder;
129
- global.GPUCompilationInfo = GPUCompilationInfo;
130
- global.GPUCompilationMessage = GPUCompilationMessage;
131
- global.GPUComputePassEncoder = GPUComputePassEncoder;
132
- global.GPUComputePipeline = GPUComputePipeline;
133
- global.GPUDevice = GPUDevice;
134
- global.GPUDeviceLostInfo = GPUDeviceLostInfo;
135
- global.GPUError = GPUError;
136
- global.GPUExternalTexture = GPUExternalTexture;
137
- global.GPUPipelineLayout = GPUPipelineLayout;
138
- global.GPUQuerySet = GPUQuerySet;
139
- global.GPUQueue = GPUQueue;
140
- global.GPURenderBundle = GPURenderBundle;
141
- global.GPURenderBundleEncoder = GPURenderBundleEncoder;
142
- global.GPURenderPassEncoder = GPURenderPassEncoder;
143
- global.GPURenderPipeline = GPURenderPipeline;
144
- global.GPUSampler = GPUSampler;
145
- global.GPUShaderModule = GPUShaderModule;
146
- global.GPUTexture = GPUTexture;
147
- global.GPUTextureView = GPUTextureView;
148
8
  WebGPUModule.install();
9
+ registerWebGPUForReanimated();
149
10
  if (!navigator) {
150
11
  // @ts-expect-error Navigation object is more complex than this, setting it to an empty object to add gpu property
151
12
  navigator = {
@@ -1 +1 @@
1
- {"version":3,"names":["WebGPUModule","default","GPU","Symbol","hasInstance","instance","__brand","GPUAdapter","GPUAdapterInfo","GPUBindGroup","GPUBindGroupLayout","GPUBuffer","GPUCanvasContext","GPUCommandBuffer","GPUCommandEncoder","GPUCompilationInfo","GPUCompilationMessage","GPUComputePassEncoder","GPUComputePipeline","GPUDevice","GPUDeviceLostInfo","GPUError","GPUExternalTexture","GPUPipelineLayout","GPUQuerySet","GPUQueue","GPURenderBundle","GPURenderBundleEncoder","GPURenderPassEncoder","GPURenderPipeline","GPUSampler","GPUShaderModule","GPUTexture","GPUTextureView","global","install","navigator","gpu","RNWebGPU","userAgent","createImageBitmap","params","Promise","resolve"],"sourceRoot":"../../../src","sources":["main/index.tsx"],"mappings":"AAAA;AACA,OAAOA,YAAY,MAAM,uBAAuB;AAEhD,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,8BAA8B;AAC5C,cAAc,UAAU;AAExB,SAASC,OAAO,IAAID,YAAY,QAAQ,uBAAuB;AAE/D,MAAME,GAAQ,GAAG,CAAC,CAAC;AACnBA,GAAG,CAACC,MAAM,CAACC,WAAW,CAAC,GAAG,UAAUC,QAAgB,EAAE;EACpD,OAAO,SAAS,IAAIA,QAAQ,IAAIA,QAAQ,CAACC,OAAO,KAAK,KAAK;AAC5D,CAAC;AAED,MAAMC,UAAe,GAAG,CAAC,CAAC;AAC1BA,UAAU,CAACJ,MAAM,CAACC,WAAW,CAAC,GAAG,UAAUC,QAAgB,EAAE;EAC3D,OAAO,SAAS,IAAIA,QAAQ,IAAIA,QAAQ,CAACC,OAAO,KAAK,YAAY;AACnE,CAAC;AAED,MAAME,cAAmB,GAAG,CAAC,CAAC;AAC9BA,cAAc,CAACL,MAAM,CAACC,WAAW,CAAC,GAAG,UAAUC,QAAgB,EAAE;EAC/D,OAAO,SAAS,IAAIA,QAAQ,IAAIA,QAAQ,CAACC,OAAO,KAAK,gBAAgB;AACvE,CAAC;AAED,MAAMG,YAAiB,GAAG,CAAC,CAAC;AAC5BA,YAAY,CAACN,MAAM,CAACC,WAAW,CAAC,GAAG,UAAUC,QAAgB,EAAE;EAC7D,OAAO,SAAS,IAAIA,QAAQ,IAAIA,QAAQ,CAACC,OAAO,KAAK,cAAc;AACrE,CAAC;AAED,MAAMI,kBAAuB,GAAG,CAAC,CAAC;AAClCA,kBAAkB,CAACP,MAAM,CAACC,WAAW,CAAC,GAAG,UAAUC,QAAgB,EAAE;EACnE,OAAO,SAAS,IAAIA,QAAQ,IAAIA,QAAQ,CAACC,OAAO,K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MAAM,CAACM,iBAAiB,GACtBN,MAAM,CAACM,iBAAiB,KACvB,CAAC,GAAGC,MAA4C,KAC/C,IAAIC,OAAO,CAAEC,OAAO,IAAKA,OAAO,CAACL,QAAQ,CAACE,iBAAiB,CAAC,GAAGC,MAAM,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["registerWebGPUForReanimated","WebGPUModule","default","install","navigator","gpu","RNWebGPU","userAgent","global","createImageBitmap","params","Promise","resolve"],"sourceRoot":"../../../src","sources":["main/index.tsx"],"mappings":"AAAA,SAASA,2BAA2B,QAAQ,aAAa;AACzD,OAAOC,YAAY,MAAM,uBAAuB;AAEhD,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,8BAA8B;AAC5C,cAAc,UAAU;AAExB,SAASC,OAAO,IAAID,YAAY,QAAQ,uBAAuB;AAE/DA,YAAY,CAACE,OAAO,CAAC,CAAC;AAEtBH,2BAA2B,CAAC,CAAC;AAE7B,IAAI,CAACI,SAAS,EAAE;EACd;EACAA,SAAS,GAAG;IACVC,GAAG,EAAEC,QAAQ,CAACD,GAAG;IACjBE,SAAS,EAAE;EACb,CAAC;AACH,CAAC,MAAM;EACLH,SAAS,CAACC,GAAG,GAAGC,QAAQ,CAACD,GAAG;EAC5B,IAAI,OAAOD,SAAS,CAACG,SAAS,KAAK,QAAQ,EAAE;IAC3C,IAAI;MACF;MACA;MACAH,SAAS,CAACG,SAAS,GAAG,cAAc;IACtC,CAAC,CAAC,MAAM;MACN;IAAA;EAEJ;AACF;AAEAC,MAAM,CAACC,iBAAiB,GACtBD,MAAM,CAACC,iBAAiB,KACvB,CAAC,GAAGC,MAA4C,KAC/C,IAAIC,OAAO,CAAEC,OAAO,IAAKA,OAAO,CAACN,QAAQ,CAACG,iBAAiB,CAAC,GAAGC,MAAM,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -1,2 +1,3 @@
1
1
  export let presets: string[];
2
+ export let plugins: string[];
2
3
  //# sourceMappingURL=babel.config.d.ts.map
@@ -0,0 +1,12 @@
1
+ export const __esModule: boolean;
2
+ /**
3
+ * Create a lazily-imported module proxy.
4
+ * This is useful for lazily requiring optional dependencies.
5
+ */
6
+ export function createModuleProxy(getModule: any): {
7
+ module: undefined;
8
+ };
9
+ export class OptionalDependencyNotInstalledError extends Error {
10
+ constructor(name: any);
11
+ }
12
+ //# sourceMappingURL=ModuleProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModuleProxy.d.ts","sourceRoot":"","sources":["../../../../commonjs/external/ModuleProxy.js"],"names":[],"mappings":";AAQA;;;GAGG;AACH;;EAeC;AAED;IACE,uBAEC;CACF"}
@@ -0,0 +1,2 @@
1
+ export const __esModule: boolean;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commonjs/external/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export const __esModule: boolean;
2
+ export default Reanimated;
3
+ declare const Reanimated: {
4
+ module: undefined;
5
+ };
6
+ //# sourceMappingURL=ReanimatedProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReanimatedProxy.d.ts","sourceRoot":"","sources":["../../../../../commonjs/external/reanimated/ReanimatedProxy.js"],"names":[],"mappings":";;AAOA;;EAMG"}
@@ -0,0 +1,4 @@
1
+ export const __esModule: boolean;
2
+ export const Reanimated: any;
3
+ export const registerWebGPUForReanimated: () => void;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commonjs/external/reanimated/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export const __esModule: boolean;
2
+ /**
3
+ * Register WebGPU objects for Worklets serialization.
4
+ * This allows GPUDevice, GPUCanvasContext, etc. to be passed to worklets.
5
+ *
6
+ * This is called automatically when the module loads if react-native-worklets is installed.
7
+ */
8
+ export function registerWebGPUForReanimated(): void;
9
+ //# sourceMappingURL=registerWebGPUForReanimated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerWebGPUForReanimated.d.ts","sourceRoot":"","sources":["../../../../../commonjs/external/reanimated/registerWebGPUForReanimated.js"],"names":[],"mappings":";AAUA;;;;;GAKG;AACH,oDA+BC"}
@@ -0,0 +1,7 @@
1
+ export function createModuleProxy(getModule: any): {
2
+ module: undefined;
3
+ };
4
+ export class OptionalDependencyNotInstalledError extends Error {
5
+ constructor(name: any);
6
+ }
7
+ //# sourceMappingURL=ModuleProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModuleProxy.d.ts","sourceRoot":"","sources":["../../../../module/external/ModuleProxy.js"],"names":[],"mappings":"AAMO;;EAeN;AACD;IACE,uBAEC;CACF"}
@@ -0,0 +1,2 @@
1
+ export * from "./reanimated";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/external/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export default Reanimated;
2
+ declare const Reanimated: {
3
+ module: undefined;
4
+ };
5
+ //# sourceMappingURL=ReanimatedProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReanimatedProxy.d.ts","sourceRoot":"","sources":["../../../../../module/external/reanimated/ReanimatedProxy.js"],"names":[],"mappings":";AACA;;EAMG"}
@@ -0,0 +1,3 @@
1
+ export { registerWebGPUForReanimated } from "./registerWebGPUForReanimated";
2
+ export { default as Reanimated } from "./ReanimatedProxy";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../module/external/reanimated/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export function registerWebGPUForReanimated(): void;
2
+ //# sourceMappingURL=registerWebGPUForReanimated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerWebGPUForReanimated.d.ts","sourceRoot":"","sources":["../../../../../module/external/reanimated/registerWebGPUForReanimated.js"],"names":[],"mappings":"AAUO,oDA+BN"}
@@ -0,0 +1,11 @@
1
+ type ImportType = ReturnType<typeof require>;
2
+ /**
3
+ * Create a lazily-imported module proxy.
4
+ * This is useful for lazily requiring optional dependencies.
5
+ */
6
+ export declare const createModuleProxy: <TModule>(getModule: () => ImportType) => TModule;
7
+ export declare class OptionalDependencyNotInstalledError extends Error {
8
+ constructor(name: string);
9
+ }
10
+ export {};
11
+ //# sourceMappingURL=ModuleProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModuleProxy.d.ts","sourceRoot":"","sources":["../../../../src/external/ModuleProxy.ts"],"names":[],"mappings":"AACA,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,EACvC,WAAW,MAAM,UAAU,KAC1B,OAcF,CAAC;AAEF,qBAAa,mCAAoC,SAAQ,KAAK;gBAChD,IAAI,EAAE,MAAM;CAGzB"}
@@ -0,0 +1,2 @@
1
+ export * from "./reanimated";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/external/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type * as ReanimatedT from "react-native-reanimated";
2
+ declare const Reanimated: typeof ReanimatedT;
3
+ export default Reanimated;
4
+ //# sourceMappingURL=ReanimatedProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReanimatedProxy.d.ts","sourceRoot":"","sources":["../../../../../src/external/reanimated/ReanimatedProxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,WAAW,MAAM,yBAAyB,CAAC;AAS5D,QAAA,MAAM,UAAU,oBAMd,CAAC;AAGH,eAAe,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { registerWebGPUForReanimated } from "./registerWebGPUForReanimated";
2
+ export { default as Reanimated } from "./ReanimatedProxy";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/external/reanimated/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Register WebGPU objects for Worklets serialization.
3
+ * This allows GPUDevice, GPUCanvasContext, etc. to be passed to worklets.
4
+ *
5
+ * This is called automatically when the module loads if react-native-worklets is installed.
6
+ */
7
+ export declare const registerWebGPUForReanimated: () => void;
8
+ //# sourceMappingURL=registerWebGPUForReanimated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerWebGPUForReanimated.d.ts","sourceRoot":"","sources":["../../../../../src/external/reanimated/registerWebGPUForReanimated.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,YA4BvC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-wgpu",
3
- "version": "0.4.2",
3
+ "version": "0.5.1",
4
4
  "description": "React Native WebGPU",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -65,6 +65,7 @@
65
65
  "@types/seedrandom": "^3.0.8",
66
66
  "@types/ws": "^8.5.10",
67
67
  "@webgpu/types": "0.1.65",
68
+ "baseline-browser-mapping": "^2.9.14",
68
69
  "clang-format": "^1.8.0",
69
70
  "del-cli": "^5.1.0",
70
71
  "eslint": "9.35.0",
@@ -81,7 +82,9 @@
81
82
  "react": "19.1.0",
82
83
  "react-native": "0.81.4",
83
84
  "react-native-builder-bob": "^0.23.2",
85
+ "react-native-reanimated": "^4.2.1",
84
86
  "react-native-web": "^0.21.2",
87
+ "react-native-worklets": "^0.7.0",
85
88
  "rimraf": "^5.0.7",
86
89
  "seedrandom": "^3.0.5",
87
90
  "teapot": "^1.0.0",
@@ -94,7 +97,17 @@
94
97
  },
95
98
  "peerDependencies": {
96
99
  "react": "*",
97
- "react-native": "*"
100
+ "react-native": "*",
101
+ "react-native-reanimated": ">=4.2.1",
102
+ "react-native-worklets": ">=0.7.2"
103
+ },
104
+ "peerDependenciesMeta": {
105
+ "react-native-reanimated": {
106
+ "optional": true
107
+ },
108
+ "react-native-worklets": {
109
+ "optional": true
110
+ }
98
111
  },
99
112
  "react-native-builder-bob": {
100
113
  "source": "src",
@@ -123,4 +136,4 @@
123
136
  }
124
137
  }
125
138
  }
126
- }
139
+ }
@@ -0,0 +1,30 @@
1
+ // https://github.com/mrousavy/react-native-vision-camera/blob/main/package/src/dependencies/ModuleProxy.ts
2
+ type ImportType = ReturnType<typeof require>;
3
+
4
+ /**
5
+ * Create a lazily-imported module proxy.
6
+ * This is useful for lazily requiring optional dependencies.
7
+ */
8
+ export const createModuleProxy = <TModule>(
9
+ getModule: () => ImportType
10
+ ): TModule => {
11
+ const holder: { module: TModule | undefined } = { module: undefined };
12
+
13
+ const proxy = new Proxy(holder, {
14
+ get: (target, property) => {
15
+ if (target.module == null) {
16
+ // lazy initialize module via require()
17
+ // caller needs to make sure the require() call is wrapped in a try/catch
18
+ target.module = getModule() as TModule;
19
+ }
20
+ return target.module[property as keyof typeof holder.module];
21
+ },
22
+ });
23
+ return proxy as unknown as TModule;
24
+ };
25
+
26
+ export class OptionalDependencyNotInstalledError extends Error {
27
+ constructor(name: string) {
28
+ super(`${name} is not installed!`);
29
+ }
30
+ }
@@ -0,0 +1 @@
1
+ export * from "./reanimated";
@@ -0,0 +1,19 @@
1
+ import type * as ReanimatedT from "react-native-reanimated";
2
+
3
+ import {
4
+ OptionalDependencyNotInstalledError,
5
+ createModuleProxy,
6
+ } from "../ModuleProxy";
7
+
8
+ type TReanimated = typeof ReanimatedT;
9
+
10
+ const Reanimated = createModuleProxy<TReanimated>(() => {
11
+ try {
12
+ return require("react-native-reanimated");
13
+ } catch (e) {
14
+ throw new OptionalDependencyNotInstalledError("react-native-reanimated");
15
+ }
16
+ });
17
+
18
+ // eslint-disable-next-line import/no-default-export
19
+ export default Reanimated;
@@ -0,0 +1,2 @@
1
+ export { registerWebGPUForReanimated } from "./registerWebGPUForReanimated";
2
+ export { default as Reanimated } from "./ReanimatedProxy";