@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 +0,0 @@
1
- {"version":3,"sources":["JsiSkPaint.ts"],"names":["JsiSkPaint","HostObject","constructor","CanvasKit","ref","copy","getColor","getStrokeCap","value","getStrokeJoin","getStrokeMiter","getStrokeWidth","setAlphaf","alpha","setAntiAlias","aa","setBlendMode","blendMode","setColor","color","setColorFilter","filter","setImageFilter","setMaskFilter","setPathEffect","effect","setShader","shader","setStrokeCap","cap","setStrokeJoin","join","setStrokeMiter","limit","setStrokeWidth","width","setStyle","style"],"mappings":";;;;;;;AAgBA;;AAEO,MAAMA,UAAN,SAAyBC,gBAAzB,CAAuE;AAC5EC,EAAAA,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAmC;AAC5C,UAAMD,SAAN,EAAiBC,GAAjB,EAAsB,OAAtB;AACD;;AAEDC,EAAAA,IAAI,GAAG;AACL,WAAO,IAAIL,UAAJ,CAAe,KAAKG,SAApB,EAA+B,KAAKC,GAAL,CAASC,IAAT,EAA/B,CAAP;AACD;;AAEDC,EAAAA,QAAQ,GAAG;AACT,WAAO,KAAKF,GAAL,CAASE,QAAT,EAAP;AACD;;AAEDC,EAAAA,YAAY,GAAG;AACb,WAAO,KAAKH,GAAL,CAASG,YAAT,GAAwBC,KAA/B;AACD;;AAEDC,EAAAA,aAAa,GAAG;AACd,WAAO,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sB;AAAEpB,MAAAA,KAAK,EAAEqB;AAAT,KAAtB;AACD;;AAEDC,EAAAA,aAAa,CAACC,IAAD,EAAmB;AAC9B,SAAK3B,GAAL,CAAS0B,aAAT,CAAuB;AAAEtB,MAAAA,KAAK,EAAEuB;AAAT,KAAvB;AACD;;AAEDC,EAAAA,cAAc,CAACC,KAAD,EAAgB;AAC5B,SAAK7B,GAAL,CAAS4B,cAAT,CAAwBC,KAAxB;AACD;;AAEDC,EAAAA,cAAc,CAACC,KAAD,EAAgB;AAC5B,SAAK/B,GAAL,CAAS8B,cAAT,CAAwBC,KAAxB;AACD;;AAEDC,EAAAA,QAAQ,CAACC,KAAD,EAAoB;AAC1B,SAAKjC,GAAL,CAASgC,QAAT,CAAkB;AAAE5B,MAAAA,KAAK,EAAE6B;AAAT,KAAlB;AACD;;AAnF2E","sourcesContent":["import type { CanvasKit, Paint } from \"canvaskit-wasm\";\n\nimport type {\n BlendMode,\n SkColor,\n SkColorFilter,\n SkImageFilter,\n SkPaint,\n SkShader,\n StrokeCap,\n StrokeJoin,\n PaintStyle,\n SkMaskFilter,\n SkPathEffect,\n} from \"../../types\";\n\nimport { HostObject, toNullableValue } from \"./Host\";\n\nexport class JsiSkPaint extends HostObject<Paint, \"Paint\"> implements SkPaint {\n constructor(CanvasKit: CanvasKit, ref: Paint) {\n super(CanvasKit, ref, \"Paint\");\n }\n\n copy() {\n return new JsiSkPaint(this.CanvasKit, this.ref.copy());\n }\n\n getColor() {\n return this.ref.getColor();\n }\n\n getStrokeCap() {\n return this.ref.getStrokeCap().value;\n }\n\n getStrokeJoin() {\n return this.ref.getStrokeJoin().value;\n }\n\n getStrokeMiter() {\n return this.ref.getStrokeMiter();\n }\n\n getStrokeWidth() {\n return this.ref.getStrokeWidth();\n }\n\n setAlphaf(alpha: number) {\n this.ref.setAlphaf(alpha);\n }\n\n setAntiAlias(aa: boolean) {\n this.ref.setAntiAlias(aa);\n }\n\n setBlendMode(blendMode: BlendMode) {\n this.ref.setBlendMode({ value: blendMode });\n }\n\n setColor(color: SkColor) {\n this.ref.setColor(color);\n }\n\n setColorFilter(filter: SkColorFilter | null) {\n this.ref.setColorFilter(toNullableValue(filter));\n }\n\n setImageFilter(filter: SkImageFilter | null) {\n this.ref.setImageFilter(toNullableValue(filter));\n }\n\n setMaskFilter(filter: SkMaskFilter | null) {\n this.ref.setMaskFilter(toNullableValue(filter));\n }\n\n setPathEffect(effect: SkPathEffect | null) {\n this.ref.setPathEffect(toNullableValue(effect));\n }\n\n setShader(shader: SkShader | null) {\n this.ref.setShader(toNullableValue(shader));\n }\n\n setStrokeCap(cap: StrokeCap) {\n this.ref.setStrokeCap({ value: cap });\n }\n\n setStrokeJoin(join: StrokeJoin) {\n this.ref.setStrokeJoin({ value: join });\n }\n\n setStrokeMiter(limit: number) {\n this.ref.setStrokeMiter(limit);\n }\n\n setStrokeWidth(width: number) {\n this.ref.setStrokeWidth(width);\n }\n\n setStyle(style: PaintStyle) {\n this.ref.setStyle({ value: style });\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["JsiSkRect.ts"],"names":["JsiSkRect","HostObject","constructor","CanvasKit","ref","x","y","width","height"],"mappings":";;;;;;;AAIA;;AAEO,MAAMA,SAAN,SAAwBC,gBAAxB,CAAmE;AACxEC,EAAAA,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAkC;AAC3C,UAAMD,SAAN,EAAiBC,GAAjB,EAAsB,MAAtB;AACD;;AAEI,MAADC,CAAC,GAAG;AACN,WAAO,KAAKD,GAAL,CAAS,CAAT,CAAP;AACD;;AAEI,MAADE,CAAC,GAAG;AACN,WAAO,KAAKF,GAAL,CAAS,CAAT,CAAP;AACD;;AAEQ,MAALG,KAAK,GAAG;AACV,WAAO,KAAKH,GAAL,CAAS,CAAT,IAAc,KAAKA,GAAL,CAAS,CAAT,CAArB;AACD;;AAES,MAANI,MAAM,GAAG;AACX,WAAO,KAAKJ,GAAL,CAAS,CAAT,IAAc,KAAKA,GAAL,CAAS,CAAT,CAArB;AACD;;AAnBuE","sourcesContent":["import type { CanvasKit, Rect } from \"canvaskit-wasm\";\n\nimport type { SkRect } from \"../../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkRect extends HostObject<Rect, \"Rect\"> implements SkRect {\n constructor(CanvasKit: CanvasKit, ref: Rect) {\n super(CanvasKit, ref, \"Rect\");\n }\n\n get x() {\n return this.ref[0];\n }\n\n get y() {\n return this.ref[1];\n }\n\n get width() {\n return this.ref[2] - this.ref[0];\n }\n\n get height() {\n return this.ref[3] - this.ref[1];\n }\n}\n"]}
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.JsiSkApi = void 0;
7
-
8
- var _JsiSkPaint = require("./JsiSkPaint");
9
-
10
- var _JsiSkRect = require("./JsiSkRect");
11
-
12
- var _JsiSkColor = require("./JsiSkColor");
13
-
14
- var _JsiSkSurfaceFactory = require("./JsiSkSurfaceFactory");
15
-
16
- const JsiSkApi = CanvasKit => ({
17
- Paint: () => new _JsiSkPaint.JsiSkPaint(CanvasKit, new CanvasKit.Paint()),
18
- XYWHRect: (x, y, width, height) => {
19
- return new _JsiSkRect.JsiSkRect(CanvasKit, CanvasKit.XYWHRect(x, y, width, height));
20
- },
21
- Color: _JsiSkColor.Color.bind(null, CanvasKit),
22
- Surface: new _JsiSkSurfaceFactory.JsiSkSurfaceFactory(CanvasKit)
23
- });
24
-
25
- exports.JsiSkApi = JsiSkApi;
26
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"names":["JsiSkApi","CanvasKit","Paint","JsiSkPaint","XYWHRect","x","y","width","height","JsiSkRect","Color","bind","Surface","JsiSkSurfaceFactory"],"mappings":";;;;;;;AAEA;;AACA;;AACA;;AACA;;AAEO,MAAMA,QAAQ,GAAIC,SAAD,KAA2B;AACjDC,EAAAA,KAAK,EAAE,MAAM,IAAIC,sBAAJ,CAAeF,SAAf,EAA0B,IAAIA,SAAS,CAACC,KAAd,EAA1B,CADoC;AAEjDE,EAAAA,QAAQ,EAAE,CAACC,CAAD,EAAYC,CAAZ,EAAuBC,KAAvB,EAAsCC,MAAtC,KAAyD;AACjE,WAAO,IAAIC,oBAAJ,CAAcR,SAAd,EAAyBA,SAAS,CAACG,QAAV,CAAmBC,CAAnB,EAAsBC,CAAtB,EAAyBC,KAAzB,EAAgCC,MAAhC,CAAzB,CAAP;AACD,GAJgD;AAKjDE,EAAAA,KAAK,EAAEA,kBAAMC,IAAN,CAAW,IAAX,EAAiBV,SAAjB,CAL0C;AAMjDW,EAAAA,OAAO,EAAE,IAAIC,wCAAJ,CAAwBZ,SAAxB;AANwC,CAA3B,CAAjB","sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport { JsiSkPaint } from \"./JsiSkPaint\";\nimport { JsiSkRect } from \"./JsiSkRect\";\nimport { Color } from \"./JsiSkColor\";\nimport { JsiSkSurfaceFactory } from \"./JsiSkSurfaceFactory\";\n\nexport const JsiSkApi = (CanvasKit: CanvasKit) => ({\n Paint: () => new JsiSkPaint(CanvasKit, new CanvasKit.Paint()),\n XYWHRect: (x: number, y: number, width: number, height: number) => {\n return new JsiSkRect(CanvasKit, CanvasKit.XYWHRect(x, y, width, height));\n },\n Color: Color.bind(null, CanvasKit),\n Surface: new JsiSkSurfaceFactory(CanvasKit),\n});\n"]}
@@ -1,55 +0,0 @@
1
- import { exhaustiveCheck } from "../../typeddash";
2
- import { Skia } from "../../../skia";
3
- export const processTransform2d = transforms => {
4
- const m = Skia.Matrix();
5
-
6
- for (const transform of transforms) {
7
- const key = Object.keys(transform)[0];
8
- const value = transform[key];
9
-
10
- if (key === "translateX") {
11
- m.preTranslate(value, 0);
12
- continue;
13
- }
14
-
15
- if (key === "translateY") {
16
- m.preTranslate(0, value);
17
- continue;
18
- }
19
-
20
- if (key === "scale") {
21
- m.preScale(value, value);
22
- continue;
23
- }
24
-
25
- if (key === "scaleX") {
26
- m.preScale(value, 1);
27
- continue;
28
- }
29
-
30
- if (key === "scaleY") {
31
- m.preScale(1, value);
32
- continue;
33
- }
34
-
35
- if (key === "skewX") {
36
- m.preSkew(value, 0);
37
- continue;
38
- }
39
-
40
- if (key === "skewY") {
41
- m.preSkew(0, value);
42
- continue;
43
- }
44
-
45
- if (key === "rotate" || key === "rotateZ") {
46
- m.preRotate(value * 180 / Math.PI);
47
- continue;
48
- }
49
-
50
- exhaustiveCheck(key);
51
- }
52
-
53
- return m;
54
- };
55
- //# sourceMappingURL=Matrix3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["Matrix3.ts"],"names":["exhaustiveCheck","Skia","processTransform2d","transforms","m","Matrix","transform","key","Object","keys","value","preTranslate","preScale","preSkew","preRotate","Math","PI"],"mappings":"AAAA,SAASA,eAAT,QAAgC,iBAAhC;AACA,SAASC,IAAT,QAAqB,eAArB;AA+BA,OAAO,MAAMC,kBAAkB,GAAIC,UAAD,IAA8B;AAC9D,QAAMC,CAAC,GAAGH,IAAI,CAACI,MAAL,EAAV;;AACA,OAAK,MAAMC,SAAX,IAAwBH,UAAxB,EAAoC;AAClC,UAAMI,GAAG,GAAGC,MAAM,CAACC,IAAP,CAAYH,SAAZ,EAAuB,CAAvB,CAAZ;AACA,UAAMI,KAAK,GAAIJ,SAAD,CAAiDC,GAAjD,CAAd;;AACA,QAAIA,GAAG,KAAK,YAAZ,EAA0B;AACxBH,MAAAA,CAAC,CAACO,YAAF,CAAeD,KAAf,EAAsB,CAAtB;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,YAAZ,EAA0B;AACxBH,MAAAA,CAAC,CAACO,YAAF,CAAe,CAAf,EAAkBD,KAAlB;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,OAAZ,EAAqB;AACnBH,MAAAA,CAAC,CAACQ,QAAF,CAAWF,KAAX,EAAkBA,KAAlB;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,QAAZ,EAAsB;AACpBH,MAAAA,CAAC,CAACQ,QAAF,CAAWF,KAAX,EAAkB,CAAlB;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,QAAZ,EAAsB;AACpBH,MAAAA,CAAC,CAACQ,QAAF,CAAW,CAAX,EAAcF,KAAd;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,OAAZ,EAAqB;AACnBH,MAAAA,CAAC,CAACS,OAAF,CAAUH,KAAV,EAAiB,CAAjB;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,OAAZ,EAAqB;AACnBH,MAAAA,CAAC,CAACS,OAAF,CAAU,CAAV,EAAaH,KAAb;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,QAAR,IAAoBA,GAAG,KAAK,SAAhC,EAA2C;AACzCH,MAAAA,CAAC,CAACU,SAAF,CAAaJ,KAAK,GAAG,GAAT,GAAgBK,IAAI,CAACC,EAAjC;AACA;AACD;;AACDhB,IAAAA,eAAe,CAACO,GAAD,CAAf;AACD;;AACD,SAAOH,CAAP;AACD,CAxCM","sourcesContent":["import { exhaustiveCheck } from \"../../typeddash\";\nimport { Skia } from \"../../../skia\";\n\ntype Transform2dName =\n | \"translateX\"\n | \"translateY\"\n | \"scale\"\n | \"skewX\"\n | \"skewY\"\n | \"scaleX\"\n | \"scaleY\"\n | \"rotateZ\"\n | \"rotate\";\n\nexport interface TransformProp {\n transform?: Transforms2d;\n}\n\ntype Transformations = {\n readonly [Name in Transform2dName]: number;\n};\nexport type Transforms2d = readonly (\n | Pick<Transformations, \"translateX\">\n | Pick<Transformations, \"translateY\">\n | Pick<Transformations, \"scale\">\n | Pick<Transformations, \"scaleX\">\n | Pick<Transformations, \"scaleY\">\n | Pick<Transformations, \"skewX\">\n | Pick<Transformations, \"skewY\">\n | Pick<Transformations, \"rotate\">\n)[];\n\nexport const processTransform2d = (transforms: Transforms2d) => {\n const m = Skia.Matrix();\n for (const transform of transforms) {\n const key = Object.keys(transform)[0] as Transform2dName;\n const value = (transform as Pick<Transformations, typeof key>)[key];\n if (key === \"translateX\") {\n m.preTranslate(value, 0);\n continue;\n }\n if (key === \"translateY\") {\n m.preTranslate(0, value);\n continue;\n }\n if (key === \"scale\") {\n m.preScale(value, value);\n continue;\n }\n if (key === \"scaleX\") {\n m.preScale(value, 1);\n continue;\n }\n if (key === \"scaleY\") {\n m.preScale(1, value);\n continue;\n }\n if (key === \"skewX\") {\n m.preSkew(value, 0);\n continue;\n }\n if (key === \"skewY\") {\n m.preSkew(0, value);\n continue;\n }\n if (key === \"rotate\" || key === \"rotateZ\") {\n m.preRotate((value * 180) / Math.PI);\n continue;\n }\n exhaustiveCheck(key);\n }\n return m;\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["Vector.ts"],"names":["interpolate","Skia","vec","x","y","Point","neg","a","add","b","sub","dist","Math","hypot","translate","translateX","translateY","interpolateVector","value","inputRange","outputRange","options","map","v","mixVector","from","to"],"mappings":"AAAA,SAASA,WAAT,QAA4B,0CAA5B;AACA,SAASC,IAAT,QAAqB,eAArB;AAOA,OAAO,MAAMC,GAAG,GAAG;AAAA,MAACC,CAAD,uEAAK,CAAL;AAAA,MAAQC,CAAR;AAAA,SAAuBH,IAAI,CAACI,KAAL,CAAWF,CAAX,EAAcC,CAAd,aAAcA,CAAd,cAAcA,CAAd,GAAmBD,CAAnB,CAAvB;AAAA,CAAZ;AACP,OAAO,MAAMG,GAAG,GAAIC,CAAD,IAAeL,GAAG,CAAC,CAACK,CAAC,CAACJ,CAAJ,EAAO,CAACI,CAAC,CAACH,CAAV,CAA9B;AACP,OAAO,MAAMI,GAAG,GAAG,CAACD,CAAD,EAAYE,CAAZ,KAA0BP,GAAG,CAACK,CAAC,CAACJ,CAAF,GAAMM,CAAC,CAACN,CAAT,EAAYI,CAAC,CAACH,CAAF,GAAMK,CAAC,CAACL,CAApB,CAAzC;AACP,OAAO,MAAMM,GAAG,GAAG,CAACH,CAAD,EAAYE,CAAZ,KAA0BP,GAAG,CAACK,CAAC,CAACJ,CAAF,GAAMM,CAAC,CAACN,CAAT,EAAYI,CAAC,CAACH,CAAF,GAAMK,CAAC,CAACL,CAApB,CAAzC;AACP,OAAO,MAAMO,IAAI,GAAG,CAACJ,CAAD,EAAYE,CAAZ,KAA0BG,IAAI,CAACC,KAAL,CAAWN,CAAC,CAACJ,CAAF,GAAMM,CAAC,CAACN,CAAnB,EAAsBI,CAAC,CAACH,CAAF,GAAMK,CAAC,CAACL,CAA9B,CAAvC;AACP,OAAO,MAAMU,SAAS,GAAG;AAAA,MAAC;AAAEX,IAAAA,CAAF;AAAKC,IAAAA;AAAL,GAAD;AAAA,SACvB,CAAC;AAAEW,IAAAA,UAAU,EAAEZ;AAAd,GAAD,EAAoB;AAAEa,IAAAA,UAAU,EAAEZ;AAAd,GAApB,CADuB;AAAA,CAAlB;AAGP,OAAO,MAAMa,iBAAiB,GAAG,CAC/BC,KAD+B,EAE/BC,UAF+B,EAG/BC,WAH+B,EAI/BC,OAJ+B,MAK3B;AACJlB,EAAAA,CAAC,EAAEH,WAAW,CACZkB,KADY,EAEZC,UAFY,EAGZC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAACpB,CAAzB,CAHY,EAIZkB,OAJY,CADV;AAOJjB,EAAAA,CAAC,EAAEJ,WAAW,CACZkB,KADY,EAEZC,UAFY,EAGZC,WAAW,CAACE,GAAZ,CAAiBC,CAAD,IAAOA,CAAC,CAACnB,CAAzB,CAHY,EAIZiB,OAJY;AAPV,CAL2B,CAA1B;AAoBP,OAAO,MAAMG,SAAS,GAAG,CAACN,KAAD,EAAgBO,IAAhB,EAA8BC,EAA9B,KACvBT,iBAAiB,CAACC,KAAD,EAAQ,CAAC,CAAD,EAAI,CAAJ,CAAR,EAAgB,CAACO,IAAD,EAAOC,EAAP,CAAhB,CADZ","sourcesContent":["import { interpolate } from \"../../../animation/functions/interpolate\";\nimport { Skia } from \"../../../skia\";\n\nexport interface Vector {\n x: number;\n y: number;\n}\n\nexport const vec = (x = 0, y?: number) => Skia.Point(x, y ?? x);\nexport const neg = (a: Vector) => vec(-a.x, -a.y);\nexport const add = (a: Vector, b: Vector) => vec(a.x + b.x, a.y + b.y);\nexport const sub = (a: Vector, b: Vector) => vec(a.x - b.x, a.y - b.y);\nexport const dist = (a: Vector, b: Vector) => Math.hypot(a.x - b.x, a.y - b.y);\nexport const translate = ({ x, y }: Vector) =>\n [{ translateX: x }, { translateY: y }] as const;\n\nexport const interpolateVector = (\n value: number,\n inputRange: readonly number[],\n outputRange: readonly Vector[],\n options?: Parameters<typeof interpolate>[3]\n) => ({\n x: interpolate(\n value,\n inputRange,\n outputRange.map((v) => v.x),\n options\n ),\n y: interpolate(\n value,\n inputRange,\n outputRange.map((v) => v.y),\n options\n ),\n});\n\nexport const mixVector = (value: number, from: Vector, to: Vector) =>\n interpolateVector(value, [0, 1], [from, to]);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["Color.ts"],"names":["Skia","RED","GREEN","BLUE","ALPHA","rgbaColor","r","g","b","a","Float32Array","processColor","cl","currentOpacity","color","Color"],"mappings":"AAAA,SAASA,IAAT,QAAqB,SAArB;AAGA,OAAO,MAAMC,GAAG,GAAG,CAAZ;AACP,OAAO,MAAMC,KAAK,GAAG,CAAd;AACP,OAAO,MAAMC,IAAI,GAAG,CAAb;AACP,OAAO,MAAMC,KAAK,GAAG,CAAd;AAEP,OAAO,MAAMC,SAAS,GAAG,CAACC,CAAD,EAAYC,CAAZ,EAAuBC,CAAvB,EAAkCC,CAAlC,KACvB,IAAIC,YAAJ,CAAiB,CAACJ,CAAD,EAAIC,CAAJ,EAAOC,CAAP,EAAUC,CAAV,CAAjB,CADK;AAGP,OAAO,MAAME,YAAY,GAAG,CAACC,EAAD,EAAYC,cAAZ,KAAuC;AACjE,QAAMC,KAAK,GAAGd,IAAI,CAACe,KAAL,CAAWH,EAAX,CAAd;AACAE,EAAAA,KAAK,CAACV,KAAD,CAAL,IAAgBS,cAAhB;AACA,SAAOC,KAAP;AACD,CAJM","sourcesContent":["import { Skia } from \"../Skia\";\nimport type { Color } from \"../types\";\n\nexport const RED = 0;\nexport const GREEN = 1;\nexport const BLUE = 2;\nexport const ALPHA = 3;\n\nexport const rgbaColor = (r: number, g: number, b: number, a: number) =>\n new Float32Array([r, g, b, a]);\n\nexport const processColor = (cl: Color, currentOpacity: number) => {\n const color = Skia.Color(cl);\n color[ALPHA] *= currentOpacity;\n return color;\n};\n"]}
@@ -1,7 +0,0 @@
1
- import { useMemo } from "react";
2
- import { Skia } from "../Skia";
3
- export const useShader = sksl => useMemo(() => {
4
- console.warn("Use shader will be deprecated.");
5
- return Skia.RuntimeEffect.Make(sksl);
6
- }, [sksl]);
7
- //# sourceMappingURL=Shader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["Shader.ts"],"names":["useMemo","Skia","useShader","sksl","console","warn","RuntimeEffect","Make"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAEA,SAASC,IAAT,QAAqB,SAArB;AAEA,OAAO,MAAMC,SAAS,GAAIC,IAAD,IACvBH,OAAO,CAAC,MAAM;AACZI,EAAAA,OAAO,CAACC,IAAR,CAAa,gCAAb;AACA,SAAOJ,IAAI,CAACK,aAAL,CAAmBC,IAAnB,CAAwBJ,IAAxB,CAAP;AACD,CAHM,EAGJ,CAACA,IAAD,CAHI,CADF","sourcesContent":["import { useMemo } from \"react\";\n\nimport { Skia } from \"../Skia\";\n\nexport const useShader = (sksl: string) =>\n useMemo(() => {\n console.warn(\"Use shader will be deprecated.\");\n return Skia.RuntimeEffect.Make(sksl);\n }, [sksl]);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["Host.ts"],"names":["Host","constructor","CanvasKit","HostObject","ref","typename","__typename__","toOptionalValue","value","undefined","toValue","toUndefinedableValue","toNullableValue","ckEnum","optEnum"],"mappings":";;AAAA;AAKA,OAAO,MAAeA,IAAf,CAAoB;AAGzBC,EAAAA,WAAW,CAACC,SAAD,EAAuB;AAAA;;AAChC,SAAKA,SAAL,GAAiBA,SAAjB;AACD;;AALwB;AAQ3B,OAAO,MAAeC,UAAf,SACGH,IADH,CAGP;AAIEC,EAAAA,WAAW,CAACC,SAAD,EAAuBE,GAAvB,EAA+BC,QAA/B,EAA4C;AACrD,UAAMH,SAAN;;AADqD;;AAAA;;AAErD,SAAKE,GAAL,GAAWA,GAAX;AACA,SAAKE,YAAL,GAAoBD,QAApB;AACD;;AARH,C,CAWA;;AAGA,OAAO,MAAME,eAAe,GAC1BC,KAD6B,IAG7BA,KAAK,KAAKC,SAAV,GAAsBA,SAAtB,GAAkCD,KAAK,KAAK,IAAV,GAAiB,IAAjB,GAAwBE,OAAO,CAACF,KAAD,CAH5D;AAKP,OAAO,MAAMG,oBAAoB,GAC/BH,KADkC,IAEfA,KAAK,KAAKC,SAAV,GAAsBA,SAAtB,GAAkCC,OAAO,CAACF,KAAD,CAFvD;AAIP,OAAO,MAAMI,eAAe,GAAOJ,KAAJ,IAC7BA,KAAK,KAAK,IAAV,GAAiB,IAAjB,GAAwBE,OAAO,CAACF,KAAD,CAD1B;AAGP,OAAO,MAAME,OAAO,GAAOF,KAAJ,IACpBA,KAAD,CAAiCJ,GAD5B;AAGP,OAAO,MAAMS,MAAM,GAAIL,KAAD,KAAsC;AAAEA,EAAAA;AAAF,CAAtC,CAAf;AACP,OAAO,MAAMM,OAAO,GAClBN,KADqB,IAGrBA,KAAK,KAAKC,SAAV,GAAsBA,SAAtB,GAAkC;AAAED,EAAAA;AAAF,CAH7B","sourcesContent":["/* eslint-disable no-nested-ternary */\nimport type { CanvasKit, EmbindEnumEntity } from \"canvaskit-wasm\";\n\nimport type { SkJSIInstance } from \"../../types\";\n\nexport abstract class Host {\n readonly CanvasKit: CanvasKit;\n\n constructor(CanvasKit: CanvasKit) {\n this.CanvasKit = CanvasKit;\n }\n}\n\nexport abstract class HostObject<T, N extends string>\n extends Host\n implements SkJSIInstance<N>\n{\n readonly __typename__: N;\n readonly ref: T;\n\n constructor(CanvasKit: CanvasKit, ref: T, typename: N) {\n super(CanvasKit);\n this.ref = ref;\n this.__typename__ = typename;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type NonNullish = {};\n\nexport const toOptionalValue = <T>(\n value: NonNullish | undefined | null\n): T | undefined | null =>\n value === undefined ? undefined : value === null ? null : toValue(value);\n\nexport const toUndefinedableValue = <T>(\n value: NonNullish | undefined\n): T | undefined => (value === undefined ? undefined : toValue(value));\n\nexport const toNullableValue = <T>(value: NonNullish | null): T | null =>\n value === null ? null : toValue(value);\n\nexport const toValue = <T>(value: NonNullish): T =>\n (value as HostObject<T, string>).ref;\n\nexport const ckEnum = (value: number): EmbindEnumEntity => ({ value });\nexport const optEnum = (\n value: number | undefined\n): EmbindEnumEntity | undefined =>\n value === undefined ? undefined : { value };\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["JsiSkCanvas.ts"],"names":["ckEnum","HostObject","toValue","toUndefinedableValue","toOptionalValue","JsiSkCanvas","constructor","CanvasKit","ref","drawRect","rect","paint","drawImage","image","x","y","drawImageRect","img","src","dest","fastSample","drawImageCubic","left","top","B","C","drawImageOptions","fm","mm","drawImageNine","center","filter","drawImageRectCubic","drawImageRectOptions","drawPaint","drawLine","x0","y0","x1","y1","drawCircle","cx","cy","radius","drawVertices","verts","mode","drawPatch","cubics","colors","texs","restoreToCount","saveCount","drawPoints","points","drawArc","oval","startAngle","sweepAngle","useCenter","drawRRect","rrect","drawDRRect","outer","inner","drawOval","drawPath","path","drawText","str","font","drawTextBlob","blob","drawGlyphs","glyphs","positions","drawSvg","_svgDom","_width","_height","Error","save","saveLayer","bounds","backdrop","flags","restore","rotate","rotationInDegrees","rx","ry","scale","sx","sy","skew","translate","dx","dy","drawColor","color","blendMode","undefined","clear","clipPath","op","doAntiAlias","clipRect","clipRRect","concat","m","drawPicture","skp"],"mappings":"AA0BA,SACEA,MADF,EAEEC,UAFF,EAGEC,OAHF,EAIEC,oBAJF,EAKEC,eALF,QAMO,QANP;AAQA,OAAO,MAAMC,WA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CAACC,CAAD,EAAc;AAClB,SAAKrG,GAAL,CAASoG,MAAT,CAAgB1G,OAAO,CAAC2G,CAAD,CAAvB;AACD;;AAEDC,EAAAA,WAAW,CAACC,GAAD,EAAiB;AAC1B,SAAKvG,GAAL,CAASsG,WAAT,CAAqB5G,OAAO,CAAC6G,GAAD,CAA5B;AACD;;AA3RH","sourcesContent":["import type { Canvas, CanvasKit, Image, Paint, Rect } from \"canvaskit-wasm\";\n\nimport type {\n BlendMode,\n ClipOp,\n FilterMode,\n MipmapMode,\n PointMode,\n SaveLayerFlag,\n SkCanvas,\n SkColor,\n SkFont,\n SkImage,\n SkImageFilter,\n SkMatrix,\n SkPaint,\n SkPath,\n SkPicture,\n SkPoint,\n SkRect,\n SkRRect,\n SkSVG,\n SkTextBlob,\n SkVertices,\n} from \"../../types\";\n\nimport {\n ckEnum,\n HostObject,\n toValue,\n toUndefinedableValue,\n toOptionalValue,\n} from \"./Host\";\n\nexport class JsiSkCanvas\n extends HostObject<Canvas, \"Canvas\">\n implements SkCanvas\n{\n constructor(CanvasKit: CanvasKit, ref: Canvas) {\n super(CanvasKit, ref, \"Canvas\");\n }\n\n drawRect(rect: SkRect, paint: SkPaint) {\n this.ref.drawRect(toValue<Rect>(rect), toValue<Paint>(paint));\n }\n\n drawImage(image: SkImage, x: number, y: number, paint?: SkPaint) {\n this.ref.drawImage(toValue<Image>(image), x, y, toOptionalValue(paint));\n }\n\n drawImageRect(\n img: SkImage,\n src: SkRect,\n dest: SkRect,\n paint: SkPaint,\n fastSample?: boolean\n ) {\n this.ref.drawImageRect(\n toValue<Image>(img),\n toValue<Rect>(src),\n toValue<Rect>(dest),\n toValue<Paint>(paint),\n fastSample\n );\n }\n\n drawImageCubic(\n img: SkImage,\n left: number,\n top: number,\n B: number,\n C: number,\n paint?: SkPaint | null\n ) {\n this.ref.drawImageCubic(\n toValue(img),\n left,\n top,\n B,\n C,\n toOptionalValue(paint)\n );\n }\n\n drawImageOptions(\n img: SkImage,\n left: number,\n top: number,\n fm: FilterMode,\n mm: MipmapMode,\n paint?: SkPaint | null\n ) {\n this.ref.drawImageOptions(\n toValue(img),\n left,\n top,\n ckEnum(fm),\n ckEnum(mm),\n toOptionalValue(paint)\n );\n }\n\n drawImageNine(\n img: SkImage,\n center: SkRect,\n dest: SkRect,\n filter: FilterMode,\n paint?: SkPaint | null\n ) {\n this.ref.drawImageNine(\n toValue(img),\n toValue(center),\n toValue(dest),\n ckEnum(filter),\n toOptionalValue(paint)\n );\n }\n\n drawImageRectCubic(\n img: SkImage,\n src: SkRect,\n dest: SkRect,\n B: number,\n C: number,\n paint?: SkPaint | null\n ) {\n this.ref.drawImageRectCubic(\n toValue<Image>(img),\n toValue<Rect>(src),\n toValue<Rect>(dest),\n B,\n C,\n toOptionalValue(paint)\n );\n }\n\n drawImageRectOptions(\n img: SkImage,\n src: SkRect,\n dest: SkRect,\n fm: FilterMode,\n mm: MipmapMode,\n paint?: SkPaint | null\n ) {\n this.ref.drawImageRectOptions(\n toValue<Image>(img),\n toValue<Rect>(src),\n toValue<Rect>(dest),\n ckEnum(fm),\n ckEnum(mm),\n toOptionalValue(paint)\n );\n }\n\n drawPaint(paint: SkPaint) {\n this.ref.drawPaint(toValue(paint));\n }\n\n drawLine(x0: number, y0: number, x1: number, y1: number, paint: SkPaint) {\n this.ref.drawLine(x0, y0, x1, y1, toValue(paint));\n }\n\n drawCircle(cx: number, cy: number, radius: number, paint: SkPaint) {\n this.ref.drawCircle(cx, cy, radius, toValue(paint));\n }\n\n drawVertices(verts: SkVertices, mode: BlendMode, paint: SkPaint) {\n this.ref.drawVertices(toValue(verts), ckEnum(mode), toValue(paint));\n }\n\n drawPatch(\n cubics: SkPoint[],\n colors?: SkColor[] | null,\n texs?: SkPoint[] | null,\n mode?: BlendMode | null,\n paint?: SkPaint\n ) {\n this.ref.drawPatch(\n toValue(cubics),\n colors,\n toOptionalValue(texs),\n mode ? ckEnum(mode) : null,\n toUndefinedableValue(paint)\n );\n }\n\n restoreToCount(saveCount: number) {\n this.ref.restoreToCount(saveCount);\n }\n\n drawPoints(mode: PointMode, points: SkPoint[], paint: SkPaint) {\n this.ref.drawPoints(ckEnum(mode), toValue(points), toValue(paint));\n }\n\n drawArc(\n oval: SkRect,\n startAngle: number,\n sweepAngle: number,\n useCenter: boolean,\n paint: SkPaint\n ) {\n this.ref.drawArc(\n toValue(oval),\n startAngle,\n sweepAngle,\n useCenter,\n toValue(paint)\n );\n }\n\n drawRRect(rrect: SkRRect, paint: SkPaint) {\n this.ref.drawRRect(toValue(rrect), toValue(paint));\n }\n\n drawDRRect(outer: SkRRect, inner: SkRRect, paint: SkPaint) {\n this.ref.drawDRRect(toValue(outer), toValue(inner), toValue(paint));\n }\n\n drawOval(oval: SkRect, paint: SkPaint) {\n this.ref.drawOval(toValue(oval), toValue(paint));\n }\n\n drawPath(path: SkPath, paint: SkPaint) {\n this.ref.drawPath(toValue(path), toValue(paint));\n }\n\n drawText(str: string, x: number, y: number, paint: SkPaint, font: SkFont) {\n this.ref.drawText(str, x, y, toValue(paint), toValue(font));\n }\n\n drawTextBlob(blob: SkTextBlob, x: number, y: number, paint: SkPaint) {\n this.ref.drawTextBlob(toValue(blob), x, y, toValue(paint));\n }\n\n drawGlyphs(\n glyphs: number[],\n positions: SkPoint[],\n x: number,\n y: number,\n font: SkFont,\n paint: SkPaint\n ) {\n this.ref.drawGlyphs(\n glyphs,\n toValue(positions),\n x,\n y,\n toValue(font),\n toValue(paint)\n );\n }\n\n drawSvg(_svgDom: SkSVG, _width?: number, _height?: number) {\n throw new Error(\"drawSvg is not implemented on React Native Web\");\n }\n\n save() {\n return this.ref.save();\n }\n\n saveLayer(\n paint?: SkPaint,\n bounds?: SkRect | null,\n backdrop?: SkImageFilter | null,\n flags?: SaveLayerFlag\n ) {\n return this.ref.saveLayer(\n toUndefinedableValue(paint),\n toOptionalValue(bounds),\n toOptionalValue(backdrop),\n flags\n );\n }\n\n restore() {\n this.ref.restore();\n }\n\n rotate(rotationInDegrees: number, rx: number, ry: number) {\n this.ref.rotate(rotationInDegrees, rx, ry);\n }\n\n scale(sx: number, sy: number) {\n this.ref.scale(sx, sy);\n }\n\n skew(sx: number, sy: number) {\n this.ref.skew(sx, sy);\n }\n\n translate(dx: number, dy: number) {\n this.ref.translate(dx, dy);\n }\n\n drawColor(color: SkColor, blendMode?: BlendMode) {\n this.ref.drawColor(color, blendMode ? ckEnum(blendMode) : undefined);\n }\n\n clear(color: SkColor) {\n this.ref.clear(color);\n }\n\n clipPath(path: SkPath, op: ClipOp, doAntiAlias: boolean) {\n this.ref.clipPath(toValue(path), ckEnum(op), doAntiAlias);\n }\n\n clipRect(rect: SkRect, op: ClipOp, doAntiAlias: boolean) {\n this.ref.clipRect(toValue(rect), ckEnum(op), doAntiAlias);\n }\n\n clipRRect(rrect: SkRRect, op: ClipOp, doAntiAlias: boolean) {\n this.ref.clipRRect(toValue(rrect), ckEnum(op), doAntiAlias);\n }\n\n concat(m: SkMatrix) {\n this.ref.concat(toValue(m));\n }\n\n drawPicture(skp: SkPicture) {\n this.ref.drawPicture(toValue(skp));\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["JsiSkColor.ts"],"names":["alphaf","c","red","green","blue","colorMap","transparent","Float32Array","of","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","Color","CanvasKit","color","rgba","parseColorString"],"mappings":"AAIA,MAAMA,MAAM,GAAIC,CAAD,IAAe,CAAEA,CAAC,IAAI,EAAN,GAAY,GAAb,IAAoB,GAAlD;;AACA,MAAMC,GAAG,GAAID,CAAD,IAAgBA,CAAC,IAAI,EAAN,GAAY,GAAvC;;AACA,MAAME,KAAK,GAAIF,CAAD,IAAgBA,CAAC,IAAI,CAAN,GAAW,GAAxC;;AACA,MAAMG,IAAI,GAAIH,CAAD,IAAeA,CAAC,GAAG,GAAhC;;AAEA,MAAMI,QAAQ,GAAG;AACfC,EAAAA,WAAW,EAAEC,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CADE;AAEfC,EAAAA,SAAS,EAAEF,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,CAA/B,CAFI;AAGfE,EAAAA,YAAY,EAAEH,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,CAA/B,CAHC;AAIfG,EAAAA,IAAI,EAAEJ,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAm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B,EAA0B,GAA1B,EAA+B,CAA/B,CAlJQ;AAmJf+I,EAAAA,UAAU,EAAEhJ,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,CAA/B,CAnJG;AAoJfgJ,EAAAA,MAAM,EAAEjJ,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAArB,EAA0B,CAA1B,EAA6B,CAA7B,CApJO;AAqJfiJ,EAAAA,WAAW,EAAElJ,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAArB,EAA0B,EAA1B,EAA8B,CAA9B;AArJE,CAAjB;AAwJA,OAAO,MAAMkJ,KAAK,GAAG,CAACC,SAAD,EAAuBC,KAAvB,KAAsD;AACzE,MAAIA,KAAK,YAAYrJ,YAArB,EAAmC;AACjC,WAAOqJ,KAAP;AACD,GAFD,MAEO,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;AACpC,UAAMC,IAAI,GAAGF,SAAS,CAACG,gBAAV,CAA2BF,KAA3B,EAAkCvJ,QAAlC,CAAb;AACA,WAAOE,YAAY,CAACC,EAAb,CACLqJ,IAAI,CAAC,CAAD,CAAJ,GAAU,GADL,EAELA,IAAI,CAAC,CAAD,CAAJ,GAAU,GAFL,EAGLA,IAAI,CAAC,CAAD,CAAJ,GAAU,GAHL,EAILA,IAAI,CAAC,CAAD,CAJC,CAAP;AAMD,GARM,MAQA;AACL,WAAOtJ,YAAY,CAACC,EAAb,CACLN,GAAG,CAAC0J,KAAD,CAAH,GAAa,GADR,EAELzJ,KAAK,CAACyJ,KAAD,CAAL,GAAe,GAFV,EAGLxJ,IAAI,CAACwJ,KAAD,CAAJ,GAAc,GAHT,EAIL5J,MAAM,CAAC4J,KAAD,CAJD,CAAP;AAMD;AACF,CAnBM","sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type { SkColor, Color as InputColor } from \"../../types\";\n\nconst alphaf = (c: number) => ((c >> 24) & 255) / 255;\nconst red = (c: number) => (c >> 16) & 255;\nconst green = (c: number) => (c >> 8) & 255;\nconst blue = (c: number) => c & 255;\n\nconst colorMap = {\n transparent: Float32Array.of(0, 0, 0, 0),\n aliceblue: Float32Array.of(240, 248, 255, 1),\n antiquewhite: Float32Array.of(250, 235, 215, 1),\n aqua: Float32Array.of(0, 255, 255, 1),\n aquamarine: Float32Array.of(127, 255, 212, 1),\n azure: Float32Array.of(240, 255, 255, 1),\n beige: Float32Array.of(245, 245, 220, 1),\n bisque: Float32Array.of(255, 228, 196, 1),\n black: Float32Array.of(0, 0, 0, 1),\n blanchedalmond: Float32Array.of(255, 235, 205, 1),\n blue: Float32Array.of(0, 0, 255, 1),\n blueviolet: Float32Array.of(138, 43, 226, 1),\n brown: Float32Array.of(165, 42, 42, 1),\n burlywood: Float32Array.of(222, 184, 135, 1),\n cadetblue: Float32Array.of(95, 158, 160, 1),\n chartreuse: Float32Array.of(127, 255, 0, 1),\n chocolate: Float32Array.of(210, 105, 30, 1),\n coral: Float32Array.of(255, 127, 80, 1),\n cornflowerblue: Float32Array.of(100, 149, 237, 1),\n cornsilk: Float32Array.of(255, 248, 220, 1),\n crimson: Float32Array.of(220, 20, 60, 1),\n cyan: Float32Array.of(0, 255, 255, 1),\n darkblue: Float32Array.of(0, 0, 139, 1),\n darkcyan: Float32Array.of(0, 139, 139, 1),\n darkgoldenrod: Float32Array.of(184, 134, 11, 1),\n darkgray: Float32Array.of(169, 169, 169, 1),\n darkgreen: Float32Array.of(0, 100, 0, 1),\n darkgrey: Float32Array.of(169, 169, 169, 1),\n darkkhaki: Float32Array.of(189, 183, 107, 1),\n darkmagenta: Float32Array.of(139, 0, 139, 1),\n darkolivegreen: Float32Array.of(85, 107, 47, 1),\n darkorange: Float32Array.of(255, 140, 0, 1),\n darkorchid: Float32Array.of(153, 50, 204, 1),\n darkred: Float32Array.of(139, 0, 0, 1),\n darksalmon: Float32Array.of(233, 150, 122, 1),\n darkseagreen: Float32Array.of(143, 188, 143, 1),\n darkslateblue: Float32Array.of(72, 61, 139, 1),\n darkslategray: Float32Array.of(47, 79, 79, 1),\n darkslategrey: Float32Array.of(47, 79, 79, 1),\n darkturquoise: Float32Array.of(0, 206, 209, 1),\n darkviolet: Float32Array.of(148, 0, 211, 1),\n deeppink: Float32Array.of(255, 20, 147, 1),\n deepskyblue: Float32Array.of(0, 191, 255, 1),\n dimgray: Float32Array.of(105, 105, 105, 1),\n dimgrey: Float32Array.of(105, 105, 105, 1),\n dodgerblue: Float32Array.of(30, 144, 255, 1),\n firebrick: Float32Array.of(178, 34, 34, 1),\n floralwhite: Float32Array.of(255, 250, 240, 1),\n forestgreen: Float32Array.of(34, 139, 34, 1),\n fuchsia: Float32Array.of(255, 0, 255, 1),\n gainsboro: Float32Array.of(220, 220, 220, 1),\n ghostwhite: Float32Array.of(248, 248, 255, 1),\n gold: Float32Array.of(255, 215, 0, 1),\n goldenrod: Float32Array.of(218, 165, 32, 1),\n gray: Float32Array.of(128, 128, 128, 1),\n green: Float32Array.of(0, 128, 0, 1),\n greenyellow: Float32Array.of(173, 255, 47, 1),\n grey: Float32Array.of(128, 128, 128, 1),\n honeydew: Float32Array.of(240, 255, 240, 1),\n hotpink: Float32Array.of(255, 105, 180, 1),\n indianred: Float32Array.of(205, 92, 92, 1),\n indigo: Float32Array.of(75, 0, 130, 1),\n ivory: Float32Array.of(255, 255, 240, 1),\n khaki: Float32Array.of(240, 230, 140, 1),\n lavender: Float32Array.of(230, 230, 250, 1),\n lavenderblush: Float32Array.of(255, 240, 245, 1),\n lawngreen: Float32Array.of(124, 252, 0, 1),\n lemonchiffon: Float32Array.of(255, 250, 205, 1),\n lightblue: Float32Array.of(173, 216, 230, 1),\n lightcoral: Float32Array.of(240, 128, 128, 1),\n lightcyan: Float32Array.of(224, 255, 255, 1),\n lightgoldenrodyellow: Float32Array.of(250, 250, 210, 1),\n lightgray: Float32Array.of(211, 211, 211, 1),\n lightgreen: Float32Array.of(144, 238, 144, 1),\n lightgrey: Float32Array.of(211, 211, 211, 1),\n lightpink: Float32Array.of(255, 182, 193, 1),\n lightsalmon: Float32Array.of(255, 160, 122, 1),\n lightseagreen: Float32Array.of(32, 178, 170, 1),\n lightskyblue: Float32Array.of(135, 206, 250, 1),\n lightslategray: Float32Array.of(119, 136, 153, 1),\n lightslategrey: Float32Array.of(119, 136, 153, 1),\n lightsteelblue: Float32Array.of(176, 196, 222, 1),\n lightyellow: Float32Array.of(255, 255, 224, 1),\n lime: Float32Array.of(0, 255, 0, 1),\n limegreen: Float32Array.of(50, 205, 50, 1),\n linen: Float32Array.of(250, 240, 230, 1),\n magenta: Float32Array.of(255, 0, 255, 1),\n maroon: Float32Array.of(128, 0, 0, 1),\n mediumaquamarine: Float32Array.of(102, 205, 170, 1),\n mediumblue: Float32Array.of(0, 0, 205, 1),\n mediumorchid: Float32Array.of(186, 85, 211, 1),\n mediumpurple: Float32Array.of(147, 112, 219, 1),\n mediumseagreen: Float32Array.of(60, 179, 113, 1),\n mediumslateblue: Float32Array.of(123, 104, 238, 1),\n mediumspringgreen: Float32Array.of(0, 250, 154, 1),\n mediumturquoise: Float32Array.of(72, 209, 204, 1),\n mediumvioletred: Float32Array.of(199, 21, 133, 1),\n midnightblue: Float32Array.of(25, 25, 112, 1),\n mintcream: Float32Array.of(245, 255, 250, 1),\n mistyrose: Float32Array.of(255, 228, 225, 1),\n moccasin: Float32Array.of(255, 228, 181, 1),\n navajowhite: Float32Array.of(255, 222, 173, 1),\n navy: Float32Array.of(0, 0, 128, 1),\n oldlace: Float32Array.of(253, 245, 230, 1),\n olive: Float32Array.of(128, 128, 0, 1),\n olivedrab: Float32Array.of(107, 142, 35, 1),\n orange: Float32Array.of(255, 165, 0, 1),\n orangered: Float32Array.of(255, 69, 0, 1),\n orchid: Float32Array.of(218, 112, 214, 1),\n palegoldenrod: Float32Array.of(238, 232, 170, 1),\n palegreen: Float32Array.of(152, 251, 152, 1),\n paleturquoise: Float32Array.of(175, 238, 238, 1),\n palevioletred: Float32Array.of(219, 112, 147, 1),\n papayawhip: Float32Array.of(255, 239, 213, 1),\n peachpuff: Float32Array.of(255, 218, 185, 1),\n peru: Float32Array.of(205, 133, 63, 1),\n pink: Float32Array.of(255, 192, 203, 1),\n plum: Float32Array.of(221, 160, 221, 1),\n powderblue: Float32Array.of(176, 224, 230, 1),\n purple: Float32Array.of(128, 0, 128, 1),\n rebeccapurple: Float32Array.of(102, 51, 153, 1),\n red: Float32Array.of(255, 0, 0, 1),\n rosybrown: Float32Array.of(188, 143, 143, 1),\n royalblue: Float32Array.of(65, 105, 225, 1),\n saddlebrown: Float32Array.of(139, 69, 19, 1),\n salmon: Float32Array.of(250, 128, 114, 1),\n sandybrown: Float32Array.of(244, 164, 96, 1),\n seagreen: Float32Array.of(46, 139, 87, 1),\n seashell: Float32Array.of(255, 245, 238, 1),\n sienna: Float32Array.of(160, 82, 45, 1),\n silver: Float32Array.of(192, 192, 192, 1),\n skyblue: Float32Array.of(135, 206, 235, 1),\n slateblue: Float32Array.of(106, 90, 205, 1),\n slategray: Float32Array.of(112, 128, 144, 1),\n slategrey: Float32Array.of(112, 128, 144, 1),\n snow: Float32Array.of(255, 250, 250, 1),\n springgreen: Float32Array.of(0, 255, 127, 1),\n steelblue: Float32Array.of(70, 130, 180, 1),\n tan: Float32Array.of(210, 180, 140, 1),\n teal: Float32Array.of(0, 128, 128, 1),\n thistle: Float32Array.of(216, 191, 216, 1),\n tomato: Float32Array.of(255, 99, 71, 1),\n turquoise: Float32Array.of(64, 224, 208, 1),\n violet: Float32Array.of(238, 130, 238, 1),\n wheat: Float32Array.of(245, 222, 179, 1),\n white: Float32Array.of(255, 255, 255, 1),\n whitesmoke: Float32Array.of(245, 245, 245, 1),\n yellow: Float32Array.of(255, 255, 0, 1),\n yellowgreen: Float32Array.of(154, 205, 50, 1),\n};\n\nexport const Color = (CanvasKit: CanvasKit, color: InputColor): SkColor => {\n if (color instanceof Float32Array) {\n return color;\n } else if (typeof color === \"string\") {\n const rgba = CanvasKit.parseColorString(color, colorMap);\n return Float32Array.of(\n rgba[0] / 255,\n rgba[1] / 255,\n rgba[2] / 255,\n rgba[3]\n );\n } else {\n return Float32Array.of(\n red(color) / 255,\n green(color) / 255,\n blue(color) / 255,\n alphaf(color)\n );\n }\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["JsiSkPaint.ts"],"names":["HostObject","toNullableValue","JsiSkPaint","constructor","CanvasKit","ref","copy","getColor","getStrokeCap","value","getStrokeJoin","getStrokeMiter","getStrokeWidth","setAlphaf","alpha","setAntiAlias","aa","setBlendMode","blendMode","setColor","color","setColorFilter","filter","setImageFilter","setMaskFilter","setPathEffect","effect","setShader","shader","setStrokeCap","cap","setStrokeJoin","join","setStrokeMiter","limit","setStrokeWidth","width","setStyle","style"],"mappings":"AAgBA,SAASA,UAAT,EAAqBC,eAArB,QAA4C,QAA5C;AAEA,OAAO,MAAMC,UAAN,SAAyBF,UAAzB,CAAuE;AAC5EG,EAAAA,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAmC;AAC5C,UAAMD,SAAN,EAAiBC,GAAjB,EAAsB,OAAtB;AACD;;AAEDC,EAAAA,IAAI,GAAG;AACL,WAAO,IAAIJ,UAAJ,CAAe,KAAKE,SAApB,EAA+B,KAAKC,GAAL,CAASC,IAAT,EAA/B,CAAP;AACD;;AAEDC,EAAAA,QAAQ,GAAG;AACT,WAAO,KAAKF,GAAL,CAASE,QAAT,EAAP;AACD;;AAEDC,EAAAA,YAAY,GAAG;AACb,WAAO,KAAKH,GAAL,CAASG,YAAT,GAAwBC,KAA/B;AACD;;AAEDC,EAAAA,aAAa,GAAG;AACd,WAAO,KAAKL,GAAL,CAASK,aAAT,GAAyBD,KAAhC;AACD;;AAEDE,EAAAA,cAAc,GAAG;AACf,WAAO,KAAKN,GAAL,CAASM,cAAT,EAAP;AACD;;AAEDC,EAAAA,cAAc,GAAG;AACf,WAAO,KAAKP,GAAL,CAASO,cAAT,EAAP;AACD;;AAEDC,EAAAA,SAAS,CAACC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AA,cAAc,CAACC,KAAD,EAAgB;AAC5B,SAAK7B,GAAL,CAAS4B,cAAT,CAAwBC,KAAxB;AACD;;AAEDC,EAAAA,cAAc,CAACC,KAAD,EAAgB;AAC5B,SAAK/B,GAAL,CAAS8B,cAAT,CAAwBC,KAAxB;AACD;;AAEDC,EAAAA,QAAQ,CAACC,KAAD,EAAoB;AAC1B,SAAKjC,GAAL,CAASgC,QAAT,CAAkB;AAAE5B,MAAAA,KAAK,EAAE6B;AAAT,KAAlB;AACD;;AAnF2E","sourcesContent":["import type { CanvasKit, Paint } from \"canvaskit-wasm\";\n\nimport type {\n BlendMode,\n SkColor,\n SkColorFilter,\n SkImageFilter,\n SkPaint,\n SkShader,\n StrokeCap,\n StrokeJoin,\n PaintStyle,\n SkMaskFilter,\n SkPathEffect,\n} from \"../../types\";\n\nimport { HostObject, toNullableValue } from \"./Host\";\n\nexport class JsiSkPaint extends HostObject<Paint, \"Paint\"> implements SkPaint {\n constructor(CanvasKit: CanvasKit, ref: Paint) {\n super(CanvasKit, ref, \"Paint\");\n }\n\n copy() {\n return new JsiSkPaint(this.CanvasKit, this.ref.copy());\n }\n\n getColor() {\n return this.ref.getColor();\n }\n\n getStrokeCap() {\n return this.ref.getStrokeCap().value;\n }\n\n getStrokeJoin() {\n return this.ref.getStrokeJoin().value;\n }\n\n getStrokeMiter() {\n return this.ref.getStrokeMiter();\n }\n\n getStrokeWidth() {\n return this.ref.getStrokeWidth();\n }\n\n setAlphaf(alpha: number) {\n this.ref.setAlphaf(alpha);\n }\n\n setAntiAlias(aa: boolean) {\n this.ref.setAntiAlias(aa);\n }\n\n setBlendMode(blendMode: BlendMode) {\n this.ref.setBlendMode({ value: blendMode });\n }\n\n setColor(color: SkColor) {\n this.ref.setColor(color);\n }\n\n setColorFilter(filter: SkColorFilter | null) {\n this.ref.setColorFilter(toNullableValue(filter));\n }\n\n setImageFilter(filter: SkImageFilter | null) {\n this.ref.setImageFilter(toNullableValue(filter));\n }\n\n setMaskFilter(filter: SkMaskFilter | null) {\n this.ref.setMaskFilter(toNullableValue(filter));\n }\n\n setPathEffect(effect: SkPathEffect | null) {\n this.ref.setPathEffect(toNullableValue(effect));\n }\n\n setShader(shader: SkShader | null) {\n this.ref.setShader(toNullableValue(shader));\n }\n\n setStrokeCap(cap: StrokeCap) {\n this.ref.setStrokeCap({ value: cap });\n }\n\n setStrokeJoin(join: StrokeJoin) {\n this.ref.setStrokeJoin({ value: join });\n }\n\n setStrokeMiter(limit: number) {\n this.ref.setStrokeMiter(limit);\n }\n\n setStrokeWidth(width: number) {\n this.ref.setStrokeWidth(width);\n }\n\n setStyle(style: PaintStyle) {\n this.ref.setStyle({ value: style });\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["JsiSkRect.ts"],"names":["HostObject","JsiSkRect","constructor","CanvasKit","ref","x","y","width","height"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AAEA,OAAO,MAAMC,SAAN,SAAwBD,UAAxB,CAAmE;AACxEE,EAAAA,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAkC;AAC3C,UAAMD,SAAN,EAAiBC,GAAjB,EAAsB,MAAtB;AACD;;AAEI,MAADC,CAAC,GAAG;AACN,WAAO,KAAKD,GAAL,CAAS,CAAT,CAAP;AACD;;AAEI,MAADE,CAAC,GAAG;AACN,WAAO,KAAKF,GAAL,CAAS,CAAT,CAAP;AACD;;AAEQ,MAALG,KAAK,GAAG;AACV,WAAO,KAAKH,GAAL,CAAS,CAAT,IAAc,KAAKA,GAAL,CAAS,CAAT,CAArB;AACD;;AAES,MAANI,MAAM,GAAG;AACX,WAAO,KAAKJ,GAAL,CAAS,CAAT,IAAc,KAAKA,GAAL,CAAS,CAAT,CAArB;AACD;;AAnBuE","sourcesContent":["import type { CanvasKit, Rect } from \"canvaskit-wasm\";\n\nimport type { SkRect } from \"../../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkRect extends HostObject<Rect, \"Rect\"> implements SkRect {\n constructor(CanvasKit: CanvasKit, ref: Rect) {\n super(CanvasKit, ref, \"Rect\");\n }\n\n get x() {\n return this.ref[0];\n }\n\n get y() {\n return this.ref[1];\n }\n\n get width() {\n return this.ref[2] - this.ref[0];\n }\n\n get height() {\n return this.ref[3] - this.ref[1];\n }\n}\n"]}
@@ -1,13 +0,0 @@
1
- import { JsiSkPaint } from "./JsiSkPaint";
2
- import { JsiSkRect } from "./JsiSkRect";
3
- import { Color } from "./JsiSkColor";
4
- import { JsiSkSurfaceFactory } from "./JsiSkSurfaceFactory";
5
- export const JsiSkApi = CanvasKit => ({
6
- Paint: () => new JsiSkPaint(CanvasKit, new CanvasKit.Paint()),
7
- XYWHRect: (x, y, width, height) => {
8
- return new JsiSkRect(CanvasKit, CanvasKit.XYWHRect(x, y, width, height));
9
- },
10
- Color: Color.bind(null, CanvasKit),
11
- Surface: new JsiSkSurfaceFactory(CanvasKit)
12
- });
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"names":["JsiSkPaint","JsiSkRect","Color","JsiSkSurfaceFactory","JsiSkApi","CanvasKit","Paint","XYWHRect","x","y","width","height","bind","Surface"],"mappings":"AAEA,SAASA,UAAT,QAA2B,cAA3B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,KAAT,QAAsB,cAAtB;AACA,SAASC,mBAAT,QAAoC,uBAApC;AAEA,OAAO,MAAMC,QAAQ,GAAIC,SAAD,KAA2B;AACjDC,EAAAA,KAAK,EAAE,MAAM,IAAIN,UAAJ,CAAeK,SAAf,EAA0B,IAAIA,SAAS,CAACC,KAAd,EAA1B,CADoC;AAEjDC,EAAAA,QAAQ,EAAE,CAACC,CAAD,EAAYC,CAAZ,EAAuBC,KAAvB,EAAsCC,MAAtC,KAAyD;AACjE,WAAO,IAAIV,SAAJ,CAAcI,SAAd,EAAyBA,SAAS,CAACE,QAAV,CAAmBC,CAAnB,EAAsBC,CAAtB,EAAyBC,KAAzB,EAAgCC,MAAhC,CAAzB,CAAP;AACD,GAJgD;AAKjDT,EAAAA,KAAK,EAAEA,KAAK,CAACU,IAAN,CAAW,IAAX,EAAiBP,SAAjB,CAL0C;AAMjDQ,EAAAA,OAAO,EAAE,IAAIV,mBAAJ,CAAwBE,SAAxB;AANwC,CAA3B,CAAjB","sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport { JsiSkPaint } from \"./JsiSkPaint\";\nimport { JsiSkRect } from \"./JsiSkRect\";\nimport { Color } from \"./JsiSkColor\";\nimport { JsiSkSurfaceFactory } from \"./JsiSkSurfaceFactory\";\n\nexport const JsiSkApi = (CanvasKit: CanvasKit) => ({\n Paint: () => new JsiSkPaint(CanvasKit, new CanvasKit.Paint()),\n XYWHRect: (x: number, y: number, width: number, height: number) => {\n return new JsiSkRect(CanvasKit, CanvasKit.XYWHRect(x, y, width, height));\n },\n Color: Color.bind(null, CanvasKit),\n Surface: new JsiSkSurfaceFactory(CanvasKit),\n});\n"]}
@@ -1,10 +0,0 @@
1
- declare type Transform2dName = "translateX" | "translateY" | "scale" | "skewX" | "skewY" | "scaleX" | "scaleY" | "rotateZ" | "rotate";
2
- export interface TransformProp {
3
- transform?: Transforms2d;
4
- }
5
- declare type Transformations = {
6
- readonly [Name in Transform2dName]: number;
7
- };
8
- export declare type Transforms2d = readonly (Pick<Transformations, "translateX"> | Pick<Transformations, "translateY"> | Pick<Transformations, "scale"> | Pick<Transformations, "scaleX"> | Pick<Transformations, "scaleY"> | Pick<Transformations, "skewX"> | Pick<Transformations, "skewY"> | Pick<Transformations, "rotate">)[];
9
- export declare const processTransform2d: (transforms: Transforms2d) => import("../../../skia").SkMatrix;
10
- export {};
@@ -1,23 +0,0 @@
1
- import { interpolate } from "../../../animation/functions/interpolate";
2
- export interface Vector {
3
- x: number;
4
- y: number;
5
- }
6
- export declare const vec: (x?: number, y?: number | undefined) => import("../../../skia").SkPoint;
7
- export declare const neg: (a: Vector) => import("../../../skia").SkPoint;
8
- export declare const add: (a: Vector, b: Vector) => import("../../../skia").SkPoint;
9
- export declare const sub: (a: Vector, b: Vector) => import("../../../skia").SkPoint;
10
- export declare const dist: (a: Vector, b: Vector) => number;
11
- export declare const translate: ({ x, y }: Vector) => readonly [{
12
- readonly translateX: number;
13
- }, {
14
- readonly translateY: number;
15
- }];
16
- export declare const interpolateVector: (value: number, inputRange: readonly number[], outputRange: readonly Vector[], options?: Parameters<typeof interpolate>[3]) => {
17
- x: number;
18
- y: number;
19
- };
20
- export declare const mixVector: (value: number, from: Vector, to: Vector) => {
21
- x: number;
22
- y: number;
23
- };
@@ -1 +0,0 @@
1
- export declare const useShader: (sksl: string) => import("..").SkRuntimeEffect | null;
@@ -1,3 +0,0 @@
1
- import type { CanvasKit } from "canvaskit-wasm";
2
- import type { SkColor, Color as InputColor } from "../../types";
3
- export declare const Color: (CanvasKit: CanvasKit, color: InputColor) => SkColor;
@@ -1,10 +0,0 @@
1
- import type { CanvasKit } from "canvaskit-wasm";
2
- import { JsiSkPaint } from "./JsiSkPaint";
3
- import { JsiSkRect } from "./JsiSkRect";
4
- import { JsiSkSurfaceFactory } from "./JsiSkSurfaceFactory";
5
- export declare const JsiSkApi: (CanvasKit: CanvasKit) => {
6
- Paint: () => JsiSkPaint;
7
- XYWHRect: (x: number, y: number, width: number, height: number) => JsiSkRect;
8
- Color: (color: import("../..").Color) => Float32Array;
9
- Surface: JsiSkSurfaceFactory;
10
- };
@@ -1,29 +0,0 @@
1
- import { timing } from "../timing";
2
-
3
- const state = { current: 0, finished: false };
4
-
5
- describe("timing", () => {
6
- it("should return zero when the timestamp is zero", () => {
7
- expect(timing(0, 1000, (t) => t, false, false, state).current).toBe(0);
8
- });
9
-
10
- it("should return 1 when the timestamp is over duration", () => {
11
- expect(timing(2000, 1000, (t) => t, false, false, state).current).toBe(1);
12
- });
13
-
14
- it("should return 0 when yoyo/loop is true and t is duration times 2", () => {
15
- expect(timing(2000, 1000, (t) => t, true, true, state).current).toBe(0);
16
- });
17
-
18
- it("should return 1.0 when t = duration when looping and yoyo ", () => {
19
- expect(timing(700, 700, (t) => t, true, true, state).current).toBe(1);
20
- });
21
-
22
- it("should return 0 when t = duration when looping and not yoyo ", () => {
23
- expect(timing(700, 700, (t) => t, true, false, state).current).toBe(0);
24
- });
25
-
26
- it("should stop when duration is reached", () => {
27
- expect(timing(700, 700, (t) => t, false, false, state).finished).toBe(true);
28
- });
29
- });
@@ -1,73 +0,0 @@
1
- import { exhaustiveCheck } from "../../typeddash";
2
- import { Skia } from "../../../skia";
3
-
4
- type Transform2dName =
5
- | "translateX"
6
- | "translateY"
7
- | "scale"
8
- | "skewX"
9
- | "skewY"
10
- | "scaleX"
11
- | "scaleY"
12
- | "rotateZ"
13
- | "rotate";
14
-
15
- export interface TransformProp {
16
- transform?: Transforms2d;
17
- }
18
-
19
- type Transformations = {
20
- readonly [Name in Transform2dName]: number;
21
- };
22
- export type Transforms2d = readonly (
23
- | Pick<Transformations, "translateX">
24
- | Pick<Transformations, "translateY">
25
- | Pick<Transformations, "scale">
26
- | Pick<Transformations, "scaleX">
27
- | Pick<Transformations, "scaleY">
28
- | Pick<Transformations, "skewX">
29
- | Pick<Transformations, "skewY">
30
- | Pick<Transformations, "rotate">
31
- )[];
32
-
33
- export const processTransform2d = (transforms: Transforms2d) => {
34
- const m = Skia.Matrix();
35
- for (const transform of transforms) {
36
- const key = Object.keys(transform)[0] as Transform2dName;
37
- const value = (transform as Pick<Transformations, typeof key>)[key];
38
- if (key === "translateX") {
39
- m.preTranslate(value, 0);
40
- continue;
41
- }
42
- if (key === "translateY") {
43
- m.preTranslate(0, value);
44
- continue;
45
- }
46
- if (key === "scale") {
47
- m.preScale(value, value);
48
- continue;
49
- }
50
- if (key === "scaleX") {
51
- m.preScale(value, 1);
52
- continue;
53
- }
54
- if (key === "scaleY") {
55
- m.preScale(1, value);
56
- continue;
57
- }
58
- if (key === "skewX") {
59
- m.preSkew(value, 0);
60
- continue;
61
- }
62
- if (key === "skewY") {
63
- m.preSkew(0, value);
64
- continue;
65
- }
66
- if (key === "rotate" || key === "rotateZ") {
67
- m.preRotate((value * 180) / Math.PI);
68
- continue;
69
- }
70
- exhaustiveCheck(key);
71
- }
72
- return m;
73
- };
@@ -1,38 +0,0 @@
1
- import { interpolate } from "../../../animation/functions/interpolate";
2
- import { Skia } from "../../../skia";
3
-
4
- export interface Vector {
5
- x: number;
6
- y: number;
7
- }
8
-
9
- export const vec = (x = 0, y?: number) => Skia.Point(x, y ?? x);
10
- export const neg = (a: Vector) => vec(-a.x, -a.y);
11
- export const add = (a: Vector, b: Vector) => vec(a.x + b.x, a.y + b.y);
12
- export const sub = (a: Vector, b: Vector) => vec(a.x - b.x, a.y - b.y);
13
- export const dist = (a: Vector, b: Vector) => Math.hypot(a.x - b.x, a.y - b.y);
14
- export const translate = ({ x, y }: Vector) =>
15
- [{ translateX: x }, { translateY: y }] as const;
16
-
17
- export const interpolateVector = (
18
- value: number,
19
- inputRange: readonly number[],
20
- outputRange: readonly Vector[],
21
- options?: Parameters<typeof interpolate>[3]
22
- ) => ({
23
- x: interpolate(
24
- value,
25
- inputRange,
26
- outputRange.map((v) => v.x),
27
- options
28
- ),
29
- y: interpolate(
30
- value,
31
- inputRange,
32
- outputRange.map((v) => v.y),
33
- options
34
- ),
35
- });
36
-
37
- export const mixVector = (value: number, from: Vector, to: Vector) =>
38
- interpolateVector(value, [0, 1], [from, to]);
@@ -1,40 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
-
4
- import CanvasKitInit from "canvaskit-wasm";
5
-
6
- import { JsiSkApi } from "../web";
7
-
8
- //import type { SkiaApi } from "../SkiaApi";
9
-
10
- let Skia: ReturnType<typeof JsiSkApi>;
11
-
12
- beforeAll(async () => {
13
- const CanvasKit = await CanvasKitInit();
14
- Skia = JsiSkApi(CanvasKit);
15
- });
16
-
17
- describe("Draw a rectangle", () => {
18
- it("Check that CanvasKit and CanvasKit are loaded", async () => {
19
- expect(Skia).toBeDefined();
20
- });
21
- it("Draws a lightblue rectange", () => {
22
- const paint = Skia.Paint();
23
- paint.setColor(Skia.Color("lightblue"));
24
- const rct = Skia.XYWHRect(64, 64, 128, 128);
25
- const surface = Skia.Surface.Make(256, 256);
26
- expect(surface).toBeDefined();
27
- if (!surface) {
28
- return;
29
- }
30
- const canvas = surface.getCanvas();
31
- canvas.drawRect(rct, paint);
32
- surface.ref.flush();
33
- const image = surface.makeImageSnapshot();
34
- const png = image.encodeToBytes();
35
- const ref = fs.readFileSync(
36
- path.resolve(__dirname, "snapshots/lightblue-rect.png")
37
- );
38
- expect(ref.equals(png)).toBe(true);
39
- });
40
- });
@@ -1,9 +0,0 @@
1
- import { useMemo } from "react";
2
-
3
- import { Skia } from "../Skia";
4
-
5
- export const useShader = (sksl: string) =>
6
- useMemo(() => {
7
- console.warn("Use shader will be deprecated.");
8
- return Skia.RuntimeEffect.Make(sksl);
9
- }, [sksl]);
@@ -1,15 +0,0 @@
1
- import type { CanvasKit } from "canvaskit-wasm";
2
-
3
- import { JsiSkPaint } from "./JsiSkPaint";
4
- import { JsiSkRect } from "./JsiSkRect";
5
- import { Color } from "./JsiSkColor";
6
- import { JsiSkSurfaceFactory } from "./JsiSkSurfaceFactory";
7
-
8
- export const JsiSkApi = (CanvasKit: CanvasKit) => ({
9
- Paint: () => new JsiSkPaint(CanvasKit, new CanvasKit.Paint()),
10
- XYWHRect: (x: number, y: number, width: number, height: number) => {
11
- return new JsiSkRect(CanvasKit, CanvasKit.XYWHRect(x, y, width, height));
12
- },
13
- Color: Color.bind(null, CanvasKit),
14
- Surface: new JsiSkSurfaceFactory(CanvasKit),
15
- });
@@ -1,21 +0,0 @@
1
- import { RNSkAnimation } from "../RNSkAnimation";
2
- import { RNSkValue } from "../RNSkValue";
3
-
4
- describe("RNSkAnimation", () => {
5
- it("should update a value", () => {
6
- const valueToTest = new RNSkValue(0);
7
- const raf = (cb: (t: number) => void) => {
8
- cb(1);
9
- return 1;
10
- };
11
- valueToTest.animation = new RNSkAnimation(
12
- () => ({
13
- finished: true,
14
- current: 1,
15
- }),
16
- raf
17
- );
18
- valueToTest.animation.stop();
19
- expect(valueToTest.current).toBe(1);
20
- });
21
- });
@@ -1,15 +0,0 @@
1
- import { RNSkDerivedValue } from "../RNSkDerivedValue";
2
- import { RNSkValue } from "../RNSkValue";
3
-
4
- describe("RNSkDerivedValue", () => {
5
- it("should update when dependency changes", () => {
6
- const dependency = new RNSkValue(10);
7
- const derived = new RNSkDerivedValue(
8
- () => 10 * dependency.current,
9
- [dependency]
10
- );
11
- expect(derived.current).toBe(100);
12
- dependency.current = 20;
13
- expect(derived.current).toBe(200);
14
- });
15
- });
@@ -1,8 +0,0 @@
1
- import { RNSkReadonlyValue } from "../RNSkReadonlyValue";
2
-
3
- describe("RNSkReadonlyValue", () => {
4
- it("should expose __typename as RNSkValue", () => {
5
- const valueToTest = new RNSkReadonlyValue(100);
6
- expect(valueToTest.__typename__).toEqual("RNSkValue");
7
- });
8
- });