@shopify/react-native-skia 1.2.0 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. package/android/cpp/rnskia-android/RNSkAndroidPlatformContext.h +3 -3
  2. package/android/src/main/java/com/shopify/reactnative/skia/ViewScreenshotService.java +13 -8
  3. package/cpp/api/JsiNativeBuffer.h +43 -0
  4. package/cpp/api/JsiSkApi.h +3 -3
  5. package/cpp/api/JsiSkImageFactory.h +3 -3
  6. package/cpp/rnskia/RNSkPlatformContext.h +5 -5
  7. package/ios/RNSkia-iOS/RNSkiOSPlatformContext.h +3 -3
  8. package/ios/RNSkia-iOS/RNSkiOSPlatformContext.mm +70 -93
  9. package/ios/RNSkia-iOS/SkiaCVPixelBufferUtils.h +119 -0
  10. package/ios/RNSkia-iOS/SkiaCVPixelBufferUtils.mm +332 -0
  11. package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.h +2 -1
  12. package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.mm +27 -6
  13. package/lib/commonjs/external/ModuleProxy.d.ts +10 -0
  14. package/lib/commonjs/external/ModuleProxy.js +36 -0
  15. package/lib/commonjs/external/ModuleProxy.js.map +1 -0
  16. package/lib/commonjs/external/reanimated/ReanimatedProxy.d.ts +3 -0
  17. package/lib/commonjs/external/reanimated/ReanimatedProxy.js +18 -0
  18. package/lib/commonjs/external/reanimated/ReanimatedProxy.js.map +1 -0
  19. package/lib/commonjs/external/reanimated/buffers.js +9 -6
  20. package/lib/commonjs/external/reanimated/buffers.js.map +1 -1
  21. package/lib/commonjs/external/reanimated/interpolators.js +8 -7
  22. package/lib/commonjs/external/reanimated/interpolators.js.map +1 -1
  23. package/lib/commonjs/external/reanimated/renderHelpers.js +27 -11
  24. package/lib/commonjs/external/reanimated/renderHelpers.js.map +1 -1
  25. package/lib/commonjs/external/reanimated/textures.js +4 -3
  26. package/lib/commonjs/external/reanimated/textures.js.map +1 -1
  27. package/lib/commonjs/external/reanimated/useAnimatedImageValue.js +6 -6
  28. package/lib/commonjs/external/reanimated/useAnimatedImageValue.js.map +1 -1
  29. package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js +6 -5
  30. package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js.map +1 -1
  31. package/lib/commonjs/renderer/Offscreen.js +1 -5
  32. package/lib/commonjs/renderer/Offscreen.js.map +1 -1
  33. package/lib/commonjs/skia/types/Image/ImageFactory.d.ts +8 -15
  34. package/lib/commonjs/skia/types/Image/ImageFactory.js +1 -10
  35. package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -1
  36. package/lib/commonjs/skia/types/NativeBuffer/NativeBufferFactory.d.ts +18 -0
  37. package/lib/commonjs/skia/types/NativeBuffer/NativeBufferFactory.js +13 -0
  38. package/lib/commonjs/skia/types/NativeBuffer/NativeBufferFactory.js.map +1 -0
  39. package/lib/commonjs/skia/types/NativeBuffer/index.d.ts +1 -0
  40. package/lib/commonjs/skia/types/NativeBuffer/index.js +17 -0
  41. package/lib/commonjs/skia/types/NativeBuffer/index.js.map +1 -0
  42. package/lib/commonjs/skia/types/Skia.d.ts +2 -2
  43. package/lib/commonjs/skia/types/Skia.js.map +1 -1
  44. package/lib/commonjs/skia/types/index.d.ts +1 -1
  45. package/lib/commonjs/skia/types/index.js +4 -4
  46. package/lib/commonjs/skia/types/index.js.map +1 -1
  47. package/lib/commonjs/skia/web/JsiSkImageFactory.d.ts +3 -2
  48. package/lib/commonjs/skia/web/JsiSkImageFactory.js +18 -2
  49. package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -1
  50. package/lib/commonjs/skia/web/JsiSkNativeBufferFactory.d.ts +8 -0
  51. package/lib/commonjs/skia/web/JsiSkNativeBufferFactory.js +29 -0
  52. package/lib/commonjs/skia/web/JsiSkNativeBufferFactory.js.map +1 -0
  53. package/lib/commonjs/skia/web/JsiSkia.js +2 -2
  54. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
  55. package/lib/commonjs/specs/NativeSkiaModule.web.d.ts +0 -2
  56. package/lib/commonjs/specs/NativeSkiaModule.web.js +0 -8
  57. package/lib/commonjs/specs/NativeSkiaModule.web.js.map +1 -1
  58. package/lib/module/external/ModuleProxy.d.ts +10 -0
  59. package/lib/module/external/ModuleProxy.js +28 -0
  60. package/lib/module/external/ModuleProxy.js.map +1 -0
  61. package/lib/module/external/reanimated/ReanimatedProxy.d.ts +3 -0
  62. package/lib/module/external/reanimated/ReanimatedProxy.js +12 -0
  63. package/lib/module/external/reanimated/ReanimatedProxy.js.map +1 -0
  64. package/lib/module/external/reanimated/buffers.js +8 -6
  65. package/lib/module/external/reanimated/buffers.js.map +1 -1
  66. package/lib/module/external/reanimated/interpolators.js +7 -7
  67. package/lib/module/external/reanimated/interpolators.js.map +1 -1
  68. package/lib/module/external/reanimated/renderHelpers.js +26 -11
  69. package/lib/module/external/reanimated/renderHelpers.js.map +1 -1
  70. package/lib/module/external/reanimated/textures.js +3 -3
  71. package/lib/module/external/reanimated/textures.js.map +1 -1
  72. package/lib/module/external/reanimated/useAnimatedImageValue.js +5 -6
  73. package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -1
  74. package/lib/module/external/reanimated/useDerivedValueOnJS.js +5 -5
  75. package/lib/module/external/reanimated/useDerivedValueOnJS.js.map +1 -1
  76. package/lib/module/renderer/Offscreen.js +1 -5
  77. package/lib/module/renderer/Offscreen.js.map +1 -1
  78. package/lib/module/skia/types/Image/ImageFactory.d.ts +8 -15
  79. package/lib/module/skia/types/Image/ImageFactory.js +1 -10
  80. package/lib/module/skia/types/Image/ImageFactory.js.map +1 -1
  81. package/lib/module/skia/types/NativeBuffer/NativeBufferFactory.d.ts +18 -0
  82. package/lib/module/skia/types/NativeBuffer/NativeBufferFactory.js +4 -0
  83. package/lib/module/skia/types/NativeBuffer/NativeBufferFactory.js.map +1 -0
  84. package/lib/module/skia/types/NativeBuffer/index.d.ts +1 -0
  85. package/lib/module/skia/types/NativeBuffer/index.js +2 -0
  86. package/lib/module/skia/types/NativeBuffer/index.js.map +1 -0
  87. package/lib/module/skia/types/Skia.d.ts +2 -2
  88. package/lib/module/skia/types/Skia.js.map +1 -1
  89. package/lib/module/skia/types/index.d.ts +1 -1
  90. package/lib/module/skia/types/index.js +1 -1
  91. package/lib/module/skia/types/index.js.map +1 -1
  92. package/lib/module/skia/web/JsiSkImageFactory.d.ts +3 -2
  93. package/lib/module/skia/web/JsiSkImageFactory.js +18 -2
  94. package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -1
  95. package/lib/module/skia/web/JsiSkNativeBufferFactory.d.ts +8 -0
  96. package/lib/module/skia/web/JsiSkNativeBufferFactory.js +22 -0
  97. package/lib/module/skia/web/JsiSkNativeBufferFactory.js.map +1 -0
  98. package/lib/module/skia/web/JsiSkia.js +2 -2
  99. package/lib/module/skia/web/JsiSkia.js.map +1 -1
  100. package/lib/module/specs/NativeSkiaModule.web.d.ts +0 -2
  101. package/lib/module/specs/NativeSkiaModule.web.js +0 -3
  102. package/lib/module/specs/NativeSkiaModule.web.js.map +1 -1
  103. package/lib/typescript/src/external/ModuleProxy.d.ts +10 -0
  104. package/lib/typescript/src/external/reanimated/ReanimatedProxy.d.ts +3 -0
  105. package/lib/typescript/src/skia/types/Image/ImageFactory.d.ts +8 -15
  106. package/lib/typescript/src/skia/types/NativeBuffer/NativeBufferFactory.d.ts +18 -0
  107. package/lib/typescript/src/skia/types/NativeBuffer/index.d.ts +1 -0
  108. package/lib/typescript/src/skia/types/Skia.d.ts +2 -2
  109. package/lib/typescript/src/skia/types/index.d.ts +1 -1
  110. package/lib/typescript/src/skia/web/JsiSkImageFactory.d.ts +3 -2
  111. package/lib/typescript/src/skia/web/JsiSkNativeBufferFactory.d.ts +8 -0
  112. package/lib/typescript/src/specs/NativeSkiaModule.web.d.ts +0 -2
  113. package/libs/ios/libskia.xcframework/Info.plist +5 -5
  114. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  115. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  116. package/libs/ios/libskottie.xcframework/Info.plist +5 -5
  117. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  118. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  119. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
  120. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  121. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  122. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  123. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  124. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  125. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
  126. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
  127. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  128. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  129. package/package.json +1 -1
  130. package/src/external/ModuleProxy.ts +30 -0
  131. package/src/external/reanimated/ReanimatedProxy.ts +18 -0
  132. package/src/external/reanimated/buffers.ts +7 -6
  133. package/src/external/reanimated/interpolators.ts +7 -12
  134. package/src/external/reanimated/renderHelpers.ts +31 -18
  135. package/src/external/reanimated/textures.tsx +3 -3
  136. package/src/external/reanimated/useAnimatedImageValue.ts +5 -10
  137. package/src/external/reanimated/useDerivedValueOnJS.ts +5 -10
  138. package/src/renderer/Offscreen.tsx +1 -7
  139. package/src/skia/types/Image/ImageFactory.ts +7 -23
  140. package/src/skia/types/NativeBuffer/NativeBufferFactory.ts +38 -0
  141. package/src/skia/types/NativeBuffer/index.ts +1 -0
  142. package/src/skia/types/Skia.ts +2 -2
  143. package/src/skia/types/index.ts +1 -1
  144. package/src/skia/web/JsiSkImageFactory.ts +28 -6
  145. package/src/skia/web/JsiSkNativeBufferFactory.ts +35 -0
  146. package/src/skia/web/JsiSkia.ts +2 -2
  147. package/src/specs/NativeSkiaModule.web.ts +0 -4
  148. package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaDrawViewManagerDelegate.java +0 -34
  149. package/cpp/api/JsiPlatformBuffer.h +0 -51
  150. package/cpp/skia/include/gpu/GrBackendDrawableInfo.h +0 -9
  151. package/lib/commonjs/external/reanimated/moduleWrapper.d.ts +0 -15
  152. package/lib/commonjs/external/reanimated/moduleWrapper.js +0 -46
  153. package/lib/commonjs/external/reanimated/moduleWrapper.js.map +0 -1
  154. package/lib/commonjs/skia/types/PlatformBuffer/PlatformBufferFactory.d.ts +0 -12
  155. package/lib/commonjs/skia/types/PlatformBuffer/PlatformBufferFactory.js +0 -6
  156. package/lib/commonjs/skia/types/PlatformBuffer/PlatformBufferFactory.js.map +0 -1
  157. package/lib/commonjs/skia/types/PlatformBuffer/index.d.ts +0 -1
  158. package/lib/commonjs/skia/types/PlatformBuffer/index.js +0 -17
  159. package/lib/commonjs/skia/types/PlatformBuffer/index.js.map +0 -1
  160. package/lib/commonjs/skia/web/JsiSkPlatformBufferFactory.d.ts +0 -8
  161. package/lib/commonjs/skia/web/JsiSkPlatformBufferFactory.js +0 -20
  162. package/lib/commonjs/skia/web/JsiSkPlatformBufferFactory.js.map +0 -1
  163. package/lib/module/external/reanimated/moduleWrapper.d.ts +0 -15
  164. package/lib/module/external/reanimated/moduleWrapper.js +0 -37
  165. package/lib/module/external/reanimated/moduleWrapper.js.map +0 -1
  166. package/lib/module/skia/types/PlatformBuffer/PlatformBufferFactory.d.ts +0 -12
  167. package/lib/module/skia/types/PlatformBuffer/PlatformBufferFactory.js +0 -2
  168. package/lib/module/skia/types/PlatformBuffer/PlatformBufferFactory.js.map +0 -1
  169. package/lib/module/skia/types/PlatformBuffer/index.d.ts +0 -1
  170. package/lib/module/skia/types/PlatformBuffer/index.js +0 -2
  171. package/lib/module/skia/types/PlatformBuffer/index.js.map +0 -1
  172. package/lib/module/skia/web/JsiSkPlatformBufferFactory.d.ts +0 -8
  173. package/lib/module/skia/web/JsiSkPlatformBufferFactory.js +0 -13
  174. package/lib/module/skia/web/JsiSkPlatformBufferFactory.js.map +0 -1
  175. package/lib/typescript/src/external/reanimated/moduleWrapper.d.ts +0 -15
  176. package/lib/typescript/src/skia/types/PlatformBuffer/PlatformBufferFactory.d.ts +0 -12
  177. package/lib/typescript/src/skia/types/PlatformBuffer/index.d.ts +0 -1
  178. package/lib/typescript/src/skia/web/JsiSkPlatformBufferFactory.d.ts +0 -8
  179. package/src/external/reanimated/moduleWrapper.ts +0 -83
  180. package/src/skia/types/PlatformBuffer/PlatformBufferFactory.ts +0 -14
  181. package/src/skia/types/PlatformBuffer/index.ts +0 -1
  182. package/src/skia/web/JsiSkPlatformBufferFactory.ts +0 -22
@@ -1 +1 @@
1
- {"version":3,"names":["_Picture","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Data","_SVG","_Surface","_Vertices","_RuntimeEffect","_Shader","_Image","_AnimatedImage","_ColorFilter","_ImageFilter","_Font","_Typeface","_Paint","_Path","_Color","_Canvas","_ContourMeasure","_MaskFilter","_Matrix","_PathEffect","_Point","_Rect","_RRect","_RSXform","_JsiInstance","_Skia","_TextBlob","_Size","_Paragraph","_Matrix2","_PlatformBuffer"],"sources":["index.ts"],"sourcesContent":["export * from \"./Picture\";\nexport * from \"./Data\";\nexport * from \"./SVG\";\nexport * from \"./Surface\";\nexport * from \"./Vertices\";\nexport * from \"./RuntimeEffect\";\nexport * from \"./Shader\";\nexport * from \"./Image\";\nexport * from \"./AnimatedImage\";\nexport * from \"./ColorFilter\";\nexport * from \"./ImageFilter\";\nexport * from \"./Font\";\nexport * from \"./Typeface\";\nexport * from \"./Paint\";\nexport * from \"./Path\";\nexport * from \"./Color\";\nexport * from \"./Canvas\";\nexport * from \"./ContourMeasure\";\nexport * from \"./MaskFilter\";\nexport * from \"./Matrix\";\nexport * from \"./PathEffect\";\nexport * from \"./Point\";\nexport * from \"./Rect\";\nexport * from \"./RRect\";\nexport * from \"./RSXform\";\nexport * from \"./JsiInstance\";\nexport * from \"./Skia\";\nexport * from \"./TextBlob\";\nexport * from \"./Size\";\nexport * from \"./Paragraph\";\nexport * from \"./Matrix4\";\nexport * from \"./PlatformBuffer\";\n"],"mappings":";;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,QAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,QAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,QAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,KAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,KAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,KAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,KAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,IAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,IAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,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AAA,CAAAD,GAAA,MAAAiC,UAAA,CAAAjC,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAA6B,UAAA,CAAAjC,GAAA;IAAA;EAAA;AAAA;AACA,IAAAkC,QAAA,GAAAtC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAoC,QAAA,EAAAnC,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAkC,QAAA,CAAAlC,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAA8B,QAAA,CAAAlC,GAAA;IAAA;EAAA;AAAA;AACA,IAAAmC,eAAA,GAAAvC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAqC,eAAA,EAAApC,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAmC,eAAA,CAAAnC,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAA+B,eAAA,CAAAnC,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":["_Picture","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Data","_SVG","_Surface","_Vertices","_RuntimeEffect","_Shader","_Image","_AnimatedImage","_ColorFilter","_ImageFilter","_Font","_Typeface","_Paint","_Path","_Color","_Canvas","_ContourMeasure","_MaskFilter","_Matrix","_PathEffect","_Point","_Rect","_RRect","_RSXform","_JsiInstance","_Skia","_TextBlob","_Size","_Paragraph","_Matrix2","_NativeBuffer"],"sources":["index.ts"],"sourcesContent":["export * from \"./Picture\";\nexport * from \"./Data\";\nexport * from \"./SVG\";\nexport * from \"./Surface\";\nexport * from \"./Vertices\";\nexport * from \"./RuntimeEffect\";\nexport * from \"./Shader\";\nexport * from \"./Image\";\nexport * from \"./AnimatedImage\";\nexport * from \"./ColorFilter\";\nexport * from \"./ImageFilter\";\nexport * from \"./Font\";\nexport * from \"./Typeface\";\nexport * from \"./Paint\";\nexport * from \"./Path\";\nexport * from \"./Color\";\nexport * from \"./Canvas\";\nexport * from \"./ContourMeasure\";\nexport * from \"./MaskFilter\";\nexport * from \"./Matrix\";\nexport * from \"./PathEffect\";\nexport * from \"./Point\";\nexport * from \"./Rect\";\nexport * from \"./RRect\";\nexport * from \"./RSXform\";\nexport * from \"./JsiInstance\";\nexport * from \"./Skia\";\nexport * from \"./TextBlob\";\nexport * from \"./Size\";\nexport * from \"./Paragraph\";\nexport * from \"./Matrix4\";\nexport * from \"./NativeBuffer\";\n"],"mappings":";;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,QAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,QAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,QAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,KAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,KAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,KAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,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1,11 +1,12 @@
1
1
  import type { CanvasKit } from "canvaskit-wasm";
2
- import type { SkData, ImageInfo, SkImage, PlatformBuffer, ImageFactory } from "../types";
2
+ import type { SkData, ImageInfo, SkImage, NativeBuffer, ImageFactory } from "../types";
3
3
  import { Host } from "./Host";
4
4
  import { JsiSkImage } from "./JsiSkImage";
5
+ import type { JsiSkSurface } from "./JsiSkSurface";
5
6
  export declare class JsiSkImageFactory extends Host implements ImageFactory {
6
7
  constructor(CanvasKit: CanvasKit);
7
8
  MakeImageFromViewTag(viewTag: number): Promise<SkImage | null>;
8
- MakeImageFromPlatformBuffer(_platformBuffer: PlatformBuffer): SkImage;
9
+ MakeImageFromNativeBuffer(buffer: NativeBuffer, surface?: JsiSkSurface, image?: JsiSkImage): JsiSkImage;
9
10
  MakeImageFromEncoded(encoded: SkData): JsiSkImage | null;
10
11
  MakeImage(info: ImageInfo, data: SkData, bytesPerRow: number): JsiSkImage | null;
11
12
  }
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.JsiSkImageFactory = void 0;
7
+ var _types = require("../types");
7
8
  var _Host = require("./Host");
8
9
  var _JsiSkImage = require("./JsiSkImage");
9
10
  var _JsiSkData = require("./JsiSkData");
@@ -17,8 +18,23 @@ class JsiSkImageFactory extends _Host.Host {
17
18
  console.log(view);
18
19
  return Promise.resolve(null);
19
20
  }
20
- MakeImageFromPlatformBuffer(_platformBuffer) {
21
- throw new Error("MakeImageFromPlatformBuffer() is only available on iOS and Android!");
21
+ MakeImageFromNativeBuffer(buffer, surface, image) {
22
+ if (!(0, _types.isNativeBufferWeb)(buffer)) {
23
+ throw new Error("Invalid NativeBuffer");
24
+ }
25
+ if (!surface) {
26
+ // TODO: this is way to slow
27
+ const img = this.CanvasKit.MakeImageFromCanvasImageSource(buffer);
28
+ return new _JsiSkImage.JsiSkImage(this.CanvasKit, img);
29
+ } else if (!image) {
30
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
+ const img = surface.makeImageFromTextureSource(buffer);
32
+ return new _JsiSkImage.JsiSkImage(this.CanvasKit, img);
33
+ } else {
34
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
+ const img = surface.updateTextureFromSource(image, buffer);
36
+ return new _JsiSkImage.JsiSkImage(this.CanvasKit, img);
37
+ }
22
38
  }
23
39
  MakeImageFromEncoded(encoded) {
24
40
  const image = this.CanvasKit.MakeImageFromEncoded(_JsiSkData.JsiSkData.fromValue(encoded));
@@ -1 +1 @@
1
- {"version":3,"names":["_Host","require","_JsiSkImage","_JsiSkData","JsiSkImageFactory","Host","constructor","CanvasKit","MakeImageFromViewTag","viewTag","view","console","log","Promise","resolve","MakeImageFromPlatformBuffer","_platformBuffer","Error","MakeImageFromEncoded","encoded","image","JsiSkData","fromValue","JsiSkImage","MakeImage","info","data","bytesPerRow","alphaType","getEnum","AlphaType","colorSpace","ColorSpace","SRGB","colorType","ColorType","height","width","exports"],"sources":["JsiSkImageFactory.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type {\n SkData,\n ImageInfo,\n SkImage,\n PlatformBuffer,\n ImageFactory,\n} from \"../types\";\n\nimport { Host, getEnum } from \"./Host\";\nimport { JsiSkImage } from \"./JsiSkImage\";\nimport { JsiSkData } from \"./JsiSkData\";\n\nexport class JsiSkImageFactory extends Host implements ImageFactory {\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n\n MakeImageFromViewTag(viewTag: number): Promise<SkImage | null> {\n const view = viewTag as unknown as HTMLElement;\n // TODO: Implement screenshot from view in React JS\n console.log(view);\n return Promise.resolve(null);\n }\n\n MakeImageFromPlatformBuffer(_platformBuffer: PlatformBuffer): SkImage {\n throw new Error(\n \"MakeImageFromPlatformBuffer() is only available on iOS and Android!\"\n );\n }\n\n MakeImageFromEncoded(encoded: SkData) {\n const image = this.CanvasKit.MakeImageFromEncoded(\n JsiSkData.fromValue(encoded)\n );\n if (image === null) {\n return null;\n }\n return new JsiSkImage(this.CanvasKit, image);\n }\n\n MakeImage(info: ImageInfo, data: SkData, bytesPerRow: number) {\n // see toSkImageInfo() from canvaskit\n const image = this.CanvasKit.MakeImage(\n {\n alphaType: getEnum(this.CanvasKit.AlphaType, info.alphaType),\n colorSpace: this.CanvasKit.ColorSpace.SRGB,\n colorType: getEnum(this.CanvasKit.ColorType, info.colorType),\n height: info.height,\n width: info.width,\n },\n JsiSkData.fromValue(data),\n bytesPerRow\n );\n if (image === null) {\n return null;\n }\n return new JsiSkImage(this.CanvasKit, image);\n }\n}\n"],"mappings":";;;;;;AAUA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEO,MAAMG,iBAAiB,SAASC,UAAI,CAAyB;EAClEC,WAAWA,CAACC,SAAoB,EAAE;IAChC,KAAK,CAACA,SAAS,CAAC;EAClB;EAEAC,oBAAoBA,CAACC,OAAe,EAA2B;IAC7D,MAAMC,IAAI,GAAGD,OAAiC;IAC9C;IACAE,OAAO,CAACC,GAAG,CAACF,IAAI,CAAC;IACjB,OAAOG,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;EAC9B;EAEAC,2BAA2BA,CAACC,eAA+B,EAAW;IACpE,MAAM,IAAIC,KAAK,CACb,qEACF,CAAC;EACH;EAEAC,oBAAoBA,CAACC,OAAe,EAAE;IACpC,MAAMC,KAAK,GAAG,IAAI,CAACb,SAAS,CAACW,oBAAoB,CAC/CG,oBAAS,CAACC,SAAS,CAACH,OAAO,CAC7B,CAAC;IACD,IAAIC,KAAK,KAAK,IAAI,EAAE;MAClB,OAAO,IAAI;IACb;IACA,OAAO,IAAIG,sBAAU,CAAC,IAAI,CAAChB,SAAS,EAAEa,KAAK,CAAC;EAC9C;EAEAI,SAASA,CAACC,IAAe,EAAEC,IAAY,EAAEC,WAAmB,EAAE;IAC5D;IACA,MAAMP,KAAK,GAAG,IAAI,CAACb,SAAS,CAACiB,SAAS,CACpC;MACEI,SAAS,EAAE,IAAAC,aAAO,EAAC,IAAI,CAACtB,SAAS,CAACuB,SAAS,EAAEL,IAAI,CAACG,SAAS,CAAC;MAC5DG,UAAU,EAAE,IAAI,CAACxB,SAAS,CAACyB,UAAU,CAACC,IAAI;MAC1CC,SAAS,EAAE,IAAAL,aAAO,EAAC,IAAI,CAACtB,SAAS,CAAC4B,SAAS,EAAEV,IAAI,CAACS,SAAS,CAAC;MAC5DE,MAAM,EAAEX,IAAI,CAACW,MAAM;MACnBC,KAAK,EAAEZ,IAAI,CAACY;IACd,CAAC,EACDhB,oBAAS,CAACC,SAAS,CAACI,IAAI,CAAC,EACzBC,WACF,CAAC;IACD,IAAIP,KAAK,KAAK,IAAI,EAAE;MAClB,OAAO,IAAI;IACb;IACA,OAAO,IAAIG,sBAAU,CAAC,IAAI,CAAChB,SAAS,EAAEa,KAAK,CAAC;EAC9C;AACF;AAACkB,OAAA,CAAAlC,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"names":["_types","require","_Host","_JsiSkImage","_JsiSkData","JsiSkImageFactory","Host","constructor","CanvasKit","MakeImageFromViewTag","viewTag","view","console","log","Promise","resolve","MakeImageFromNativeBuffer","buffer","surface","image","isNativeBufferWeb","Error","img","MakeImageFromCanvasImageSource","JsiSkImage","makeImageFromTextureSource","updateTextureFromSource","MakeImageFromEncoded","encoded","JsiSkData","fromValue","MakeImage","info","data","bytesPerRow","alphaType","getEnum","AlphaType","colorSpace","ColorSpace","SRGB","colorType","ColorType","height","width","exports"],"sources":["JsiSkImageFactory.ts"],"sourcesContent":["import type { CanvasKit, Image } from \"canvaskit-wasm\";\n\nimport { isNativeBufferWeb } from \"../types\";\nimport type {\n SkData,\n ImageInfo,\n SkImage,\n NativeBuffer,\n ImageFactory,\n} from \"../types\";\n\nimport { Host, getEnum } from \"./Host\";\nimport { JsiSkImage } from \"./JsiSkImage\";\nimport { JsiSkData } from \"./JsiSkData\";\nimport type { JsiSkSurface } from \"./JsiSkSurface\";\n\nexport class JsiSkImageFactory extends Host implements ImageFactory {\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n\n MakeImageFromViewTag(viewTag: number): Promise<SkImage | null> {\n const view = viewTag as unknown as HTMLElement;\n // TODO: Implement screenshot from view in React JS\n console.log(view);\n return Promise.resolve(null);\n }\n\n MakeImageFromNativeBuffer(\n buffer: NativeBuffer,\n surface?: JsiSkSurface,\n image?: JsiSkImage\n ) {\n if (!isNativeBufferWeb(buffer)) {\n throw new Error(\"Invalid NativeBuffer\");\n }\n if (!surface) {\n // TODO: this is way to slow\n const img = this.CanvasKit.MakeImageFromCanvasImageSource(buffer);\n return new JsiSkImage(this.CanvasKit, img);\n } else if (!image) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const img = (surface as any).makeImageFromTextureSource(buffer) as Image;\n return new JsiSkImage(this.CanvasKit, img);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const img = (surface as any).updateTextureFromSource(\n image,\n buffer\n ) as Image;\n return new JsiSkImage(this.CanvasKit, img);\n }\n }\n\n MakeImageFromEncoded(encoded: SkData) {\n const image = this.CanvasKit.MakeImageFromEncoded(\n JsiSkData.fromValue(encoded)\n );\n if (image === null) {\n return null;\n }\n return new JsiSkImage(this.CanvasKit, image);\n }\n\n MakeImage(info: ImageInfo, data: SkData, bytesPerRow: number) {\n // see toSkImageInfo() from canvaskit\n const image = this.CanvasKit.MakeImage(\n {\n alphaType: getEnum(this.CanvasKit.AlphaType, info.alphaType),\n colorSpace: this.CanvasKit.ColorSpace.SRGB,\n colorType: getEnum(this.CanvasKit.ColorType, info.colorType),\n height: info.height,\n width: info.width,\n },\n JsiSkData.fromValue(data),\n bytesPerRow\n );\n if (image === null) {\n return null;\n }\n return new JsiSkImage(this.CanvasKit, image);\n }\n}\n"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF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;MAClB,OAAO,IAAI;IACb;IACA,OAAO,IAAIK,sBAAU,CAAC,IAAI,CAAChB,SAAS,EAAEW,KAAK,CAAC;EAC9C;EAEAY,SAASA,CAACC,IAAe,EAAEC,IAAY,EAAEC,WAAmB,EAAE;IAC5D;IACA,MAAMf,KAAK,GAAG,IAAI,CAACX,SAAS,CAACuB,SAAS,CACpC;MACEI,SAAS,EAAE,IAAAC,aAAO,EAAC,IAAI,CAAC5B,SAAS,CAAC6B,SAAS,EAAEL,IAAI,CAACG,SAAS,CAAC;MAC5DG,UAAU,EAAE,IAAI,CAAC9B,SAAS,CAAC+B,UAAU,CAACC,IAAI;MAC1CC,SAAS,EAAE,IAAAL,aAAO,EAAC,IAAI,CAAC5B,SAAS,CAACkC,SAAS,EAAEV,IAAI,CAACS,SAAS,CAAC;MAC5DE,MAAM,EAAEX,IAAI,CAACW,MAAM;MACnBC,KAAK,EAAEZ,IAAI,CAACY;IACd,CAAC,EACDf,oBAAS,CAACC,SAAS,CAACG,IAAI,CAAC,EACzBC,WACF,CAAC;IACD,IAAIf,KAAK,KAAK,IAAI,EAAE;MAClB,OAAO,IAAI;IACb;IACA,OAAO,IAAIK,sBAAU,CAAC,IAAI,CAAChB,SAAS,EAAEW,KAAK,CAAC;EAC9C;AACF;AAAC0B,OAAA,CAAAxC,iBAAA,GAAAA,iBAAA"}
@@ -0,0 +1,8 @@
1
+ import type { CanvasKit } from "canvaskit-wasm";
2
+ import { type NativeBuffer, type NativeBufferFactory, type SkImage } from "../types";
3
+ import { Host } from "./Host";
4
+ export declare class JsiSkNativeBufferFactory extends Host implements NativeBufferFactory {
5
+ constructor(CanvasKit: CanvasKit);
6
+ MakeFromImage(image: SkImage): NativeBuffer;
7
+ Release(_platformBuffer: NativeBuffer): void;
8
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.JsiSkNativeBufferFactory = void 0;
7
+ var _Host = require("./Host");
8
+ class JsiSkNativeBufferFactory extends _Host.Host {
9
+ constructor(CanvasKit) {
10
+ super(CanvasKit);
11
+ }
12
+ MakeFromImage(image) {
13
+ const info = image.getImageInfo();
14
+ const uint8ClampedArray = new Uint8ClampedArray(image.readPixels());
15
+ const imageData = new ImageData(uint8ClampedArray, info.width, info.height);
16
+ const canvas = new OffscreenCanvas(info.width, info.height);
17
+ const ctx = canvas.getContext("2d");
18
+ if (!ctx) {
19
+ throw new Error("Failed to get 2d context from canvas");
20
+ }
21
+ ctx.putImageData(imageData, 0, 0);
22
+ return canvas;
23
+ }
24
+ Release(_platformBuffer) {
25
+ // it's a noop on Web
26
+ }
27
+ }
28
+ exports.JsiSkNativeBufferFactory = JsiSkNativeBufferFactory;
29
+ //# sourceMappingURL=JsiSkNativeBufferFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_Host","require","JsiSkNativeBufferFactory","Host","constructor","CanvasKit","MakeFromImage","image","info","getImageInfo","uint8ClampedArray","Uint8ClampedArray","readPixels","imageData","ImageData","width","height","canvas","OffscreenCanvas","ctx","getContext","Error","putImageData","Release","_platformBuffer","exports"],"sources":["JsiSkNativeBufferFactory.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport {\n type NativeBuffer,\n type NativeBufferFactory,\n type SkImage,\n} from \"../types\";\n\nimport { Host } from \"./Host\";\n\nexport class JsiSkNativeBufferFactory\n extends Host\n implements NativeBufferFactory\n{\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n\n MakeFromImage(image: SkImage): NativeBuffer {\n const info = image.getImageInfo();\n const uint8ClampedArray = new Uint8ClampedArray(image.readPixels()!);\n const imageData = new ImageData(uint8ClampedArray, info.width, info.height);\n const canvas = new OffscreenCanvas(info.width, info.height);\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) {\n throw new Error(\"Failed to get 2d context from canvas\");\n }\n ctx.putImageData(imageData, 0, 0);\n return canvas;\n }\n\n Release(_platformBuffer: NativeBuffer) {\n // it's a noop on Web\n }\n}\n"],"mappings":";;;;;;AAQA,IAAAA,KAAA,GAAAC,OAAA;AAEO,MAAMC,wBAAwB,SAC3BC,UAAI,CAEd;EACEC,WAAWA,CAACC,SAAoB,EAAE;IAChC,KAAK,CAACA,SAAS,CAAC;EAClB;EAEAC,aAAaA,CAACC,KAAc,EAAgB;IAC1C,MAAMC,IAAI,GAAGD,KAAK,CAACE,YAAY,CAAC,CAAC;IACjC,MAAMC,iBAAiB,GAAG,IAAIC,iBAAiB,CAACJ,KAAK,CAACK,UAAU,CAAC,CAAE,CAAC;IACpE,MAAMC,SAAS,GAAG,IAAIC,SAAS,CAACJ,iBAAiB,EAAEF,IAAI,CAACO,KAAK,EAAEP,IAAI,CAACQ,MAAM,CAAC;IAC3E,MAAMC,MAAM,GAAG,IAAIC,eAAe,CAACV,IAAI,CAACO,KAAK,EAAEP,IAAI,CAACQ,MAAM,CAAC;IAC3D,MAAMG,GAAG,GAAGF,MAAM,CAACG,UAAU,CAAC,IAAI,CAAC;IACnC,IAAI,CAACD,GAAG,EAAE;MACR,MAAM,IAAIE,KAAK,CAAC,sCAAsC,CAAC;IACzD;IACAF,GAAG,CAACG,YAAY,CAACT,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;IACjC,OAAOI,MAAM;EACf;EAEAM,OAAOA,CAACC,eAA6B,EAAE;IACrC;EAAA;AAEJ;AAACC,OAAA,CAAAvB,wBAAA,GAAAA,wBAAA"}
@@ -35,7 +35,7 @@ var _JsiSkTypefaceFontProviderFactory = require("./JsiSkTypefaceFontProviderFact
35
35
  var _JsiSkFontMgrFactory = require("./JsiSkFontMgrFactory");
36
36
  var _JsiSkAnimatedImageFactory = require("./JsiSkAnimatedImageFactory");
37
37
  var _JsiSkParagraphBuilderFactory = require("./JsiSkParagraphBuilderFactory");
38
- var _JsiSkPlatformBufferFactory = require("./JsiSkPlatformBufferFactory");
38
+ var _JsiSkNativeBufferFactory = require("./JsiSkNativeBufferFactory");
39
39
  const JsiSkApi = CanvasKit => ({
40
40
  Point: (x, y) => new _JsiSkPoint.JsiSkPoint(CanvasKit, Float32Array.of(x, y)),
41
41
  RuntimeShaderBuilder: _ => {
@@ -80,7 +80,7 @@ const JsiSkApi = CanvasKit => ({
80
80
  TypefaceFontProvider: new _JsiSkTypefaceFontProviderFactory.JsiSkTypefaceFontProviderFactory(CanvasKit),
81
81
  FontMgr: new _JsiSkFontMgrFactory.JsiSkFontMgrFactory(CanvasKit),
82
82
  ParagraphBuilder: new _JsiSkParagraphBuilderFactory.JsiSkParagraphBuilderFactory(CanvasKit),
83
- PlatformBuffer: new _JsiSkPlatformBufferFactory.JsiSkPlatformBufferFactory(CanvasKit)
83
+ NativeBuffer: new _JsiSkNativeBufferFactory.JsiSkNativeBufferFactory(CanvasKit)
84
84
  });
85
85
  exports.JsiSkApi = JsiSkApi;
86
86
  //# sourceMappingURL=JsiSkia.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_JsiSkPoint","require","_JsiSkPaint","_JsiSkRect","_JsiSkColor","_JsiSkSurfaceFactory","_JsiSkRRect","_JsiSkRSXform","_JsiSkContourMeasureIter","_JsiSkPictureRecorder","_JsiSkPictureFactory","_JsiSkPathFactory","_JsiSkMatrix","_JsiSkColorFilterFactory","_JsiSkTypefaceFactory","_JsiSkMaskFilterFactory","_JsiSkRuntimeEffectFactory","_JsiSkImageFilterFactory","_JsiSkShaderFactory","_JsiSkPathEffectFactory","_JsiSkDataFactory","_JsiSkImageFactory","_JsiSkSVGFactory","_JsiSkTextBlobFactory","_JsiSkFont","_JsiSkVerticesFactory","_JsiSkPath","_JsiSkTypeface","_JsiSkTypefaceFontProviderFactory","_JsiSkFontMgrFactory","_JsiSkAnimatedImageFactory","_JsiSkParagraphBuilderFactory","_JsiSkPlatformBufferFactory","JsiSkApi","CanvasKit","Point","x","y","JsiSkPoint","Float32Array","of","RuntimeShaderBuilder","_","Error","RRectXY","rect","rx","ry","JsiSkRRect","RSXform","scos","ssin","tx","ty","JsiSkRSXform","RSXformFromRadians","scale","r","px","py","s","Math","sin","c","cos","Color","ContourMeasureIter","path","forceClosed","resScale","JsiSkContourMeasureIter","JsiSkPath","fromValue","Paint","paint","JsiSkPaint","setAntiAlias","PictureRecorder","JsiSkPictureRecorder","Picture","JsiSkPictureFactory","Path","JsiSkPathFactory","Matrix","matrix","JsiSkMatrix","identity","ColorFilter","JsiSkColorFilterFactory","Font","typeface","size","JsiSkFont","undefined","JsiSkTypeface","Typeface","JsiSkTypefaceFactory","MaskFilter","JsiSkMaskFilterFactory","RuntimeEffect","JsiSkRuntimeEffectFactory","ImageFilter","JsiSkImageFilterFactory","Shader","JsiSkShaderFactory","PathEffect","JsiSkPathEffectFactory","MakeVertices","bind","Data","JsiSkDataFactory","Image","JsiSkImageFactory","AnimatedImage","JsiSkAnimatedImageFactory","SVG","JsiSkSVGFactory","TextBlob","JsiSkTextBlobFactory","XYWHRect","width","height","JsiSkRect","Surface","JsiSkSurfaceFactory","TypefaceFontProvider","JsiSkTypefaceFontProviderFactory","FontMgr","JsiSkFontMgrFactory","ParagraphBuilder","JsiSkParagraphBuilderFactory","PlatformBuffer","JsiSkPlatformBufferFactory","exports"],"sources":["JsiSkia.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type {\n SkContourMeasureIter,\n Skia,\n SkPath,\n SkRect,\n SkRuntimeEffect,\n SkRuntimeShaderBuilder,\n SkTypeface,\n} from \"../types\";\n\nimport { JsiSkPoint } from \"./JsiSkPoint\";\nimport { JsiSkPaint } from \"./JsiSkPaint\";\nimport { JsiSkRect } from \"./JsiSkRect\";\nimport { Color } from \"./JsiSkColor\";\nimport { JsiSkSurfaceFactory } from \"./JsiSkSurfaceFactory\";\nimport { JsiSkRRect } from \"./JsiSkRRect\";\nimport { JsiSkRSXform } from \"./JsiSkRSXform\";\nimport { JsiSkContourMeasureIter } from \"./JsiSkContourMeasureIter\";\nimport { JsiSkPictureRecorder } from \"./JsiSkPictureRecorder\";\nimport { JsiSkPictureFactory } from \"./JsiSkPictureFactory\";\nimport { JsiSkPathFactory } from \"./JsiSkPathFactory\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkColorFilterFactory } from \"./JsiSkColorFilterFactory\";\nimport { JsiSkTypefaceFactory } from \"./JsiSkTypefaceFactory\";\nimport { JsiSkMaskFilterFactory } from \"./JsiSkMaskFilterFactory\";\nimport { JsiSkRuntimeEffectFactory } from \"./JsiSkRuntimeEffectFactory\";\nimport { JsiSkImageFilterFactory } from \"./JsiSkImageFilterFactory\";\nimport { JsiSkShaderFactory } from \"./JsiSkShaderFactory\";\nimport { JsiSkPathEffectFactory } from \"./JsiSkPathEffectFactory\";\nimport { JsiSkDataFactory } from \"./JsiSkDataFactory\";\nimport { JsiSkImageFactory } from \"./JsiSkImageFactory\";\nimport { JsiSkSVGFactory } from \"./JsiSkSVGFactory\";\nimport { JsiSkTextBlobFactory } from \"./JsiSkTextBlobFactory\";\nimport { JsiSkFont } from \"./JsiSkFont\";\nimport { MakeVertices } from \"./JsiSkVerticesFactory\";\nimport { JsiSkPath } from \"./JsiSkPath\";\nimport { JsiSkTypeface } from \"./JsiSkTypeface\";\nimport { JsiSkTypefaceFontProviderFactory } from \"./JsiSkTypefaceFontProviderFactory\";\nimport { JsiSkFontMgrFactory } from \"./JsiSkFontMgrFactory\";\nimport { JsiSkAnimatedImageFactory } from \"./JsiSkAnimatedImageFactory\";\nimport { JsiSkParagraphBuilderFactory } from \"./JsiSkParagraphBuilderFactory\";\nimport { JsiSkPlatformBufferFactory } from \"./JsiSkPlatformBufferFactory\";\n\nexport const JsiSkApi = (CanvasKit: CanvasKit): Skia => ({\n Point: (x: number, y: number) =>\n new JsiSkPoint(CanvasKit, Float32Array.of(x, y)),\n RuntimeShaderBuilder: (_: SkRuntimeEffect): SkRuntimeShaderBuilder => {\n throw new Error(\"Not implemented on React Native Web\");\n },\n RRectXY: (rect: SkRect, rx: number, ry: number) =>\n new JsiSkRRect(CanvasKit, rect, rx, ry),\n RSXform: (scos: number, ssin: number, tx: number, ty: number) =>\n new JsiSkRSXform(CanvasKit, Float32Array.of(scos, ssin, tx, ty)),\n RSXformFromRadians: (\n scale: number,\n r: number,\n tx: number,\n ty: number,\n px: number,\n py: number\n ) => {\n const s = Math.sin(r) * scale;\n const c = Math.cos(r) * scale;\n return new JsiSkRSXform(\n CanvasKit,\n Float32Array.of(c, s, tx - c * px + s * py, ty - s * px - c * py)\n );\n },\n Color,\n ContourMeasureIter: (\n path: SkPath,\n forceClosed: boolean,\n resScale: number\n ): SkContourMeasureIter =>\n new JsiSkContourMeasureIter(\n CanvasKit,\n new CanvasKit.ContourMeasureIter(\n JsiSkPath.fromValue(path),\n forceClosed,\n resScale\n )\n ),\n Paint: () => {\n const paint = new JsiSkPaint(CanvasKit, new CanvasKit.Paint());\n paint.setAntiAlias(true);\n return paint;\n },\n PictureRecorder: () =>\n new JsiSkPictureRecorder(CanvasKit, new CanvasKit.PictureRecorder()),\n Picture: new JsiSkPictureFactory(CanvasKit),\n Path: new JsiSkPathFactory(CanvasKit),\n Matrix: (matrix?: readonly number[]) =>\n new JsiSkMatrix(\n CanvasKit,\n matrix\n ? Float32Array.of(...matrix)\n : Float32Array.of(...CanvasKit.Matrix.identity())\n ),\n ColorFilter: new JsiSkColorFilterFactory(CanvasKit),\n Font: (typeface?: SkTypeface, size?: number) =>\n new JsiSkFont(\n CanvasKit,\n new CanvasKit.Font(\n typeface === undefined ? null : JsiSkTypeface.fromValue(typeface),\n size\n )\n ),\n Typeface: new JsiSkTypefaceFactory(CanvasKit),\n MaskFilter: new JsiSkMaskFilterFactory(CanvasKit),\n RuntimeEffect: new JsiSkRuntimeEffectFactory(CanvasKit),\n ImageFilter: new JsiSkImageFilterFactory(CanvasKit),\n Shader: new JsiSkShaderFactory(CanvasKit),\n PathEffect: new JsiSkPathEffectFactory(CanvasKit),\n MakeVertices: MakeVertices.bind(null, CanvasKit),\n Data: new JsiSkDataFactory(CanvasKit),\n Image: new JsiSkImageFactory(CanvasKit),\n AnimatedImage: new JsiSkAnimatedImageFactory(CanvasKit),\n SVG: new JsiSkSVGFactory(CanvasKit),\n TextBlob: new JsiSkTextBlobFactory(CanvasKit),\n XYWHRect: (x: number, y: number, width: number, height: number) => {\n return new JsiSkRect(CanvasKit, CanvasKit.XYWHRect(x, y, width, height));\n },\n Surface: new JsiSkSurfaceFactory(CanvasKit),\n TypefaceFontProvider: new JsiSkTypefaceFontProviderFactory(CanvasKit),\n FontMgr: new JsiSkFontMgrFactory(CanvasKit),\n ParagraphBuilder: new JsiSkParagraphBuilderFactory(CanvasKit),\n PlatformBuffer: new JsiSkPlatformBufferFactory(CanvasKit),\n});\n"],"mappings":";;;;;;AAYA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,wBAAA,GAAAP,OAAA;AACA,IAAAQ,qBAAA,GAAAR,OAAA;AACA,IAAAS,oBAAA,GAAAT,OAAA;AACA,IAAAU,iBAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,wBAAA,GAAAZ,OAAA;AACA,IAAAa,qBAAA,GAAAb,OAAA;AACA,IAAAc,uBAAA,GAAAd,OAAA;AACA,IAAAe,0BAAA,GAAAf,OAAA;AACA,IAAAgB,wBAAA,GAAAhB,OAAA;AACA,IAAAiB,mBAAA,GAAAjB,OAAA;AACA,IAAAkB,uBAAA,GAAAlB,OAAA;AACA,IAAAmB,iBAAA,GAAAnB,OAAA;AACA,IAAAoB,kBAAA,GAAApB,OAAA;AACA,IAAAqB,gBAAA,GAAArB,OAAA;AACA,IAAAsB,qBAAA,GAAAtB,OAAA;AACA,IAAAuB,UAAA,GA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0DAA4B,CAAChG,SAAS,CAAC;EAC7DiG,cAAc,EAAE,IAAIC,sDAA0B,CAAClG,SAAS;AAC1D,CAAC,CAAC;AAACmG,OAAA,CAAApG,QAAA,GAAAA,QAAA"}
1
+ {"version":3,"names":["_JsiSkPoint","require","_JsiSkPaint","_JsiSkRect","_JsiSkColor","_JsiSkSurfaceFactory","_JsiSkRRect","_JsiSkRSXform","_JsiSkContourMeasureIter","_JsiSkPictureRecorder","_JsiSkPictureFactory","_JsiSkPathFactory","_JsiSkMatrix","_JsiSkColorFilterFactory","_JsiSkTypefaceFactory","_JsiSkMaskFilterFactory","_JsiSkRuntimeEffectFactory","_JsiSkImageFilterFactory","_JsiSkShaderFactory","_JsiSkPathEffectFactory","_JsiSkDataFactory","_JsiSkImageFactory","_JsiSkSVGFactory","_JsiSkTextBlobFactory","_JsiSkFont","_JsiSkVerticesFactory","_JsiSkPath","_JsiSkTypeface","_JsiSkTypefaceFontProviderFactory","_JsiSkFontMgrFactory","_JsiSkAnimatedImageFactory","_JsiSkParagraphBuilderFactory","_JsiSkNativeBufferFactory","JsiSkApi","CanvasKit","Point","x","y","JsiSkPoint","Float32Array","of","RuntimeShaderBuilder","_","Error","RRectXY","rect","rx","ry","JsiSkRRect","RSXform","scos","ssin","tx","ty","JsiSkRSXform","RSXformFromRadians","scale","r","px","py","s","Math","sin","c","cos","Color","ContourMeasureIter","path","forceClosed","resScale","JsiSkContourMeasureIter","JsiSkPath","fromValue","Paint","paint","JsiSkPaint","setAntiAlias","PictureRecorder","JsiSkPictureRecorder","Picture","JsiSkPictureFactory","Path","JsiSkPathFactory","Matrix","matrix","JsiSkMatrix","identity","ColorFilter","JsiSkColorFilterFactory","Font","typeface","size","JsiSkFont","undefined","JsiSkTypeface","Typeface","JsiSkTypefaceFactory","MaskFilter","JsiSkMaskFilterFactory","RuntimeEffect","JsiSkRuntimeEffectFactory","ImageFilter","JsiSkImageFilterFactory","Shader","JsiSkShaderFactory","PathEffect","JsiSkPathEffectFactory","MakeVertices","bind","Data","JsiSkDataFactory","Image","JsiSkImageFactory","AnimatedImage","JsiSkAnimatedImageFactory","SVG","JsiSkSVGFactory","TextBlob","JsiSkTextBlobFactory","XYWHRect","width","height","JsiSkRect","Surface","JsiSkSurfaceFactory","TypefaceFontProvider","JsiSkTypefaceFontProviderFactory","FontMgr","JsiSkFontMgrFactory","ParagraphBuilder","JsiSkParagraphBuilderFactory","NativeBuffer","JsiSkNativeBufferFactory","exports"],"sources":["JsiSkia.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type {\n SkContourMeasureIter,\n Skia,\n SkPath,\n SkRect,\n SkRuntimeEffect,\n SkRuntimeShaderBuilder,\n SkTypeface,\n} from \"../types\";\n\nimport { JsiSkPoint } from \"./JsiSkPoint\";\nimport { JsiSkPaint } from \"./JsiSkPaint\";\nimport { JsiSkRect } from \"./JsiSkRect\";\nimport { Color } from \"./JsiSkColor\";\nimport { JsiSkSurfaceFactory } from \"./JsiSkSurfaceFactory\";\nimport { JsiSkRRect } from \"./JsiSkRRect\";\nimport { JsiSkRSXform } from \"./JsiSkRSXform\";\nimport { JsiSkContourMeasureIter } from \"./JsiSkContourMeasureIter\";\nimport { JsiSkPictureRecorder } from \"./JsiSkPictureRecorder\";\nimport { JsiSkPictureFactory } from \"./JsiSkPictureFactory\";\nimport { JsiSkPathFactory } from \"./JsiSkPathFactory\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkColorFilterFactory } from \"./JsiSkColorFilterFactory\";\nimport { JsiSkTypefaceFactory } from \"./JsiSkTypefaceFactory\";\nimport { JsiSkMaskFilterFactory } from \"./JsiSkMaskFilterFactory\";\nimport { JsiSkRuntimeEffectFactory } from \"./JsiSkRuntimeEffectFactory\";\nimport { JsiSkImageFilterFactory } from \"./JsiSkImageFilterFactory\";\nimport { JsiSkShaderFactory } from \"./JsiSkShaderFactory\";\nimport { JsiSkPathEffectFactory } from \"./JsiSkPathEffectFactory\";\nimport { JsiSkDataFactory } from \"./JsiSkDataFactory\";\nimport { JsiSkImageFactory } from \"./JsiSkImageFactory\";\nimport { JsiSkSVGFactory } from \"./JsiSkSVGFactory\";\nimport { JsiSkTextBlobFactory } from \"./JsiSkTextBlobFactory\";\nimport { JsiSkFont } from \"./JsiSkFont\";\nimport { MakeVertices } from \"./JsiSkVerticesFactory\";\nimport { JsiSkPath } from \"./JsiSkPath\";\nimport { JsiSkTypeface } from \"./JsiSkTypeface\";\nimport { JsiSkTypefaceFontProviderFactory } from \"./JsiSkTypefaceFontProviderFactory\";\nimport { JsiSkFontMgrFactory } from \"./JsiSkFontMgrFactory\";\nimport { JsiSkAnimatedImageFactory } from \"./JsiSkAnimatedImageFactory\";\nimport { JsiSkParagraphBuilderFactory } from \"./JsiSkParagraphBuilderFactory\";\nimport { JsiSkNativeBufferFactory } from \"./JsiSkNativeBufferFactory\";\n\nexport const JsiSkApi = (CanvasKit: CanvasKit): Skia => ({\n Point: (x: number, y: number) =>\n new JsiSkPoint(CanvasKit, Float32Array.of(x, y)),\n RuntimeShaderBuilder: (_: SkRuntimeEffect): SkRuntimeShaderBuilder => {\n throw new Error(\"Not implemented on React Native Web\");\n },\n RRectXY: (rect: SkRect, rx: number, ry: number) =>\n new JsiSkRRect(CanvasKit, rect, rx, ry),\n RSXform: (scos: number, ssin: number, tx: number, ty: number) =>\n new JsiSkRSXform(CanvasKit, Float32Array.of(scos, ssin, tx, ty)),\n RSXformFromRadians: (\n scale: number,\n r: number,\n tx: number,\n ty: number,\n px: number,\n py: number\n ) => {\n const s = Math.sin(r) * scale;\n const c = Math.cos(r) * scale;\n return new JsiSkRSXform(\n CanvasKit,\n Float32Array.of(c, s, tx - c * px + s * py, ty - s * px - c * py)\n );\n },\n Color,\n ContourMeasureIter: (\n path: SkPath,\n forceClosed: boolean,\n resScale: number\n ): SkContourMeasureIter =>\n new JsiSkContourMeasureIter(\n CanvasKit,\n new CanvasKit.ContourMeasureIter(\n JsiSkPath.fromValue(path),\n forceClosed,\n resScale\n )\n ),\n Paint: () => {\n const paint = new JsiSkPaint(CanvasKit, new CanvasKit.Paint());\n paint.setAntiAlias(true);\n return paint;\n },\n PictureRecorder: () =>\n new JsiSkPictureRecorder(CanvasKit, new CanvasKit.PictureRecorder()),\n Picture: new JsiSkPictureFactory(CanvasKit),\n Path: new JsiSkPathFactory(CanvasKit),\n Matrix: (matrix?: readonly number[]) =>\n new JsiSkMatrix(\n CanvasKit,\n matrix\n ? Float32Array.of(...matrix)\n : Float32Array.of(...CanvasKit.Matrix.identity())\n ),\n ColorFilter: new JsiSkColorFilterFactory(CanvasKit),\n Font: (typeface?: SkTypeface, size?: number) =>\n new JsiSkFont(\n CanvasKit,\n new CanvasKit.Font(\n typeface === undefined ? null : JsiSkTypeface.fromValue(typeface),\n size\n )\n ),\n Typeface: new JsiSkTypefaceFactory(CanvasKit),\n MaskFilter: new JsiSkMaskFilterFactory(CanvasKit),\n RuntimeEffect: new JsiSkRuntimeEffectFactory(CanvasKit),\n ImageFilter: new JsiSkImageFilterFactory(CanvasKit),\n Shader: new JsiSkShaderFactory(CanvasKit),\n PathEffect: new JsiSkPathEffectFactory(CanvasKit),\n MakeVertices: MakeVertices.bind(null, CanvasKit),\n Data: new JsiSkDataFactory(CanvasKit),\n Image: new JsiSkImageFactory(CanvasKit),\n AnimatedImage: new JsiSkAnimatedImageFactory(CanvasKit),\n SVG: new JsiSkSVGFactory(CanvasKit),\n TextBlob: new JsiSkTextBlobFactory(CanvasKit),\n XYWHRect: (x: number, y: number, width: number, height: number) => {\n return new JsiSkRect(CanvasKit, CanvasKit.XYWHRect(x, y, width, height));\n },\n Surface: new JsiSkSurfaceFactory(CanvasKit),\n TypefaceFontProvider: new JsiSkTypefaceFontProviderFactory(CanvasKit),\n FontMgr: new JsiSkFontMgrFactory(CanvasKit),\n ParagraphBuilder: new JsiSkParagraphBuilderFactory(CanvasKit),\n NativeBuffer: new JsiSkNativeBufferFactory(CanvasKit),\n});\n"],"mappings":";;;;;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yE,YAAY,EAAEA,kCAAY,CAACC,IAAI,CAAC,IAAI,EAAE1E,SAAS,CAAC;EAChD2E,IAAI,EAAE,IAAIC,kCAAgB,CAAC5E,SAAS,CAAC;EACrC6E,KAAK,EAAE,IAAIC,oCAAiB,CAAC9E,SAAS,CAAC;EACvC+E,aAAa,EAAE,IAAIC,oDAAyB,CAAChF,SAAS,CAAC;EACvDiF,GAAG,EAAE,IAAIC,gCAAe,CAAClF,SAAS,CAAC;EACnCmF,QAAQ,EAAE,IAAIC,0CAAoB,CAACpF,SAAS,CAAC;EAC7CqF,QAAQ,EAAEA,CAACnF,CAAS,EAAEC,CAAS,EAAEmF,KAAa,EAAEC,MAAc,KAAK;IACjE,OAAO,IAAIC,oBAAS,CAACxF,SAAS,EAAEA,SAAS,CAACqF,QAAQ,CAACnF,CAAC,EAAEC,CAAC,EAAEmF,KAAK,EAAEC,MAAM,CAAC,CAAC;EAC1E,CAAC;EACDE,OAAO,EAAE,IAAIC,wCAAmB,CAAC1F,SAAS,CAAC;EAC3C2F,oBAAoB,EAAE,IAAIC,kEAAgC,CAAC5F,SAAS,CAAC;EACrE6F,OAAO,EAAE,IAAIC,wCAAmB,CAAC9F,SAAS,CAAC;EAC3C+F,gBAAgB,EAAE,IAAIC,0DAA4B,CAAChG,SAAS,CAAC;EAC7DiG,YAAY,EAAE,IAAIC,kDAAwB,CAAClG,SAAS;AACtD,CAAC,CAAC;AAACmG,OAAA,CAAApG,QAAA,GAAAA,QAAA"}
@@ -1,2 +0,0 @@
1
- import { throwOnMissingReanimated } from "../external/reanimated/moduleWrapper";
2
- export default throwOnMissingReanimated;
@@ -1,10 +1,2 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _moduleWrapper = require("../external/reanimated/moduleWrapper");
8
- // eslint-disable-next-line import/no-default-export
9
- var _default = exports.default = _moduleWrapper.throwOnMissingReanimated;
10
2
  //# sourceMappingURL=NativeSkiaModule.web.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_moduleWrapper","require","_default","exports","default","throwOnMissingReanimated"],"sources":["NativeSkiaModule.web.ts"],"sourcesContent":["import { throwOnMissingReanimated } from \"../external/reanimated/moduleWrapper\";\n\n// eslint-disable-next-line import/no-default-export\nexport default throwOnMissingReanimated;\n"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAEA;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GACeC,uCAAwB"}
1
+ {"version":3,"names":[],"sources":["NativeSkiaModule.web.ts"],"sourcesContent":[""],"mappings":""}
@@ -0,0 +1,10 @@
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 {};
@@ -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"],"sources":["ModuleProxy.ts"],"sourcesContent":["// https://github.com/mrousavy/react-native-vision-camera/blob/main/package/src/dependencies/ModuleProxy.ts\ntype ImportType = ReturnType<typeof require>;\n\n/**\n * Create a lazily-imported module proxy.\n * This is useful for lazily requiring optional dependencies.\n */\nexport const createModuleProxy = <TModule>(\n getModule: () => ImportType\n): TModule => {\n const holder: { module: TModule | undefined } = { module: undefined };\n\n const proxy = new Proxy(holder, {\n get: (target, property) => {\n if (target.module == null) {\n // lazy initialize module via require()\n // caller needs to make sure the require() call is wrapped in a try/catch\n target.module = getModule() as TModule;\n }\n return target.module[property as keyof typeof holder.module];\n },\n });\n return proxy as unknown as TModule;\n};\n\nexport class OptionalDependencyNotInstalledError extends Error {\n constructor(name: string) {\n super(`${name} is not installed!`);\n }\n}\n"],"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,CAAE,GAAEA,IAAK,oBAAmB,CAAC;EACpC;AACF"}
@@ -0,0 +1,3 @@
1
+ import type * as ReanimatedT from "react-native-reanimated";
2
+ declare const Reanimated: typeof ReanimatedT;
3
+ export default Reanimated;
@@ -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"],"sources":["ReanimatedProxy.ts"],"sourcesContent":["import type * as ReanimatedT from \"react-native-reanimated\";\n\nimport {\n OptionalDependencyNotInstalledError,\n createModuleProxy,\n} from \"../ModuleProxy\";\ntype TReanimated = typeof ReanimatedT;\n\nconst Reanimated = createModuleProxy<TReanimated>(() => {\n try {\n return require(\"react-native-reanimated\");\n } catch (e) {\n throw new OptionalDependencyNotInstalledError(\"react-native-reanimated\");\n }\n});\n\n// eslint-disable-next-line import/no-default-export\nexport default Reanimated;\n"],"mappings":"AAEA,SACEA,mCAAmC,EACnCC,iBAAiB,QACZ,gBAAgB;AAGvB,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"}
@@ -1,16 +1,18 @@
1
1
  import { useEffect, useMemo } from "react";
2
2
  import { Skia } from "../../skia";
3
- import { startMapper, stopMapper, makeMutable } from "./moduleWrapper";
4
3
  import { notifyChange } from "./interpolators";
5
- const useBufferValue = (size, bufferInitializer) => useMemo(() => makeMutable(new Array(size).fill(0).map(bufferInitializer)),
6
- // eslint-disable-next-line react-hooks/exhaustive-deps
7
- [size]);
4
+ import Rea from "./ReanimatedProxy";
5
+ const useBufferValue = (size, bufferInitializer) => {
6
+ return useMemo(() => Rea.makeMutable(new Array(size).fill(0).map(bufferInitializer)),
7
+ // eslint-disable-next-line react-hooks/exhaustive-deps
8
+ [size]);
9
+ };
8
10
  const useBuffer = (size, bufferInitializer, modifier) => {
9
11
  var _mod$__closure;
10
12
  const values = useBufferValue(size, bufferInitializer);
11
13
  const mod = modifier;
12
14
  const deps = [size, ...Object.values((_mod$__closure = mod.__closure) !== null && _mod$__closure !== void 0 ? _mod$__closure : {})];
13
- const mapperId = startMapper(() => {
15
+ const mapperId = Rea.startMapper(() => {
14
16
  "worklet";
15
17
 
16
18
  values.value.forEach((val, index) => {
@@ -20,7 +22,7 @@ const useBuffer = (size, bufferInitializer, modifier) => {
20
22
  }, deps);
21
23
  useEffect(() => {
22
24
  return () => {
23
- stopMapper(mapperId);
25
+ Rea.stopMapper(mapperId);
24
26
  };
25
27
  }, [mapperId]);
26
28
  return values;
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useMemo","Skia","startMapper","stopMapper","makeMutable","notifyChange","useBufferValue","size","bufferInitializer","Array","fill","map","useBuffer","modifier","_mod$__closure","values","mod","deps","Object","__closure","mapperId","value","forEach","val","index","useRectBuffer","XYWHRect","useRSXformBuffer","RSXform","usePointBuffer","Point","useColorBuffer","Color"],"sources":["buffers.ts"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\nimport type { WorkletFunction } from \"react-native-reanimated/lib/typescript/reanimated2/commonTypes\";\n\nimport type { SkColor, SkHostRect, SkPoint, SkRSXform } from \"../../skia/types\";\nimport { Skia } from \"../../skia\";\n\nimport { startMapper, stopMapper, makeMutable } from \"./moduleWrapper\";\nimport { notifyChange } from \"./interpolators\";\n\ntype Modifier<T> = (input: T, index: number) => void;\n\nconst useBufferValue = <T>(size: number, bufferInitializer: () => T) =>\n useMemo(\n () => makeMutable(new Array(size).fill(0).map(bufferInitializer)),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [size]\n );\n\nconst useBuffer = <T>(\n size: number,\n bufferInitializer: () => T,\n modifier: Modifier<T>\n) => {\n const values = useBufferValue(size, bufferInitializer);\n const mod = modifier as WorkletFunction;\n const deps = [size, ...Object.values(mod.__closure ?? {})];\n const mapperId = startMapper(() => {\n \"worklet\";\n values.value.forEach((val, index) => {\n modifier(val, index);\n });\n notifyChange(values);\n }, deps);\n\n useEffect(() => {\n return () => {\n stopMapper(mapperId);\n };\n }, [mapperId]);\n\n return values;\n};\n\nexport const useRectBuffer = (size: number, modifier: Modifier<SkHostRect>) =>\n useBuffer(size, () => Skia.XYWHRect(0, 0, 0, 0), modifier);\n\n// Usage for RSXform Buffer\nexport const useRSXformBuffer = (size: number, modifier: Modifier<SkRSXform>) =>\n useBuffer(size, () => Skia.RSXform(1, 0, 0, 0), modifier);\n\n// Usage for Point Buffer\nexport const usePointBuffer = (size: number, modifier: Modifier<SkPoint>) =>\n useBuffer(size, () => Skia.Point(0, 0), modifier);\n\n// Usage for Color Buffer\nexport const useColorBuffer = (size: number, modifier: Modifier<SkColor>) =>\n useBuffer(size, () => Skia.Color(\"black\"), modifier);\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAI1C,SAASC,IAAI,QAAQ,YAAY;AAEjC,SAASC,WAAW,EAAEC,UAAU,EAAEC,WAAW,QAAQ,iBAAiB;AACtE,SAASC,YAAY,QAAQ,iBAAiB;AAI9C,MAAMC,cAAc,GAAGA,CAAIC,IAAY,EAAEC,iBAA0B,KACjER,OAAO,CACL,MAAMI,WAAW,CAAC,IAAIK,KAAK,CAACF,IAAI,CAAC,CAACG,IAAI,CAAC,CAAC,CAAC,CAACC,GAAG,CAACH,iBAAiB,CAAC,CAAC;AACjE;AACA,CAACD,IAAI,CACP,CAAC;AAEH,MAAMK,SAAS,GAAGA,CAChBL,IAAY,EACZC,iBAA0B,EAC1BK,QAAqB,KAClB;EAAA,IAAAC,cAAA;EACH,MAAMC,MAAM,GAAGT,cAAc,CAACC,IAAI,EAAEC,iBAAiB,CAAC;EAC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ACxB,IAAY,EAAEM,QAA2B,KACtED,SAAS,CAACL,IAAI,EAAE,MAAMN,IAAI,CAAC+B,KAAK,CAAC,OAAO,CAAC,EAAEnB,QAAQ,CAAC"}
1
+ {"version":3,"names":["useEffect","useMemo","Skia","notifyChange","Rea","useBufferValue","size","bufferInitializer","makeMutable","Array","fill","map","useBuffer","modifier","_mod$__closure","values","mod","deps","Object","__closure","mapperId","startMapper","value","forEach","val","index","stopMapper","useRectBuffer","XYWHRect","useRSXformBuffer","RSXform","usePointBuffer","Point","useColorBuffer","Color"],"sources":["buffers.ts"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\nimport type { WorkletFunction } from \"react-native-reanimated/lib/typescript/reanimated2/commonTypes\";\n\nimport type { SkColor, SkHostRect, SkPoint, SkRSXform } from \"../../skia/types\";\nimport { Skia } from \"../../skia\";\n\nimport { notifyChange } from \"./interpolators\";\nimport Rea from \"./ReanimatedProxy\";\n\ntype Modifier<T> = (input: T, index: number) => void;\n\nconst useBufferValue = <T>(size: number, bufferInitializer: () => T) => {\n return useMemo(\n () => Rea.makeMutable(new Array(size).fill(0).map(bufferInitializer)),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [size]\n );\n};\n\nconst useBuffer = <T>(\n size: number,\n bufferInitializer: () => T,\n modifier: Modifier<T>\n) => {\n const values = useBufferValue(size, bufferInitializer);\n const mod = modifier as WorkletFunction;\n const deps = [size, ...Object.values(mod.__closure ?? {})];\n const mapperId = Rea.startMapper(() => {\n \"worklet\";\n values.value.forEach((val, index) => {\n modifier(val, index);\n });\n notifyChange(values);\n }, deps);\n\n useEffect(() => {\n return () => {\n Rea.stopMapper(mapperId);\n };\n }, [mapperId]);\n\n return values;\n};\n\nexport const useRectBuffer = (size: number, modifier: Modifier<SkHostRect>) =>\n useBuffer(size, () => Skia.XYWHRect(0, 0, 0, 0), modifier);\n\n// Usage for RSXform Buffer\nexport const useRSXformBuffer = (size: number, modifier: Modifier<SkRSXform>) =>\n useBuffer(size, () => Skia.RSXform(1, 0, 0, 0), modifier);\n\n// Usage for Point Buffer\nexport const usePointBuffer = (size: number, modifier: Modifier<SkPoint>) =>\n useBuffer(size, () => Skia.Point(0, 0), modifier);\n\n// Usage for Color Buffer\nexport const useColorBuffer = (size: number, modifier: Modifier<SkColor>) =>\n useBuffer(size, () => Skia.Color(\"black\"), modifier);\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAI1C,SAASC,IAAI,QAAQ,YAAY;AAEjC,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,OAAOC,GAAG,MAAM,mBAAmB;AAInC,MAAMC,cAAc,GAAGA,CAAIC,IAAY,EAAEC,iBAA0B,KAAK;EACtE,OAAON,OAAO,CACZ,MAAMG,GAAG,CAACI,WAAW,CAAC,IAAIC,KAAK,CAACH,IAAI,CAAC,CAACI,IAAI,CAAC,CAAC,CAAC,CAACC,GAAG,CAACJ,iBAAiB,CAAC,CAAC;EACrE;EACA,CAACD,IAAI,CACP,CAAC;AACH,CAAC;AAED,MAAMM,SAAS,GAAGA,CAChBN,IAAY,EACZC,iBAA0B,EAC1BM,QAAqB,KAClB;EAAA,IAAAC,cAAA;EACH,MAAMC,MAAM,GAAGV,cAAc,CAACC,IAAI,EAAEC,iBAAiB,CAAC;EACtD,MAAMS,GAAG,GAAGH,QAA2B;EACvC,MAAMI,IAAI,GAAG,CAACX,IAAI,EAAE,GAAGY,MAAM,CAACH,MAAM,EAAAD,cAAA,GAACE,GAAG,CAACG,SAAS,cAAAL,cAAA,cAAAA,cAAA,GAAI,CAAC,CAAC,CAAC,CAAC;EAC1D,MAAMM,QAAQ,GAAGhB,GAAG,CAACiB,WAAW,CAAC,MAAM;IACrC,SAAS;;IACTN,MAAM,CAACO,KAAK,CAACC,OAAO,CAAC,CAACC,GAAG,EAAEC,KAAK,KAAK;MACnCZ,QAAQ,CAACW,GAAG,EAAEC,KAAK,CAAC;IACtB,CAAC,CAAC;IACFtB,YAAY,CAACY,MAAM,CAAC;EACtB,CAAC,EAAEE,IAAI,CAAC;EAERjB,SAAS,CAAC,MAAM;IACd,OAAO,MAAM;MACXI,GAAG,CAACsB,UAAU,CAACN,QAAQ,CAAC;IAC1B,CAAC;EACH,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEd,OAAOL,MAAM;AACf,CAAC;AAED,OAAO,MAAMY,aAAa,GAAGA,CAACrB,IAAY,EAAEO,QAA8B,KACxED,SAAS,CAACN,IAAI,EAAE,MAAMJ,IAAI,CAAC0B,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAEf,QAAQ,CAAC;;AAE5D;AACA,OAAO,MAAMgB,gBAAgB,GAAGA,CAACvB,IAAY,EAAEO,QAA6B,KAC1ED,SAAS,CAACN,IAAI,EAAE,MAAMJ,IAAI,CAAC4B,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAEjB,QAAQ,CAAC;;AAE3D;AACA,OAAO,MAAMkB,cAAc,GAAGA,CAACzB,IAAY,EAAEO,QAA2B,KACtED,SAAS,CAACN,IAAI,EAAE,MAAMJ,IAAI,CAAC8B,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAEnB,QAAQ,CAAC;;AAEnD;AACA,OAAO,MAAMoB,cAAc,GAAGA,CAAC3B,IAAY,EAAEO,QAA2B,KACtED,SAAS,CAACN,IAAI,EAAE,MAAMJ,IAAI,CAACgC,KAAK,CAAC,OAAO,CAAC,EAAErB,QAAQ,CAAC"}
@@ -2,7 +2,7 @@ import { useCallback, useMemo } from "react";
2
2
  import { interpolatePaths, interpolateVector } from "../../animation";
3
3
  import { Skia } from "../../skia";
4
4
  import { isOnMainThread } from "../../renderer/Offscreen";
5
- import { useAnimatedReaction, useFrameCallback, useSharedValue, useDerivedValue } from "./moduleWrapper";
5
+ import Rea from "./ReanimatedProxy";
6
6
  export const notifyChange = value => {
7
7
  "worklet";
8
8
 
@@ -13,8 +13,8 @@ export const notifyChange = value => {
13
13
  };
14
14
  export const usePathValue = (cb, init) => {
15
15
  const pathInit = useMemo(() => Skia.Path.Make(), []);
16
- const path = useSharedValue(pathInit);
17
- useDerivedValue(() => {
16
+ const path = Rea.useSharedValue(pathInit);
17
+ Rea.useDerivedValue(() => {
18
18
  path.value.reset();
19
19
  if (init !== undefined) {
20
20
  path.value.addPath(init);
@@ -25,13 +25,13 @@ export const usePathValue = (cb, init) => {
25
25
  return path;
26
26
  };
27
27
  export const useClock = () => {
28
- const clock = useSharedValue(0);
28
+ const clock = Rea.useSharedValue(0);
29
29
  const callback = useCallback(info => {
30
30
  "worklet";
31
31
 
32
32
  clock.value = info.timeSinceFirstFrame;
33
33
  }, [clock]);
34
- useFrameCallback(callback);
34
+ Rea.useFrameCallback(callback);
35
35
  return clock;
36
36
  };
37
37
 
@@ -42,8 +42,8 @@ export const useClock = () => {
42
42
  const useInterpolator = (factory, value, interpolator, input, output, options) => {
43
43
  // eslint-disable-next-line react-hooks/exhaustive-deps
44
44
  const init = useMemo(() => factory(), []);
45
- const result = useSharedValue(init);
46
- useAnimatedReaction(() => value.value, val => {
45
+ const result = Rea.useSharedValue(init);
46
+ Rea.useAnimatedReaction(() => value.value, val => {
47
47
  result.value = interpolator(val, input, output, options, result.value);
48
48
  notifyChange(result);
49
49
  }, [input, output, options]);
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","useMemo","interpolatePaths","interpolateVector","Skia","isOnMainThread","useAnimatedReaction","useFrameCallback","useSharedValue","useDerivedValue","notifyChange","value","_value","usePathValue","cb","init","pathInit","Path","Make","path","reset","undefined","addPath","useClock","clock","callback","info","timeSinceFirstFrame","useInterpolator","factory","interpolator","input","output","options","result","val","usePathInterpolation","outputRange","allPathsInterpolable","slice","every","isInterpolatable","Error","useVectorInterpolation","Point"],"sources":["interpolators.ts"],"sourcesContent":["import type {\n ExtrapolationType,\n FrameInfo,\n SharedValue,\n} from \"react-native-reanimated\";\nimport { useCallback, useMemo } from \"react\";\n\nimport type { SkPath, SkPoint } from \"../../skia/types\";\nimport { interpolatePaths, interpolateVector } from \"../../animation\";\nimport { Skia } from \"../../skia\";\nimport { isOnMainThread } from \"../../renderer/Offscreen\";\n\nimport {\n useAnimatedReaction,\n useFrameCallback,\n useSharedValue,\n useDerivedValue,\n} from \"./moduleWrapper\";\n\nexport const notifyChange = (value: SharedValue<unknown>) => {\n \"worklet\";\n if (isOnMainThread()) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (value as any)._value = value.value;\n }\n};\n\nexport const usePathValue = (cb: (path: SkPath) => void, init?: SkPath) => {\n const pathInit = useMemo(() => Skia.Path.Make(), []);\n const path = useSharedValue(pathInit);\n useDerivedValue(() => {\n path.value.reset();\n if (init !== undefined) {\n path.value.addPath(init);\n }\n cb(path.value);\n notifyChange(path);\n });\n return path;\n};\n\nexport const useClock = () => {\n const clock = useSharedValue(0);\n const callback = useCallback(\n (info: FrameInfo) => {\n \"worklet\";\n clock.value = info.timeSinceFirstFrame;\n },\n [clock]\n );\n useFrameCallback(callback);\n return clock;\n};\n\n/**\n * @worklet\n */\ntype Interpolator<T> = (\n value: number,\n input: number[],\n output: T[],\n options: ExtrapolationType,\n result: T\n) => T;\n\nconst useInterpolator = <T>(\n factory: () => T,\n value: SharedValue<number>,\n interpolator: Interpolator<T>,\n input: number[],\n output: T[],\n options?: ExtrapolationType\n) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const init = useMemo(() => factory(), []);\n const result = useSharedValue(init);\n useAnimatedReaction(\n () => value.value,\n (val) => {\n result.value = interpolator(val, input, output, options, result.value);\n notifyChange(result);\n },\n [input, output, options]\n );\n return result;\n};\n\nexport const usePathInterpolation = (\n value: SharedValue<number>,\n input: number[],\n outputRange: SkPath[],\n options?: ExtrapolationType\n) => {\n // Check if all paths in outputRange are interpolable\n const allPathsInterpolable = outputRange\n .slice(1)\n .every((path) => outputRange[0].isInterpolatable(path));\n if (!allPathsInterpolable) {\n // Handle the case where not all paths are interpolable\n // For example, throw an error or return early\n throw new Error(\n `Not all paths in the output range are interpolable.\nSee: https://shopify.github.io/react-native-skia/docs/animations/hooks#usepathinterpolation`\n );\n }\n return useInterpolator(\n () => Skia.Path.Make(),\n value,\n interpolatePaths,\n input,\n outputRange,\n options\n );\n};\n\nexport const useVectorInterpolation = (\n value: SharedValue<number>,\n input: number[],\n outputRange: SkPoint[],\n options?: ExtrapolationType\n) =>\n useInterpolator(\n () => Skia.Point(0, 0),\n value,\n interpolateVector,\n input,\n outputRange,\n options\n );\n"],"mappings":"AAKA,SAASA,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAG5C,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,iBAAiB;AACrE,SAASC,IAAI,QAAQ,YAAY;AACjC,SAASC,cAAc,QAAQ,0BAA0B;AAEzD,SACEC,mBAAmB,EACnBC,gBAAgB,EAChBC,cAAc,EACdC,eAAe,QACV,iBAAiB;AAExB,OAAO,MAAMC,YAAY,GAAIC,KAA2B,IAAK;EAC3D,SAAS;;EACT,IAAIN,cAAc,CAAC,CAAC,EAAE;IACpB;IACCM,KAAK,CAASC,MAAM,GAAGD,KAAK,CAACA,KAAK;EACrC;AACF,CAAC;AAED,OAAO,MAAME,YAAY,GAAGA,CAACC,EAA0B,EAAEC,IAAa,KAAK;EACzE,MAAMC,QAAQ,GAAGf,OAAO,CAAC,MAAMG,IAAI,CAACa,IAAI,CAACC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC;EACpD,MAAMC,IAAI,GAAGX,cAAc,CAACQ,QAAQ,CAAC;EACrCP,eAAe,CAAC,MAAM;IACpBU,IAAI,CAACR,KAAK,CAACS,KAAK,CAAC,CAAC;IAClB,IAAIL,IAAI,KAAKM,SAAS,EAAE;MACtBF,IAAI,CAACR,KAAK,CAACW,OAAO,CAACP,IAAI,CAAC;IAC1B;IACAD,EAAE,CAACK,IAAI,CAACR,KAAK,CAAC;IACdD,YAAY,CAACS,IAAI,CAAC;EACpB,CAAC,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I,CAACmB,oBAAoB,EAAE;IACzB;IACA;IACA,MAAM,IAAII,KAAK,CACZ;AACP,4FACI,CAAC;EACH;EACA,OAAOd,eAAe,CACpB,MAAMxB,IAAI,CAACa,IAAI,CAACC,IAAI,CAAC,CAAC,EACtBP,KAAK,EACLT,gBAAgB,EAChB6B,KAAK,EACLM,WAAW,EACXJ,OACF,CAAC;AACH,CAAC;AAED,OAAO,MAAMU,sBAAsB,GAAGA,CACpChC,KAA0B,EAC1BoB,KAAe,EACfM,WAAsB,EACtBJ,OAA2B,KAE3BL,eAAe,CACb,MAAMxB,IAAI,CAACwC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EACtBjC,KAAK,EACLR,iBAAiB,EACjB4B,KAAK,EACLM,WAAW,EACXJ,OACF,CAAC"}
1
+ {"version":3,"names":["useCallback","useMemo","interpolatePaths","interpolateVector","Skia","isOnMainThread","Rea","notifyChange","value","_value","usePathValue","cb","init","pathInit","Path","Make","path","useSharedValue","useDerivedValue","reset","undefined","addPath","useClock","clock","callback","info","timeSinceFirstFrame","useFrameCallback","useInterpolator","factory","interpolator","input","output","options","result","useAnimatedReaction","val","usePathInterpolation","outputRange","allPathsInterpolable","slice","every","isInterpolatable","Error","useVectorInterpolation","Point"],"sources":["interpolators.ts"],"sourcesContent":["import type {\n ExtrapolationType,\n FrameInfo,\n SharedValue,\n} from \"react-native-reanimated\";\nimport { useCallback, useMemo } from \"react\";\n\nimport type { SkPath, SkPoint } from \"../../skia/types\";\nimport { interpolatePaths, interpolateVector } from \"../../animation\";\nimport { Skia } from \"../../skia\";\nimport { isOnMainThread } from \"../../renderer/Offscreen\";\n\nimport Rea from \"./ReanimatedProxy\";\n\nexport const notifyChange = (value: SharedValue<unknown>) => {\n \"worklet\";\n if (isOnMainThread()) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (value as any)._value = value.value;\n }\n};\n\nexport const usePathValue = (cb: (path: SkPath) => void, init?: SkPath) => {\n const pathInit = useMemo(() => Skia.Path.Make(), []);\n const path = Rea.useSharedValue(pathInit);\n Rea.useDerivedValue(() => {\n path.value.reset();\n if (init !== undefined) {\n path.value.addPath(init);\n }\n cb(path.value);\n notifyChange(path);\n });\n return path;\n};\n\nexport const useClock = () => {\n const clock = Rea.useSharedValue(0);\n const callback = useCallback(\n (info: FrameInfo) => {\n \"worklet\";\n clock.value = info.timeSinceFirstFrame;\n },\n [clock]\n );\n Rea.useFrameCallback(callback);\n return clock;\n};\n\n/**\n * @worklet\n */\ntype Interpolator<T> = (\n value: number,\n input: number[],\n output: T[],\n options: ExtrapolationType,\n result: T\n) => T;\n\nconst useInterpolator = <T>(\n factory: () => T,\n value: SharedValue<number>,\n interpolator: Interpolator<T>,\n input: number[],\n output: T[],\n options?: ExtrapolationType\n) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const init = useMemo(() => factory(), []);\n const result = Rea.useSharedValue(init);\n Rea.useAnimatedReaction(\n () => value.value,\n (val) => {\n result.value = interpolator(val, input, output, options, result.value);\n notifyChange(result);\n },\n [input, output, options]\n );\n return result;\n};\n\nexport const usePathInterpolation = (\n value: SharedValue<number>,\n input: number[],\n outputRange: SkPath[],\n options?: ExtrapolationType\n) => {\n // Check if all paths in outputRange are interpolable\n const allPathsInterpolable = outputRange\n .slice(1)\n .every((path) => outputRange[0].isInterpolatable(path));\n if (!allPathsInterpolable) {\n // Handle the case where not all paths are interpolable\n // For example, throw an error or return early\n throw new Error(\n `Not all paths in the output range are interpolable.\nSee: https://shopify.github.io/react-native-skia/docs/animations/hooks#usepathinterpolation`\n );\n }\n return useInterpolator(\n () => Skia.Path.Make(),\n value,\n interpolatePaths,\n input,\n outputRange,\n options\n );\n};\n\nexport const useVectorInterpolation = (\n value: SharedValue<number>,\n input: number[],\n outputRange: SkPoint[],\n options?: ExtrapolationType\n) =>\n useInterpolator(\n () => Skia.Point(0, 0),\n value,\n interpolateVector,\n input,\n outputRange,\n options\n );\n"],"mappings":"AAKA,SAASA,WAAW,EAAEC,OAAO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2B,KAE3BL,eAAe,CACb,MAAMxB,IAAI,CAACyC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EACtBrC,KAAK,EACLL,iBAAiB,EACjB4B,KAAK,EACLO,WAAW,EACXL,OACF,CAAC"}
@@ -1,15 +1,30 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
 
3
- import { startMapper, stopMapper, isSharedValue, HAS_REANIMATED3, HAS_REANIMATED2, runOnJS } from "./moduleWrapper";
3
+ import Rea from "./ReanimatedProxy";
4
+ let HAS_REANIMATED = false;
5
+ let HAS_REANIMATED_3 = false;
6
+ try {
7
+ require("react-native-reanimated");
8
+ HAS_REANIMATED = true;
9
+ const reanimatedVersion = require("react-native-reanimated/package.json").version;
10
+ if (reanimatedVersion && (reanimatedVersion >= "3.0.0" || reanimatedVersion.includes("3.0.0-"))) {
11
+ HAS_REANIMATED_3 = true;
12
+ }
13
+ } catch (e) {
14
+ HAS_REANIMATED = false;
15
+ }
4
16
  const _bindings = new WeakMap();
5
17
  export const unbindReanimatedNode = node => {
18
+ if (!HAS_REANIMATED) {
19
+ return;
20
+ }
6
21
  const previousMapperId = _bindings.get(node);
7
22
  if (previousMapperId !== undefined) {
8
- stopMapper(previousMapperId);
23
+ Rea.stopMapper(previousMapperId);
9
24
  }
10
25
  };
11
26
  export function extractReanimatedProps(props) {
12
- if (!HAS_REANIMATED3 && !HAS_REANIMATED2) {
27
+ if (!HAS_REANIMATED) {
13
28
  return [props, {}];
14
29
  }
15
30
  const reanimatedProps = {};
@@ -19,7 +34,7 @@ export function extractReanimatedProps(props) {
19
34
  continue;
20
35
  }
21
36
  const propValue = props[propName];
22
- if (isSharedValue(propValue)) {
37
+ if (Rea.isSharedValue(propValue)) {
23
38
  reanimatedProps[propName] = propValue;
24
39
  otherProps[propName] = propValue.value;
25
40
  } else {
@@ -32,7 +47,7 @@ function bindReanimatedProps2(container, node, reanimatedProps) {
32
47
  const sharedValues = Object.values(reanimatedProps);
33
48
  const previousMapperId = _bindings.get(node);
34
49
  if (previousMapperId !== undefined) {
35
- stopMapper(previousMapperId);
50
+ Rea.stopMapper(previousMapperId);
36
51
  }
37
52
  if (sharedValues.length > 0) {
38
53
  const viewId = container.getNativeId();
@@ -53,32 +68,32 @@ function bindReanimatedProps2(container, node, reanimatedProps) {
53
68
  container.redraw();
54
69
  }
55
70
  };
56
- const mapperId = startMapper(() => {
71
+ const mapperId = Rea.startMapper(() => {
57
72
  "worklet";
58
73
 
59
- runOnJS(updateProps)();
74
+ Rea.runOnJS(updateProps)();
60
75
  }, sharedValues);
61
76
  _bindings.set(node, mapperId);
62
77
  }
63
78
  }
64
79
  export function bindReanimatedProps(container, node, reanimatedProps) {
65
- if (HAS_REANIMATED2 && !HAS_REANIMATED3) {
80
+ if (HAS_REANIMATED && !HAS_REANIMATED_3) {
66
81
  return bindReanimatedProps2(container, node, reanimatedProps);
67
82
  }
68
- if (!HAS_REANIMATED3) {
83
+ if (!HAS_REANIMATED) {
69
84
  return;
70
85
  }
71
86
  const sharedValues = Object.values(reanimatedProps);
72
87
  const previousMapperId = _bindings.get(node);
73
88
  if (previousMapperId !== undefined) {
74
- stopMapper(previousMapperId);
89
+ Rea.stopMapper(previousMapperId);
75
90
  }
76
91
  if (sharedValues.length > 0) {
77
92
  const viewId = container.getNativeId();
78
93
  const {
79
94
  SkiaViewApi
80
95
  } = global;
81
- const mapperId = startMapper(() => {
96
+ const mapperId = Rea.startMapper(() => {
82
97
  "worklet";
83
98
 
84
99
  if (node) {