@shopify/react-native-skia 0.1.215 → 0.1.218

Sign up to get free protection for your applications and to get access to all the features.
Files changed (410) hide show
  1. package/android/build.gradle +22 -0
  2. package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaModule.java +3 -3
  3. package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +56 -2
  4. package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseViewManager.java +3 -3
  5. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDomViewManager.java +14 -1
  6. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawViewManager.java +16 -1
  7. package/android/src/main/java/com/shopify/reactnative/skia/SkiaPictureViewManager.java +15 -1
  8. package/android/src/main/java/com/shopify/reactnative/skia/ViewScreenshotService.java +2 -2
  9. package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaDomViewManagerDelegate.java +34 -0
  10. package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaDomViewManagerInterface.java +18 -0
  11. package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaDrawViewManagerDelegate.java +34 -0
  12. package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaDrawViewManagerInterface.java +18 -0
  13. package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaPictureViewManagerDelegate.java +34 -0
  14. package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaPictureViewManagerInterface.java +18 -0
  15. package/android/src/paper/java/com/shopify/reactnative/skia/NativeSkiaModuleSpec.java +38 -0
  16. package/cpp/rnskia/dom/nodes/JsiImageNode.h +5 -0
  17. package/ios/RNSkia-iOS/SkiaDomView.h +7 -0
  18. package/ios/RNSkia-iOS/SkiaDomView.mm +64 -0
  19. package/ios/RNSkia-iOS/SkiaDomViewManager.mm +1 -1
  20. package/ios/RNSkia-iOS/SkiaDrawView.h +7 -0
  21. package/ios/RNSkia-iOS/SkiaDrawView.mm +72 -0
  22. package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +1 -1
  23. package/ios/RNSkia-iOS/SkiaPictureView.h +7 -0
  24. package/ios/RNSkia-iOS/SkiaPictureView.mm +66 -0
  25. package/ios/RNSkia-iOS/SkiaPictureViewManager.mm +1 -1
  26. package/ios/RNSkia-iOS/SkiaUIView.h +15 -2
  27. package/ios/RNSkia-iOS/SkiaUIView.mm +48 -16
  28. package/ios/RNSkiaModule.h +10 -1
  29. package/ios/RNSkiaModule.mm +8 -1
  30. package/lib/commonjs/Platform/IPlatform.d.ts +1 -3
  31. package/lib/commonjs/Platform/IPlatform.js.map +1 -1
  32. package/lib/commonjs/Platform/Platform.js +0 -2
  33. package/lib/commonjs/Platform/Platform.js.map +1 -1
  34. package/lib/commonjs/Platform/Platform.web.js +0 -4
  35. package/lib/commonjs/Platform/Platform.web.js.map +1 -1
  36. package/lib/commonjs/animation/functions/interpolate.d.ts +1 -1
  37. package/lib/commonjs/animation/timing/functions/types.d.ts +1 -1
  38. package/lib/commonjs/animation/types.d.ts +2 -2
  39. package/lib/commonjs/dom/nodes/Node.d.ts +1 -1
  40. package/lib/commonjs/dom/types/Common.d.ts +8 -8
  41. package/lib/commonjs/dom/types/DeclarationContext.d.ts +1 -1
  42. package/lib/commonjs/dom/types/DrawingContext.js.map +1 -1
  43. package/lib/commonjs/dom/types/Drawings.d.ts +5 -5
  44. package/lib/commonjs/dom/types/Node.d.ts +1 -1
  45. package/lib/commonjs/dom/types/SkDOM.d.ts +4 -4
  46. package/lib/commonjs/external/reanimated/renderHelpers.d.ts +1 -0
  47. package/lib/commonjs/external/reanimated/renderHelpers.js +16 -5
  48. package/lib/commonjs/external/reanimated/renderHelpers.js.map +1 -1
  49. package/lib/commonjs/renderer/Canvas.d.ts +1 -1
  50. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  51. package/lib/commonjs/renderer/DependencyManager.d.ts +3 -3
  52. package/lib/commonjs/renderer/HostConfig.d.ts +12 -12
  53. package/lib/commonjs/renderer/HostConfig.js +1 -0
  54. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  55. package/lib/commonjs/renderer/Reconciler.d.ts +1 -1
  56. package/lib/commonjs/renderer/Reconciler.js +1 -0
  57. package/lib/commonjs/renderer/Reconciler.js.map +1 -1
  58. package/lib/commonjs/renderer/components/Blend.d.ts +2 -2
  59. package/lib/commonjs/renderer/components/Drawing.d.ts +2 -2
  60. package/lib/commonjs/renderer/components/Group.d.ts +2 -2
  61. package/lib/commonjs/renderer/components/Mask.d.ts +2 -1
  62. package/lib/commonjs/renderer/components/Paint.d.ts +2 -2
  63. package/lib/commonjs/renderer/components/Picture.d.ts +2 -2
  64. package/lib/commonjs/renderer/components/backdrop/BackdropBlur.d.ts +2 -2
  65. package/lib/commonjs/renderer/components/backdrop/BackdropFilter.d.ts +2 -1
  66. package/lib/commonjs/renderer/components/colorFilters/BlendColor.d.ts +2 -2
  67. package/lib/commonjs/renderer/components/colorFilters/Lerp.d.ts +2 -2
  68. package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +2 -2
  69. package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.d.ts +2 -2
  70. package/lib/commonjs/renderer/components/colorFilters/Matrix.d.ts +2 -2
  71. package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +2 -2
  72. package/lib/commonjs/renderer/components/image/Image.d.ts +2 -2
  73. package/lib/commonjs/renderer/components/image/ImageSVG.d.ts +2 -2
  74. package/lib/commonjs/renderer/components/image/ImageShader.d.ts +2 -2
  75. package/lib/commonjs/renderer/components/imageFilters/Blur.d.ts +2 -2
  76. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.d.ts +2 -2
  77. package/lib/commonjs/renderer/components/imageFilters/Morphology.d.ts +2 -2
  78. package/lib/commonjs/renderer/components/imageFilters/Offset.d.ts +2 -2
  79. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.d.ts +2 -2
  80. package/lib/commonjs/renderer/components/imageFilters/Shadow.d.ts +2 -2
  81. package/lib/commonjs/renderer/components/maskFilters/Blur.d.ts +2 -2
  82. package/lib/commonjs/renderer/components/pathEffects/Corner.d.ts +2 -2
  83. package/lib/commonjs/renderer/components/pathEffects/Dash.d.ts +2 -2
  84. package/lib/commonjs/renderer/components/pathEffects/Discrete.d.ts +2 -2
  85. package/lib/commonjs/renderer/components/pathEffects/Line2D.d.ts +2 -2
  86. package/lib/commonjs/renderer/components/pathEffects/Path1D.d.ts +2 -2
  87. package/lib/commonjs/renderer/components/pathEffects/Path2D.d.ts +2 -2
  88. package/lib/commonjs/renderer/components/pathEffects/Sum.d.ts +2 -2
  89. package/lib/commonjs/renderer/components/shaders/Color.d.ts +2 -2
  90. package/lib/commonjs/renderer/components/shaders/FractalNoise.d.ts +2 -2
  91. package/lib/commonjs/renderer/components/shaders/LinearGradient.d.ts +2 -2
  92. package/lib/commonjs/renderer/components/shaders/RadialGradient.d.ts +2 -2
  93. package/lib/commonjs/renderer/components/shaders/Shader.d.ts +2 -2
  94. package/lib/commonjs/renderer/components/shaders/SweepGradient.d.ts +2 -2
  95. package/lib/commonjs/renderer/components/shaders/Turbulence.d.ts +2 -2
  96. package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.d.ts +2 -2
  97. package/lib/commonjs/renderer/components/shapes/Box.d.ts +3 -3
  98. package/lib/commonjs/renderer/components/shapes/Circle.d.ts +2 -2
  99. package/lib/commonjs/renderer/components/shapes/DiffRect.d.ts +2 -2
  100. package/lib/commonjs/renderer/components/shapes/Fill.d.ts +2 -2
  101. package/lib/commonjs/renderer/components/shapes/FitBox.d.ts +2 -1
  102. package/lib/commonjs/renderer/components/shapes/Line.d.ts +2 -2
  103. package/lib/commonjs/renderer/components/shapes/Oval.d.ts +2 -2
  104. package/lib/commonjs/renderer/components/shapes/Patch.d.ts +2 -2
  105. package/lib/commonjs/renderer/components/shapes/Path.d.ts +2 -2
  106. package/lib/commonjs/renderer/components/shapes/Points.d.ts +2 -2
  107. package/lib/commonjs/renderer/components/shapes/Rect.d.ts +2 -2
  108. package/lib/commonjs/renderer/components/shapes/RoundedRect.d.ts +2 -2
  109. package/lib/commonjs/renderer/components/shapes/Vertices.d.ts +2 -2
  110. package/lib/commonjs/renderer/components/text/Glyphs.d.ts +2 -2
  111. package/lib/commonjs/renderer/components/text/Text.d.ts +2 -2
  112. package/lib/commonjs/renderer/components/text/TextBlob.d.ts +2 -2
  113. package/lib/commonjs/renderer/components/text/TextPath.d.ts +2 -2
  114. package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +6 -6
  115. package/lib/commonjs/skia/NativeSetup.js +5 -1
  116. package/lib/commonjs/skia/NativeSetup.js.map +1 -1
  117. package/lib/commonjs/skia/core/Font.d.ts +2 -2
  118. package/lib/commonjs/skia/types/Color.d.ts +2 -2
  119. package/lib/commonjs/skia/types/ColorFilter/ColorFilter.d.ts +1 -1
  120. package/lib/commonjs/skia/types/ColorFilter/ColorFilterFactory.d.ts +1 -1
  121. package/lib/commonjs/skia/types/Data/Data.d.ts +6 -6
  122. package/lib/commonjs/skia/types/ImageFilter/ImageFilter.d.ts +1 -1
  123. package/lib/commonjs/skia/types/MaskFilter.d.ts +1 -1
  124. package/lib/commonjs/skia/types/Matrix.d.ts +3 -3
  125. package/lib/commonjs/skia/types/Path/Path.d.ts +1 -1
  126. package/lib/commonjs/skia/types/PathEffect.d.ts +1 -1
  127. package/lib/commonjs/skia/types/Point.d.ts +1 -1
  128. package/lib/commonjs/skia/types/RSXform.d.ts +1 -1
  129. package/lib/commonjs/skia/types/Shader/Shader.d.ts +2 -2
  130. package/lib/commonjs/skia/types/TextBlob.d.ts +1 -1
  131. package/lib/commonjs/skia/web/JsiSkData.d.ts +1 -1
  132. package/lib/commonjs/skia/web/JsiSkRSXform.d.ts +1 -1
  133. package/lib/commonjs/specs/NativeSkiaModule.d.ts +6 -0
  134. package/lib/commonjs/specs/NativeSkiaModule.js +14 -0
  135. package/lib/commonjs/specs/NativeSkiaModule.js.map +1 -0
  136. package/lib/commonjs/specs/NativeSkiaModule.web.d.ts +2 -0
  137. package/lib/commonjs/specs/NativeSkiaModule.web.js +13 -0
  138. package/lib/commonjs/specs/NativeSkiaModule.web.js.map +1 -0
  139. package/lib/commonjs/specs/SkiaDomViewNativeComponent.d.ts +8 -0
  140. package/lib/commonjs/specs/SkiaDomViewNativeComponent.js +16 -0
  141. package/lib/commonjs/specs/SkiaDomViewNativeComponent.js.map +1 -0
  142. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.d.ts +8 -0
  143. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js +16 -0
  144. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js.map +1 -0
  145. package/lib/commonjs/specs/SkiaPictureViewNativeComponent.d.ts +8 -0
  146. package/lib/commonjs/specs/SkiaPictureViewNativeComponent.js +16 -0
  147. package/lib/commonjs/specs/SkiaPictureViewNativeComponent.js.map +1 -0
  148. package/lib/commonjs/values/selector.d.ts +1 -1
  149. package/lib/commonjs/views/SkiaBaseWebView.d.ts +1 -1
  150. package/lib/commonjs/views/SkiaDomView.d.ts +1 -1
  151. package/lib/commonjs/views/SkiaDomView.js +3 -1
  152. package/lib/commonjs/views/SkiaDomView.js.map +1 -1
  153. package/lib/commonjs/views/SkiaPictureView.d.ts +1 -1
  154. package/lib/commonjs/views/SkiaPictureView.js +3 -3
  155. package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
  156. package/lib/commonjs/views/SkiaView.d.ts +1 -1
  157. package/lib/commonjs/views/SkiaView.js +3 -4
  158. package/lib/commonjs/views/SkiaView.js.map +1 -1
  159. package/lib/commonjs/views/types.d.ts +6 -6
  160. package/lib/commonjs/web/WithSkiaWeb.d.ts +2 -2
  161. package/lib/module/Platform/IPlatform.d.ts +1 -3
  162. package/lib/module/Platform/IPlatform.js.map +1 -1
  163. package/lib/module/Platform/Platform.js +1 -3
  164. package/lib/module/Platform/Platform.js.map +1 -1
  165. package/lib/module/Platform/Platform.web.js +0 -4
  166. package/lib/module/Platform/Platform.web.js.map +1 -1
  167. package/lib/module/animation/functions/interpolate.d.ts +1 -1
  168. package/lib/module/animation/timing/functions/types.d.ts +1 -1
  169. package/lib/module/animation/types.d.ts +2 -2
  170. package/lib/module/dom/nodes/Node.d.ts +1 -1
  171. package/lib/module/dom/types/Common.d.ts +8 -8
  172. package/lib/module/dom/types/DeclarationContext.d.ts +1 -1
  173. package/lib/module/dom/types/DrawingContext.js.map +1 -1
  174. package/lib/module/dom/types/Drawings.d.ts +5 -5
  175. package/lib/module/dom/types/Node.d.ts +1 -1
  176. package/lib/module/dom/types/SkDOM.d.ts +4 -4
  177. package/lib/module/external/reanimated/renderHelpers.d.ts +1 -0
  178. package/lib/module/external/reanimated/renderHelpers.js +12 -5
  179. package/lib/module/external/reanimated/renderHelpers.js.map +1 -1
  180. package/lib/module/renderer/Canvas.d.ts +1 -1
  181. package/lib/module/renderer/Canvas.js.map +1 -1
  182. package/lib/module/renderer/DependencyManager.d.ts +3 -3
  183. package/lib/module/renderer/HostConfig.d.ts +12 -12
  184. package/lib/module/renderer/HostConfig.js +2 -1
  185. package/lib/module/renderer/HostConfig.js.map +1 -1
  186. package/lib/module/renderer/Reconciler.d.ts +1 -1
  187. package/lib/module/renderer/Reconciler.js +1 -0
  188. package/lib/module/renderer/Reconciler.js.map +1 -1
  189. package/lib/module/renderer/components/Blend.d.ts +2 -2
  190. package/lib/module/renderer/components/Drawing.d.ts +2 -2
  191. package/lib/module/renderer/components/Group.d.ts +2 -2
  192. package/lib/module/renderer/components/Mask.d.ts +2 -1
  193. package/lib/module/renderer/components/Paint.d.ts +2 -2
  194. package/lib/module/renderer/components/Picture.d.ts +2 -2
  195. package/lib/module/renderer/components/backdrop/BackdropBlur.d.ts +2 -2
  196. package/lib/module/renderer/components/backdrop/BackdropFilter.d.ts +2 -1
  197. package/lib/module/renderer/components/colorFilters/BlendColor.d.ts +2 -2
  198. package/lib/module/renderer/components/colorFilters/Lerp.d.ts +2 -2
  199. package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +2 -2
  200. package/lib/module/renderer/components/colorFilters/LumaColorFilter.d.ts +2 -2
  201. package/lib/module/renderer/components/colorFilters/Matrix.d.ts +2 -2
  202. package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +2 -2
  203. package/lib/module/renderer/components/image/Image.d.ts +2 -2
  204. package/lib/module/renderer/components/image/ImageSVG.d.ts +2 -2
  205. package/lib/module/renderer/components/image/ImageShader.d.ts +2 -2
  206. package/lib/module/renderer/components/imageFilters/Blur.d.ts +2 -2
  207. package/lib/module/renderer/components/imageFilters/DisplacementMap.d.ts +2 -2
  208. package/lib/module/renderer/components/imageFilters/Morphology.d.ts +2 -2
  209. package/lib/module/renderer/components/imageFilters/Offset.d.ts +2 -2
  210. package/lib/module/renderer/components/imageFilters/RuntimeShader.d.ts +2 -2
  211. package/lib/module/renderer/components/imageFilters/Shadow.d.ts +2 -2
  212. package/lib/module/renderer/components/maskFilters/Blur.d.ts +2 -2
  213. package/lib/module/renderer/components/pathEffects/Corner.d.ts +2 -2
  214. package/lib/module/renderer/components/pathEffects/Dash.d.ts +2 -2
  215. package/lib/module/renderer/components/pathEffects/Discrete.d.ts +2 -2
  216. package/lib/module/renderer/components/pathEffects/Line2D.d.ts +2 -2
  217. package/lib/module/renderer/components/pathEffects/Path1D.d.ts +2 -2
  218. package/lib/module/renderer/components/pathEffects/Path2D.d.ts +2 -2
  219. package/lib/module/renderer/components/pathEffects/Sum.d.ts +2 -2
  220. package/lib/module/renderer/components/shaders/Color.d.ts +2 -2
  221. package/lib/module/renderer/components/shaders/FractalNoise.d.ts +2 -2
  222. package/lib/module/renderer/components/shaders/LinearGradient.d.ts +2 -2
  223. package/lib/module/renderer/components/shaders/RadialGradient.d.ts +2 -2
  224. package/lib/module/renderer/components/shaders/Shader.d.ts +2 -2
  225. package/lib/module/renderer/components/shaders/SweepGradient.d.ts +2 -2
  226. package/lib/module/renderer/components/shaders/Turbulence.d.ts +2 -2
  227. package/lib/module/renderer/components/shaders/TwoPointConicalGradient.d.ts +2 -2
  228. package/lib/module/renderer/components/shapes/Box.d.ts +3 -3
  229. package/lib/module/renderer/components/shapes/Circle.d.ts +2 -2
  230. package/lib/module/renderer/components/shapes/DiffRect.d.ts +2 -2
  231. package/lib/module/renderer/components/shapes/Fill.d.ts +2 -2
  232. package/lib/module/renderer/components/shapes/FitBox.d.ts +2 -1
  233. package/lib/module/renderer/components/shapes/Line.d.ts +2 -2
  234. package/lib/module/renderer/components/shapes/Oval.d.ts +2 -2
  235. package/lib/module/renderer/components/shapes/Patch.d.ts +2 -2
  236. package/lib/module/renderer/components/shapes/Path.d.ts +2 -2
  237. package/lib/module/renderer/components/shapes/Points.d.ts +2 -2
  238. package/lib/module/renderer/components/shapes/Rect.d.ts +2 -2
  239. package/lib/module/renderer/components/shapes/RoundedRect.d.ts +2 -2
  240. package/lib/module/renderer/components/shapes/Vertices.d.ts +2 -2
  241. package/lib/module/renderer/components/text/Glyphs.d.ts +2 -2
  242. package/lib/module/renderer/components/text/Text.d.ts +2 -2
  243. package/lib/module/renderer/components/text/TextBlob.d.ts +2 -2
  244. package/lib/module/renderer/components/text/TextPath.d.ts +2 -2
  245. package/lib/module/renderer/processors/Animations/Animations.d.ts +6 -6
  246. package/lib/module/skia/NativeSetup.js +2 -1
  247. package/lib/module/skia/NativeSetup.js.map +1 -1
  248. package/lib/module/skia/core/Font.d.ts +2 -2
  249. package/lib/module/skia/types/Color.d.ts +2 -2
  250. package/lib/module/skia/types/ColorFilter/ColorFilter.d.ts +1 -1
  251. package/lib/module/skia/types/ColorFilter/ColorFilterFactory.d.ts +1 -1
  252. package/lib/module/skia/types/Data/Data.d.ts +6 -6
  253. package/lib/module/skia/types/ImageFilter/ImageFilter.d.ts +1 -1
  254. package/lib/module/skia/types/MaskFilter.d.ts +1 -1
  255. package/lib/module/skia/types/Matrix.d.ts +3 -3
  256. package/lib/module/skia/types/Path/Path.d.ts +1 -1
  257. package/lib/module/skia/types/PathEffect.d.ts +1 -1
  258. package/lib/module/skia/types/Point.d.ts +1 -1
  259. package/lib/module/skia/types/RSXform.d.ts +1 -1
  260. package/lib/module/skia/types/Shader/Shader.d.ts +2 -2
  261. package/lib/module/skia/types/TextBlob.d.ts +1 -1
  262. package/lib/module/skia/web/JsiSkData.d.ts +1 -1
  263. package/lib/module/skia/web/JsiSkRSXform.d.ts +1 -1
  264. package/lib/module/specs/NativeSkiaModule.d.ts +6 -0
  265. package/lib/module/specs/NativeSkiaModule.js +4 -0
  266. package/lib/module/specs/NativeSkiaModule.js.map +1 -0
  267. package/lib/module/specs/NativeSkiaModule.web.d.ts +2 -0
  268. package/lib/module/specs/NativeSkiaModule.web.js +4 -0
  269. package/lib/module/specs/NativeSkiaModule.web.js.map +1 -0
  270. package/lib/module/specs/SkiaDomViewNativeComponent.d.ts +8 -0
  271. package/lib/module/specs/SkiaDomViewNativeComponent.js +4 -0
  272. package/lib/module/specs/SkiaDomViewNativeComponent.js.map +1 -0
  273. package/lib/module/specs/SkiaDrawViewNativeComponent.d.ts +8 -0
  274. package/lib/module/specs/SkiaDrawViewNativeComponent.js +4 -0
  275. package/lib/module/specs/SkiaDrawViewNativeComponent.js.map +1 -0
  276. package/lib/module/specs/SkiaPictureViewNativeComponent.d.ts +8 -0
  277. package/lib/module/specs/SkiaPictureViewNativeComponent.js +4 -0
  278. package/lib/module/specs/SkiaPictureViewNativeComponent.js.map +1 -0
  279. package/lib/module/values/selector.d.ts +1 -1
  280. package/lib/module/views/SkiaBaseWebView.d.ts +1 -1
  281. package/lib/module/views/SkiaDomView.d.ts +1 -1
  282. package/lib/module/views/SkiaDomView.js +2 -1
  283. package/lib/module/views/SkiaDomView.js.map +1 -1
  284. package/lib/module/views/SkiaPictureView.d.ts +1 -1
  285. package/lib/module/views/SkiaPictureView.js +3 -3
  286. package/lib/module/views/SkiaPictureView.js.map +1 -1
  287. package/lib/module/views/SkiaView.d.ts +1 -1
  288. package/lib/module/views/SkiaView.js +3 -3
  289. package/lib/module/views/SkiaView.js.map +1 -1
  290. package/lib/module/views/types.d.ts +6 -6
  291. package/lib/module/web/WithSkiaWeb.d.ts +2 -2
  292. package/lib/typescript/src/Platform/IPlatform.d.ts +1 -3
  293. package/lib/typescript/src/animation/functions/interpolate.d.ts +1 -1
  294. package/lib/typescript/src/animation/timing/functions/types.d.ts +1 -1
  295. package/lib/typescript/src/animation/types.d.ts +2 -2
  296. package/lib/typescript/src/dom/nodes/Node.d.ts +1 -1
  297. package/lib/typescript/src/dom/types/Common.d.ts +8 -8
  298. package/lib/typescript/src/dom/types/DeclarationContext.d.ts +1 -1
  299. package/lib/typescript/src/dom/types/Drawings.d.ts +5 -5
  300. package/lib/typescript/src/dom/types/Node.d.ts +1 -1
  301. package/lib/typescript/src/dom/types/SkDOM.d.ts +4 -4
  302. package/lib/typescript/src/external/reanimated/renderHelpers.d.ts +1 -0
  303. package/lib/typescript/src/renderer/Canvas.d.ts +1 -1
  304. package/lib/typescript/src/renderer/DependencyManager.d.ts +3 -3
  305. package/lib/typescript/src/renderer/HostConfig.d.ts +12 -12
  306. package/lib/typescript/src/renderer/Reconciler.d.ts +1 -1
  307. package/lib/typescript/src/renderer/components/Blend.d.ts +2 -2
  308. package/lib/typescript/src/renderer/components/Drawing.d.ts +2 -2
  309. package/lib/typescript/src/renderer/components/Group.d.ts +2 -2
  310. package/lib/typescript/src/renderer/components/Mask.d.ts +2 -1
  311. package/lib/typescript/src/renderer/components/Paint.d.ts +2 -2
  312. package/lib/typescript/src/renderer/components/Picture.d.ts +2 -2
  313. package/lib/typescript/src/renderer/components/backdrop/BackdropBlur.d.ts +2 -2
  314. package/lib/typescript/src/renderer/components/backdrop/BackdropFilter.d.ts +2 -1
  315. package/lib/typescript/src/renderer/components/colorFilters/BlendColor.d.ts +2 -2
  316. package/lib/typescript/src/renderer/components/colorFilters/Lerp.d.ts +2 -2
  317. package/lib/typescript/src/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +2 -2
  318. package/lib/typescript/src/renderer/components/colorFilters/LumaColorFilter.d.ts +2 -2
  319. package/lib/typescript/src/renderer/components/colorFilters/Matrix.d.ts +2 -2
  320. package/lib/typescript/src/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +2 -2
  321. package/lib/typescript/src/renderer/components/image/Image.d.ts +2 -2
  322. package/lib/typescript/src/renderer/components/image/ImageSVG.d.ts +2 -2
  323. package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +2 -2
  324. package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +2 -2
  325. package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +2 -2
  326. package/lib/typescript/src/renderer/components/imageFilters/Morphology.d.ts +2 -2
  327. package/lib/typescript/src/renderer/components/imageFilters/Offset.d.ts +2 -2
  328. package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +2 -2
  329. package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +2 -2
  330. package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +2 -2
  331. package/lib/typescript/src/renderer/components/pathEffects/Corner.d.ts +2 -2
  332. package/lib/typescript/src/renderer/components/pathEffects/Dash.d.ts +2 -2
  333. package/lib/typescript/src/renderer/components/pathEffects/Discrete.d.ts +2 -2
  334. package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +2 -2
  335. package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +2 -2
  336. package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +2 -2
  337. package/lib/typescript/src/renderer/components/pathEffects/Sum.d.ts +2 -2
  338. package/lib/typescript/src/renderer/components/shaders/Color.d.ts +2 -2
  339. package/lib/typescript/src/renderer/components/shaders/FractalNoise.d.ts +2 -2
  340. package/lib/typescript/src/renderer/components/shaders/LinearGradient.d.ts +2 -2
  341. package/lib/typescript/src/renderer/components/shaders/RadialGradient.d.ts +2 -2
  342. package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +2 -2
  343. package/lib/typescript/src/renderer/components/shaders/SweepGradient.d.ts +2 -2
  344. package/lib/typescript/src/renderer/components/shaders/Turbulence.d.ts +2 -2
  345. package/lib/typescript/src/renderer/components/shaders/TwoPointConicalGradient.d.ts +2 -2
  346. package/lib/typescript/src/renderer/components/shapes/Box.d.ts +3 -3
  347. package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +2 -2
  348. package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +2 -2
  349. package/lib/typescript/src/renderer/components/shapes/Fill.d.ts +2 -2
  350. package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +2 -1
  351. package/lib/typescript/src/renderer/components/shapes/Line.d.ts +2 -2
  352. package/lib/typescript/src/renderer/components/shapes/Oval.d.ts +2 -2
  353. package/lib/typescript/src/renderer/components/shapes/Patch.d.ts +2 -2
  354. package/lib/typescript/src/renderer/components/shapes/Path.d.ts +2 -2
  355. package/lib/typescript/src/renderer/components/shapes/Points.d.ts +2 -2
  356. package/lib/typescript/src/renderer/components/shapes/Rect.d.ts +2 -2
  357. package/lib/typescript/src/renderer/components/shapes/RoundedRect.d.ts +2 -2
  358. package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +2 -2
  359. package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +2 -2
  360. package/lib/typescript/src/renderer/components/text/Text.d.ts +2 -2
  361. package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +2 -2
  362. package/lib/typescript/src/renderer/components/text/TextPath.d.ts +2 -2
  363. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +6 -6
  364. package/lib/typescript/src/skia/core/Font.d.ts +2 -2
  365. package/lib/typescript/src/skia/types/Color.d.ts +2 -2
  366. package/lib/typescript/src/skia/types/ColorFilter/ColorFilter.d.ts +1 -1
  367. package/lib/typescript/src/skia/types/ColorFilter/ColorFilterFactory.d.ts +1 -1
  368. package/lib/typescript/src/skia/types/Data/Data.d.ts +6 -6
  369. package/lib/typescript/src/skia/types/ImageFilter/ImageFilter.d.ts +1 -1
  370. package/lib/typescript/src/skia/types/MaskFilter.d.ts +1 -1
  371. package/lib/typescript/src/skia/types/Matrix.d.ts +3 -3
  372. package/lib/typescript/src/skia/types/Path/Path.d.ts +1 -1
  373. package/lib/typescript/src/skia/types/PathEffect.d.ts +1 -1
  374. package/lib/typescript/src/skia/types/Point.d.ts +1 -1
  375. package/lib/typescript/src/skia/types/RSXform.d.ts +1 -1
  376. package/lib/typescript/src/skia/types/Shader/Shader.d.ts +2 -2
  377. package/lib/typescript/src/skia/types/TextBlob.d.ts +1 -1
  378. package/lib/typescript/src/skia/web/JsiSkData.d.ts +1 -1
  379. package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +1 -1
  380. package/lib/typescript/src/specs/NativeSkiaModule.d.ts +6 -0
  381. package/lib/typescript/src/specs/NativeSkiaModule.web.d.ts +2 -0
  382. package/lib/typescript/src/specs/SkiaDomViewNativeComponent.d.ts +8 -0
  383. package/lib/typescript/src/specs/SkiaDrawViewNativeComponent.d.ts +8 -0
  384. package/lib/typescript/src/specs/SkiaPictureViewNativeComponent.d.ts +8 -0
  385. package/lib/typescript/src/values/selector.d.ts +1 -1
  386. package/lib/typescript/src/views/SkiaBaseWebView.d.ts +1 -1
  387. package/lib/typescript/src/views/SkiaDomView.d.ts +1 -1
  388. package/lib/typescript/src/views/SkiaPictureView.d.ts +1 -1
  389. package/lib/typescript/src/views/SkiaView.d.ts +1 -1
  390. package/lib/typescript/src/views/types.d.ts +6 -6
  391. package/lib/typescript/src/web/WithSkiaWeb.d.ts +2 -2
  392. package/package.json +18 -6
  393. package/react-native-skia.podspec +11 -3
  394. package/src/Platform/IPlatform.ts +1 -3
  395. package/src/Platform/Platform.ts +0 -4
  396. package/src/Platform/Platform.web.tsx +0 -4
  397. package/src/dom/types/DrawingContext.ts +1 -1
  398. package/src/external/reanimated/renderHelpers.ts +13 -4
  399. package/src/renderer/Canvas.tsx +2 -1
  400. package/src/renderer/HostConfig.ts +2 -0
  401. package/src/renderer/Reconciler.tsx +2 -1
  402. package/src/skia/NativeSetup.ts +2 -1
  403. package/src/specs/NativeSkiaModule.ts +9 -0
  404. package/src/specs/NativeSkiaModule.web.ts +4 -0
  405. package/src/specs/SkiaDomViewNativeComponent.ts +10 -0
  406. package/src/specs/SkiaDrawViewNativeComponent.ts +10 -0
  407. package/src/specs/SkiaPictureViewNativeComponent.ts +10 -0
  408. package/src/views/SkiaDomView.tsx +3 -2
  409. package/src/views/SkiaPictureView.tsx +4 -5
  410. package/src/views/SkiaView.tsx +4 -5
@@ -1 +1 @@
1
- {"version":3,"names":["_bindings","WeakMap","extractReanimatedProps","props","HAS_REANIMATED3","HAS_REANIMATED2","reanimatedProps","otherProps","propName","propValue","isSharedValue","value","bindReanimatedProps2","container","node","sharedValues","Object","values","previousMapperId","get","undefined","stopMapper","length","viewId","getNativeId","SkiaViewApi","global","updateProps","setProp","requestRedraw","redraw","mapperId","startMapper","runOnJS","set","bindReanimatedProps"],"sources":["renderHelpers.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable reanimated/js-function-in-worklet */\nimport type { Container } from \"../../renderer/Container\";\nimport type { AnimatedProps } from \"../../renderer/processors\";\nimport type { Node } from \"../../dom/types\";\n\nimport {\n startMapper,\n stopMapper,\n isSharedValue,\n HAS_REANIMATED3,\n HAS_REANIMATED2,\n runOnJS,\n} from \"./moduleWrapper\";\n\nconst _bindings = new WeakMap<Node<unknown>, unknown>();\n\nexport function extractReanimatedProps(props: AnimatedProps<any>) {\n if (!HAS_REANIMATED3 && !HAS_REANIMATED2) {\n return [props, {}];\n }\n const reanimatedProps = {} as AnimatedProps<any>;\n const otherProps = {} as AnimatedProps<any>;\n for (const propName in props) {\n if (propName === \"children\") {\n continue;\n }\n const propValue = props[propName];\n if (isSharedValue(propValue)) {\n reanimatedProps[propName] = propValue;\n otherProps[propName] = propValue.value;\n } else {\n otherProps[propName] = propValue;\n }\n }\n return [otherProps, reanimatedProps];\n}\n\nfunction bindReanimatedProps2(\n container: Container,\n node: Node<any>,\n reanimatedProps: AnimatedProps<any>\n) {\n const sharedValues = Object.values(reanimatedProps);\n const previousMapperId = _bindings.get(node);\n if (previousMapperId !== undefined) {\n stopMapper(previousMapperId as number);\n }\n if (sharedValues.length > 0) {\n const viewId = container.getNativeId();\n const { SkiaViewApi } = global;\n const updateProps = () => {\n for (const propName in reanimatedProps) {\n node && node.setProp(propName, reanimatedProps[propName].value);\n }\n // On React Native we use the SkiaViewApi to redraw because it can\n // run on the worklet thread (container.redraw can't)\n // if SkiaViewApi is undefined, we are on web and container.redraw()\n // can safely be invoked\n if (SkiaViewApi) {\n SkiaViewApi.requestRedraw(viewId);\n } else {\n container.redraw();\n }\n };\n const mapperId = startMapper(() => {\n \"worklet\";\n runOnJS(updateProps)();\n }, sharedValues);\n _bindings.set(node, mapperId);\n }\n}\n\nexport function bindReanimatedProps(\n container: Container,\n node: Node<any>,\n reanimatedProps: AnimatedProps<any>\n) {\n if (HAS_REANIMATED2) {\n return bindReanimatedProps2(container, node, reanimatedProps);\n }\n if (!HAS_REANIMATED3) {\n return;\n }\n const sharedValues = Object.values(reanimatedProps);\n const previousMapperId = _bindings.get(node);\n if (previousMapperId !== undefined) {\n stopMapper(previousMapperId as number);\n }\n if (sharedValues.length > 0) {\n const viewId = container.getNativeId();\n const { SkiaViewApi } = global;\n const mapperId = startMapper(() => {\n \"worklet\";\n for (const propName in reanimatedProps) {\n node && node.setProp(propName, reanimatedProps[propName].value);\n }\n // On React Native we use the SkiaViewApi to redraw because it can\n // run on the worklet thread (container.redraw can't)\n // if SkiaViewApi is undefined, we are on web and container.redraw()\n // can safely be invoked\n if (SkiaViewApi) {\n SkiaViewApi.requestRedraw(viewId);\n } else {\n container.redraw();\n }\n }, sharedValues);\n _bindings.set(node, mapperId);\n }\n}\n"],"mappings":";;;;;;;;AAMA;;AANA;;AACA;AAcA,MAAMA,SAAS,GAAG,IAAIC,OAAJ,EAAlB;;AAEO,SAASC,sBAAT,CAAgCC,KAAhC,EAA2D;EAChE,IAAI,CAACC,8BAAD,IAAoB,CAACC,8BAAzB,EAA0C;IACxC,OA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AjB;;IAeAf,SAAS,CAACkC,GAAV,CAAcpB,IAAd,EAAoBiB,QAApB;EACD;AACF"}
1
+ {"version":3,"names":["_bindings","WeakMap","unbindReanimatedNode","node","previousMapperId","get","undefined","stopMapper","extractReanimatedProps","props","HAS_REANIMATED3","HAS_REANIMATED2","reanimatedProps","otherProps","propName","propValue","isSharedValue","value","bindReanimatedProps2","container","sharedValues","Object","values","length","viewId","getNativeId","SkiaViewApi","global","updateProps","setProp","requestRedraw","redraw","mapperId","startMapper","runOnJS","set","bindReanimatedProps"],"sources":["renderHelpers.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Container } from \"../../renderer/Container\";\nimport type { AnimatedProps } from \"../../renderer/processors\";\nimport type { Node } from \"../../dom/types\";\n\nimport {\n startMapper,\n stopMapper,\n isSharedValue,\n HAS_REANIMATED3,\n HAS_REANIMATED2,\n runOnJS,\n} from \"./moduleWrapper\";\n\nconst _bindings = new WeakMap<Node<unknown>, unknown>();\n\nexport const unbindReanimatedNode = (node: Node<unknown>) => {\n const previousMapperId = _bindings.get(node);\n if (previousMapperId !== undefined) {\n stopMapper(previousMapperId as number);\n }\n};\n\nexport function extractReanimatedProps(props: AnimatedProps<any>) {\n if (!HAS_REANIMATED3 && !HAS_REANIMATED2) {\n return [props, {}];\n }\n const reanimatedProps = {} as AnimatedProps<any>;\n const otherProps = {} as AnimatedProps<any>;\n for (const propName in props) {\n if (propName === \"children\") {\n continue;\n }\n const propValue = props[propName];\n if (isSharedValue(propValue)) {\n reanimatedProps[propName] = propValue;\n otherProps[propName] = propValue.value;\n } else {\n otherProps[propName] = propValue;\n }\n }\n return [otherProps, reanimatedProps];\n}\n\nfunction bindReanimatedProps2(\n container: Container,\n node: Node<any>,\n reanimatedProps: AnimatedProps<any>\n) {\n const sharedValues = Object.values(reanimatedProps);\n const previousMapperId = _bindings.get(node);\n if (previousMapperId !== undefined) {\n stopMapper(previousMapperId as number);\n }\n if (sharedValues.length > 0) {\n const viewId = container.getNativeId();\n const { SkiaViewApi } = global;\n const updateProps = () => {\n for (const propName in reanimatedProps) {\n node && node.setProp(propName, reanimatedProps[propName].value);\n }\n // On React Native we use the SkiaViewApi to redraw because it can\n // run on the worklet thread (container.redraw can't)\n // if SkiaViewApi is undefined, we are on web and container.redraw()\n // can safely be invoked\n if (SkiaViewApi) {\n SkiaViewApi.requestRedraw(viewId);\n } else {\n container.redraw();\n }\n };\n const mapperId = startMapper(() => {\n \"worklet\";\n runOnJS(updateProps)();\n }, sharedValues);\n _bindings.set(node, mapperId);\n }\n}\n\nexport function bindReanimatedProps(\n container: Container,\n node: Node<any>,\n reanimatedProps: AnimatedProps<any>\n) {\n if (HAS_REANIMATED2 && !HAS_REANIMATED3) {\n return bindReanimatedProps2(container, node, reanimatedProps);\n }\n if (!HAS_REANIMATED3) {\n return;\n }\n const sharedValues = Object.values(reanimatedProps);\n const previousMapperId = _bindings.get(node);\n if (previousMapperId !== undefined) {\n stopMapper(previousMapperId as number);\n }\n if (sharedValues.length > 0) {\n const viewId = container.getNativeId();\n const { SkiaViewApi } = global;\n const mapperId = startMapper(() => {\n \"worklet\";\n if (node) {\n for (const propName in reanimatedProps) {\n node.setProp(propName, reanimatedProps[propName].value);\n }\n }\n // On React Native we use the SkiaViewApi to redraw because it can\n // run on the worklet thread (container.redraw can't)\n // if SkiaViewApi is undefined, we are on web and container.redraw()\n // can safely be invoked\n if (SkiaViewApi) {\n SkiaViewApi.requestRedraw(viewId);\n } else {\n container.redraw();\n }\n }, sharedValues);\n _bindings.set(node, mapperId);\n }\n}\n"],"mappings":";;;;;;;;;AAMA;;AANA;AAeA,MAAMA,SAAS,GAAG,IAAIC,OAAJ,EAAlB;;AAEO,MAAMC,oBAAoB,GAAIC,IAAD,IAAyB;EAC3D,MAAMC,gBAAgB,GAAGJ,SAAS,CAACK,GAAV,CAAcF,IAAd,CAAzB;;EACA,IAAIC,gBAAgB,KAAKE,SAAzB,EAAoC;IAClC,IAAAC,yBAAA,E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CANgC,CAOjC;MACA;MACA;MACA;;;MACA,IAAIS,WAAJ,EAAiB;QACfA,WAAW,CAACI,aAAZ,CAA0BN,MAA1B;MACD,CAFD,MAEO;QACLL,SAAS,CAACY,MAAV;MACD;IACF,CAhBgB,EAgBdX,YAhBc,CAAjB;;IAiBApB,SAAS,CAACmC,GAAV,CAAchC,IAAd,EAAoB6B,QAApB;EACD;AACF"}
@@ -8,4 +8,4 @@ export interface CanvasProps extends SkiaBaseViewProps {
8
8
  children: ReactNode;
9
9
  onTouch?: TouchHandler;
10
10
  }
11
- export declare const Canvas: React.FC<CanvasProps & React.RefAttributes<SkiaDomView>>;
11
+ export declare const Canvas: React.FunctionComponent<CanvasProps & React.RefAttributes<SkiaDomView>>;
@@ -1 +1 @@
1
- {"version":3,"names":["useCanvasRef","useRef","useOnSizeEvent","resultValue","onSize","useValue","width","height","useLayoutEffect","addListener","newValue","isValue","current","value","Canvas","forwardRef","forwardedRef","children","style","debug","mode","onTouch","_onSize","props","innerRef","ref","useCombinedRefs","redraw","useCallback","getNativeId","id","nativeId","registerValues","values","root","useMemo","SkiaRoot","Skia","useEffect","render","unmount","NATIVE_DOM","dom","canvas","info","touches","ctx","JsiDrawingContext","refs","targetRef","React","forEach"],"sources":["Canvas.tsx"],"sourcesContent":["import React, {\n useEffect,\n useCallback,\n useMemo,\n forwardRef,\n useRef,\n useLayoutEffect,\n} from \"react\";\nimport type {\n RefObject,\n ReactNode,\n MutableRefObject,\n ForwardedRef,\n} from \"react\";\n\nimport { SkiaDomView, SkiaView } from \"../views\";\nimport { Skia } from \"../skia/Skia\";\nimport type { TouchHandler, SkiaBaseViewProps } from \"../views\";\nimport type { SkiaValue } from \"../values/types\";\nimport { JsiDrawingContext } from \"../dom/types\";\nimport { useValue } from \"../values\";\n\nimport { SkiaRoot } from \"./Reconciler\";\nimport { NATIVE_DOM } from \"./HostComponents\";\nimport { isValue } from \"./processors\";\n\nexport const useCanvasRef = () => useRef<SkiaDomView>(null);\n\nexport interface CanvasProps extends SkiaBaseViewProps {\n ref?: RefObject<SkiaDomView>;\n children: ReactNode;\n onTouch?: TouchHandler;\n}\n\nconst useOnSizeEvent = (resultValue: SkiaBaseViewProps[\"onSize\"]) => {\n const onSize = useValue({\n width: 0,\n height: 0,\n });\n\n useLayoutEffect(() => {\n if (!resultValue) {\n return;\n }\n return onSize.addListener((newValue) => {\n if (isValue(resultValue)) {\n resultValue.current = newValue;\n } else {\n resultValue.value = newValue;\n }\n });\n }, [resultValue, onSize]);\n\n return onSize;\n};\n\nexport const Canvas = forwardRef<SkiaDomView, CanvasProps>(\n (\n { children, style, debug, mode, onTouch, onSize: _onSize, ...props },\n forwardedRef\n ) => {\n const onSize = useOnSizeEvent(_onSize);\n const innerRef = useCanvasRef();\n const ref = useCombinedRefs(forwardedRef, innerRef);\n const redraw = useCallback(() => {\n innerRef.current?.redraw();\n }, [innerRef]);\n const getNativeId = useCallback(() => {\n const id = innerRef.current?.nativeId ?? -1;\n return id;\n }, [innerRef]);\n\n const registerValues = useCallback(\n (values: Array<SkiaValue<unknown>>) => {\n if (ref.current !== null) {\n return ref.current.registerValues(values);\n }\n return () => {};\n },\n [ref]\n );\n const root = useMemo(\n () => new SkiaRoot(Skia, registerValues, redraw, getNativeId),\n [redraw, registerValues, getNativeId]\n );\n\n // Render effect\n useEffect(() => {\n root.render(children);\n }, [children, root, redraw]);\n\n useEffect(() => {\n return () => {\n root.unmount();\n };\n }, [root]);\n if (NATIVE_DOM) {\n return (\n <SkiaDomView\n ref={ref}\n style={style}\n root={root.dom}\n onTouch={onTouch}\n onSize={onSize}\n mode={mode}\n debug={debug}\n {...props}\n />\n );\n } else {\n return (\n <SkiaView\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n style={style}\n mode={mode}\n debug={debug}\n onSize={onSize}\n onDraw={(canvas, info) => {\n onTouch && onTouch(info.touches);\n const ctx = new JsiDrawingContext(Skia, canvas);\n root.dom.render(ctx);\n }}\n {...props}\n />\n );\n }\n }\n) as React.FC<CanvasProps & React.RefAttributes<SkiaDomView>>;\n\n/**\n * Combines a list of refs into a single ref. This can be used to provide\n * both a forwarded ref and an internal ref keeping the same functionality\n * on both of the refs.\n * @param refs Array of refs to combine\n * @returns A single ref that can be used in a ref prop.\n */\nconst useCombinedRefs = <T,>(\n ...refs: Array<MutableRefObject<T> | ForwardedRef<T>>\n) => {\n const targetRef = React.useRef<T>(null);\n React.useEffect(() => {\n refs.forEach((ref) => {\n if (ref) {\n if (typeof ref === \"function\") {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n }\n });\n }, [refs]);\n return targetRef;\n};\n"],"mappings":";;;;;;;AAAA;;AAeA;;AACA;;AAGA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;AAEO,MAAMA,YAAY,GAAG,MAAM,IAAAC,aAAA,EAAoB,IAApB,CAA3B;;;;AAQP,MAAMC,cAAc,GAAIC,WAAD,IAA8C;EACnE,MAAMC,MAAM,GAAG,IAAAC,gBAAA,EAAS;IACtBC,KAAK,EAAE,CADe;IAEtBC,MAAM,EAAE;EAFc,CAAT,CAAf;EAKA,IAAAC,sBAAA,EAAgB,MAAM;IACpB,IAAI,CAACL,WAAL,EAAkB;MAChB;IACD;;IACD,OAAOC,MAAM,CAACK,WAAP,CAAoBC,QAAD,IAAc;MACtC,IAAI,IAAAC,mBAAA,EAAQR,WAAR,CAAJ,EAA0B;QACxBA,WAAW,CAACS,OAAZ,GAAsBF,QAAtB;MACD,CAFD,MAEO;QACLP,WAAW,CAACU,KAAZ,GAAoBH,QAApB;MACD;IACF,CANM,CAAP;EAOD,CAXD,EAWG,CAACP,WAAD,EAAcC,MAAd,CAXH;EAaA,OAAOA,MAAP;AACD,CApBD;;AAsBO,MAAMU,MAAM,gBAAG,IAAAC,iBAAA,EACpB,OAEEC,YAFF,KAGK;EAAA,IAFH;IAAEC,QAAF;IAAYC,KAAZ;IAAmBC,KAAnB;IAA0BC,IAA1B;IAAgCC,OAAhC;IAAyCjB,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AAS,CAACrC,OAAxB;QACD;MACF;IACF,CARD;EASD,CAVD,EAUG,CAACoC,IAAD,CAVH;;EAWA,OAAOC,SAAP;AACD,CAhBD"}
1
+ {"version":3,"names":["useCanvasRef","useRef","useOnSizeEvent","resultValue","onSize","useValue","width","height","useLayoutEffect","addListener","newValue","isValue","current","value","Canvas","forwardRef","forwardedRef","children","style","debug","mode","onTouch","_onSize","props","innerRef","ref","useCombinedRefs","redraw","useCallback","getNativeId","id","nativeId","registerValues","values","root","useMemo","SkiaRoot","Skia","useEffect","render","unmount","NATIVE_DOM","dom","canvas","info","touches","ctx","JsiDrawingContext","refs","targetRef","React","forEach"],"sources":["Canvas.tsx"],"sourcesContent":["import React, {\n useEffect,\n useCallback,\n useMemo,\n forwardRef,\n useRef,\n useLayoutEffect,\n} from \"react\";\nimport type {\n RefObject,\n ReactNode,\n MutableRefObject,\n ForwardedRef,\n FunctionComponent,\n} from \"react\";\n\nimport { SkiaDomView, SkiaView } from \"../views\";\nimport { Skia } from \"../skia/Skia\";\nimport type { TouchHandler, SkiaBaseViewProps } from \"../views\";\nimport type { SkiaValue } from \"../values/types\";\nimport { JsiDrawingContext } from \"../dom/types\";\nimport { useValue } from \"../values\";\n\nimport { SkiaRoot } from \"./Reconciler\";\nimport { NATIVE_DOM } from \"./HostComponents\";\nimport { isValue } from \"./processors\";\n\nexport const useCanvasRef = () => useRef<SkiaDomView>(null);\n\nexport interface CanvasProps extends SkiaBaseViewProps {\n ref?: RefObject<SkiaDomView>;\n children: ReactNode;\n onTouch?: TouchHandler;\n}\n\nconst useOnSizeEvent = (resultValue: SkiaBaseViewProps[\"onSize\"]) => {\n const onSize = useValue({\n width: 0,\n height: 0,\n });\n\n useLayoutEffect(() => {\n if (!resultValue) {\n return;\n }\n return onSize.addListener((newValue) => {\n if (isValue(resultValue)) {\n resultValue.current = newValue;\n } else {\n resultValue.value = newValue;\n }\n });\n }, [resultValue, onSize]);\n\n return onSize;\n};\n\nexport const Canvas = forwardRef<SkiaDomView, CanvasProps>(\n (\n { children, style, debug, mode, onTouch, onSize: _onSize, ...props },\n forwardedRef\n ) => {\n const onSize = useOnSizeEvent(_onSize);\n const innerRef = useCanvasRef();\n const ref = useCombinedRefs(forwardedRef, innerRef);\n const redraw = useCallback(() => {\n innerRef.current?.redraw();\n }, [innerRef]);\n const getNativeId = useCallback(() => {\n const id = innerRef.current?.nativeId ?? -1;\n return id;\n }, [innerRef]);\n\n const registerValues = useCallback(\n (values: Array<SkiaValue<unknown>>) => {\n if (ref.current !== null) {\n return ref.current.registerValues(values);\n }\n return () => {};\n },\n [ref]\n );\n const root = useMemo(\n () => new SkiaRoot(Skia, registerValues, redraw, getNativeId),\n [redraw, registerValues, getNativeId]\n );\n\n // Render effect\n useEffect(() => {\n root.render(children);\n }, [children, root, redraw]);\n\n useEffect(() => {\n return () => {\n root.unmount();\n };\n }, [root]);\n if (NATIVE_DOM) {\n return (\n <SkiaDomView\n ref={ref}\n style={style}\n root={root.dom}\n onTouch={onTouch}\n onSize={onSize}\n mode={mode}\n debug={debug}\n {...props}\n />\n );\n } else {\n return (\n <SkiaView\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n style={style}\n mode={mode}\n debug={debug}\n onSize={onSize}\n onDraw={(canvas, info) => {\n onTouch && onTouch(info.touches);\n const ctx = new JsiDrawingContext(Skia, canvas);\n root.dom.render(ctx);\n }}\n {...props}\n />\n );\n }\n }\n) as FunctionComponent<CanvasProps & React.RefAttributes<SkiaDomView>>;\n\n/**\n * Combines a list of refs into a single ref. This can be used to provide\n * both a forwarded ref and an internal ref keeping the same functionality\n * on both of the refs.\n * @param refs Array of refs to combine\n * @returns A single ref that can be used in a ref prop.\n */\nconst useCombinedRefs = <T,>(\n ...refs: Array<MutableRefObject<T> | ForwardedRef<T>>\n) => {\n const targetRef = React.useRef<T>(null);\n React.useEffect(() => {\n refs.forEach((ref) => {\n if (ref) {\n if (typeof ref === \"function\") {\n ref(targetRef.current);\n } else {\n ref.current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IACL,oBACE,6BAAC,eAAD,CACE;IADF;MAEE,GAAG,EAAEE,GAFP;MAGE,KAAK,EAAEP,KAHT;MAIE,IAAI,EAAEE,IAJR;MAKE,KAAK,EAAED,KALT;MAME,MAAM,EAAEf,MANV;MAOE,MAAM,EAAE,CAACuC,MAAD,EAASC,IAAT,KAAkB;QACxBvB,OAAO,IAAIA,OAAO,CAACuB,IAAI,CAACC,OAAN,CAAlB;QACA,MAAMC,GAAG,GAAG,IAAIC,wBAAJ,CAAsBV,UAAtB,EAA4BM,MAA5B,CAAZ;QACAT,IAAI,CAACQ,GAAL,CAASH,MAAT,CAAgBO,GAAhB;MACD;IAXH,GAYMvB,KAZN,EADF;EAgBD;AACF,CAvEmB,CAAf;AA0EP;AACA;AACA;AACA;AACA;AACA;AACA;;;;AACA,MAAMG,eAAe,GAAG,YAEnB;EAAA,kCADAsB,IACA;IADAA,IACA;EAAA;;EACH,MAAMC,SAAS,GAAGC,cAAA,CAAMjD,MAAN,CAAgB,IAAhB,CAAlB;;EACAiD,cAAA,CAAMZ,SAAN,CAAgB,MAAM;IACpBU,IAAI,CAACG,OAAL,CAAc1B,GAAD,IAAS;MACpB,IAAIA,GAAJ,EAAS;QACP,IAAI,OAAOA,GAAP,KAAe,UAAnB,EAA+B;UAC7BA,GAAG,CAACwB,SAAS,CAACrC,OAAX,CAAH;QACD,CAFD,MAEO;UACLa,GAAG,CAACb,OAAJ,GAAcqC,SAAS,CAACrC,OAAxB;QACD;MACF;IACF,CARD;EASD,CAVD,EAUG,CAACoC,IAAD,CAVH;;EAWA,OAAOC,SAAP;AACD,CAhBD"}
@@ -1,9 +1,9 @@
1
1
  import type { Node } from "../dom/types";
2
2
  import type { SkiaValue } from "../values";
3
3
  import type { AnimatedProps } from "./processors";
4
- declare type Unsubscribe = () => void;
5
- declare type Mutator = (value: unknown) => void;
6
- declare type SubscriptionState = {
4
+ type Unsubscribe = () => void;
5
+ type Mutator = (value: unknown) => void;
6
+ type SubscriptionState = {
7
7
  nodes: Map<Node<unknown>, Mutator[]>;
8
8
  unsubscribe: null | Unsubscribe;
9
9
  };
@@ -3,17 +3,17 @@ import type { HostConfig } from "react-reconciler";
3
3
  import type { NodeType, Node } from "../dom/types";
4
4
  import type { Container } from "./Container";
5
5
  export declare const debug: (message?: any, ...optionalParams: any[]) => void;
6
- declare type Instance = Node<unknown>;
7
- declare type Props = object;
8
- declare type TextInstance = Node<unknown>;
9
- declare type SuspenseInstance = Instance;
10
- declare type HydratableInstance = Instance;
11
- declare type PublicInstance = Instance;
12
- declare type HostContext = null;
13
- declare type UpdatePayload = Container;
14
- declare type ChildSet = unknown;
15
- declare type TimeoutHandle = NodeJS.Timeout;
16
- declare type NoTimeout = -1;
17
- declare type SkiaHostConfig = HostConfig<NodeType, Props, Container, Instance, TextInstance, SuspenseInstance, HydratableInstance, PublicInstance, HostContext, UpdatePayload, ChildSet, TimeoutHandle, NoTimeout>;
6
+ type Instance = Node<unknown>;
7
+ type Props = object;
8
+ type TextInstance = Node<unknown>;
9
+ type SuspenseInstance = Instance;
10
+ type HydratableInstance = Instance;
11
+ type PublicInstance = Instance;
12
+ type HostContext = null;
13
+ type UpdatePayload = Container;
14
+ type ChildSet = unknown;
15
+ type TimeoutHandle = NodeJS.Timeout;
16
+ type NoTimeout = -1;
17
+ type SkiaHostConfig = HostConfig<NodeType, Props, Container, Instance, TextInstance, SuspenseInstance, HydratableInstance, PublicInstance, HostContext, UpdatePayload, ChildSet, TimeoutHandle, NoTimeout>;
18
18
  export declare const skHostConfig: SkiaHostConfig;
19
19
  export {};
@@ -31,6 +31,7 @@ const appendNode = (parent, child) => {
31
31
  };
32
32
 
33
33
  const removeNode = (parent, child) => {
34
+ (0, _renderHelpers.unbindReanimatedNode)(child);
34
35
  return parent.removeChild(child);
35
36
  };
36
37
 
@@ -1 +1 @@
1
- {"version":3,"names":["DEBUG","debug","console","log","appendNode","parent","child","addChild","removeNode","removeChild","insertBefore","before","insertChildBefore","skHostConfig","now","Date","supportsMutation","isPrimaryRenderer","supportsPersistence","supportsHydration","scheduleTimeout","setTimeout","cancelTimeout","clearTimeout","noTimeout","appendChildToContainer","container","root","appendChild","getRootHostContext","_rootContainerInstance","getChildHostContext","_parentHostContext","_type","shouldSetTextContent","_props","createTextInstance","_text","_hostContext","_internalInstanceHandle","Error","createInstance","type","pristineProps","props","reanimatedProps","extractReanimatedProps","node","createNode","materialize","bindReanimatedProps","depMgr","subscribeNode","appendInitialChild","parentInstance","finalizeInitialChildren","commitMount","prepareForCommit","_containerInfo","resetAfterCommit","update","redraw","getPublicInstance","prepareUpdate","_instance","oldProps","newProps","rootContainerInstance","propsAreEqual","shallowEq","commitUpdate","instance","updatePayload","prevProps","nextProps","_internalHandle","unsubscribeNode","setProps","commitTextUpdate","_textInstance","_oldText","_newText","clearContainer","children","forEach","preparePortalMount","removeChildFromContainer","insertInContainerBefore","getCurrentEventPriority","DefaultEventPriority","beforeActiveInstanceBlur","afterActiveInstanceBlur","detachDeletedInstance","result","mapKeys","key","prop","isValue","current","isSelector","selector","value"],"sources":["HostConfig.ts"],"sourcesContent":["/*global NodeJS*/\nimport type { HostConfig } from \"react-reconciler\";\nimport { DefaultEventPriority } from \"react-reconciler/constants\";\n\nimport type { NodeType, Node } from \"../dom/types\";\nimport type { SkiaValue } from \"../values\";\nimport {\n bindReanimatedProps,\n extractReanimatedProps,\n} from \"../external/reanimated/renderHelpers\";\n\nimport type { Container } from \"./Container\";\nimport { createNode } from \"./HostComponents\";\nimport type { AnimatedProps } from \"./processors\";\nimport { isSelector, isValue } from \"./processors\";\nimport { mapKeys, shallowEq } from \"./typeddash\";\n\nconst DEBUG = false;\nexport const debug = (...args: Parameters<typeof console.log>) => {\n if (DEBUG) {\n console.log(...args);\n }\n};\n\ntype Instance = Node<unknown>;\n\ntype Props = object;\ntype TextInstance = Node<unknown>;\ntype SuspenseInstance = Instance;\ntype HydratableInstance = Instance;\ntype PublicInstance = Instance;\ntype HostContext = null;\ntype UpdatePayload = Container;\ntype ChildSet = unknown;\ntype TimeoutHandle = NodeJS.Timeout;\ntype NoTimeout = -1;\n\ntype SkiaHostConfig = HostConfig<\n NodeType,\n Props,\n Container,\n Instance,\n TextInstance,\n SuspenseInstance,\n HydratableInstance,\n PublicInstance,\n HostContext,\n UpdatePayload,\n ChildSet,\n TimeoutHandle,\n NoTimeout\n>;\n\nconst appendNode = (parent: Node<unknown>, child: Node<unknown>) => {\n parent.addChild(child);\n};\n\nconst removeNode = (parent: Node<unknown>, child: Node<unknown>) => {\n return parent.removeChild(child);\n};\n\nconst insertBefore = (\n parent: Node<unknown>,\n child: Node<unknown>,\n before: Node<unknown>\n) => {\n parent.insertChildBefore(child, before);\n};\n\nexport const skHostConfig: SkiaHostConfig = {\n /**\n * This function is used by the reconciler in order to calculate current time for prioritising work.\n */\n now: Date.now,\n supportsMutation: true,\n isPrimaryRenderer: false,\n supportsPersistence: false,\n supportsHydration: false,\n //supportsMicrotask: true,\n\n scheduleTimeout: setTimeout,\n cancelTimeout: clearTimeout,\n noTimeout: -1,\n\n appendChildToContainer(container, child) {\n debug(\"appendChildToContainer\", container, child);\n appendNode(container.root, child);\n },\n\n appendChild(parent, child) {\n debug(\"appendChild\", parent, child);\n appendNode(parent, child);\n },\n\n getRootHostContext: (_rootContainerInstance: Container) => {\n debug(\"getRootHostContext\");\n return null;\n },\n\n getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {\n debug(\"getChildHostContext\");\n return null;\n },\n\n shouldSetTextContent(_type, _props) {\n return false;\n },\n\n createTextInstance(\n _text,\n _rootContainerInstance,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createTextInstance\");\n // return SpanNode({}, text) as SkNode;\n throw new Error(\"Text nodes are not supported yet\");\n },\n\n createInstance(\n type,\n pristineProps,\n container,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createInstance\", type);\n const [props, reanimatedProps] = extractReanimatedProps(pristineProps);\n const node = createNode(container, type, materialize(props));\n bindReanimatedProps(container, node, reanimatedProps);\n container.depMgr.subscribeNode(node, props);\n return node;\n },\n\n appendInitialChild(parentInstance, child) {\n debug(\"appendInitialChild\");\n appendNode(parentInstance, child);\n },\n\n finalizeInitialChildren(\n parentInstance,\n _type,\n _props,\n _rootContainerInstance,\n _hostContext\n ) {\n debug(\"finalizeInitialChildren\", parentInstance);\n return false;\n },\n\n commitMount() {\n // if finalizeInitialChildren = true\n debug(\"commitMount\");\n },\n\n prepareForCommit(_containerInfo) {\n debug(\"prepareForCommit\");\n return null;\n },\n\n resetAfterCommit(container) {\n debug(\"resetAfterCommit\");\n container.depMgr.update();\n container.redraw();\n },\n\n getPublicInstance(node: Instance) {\n debug(\"getPublicInstance\");\n return node;\n },\n\n prepareUpdate: (\n _instance,\n type,\n oldProps,\n newProps,\n rootContainerInstance,\n _hostContext\n ) => {\n debug(\"prepareUpdate\");\n const propsAreEqual = shallowEq(oldProps, newProps);\n if (propsAreEqual) {\n return null;\n }\n debug(\"update \", type);\n return rootContainerInstance;\n },\n\n commitUpdate(\n instance,\n updatePayload,\n type,\n prevProps,\n nextProps,\n _internalHandle\n ) {\n debug(\"commitUpdate: \", type);\n if (shallowEq(prevProps, nextProps)) {\n return;\n }\n const [props, reanimatedProps] = extractReanimatedProps(nextProps);\n updatePayload.depMgr.unsubscribeNode(instance);\n instance.setProps(materialize(props));\n bindReanimatedProps(updatePayload, instance, reanimatedProps);\n updatePayload.depMgr.subscribeNode(instance, props);\n },\n\n commitTextUpdate: (\n _textInstance: TextInstance,\n _oldText: string,\n _newText: string\n ) => {\n // textInstance.instance = newText;\n },\n\n clearContainer: (container) => {\n debug(\"clearContainer\");\n container.root.children().forEach((child) => {\n container.root.removeChild(child);\n });\n },\n\n preparePortalMount: () => {\n debug(\"preparePortalMount\");\n },\n\n removeChild: (parent, child) => {\n removeNode(parent, child);\n },\n\n removeChildFromContainer: (container, child) => {\n removeNode(container.root, child);\n },\n\n insertInContainerBefore: (container, child, before) => {\n insertBefore(container.root, child, before);\n },\n\n insertBefore: (parent, child, before) => {\n insertBefore(parent, child, before);\n },\n // see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n getCurrentEventPriority: () => DefaultEventPriority,\n beforeActiveInstanceBlur: () => {},\n afterActiveInstanceBlur: () => {},\n detachDeletedInstance: () => {},\n};\n\nconst materialize = <P>(props: AnimatedProps<P>) => {\n const result = { ...props } as P;\n mapKeys(props).forEach((key) => {\n const prop = props[key];\n if (isValue(prop)) {\n result[key] = (prop as SkiaValue<P[typeof key]>).current;\n } else if (isSelector(prop)) {\n result[key] = prop.selector(prop.value.current) as P[typeof key];\n }\n });\n\n return result;\n};\n"],"mappings":";;;;;;;AAEA;;AAIA;;AAMA;;AAEA;;AACA;;AAfA;AAiBA,MAAMA,KAAK,GAAG,KAAd;;AACO,MAAMC,KAAK,GAAG,YAA6C;EAChE,IAAID,KAAJ,EAAW;IACTE,OAAO,CAACC,GAAR,CAAY,YAAZ;EACD;AACF,CAJM;;;;AAmCP,MAAMC,UAAU,GAAG,CAACC,MAAD,EAAwBC,KAAxB,KAAiD;EAClED,MAAM,CAACE,QAAP,CAAgBD,KAAhB;AACD,CAFD;;AAIA,MAAME,UAAU,GAAG,CAACH,MAAD,EAAwBC,KAAxB,KAAiD;EAClE,OAAOD,MAAM,CAACI,WAAP,CAAmBH,KAAnB,CAAP;AACD,CAFD;;AAIA,MAAMI,YAAY,GAAG,CACnBL,MADmB,EAEnBC,KAFmB,EAGnBK,MAHmB,KAIhB;EACHN,MAAM,CAACO,iBAAP,CAAyBN,KAAzB,EAAgCK,MAAhC;AACD,CAND;;AAQO,MAAME,YAA4B,GAAG;EAC1C;AACF;AACA;EACEC,GAAG,EAAEC,IAAI,CAACD,GAJgC;EAK1CE,gBAAgB,EAAE,IALwB;EAM1CC,iBAAiB,EAAE,KANuB;EAO1CC,mBAAmB,EAAE,KAPqB;EAQ1CC,iBAAiB,EAAE,KARuB;EAS1C;EAEAC,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indReanimatedNode","removeChild","insertBefore","before","insertChildBefore","skHostConfig","now","Date","supportsMutation","isPrimaryRenderer","supportsPersistence","supportsHydration","scheduleTimeout","setTimeout","cancelTimeout","clearTimeout","noTimeout","appendChildToContainer","container","root","appendChild","getRootHostContext","_rootContainerInstance","getChildHostContext","_parentHostContext","_type","shouldSetTextContent","_props","createTextInstance","_text","_hostContext","_internalInstanceHandle","Error","createInstance","type","pristineProps","props","reanimatedProps","extractReanimatedProps","node","createNode","materialize","bindReanimatedProps","depMgr","subscribeNode","appendInitialChild","parentInstance","finalizeInitialChildren","commitMount","prepareForCommit","_containerInfo","resetAfterCommit","update","redraw","getPublicInstance","prepareUpdate","_instance","oldProps","newProps","rootContainerInstance","propsAreEqual","shallowEq","commitUpdate","instance","updatePayload","prevProps","nextProps","_internalHandle","unsubscribeNode","setProps","commitTextUpdate","_textInstance","_oldText","_newText","clearContainer","children","forEach","preparePortalMount","removeChildFromContainer","insertInContainerBefore","getCurrentEventPriority","DefaultEventPriority","beforeActiveInstanceBlur","afterActiveInstanceBlur","detachDeletedInstance","result","mapKeys","key","prop","isValue","current","isSelector","selector","value"],"sources":["HostConfig.ts"],"sourcesContent":["/*global NodeJS*/\nimport type { HostConfig } from \"react-reconciler\";\nimport { DefaultEventPriority } from \"react-reconciler/constants\";\n\nimport type { NodeType, Node } from \"../dom/types\";\nimport type { SkiaValue } from \"../values\";\nimport {\n bindReanimatedProps,\n extractReanimatedProps,\n unbindReanimatedNode,\n} from \"../external/reanimated/renderHelpers\";\n\nimport type { Container } from \"./Container\";\nimport { createNode } from \"./HostComponents\";\nimport type { AnimatedProps } from \"./processors\";\nimport { isSelector, isValue } from \"./processors\";\nimport { mapKeys, shallowEq } from \"./typeddash\";\n\nconst DEBUG = false;\nexport const debug = (...args: Parameters<typeof console.log>) => {\n if (DEBUG) {\n console.log(...args);\n }\n};\n\ntype Instance = Node<unknown>;\n\ntype Props = object;\ntype TextInstance = Node<unknown>;\ntype SuspenseInstance = Instance;\ntype HydratableInstance = Instance;\ntype PublicInstance = Instance;\ntype HostContext = null;\ntype UpdatePayload = Container;\ntype ChildSet = unknown;\ntype TimeoutHandle = NodeJS.Timeout;\ntype NoTimeout = -1;\n\ntype SkiaHostConfig = HostConfig<\n NodeType,\n Props,\n Container,\n Instance,\n TextInstance,\n SuspenseInstance,\n HydratableInstance,\n PublicInstance,\n HostContext,\n UpdatePayload,\n ChildSet,\n TimeoutHandle,\n NoTimeout\n>;\n\nconst appendNode = (parent: Node<unknown>, child: Node<unknown>) => {\n parent.addChild(child);\n};\n\nconst removeNode = (parent: Node<unknown>, child: Node<unknown>) => {\n unbindReanimatedNode(child);\n return parent.removeChild(child);\n};\n\nconst insertBefore = (\n parent: Node<unknown>,\n child: Node<unknown>,\n before: Node<unknown>\n) => {\n parent.insertChildBefore(child, before);\n};\n\nexport const skHostConfig: SkiaHostConfig = {\n /**\n * This function is used by the reconciler in order to calculate current time for prioritising work.\n */\n now: Date.now,\n supportsMutation: true,\n isPrimaryRenderer: false,\n supportsPersistence: false,\n supportsHydration: false,\n //supportsMicrotask: true,\n\n scheduleTimeout: setTimeout,\n cancelTimeout: clearTimeout,\n noTimeout: -1,\n\n appendChildToContainer(container, child) {\n debug(\"appendChildToContainer\", container, child);\n appendNode(container.root, child);\n },\n\n appendChild(parent, child) {\n debug(\"appendChild\", parent, child);\n appendNode(parent, child);\n },\n\n getRootHostContext: (_rootContainerInstance: Container) => {\n debug(\"getRootHostContext\");\n return null;\n },\n\n getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {\n debug(\"getChildHostContext\");\n return null;\n },\n\n shouldSetTextContent(_type, _props) {\n return false;\n },\n\n createTextInstance(\n _text,\n _rootContainerInstance,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createTextInstance\");\n // return SpanNode({}, text) as SkNode;\n throw new Error(\"Text nodes are not supported yet\");\n },\n\n createInstance(\n type,\n pristineProps,\n container,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createInstance\", type);\n const [props, reanimatedProps] = extractReanimatedProps(pristineProps);\n const node = createNode(container, type, materialize(props));\n bindReanimatedProps(container, node, reanimatedProps);\n container.depMgr.subscribeNode(node, props);\n return node;\n },\n\n appendInitialChild(parentInstance, child) {\n debug(\"appendInitialChild\");\n appendNode(parentInstance, child);\n },\n\n finalizeInitialChildren(\n parentInstance,\n _type,\n _props,\n _rootContainerInstance,\n _hostContext\n ) {\n debug(\"finalizeInitialChildren\", parentInstance);\n return false;\n },\n\n commitMount() {\n // if finalizeInitialChildren = true\n debug(\"commitMount\");\n },\n\n prepareForCommit(_containerInfo) {\n debug(\"prepareForCommit\");\n return null;\n },\n\n resetAfterCommit(container) {\n debug(\"resetAfterCommit\");\n container.depMgr.update();\n container.redraw();\n },\n\n getPublicInstance(node: Instance) {\n debug(\"getPublicInstance\");\n return node;\n },\n\n prepareUpdate: (\n _instance,\n type,\n oldProps,\n newProps,\n rootContainerInstance,\n _hostContext\n ) => {\n debug(\"prepareUpdate\");\n const propsAreEqual = shallowEq(oldProps, newProps);\n if (propsAreEqual) {\n return null;\n }\n debug(\"update \", type);\n return rootContainerInstance;\n },\n\n commitUpdate(\n instance,\n updatePayload,\n type,\n prevProps,\n nextProps,\n _internalHandle\n ) {\n debug(\"commitUpdate: \", type);\n if (shallowEq(prevProps, nextProps)) {\n return;\n }\n const [props, reanimatedProps] = extractReanimatedProps(nextProps);\n updatePayload.depMgr.unsubscribeNode(instance);\n instance.setProps(materialize(props));\n bindReanimatedProps(updatePayload, instance, reanimatedProps);\n updatePayload.depMgr.subscribeNode(instance, props);\n },\n\n commitTextUpdate: (\n _textInstance: TextInstance,\n _oldText: string,\n _newText: string\n ) => {\n // textInstance.instance = newText;\n },\n\n clearContainer: (container) => {\n debug(\"clearContainer\");\n container.root.children().forEach((child) => {\n container.root.removeChild(child);\n });\n },\n\n preparePortalMount: () => {\n debug(\"preparePortalMount\");\n },\n\n removeChild: (parent, child) => {\n removeNode(parent, child);\n },\n\n removeChildFromContainer: (container, child) => {\n removeNode(container.root, child);\n },\n\n insertInContainerBefore: (container, child, before) => {\n insertBefore(container.root, child, before);\n },\n\n insertBefore: (parent, child, before) => {\n insertBefore(parent, child, before);\n },\n // see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n getCurrentEventPriority: () => DefaultEventPriority,\n beforeActiveInstanceBlur: () => {},\n afterActiveInstanceBlur: () => {},\n detachDeletedInstance: () => {},\n};\n\nconst materialize = <P>(props: AnimatedProps<P>) => {\n const result = { ...props } as P;\n mapKeys(props).forEach((key) => {\n const prop = props[key];\n if (isValue(prop)) {\n result[key] = (prop as SkiaValue<P[typeof key]>).current;\n } else if (isSelector(prop)) {\n result[key] = prop.selector(prop.value.current) as P[typeof key];\n }\n });\n\n return result;\n};\n"],"mappings":";;;;;;;AAEA;;AAIA;;AAOA;;AAEA;;AACA;;AAhBA;AAkBA,MAAMA,KAAK,GAAG,KAAd;;AACO,MAAMC,KAAK,GAAG,YAA6C;EAChE,IAAID,KAAJ,EAAW;IACTE,OAAO,CAACC,GAAR,CAAY,YAAZ;EACD;AACF,CAJM;;;;AAmCP,MAAMC,UAAU,GAAG,CAACC,MAAD,EAAwBC,KAAxB,KAAiD;EAClED,MAAM,CAACE,QAAP,CAAgBD,KAAhB;AACD,CAFD;;AAIA,MAAME,UAAU,GAAG,CAACH,MAAD,EAAwBC,KAAxB,KAAiD;EAClE,IAAAG,mCAAA,EAAqBH,KAArB;EACA,OAAOD,MAAM,CAACK,WAAP,CAAmBJ,KAAnB,CAAP;AACD,CAHD;;AAKA,MAAMK,YAAY,GAAG,CACnBN,MADmB,EAEnBC,KAFmB,EAGnBM,MAHmB,KAIhB;EACHP,MAAM,CAACQ,iBAAP,CAAyBP,KAAzB,EAAgCM,MAAhC;AACD,CAND;;AAQO,MAAME,YAA4B,GAAG;EAC1C;AACF;AACA;EACEC,GAAG,EAAEC,IAAI,CAACD,GAJgC;E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K,KAAL,CAAWH,OAAzB,CAAd;IACD;EACF,CAPD;EASA,OAAOL,MAAP;AACD,CAZD"}
@@ -1,7 +1,7 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { Skia } from "../skia/types";
3
3
  import type { SkiaValue } from "../values/types";
4
- declare type RegisterValues = (values: Array<SkiaValue<unknown>>) => () => void;
4
+ type RegisterValues = (values: Array<SkiaValue<unknown>>) => () => void;
5
5
  export declare class SkiaRoot {
6
6
  private root;
7
7
  private container;
@@ -45,6 +45,7 @@ class SkiaRoot {
45
45
  }
46
46
 
47
47
  render(element) {
48
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
49
  skiaReconciler.updateContainer(element, this.root, null, () => {
49
50
  (0, _HostConfig.debug)("updateContainer");
50
51
  });
@@ -1 +1 @@
1
- {"version":3,"names":["skiaReconciler","ReactReconciler","skHostConfig","createDependencyManager","registerValues","NATIVE_DOM","global","SkiaDomApi","DependencyManager","injectIntoDevTools","bundleType","version","rendererPackageName","SkiaRoot","constructor","Skia","redraw","getNativeId","depMgr","container","Container","root","createContainer","console","error","render","element","updateContainer","hostDebug","unmount","remove","dom"],"sources":["Reconciler.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { OpaqueRoot } from \"react-reconciler\";\nimport ReactReconciler from \"react-reconciler\";\n\nimport type { Skia } from \"../skia/types\";\nimport type { SkiaValue } from \"../values/types\";\n\nimport { DependencyManager } from \"./DependencyManager\";\nimport { skHostConfig, debug as hostDebug } from \"./HostConfig\";\nimport { Container } from \"./Container\";\nimport { NATIVE_DOM } from \"./HostComponents\";\n\nconst skiaReconciler = ReactReconciler(skHostConfig);\n\ntype RegisterValues = (values: Array<SkiaValue<unknown>>) => () => void;\n\nconst createDependencyManager = (registerValues: RegisterValues) =>\n NATIVE_DOM\n ? global.SkiaDomApi.DependencyManager(registerValues)\n : new DependencyManager(registerValues);\n\nskiaReconciler.injectIntoDevTools({\n bundleType: 1,\n version: \"0.0.1\",\n rendererPackageName: \"react-native-skia\",\n});\n\nexport class SkiaRoot {\n private root: OpaqueRoot;\n private container: Container;\n\n constructor(\n Skia: Skia,\n registerValues: RegisterValues = () => () => {},\n redraw: () => void = () => {},\n getNativeId: () => number = () => 0\n ) {\n const depMgr = createDependencyManager(registerValues);\n this.container = new Container(Skia, depMgr, redraw, getNativeId);\n this.root = skiaReconciler.createContainer(\n this.container,\n 0,\n null,\n true,\n null,\n \"\",\n console.error,\n null\n );\n }\n\n render(element: ReactNode) {\n skiaReconciler.updateContainer(element, this.root, null, () => {\n hostDebug(\"updateContainer\");\n });\n }\n\n unmount() {\n skiaReconciler.updateContainer(null, this.root, null, () => {\n this.container.depMgr.remove();\n });\n }\n\n get dom() {\n return this.container.root;\n }\n}\n"],"mappings":";;;;;;;AAEA;;AAKA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,cAAc,GAAG,IAAAC,wBAAA,EAAgBC,wBAAhB,CAAvB;;AAIA,MAAMC,uBAAuB,GAAIC,cAAD,IAC9BC,0BAAA,GACIC,MAAM,CAACC,UAAP,CAAkBC,iBAAlB,CAAoCJ,cAApC,CADJ,GAEI,IAAII,oCAAJ,CAAsBJ,cAAtB,CAHN;;AAKAJ,cAAc,CAACS,kBAAf,CAAkC;EAChCC,UAAU,EAAE,CADoB;EAEhCC,OAAO,EAAE,OAFuB;EAGhCC,mBAAmB,EAAE;AAHW,CAAlC;;AAMO,MAAMC,QAAN,CAAe;EAIpBC,WAAW,CACTC,IADS,EAKT;IAAA,IAHAX,cAGA,uEAHiC,MAAM,MAAM,CAAE,CAG/C;IAAA,IAFAY,MAEA,uEAFqB,MAAM,CAAE,CAE7B;IAAA,IADAC,WACA,uEAD4B,MAAM,CAClC;;IAAA;;IAAA;;IACA,MAAMC,MAAM,GAAGf,uBAAuB,CAACC,cAAD,CAAtC;IACA,KAAKe,SAAL,GAAiB,IAAIC,oBAAJ,CAAcL,IAAd,EAAoBG,MAApB,EAA4BF,MAA5B,EAAoCC,WAApC,CAAjB;IACA,KAAKI,IAAL,GAAYrB,cAAc,CAACsB,eAAf,CACV,KAAKH,SADK,EAEV,CAFU,EAGV,IAHU,EAIV,IAJU,EAKV,IALU,EAMV,EANU,EAOVI,OAAO,CAACC,KAPE,EAQV,IARU,CAAZ;EAUD;;EAEDC,MAAM,CAACC,OAAD,EAAqB;IACzB1B,cAAc,CAAC2B,eAAf,CAA+BD,OAA/B,EAAwC,KAAKL,IAA7C,EAAmD,IAAnD,EAAyD,MAAM;MAC7D,IAAAO,iBAAA,EAAU,iBAAV;IACD,CAFD;EAGD;;EAEDC,OAAO,GAAG;IACR7B,cAAc,CAAC2B,eAAf,CAA+B,IAA/B,EAAqC,KAAKN,IAA1C,EAAgD,IAAhD,EAAsD,MAAM;MAC1D,KAAKF,SAAL,CAAeD,MAAf,CAAsBY,MAAtB;IACD,CAFD;EAGD;;EAEM,IAAHC,GAAG,GAAG;IACR,OAAO,KAAKZ,SAAL,CAAeE,IAAtB;EACD;;AAtCmB"}
1
+ {"version":3,"names":["skiaReconciler","ReactReconciler","skHostConfig","createDependencyManager","registerValues","NATIVE_DOM","global","SkiaDomApi","DependencyManager","injectIntoDevTools","bundleType","version","rendererPackageName","SkiaRoot","constructor","Skia","redraw","getNativeId","depMgr","container","Container","root","createContainer","console","error","render","element","updateContainer","hostDebug","unmount","remove","dom"],"sources":["Reconciler.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { OpaqueRoot } from \"react-reconciler\";\nimport ReactReconciler from \"react-reconciler\";\n\nimport type { Skia } from \"../skia/types\";\nimport type { SkiaValue } from \"../values/types\";\n\nimport { DependencyManager } from \"./DependencyManager\";\nimport { skHostConfig, debug as hostDebug } from \"./HostConfig\";\nimport { Container } from \"./Container\";\nimport { NATIVE_DOM } from \"./HostComponents\";\n\nconst skiaReconciler = ReactReconciler(skHostConfig);\n\ntype RegisterValues = (values: Array<SkiaValue<unknown>>) => () => void;\n\nconst createDependencyManager = (registerValues: RegisterValues) =>\n NATIVE_DOM\n ? global.SkiaDomApi.DependencyManager(registerValues)\n : new DependencyManager(registerValues);\n\nskiaReconciler.injectIntoDevTools({\n bundleType: 1,\n version: \"0.0.1\",\n rendererPackageName: \"react-native-skia\",\n});\n\nexport class SkiaRoot {\n private root: OpaqueRoot;\n private container: Container;\n\n constructor(\n Skia: Skia,\n registerValues: RegisterValues = () => () => {},\n redraw: () => void = () => {},\n getNativeId: () => number = () => 0\n ) {\n const depMgr = createDependencyManager(registerValues);\n this.container = new Container(Skia, depMgr, redraw, getNativeId);\n this.root = skiaReconciler.createContainer(\n this.container,\n 0,\n null,\n true,\n null,\n \"\",\n console.error,\n null\n );\n }\n\n render(element: ReactNode) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n skiaReconciler.updateContainer(element as any, this.root, null, () => {\n hostDebug(\"updateContainer\");\n });\n }\n\n unmount() {\n skiaReconciler.updateContainer(null, this.root, null, () => {\n this.container.depMgr.remove();\n });\n }\n\n get dom() {\n return this.container.root;\n }\n}\n"],"mappings":";;;;;;;AAEA;;AAKA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,cAAc,GAAG,IAAAC,wBAAA,EAAgBC,wBAAhB,CAAvB;;AAIA,MAAMC,uBAAuB,GAAIC,cAAD,IAC9BC,0BAAA,GACIC,MAAM,CAACC,UAAP,CAAkBC,iBAAlB,CAAoCJ,cAApC,CADJ,GAEI,IAAII,oCAAJ,CAAsBJ,cAAtB,CAHN;;AAKAJ,cAAc,CAACS,kBAAf,CAAkC;EAChCC,UAAU,EAAE,CADoB;EAEhCC,OAAO,EAAE,OAFuB;EAGhCC,mBAAmB,EAAE;AAHW,CAAlC;;AAMO,MAAMC,QAAN,CAAe;EAIpBC,WAAW,CACTC,IADS,EAKT;IAAA,IAHAX,cAGA,uEAHiC,MAAM,MAAM,CAAE,CAG/C;IAAA,IAFAY,MAEA,uEAFqB,MAAM,CAAE,CAE7B;IAAA,IADAC,WACA,uEAD4B,MAAM,CAClC;;IAAA;;IAAA;;IACA,MAAMC,MAAM,GAAGf,uBAAuB,CAACC,cAAD,CAAtC;IACA,KAAKe,SAAL,GAAiB,IAAIC,oBAAJ,CAAcL,IAAd,EAAoBG,MAApB,EAA4BF,MAA5B,EAAoCC,WAApC,CAAjB;IACA,KAAKI,IAAL,GAAYrB,cAAc,CAACsB,eAAf,CACV,KAAKH,SADK,EAEV,CAFU,EAGV,IAHU,EAIV,IAJU,EAKV,IALU,EAMV,EANU,EAOVI,OAAO,CAACC,KAPE,EAQV,IARU,CAAZ;EAUD;;EAEDC,MAAM,CAACC,OAAD,EAAqB;IACzB;IACA1B,cAAc,CAAC2B,eAAf,CAA+BD,OAA/B,EAA+C,KAAKL,IAApD,EAA0D,IAA1D,EAAgE,MAAM;MACpE,IAAAO,iBAAA,EAAU,iBAAV;IACD,CAFD;EAGD;;EAEDC,OAAO,GAAG;IACR7B,cAAc,CAAC2B,eAAf,CAA+B,IAA/B,EAAqC,KAAKN,IAA1C,EAAgD,IAAhD,EAAsD,MAAM;MAC1D,KAAKF,SAAL,CAAeD,MAAf,CAAsBY,MAAtB;IACD,CAFD;EAGD;;EAEM,IAAHC,GAAG,GAAG;IACR,OAAO,KAAKZ,SAAL,CAAeE,IAAtB;EACD;;AAvCmB"}
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { BlendProps } from "../../dom/types";
3
3
  import type { SkiaProps } from "../processors";
4
- export declare const Blend: (props: SkiaProps<BlendProps>) => JSX.Element;
4
+ export declare const Blend: (props: SkiaProps<BlendProps>) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { CustomDrawingNodeProps } from "../../dom/types";
3
- export declare const Drawing: (props: CustomDrawingNodeProps) => JSX.Element;
3
+ export declare const Drawing: (props: CustomDrawingNodeProps) => React.JSX.Element;
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../processors";
3
3
  import type { GroupProps } from "../../dom/types";
4
4
  import type { ChildrenProps } from "../../dom/types/Common";
5
5
  export interface PublicGroupProps extends Omit<GroupProps, "layer"> {
6
6
  layer?: GroupProps["layer"] | ChildrenProps["children"];
7
7
  }
8
- export declare const Group: ({ layer, ...props }: SkiaProps<PublicGroupProps>) => JSX.Element;
8
+ export declare const Group: ({ layer, ...props }: SkiaProps<PublicGroupProps>) => React.JSX.Element;
@@ -1,9 +1,10 @@
1
1
  import type { ReactNode } from "react";
2
+ import React from "react";
2
3
  interface MaskProps {
3
4
  mode?: "luminance" | "alpha";
4
5
  clip?: boolean;
5
6
  mask: ReactNode | ReactNode[];
6
7
  children: ReactNode | ReactNode[];
7
8
  }
8
- export declare const Mask: ({ children, mask, mode, clip, }: MaskProps) => JSX.Element;
9
+ export declare const Mask: ({ children, mask, mode, clip, }: MaskProps) => React.JSX.Element;
9
10
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../processors";
3
3
  import type { DrawingNodeProps } from "../../dom/types";
4
- export declare const Paint: (props: SkiaProps<DrawingNodeProps>) => JSX.Element;
4
+ export declare const Paint: (props: SkiaProps<DrawingNodeProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { PictureProps } from "../../dom/types";
3
3
  import type { SkiaProps } from "../processors";
4
- export declare const Picture: (props: SkiaProps<PictureProps>) => JSX.Element;
4
+ export declare const Picture: (props: SkiaProps<PictureProps>) => React.JSX.Element;
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { AnimatedProps } from "../../processors";
3
3
  import type { Radius } from "../../../dom/types";
4
4
  import type { BackdropFilterProps } from "./BackdropFilter";
5
5
  interface BackdropBlurProps extends Omit<BackdropFilterProps, "filter"> {
6
6
  blur: Radius;
7
7
  }
8
- export declare const BackdropBlur: ({ blur, children, ...props }: AnimatedProps<BackdropBlurProps>) => JSX.Element;
8
+ export declare const BackdropBlur: ({ blur, children, ...props }: AnimatedProps<BackdropBlurProps>) => React.JSX.Element;
9
9
  export {};
@@ -1,7 +1,8 @@
1
1
  import type { ReactNode } from "react";
2
+ import React from "react";
2
3
  import type { GroupProps } from "../../../dom/types";
3
4
  import type { SkiaProps } from "../../processors/Animations/Animations";
4
5
  export interface BackdropFilterProps extends GroupProps {
5
6
  filter: ReactNode | ReactNode[];
6
7
  }
7
- export declare const BackdropFilter: ({ filter, children, ...props }: SkiaProps<BackdropFilterProps, "filter">) => JSX.Element;
8
+ export declare const BackdropFilter: ({ filter, children: groupChildren, ...props }: SkiaProps<BackdropFilterProps, "filter">) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../../processors";
3
3
  import type { BlendColorFilterProps } from "../../../dom/types";
4
- export declare const BlendColor: (props: SkiaProps<BlendColorFilterProps>) => JSX.Element;
4
+ export declare const BlendColor: (props: SkiaProps<BlendColorFilterProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../../processors/Animations/Animations";
3
3
  import type { LerpColorFilterProps } from "../../../dom/types";
4
- export declare const Lerp: (props: SkiaProps<LerpColorFilterProps>) => JSX.Element;
4
+ export declare const Lerp: (props: SkiaProps<LerpColorFilterProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { ChildrenProps } from "../../../dom/types";
3
3
  import type { SkiaProps } from "../../processors";
4
- export declare const LinearToSRGBGamma: (props: SkiaProps<ChildrenProps>) => JSX.Element;
4
+ export declare const LinearToSRGBGamma: (props: SkiaProps<ChildrenProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { ChildrenProps } from "../../../dom/types";
3
3
  import type { SkiaProps } from "../../processors/Animations/Animations";
4
- export declare const LumaColorFilter: (props: SkiaProps<ChildrenProps>) => JSX.Element;
4
+ export declare const LumaColorFilter: (props: SkiaProps<ChildrenProps>) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../../processors";
3
3
  import type { MatrixColorFilterProps } from "../../../dom/types";
4
- export declare const ColorMatrix: (props: SkiaProps<MatrixColorFilterProps>) => JSX.Element;
4
+ export declare const ColorMatrix: (props: SkiaProps<MatrixColorFilterProps>) => React.JSX.Element;
5
5
  export declare const OpacityMatrix: (opacity: number) => number[];
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { ChildrenProps } from "../../../dom/types";
3
3
  import type { SkiaProps } from "../../processors/Animations/Animations";
4
- export declare const SRGBToLinearGamma: (props: SkiaProps<ChildrenProps>) => JSX.Element;
4
+ export declare const SRGBToLinearGamma: (props: SkiaProps<ChildrenProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../../processors";
3
3
  import type { ImageProps } from "../../../dom/types";
4
- export declare const Image: (props: SkiaProps<ImageProps>) => JSX.Element;
4
+ export declare const Image: (props: SkiaProps<ImageProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { ImageSVGProps } from "../../../dom/types";
3
3
  import type { AnimatedProps } from "../../processors";
4
- export declare const ImageSVG: (props: AnimatedProps<ImageSVGProps>) => JSX.Element;
4
+ export declare const ImageSVG: (props: AnimatedProps<ImageSVGProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { ImageShaderProps } from "../../../dom/types";
3
3
  import type { SkiaDefaultProps } from "../../processors";
4
- export declare const ImageShader: ({ tx, ty, fm, mm, fit, transform, ...props }: SkiaDefaultProps<ImageShaderProps, "tx" | "ty" | "fm" | "mm" | "fit" | "transform">) => JSX.Element;
4
+ export declare const ImageShader: ({ tx, ty, fm, mm, fit, transform, ...props }: SkiaDefaultProps<ImageShaderProps, "tx" | "ty" | "fm" | "mm" | "fit" | "transform">) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaDefaultProps } from "../../processors/Animations/Animations";
3
3
  import type { BlurImageFilterProps } from "../../../dom/types";
4
- export declare const Blur: ({ mode, ...props }: SkiaDefaultProps<BlurImageFilterProps, "mode">) => JSX.Element;
4
+ export declare const Blur: ({ mode, ...props }: SkiaDefaultProps<BlurImageFilterProps, "mode">) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../../processors";
3
3
  import type { DisplacementMapImageFilterProps } from "../../../dom/types";
4
- export declare const DisplacementMap: (props: SkiaProps<DisplacementMapImageFilterProps>) => JSX.Element;
4
+ export declare const DisplacementMap: (props: SkiaProps<DisplacementMapImageFilterProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { MorphologyImageFilterProps } from "../../../dom/types";
3
3
  import type { SkiaDefaultProps } from "../../processors";
4
- export declare const Morphology: ({ operator, ...props }: SkiaDefaultProps<MorphologyImageFilterProps, "operator">) => JSX.Element;
4
+ export declare const Morphology: ({ operator, ...props }: SkiaDefaultProps<MorphologyImageFilterProps, "operator">) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaDefaultProps } from "../../processors/Animations/Animations";
3
3
  import type { OffsetImageFilterProps } from "../../../dom/types";
4
- export declare const Offset: ({ x, y, ...props }: SkiaDefaultProps<OffsetImageFilterProps, "x" | "y">) => JSX.Element;
4
+ export declare const Offset: ({ x, y, ...props }: SkiaDefaultProps<OffsetImageFilterProps, "x" | "y">) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../../processors/Animations/Animations";
3
3
  import type { RuntimeShaderImageFilterProps } from "../../../dom/types";
4
- export declare const RuntimeShader: (props: SkiaProps<RuntimeShaderImageFilterProps>) => JSX.Element;
4
+ export declare const RuntimeShader: (props: SkiaProps<RuntimeShaderImageFilterProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { DropShadowImageFilterProps } from "../../../dom/types";
3
3
  import type { SkiaProps } from "../../processors/Animations/Animations";
4
- export declare const Shadow: (props: SkiaProps<DropShadowImageFilterProps>) => JSX.Element;
4
+ export declare const Shadow: (props: SkiaProps<DropShadowImageFilterProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { BlurMaskFilterProps } from "../../../dom/types";
3
3
  import type { SkiaDefaultProps } from "../../processors/Animations/Animations";
4
- export declare const BlurMask: ({ style, respectCTM, ...props }: SkiaDefaultProps<BlurMaskFilterProps, "style" | "respectCTM">) => JSX.Element;
4
+ export declare const BlurMask: ({ style, respectCTM, ...props }: SkiaDefaultProps<BlurMaskFilterProps, "style" | "respectCTM">) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { CornerPathEffectProps } from "../../../dom/types";
3
3
  import type { SkiaProps } from "../../processors";
4
- export declare const CornerPathEffect: (props: SkiaProps<CornerPathEffectProps>) => JSX.Element;
4
+ export declare const CornerPathEffect: (props: SkiaProps<CornerPathEffectProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { DashPathEffectProps } from "../../../dom/types";
3
3
  import type { SkiaProps } from "../../processors";
4
- export declare const DashPathEffect: (props: SkiaProps<DashPathEffectProps>) => JSX.Element;
4
+ export declare const DashPathEffect: (props: SkiaProps<DashPathEffectProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaDefaultProps } from "../../processors/Animations/Animations";
3
3
  import type { DiscretePathEffectProps } from "../../../dom/types";
4
- export declare const DiscretePathEffect: ({ seed, ...props }: SkiaDefaultProps<DiscretePathEffectProps, "seed">) => JSX.Element;
4
+ export declare const DiscretePathEffect: ({ seed, ...props }: SkiaDefaultProps<DiscretePathEffectProps, "seed">) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../../processors/Animations/Animations";
3
3
  import type { Line2DPathEffectProps } from "../../../dom/types";
4
- export declare const Line2DPathEffect: (props: SkiaProps<Line2DPathEffectProps>) => JSX.Element;
4
+ export declare const Line2DPathEffect: (props: SkiaProps<Line2DPathEffectProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../../processors/Animations/Animations";
3
3
  import type { Path1DPathEffectProps } from "../../../dom/types";
4
- export declare const Path1DPathEffect: (props: SkiaProps<Path1DPathEffectProps>) => JSX.Element;
4
+ export declare const Path1DPathEffect: (props: SkiaProps<Path1DPathEffectProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../../processors/Animations/Animations";
3
3
  import type { Path2DPathEffectProps } from "../../../dom/types";
4
- export declare const Path2DPathEffect: (props: SkiaProps<Path2DPathEffectProps>) => JSX.Element;
4
+ export declare const Path2DPathEffect: (props: SkiaProps<Path2DPathEffectProps>) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { ChildrenProps } from "../../../dom/types";
3
- export declare const SumPathEffect: (props: ChildrenProps) => JSX.Element;
3
+ export declare const SumPathEffect: (props: ChildrenProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../../processors";
3
3
  import type { ColorProps } from "../../../dom/types";
4
- export declare const ColorShader: (props: SkiaProps<ColorProps>) => JSX.Element;
4
+ export declare const ColorShader: (props: SkiaProps<ColorProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { FractalNoiseProps } from "../../../dom/types";
3
3
  import type { SkiaDefaultProps } from "../../processors/Animations/Animations";
4
- export declare const FractalNoise: ({ seed, tileWidth, tileHeight, ...props }: SkiaDefaultProps<FractalNoiseProps, "seed" | "tileHeight" | "tileWidth">) => JSX.Element;
4
+ export declare const FractalNoise: ({ seed, tileWidth, tileHeight, ...props }: SkiaDefaultProps<FractalNoiseProps, "seed" | "tileHeight" | "tileWidth">) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../../processors";
3
3
  import type { LinearGradientProps } from "../../../dom/types";
4
- export declare const LinearGradient: (props: SkiaProps<LinearGradientProps>) => JSX.Element;
4
+ export declare const LinearGradient: (props: SkiaProps<LinearGradientProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaProps } from "../../processors";
3
3
  import type { RadialGradientProps } from "../../../dom/types";
4
- export declare const RadialGradient: (props: SkiaProps<RadialGradientProps>) => JSX.Element;
4
+ export declare const RadialGradient: (props: SkiaProps<RadialGradientProps>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SkiaDefaultProps } from "../../processors";
3
3
  import type { ShaderProps } from "../../../dom/types";
4
- export declare const Shader: ({ uniforms, ...props }: SkiaDefaultProps<ShaderProps, "uniforms">) => JSX.Element;
4
+ export declare const Shader: ({ uniforms, ...props }: SkiaDefaultProps<ShaderProps, "uniforms">) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import type { SweepGradientProps } from "../../../dom/types";
3
3
  import type { SkiaProps } from "../../processors";
4
- export declare const SweepGradient: (props: SkiaProps<SweepGradientProps>) => JSX.Element;
4
+ export declare const SweepGradient: (props: SkiaProps<SweepGradientProps>) => React.JSX.Element;