@shopify/react-native-skia 0.1.130 → 0.1.131

Sign up to get free protection for your applications and to get access to all the features.
Files changed (942) hide show
  1. package/README.md +8 -0
  2. package/android/cpp/jni/JniSkiaDrawView.cpp +3 -2
  3. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +2 -1
  4. package/cpp/api/JsiSkCanvas.h +2 -2
  5. package/cpp/api/JsiSkMatrix.h +40 -27
  6. package/cpp/api/JsiSkPaint.h +3 -1
  7. package/cpp/api/JsiSkPath.h +67 -61
  8. package/cpp/api/JsiSkPathFactory.h +14 -1
  9. package/cpp/api/JsiSkRuntimeShaderBuilder.h +18 -0
  10. package/cpp/api/JsiSkTypeface.h +11 -2
  11. package/cpp/api/JsiSkTypefaceFactory.h +5 -1
  12. package/cpp/rnskia/RNSkInfoParameter.h +2 -0
  13. package/cpp/utils/RNSkLog.h +22 -0
  14. package/ios/RNSkia-iOS/SkiaDrawView.mm +2 -1
  15. package/lib/commonjs/animation/functions/index.js +47 -17
  16. package/lib/commonjs/animation/functions/index.js.map +1 -1
  17. package/lib/commonjs/animation/functions/interpolatePaths.js +45 -0
  18. package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -0
  19. package/lib/commonjs/animation/functions/interpolateVector.js +20 -0
  20. package/lib/commonjs/animation/functions/interpolateVector.js.map +1 -0
  21. package/lib/commonjs/index.js +13 -0
  22. package/lib/commonjs/index.js.map +1 -1
  23. package/lib/commonjs/renderer/Canvas.js +19 -35
  24. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  25. package/lib/commonjs/renderer/HostConfig.js +2 -2
  26. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  27. package/lib/commonjs/renderer/components/Blend.js +10 -7
  28. package/lib/commonjs/renderer/components/Blend.js.map +1 -1
  29. package/lib/commonjs/renderer/components/Compose.js +9 -6
  30. package/lib/commonjs/renderer/components/Compose.js.map +1 -1
  31. package/lib/commonjs/renderer/components/Group.js +7 -6
  32. package/lib/commonjs/renderer/components/Group.js.map +1 -1
  33. package/lib/commonjs/renderer/components/Mask.js +13 -10
  34. package/lib/commonjs/renderer/components/Mask.js.map +1 -1
  35. package/lib/commonjs/renderer/components/Paint.js +7 -4
  36. package/lib/commonjs/renderer/components/Paint.js.map +1 -1
  37. package/lib/commonjs/renderer/components/Picture.js.map +1 -1
  38. package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js +1 -1
  39. package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -1
  40. package/lib/commonjs/renderer/components/colorFilters/BlendColor.js +7 -6
  41. package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -1
  42. package/lib/commonjs/renderer/components/colorFilters/Compose.js +6 -6
  43. package/lib/commonjs/renderer/components/colorFilters/Compose.js.map +1 -1
  44. package/lib/commonjs/renderer/components/colorFilters/Lerp.js +8 -7
  45. package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
  46. package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js +6 -6
  47. package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
  48. package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js +6 -6
  49. package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
  50. package/lib/commonjs/renderer/components/colorFilters/Matrix.js +6 -7
  51. package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -1
  52. package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js +6 -6
  53. package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
  54. package/lib/commonjs/renderer/components/image/BoxFit.js +7 -9
  55. package/lib/commonjs/renderer/components/image/BoxFit.js.map +1 -1
  56. package/lib/commonjs/renderer/components/image/Image.js +3 -2
  57. package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
  58. package/lib/commonjs/renderer/components/image/ImageSVG.js +3 -2
  59. package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -1
  60. package/lib/commonjs/renderer/components/image/ImageShader.js +9 -6
  61. package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
  62. package/lib/commonjs/renderer/components/imageFilters/Blur.js +7 -4
  63. package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
  64. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +10 -7
  65. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  66. package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js +10 -15
  67. package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -1
  68. package/lib/commonjs/renderer/components/imageFilters/Morphology.js +7 -6
  69. package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
  70. package/lib/commonjs/renderer/components/imageFilters/Offset.js +5 -4
  71. package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
  72. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js +13 -6
  73. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  74. package/lib/commonjs/renderer/components/imageFilters/Shadow.js +8 -7
  75. package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
  76. package/lib/commonjs/renderer/components/imageFilters/getInput.js +7 -7
  77. package/lib/commonjs/renderer/components/imageFilters/getInput.js.map +1 -1
  78. package/lib/commonjs/renderer/components/maskFilters/Blur.js +6 -3
  79. package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
  80. package/lib/commonjs/renderer/components/pathEffects/Corner.js +8 -6
  81. package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
  82. package/lib/commonjs/renderer/components/pathEffects/Dash.js +8 -6
  83. package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
  84. package/lib/commonjs/renderer/components/pathEffects/Discrete.js +8 -6
  85. package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
  86. package/lib/commonjs/renderer/components/pathEffects/Line2D.js +8 -6
  87. package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
  88. package/lib/commonjs/renderer/components/pathEffects/Path1D.js +8 -6
  89. package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
  90. package/lib/commonjs/renderer/components/pathEffects/Path2D.js +8 -6
  91. package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
  92. package/lib/commonjs/renderer/components/pathEffects/Sum.js +7 -4
  93. package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
  94. package/lib/commonjs/renderer/components/shaders/Color.js +7 -4
  95. package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -1
  96. package/lib/commonjs/renderer/components/shaders/FractalNoise.js +5 -4
  97. package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
  98. package/lib/commonjs/renderer/components/shaders/Gradient.js +5 -5
  99. package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -1
  100. package/lib/commonjs/renderer/components/shaders/LinearGradient.js +6 -5
  101. package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -1
  102. package/lib/commonjs/renderer/components/shaders/RadialGradient.js +6 -5
  103. package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -1
  104. package/lib/commonjs/renderer/components/shaders/Shader.js +6 -43
  105. package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
  106. package/lib/commonjs/renderer/components/shaders/SweepGradient.js +6 -5
  107. package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -1
  108. package/lib/commonjs/renderer/components/shaders/Turbulence.js +5 -4
  109. package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
  110. package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js +6 -5
  111. package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
  112. package/lib/commonjs/renderer/components/shapes/Box.js +26 -29
  113. package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
  114. package/lib/commonjs/renderer/components/shapes/Circle.js +7 -5
  115. package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
  116. package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
  117. package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
  118. package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -1
  119. package/lib/commonjs/renderer/components/shapes/Oval.js +3 -2
  120. package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
  121. package/lib/commonjs/renderer/components/shapes/Patch.js +8 -5
  122. package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
  123. package/lib/commonjs/renderer/components/shapes/Path.js +5 -4
  124. package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
  125. package/lib/commonjs/renderer/components/shapes/Points.js +2 -2
  126. package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
  127. package/lib/commonjs/renderer/components/shapes/Rect.js +3 -2
  128. package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -1
  129. package/lib/commonjs/renderer/components/shapes/RoundedRect.js +3 -2
  130. package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
  131. package/lib/commonjs/renderer/components/shapes/Vertices.js +9 -8
  132. package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
  133. package/lib/commonjs/renderer/components/text/Glyphs.js +3 -2
  134. package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
  135. package/lib/commonjs/renderer/components/text/Text.js +3 -2
  136. package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
  137. package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
  138. package/lib/commonjs/renderer/components/text/TextPath.js +7 -11
  139. package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
  140. package/lib/commonjs/renderer/index.js +13 -13
  141. package/lib/commonjs/renderer/index.js.map +1 -1
  142. package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -1
  143. package/lib/commonjs/renderer/nodes/Drawing.js +5 -5
  144. package/lib/commonjs/renderer/nodes/Drawing.js.map +1 -1
  145. package/lib/commonjs/renderer/nodes/Node.js.map +1 -1
  146. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  147. package/lib/commonjs/renderer/processors/Circles.js +2 -4
  148. package/lib/commonjs/renderer/processors/Circles.js.map +1 -1
  149. package/lib/commonjs/renderer/processors/Clips.js +5 -5
  150. package/lib/commonjs/renderer/processors/Clips.js.map +1 -1
  151. package/lib/commonjs/{skia/core → renderer/processors}/Color.js +2 -6
  152. package/lib/commonjs/renderer/processors/Color.js.map +1 -0
  153. package/lib/commonjs/renderer/processors/Font.js +4 -4
  154. package/lib/commonjs/renderer/processors/Font.js.map +1 -1
  155. package/lib/commonjs/renderer/processors/Paint.js +18 -14
  156. package/lib/commonjs/renderer/processors/Paint.js.map +1 -1
  157. package/lib/commonjs/renderer/processors/Paths.js +4 -4
  158. package/lib/commonjs/renderer/processors/Paths.js.map +1 -1
  159. package/lib/commonjs/renderer/processors/Radius.js +2 -4
  160. package/lib/commonjs/renderer/processors/Radius.js.map +1 -1
  161. package/lib/commonjs/renderer/processors/Rects.js +8 -59
  162. package/lib/commonjs/renderer/processors/Rects.js.map +1 -1
  163. package/lib/commonjs/renderer/processors/Transform.js +26 -17
  164. package/lib/commonjs/renderer/processors/Transform.js.map +1 -1
  165. package/lib/commonjs/renderer/processors/index.js +26 -13
  166. package/lib/commonjs/renderer/processors/index.js.map +1 -1
  167. package/lib/commonjs/renderer/processors/math/Coordinates.js.map +1 -1
  168. package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -1
  169. package/lib/commonjs/renderer/processors/math/index.js +0 -26
  170. package/lib/commonjs/renderer/processors/math/index.js.map +1 -1
  171. package/lib/commonjs/renderer/useCanvas.js +30 -0
  172. package/lib/commonjs/renderer/useCanvas.js.map +1 -0
  173. package/lib/commonjs/skia/NativeSetup.js +1 -1
  174. package/lib/commonjs/skia/NativeSetup.js.map +1 -1
  175. package/lib/commonjs/skia/Skia.web.js +12 -0
  176. package/lib/commonjs/skia/Skia.web.js.map +1 -0
  177. package/lib/commonjs/skia/core/Data.js +9 -4
  178. package/lib/commonjs/skia/core/Data.js.map +1 -1
  179. package/lib/commonjs/skia/core/Font.js +2 -4
  180. package/lib/commonjs/skia/core/Font.js.map +1 -1
  181. package/lib/commonjs/skia/core/Matrix.js +15 -0
  182. package/lib/commonjs/skia/core/Matrix.js.map +1 -0
  183. package/lib/commonjs/skia/core/Paint.js +4 -12
  184. package/lib/commonjs/skia/core/Paint.js.map +1 -1
  185. package/lib/commonjs/skia/core/Path.js +14 -2
  186. package/lib/commonjs/skia/core/Path.js.map +1 -1
  187. package/lib/commonjs/skia/core/RRect.js +13 -0
  188. package/lib/commonjs/skia/core/RRect.js.map +1 -0
  189. package/lib/commonjs/skia/core/Rect.js +47 -0
  190. package/lib/commonjs/skia/core/Rect.js.map +1 -0
  191. package/lib/commonjs/skia/core/Vector.js +49 -0
  192. package/lib/commonjs/skia/core/Vector.js.map +1 -0
  193. package/lib/commonjs/skia/core/index.js +51 -25
  194. package/lib/commonjs/skia/core/index.js.map +1 -1
  195. package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -1
  196. package/lib/commonjs/skia/types/Matrix.js +58 -1
  197. package/lib/commonjs/skia/types/Matrix.js.map +1 -1
  198. package/lib/commonjs/skia/types/Path/Path.js +1 -0
  199. package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
  200. package/lib/commonjs/skia/types/Point.js.map +1 -1
  201. package/lib/commonjs/skia/types/RRect.js +7 -0
  202. package/lib/commonjs/skia/types/RRect.js.map +1 -1
  203. package/lib/commonjs/skia/types/Shader/Shader.js +51 -1
  204. package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
  205. package/lib/commonjs/skia/web/{api/Host.js → Host.js} +10 -1
  206. package/lib/commonjs/skia/web/Host.js.map +1 -0
  207. package/lib/commonjs/skia/web/JsiImageFilterFactory.js +68 -0
  208. package/lib/commonjs/skia/web/JsiImageFilterFactory.js.map +1 -0
  209. package/lib/commonjs/skia/web/{api/JsiSkCanvas.js → JsiSkCanvas.js} +20 -6
  210. package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -0
  211. package/lib/commonjs/skia/web/{api/JsiSkColor.js → JsiSkColor.js} +163 -4
  212. package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -0
  213. package/lib/commonjs/skia/web/{api/JsiSkColorFilter.js → JsiSkColorFilter.js} +0 -0
  214. package/lib/commonjs/skia/web/{api/JsiSkColorFilter.js.map → JsiSkColorFilter.js.map} +1 -1
  215. package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js +48 -0
  216. package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -0
  217. package/lib/commonjs/skia/web/JsiSkContourMeasure.js +42 -0
  218. package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -0
  219. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js +30 -0
  220. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -0
  221. package/lib/commonjs/skia/web/JsiSkData.js +18 -0
  222. package/lib/commonjs/skia/web/JsiSkData.js.map +1 -0
  223. package/lib/commonjs/skia/web/JsiSkDataFactory.js +44 -0
  224. package/lib/commonjs/skia/web/JsiSkDataFactory.js.map +1 -0
  225. package/lib/commonjs/skia/web/JsiSkFont.js +111 -0
  226. package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -0
  227. package/lib/commonjs/skia/web/JsiSkFontMgr.js +35 -0
  228. package/lib/commonjs/skia/web/JsiSkFontMgr.js.map +1 -0
  229. package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js +25 -0
  230. package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js.map +1 -0
  231. package/lib/commonjs/skia/web/{api/JsiSkImage.js → JsiSkImage.js} +0 -0
  232. package/lib/commonjs/skia/web/{api/JsiSkImage.js.map → JsiSkImage.js.map} +1 -1
  233. package/lib/commonjs/skia/web/JsiSkImageFactory.js +47 -0
  234. package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -0
  235. package/lib/commonjs/skia/web/JsiSkImageFilter.js +18 -0
  236. package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -0
  237. package/lib/commonjs/skia/web/JsiSkMaskFilter.js +18 -0
  238. package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -0
  239. package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js +24 -0
  240. package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
  241. package/lib/commonjs/skia/web/JsiSkMatrix.js +38 -0
  242. package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -0
  243. package/lib/commonjs/skia/web/{api/JsiSkPaint.js → JsiSkPaint.js} +4 -9
  244. package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -0
  245. package/lib/commonjs/skia/web/JsiSkPath.js +324 -0
  246. package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -0
  247. package/lib/commonjs/skia/web/JsiSkPathEffect.js +18 -0
  248. package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -0
  249. package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js +78 -0
  250. package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -0
  251. package/lib/commonjs/skia/web/JsiSkPathFactory.js +58 -0
  252. package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -0
  253. package/lib/commonjs/skia/web/JsiSkPicture.js +29 -0
  254. package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -0
  255. package/lib/commonjs/skia/web/JsiSkPictureFactory.js +30 -0
  256. package/lib/commonjs/skia/web/JsiSkPictureFactory.js.map +1 -0
  257. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +30 -0
  258. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -0
  259. package/lib/commonjs/skia/web/JsiSkPoint.js +26 -0
  260. package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -0
  261. package/lib/commonjs/skia/web/JsiSkRRect.js +32 -0
  262. package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -0
  263. package/lib/commonjs/skia/web/JsiSkRSXform.js +18 -0
  264. package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -0
  265. package/lib/commonjs/skia/web/{api/JsiSkRect.js → JsiSkRect.js} +8 -0
  266. package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -0
  267. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +44 -0
  268. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -0
  269. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +30 -0
  270. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
  271. package/lib/commonjs/skia/web/JsiSkSVGFactory.js +26 -0
  272. package/lib/commonjs/skia/web/JsiSkSVGFactory.js.map +1 -0
  273. package/lib/commonjs/skia/web/JsiSkShader.js +18 -0
  274. package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -0
  275. package/lib/commonjs/skia/web/JsiSkShaderFactory.js +52 -0
  276. package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -0
  277. package/lib/commonjs/skia/web/{api/JsiSkSurface.js → JsiSkSurface.js} +0 -0
  278. package/lib/commonjs/skia/web/{api/JsiSkSurface.js.map → JsiSkSurface.js.map} +1 -1
  279. package/lib/commonjs/skia/web/{api/JsiSkSurfaceFactory.js → JsiSkSurfaceFactory.js} +0 -0
  280. package/lib/commonjs/skia/web/{api/JsiSkSurfaceFactory.js.map → JsiSkSurfaceFactory.js.map} +1 -1
  281. package/lib/commonjs/skia/web/JsiSkTextBlob.js +18 -0
  282. package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -0
  283. package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js +36 -0
  284. package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -0
  285. package/lib/commonjs/skia/web/JsiSkTypeface.js +28 -0
  286. package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -0
  287. package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js +30 -0
  288. package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js.map +1 -0
  289. package/lib/commonjs/skia/web/JsiSkVertices.js +28 -0
  290. package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -0
  291. package/lib/commonjs/skia/web/JsiSkVerticesFactory.js +27 -0
  292. package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -0
  293. package/lib/commonjs/skia/web/JsiSkia.js +97 -0
  294. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -0
  295. package/lib/commonjs/skia/web/index.js +4 -4
  296. package/lib/commonjs/skia/web/index.js.map +1 -1
  297. package/lib/commonjs/values/web/api.js +2 -2
  298. package/lib/commonjs/values/web/api.js.map +1 -1
  299. package/lib/commonjs/views/SkiaView.web.js +216 -0
  300. package/lib/commonjs/views/SkiaView.web.js.map +1 -0
  301. package/lib/commonjs/views/types.js.map +1 -1
  302. package/lib/commonjs/views/useTouchHandler.js +70 -46
  303. package/lib/commonjs/views/useTouchHandler.js.map +1 -1
  304. package/lib/commonjs/web/index.js +20 -0
  305. package/lib/commonjs/web/index.js.map +1 -0
  306. package/lib/module/animation/functions/index.js +4 -2
  307. package/lib/module/animation/functions/index.js.map +1 -1
  308. package/lib/module/animation/functions/interpolatePaths.js +36 -0
  309. package/lib/module/animation/functions/interpolatePaths.js.map +1 -0
  310. package/lib/module/animation/functions/interpolateVector.js +7 -0
  311. package/lib/module/animation/functions/interpolateVector.js.map +1 -0
  312. package/lib/module/index.js +1 -0
  313. package/lib/module/index.js.map +1 -1
  314. package/lib/module/renderer/Canvas.js +15 -26
  315. package/lib/module/renderer/Canvas.js.map +1 -1
  316. package/lib/module/renderer/HostConfig.js +2 -2
  317. package/lib/module/renderer/HostConfig.js.map +1 -1
  318. package/lib/module/renderer/components/Blend.js +5 -2
  319. package/lib/module/renderer/components/Blend.js.map +1 -1
  320. package/lib/module/renderer/components/Compose.js +5 -2
  321. package/lib/module/renderer/components/Compose.js.map +1 -1
  322. package/lib/module/renderer/components/Group.js +7 -6
  323. package/lib/module/renderer/components/Group.js.map +1 -1
  324. package/lib/module/renderer/components/Mask.js +7 -3
  325. package/lib/module/renderer/components/Mask.js.map +1 -1
  326. package/lib/module/renderer/components/Paint.js +6 -3
  327. package/lib/module/renderer/components/Paint.js.map +1 -1
  328. package/lib/module/renderer/components/Picture.js.map +1 -1
  329. package/lib/module/renderer/components/backdrop/BackdropFilter.js +1 -1
  330. package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -1
  331. package/lib/module/renderer/components/colorFilters/BlendColor.js +6 -3
  332. package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -1
  333. package/lib/module/renderer/components/colorFilters/Compose.js +2 -2
  334. package/lib/module/renderer/components/colorFilters/Compose.js.map +1 -1
  335. package/lib/module/renderer/components/colorFilters/Lerp.js +6 -3
  336. package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
  337. package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js +5 -3
  338. package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
  339. package/lib/module/renderer/components/colorFilters/LumaColorFilter.js +5 -3
  340. package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
  341. package/lib/module/renderer/components/colorFilters/Matrix.js +5 -3
  342. package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -1
  343. package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js +5 -3
  344. package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
  345. package/lib/module/renderer/components/image/BoxFit.js +7 -8
  346. package/lib/module/renderer/components/image/BoxFit.js.map +1 -1
  347. package/lib/module/renderer/components/image/Image.js +3 -2
  348. package/lib/module/renderer/components/image/Image.js.map +1 -1
  349. package/lib/module/renderer/components/image/ImageSVG.js +3 -2
  350. package/lib/module/renderer/components/image/ImageSVG.js.map +1 -1
  351. package/lib/module/renderer/components/image/ImageShader.js +10 -7
  352. package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
  353. package/lib/module/renderer/components/imageFilters/Blur.js +7 -4
  354. package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
  355. package/lib/module/renderer/components/imageFilters/DisplacementMap.js +7 -4
  356. package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  357. package/lib/module/renderer/components/imageFilters/InnerShadow.js +3 -3
  358. package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -1
  359. package/lib/module/renderer/components/imageFilters/Morphology.js +6 -4
  360. package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
  361. package/lib/module/renderer/components/imageFilters/Offset.js +5 -3
  362. package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
  363. package/lib/module/renderer/components/imageFilters/RuntimeShader.js +13 -4
  364. package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  365. package/lib/module/renderer/components/imageFilters/Shadow.js +6 -5
  366. package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
  367. package/lib/module/renderer/components/imageFilters/getInput.js +2 -2
  368. package/lib/module/renderer/components/imageFilters/getInput.js.map +1 -1
  369. package/lib/module/renderer/components/maskFilters/Blur.js +5 -2
  370. package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
  371. package/lib/module/renderer/components/pathEffects/Corner.js +5 -2
  372. package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
  373. package/lib/module/renderer/components/pathEffects/Dash.js +5 -2
  374. package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
  375. package/lib/module/renderer/components/pathEffects/Discrete.js +5 -2
  376. package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
  377. package/lib/module/renderer/components/pathEffects/Line2D.js +5 -2
  378. package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
  379. package/lib/module/renderer/components/pathEffects/Path1D.js +6 -3
  380. package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
  381. package/lib/module/renderer/components/pathEffects/Path2D.js +6 -3
  382. package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
  383. package/lib/module/renderer/components/pathEffects/Sum.js +5 -2
  384. package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
  385. package/lib/module/renderer/components/shaders/Color.js +6 -3
  386. package/lib/module/renderer/components/shaders/Color.js.map +1 -1
  387. package/lib/module/renderer/components/shaders/FractalNoise.js +4 -2
  388. package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
  389. package/lib/module/renderer/components/shaders/Gradient.js +3 -3
  390. package/lib/module/renderer/components/shaders/Gradient.js.map +1 -1
  391. package/lib/module/renderer/components/shaders/LinearGradient.js +5 -3
  392. package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -1
  393. package/lib/module/renderer/components/shaders/RadialGradient.js +5 -3
  394. package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -1
  395. package/lib/module/renderer/components/shaders/Shader.js +6 -44
  396. package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
  397. package/lib/module/renderer/components/shaders/SweepGradient.js +5 -3
  398. package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -1
  399. package/lib/module/renderer/components/shaders/Turbulence.js +4 -2
  400. package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
  401. package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js +5 -3
  402. package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
  403. package/lib/module/renderer/components/shapes/Box.js +20 -19
  404. package/lib/module/renderer/components/shapes/Box.js.map +1 -1
  405. package/lib/module/renderer/components/shapes/Circle.js +7 -4
  406. package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
  407. package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
  408. package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
  409. package/lib/module/renderer/components/shapes/Line.js.map +1 -1
  410. package/lib/module/renderer/components/shapes/Oval.js +3 -2
  411. package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
  412. package/lib/module/renderer/components/shapes/Patch.js +5 -3
  413. package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
  414. package/lib/module/renderer/components/shapes/Path.js +4 -3
  415. package/lib/module/renderer/components/shapes/Path.js.map +1 -1
  416. package/lib/module/renderer/components/shapes/Points.js +1 -1
  417. package/lib/module/renderer/components/shapes/Points.js.map +1 -1
  418. package/lib/module/renderer/components/shapes/Rect.js +3 -2
  419. package/lib/module/renderer/components/shapes/Rect.js.map +1 -1
  420. package/lib/module/renderer/components/shapes/RoundedRect.js +3 -2
  421. package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
  422. package/lib/module/renderer/components/shapes/Vertices.js +5 -3
  423. package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
  424. package/lib/module/renderer/components/text/Glyphs.js +3 -2
  425. package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
  426. package/lib/module/renderer/components/text/Text.js +3 -2
  427. package/lib/module/renderer/components/text/Text.js.map +1 -1
  428. package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
  429. package/lib/module/renderer/components/text/TextPath.js +3 -3
  430. package/lib/module/renderer/components/text/TextPath.js.map +1 -1
  431. package/lib/module/renderer/index.js +1 -1
  432. package/lib/module/renderer/index.js.map +1 -1
  433. package/lib/module/renderer/nodes/Declaration.js.map +1 -1
  434. package/lib/module/renderer/nodes/Drawing.js +3 -3
  435. package/lib/module/renderer/nodes/Drawing.js.map +1 -1
  436. package/lib/module/renderer/nodes/Node.js.map +1 -1
  437. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  438. package/lib/module/renderer/processors/Circles.js +2 -4
  439. package/lib/module/renderer/processors/Circles.js.map +1 -1
  440. package/lib/module/renderer/processors/Clips.js +3 -3
  441. package/lib/module/renderer/processors/Clips.js.map +1 -1
  442. package/lib/module/{skia/core → renderer/processors}/Color.js +1 -2
  443. package/lib/module/renderer/processors/Color.js.map +1 -0
  444. package/lib/module/renderer/processors/Font.js +3 -2
  445. package/lib/module/renderer/processors/Font.js.map +1 -1
  446. package/lib/module/renderer/processors/Paint.js +8 -5
  447. package/lib/module/renderer/processors/Paint.js.map +1 -1
  448. package/lib/module/renderer/processors/Paths.js +2 -2
  449. package/lib/module/renderer/processors/Paths.js.map +1 -1
  450. package/lib/module/renderer/processors/Radius.js +2 -3
  451. package/lib/module/renderer/processors/Radius.js.map +1 -1
  452. package/lib/module/renderer/processors/Rects.js +7 -26
  453. package/lib/module/renderer/processors/Rects.js.map +1 -1
  454. package/lib/module/renderer/processors/Transform.js +24 -16
  455. package/lib/module/renderer/processors/Transform.js.map +1 -1
  456. package/lib/module/renderer/processors/index.js +2 -1
  457. package/lib/module/renderer/processors/index.js.map +1 -1
  458. package/lib/module/renderer/processors/math/Coordinates.js.map +1 -1
  459. package/lib/module/renderer/processors/math/Transforms.js.map +1 -1
  460. package/lib/module/renderer/processors/math/index.js +0 -2
  461. package/lib/module/renderer/processors/math/index.js.map +1 -1
  462. package/lib/module/renderer/useCanvas.js +13 -0
  463. package/lib/module/renderer/useCanvas.js.map +1 -0
  464. package/lib/module/skia/NativeSetup.js +2 -2
  465. package/lib/module/skia/NativeSetup.js.map +1 -1
  466. package/lib/module/skia/Skia.web.js +3 -0
  467. package/lib/module/skia/Skia.web.js.map +1 -0
  468. package/lib/module/skia/core/Data.js +11 -5
  469. package/lib/module/skia/core/Data.js.map +1 -1
  470. package/lib/module/skia/core/Font.js +2 -4
  471. package/lib/module/skia/core/Font.js.map +1 -1
  472. package/lib/module/skia/core/Matrix.js +4 -0
  473. package/lib/module/skia/core/Matrix.js.map +1 -0
  474. package/lib/module/skia/core/Paint.js +3 -7
  475. package/lib/module/skia/core/Paint.js.map +1 -1
  476. package/lib/module/skia/core/Path.js +11 -2
  477. package/lib/module/skia/core/Path.js.map +1 -1
  478. package/lib/module/skia/core/RRect.js +3 -0
  479. package/lib/module/skia/core/RRect.js.map +1 -0
  480. package/lib/module/skia/core/Rect.js +17 -0
  481. package/lib/module/skia/core/Rect.js.map +1 -0
  482. package/lib/module/{renderer/processors/math → skia/core}/Vector.js +2 -7
  483. package/lib/module/skia/core/Vector.js.map +1 -0
  484. package/lib/module/skia/core/index.js +5 -3
  485. package/lib/module/skia/core/index.js.map +1 -1
  486. package/lib/module/skia/types/Image/ImageFactory.js.map +1 -1
  487. package/lib/module/skia/types/Matrix.js +55 -0
  488. package/lib/module/skia/types/Matrix.js.map +1 -1
  489. package/lib/module/skia/types/Path/Path.js +1 -0
  490. package/lib/module/skia/types/Path/Path.js.map +1 -1
  491. package/lib/module/skia/types/Point.js.map +1 -1
  492. package/lib/module/skia/types/RRect.js +3 -1
  493. package/lib/module/skia/types/RRect.js.map +1 -1
  494. package/lib/module/skia/types/Shader/Shader.js +48 -0
  495. package/lib/module/skia/types/Shader/Shader.js.map +1 -1
  496. package/lib/module/skia/web/{api/Host.js → Host.js} +6 -0
  497. package/lib/module/skia/web/Host.js.map +1 -0
  498. package/lib/module/skia/web/JsiImageFilterFactory.js +57 -0
  499. package/lib/module/skia/web/JsiImageFilterFactory.js.map +1 -0
  500. package/lib/module/skia/web/{api/JsiSkCanvas.js → JsiSkCanvas.js} +19 -6
  501. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -0
  502. package/lib/module/skia/web/{api/JsiSkColor.js → JsiSkColor.js} +164 -4
  503. package/lib/module/skia/web/JsiSkColor.js.map +1 -0
  504. package/lib/module/skia/web/{api/JsiSkColorFilter.js → JsiSkColorFilter.js} +0 -0
  505. package/lib/module/skia/web/{api/JsiSkColorFilter.js.map → JsiSkColorFilter.js.map} +1 -1
  506. package/lib/module/skia/web/JsiSkColorFilterFactory.js +37 -0
  507. package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -0
  508. package/lib/module/skia/web/JsiSkContourMeasure.js +31 -0
  509. package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -0
  510. package/lib/module/skia/web/JsiSkContourMeasureIter.js +19 -0
  511. package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -0
  512. package/lib/module/skia/web/JsiSkData.js +8 -0
  513. package/lib/module/skia/web/JsiSkData.js.map +1 -0
  514. package/lib/module/skia/web/JsiSkDataFactory.js +33 -0
  515. package/lib/module/skia/web/JsiSkDataFactory.js.map +1 -0
  516. package/lib/module/skia/web/JsiSkFont.js +99 -0
  517. package/lib/module/skia/web/JsiSkFont.js.map +1 -0
  518. package/lib/module/skia/web/JsiSkFontMgr.js +25 -0
  519. package/lib/module/skia/web/JsiSkFontMgr.js.map +1 -0
  520. package/lib/module/skia/web/JsiSkFontMgrFactory.js +14 -0
  521. package/lib/module/skia/web/JsiSkFontMgrFactory.js.map +1 -0
  522. package/lib/module/skia/web/{api/JsiSkImage.js → JsiSkImage.js} +0 -0
  523. package/lib/module/skia/web/{api/JsiSkImage.js.map → JsiSkImage.js.map} +1 -1
  524. package/lib/module/skia/web/JsiSkImageFactory.js +36 -0
  525. package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -0
  526. package/lib/module/skia/web/JsiSkImageFilter.js +8 -0
  527. package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -0
  528. package/lib/module/skia/web/JsiSkMaskFilter.js +8 -0
  529. package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -0
  530. package/lib/module/skia/web/JsiSkMaskFilterFactory.js +13 -0
  531. package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
  532. package/lib/module/skia/web/JsiSkMatrix.js +28 -0
  533. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -0
  534. package/lib/module/skia/web/{api/JsiSkPaint.js → JsiSkPaint.js} +5 -10
  535. package/lib/module/skia/web/JsiSkPaint.js.map +1 -0
  536. package/lib/module/skia/web/JsiSkPath.js +311 -0
  537. package/lib/module/skia/web/JsiSkPath.js.map +1 -0
  538. package/lib/module/skia/web/JsiSkPathEffect.js +8 -0
  539. package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -0
  540. package/lib/module/skia/web/JsiSkPathEffectFactory.js +67 -0
  541. package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -0
  542. package/lib/module/skia/web/JsiSkPathFactory.js +47 -0
  543. package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -0
  544. package/lib/module/skia/web/JsiSkPicture.js +18 -0
  545. package/lib/module/skia/web/JsiSkPicture.js.map +1 -0
  546. package/lib/module/skia/web/JsiSkPictureFactory.js +19 -0
  547. package/lib/module/skia/web/JsiSkPictureFactory.js.map +1 -0
  548. package/lib/module/skia/web/JsiSkPictureRecorder.js +18 -0
  549. package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -0
  550. package/lib/module/skia/web/JsiSkPoint.js +16 -0
  551. package/lib/module/skia/web/JsiSkPoint.js.map +1 -0
  552. package/lib/module/skia/web/JsiSkRRect.js +21 -0
  553. package/lib/module/skia/web/JsiSkRRect.js.map +1 -0
  554. package/lib/module/skia/web/JsiSkRSXform.js +8 -0
  555. package/lib/module/skia/web/JsiSkRSXform.js.map +1 -0
  556. package/lib/module/skia/web/{api/JsiSkRect.js → JsiSkRect.js} +8 -0
  557. package/lib/module/skia/web/JsiSkRect.js.map +1 -0
  558. package/lib/module/skia/web/JsiSkRuntimeEffect.js +33 -0
  559. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -0
  560. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +19 -0
  561. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
  562. package/lib/module/skia/web/JsiSkSVGFactory.js +16 -0
  563. package/lib/module/skia/web/JsiSkSVGFactory.js.map +1 -0
  564. package/lib/module/skia/web/JsiSkShader.js +8 -0
  565. package/lib/module/skia/web/JsiSkShader.js.map +1 -0
  566. package/lib/module/skia/web/JsiSkShaderFactory.js +41 -0
  567. package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -0
  568. package/lib/module/skia/web/{api/JsiSkSurface.js → JsiSkSurface.js} +0 -0
  569. package/lib/module/skia/web/{api/JsiSkSurface.js.map → JsiSkSurface.js.map} +1 -1
  570. package/lib/module/skia/web/{api/JsiSkSurfaceFactory.js → JsiSkSurfaceFactory.js} +0 -0
  571. package/lib/module/skia/web/{api/JsiSkSurfaceFactory.js.map → JsiSkSurfaceFactory.js.map} +1 -1
  572. package/lib/module/skia/web/JsiSkTextBlob.js +8 -0
  573. package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -0
  574. package/lib/module/skia/web/JsiSkTextBlobFactory.js +25 -0
  575. package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -0
  576. package/lib/module/skia/web/JsiSkTypeface.js +18 -0
  577. package/lib/module/skia/web/JsiSkTypeface.js.map +1 -0
  578. package/lib/module/skia/web/JsiSkTypefaceFactory.js +19 -0
  579. package/lib/module/skia/web/JsiSkTypefaceFactory.js.map +1 -0
  580. package/lib/module/skia/web/JsiSkVertices.js +17 -0
  581. package/lib/module/skia/web/JsiSkVertices.js.map +1 -0
  582. package/lib/module/skia/web/JsiSkVerticesFactory.js +16 -0
  583. package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -0
  584. package/lib/module/skia/web/JsiSkia.js +61 -0
  585. package/lib/module/skia/web/JsiSkia.js.map +1 -0
  586. package/lib/module/skia/web/index.js +1 -1
  587. package/lib/module/skia/web/index.js.map +1 -1
  588. package/lib/module/values/web/api.js +2 -2
  589. package/lib/module/values/web/api.js.map +1 -1
  590. package/lib/module/views/SkiaView.web.js +202 -0
  591. package/lib/module/views/SkiaView.web.js.map +1 -0
  592. package/lib/module/views/types.js.map +1 -1
  593. package/lib/module/views/useTouchHandler.js +64 -43
  594. package/lib/module/views/useTouchHandler.js.map +1 -1
  595. package/lib/module/web/index.js +8 -0
  596. package/lib/module/web/index.js.map +1 -0
  597. package/lib/typescript/src/animation/functions/index.d.ts +4 -2
  598. package/lib/typescript/src/animation/functions/interpolatePaths.d.ts +17 -0
  599. package/lib/typescript/src/animation/functions/interpolateVector.d.ts +10 -0
  600. package/lib/typescript/src/index.d.ts +1 -0
  601. package/lib/typescript/src/renderer/Canvas.d.ts +3 -14
  602. package/lib/typescript/src/renderer/DrawingContext.d.ts +3 -3
  603. package/lib/typescript/src/renderer/components/Blend.d.ts +1 -1
  604. package/lib/typescript/src/renderer/components/Group.d.ts +1 -1
  605. package/lib/typescript/src/renderer/components/Paint.d.ts +1 -1
  606. package/lib/typescript/src/renderer/components/Picture.d.ts +1 -1
  607. package/lib/typescript/src/renderer/components/colorFilters/BlendColor.d.ts +2 -2
  608. package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +2 -2
  609. package/lib/typescript/src/renderer/components/image/BoxFit.d.ts +13 -3
  610. package/lib/typescript/src/renderer/components/image/Image.d.ts +1 -1
  611. package/lib/typescript/src/renderer/components/image/ImageSVG.d.ts +1 -1
  612. package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +2 -2
  613. package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +1 -1
  614. package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +1 -1
  615. package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +2 -2
  616. package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +2 -1
  617. package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +1 -1
  618. package/lib/typescript/src/renderer/components/imageFilters/getInput.d.ts +2 -1
  619. package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +1 -1
  620. package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +1 -1
  621. package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +1 -1
  622. package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +1 -1
  623. package/lib/typescript/src/renderer/components/shaders/Color.d.ts +1 -1
  624. package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +4 -4
  625. package/lib/typescript/src/renderer/components/shaders/LinearGradient.d.ts +2 -1
  626. package/lib/typescript/src/renderer/components/shaders/RadialGradient.d.ts +2 -1
  627. package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +2 -8
  628. package/lib/typescript/src/renderer/components/shaders/SweepGradient.d.ts +2 -1
  629. package/lib/typescript/src/renderer/components/shaders/TwoPointConicalGradient.d.ts +2 -1
  630. package/lib/typescript/src/renderer/components/shapes/Box.d.ts +1 -1
  631. package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +4 -1
  632. package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +1 -1
  633. package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +1 -1
  634. package/lib/typescript/src/renderer/components/shapes/Line.d.ts +2 -1
  635. package/lib/typescript/src/renderer/components/shapes/Patch.d.ts +3 -3
  636. package/lib/typescript/src/renderer/components/shapes/Path.d.ts +1 -1
  637. package/lib/typescript/src/renderer/components/shapes/Points.d.ts +2 -2
  638. package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +2 -2
  639. package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +1 -1
  640. package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +1 -1
  641. package/lib/typescript/src/renderer/components/text/TextPath.d.ts +1 -1
  642. package/lib/typescript/src/renderer/index.d.ts +1 -1
  643. package/lib/typescript/src/renderer/nodes/Declaration.d.ts +1 -1
  644. package/lib/typescript/src/renderer/nodes/Node.d.ts +1 -1
  645. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +0 -2
  646. package/lib/typescript/src/renderer/processors/Circles.d.ts +2 -2
  647. package/lib/typescript/src/renderer/processors/Clips.d.ts +2 -2
  648. package/lib/typescript/src/{skia/core → renderer/processors}/Color.d.ts +2 -2
  649. package/lib/typescript/src/renderer/processors/Font.d.ts +2 -2
  650. package/lib/typescript/src/renderer/processors/Paint.d.ts +3 -3
  651. package/lib/typescript/src/renderer/processors/Paths.d.ts +2 -2
  652. package/lib/typescript/src/renderer/processors/Radius.d.ts +2 -2
  653. package/lib/typescript/src/renderer/processors/Rects.d.ts +3 -14
  654. package/lib/typescript/src/renderer/processors/Transform.d.ts +3 -4
  655. package/lib/typescript/src/renderer/processors/index.d.ts +2 -1
  656. package/lib/typescript/src/renderer/processors/math/Coordinates.d.ts +1 -1
  657. package/lib/typescript/src/renderer/processors/math/Transforms.d.ts +1 -1
  658. package/lib/typescript/src/renderer/processors/math/index.d.ts +0 -2
  659. package/lib/typescript/src/renderer/useCanvas.d.ts +14 -0
  660. package/lib/typescript/src/skia/Skia.web.d.ts +1 -0
  661. package/lib/typescript/src/skia/core/Data.d.ts +4 -4
  662. package/lib/typescript/src/skia/core/Matrix.d.ts +2 -0
  663. package/lib/typescript/src/skia/core/Paint.d.ts +0 -1
  664. package/lib/typescript/src/skia/core/RRect.d.ts +2 -0
  665. package/lib/typescript/src/skia/core/Rect.d.ts +8 -0
  666. package/lib/typescript/src/skia/core/Vector.d.ts +12 -0
  667. package/lib/typescript/src/skia/core/index.d.ts +5 -3
  668. package/lib/typescript/src/skia/types/ContourMeasure.d.ts +2 -4
  669. package/lib/typescript/src/skia/types/Data/Data.d.ts +1 -1
  670. package/lib/typescript/src/skia/types/Data/DataFactory.d.ts +4 -4
  671. package/lib/typescript/src/skia/types/FontMgr/FontMgr.d.ts +1 -1
  672. package/lib/typescript/src/skia/types/FontMgr/FontMgrFactory.d.ts +2 -2
  673. package/lib/typescript/src/skia/types/Image/ImageFactory.d.ts +3 -3
  674. package/lib/typescript/src/skia/types/Matrix.d.ts +15 -14
  675. package/lib/typescript/src/skia/types/Path/Path.d.ts +29 -23
  676. package/lib/typescript/src/skia/types/Path/PathFactory.d.ts +5 -0
  677. package/lib/typescript/src/skia/types/Picture/Picture.d.ts +2 -2
  678. package/lib/typescript/src/skia/types/Point.d.ts +1 -0
  679. package/lib/typescript/src/skia/types/RRect.d.ts +1 -0
  680. package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffect.d.ts +3 -2
  681. package/lib/typescript/src/skia/types/SVG/SVGFactory.d.ts +2 -2
  682. package/lib/typescript/src/skia/types/Shader/Shader.d.ts +8 -0
  683. package/lib/typescript/src/skia/types/Skia.d.ts +1 -1
  684. package/lib/typescript/src/skia/types/Typeface/TypefaceFactory.d.ts +2 -2
  685. package/lib/typescript/src/skia/web/{api/Host.d.ts → Host.d.ts} +4 -1
  686. package/lib/typescript/src/skia/web/JsiImageFilterFactory.d.ts +19 -0
  687. package/lib/typescript/src/skia/web/{api/JsiSkCanvas.d.ts → JsiSkCanvas.d.ts} +1 -1
  688. package/lib/typescript/src/skia/web/JsiSkColor.d.ts +2 -0
  689. package/lib/typescript/src/skia/web/{api/JsiSkColorFilter.d.ts → JsiSkColorFilter.d.ts} +1 -1
  690. package/lib/typescript/src/skia/web/JsiSkColorFilterFactory.d.ts +14 -0
  691. package/lib/typescript/src/skia/web/JsiSkContourMeasure.d.ts +16 -0
  692. package/lib/typescript/src/skia/web/JsiSkContourMeasureIter.d.ts +8 -0
  693. package/lib/typescript/src/skia/web/JsiSkData.d.ts +8 -0
  694. package/lib/typescript/src/skia/web/JsiSkDataFactory.d.ts +19 -0
  695. package/lib/typescript/src/skia/web/JsiSkFont.d.ts +33 -0
  696. package/lib/typescript/src/skia/web/JsiSkFontMgr.d.ts +9 -0
  697. package/lib/typescript/src/skia/web/JsiSkFontMgrFactory.d.ts +8 -0
  698. package/lib/typescript/src/skia/web/{api/JsiSkImage.d.ts → JsiSkImage.d.ts} +1 -1
  699. package/lib/typescript/src/skia/web/JsiSkImageFactory.d.ts +10 -0
  700. package/lib/typescript/src/skia/web/JsiSkImageFilter.d.ts +6 -0
  701. package/lib/typescript/src/skia/web/JsiSkMaskFilter.d.ts +6 -0
  702. package/lib/typescript/src/skia/web/JsiSkMaskFilterFactory.d.ts +9 -0
  703. package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +11 -0
  704. package/lib/typescript/src/skia/web/{api/JsiSkPaint.d.ts → JsiSkPaint.d.ts} +1 -1
  705. package/lib/typescript/src/skia/web/JsiSkPath.d.ts +56 -0
  706. package/lib/typescript/src/skia/web/JsiSkPathEffect.d.ts +6 -0
  707. package/lib/typescript/src/skia/web/JsiSkPathEffectFactory.d.ts +15 -0
  708. package/lib/typescript/src/skia/web/JsiSkPathFactory.d.ts +13 -0
  709. package/lib/typescript/src/skia/web/JsiSkPicture.d.ts +9 -0
  710. package/lib/typescript/src/skia/web/JsiSkPictureFactory.d.ts +8 -0
  711. package/lib/typescript/src/skia/web/JsiSkPictureRecorder.d.ts +11 -0
  712. package/lib/typescript/src/skia/web/JsiSkPoint.d.ts +8 -0
  713. package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +10 -0
  714. package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +8 -0
  715. package/lib/typescript/src/skia/web/{api/JsiSkRect.d.ts → JsiSkRect.d.ts} +2 -1
  716. package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +14 -0
  717. package/lib/typescript/src/skia/web/JsiSkRuntimeEffectFactory.d.ts +8 -0
  718. package/lib/typescript/src/skia/web/JsiSkSVGFactory.d.ts +9 -0
  719. package/lib/typescript/src/skia/web/JsiSkShader.d.ts +6 -0
  720. package/lib/typescript/src/skia/web/JsiSkShaderFactory.d.ts +16 -0
  721. package/lib/typescript/src/skia/web/{api/JsiSkSurface.d.ts → JsiSkSurface.d.ts} +1 -1
  722. package/lib/typescript/src/skia/web/{api/JsiSkSurfaceFactory.d.ts → JsiSkSurfaceFactory.d.ts} +1 -1
  723. package/lib/typescript/src/skia/web/JsiSkTextBlob.d.ts +6 -0
  724. package/lib/typescript/src/skia/web/JsiSkTextBlobFactory.d.ts +12 -0
  725. package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +8 -0
  726. package/lib/typescript/src/skia/web/JsiSkTypefaceFactory.d.ts +8 -0
  727. package/lib/typescript/src/skia/web/JsiSkVertices.d.ts +9 -0
  728. package/lib/typescript/src/skia/web/JsiSkVerticesFactory.d.ts +4 -0
  729. package/lib/typescript/src/skia/web/JsiSkia.d.ts +3 -0
  730. package/lib/typescript/src/skia/web/index.d.ts +1 -1
  731. package/lib/typescript/src/views/SkiaView.web.d.ts +56 -0
  732. package/lib/typescript/src/views/types.d.ts +1 -0
  733. package/lib/typescript/src/views/useTouchHandler.d.ts +11 -1
  734. package/lib/typescript/src/web/index.d.ts +5 -0
  735. package/package.json +4 -5
  736. package/src/animation/functions/index.ts +4 -2
  737. package/src/animation/functions/interpolatePaths.ts +38 -0
  738. package/src/animation/functions/interpolateVector.ts +26 -0
  739. package/src/index.ts +1 -0
  740. package/src/renderer/Canvas.tsx +13 -35
  741. package/src/renderer/DrawingContext.ts +3 -4
  742. package/src/renderer/HostConfig.ts +2 -2
  743. package/src/renderer/components/Blend.tsx +12 -10
  744. package/src/renderer/components/Compose.tsx +2 -2
  745. package/src/renderer/components/Group.tsx +11 -6
  746. package/src/renderer/components/Mask.tsx +5 -3
  747. package/src/renderer/components/Paint.tsx +5 -4
  748. package/src/renderer/components/Picture.tsx +1 -1
  749. package/src/renderer/components/backdrop/BackdropFilter.tsx +1 -1
  750. package/src/renderer/components/colorFilters/BlendColor.tsx +4 -4
  751. package/src/renderer/components/colorFilters/Compose.ts +3 -2
  752. package/src/renderer/components/colorFilters/Lerp.tsx +3 -2
  753. package/src/renderer/components/colorFilters/LinearToSRGBGamma.tsx +2 -3
  754. package/src/renderer/components/colorFilters/LumaColorFilter.tsx +2 -3
  755. package/src/renderer/components/colorFilters/Matrix.tsx +2 -3
  756. package/src/renderer/components/colorFilters/SRGBToLinearGamma.tsx +2 -3
  757. package/src/renderer/components/image/BoxFit.ts +7 -13
  758. package/src/renderer/components/image/Image.tsx +3 -3
  759. package/src/renderer/components/image/ImageSVG.tsx +3 -3
  760. package/src/renderer/components/image/ImageShader.tsx +8 -7
  761. package/src/renderer/components/imageFilters/Blur.tsx +12 -10
  762. package/src/renderer/components/imageFilters/DisplacementMap.tsx +4 -4
  763. package/src/renderer/components/imageFilters/InnerShadow.tsx +4 -3
  764. package/src/renderer/components/imageFilters/Morphology.tsx +3 -4
  765. package/src/renderer/components/imageFilters/Offset.tsx +5 -4
  766. package/src/renderer/components/imageFilters/RuntimeShader.tsx +12 -4
  767. package/src/renderer/components/imageFilters/Shadow.tsx +10 -6
  768. package/src/renderer/components/imageFilters/getInput.ts +3 -2
  769. package/src/renderer/components/maskFilters/Blur.tsx +2 -2
  770. package/src/renderer/components/pathEffects/Corner.tsx +2 -2
  771. package/src/renderer/components/pathEffects/Dash.tsx +2 -2
  772. package/src/renderer/components/pathEffects/Discrete.tsx +2 -2
  773. package/src/renderer/components/pathEffects/Line2D.tsx +3 -3
  774. package/src/renderer/components/pathEffects/Path1D.tsx +3 -3
  775. package/src/renderer/components/pathEffects/Path2D.tsx +4 -4
  776. package/src/renderer/components/pathEffects/Sum.tsx +7 -5
  777. package/src/renderer/components/shaders/Color.tsx +7 -5
  778. package/src/renderer/components/shaders/FractalNoise.tsx +1 -2
  779. package/src/renderer/components/shaders/Gradient.ts +7 -10
  780. package/src/renderer/components/shaders/LinearGradient.tsx +4 -4
  781. package/src/renderer/components/shaders/RadialGradient.tsx +4 -4
  782. package/src/renderer/components/shaders/Shader.tsx +6 -56
  783. package/src/renderer/components/shaders/SweepGradient.tsx +4 -4
  784. package/src/renderer/components/shaders/Turbulence.tsx +1 -2
  785. package/src/renderer/components/shaders/TwoPointConicalGradient.tsx +4 -4
  786. package/src/renderer/components/shapes/Box.tsx +36 -17
  787. package/src/renderer/components/shapes/Circle.tsx +3 -4
  788. package/src/renderer/components/shapes/DiffRect.tsx +1 -1
  789. package/src/renderer/components/shapes/FitBox.tsx +1 -1
  790. package/src/renderer/components/shapes/Line.tsx +2 -1
  791. package/src/renderer/components/shapes/Oval.tsx +6 -4
  792. package/src/renderer/components/shapes/Patch.tsx +6 -10
  793. package/src/renderer/components/shapes/Path.tsx +3 -3
  794. package/src/renderer/components/shapes/Points.tsx +2 -2
  795. package/src/renderer/components/shapes/Rect.tsx +6 -4
  796. package/src/renderer/components/shapes/RoundedRect.tsx +2 -2
  797. package/src/renderer/components/shapes/Vertices.tsx +5 -4
  798. package/src/renderer/components/text/Glyphs.tsx +6 -3
  799. package/src/renderer/components/text/Text.tsx +2 -2
  800. package/src/renderer/components/text/TextBlob.tsx +1 -1
  801. package/src/renderer/components/text/TextPath.tsx +3 -4
  802. package/src/renderer/index.ts +1 -1
  803. package/src/renderer/nodes/Declaration.tsx +1 -1
  804. package/src/renderer/nodes/Drawing.tsx +3 -2
  805. package/src/renderer/nodes/Node.ts +1 -1
  806. package/src/renderer/processors/Animations/Animations.ts +0 -3
  807. package/src/renderer/processors/Circles.ts +4 -4
  808. package/src/renderer/processors/Clips.ts +9 -4
  809. package/src/{skia/core → renderer/processors}/Color.ts +2 -3
  810. package/src/renderer/processors/Font.ts +10 -3
  811. package/src/renderer/processors/Paint.ts +12 -7
  812. package/src/renderer/processors/Paths.ts +3 -3
  813. package/src/renderer/processors/Radius.ts +3 -4
  814. package/src/renderer/processors/Rects.ts +10 -45
  815. package/src/renderer/processors/Transform.ts +28 -19
  816. package/src/renderer/processors/index.ts +2 -1
  817. package/src/renderer/processors/math/Coordinates.ts +1 -1
  818. package/src/renderer/processors/math/Transforms.ts +2 -1
  819. package/src/renderer/processors/math/index.ts +0 -2
  820. package/src/renderer/useCanvas.ts +21 -0
  821. package/src/skia/NativeSetup.ts +2 -2
  822. package/src/skia/Skia.web.ts +3 -0
  823. package/src/skia/core/Data.ts +17 -14
  824. package/src/skia/core/Font.ts +2 -4
  825. package/src/skia/core/Matrix.ts +6 -0
  826. package/src/skia/core/Paint.ts +2 -6
  827. package/src/skia/core/Path.ts +14 -6
  828. package/src/skia/core/RRect.tsx +5 -0
  829. package/src/skia/core/Rect.ts +33 -0
  830. package/src/skia/core/Vector.ts +11 -0
  831. package/src/skia/core/index.ts +5 -3
  832. package/src/skia/types/ContourMeasure.tsx +2 -4
  833. package/src/skia/types/Data/Data.ts +1 -1
  834. package/src/skia/types/Data/DataFactory.ts +4 -4
  835. package/src/skia/types/FontMgr/FontMgr.ts +1 -1
  836. package/src/skia/types/FontMgr/FontMgrFactory.ts +2 -2
  837. package/src/skia/types/Image/ImageFactory.ts +3 -3
  838. package/src/skia/types/Matrix.ts +79 -14
  839. package/src/skia/types/Path/Path.ts +34 -23
  840. package/src/skia/types/Path/PathFactory.ts +7 -0
  841. package/src/skia/types/Picture/Picture.ts +2 -2
  842. package/src/skia/types/Point.ts +2 -0
  843. package/src/skia/types/RRect.ts +5 -0
  844. package/src/skia/types/RuntimeEffect/RuntimeEffect.ts +4 -2
  845. package/src/skia/types/SVG/SVGFactory.ts +2 -2
  846. package/src/skia/types/Shader/Shader.ts +61 -0
  847. package/src/skia/types/Skia.ts +1 -1
  848. package/src/skia/types/Typeface/TypefaceFactory.ts +2 -2
  849. package/src/skia/web/{api/Host.ts → Host.ts} +7 -1
  850. package/src/skia/web/JsiImageFilterFactory.ts +144 -0
  851. package/src/skia/web/{api/JsiSkCanvas.ts → JsiSkCanvas.ts} +19 -11
  852. package/src/skia/web/{api/JsiSkColor.ts → JsiSkColor.ts} +152 -6
  853. package/src/skia/web/{api/JsiSkColorFilter.ts → JsiSkColorFilter.ts} +1 -1
  854. package/src/skia/web/JsiSkColorFilterFactory.ts +67 -0
  855. package/src/skia/web/JsiSkContourMeasure.ts +35 -0
  856. package/src/skia/web/JsiSkContourMeasureIter.ts +23 -0
  857. package/src/skia/web/JsiSkData.ts +13 -0
  858. package/src/skia/web/JsiSkDataFactory.ts +35 -0
  859. package/src/skia/web/JsiSkFont.ts +124 -0
  860. package/src/skia/web/JsiSkFontMgr.ts +42 -0
  861. package/src/skia/web/JsiSkFontMgrFactory.ts +18 -0
  862. package/src/skia/web/{api/JsiSkImage.ts → JsiSkImage.ts} +1 -1
  863. package/src/skia/web/JsiSkImageFactory.ts +40 -0
  864. package/src/skia/web/JsiSkImageFilter.ts +14 -0
  865. package/src/skia/web/JsiSkMaskFilter.ts +14 -0
  866. package/src/skia/web/JsiSkMaskFilterFactory.ts +20 -0
  867. package/src/skia/web/JsiSkMatrix.ts +54 -0
  868. package/src/skia/web/{api/JsiSkPaint.ts → JsiSkPaint.ts} +6 -5
  869. package/src/skia/web/JsiSkPath.ts +369 -0
  870. package/src/skia/web/JsiSkPathEffect.ts +14 -0
  871. package/src/skia/web/JsiSkPathEffectFactory.ts +85 -0
  872. package/src/skia/web/JsiSkPathFactory.ts +54 -0
  873. package/src/skia/web/JsiSkPicture.ts +45 -0
  874. package/src/skia/web/JsiSkPictureFactory.ts +20 -0
  875. package/src/skia/web/JsiSkPictureRecorder.ts +31 -0
  876. package/src/skia/web/JsiSkPoint.ts +19 -0
  877. package/src/skia/web/JsiSkRRect.ts +27 -0
  878. package/src/skia/web/JsiSkRSXform.ts +16 -0
  879. package/src/skia/web/{api/JsiSkRect.ts → JsiSkRect.ts} +11 -1
  880. package/src/skia/web/JsiSkRuntimeEffect.ts +57 -0
  881. package/src/skia/web/JsiSkRuntimeEffectFactory.ts +23 -0
  882. package/src/skia/web/JsiSkSVGFactory.ts +20 -0
  883. package/src/skia/web/JsiSkShader.ts +14 -0
  884. package/src/skia/web/JsiSkShaderFactory.ts +178 -0
  885. package/src/skia/web/{api/JsiSkSurface.ts → JsiSkSurface.ts} +1 -1
  886. package/src/skia/web/{api/JsiSkSurfaceFactory.ts → JsiSkSurfaceFactory.ts} +1 -1
  887. package/src/skia/web/JsiSkTextBlob.ts +14 -0
  888. package/src/skia/web/JsiSkTextBlobFactory.ts +49 -0
  889. package/src/skia/web/JsiSkTypeface.ts +28 -0
  890. package/src/skia/web/JsiSkTypefaceFactory.tsx +20 -0
  891. package/src/skia/web/JsiSkVertices.ts +23 -0
  892. package/src/skia/web/JsiSkVerticesFactory.ts +27 -0
  893. package/src/skia/web/JsiSkia.ts +98 -0
  894. package/src/skia/web/index.ts +1 -1
  895. package/src/values/web/api.ts +2 -2
  896. package/src/views/SkiaView.web.tsx +192 -0
  897. package/src/views/types.ts +1 -0
  898. package/src/views/useTouchHandler.ts +82 -51
  899. package/src/web/index.ts +13 -0
  900. package/lib/commonjs/renderer/processors/math/Matrix3.js +0 -66
  901. package/lib/commonjs/renderer/processors/math/Matrix3.js.map +0 -1
  902. package/lib/commonjs/renderer/processors/math/Vector.js +0 -60
  903. package/lib/commonjs/renderer/processors/math/Vector.js.map +0 -1
  904. package/lib/commonjs/skia/core/Color.js.map +0 -1
  905. package/lib/commonjs/skia/core/Shader.js +0 -18
  906. package/lib/commonjs/skia/core/Shader.js.map +0 -1
  907. package/lib/commonjs/skia/web/api/Host.js.map +0 -1
  908. package/lib/commonjs/skia/web/api/JsiSkCanvas.js.map +0 -1
  909. package/lib/commonjs/skia/web/api/JsiSkColor.js.map +0 -1
  910. package/lib/commonjs/skia/web/api/JsiSkPaint.js.map +0 -1
  911. package/lib/commonjs/skia/web/api/JsiSkRect.js.map +0 -1
  912. package/lib/commonjs/skia/web/api/index.js +0 -26
  913. package/lib/commonjs/skia/web/api/index.js.map +0 -1
  914. package/lib/module/renderer/processors/math/Matrix3.js +0 -55
  915. package/lib/module/renderer/processors/math/Matrix3.js.map +0 -1
  916. package/lib/module/renderer/processors/math/Vector.js.map +0 -1
  917. package/lib/module/skia/core/Color.js.map +0 -1
  918. package/lib/module/skia/core/Shader.js +0 -7
  919. package/lib/module/skia/core/Shader.js.map +0 -1
  920. package/lib/module/skia/web/api/Host.js.map +0 -1
  921. package/lib/module/skia/web/api/JsiSkCanvas.js.map +0 -1
  922. package/lib/module/skia/web/api/JsiSkColor.js.map +0 -1
  923. package/lib/module/skia/web/api/JsiSkPaint.js.map +0 -1
  924. package/lib/module/skia/web/api/JsiSkRect.js.map +0 -1
  925. package/lib/module/skia/web/api/index.js +0 -13
  926. package/lib/module/skia/web/api/index.js.map +0 -1
  927. package/lib/typescript/src/renderer/processors/math/Matrix3.d.ts +0 -10
  928. package/lib/typescript/src/renderer/processors/math/Vector.d.ts +0 -23
  929. package/lib/typescript/src/skia/core/Shader.d.ts +0 -1
  930. package/lib/typescript/src/skia/web/api/JsiSkColor.d.ts +0 -3
  931. package/lib/typescript/src/skia/web/api/index.d.ts +0 -10
  932. package/src/animation/timing/functions/__tests__/timing.spec.ts +0 -29
  933. package/src/renderer/processors/math/Matrix3.ts +0 -73
  934. package/src/renderer/processors/math/Vector.ts +0 -38
  935. package/src/skia/__tests__/Rects.spec.ts +0 -40
  936. package/src/skia/__tests__/snapshots/lightblue-rect.png +0 -0
  937. package/src/skia/core/Shader.ts +0 -9
  938. package/src/skia/web/api/index.ts +0 -15
  939. package/src/values/web/__tests__/RNSkAnimation.spec.ts +0 -21
  940. package/src/values/web/__tests__/RNSkDerivedValue.spec.ts +0 -15
  941. package/src/values/web/__tests__/RNSkReadonlyValue.spec.ts +0 -8
  942. package/src/values/web/__tests__/RNSkValue.spec.ts +0 -11
@@ -1 +1 @@
1
- {"version":3,"sources":["Group.tsx"],"names":["isSkPaint","obj","__typename__","onDraw","ctx","node","layer","clip","invertClip","groupProps","canvas","opacity","declarations","children","filter","isDeclarationNode","map","child","draw","drawings","DrawingNode","paint","copy","hasTransform","transform","matrix","hasClip","shouldSave","saveLayer","current","undefined","save","op","ClipOp","Difference","Intersect","visit","restore","Group","props"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;AAOA;;AACA;;;;;;AAEA,MAAMA,SAAS,GAAIC,GAAD,IAChB,kBAAkBA,GAAlB,IAAyBA,GAAG,CAACC,YAAJ,KAAqB,OADhD;;AASA,MAAMC,MAAM,GAAG,0BACb,CAACC,GAAD,QAAkDC,IAAlD,KAA2D;AAAA,MAArD;AAAEC,IAAAA,KAAF;AAASC,IAAAA,IAAT;AAAeC,IAAAA,UAAf;AAA2B,OAAGC;AAA9B,GAAqD;AACzD,QAAM;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,MAAsBP,GAA5B;AACA,QAAMQ,YAAY,GAAGP,IAAI,CAACQ,QAAL,CAClBC,MADkB,CACXC,8BADW,EAElBC,GAFkB,CAEbC,KAAD,IAAWA,KAAK,CAACC,IAAN,CAAWd,GAAX,CAFG,CAArB;AAIA,QAAMe,QAAQ,GAAGd,IAA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AAIQ,UAAJ,EAAgB;AACdjB,IAAAA,MAAM,CAAC2B,OAAP;AACD;AACF,CAhDY,CAAf;;AAmDO,MAAMC,KAAK,GAAIC,KAAD,IAAsC;AACzD,sBAAO;AAAW,IAAA,MAAM,EAAEpC;AAAnB,KAA+BoC,KAA/B;AAAsC,IAAA,cAAc;AAApD,KAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { RefObject } from \"react\";\n\nimport type { SkPaint } from \"../../skia\";\nimport { ClipOp } from \"../../skia\";\nimport { processTransform, processPaint, processClip } from \"../processors\";\nimport type {\n CustomPaintProps,\n TransformProps,\n AnimatedProps,\n ClipDef,\n} from \"../processors\";\nimport { createDrawing, DrawingNode } from \"../nodes\";\nimport { isDeclarationNode } from \"../nodes/Declaration\";\n\nconst isSkPaint = (obj: RefObject<SkPaint> | SkPaint): obj is SkPaint =>\n \"__typename__\" in obj && obj.__typename__ === \"Paint\";\n\nexport interface GroupProps extends CustomPaintProps, TransformProps {\n clip?: ClipDef;\n invertClip?: boolean;\n layer?: RefObject<SkPaint> | SkPaint | boolean;\n}\n\nconst onDraw = createDrawing<GroupProps>(\n (ctx, { layer, clip, invertClip, ...groupProps }, node) => {\n const { canvas, opacity } = ctx;\n const declarations = node.children\n .filter(isDeclarationNode)\n .map((child) => child.draw(ctx));\n\n const drawings = node.children.filter(\n (child) => child instanceof DrawingNode\n );\n const paint = processPaint(\n ctx.paint.copy(),\n opacity,\n groupProps,\n declarations\n );\n const hasTransform = !!groupProps.transform || !!groupProps.matrix;\n const hasClip = !!clip;\n const shouldSave = hasTransform || hasClip || !!layer;\n if (shouldSave) {\n if (layer) {\n if (typeof layer === \"boolean\") {\n canvas.saveLayer();\n } else if (isSkPaint(layer)) {\n canvas.saveLayer(layer);\n } else {\n canvas.saveLayer(layer.current ?? undefined);\n }\n } else {\n canvas.save();\n }\n processTransform(ctx, groupProps);\n if (clip) {\n const op = invertClip ? ClipOp.Difference : ClipOp.Intersect;\n processClip(canvas, clip, op);\n }\n }\n node.visit(\n {\n ...ctx,\n paint,\n opacity: groupProps.opacity ? groupProps.opacity * opacity : opacity,\n },\n drawings\n );\n if (shouldSave) {\n canvas.restore();\n }\n }\n);\n\nexport const Group = (props: AnimatedProps<GroupProps>) => {\n return <skDrawing onDraw={onDraw} {...props} skipProcessing />;\n};\n"]}
1
+ {"version":3,"sources":["Group.tsx"],"names":["isSkPaint","obj","__typename__","onDraw","ctx","node","layer","clip","invertClip","groupProps","canvas","opacity","Skia","declarations","children","filter","isDeclarationNode","map","child","draw","drawings","DrawingNode","paint","copy","hasTransform","transform","matrix","hasClip","shouldSave","saveLayer","current","undefined","save","op","ClipOp","Difference","Intersect","visit","restore","Group","props"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;AAWA;;AACA;;;;;;AAEA,MAAMA,SAAS,GAAIC,GAAD,IAChB,kBAAkBA,GAAlB,IAAyBA,GAAG,CAACC,YAAJ,KAAqB,OADhD;;AASA,MAAMC,MAAM,GAAG,0BACb,CAACC,GAAD,QAAkDC,IAAlD,KAA2D;AAAA,MAArD;AAAEC,IAAAA,KAAF;AAASC,IAAAA,IAAT;AAAeC,IAAAA,UAAf;AAA2B,OAAGC;AAA9B,GAAqD;AACzD,QAAM;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,OAAV;AAAmBC,IAAAA;AAAnB,MAA4BR,GAAlC;AACA,QAAMS,YAAY,GAAGR,IAAI,CAACS,QAAL,CAClBC,MADkB,CACXC,8BADW,EAElBC,GAFkB,CAEbC,KAAD,IAAWA,KAAK,CAACC,IAAN,CAAWf,GAAX,CAFG,CAArB;AAIA,QAAMgB,QAAQ,GAAGf,IAAI,CAACS,QAAL,CAAcC,MAAd,CACdG,KAAD,IAAWA,KAAK,YAAYG,kBADb,CAAjB;AAGA,QAAMC,KAAK,GAAG,8BACZlB,GAAG,CAACQ,IADQ,EAEZR,GAAG,CAACkB,KAAJ,CAAUC,IAAV,EAFY,EAGZZ,OAHY,EAIZF,UAJY,EAKZI,Y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AA+BqC,KAA/B;AAAsC,IAAA,cAAc;AAApD,KAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { RefObject } from \"react\";\n\nimport type { SkPaint } from \"../../skia/types\";\nimport { ClipOp } from \"../../skia/types\";\nimport {\n processCanvasTransform,\n processPaint,\n processClip,\n} from \"../processors\";\nimport type {\n CustomPaintProps,\n TransformProps,\n AnimatedProps,\n ClipDef,\n} from \"../processors\";\nimport { createDrawing, DrawingNode } from \"../nodes\";\nimport { isDeclarationNode } from \"../nodes/Declaration\";\n\nconst isSkPaint = (obj: RefObject<SkPaint> | SkPaint): obj is SkPaint =>\n \"__typename__\" in obj && obj.__typename__ === \"Paint\";\n\nexport interface GroupProps extends CustomPaintProps, TransformProps {\n clip?: ClipDef;\n invertClip?: boolean;\n layer?: RefObject<SkPaint> | SkPaint | boolean;\n}\n\nconst onDraw = createDrawing<GroupProps>(\n (ctx, { layer, clip, invertClip, ...groupProps }, node) => {\n const { canvas, opacity, Skia } = ctx;\n const declarations = node.children\n .filter(isDeclarationNode)\n .map((child) => child.draw(ctx));\n\n const drawings = node.children.filter(\n (child) => child instanceof DrawingNode\n );\n const paint = processPaint(\n ctx.Skia,\n ctx.paint.copy(),\n opacity,\n groupProps,\n declarations\n );\n const hasTransform = !!groupProps.transform || !!groupProps.matrix;\n const hasClip = !!clip;\n const shouldSave = hasTransform || hasClip || !!layer;\n if (shouldSave) {\n if (layer) {\n if (typeof layer === \"boolean\") {\n canvas.saveLayer();\n } else if (isSkPaint(layer)) {\n canvas.saveLayer(layer);\n } else {\n canvas.saveLayer(layer.current ?? undefined);\n }\n } else {\n canvas.save();\n }\n processCanvasTransform(ctx, groupProps);\n if (clip) {\n const op = invertClip ? ClipOp.Difference : ClipOp.Intersect;\n processClip(Skia, canvas, clip, op);\n }\n }\n node.visit(\n {\n ...ctx,\n paint,\n opacity: groupProps.opacity ? groupProps.opacity * opacity : opacity,\n },\n drawings\n );\n if (shouldSave) {\n canvas.restore();\n }\n }\n);\n\nexport const Group = (props: AnimatedProps<GroupProps>) => {\n return <skDrawing onDraw={onDraw} {...props} skipProcessing />;\n};\n"]}
@@ -7,7 +7,9 @@ exports.Mask = void 0;
7
7
 
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
 
10
- var _skia = require("../../skia");
10
+ var _types = require("../../skia/types");
11
+
12
+ var _useCanvas = require("../useCanvas");
11
13
 
12
14
  var _Group = require("./Group");
13
15
 
@@ -22,23 +24,24 @@ const Mask = _ref => {
22
24
  mode,
23
25
  clip
24
26
  } = _ref;
27
+ const {
28
+ Skia
29
+ } = (0, _useCanvas.useCanvas)();
25
30
  const maskPaint = (0, _react.useMemo)(() => {
26
- const paint = _skia.Skia.Paint();
27
-
28
- paint.setBlendMode(_skia.BlendMode.Src);
31
+ const paint = Skia.Paint();
32
+ paint.setBlendMode(_types.BlendMode.Src);
29
33
 
30
34
  if (mode === "luminance") {
31
- paint.setColorFilter(_skia.Skia.ColorFilter.MakeLumaColorFilter());
35
+ paint.setColorFilter(Skia.ColorFilter.MakeLumaColorFilter());
32
36
  }
33
37
 
34
38
  return paint;
35
- }, [mode]);
39
+ }, [Skia, mode]);
36
40
  const clippingPaint = (0, _react.useMemo)(() => {
37
- const paint = _skia.Skia.Paint();
38
-
39
- paint.setBlendMode(_skia.BlendMode.DstIn);
41
+ const paint = Skia.Paint();
42
+ paint.setBlendMode(_types.BlendMode.DstIn);
40
43
  return paint;
41
- }, []);
44
+ }, [Skia]);
42
45
  return /*#__PURE__*/_react.default.createElement(_Group.Group, {
43
46
  layer: true
44
47
  }, /*#__PURE__*/_react.default.createElement(_Group.Group, {
@@ -1 +1 @@
1
- {"version":3,"sources":["Mask.tsx"],"names":["Mask","children","mask","mode","clip","maskPaint","paint","Skia","Paint","setBlendMode","BlendMode","Src","setColorFilter","ColorFilter","MakeLumaColorFilter","clippingPaint","DstIn","defaultProps"],"mappings":";;;;;;;AACA;;AAEA;;AAEA;;;;;;AASO,MAAMA,IAAI,GAAG,QAA+C;AAAA,MAA9C;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,IAAZ;AAAkBC,IAAAA,IAAlB;AAAwBC,IAAAA;AAAxB,GAA8C;AACjE,QAAMC,SAAS,GAAG,oBAAQ,MAAM;AAC9B,UAAMC,KAAK,GAAGC,WAAKC,KAAL,EAAd;;AACAF,IAAAA,KAAK,CAACG,YAAN,CAAmBC,gBAAUC,GAA7B;;AACA,QAAIR,IAAI,KAAK,WAAb,EAA0B;AACxBG,MAAAA,KAAK,CAACM,cAAN,CAAqBL,WAAKM,WAAL,CAAiBC,mBAAjB,EAArB;AACD;;AACD,WAAOR,KAAP;AACD,GAPiB,EAOf,CAACH,IAAD,CAPe,CAAlB;AAQA,QAAMY,aAAa,GAAG,oBAAQ,MAAM;AAClC,UAAMT,KAAK,GAAGC,WAAKC,KAAL,EAAd;;AACAF,IAAAA,KAAK,CAACG,YAAN,CAAmBC,gBAAUM,KAA7B;AACA,WAAOV,KAAP;AACD,GAJqB,EAInB,EAJmB,CAAtB;AAKA,sBACE,6BAAC,YAAD;AAAO,IAAA,KAAK;AAAZ,kBACE,6BAAC,YAAD;AAAO,IAAA,KAAK,EAAED;AAAd,KACGH,IADH,EAEGE,IAAI,iBAAI,6BAAC,YAAD;AAAO,IAAA,KAAK,EAAEW;AAAd,KAA8Bd,QAA9B,CAFX,CADF,eAKE,6BAAC,YAAD;AAAO,IAAA,SAAS,EAAC;AAAjB,KAA0BA,QAA1B,CALF,CADF;AASD,CAvBM;;;AAyBPD,IAAI,CAACiB,YAAL,GAAoB;AAClBd,EAAAA,IAAI,EAAE,OADY;AAElBC,EAAAA,IAAI,EAAE;AAFY,CAApB","sourcesContent":["import type { ReactNode } from \"react\";\nimport React, { useMemo } from \"react\";\n\nimport { BlendMode, Skia } from \"../../skia\";\n\nimport { Group } from \"./Group\";\n\ninterface MaskProps {\n mode: \"luminance\" | \"alpha\";\n clip: boolean;\n mask: ReactNode | ReactNode[];\n children: ReactNode | ReactNode[];\n}\n\nexport const Mask = ({ children, mask, mode, clip }: MaskProps) => {\n const maskPaint = useMemo(() => {\n const paint = Skia.Paint();\n paint.setBlendMode(BlendMode.Src);\n if (mode === \"luminance\") {\n paint.setColorFilter(Skia.ColorFilter.MakeLumaColorFilter());\n }\n return paint;\n }, [mode]);\n const clippingPaint = useMemo(() => {\n const paint = Skia.Paint();\n paint.setBlendMode(BlendMode.DstIn);\n return paint;\n }, []);\n return (\n <Group layer>\n <Group layer={maskPaint}>\n {mask}\n {clip && <Group layer={clippingPaint}>{children}</Group>}\n </Group>\n <Group blendMode=\"srcIn\">{children}</Group>\n </Group>\n );\n};\n\nMask.defaultProps = {\n mode: \"alpha\",\n clip: true,\n};\n"]}
1
+ {"version":3,"sources":["Mask.tsx"],"names":["Mask","children","mask","mode","clip","Skia","maskPaint","paint","Paint","setBlendMode","BlendMode","Src","setColorFilter","ColorFilter","MakeLumaColorFilter","clippingPaint","DstIn","defaultProps"],"mappings":";;;;;;;AACA;;AAEA;;AACA;;AAEA;;;;;;AASO,MAAMA,IAAI,GAAG,QAA+C;AAAA,MAA9C;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,IAAZ;AAAkBC,IAAAA,IAAlB;AAAwBC,IAAAA;AAAxB,GAA8C;AACjE,QAAM;AAAEC,IAAAA;AAAF,MAAW,2BAAjB;AACA,QAAMC,SAAS,GAAG,oBAAQ,MAAM;AAC9B,UAAMC,KAAK,GAAGF,IAAI,CAACG,KAAL,EAAd;AACAD,IAAAA,KAAK,CAACE,YAAN,CAAmBC,iBAAUC,GAA7B;;AACA,QAAIR,IAAI,KAAK,WAAb,EAA0B;AACxBI,MAAAA,KAAK,CAACK,cAAN,CAAqBP,IAAI,CAACQ,WAAL,CAAiBC,mBAAjB,EAArB;AACD;;AACD,WAAOP,KAAP;AACD,GAPiB,EAOf,CAACF,IAAD,EAAOF,IAAP,CAPe,CAAlB;AAQA,QAAMY,aAAa,GAAG,oBAAQ,MAAM;AAClC,UAAMR,KAAK,GAAGF,IAAI,CAACG,KAAL,EAAd;AACAD,IAAAA,KAAK,CAACE,YAAN,CAAmBC,iBAAUM,KAA7B;AACA,WAAOT,KAAP;AACD,GAJqB,EAInB,CAACF,IAAD,CAJmB,CAAtB;AAKA,sBACE,6BAAC,YAAD;AAAO,IAAA,KAAK;AAAZ,kBACE,6BAAC,YAAD;AAAO,IAAA,KAAK,EAAEC;AAAd,KACGJ,IADH,EAEGE,IAAI,iBAAI,6BAAC,YAAD;AAAO,IAAA,KAAK,EAAEW;AAAd,KAA8Bd,QAA9B,CAFX,CADF,eAKE,6BAAC,YAAD;AAAO,IAAA,SAAS,EAAC;AAAjB,KAA0BA,QAA1B,CALF,CADF;AASD,CAxBM;;;AA0BPD,IAAI,CAACiB,YAAL,GAAoB;AAClBd,EAAAA,IAAI,EAAE,OADY;AAElBC,EAAAA,IAAI,EAAE;AAFY,CAApB","sourcesContent":["import type { ReactNode } from \"react\";\nimport React, { useMemo } from \"react\";\n\nimport { BlendMode } from \"../../skia/types\";\nimport { useCanvas } from \"../useCanvas\";\n\nimport { Group } from \"./Group\";\n\ninterface MaskProps {\n mode: \"luminance\" | \"alpha\";\n clip: boolean;\n mask: ReactNode | ReactNode[];\n children: ReactNode | ReactNode[];\n}\n\nexport const Mask = ({ children, mask, mode, clip }: MaskProps) => {\n const { Skia } = useCanvas();\n const maskPaint = useMemo(() => {\n const paint = Skia.Paint();\n paint.setBlendMode(BlendMode.Src);\n if (mode === \"luminance\") {\n paint.setColorFilter(Skia.ColorFilter.MakeLumaColorFilter());\n }\n return paint;\n }, [Skia, mode]);\n const clippingPaint = useMemo(() => {\n const paint = Skia.Paint();\n paint.setBlendMode(BlendMode.DstIn);\n return paint;\n }, [Skia]);\n return (\n <Group layer>\n <Group layer={maskPaint}>\n {mask}\n {clip && <Group layer={clippingPaint}>{children}</Group>}\n </Group>\n <Group blendMode=\"srcIn\">{children}</Group>\n </Group>\n );\n};\n\nMask.defaultProps = {\n mode: \"alpha\",\n clip: true,\n};\n"]}
@@ -7,12 +7,12 @@ exports.usePaintRef = exports.Paint = void 0;
7
7
 
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
 
10
- var _skia = require("../../skia");
11
-
12
10
  var _processors = require("../processors");
13
11
 
14
12
  var _nodes = require("../nodes");
15
13
 
14
+ var _useCanvas = require("../useCanvas");
15
+
16
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
17
 
18
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -23,9 +23,12 @@ const usePaintRef = () => (0, _react.useRef)(null);
23
23
 
24
24
  exports.usePaintRef = usePaintRef;
25
25
  const Paint = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
26
- const paint = (0, _react.useMemo)(() => (0, _skia.SkiaPaint)(), []);
26
+ const {
27
+ Skia
28
+ } = (0, _useCanvas.useCanvas)();
29
+ const paint = (0, _react.useMemo)(() => Skia.Paint(), [Skia]);
27
30
  (0, _react.useImperativeHandle)(ref, () => paint, [paint]);
28
- const onDeclare = (0, _react.useMemo)(() => (0, _nodes.createDeclaration)((paintProps, children, ctx) => (0, _processors.processPaint)(paint, ctx.opacity, paintProps, children)), [paint]);
31
+ const onDeclare = (0, _react.useMemo)(() => (0, _nodes.createDeclaration)((paintProps, children, ctx) => (0, _processors.processPaint)(ctx.Skia, paint, ctx.opacity, paintProps, children)), [paint]);
29
32
  return /*#__PURE__*/_react.default.createElement("skDeclaration", _extends({
30
33
  onDeclare: onDeclare
31
34
  }, props));
@@ -1 +1 @@
1
- {"version":3,"sources":["Paint.tsx"],"names":["usePaintRef","Paint","props","ref","paint","onDeclare","paintProps","children","ctx","opacity"],"mappings":";;;;;;;AACA;;AAGA;;AAEA;;AACA;;;;;;;;AAEO,MAAMA,WAAW,GAAG,MAAM,mBAAgB,IAAhB,CAA1B;;;AAMA,MAAMC,KAAK,gBAAG,uBACnB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACd,QAAMC,KAAK,GAAG,oBAAQ,MAAM,sBAAd,EAA2B,EAA3B,CAAd;AACA,kCAAoBD,GAApB,EAAyB,MAAMC,KAA/B,EAAsC,CAACA,KAAD,CAAtC;AACA,QAAMC,SAAS,GAAG,oBAChB,MACE,8BAA8B,CAACC,UAAD,EAAaC,QAAb,EAAuBC,GAAvB,KAC5B,8BAAaJ,KAAb,EAAoBI,GAAG,CAACC,OAAxB,EAAiCH,UAAjC,EAA6CC,QAA7C,CADF,CAFc,EAKhB,CAACH,KAAD,CALgB,CAAlB;AAOA,sBAAO;AAAe,IAAA,SAAS,EAAEC;AAA1B,KAAyCH,KAAzC,EAAP;AACD,CAZkB,CAAd","sourcesContent":["import type { ReactNode } from \"react\";\nimport React, { useRef, useMemo, forwardRef, useImperativeHandle } from \"react\";\n\nimport type { SkPaint } from \"../../skia\";\nimport { SkiaPaint } from \"../../skia\";\nimport type { CustomPaintProps, AnimatedProps } from \"../processors\";\nimport { processPaint } from \"../processors\";\nimport { createDeclaration } from \"../nodes\";\n\nexport const usePaintRef = () => useRef<SkPaint>(null);\n\nexport interface PaintProps extends Omit<CustomPaintProps, \"paint\"> {\n children?: ReactNode | ReactNode[];\n}\n\nexport const Paint = forwardRef<SkPaint, AnimatedProps<PaintProps>>(\n (props, ref) => {\n const paint = useMemo(() => SkiaPaint(), []);\n useImperativeHandle(ref, () => paint, [paint]);\n const onDeclare = useMemo(\n () =>\n createDeclaration<PaintProps>((paintProps, children, ctx) =>\n processPaint(paint, ctx.opacity, paintProps, children)\n ),\n [paint]\n );\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n }\n);\n"]}
1
+ {"version":3,"sources":["Paint.tsx"],"names":["usePaintRef","Paint","props","ref","Skia","paint","onDeclare","paintProps","children","ctx","opacity"],"mappings":";;;;;;;AACA;;AAIA;;AACA;;AACA;;;;;;;;AAEO,MAAMA,WAAW,GAAG,MAAM,mBAAgB,IAAhB,CAA1B;;;AAMA,MAAMC,KAAK,gBAAG,uBACnB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACd,QAAM;AAAEC,IAAAA;AAAF,MAAW,2BAAjB;AACA,QAAMC,KAAK,GAAG,oBAAQ,MAAMD,IAAI,CAACH,KAAL,EAAd,EAA4B,CAACG,IAAD,CAA5B,CAAd;AACA,kCAAoBD,GAApB,EAAyB,MAAME,KAA/B,EAAsC,CAACA,KAAD,CAAtC;AACA,QAAMC,SAAS,GAAG,oBAChB,MACE,8BAA8B,CAACC,UAAD,EAAaC,QAAb,EAAuBC,GAAvB,KAC5B,8BAAaA,GAAG,CAACL,IAAjB,EAAuBC,KAAvB,EAA8BI,GAAG,CAACC,OAAlC,EAA2CH,UAA3C,EAAuDC,QAAvD,CADF,CAFc,EAKhB,CAACH,KAAD,CALgB,CAAlB;AAOA,sBAAO;AAAe,IAAA,SAAS,EAAEC;AAA1B,KAAyCJ,KAAzC,EAAP;AACD,CAbkB,CAAd","sourcesContent":["import type { ReactNode } from \"react\";\nimport React, { useRef, useMemo, forwardRef, useImperativeHandle } from \"react\";\n\nimport type { SkPaint } from \"../../skia/types\";\nimport type { CustomPaintProps, AnimatedProps } from \"../processors\";\nimport { processPaint } from \"../processors\";\nimport { createDeclaration } from \"../nodes\";\nimport { useCanvas } from \"../useCanvas\";\n\nexport const usePaintRef = () => useRef<SkPaint>(null);\n\nexport interface PaintProps extends Omit<CustomPaintProps, \"paint\"> {\n children?: ReactNode | ReactNode[];\n}\n\nexport const Paint = forwardRef<SkPaint, AnimatedProps<PaintProps>>(\n (props, ref) => {\n const { Skia } = useCanvas();\n const paint = useMemo(() => Skia.Paint(), [Skia]);\n useImperativeHandle(ref, () => paint, [paint]);\n const onDeclare = useMemo(\n () =>\n createDeclaration<PaintProps>((paintProps, children, ctx) =>\n processPaint(ctx.Skia, paint, ctx.opacity, paintProps, children)\n ),\n [paint]\n );\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n }\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["Picture.tsx"],"names":["onDraw","ctx","picture","canvas","drawPicture","Picture","props"],"mappings":";;;;;;;AAAA;;AAGA;;;;;;AAMA,MAAMA,MAAM,GAAG,4BAA4B,CAACC,GAAD,WAAsB;AAAA,MAAhB;AAAEC,IAAAA;AAAF,GAAgB;AAC/D,QAAM;AAAEC,IAAAA;AAAF,MAAaF,GAAnB;AACAE,EAAAA,MAAM,CAACC,WAAP,CAAmBF,OAAnB;AACD,CAHc,CAAf;;AAKO,MAAMG,OAAO,GAAIC,KAAD,IAAyB;AAC9C,sBAAO;AAAW,IAAA,MAAM,EAAEN;AAAnB,KAA+BM,KAA/B;AAAsC,IAAA,cAAc;AAApD,KAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport type { SkPicture } from \"../../skia\";\nimport { createDrawing } from \"../nodes/Drawing\";\n\nexport interface PictureProps {\n picture: SkPicture;\n}\n\nconst onDraw = createDrawing<PictureProps>((ctx, { picture }) => {\n const { canvas } = ctx;\n canvas.drawPicture(picture);\n});\n\nexport const Picture = (props: PictureProps) => {\n return <skDrawing onDraw={onDraw} {...props} skipProcessing />;\n};\n"]}
1
+ {"version":3,"sources":["Picture.tsx"],"names":["onDraw","ctx","picture","canvas","drawPicture","Picture","props"],"mappings":";;;;;;;AAAA;;AAGA;;;;;;AAMA,MAAMA,MAAM,GAAG,4BAA4B,CAACC,GAAD,WAAsB;AAAA,MAAhB;AAAEC,IAAAA;AAAF,GAAgB;AAC/D,QAAM;AAAEC,IAAAA;AAAF,MAAaF,GAAnB;AACAE,EAAAA,MAAM,CAACC,WAAP,CAAmBF,OAAnB;AACD,CAHc,CAAf;;AAKO,MAAMG,OAAO,GAAIC,KAAD,IAAyB;AAC9C,sBAAO;AAAW,IAAA,MAAM,EAAEN;AAAnB,KAA+BM,KAA/B;AAAsC,IAAA,cAAc;AAApD,KAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport type { SkPicture } from \"../../skia/types\";\nimport { createDrawing } from \"../nodes/Drawing\";\n\nexport interface PictureProps {\n picture: SkPicture;\n}\n\nconst onDraw = createDrawing<PictureProps>((ctx, { picture }) => {\n const { canvas } = ctx;\n canvas.drawPicture(picture);\n});\n\nexport const Picture = (props: PictureProps) => {\n return <skDrawing onDraw={onDraw} {...props} skipProcessing />;\n};\n"]}
@@ -25,7 +25,7 @@ const disableFilterMemoization = children => {
25
25
  const onDraw = (0, _nodes.createDrawing)((ctx, _, node) => {
26
26
  disableFilterMemoization(node.children);
27
27
  const toFilter = node.visit(ctx);
28
- const filter = (0, _getInput.getInput)(toFilter);
28
+ const filter = (0, _getInput.getInput)(ctx.Skia, toFilter);
29
29
 
30
30
  if (!filter) {
31
31
  throw new Error("No image filter provided to the background");
@@ -1 +1 @@
1
- {"version":3,"sources":["BackdropFilter.tsx"],"names":["disableFilterMemoization","children","forEach","child","memoizable","onDraw","ctx","_","node","toFilter","visit","filter","Error","canvas","saveLayer","undefined","restore","BackdropFilter","filterChild","groupChildren","props"],"mappings":";;;;;;;AACA;;AAGA;;AAEA;;AAEA;;;;AAEA,MAAMA,wBAAwB,GAAIC,QAAD,IAA+B;AAC9DA,EAAAA,QAAQ,CAACC,OAAT,CAAkBC,KAAD,IAAW;AAC1BA,IAAAA,KAAK,CAACC,UAAN,GAAmB,KAAnB;AACAJ,IAAAA,wBAAwB,CAACG,KAAK,CAACF,QAAP,CAAxB;AACD,GAHD;AAID,CALD;;AAWA,MAAMI,MAAM,GAAG,0BAAmC,CAACC,GAAD,EAAMC,CAAN,EAASC,IAAT,KAAkB;AAClER,EAAAA,wBAAwB,CAACQ,IAAI,CAACP,QAAN,CAAxB;AACA,QAAMQ,QAAQ,GAAGD,IAAI,CAACE,KAAL,CAAWJ,GAAX,CAAjB;AACA,QAAMK,MAAM,GAAG,wBAASF,QAAT,CAAf;;AACA,MAAI,CAACE,MAAL,EAAa;AACX,UAAM,IAAIC,KAAJ,CAAU,4CAAV,CAAN;AACD;;AACD,QAAM;AAAEC,IAAAA;AAAF,MAAaP,GAAnB;AACAO,EAAAA,MAAM,CAACC,SAAP,CAAiBC,SAAjB,EAA4B,IAA5B,EAAkCJ,MAAlC;AACAE,EAAAA,MAAM,CAACG,OAAP;AACD,CAVc,CAAf;;AAYO,MAAMC,cAAc,GAAG,QAIY;AAAA,MAJX;AAC7BN,IAAAA,MAAM,EAAEO,WADqB;AAE7BjB,IAAAA,QAAQ,EAAEkB,aAFmB;AAG7B,OAAGC;AAH0B,GAIW;AACxC,sBACE,6BAAC,YAAD,EAAWA,KAAX,eACE;AAAW,IAAA,MAAM,EAAEf,MAAnB;AAA2B,IAAA,cAAc;AAAzC,KACGa,WADH,CADF,EAIGC,aAJH,CADF;AAQD,CAbM","sourcesContent":["import type { ReactNode } from \"react\";\nimport React from \"react\";\n\nimport type { AnimatedProps } from \"../../processors\";\nimport { createDrawing } from \"../../nodes\";\nimport type { Node } from \"../../nodes\";\nimport { getInput } from \"../imageFilters/getInput\";\nimport type { GroupProps } from \"../Group\";\nimport { Group } from \"../Group\";\n\nconst disableFilterMemoization = (children: Node<unknown>[]) => {\n children.forEach((child) => {\n child.memoizable = false;\n disableFilterMemoization(child.children);\n });\n};\n\nexport interface BackdropFilterProps extends GroupProps {\n filter: ReactNode | ReactNode[];\n}\n\nconst onDraw = createDrawing<BackdropFilterProps>((ctx, _, node) => {\n disableFilterMemoization(node.children);\n const toFilter = node.visit(ctx);\n const filter = getInput(toFilter);\n if (!filter) {\n throw new Error(\"No image filter provided to the background\");\n }\n const { canvas } = ctx;\n canvas.saveLayer(undefined, null, filter);\n canvas.restore();\n});\n\nexport const BackdropFilter = ({\n filter: filterChild,\n children: groupChildren,\n ...props\n}: AnimatedProps<BackdropFilterProps>) => {\n return (\n <Group {...props}>\n <skDrawing onDraw={onDraw} skipProcessing>\n {filterChild}\n </skDrawing>\n {groupChildren}\n </Group>\n );\n};\n"]}
1
+ {"version":3,"sources":["BackdropFilter.tsx"],"names":["disableFilterMemoization","children","forEach","child","memoizable","onDraw","ctx","_","node","toFilter","visit","filter","Skia","Error","canvas","saveLayer","undefined","restore","BackdropFilter","filterChild","groupChildren","props"],"mappings":";;;;;;;AACA;;AAGA;;AAEA;;AAEA;;;;AAEA,MAAMA,wBAAwB,GAAIC,QAAD,IAA+B;AAC9DA,EAAAA,QAAQ,CAACC,OAAT,CAAkBC,KAAD,IAAW;AAC1BA,IAAAA,KAAK,CAACC,UAAN,GAAmB,KAAnB;AACAJ,IAAAA,wBAAwB,CAACG,KAAK,CAACF,QAAP,CAAxB;AACD,GAHD;AAID,CALD;;AAWA,MAAMI,MAAM,GAAG,0BAAmC,CAACC,GAAD,EAAMC,CAAN,EAASC,IAAT,KAAkB;AAClER,EAAAA,wBAAwB,CAACQ,IAAI,CAACP,QAAN,CAAxB;AACA,QAAMQ,QAAQ,GAAGD,IAAI,CAACE,KAAL,CAAWJ,GAAX,CAAjB;AACA,QAAMK,MAAM,GAAG,wBAASL,GAAG,CAACM,IAAb,EAAmBH,QAAnB,CAAf;;AACA,MAAI,CAACE,MAAL,EAAa;AACX,UAAM,IAAIE,KAAJ,CAAU,4CAAV,CAAN;AACD;;AACD,QAAM;AAAEC,IAAAA;AAAF,MAAaR,GAAnB;AACAQ,EAAAA,MAAM,CAACC,SAAP,CAAiBC,SAAjB,EAA4B,IAA5B,EAAkCL,MAAlC;AACAG,EAAAA,MAAM,CAACG,OAAP;AACD,CAVc,CAAf;;AAYO,MAAMC,cAAc,GAAG,QAIY;AAAA,MAJX;AAC7BP,IAAAA,MAAM,EAAEQ,WADqB;AAE7BlB,IAAAA,QAAQ,EAAEmB,aAFmB;AAG7B,OAAGC;AAH0B,GAIW;AACxC,sBACE,6BAAC,YAAD,EAAWA,KAAX,eACE;AAAW,IAAA,MAAM,EAAEhB,MAAnB;AAA2B,IAAA,cAAc;AAAzC,KACGc,WADH,CADF,EAIGC,aAJH,CADF;AAQD,CAbM","sourcesContent":["import type { ReactNode } from \"react\";\nimport React from \"react\";\n\nimport type { AnimatedProps } from \"../../processors\";\nimport { createDrawing } from \"../../nodes\";\nimport type { Node } from \"../../nodes\";\nimport { getInput } from \"../imageFilters/getInput\";\nimport type { GroupProps } from \"../Group\";\nimport { Group } from \"../Group\";\n\nconst disableFilterMemoization = (children: Node<unknown>[]) => {\n children.forEach((child) => {\n child.memoizable = false;\n disableFilterMemoization(child.children);\n });\n};\n\nexport interface BackdropFilterProps extends GroupProps {\n filter: ReactNode | ReactNode[];\n}\n\nconst onDraw = createDrawing<BackdropFilterProps>((ctx, _, node) => {\n disableFilterMemoization(node.children);\n const toFilter = node.visit(ctx);\n const filter = getInput(ctx.Skia, toFilter);\n if (!filter) {\n throw new Error(\"No image filter provided to the background\");\n }\n const { canvas } = ctx;\n canvas.saveLayer(undefined, null, filter);\n canvas.restore();\n});\n\nexport const BackdropFilter = ({\n filter: filterChild,\n children: groupChildren,\n ...props\n}: AnimatedProps<BackdropFilterProps>) => {\n return (\n <Group {...props}>\n <skDrawing onDraw={onDraw} skipProcessing>\n {filterChild}\n </skDrawing>\n {groupChildren}\n </Group>\n );\n};\n"]}
@@ -7,7 +7,7 @@ exports.BlendColor = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _skia = require("../../../skia");
10
+ var _types = require("../../../skia/types");
11
11
 
12
12
  var _nodes = require("../../nodes");
13
13
 
@@ -19,15 +19,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
19
19
 
20
20
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
21
 
22
- const onDeclare = (0, _nodes.createDeclaration)((_ref, children) => {
22
+ const onDeclare = (0, _nodes.createDeclaration)((_ref, children, _ref2) => {
23
23
  let {
24
24
  mode,
25
25
  color
26
26
  } = _ref;
27
-
28
- const cf = _skia.Skia.ColorFilter.MakeBlend(_skia.Skia.Color(color), _skia.BlendMode[(0, _processors.enumKey)(mode)]);
29
-
30
- return (0, _Compose.composeColorFilter)(cf, children);
27
+ let {
28
+ Skia
29
+ } = _ref2;
30
+ const cf = Skia.ColorFilter.MakeBlend(Skia.Color(color), _types.BlendMode[(0, _processors.enumKey)(mode)]);
31
+ return (0, _Compose.composeColorFilter)(Skia, cf, children);
31
32
  });
32
33
 
33
34
  const BlendColor = props => {
@@ -1 +1 @@
1
- {"version":3,"sources":["BlendColor.tsx"],"names":["onDeclare","children","mode","color","cf","Skia","ColorFilter","MakeBlend","Color","BlendMode","BlendColor","props"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;AAEA;;AAEA;;;;;;AAQA,MAAMA,SAAS,GAAG,8BAChB,OAAkBC,QAAlB,KAA+B;AAAA,MAA9B;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,GAA8B;;AAC7B,QAAMC,EAAE,GAAGC,WAAKC,WAAL,CAAiBC,SAAjB,CACTF,WAAKG,KAAL,CAAWL,KAAX,CADS,EAETM,gBAAU,yBAAQP,IAAR,CAAV,CAFS,CAAX;;AAIA,SAAO,iCAAmBE,EAAnB,EAAuBH,QAAvB,CAAP;AACD,CAPe,CAAlB;;AAUO,MAAMS,UAAU,GAAIC,KAAD,IAA2C;AACnE,sBAAO;AAAe,IAAA,SAAS,EAAEX;AAA1B,KAAyCW,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport type { Color } from \"../../../skia\";\nimport { BlendMode, Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes\";\nimport type { SkEnum, AnimatedProps } from \"../../processors\";\nimport { enumKey } from \"../../processors\";\n\nimport { composeColorFilter } from \"./Compose\";\n\nexport interface BlendColorProps {\n mode: SkEnum<typeof BlendMode>;\n color: Color;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<BlendColorProps>(\n ({ mode, color }, children) => {\n const cf = Skia.ColorFilter.MakeBlend(\n Skia.Color(color),\n BlendMode[enumKey(mode)]\n );\n return composeColorFilter(cf, children);\n }\n);\n\nexport const BlendColor = (props: AnimatedProps<BlendColorProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["BlendColor.tsx"],"names":["onDeclare","children","mode","color","Skia","cf","ColorFilter","MakeBlend","Color","BlendMode","BlendColor","props"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;AAEA;;AAEA;;;;;;AAQA,MAAMA,SAAS,GAAG,8BAChB,OAAkBC,QAAlB,YAAyC;AAAA,MAAxC;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,GAAwC;AAAA,MAAb;AAAEC,IAAAA;AAAF,GAAa;AACvC,QAAMC,EAAE,GAAGD,IAAI,CAACE,WAAL,CAAiBC,SAAjB,CACTH,IAAI,CAACI,KAAL,CAAWL,KAAX,CADS,EAETM,iBAAU,yBAAQP,IAAR,CAAV,CAFS,CAAX;AAIA,SAAO,iCAAmBE,IAAnB,EAAyBC,EAAzB,EAA6BJ,QAA7B,CAAP;AACD,CAPe,CAAlB;;AAUO,MAAMS,UAAU,GAAIC,KAAD,IAA2C;AACnE,sBAAO;AAAe,IAAA,SAAS,EAAEX;AAA1B,KAAyCW,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport type { Color } from \"../../../skia/types\";\nimport { BlendMode } from \"../../../skia/types\";\nimport { createDeclaration } from \"../../nodes\";\nimport type { SkEnum, AnimatedProps } from \"../../processors\";\nimport { enumKey } from \"../../processors\";\n\nimport { composeColorFilter } from \"./Compose\";\n\nexport interface BlendColorProps {\n mode: SkEnum<typeof BlendMode>;\n color: Color;\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<BlendColorProps>(\n ({ mode, color }, children, { Skia }) => {\n const cf = Skia.ColorFilter.MakeBlend(\n Skia.Color(color),\n BlendMode[enumKey(mode)]\n );\n return composeColorFilter(Skia, cf, children);\n }\n);\n\nexport const BlendColor = (props: AnimatedProps<BlendColorProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -5,16 +5,16 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.composeColorFilter = void 0;
7
7
 
8
- var _skia = require("../../../skia");
8
+ var _types = require("../../../skia/types");
9
9
 
10
- const composeColorFilter = (cf, children) => {
11
- const [col] = children.filter(_skia.isColorFilter);
12
- const [img] = children.filter(_skia.isImageFilter);
10
+ const composeColorFilter = (Skia, cf, children) => {
11
+ const [col] = children.filter(_types.isColorFilter);
12
+ const [img] = children.filter(_types.isImageFilter);
13
13
 
14
14
  if (col) {
15
- return _skia.Skia.ColorFilter.MakeCompose(cf, col);
15
+ return Skia.ColorFilter.MakeCompose(cf, col);
16
16
  } else if (img) {
17
- return _skia.Skia.ImageFilter.MakeColorFilter(cf, img);
17
+ return Skia.ImageFilter.MakeColorFilter(cf, img);
18
18
  }
19
19
 
20
20
  return cf;
@@ -1 +1 @@
1
- {"version":3,"sources":["Compose.ts"],"names":["composeColorFilter","cf","children","col","filter","isColorFilter","img","isImageFilter","Skia","ColorFilter","MakeCompose","ImageFilter","MakeColorFilter"],"mappings":";;;;;;;AACA;;AAGO,MAAMA,kBAAkB,GAAG,CAChCC,EADgC,EAEhCC,QAFgC,KAG7B;AACH,QAAM,CAACC,GAAD,IAAQD,QAAQ,CAACE,MAAT,CAAgBC,mBAAhB,CAAd;AACA,QAAM,CAACC,GAAD,IAAQJ,QAAQ,CAACE,MAAT,CAAgBG,mBAAhB,CAAd;;AACA,MAAIJ,GAAJ,EAAS;AACP,WAAOK,WAAKC,WAAL,CAAiBC,WAAjB,CAA6BT,EAA7B,EAAiCE,GAAjC,CAAP;AACD,GAFD,MAEO,IAAIG,GAAJ,EAAS;AACd,WAAOE,WAAKG,WAAL,CAAiBC,eAAjB,CAAiCX,EAAjC,EAAqCK,GAArC,CAAP;AACD;;AACD,SAAOL,EAAP;AACD,CAZM","sourcesContent":["import type { SkColorFilter } from \"../../../skia\";\nimport { isColorFilter, isImageFilter, Skia } from \"../../../skia\";\nimport type { DeclarationResult } from \"../../nodes\";\n\nexport const composeColorFilter = (\n cf: SkColorFilter,\n children: DeclarationResult[]\n) => {\n const [col] = children.filter(isColorFilter);\n const [img] = children.filter(isImageFilter);\n if (col) {\n return Skia.ColorFilter.MakeCompose(cf, col);\n } else if (img) {\n return Skia.ImageFilter.MakeColorFilter(cf, img);\n }\n return cf;\n};\n"]}
1
+ {"version":3,"sources":["Compose.ts"],"names":["composeColorFilter","Skia","cf","children","col","filter","isColorFilter","img","isImageFilter","ColorFilter","MakeCompose","ImageFilter","MakeColorFilter"],"mappings":";;;;;;;AACA;;AAGO,MAAMA,kBAAkB,GAAG,CAChCC,IADgC,EAEhCC,EAFgC,EAGhCC,QAHgC,KAI7B;AACH,QAAM,CAACC,GAAD,IAAQD,QAAQ,CAACE,MAAT,CAAgBC,oBAAhB,CAAd;AACA,QAAM,CAACC,GAAD,IAAQJ,QAAQ,CAACE,MAAT,CAAgBG,oBAAhB,CAAd;;AACA,MAAIJ,GAAJ,EAAS;AACP,WAAOH,IAAI,CAACQ,WAAL,CAAiBC,WAAjB,CAA6BR,EAA7B,EAAiCE,GAAjC,CAAP;AACD,GAFD,MAEO,IAAIG,GAAJ,EAAS;AACd,WAAON,IAAI,CAACU,WAAL,CAAiBC,eAAjB,CAAiCV,EAAjC,EAAqCK,GAArC,CAAP;AACD;;AACD,SAAOL,EAAP;AACD,CAbM","sourcesContent":["import type { SkColorFilter, Skia } from \"../../../skia/types\";\nimport { isColorFilter, isImageFilter } from \"../../../skia/types\";\nimport type { DeclarationResult } from \"../../nodes\";\n\nexport const composeColorFilter = (\n Skia: Skia,\n cf: SkColorFilter,\n children: DeclarationResult[]\n) => {\n const [col] = children.filter(isColorFilter);\n const [img] = children.filter(isImageFilter);\n if (col) {\n return Skia.ColorFilter.MakeCompose(cf, col);\n } else if (img) {\n return Skia.ImageFilter.MakeColorFilter(cf, img);\n }\n return cf;\n};\n"]}
@@ -7,7 +7,7 @@ exports.Lerp = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _skia = require("../../../skia");
10
+ var _types = require("../../../skia/types");
11
11
 
12
12
  var _Declaration = require("../../nodes/Declaration");
13
13
 
@@ -17,15 +17,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
17
17
 
18
18
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
19
 
20
- const onDeclare = (0, _Declaration.createDeclaration)((_ref, children) => {
20
+ const onDeclare = (0, _Declaration.createDeclaration)((_ref, children, _ref2) => {
21
21
  let {
22
22
  t
23
23
  } = _ref;
24
- const [src, dst] = children.filter(_skia.isColorFilter);
25
-
26
- const cf = _skia.Skia.ColorFilter.MakeLerp(t, src, dst);
27
-
28
- return (0, _Compose.composeColorFilter)(cf, children.filter(c => c !== src && c !== dst));
24
+ let {
25
+ Skia
26
+ } = _ref2;
27
+ const [src, dst] = children.filter(_types.isColorFilter);
28
+ const cf = Skia.ColorFilter.MakeLerp(t, src, dst);
29
+ return (0, _Compose.composeColorFilter)(Skia, cf, children.filter(c => c !== src && c !== dst));
29
30
  });
30
31
 
31
32
  const Lerp = props => {
@@ -1 +1 @@
1
- {"version":3,"sources":["Lerp.tsx"],"names":["onDeclare","children","t","src","dst","filter","isColorFilter","cf","Skia","ColorFilter","MakeLerp","c","Lerp","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAGA;;;;;;AAOA,MAAMA,SAAS,GAAG,oCAA6B,OAAQC,QAAR,KAAqB;AAAA,MAApB;AAAEC,IAAAA;AAAF,GAAoB;AAClE,QAAM,CAACC,GAAD,EAAMC,GAAN,IAAaH,QAAQ,CAACI,MAAT,CAAgBC,mBAAhB,CAAnB;;AACA,QAAMC,EAAE,GAAGC,WAAKC,WAAL,CAAiBC,QAAjB,CAA0BR,CAA1B,EAA6BC,GAA7B,EAAkCC,GAAlC,CAAX;;AACA,SAAO,iCACLG,EADK,EAELN,QAAQ,CAACI,MAAT,CAAiBM,CAAD,IAAOA,CAAC,KAAKR,GAAN,IAAaQ,CAAC,KAAKP,GAA1C,CAFK,CAAP;AAID,CAPiB,CAAlB;;AASO,MAAMQ,IAAI,GAAIC,KAAD,IAAqC;AACvD,sBAAO;AAAe,IAAA,SAAS,EAAEb;AAA1B,KAAyCa,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia, isColorFilter } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nimport { composeColorFilter } from \"./Compose\";\n\nexport interface LerpProps {\n t: number;\n children: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<LerpProps>(({ t }, children) => {\n const [src, dst] = children.filter(isColorFilter);\n const cf = Skia.ColorFilter.MakeLerp(t, src, dst);\n return composeColorFilter(\n cf,\n children.filter((c) => c !== src && c !== dst)\n );\n});\n\nexport const Lerp = (props: AnimatedProps<LerpProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["Lerp.tsx"],"names":["onDeclare","children","t","Skia","src","dst","filter","isColorFilter","cf","ColorFilter","MakeLerp","c","Lerp","props"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAGA;;;;;;AAOA,MAAMA,SAAS,GAAG,oCAA6B,OAAQC,QAAR,YAA+B;AAAA,MAA9B;AAAEC,IAAAA;AAAF,GAA8B;AAAA,MAAb;AAAEC,IAAAA;AAAF,GAAa;AAC5E,QAAM,CAACC,GAAD,EAAMC,GAAN,IAAaJ,QAAQ,CAACK,MAAT,CAAgBC,oBAAhB,CAAnB;AACA,QAAMC,EAAE,GAAGL,IAAI,CAACM,WAAL,CAAiBC,QAAjB,CAA0BR,CAA1B,EAA6BE,GAA7B,EAAkCC,GAAlC,CAAX;AACA,SAAO,iCACLF,IADK,EAELK,EAFK,EAGLP,QAAQ,CAACK,MAAT,CAAiBK,CAAD,IAAOA,CAAC,KAAKP,GAAN,IAAaO,CAAC,KAAKN,GAA1C,CAHK,CAAP;AAKD,CARiB,CAAlB;;AAUO,MAAMO,IAAI,GAAIC,KAAD,IAAqC;AACvD,sBAAO;AAAe,IAAA,SAAS,EAAEb;AAA1B,KAAyCa,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { isColorFilter } from \"../../../skia/types\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nimport { composeColorFilter } from \"./Compose\";\n\nexport interface LerpProps {\n t: number;\n children: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<LerpProps>(({ t }, children, { Skia }) => {\n const [src, dst] = children.filter(isColorFilter);\n const cf = Skia.ColorFilter.MakeLerp(t, src, dst);\n return composeColorFilter(\n Skia,\n cf,\n children.filter((c) => c !== src && c !== dst)\n );\n});\n\nexport const Lerp = (props: AnimatedProps<LerpProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -7,8 +7,6 @@ exports.LinearToSRGBGamma = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _skia = require("../../../skia");
11
-
12
10
  var _Declaration = require("../../nodes/Declaration");
13
11
 
14
12
  var _Compose = require("./Compose");
@@ -17,10 +15,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
17
15
 
18
16
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
17
 
20
- const onDeclare = (0, _Declaration.createDeclaration)((_props, children) => {
21
- const cf = _skia.Skia.ColorFilter.MakeLinearToSRGBGamma();
22
-
23
- return (0, _Compose.composeColorFilter)(cf, children);
18
+ const onDeclare = (0, _Declaration.createDeclaration)((_props, children, _ref) => {
19
+ let {
20
+ Skia
21
+ } = _ref;
22
+ const cf = Skia.ColorFilter.MakeLinearToSRGBGamma();
23
+ return (0, _Compose.composeColorFilter)(Skia, cf, children);
24
24
  });
25
25
 
26
26
  const LinearToSRGBGamma = props => {
@@ -1 +1 @@
1
- {"version":3,"sources":["LinearToSRGBGamma.tsx"],"names":["onDeclare","_props","children","cf","Skia","ColorFilter","MakeLinearToSRGBGamma","LinearToSRGBGamma","props"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAGA;;;;;;AAKA,MAAMA,SAAS,GAAG,oCAAkB,CAACC,MAAD,EAASC,QAAT,KAAsB;AACxD,QAAMC,EAAE,GAAGC,WAAKC,WAAL,CAAiBC,qBAAjB,EAAX;;AACA,SAAO,iCAAmBH,EAAnB,EAAuBD,QAAvB,CAAP;AACD,CAHiB,CAAlB;;AAKO,MAAMK,iBAAiB,GAC5BC,KAD+B,IAE5B;AACH,sBAAO;AAAe,IAAA,SAAS,EAAER;AAA1B,KAAyCQ,KAAzC,EAAP;AACD,CAJM","sourcesContent":["import React from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nimport { composeColorFilter } from \"./Compose\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface LinearToSRGBGammaProps {}\n\nconst onDeclare = createDeclaration((_props, children) => {\n const cf = Skia.ColorFilter.MakeLinearToSRGBGamma();\n return composeColorFilter(cf, children);\n});\n\nexport const LinearToSRGBGamma = (\n props: AnimatedProps<LinearToSRGBGammaProps>\n) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["LinearToSRGBGamma.tsx"],"names":["onDeclare","_props","children","Skia","cf","ColorFilter","MakeLinearToSRGBGamma","LinearToSRGBGamma","props"],"mappings":";;;;;;;AAAA;;AAEA;;AAGA;;;;;;AAKA,MAAMA,SAAS,GAAG,oCAAkB,CAACC,MAAD,EAASC,QAAT,WAAgC;AAAA,MAAb;AAAEC,IAAAA;AAAF,GAAa;AAClE,QAAMC,EAAE,GAAGD,IAAI,CAACE,WAAL,CAAiBC,qBAAjB,EAAX;AACA,SAAO,iCAAmBH,IAAnB,EAAyBC,EAAzB,EAA6BF,QAA7B,CAAP;AACD,CAHiB,CAAlB;;AAKO,MAAMK,iBAAiB,GAC5BC,KAD+B,IAE5B;AACH,sBAAO;AAAe,IAAA,SAAS,EAAER;AAA1B,KAAyCQ,KAAzC,EAAP;AACD,CAJM","sourcesContent":["import React from \"react\";\n\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nimport { composeColorFilter } from \"./Compose\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface LinearToSRGBGammaProps {}\n\nconst onDeclare = createDeclaration((_props, children, { Skia }) => {\n const cf = Skia.ColorFilter.MakeLinearToSRGBGamma();\n return composeColorFilter(Skia, cf, children);\n});\n\nexport const LinearToSRGBGamma = (\n props: AnimatedProps<LinearToSRGBGammaProps>\n) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -7,8 +7,6 @@ exports.LumaColorFilter = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _skia = require("../../../skia");
11
-
12
10
  var _Declaration = require("../../nodes/Declaration");
13
11
 
14
12
  var _Compose = require("./Compose");
@@ -17,10 +15,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
17
15
 
18
16
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
17
 
20
- const onDeclare = (0, _Declaration.createDeclaration)((_props, children) => {
21
- const cf = _skia.Skia.ColorFilter.MakeLumaColorFilter();
22
-
23
- return (0, _Compose.composeColorFilter)(cf, children);
18
+ const onDeclare = (0, _Declaration.createDeclaration)((_props, children, _ref) => {
19
+ let {
20
+ Skia
21
+ } = _ref;
22
+ const cf = Skia.ColorFilter.MakeLumaColorFilter();
23
+ return (0, _Compose.composeColorFilter)(Skia, cf, children);
24
24
  });
25
25
 
26
26
  const LumaColorFilter = props => {
@@ -1 +1 @@
1
- {"version":3,"sources":["LumaColorFilter.tsx"],"names":["onDeclare","_props","children","cf","Skia","ColorFilter","MakeLumaColorFilter","LumaColorFilter","props"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAGA;;;;;;AAKA,MAAMA,SAAS,GAAG,oCAAkB,CAACC,MAAD,EAASC,QAAT,KAAsB;AACxD,QAAMC,EAAE,GAAGC,WAAKC,WAAL,CAAiBC,mBAAjB,EAAX;;AACA,SAAO,iCAAmBH,EAAnB,EAAuBD,QAAvB,CAAP;AACD,CAHiB,CAAlB;;AAKO,MAAMK,eAAe,GAAIC,KAAD,IAAgD;AAC7E,sBAAO;AAAe,IAAA,SAAS,EAAER;AAA1B,KAAyCQ,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nimport { composeColorFilter } from \"./Compose\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface LumaColorFilterProps {}\n\nconst onDeclare = createDeclaration((_props, children) => {\n const cf = Skia.ColorFilter.MakeLumaColorFilter();\n return composeColorFilter(cf, children);\n});\n\nexport const LumaColorFilter = (props: AnimatedProps<LumaColorFilterProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["LumaColorFilter.tsx"],"names":["onDeclare","_props","children","Skia","cf","ColorFilter","MakeLumaColorFilter","LumaColorFilter","props"],"mappings":";;;;;;;AAAA;;AAEA;;AAGA;;;;;;AAKA,MAAMA,SAAS,GAAG,oCAAkB,CAACC,MAAD,EAASC,QAAT,WAAgC;AAAA,MAAb;AAAEC,IAAAA;AAAF,GAAa;AAClE,QAAMC,EAAE,GAAGD,IAAI,CAACE,WAAL,CAAiBC,mBAAjB,EAAX;AACA,SAAO,iCAAmBH,IAAnB,EAAyBC,EAAzB,EAA6BF,QAA7B,CAAP;AACD,CAHiB,CAAlB;;AAKO,MAAMK,eAAe,GAAIC,KAAD,IAAgD;AAC7E,sBAAO;AAAe,IAAA,SAAS,EAAER;AAA1B,KAAyCQ,KAAzC,EAAP;AACD,CAFM","sourcesContent":["import React from \"react\";\n\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nimport { composeColorFilter } from \"./Compose\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface LumaColorFilterProps {}\n\nconst onDeclare = createDeclaration((_props, children, { Skia }) => {\n const cf = Skia.ColorFilter.MakeLumaColorFilter();\n return composeColorFilter(Skia, cf, children);\n});\n\nexport const LumaColorFilter = (props: AnimatedProps<LumaColorFilterProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -7,8 +7,6 @@ exports.OpacityMatrix = exports.ColorMatrix = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _skia = require("../../../skia");
11
-
12
10
  var _nodes = require("../../nodes");
13
11
 
14
12
  var _Compose = require("./Compose");
@@ -17,14 +15,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
17
15
 
18
16
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
17
 
20
- const onDeclare = (0, _nodes.createDeclaration)((_ref, children) => {
18
+ const onDeclare = (0, _nodes.createDeclaration)((_ref, children, _ref2) => {
21
19
  let {
22
20
  matrix
23
21
  } = _ref;
24
-
25
- const cf = _skia.Skia.ColorFilter.MakeMatrix(matrix);
26
-
27
- return (0, _Compose.composeColorFilter)(cf, children);
22
+ let {
23
+ Skia
24
+ } = _ref2;
25
+ const cf = Skia.ColorFilter.MakeMatrix(matrix);
26
+ return (0, _Compose.composeColorFilter)(Skia, cf, children);
28
27
  });
29
28
 
30
29
  const ColorMatrix = props => {
@@ -1 +1 @@
1
- {"version":3,"sources":["Matrix.tsx"],"names":["onDeclare","children","matrix","cf","Skia","ColorFilter","MakeMatrix","ColorMatrix","props","OpacityMatrix","opacity"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAGA;;;;;;AAOA,MAAMA,SAAS,GAAG,8BAChB,OAAaC,QAAb,KAA0B;AAAA,MAAzB;AAAEC,IAAAA;AAAF,GAAyB;;AACxB,QAAMC,EAAE,GAAGC,WAAKC,WAAL,CAAiBC,UAAjB,CAA4BJ,MAA5B,CAAX;;AACA,SAAO,iCAAmBC,EAAnB,EAAuBF,QAAvB,CAAP;AACD,CAJe,CAAlB;;AAOO,MAAMM,WAAW,GAAIC,KAAD,IAA4C;AACrE,sBAAO;AAAe,IAAA,SAAS,EAAER;AAA1B,KAAyCQ,KAAzC,EAAP;AACD,CAFM;;;;AAIA,MAAMC,aAAa,GAAIC,OAAD,IAAqB,CAChD,CADgD,EAEhD,CAFgD,EAGhD,CAHgD,EAIhD,CAJgD,EAKhD,CALgD,EAMhD,CANgD,EAOhD,CAPgD,EAQhD,CARgD,EAShD,CATgD,EAUhD,CAVgD,EAWhD,CAXgD,EAYhD,CAZgD,EAahD,CAbgD,EAchD,CAdgD,EAehD,CAfgD,EAgBhD,CAhBgD,EAiBhD,CAjBgD,EAkBhD,CAlBgD,EAmBhDA,OAnBgD,EAoBhD,CApBgD,CAA3C","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes\";\nimport type { AnimatedProps } from \"../../processors\";\n\nimport { composeColorFilter } from \"./Compose\";\n\ninterface ColorMatrixProps {\n matrix: number[];\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<ColorMatrixProps>(\n ({ matrix }, children) => {\n const cf = Skia.ColorFilter.MakeMatrix(matrix);\n return composeColorFilter(cf, children);\n }\n);\n\nexport const ColorMatrix = (props: AnimatedProps<ColorMatrixProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n\nexport const OpacityMatrix = (opacity: number) => [\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n opacity,\n 0,\n];\n"]}
1
+ {"version":3,"sources":["Matrix.tsx"],"names":["onDeclare","children","matrix","Skia","cf","ColorFilter","MakeMatrix","ColorMatrix","props","OpacityMatrix","opacity"],"mappings":";;;;;;;AAAA;;AAGA;;AAGA;;;;;;AAOA,MAAMA,SAAS,GAAG,8BAChB,OAAaC,QAAb,YAAoC;AAAA,MAAnC;AAAEC,IAAAA;AAAF,GAAmC;AAAA,MAAb;AAAEC,IAAAA;AAAF,GAAa;AAClC,QAAMC,EAAE,GAAGD,IAAI,CAACE,WAAL,CAAiBC,UAAjB,CAA4BJ,MAA5B,CAAX;AACA,SAAO,iCAAmBC,IAAnB,EAAyBC,EAAzB,EAA6BH,QAA7B,CAAP;AACD,CAJe,CAAlB;;AAOO,MAAMM,WAAW,GAAIC,KAAD,IAA4C;AACrE,sBAAO;AAAe,IAAA,SAAS,EAAER;AAA1B,KAAyCQ,KAAzC,EAAP;AACD,CAFM;;;;AAIA,MAAMC,aAAa,GAAIC,OAAD,IAAqB,CAChD,CADgD,EAEhD,CAFgD,EAGhD,CAHgD,EAIhD,CAJgD,EAKhD,CALgD,EAMhD,CANgD,EAOhD,CAPgD,EAQhD,CARgD,EAShD,CATgD,EAUhD,CAVgD,EAWhD,CAXgD,EAYhD,CAZgD,EAahD,CAbgD,EAchD,CAdgD,EAehD,CAfgD,EAgBhD,CAhBgD,EAiBhD,CAjBgD,EAkBhD,CAlBgD,EAmBhDA,OAnBgD,EAoBhD,CApBgD,CAA3C","sourcesContent":["import React from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { createDeclaration } from \"../../nodes\";\nimport type { AnimatedProps } from \"../../processors\";\n\nimport { composeColorFilter } from \"./Compose\";\n\ninterface ColorMatrixProps {\n matrix: number[];\n children?: ReactNode | ReactNode[];\n}\n\nconst onDeclare = createDeclaration<ColorMatrixProps>(\n ({ matrix }, children, { Skia }) => {\n const cf = Skia.ColorFilter.MakeMatrix(matrix);\n return composeColorFilter(Skia, cf, children);\n }\n);\n\nexport const ColorMatrix = (props: AnimatedProps<ColorMatrixProps>) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n\nexport const OpacityMatrix = (opacity: number) => [\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n opacity,\n 0,\n];\n"]}
@@ -7,8 +7,6 @@ exports.SRGBToLinearGamma = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _skia = require("../../../skia");
11
-
12
10
  var _Declaration = require("../../nodes/Declaration");
13
11
 
14
12
  var _Compose = require("./Compose");
@@ -17,10 +15,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
17
15
 
18
16
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
17
 
20
- const onDeclare = (0, _Declaration.createDeclaration)((_props, children) => {
21
- const cf = _skia.Skia.ColorFilter.MakeSRGBToLinearGamma();
22
-
23
- return (0, _Compose.composeColorFilter)(cf, children);
18
+ const onDeclare = (0, _Declaration.createDeclaration)((_props, children, _ref) => {
19
+ let {
20
+ Skia
21
+ } = _ref;
22
+ const cf = Skia.ColorFilter.MakeSRGBToLinearGamma();
23
+ return (0, _Compose.composeColorFilter)(Skia, cf, children);
24
24
  });
25
25
 
26
26
  const SRGBToLinearGamma = props => {
@@ -1 +1 @@
1
- {"version":3,"sources":["SRGBToLinearGamma.tsx"],"names":["onDeclare","_props","children","cf","Skia","ColorFilter","MakeSRGBToLinearGamma","SRGBToLinearGamma","props"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAGA;;;;;;AAKA,MAAMA,SAAS,GAAG,oCAAkB,CAACC,MAAD,EAASC,QAAT,KAAsB;AACxD,QAAMC,EAAE,GAAGC,WAAKC,WAAL,CAAiBC,qBAAjB,EAAX;;AACA,SAAO,iCAAmBH,EAAnB,EAAuBD,QAAvB,CAAP;AACD,CAHiB,CAAlB;;AAKO,MAAMK,iBAAiB,GAC5BC,KAD+B,IAE5B;AACH,sBAAO;AAAe,IAAA,SAAS,EAAER;AAA1B,KAAyCQ,KAAzC,EAAP;AACD,CAJM","sourcesContent":["import React from \"react\";\n\nimport { Skia } from \"../../../skia\";\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nimport { composeColorFilter } from \"./Compose\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface SRGBToLinearGammaProps {}\n\nconst onDeclare = createDeclaration((_props, children) => {\n const cf = Skia.ColorFilter.MakeSRGBToLinearGamma();\n return composeColorFilter(cf, children);\n});\n\nexport const SRGBToLinearGamma = (\n props: AnimatedProps<SRGBToLinearGammaProps>\n) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["SRGBToLinearGamma.tsx"],"names":["onDeclare","_props","children","Skia","cf","ColorFilter","MakeSRGBToLinearGamma","SRGBToLinearGamma","props"],"mappings":";;;;;;;AAAA;;AAEA;;AAGA;;;;;;AAKA,MAAMA,SAAS,GAAG,oCAAkB,CAACC,MAAD,EAASC,QAAT,WAAgC;AAAA,MAAb;AAAEC,IAAAA;AAAF,GAAa;AAClE,QAAMC,EAAE,GAAGD,IAAI,CAACE,WAAL,CAAiBC,qBAAjB,EAAX;AACA,SAAO,iCAAmBH,IAAnB,EAAyBC,EAAzB,EAA6BF,QAA7B,CAAP;AACD,CAHiB,CAAlB;;AAKO,MAAMK,iBAAiB,GAC5BC,KAD+B,IAE5B;AACH,sBAAO;AAAe,IAAA,SAAS,EAAER;AAA1B,KAAyCQ,KAAzC,EAAP;AACD,CAJM","sourcesContent":["import React from \"react\";\n\nimport { createDeclaration } from \"../../nodes/Declaration\";\nimport type { AnimatedProps } from \"../../processors/Animations/Animations\";\n\nimport { composeColorFilter } from \"./Compose\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface SRGBToLinearGammaProps {}\n\nconst onDeclare = createDeclaration((_props, children, { Skia }) => {\n const cf = Skia.ColorFilter.MakeSRGBToLinearGamma();\n return composeColorFilter(Skia, cf, children);\n});\n\nexport const SRGBToLinearGamma = (\n props: AnimatedProps<SRGBToLinearGammaProps>\n) => {\n return <skDeclaration onDeclare={onDeclare} {...props} />;\n};\n"]}
@@ -7,8 +7,6 @@ exports.size = exports.rect2rect = exports.fitRects = void 0;
7
7
 
8
8
  var _typeddash = require("../../typeddash");
9
9
 
10
- var _skia = require("../../../skia");
11
-
12
10
  const size = function () {
13
11
  let width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
14
12
  let height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
@@ -52,12 +50,7 @@ const fitRects = (fit, rect, _ref) => {
52
50
  width,
53
51
  height
54
52
  });
55
- const src = inscribe(sizes.src, {
56
- x: 0,
57
- y: 0,
58
- width: rect.width,
59
- height: rect.height
60
- });
53
+ const src = inscribe(sizes.src, rect);
61
54
  const dst = inscribe(sizes.dst, {
62
55
  x,
63
56
  y,
@@ -79,7 +72,12 @@ const inscribe = (_ref2, rect) => {
79
72
  } = _ref2;
80
73
  const halfWidthDelta = (rect.width - width) / 2.0;
81
74
  const halfHeightDelta = (rect.height - height) / 2.0;
82
- return _skia.Skia.XYWHRect(rect.x + halfWidthDelta, rect.y + halfHeightDelta, width, height);
75
+ return {
76
+ x: rect.x + halfWidthDelta,
77
+ y: rect.y + halfHeightDelta,
78
+ width,
79
+ height
80
+ };
83
81
  };
84
82
 
85
83
  const applyBoxFit = (fit, input, output) => {
@@ -1 +1 @@
1
- {"version":3,"sources":["BoxFit.ts"],"names":["size","width","height","rect2rect","src","dst","scaleX","scaleY","translateX","x","translateY","y","fitRects","fit","rect","sizes","applyBoxFit","inscribe","halfWidthDelta","halfHeightDelta","Skia","XYWHRect","input","output","Math","min","aspectRatio"],"mappings":";;;;;;;AAAA;;AACA;;AAkBO,MAAMA,IAAI,GAAG;AAAA,MAACC,KAAD,uEAAS,CAAT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;AAhDJ;;AAkDA,SAAO;AAAET,IAAAA,GAAF;AAAOC,IAAAA;AAAP,GAAP;AACD,CA9DD","sourcesContent":["import { exhaustiveCheck } from \"../../typeddash\";\nimport { Skia } from \"../../../skia\";\nimport type { SkRect } from \"../../../skia\";\n\n// https://api.flutter.dev/flutter/painting/BoxFit-class.html\nexport type Fit =\n | \"cover\"\n | \"contain\"\n | \"fill\"\n | \"fitHeight\"\n | \"fitWidth\"\n | \"none\"\n | \"scaleDown\";\n\nexport interface Size {\n width: number;\n height: number;\n}\n\nexport const size = (width = 0, height = 0) => ({ width, height });\n\nexport const rect2rect = (src: SkRect, dst: SkRect) => {\n const scaleX = dst.width / src.width;\n const scaleY = dst.height / src.height;\n const translateX = dst.x - src.x * scaleX;\n const translateY = dst.y - src.y * scaleY;\n return [{ translateX }, { translateY }, { scaleX }, { scaleY }] as const;\n};\n\nexport const fitRects = (\n fit: Fit,\n rect: SkRect,\n { x, y, width, height }: SkRect\n) => {\n const sizes = applyBoxFit(\n fit,\n { width: rect.width, height: rect.height },\n { width, height }\n );\n const src = inscribe(sizes.src, {\n x: 0,\n y: 0,\n width: rect.width,\n height: rect.height,\n });\n const dst = inscribe(sizes.dst, {\n x,\n y,\n width,\n height,\n });\n return { src, dst };\n};\n\nconst inscribe = (\n { width, height }: Size,\n rect: { x: number; y: number; width: number; height: number }\n) => {\n const halfWidthDelta = (rect.width - width) / 2.0;\n const halfHeightDelta = (rect.height - height) / 2.0;\n return Skia.XYWHRect(\n rect.x + halfWidthDelta,\n rect.y + halfHeightDelta,\n width,\n height\n );\n};\n\nconst applyBoxFit = (fit: Fit, input: Size, output: Size) => {\n let src = size(),\n dst = size();\n if (\n input.height <= 0.0 ||\n input.width <= 0.0 ||\n output.height <= 0.0 ||\n output.width <= 0.0\n ) {\n return { src, dst };\n }\n switch (fit) {\n case \"fill\":\n src = input;\n dst = output;\n break;\n case \"contain\":\n src = input;\n if (output.width / output.height > src.width / src.height) {\n dst = size((src.width * output.height) / src.height, output.height);\n } else {\n dst = size(output.width, (src.height * output.width) / src.width);\n }\n break;\n case \"cover\":\n if (output.width / output.height > input.width / input.height) {\n src = size(input.width, (input.width * output.height) / output.width);\n } else {\n src = size((input.height * output.width) / output.height, input.height);\n }\n dst = output;\n break;\n case \"fitWidth\":\n src = size(input.width, (input.width * output.height) / output.width);\n dst = size(output.width, (src.height * output.width) / src.width);\n break;\n case \"fitHeight\":\n src = size((input.height * output.width) / output.height, input.height);\n dst = size((src.width * output.height) / src.height, output.height);\n break;\n case \"none\":\n src = size(\n Math.min(input.width, output.width),\n Math.min(input.height, output.height)\n );\n dst = src;\n break;\n case \"scaleDown\":\n src = input;\n dst = input;\n const aspectRatio = input.width / input.height;\n if (dst.height > output.height) {\n dst = size(output.height * aspectRatio, output.height);\n }\n if (dst.width > output.width) {\n dst = size(output.width, output.width / aspectRatio);\n }\n break;\n default:\n exhaustiveCheck(fit);\n }\n return { src, dst };\n};\n"]}
1
+ {"version":3,"sources":["BoxFit.ts"],"names":["size","width","height","rect2rect","src","dst","scaleX","scaleY","translateX","x","translateY","y","fitRects","fit","rect","sizes","applyBoxFit","inscribe","halfWidthDelta","halfHeightDelta","input","output","Math","min","aspectRatio"],"mappings":";;;;;;;AAAA;;AAkBO,MAAMA,IAAI,GAAG;AAAA,MAACC,KAAD,uEAAS,CAAT;AAAA,MAAYC,MAAZ,uEAAqB,CAArB;AAAA,SAA4B;AAAED,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAA5B;AAAA,CAAb;;;;AAEA,MAAMC,SAAS,GAAG,CAACC,GAAD,EAAcC,GAAd,KAA8B;AACrD,QAAMC,MAAM,GAAGD,GAAG,CAACJ,KAAJ,GAAYG,GAAG,CAACH,KAA/B;AACA,QAAMM,MAAM,GAAGF,GAAG,CAACH,MAAJ,GAAaE,GAAG,CAACF,MAAhC;AACA,QAAMM,UAAU,GAAGH,GAAG,CAACI,CAAJ,GAAQL,GAAG,CAACK,CAAJ,GAAQH,MAAnC;AACA,QAA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,IAAI,CAACC,GAAL,CAASH,KAAK,CAAClB,MAAf,EAAuBmB,MAAM,CAACnB,MAA9B,CAFQ,CAAV;AAIAG,MAAAA,GAAG,GAAGD,GAAN;AACA;;AACF,SAAK,WAAL;AACEA,MAAAA,GAAG,GAAGgB,KAAN;AACAf,MAAAA,GAAG,GAAGe,KAAN;AACA,YAAMI,WAAW,GAAGJ,KAAK,CAACnB,KAAN,GAAcmB,KAAK,CAAClB,MAAxC;;AACA,UAAIG,GAAG,CAACH,MAAJ,GAAamB,MAAM,CAACnB,MAAxB,EAAgC;AAC9BG,QAAAA,GAAG,GAAGL,IAAI,CAACqB,MAAM,CAACnB,MAAP,GAAgBsB,WAAjB,EAA8BH,MAAM,CAACnB,MAArC,CAAV;AACD;;AACD,UAAIG,GAAG,CAACJ,KAAJ,GAAYoB,MAAM,CAACpB,KAAvB,EAA8B;AAC5BI,QAAAA,GAAG,GAAGL,IAAI,CAACqB,MAAM,CAACpB,KAAR,EAAeoB,MAAM,CAACpB,KAAP,GAAeuB,WAA9B,CAAV;AACD;;AACD;;AACF;AACE,sCAAgBX,GAAhB;AAhDJ;;AAkDA,SAAO;AAAET,IAAAA,GAAF;AAAOC,IAAAA;AAAP,GAAP;AACD,CA9DD","sourcesContent":["import { exhaustiveCheck } from \"../../typeddash\";\nimport type { SkRect } from \"../../../skia/types\";\n\n// https://api.flutter.dev/flutter/painting/BoxFit-class.html\nexport type Fit =\n | \"cover\"\n | \"contain\"\n | \"fill\"\n | \"fitHeight\"\n | \"fitWidth\"\n | \"none\"\n | \"scaleDown\";\n\nexport interface Size {\n width: number;\n height: number;\n}\n\nexport const size = (width = 0, height = 0) => ({ width, height });\n\nexport const rect2rect = (src: SkRect, dst: SkRect) => {\n const scaleX = dst.width / src.width;\n const scaleY = dst.height / src.height;\n const translateX = dst.x - src.x * scaleX;\n const translateY = dst.y - src.y * scaleY;\n return [{ translateX }, { translateY }, { scaleX }, { scaleY }] as const;\n};\n\nexport const fitRects = (\n fit: Fit,\n rect: SkRect,\n { x, y, width, height }: SkRect\n) => {\n const sizes = applyBoxFit(\n fit,\n { width: rect.width, height: rect.height },\n { width, height }\n );\n const src = inscribe(sizes.src, rect);\n const dst = inscribe(sizes.dst, {\n x,\n y,\n width,\n height,\n });\n return { src, dst };\n};\n\nconst inscribe = (\n { width, height }: Size,\n rect: { x: number; y: number; width: number; height: number }\n) => {\n const halfWidthDelta = (rect.width - width) / 2.0;\n const halfHeightDelta = (rect.height - height) / 2.0;\n return {\n x: rect.x + halfWidthDelta,\n y: rect.y + halfHeightDelta,\n width,\n height,\n };\n};\n\nconst applyBoxFit = (fit: Fit, input: Size, output: Size) => {\n let src = size(),\n dst = size();\n if (\n input.height <= 0.0 ||\n input.width <= 0.0 ||\n output.height <= 0.0 ||\n output.width <= 0.0\n ) {\n return { src, dst };\n }\n switch (fit) {\n case \"fill\":\n src = input;\n dst = output;\n break;\n case \"contain\":\n src = input;\n if (output.width / output.height > src.width / src.height) {\n dst = size((src.width * output.height) / src.height, output.height);\n } else {\n dst = size(output.width, (src.height * output.width) / src.width);\n }\n break;\n case \"cover\":\n if (output.width / output.height > input.width / input.height) {\n src = size(input.width, (input.width * output.height) / output.width);\n } else {\n src = size((input.height * output.width) / output.height, input.height);\n }\n dst = output;\n break;\n case \"fitWidth\":\n src = size(input.width, (input.width * output.height) / output.width);\n dst = size(output.width, (src.height * output.width) / src.width);\n break;\n case \"fitHeight\":\n src = size((input.height * output.width) / output.height, input.height);\n dst = size((src.width * output.height) / src.height, output.height);\n break;\n case \"none\":\n src = size(\n Math.min(input.width, output.width),\n Math.min(input.height, output.height)\n );\n dst = src;\n break;\n case \"scaleDown\":\n src = input;\n dst = input;\n const aspectRatio = input.width / input.height;\n if (dst.height > output.height) {\n dst = size(output.height * aspectRatio, output.height);\n }\n if (dst.width > output.width) {\n dst = size(output.width, output.width / aspectRatio);\n }\n break;\n default:\n exhaustiveCheck(fit);\n }\n return { src, dst };\n};\n"]}
@@ -20,14 +20,15 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
20
20
  const onDraw = (0, _Drawing.createDrawing)((_ref, _ref2) => {
21
21
  let {
22
22
  canvas,
23
- paint
23
+ paint,
24
+ Skia
24
25
  } = _ref;
25
26
  let {
26
27
  fit,
27
28
  image,
28
29
  ...rectProps
29
30
  } = _ref2;
30
- const rect = (0, _processors.processRect)(rectProps);
31
+ const rect = (0, _processors.processRect)(Skia, rectProps);
31
32
  const {
32
33
  src,
33
34
  dst
@@ -1 +1 @@
1
- {"version":3,"sources":["Image.tsx"],"names":["onDraw","canvas","paint","fit","image","rectProps","rect","src","dst","x","y","width","height","drawImageRect","Image","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAQA;;AACA;;AAGA;;;;;;AAaA,MAAMA,MAAM,GAAG,4BACb,iBAAqD;AAAA,MAApD;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAoD;AAAA,MAAjC;AAAEC,IAAAA,GAAF;AAAOC,IAAAA,KAAP;AAAc,OAAGC;AAAjB,GAAiC;AACnD,QAAMC,IAAI,GAAG,6BAAYD,SAAZ,CAAb;AACA,QAAM;AAAEE,IAAAA,GAAF;AAAOC,IAAAA;AAAP,MAAe,sBACnBL,GADmB,EAEnB;AACEM,IAAAA,CAAC,EAAE,CADL;AAEEC,IAAAA,CAAC,EAAE,CAFL;AAGEC,IAAAA,KAAK,EAAEP,KAAK,CAACO,KAAN,EAHT;AAIEC,IAAAA,MAAM,EAAER,KAAK,CAACQ,MAAN;AAJV,GAFmB,EAQnBN,IARmB,CAArB;AAUAL,EAAAA,MAAM,CAACY,aAAP,CAAqBT,KAArB,EAA4BG,GAA5B,EAAiCC,GAAjC,EAAsCN,KAAtC;AACD,CAdY,CAAf;;AAgBO,MAAMY,KAAK,GAAIC,KAAD,IAAsC;AACzD,sBAAO;AAAW,IAAA,MAAM,EAAEf;AAAnB,KAA+Be,KAA/B,EAAP;AACD,CAFM;;;AAIPD,KAAK,CAACE,YAAN,GAAqB;AACnBP,EAAAA,CAAC,EAAE,CADgB;AAEnBC,EAAAA,CAAC,EAAE,CAFgB;AAGnBP,EAAAA,GAAG,EAAE;AAHc,CAArB","sourcesContent":["import React from \"react\";\n\nimport type { SkImage } from \"../../../skia\";\nimport type {\n CustomPaintProps,\n RectDef,\n AnimatedProps,\n} from \"../../processors\";\nimport { createDrawing } from \"../../nodes/Drawing\";\nimport { processRect } from \"../../processors\";\n\nimport type { Fit } from \"./BoxFit\";\nimport { fitRects } from \"./BoxFit\";\n\nexport type SourceImageProps = {\n image: SkImage;\n};\n\nexport type BaseImageProps = RectDef &\n SourceImageProps & {\n fit: Fit;\n };\n\nexport type ImageProps = CustomPaintProps & BaseImageProps;\n\nconst onDraw = createDrawing<ImageProps>(\n ({ canvas, paint }, { fit, image, ...rectProps }) => {\n const rect = processRect(rectProps);\n const { src, dst } = fitRects(\n fit,\n {\n x: 0,\n y: 0,\n width: image.width(),\n height: image.height(),\n },\n rect\n );\n canvas.drawImageRect(image, src, dst, paint);\n }\n);\nexport const Image = (props: AnimatedProps<ImageProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n\nImage.defaultProps = {\n x: 0,\n y: 0,\n fit: \"contain\",\n};\n"]}
1
+ {"version":3,"sources":["Image.tsx"],"names":["onDraw","canvas","paint","Skia","fit","image","rectProps","rect","src","dst","x","y","width","height","drawImageRect","Image","props","defaultProps"],"mappings":";;;;;;;AAAA;;AAQA;;AACA;;AAGA;;;;;;AAaA,MAAMA,MAAM,GAAG,4BACb,iBAA2D;AAAA,MAA1D;AAAEC,IAAAA,MAAF;AAAUC,IAAAA,KAAV;AAAiBC,IAAAA;AAAjB,GAA0D;AAAA,MAAjC;AAAEC,IAAAA,GAAF;AAAOC,IAAAA,KAAP;AAAc,OAAGC;AAAjB,GAAiC;AACzD,QAAMC,IAAI,GAAG,6BAAYJ,IAAZ,EAAkBG,SAAlB,CAAb;AACA,QAAM;AAAEE,IAAAA,GAAF;AAAOC,IAAAA;AAAP,MAAe,sBACnBL,GADmB,EAEnB;AACEM,IAAAA,CAAC,EAAE,CADL;AAEEC,IAAAA,CAAC,EAAE,CAFL;AAGEC,IAAAA,KAAK,EAAEP,KAAK,CAACO,KAAN,EAHT;AAIEC,IAAAA,MAAM,EAAER,KAAK,CAACQ,MAAN;AAJV,GAFmB,EAQnBN,IARmB,CAArB;AAUAN,EAAAA,MAAM,CAACa,aAAP,CAAqBT,KAArB,EAA4BG,GAA5B,EAAiCC,GAAjC,EAAsCP,KAAtC;AACD,CAdY,CAAf;;AAgBO,MAAMa,KAAK,GAAIC,KAAD,IAAsC;AACzD,sBAAO;AAAW,IAAA,MAAM,EAAEhB;AAAnB,KAA+BgB,KAA/B,EAAP;AACD,CAFM;;;AAIPD,KAAK,CAACE,YAAN,GAAqB;AACnBP,EAAAA,CAAC,EAAE,CADgB;AAEnBC,EAAAA,CAAC,EAAE,CAFgB;AAGnBP,EAAAA,GAAG,EAAE;AAHc,CAArB","sourcesContent":["import React from \"react\";\n\nimport type { SkImage } from \"../../../skia/types\";\nimport type {\n CustomPaintProps,\n RectDef,\n AnimatedProps,\n} from \"../../processors\";\nimport { createDrawing } from \"../../nodes/Drawing\";\nimport { processRect } from \"../../processors\";\n\nimport type { Fit } from \"./BoxFit\";\nimport { fitRects } from \"./BoxFit\";\n\nexport type SourceImageProps = {\n image: SkImage;\n};\n\nexport type BaseImageProps = RectDef &\n SourceImageProps & {\n fit: Fit;\n };\n\nexport type ImageProps = CustomPaintProps & BaseImageProps;\n\nconst onDraw = createDrawing<ImageProps>(\n ({ canvas, paint, Skia }, { fit, image, ...rectProps }) => {\n const rect = processRect(Skia, rectProps);\n const { src, dst } = fitRects(\n fit,\n {\n x: 0,\n y: 0,\n width: image.width(),\n height: image.height(),\n },\n rect\n );\n canvas.drawImageRect(image, src, dst, paint);\n }\n);\nexport const Image = (props: AnimatedProps<ImageProps>) => {\n return <skDrawing onDraw={onDraw} {...props} />;\n};\n\nImage.defaultProps = {\n x: 0,\n y: 0,\n fit: \"contain\",\n};\n"]}
@@ -17,7 +17,8 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
17
17
 
18
18
  const onDraw = (0, _nodes.createDrawing)((_ref, _ref2) => {
19
19
  let {
20
- canvas
20
+ canvas,
21
+ Skia
21
22
  } = _ref;
22
23
  let {
23
24
  svg,
@@ -28,7 +29,7 @@ const onDraw = (0, _nodes.createDrawing)((_ref, _ref2) => {
28
29
  y,
29
30
  width,
30
31
  height
31
- } = (0, _processors.processRect)(rectProps);
32
+ } = (0, _processors.processRect)(Skia, rectProps);
32
33
  canvas.save();
33
34
  canvas.translate(x, y);
34
35
  canvas.drawSvg(svg, width, height);