@shopify/react-native-skia 0.1.236 → 0.1.238

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1153) hide show
  1. package/cpp/api/JsiSkApi.h +2 -0
  2. package/cpp/api/JsiSkCanvas.h +36 -0
  3. package/cpp/api/JsiSkRSXform.h +35 -7
  4. package/cpp/rnskia/dom/JsiDomApi.h +2 -0
  5. package/cpp/rnskia/dom/base/JsiDomNode.h +16 -0
  6. package/cpp/rnskia/dom/nodes/JsiAtlasNode.h +60 -0
  7. package/cpp/rnskia/dom/props/RSXformProp.h +52 -0
  8. package/cpp/rnskia/dom/props/RectProp.h +31 -0
  9. package/lib/commonjs/Platform/Platform.js +1 -5
  10. package/lib/commonjs/Platform/Platform.js.map +1 -1
  11. package/lib/commonjs/Platform/Platform.web.js +11 -33
  12. package/lib/commonjs/Platform/Platform.web.js.map +1 -1
  13. package/lib/commonjs/Platform/index.js +0 -2
  14. package/lib/commonjs/Platform/index.js.map +1 -1
  15. package/lib/commonjs/animation/functions/index.js +0 -8
  16. package/lib/commonjs/animation/functions/index.js.map +1 -1
  17. package/lib/commonjs/animation/functions/interpolate.js +12 -31
  18. package/lib/commonjs/animation/functions/interpolate.js.map +1 -1
  19. package/lib/commonjs/animation/functions/interpolateColors.js +2 -13
  20. package/lib/commonjs/animation/functions/interpolateColors.js.map +1 -1
  21. package/lib/commonjs/animation/functions/interpolatePaths.js +1 -16
  22. package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -1
  23. package/lib/commonjs/animation/functions/interpolateVector.js +0 -5
  24. package/lib/commonjs/animation/functions/interpolateVector.js.map +1 -1
  25. package/lib/commonjs/animation/index.js +0 -2
  26. package/lib/commonjs/animation/index.js.map +1 -1
  27. package/lib/commonjs/dom/nodes/DrawingNode.js +7 -22
  28. package/lib/commonjs/dom/nodes/DrawingNode.js.map +1 -1
  29. package/lib/commonjs/dom/nodes/GroupNode.js +0 -6
  30. package/lib/commonjs/dom/nodes/GroupNode.js.map +1 -1
  31. package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +2 -1
  32. package/lib/commonjs/dom/nodes/JsiSkDOM.js +28 -86
  33. package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
  34. package/lib/commonjs/dom/nodes/LayerNode.js +0 -11
  35. package/lib/commonjs/dom/nodes/LayerNode.js.map +1 -1
  36. package/lib/commonjs/dom/nodes/Node.js +4 -36
  37. package/lib/commonjs/dom/nodes/Node.js.map +1 -1
  38. package/lib/commonjs/dom/nodes/PaintNode.js +1 -29
  39. package/lib/commonjs/dom/nodes/PaintNode.js.map +1 -1
  40. package/lib/commonjs/dom/nodes/RenderNode.js +3 -35
  41. package/lib/commonjs/dom/nodes/RenderNode.js.map +1 -1
  42. package/lib/commonjs/dom/nodes/datatypes/Circle.js +6 -8
  43. package/lib/commonjs/dom/nodes/datatypes/Circle.js.map +1 -1
  44. package/lib/commonjs/dom/nodes/datatypes/Enum.js +0 -2
  45. package/lib/commonjs/dom/nodes/datatypes/Enum.js.map +1 -1
  46. package/lib/commonjs/dom/nodes/datatypes/Fitting.js +15 -46
  47. package/lib/commonjs/dom/nodes/datatypes/Fitting.js.map +1 -1
  48. package/lib/commonjs/dom/nodes/datatypes/Gradient.js +9 -20
  49. package/lib/commonjs/dom/nodes/datatypes/Gradient.js.map +1 -1
  50. package/lib/commonjs/dom/nodes/datatypes/Path.js +2 -8
  51. package/lib/commonjs/dom/nodes/datatypes/Path.js.map +1 -1
  52. package/lib/commonjs/dom/nodes/datatypes/Radius.js +0 -3
  53. package/lib/commonjs/dom/nodes/datatypes/Radius.js.map +1 -1
  54. package/lib/commonjs/dom/nodes/datatypes/Rect.js +10 -15
  55. package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -1
  56. package/lib/commonjs/dom/nodes/datatypes/Transform.js +0 -6
  57. package/lib/commonjs/dom/nodes/datatypes/Transform.js.map +1 -1
  58. package/lib/commonjs/dom/nodes/datatypes/index.js +0 -16
  59. package/lib/commonjs/dom/nodes/datatypes/index.js.map +1 -1
  60. package/lib/commonjs/dom/nodes/drawings/AtlasNode.d.ts +8 -0
  61. package/lib/commonjs/dom/nodes/drawings/AtlasNode.js +36 -0
  62. package/lib/commonjs/dom/nodes/drawings/AtlasNode.js.map +1 -0
  63. package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.js +4 -18
  64. package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
  65. package/lib/commonjs/dom/nodes/drawings/Box.js +8 -34
  66. package/lib/commonjs/dom/nodes/drawings/Box.js.map +1 -1
  67. package/lib/commonjs/dom/nodes/drawings/CircleNode.js +4 -15
  68. package/lib/commonjs/dom/nodes/drawings/CircleNode.js.map +1 -1
  69. package/lib/commonjs/dom/nodes/drawings/DiffRectNode.js +4 -12
  70. package/lib/commonjs/dom/nodes/drawings/DiffRectNode.js.map +1 -1
  71. package/lib/commonjs/dom/nodes/drawings/FillNode.js +5 -14
  72. package/lib/commonjs/dom/nodes/drawings/FillNode.js.map +1 -1
  73. package/lib/commonjs/dom/nodes/drawings/ImageNode.js +6 -19
  74. package/lib/commonjs/dom/nodes/drawings/ImageNode.js.map +1 -1
  75. package/lib/commonjs/dom/nodes/drawings/ImageSVG.js +3 -18
  76. package/lib/commonjs/dom/nodes/drawings/ImageSVG.js.map +1 -1
  77. package/lib/commonjs/dom/nodes/drawings/LineNode.js +4 -12
  78. package/lib/commonjs/dom/nodes/drawings/LineNode.js.map +1 -1
  79. package/lib/commonjs/dom/nodes/drawings/OvalNode.js +4 -15
  80. package/lib/commonjs/dom/nodes/drawings/OvalNode.js.map +1 -1
  81. package/lib/commonjs/dom/nodes/drawings/ParagraphNode.js +3 -12
  82. package/lib/commonjs/dom/nodes/drawings/ParagraphNode.js.map +1 -1
  83. package/lib/commonjs/dom/nodes/drawings/PatchNode.js +6 -18
  84. package/lib/commonjs/dom/nodes/drawings/PatchNode.js.map +1 -1
  85. package/lib/commonjs/dom/nodes/drawings/PathNode.js +4 -21
  86. package/lib/commonjs/dom/nodes/drawings/PathNode.js.map +1 -1
  87. package/lib/commonjs/dom/nodes/drawings/PictureNode.js +3 -11
  88. package/lib/commonjs/dom/nodes/drawings/PictureNode.js.map +1 -1
  89. package/lib/commonjs/dom/nodes/drawings/PointsNode.js +4 -14
  90. package/lib/commonjs/dom/nodes/drawings/PointsNode.js.map +1 -1
  91. package/lib/commonjs/dom/nodes/drawings/RRectNode.js +7 -18
  92. package/lib/commonjs/dom/nodes/drawings/RRectNode.js.map +1 -1
  93. package/lib/commonjs/dom/nodes/drawings/RectNode.js +4 -15
  94. package/lib/commonjs/dom/nodes/drawings/RectNode.js.map +1 -1
  95. package/lib/commonjs/dom/nodes/drawings/Text.js +18 -62
  96. package/lib/commonjs/dom/nodes/drawings/Text.js.map +1 -1
  97. package/lib/commonjs/dom/nodes/drawings/VerticesNode.js +4 -16
  98. package/lib/commonjs/dom/nodes/drawings/VerticesNode.js.map +1 -1
  99. package/lib/commonjs/dom/nodes/drawings/index.d.ts +1 -0
  100. package/lib/commonjs/dom/nodes/drawings/index.js +11 -34
  101. package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -1
  102. package/lib/commonjs/dom/nodes/index.js +0 -6
  103. package/lib/commonjs/dom/nodes/index.js.map +1 -1
  104. package/lib/commonjs/dom/nodes/paint/BlendNode.js +4 -18
  105. package/lib/commonjs/dom/nodes/paint/BlendNode.js.map +1 -1
  106. package/lib/commonjs/dom/nodes/paint/ColorFilters.js +0 -34
  107. package/lib/commonjs/dom/nodes/paint/ColorFilters.js.map +1 -1
  108. package/lib/commonjs/dom/nodes/paint/ImageFilters.js +7 -60
  109. package/lib/commonjs/dom/nodes/paint/ImageFilters.js.map +1 -1
  110. package/lib/commonjs/dom/nodes/paint/MaskFilters.js +0 -8
  111. package/lib/commonjs/dom/nodes/paint/MaskFilters.js.map +1 -1
  112. package/lib/commonjs/dom/nodes/paint/PathEffects.js +0 -45
  113. package/lib/commonjs/dom/nodes/paint/PathEffects.js.map +1 -1
  114. package/lib/commonjs/dom/nodes/paint/Shaders.js +1 -48
  115. package/lib/commonjs/dom/nodes/paint/Shaders.js.map +1 -1
  116. package/lib/commonjs/dom/nodes/paint/index.js +0 -12
  117. package/lib/commonjs/dom/nodes/paint/index.js.map +1 -1
  118. package/lib/commonjs/dom/types/DeclarationContext.js +3 -30
  119. package/lib/commonjs/dom/types/DeclarationContext.js.map +1 -1
  120. package/lib/commonjs/dom/types/DrawingContext.js +3 -91
  121. package/lib/commonjs/dom/types/DrawingContext.js.map +1 -1
  122. package/lib/commonjs/dom/types/Drawings.d.ts +7 -1
  123. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  124. package/lib/commonjs/dom/types/NodeType.d.ts +1 -0
  125. package/lib/commonjs/dom/types/NodeType.js +7 -11
  126. package/lib/commonjs/dom/types/NodeType.js.map +1 -1
  127. package/lib/commonjs/dom/types/SkDOM.d.ts +2 -1
  128. package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
  129. package/lib/commonjs/dom/types/index.js +0 -26
  130. package/lib/commonjs/dom/types/index.js.map +1 -1
  131. package/lib/commonjs/external/index.js +0 -2
  132. package/lib/commonjs/external/index.js.map +1 -1
  133. package/lib/commonjs/external/reanimated/buffers.d.ts +5 -0
  134. package/lib/commonjs/external/reanimated/buffers.js +39 -0
  135. package/lib/commonjs/external/reanimated/buffers.js.map +1 -0
  136. package/lib/commonjs/external/reanimated/index.d.ts +1 -0
  137. package/lib/commonjs/external/reanimated/index.js +11 -10
  138. package/lib/commonjs/external/reanimated/index.js.map +1 -1
  139. package/lib/commonjs/external/reanimated/interpolators.d.ts +1 -1
  140. package/lib/commonjs/external/reanimated/interpolators.js +5 -20
  141. package/lib/commonjs/external/reanimated/interpolators.js.map +1 -1
  142. package/lib/commonjs/external/reanimated/moduleWrapper.js +12 -29
  143. package/lib/commonjs/external/reanimated/moduleWrapper.js.map +1 -1
  144. package/lib/commonjs/external/reanimated/renderHelpers.js +5 -31
  145. package/lib/commonjs/external/reanimated/renderHelpers.js.map +1 -1
  146. package/lib/commonjs/external/reanimated/textures.js +3 -25
  147. package/lib/commonjs/external/reanimated/textures.js.map +1 -1
  148. package/lib/commonjs/external/reanimated/useAnimatedImageValue.js +16 -14
  149. package/lib/commonjs/external/reanimated/useAnimatedImageValue.js.map +1 -1
  150. package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js +0 -4
  151. package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js.map +1 -1
  152. package/lib/commonjs/headless/index.js +1 -12
  153. package/lib/commonjs/headless/index.js.map +1 -1
  154. package/lib/commonjs/index.js +0 -20
  155. package/lib/commonjs/index.js.map +1 -1
  156. package/lib/commonjs/mock/index.js +5 -6
  157. package/lib/commonjs/mock/index.js.map +1 -1
  158. package/lib/commonjs/renderer/Canvas.js +21 -46
  159. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  160. package/lib/commonjs/renderer/Container.js +4 -15
  161. package/lib/commonjs/renderer/Container.js.map +1 -1
  162. package/lib/commonjs/renderer/HostComponents.d.ts +3 -1
  163. package/lib/commonjs/renderer/HostComponents.js +3 -64
  164. package/lib/commonjs/renderer/HostComponents.js.map +1 -1
  165. package/lib/commonjs/renderer/HostConfig.js +9 -38
  166. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  167. package/lib/commonjs/renderer/Offscreen.d.ts +4 -2
  168. package/lib/commonjs/renderer/Offscreen.js +19 -24
  169. package/lib/commonjs/renderer/Offscreen.js.map +1 -1
  170. package/lib/commonjs/renderer/Reconciler.js +4 -20
  171. package/lib/commonjs/renderer/Reconciler.js.map +1 -1
  172. package/lib/commonjs/renderer/components/Blend.js +0 -4
  173. package/lib/commonjs/renderer/components/Blend.js.map +1 -1
  174. package/lib/commonjs/renderer/components/Group.js +6 -15
  175. package/lib/commonjs/renderer/components/Group.js.map +1 -1
  176. package/lib/commonjs/renderer/components/Mask.js +6 -14
  177. package/lib/commonjs/renderer/components/Mask.js.map +1 -1
  178. package/lib/commonjs/renderer/components/Paint.js +0 -4
  179. package/lib/commonjs/renderer/components/Paint.js.map +1 -1
  180. package/lib/commonjs/renderer/components/Picture.js +0 -4
  181. package/lib/commonjs/renderer/components/Picture.js.map +1 -1
  182. package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js +5 -13
  183. package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js.map +1 -1
  184. package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js +5 -11
  185. package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -1
  186. package/lib/commonjs/renderer/components/backdrop/index.js +0 -4
  187. package/lib/commonjs/renderer/components/backdrop/index.js.map +1 -1
  188. package/lib/commonjs/renderer/components/colorFilters/BlendColor.js +0 -4
  189. package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -1
  190. package/lib/commonjs/renderer/components/colorFilters/Lerp.js +0 -4
  191. package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
  192. package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js +0 -4
  193. package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
  194. package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js +0 -4
  195. package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
  196. package/lib/commonjs/renderer/components/colorFilters/Matrix.js +0 -6
  197. package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -1
  198. package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js +0 -4
  199. package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
  200. package/lib/commonjs/renderer/components/colorFilters/index.js +0 -12
  201. package/lib/commonjs/renderer/components/colorFilters/index.js.map +1 -1
  202. package/lib/commonjs/renderer/components/image/Image.js +0 -4
  203. package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
  204. package/lib/commonjs/renderer/components/image/ImageSVG.js +0 -4
  205. package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -1
  206. package/lib/commonjs/renderer/components/image/ImageShader.js +9 -15
  207. package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
  208. package/lib/commonjs/renderer/components/image/index.js +0 -6
  209. package/lib/commonjs/renderer/components/image/index.js.map +1 -1
  210. package/lib/commonjs/renderer/components/imageFilters/Blur.js +4 -10
  211. package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
  212. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +0 -4
  213. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  214. package/lib/commonjs/renderer/components/imageFilters/Morphology.js +4 -10
  215. package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
  216. package/lib/commonjs/renderer/components/imageFilters/Offset.js +5 -11
  217. package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
  218. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js +0 -4
  219. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  220. package/lib/commonjs/renderer/components/imageFilters/Shadow.js +0 -4
  221. package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
  222. package/lib/commonjs/renderer/components/imageFilters/index.js +0 -12
  223. package/lib/commonjs/renderer/components/imageFilters/index.js.map +1 -1
  224. package/lib/commonjs/renderer/components/index.js +0 -32
  225. package/lib/commonjs/renderer/components/index.js.map +1 -1
  226. package/lib/commonjs/renderer/components/maskFilters/Blur.js +5 -11
  227. package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
  228. package/lib/commonjs/renderer/components/maskFilters/index.js +0 -2
  229. package/lib/commonjs/renderer/components/maskFilters/index.js.map +1 -1
  230. package/lib/commonjs/renderer/components/paragraph/Paragraph.js +0 -4
  231. package/lib/commonjs/renderer/components/paragraph/Paragraph.js.map +1 -1
  232. package/lib/commonjs/renderer/components/paragraph/index.js +0 -2
  233. package/lib/commonjs/renderer/components/paragraph/index.js.map +1 -1
  234. package/lib/commonjs/renderer/components/pathEffects/Corner.js +0 -4
  235. package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
  236. package/lib/commonjs/renderer/components/pathEffects/Dash.js +0 -4
  237. package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
  238. package/lib/commonjs/renderer/components/pathEffects/Discrete.js +4 -10
  239. package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
  240. package/lib/commonjs/renderer/components/pathEffects/Line2D.js +0 -4
  241. package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
  242. package/lib/commonjs/renderer/components/pathEffects/Path1D.js +0 -4
  243. package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
  244. package/lib/commonjs/renderer/components/pathEffects/Path2D.js +0 -4
  245. package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
  246. package/lib/commonjs/renderer/components/pathEffects/Sum.js +0 -4
  247. package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
  248. package/lib/commonjs/renderer/components/pathEffects/index.js +0 -14
  249. package/lib/commonjs/renderer/components/pathEffects/index.js.map +1 -1
  250. package/lib/commonjs/renderer/components/shaders/Color.js +0 -4
  251. package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -1
  252. package/lib/commonjs/renderer/components/shaders/FractalNoise.js +6 -12
  253. package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
  254. package/lib/commonjs/renderer/components/shaders/LinearGradient.js +0 -4
  255. package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -1
  256. package/lib/commonjs/renderer/components/shaders/RadialGradient.js +0 -4
  257. package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -1
  258. package/lib/commonjs/renderer/components/shaders/Shader.js +4 -10
  259. package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
  260. package/lib/commonjs/renderer/components/shaders/ShaderLib.js +1 -2
  261. package/lib/commonjs/renderer/components/shaders/ShaderLib.js.map +1 -1
  262. package/lib/commonjs/renderer/components/shaders/SweepGradient.js +0 -4
  263. package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -1
  264. package/lib/commonjs/renderer/components/shaders/Turbulence.js +6 -12
  265. package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
  266. package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js +0 -4
  267. package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
  268. package/lib/commonjs/renderer/components/shaders/index.js +0 -18
  269. package/lib/commonjs/renderer/components/shaders/index.js.map +1 -1
  270. package/lib/commonjs/renderer/components/shapes/Atlas.d.ts +4 -0
  271. package/lib/commonjs/renderer/components/shapes/Atlas.js +13 -0
  272. package/lib/commonjs/renderer/components/shapes/Atlas.js.map +1 -0
  273. package/lib/commonjs/renderer/components/shapes/Box.js +0 -6
  274. package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
  275. package/lib/commonjs/renderer/components/shapes/Circle.js +0 -4
  276. package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
  277. package/lib/commonjs/renderer/components/shapes/DiffRect.js +0 -4
  278. package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
  279. package/lib/commonjs/renderer/components/shapes/Fill.js +0 -4
  280. package/lib/commonjs/renderer/components/shapes/Fill.js.map +1 -1
  281. package/lib/commonjs/renderer/components/shapes/FitBox.js +8 -18
  282. package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
  283. package/lib/commonjs/renderer/components/shapes/Line.js +0 -4
  284. package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -1
  285. package/lib/commonjs/renderer/components/shapes/Oval.js +0 -4
  286. package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
  287. package/lib/commonjs/renderer/components/shapes/Patch.js +0 -4
  288. package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
  289. package/lib/commonjs/renderer/components/shapes/Path.js +5 -11
  290. package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
  291. package/lib/commonjs/renderer/components/shapes/Points.js +4 -10
  292. package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
  293. package/lib/commonjs/renderer/components/shapes/Rect.js +0 -4
  294. package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -1
  295. package/lib/commonjs/renderer/components/shapes/RoundedRect.js +0 -4
  296. package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
  297. package/lib/commonjs/renderer/components/shapes/Vertices.js +4 -10
  298. package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
  299. package/lib/commonjs/renderer/components/shapes/index.d.ts +1 -0
  300. package/lib/commonjs/renderer/components/shapes/index.js +11 -26
  301. package/lib/commonjs/renderer/components/shapes/index.js.map +1 -1
  302. package/lib/commonjs/renderer/components/text/Glyphs.js +5 -11
  303. package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
  304. package/lib/commonjs/renderer/components/text/Text.js +5 -11
  305. package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
  306. package/lib/commonjs/renderer/components/text/TextBlob.js +5 -11
  307. package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
  308. package/lib/commonjs/renderer/components/text/TextPath.js +4 -10
  309. package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
  310. package/lib/commonjs/renderer/components/text/index.js +0 -8
  311. package/lib/commonjs/renderer/components/text/index.js.map +1 -1
  312. package/lib/commonjs/renderer/index.js +0 -2
  313. package/lib/commonjs/renderer/index.js.map +1 -1
  314. package/lib/commonjs/renderer/processors/Animations/index.js +0 -2
  315. package/lib/commonjs/renderer/processors/Animations/index.js.map +1 -1
  316. package/lib/commonjs/renderer/processors/index.js +0 -4
  317. package/lib/commonjs/renderer/processors/index.js.map +1 -1
  318. package/lib/commonjs/renderer/processors/math/Coordinates.js +0 -12
  319. package/lib/commonjs/renderer/processors/math/Coordinates.js.map +1 -1
  320. package/lib/commonjs/renderer/processors/math/Math.js +1 -7
  321. package/lib/commonjs/renderer/processors/math/Math.js.map +1 -1
  322. package/lib/commonjs/renderer/processors/math/Transforms.js +0 -3
  323. package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -1
  324. package/lib/commonjs/renderer/processors/math/index.js +0 -6
  325. package/lib/commonjs/renderer/processors/math/index.js.map +1 -1
  326. package/lib/commonjs/renderer/typeddash.js +2 -11
  327. package/lib/commonjs/renderer/typeddash.js.map +1 -1
  328. package/lib/commonjs/skia/NativeSetup.js +0 -6
  329. package/lib/commonjs/skia/NativeSetup.js.map +1 -1
  330. package/lib/commonjs/skia/Skia.js +2 -3
  331. package/lib/commonjs/skia/Skia.js.map +1 -1
  332. package/lib/commonjs/skia/Skia.web.js +1 -4
  333. package/lib/commonjs/skia/Skia.web.js.map +1 -1
  334. package/lib/commonjs/skia/core/AnimatedImage.d.ts +1 -1
  335. package/lib/commonjs/skia/core/AnimatedImage.js +2 -7
  336. package/lib/commonjs/skia/core/AnimatedImage.js.map +1 -1
  337. package/lib/commonjs/skia/core/Data.d.ts +1 -1
  338. package/lib/commonjs/skia/core/Data.js +12 -25
  339. package/lib/commonjs/skia/core/Data.js.map +1 -1
  340. package/lib/commonjs/skia/core/Font.js +10 -36
  341. package/lib/commonjs/skia/core/Font.js.map +1 -1
  342. package/lib/commonjs/skia/core/Image.js +3 -16
  343. package/lib/commonjs/skia/core/Image.js.map +1 -1
  344. package/lib/commonjs/skia/core/Matrix.js +0 -4
  345. package/lib/commonjs/skia/core/Matrix.js.map +1 -1
  346. package/lib/commonjs/skia/core/Picture.js +0 -7
  347. package/lib/commonjs/skia/core/Picture.js.map +1 -1
  348. package/lib/commonjs/skia/core/RRect.js +0 -3
  349. package/lib/commonjs/skia/core/RRect.js.map +1 -1
  350. package/lib/commonjs/skia/core/Rect.d.ts +2 -2
  351. package/lib/commonjs/skia/core/Rect.js +0 -17
  352. package/lib/commonjs/skia/core/Rect.js.map +1 -1
  353. package/lib/commonjs/skia/core/SVG.js +0 -5
  354. package/lib/commonjs/skia/core/SVG.js.map +1 -1
  355. package/lib/commonjs/skia/core/Typeface.js +1 -6
  356. package/lib/commonjs/skia/core/Typeface.js.map +1 -1
  357. package/lib/commonjs/skia/core/Vector.js +3 -17
  358. package/lib/commonjs/skia/core/Vector.js.map +1 -1
  359. package/lib/commonjs/skia/core/index.js +0 -22
  360. package/lib/commonjs/skia/core/index.js.map +1 -1
  361. package/lib/commonjs/skia/index.js +0 -5
  362. package/lib/commonjs/skia/index.js.map +1 -1
  363. package/lib/commonjs/skia/types/AnimatedImage/index.js +0 -4
  364. package/lib/commonjs/skia/types/AnimatedImage/index.js.map +1 -1
  365. package/lib/commonjs/skia/types/Canvas.d.ts +16 -1
  366. package/lib/commonjs/skia/types/Canvas.js +6 -11
  367. package/lib/commonjs/skia/types/Canvas.js.map +1 -1
  368. package/lib/commonjs/skia/types/ColorFilter/ColorFilter.js +0 -2
  369. package/lib/commonjs/skia/types/ColorFilter/ColorFilter.js.map +1 -1
  370. package/lib/commonjs/skia/types/ColorFilter/index.js +0 -4
  371. package/lib/commonjs/skia/types/ColorFilter/index.js.map +1 -1
  372. package/lib/commonjs/skia/types/Data/Data.js +0 -2
  373. package/lib/commonjs/skia/types/Data/Data.js.map +1 -1
  374. package/lib/commonjs/skia/types/Data/index.js +0 -4
  375. package/lib/commonjs/skia/types/Data/index.js.map +1 -1
  376. package/lib/commonjs/skia/types/Font/Font.js +16 -34
  377. package/lib/commonjs/skia/types/Font/Font.js.map +1 -1
  378. package/lib/commonjs/skia/types/Font/index.js +0 -6
  379. package/lib/commonjs/skia/types/Font/index.js.map +1 -1
  380. package/lib/commonjs/skia/types/Image/Image.d.ts +8 -0
  381. package/lib/commonjs/skia/types/Image/Image.js +9 -17
  382. package/lib/commonjs/skia/types/Image/Image.js.map +1 -1
  383. package/lib/commonjs/skia/types/Image/ImageFactory.js +6 -11
  384. package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -1
  385. package/lib/commonjs/skia/types/Image/index.js +0 -4
  386. package/lib/commonjs/skia/types/Image/index.js.map +1 -1
  387. package/lib/commonjs/skia/types/ImageFilter/ImageFilter.js +3 -7
  388. package/lib/commonjs/skia/types/ImageFilter/ImageFilter.js.map +1 -1
  389. package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js +3 -5
  390. package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
  391. package/lib/commonjs/skia/types/ImageFilter/index.js +0 -4
  392. package/lib/commonjs/skia/types/ImageFilter/index.js.map +1 -1
  393. package/lib/commonjs/skia/types/MaskFilter.js +4 -8
  394. package/lib/commonjs/skia/types/MaskFilter.js.map +1 -1
  395. package/lib/commonjs/skia/types/Matrix.js +0 -7
  396. package/lib/commonjs/skia/types/Matrix.js.map +1 -1
  397. package/lib/commonjs/skia/types/Matrix4.js +22 -90
  398. package/lib/commonjs/skia/types/Matrix4.js.map +1 -1
  399. package/lib/commonjs/skia/types/Paint/BlendMode.js +3 -6
  400. package/lib/commonjs/skia/types/Paint/BlendMode.js.map +1 -1
  401. package/lib/commonjs/skia/types/Paint/Paint.js +9 -19
  402. package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -1
  403. package/lib/commonjs/skia/types/Paint/index.js +0 -4
  404. package/lib/commonjs/skia/types/Paint/index.js.map +1 -1
  405. package/lib/commonjs/skia/types/Paragraph/ParagraphBuilder.js +3 -5
  406. package/lib/commonjs/skia/types/Paragraph/ParagraphBuilder.js.map +1 -1
  407. package/lib/commonjs/skia/types/Paragraph/ParagraphStyle.js +9 -17
  408. package/lib/commonjs/skia/types/Paragraph/ParagraphStyle.js.map +1 -1
  409. package/lib/commonjs/skia/types/Paragraph/TextStyle.js +9 -17
  410. package/lib/commonjs/skia/types/Paragraph/TextStyle.js.map +1 -1
  411. package/lib/commonjs/skia/types/Paragraph/index.js +0 -12
  412. package/lib/commonjs/skia/types/Paragraph/index.js.map +1 -1
  413. package/lib/commonjs/skia/types/Path/Path.js +9 -20
  414. package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
  415. package/lib/commonjs/skia/types/Path/index.js +0 -4
  416. package/lib/commonjs/skia/types/Path/index.js.map +1 -1
  417. package/lib/commonjs/skia/types/PathEffect.js +3 -7
  418. package/lib/commonjs/skia/types/PathEffect.js.map +1 -1
  419. package/lib/commonjs/skia/types/Picture/index.js +0 -6
  420. package/lib/commonjs/skia/types/Picture/index.js.map +1 -1
  421. package/lib/commonjs/skia/types/Point.js +3 -5
  422. package/lib/commonjs/skia/types/Point.js.map +1 -1
  423. package/lib/commonjs/skia/types/RRect.js +2 -3
  424. package/lib/commonjs/skia/types/RRect.js.map +1 -1
  425. package/lib/commonjs/skia/types/RSXform.d.ts +7 -1
  426. package/lib/commonjs/skia/types/RSXform.js.map +1 -1
  427. package/lib/commonjs/skia/types/Rect.d.ts +4 -0
  428. package/lib/commonjs/skia/types/Rect.js +0 -3
  429. package/lib/commonjs/skia/types/Rect.js.map +1 -1
  430. package/lib/commonjs/skia/types/RuntimeEffect/index.js +0 -4
  431. package/lib/commonjs/skia/types/RuntimeEffect/index.js.map +1 -1
  432. package/lib/commonjs/skia/types/SVG/index.js +0 -4
  433. package/lib/commonjs/skia/types/SVG/index.js.map +1 -1
  434. package/lib/commonjs/skia/types/Shader/Shader.js +4 -12
  435. package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
  436. package/lib/commonjs/skia/types/Shader/index.js +0 -4
  437. package/lib/commonjs/skia/types/Shader/index.js.map +1 -1
  438. package/lib/commonjs/skia/types/Skia.d.ts +3 -2
  439. package/lib/commonjs/skia/types/Skia.js.map +1 -1
  440. package/lib/commonjs/skia/types/Surface/index.js +0 -4
  441. package/lib/commonjs/skia/types/Surface/index.js.map +1 -1
  442. package/lib/commonjs/skia/types/Typeface/index.js +0 -4
  443. package/lib/commonjs/skia/types/Typeface/index.js.map +1 -1
  444. package/lib/commonjs/skia/types/Vertices/Vertices.js +3 -5
  445. package/lib/commonjs/skia/types/Vertices/Vertices.js.map +1 -1
  446. package/lib/commonjs/skia/types/Vertices/index.js +0 -2
  447. package/lib/commonjs/skia/types/Vertices/index.js.map +1 -1
  448. package/lib/commonjs/skia/types/index.js +0 -62
  449. package/lib/commonjs/skia/types/index.js.map +1 -1
  450. package/lib/commonjs/skia/web/Host.js +7 -29
  451. package/lib/commonjs/skia/web/Host.js.map +1 -1
  452. package/lib/commonjs/skia/web/JsiSkAnimatedImage.js +3 -13
  453. package/lib/commonjs/skia/web/JsiSkAnimatedImage.js.map +1 -1
  454. package/lib/commonjs/skia/web/JsiSkAnimatedImageFactory.js +0 -9
  455. package/lib/commonjs/skia/web/JsiSkAnimatedImageFactory.js.map +1 -1
  456. package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +2 -1
  457. package/lib/commonjs/skia/web/JsiSkCanvas.js +25 -72
  458. package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
  459. package/lib/commonjs/skia/web/JsiSkColor.js +10 -54
  460. package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -1
  461. package/lib/commonjs/skia/web/JsiSkColorFilter.js +3 -7
  462. package/lib/commonjs/skia/web/JsiSkColorFilter.js.map +1 -1
  463. package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js +0 -12
  464. package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -1
  465. package/lib/commonjs/skia/web/JsiSkContourMeasure.js +3 -13
  466. package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -1
  467. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js +3 -11
  468. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -1
  469. package/lib/commonjs/skia/web/JsiSkData.js +5 -8
  470. package/lib/commonjs/skia/web/JsiSkData.js.map +1 -1
  471. package/lib/commonjs/skia/web/JsiSkDataFactory.js +0 -10
  472. package/lib/commonjs/skia/web/JsiSkDataFactory.js.map +1 -1
  473. package/lib/commonjs/skia/web/JsiSkFont.js +5 -33
  474. package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -1
  475. package/lib/commonjs/skia/web/JsiSkFontMgr.js +0 -8
  476. package/lib/commonjs/skia/web/JsiSkFontMgr.js.map +1 -1
  477. package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js +0 -8
  478. package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js.map +1 -1
  479. package/lib/commonjs/skia/web/JsiSkImage.js +11 -33
  480. package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -1
  481. package/lib/commonjs/skia/web/JsiSkImageFactory.js +2 -15
  482. package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -1
  483. package/lib/commonjs/skia/web/JsiSkImageFilter.js +3 -7
  484. package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -1
  485. package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js +0 -28
  486. package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js.map +1 -1
  487. package/lib/commonjs/skia/web/JsiSkMaskFilter.js +3 -7
  488. package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -1
  489. package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js +0 -6
  490. package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -1
  491. package/lib/commonjs/skia/web/JsiSkMatrix.js +9 -26
  492. package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
  493. package/lib/commonjs/skia/web/JsiSkPaint.js +3 -35
  494. package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
  495. package/lib/commonjs/skia/web/JsiSkParagraph.js +21 -47
  496. package/lib/commonjs/skia/web/JsiSkParagraph.js.map +1 -1
  497. package/lib/commonjs/skia/web/JsiSkParagraphBuilder.js +4 -26
  498. package/lib/commonjs/skia/web/JsiSkParagraphBuilder.js.map +1 -1
  499. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js +1 -11
  500. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  501. package/lib/commonjs/skia/web/JsiSkParagraphStyle.js +19 -24
  502. package/lib/commonjs/skia/web/JsiSkParagraphStyle.js.map +1 -1
  503. package/lib/commonjs/skia/web/JsiSkPath.js +4 -77
  504. package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
  505. package/lib/commonjs/skia/web/JsiSkPathEffect.js +3 -7
  506. package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -1
  507. package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js +0 -23
  508. package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -1
  509. package/lib/commonjs/skia/web/JsiSkPathFactory.js +0 -16
  510. package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -1
  511. package/lib/commonjs/skia/web/JsiSkPicture.js +3 -13
  512. package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -1
  513. package/lib/commonjs/skia/web/JsiSkPictureFactory.js +0 -8
  514. package/lib/commonjs/skia/web/JsiSkPictureFactory.js.map +1 -1
  515. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +4 -13
  516. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -1
  517. package/lib/commonjs/skia/web/JsiSkPoint.js +5 -12
  518. package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -1
  519. package/lib/commonjs/skia/web/JsiSkRRect.js +5 -17
  520. package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -1
  521. package/lib/commonjs/skia/web/JsiSkRSXform.d.ts +8 -2
  522. package/lib/commonjs/skia/web/JsiSkRSXform.js +30 -9
  523. package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -1
  524. package/lib/commonjs/skia/web/JsiSkRect.d.ts +3 -2
  525. package/lib/commonjs/skia/web/JsiSkRect.js +11 -14
  526. package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -1
  527. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +3 -16
  528. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  529. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +0 -8
  530. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
  531. package/lib/commonjs/skia/web/JsiSkSVGFactory.js +0 -6
  532. package/lib/commonjs/skia/web/JsiSkSVGFactory.js.map +1 -1
  533. package/lib/commonjs/skia/web/JsiSkShader.js +3 -7
  534. package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -1
  535. package/lib/commonjs/skia/web/JsiSkShaderFactory.js +0 -15
  536. package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -1
  537. package/lib/commonjs/skia/web/JsiSkSurface.js +3 -13
  538. package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -1
  539. package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js +0 -14
  540. package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js.map +1 -1
  541. package/lib/commonjs/skia/web/JsiSkTextBlob.js +3 -7
  542. package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -1
  543. package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js +2 -12
  544. package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -1
  545. package/lib/commonjs/skia/web/JsiSkTextStyle.js +0 -3
  546. package/lib/commonjs/skia/web/JsiSkTextStyle.js.map +1 -1
  547. package/lib/commonjs/skia/web/JsiSkTypeface.js +3 -10
  548. package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -1
  549. package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js +0 -8
  550. package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js.map +1 -1
  551. package/lib/commonjs/skia/web/JsiSkTypefaceFontProvider.js +16 -26
  552. package/lib/commonjs/skia/web/JsiSkTypefaceFontProvider.js.map +1 -1
  553. package/lib/commonjs/skia/web/JsiSkTypefaceFontProviderFactory.js +0 -6
  554. package/lib/commonjs/skia/web/JsiSkTypefaceFontProviderFactory.js.map +1 -1
  555. package/lib/commonjs/skia/web/JsiSkVertices.js +3 -10
  556. package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -1
  557. package/lib/commonjs/skia/web/JsiSkVerticesFactory.js +8 -27
  558. package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -1
  559. package/lib/commonjs/skia/web/JsiSkia.js +5 -33
  560. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
  561. package/lib/commonjs/skia/web/index.js +0 -2
  562. package/lib/commonjs/skia/web/index.js.map +1 -1
  563. package/lib/commonjs/specs/NativeSkiaModule.js +1 -5
  564. package/lib/commonjs/specs/NativeSkiaModule.js.map +1 -1
  565. package/lib/commonjs/specs/NativeSkiaModule.web.js +1 -4
  566. package/lib/commonjs/specs/NativeSkiaModule.web.js.map +1 -1
  567. package/lib/commonjs/specs/SkiaDomViewNativeComponent.js +1 -6
  568. package/lib/commonjs/specs/SkiaDomViewNativeComponent.js.map +1 -1
  569. package/lib/commonjs/specs/SkiaPictureViewNativeComponent.js +1 -6
  570. package/lib/commonjs/specs/SkiaPictureViewNativeComponent.js.map +1 -1
  571. package/lib/commonjs/views/SkiaBaseWebView.js +18 -66
  572. package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
  573. package/lib/commonjs/views/SkiaDomView.js +8 -40
  574. package/lib/commonjs/views/SkiaDomView.js.map +1 -1
  575. package/lib/commonjs/views/SkiaDomView.web.js +0 -9
  576. package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
  577. package/lib/commonjs/views/SkiaJSDomView.js +10 -43
  578. package/lib/commonjs/views/SkiaJSDomView.js.map +1 -1
  579. package/lib/commonjs/views/SkiaJSDomView.web.js +0 -1
  580. package/lib/commonjs/views/SkiaJSDomView.web.js.map +1 -1
  581. package/lib/commonjs/views/SkiaPictureView.js +6 -32
  582. package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
  583. package/lib/commonjs/views/SkiaPictureView.web.js +0 -5
  584. package/lib/commonjs/views/SkiaPictureView.web.js.map +1 -1
  585. package/lib/commonjs/views/SkiaViewNativeId.js +1 -2
  586. package/lib/commonjs/views/SkiaViewNativeId.js.map +1 -1
  587. package/lib/commonjs/views/api.js.map +1 -1
  588. package/lib/commonjs/views/index.js +0 -8
  589. package/lib/commonjs/views/index.js.map +1 -1
  590. package/lib/commonjs/views/types.js +3 -5
  591. package/lib/commonjs/views/types.js.map +1 -1
  592. package/lib/commonjs/views/useTouchHandler.js +19 -33
  593. package/lib/commonjs/views/useTouchHandler.js.map +1 -1
  594. package/lib/commonjs/web/LoadSkiaWeb.js +8 -12
  595. package/lib/commonjs/web/LoadSkiaWeb.js.map +1 -1
  596. package/lib/commonjs/web/WithSkiaWeb.js +10 -18
  597. package/lib/commonjs/web/WithSkiaWeb.js.map +1 -1
  598. package/lib/commonjs/web/index.js +0 -4
  599. package/lib/commonjs/web/index.js.map +1 -1
  600. package/lib/module/Platform/Platform.js.map +1 -1
  601. package/lib/module/Platform/Platform.web.js +7 -23
  602. package/lib/module/Platform/Platform.web.js.map +1 -1
  603. package/lib/module/Platform/index.js.map +1 -1
  604. package/lib/module/animation/functions/index.js.map +1 -1
  605. package/lib/module/animation/functions/interpolate.js +12 -29
  606. package/lib/module/animation/functions/interpolate.js.map +1 -1
  607. package/lib/module/animation/functions/interpolateColors.js +2 -5
  608. package/lib/module/animation/functions/interpolateColors.js.map +1 -1
  609. package/lib/module/animation/functions/interpolatePaths.js +1 -13
  610. package/lib/module/animation/functions/interpolatePaths.js.map +1 -1
  611. package/lib/module/animation/functions/interpolateVector.js.map +1 -1
  612. package/lib/module/animation/index.js.map +1 -1
  613. package/lib/module/dom/nodes/DrawingNode.js +7 -17
  614. package/lib/module/dom/nodes/DrawingNode.js.map +1 -1
  615. package/lib/module/dom/nodes/GroupNode.js +0 -2
  616. package/lib/module/dom/nodes/GroupNode.js.map +1 -1
  617. package/lib/module/dom/nodes/JsiSkDOM.d.ts +2 -1
  618. package/lib/module/dom/nodes/JsiSkDOM.js +18 -65
  619. package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
  620. package/lib/module/dom/nodes/LayerNode.js +0 -6
  621. package/lib/module/dom/nodes/LayerNode.js.map +1 -1
  622. package/lib/module/dom/nodes/Node.js +4 -32
  623. package/lib/module/dom/nodes/Node.js.map +1 -1
  624. package/lib/module/dom/nodes/PaintNode.js +1 -23
  625. package/lib/module/dom/nodes/PaintNode.js.map +1 -1
  626. package/lib/module/dom/nodes/RenderNode.js +3 -29
  627. package/lib/module/dom/nodes/RenderNode.js.map +1 -1
  628. package/lib/module/dom/nodes/datatypes/Circle.js +4 -4
  629. package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
  630. package/lib/module/dom/nodes/datatypes/Enum.js.map +1 -1
  631. package/lib/module/dom/nodes/datatypes/Fitting.js +15 -39
  632. package/lib/module/dom/nodes/datatypes/Fitting.js.map +1 -1
  633. package/lib/module/dom/nodes/datatypes/Gradient.js +7 -9
  634. package/lib/module/dom/nodes/datatypes/Gradient.js.map +1 -1
  635. package/lib/module/dom/nodes/datatypes/Path.js +2 -3
  636. package/lib/module/dom/nodes/datatypes/Path.js.map +1 -1
  637. package/lib/module/dom/nodes/datatypes/Radius.js +0 -1
  638. package/lib/module/dom/nodes/datatypes/Radius.js.map +1 -1
  639. package/lib/module/dom/nodes/datatypes/Rect.js +5 -7
  640. package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
  641. package/lib/module/dom/nodes/datatypes/Transform.js +0 -3
  642. package/lib/module/dom/nodes/datatypes/Transform.js.map +1 -1
  643. package/lib/module/dom/nodes/datatypes/index.js.map +1 -1
  644. package/lib/module/dom/nodes/drawings/AtlasNode.d.ts +8 -0
  645. package/lib/module/dom/nodes/drawings/AtlasNode.js +29 -0
  646. package/lib/module/dom/nodes/drawings/AtlasNode.js.map +1 -0
  647. package/lib/module/dom/nodes/drawings/BackdropFilterNode.js +4 -13
  648. package/lib/module/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
  649. package/lib/module/dom/nodes/drawings/Box.js +8 -27
  650. package/lib/module/dom/nodes/drawings/Box.js.map +1 -1
  651. package/lib/module/dom/nodes/drawings/CircleNode.js +4 -10
  652. package/lib/module/dom/nodes/drawings/CircleNode.js.map +1 -1
  653. package/lib/module/dom/nodes/drawings/DiffRectNode.js +4 -8
  654. package/lib/module/dom/nodes/drawings/DiffRectNode.js.map +1 -1
  655. package/lib/module/dom/nodes/drawings/FillNode.js +5 -10
  656. package/lib/module/dom/nodes/drawings/FillNode.js.map +1 -1
  657. package/lib/module/dom/nodes/drawings/ImageNode.js +4 -14
  658. package/lib/module/dom/nodes/drawings/ImageNode.js.map +1 -1
  659. package/lib/module/dom/nodes/drawings/ImageSVG.js +3 -14
  660. package/lib/module/dom/nodes/drawings/ImageSVG.js.map +1 -1
  661. package/lib/module/dom/nodes/drawings/LineNode.js +4 -8
  662. package/lib/module/dom/nodes/drawings/LineNode.js.map +1 -1
  663. package/lib/module/dom/nodes/drawings/OvalNode.js +4 -10
  664. package/lib/module/dom/nodes/drawings/OvalNode.js.map +1 -1
  665. package/lib/module/dom/nodes/drawings/ParagraphNode.js +3 -8
  666. package/lib/module/dom/nodes/drawings/ParagraphNode.js.map +1 -1
  667. package/lib/module/dom/nodes/drawings/PatchNode.js +6 -12
  668. package/lib/module/dom/nodes/drawings/PatchNode.js.map +1 -1
  669. package/lib/module/dom/nodes/drawings/PathNode.js +4 -14
  670. package/lib/module/dom/nodes/drawings/PathNode.js.map +1 -1
  671. package/lib/module/dom/nodes/drawings/PictureNode.js +3 -7
  672. package/lib/module/dom/nodes/drawings/PictureNode.js.map +1 -1
  673. package/lib/module/dom/nodes/drawings/PointsNode.js +4 -8
  674. package/lib/module/dom/nodes/drawings/PointsNode.js.map +1 -1
  675. package/lib/module/dom/nodes/drawings/RRectNode.js +7 -13
  676. package/lib/module/dom/nodes/drawings/RRectNode.js.map +1 -1
  677. package/lib/module/dom/nodes/drawings/RectNode.js +4 -10
  678. package/lib/module/dom/nodes/drawings/RectNode.js.map +1 -1
  679. package/lib/module/dom/nodes/drawings/Text.js +18 -51
  680. package/lib/module/dom/nodes/drawings/Text.js.map +1 -1
  681. package/lib/module/dom/nodes/drawings/VerticesNode.js +4 -10
  682. package/lib/module/dom/nodes/drawings/VerticesNode.js.map +1 -1
  683. package/lib/module/dom/nodes/drawings/index.d.ts +1 -0
  684. package/lib/module/dom/nodes/drawings/index.js +1 -0
  685. package/lib/module/dom/nodes/drawings/index.js.map +1 -1
  686. package/lib/module/dom/nodes/index.js.map +1 -1
  687. package/lib/module/dom/nodes/paint/BlendNode.js +4 -9
  688. package/lib/module/dom/nodes/paint/BlendNode.js.map +1 -1
  689. package/lib/module/dom/nodes/paint/ColorFilters.js +0 -16
  690. package/lib/module/dom/nodes/paint/ColorFilters.js.map +1 -1
  691. package/lib/module/dom/nodes/paint/ImageFilters.js +3 -40
  692. package/lib/module/dom/nodes/paint/ImageFilters.js.map +1 -1
  693. package/lib/module/dom/nodes/paint/MaskFilters.js +0 -2
  694. package/lib/module/dom/nodes/paint/MaskFilters.js.map +1 -1
  695. package/lib/module/dom/nodes/paint/PathEffects.js +0 -26
  696. package/lib/module/dom/nodes/paint/PathEffects.js.map +1 -1
  697. package/lib/module/dom/nodes/paint/Shaders.js +0 -23
  698. package/lib/module/dom/nodes/paint/Shaders.js.map +1 -1
  699. package/lib/module/dom/nodes/paint/index.js.map +1 -1
  700. package/lib/module/dom/types/DeclarationContext.js +3 -27
  701. package/lib/module/dom/types/DeclarationContext.js.map +1 -1
  702. package/lib/module/dom/types/DrawingContext.js +3 -85
  703. package/lib/module/dom/types/DrawingContext.js.map +1 -1
  704. package/lib/module/dom/types/Drawings.d.ts +7 -1
  705. package/lib/module/dom/types/Drawings.js.map +1 -1
  706. package/lib/module/dom/types/NodeType.d.ts +1 -0
  707. package/lib/module/dom/types/NodeType.js +7 -9
  708. package/lib/module/dom/types/NodeType.js.map +1 -1
  709. package/lib/module/dom/types/SkDOM.d.ts +2 -1
  710. package/lib/module/dom/types/SkDOM.js.map +1 -1
  711. package/lib/module/dom/types/index.js.map +1 -1
  712. package/lib/module/external/index.js.map +1 -1
  713. package/lib/module/external/reanimated/buffers.d.ts +5 -0
  714. package/lib/module/external/reanimated/buffers.js +29 -0
  715. package/lib/module/external/reanimated/buffers.js.map +1 -0
  716. package/lib/module/external/reanimated/index.d.ts +1 -0
  717. package/lib/module/external/reanimated/index.js +1 -0
  718. package/lib/module/external/reanimated/index.js.map +1 -1
  719. package/lib/module/external/reanimated/interpolators.d.ts +1 -1
  720. package/lib/module/external/reanimated/interpolators.js +5 -4
  721. package/lib/module/external/reanimated/interpolators.js.map +1 -1
  722. package/lib/module/external/reanimated/moduleWrapper.js +2 -4
  723. package/lib/module/external/reanimated/moduleWrapper.js.map +1 -1
  724. package/lib/module/external/reanimated/renderHelpers.js +5 -28
  725. package/lib/module/external/reanimated/renderHelpers.js.map +1 -1
  726. package/lib/module/external/reanimated/textures.js +5 -18
  727. package/lib/module/external/reanimated/textures.js.map +1 -1
  728. package/lib/module/external/reanimated/useAnimatedImageValue.js +16 -9
  729. package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -1
  730. package/lib/module/external/reanimated/useDerivedValueOnJS.js.map +1 -1
  731. package/lib/module/headless/index.js +3 -4
  732. package/lib/module/headless/index.js.map +1 -1
  733. package/lib/module/index.js.map +1 -1
  734. package/lib/module/mock/index.js +7 -4
  735. package/lib/module/mock/index.js.map +1 -1
  736. package/lib/module/renderer/Canvas.js +17 -28
  737. package/lib/module/renderer/Canvas.js.map +1 -1
  738. package/lib/module/renderer/Container.js +4 -12
  739. package/lib/module/renderer/Container.js.map +1 -1
  740. package/lib/module/renderer/HostComponents.d.ts +3 -1
  741. package/lib/module/renderer/HostComponents.js +2 -57
  742. package/lib/module/renderer/HostComponents.js.map +1 -1
  743. package/lib/module/renderer/HostConfig.js +8 -29
  744. package/lib/module/renderer/HostConfig.js.map +1 -1
  745. package/lib/module/renderer/Offscreen.d.ts +4 -2
  746. package/lib/module/renderer/Offscreen.js +16 -13
  747. package/lib/module/renderer/Offscreen.js.map +1 -1
  748. package/lib/module/renderer/Reconciler.js +4 -13
  749. package/lib/module/renderer/Reconciler.js.map +1 -1
  750. package/lib/module/renderer/components/Blend.js.map +1 -1
  751. package/lib/module/renderer/components/Group.js +4 -8
  752. package/lib/module/renderer/components/Group.js.map +1 -1
  753. package/lib/module/renderer/components/Mask.js +6 -7
  754. package/lib/module/renderer/components/Mask.js.map +1 -1
  755. package/lib/module/renderer/components/Paint.js.map +1 -1
  756. package/lib/module/renderer/components/Picture.js.map +1 -1
  757. package/lib/module/renderer/components/backdrop/BackdropBlur.js +5 -7
  758. package/lib/module/renderer/components/backdrop/BackdropBlur.js.map +1 -1
  759. package/lib/module/renderer/components/backdrop/BackdropFilter.js +5 -6
  760. package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -1
  761. package/lib/module/renderer/components/backdrop/index.js.map +1 -1
  762. package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -1
  763. package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
  764. package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
  765. package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
  766. package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -1
  767. package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
  768. package/lib/module/renderer/components/colorFilters/index.js.map +1 -1
  769. package/lib/module/renderer/components/image/Image.js.map +1 -1
  770. package/lib/module/renderer/components/image/ImageSVG.js.map +1 -1
  771. package/lib/module/renderer/components/image/ImageShader.js +9 -11
  772. package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
  773. package/lib/module/renderer/components/image/index.js.map +1 -1
  774. package/lib/module/renderer/components/imageFilters/Blur.js +4 -6
  775. package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
  776. package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  777. package/lib/module/renderer/components/imageFilters/Morphology.js +4 -6
  778. package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
  779. package/lib/module/renderer/components/imageFilters/Offset.js +5 -7
  780. package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
  781. package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  782. package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
  783. package/lib/module/renderer/components/imageFilters/index.js.map +1 -1
  784. package/lib/module/renderer/components/index.js.map +1 -1
  785. package/lib/module/renderer/components/maskFilters/Blur.js +5 -7
  786. package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
  787. package/lib/module/renderer/components/maskFilters/index.js.map +1 -1
  788. package/lib/module/renderer/components/paragraph/Paragraph.js.map +1 -1
  789. package/lib/module/renderer/components/paragraph/index.js.map +1 -1
  790. package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
  791. package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
  792. package/lib/module/renderer/components/pathEffects/Discrete.js +4 -6
  793. package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
  794. package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
  795. package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
  796. package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
  797. package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
  798. package/lib/module/renderer/components/pathEffects/index.js.map +1 -1
  799. package/lib/module/renderer/components/shaders/Color.js.map +1 -1
  800. package/lib/module/renderer/components/shaders/FractalNoise.js +6 -8
  801. package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
  802. package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -1
  803. package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -1
  804. package/lib/module/renderer/components/shaders/Shader.js +4 -6
  805. package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
  806. package/lib/module/renderer/components/shaders/ShaderLib.js.map +1 -1
  807. package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -1
  808. package/lib/module/renderer/components/shaders/Turbulence.js +6 -8
  809. package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
  810. package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
  811. package/lib/module/renderer/components/shaders/index.js.map +1 -1
  812. package/lib/module/renderer/components/shapes/Atlas.d.ts +4 -0
  813. package/lib/module/renderer/components/shapes/Atlas.js +5 -0
  814. package/lib/module/renderer/components/shapes/Atlas.js.map +1 -0
  815. package/lib/module/renderer/components/shapes/Box.js.map +1 -1
  816. package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
  817. package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
  818. package/lib/module/renderer/components/shapes/Fill.js.map +1 -1
  819. package/lib/module/renderer/components/shapes/FitBox.js +6 -7
  820. package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
  821. package/lib/module/renderer/components/shapes/Line.js.map +1 -1
  822. package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
  823. package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
  824. package/lib/module/renderer/components/shapes/Path.js +5 -7
  825. package/lib/module/renderer/components/shapes/Path.js.map +1 -1
  826. package/lib/module/renderer/components/shapes/Points.js +4 -6
  827. package/lib/module/renderer/components/shapes/Points.js.map +1 -1
  828. package/lib/module/renderer/components/shapes/Rect.js.map +1 -1
  829. package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
  830. package/lib/module/renderer/components/shapes/Vertices.js +4 -6
  831. package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
  832. package/lib/module/renderer/components/shapes/index.d.ts +1 -0
  833. package/lib/module/renderer/components/shapes/index.js +1 -0
  834. package/lib/module/renderer/components/shapes/index.js.map +1 -1
  835. package/lib/module/renderer/components/text/Glyphs.js +5 -7
  836. package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
  837. package/lib/module/renderer/components/text/Text.js +5 -7
  838. package/lib/module/renderer/components/text/Text.js.map +1 -1
  839. package/lib/module/renderer/components/text/TextBlob.js +5 -7
  840. package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
  841. package/lib/module/renderer/components/text/TextPath.js +4 -6
  842. package/lib/module/renderer/components/text/TextPath.js.map +1 -1
  843. package/lib/module/renderer/components/text/index.js.map +1 -1
  844. package/lib/module/renderer/index.js.map +1 -1
  845. package/lib/module/renderer/processors/Animations/index.js.map +1 -1
  846. package/lib/module/renderer/processors/index.js.map +1 -1
  847. package/lib/module/renderer/processors/math/Coordinates.js.map +1 -1
  848. package/lib/module/renderer/processors/math/Math.js +1 -1
  849. package/lib/module/renderer/processors/math/Math.js.map +1 -1
  850. package/lib/module/renderer/processors/math/Transforms.js.map +1 -1
  851. package/lib/module/renderer/processors/math/index.js.map +1 -1
  852. package/lib/module/renderer/typeddash.js +2 -5
  853. package/lib/module/renderer/typeddash.js.map +1 -1
  854. package/lib/module/skia/NativeSetup.js +0 -4
  855. package/lib/module/skia/NativeSetup.js.map +1 -1
  856. package/lib/module/skia/Skia.js +1 -0
  857. package/lib/module/skia/Skia.js.map +1 -1
  858. package/lib/module/skia/Skia.web.js.map +1 -1
  859. package/lib/module/skia/core/AnimatedImage.d.ts +1 -1
  860. package/lib/module/skia/core/AnimatedImage.js +2 -2
  861. package/lib/module/skia/core/AnimatedImage.js.map +1 -1
  862. package/lib/module/skia/core/Data.d.ts +1 -1
  863. package/lib/module/skia/core/Data.js +12 -17
  864. package/lib/module/skia/core/Data.js.map +1 -1
  865. package/lib/module/skia/core/Font.js +9 -24
  866. package/lib/module/skia/core/Font.js.map +1 -1
  867. package/lib/module/skia/core/Image.js +3 -8
  868. package/lib/module/skia/core/Image.js.map +1 -1
  869. package/lib/module/skia/core/Matrix.js.map +1 -1
  870. package/lib/module/skia/core/Picture.js +1 -3
  871. package/lib/module/skia/core/Picture.js.map +1 -1
  872. package/lib/module/skia/core/RRect.js.map +1 -1
  873. package/lib/module/skia/core/Rect.d.ts +2 -2
  874. package/lib/module/skia/core/Rect.js.map +1 -1
  875. package/lib/module/skia/core/SVG.js.map +1 -1
  876. package/lib/module/skia/core/Typeface.js +1 -1
  877. package/lib/module/skia/core/Typeface.js.map +1 -1
  878. package/lib/module/skia/core/Vector.js +1 -3
  879. package/lib/module/skia/core/Vector.js.map +1 -1
  880. package/lib/module/skia/core/index.js.map +1 -1
  881. package/lib/module/skia/index.js.map +1 -1
  882. package/lib/module/skia/types/AnimatedImage/index.js.map +1 -1
  883. package/lib/module/skia/types/Canvas.d.ts +16 -1
  884. package/lib/module/skia/types/Canvas.js +6 -9
  885. package/lib/module/skia/types/Canvas.js.map +1 -1
  886. package/lib/module/skia/types/ColorFilter/ColorFilter.js.map +1 -1
  887. package/lib/module/skia/types/ColorFilter/index.js.map +1 -1
  888. package/lib/module/skia/types/Data/Data.js.map +1 -1
  889. package/lib/module/skia/types/Data/index.js.map +1 -1
  890. package/lib/module/skia/types/Font/Font.js +15 -26
  891. package/lib/module/skia/types/Font/Font.js.map +1 -1
  892. package/lib/module/skia/types/Font/index.js.map +1 -1
  893. package/lib/module/skia/types/Image/Image.d.ts +8 -0
  894. package/lib/module/skia/types/Image/Image.js +9 -14
  895. package/lib/module/skia/types/Image/Image.js.map +1 -1
  896. package/lib/module/skia/types/Image/ImageFactory.js +6 -9
  897. package/lib/module/skia/types/Image/ImageFactory.js.map +1 -1
  898. package/lib/module/skia/types/Image/index.js.map +1 -1
  899. package/lib/module/skia/types/ImageFilter/ImageFilter.js +3 -5
  900. package/lib/module/skia/types/ImageFilter/ImageFilter.js.map +1 -1
  901. package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js +3 -4
  902. package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -1
  903. package/lib/module/skia/types/ImageFilter/index.js.map +1 -1
  904. package/lib/module/skia/types/MaskFilter.js +4 -5
  905. package/lib/module/skia/types/MaskFilter.js.map +1 -1
  906. package/lib/module/skia/types/Matrix.js.map +1 -1
  907. package/lib/module/skia/types/Matrix4.js +22 -64
  908. package/lib/module/skia/types/Matrix4.js.map +1 -1
  909. package/lib/module/skia/types/Paint/BlendMode.js +3 -4
  910. package/lib/module/skia/types/Paint/BlendMode.js.map +1 -1
  911. package/lib/module/skia/types/Paint/Paint.js +9 -15
  912. package/lib/module/skia/types/Paint/Paint.js.map +1 -1
  913. package/lib/module/skia/types/Paint/index.js.map +1 -1
  914. package/lib/module/skia/types/Paragraph/ParagraphBuilder.js +3 -4
  915. package/lib/module/skia/types/Paragraph/ParagraphBuilder.js.map +1 -1
  916. package/lib/module/skia/types/Paragraph/ParagraphStyle.js +9 -14
  917. package/lib/module/skia/types/Paragraph/ParagraphStyle.js.map +1 -1
  918. package/lib/module/skia/types/Paragraph/TextStyle.js +9 -14
  919. package/lib/module/skia/types/Paragraph/TextStyle.js.map +1 -1
  920. package/lib/module/skia/types/Paragraph/index.js.map +1 -1
  921. package/lib/module/skia/types/Path/Path.js +9 -14
  922. package/lib/module/skia/types/Path/Path.js.map +1 -1
  923. package/lib/module/skia/types/Path/index.js.map +1 -1
  924. package/lib/module/skia/types/PathEffect.js +3 -4
  925. package/lib/module/skia/types/PathEffect.js.map +1 -1
  926. package/lib/module/skia/types/Picture/index.js.map +1 -1
  927. package/lib/module/skia/types/Point.js +3 -4
  928. package/lib/module/skia/types/Point.js.map +1 -1
  929. package/lib/module/skia/types/RRect.js +2 -1
  930. package/lib/module/skia/types/RRect.js.map +1 -1
  931. package/lib/module/skia/types/RSXform.d.ts +7 -1
  932. package/lib/module/skia/types/RSXform.js.map +1 -1
  933. package/lib/module/skia/types/Rect.d.ts +4 -0
  934. package/lib/module/skia/types/Rect.js +0 -1
  935. package/lib/module/skia/types/Rect.js.map +1 -1
  936. package/lib/module/skia/types/RuntimeEffect/index.js.map +1 -1
  937. package/lib/module/skia/types/SVG/index.js.map +1 -1
  938. package/lib/module/skia/types/Shader/Shader.js +4 -9
  939. package/lib/module/skia/types/Shader/Shader.js.map +1 -1
  940. package/lib/module/skia/types/Shader/index.js.map +1 -1
  941. package/lib/module/skia/types/Skia.d.ts +3 -2
  942. package/lib/module/skia/types/Skia.js.map +1 -1
  943. package/lib/module/skia/types/Surface/index.js.map +1 -1
  944. package/lib/module/skia/types/Typeface/index.js.map +1 -1
  945. package/lib/module/skia/types/Vertices/Vertices.js +3 -4
  946. package/lib/module/skia/types/Vertices/Vertices.js.map +1 -1
  947. package/lib/module/skia/types/Vertices/index.js.map +1 -1
  948. package/lib/module/skia/types/index.js.map +1 -1
  949. package/lib/module/skia/web/Host.js +6 -16
  950. package/lib/module/skia/web/Host.js.map +1 -1
  951. package/lib/module/skia/web/JsiSkAnimatedImage.js +3 -9
  952. package/lib/module/skia/web/JsiSkAnimatedImage.js.map +1 -1
  953. package/lib/module/skia/web/JsiSkAnimatedImageFactory.js +0 -4
  954. package/lib/module/skia/web/JsiSkAnimatedImageFactory.js.map +1 -1
  955. package/lib/module/skia/web/JsiSkCanvas.d.ts +2 -1
  956. package/lib/module/skia/web/JsiSkCanvas.js +27 -59
  957. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
  958. package/lib/module/skia/web/JsiSkColor.js +10 -52
  959. package/lib/module/skia/web/JsiSkColor.js.map +1 -1
  960. package/lib/module/skia/web/JsiSkColorFilter.js +3 -4
  961. package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -1
  962. package/lib/module/skia/web/JsiSkColorFilterFactory.js +0 -8
  963. package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -1
  964. package/lib/module/skia/web/JsiSkContourMeasure.js +3 -8
  965. package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -1
  966. package/lib/module/skia/web/JsiSkContourMeasureIter.js +3 -7
  967. package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -1
  968. package/lib/module/skia/web/JsiSkData.js +5 -5
  969. package/lib/module/skia/web/JsiSkData.js.map +1 -1
  970. package/lib/module/skia/web/JsiSkDataFactory.js +0 -6
  971. package/lib/module/skia/web/JsiSkDataFactory.js.map +1 -1
  972. package/lib/module/skia/web/JsiSkFont.js +5 -26
  973. package/lib/module/skia/web/JsiSkFont.js.map +1 -1
  974. package/lib/module/skia/web/JsiSkFontMgr.js +0 -5
  975. package/lib/module/skia/web/JsiSkFontMgr.js.map +1 -1
  976. package/lib/module/skia/web/JsiSkFontMgrFactory.js +0 -4
  977. package/lib/module/skia/web/JsiSkFontMgrFactory.js.map +1 -1
  978. package/lib/module/skia/web/JsiSkImage.js +7 -23
  979. package/lib/module/skia/web/JsiSkImage.js.map +1 -1
  980. package/lib/module/skia/web/JsiSkImageFactory.js +2 -10
  981. package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -1
  982. package/lib/module/skia/web/JsiSkImageFilter.js +3 -4
  983. package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -1
  984. package/lib/module/skia/web/JsiSkImageFilterFactory.js +0 -23
  985. package/lib/module/skia/web/JsiSkImageFilterFactory.js.map +1 -1
  986. package/lib/module/skia/web/JsiSkMaskFilter.js +3 -4
  987. package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -1
  988. package/lib/module/skia/web/JsiSkMaskFilterFactory.js +0 -2
  989. package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -1
  990. package/lib/module/skia/web/JsiSkMatrix.js +7 -21
  991. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
  992. package/lib/module/skia/web/JsiSkPaint.js +3 -27
  993. package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
  994. package/lib/module/skia/web/JsiSkParagraph.js +21 -44
  995. package/lib/module/skia/web/JsiSkParagraph.js.map +1 -1
  996. package/lib/module/skia/web/JsiSkParagraphBuilder.js +1 -18
  997. package/lib/module/skia/web/JsiSkParagraphBuilder.js.map +1 -1
  998. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +0 -4
  999. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  1000. package/lib/module/skia/web/JsiSkParagraphStyle.js +4 -6
  1001. package/lib/module/skia/web/JsiSkParagraphStyle.js.map +1 -1
  1002. package/lib/module/skia/web/JsiSkPath.js +4 -69
  1003. package/lib/module/skia/web/JsiSkPath.js.map +1 -1
  1004. package/lib/module/skia/web/JsiSkPathEffect.js +3 -4
  1005. package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -1
  1006. package/lib/module/skia/web/JsiSkPathEffectFactory.js +0 -17
  1007. package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -1
  1008. package/lib/module/skia/web/JsiSkPathFactory.js +0 -12
  1009. package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -1
  1010. package/lib/module/skia/web/JsiSkPicture.js +4 -6
  1011. package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
  1012. package/lib/module/skia/web/JsiSkPictureFactory.js +0 -4
  1013. package/lib/module/skia/web/JsiSkPictureFactory.js.map +1 -1
  1014. package/lib/module/skia/web/JsiSkPictureRecorder.js +3 -6
  1015. package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
  1016. package/lib/module/skia/web/JsiSkPoint.js +5 -9
  1017. package/lib/module/skia/web/JsiSkPoint.js.map +1 -1
  1018. package/lib/module/skia/web/JsiSkRRect.js +5 -13
  1019. package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
  1020. package/lib/module/skia/web/JsiSkRSXform.d.ts +8 -2
  1021. package/lib/module/skia/web/JsiSkRSXform.js +31 -7
  1022. package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
  1023. package/lib/module/skia/web/JsiSkRect.d.ts +3 -2
  1024. package/lib/module/skia/web/JsiSkRect.js +11 -11
  1025. package/lib/module/skia/web/JsiSkRect.js.map +1 -1
  1026. package/lib/module/skia/web/JsiSkRuntimeEffect.js +3 -11
  1027. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  1028. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +0 -4
  1029. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
  1030. package/lib/module/skia/web/JsiSkSVGFactory.js +0 -3
  1031. package/lib/module/skia/web/JsiSkSVGFactory.js.map +1 -1
  1032. package/lib/module/skia/web/JsiSkShader.js +3 -4
  1033. package/lib/module/skia/web/JsiSkShader.js.map +1 -1
  1034. package/lib/module/skia/web/JsiSkShaderFactory.js +0 -9
  1035. package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -1
  1036. package/lib/module/skia/web/JsiSkSurface.js +3 -7
  1037. package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
  1038. package/lib/module/skia/web/JsiSkSurfaceFactory.js +0 -10
  1039. package/lib/module/skia/web/JsiSkSurfaceFactory.js.map +1 -1
  1040. package/lib/module/skia/web/JsiSkTextBlob.js +3 -4
  1041. package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -1
  1042. package/lib/module/skia/web/JsiSkTextBlobFactory.js +2 -6
  1043. package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -1
  1044. package/lib/module/skia/web/JsiSkTextStyle.js +0 -1
  1045. package/lib/module/skia/web/JsiSkTextStyle.js.map +1 -1
  1046. package/lib/module/skia/web/JsiSkTypeface.js +3 -7
  1047. package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
  1048. package/lib/module/skia/web/JsiSkTypefaceFactory.js +0 -4
  1049. package/lib/module/skia/web/JsiSkTypefaceFactory.js.map +1 -1
  1050. package/lib/module/skia/web/JsiSkTypefaceFontProvider.js +16 -23
  1051. package/lib/module/skia/web/JsiSkTypefaceFontProvider.js.map +1 -1
  1052. package/lib/module/skia/web/JsiSkTypefaceFontProviderFactory.js +0 -2
  1053. package/lib/module/skia/web/JsiSkTypefaceFontProviderFactory.js.map +1 -1
  1054. package/lib/module/skia/web/JsiSkVertices.js +3 -6
  1055. package/lib/module/skia/web/JsiSkVertices.js.map +1 -1
  1056. package/lib/module/skia/web/JsiSkVerticesFactory.js +8 -24
  1057. package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -1
  1058. package/lib/module/skia/web/JsiSkia.js +5 -0
  1059. package/lib/module/skia/web/JsiSkia.js.map +1 -1
  1060. package/lib/module/skia/web/index.js.map +1 -1
  1061. package/lib/module/specs/NativeSkiaModule.js.map +1 -1
  1062. package/lib/module/specs/NativeSkiaModule.web.js +2 -1
  1063. package/lib/module/specs/NativeSkiaModule.web.js.map +1 -1
  1064. package/lib/module/specs/SkiaDomViewNativeComponent.js.map +1 -1
  1065. package/lib/module/specs/SkiaPictureViewNativeComponent.js.map +1 -1
  1066. package/lib/module/views/SkiaBaseWebView.js +16 -58
  1067. package/lib/module/views/SkiaBaseWebView.js.map +1 -1
  1068. package/lib/module/views/SkiaDomView.js +8 -23
  1069. package/lib/module/views/SkiaDomView.js.map +1 -1
  1070. package/lib/module/views/SkiaDomView.web.js +0 -4
  1071. package/lib/module/views/SkiaDomView.web.js.map +1 -1
  1072. package/lib/module/views/SkiaJSDomView.js +10 -26
  1073. package/lib/module/views/SkiaJSDomView.js.map +1 -1
  1074. package/lib/module/views/SkiaJSDomView.web.js.map +1 -1
  1075. package/lib/module/views/SkiaPictureView.js +5 -18
  1076. package/lib/module/views/SkiaPictureView.js.map +1 -1
  1077. package/lib/module/views/SkiaPictureView.web.js +0 -2
  1078. package/lib/module/views/SkiaPictureView.web.js.map +1 -1
  1079. package/lib/module/views/SkiaViewNativeId.js.map +1 -1
  1080. package/lib/module/views/api.js.map +1 -1
  1081. package/lib/module/views/index.js.map +1 -1
  1082. package/lib/module/views/types.js +4 -4
  1083. package/lib/module/views/types.js.map +1 -1
  1084. package/lib/module/views/useTouchHandler.js +13 -21
  1085. package/lib/module/views/useTouchHandler.js.map +1 -1
  1086. package/lib/module/web/LoadSkiaWeb.js +4 -5
  1087. package/lib/module/web/LoadSkiaWeb.js.map +1 -1
  1088. package/lib/module/web/WithSkiaWeb.js +7 -8
  1089. package/lib/module/web/WithSkiaWeb.js.map +1 -1
  1090. package/lib/module/web/index.js.map +1 -1
  1091. package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +2 -1
  1092. package/lib/typescript/src/dom/nodes/drawings/AtlasNode.d.ts +8 -0
  1093. package/lib/typescript/src/dom/nodes/drawings/index.d.ts +1 -0
  1094. package/lib/typescript/src/dom/types/Drawings.d.ts +7 -1
  1095. package/lib/typescript/src/dom/types/NodeType.d.ts +1 -0
  1096. package/lib/typescript/src/dom/types/SkDOM.d.ts +2 -1
  1097. package/lib/typescript/src/external/reanimated/buffers.d.ts +5 -0
  1098. package/lib/typescript/src/external/reanimated/index.d.ts +1 -0
  1099. package/lib/typescript/src/external/reanimated/interpolators.d.ts +1 -1
  1100. package/lib/typescript/src/renderer/HostComponents.d.ts +3 -1
  1101. package/lib/typescript/src/renderer/Offscreen.d.ts +4 -2
  1102. package/lib/typescript/src/renderer/components/shapes/Atlas.d.ts +4 -0
  1103. package/lib/typescript/src/renderer/components/shapes/index.d.ts +1 -0
  1104. package/lib/typescript/src/skia/core/AnimatedImage.d.ts +1 -1
  1105. package/lib/typescript/src/skia/core/Data.d.ts +1 -1
  1106. package/lib/typescript/src/skia/core/Rect.d.ts +2 -2
  1107. package/lib/typescript/src/skia/types/Canvas.d.ts +16 -1
  1108. package/lib/typescript/src/skia/types/Image/Image.d.ts +8 -0
  1109. package/lib/typescript/src/skia/types/RSXform.d.ts +7 -1
  1110. package/lib/typescript/src/skia/types/Rect.d.ts +4 -0
  1111. package/lib/typescript/src/skia/types/Skia.d.ts +3 -2
  1112. package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +2 -1
  1113. package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +8 -2
  1114. package/lib/typescript/src/skia/web/JsiSkRect.d.ts +3 -2
  1115. package/package.json +15 -15
  1116. package/react-native-skia.podspec +1 -1
  1117. package/src/dom/nodes/JsiSkDOM.ts +8 -0
  1118. package/src/dom/nodes/Node.ts +1 -0
  1119. package/src/dom/nodes/drawings/AtlasNode.ts +24 -0
  1120. package/src/dom/nodes/drawings/index.ts +1 -0
  1121. package/src/dom/types/Drawings.ts +9 -0
  1122. package/src/dom/types/NodeType.ts +1 -0
  1123. package/src/dom/types/SkDOM.ts +2 -0
  1124. package/src/external/reanimated/buffers.ts +53 -0
  1125. package/src/external/reanimated/index.ts +1 -0
  1126. package/src/external/reanimated/interpolators.ts +4 -1
  1127. package/src/external/reanimated/textures.tsx +7 -19
  1128. package/src/external/reanimated/useAnimatedImageValue.ts +15 -4
  1129. package/src/mock/index.ts +5 -0
  1130. package/src/renderer/HostComponents.ts +6 -1
  1131. package/src/renderer/Offscreen.tsx +20 -16
  1132. package/src/renderer/components/shapes/Atlas.tsx +8 -0
  1133. package/src/renderer/components/shapes/index.ts +1 -0
  1134. package/src/skia/core/AnimatedImage.ts +3 -2
  1135. package/src/skia/core/Data.ts +8 -4
  1136. package/src/skia/types/Canvas.ts +32 -1
  1137. package/src/skia/types/Image/Image.ts +10 -0
  1138. package/src/skia/types/RSXform.ts +7 -1
  1139. package/src/skia/types/Rect.ts +6 -0
  1140. package/src/skia/types/Skia.ts +10 -2
  1141. package/src/skia/web/JsiSkCanvas.ts +60 -23
  1142. package/src/skia/web/JsiSkRSXform.ts +28 -4
  1143. package/src/skia/web/JsiSkRect.ts +12 -2
  1144. package/src/skia/web/JsiSkTextBlobFactory.ts +5 -5
  1145. package/src/skia/web/JsiSkia.ts +15 -0
  1146. package/lib/commonjs/animation/types.d.ts +0 -18
  1147. package/lib/commonjs/animation/types.js +0 -2
  1148. package/lib/commonjs/animation/types.js.map +0 -1
  1149. package/lib/module/animation/types.d.ts +0 -18
  1150. package/lib/module/animation/types.js +0 -2
  1151. package/lib/module/animation/types.js.map +0 -1
  1152. package/lib/typescript/src/animation/types.d.ts +0 -18
  1153. package/src/animation/types.ts +0 -23
@@ -1 +1 @@
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
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./useAnimatedImageValue\";\nexport * from \"./useDerivedValueOnJS\";\nexport * from \"./renderHelpers\";\nexport * from \"./interpolators\";\nexport * from \"./textures\";\nexport * from \"./buffers\";\n"],"mappings":"AAAA,cAAc,yBAAyB;AACvC,cAAc,uBAAuB;AACrC,cAAc,iBAAiB;AAC/B,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,WAAW"}
@@ -1,7 +1,7 @@
1
1
  import type { ExtrapolationType, SharedValue } from "react-native-reanimated";
2
2
  import type { SkPath, SkPoint } from "../../skia/types";
3
3
  export declare const notifyChange: (value: SharedValue<unknown>) => void;
4
- export declare const usePathValue: (cb: (path: SkPath) => void) => SharedValue<SkPath>;
4
+ export declare const usePathValue: (cb: (path: SkPath) => void, init?: SkPath) => SharedValue<SkPath>;
5
5
  export declare const useClock: () => SharedValue<number>;
6
6
  export declare const usePathInterpolation: (value: SharedValue<number>, input: number[], outputRange: SkPath[], options?: ExtrapolationType) => SharedValue<SkPath>;
7
7
  export declare const useVectorInterpolation: (value: SharedValue<number>, input: number[], outputRange: SkPoint[], options?: ExtrapolationType) => SharedValue<{
@@ -11,11 +11,14 @@ export const notifyChange = value => {
11
11
  value._value = value.value;
12
12
  }
13
13
  };
14
- export const usePathValue = cb => {
14
+ export const usePathValue = (cb, init) => {
15
15
  const pathInit = useMemo(() => Skia.Path.Make(), []);
16
16
  const path = useSharedValue(pathInit);
17
17
  useDerivedValue(() => {
18
18
  path.value.reset();
19
+ if (init !== undefined) {
20
+ path.value.addPath(init);
21
+ }
19
22
  cb(path.value);
20
23
  notifyChange(path);
21
24
  });
@@ -31,6 +34,7 @@ export const useClock = () => {
31
34
  useFrameCallback(callback);
32
35
  return clock;
33
36
  };
37
+
34
38
  /**
35
39
  * @worklet
36
40
  */
@@ -45,18 +49,15 @@ const useInterpolator = (factory, value, interpolator, input, output, options) =
45
49
  }, [input, output, options]);
46
50
  return result;
47
51
  };
48
-
49
52
  export const usePathInterpolation = (value, input, outputRange, options) => {
50
53
  // Check if all paths in outputRange are interpolable
51
54
  const allPathsInterpolable = outputRange.slice(1).every(path => outputRange[0].isInterpolatable(path));
52
-
53
55
  if (!allPathsInterpolable) {
54
56
  // Handle the case where not all paths are interpolable
55
57
  // For example, throw an error or return early
56
58
  throw new Error(`Not all paths in the output range are interpolable.
57
59
  See: https://shopify.github.io/react-native-skia/docs/animations/hooks#usepathinterpolation`);
58
60
  }
59
-
60
61
  return useInterpolator(() => Skia.Path.Make(), value, interpolatePaths, input, outputRange, options);
61
62
  };
62
63
  export const useVectorInterpolation = (value, input, outputRange, options) => useInterpolator(() => Skia.Point(0, 0), value, interpolateVector, input, outputRange, options);
@@ -1 +1 @@
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":"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"}
1
+ {"version":3,"names":["useCallback","useMemo","interpolatePaths","interpolateVector","Skia","Platform","useAnimatedReaction","useFrameCallback","useSharedValue","useDerivedValue","notifyChange","value","_WORKLET","OS","_value","usePathValue","cb","init","pathInit","Path","Make","path","reset","undefined","addPath","useClock","clock","callback","info","timeSinceFirstFrame","useInterpolator","factory","interpolator","input","output","options","result","val","usePathInterpolation","outputRange","allPathsInterpolable","slice","every","isInterpolatable","Error","useVectorInterpolation","Point"],"sources":["interpolators.ts"],"sourcesContent":["import type {\n ExtrapolationType,\n FrameInfo,\n SharedValue,\n} from \"react-native-reanimated\";\nimport { useCallback, useMemo } from \"react\";\n\nimport type { SkPath, SkPoint } from \"../../skia/types\";\nimport { interpolatePaths, interpolateVector } from \"../../animation\";\nimport { Skia } from \"../../skia\";\nimport { 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, init?: SkPath) => {\n const pathInit = useMemo(() => Skia.Path.Make(), []);\n const path = useSharedValue(pathInit);\n useDerivedValue(() => {\n path.value.reset();\n if (init !== undefined) {\n path.value.addPath(init);\n }\n cb(path.value);\n notifyChange(path);\n });\n return path;\n};\n\nexport const useClock = () => {\n const clock = useSharedValue(0);\n const callback = useCallback(\n (info: FrameInfo) => {\n \"worklet\";\n clock.value = info.timeSinceFirstFrame;\n },\n [clock]\n );\n useFrameCallback(callback);\n return clock;\n};\n\n/**\n * @worklet\n */\ntype Interpolator<T> = (\n value: number,\n input: number[],\n output: T[],\n options: ExtrapolationType,\n result: T\n) => T;\n\nconst useInterpolator = <T>(\n factory: () => T,\n value: SharedValue<number>,\n interpolator: Interpolator<T>,\n input: number[],\n output: T[],\n options?: ExtrapolationType\n) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const init = useMemo(() => factory(), []);\n const result = useSharedValue(init);\n useAnimatedReaction(\n () => value.value,\n (val) => {\n result.value = interpolator(val, input, output, options, result.value);\n notifyChange(result);\n },\n [input, output, options]\n );\n return result;\n};\n\nexport const usePathInterpolation = (\n value: SharedValue<number>,\n input: number[],\n outputRange: SkPath[],\n options?: ExtrapolationType\n) => {\n // Check if all paths in outputRange are interpolable\n const allPathsInterpolable = outputRange\n .slice(1)\n .every((path) => outputRange[0].isInterpolatable(path));\n if (!allPathsInterpolable) {\n // Handle the case where not all paths are interpolable\n // For example, throw an error or return early\n throw new Error(\n `Not all paths in the output range are interpolable.\nSee: https://shopify.github.io/react-native-skia/docs/animations/hooks#usepathinterpolation`\n );\n }\n return useInterpolator(\n () => Skia.Path.Make(),\n value,\n interpolatePaths,\n input,\n outputRange,\n options\n );\n};\n\nexport const useVectorInterpolation = (\n value: SharedValue<number>,\n input: number[],\n outputRange: SkPoint[],\n options?: ExtrapolationType\n) =>\n useInterpolator(\n () => Skia.Point(0, 0),\n value,\n interpolateVector,\n input,\n outputRange,\n options\n );\n"],"mappings":"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"}
@@ -1,21 +1,19 @@
1
1
  var _Reanimated, _Reanimated2, _Reanimated3, _Reanimated4, _Reanimated5, _Reanimated6, _Reanimated7, _Reanimated8;
2
-
3
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
+
4
4
  // This one is needed for the deprecated useSharedValue function
5
5
  // We can remove it once we remove the deprecation
6
+
6
7
  let Reanimated2;
7
8
  let Reanimated3;
8
9
  let reanimatedVersion;
9
-
10
10
  try {
11
11
  Reanimated2 = require("react-native-reanimated");
12
12
  reanimatedVersion = require("react-native-reanimated/package.json").version;
13
-
14
13
  if (reanimatedVersion && (reanimatedVersion >= "3.0.0" || reanimatedVersion.includes("3.0.0-"))) {
15
14
  Reanimated3 = Reanimated2;
16
15
  }
17
16
  } catch (e) {}
18
-
19
17
  export const HAS_REANIMATED2 = !!Reanimated2;
20
18
  export const HAS_REANIMATED3 = !!Reanimated3;
21
19
  export function throwOnMissingReanimated() {
@@ -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","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,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;AACP,OAAO,MAAMQ,OAAO,GAAG,iBAAAjB,WAAW,UAAX,oDAAaiB,OAAb,KAAwBR,wBAAxC;AAEP,OAAO,MAAMS,mBAIJ,GAAG,iBAAAlB,WAAW,UAAX,oDAAakB,mBAAb,KAAoCT,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"}
1
+ {"version":3,"names":["Reanimated2","Reanimated3","reanimatedVersion","require","version","includes","e","HAS_REANIMATED2","HAS_REANIMATED3","throwOnMissingReanimated","Error","useSharedValue","_Reanimated","useDerivedValue","_Reanimated2","useFrameCallback","_Reanimated3","startMapper","_Reanimated4","stopMapper","_Reanimated5","runOnJS","_Reanimated6","runOnUI","_Reanimated7","useAnimatedReaction","_Reanimated8","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,WAAgB;AAEpB,IAAIC,WAAgB;AACpB,IAAIC,iBAAyB;AAE7B,IAAI;EACFF,WAAW,GAAGG,OAAO,CAAC,yBAAyB,CAAC;EAChDD,iBAAiB,GAAGC,OAAO,CAAC,sCAAsC,CAAC,CAACC,OAAO;EAC3E,IACEF,iBAAiB,KAChBA,iBAAiB,IAAI,OAAO,IAAIA,iBAAiB,CAACG,QAAQ,CAAC,QAAQ,CAAC,CAAC,EACtE;IACAJ,WAAW,GAAGD,WAAW;EAC3B;AACF,CAAC,CAAC,OAAOM,CAAC,EAAE,CAAC;AAEb,OAAO,MAAMC,eAAe,GAAG,CAAC,CAACP,WAAW;AAC5C,OAAO,MAAMQ,eAAe,GAAG,CAAC,CAACP,WAAW;AAE5C,OAAO,SAASQ,wBAAwBA,CAAA,EAAG;EACzC,IAAI,CAACF,eAAe,EAAE;IACpB,MAAM,IAAIG,KAAK,CACb;AACN,iDACI,CAAC;EACH;AACF;AAEA,OAAO,MAAMC,cAGM,GAAG,EAAAC,WAAA,GAAAZ,WAAW,cAAAY,WAAA,uBAAXA,WAAA,CAAaD,cAAc,KAAIF,wBAAwB;AAE7E,OAAO,MAAMI,eAGO,GAAG,EAAAC,YAAA,GAAAd,WAAW,cAAAc,YAAA,uBAAXA,YAAA,CAAaD,eAAe,KAAIJ,wBAAwB;AAE/E,OAAO,MAAMM,gBAGK,GAAG,EAAAC,YAAA,GAAAhB,WAAW,cAAAgB,YAAA,uBAAXA,YAAA,CAAaD,gBAAgB,KAAIN,wBAAwB;AAE9E,OAAO,MAAMQ,WAIF,GAAG,EAAAC,YAAA,GAAAlB,WAAW,cAAAkB,YAAA,uBAAXA,YAAA,CAAaD,WAAW,KAAIR,wBAAwB;AAElE,OAAO,MAAMU,UAAsC,GACjD,EAAAC,YAAA,GAAApB,WAAW,cAAAoB,YAAA,uBAAXA,YAAA,CAAaD,UAAU,KAAIV,wBAAwB;AAErD,OAAO,MAAMY,OAAO,GAAG,EAAAC,YAAA,GAAAtB,WAAW,cAAAsB,YAAA,uBAAXA,YAAA,CAAaD,OAAO,KAAIZ,wBAAwB;AACvE,OAAO,MAAMc,OAAO,GAAG,EAAAC,YAAA,GAAAxB,WAAW,cAAAwB,YAAA,uBAAXA,YAAA,CAAaD,OAAO,KAAId,wBAAwB;AAEvE,OAAO,MAAMgB,mBAIJ,GAAG,EAAAC,YAAA,GAAA1B,WAAW,cAAA0B,YAAA,uBAAXA,YAAA,CAAaD,mBAAmB,KAAIhB,wBAAwB;AAExE,OAAO,MAAMkB,aAAa,GAAOC,KAAc,IAA8B;EAC3E,OACE,CAAC,CAACA,KAAK,KACN3B,WAAW,GACRA,WAAW,CAAC0B,aAAa,CAACC,KAAK,CAAC,GAC/BA,KAAK,CAASA,KAAK,KAAKC,SAAS,CAAC;AAE3C,CAAC"}
@@ -1,11 +1,9 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import { startMapper, stopMapper, isSharedValue, HAS_REANIMATED3, HAS_REANIMATED2, runOnJS } from "./moduleWrapper";
3
2
 
3
+ import { startMapper, stopMapper, isSharedValue, HAS_REANIMATED3, HAS_REANIMATED2, runOnJS } from "./moduleWrapper";
4
4
  const _bindings = new WeakMap();
5
-
6
5
  export const unbindReanimatedNode = node => {
7
6
  const previousMapperId = _bindings.get(node);
8
-
9
7
  if (previousMapperId !== undefined) {
10
8
  stopMapper(previousMapperId);
11
9
  }
@@ -14,17 +12,13 @@ export function extractReanimatedProps(props) {
14
12
  if (!HAS_REANIMATED3 && !HAS_REANIMATED2) {
15
13
  return [props, {}];
16
14
  }
17
-
18
15
  const reanimatedProps = {};
19
16
  const otherProps = {};
20
-
21
17
  for (const propName in props) {
22
18
  if (propName === "children") {
23
19
  continue;
24
20
  }
25
-
26
21
  const propValue = props[propName];
27
-
28
22
  if (isSharedValue(propValue)) {
29
23
  reanimatedProps[propName] = propValue;
30
24
  otherProps[propName] = propValue.value;
@@ -32,68 +26,53 @@ export function extractReanimatedProps(props) {
32
26
  otherProps[propName] = propValue;
33
27
  }
34
28
  }
35
-
36
29
  return [otherProps, reanimatedProps];
37
30
  }
38
-
39
31
  function bindReanimatedProps2(container, node, reanimatedProps) {
40
32
  const sharedValues = Object.values(reanimatedProps);
41
-
42
33
  const previousMapperId = _bindings.get(node);
43
-
44
34
  if (previousMapperId !== undefined) {
45
35
  stopMapper(previousMapperId);
46
36
  }
47
-
48
37
  if (sharedValues.length > 0) {
49
38
  const viewId = container.getNativeId();
50
39
  const {
51
40
  SkiaViewApi
52
41
  } = global;
53
-
54
42
  const updateProps = () => {
55
43
  for (const propName in reanimatedProps) {
56
44
  node && node.setProp(propName, reanimatedProps[propName].value);
57
- } // On React Native we use the SkiaViewApi to redraw because it can
45
+ }
46
+ // On React Native we use the SkiaViewApi to redraw because it can
58
47
  // run on the worklet thread (container.redraw can't)
59
48
  // if SkiaViewApi is undefined, we are on web and container.redraw()
60
49
  // can safely be invoked
61
-
62
-
63
50
  if (SkiaViewApi) {
64
51
  SkiaViewApi.requestRedraw(viewId);
65
52
  } else {
66
53
  container.redraw();
67
54
  }
68
55
  };
69
-
70
56
  const mapperId = startMapper(() => {
71
57
  "worklet";
72
58
 
73
59
  runOnJS(updateProps)();
74
60
  }, sharedValues);
75
-
76
61
  _bindings.set(node, mapperId);
77
62
  }
78
63
  }
79
-
80
64
  export function bindReanimatedProps(container, node, reanimatedProps) {
81
65
  if (HAS_REANIMATED2 && !HAS_REANIMATED3) {
82
66
  return bindReanimatedProps2(container, node, reanimatedProps);
83
67
  }
84
-
85
68
  if (!HAS_REANIMATED3) {
86
69
  return;
87
70
  }
88
-
89
71
  const sharedValues = Object.values(reanimatedProps);
90
-
91
72
  const previousMapperId = _bindings.get(node);
92
-
93
73
  if (previousMapperId !== undefined) {
94
74
  stopMapper(previousMapperId);
95
75
  }
96
-
97
76
  if (sharedValues.length > 0) {
98
77
  const viewId = container.getNativeId();
99
78
  const {
@@ -106,19 +85,17 @@ export function bindReanimatedProps(container, node, reanimatedProps) {
106
85
  for (const propName in reanimatedProps) {
107
86
  node.setProp(propName, reanimatedProps[propName].value);
108
87
  }
109
- } // On React Native we use the SkiaViewApi to redraw because it can
88
+ }
89
+ // On React Native we use the SkiaViewApi to redraw because it can
110
90
  // run on the worklet thread (container.redraw can't)
111
91
  // if SkiaViewApi is undefined, we are on web and container.redraw()
112
92
  // can safely be invoked
113
-
114
-
115
93
  if (SkiaViewApi) {
116
94
  SkiaViewApi.requestRedraw(viewId);
117
95
  } else {
118
96
  container.redraw();
119
97
  }
120
98
  }, sharedValues);
121
-
122
99
  _bindings.set(node, mapperId);
123
100
  }
124
101
  }
@@ -1 +1 @@
1
- {"version":3,"names":["startMapper","stopMapper","isSharedValue","HAS_REANIMATED3","HAS_REANIMATED2","runOnJS","_bindings","WeakMap","unbindReanimatedNode","node","previousMapperId","get","undefined","extractReanimatedProps","props","reanimatedProps","otherProps","propName","propValue","value","bindReanimatedProps2","container","sharedValues","Object","values","length","viewId","getNativeId","SkiaViewApi","global","updateProps","setProp","requestRedraw","redraw","mapperId","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":"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"}
1
+ {"version":3,"names":["startMapper","stopMapper","isSharedValue","HAS_REANIMATED3","HAS_REANIMATED2","runOnJS","_bindings","WeakMap","unbindReanimatedNode","node","previousMapperId","get","undefined","extractReanimatedProps","props","reanimatedProps","otherProps","propName","propValue","value","bindReanimatedProps2","container","sharedValues","Object","values","length","viewId","getNativeId","SkiaViewApi","global","updateProps","setProp","requestRedraw","redraw","mapperId","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":"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"}
@@ -1,24 +1,11 @@
1
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) => {
2
+ import { drawAsImageFromPicture, drawAsPicture } from "../../renderer/Offscreen";
3
+ import { runOnUI, useSharedValue } from "./moduleWrapper";
4
+ const createTextureValue = (texture, picture, size) => {
9
5
  "worklet";
10
6
 
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();
7
+ texture.value = drawAsImageFromPicture(picture, size);
20
8
  };
21
-
22
9
  export const useTextureValue = (element, size) => {
23
10
  const picture = useMemo(() => {
24
11
  return drawAsPicture(element);
@@ -28,7 +15,7 @@ export const useTextureValue = (element, size) => {
28
15
  export const useTextureValueFromPicture = (picture, size) => {
29
16
  const texture = useSharedValue(null);
30
17
  useEffect(() => {
31
- runOnUI(createTexture)(texture, picture, size);
18
+ runOnUI(createTextureValue)(texture, picture, size);
32
19
  }, [texture, picture, size]);
33
20
  return texture;
34
21
  };
@@ -1 +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,IAHoB,KAIjB;EACH;;EACA,MAAMC,OAAO,GAAGT,IAAI,CAACU,OAAL,CAAaC,aAAb,CACdH,IAAI,CAACI,KAAL,GAAaR,EADC,EAEdI,IAAI,CAACK,MAAL,GAAcT,EAFA,CAAhB;EAIA,MAAMU,MAAM,GAAGL,OAAO,CAACM,SAAR,EAAf,CANG,CAOH;EACA;EACA;;EACAD,MAAM,CAACE,WAAP,CAAmBT,OAAnB,EAVG,CAWH;;EACAE,OAAO,CAACQ,KAAR;EACAX,OAAO,CAACY,KAAR,GAAgBT,OAAO,CAACU,iBAAR,EAAhB;AACD,CAlBD;;AAoBA,OAAO,MAAMC,eAAe,GAAG,CAACC,OAAD,EAAwBb,IAAxB,KAAyC;EACtE,MAAMD,OAAO,GAAGR,OAAO,CAAC,MAAM;IAC5B,OAAOE,aAAa,CAACoB,OAAD,CAApB;EACD,CAFsB,EAEpB,CAACA,OAAD,CAFoB,CAAvB;EAGA,OAAOC,0BAA0B,CAACf,OAAD,EAAUC,IAAV,CAAjC;AACD,CALM;AAOP,OAAO,MAAMc,0BAA0B,GAAG,CACxCf,OADwC,EAExCC,IAFwC,KAGrC;EACH,MAAMF,OAAO,GAAGH,cAAc,CAAiB,IAAjB,CAA9B;EACAL,SAAS,CAAC,MAAM;IACdI,OAAO,CAACG,aAAD,CAAP,CAAuBC,OAAvB,EAAgCC,OAAhC,EAAyCC,IAAzC;EACD,CAFQ,EAEN,CAACF,OAAD,EAAUC,OAAV,EAAmBC,IAAnB,CAFM,CAAT;EAGA,OAAOF,OAAP;AACD,CATM"}
1
+ {"version":3,"names":["useEffect","useMemo","drawAsImageFromPicture","drawAsPicture","runOnUI","useSharedValue","createTextureValue","texture","picture","size","value","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 type { SkImage, SkPicture, SkSize } from \"../../skia/types\";\nimport {\n drawAsImageFromPicture,\n drawAsPicture,\n} from \"../../renderer/Offscreen\";\n\nimport { runOnUI, useSharedValue } from \"./moduleWrapper\";\n\nconst createTextureValue = (\n texture: SharedValue<SkImage | null>,\n picture: SkPicture,\n size: SkSize\n) => {\n \"worklet\";\n texture.value = drawAsImageFromPicture(picture, size);\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(createTextureValue)(texture, picture, size);\n }, [texture, picture, size]);\n return texture;\n};\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAK1C,SACEC,sBAAsB,EACtBC,aAAa,QACR,0BAA0B;AAEjC,SAASC,OAAO,EAAEC,cAAc,QAAQ,iBAAiB;AAEzD,MAAMC,kBAAkB,GAAGA,CACzBC,OAAoC,EACpCC,OAAkB,EAClBC,IAAY,KACT;EACH,SAAS;;EACTF,OAAO,CAACG,KAAK,GAAGR,sBAAsB,CAACM,OAAO,EAAEC,IAAI,CAAC;AACvD,CAAC;AAED,OAAO,MAAME,eAAe,GAAGA,CAACC,OAAqB,EAAEH,IAAY,KAAK;EACtE,MAAMD,OAAO,GAAGP,OAAO,CAAC,MAAM;IAC5B,OAAOE,aAAa,CAACS,OAAO,CAAC;EAC/B,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EACb,OAAOC,0BAA0B,CAACL,OAAO,EAAEC,IAAI,CAAC;AAClD,CAAC;AAED,OAAO,MAAMI,0BAA0B,GAAGA,CACxCL,OAAkB,EAClBC,IAAY,KACT;EACH,MAAMF,OAAO,GAAGF,cAAc,CAAiB,IAAI,CAAC;EACpDL,SAAS,CAAC,MAAM;IACdI,OAAO,CAACE,kBAAkB,CAAC,CAACC,OAAO,EAAEC,OAAO,EAAEC,IAAI,CAAC;EACrD,CAAC,EAAE,CAACF,OAAO,EAAEC,OAAO,EAAEC,IAAI,CAAC,CAAC;EAC5B,OAAOF,OAAO;AAChB,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { useEffect } from "react";
1
2
  import { useAnimatedImage } from "../../skia/core/AnimatedImage";
2
3
  import { throwOnMissingReanimated, useFrameCallback, useSharedValue } from "./moduleWrapper";
3
4
  const DEFAULT_FRAME_DURATION = 60;
@@ -8,34 +9,40 @@ export const useAnimatedImageValue = source => {
8
9
  const animatedImage = useAnimatedImage(source, err => {
9
10
  console.error(err);
10
11
  throw new Error(`Could not load animated image - got '${err.message}'`);
11
- });
12
+ }, false);
12
13
  const frameDuration = (animatedImage === null || animatedImage === void 0 ? void 0 : animatedImage.currentFrameDuration()) || DEFAULT_FRAME_DURATION;
13
14
  useFrameCallback(frameInfo => {
14
15
  if (!animatedImage) {
15
16
  currentFrame.value = null;
16
17
  return;
17
18
  }
18
-
19
19
  const {
20
20
  timestamp
21
21
  } = frameInfo;
22
- const elapsed = timestamp - lastTimestamp.value; // Check if it's time to switch frames based on GIF frame duration
22
+ const elapsed = timestamp - lastTimestamp.value;
23
23
 
24
+ // Check if it's time to switch frames based on GIF frame duration
24
25
  if (elapsed < frameDuration) {
25
26
  return;
26
- } // Update the current frame
27
-
27
+ }
28
28
 
29
+ // Update the current frame
29
30
  animatedImage.decodeNextFrame();
30
-
31
31
  if (currentFrame.value) {
32
32
  currentFrame.value.dispose();
33
33
  }
34
+ currentFrame.value = animatedImage.getCurrentFrame();
34
35
 
35
- currentFrame.value = animatedImage.getCurrentFrame(); // Update the last timestamp
36
-
37
- lastTimestamp.value = timestamp; // eslint-disable-next-line react-hooks/exhaustive-deps
36
+ // Update the last timestamp
37
+ lastTimestamp.value = timestamp;
38
+ // eslint-disable-next-line react-hooks/exhaustive-deps
38
39
  }, true);
40
+ useEffect(() => {
41
+ return () => {
42
+ animatedImage === null || animatedImage === void 0 || animatedImage.dispose();
43
+ };
44
+ // eslint-disable-next-line react-hooks/exhaustive-deps
45
+ }, []);
39
46
  return currentFrame;
40
47
  };
41
48
  //# sourceMappingURL=useAnimatedImageValue.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useAnimatedImage","throwOnMissingReanimated","useFrameCallback","useSharedValue","DEFAULT_FRAME_DURATION","useAnimatedImageValue","source","currentFrame","lastTimestamp","animatedImage","err","console","error","Error","message","frameDuration","currentFrameDuration","frameInfo","value","timestamp","elapsed","decodeNextFrame","dispose","getCurrentFrame"],"sources":["useAnimatedImageValue.ts"],"sourcesContent":["import type { FrameInfo } from \"react-native-reanimated\";\n\nimport { useAnimatedImage } from \"../../skia/core/AnimatedImage\";\nimport type { DataSourceParam, SkImage } from \"../../skia/types\";\n\nimport {\n throwOnMissingReanimated,\n useFrameCallback,\n useSharedValue,\n} from \"./moduleWrapper\";\n\nconst DEFAULT_FRAME_DURATION = 60;\n\nexport const useAnimatedImageValue = (source: DataSourceParam) => {\n throwOnMissingReanimated();\n const currentFrame = useSharedValue<null | SkImage>(null);\n const lastTimestamp = useSharedValue(0);\n const animatedImage = useAnimatedImage(source, (err) => {\n console.error(err);\n throw new Error(`Could not load animated image - got '${err.message}'`);\n });\n const frameDuration =\n animatedImage?.currentFrameDuration() || DEFAULT_FRAME_DURATION;\n\n useFrameCallback((frameInfo: FrameInfo) => {\n if (!animatedImage) {\n currentFrame.value = null;\n return;\n }\n\n const { timestamp } = frameInfo;\n const elapsed = timestamp - lastTimestamp.value;\n\n // Check if it's time to switch frames based on GIF frame duration\n if (elapsed < frameDuration) {\n return;\n }\n\n // Update the current frame\n animatedImage.decodeNextFrame();\n if (currentFrame.value) {\n currentFrame.value.dispose();\n }\n currentFrame.value = animatedImage.getCurrentFrame();\n\n // Update the last timestamp\n lastTimestamp.value = timestamp;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, true);\n return currentFrame;\n};\n"],"mappings":"AAEA,SAASA,gBAAT,QAAiC,+BAAjC;AAGA,SACEC,wBADF,EAEEC,gBAFF,EAGEC,cAHF,QAIO,iBAJP;AAMA,MAAMC,sBAAsB,GAAG,EAA/B;AAEA,OAAO,MAAMC,qBAAqB,GAAIC,MAAD,IAA6B;EAChEL,wBAAwB;EACxB,MAAMM,YAAY,GAAGJ,cAAc,CAAiB,IAAjB,CAAnC;EACA,MAAMK,aAAa,GAAGL,cAAc,CAAC,CAAD,CAApC;EACA,MAAMM,aAAa,GAAGT,gBAAgB,CAACM,MAAD,EAAUI,GAAD,IAAS;IACtDC,OAAO,CAACC,KAAR,CAAcF,GAAd;IACA,MAAM,IAAIG,KAAJ,CAAW,wCAAuCH,GAAG,CAACI,OAAQ,GAA9D,CAAN;EACD,CAHqC,CAAtC;EAIA,MAAMC,aAAa,GACjB,CAAAN,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAEO,oBAAf,OAAyCZ,sBAD3C;EAGAF,gBAAgB,CAAEe,SAAD,IAA0B;IACzC,IAAI,CAACR,aAAL,EAAoB;MAClBF,YAAY,CAACW,KAAb,GAAqB,IAArB;MACA;IACD;;IAED,MAAM;MAAEC;IAAF,IAAgBF,SAAtB;IACA,MAAMG,OAAO,GAAGD,SAAS,GAAGX,aAAa,CAACU,KAA1C,CAPyC,CASzC;;IACA,IAAIE,OAAO,GAAGL,aAAd,EAA6B;MAC3B;IACD,CAZwC,CAczC;;;IACAN,aAAa,CAACY,eAAd;;IACA,IAAId,YAAY,CAACW,KAAjB,EAAwB;MACtBX,YAAY,CAACW,KAAb,CAAmBI,OAAnB;IACD;;IACDf,YAAY,CAACW,KAAb,GAAqBT,aAAa,CAACc,eAAd,EAArB,CAnByC,CAqBzC;;IACAf,aAAa,CAACU,KAAd,GAAsBC,SAAtB,CAtByC,CAuBzC;EACD,CAxBe,EAwBb,IAxBa,CAAhB;EAyBA,OAAOZ,YAAP;AACD,CArCM"}
1
+ {"version":3,"names":["useEffect","useAnimatedImage","throwOnMissingReanimated","useFrameCallback","useSharedValue","DEFAULT_FRAME_DURATION","useAnimatedImageValue","source","currentFrame","lastTimestamp","animatedImage","err","console","error","Error","message","frameDuration","currentFrameDuration","frameInfo","value","timestamp","elapsed","decodeNextFrame","dispose","getCurrentFrame"],"sources":["useAnimatedImageValue.ts"],"sourcesContent":["import { useEffect } from \"react\";\nimport type { FrameInfo } from \"react-native-reanimated\";\n\nimport { useAnimatedImage } from \"../../skia/core/AnimatedImage\";\nimport type { DataSourceParam, SkImage } from \"../../skia/types\";\n\nimport {\n throwOnMissingReanimated,\n useFrameCallback,\n useSharedValue,\n} from \"./moduleWrapper\";\n\nconst DEFAULT_FRAME_DURATION = 60;\n\nexport const useAnimatedImageValue = (source: DataSourceParam) => {\n throwOnMissingReanimated();\n const currentFrame = useSharedValue<null | SkImage>(null);\n const lastTimestamp = useSharedValue(0);\n const animatedImage = useAnimatedImage(\n source,\n (err) => {\n console.error(err);\n throw new Error(`Could not load animated image - got '${err.message}'`);\n },\n false\n );\n const frameDuration =\n animatedImage?.currentFrameDuration() || DEFAULT_FRAME_DURATION;\n\n useFrameCallback((frameInfo: FrameInfo) => {\n if (!animatedImage) {\n currentFrame.value = null;\n return;\n }\n\n const { timestamp } = frameInfo;\n const elapsed = timestamp - lastTimestamp.value;\n\n // Check if it's time to switch frames based on GIF frame duration\n if (elapsed < frameDuration) {\n return;\n }\n\n // Update the current frame\n animatedImage.decodeNextFrame();\n if (currentFrame.value) {\n currentFrame.value.dispose();\n }\n currentFrame.value = animatedImage.getCurrentFrame();\n\n // Update the last timestamp\n lastTimestamp.value = timestamp;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, true);\n useEffect(() => {\n return () => {\n animatedImage?.dispose();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return currentFrame;\n};\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAO;AAGjC,SAASC,gBAAgB,QAAQ,+BAA+B;AAGhE,SACEC,wBAAwB,EACxBC,gBAAgB,EAChBC,cAAc,QACT,iBAAiB;AAExB,MAAMC,sBAAsB,GAAG,EAAE;AAEjC,OAAO,MAAMC,qBAAqB,GAAIC,MAAuB,IAAK;EAChEL,wBAAwB,CAAC,CAAC;EAC1B,MAAMM,YAAY,GAAGJ,cAAc,CAAiB,IAAI,CAAC;EACzD,MAAMK,aAAa,GAAGL,cAAc,CAAC,CAAC,CAAC;EACvC,MAAMM,aAAa,GAAGT,gBAAgB,CACpCM,MAAM,EACLI,GAAG,IAAK;IACPC,OAAO,CAACC,KAAK,CAACF,GAAG,CAAC;IAClB,MAAM,IAAIG,KAAK,CAAE,wCAAuCH,GAAG,CAACI,OAAQ,GAAE,CAAC;EACzE,CAAC,EACD,KACF,CAAC;EACD,MAAMC,aAAa,GACjB,CAAAN,aAAa,aAAbA,aAAa,uBAAbA,aAAa,CAAEO,oBAAoB,CAAC,CAAC,KAAIZ,sBAAsB;EAEjEF,gBAAgB,CAAEe,SAAoB,IAAK;IACzC,IAAI,CAACR,aAAa,EAAE;MAClBF,YAAY,CAACW,KAAK,GAAG,IAAI;MACzB;IACF;IAEA,MAAM;MAAEC;IAAU,CAAC,GAAGF,SAAS;IAC/B,MAAMG,OAAO,GAAGD,SAAS,GAAGX,aAAa,CAACU,KAAK;;IAE/C;IACA,IAAIE,OAAO,GAAGL,aAAa,EAAE;MAC3B;IACF;;IAEA;IACAN,aAAa,CAACY,eAAe,CAAC,CAAC;IAC/B,IAAId,YAAY,CAACW,KAAK,EAAE;MACtBX,YAAY,CAACW,KAAK,CAACI,OAAO,CAAC,CAAC;IAC9B;IACAf,YAAY,CAACW,KAAK,GAAGT,aAAa,CAACc,eAAe,CAAC,CAAC;;IAEpD;IACAf,aAAa,CAACU,KAAK,GAAGC,SAAS;IAC/B;EACF,CAAC,EAAE,IAAI,CAAC;EACRpB,SAAS,CAAC,MAAM;IACd,OAAO,MAAM;MACXU,aAAa,aAAbA,aAAa,eAAbA,aAAa,CAAEa,OAAO,CAAC,CAAC;IAC1B,CAAC;IACD;EACF,CAAC,EAAE,EAAE,CAAC;EACN,OAAOf,YAAY;AACrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useMemo","useSharedValue","runOnJS","startMapper","stopMapper","useDerivedValueOnJS","fn","deps","init","value","mapperId"],"sources":["useDerivedValueOnJS.ts"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\n\nimport {\n useSharedValue,\n runOnJS,\n startMapper,\n stopMapper,\n} from \"./moduleWrapper\";\n\nexport const useDerivedValueOnJS = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fn: () => any,\n deps: unknown[]\n) => {\n const init = useMemo(() => fn(), [fn]);\n const value = useSharedValue(init);\n useEffect(() => {\n const mapperId = startMapper(() => {\n \"worklet\";\n runOnJS(fn)();\n }, deps);\n return () => stopMapper(mapperId);\n }, [deps, fn]);\n return value;\n};\n"],"mappings":"AAAA,SAASA,SAAT,EAAoBC,OAApB,QAAmC,OAAnC;AAEA,SACEC,cADF,EAEEC,OAFF,EAGEC,WAHF,EAIEC,UAJF,QAKO,iBALP;AAOA,OAAO,MAAMC,mBAAmB,GAAG,CAEjCC,EAFiC,EAGjCC,IAHiC,KAI9B;EACH,MAAMC,IAAI,GAAGR,OAAO,CAAC,MAAMM,EAAE,EAAT,EAAa,CAACA,EAAD,CAAb,CAApB;EACA,MAAMG,KAAK,GAAGR,cAAc,CAACO,IAAD,CAA5B;EACAT,SAAS,CAAC,MAAM;IACd,MAAMW,QAAQ,GAAGP,WAAW,CAAC,MAAM;MACjC;;MACAD,OAAO,CAACI,EAAD,CAAP;IACD,CAH2B,EAGzBC,IAHyB,CAA5B;IAIA,OAAO,MAAMH,UAAU,CAACM,QAAD,CAAvB;EACD,CANQ,EAMN,CAACH,IAAD,EAAOD,EAAP,CANM,CAAT;EAOA,OAAOG,KAAP;AACD,CAfM"}
1
+ {"version":3,"names":["useEffect","useMemo","useSharedValue","runOnJS","startMapper","stopMapper","useDerivedValueOnJS","fn","deps","init","value","mapperId"],"sources":["useDerivedValueOnJS.ts"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\n\nimport {\n useSharedValue,\n runOnJS,\n startMapper,\n stopMapper,\n} from \"./moduleWrapper\";\n\nexport const useDerivedValueOnJS = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fn: () => any,\n deps: unknown[]\n) => {\n const init = useMemo(() => fn(), [fn]);\n const value = useSharedValue(init);\n useEffect(() => {\n const mapperId = startMapper(() => {\n \"worklet\";\n runOnJS(fn)();\n }, deps);\n return () => stopMapper(mapperId);\n }, [deps, fn]);\n return value;\n};\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAE1C,SACEC,cAAc,EACdC,OAAO,EACPC,WAAW,EACXC,UAAU,QACL,iBAAiB;AAExB,OAAO,MAAMC,mBAAmB,GAAGA,CAEjCC,EAAa,EACbC,IAAe,KACZ;EACH,MAAMC,IAAI,GAAGR,OAAO,CAAC,MAAMM,EAAE,CAAC,CAAC,EAAE,CAACA,EAAE,CAAC,CAAC;EACtC,MAAMG,KAAK,GAAGR,cAAc,CAACO,IAAI,CAAC;EAClCT,SAAS,CAAC,MAAM;IACd,MAAMW,QAAQ,GAAGP,WAAW,CAAC,MAAM;MACjC,SAAS;;MACTD,OAAO,CAACI,EAAE,CAAC,CAAC,CAAC;IACf,CAAC,EAAEC,IAAI,CAAC;IACR,OAAO,MAAMH,UAAU,CAACM,QAAQ,CAAC;EACnC,CAAC,EAAE,CAACH,IAAI,EAAED,EAAE,CAAC,CAAC;EACd,OAAOG,KAAK;AACd,CAAC"}
@@ -1,22 +1,21 @@
1
1
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2
2
  // @ts-ignore
3
+
3
4
  import { JsiSkApi } from "../skia/web";
4
5
  import { SkiaRoot } from "../renderer/Reconciler";
5
6
  import { JsiDrawingContext } from "../dom/types";
6
- export * from "../renderer/components"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
+ export * from "../renderer/components";
7
8
 
9
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
10
  let Skia;
9
11
  export const makeOffscreenSurface = (width, height) => {
10
12
  if (!Skia) {
11
13
  Skia = JsiSkApi(CanvasKit);
12
14
  }
13
-
14
15
  const surface = Skia.Surface.MakeOffscreen(width, height);
15
-
16
16
  if (surface === null) {
17
17
  throw new Error("Couldn't create surface!");
18
18
  }
19
-
20
19
  return surface;
21
20
  };
22
21
  export const drawOffscreen = (surface, element) => {
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkApi","SkiaRoot","JsiDrawingContext","Skia","makeOffscreenSurface","width","height","CanvasKit","surface","Surface","MakeOffscreen","Error","drawOffscreen","element","root","render","canvas","getCanvas","ctx","dom","flush","makeImageSnapshot"],"sources":["index.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport CanvasKitInit from \"canvaskit-wasm/bin/full/canvaskit\";\nimport type { ReactNode } from \"react\";\n\nimport { JsiSkApi } from \"../skia/web\";\nimport { SkiaRoot } from \"../renderer/Reconciler\";\nimport { JsiDrawingContext } from \"../dom/types\";\nimport type { SkSurface } from \"../skia\";\n\nexport * from \"../renderer/components\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nlet Skia: any;\n\nexport const makeOffscreenSurface = (width: number, height: number) => {\n if (!Skia) {\n Skia = JsiSkApi(CanvasKit);\n }\n const surface = Skia.Surface.MakeOffscreen(width, height);\n if (surface === null) {\n throw new Error(\"Couldn't create surface!\");\n }\n return surface;\n};\n\nexport const drawOffscreen = (surface: SkSurface, element: ReactNode) => {\n const root = new SkiaRoot(Skia, false);\n root.render(element);\n const canvas = surface.getCanvas();\n const ctx = new JsiDrawingContext(Skia, canvas);\n root.dom.render(ctx);\n surface.flush();\n return surface.makeImageSnapshot();\n};\n"],"mappings":"AAAA;AACA;AAIA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,QAAT,QAAyB,wBAAzB;AACA,SAASC,iBAAT,QAAkC,cAAlC;AAGA,cAAc,wBAAd,C,CAEA;;AACA,IAAIC,IAAJ;AAEA,OAAO,MAAMC,oBAAoB,GAAG,CAACC,KAAD,EAAgBC,MAAhB,KAAmC;EACrE,IAAI,CAACH,IAAL,EAAW;IACTA,IAAI,GAAGH,QAAQ,CAACO,SAAD,CAAf;EACD;;EACD,MAAMC,OAAO,GAAGL,IAAI,CAACM,OAAL,CAAaC,aAAb,CAA2BL,KAA3B,EAAkCC,MAAlC,CAAhB;;EACA,IAAIE,OAAO,KAAK,IAAhB,EAAsB;IACpB,MAAM,IAAIG,KAAJ,CAAU,0BAAV,CAAN;EACD;;EACD,OAAOH,OAAP;AACD,CATM;AAWP,OAAO,MAAMI,aAAa,GAAG,CAACJ,OAAD,EAAqBK,OAArB,KAA4C;EACvE,MAAMC,IAAI,GAAG,IAAIb,QAAJ,CAAaE,IAAb,EAAmB,KAAnB,CAAb;EACAW,IAAI,CAACC,MAAL,CAAYF,OAAZ;EACA,MAAMG,MAAM,GAAGR,OAAO,CAACS,SAAR,EAAf;EACA,MAAMC,GAAG,GAAG,IAAIhB,iBAAJ,CAAsBC,IAAtB,EAA4Ba,MAA5B,CAAZ;EACAF,IAAI,CAACK,GAAL,CAASJ,MAAT,CAAgBG,GAAhB;EACAV,OAAO,CAACY,KAAR;EACA,OAAOZ,OAAO,CAACa,iBAAR,EAAP;AACD,CARM"}
1
+ {"version":3,"names":["JsiSkApi","SkiaRoot","JsiDrawingContext","Skia","makeOffscreenSurface","width","height","CanvasKit","surface","Surface","MakeOffscreen","Error","drawOffscreen","element","root","render","canvas","getCanvas","ctx","dom","flush","makeImageSnapshot"],"sources":["index.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport CanvasKitInit from \"canvaskit-wasm/bin/full/canvaskit\";\nimport type { ReactNode } from \"react\";\n\nimport { JsiSkApi } from \"../skia/web\";\nimport { SkiaRoot } from \"../renderer/Reconciler\";\nimport { JsiDrawingContext } from \"../dom/types\";\nimport type { SkSurface } from \"../skia\";\n\nexport * from \"../renderer/components\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nlet Skia: any;\n\nexport const makeOffscreenSurface = (width: number, height: number) => {\n if (!Skia) {\n Skia = JsiSkApi(CanvasKit);\n }\n const surface = Skia.Surface.MakeOffscreen(width, height);\n if (surface === null) {\n throw new Error(\"Couldn't create surface!\");\n }\n return surface;\n};\n\nexport const drawOffscreen = (surface: SkSurface, element: ReactNode) => {\n const root = new SkiaRoot(Skia, false);\n root.render(element);\n const canvas = surface.getCanvas();\n const ctx = new JsiDrawingContext(Skia, canvas);\n root.dom.render(ctx);\n surface.flush();\n return surface.makeImageSnapshot();\n};\n"],"mappings":"AAAA;AACA;;AAIA,SAASA,QAAQ,QAAQ,aAAa;AACtC,SAASC,QAAQ,QAAQ,wBAAwB;AACjD,SAASC,iBAAiB,QAAQ,cAAc;AAGhD,cAAc,wBAAwB;;AAEtC;AACA,IAAIC,IAAS;AAEb,OAAO,MAAMC,oBAAoB,GAAGA,CAACC,KAAa,EAAEC,MAAc,KAAK;EACrE,IAAI,CAACH,IAAI,EAAE;IACTA,IAAI,GAAGH,QAAQ,CAACO,SAAS,CAAC;EAC5B;EACA,MAAMC,OAAO,GAAGL,IAAI,CAACM,OAAO,CAACC,aAAa,CAACL,KAAK,EAAEC,MAAM,CAAC;EACzD,IAAIE,OAAO,KAAK,IAAI,EAAE;IACpB,MAAM,IAAIG,KAAK,CAAC,0BAA0B,CAAC;EAC7C;EACA,OAAOH,OAAO;AAChB,CAAC;AAED,OAAO,MAAMI,aAAa,GAAGA,CAACJ,OAAkB,EAAEK,OAAkB,KAAK;EACvE,MAAMC,IAAI,GAAG,IAAIb,QAAQ,CAACE,IAAI,EAAE,KAAK,CAAC;EACtCW,IAAI,CAACC,MAAM,CAACF,OAAO,CAAC;EACpB,MAAMG,MAAM,GAAGR,OAAO,CAACS,SAAS,CAAC,CAAC;EAClC,MAAMC,GAAG,GAAG,IAAIhB,iBAAiB,CAACC,IAAI,EAAEa,MAAM,CAAC;EAC/CF,IAAI,CAACK,GAAG,CAACJ,MAAM,CAACG,GAAG,CAAC;EACpBV,OAAO,CAACY,KAAK,CAAC,CAAC;EACf,OAAOZ,OAAO,CAACa,iBAAiB,CAAC,CAAC;AACpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkImage"],"sources":["index.ts"],"sourcesContent":["import \"./skia/NativeSetup\";\nexport { JsiSkImage } from \"./skia/web/JsiSkImage\";\nexport * from \"./renderer\";\nexport * from \"./renderer/Canvas\";\nexport * from \"./renderer/Offscreen\";\nexport * from \"./views\";\nexport * from \"./skia\";\nexport * from \"./external\";\nexport * from \"./animation\";\nexport * from \"./dom/types\";\nexport * from \"./dom/nodes\";\n"],"mappings":"AAAA,OAAO,oBAAP;AACA,SAASA,UAAT,QAA2B,uBAA3B;AACA,cAAc,YAAd;AACA,cAAc,mBAAd;AACA,cAAc,sBAAd;AACA,cAAc,SAAd;AACA,cAAc,QAAd;AACA,cAAc,YAAd;AACA,cAAc,aAAd;AACA,cAAc,aAAd;AACA,cAAc,aAAd"}
1
+ {"version":3,"names":["JsiSkImage"],"sources":["index.ts"],"sourcesContent":["import \"./skia/NativeSetup\";\nexport { JsiSkImage } from \"./skia/web/JsiSkImage\";\nexport * from \"./renderer\";\nexport * from \"./renderer/Canvas\";\nexport * from \"./renderer/Offscreen\";\nexport * from \"./views\";\nexport * from \"./skia\";\nexport * from \"./external\";\nexport * from \"./animation\";\nexport * from \"./dom/types\";\nexport * from \"./dom/nodes\";\n"],"mappings":"AAAA,OAAO,oBAAoB;AAC3B,SAASA,UAAU,QAAQ,uBAAuB;AAClD,cAAc,YAAY;AAC1B,cAAc,mBAAmB;AACjC,cAAc,sBAAsB;AACpC,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,aAAa;AAC3B,cAAc,aAAa;AAC3B,cAAc,aAAa"}
@@ -1,15 +1,13 @@
1
- import { JsiSkApi } from "../skia/web"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
1
+ import { JsiSkApi } from "../skia/web";
2
2
 
3
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3
4
  const Noop = () => undefined;
4
-
5
5
  const NoopValue = () => ({
6
6
  current: 0
7
7
  });
8
-
9
8
  const NoopSharedValue = () => ({
10
9
  value: 0
11
10
  });
12
-
13
11
  export const Mock = CanvasKit => {
14
12
  global.SkiaApi = JsiSkApi(CanvasKit);
15
13
  const Skia = global.SkiaApi;
@@ -36,6 +34,11 @@ export const Mock = CanvasKit => {
36
34
  usePathInterpolation: NoopSharedValue,
37
35
  useTextureValue: NoopSharedValue,
38
36
  useTextureValueFromPicture: NoopSharedValue,
37
+ useRSXformBuffer: NoopSharedValue,
38
+ usePointBuffer: NoopSharedValue,
39
+ useColorBuffer: NoopSharedValue,
40
+ useRectBuffer: NoopSharedValue,
41
+ useBuffer: NoopSharedValue,
39
42
  useRawData: Noop,
40
43
  useData: Noop,
41
44
  useFont: () => Skia.Font(undefined, 0),
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkApi","Noop","undefined","NoopValue","current","NoopSharedValue","value","Mock","CanvasKit","global","SkiaApi","Skia","require","Canvas","useValue","useComputedValue","useTouchHandler","useTiming","useLoop","useSpring","useClockValue","useValueEffect","useClock","usePathInterpolation","useTextureValue","useTextureValueFromPicture","useRawData","useData","useFont","Font","useFonts","useTypeface","useImage","useSVG"],"sources":["index.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport { JsiSkApi } from \"../skia/web\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst Noop: () => any = () => undefined;\nconst NoopValue = () => ({ current: 0 });\nconst NoopSharedValue = () => ({ value: 0 });\n\nexport const Mock = (CanvasKit: CanvasKit) => {\n global.SkiaApi = JsiSkApi(CanvasKit);\n const Skia = global.SkiaApi;\n return {\n Skia,\n ...require(\"../renderer/components\"),\n ...require(\"../skia\"),\n ...require(\"../animation\"),\n ...require(\"../dom/types\"),\n ...require(\"../dom/nodes\"),\n // We could use the real Canvas if we mock the SkiaView component for node\n Canvas: Noop,\n // Skia Animations\n useValue: NoopValue,\n useComputedValue: NoopValue,\n useTouchHandler: Noop,\n useTiming: NoopValue,\n useLoop: NoopValue,\n useSpring: NoopValue,\n useClockValue: NoopValue,\n useValueEffect: Noop,\n // Reanimated hooks\n useClock: NoopSharedValue,\n usePathInterpolation: NoopSharedValue,\n useTextureValue: NoopSharedValue,\n useTextureValueFromPicture: NoopSharedValue,\n useRawData: Noop,\n useData: Noop,\n useFont: () => Skia.Font(undefined, 0),\n useFonts: Noop,\n useTypeface: () => null,\n useImage: () => null,\n useSVG: () => null,\n };\n};\n"],"mappings":"AAEA,SAASA,QAAT,QAAyB,aAAzB,C,CAEA;;AACA,MAAMC,IAAe,GAAG,MAAMC,SAA9B;;AACA,MAAMC,SAAS,GAAG,OAAO;EAAEC,OAAO,EAAE;AAAX,CAAP,CAAlB;;AACA,MAAMC,eAAe,GAAG,OAAO;EAAEC,KAAK,EAAE;AAAT,CAAP,CAAxB;;AAEA,OAAO,MAAMC,IAAI,GAAIC,SAAD,IAA0B;EAC5CC,MAAM,CAACC,OAAP,GAAiBV,QAAQ,CAACQ,SAAD,CAAzB;EACA,MAAMG,IAAI,GAAGF,MAAM,CAACC,OAApB;EACA,OAAO;IACLC,IADK;IAEL,GAAGC,OAAO,CAAC,wBAAD,CAFL;IAGL,GAAGA,OAAO,CAAC,SAAD,CAHL;IAIL,GAAGA,OAAO,CAAC,cAAD,CAJL;IAKL,GAAGA,OAAO,CAAC,cAAD,CALL;IAML,GAAGA,OAAO,CAAC,cAAD,CANL;IAOL;IACAC,MAAM,EAAEZ,IARH;IASL;IACAa,QAAQ,EAAEX,SAVL;IAWLY,gBAAgB,EAAEZ,SAXb;IAYLa,eAAe,EAAEf,IAZZ;IAaLgB,SAAS,EAAEd,SAbN;IAcLe,OAAO,EAAEf,SAdJ;IAeLgB,SAAS,EAAEhB,SAfN;IAgBLiB,aAAa,EAAEjB,SAhBV;IAiBLkB,cAAc,EAAEpB,IAjBX;IAkBL;IACAqB,QAAQ,EAAEjB,eAnBL;IAoBLkB,oBAAoB,EAAElB,eApBjB;IAqBLmB,eAAe,EAAEnB,eArBZ;IAsBLoB,0BAA0B,EAAEpB,eAtBvB;IAuBLqB,UAAU,EAAEzB,IAvBP;IAwBL0B,OAAO,EAAE1B,IAxBJ;IAyBL2B,OAAO,EAAE,MAAMjB,IAAI,CAACkB,IAAL,CAAU3B,SAAV,EAAqB,CAArB,CAzBV;IA0BL4B,QAAQ,EAAE7B,IA1BL;IA2BL8B,WAAW,EAAE,MAAM,IA3Bd;IA4BLC,QAAQ,EAAE,MAAM,IA5BX;IA6BLC,MAAM,EAAE,MAAM;EA7BT,CAAP;AA+BD,CAlCM"}
1
+ {"version":3,"names":["JsiSkApi","Noop","undefined","NoopValue","current","NoopSharedValue","value","Mock","CanvasKit","global","SkiaApi","Skia","require","Canvas","useValue","useComputedValue","useTouchHandler","useTiming","useLoop","useSpring","useClockValue","useValueEffect","useClock","usePathInterpolation","useTextureValue","useTextureValueFromPicture","useRSXformBuffer","usePointBuffer","useColorBuffer","useRectBuffer","useBuffer","useRawData","useData","useFont","Font","useFonts","useTypeface","useImage","useSVG"],"sources":["index.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport { JsiSkApi } from \"../skia/web\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst Noop: () => any = () => undefined;\nconst NoopValue = () => ({ current: 0 });\nconst NoopSharedValue = () => ({ value: 0 });\n\nexport const Mock = (CanvasKit: CanvasKit) => {\n global.SkiaApi = JsiSkApi(CanvasKit);\n const Skia = global.SkiaApi;\n return {\n Skia,\n ...require(\"../renderer/components\"),\n ...require(\"../skia\"),\n ...require(\"../animation\"),\n ...require(\"../dom/types\"),\n ...require(\"../dom/nodes\"),\n // We could use the real Canvas if we mock the SkiaView component for node\n Canvas: Noop,\n // Skia Animations\n useValue: NoopValue,\n useComputedValue: NoopValue,\n useTouchHandler: Noop,\n useTiming: NoopValue,\n useLoop: NoopValue,\n useSpring: NoopValue,\n useClockValue: NoopValue,\n useValueEffect: Noop,\n // Reanimated hooks\n useClock: NoopSharedValue,\n usePathInterpolation: NoopSharedValue,\n useTextureValue: NoopSharedValue,\n useTextureValueFromPicture: NoopSharedValue,\n useRSXformBuffer: NoopSharedValue,\n usePointBuffer: NoopSharedValue,\n useColorBuffer: NoopSharedValue,\n useRectBuffer: NoopSharedValue,\n useBuffer: NoopSharedValue,\n useRawData: Noop,\n useData: Noop,\n useFont: () => Skia.Font(undefined, 0),\n useFonts: Noop,\n useTypeface: () => null,\n useImage: () => null,\n useSVG: () => null,\n };\n};\n"],"mappings":"AAEA,SAASA,QAAQ,QAAQ,aAAa;;AAEtC;AACA,MAAMC,IAAe,GAAGA,CAAA,KAAMC,SAAS;AACvC,MAAMC,SAAS,GAAGA,CAAA,MAAO;EAAEC,OAAO,EAAE;AAAE,CAAC,CAAC;AACxC,MAAMC,eAAe,GAAGA,CAAA,MAAO;EAAEC,KAAK,EAAE;AAAE,CAAC,CAAC;AAE5C,OAAO,MAAMC,IAAI,GAAIC,SAAoB,IAAK;EAC5CC,MAAM,CAACC,OAAO,GAAGV,QAAQ,CAACQ,SAAS,CAAC;EACpC,MAAMG,IAAI,GAAGF,MAAM,CAACC,OAAO;EAC3B,OAAO;IACLC,IAAI;IACJ,GAAGC,OAAO,CAAC,wBAAwB,CAAC;IACpC,GAAGA,OAAO,CAAC,SAAS,CAAC;IACrB,GAAGA,OAAO,CAAC,cAAc,CAAC;IAC1B,GAAGA,OAAO,CAAC,cAAc,CAAC;IAC1B,GAAGA,OAAO,CAAC,cAAc,CAAC;IAC1B;IACAC,MAAM,EAAEZ,IAAI;IACZ;IACAa,QAAQ,EAAEX,SAAS;IACnBY,gBAAgB,EAAEZ,SAAS;IAC3Ba,eAAe,EAAEf,IAAI;IACrBgB,SAAS,EAAEd,SAAS;IACpBe,OAAO,EAAEf,SAAS;IAClBgB,SAAS,EAAEhB,SAAS;IACpBiB,aAAa,EAAEjB,SAAS;IACxBkB,cAAc,EAAEpB,IAAI;IACpB;IACAqB,QAAQ,EAAEjB,eAAe;IACzBkB,oBAAoB,EAAElB,eAAe;IACrCmB,eAAe,EAAEnB,eAAe;IAChCoB,0BAA0B,EAAEpB,eAAe;IAC3CqB,gBAAgB,EAAErB,eAAe;IACjCsB,cAAc,EAAEtB,eAAe;IAC/BuB,cAAc,EAAEvB,eAAe;IAC/BwB,aAAa,EAAExB,eAAe;IAC9ByB,SAAS,EAAEzB,eAAe;IAC1B0B,UAAU,EAAE9B,IAAI;IAChB+B,OAAO,EAAE/B,IAAI;IACbgC,OAAO,EAAEA,CAAA,KAAMtB,IAAI,CAACuB,IAAI,CAAChC,SAAS,EAAE,CAAC,CAAC;IACtCiC,QAAQ,EAAElC,IAAI;IACdmC,WAAW,EAAEA,CAAA,KAAM,IAAI;IACvBC,QAAQ,EAAEA,CAAA,KAAM,IAAI;IACpBC,MAAM,EAAEA,CAAA,KAAM;EAChB,CAAC;AACH,CAAC"}