@shopify/react-native-skia 0.1.233 → 0.1.236

Sign up to get free protection for your applications and to get access to all the features.
Files changed (294) hide show
  1. package/android/CMakeLists.txt +0 -1
  2. package/android/cpp/jni/JniSkiaManager.cpp +0 -1
  3. package/android/cpp/rnskia-android/RNSkAndroidView.h +0 -1
  4. package/android/cpp/rnskia-android/RNSkOpenGLCanvasProvider.cpp +1 -1
  5. package/android/cpp/rnskia-android/RNSkOpenGLCanvasProvider.h +1 -2
  6. package/cpp/api/JsiSkTypefaceFactory.h +2 -1
  7. package/cpp/skia/include/android/AHardwareBufferUtils.h +23 -0
  8. package/cpp/skia/include/android/GrAHardwareBufferUtils.h +2 -0
  9. package/cpp/skia/include/android/graphite/SurfaceAndroid.h +59 -0
  10. package/cpp/skia/include/codec/SkAvifDecoder.h +1 -1
  11. package/cpp/skia/include/codec/SkBmpDecoder.h +1 -1
  12. package/cpp/skia/include/codec/SkCodec.h +21 -3
  13. package/cpp/skia/include/codec/SkGifDecoder.h +1 -1
  14. package/cpp/skia/include/codec/SkIcoDecoder.h +1 -1
  15. package/cpp/skia/include/codec/SkJpegDecoder.h +1 -1
  16. package/cpp/skia/include/codec/SkJpegxlDecoder.h +1 -1
  17. package/cpp/skia/include/codec/SkPngDecoder.h +1 -1
  18. package/cpp/skia/include/codec/SkRawDecoder.h +1 -1
  19. package/cpp/skia/include/codec/SkWbmpDecoder.h +1 -1
  20. package/cpp/skia/include/codec/SkWebpDecoder.h +1 -1
  21. package/cpp/skia/include/config/SkUserConfig.h +3 -1
  22. package/cpp/skia/include/core/SkCanvas.h +66 -37
  23. package/cpp/skia/include/core/SkColorFilter.h +5 -2
  24. package/cpp/skia/include/core/SkContourMeasure.h +1 -0
  25. package/cpp/skia/include/core/SkDocument.h +1 -0
  26. package/cpp/skia/include/core/SkFont.h +14 -24
  27. package/cpp/skia/include/core/SkFontArguments.h +1 -1
  28. package/cpp/skia/include/core/SkFontMetrics.h +1 -1
  29. package/cpp/skia/include/core/SkFontMgr.h +0 -7
  30. package/cpp/skia/include/core/SkGraphics.h +13 -0
  31. package/cpp/skia/include/core/SkMesh.h +9 -13
  32. package/cpp/skia/include/core/SkMilestone.h +1 -1
  33. package/cpp/skia/include/core/SkPathMeasure.h +2 -0
  34. package/cpp/skia/include/core/SkSerialProcs.h +29 -11
  35. package/cpp/skia/include/core/SkSize.h +3 -3
  36. package/cpp/skia/include/core/SkStream.h +3 -13
  37. package/cpp/skia/include/core/SkSurface.h +6 -3
  38. package/cpp/skia/include/core/SkSurfaceProps.h +2 -4
  39. package/cpp/skia/include/core/SkTraceMemoryDump.h +15 -0
  40. package/cpp/skia/include/core/SkTypeface.h +8 -56
  41. package/cpp/skia/include/core/SkTypes.h +8 -0
  42. package/cpp/skia/include/core/SkVertices.h +1 -1
  43. package/cpp/skia/include/docs/SkMultiPictureDocument.h +53 -0
  44. package/cpp/skia/include/docs/SkPDFDocument.h +11 -0
  45. package/cpp/skia/include/effects/SkGradientShader.h +9 -0
  46. package/cpp/skia/include/effects/SkRuntimeEffect.h +3 -7
  47. package/cpp/skia/include/gpu/GrBackendSemaphore.h +33 -47
  48. package/cpp/skia/include/gpu/GrBackendSurface.h +2 -3
  49. package/cpp/skia/include/gpu/GrContextOptions.h +0 -6
  50. package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +44 -28
  51. package/cpp/skia/include/gpu/GrDirectContext.h +12 -31
  52. package/cpp/skia/include/gpu/GrTypes.h +1 -16
  53. package/cpp/skia/include/gpu/MutableTextureState.h +35 -80
  54. package/cpp/skia/include/gpu/ShaderErrorHandler.h +11 -1
  55. package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +2 -2
  56. package/cpp/skia/include/gpu/ganesh/SkSurfaceGanesh.h +1 -1
  57. package/cpp/skia/include/gpu/ganesh/gl/GrGLDirectContext.h +3 -2
  58. package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSemaphore.h +20 -0
  59. package/cpp/skia/include/gpu/ganesh/vk/GrVkDirectContext.h +30 -0
  60. package/cpp/skia/include/gpu/gl/GrGLFunctions.h +1 -1
  61. package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -0
  62. package/cpp/skia/include/gpu/gl/glx/GrGLMakeGLXInterface.h +6 -0
  63. package/cpp/skia/include/gpu/graphite/BackendSemaphore.h +3 -3
  64. package/cpp/skia/include/gpu/graphite/BackendTexture.h +39 -27
  65. package/cpp/skia/include/gpu/graphite/Context.h +39 -13
  66. package/cpp/skia/include/gpu/graphite/ContextOptions.h +2 -0
  67. package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +2 -1
  68. package/cpp/skia/include/gpu/graphite/Image.h +106 -87
  69. package/cpp/skia/include/gpu/graphite/Recorder.h +24 -3
  70. package/cpp/skia/include/gpu/graphite/Surface.h +7 -2
  71. package/cpp/skia/include/gpu/graphite/dawn/DawnBackendContext.h +41 -2
  72. package/cpp/skia/include/gpu/graphite/dawn/DawnTypes.h +11 -6
  73. package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +1 -2
  74. package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +6 -6
  75. package/cpp/skia/include/gpu/mock/GrMockTypes.h +1 -0
  76. package/cpp/skia/include/gpu/vk/GrVkBackendContext.h +1 -1
  77. package/cpp/skia/include/gpu/vk/GrVkTypes.h +1 -44
  78. package/cpp/skia/include/gpu/vk/VulkanExtensions.h +1 -1
  79. package/cpp/skia/include/gpu/vk/VulkanMutableTextureState.h +25 -0
  80. package/cpp/skia/include/gpu/vk/VulkanTypes.h +44 -0
  81. package/cpp/skia/include/ports/SkFontConfigInterface.h +3 -6
  82. package/cpp/skia/include/private/SkEncodedInfo.h +5 -0
  83. package/cpp/skia/include/private/SkExif.h +102 -0
  84. package/cpp/skia/include/private/SkGainmapInfo.h +11 -1
  85. package/cpp/skia/include/private/base/SkAssert.h +16 -0
  86. package/cpp/skia/include/private/base/SkDeque.h +2 -7
  87. package/cpp/skia/include/private/base/SkLoadUserConfig.h +1 -1
  88. package/cpp/skia/include/private/base/SkTArray.h +69 -28
  89. package/cpp/skia/include/private/base/SkThreadAnnotations.h +18 -5
  90. package/cpp/skia/include/private/chromium/GrSurfaceCharacterization.h +26 -30
  91. package/cpp/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h +4 -3
  92. package/cpp/skia/include/private/chromium/SkImageChromium.h +1 -1
  93. package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +8 -6
  94. package/cpp/skia/include/private/gpu/graphite/ContextOptionsPriv.h +29 -0
  95. package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +12 -9
  96. package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +16 -11
  97. package/cpp/skia/include/third_party/vulkan/vulkan/vk_platform.h +2 -2
  98. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std.h +312 -0
  99. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std_decode.h +77 -0
  100. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std.h +446 -0
  101. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std_decode.h +67 -0
  102. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codecs_common.h +36 -0
  103. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan.h +9 -2
  104. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_android.h +31 -3
  105. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_core.h +10624 -5716
  106. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ios.h +2 -1
  107. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_macos.h +2 -1
  108. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_win32.h +28 -1
  109. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xcb.h +2 -1
  110. package/cpp/skia/include/utils/mac/SkCGUtils.h +23 -11
  111. package/cpp/skia/modules/skcms/skcms.h +2 -410
  112. package/cpp/skia/modules/skcms/src/Transform_inl.h +831 -704
  113. package/cpp/skia/modules/skcms/src/skcms_Transform.h +161 -0
  114. package/cpp/skia/modules/skcms/src/skcms_internals.h +136 -0
  115. package/cpp/skia/modules/skcms/src/skcms_public.h +404 -0
  116. package/cpp/skia/modules/skparagraph/include/FontArguments.h +1 -1
  117. package/cpp/skia/modules/skparagraph/include/FontCollection.h +2 -0
  118. package/cpp/skia/modules/skparagraph/include/Paragraph.h +2 -2
  119. package/cpp/skia/modules/skparagraph/include/TextStyle.h +4 -3
  120. package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +1 -3
  121. package/cpp/skia/modules/skresources/include/SkResources.h +28 -17
  122. package/cpp/skia/modules/skunicode/include/SkUnicode.h +12 -0
  123. package/cpp/skia/modules/svg/include/SkSVGDOM.h +4 -1
  124. package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +4 -1
  125. package/cpp/skia/src/base/SkUTF.h +7 -0
  126. package/cpp/skia/src/core/SkTHash.h +20 -8
  127. package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +3 -2
  128. package/lib/commonjs/dom/nodes/JsiSkDOM.js +56 -57
  129. package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
  130. package/lib/commonjs/external/reanimated/index.d.ts +1 -0
  131. package/lib/commonjs/external/reanimated/index.js +13 -0
  132. package/lib/commonjs/external/reanimated/index.js.map +1 -1
  133. package/lib/commonjs/external/reanimated/interpolators.js +16 -2
  134. package/lib/commonjs/external/reanimated/interpolators.js.map +1 -1
  135. package/lib/commonjs/external/reanimated/moduleWrapper.d.ts +1 -0
  136. package/lib/commonjs/external/reanimated/moduleWrapper.js +5 -3
  137. package/lib/commonjs/external/reanimated/moduleWrapper.js.map +1 -1
  138. package/lib/commonjs/external/reanimated/textures.d.ts +5 -0
  139. package/lib/commonjs/external/reanimated/textures.js +52 -0
  140. package/lib/commonjs/external/reanimated/textures.js.map +1 -0
  141. package/lib/commonjs/headless/index.js +1 -1
  142. package/lib/commonjs/headless/index.js.map +1 -1
  143. package/lib/commonjs/mock/index.js +3 -0
  144. package/lib/commonjs/mock/index.js.map +1 -1
  145. package/lib/commonjs/renderer/Canvas.js +6 -5
  146. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  147. package/lib/commonjs/renderer/Container.d.ts +1 -1
  148. package/lib/commonjs/renderer/Container.js +2 -1
  149. package/lib/commonjs/renderer/Container.js.map +1 -1
  150. package/lib/commonjs/renderer/Offscreen.d.ts +1 -0
  151. package/lib/commonjs/renderer/Offscreen.js +18 -5
  152. package/lib/commonjs/renderer/Offscreen.js.map +1 -1
  153. package/lib/commonjs/renderer/Reconciler.d.ts +1 -1
  154. package/lib/commonjs/renderer/Reconciler.js +7 -4
  155. package/lib/commonjs/renderer/Reconciler.js.map +1 -1
  156. package/lib/commonjs/skia/types/Matrix4.d.ts +2 -2
  157. package/lib/commonjs/skia/types/Matrix4.js.map +1 -1
  158. package/lib/commonjs/skia/types/Shader/Shader.d.ts +1 -1
  159. package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
  160. package/lib/commonjs/skia/web/JsiSkPath.d.ts +2 -2
  161. package/lib/commonjs/skia/web/JsiSkPath.js +10 -2
  162. package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
  163. package/lib/commonjs/views/SkiaJSDomView.d.ts +31 -0
  164. package/lib/commonjs/views/SkiaJSDomView.js +161 -0
  165. package/lib/commonjs/views/SkiaJSDomView.js.map +1 -0
  166. package/lib/commonjs/views/SkiaJSDomView.web.d.ts +1 -0
  167. package/lib/commonjs/views/SkiaJSDomView.web.js +14 -0
  168. package/lib/commonjs/views/SkiaJSDomView.web.js.map +1 -0
  169. package/lib/module/dom/nodes/JsiSkDOM.d.ts +3 -2
  170. package/lib/module/dom/nodes/JsiSkDOM.js +56 -56
  171. package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
  172. package/lib/module/external/reanimated/index.d.ts +1 -0
  173. package/lib/module/external/reanimated/index.js +1 -0
  174. package/lib/module/external/reanimated/index.js.map +1 -1
  175. package/lib/module/external/reanimated/interpolators.js +15 -2
  176. package/lib/module/external/reanimated/interpolators.js.map +1 -1
  177. package/lib/module/external/reanimated/moduleWrapper.d.ts +1 -0
  178. package/lib/module/external/reanimated/moduleWrapper.js +3 -2
  179. package/lib/module/external/reanimated/moduleWrapper.js.map +1 -1
  180. package/lib/module/external/reanimated/textures.d.ts +5 -0
  181. package/lib/module/external/reanimated/textures.js +35 -0
  182. package/lib/module/external/reanimated/textures.js.map +1 -0
  183. package/lib/module/headless/index.js +1 -1
  184. package/lib/module/headless/index.js.map +1 -1
  185. package/lib/module/mock/index.js +3 -0
  186. package/lib/module/mock/index.js.map +1 -1
  187. package/lib/module/renderer/Canvas.js +5 -4
  188. package/lib/module/renderer/Canvas.js.map +1 -1
  189. package/lib/module/renderer/Container.d.ts +1 -1
  190. package/lib/module/renderer/Container.js +2 -1
  191. package/lib/module/renderer/Container.js.map +1 -1
  192. package/lib/module/renderer/Offscreen.d.ts +1 -0
  193. package/lib/module/renderer/Offscreen.js +11 -3
  194. package/lib/module/renderer/Offscreen.js.map +1 -1
  195. package/lib/module/renderer/Reconciler.d.ts +1 -1
  196. package/lib/module/renderer/Reconciler.js +7 -4
  197. package/lib/module/renderer/Reconciler.js.map +1 -1
  198. package/lib/module/skia/types/Matrix4.d.ts +2 -2
  199. package/lib/module/skia/types/Matrix4.js.map +1 -1
  200. package/lib/module/skia/types/Shader/Shader.d.ts +1 -1
  201. package/lib/module/skia/types/Shader/Shader.js.map +1 -1
  202. package/lib/module/skia/web/JsiSkPath.d.ts +2 -2
  203. package/lib/module/skia/web/JsiSkPath.js +10 -2
  204. package/lib/module/skia/web/JsiSkPath.js.map +1 -1
  205. package/lib/module/views/SkiaJSDomView.d.ts +31 -0
  206. package/lib/module/views/SkiaJSDomView.js +136 -0
  207. package/lib/module/views/SkiaJSDomView.js.map +1 -0
  208. package/lib/module/views/SkiaJSDomView.web.d.ts +1 -0
  209. package/lib/module/views/SkiaJSDomView.web.js +2 -0
  210. package/lib/module/views/SkiaJSDomView.web.js.map +1 -0
  211. package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +3 -2
  212. package/lib/typescript/src/external/reanimated/index.d.ts +1 -0
  213. package/lib/typescript/src/external/reanimated/moduleWrapper.d.ts +1 -0
  214. package/lib/typescript/src/external/reanimated/textures.d.ts +5 -0
  215. package/lib/typescript/src/renderer/Container.d.ts +1 -1
  216. package/lib/typescript/src/renderer/Offscreen.d.ts +1 -0
  217. package/lib/typescript/src/renderer/Reconciler.d.ts +1 -1
  218. package/lib/typescript/src/skia/types/Matrix4.d.ts +2 -2
  219. package/lib/typescript/src/skia/types/Shader/Shader.d.ts +1 -1
  220. package/lib/typescript/src/skia/web/JsiSkPath.d.ts +2 -2
  221. package/lib/typescript/src/views/SkiaJSDomView.d.ts +31 -0
  222. package/lib/typescript/src/views/SkiaJSDomView.web.d.ts +1 -0
  223. package/libs/android/arm64-v8a/libskia.a +0 -0
  224. package/libs/android/arm64-v8a/libskottie.a +0 -0
  225. package/libs/android/arm64-v8a/libskparagraph.a +0 -0
  226. package/libs/android/arm64-v8a/libsksg.a +0 -0
  227. package/libs/android/arm64-v8a/libskshaper.a +0 -0
  228. package/libs/android/arm64-v8a/libskunicode.a +0 -0
  229. package/libs/android/arm64-v8a/libsvg.a +0 -0
  230. package/libs/android/armeabi-v7a/libskia.a +0 -0
  231. package/libs/android/armeabi-v7a/libskottie.a +0 -0
  232. package/libs/android/armeabi-v7a/libskparagraph.a +0 -0
  233. package/libs/android/armeabi-v7a/libsksg.a +0 -0
  234. package/libs/android/armeabi-v7a/libskshaper.a +0 -0
  235. package/libs/android/armeabi-v7a/libskunicode.a +0 -0
  236. package/libs/android/armeabi-v7a/libsvg.a +0 -0
  237. package/libs/android/x86/libskia.a +0 -0
  238. package/libs/android/x86/libskottie.a +0 -0
  239. package/libs/android/x86/libskparagraph.a +0 -0
  240. package/libs/android/x86/libsksg.a +0 -0
  241. package/libs/android/x86/libskshaper.a +0 -0
  242. package/libs/android/x86/libskunicode.a +0 -0
  243. package/libs/android/x86/libsvg.a +0 -0
  244. package/libs/android/x86_64/libskia.a +0 -0
  245. package/libs/android/x86_64/libskottie.a +0 -0
  246. package/libs/android/x86_64/libskparagraph.a +0 -0
  247. package/libs/android/x86_64/libsksg.a +0 -0
  248. package/libs/android/x86_64/libskshaper.a +0 -0
  249. package/libs/android/x86_64/libskunicode.a +0 -0
  250. package/libs/android/x86_64/libsvg.a +0 -0
  251. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  252. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  253. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  254. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  255. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
  256. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  257. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  258. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  259. package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
  260. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  261. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  262. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
  263. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
  264. package/libs/ios/libsvg.xcframework/Info.plist +5 -5
  265. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  266. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  267. package/package.json +1 -1
  268. package/src/dom/nodes/JsiSkDOM.ts +55 -56
  269. package/src/external/reanimated/index.ts +1 -0
  270. package/src/external/reanimated/interpolators.ts +17 -3
  271. package/src/external/reanimated/moduleWrapper.ts +1 -0
  272. package/src/external/reanimated/textures.tsx +50 -0
  273. package/src/headless/index.ts +1 -1
  274. package/src/mock/index.ts +3 -0
  275. package/src/renderer/Canvas.tsx +4 -3
  276. package/src/renderer/Container.tsx +3 -2
  277. package/src/renderer/Offscreen.tsx +12 -3
  278. package/src/renderer/Reconciler.tsx +5 -2
  279. package/src/skia/types/Matrix4.ts +2 -2
  280. package/src/skia/types/Shader/Shader.ts +6 -1
  281. package/src/skia/web/JsiSkPath.ts +23 -3
  282. package/src/views/SkiaJSDomView.tsx +126 -0
  283. package/src/views/SkiaJSDomView.web.tsx +1 -0
  284. package/android/cpp/jni/include/JniSkiaDrawView.h +0 -90
  285. package/cpp/rnskia/RNSkJsView.cpp +0 -236
  286. package/cpp/rnskia/RNSkJsView.h +0 -121
  287. package/cpp/skia/include/gpu/GrSurfaceInfo.h +0 -142
  288. package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +0 -107
  289. package/cpp/skia/include/private/gpu/ganesh/GrMockTypesPriv.h +0 -32
  290. package/cpp/skia/include/private/gpu/ganesh/GrMtlTypesPriv.h +0 -83
  291. package/cpp/skia/include/private/gpu/ganesh/GrVkTypesPriv.h +0 -47
  292. package/cpp/skia/include/private/gpu/vk/VulkanTypesPriv.h +0 -57
  293. package/cpp/skia/include/utils/SkBase64.h +0 -53
  294. package/cpp/skia/modules/skcms/skcms_internal.h +0 -56
@@ -1,4 +1,3 @@
1
- import { NATIVE_DOM } from "../../renderer/HostComponents";
2
1
  import { FillNode, ImageNode, CircleNode, PathNode, LineNode, PatchNode, PointsNode, RectNode, RRectNode, VerticesNode, TextNode, OvalNode, TextPathNode, TextBlobNode, GlyphsNode, DiffRectNode, PictureNode, ImageSVGNode, BackdropFilterNode, BoxNode, BoxShadowNode } from "./drawings";
3
2
  import { BlendImageFilterNode, BlurImageFilterNode, BlurMaskFilterNode, DisplacementMapImageFilterNode, DropShadowImageFilterNode, OffsetImageFilterNode, RuntimeShaderImageFilterNode, CornerPathEffectNode, DiscretePathEffectNode, DashPathEffectNode, Path1DPathEffectNode, Path2DPathEffectNode, SumPathEffectNode, Line2DPathEffectNode, BlendNode } from "./paint";
4
3
  import { MatrixColorFilterNode, LumaColorFilterNode, LinearToSRGBGammaColorFilterNode, SRGBToLinearGammaColorFilterNode, BlendColorFilterNode, LerpColorFilterNode } from "./paint/ColorFilters";
@@ -9,140 +8,141 @@ import { PaintNode } from "./PaintNode";
9
8
  import { LayerNode } from "./LayerNode";
10
9
  import { ParagraphNode } from "./drawings/ParagraphNode";
11
10
  export class JsiSkDOM {
12
- constructor(ctx) {
11
+ constructor(ctx, native) {
13
12
  this.ctx = ctx;
13
+ this.native = native;
14
14
  }
15
15
 
16
16
  Layer(props) {
17
- return NATIVE_DOM ? global.SkiaDomApi.LayerNode(props !== null && props !== void 0 ? props : {}) : new LayerNode(this.ctx, props !== null && props !== void 0 ? props : {});
17
+ return this.native ? global.SkiaDomApi.LayerNode(props !== null && props !== void 0 ? props : {}) : new LayerNode(this.ctx, props !== null && props !== void 0 ? props : {});
18
18
  }
19
19
 
20
20
  Group(props) {
21
- return NATIVE_DOM ? global.SkiaDomApi.GroupNode(props !== null && props !== void 0 ? props : {}) : new GroupNode(this.ctx, props !== null && props !== void 0 ? props : {});
21
+ return this.native ? global.SkiaDomApi.GroupNode(props !== null && props !== void 0 ? props : {}) : new GroupNode(this.ctx, props !== null && props !== void 0 ? props : {});
22
22
  }
23
23
 
24
24
  Paint(props) {
25
- return NATIVE_DOM ? global.SkiaDomApi.PaintNode(props !== null && props !== void 0 ? props : {}) : new PaintNode(this.ctx, props);
25
+ return this.native ? global.SkiaDomApi.PaintNode(props !== null && props !== void 0 ? props : {}) : new PaintNode(this.ctx, props);
26
26
  } // Drawings
27
27
 
28
28
 
29
29
  Fill(props) {
30
- return NATIVE_DOM ? global.SkiaDomApi.FillNode(props !== null && props !== void 0 ? props : {}) : new FillNode(this.ctx, props);
30
+ return this.native ? global.SkiaDomApi.FillNode(props !== null && props !== void 0 ? props : {}) : new FillNode(this.ctx, props);
31
31
  }
32
32
 
33
33
  Image(props) {
34
- return NATIVE_DOM ? global.SkiaDomApi.ImageNode(props !== null && props !== void 0 ? props : {}) : new ImageNode(this.ctx, props);
34
+ return this.native ? global.SkiaDomApi.ImageNode(props !== null && props !== void 0 ? props : {}) : new ImageNode(this.ctx, props);
35
35
  }
36
36
 
37
37
  Circle(props) {
38
- return NATIVE_DOM ? global.SkiaDomApi.CircleNode(props !== null && props !== void 0 ? props : {}) : new CircleNode(this.ctx, props);
38
+ return this.native ? global.SkiaDomApi.CircleNode(props !== null && props !== void 0 ? props : {}) : new CircleNode(this.ctx, props);
39
39
  }
40
40
 
41
41
  Path(props) {
42
- return NATIVE_DOM ? global.SkiaDomApi.PathNode(props !== null && props !== void 0 ? props : {}) : new PathNode(this.ctx, props);
42
+ return this.native ? global.SkiaDomApi.PathNode(props !== null && props !== void 0 ? props : {}) : new PathNode(this.ctx, props);
43
43
  }
44
44
 
45
45
  Line(props) {
46
- return NATIVE_DOM ? global.SkiaDomApi.LineNode(props !== null && props !== void 0 ? props : {}) : new LineNode(this.ctx, props);
46
+ return this.native ? global.SkiaDomApi.LineNode(props !== null && props !== void 0 ? props : {}) : new LineNode(this.ctx, props);
47
47
  }
48
48
 
49
49
  Oval(props) {
50
- return NATIVE_DOM ? global.SkiaDomApi.OvalNode(props !== null && props !== void 0 ? props : {}) : new OvalNode(this.ctx, props);
50
+ return this.native ? global.SkiaDomApi.OvalNode(props !== null && props !== void 0 ? props : {}) : new OvalNode(this.ctx, props);
51
51
  }
52
52
 
53
53
  Patch(props) {
54
- return NATIVE_DOM ? global.SkiaDomApi.PatchNode(props !== null && props !== void 0 ? props : {}) : new PatchNode(this.ctx, props);
54
+ return this.native ? global.SkiaDomApi.PatchNode(props !== null && props !== void 0 ? props : {}) : new PatchNode(this.ctx, props);
55
55
  }
56
56
 
57
57
  Points(props) {
58
- return NATIVE_DOM ? global.SkiaDomApi.PointsNode(props !== null && props !== void 0 ? props : {}) : new PointsNode(this.ctx, props);
58
+ return this.native ? global.SkiaDomApi.PointsNode(props !== null && props !== void 0 ? props : {}) : new PointsNode(this.ctx, props);
59
59
  }
60
60
 
61
61
  Rect(props) {
62
- return NATIVE_DOM ? global.SkiaDomApi.RectNode(props) : new RectNode(this.ctx, props);
62
+ return this.native ? global.SkiaDomApi.RectNode(props) : new RectNode(this.ctx, props);
63
63
  }
64
64
 
65
65
  RRect(props) {
66
- return NATIVE_DOM ? global.SkiaDomApi.RRectNode(props) : new RRectNode(this.ctx, props);
66
+ return this.native ? global.SkiaDomApi.RRectNode(props) : new RRectNode(this.ctx, props);
67
67
  }
68
68
 
69
69
  Vertices(props) {
70
- return NATIVE_DOM ? global.SkiaDomApi.VerticesNode(props) : new VerticesNode(this.ctx, props);
70
+ return this.native ? global.SkiaDomApi.VerticesNode(props) : new VerticesNode(this.ctx, props);
71
71
  }
72
72
 
73
73
  Text(props) {
74
- return NATIVE_DOM ? global.SkiaDomApi.TextNode(props) : new TextNode(this.ctx, props);
74
+ return this.native ? global.SkiaDomApi.TextNode(props) : new TextNode(this.ctx, props);
75
75
  }
76
76
 
77
77
  TextPath(props) {
78
- return NATIVE_DOM ? global.SkiaDomApi.TextPathNode(props) : new TextPathNode(this.ctx, props);
78
+ return this.native ? global.SkiaDomApi.TextPathNode(props) : new TextPathNode(this.ctx, props);
79
79
  }
80
80
 
81
81
  TextBlob(props) {
82
- return NATIVE_DOM ? global.SkiaDomApi.TextBlobNode(props) : new TextBlobNode(this.ctx, props);
82
+ return this.native ? global.SkiaDomApi.TextBlobNode(props) : new TextBlobNode(this.ctx, props);
83
83
  }
84
84
 
85
85
  Glyphs(props) {
86
- return NATIVE_DOM ? global.SkiaDomApi.GlyphsNode(props) : new GlyphsNode(this.ctx, props);
86
+ return this.native ? global.SkiaDomApi.GlyphsNode(props) : new GlyphsNode(this.ctx, props);
87
87
  }
88
88
 
89
89
  DiffRect(props) {
90
- return NATIVE_DOM ? global.SkiaDomApi.DiffRectNode(props) : new DiffRectNode(this.ctx, props);
90
+ return this.native ? global.SkiaDomApi.DiffRectNode(props) : new DiffRectNode(this.ctx, props);
91
91
  }
92
92
 
93
93
  Picture(props) {
94
- return NATIVE_DOM ? global.SkiaDomApi.PictureNode(props) : new PictureNode(this.ctx, props);
94
+ return this.native ? global.SkiaDomApi.PictureNode(props) : new PictureNode(this.ctx, props);
95
95
  }
96
96
 
97
97
  ImageSVG(props) {
98
- return NATIVE_DOM ? global.SkiaDomApi.ImageSVGNode(props) : new ImageSVGNode(this.ctx, props);
98
+ return this.native ? global.SkiaDomApi.ImageSVGNode(props) : new ImageSVGNode(this.ctx, props);
99
99
  } // BlurMaskFilters
100
100
 
101
101
 
102
102
  BlurMaskFilter(props) {
103
- return NATIVE_DOM ? global.SkiaDomApi.BlurMaskFilterNode(props) : new BlurMaskFilterNode(this.ctx, props);
103
+ return this.native ? global.SkiaDomApi.BlurMaskFilterNode(props) : new BlurMaskFilterNode(this.ctx, props);
104
104
  } // ImageFilters
105
105
 
106
106
 
107
107
  BlendImageFilter(props) {
108
- return NATIVE_DOM ? global.SkiaDomApi.BlendImageFilterNode(props) : new BlendImageFilterNode(this.ctx, props);
108
+ return this.native ? global.SkiaDomApi.BlendImageFilterNode(props) : new BlendImageFilterNode(this.ctx, props);
109
109
  }
110
110
 
111
111
  DropShadowImageFilter(props) {
112
- return NATIVE_DOM ? global.SkiaDomApi.DropShadowImageFilterNode(props) : new DropShadowImageFilterNode(this.ctx, props);
112
+ return this.native ? global.SkiaDomApi.DropShadowImageFilterNode(props) : new DropShadowImageFilterNode(this.ctx, props);
113
113
  }
114
114
 
115
115
  DisplacementMapImageFilter(props) {
116
- return NATIVE_DOM ? global.SkiaDomApi.DisplacementMapImageFilterNode(props) : new DisplacementMapImageFilterNode(this.ctx, props);
116
+ return this.native ? global.SkiaDomApi.DisplacementMapImageFilterNode(props) : new DisplacementMapImageFilterNode(this.ctx, props);
117
117
  }
118
118
 
119
119
  BlurImageFilter(props) {
120
- return NATIVE_DOM ? global.SkiaDomApi.BlurImageFilterNode(props) : new BlurImageFilterNode(this.ctx, props);
120
+ return this.native ? global.SkiaDomApi.BlurImageFilterNode(props) : new BlurImageFilterNode(this.ctx, props);
121
121
  }
122
122
 
123
123
  OffsetImageFilter(props) {
124
- return NATIVE_DOM ? global.SkiaDomApi.OffsetImageFilterNode(props) : new OffsetImageFilterNode(this.ctx, props);
124
+ return this.native ? global.SkiaDomApi.OffsetImageFilterNode(props) : new OffsetImageFilterNode(this.ctx, props);
125
125
  }
126
126
 
127
127
  MorphologyImageFilter(props) {
128
- return NATIVE_DOM ? global.SkiaDomApi.MorphologyImageFilterNode(props) : new MorphologyImageFilterNode(this.ctx, props);
128
+ return this.native ? global.SkiaDomApi.MorphologyImageFilterNode(props) : new MorphologyImageFilterNode(this.ctx, props);
129
129
  }
130
130
 
131
131
  RuntimeShaderImageFilter(props) {
132
- return NATIVE_DOM ? global.SkiaDomApi.RuntimeShaderImageFilterNode(props) : new RuntimeShaderImageFilterNode(this.ctx, props);
132
+ return this.native ? global.SkiaDomApi.RuntimeShaderImageFilterNode(props) : new RuntimeShaderImageFilterNode(this.ctx, props);
133
133
  } // Color Filters
134
134
 
135
135
 
136
136
  MatrixColorFilter(props) {
137
- return NATIVE_DOM ? global.SkiaDomApi.MatrixColorFilterNode(props) : new MatrixColorFilterNode(this.ctx, props);
137
+ return this.native ? global.SkiaDomApi.MatrixColorFilterNode(props) : new MatrixColorFilterNode(this.ctx, props);
138
138
  }
139
139
 
140
140
  BlendColorFilter(props) {
141
- return NATIVE_DOM ? global.SkiaDomApi.BlendColorFilterNode(props) : new BlendColorFilterNode(this.ctx, props);
141
+ return this.native ? global.SkiaDomApi.BlendColorFilterNode(props) : new BlendColorFilterNode(this.ctx, props);
142
142
  }
143
143
 
144
144
  LumaColorFilter() {
145
- return NATIVE_DOM ? global.SkiaDomApi.LumaColorFilterNode() : new LumaColorFilterNode(this.ctx);
145
+ return this.native ? global.SkiaDomApi.LumaColorFilterNode() : new LumaColorFilterNode(this.ctx);
146
146
  }
147
147
 
148
148
  LinearToSRGBGammaColorFilter() {
@@ -154,94 +154,94 @@ export class JsiSkDOM {
154
154
  }
155
155
 
156
156
  LerpColorFilter(props) {
157
- return NATIVE_DOM ? global.SkiaDomApi.LerpColorFilterNode(props) : new LerpColorFilterNode(this.ctx, props);
157
+ return this.native ? global.SkiaDomApi.LerpColorFilterNode(props) : new LerpColorFilterNode(this.ctx, props);
158
158
  } // Shaders
159
159
 
160
160
 
161
161
  Shader(props) {
162
- return NATIVE_DOM ? global.SkiaDomApi.ShaderNode(props) : new ShaderNode(this.ctx, props);
162
+ return this.native ? global.SkiaDomApi.ShaderNode(props) : new ShaderNode(this.ctx, props);
163
163
  }
164
164
 
165
165
  ImageShader(props) {
166
- return NATIVE_DOM ? global.SkiaDomApi.ImageShaderNode(props) : new ImageShaderNode(this.ctx, props);
166
+ return this.native ? global.SkiaDomApi.ImageShaderNode(props) : new ImageShaderNode(this.ctx, props);
167
167
  }
168
168
 
169
169
  ColorShader(props) {
170
- return NATIVE_DOM ? global.SkiaDomApi.ColorShaderNode(props) : new ColorNode(this.ctx, props);
170
+ return this.native ? global.SkiaDomApi.ColorShaderNode(props) : new ColorNode(this.ctx, props);
171
171
  }
172
172
 
173
173
  SweepGradient(props) {
174
- return NATIVE_DOM ? global.SkiaDomApi.SweepGradientNode(props) : new SweepGradientNode(this.ctx, props);
174
+ return this.native ? global.SkiaDomApi.SweepGradientNode(props) : new SweepGradientNode(this.ctx, props);
175
175
  }
176
176
 
177
177
  Turbulence(props) {
178
- return NATIVE_DOM ? global.SkiaDomApi.TurbulenceNode(props) : new TurbulenceNode(this.ctx, props);
178
+ return this.native ? global.SkiaDomApi.TurbulenceNode(props) : new TurbulenceNode(this.ctx, props);
179
179
  }
180
180
 
181
181
  FractalNoise(props) {
182
- return NATIVE_DOM ? global.SkiaDomApi.FractalNoiseNode(props) : new FractalNoiseNode(this.ctx, props);
182
+ return this.native ? global.SkiaDomApi.FractalNoiseNode(props) : new FractalNoiseNode(this.ctx, props);
183
183
  }
184
184
 
185
185
  LinearGradient(props) {
186
- return NATIVE_DOM ? global.SkiaDomApi.LinearGradientNode(props) : new LinearGradientNode(this.ctx, props);
186
+ return this.native ? global.SkiaDomApi.LinearGradientNode(props) : new LinearGradientNode(this.ctx, props);
187
187
  }
188
188
 
189
189
  RadialGradient(props) {
190
- return NATIVE_DOM ? global.SkiaDomApi.RadialGradientNode(props) : new RadialGradientNode(this.ctx, props);
190
+ return this.native ? global.SkiaDomApi.RadialGradientNode(props) : new RadialGradientNode(this.ctx, props);
191
191
  }
192
192
 
193
193
  TwoPointConicalGradient(props) {
194
- return NATIVE_DOM ? global.SkiaDomApi.TwoPointConicalGradientNode(props) : new TwoPointConicalGradientNode(this.ctx, props);
194
+ return this.native ? global.SkiaDomApi.TwoPointConicalGradientNode(props) : new TwoPointConicalGradientNode(this.ctx, props);
195
195
  } // Path Effects
196
196
 
197
197
 
198
198
  CornerPathEffect(props) {
199
- return NATIVE_DOM ? global.SkiaDomApi.CornerPathEffectNode(props) : new CornerPathEffectNode(this.ctx, props);
199
+ return this.native ? global.SkiaDomApi.CornerPathEffectNode(props) : new CornerPathEffectNode(this.ctx, props);
200
200
  }
201
201
 
202
202
  DiscretePathEffect(props) {
203
- return NATIVE_DOM ? global.SkiaDomApi.DiscretePathEffectNode(props) : new DiscretePathEffectNode(this.ctx, props);
203
+ return this.native ? global.SkiaDomApi.DiscretePathEffectNode(props) : new DiscretePathEffectNode(this.ctx, props);
204
204
  }
205
205
 
206
206
  DashPathEffect(props) {
207
- return NATIVE_DOM ? global.SkiaDomApi.DashPathEffectNode(props) : new DashPathEffectNode(this.ctx, props);
207
+ return this.native ? global.SkiaDomApi.DashPathEffectNode(props) : new DashPathEffectNode(this.ctx, props);
208
208
  }
209
209
 
210
210
  Path1DPathEffect(props) {
211
- return NATIVE_DOM ? global.SkiaDomApi.Path1DPathEffectNode(props) : new Path1DPathEffectNode(this.ctx, props);
211
+ return this.native ? global.SkiaDomApi.Path1DPathEffectNode(props) : new Path1DPathEffectNode(this.ctx, props);
212
212
  }
213
213
 
214
214
  Path2DPathEffect(props) {
215
- return NATIVE_DOM ? global.SkiaDomApi.Path2DPathEffectNode(props) : new Path2DPathEffectNode(this.ctx, props);
215
+ return this.native ? global.SkiaDomApi.Path2DPathEffectNode(props) : new Path2DPathEffectNode(this.ctx, props);
216
216
  }
217
217
 
218
218
  SumPathEffect() {
219
- return NATIVE_DOM ? global.SkiaDomApi.SumPathEffectNode() : new SumPathEffectNode(this.ctx);
219
+ return this.native ? global.SkiaDomApi.SumPathEffectNode() : new SumPathEffectNode(this.ctx);
220
220
  }
221
221
 
222
222
  Line2DPathEffect(props) {
223
- return NATIVE_DOM ? global.SkiaDomApi.Line2DPathEffectNode(props) : new Line2DPathEffectNode(this.ctx, props);
223
+ return this.native ? global.SkiaDomApi.Line2DPathEffectNode(props) : new Line2DPathEffectNode(this.ctx, props);
224
224
  }
225
225
 
226
226
  Blend(props) {
227
- return NATIVE_DOM ? global.SkiaDomApi.BlendNode(props) : new BlendNode(this.ctx, props);
227
+ return this.native ? global.SkiaDomApi.BlendNode(props) : new BlendNode(this.ctx, props);
228
228
  }
229
229
 
230
230
  BackdropFilter(props) {
231
- return NATIVE_DOM ? global.SkiaDomApi.BackdropFilterNode(props) : new BackdropFilterNode(this.ctx, props);
231
+ return this.native ? global.SkiaDomApi.BackdropFilterNode(props) : new BackdropFilterNode(this.ctx, props);
232
232
  }
233
233
 
234
234
  Box(props) {
235
- return NATIVE_DOM ? global.SkiaDomApi.BoxNode(props) : new BoxNode(this.ctx, props);
235
+ return this.native ? global.SkiaDomApi.BoxNode(props) : new BoxNode(this.ctx, props);
236
236
  }
237
237
 
238
238
  BoxShadow(props) {
239
- return NATIVE_DOM ? global.SkiaDomApi.BoxShadowNode(props) : new BoxShadowNode(this.ctx, props);
239
+ return this.native ? global.SkiaDomApi.BoxShadowNode(props) : new BoxShadowNode(this.ctx, props);
240
240
  } // Paragraph
241
241
 
242
242
 
243
243
  Paragraph(props) {
244
- return NATIVE_DOM ? global.SkiaDomApi.ParagraphNode(props) : new ParagraphNode(this.ctx, props);
244
+ return this.native ? global.SkiaDomApi.ParagraphNode(props) : new ParagraphNode(this.ctx, props);
245
245
  }
246
246
 
247
247
  }
@@ -1 +1 @@
1
- {"version":3,"names":["NATIVE_DOM","FillNode","ImageNode","CircleNode","PathNode","LineNode","PatchNode","PointsNode","RectNode","RRectNode","VerticesNode","TextNode","OvalNode","TextPathNode","TextBlobNode","GlyphsNode","DiffRectNode","PictureNode","ImageSVGNode","BackdropFilterNode","BoxNode","BoxShadowNode","BlendImageFilterNode","BlurImageFilterNode","BlurMaskFilterNode","DisplacementMapImageFilterNode","DropShadowImageFilterNode","OffsetImageFilterNode","RuntimeShaderImageFilterNode","CornerPathEffectNode","DiscretePathEffectNode","DashPathEffectNode","Path1DPathEffectNode","Path2DPathEffectNode","SumPathEffectNode","Line2DPathEffectNode","BlendNode","MatrixColorFilterNode","LumaColorFilterNode","LinearToSRGBGammaColorFilterNode","SRGBToLinearGammaColorFilterNode","BlendColorFilterNode","LerpColorFilterNode","LinearGradientNode","ShaderNode","ImageShaderNode","TwoPointConicalGradientNode","TurbulenceNode","SweepGradientNode","RadialGradientNode","FractalNoiseNode","ColorNode","MorphologyImageFilterNode","GroupNode","PaintNode","LayerNode","ParagraphNode","JsiSkDOM","constructor","ctx","Layer","props","global","SkiaDomApi","Group","Paint","Fill","Image","Circle","Path","Line","Oval","Patch","Points","Rect","RRect","Vertices","Text","TextPath","TextBlob","Glyphs","DiffRect","Picture","ImageSVG","BlurMaskFilter","BlendImageFilter","DropShadowImageFilter","DisplacementMapImageFilter","BlurImageFilter","OffsetImageFilter","MorphologyImageFilter","RuntimeShaderImageFilter","MatrixColorFilter","BlendColorFilter","LumaColorFilter","LinearToSRGBGammaColorFilter","SRGBToLinearGammaColorFilter","LerpColorFilter","Shader","ImageShader","ColorShader","ColorShaderNode","SweepGradient","Turbulence","FractalNoise","LinearGradient","RadialGradient","TwoPointConicalGradient","CornerPathEffect","DiscretePathEffect","DashPathEffect","Path1DPathEffect","Path2DPathEffect","SumPathEffect","Line2DPathEffect","Blend","BackdropFilter","Box","BoxShadow","Paragraph"],"sources":["JsiSkDOM.ts"],"sourcesContent":["import type {\n PathProps,\n SkDOM,\n GroupProps,\n ImageProps,\n BlurImageFilterProps,\n MatrixColorFilterProps,\n CircleProps,\n BlurMaskFilterProps,\n LinearGradientProps,\n PaintProps,\n ShaderProps,\n ImageShaderProps,\n LineProps,\n OvalProps,\n PatchProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n VerticesProps,\n TextProps,\n DiffRectProps,\n OffsetImageFilterProps,\n BlendColorFilterProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n FractalNoiseProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n DrawingNodeProps,\n BoxProps,\n BoxShadowProps,\n ChildrenProps,\n} from \"../types\";\nimport type {\n BlendImageFilterProps,\n BlendProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../types/ImageFilters\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../types/PathEffects\";\nimport { NATIVE_DOM } from \"../../renderer/HostComponents\";\nimport type { ParagraphProps } from \"../types/Paragraph\";\n\nimport {\n FillNode,\n ImageNode,\n CircleNode,\n PathNode,\n LineNode,\n PatchNode,\n PointsNode,\n RectNode,\n RRectNode,\n VerticesNode,\n TextNode,\n OvalNode,\n TextPathNode,\n TextBlobNode,\n GlyphsNode,\n DiffRectNode,\n PictureNode,\n ImageSVGNode,\n BackdropFilterNode,\n BoxNode,\n BoxShadowNode,\n} from \"./drawings\";\nimport {\n BlendImageFilterNode,\n BlurImageFilterNode,\n BlurMaskFilterNode,\n DisplacementMapImageFilterNode,\n DropShadowImageFilterNode,\n OffsetImageFilterNode,\n RuntimeShaderImageFilterNode,\n CornerPathEffectNode,\n DiscretePathEffectNode,\n DashPathEffectNode,\n Path1DPathEffectNode,\n Path2DPathEffectNode,\n SumPathEffectNode,\n Line2DPathEffectNode,\n BlendNode,\n} from \"./paint\";\nimport {\n MatrixColorFilterNode,\n LumaColorFilterNode,\n LinearToSRGBGammaColorFilterNode,\n SRGBToLinearGammaColorFilterNode,\n BlendColorFilterNode,\n LerpColorFilterNode,\n} from \"./paint/ColorFilters\";\nimport {\n LinearGradientNode,\n ShaderNode,\n ImageShaderNode,\n TwoPointConicalGradientNode,\n TurbulenceNode,\n SweepGradientNode,\n RadialGradientNode,\n FractalNoiseNode,\n ColorNode,\n} from \"./paint/Shaders\";\nimport { MorphologyImageFilterNode } from \"./paint/ImageFilters\";\nimport { GroupNode } from \"./GroupNode\";\nimport { PaintNode } from \"./PaintNode\";\nimport type { NodeContext } from \"./Node\";\nimport { LayerNode } from \"./LayerNode\";\nimport { ParagraphNode } from \"./drawings/ParagraphNode\";\n\nexport class JsiSkDOM implements SkDOM {\n constructor(private ctx: NodeContext) {}\n\n Layer(props?: ChildrenProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.LayerNode(props ?? {})\n : new LayerNode(this.ctx, props ?? {});\n }\n\n Group(props?: GroupProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.GroupNode(props ?? {})\n : new GroupNode(this.ctx, props ?? {});\n }\n\n Paint(props: PaintProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.PaintNode(props ?? {})\n : new PaintNode(this.ctx, props);\n }\n\n // Drawings\n Fill(props?: DrawingNodeProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.FillNode(props ?? {})\n : new FillNode(this.ctx, props);\n }\n\n Image(props: ImageProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.ImageNode(props ?? {})\n : new ImageNode(this.ctx, props);\n }\n\n Circle(props: CircleProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.CircleNode(props ?? {})\n : new CircleNode(this.ctx, props);\n }\n\n Path(props: PathProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.PathNode(props ?? {})\n : new PathNode(this.ctx, props);\n }\n\n Line(props: LineProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.LineNode(props ?? {})\n : new LineNode(this.ctx, props);\n }\n\n Oval(props: OvalProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.OvalNode(props ?? {})\n : new OvalNode(this.ctx, props);\n }\n\n Patch(props: PatchProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.PatchNode(props ?? {})\n : new PatchNode(this.ctx, props);\n }\n\n Points(props: PointsProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.PointsNode(props ?? {})\n : new PointsNode(this.ctx, props);\n }\n\n Rect(props: RectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.RectNode(props)\n : new RectNode(this.ctx, props);\n }\n\n RRect(props: RoundedRectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.RRectNode(props)\n : new RRectNode(this.ctx, props);\n }\n\n Vertices(props: VerticesProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.VerticesNode(props)\n : new VerticesNode(this.ctx, props);\n }\n\n Text(props: TextProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.TextNode(props)\n : new TextNode(this.ctx, props);\n }\n\n TextPath(props: TextPathProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.TextPathNode(props)\n : new TextPathNode(this.ctx, props);\n }\n\n TextBlob(props: TextBlobProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.TextBlobNode(props)\n : new TextBlobNode(this.ctx, props);\n }\n\n Glyphs(props: GlyphsProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.GlyphsNode(props)\n : new GlyphsNode(this.ctx, props);\n }\n\n DiffRect(props: DiffRectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.DiffRectNode(props)\n : new DiffRectNode(this.ctx, props);\n }\n\n Picture(props: PictureProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.PictureNode(props)\n : new PictureNode(this.ctx, props);\n }\n\n ImageSVG(props: ImageSVGProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.ImageSVGNode(props)\n : new ImageSVGNode(this.ctx, props);\n }\n\n // BlurMaskFilters\n BlurMaskFilter(props: BlurMaskFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BlurMaskFilterNode(props)\n : new BlurMaskFilterNode(this.ctx, props);\n }\n\n // ImageFilters\n BlendImageFilter(props: BlendImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BlendImageFilterNode(props)\n : new BlendImageFilterNode(this.ctx, props);\n }\n\n DropShadowImageFilter(props: DropShadowImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.DropShadowImageFilterNode(props)\n : new DropShadowImageFilterNode(this.ctx, props);\n }\n\n DisplacementMapImageFilter(props: DisplacementMapImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.DisplacementMapImageFilterNode(props)\n : new DisplacementMapImageFilterNode(this.ctx, props);\n }\n\n BlurImageFilter(props: BlurImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BlurImageFilterNode(props)\n : new BlurImageFilterNode(this.ctx, props);\n }\n\n OffsetImageFilter(props: OffsetImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.OffsetImageFilterNode(props)\n : new OffsetImageFilterNode(this.ctx, props);\n }\n\n MorphologyImageFilter(props: MorphologyImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.MorphologyImageFilterNode(props)\n : new MorphologyImageFilterNode(this.ctx, props);\n }\n\n RuntimeShaderImageFilter(props: RuntimeShaderImageFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.RuntimeShaderImageFilterNode(props)\n : new RuntimeShaderImageFilterNode(this.ctx, props);\n }\n\n // Color Filters\n MatrixColorFilter(props: MatrixColorFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.MatrixColorFilterNode(props)\n : new MatrixColorFilterNode(this.ctx, props);\n }\n\n BlendColorFilter(props: BlendColorFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BlendColorFilterNode(props)\n : new BlendColorFilterNode(this.ctx, props);\n }\n\n LumaColorFilter() {\n return NATIVE_DOM\n ? global.SkiaDomApi.LumaColorFilterNode()\n : new LumaColorFilterNode(this.ctx);\n }\n\n LinearToSRGBGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.LinearToSRGBGammaColorFilterNode\n ? global.SkiaDomApi.LinearToSRGBGammaColorFilterNode()\n : new LinearToSRGBGammaColorFilterNode(this.ctx);\n }\n\n SRGBToLinearGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.SRGBToLinearGammaColorFilterNode\n ? global.SkiaDomApi.SRGBToLinearGammaColorFilterNode()\n : new SRGBToLinearGammaColorFilterNode(this.ctx);\n }\n\n LerpColorFilter(props: LerpColorFilterProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.LerpColorFilterNode(props)\n : new LerpColorFilterNode(this.ctx, props);\n }\n\n // Shaders\n Shader(props: ShaderProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.ShaderNode(props)\n : new ShaderNode(this.ctx, props);\n }\n\n ImageShader(props: ImageShaderProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.ImageShaderNode(props)\n : new ImageShaderNode(this.ctx, props);\n }\n\n ColorShader(props: ColorProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.ColorShaderNode(props)\n : new ColorNode(this.ctx, props);\n }\n\n SweepGradient(props: SweepGradientProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.SweepGradientNode(props)\n : new SweepGradientNode(this.ctx, props);\n }\n\n Turbulence(props: TurbulenceProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.TurbulenceNode(props)\n : new TurbulenceNode(this.ctx, props);\n }\n\n FractalNoise(props: FractalNoiseProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.FractalNoiseNode(props)\n : new FractalNoiseNode(this.ctx, props);\n }\n\n LinearGradient(props: LinearGradientProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.LinearGradientNode(props)\n : new LinearGradientNode(this.ctx, props);\n }\n\n RadialGradient(props: RadialGradientProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.RadialGradientNode(props)\n : new RadialGradientNode(this.ctx, props);\n }\n\n TwoPointConicalGradient(props: TwoPointConicalGradientProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.TwoPointConicalGradientNode(props)\n : new TwoPointConicalGradientNode(this.ctx, props);\n }\n\n // Path Effects\n CornerPathEffect(props: CornerPathEffectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.CornerPathEffectNode(props)\n : new CornerPathEffectNode(this.ctx, props);\n }\n\n DiscretePathEffect(props: DiscretePathEffectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.DiscretePathEffectNode(props)\n : new DiscretePathEffectNode(this.ctx, props);\n }\n\n DashPathEffect(props: DashPathEffectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.DashPathEffectNode(props)\n : new DashPathEffectNode(this.ctx, props);\n }\n\n Path1DPathEffect(props: Path1DPathEffectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.Path1DPathEffectNode(props)\n : new Path1DPathEffectNode(this.ctx, props);\n }\n\n Path2DPathEffect(props: Path2DPathEffectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.Path2DPathEffectNode(props)\n : new Path2DPathEffectNode(this.ctx, props);\n }\n\n SumPathEffect() {\n return NATIVE_DOM\n ? global.SkiaDomApi.SumPathEffectNode()\n : new SumPathEffectNode(this.ctx);\n }\n\n Line2DPathEffect(props: Line2DPathEffectProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.Line2DPathEffectNode(props)\n : new Line2DPathEffectNode(this.ctx, props);\n }\n\n Blend(props: BlendProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BlendNode(props)\n : new BlendNode(this.ctx, props);\n }\n\n BackdropFilter(props: ChildrenProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BackdropFilterNode(props)\n : new BackdropFilterNode(this.ctx, props);\n }\n\n Box(props: BoxProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BoxNode(props)\n : new BoxNode(this.ctx, props);\n }\n\n BoxShadow(props: BoxShadowProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.BoxShadowNode(props)\n : new BoxShadowNode(this.ctx, props);\n }\n\n // Paragraph\n Paragraph(props: ParagraphProps) {\n return NATIVE_DOM\n ? global.SkiaDomApi.ParagraphNode(props)\n : new ParagraphNode(this.ctx, props);\n }\n}\n"],"mappings":"AAyDA,SAASA,UAAT,QAA2B,+BAA3B;AAGA,SACEC,QADF,EAEEC,SAFF,EAGEC,UAHF,EAIEC,QAJF,EAKEC,QALF,EAMEC,SANF,EAOEC,UAPF,EAQEC,QARF,EASEC,SATF,EAUEC,YAVF,EAWEC,QAXF,EAYEC,QAZF,EAaEC,YAbF,EAcEC,YAdF,EAeEC,UAfF,EAgBEC,YAhBF,EAiBEC,WAjBF,EAkBEC,YAlBF,EAmBEC,kBAnBF,EAoBEC,OApBF,EAqBEC,aArBF,QAsBO,YAtBP;AAuBA,SACEC,oBADF,EAEEC,mBAFF,EAGEC,kBAHF,EAIEC,8BAJF,EAKEC,yBALF,EAMEC,qBANF,EAOEC,4BAPF,EAQEC,oBARF,EASEC,sBATF,EAUEC,kBAVF,EAWEC,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AEDsD,KAAK,CAACtD,KAAD,EAAoB;IACvB,OAAO7D,UAAU,GACb8D,MAAM,CAACC,UAAP,CAAkB3B,SAAlB,CAA4ByB,KAA5B,CADa,GAEb,IAAIzB,SAAJ,CAAc,KAAKuB,GAAnB,EAAwBE,KAAxB,CAFJ;EAGD;;EAEDuD,cAAc,CAACvD,KAAD,EAAuB;IACnC,OAAO7D,UAAU,GACb8D,MAAM,CAACC,UAAP,CAAkB5C,kBAAlB,CAAqC0C,KAArC,CADa,GAEb,IAAI1C,kBAAJ,CAAuB,KAAKwC,GAA5B,EAAiCE,KAAjC,CAFJ;EAGD;;EAEDwD,GAAG,CAACxD,KAAD,EAAkB;IACnB,OAAO7D,UAAU,GACb8D,MAAM,CAACC,UAAP,CAAkB3C,OAAlB,CAA0ByC,KAA1B,CADa,GAEb,IAAIzC,OAAJ,CAAY,KAAKuC,GAAjB,EAAsBE,KAAtB,CAFJ;EAGD;;EAEDyD,SAAS,CAACzD,KAAD,EAAwB;IAC/B,OAAO7D,UAAU,GACb8D,MAAM,CAACC,UAAP,CAAkB1C,aAAlB,CAAgCwC,KAAhC,CADa,GAEb,IAAIxC,aAAJ,CAAkB,KAAKsC,GAAvB,EAA4BE,KAA5B,CAFJ;EAGD,CAnVoC,CAqVrC;;;EACA0D,SAAS,CAAC1D,KAAD,EAAwB;IAC/B,OAAO7D,UAAU,GACb8D,MAAM,CAACC,UAAP,CAAkBP,aAAlB,CAAgCK,KAAhC,CADa,GAEb,IAAIL,aAAJ,CAAkB,KAAKG,GAAvB,EAA4BE,KAA5B,CAFJ;EAGD;;AA1VoC"}
1
+ {"version":3,"names":["FillNode","ImageNode","CircleNode","PathNode","LineNode","PatchNode","PointsNode","RectNode","RRectNode","VerticesNode","TextNode","OvalNode","TextPathNode","TextBlobNode","GlyphsNode","DiffRectNode","PictureNode","ImageSVGNode","BackdropFilterNode","BoxNode","BoxShadowNode","BlendImageFilterNode","BlurImageFilterNode","BlurMaskFilterNode","DisplacementMapImageFilterNode","DropShadowImageFilterNode","OffsetImageFilterNode","RuntimeShaderImageFilterNode","CornerPathEffectNode","DiscretePathEffectNode","DashPathEffectNode","Path1DPathEffectNode","Path2DPathEffectNode","SumPathEffectNode","Line2DPathEffectNode","BlendNode","MatrixColorFilterNode","LumaColorFilterNode","LinearToSRGBGammaColorFilterNode","SRGBToLinearGammaColorFilterNode","BlendColorFilterNode","LerpColorFilterNode","LinearGradientNode","ShaderNode","ImageShaderNode","TwoPointConicalGradientNode","TurbulenceNode","SweepGradientNode","RadialGradientNode","FractalNoiseNode","ColorNode","MorphologyImageFilterNode","GroupNode","PaintNode","LayerNode","ParagraphNode","JsiSkDOM","constructor","ctx","native","Layer","props","global","SkiaDomApi","Group","Paint","Fill","Image","Circle","Path","Line","Oval","Patch","Points","Rect","RRect","Vertices","Text","TextPath","TextBlob","Glyphs","DiffRect","Picture","ImageSVG","BlurMaskFilter","BlendImageFilter","DropShadowImageFilter","DisplacementMapImageFilter","BlurImageFilter","OffsetImageFilter","MorphologyImageFilter","RuntimeShaderImageFilter","MatrixColorFilter","BlendColorFilter","LumaColorFilter","LinearToSRGBGammaColorFilter","SRGBToLinearGammaColorFilter","LerpColorFilter","Shader","ImageShader","ColorShader","ColorShaderNode","SweepGradient","Turbulence","FractalNoise","LinearGradient","RadialGradient","TwoPointConicalGradient","CornerPathEffect","DiscretePathEffect","DashPathEffect","Path1DPathEffect","Path2DPathEffect","SumPathEffect","Line2DPathEffect","Blend","BackdropFilter","Box","BoxShadow","Paragraph"],"sources":["JsiSkDOM.ts"],"sourcesContent":["import type {\n PathProps,\n SkDOM,\n GroupProps,\n ImageProps,\n BlurImageFilterProps,\n MatrixColorFilterProps,\n CircleProps,\n BlurMaskFilterProps,\n LinearGradientProps,\n PaintProps,\n ShaderProps,\n ImageShaderProps,\n LineProps,\n OvalProps,\n PatchProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n VerticesProps,\n TextProps,\n DiffRectProps,\n OffsetImageFilterProps,\n BlendColorFilterProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n FractalNoiseProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n DrawingNodeProps,\n BoxProps,\n BoxShadowProps,\n ChildrenProps,\n} from \"../types\";\nimport type {\n BlendImageFilterProps,\n BlendProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../types/ImageFilters\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../types/PathEffects\";\nimport type { ParagraphProps } from \"../types/Paragraph\";\n\nimport {\n FillNode,\n ImageNode,\n CircleNode,\n PathNode,\n LineNode,\n PatchNode,\n PointsNode,\n RectNode,\n RRectNode,\n VerticesNode,\n TextNode,\n OvalNode,\n TextPathNode,\n TextBlobNode,\n GlyphsNode,\n DiffRectNode,\n PictureNode,\n ImageSVGNode,\n BackdropFilterNode,\n BoxNode,\n BoxShadowNode,\n} from \"./drawings\";\nimport {\n BlendImageFilterNode,\n BlurImageFilterNode,\n BlurMaskFilterNode,\n DisplacementMapImageFilterNode,\n DropShadowImageFilterNode,\n OffsetImageFilterNode,\n RuntimeShaderImageFilterNode,\n CornerPathEffectNode,\n DiscretePathEffectNode,\n DashPathEffectNode,\n Path1DPathEffectNode,\n Path2DPathEffectNode,\n SumPathEffectNode,\n Line2DPathEffectNode,\n BlendNode,\n} from \"./paint\";\nimport {\n MatrixColorFilterNode,\n LumaColorFilterNode,\n LinearToSRGBGammaColorFilterNode,\n SRGBToLinearGammaColorFilterNode,\n BlendColorFilterNode,\n LerpColorFilterNode,\n} from \"./paint/ColorFilters\";\nimport {\n LinearGradientNode,\n ShaderNode,\n ImageShaderNode,\n TwoPointConicalGradientNode,\n TurbulenceNode,\n SweepGradientNode,\n RadialGradientNode,\n FractalNoiseNode,\n ColorNode,\n} from \"./paint/Shaders\";\nimport { MorphologyImageFilterNode } from \"./paint/ImageFilters\";\nimport { GroupNode } from \"./GroupNode\";\nimport { PaintNode } from \"./PaintNode\";\nimport type { NodeContext } from \"./Node\";\nimport { LayerNode } from \"./LayerNode\";\nimport { ParagraphNode } from \"./drawings/ParagraphNode\";\n\nexport class JsiSkDOM implements SkDOM {\n constructor(private ctx: NodeContext, private native: boolean) {}\n\n Layer(props?: ChildrenProps) {\n return this.native\n ? global.SkiaDomApi.LayerNode(props ?? {})\n : new LayerNode(this.ctx, props ?? {});\n }\n\n Group(props?: GroupProps) {\n return this.native\n ? global.SkiaDomApi.GroupNode(props ?? {})\n : new GroupNode(this.ctx, props ?? {});\n }\n\n Paint(props: PaintProps) {\n return this.native\n ? global.SkiaDomApi.PaintNode(props ?? {})\n : new PaintNode(this.ctx, props);\n }\n\n // Drawings\n Fill(props?: DrawingNodeProps) {\n return this.native\n ? global.SkiaDomApi.FillNode(props ?? {})\n : new FillNode(this.ctx, props);\n }\n\n Image(props: ImageProps) {\n return this.native\n ? global.SkiaDomApi.ImageNode(props ?? {})\n : new ImageNode(this.ctx, props);\n }\n\n Circle(props: CircleProps) {\n return this.native\n ? global.SkiaDomApi.CircleNode(props ?? {})\n : new CircleNode(this.ctx, props);\n }\n\n Path(props: PathProps) {\n return this.native\n ? global.SkiaDomApi.PathNode(props ?? {})\n : new PathNode(this.ctx, props);\n }\n\n Line(props: LineProps) {\n return this.native\n ? global.SkiaDomApi.LineNode(props ?? {})\n : new LineNode(this.ctx, props);\n }\n\n Oval(props: OvalProps) {\n return this.native\n ? global.SkiaDomApi.OvalNode(props ?? {})\n : new OvalNode(this.ctx, props);\n }\n\n Patch(props: PatchProps) {\n return this.native\n ? global.SkiaDomApi.PatchNode(props ?? {})\n : new PatchNode(this.ctx, props);\n }\n\n Points(props: PointsProps) {\n return this.native\n ? global.SkiaDomApi.PointsNode(props ?? {})\n : new PointsNode(this.ctx, props);\n }\n\n Rect(props: RectProps) {\n return this.native\n ? global.SkiaDomApi.RectNode(props)\n : new RectNode(this.ctx, props);\n }\n\n RRect(props: RoundedRectProps) {\n return this.native\n ? global.SkiaDomApi.RRectNode(props)\n : new RRectNode(this.ctx, props);\n }\n\n Vertices(props: VerticesProps) {\n return this.native\n ? global.SkiaDomApi.VerticesNode(props)\n : new VerticesNode(this.ctx, props);\n }\n\n Text(props: TextProps) {\n return this.native\n ? global.SkiaDomApi.TextNode(props)\n : new TextNode(this.ctx, props);\n }\n\n TextPath(props: TextPathProps) {\n return this.native\n ? global.SkiaDomApi.TextPathNode(props)\n : new TextPathNode(this.ctx, props);\n }\n\n TextBlob(props: TextBlobProps) {\n return this.native\n ? global.SkiaDomApi.TextBlobNode(props)\n : new TextBlobNode(this.ctx, props);\n }\n\n Glyphs(props: GlyphsProps) {\n return this.native\n ? global.SkiaDomApi.GlyphsNode(props)\n : new GlyphsNode(this.ctx, props);\n }\n\n DiffRect(props: DiffRectProps) {\n return this.native\n ? global.SkiaDomApi.DiffRectNode(props)\n : new DiffRectNode(this.ctx, props);\n }\n\n Picture(props: PictureProps) {\n return this.native\n ? global.SkiaDomApi.PictureNode(props)\n : new PictureNode(this.ctx, props);\n }\n\n ImageSVG(props: ImageSVGProps) {\n return this.native\n ? global.SkiaDomApi.ImageSVGNode(props)\n : new ImageSVGNode(this.ctx, props);\n }\n\n // BlurMaskFilters\n BlurMaskFilter(props: BlurMaskFilterProps) {\n return this.native\n ? global.SkiaDomApi.BlurMaskFilterNode(props)\n : new BlurMaskFilterNode(this.ctx, props);\n }\n\n // ImageFilters\n BlendImageFilter(props: BlendImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.BlendImageFilterNode(props)\n : new BlendImageFilterNode(this.ctx, props);\n }\n\n DropShadowImageFilter(props: DropShadowImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.DropShadowImageFilterNode(props)\n : new DropShadowImageFilterNode(this.ctx, props);\n }\n\n DisplacementMapImageFilter(props: DisplacementMapImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.DisplacementMapImageFilterNode(props)\n : new DisplacementMapImageFilterNode(this.ctx, props);\n }\n\n BlurImageFilter(props: BlurImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.BlurImageFilterNode(props)\n : new BlurImageFilterNode(this.ctx, props);\n }\n\n OffsetImageFilter(props: OffsetImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.OffsetImageFilterNode(props)\n : new OffsetImageFilterNode(this.ctx, props);\n }\n\n MorphologyImageFilter(props: MorphologyImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.MorphologyImageFilterNode(props)\n : new MorphologyImageFilterNode(this.ctx, props);\n }\n\n RuntimeShaderImageFilter(props: RuntimeShaderImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.RuntimeShaderImageFilterNode(props)\n : new RuntimeShaderImageFilterNode(this.ctx, props);\n }\n\n // Color Filters\n MatrixColorFilter(props: MatrixColorFilterProps) {\n return this.native\n ? global.SkiaDomApi.MatrixColorFilterNode(props)\n : new MatrixColorFilterNode(this.ctx, props);\n }\n\n BlendColorFilter(props: BlendColorFilterProps) {\n return this.native\n ? global.SkiaDomApi.BlendColorFilterNode(props)\n : new BlendColorFilterNode(this.ctx, props);\n }\n\n LumaColorFilter() {\n return this.native\n ? global.SkiaDomApi.LumaColorFilterNode()\n : new LumaColorFilterNode(this.ctx);\n }\n\n LinearToSRGBGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.LinearToSRGBGammaColorFilterNode\n ? global.SkiaDomApi.LinearToSRGBGammaColorFilterNode()\n : new LinearToSRGBGammaColorFilterNode(this.ctx);\n }\n\n SRGBToLinearGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.SRGBToLinearGammaColorFilterNode\n ? global.SkiaDomApi.SRGBToLinearGammaColorFilterNode()\n : new SRGBToLinearGammaColorFilterNode(this.ctx);\n }\n\n LerpColorFilter(props: LerpColorFilterProps) {\n return this.native\n ? global.SkiaDomApi.LerpColorFilterNode(props)\n : new LerpColorFilterNode(this.ctx, props);\n }\n\n // Shaders\n Shader(props: ShaderProps) {\n return this.native\n ? global.SkiaDomApi.ShaderNode(props)\n : new ShaderNode(this.ctx, props);\n }\n\n ImageShader(props: ImageShaderProps) {\n return this.native\n ? global.SkiaDomApi.ImageShaderNode(props)\n : new ImageShaderNode(this.ctx, props);\n }\n\n ColorShader(props: ColorProps) {\n return this.native\n ? global.SkiaDomApi.ColorShaderNode(props)\n : new ColorNode(this.ctx, props);\n }\n\n SweepGradient(props: SweepGradientProps) {\n return this.native\n ? global.SkiaDomApi.SweepGradientNode(props)\n : new SweepGradientNode(this.ctx, props);\n }\n\n Turbulence(props: TurbulenceProps) {\n return this.native\n ? global.SkiaDomApi.TurbulenceNode(props)\n : new TurbulenceNode(this.ctx, props);\n }\n\n FractalNoise(props: FractalNoiseProps) {\n return this.native\n ? global.SkiaDomApi.FractalNoiseNode(props)\n : new FractalNoiseNode(this.ctx, props);\n }\n\n LinearGradient(props: LinearGradientProps) {\n return this.native\n ? global.SkiaDomApi.LinearGradientNode(props)\n : new LinearGradientNode(this.ctx, props);\n }\n\n RadialGradient(props: RadialGradientProps) {\n return this.native\n ? global.SkiaDomApi.RadialGradientNode(props)\n : new RadialGradientNode(this.ctx, props);\n }\n\n TwoPointConicalGradient(props: TwoPointConicalGradientProps) {\n return this.native\n ? global.SkiaDomApi.TwoPointConicalGradientNode(props)\n : new TwoPointConicalGradientNode(this.ctx, props);\n }\n\n // Path Effects\n CornerPathEffect(props: CornerPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.CornerPathEffectNode(props)\n : new CornerPathEffectNode(this.ctx, props);\n }\n\n DiscretePathEffect(props: DiscretePathEffectProps) {\n return this.native\n ? global.SkiaDomApi.DiscretePathEffectNode(props)\n : new DiscretePathEffectNode(this.ctx, props);\n }\n\n DashPathEffect(props: DashPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.DashPathEffectNode(props)\n : new DashPathEffectNode(this.ctx, props);\n }\n\n Path1DPathEffect(props: Path1DPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.Path1DPathEffectNode(props)\n : new Path1DPathEffectNode(this.ctx, props);\n }\n\n Path2DPathEffect(props: Path2DPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.Path2DPathEffectNode(props)\n : new Path2DPathEffectNode(this.ctx, props);\n }\n\n SumPathEffect() {\n return this.native\n ? global.SkiaDomApi.SumPathEffectNode()\n : new SumPathEffectNode(this.ctx);\n }\n\n Line2DPathEffect(props: Line2DPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.Line2DPathEffectNode(props)\n : new Line2DPathEffectNode(this.ctx, props);\n }\n\n Blend(props: BlendProps) {\n return this.native\n ? global.SkiaDomApi.BlendNode(props)\n : new BlendNode(this.ctx, props);\n }\n\n BackdropFilter(props: ChildrenProps) {\n return this.native\n ? global.SkiaDomApi.BackdropFilterNode(props)\n : new BackdropFilterNode(this.ctx, props);\n }\n\n Box(props: BoxProps) {\n return this.native\n ? global.SkiaDomApi.BoxNode(props)\n : new BoxNode(this.ctx, props);\n }\n\n BoxShadow(props: BoxShadowProps) {\n return this.native\n ? global.SkiaDomApi.BoxShadowNode(props)\n : new BoxShadowNode(this.ctx, props);\n }\n\n // Paragraph\n Paragraph(props: ParagraphProps) {\n return this.native\n ? global.SkiaDomApi.ParagraphNode(props)\n : new ParagraphNode(this.ctx, props);\n }\n}\n"],"mappings":"AA2DA,SACEA,QADF,EAEEC,SAFF,EAGEC,UAHF,EAIEC,QAJF,EAKEC,QALF,EAMEC,SANF,EAOEC,UAPF,EAQEC,QARF,EASEC,SATF,EAUEC,YAVF,EAWEC,QAXF,EAYEC,QAZF,EAaEC,YAbF,EAcEC,YAdF,EAeEC,UAfF,EAgBEC,YAhBF,EAiBEC,WAjBF,EAkBEC,YAlBF,EAmBEC,kBAnBF,EAoBEC,OApBF,EAqBEC,aArBF,QAsBO,YAtB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AC/B,OAAO,KAAKF,MAAL,GACHG,MAAM,CAACC,UAAP,CAAkBR,aAAlB,CAAgCM,KAAhC,CADG,GAEH,IAAIN,aAAJ,CAAkB,KAAKG,GAAvB,EAA4BG,KAA5B,CAFJ;EAGD;;AA1VoC"}
@@ -2,3 +2,4 @@ export * from "./useAnimatedImageValue";
2
2
  export * from "./useDerivedValueOnJS";
3
3
  export * from "./renderHelpers";
4
4
  export * from "./interpolators";
5
+ export * from "./textures";
@@ -2,4 +2,5 @@ export * from "./useAnimatedImageValue";
2
2
  export * from "./useDerivedValueOnJS";
3
3
  export * from "./renderHelpers";
4
4
  export * from "./interpolators";
5
+ export * from "./textures";
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./useAnimatedImageValue\";\nexport * from \"./useDerivedValueOnJS\";\nexport * from \"./renderHelpers\";\nexport * from \"./interpolators\";\n"],"mappings":"AAAA,cAAc,yBAAd;AACA,cAAc,uBAAd;AACA,cAAc,iBAAd;AACA,cAAc,iBAAd"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./useAnimatedImageValue\";\nexport * from \"./useDerivedValueOnJS\";\nexport * from \"./renderHelpers\";\nexport * from \"./interpolators\";\nexport * from \"./textures\";\n"],"mappings":"AAAA,cAAc,yBAAd;AACA,cAAc,uBAAd;AACA,cAAc,iBAAd;AACA,cAAc,iBAAd;AACA,cAAc,YAAd"}
@@ -1,11 +1,12 @@
1
1
  import { useCallback, useMemo } from "react";
2
2
  import { interpolatePaths, interpolateVector } from "../../animation";
3
3
  import { Skia } from "../../skia";
4
+ import { Platform } from "../../Platform";
4
5
  import { useAnimatedReaction, useFrameCallback, useSharedValue, useDerivedValue } from "./moduleWrapper";
5
6
  export const notifyChange = value => {
6
7
  "worklet";
7
8
 
8
- if (_WORKLET) {
9
+ if (_WORKLET || Platform.OS === "web") {
9
10
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
11
  value._value = value.value;
11
12
  }
@@ -45,6 +46,18 @@ const useInterpolator = (factory, value, interpolator, input, output, options) =
45
46
  return result;
46
47
  };
47
48
 
48
- export const usePathInterpolation = (value, input, outputRange, options) => useInterpolator(() => Skia.Path.Make(), value, interpolatePaths, input, outputRange, options);
49
+ export const usePathInterpolation = (value, input, outputRange, options) => {
50
+ // Check if all paths in outputRange are interpolable
51
+ const allPathsInterpolable = outputRange.slice(1).every(path => outputRange[0].isInterpolatable(path));
52
+
53
+ if (!allPathsInterpolable) {
54
+ // Handle the case where not all paths are interpolable
55
+ // For example, throw an error or return early
56
+ throw new Error(`Not all paths in the output range are interpolable.
57
+ See: https://shopify.github.io/react-native-skia/docs/animations/hooks#usepathinterpolation`);
58
+ }
59
+
60
+ return useInterpolator(() => Skia.Path.Make(), value, interpolatePaths, input, outputRange, options);
61
+ };
49
62
  export const useVectorInterpolation = (value, input, outputRange, options) => useInterpolator(() => Skia.Point(0, 0), value, interpolateVector, input, outputRange, options);
50
63
  //# sourceMappingURL=interpolators.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","useMemo","interpolatePaths","interpolateVector","Skia","useAnimatedReaction","useFrameCallback","useSharedValue","useDerivedValue","notifyChange","value","_WORKLET","_value","usePathValue","cb","pathInit","Path","Make","path","reset","useClock","clock","callback","info","timeSinceFirstFrame","useInterpolator","factory","interpolator","input","output","options","init","result","val","usePathInterpolation","outputRange","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\";\n\nimport {\n useAnimatedReaction,\n useFrameCallback,\n useSharedValue,\n useDerivedValue,\n} from \"./moduleWrapper\";\n\nexport const notifyChange = (value: SharedValue<unknown>) => {\n \"worklet\";\n if (_WORKLET) {\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) => {\n const pathInit = useMemo(() => Skia.Path.Make(), []);\n const path = useSharedValue(pathInit);\n useDerivedValue(() => {\n path.value.reset();\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 useInterpolator(\n () => Skia.Path.Make(),\n value,\n interpolatePaths,\n input,\n outputRange,\n options\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,WAAT,EAAsBC,OAAtB,QAAqC,OAArC;AAGA,SAASC,gBAAT,EAA2BC,iBAA3B,QAAoD,iBAApD;AACA,SAASC,IAAT,QAAqB,YAArB;AAEA,SACEC,mBADF,EAEEC,gBAFF,EAGEC,cAHF,EAIEC,eAJF,QA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AAeiB,YAAY,CAACM,GAAD,EAAML,KAAN,EAAaC,MAAb,EAAqBC,OAArB,EAA8BE,MAAM,CAACtB,KAArC,CAA3B;IACAD,YAAY,CAACuB,MAAD,CAAZ;EACD,CALgB,EAMjB,CAACJ,KAAD,EAAQC,MAAR,EAAgBC,OAAhB,CANiB,CAAnB;EAQA,OAAOE,MAAP;AACD,CApBD;;AAsBA,OAAO,MAAME,oBAAoB,GAAG,CAClCxB,KADkC,EAElCkB,KAFkC,EAGlCO,WAHkC,EAIlCL,OAJkC,KAMlCL,eAAe,CACb,MAAMrB,IAAI,CAACY,IAAL,CAAUC,IAAV,EADO,EAEbP,KAFa,EAGbR,gBAHa,EAIb0B,KAJa,EAKbO,WALa,EAMbL,OANa,CANV;AAeP,OAAO,MAAMM,sBAAsB,GAAG,CACpC1B,KADoC,EAEpCkB,KAFoC,EAGpCO,WAHoC,EAIpCL,OAJoC,KAMpCL,eAAe,CACb,MAAMrB,IAAI,CAACiC,KAAL,CAAW,CAAX,EAAc,CAAd,CADO,EAEb3B,KAFa,EAGbP,iBAHa,EAIbyB,KAJa,EAKbO,WALa,EAMbL,OANa,CANV"}
1
+ {"version":3,"names":["useCallback","useMemo","interpolatePaths","interpolateVector","Skia","Platform","useAnimatedReaction","useFrameCallback","useSharedValue","useDerivedValue","notifyChange","value","_WORKLET","OS","_value","usePathValue","cb","pathInit","Path","Make","path","reset","useClock","clock","callback","info","timeSinceFirstFrame","useInterpolator","factory","interpolator","input","output","options","init","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 { Platform } from \"../../Platform\";\n\nimport {\n useAnimatedReaction,\n useFrameCallback,\n useSharedValue,\n useDerivedValue,\n} from \"./moduleWrapper\";\n\nexport const notifyChange = (value: SharedValue<unknown>) => {\n \"worklet\";\n if (_WORKLET || Platform.OS === \"web\") {\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) => {\n const pathInit = useMemo(() => Skia.Path.Make(), []);\n const path = useSharedValue(pathInit);\n useDerivedValue(() => {\n path.value.reset();\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,WAAT,EAAsBC,OAAtB,QAAqC,OAArC;AAGA,SAASC,gBAAT,EAA2BC,iBAA3B,QAAoD,iBAApD;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,QAAT,QAAyB,gBAAzB;AAEA,SACEC,mBADF,EAEEC,gBAFF,EAGEC,cAHF,EAIEC,eAJF,QAKO,iBALP;AAOA,OAAO,MAAMC,YAAY,GAAIC,KAAD,IAAiC;EAC3D;;EACA,IAAIC,QAAQ,IAAIP,QAAQ,CAACQ,EAAT,KAAgB,KAAhC,EAAuC;IACrC;IACCF,KAAD,CAAeG,MAAf,GAAwBH,KAAK,CAACA,KAA9B;EACD;AACF,CANM;AAQP,OAAO,MAAMI,YAAY,GAAIC,EAAD,IAAgC;EAC1D,MAAMC,QAAQ,GAAGhB,OAAO,CAAC,MAAMG,IAAI,CAACc,IAAL,CAAUC,IAAV,EAAP,EAAyB,EAAzB,CAAxB;EACA,MAAMC,IAAI,GAAGZ,cAAc,CAACS,QAAD,CAA3B;EACAR,eAAe,CAAC,MAAM;IACpBW,IAAI,CAACT,KAAL,CAAWU,KAAX;IACAL,EAAE,CAACI,IAAI,CAACT,KAAN,CAAF;IACAD,YAAY,CAACU,IAAD,CAAZ;EACD,CAJc,CAAf;EAKA,OAAOA,IAAP;AACD,CATM;AAWP,OAAO,MAAME,QAAQ,GAAG,MAAM;EAC5B,MAAMC,KAAK,GAAGf,cAAc,CAAC,CAAD,CAA5B;EACA,MAAMgB,QAAQ,GAAGxB,WAAW,CACzByB,IAAD,IAAqB;IACnB;;IACAF,KAAK,CAACZ,KAAN,GAAcc,IAAI,CAACC,mBAAnB;EACD,CAJyB,EAK1B,CAACH,KAAD,CAL0B,CAA5B;E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sBAAsB,GAAG,CACpChC,KADoC,EAEpCmB,KAFoC,EAGpCO,WAHoC,EAIpCL,OAJoC,KAMpCL,eAAe,CACb,MAAMvB,IAAI,CAACwC,KAAL,CAAW,CAAX,EAAc,CAAd,CADO,EAEbjC,KAFa,EAGbR,iBAHa,EAIb2B,KAJa,EAKbO,WALa,EAMbL,OANa,CANV"}
@@ -9,5 +9,6 @@ export declare const useFrameCallback: (callback: (frameInfo: FrameInfo) => void
9
9
  export declare const startMapper: (worklet: () => void, inputs?: unknown[], outputs?: unknown[]) => number;
10
10
  export declare const stopMapper: (mapperID: number) => void;
11
11
  export declare const runOnJS: any;
12
+ export declare const runOnUI: any;
12
13
  export declare const useAnimatedReaction: <T>(prepare: () => T, react: (v: T) => void, dependencies?: DependencyList) => void;
13
14
  export declare const isSharedValue: <T>(value: unknown) => value is SharedValue<T>;
@@ -1,4 +1,4 @@
1
- var _Reanimated, _Reanimated2, _Reanimated3, _Reanimated4, _Reanimated5, _Reanimated6, _Reanimated7;
1
+ var _Reanimated, _Reanimated2, _Reanimated3, _Reanimated4, _Reanimated5, _Reanimated6, _Reanimated7, _Reanimated8;
2
2
 
3
3
  /* eslint-disable @typescript-eslint/no-explicit-any */
4
4
  // This one is needed for the deprecated useSharedValue function
@@ -30,7 +30,8 @@ export const useFrameCallback = ((_Reanimated3 = Reanimated2) === null || _Reani
30
30
  export const startMapper = ((_Reanimated4 = Reanimated2) === null || _Reanimated4 === void 0 ? void 0 : _Reanimated4.startMapper) || throwOnMissingReanimated;
31
31
  export const stopMapper = ((_Reanimated5 = Reanimated2) === null || _Reanimated5 === void 0 ? void 0 : _Reanimated5.stopMapper) || throwOnMissingReanimated;
32
32
  export const runOnJS = ((_Reanimated6 = Reanimated2) === null || _Reanimated6 === void 0 ? void 0 : _Reanimated6.runOnJS) || throwOnMissingReanimated;
33
- export const useAnimatedReaction = ((_Reanimated7 = Reanimated2) === null || _Reanimated7 === void 0 ? void 0 : _Reanimated7.useAnimatedReaction) || throwOnMissingReanimated;
33
+ export const runOnUI = ((_Reanimated7 = Reanimated2) === null || _Reanimated7 === void 0 ? void 0 : _Reanimated7.runOnUI) || throwOnMissingReanimated;
34
+ export const useAnimatedReaction = ((_Reanimated8 = Reanimated2) === null || _Reanimated8 === void 0 ? void 0 : _Reanimated8.useAnimatedReaction) || throwOnMissingReanimated;
34
35
  export const isSharedValue = value => {
35
36
  return !!value && (Reanimated3 ? Reanimated3.isSharedValue(value) : value.value !== undefined);
36
37
  };
@@ -1 +1 @@
1
- {"version":3,"names":["Reanimated2","Reanimated3","reanimatedVersion","require","version","includes","e","HAS_REANIMATED2","HAS_REANIMATED3","throwOnMissingReanimated","Error","useSharedValue","useDerivedValue","useFrameCallback","startMapper","stopMapper","runOnJS","useAnimatedReaction","isSharedValue","value","undefined"],"sources":["moduleWrapper.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { DependencyList } from \"react\";\nimport type {\n DerivedValue,\n FrameCallback,\n FrameInfo,\n SharedValue,\n} from \"react-native-reanimated\";\n\n// This one is needed for the deprecated useSharedValue function\n// We can remove it once we remove the deprecation\n\nlet Reanimated2: any;\n\nlet Reanimated3: any;\nlet reanimatedVersion: string;\n\ntry {\n Reanimated2 = require(\"react-native-reanimated\");\n reanimatedVersion = require(\"react-native-reanimated/package.json\").version;\n if (\n reanimatedVersion &&\n (reanimatedVersion >= \"3.0.0\" || reanimatedVersion.includes(\"3.0.0-\"))\n ) {\n Reanimated3 = Reanimated2;\n }\n} catch (e) {}\n\nexport const HAS_REANIMATED2 = !!Reanimated2;\nexport const HAS_REANIMATED3 = !!Reanimated3;\n\nexport function throwOnMissingReanimated() {\n if (!HAS_REANIMATED2) {\n throw new Error(\n \"Reanimated was not found, make sure react-native-reanimated package is installed if you want to use \\\n react-native-skia's integration layer API.\"\n );\n }\n}\n\nexport const useSharedValue: <T>(\n init: T,\n oneWayReadsOnly?: boolean\n) => SharedValue<T> = Reanimated2?.useSharedValue || throwOnMissingReanimated;\n\nexport const useDerivedValue: <T>(\n processor: () => T,\n dependencies?: DependencyList\n) => DerivedValue<T> = Reanimated2?.useDerivedValue || throwOnMissingReanimated;\n\nexport const useFrameCallback: (\n callback: (frameInfo: FrameInfo) => void,\n autostart?: boolean\n) => FrameCallback = Reanimated2?.useFrameCallback || throwOnMissingReanimated;\n\nexport const startMapper: (\n worklet: () => void,\n inputs?: unknown[],\n outputs?: unknown[]\n) => number = Reanimated2?.startMapper || throwOnMissingReanimated;\n\nexport const stopMapper: (mapperID: number) => void =\n Reanimated2?.stopMapper || throwOnMissingReanimated;\n\nexport const runOnJS = Reanimated2?.runOnJS || throwOnMissingReanimated;\n\nexport const useAnimatedReaction: <T>(\n prepare: () => T,\n react: (v: T) => void,\n dependencies?: DependencyList\n) => void = Reanimated2?.useAnimatedReaction || throwOnMissingReanimated;\n\nexport const isSharedValue = <T>(value: unknown): value is SharedValue<T> => {\n return (\n !!value &&\n (Reanimated3\n ? Reanimated3.isSharedValue(value)\n : (value as any).value !== undefined)\n );\n};\n"],"mappings":";;AAAA;AASA;AACA;AAEA,IAAIA,WAAJ;AAEA,IAAIC,WAAJ;AACA,IAAIC,iBAAJ;;AAEA,IAAI;EACFF,WAAW,GAAGG,OAAO,CAAC,yBAAD,CAArB;EACAD,iBAAiB,GAAGC,OAAO,CAAC,sCAAD,CAAP,CAAgDC,OAApE;;EACA,IACEF,iBAAiB,KAChBA,iBAAiB,IAAI,OAArB,IAAgCA,iBAAiB,CAACG,QAAlB,CAA2B,QAA3B,CADhB,CADnB,EAGE;IACAJ,WAAW,GAAGD,WAAd;EACD;AACF,CATD,CASE,OAAOM,CAAP,EAAU,CAAE;;AAEd,OAAO,MAAMC,eAAe,GAAG,CAAC,CAACP,WAA1B;AACP,OAAO,MAAMQ,eAAe,GAAG,CAAC,CAACP,WAA1B;AAEP,OAAO,SAASQ,wBAAT,GAAoC;EACzC,IAAI,CAACF,eAAL,EAAsB;IACpB,MAAM,IAAIG,KAAJ,CACJ;AACN,iDAFU,CAAN;EAID;AACF;AAED,OAAO,MAAMC,cAGM,GAAG,gBAAAX,WAAW,UAAX,kDAAaW,cAAb,KAA+BF,wBAH9C;AAKP,OAAO,MAAMG,eAGO,GAAG,iBAAAZ,WAAW,UAAX,oDAAaY,eAAb,KAAgCH,wBAHhD;AAKP,OAAO,MAAMI,gBAGK,GAAG,iBAAAb,WAAW,UAAX,oDAAaa,gBAAb,KAAiCJ,wBAH/C;AAKP,OAAO,MAAMK,WAIF,GAAG,iBAAAd,WAAW,UAAX,oDAAac,WAAb,KAA4BL,wBAJnC;AAMP,OAAO,MAAMM,UAAsC,GACjD,iBAAAf,WAAW,UAAX,oDAAae,UAAb,KAA2BN,wBADtB;AAGP,OAAO,MAAMO,OAAO,GAAG,iBAAAhB,WAAW,UAAX,oDAAagB,OAAb,KAAwBP,wBAAxC;AAEP,OAAO,MAAMQ,mBAIJ,GAAG,iBAAAjB,WAAW,UAAX,oDAAaiB,mBAAb,KAAoCR,wBAJzC;AAMP,OAAO,MAAMS,aAAa,GAAOC,KAAJ,IAAgD;EAC3E,OACE,CAAC,CAACA,KAAF,KACClB,WAAW,GACRA,WAAW,CAACiB,aAAZ,CAA0BC,KAA1B,CADQ,GAEPA,KAAD,CAAeA,KAAf,KAAyBC,SAH7B,CADF;AAMD,CAPM"}
1
+ {"version":3,"names":["Reanimated2","Reanimated3","reanimatedVersion","require","version","includes","e","HAS_REANIMATED2","HAS_REANIMATED3","throwOnMissingReanimated","Error","useSharedValue","useDerivedValue","useFrameCallback","startMapper","stopMapper","runOnJS","runOnUI","useAnimatedReaction","isSharedValue","value","undefined"],"sources":["moduleWrapper.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { DependencyList } from \"react\";\nimport type {\n DerivedValue,\n FrameCallback,\n FrameInfo,\n SharedValue,\n} from \"react-native-reanimated\";\n\n// This one is needed for the deprecated useSharedValue function\n// We can remove it once we remove the deprecation\n\nlet Reanimated2: any;\n\nlet Reanimated3: any;\nlet reanimatedVersion: string;\n\ntry {\n Reanimated2 = require(\"react-native-reanimated\");\n reanimatedVersion = require(\"react-native-reanimated/package.json\").version;\n if (\n reanimatedVersion &&\n (reanimatedVersion >= \"3.0.0\" || reanimatedVersion.includes(\"3.0.0-\"))\n ) {\n Reanimated3 = Reanimated2;\n }\n} catch (e) {}\n\nexport const HAS_REANIMATED2 = !!Reanimated2;\nexport const HAS_REANIMATED3 = !!Reanimated3;\n\nexport function throwOnMissingReanimated() {\n if (!HAS_REANIMATED2) {\n throw new Error(\n \"Reanimated was not found, make sure react-native-reanimated package is installed if you want to use \\\n react-native-skia's integration layer API.\"\n );\n }\n}\n\nexport const useSharedValue: <T>(\n init: T,\n oneWayReadsOnly?: boolean\n) => SharedValue<T> = Reanimated2?.useSharedValue || throwOnMissingReanimated;\n\nexport const useDerivedValue: <T>(\n processor: () => T,\n dependencies?: DependencyList\n) => DerivedValue<T> = Reanimated2?.useDerivedValue || throwOnMissingReanimated;\n\nexport const useFrameCallback: (\n callback: (frameInfo: FrameInfo) => void,\n autostart?: boolean\n) => FrameCallback = Reanimated2?.useFrameCallback || throwOnMissingReanimated;\n\nexport const startMapper: (\n worklet: () => void,\n inputs?: unknown[],\n outputs?: unknown[]\n) => number = Reanimated2?.startMapper || throwOnMissingReanimated;\n\nexport const stopMapper: (mapperID: number) => void =\n Reanimated2?.stopMapper || throwOnMissingReanimated;\n\nexport const runOnJS = Reanimated2?.runOnJS || throwOnMissingReanimated;\nexport const runOnUI = Reanimated2?.runOnUI || throwOnMissingReanimated;\n\nexport const useAnimatedReaction: <T>(\n prepare: () => T,\n react: (v: T) => void,\n dependencies?: DependencyList\n) => void = Reanimated2?.useAnimatedReaction || throwOnMissingReanimated;\n\nexport const isSharedValue = <T>(value: unknown): value is SharedValue<T> => {\n return (\n !!value &&\n (Reanimated3\n ? Reanimated3.isSharedValue(value)\n : (value as any).value !== undefined)\n );\n};\n"],"mappings":";;AAAA;AASA;AACA;AAEA,IAAIA,WAA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AoCT,wBAJzC;AAMP,OAAO,MAAMU,aAAa,GAAOC,KAAJ,IAAgD;EAC3E,OACE,CAAC,CAACA,KAAF,KACCnB,WAAW,GACRA,WAAW,CAACkB,aAAZ,CAA0BC,KAA1B,CADQ,GAEPA,KAAD,CAAeA,KAAf,KAAyBC,SAH7B,CADF;AAMD,CAPM"}
@@ -0,0 +1,5 @@
1
+ import type { ReactElement } from "react";
2
+ import type { SharedValue } from "react-native-reanimated";
3
+ import type { SkImage, SkPicture, SkSize } from "../../skia/types";
4
+ export declare const useTextureValue: (element: ReactElement, size: SkSize) => SharedValue<SkImage | null>;
5
+ export declare const useTextureValueFromPicture: (picture: SkPicture, size: SkSize) => SharedValue<SkImage | null>;
@@ -0,0 +1,35 @@
1
+ import { useEffect, useMemo } from "react";
2
+ import { Skia } from "../../skia";
3
+ import { drawAsPicture } from "../../renderer/Offscreen";
4
+ import { runOnUI, useSharedValue } from "./moduleWrapper"; // TODO: We're not sure yet why PixelRatio is not needed here.
5
+
6
+ const pd = 1; //Platform.PixelRatio;
7
+
8
+ const createTexture = (texture, picture, size) => {
9
+ "worklet";
10
+
11
+ const surface = Skia.Surface.MakeOffscreen(size.width * pd, size.height * pd);
12
+ const canvas = surface.getCanvas(); // see comment above
13
+ //canvas.save();
14
+ //canvas.scale(pd, pd);
15
+
16
+ canvas.drawPicture(picture); //canvas.restore();
17
+
18
+ surface.flush();
19
+ texture.value = surface.makeImageSnapshot();
20
+ };
21
+
22
+ export const useTextureValue = (element, size) => {
23
+ const picture = useMemo(() => {
24
+ return drawAsPicture(element);
25
+ }, [element]);
26
+ return useTextureValueFromPicture(picture, size);
27
+ };
28
+ export const useTextureValueFromPicture = (picture, size) => {
29
+ const texture = useSharedValue(null);
30
+ useEffect(() => {
31
+ runOnUI(createTexture)(texture, picture, size);
32
+ }, [texture, picture, size]);
33
+ return texture;
34
+ };
35
+ //# sourceMappingURL=textures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useMemo","Skia","drawAsPicture","runOnUI","useSharedValue","pd","createTexture","texture","picture","size","surface","Surface","MakeOffscreen","width","height","canvas","getCanvas","drawPicture","flush","value","makeImageSnapshot","useTextureValue","element","useTextureValueFromPicture"],"sources":["textures.tsx"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\nimport type { ReactElement } from \"react\";\nimport type { SharedValue } from \"react-native-reanimated\";\n\nimport { Skia } from \"../../skia\";\nimport type { SkImage, SkPicture, SkSize } from \"../../skia/types\";\nimport { drawAsPicture } from \"../../renderer/Offscreen\";\n\nimport { runOnUI, useSharedValue } from \"./moduleWrapper\";\n\n// TODO: We're not sure yet why PixelRatio is not needed here.\nconst pd = 1; //Platform.PixelRatio;\n\nconst createTexture = (\n texture: SharedValue<SkImage | null>,\n picture: SkPicture,\n size: SkSize\n) => {\n \"worklet\";\n const surface = Skia.Surface.MakeOffscreen(\n size.width * pd,\n size.height * pd\n )!;\n const canvas = surface.getCanvas();\n // see comment above\n //canvas.save();\n //canvas.scale(pd, pd);\n canvas.drawPicture(picture);\n //canvas.restore();\n surface.flush();\n texture.value = surface.makeImageSnapshot();\n};\n\nexport const useTextureValue = (element: ReactElement, size: SkSize) => {\n const picture = useMemo(() => {\n return drawAsPicture(element);\n }, [element]);\n return useTextureValueFromPicture(picture, size);\n};\n\nexport const useTextureValueFromPicture = (\n picture: SkPicture,\n size: SkSize\n) => {\n const texture = useSharedValue<SkImage | null>(null);\n useEffect(() => {\n runOnUI(createTexture)(texture, picture, size);\n }, [texture, picture, size]);\n return texture;\n};\n"],"mappings":"AAAA,SAASA,SAAT,EAAoBC,OAApB,QAAmC,OAAnC;AAIA,SAASC,IAAT,QAAqB,YAArB;AAEA,SAASC,aAAT,QAA8B,0BAA9B;AAEA,SAASC,OAAT,EAAkBC,cAAlB,QAAwC,iBAAxC,C,CAEA;;AACA,MAAMC,EAAE,GAAG,CAAX,C,CAAc;;AAEd,MAAMC,aAAa,GAAG,CACpBC,OADoB,EAEpBC,OAFoB,EAGpBC,I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