@shopify/react-native-skia 0.1.129 → 0.1.132

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1104) hide show
  1. package/README.md +8 -0
  2. package/android/cpp/jni/JniSkiaDrawView.cpp +3 -2
  3. package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +1 -0
  4. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +2 -1
  5. package/cpp/api/JsiSkCanvas.h +2 -2
  6. package/cpp/api/JsiSkFont.h +6 -2
  7. package/cpp/api/JsiSkMatrix.h +40 -27
  8. package/cpp/api/JsiSkPaint.h +3 -1
  9. package/cpp/api/JsiSkPath.h +67 -61
  10. package/cpp/api/JsiSkPathFactory.h +14 -1
  11. package/cpp/api/JsiSkRuntimeEffect.h +7 -9
  12. package/cpp/api/JsiSkRuntimeShaderBuilder.h +18 -0
  13. package/cpp/api/JsiSkTypeface.h +11 -2
  14. package/cpp/api/JsiSkTypefaceFactory.h +5 -1
  15. package/cpp/api/JsiSkVertices.h +0 -2
  16. package/cpp/rnskia/RNSkInfoParameter.h +2 -0
  17. package/cpp/rnskia/values/RNSkValue.h +1 -1
  18. package/cpp/skia/include/codec/SkCodec.h +7 -1
  19. package/cpp/skia/include/core/SkAlphaType.h +45 -0
  20. package/cpp/skia/include/core/SkBitmap.h +4 -2
  21. package/cpp/skia/include/core/SkCanvas.h +31 -20
  22. package/cpp/skia/include/core/SkColor.h +1 -1
  23. package/cpp/skia/include/core/SkColorFilter.h +1 -0
  24. package/cpp/skia/include/core/SkColorType.h +66 -0
  25. package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +1 -1
  26. package/cpp/skia/include/core/SkDrawable.h +7 -0
  27. package/cpp/skia/include/core/SkEncodedImageFormat.h +1 -0
  28. package/cpp/skia/include/core/SkFont.h +4 -3
  29. package/cpp/skia/include/core/SkFontArguments.h +33 -1
  30. package/cpp/skia/include/core/SkGraphics.h +13 -0
  31. package/cpp/skia/include/core/SkImage.h +67 -22
  32. package/cpp/skia/include/core/SkImageEncoder.h +0 -3
  33. package/cpp/skia/include/core/SkImageGenerator.h +4 -3
  34. package/cpp/skia/include/core/SkImageInfo.h +35 -142
  35. package/cpp/skia/include/core/SkMesh.h +303 -0
  36. package/cpp/skia/include/core/SkMilestone.h +1 -1
  37. package/cpp/skia/include/core/SkOpenTypeSVGDecoder.h +30 -0
  38. package/cpp/skia/include/core/SkPaint.h +4 -19
  39. package/cpp/skia/include/core/SkPath.h +20 -33
  40. package/cpp/skia/include/core/SkPathBuilder.h +1 -6
  41. package/cpp/skia/include/core/SkPixelRef.h +1 -1
  42. package/cpp/skia/include/core/SkPixmap.h +3 -2
  43. package/cpp/skia/include/core/SkRSXform.h +1 -1
  44. package/cpp/skia/include/core/SkSamplingOptions.h +16 -5
  45. package/cpp/skia/include/core/SkSpan.h +5 -5
  46. package/cpp/skia/include/core/SkString.h +5 -8
  47. package/cpp/skia/include/core/SkSurface.h +21 -0
  48. package/cpp/skia/include/core/SkTypeface.h +20 -4
  49. package/cpp/skia/include/core/SkTypes.h +9 -5
  50. package/cpp/skia/include/effects/SkGradientShader.h +9 -18
  51. package/cpp/skia/include/effects/SkRuntimeEffect.h +16 -12
  52. package/cpp/skia/include/gpu/GpuTypes.h +32 -0
  53. package/cpp/skia/include/gpu/GrBackendSemaphore.h +1 -1
  54. package/cpp/skia/include/gpu/GrBackendSurface.h +6 -5
  55. package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +1 -1
  56. package/cpp/skia/include/gpu/GrContextOptions.h +11 -20
  57. package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +7 -0
  58. package/cpp/skia/include/gpu/GrDirectContext.h +16 -11
  59. package/cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h +0 -2
  60. package/cpp/skia/include/gpu/GrRecordingContext.h +14 -7
  61. package/cpp/skia/include/gpu/GrSurfaceInfo.h +6 -6
  62. package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +1 -1
  63. package/cpp/skia/include/gpu/gl/GrGLFunctions.h +3 -1
  64. package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -2
  65. package/cpp/skia/include/gpu/graphite/BackendTexture.h +64 -0
  66. package/cpp/skia/include/gpu/graphite/Context.h +124 -0
  67. package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +71 -0
  68. package/cpp/skia/include/gpu/graphite/Recorder.h +104 -0
  69. package/cpp/skia/include/gpu/graphite/Recording.h +39 -0
  70. package/cpp/skia/include/gpu/graphite/SkStuff.h +47 -0
  71. package/cpp/skia/include/gpu/graphite/TextureInfo.h +91 -0
  72. package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +24 -0
  73. package/cpp/skia/include/gpu/graphite/mtl/MtlTypes.h +68 -0
  74. package/cpp/skia/include/gpu/mock/GrMockTypes.h +1 -2
  75. package/cpp/skia/include/ports/SkCFObject.h +0 -4
  76. package/cpp/skia/include/ports/SkTypeface_win.h +2 -2
  77. package/cpp/skia/include/private/{GrSingleOwner.h → SingleOwner.h} +17 -10
  78. package/cpp/skia/include/private/SkChecksum.h +11 -0
  79. package/cpp/skia/include/private/SkEncodedInfo.h +22 -5
  80. package/cpp/skia/include/private/SkFloatingPoint.h +0 -53
  81. package/cpp/skia/include/private/SkImageInfoPriv.h +8 -2
  82. package/cpp/skia/include/private/SkMacros.h +13 -18
  83. package/cpp/skia/include/private/SkMutex.h +8 -0
  84. package/cpp/skia/include/private/SkPathRef.h +2 -16
  85. package/cpp/skia/include/private/SkSLDefines.h +9 -1
  86. package/cpp/skia/include/private/SkSLIRNode.h +6 -5
  87. package/cpp/skia/include/private/SkSLLayout.h +11 -10
  88. package/cpp/skia/include/private/SkSLModifiers.h +4 -3
  89. package/cpp/skia/include/private/SkSLProgramElement.h +2 -2
  90. package/cpp/skia/include/private/SkSLProgramKind.h +8 -5
  91. package/cpp/skia/include/private/SkSLStatement.h +2 -3
  92. package/cpp/skia/include/private/SkSLString.h +17 -56
  93. package/cpp/skia/include/private/SkSLSymbol.h +4 -4
  94. package/cpp/skia/include/private/SkShadowFlags.h +3 -1
  95. package/cpp/skia/include/private/SkStringView.h +47 -0
  96. package/cpp/skia/include/private/SkTArray.h +4 -3
  97. package/cpp/skia/include/private/SkTHash.h +66 -24
  98. package/cpp/skia/include/private/SkTLogic.h +2 -32
  99. package/cpp/skia/include/private/SkTemplates.h +2 -2
  100. package/cpp/skia/include/private/SkThreadAnnotations.h +4 -4
  101. package/cpp/skia/include/private/SkVx.h +28 -28
  102. package/cpp/skia/include/private/chromium/GrSlug.h +40 -3
  103. package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +12 -6
  104. package/cpp/skia/include/private/{GrContext_Base.h → gpu/ganesh/GrContext_Base.h} +7 -0
  105. package/cpp/skia/include/private/{GrD3DTypesMinimal.h → gpu/ganesh/GrD3DTypesMinimal.h} +0 -0
  106. package/cpp/skia/include/private/{GrDawnTypesPriv.h → gpu/ganesh/GrDawnTypesPriv.h} +0 -0
  107. package/cpp/skia/include/private/{GrGLTypesPriv.h → gpu/ganesh/GrGLTypesPriv.h} +1 -0
  108. package/cpp/skia/include/private/{GrImageContext.h → gpu/ganesh/GrImageContext.h} +4 -4
  109. package/cpp/skia/include/private/{GrMockTypesPriv.h → gpu/ganesh/GrMockTypesPriv.h} +0 -0
  110. package/cpp/skia/include/private/{GrMtlTypesPriv.h → gpu/ganesh/GrMtlTypesPriv.h} +0 -0
  111. package/cpp/skia/include/private/{GrTypesPriv.h → gpu/ganesh/GrTypesPriv.h} +25 -367
  112. package/cpp/skia/include/private/{GrVkTypesPriv.h → gpu/ganesh/GrVkTypesPriv.h} +0 -0
  113. package/cpp/skia/include/private/gpu/graphite/MtlTypesPriv.h +74 -0
  114. package/cpp/skia/include/sksl/DSL.h +4 -0
  115. package/cpp/skia/include/sksl/DSLBlock.h +8 -3
  116. package/cpp/skia/include/sksl/DSLCase.h +6 -6
  117. package/cpp/skia/include/sksl/DSLCore.h +89 -78
  118. package/cpp/skia/include/sksl/DSLExpression.h +78 -45
  119. package/cpp/skia/include/sksl/DSLFunction.h +23 -18
  120. package/cpp/skia/include/sksl/DSLLayout.h +14 -16
  121. package/cpp/skia/include/sksl/DSLModifiers.h +7 -5
  122. package/cpp/skia/include/sksl/DSLRuntimeEffects.h +1 -1
  123. package/cpp/skia/include/sksl/DSLStatement.h +16 -10
  124. package/cpp/skia/include/sksl/DSLSymbols.h +7 -7
  125. package/cpp/skia/include/sksl/DSLType.h +27 -23
  126. package/cpp/skia/include/sksl/DSLVar.h +72 -61
  127. package/cpp/skia/include/sksl/SkSLErrorReporter.h +12 -49
  128. package/cpp/skia/include/sksl/SkSLOperator.h +151 -0
  129. package/cpp/skia/include/sksl/SkSLPosition.h +102 -0
  130. package/cpp/skia/include/svg/SkSVGCanvas.h +5 -1
  131. package/cpp/skia/include/utils/SkAnimCodecPlayer.h +7 -0
  132. package/cpp/skia/include/utils/SkCamera.h +2 -0
  133. package/cpp/skia/include/utils/SkCanvasStateUtils.h +4 -1
  134. package/cpp/skia/include/utils/SkCustomTypeface.h +6 -4
  135. package/cpp/skia/include/utils/SkNWayCanvas.h +34 -0
  136. package/cpp/skia/include/utils/SkNullCanvas.h +5 -1
  137. package/cpp/skia/include/utils/SkOrderedFontMgr.h +12 -0
  138. package/cpp/skia/include/utils/SkPaintFilterCanvas.h +30 -1
  139. package/cpp/skia/include/utils/SkParse.h +2 -0
  140. package/cpp/skia/include/utils/SkShadowUtils.h +3 -2
  141. package/cpp/skia/include/utils/SkTextUtils.h +8 -4
  142. package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +27 -1
  143. package/cpp/skia/modules/svg/include/SkSVGDOM.h +4 -0
  144. package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +32 -0
  145. package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
  146. package/cpp/skia/modules/svg/include/SkSVGSVG.h +2 -0
  147. package/cpp/skia/modules/svg/include/SkSVGTypes.h +48 -9
  148. package/cpp/utils/RNSkLog.h +27 -0
  149. package/ios/RNSkia-iOS/PlatformContext.h +1 -1
  150. package/ios/RNSkia-iOS/RNSkDrawViewImpl.mm +1 -0
  151. package/ios/RNSkia-iOS/SkiaDrawView.mm +3 -2
  152. package/lib/commonjs/animation/functions/index.js +47 -17
  153. package/lib/commonjs/animation/functions/index.js.map +1 -1
  154. package/lib/commonjs/animation/functions/interpolatePaths.js +45 -0
  155. package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -0
  156. package/lib/commonjs/animation/functions/interpolateVector.js +20 -0
  157. package/lib/commonjs/animation/functions/interpolateVector.js.map +1 -0
  158. package/lib/commonjs/index.js +13 -0
  159. package/lib/commonjs/index.js.map +1 -1
  160. package/lib/commonjs/renderer/Canvas.js +19 -35
  161. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  162. package/lib/commonjs/renderer/HostConfig.js +2 -2
  163. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  164. package/lib/commonjs/renderer/components/Blend.js +10 -7
  165. package/lib/commonjs/renderer/components/Blend.js.map +1 -1
  166. package/lib/commonjs/renderer/components/Compose.js +9 -6
  167. package/lib/commonjs/renderer/components/Compose.js.map +1 -1
  168. package/lib/commonjs/renderer/components/Group.js +7 -6
  169. package/lib/commonjs/renderer/components/Group.js.map +1 -1
  170. package/lib/commonjs/renderer/components/Mask.js +13 -10
  171. package/lib/commonjs/renderer/components/Mask.js.map +1 -1
  172. package/lib/commonjs/renderer/components/Paint.js +7 -4
  173. package/lib/commonjs/renderer/components/Paint.js.map +1 -1
  174. package/lib/commonjs/renderer/components/Picture.js.map +1 -1
  175. package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js +1 -1
  176. package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -1
  177. package/lib/commonjs/renderer/components/colorFilters/BlendColor.js +7 -6
  178. package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -1
  179. package/lib/commonjs/renderer/components/colorFilters/Compose.js +6 -6
  180. package/lib/commonjs/renderer/components/colorFilters/Compose.js.map +1 -1
  181. package/lib/commonjs/renderer/components/colorFilters/Lerp.js +8 -7
  182. package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
  183. package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js +6 -6
  184. package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
  185. package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js +6 -6
  186. package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
  187. package/lib/commonjs/renderer/components/colorFilters/Matrix.js +6 -7
  188. package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -1
  189. package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js +6 -6
  190. package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
  191. package/lib/commonjs/renderer/components/image/BoxFit.js +7 -9
  192. package/lib/commonjs/renderer/components/image/BoxFit.js.map +1 -1
  193. package/lib/commonjs/renderer/components/image/Image.js +3 -2
  194. package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
  195. package/lib/commonjs/renderer/components/image/ImageSVG.js +3 -2
  196. package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -1
  197. package/lib/commonjs/renderer/components/image/ImageShader.js +9 -6
  198. package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
  199. package/lib/commonjs/renderer/components/imageFilters/Blur.js +7 -4
  200. package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
  201. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +10 -7
  202. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  203. package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js +10 -15
  204. package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -1
  205. package/lib/commonjs/renderer/components/imageFilters/Morphology.js +7 -6
  206. package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
  207. package/lib/commonjs/renderer/components/imageFilters/Offset.js +5 -4
  208. package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
  209. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js +13 -6
  210. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  211. package/lib/commonjs/renderer/components/imageFilters/Shadow.js +8 -7
  212. package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
  213. package/lib/commonjs/renderer/components/imageFilters/getInput.js +7 -7
  214. package/lib/commonjs/renderer/components/imageFilters/getInput.js.map +1 -1
  215. package/lib/commonjs/renderer/components/maskFilters/Blur.js +6 -3
  216. package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
  217. package/lib/commonjs/renderer/components/pathEffects/Corner.js +8 -6
  218. package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
  219. package/lib/commonjs/renderer/components/pathEffects/Dash.js +8 -6
  220. package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
  221. package/lib/commonjs/renderer/components/pathEffects/Discrete.js +8 -6
  222. package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
  223. package/lib/commonjs/renderer/components/pathEffects/Line2D.js +8 -6
  224. package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
  225. package/lib/commonjs/renderer/components/pathEffects/Path1D.js +8 -6
  226. package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
  227. package/lib/commonjs/renderer/components/pathEffects/Path2D.js +8 -6
  228. package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
  229. package/lib/commonjs/renderer/components/pathEffects/Sum.js +7 -4
  230. package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
  231. package/lib/commonjs/renderer/components/shaders/Color.js +7 -4
  232. package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -1
  233. package/lib/commonjs/renderer/components/shaders/FractalNoise.js +5 -4
  234. package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
  235. package/lib/commonjs/renderer/components/shaders/Gradient.js +5 -5
  236. package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -1
  237. package/lib/commonjs/renderer/components/shaders/LinearGradient.js +6 -5
  238. package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -1
  239. package/lib/commonjs/renderer/components/shaders/RadialGradient.js +6 -5
  240. package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -1
  241. package/lib/commonjs/renderer/components/shaders/Shader.js +6 -44
  242. package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
  243. package/lib/commonjs/renderer/components/shaders/SweepGradient.js +6 -5
  244. package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -1
  245. package/lib/commonjs/renderer/components/shaders/Turbulence.js +5 -4
  246. package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
  247. package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js +6 -5
  248. package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
  249. package/lib/commonjs/renderer/components/shapes/Box.js +26 -29
  250. package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
  251. package/lib/commonjs/renderer/components/shapes/Circle.js +7 -5
  252. package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
  253. package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
  254. package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
  255. package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -1
  256. package/lib/commonjs/renderer/components/shapes/Oval.js +3 -2
  257. package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
  258. package/lib/commonjs/renderer/components/shapes/Patch.js +8 -5
  259. package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
  260. package/lib/commonjs/renderer/components/shapes/Path.js +5 -4
  261. package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
  262. package/lib/commonjs/renderer/components/shapes/Points.js +2 -2
  263. package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
  264. package/lib/commonjs/renderer/components/shapes/Rect.js +3 -2
  265. package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -1
  266. package/lib/commonjs/renderer/components/shapes/RoundedRect.js +3 -2
  267. package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
  268. package/lib/commonjs/renderer/components/shapes/Vertices.js +9 -8
  269. package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
  270. package/lib/commonjs/renderer/components/text/Glyphs.js +3 -2
  271. package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
  272. package/lib/commonjs/renderer/components/text/Text.js +3 -2
  273. package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
  274. package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
  275. package/lib/commonjs/renderer/components/text/TextPath.js +7 -11
  276. package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
  277. package/lib/commonjs/renderer/index.js +13 -13
  278. package/lib/commonjs/renderer/index.js.map +1 -1
  279. package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -1
  280. package/lib/commonjs/renderer/nodes/Drawing.js +5 -5
  281. package/lib/commonjs/renderer/nodes/Drawing.js.map +1 -1
  282. package/lib/commonjs/renderer/nodes/Node.js.map +1 -1
  283. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  284. package/lib/commonjs/renderer/processors/Circles.js +2 -4
  285. package/lib/commonjs/renderer/processors/Circles.js.map +1 -1
  286. package/lib/commonjs/renderer/processors/Clips.js +5 -5
  287. package/lib/commonjs/renderer/processors/Clips.js.map +1 -1
  288. package/lib/commonjs/{skia/core → renderer/processors}/Color.js +2 -6
  289. package/lib/commonjs/renderer/processors/Color.js.map +1 -0
  290. package/lib/commonjs/renderer/processors/Font.js +4 -4
  291. package/lib/commonjs/renderer/processors/Font.js.map +1 -1
  292. package/lib/commonjs/renderer/processors/Paint.js +18 -14
  293. package/lib/commonjs/renderer/processors/Paint.js.map +1 -1
  294. package/lib/commonjs/renderer/processors/Paths.js +4 -4
  295. package/lib/commonjs/renderer/processors/Paths.js.map +1 -1
  296. package/lib/commonjs/renderer/processors/Radius.js +2 -4
  297. package/lib/commonjs/renderer/processors/Radius.js.map +1 -1
  298. package/lib/commonjs/renderer/processors/Rects.js +8 -59
  299. package/lib/commonjs/renderer/processors/Rects.js.map +1 -1
  300. package/lib/commonjs/renderer/processors/Transform.js +26 -17
  301. package/lib/commonjs/renderer/processors/Transform.js.map +1 -1
  302. package/lib/commonjs/renderer/processors/index.js +26 -13
  303. package/lib/commonjs/renderer/processors/index.js.map +1 -1
  304. package/lib/commonjs/renderer/processors/math/Coordinates.js.map +1 -1
  305. package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -1
  306. package/lib/commonjs/renderer/processors/math/index.js +0 -26
  307. package/lib/commonjs/renderer/processors/math/index.js.map +1 -1
  308. package/lib/commonjs/renderer/useCanvas.js +30 -0
  309. package/lib/commonjs/renderer/useCanvas.js.map +1 -0
  310. package/lib/commonjs/skia/NativeSetup.js +1 -1
  311. package/lib/commonjs/skia/NativeSetup.js.map +1 -1
  312. package/lib/commonjs/skia/Skia.web.js +12 -0
  313. package/lib/commonjs/skia/Skia.web.js.map +1 -0
  314. package/lib/commonjs/skia/core/Data.js +9 -4
  315. package/lib/commonjs/skia/core/Data.js.map +1 -1
  316. package/lib/commonjs/skia/core/Font.js +2 -4
  317. package/lib/commonjs/skia/core/Font.js.map +1 -1
  318. package/lib/commonjs/skia/core/Matrix.js +15 -0
  319. package/lib/commonjs/skia/core/Matrix.js.map +1 -0
  320. package/lib/commonjs/skia/core/Paint.js +4 -12
  321. package/lib/commonjs/skia/core/Paint.js.map +1 -1
  322. package/lib/commonjs/skia/core/Path.js +14 -2
  323. package/lib/commonjs/skia/core/Path.js.map +1 -1
  324. package/lib/commonjs/skia/core/RRect.js +13 -0
  325. package/lib/commonjs/skia/core/RRect.js.map +1 -0
  326. package/lib/commonjs/skia/core/Rect.js +47 -0
  327. package/lib/commonjs/skia/core/Rect.js.map +1 -0
  328. package/lib/commonjs/skia/core/Vector.js +49 -0
  329. package/lib/commonjs/skia/core/Vector.js.map +1 -0
  330. package/lib/commonjs/skia/core/index.js +51 -25
  331. package/lib/commonjs/skia/core/index.js.map +1 -1
  332. package/lib/commonjs/skia/types/Font/Font.js.map +1 -1
  333. package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -1
  334. package/lib/commonjs/skia/types/Matrix.js +58 -1
  335. package/lib/commonjs/skia/types/Matrix.js.map +1 -1
  336. package/lib/commonjs/skia/types/Path/Path.js +1 -0
  337. package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
  338. package/lib/commonjs/skia/types/Point.js.map +1 -1
  339. package/lib/commonjs/skia/types/RRect.js +7 -0
  340. package/lib/commonjs/skia/types/RRect.js.map +1 -1
  341. package/lib/commonjs/skia/types/Shader/Shader.js +51 -1
  342. package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
  343. package/lib/commonjs/skia/web/{api/Host.js → Host.js} +10 -1
  344. package/lib/commonjs/skia/web/Host.js.map +1 -0
  345. package/lib/commonjs/skia/web/JsiImageFilterFactory.js +68 -0
  346. package/lib/commonjs/skia/web/JsiImageFilterFactory.js.map +1 -0
  347. package/lib/commonjs/skia/web/{api/JsiSkCanvas.js → JsiSkCanvas.js} +20 -6
  348. package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -0
  349. package/lib/commonjs/skia/web/{api/JsiSkColor.js → JsiSkColor.js} +163 -4
  350. package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -0
  351. package/lib/commonjs/skia/web/{api/JsiSkColorFilter.js → JsiSkColorFilter.js} +0 -0
  352. package/lib/commonjs/skia/web/{api/JsiSkColorFilter.js.map → JsiSkColorFilter.js.map} +1 -1
  353. package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js +48 -0
  354. package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -0
  355. package/lib/commonjs/skia/web/JsiSkContourMeasure.js +42 -0
  356. package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -0
  357. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js +30 -0
  358. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -0
  359. package/lib/commonjs/skia/web/JsiSkData.js +18 -0
  360. package/lib/commonjs/skia/web/JsiSkData.js.map +1 -0
  361. package/lib/commonjs/skia/web/JsiSkDataFactory.js +44 -0
  362. package/lib/commonjs/skia/web/JsiSkDataFactory.js.map +1 -0
  363. package/lib/commonjs/skia/web/JsiSkFont.js +113 -0
  364. package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -0
  365. package/lib/commonjs/skia/web/JsiSkFontMgr.js +35 -0
  366. package/lib/commonjs/skia/web/JsiSkFontMgr.js.map +1 -0
  367. package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js +25 -0
  368. package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js.map +1 -0
  369. package/lib/commonjs/skia/web/{api/JsiSkImage.js → JsiSkImage.js} +0 -0
  370. package/lib/commonjs/skia/web/{api/JsiSkImage.js.map → JsiSkImage.js.map} +1 -1
  371. package/lib/commonjs/skia/web/JsiSkImageFactory.js +47 -0
  372. package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -0
  373. package/lib/commonjs/skia/web/JsiSkImageFilter.js +18 -0
  374. package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -0
  375. package/lib/commonjs/skia/web/JsiSkMaskFilter.js +18 -0
  376. package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -0
  377. package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js +24 -0
  378. package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
  379. package/lib/commonjs/skia/web/JsiSkMatrix.js +38 -0
  380. package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -0
  381. package/lib/commonjs/skia/web/{api/JsiSkPaint.js → JsiSkPaint.js} +4 -9
  382. package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -0
  383. package/lib/commonjs/skia/web/JsiSkPath.js +324 -0
  384. package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -0
  385. package/lib/commonjs/skia/web/JsiSkPathEffect.js +18 -0
  386. package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -0
  387. package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js +78 -0
  388. package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -0
  389. package/lib/commonjs/skia/web/JsiSkPathFactory.js +58 -0
  390. package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -0
  391. package/lib/commonjs/skia/web/JsiSkPicture.js +29 -0
  392. package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -0
  393. package/lib/commonjs/skia/web/JsiSkPictureFactory.js +30 -0
  394. package/lib/commonjs/skia/web/JsiSkPictureFactory.js.map +1 -0
  395. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +30 -0
  396. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -0
  397. package/lib/commonjs/skia/web/JsiSkPoint.js +26 -0
  398. package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -0
  399. package/lib/commonjs/skia/web/JsiSkRRect.js +32 -0
  400. package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -0
  401. package/lib/commonjs/skia/web/JsiSkRSXform.js +18 -0
  402. package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -0
  403. package/lib/commonjs/skia/web/{api/JsiSkRect.js → JsiSkRect.js} +8 -0
  404. package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -0
  405. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +44 -0
  406. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -0
  407. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +30 -0
  408. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
  409. package/lib/commonjs/skia/web/JsiSkSVGFactory.js +26 -0
  410. package/lib/commonjs/skia/web/JsiSkSVGFactory.js.map +1 -0
  411. package/lib/commonjs/skia/web/JsiSkShader.js +18 -0
  412. package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -0
  413. package/lib/commonjs/skia/web/JsiSkShaderFactory.js +52 -0
  414. package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -0
  415. package/lib/commonjs/skia/web/{api/JsiSkSurface.js → JsiSkSurface.js} +0 -0
  416. package/lib/commonjs/skia/web/{api/JsiSkSurface.js.map → JsiSkSurface.js.map} +1 -1
  417. package/lib/commonjs/skia/web/{api/JsiSkSurfaceFactory.js → JsiSkSurfaceFactory.js} +0 -0
  418. package/lib/commonjs/skia/web/{api/JsiSkSurfaceFactory.js.map → JsiSkSurfaceFactory.js.map} +1 -1
  419. package/lib/commonjs/skia/web/JsiSkTextBlob.js +18 -0
  420. package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -0
  421. package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js +36 -0
  422. package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -0
  423. package/lib/commonjs/skia/web/JsiSkTypeface.js +28 -0
  424. package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -0
  425. package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js +30 -0
  426. package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js.map +1 -0
  427. package/lib/commonjs/skia/web/JsiSkVertices.js +28 -0
  428. package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -0
  429. package/lib/commonjs/skia/web/JsiSkVerticesFactory.js +27 -0
  430. package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -0
  431. package/lib/commonjs/skia/web/JsiSkia.js +97 -0
  432. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -0
  433. package/lib/commonjs/skia/web/index.js +4 -4
  434. package/lib/commonjs/skia/web/index.js.map +1 -1
  435. package/lib/commonjs/values/web/api.js +2 -2
  436. package/lib/commonjs/values/web/api.js.map +1 -1
  437. package/lib/commonjs/views/SkiaView.web.js +216 -0
  438. package/lib/commonjs/views/SkiaView.web.js.map +1 -0
  439. package/lib/commonjs/views/types.js.map +1 -1
  440. package/lib/commonjs/views/useTouchHandler.js +70 -46
  441. package/lib/commonjs/views/useTouchHandler.js.map +1 -1
  442. package/lib/commonjs/web/index.js +20 -0
  443. package/lib/commonjs/web/index.js.map +1 -0
  444. package/lib/module/animation/functions/index.js +4 -2
  445. package/lib/module/animation/functions/index.js.map +1 -1
  446. package/lib/module/animation/functions/interpolatePaths.js +36 -0
  447. package/lib/module/animation/functions/interpolatePaths.js.map +1 -0
  448. package/lib/module/animation/functions/interpolateVector.js +7 -0
  449. package/lib/module/animation/functions/interpolateVector.js.map +1 -0
  450. package/lib/module/index.js +1 -0
  451. package/lib/module/index.js.map +1 -1
  452. package/lib/module/renderer/Canvas.js +15 -26
  453. package/lib/module/renderer/Canvas.js.map +1 -1
  454. package/lib/module/renderer/HostConfig.js +2 -2
  455. package/lib/module/renderer/HostConfig.js.map +1 -1
  456. package/lib/module/renderer/components/Blend.js +5 -2
  457. package/lib/module/renderer/components/Blend.js.map +1 -1
  458. package/lib/module/renderer/components/Compose.js +5 -2
  459. package/lib/module/renderer/components/Compose.js.map +1 -1
  460. package/lib/module/renderer/components/Group.js +7 -6
  461. package/lib/module/renderer/components/Group.js.map +1 -1
  462. package/lib/module/renderer/components/Mask.js +7 -3
  463. package/lib/module/renderer/components/Mask.js.map +1 -1
  464. package/lib/module/renderer/components/Paint.js +6 -3
  465. package/lib/module/renderer/components/Paint.js.map +1 -1
  466. package/lib/module/renderer/components/Picture.js.map +1 -1
  467. package/lib/module/renderer/components/backdrop/BackdropFilter.js +1 -1
  468. package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -1
  469. package/lib/module/renderer/components/colorFilters/BlendColor.js +6 -3
  470. package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -1
  471. package/lib/module/renderer/components/colorFilters/Compose.js +2 -2
  472. package/lib/module/renderer/components/colorFilters/Compose.js.map +1 -1
  473. package/lib/module/renderer/components/colorFilters/Lerp.js +6 -3
  474. package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
  475. package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js +5 -3
  476. package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
  477. package/lib/module/renderer/components/colorFilters/LumaColorFilter.js +5 -3
  478. package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
  479. package/lib/module/renderer/components/colorFilters/Matrix.js +5 -3
  480. package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -1
  481. package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js +5 -3
  482. package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
  483. package/lib/module/renderer/components/image/BoxFit.js +7 -8
  484. package/lib/module/renderer/components/image/BoxFit.js.map +1 -1
  485. package/lib/module/renderer/components/image/Image.js +3 -2
  486. package/lib/module/renderer/components/image/Image.js.map +1 -1
  487. package/lib/module/renderer/components/image/ImageSVG.js +3 -2
  488. package/lib/module/renderer/components/image/ImageSVG.js.map +1 -1
  489. package/lib/module/renderer/components/image/ImageShader.js +10 -7
  490. package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
  491. package/lib/module/renderer/components/imageFilters/Blur.js +7 -4
  492. package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
  493. package/lib/module/renderer/components/imageFilters/DisplacementMap.js +7 -4
  494. package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  495. package/lib/module/renderer/components/imageFilters/InnerShadow.js +3 -3
  496. package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -1
  497. package/lib/module/renderer/components/imageFilters/Morphology.js +6 -4
  498. package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
  499. package/lib/module/renderer/components/imageFilters/Offset.js +5 -3
  500. package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
  501. package/lib/module/renderer/components/imageFilters/RuntimeShader.js +13 -4
  502. package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  503. package/lib/module/renderer/components/imageFilters/Shadow.js +6 -5
  504. package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
  505. package/lib/module/renderer/components/imageFilters/getInput.js +2 -2
  506. package/lib/module/renderer/components/imageFilters/getInput.js.map +1 -1
  507. package/lib/module/renderer/components/maskFilters/Blur.js +5 -2
  508. package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
  509. package/lib/module/renderer/components/pathEffects/Corner.js +5 -2
  510. package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
  511. package/lib/module/renderer/components/pathEffects/Dash.js +5 -2
  512. package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
  513. package/lib/module/renderer/components/pathEffects/Discrete.js +5 -2
  514. package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
  515. package/lib/module/renderer/components/pathEffects/Line2D.js +5 -2
  516. package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
  517. package/lib/module/renderer/components/pathEffects/Path1D.js +6 -3
  518. package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
  519. package/lib/module/renderer/components/pathEffects/Path2D.js +6 -3
  520. package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
  521. package/lib/module/renderer/components/pathEffects/Sum.js +5 -2
  522. package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
  523. package/lib/module/renderer/components/shaders/Color.js +6 -3
  524. package/lib/module/renderer/components/shaders/Color.js.map +1 -1
  525. package/lib/module/renderer/components/shaders/FractalNoise.js +4 -2
  526. package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
  527. package/lib/module/renderer/components/shaders/Gradient.js +3 -3
  528. package/lib/module/renderer/components/shaders/Gradient.js.map +1 -1
  529. package/lib/module/renderer/components/shaders/LinearGradient.js +5 -3
  530. package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -1
  531. package/lib/module/renderer/components/shaders/RadialGradient.js +5 -3
  532. package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -1
  533. package/lib/module/renderer/components/shaders/Shader.js +6 -45
  534. package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
  535. package/lib/module/renderer/components/shaders/SweepGradient.js +5 -3
  536. package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -1
  537. package/lib/module/renderer/components/shaders/Turbulence.js +4 -2
  538. package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
  539. package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js +5 -3
  540. package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
  541. package/lib/module/renderer/components/shapes/Box.js +20 -19
  542. package/lib/module/renderer/components/shapes/Box.js.map +1 -1
  543. package/lib/module/renderer/components/shapes/Circle.js +7 -4
  544. package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
  545. package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
  546. package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
  547. package/lib/module/renderer/components/shapes/Line.js.map +1 -1
  548. package/lib/module/renderer/components/shapes/Oval.js +3 -2
  549. package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
  550. package/lib/module/renderer/components/shapes/Patch.js +5 -3
  551. package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
  552. package/lib/module/renderer/components/shapes/Path.js +4 -3
  553. package/lib/module/renderer/components/shapes/Path.js.map +1 -1
  554. package/lib/module/renderer/components/shapes/Points.js +1 -1
  555. package/lib/module/renderer/components/shapes/Points.js.map +1 -1
  556. package/lib/module/renderer/components/shapes/Rect.js +3 -2
  557. package/lib/module/renderer/components/shapes/Rect.js.map +1 -1
  558. package/lib/module/renderer/components/shapes/RoundedRect.js +3 -2
  559. package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
  560. package/lib/module/renderer/components/shapes/Vertices.js +5 -3
  561. package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
  562. package/lib/module/renderer/components/text/Glyphs.js +3 -2
  563. package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
  564. package/lib/module/renderer/components/text/Text.js +3 -2
  565. package/lib/module/renderer/components/text/Text.js.map +1 -1
  566. package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
  567. package/lib/module/renderer/components/text/TextPath.js +3 -3
  568. package/lib/module/renderer/components/text/TextPath.js.map +1 -1
  569. package/lib/module/renderer/index.js +1 -1
  570. package/lib/module/renderer/index.js.map +1 -1
  571. package/lib/module/renderer/nodes/Declaration.js.map +1 -1
  572. package/lib/module/renderer/nodes/Drawing.js +3 -3
  573. package/lib/module/renderer/nodes/Drawing.js.map +1 -1
  574. package/lib/module/renderer/nodes/Node.js.map +1 -1
  575. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  576. package/lib/module/renderer/processors/Circles.js +2 -4
  577. package/lib/module/renderer/processors/Circles.js.map +1 -1
  578. package/lib/module/renderer/processors/Clips.js +3 -3
  579. package/lib/module/renderer/processors/Clips.js.map +1 -1
  580. package/lib/module/{skia/core → renderer/processors}/Color.js +1 -2
  581. package/lib/module/renderer/processors/Color.js.map +1 -0
  582. package/lib/module/renderer/processors/Font.js +3 -2
  583. package/lib/module/renderer/processors/Font.js.map +1 -1
  584. package/lib/module/renderer/processors/Paint.js +8 -5
  585. package/lib/module/renderer/processors/Paint.js.map +1 -1
  586. package/lib/module/renderer/processors/Paths.js +2 -2
  587. package/lib/module/renderer/processors/Paths.js.map +1 -1
  588. package/lib/module/renderer/processors/Radius.js +2 -3
  589. package/lib/module/renderer/processors/Radius.js.map +1 -1
  590. package/lib/module/renderer/processors/Rects.js +7 -26
  591. package/lib/module/renderer/processors/Rects.js.map +1 -1
  592. package/lib/module/renderer/processors/Transform.js +24 -16
  593. package/lib/module/renderer/processors/Transform.js.map +1 -1
  594. package/lib/module/renderer/processors/index.js +2 -1
  595. package/lib/module/renderer/processors/index.js.map +1 -1
  596. package/lib/module/renderer/processors/math/Coordinates.js.map +1 -1
  597. package/lib/module/renderer/processors/math/Transforms.js.map +1 -1
  598. package/lib/module/renderer/processors/math/index.js +0 -2
  599. package/lib/module/renderer/processors/math/index.js.map +1 -1
  600. package/lib/module/renderer/useCanvas.js +13 -0
  601. package/lib/module/renderer/useCanvas.js.map +1 -0
  602. package/lib/module/skia/NativeSetup.js +2 -2
  603. package/lib/module/skia/NativeSetup.js.map +1 -1
  604. package/lib/module/skia/Skia.web.js +3 -0
  605. package/lib/module/skia/Skia.web.js.map +1 -0
  606. package/lib/module/skia/core/Data.js +11 -5
  607. package/lib/module/skia/core/Data.js.map +1 -1
  608. package/lib/module/skia/core/Font.js +2 -4
  609. package/lib/module/skia/core/Font.js.map +1 -1
  610. package/lib/module/skia/core/Matrix.js +4 -0
  611. package/lib/module/skia/core/Matrix.js.map +1 -0
  612. package/lib/module/skia/core/Paint.js +3 -7
  613. package/lib/module/skia/core/Paint.js.map +1 -1
  614. package/lib/module/skia/core/Path.js +11 -2
  615. package/lib/module/skia/core/Path.js.map +1 -1
  616. package/lib/module/skia/core/RRect.js +3 -0
  617. package/lib/module/skia/core/RRect.js.map +1 -0
  618. package/lib/module/skia/core/Rect.js +17 -0
  619. package/lib/module/skia/core/Rect.js.map +1 -0
  620. package/lib/module/{renderer/processors/math → skia/core}/Vector.js +2 -7
  621. package/lib/module/skia/core/Vector.js.map +1 -0
  622. package/lib/module/skia/core/index.js +5 -3
  623. package/lib/module/skia/core/index.js.map +1 -1
  624. package/lib/module/skia/types/Font/Font.js.map +1 -1
  625. package/lib/module/skia/types/Image/ImageFactory.js.map +1 -1
  626. package/lib/module/skia/types/Matrix.js +55 -0
  627. package/lib/module/skia/types/Matrix.js.map +1 -1
  628. package/lib/module/skia/types/Path/Path.js +1 -0
  629. package/lib/module/skia/types/Path/Path.js.map +1 -1
  630. package/lib/module/skia/types/Point.js.map +1 -1
  631. package/lib/module/skia/types/RRect.js +3 -1
  632. package/lib/module/skia/types/RRect.js.map +1 -1
  633. package/lib/module/skia/types/Shader/Shader.js +48 -0
  634. package/lib/module/skia/types/Shader/Shader.js.map +1 -1
  635. package/lib/module/skia/web/{api/Host.js → Host.js} +6 -0
  636. package/lib/module/skia/web/Host.js.map +1 -0
  637. package/lib/module/skia/web/JsiImageFilterFactory.js +57 -0
  638. package/lib/module/skia/web/JsiImageFilterFactory.js.map +1 -0
  639. package/lib/module/skia/web/{api/JsiSkCanvas.js → JsiSkCanvas.js} +19 -6
  640. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -0
  641. package/lib/module/skia/web/{api/JsiSkColor.js → JsiSkColor.js} +164 -4
  642. package/lib/module/skia/web/JsiSkColor.js.map +1 -0
  643. package/lib/module/skia/web/{api/JsiSkColorFilter.js → JsiSkColorFilter.js} +0 -0
  644. package/lib/module/skia/web/{api/JsiSkColorFilter.js.map → JsiSkColorFilter.js.map} +1 -1
  645. package/lib/module/skia/web/JsiSkColorFilterFactory.js +37 -0
  646. package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -0
  647. package/lib/module/skia/web/JsiSkContourMeasure.js +31 -0
  648. package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -0
  649. package/lib/module/skia/web/JsiSkContourMeasureIter.js +19 -0
  650. package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -0
  651. package/lib/module/skia/web/JsiSkData.js +8 -0
  652. package/lib/module/skia/web/JsiSkData.js.map +1 -0
  653. package/lib/module/skia/web/JsiSkDataFactory.js +33 -0
  654. package/lib/module/skia/web/JsiSkDataFactory.js.map +1 -0
  655. package/lib/module/skia/web/JsiSkFont.js +101 -0
  656. package/lib/module/skia/web/JsiSkFont.js.map +1 -0
  657. package/lib/module/skia/web/JsiSkFontMgr.js +25 -0
  658. package/lib/module/skia/web/JsiSkFontMgr.js.map +1 -0
  659. package/lib/module/skia/web/JsiSkFontMgrFactory.js +14 -0
  660. package/lib/module/skia/web/JsiSkFontMgrFactory.js.map +1 -0
  661. package/lib/module/skia/web/{api/JsiSkImage.js → JsiSkImage.js} +0 -0
  662. package/lib/module/skia/web/{api/JsiSkImage.js.map → JsiSkImage.js.map} +1 -1
  663. package/lib/module/skia/web/JsiSkImageFactory.js +36 -0
  664. package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -0
  665. package/lib/module/skia/web/JsiSkImageFilter.js +8 -0
  666. package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -0
  667. package/lib/module/skia/web/JsiSkMaskFilter.js +8 -0
  668. package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -0
  669. package/lib/module/skia/web/JsiSkMaskFilterFactory.js +13 -0
  670. package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
  671. package/lib/module/skia/web/JsiSkMatrix.js +28 -0
  672. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -0
  673. package/lib/module/skia/web/{api/JsiSkPaint.js → JsiSkPaint.js} +5 -10
  674. package/lib/module/skia/web/JsiSkPaint.js.map +1 -0
  675. package/lib/module/skia/web/JsiSkPath.js +311 -0
  676. package/lib/module/skia/web/JsiSkPath.js.map +1 -0
  677. package/lib/module/skia/web/JsiSkPathEffect.js +8 -0
  678. package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -0
  679. package/lib/module/skia/web/JsiSkPathEffectFactory.js +67 -0
  680. package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -0
  681. package/lib/module/skia/web/JsiSkPathFactory.js +47 -0
  682. package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -0
  683. package/lib/module/skia/web/JsiSkPicture.js +18 -0
  684. package/lib/module/skia/web/JsiSkPicture.js.map +1 -0
  685. package/lib/module/skia/web/JsiSkPictureFactory.js +19 -0
  686. package/lib/module/skia/web/JsiSkPictureFactory.js.map +1 -0
  687. package/lib/module/skia/web/JsiSkPictureRecorder.js +18 -0
  688. package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -0
  689. package/lib/module/skia/web/JsiSkPoint.js +16 -0
  690. package/lib/module/skia/web/JsiSkPoint.js.map +1 -0
  691. package/lib/module/skia/web/JsiSkRRect.js +21 -0
  692. package/lib/module/skia/web/JsiSkRRect.js.map +1 -0
  693. package/lib/module/skia/web/JsiSkRSXform.js +8 -0
  694. package/lib/module/skia/web/JsiSkRSXform.js.map +1 -0
  695. package/lib/module/skia/web/{api/JsiSkRect.js → JsiSkRect.js} +8 -0
  696. package/lib/module/skia/web/JsiSkRect.js.map +1 -0
  697. package/lib/module/skia/web/JsiSkRuntimeEffect.js +33 -0
  698. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -0
  699. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +19 -0
  700. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
  701. package/lib/module/skia/web/JsiSkSVGFactory.js +16 -0
  702. package/lib/module/skia/web/JsiSkSVGFactory.js.map +1 -0
  703. package/lib/module/skia/web/JsiSkShader.js +8 -0
  704. package/lib/module/skia/web/JsiSkShader.js.map +1 -0
  705. package/lib/module/skia/web/JsiSkShaderFactory.js +41 -0
  706. package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -0
  707. package/lib/module/skia/web/{api/JsiSkSurface.js → JsiSkSurface.js} +0 -0
  708. package/lib/module/skia/web/{api/JsiSkSurface.js.map → JsiSkSurface.js.map} +1 -1
  709. package/lib/module/skia/web/{api/JsiSkSurfaceFactory.js → JsiSkSurfaceFactory.js} +0 -0
  710. package/lib/module/skia/web/{api/JsiSkSurfaceFactory.js.map → JsiSkSurfaceFactory.js.map} +1 -1
  711. package/lib/module/skia/web/JsiSkTextBlob.js +8 -0
  712. package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -0
  713. package/lib/module/skia/web/JsiSkTextBlobFactory.js +25 -0
  714. package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -0
  715. package/lib/module/skia/web/JsiSkTypeface.js +18 -0
  716. package/lib/module/skia/web/JsiSkTypeface.js.map +1 -0
  717. package/lib/module/skia/web/JsiSkTypefaceFactory.js +19 -0
  718. package/lib/module/skia/web/JsiSkTypefaceFactory.js.map +1 -0
  719. package/lib/module/skia/web/JsiSkVertices.js +17 -0
  720. package/lib/module/skia/web/JsiSkVertices.js.map +1 -0
  721. package/lib/module/skia/web/JsiSkVerticesFactory.js +16 -0
  722. package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -0
  723. package/lib/module/skia/web/JsiSkia.js +61 -0
  724. package/lib/module/skia/web/JsiSkia.js.map +1 -0
  725. package/lib/module/skia/web/index.js +1 -1
  726. package/lib/module/skia/web/index.js.map +1 -1
  727. package/lib/module/values/web/api.js +2 -2
  728. package/lib/module/values/web/api.js.map +1 -1
  729. package/lib/module/views/SkiaView.web.js +202 -0
  730. package/lib/module/views/SkiaView.web.js.map +1 -0
  731. package/lib/module/views/types.js.map +1 -1
  732. package/lib/module/views/useTouchHandler.js +64 -43
  733. package/lib/module/views/useTouchHandler.js.map +1 -1
  734. package/lib/module/web/index.js +8 -0
  735. package/lib/module/web/index.js.map +1 -0
  736. package/lib/typescript/src/animation/functions/index.d.ts +4 -2
  737. package/lib/typescript/src/animation/functions/interpolatePaths.d.ts +17 -0
  738. package/lib/typescript/src/animation/functions/interpolateVector.d.ts +10 -0
  739. package/lib/typescript/src/index.d.ts +1 -0
  740. package/lib/typescript/src/renderer/Canvas.d.ts +3 -14
  741. package/lib/typescript/src/renderer/DrawingContext.d.ts +3 -3
  742. package/lib/typescript/src/renderer/components/Blend.d.ts +1 -1
  743. package/lib/typescript/src/renderer/components/Group.d.ts +1 -1
  744. package/lib/typescript/src/renderer/components/Paint.d.ts +1 -1
  745. package/lib/typescript/src/renderer/components/Picture.d.ts +1 -1
  746. package/lib/typescript/src/renderer/components/colorFilters/BlendColor.d.ts +2 -2
  747. package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +2 -2
  748. package/lib/typescript/src/renderer/components/image/BoxFit.d.ts +13 -3
  749. package/lib/typescript/src/renderer/components/image/Image.d.ts +1 -1
  750. package/lib/typescript/src/renderer/components/image/ImageSVG.d.ts +1 -1
  751. package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +2 -2
  752. package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +1 -1
  753. package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +1 -1
  754. package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +2 -2
  755. package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +2 -1
  756. package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +1 -1
  757. package/lib/typescript/src/renderer/components/imageFilters/getInput.d.ts +2 -1
  758. package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +1 -1
  759. package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +1 -1
  760. package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +1 -1
  761. package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +1 -1
  762. package/lib/typescript/src/renderer/components/shaders/Color.d.ts +1 -1
  763. package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +4 -4
  764. package/lib/typescript/src/renderer/components/shaders/LinearGradient.d.ts +2 -1
  765. package/lib/typescript/src/renderer/components/shaders/RadialGradient.d.ts +2 -1
  766. package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +2 -9
  767. package/lib/typescript/src/renderer/components/shaders/SweepGradient.d.ts +2 -1
  768. package/lib/typescript/src/renderer/components/shaders/TwoPointConicalGradient.d.ts +2 -1
  769. package/lib/typescript/src/renderer/components/shapes/Box.d.ts +1 -1
  770. package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +4 -1
  771. package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +1 -1
  772. package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +1 -1
  773. package/lib/typescript/src/renderer/components/shapes/Line.d.ts +2 -1
  774. package/lib/typescript/src/renderer/components/shapes/Patch.d.ts +3 -3
  775. package/lib/typescript/src/renderer/components/shapes/Path.d.ts +1 -1
  776. package/lib/typescript/src/renderer/components/shapes/Points.d.ts +2 -2
  777. package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +2 -2
  778. package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +1 -1
  779. package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +1 -1
  780. package/lib/typescript/src/renderer/components/text/TextPath.d.ts +1 -1
  781. package/lib/typescript/src/renderer/index.d.ts +1 -1
  782. package/lib/typescript/src/renderer/nodes/Declaration.d.ts +1 -1
  783. package/lib/typescript/src/renderer/nodes/Node.d.ts +1 -1
  784. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +0 -2
  785. package/lib/typescript/src/renderer/processors/Circles.d.ts +2 -2
  786. package/lib/typescript/src/renderer/processors/Clips.d.ts +2 -2
  787. package/lib/typescript/src/{skia/core → renderer/processors}/Color.d.ts +2 -2
  788. package/lib/typescript/src/renderer/processors/Font.d.ts +2 -2
  789. package/lib/typescript/src/renderer/processors/Paint.d.ts +3 -3
  790. package/lib/typescript/src/renderer/processors/Paths.d.ts +2 -2
  791. package/lib/typescript/src/renderer/processors/Radius.d.ts +2 -2
  792. package/lib/typescript/src/renderer/processors/Rects.d.ts +3 -14
  793. package/lib/typescript/src/renderer/processors/Transform.d.ts +3 -4
  794. package/lib/typescript/src/renderer/processors/index.d.ts +2 -1
  795. package/lib/typescript/src/renderer/processors/math/Coordinates.d.ts +1 -1
  796. package/lib/typescript/src/renderer/processors/math/Transforms.d.ts +1 -1
  797. package/lib/typescript/src/renderer/processors/math/index.d.ts +0 -2
  798. package/lib/typescript/src/renderer/useCanvas.d.ts +14 -0
  799. package/lib/typescript/src/skia/Skia.web.d.ts +1 -0
  800. package/lib/typescript/src/skia/core/Data.d.ts +4 -4
  801. package/lib/typescript/src/skia/core/Matrix.d.ts +2 -0
  802. package/lib/typescript/src/skia/core/Paint.d.ts +0 -1
  803. package/lib/typescript/src/skia/core/RRect.d.ts +2 -0
  804. package/lib/typescript/src/skia/core/Rect.d.ts +8 -0
  805. package/lib/typescript/src/skia/core/Vector.d.ts +12 -0
  806. package/lib/typescript/src/skia/core/index.d.ts +5 -3
  807. package/lib/typescript/src/skia/types/ContourMeasure.d.ts +2 -4
  808. package/lib/typescript/src/skia/types/Data/Data.d.ts +1 -1
  809. package/lib/typescript/src/skia/types/Data/DataFactory.d.ts +4 -4
  810. package/lib/typescript/src/skia/types/Font/Font.d.ts +8 -9
  811. package/lib/typescript/src/skia/types/FontMgr/FontMgr.d.ts +1 -1
  812. package/lib/typescript/src/skia/types/FontMgr/FontMgrFactory.d.ts +2 -2
  813. package/lib/typescript/src/skia/types/Image/ImageFactory.d.ts +3 -3
  814. package/lib/typescript/src/skia/types/Matrix.d.ts +15 -14
  815. package/lib/typescript/src/skia/types/Path/Path.d.ts +29 -23
  816. package/lib/typescript/src/skia/types/Path/PathFactory.d.ts +5 -0
  817. package/lib/typescript/src/skia/types/Picture/Picture.d.ts +2 -2
  818. package/lib/typescript/src/skia/types/Point.d.ts +1 -0
  819. package/lib/typescript/src/skia/types/RRect.d.ts +1 -0
  820. package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffect.d.ts +5 -6
  821. package/lib/typescript/src/skia/types/SVG/SVGFactory.d.ts +2 -2
  822. package/lib/typescript/src/skia/types/Shader/Shader.d.ts +8 -0
  823. package/lib/typescript/src/skia/types/Skia.d.ts +1 -1
  824. package/lib/typescript/src/skia/types/Typeface/TypefaceFactory.d.ts +2 -2
  825. package/lib/typescript/src/skia/web/{api/Host.d.ts → Host.d.ts} +4 -1
  826. package/lib/typescript/src/skia/web/JsiImageFilterFactory.d.ts +19 -0
  827. package/lib/typescript/src/skia/web/{api/JsiSkCanvas.d.ts → JsiSkCanvas.d.ts} +1 -1
  828. package/lib/typescript/src/skia/web/JsiSkColor.d.ts +2 -0
  829. package/lib/typescript/src/skia/web/{api/JsiSkColorFilter.d.ts → JsiSkColorFilter.d.ts} +1 -1
  830. package/lib/typescript/src/skia/web/JsiSkColorFilterFactory.d.ts +14 -0
  831. package/lib/typescript/src/skia/web/JsiSkContourMeasure.d.ts +16 -0
  832. package/lib/typescript/src/skia/web/JsiSkContourMeasureIter.d.ts +8 -0
  833. package/lib/typescript/src/skia/web/JsiSkData.d.ts +8 -0
  834. package/lib/typescript/src/skia/web/JsiSkDataFactory.d.ts +19 -0
  835. package/lib/typescript/src/skia/web/JsiSkFont.d.ts +33 -0
  836. package/lib/typescript/src/skia/web/JsiSkFontMgr.d.ts +9 -0
  837. package/lib/typescript/src/skia/web/JsiSkFontMgrFactory.d.ts +8 -0
  838. package/lib/typescript/src/skia/web/{api/JsiSkImage.d.ts → JsiSkImage.d.ts} +1 -1
  839. package/lib/typescript/src/skia/web/JsiSkImageFactory.d.ts +10 -0
  840. package/lib/typescript/src/skia/web/JsiSkImageFilter.d.ts +6 -0
  841. package/lib/typescript/src/skia/web/JsiSkMaskFilter.d.ts +6 -0
  842. package/lib/typescript/src/skia/web/JsiSkMaskFilterFactory.d.ts +9 -0
  843. package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +11 -0
  844. package/lib/typescript/src/skia/web/{api/JsiSkPaint.d.ts → JsiSkPaint.d.ts} +1 -1
  845. package/lib/typescript/src/skia/web/JsiSkPath.d.ts +56 -0
  846. package/lib/typescript/src/skia/web/JsiSkPathEffect.d.ts +6 -0
  847. package/lib/typescript/src/skia/web/JsiSkPathEffectFactory.d.ts +15 -0
  848. package/lib/typescript/src/skia/web/JsiSkPathFactory.d.ts +13 -0
  849. package/lib/typescript/src/skia/web/JsiSkPicture.d.ts +9 -0
  850. package/lib/typescript/src/skia/web/JsiSkPictureFactory.d.ts +8 -0
  851. package/lib/typescript/src/skia/web/JsiSkPictureRecorder.d.ts +11 -0
  852. package/lib/typescript/src/skia/web/JsiSkPoint.d.ts +8 -0
  853. package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +10 -0
  854. package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +8 -0
  855. package/lib/typescript/src/skia/web/{api/JsiSkRect.d.ts → JsiSkRect.d.ts} +2 -1
  856. package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +14 -0
  857. package/lib/typescript/src/skia/web/JsiSkRuntimeEffectFactory.d.ts +8 -0
  858. package/lib/typescript/src/skia/web/JsiSkSVGFactory.d.ts +9 -0
  859. package/lib/typescript/src/skia/web/JsiSkShader.d.ts +6 -0
  860. package/lib/typescript/src/skia/web/JsiSkShaderFactory.d.ts +16 -0
  861. package/lib/typescript/src/skia/web/{api/JsiSkSurface.d.ts → JsiSkSurface.d.ts} +1 -1
  862. package/lib/typescript/src/skia/web/{api/JsiSkSurfaceFactory.d.ts → JsiSkSurfaceFactory.d.ts} +1 -1
  863. package/lib/typescript/src/skia/web/JsiSkTextBlob.d.ts +6 -0
  864. package/lib/typescript/src/skia/web/JsiSkTextBlobFactory.d.ts +12 -0
  865. package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +8 -0
  866. package/lib/typescript/src/skia/web/JsiSkTypefaceFactory.d.ts +8 -0
  867. package/lib/typescript/src/skia/web/JsiSkVertices.d.ts +9 -0
  868. package/lib/typescript/src/skia/web/JsiSkVerticesFactory.d.ts +4 -0
  869. package/lib/typescript/src/skia/web/JsiSkia.d.ts +3 -0
  870. package/lib/typescript/src/skia/web/index.d.ts +1 -1
  871. package/lib/typescript/src/views/SkiaView.web.d.ts +56 -0
  872. package/lib/typescript/src/views/types.d.ts +1 -0
  873. package/lib/typescript/src/views/useTouchHandler.d.ts +11 -1
  874. package/lib/typescript/src/web/index.d.ts +5 -0
  875. package/libs/android/arm64-v8a/libskia.a +0 -0
  876. package/libs/android/arm64-v8a/libsvg.a +0 -0
  877. package/libs/android/armeabi-v7a/libskia.a +0 -0
  878. package/libs/android/armeabi-v7a/libsvg.a +0 -0
  879. package/libs/android/x86/libskia.a +0 -0
  880. package/libs/android/x86/libsvg.a +0 -0
  881. package/libs/android/x86_64/libskia.a +0 -0
  882. package/libs/android/x86_64/libsvg.a +0 -0
  883. package/libs/ios/libskia.xcframework/Info.plist +5 -5
  884. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  885. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  886. package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
  887. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  888. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  889. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  890. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  891. package/package.json +5 -6
  892. package/src/animation/functions/index.ts +4 -2
  893. package/src/animation/functions/interpolatePaths.ts +38 -0
  894. package/src/animation/functions/interpolateVector.ts +26 -0
  895. package/src/index.ts +1 -0
  896. package/src/renderer/Canvas.tsx +13 -35
  897. package/src/renderer/DrawingContext.ts +3 -4
  898. package/src/renderer/HostConfig.ts +2 -2
  899. package/src/renderer/components/Blend.tsx +12 -10
  900. package/src/renderer/components/Compose.tsx +2 -2
  901. package/src/renderer/components/Group.tsx +11 -6
  902. package/src/renderer/components/Mask.tsx +5 -3
  903. package/src/renderer/components/Paint.tsx +5 -4
  904. package/src/renderer/components/Picture.tsx +1 -1
  905. package/src/renderer/components/backdrop/BackdropFilter.tsx +1 -1
  906. package/src/renderer/components/colorFilters/BlendColor.tsx +4 -4
  907. package/src/renderer/components/colorFilters/Compose.ts +3 -2
  908. package/src/renderer/components/colorFilters/Lerp.tsx +3 -2
  909. package/src/renderer/components/colorFilters/LinearToSRGBGamma.tsx +2 -3
  910. package/src/renderer/components/colorFilters/LumaColorFilter.tsx +2 -3
  911. package/src/renderer/components/colorFilters/Matrix.tsx +2 -3
  912. package/src/renderer/components/colorFilters/SRGBToLinearGamma.tsx +2 -3
  913. package/src/renderer/components/image/BoxFit.ts +7 -13
  914. package/src/renderer/components/image/Image.tsx +3 -3
  915. package/src/renderer/components/image/ImageSVG.tsx +3 -3
  916. package/src/renderer/components/image/ImageShader.tsx +8 -7
  917. package/src/renderer/components/imageFilters/Blur.tsx +12 -10
  918. package/src/renderer/components/imageFilters/DisplacementMap.tsx +4 -4
  919. package/src/renderer/components/imageFilters/InnerShadow.tsx +4 -3
  920. package/src/renderer/components/imageFilters/Morphology.tsx +3 -4
  921. package/src/renderer/components/imageFilters/Offset.tsx +5 -4
  922. package/src/renderer/components/imageFilters/RuntimeShader.tsx +12 -4
  923. package/src/renderer/components/imageFilters/Shadow.tsx +10 -6
  924. package/src/renderer/components/imageFilters/getInput.ts +3 -2
  925. package/src/renderer/components/maskFilters/Blur.tsx +2 -2
  926. package/src/renderer/components/pathEffects/Corner.tsx +2 -2
  927. package/src/renderer/components/pathEffects/Dash.tsx +2 -2
  928. package/src/renderer/components/pathEffects/Discrete.tsx +2 -2
  929. package/src/renderer/components/pathEffects/Line2D.tsx +3 -3
  930. package/src/renderer/components/pathEffects/Path1D.tsx +3 -3
  931. package/src/renderer/components/pathEffects/Path2D.tsx +4 -4
  932. package/src/renderer/components/pathEffects/Sum.tsx +7 -5
  933. package/src/renderer/components/shaders/Color.tsx +7 -5
  934. package/src/renderer/components/shaders/FractalNoise.tsx +1 -2
  935. package/src/renderer/components/shaders/Gradient.ts +7 -10
  936. package/src/renderer/components/shaders/LinearGradient.tsx +4 -4
  937. package/src/renderer/components/shaders/RadialGradient.tsx +4 -4
  938. package/src/renderer/components/shaders/Shader.tsx +6 -58
  939. package/src/renderer/components/shaders/SweepGradient.tsx +4 -4
  940. package/src/renderer/components/shaders/Turbulence.tsx +1 -2
  941. package/src/renderer/components/shaders/TwoPointConicalGradient.tsx +4 -4
  942. package/src/renderer/components/shapes/Box.tsx +36 -17
  943. package/src/renderer/components/shapes/Circle.tsx +3 -4
  944. package/src/renderer/components/shapes/DiffRect.tsx +1 -1
  945. package/src/renderer/components/shapes/FitBox.tsx +1 -1
  946. package/src/renderer/components/shapes/Line.tsx +2 -1
  947. package/src/renderer/components/shapes/Oval.tsx +6 -4
  948. package/src/renderer/components/shapes/Patch.tsx +6 -10
  949. package/src/renderer/components/shapes/Path.tsx +3 -3
  950. package/src/renderer/components/shapes/Points.tsx +2 -2
  951. package/src/renderer/components/shapes/Rect.tsx +6 -4
  952. package/src/renderer/components/shapes/RoundedRect.tsx +2 -2
  953. package/src/renderer/components/shapes/Vertices.tsx +5 -4
  954. package/src/renderer/components/text/Glyphs.tsx +6 -3
  955. package/src/renderer/components/text/Text.tsx +2 -2
  956. package/src/renderer/components/text/TextBlob.tsx +1 -1
  957. package/src/renderer/components/text/TextPath.tsx +3 -4
  958. package/src/renderer/index.ts +1 -1
  959. package/src/renderer/nodes/Declaration.tsx +1 -1
  960. package/src/renderer/nodes/Drawing.tsx +3 -2
  961. package/src/renderer/nodes/Node.ts +1 -1
  962. package/src/renderer/processors/Animations/Animations.ts +0 -3
  963. package/src/renderer/processors/Circles.ts +4 -4
  964. package/src/renderer/processors/Clips.ts +9 -4
  965. package/src/{skia/core → renderer/processors}/Color.ts +2 -3
  966. package/src/renderer/processors/Font.ts +10 -3
  967. package/src/renderer/processors/Paint.ts +12 -7
  968. package/src/renderer/processors/Paths.ts +3 -3
  969. package/src/renderer/processors/Radius.ts +3 -4
  970. package/src/renderer/processors/Rects.ts +10 -45
  971. package/src/renderer/processors/Transform.ts +28 -19
  972. package/src/renderer/processors/index.ts +2 -1
  973. package/src/renderer/processors/math/Coordinates.ts +1 -1
  974. package/src/renderer/processors/math/Transforms.ts +2 -1
  975. package/src/renderer/processors/math/index.ts +0 -2
  976. package/src/renderer/useCanvas.ts +21 -0
  977. package/src/skia/NativeSetup.ts +2 -2
  978. package/src/skia/Skia.web.ts +3 -0
  979. package/src/skia/core/Data.ts +17 -14
  980. package/src/skia/core/Font.ts +2 -4
  981. package/src/skia/core/Matrix.ts +6 -0
  982. package/src/skia/core/Paint.ts +2 -6
  983. package/src/skia/core/Path.ts +14 -6
  984. package/src/skia/core/RRect.tsx +5 -0
  985. package/src/skia/core/Rect.ts +33 -0
  986. package/src/skia/core/Vector.ts +11 -0
  987. package/src/skia/core/index.ts +5 -3
  988. package/src/skia/types/ContourMeasure.tsx +2 -4
  989. package/src/skia/types/Data/Data.ts +1 -1
  990. package/src/skia/types/Data/DataFactory.ts +4 -4
  991. package/src/skia/types/Font/Font.ts +9 -14
  992. package/src/skia/types/FontMgr/FontMgr.ts +1 -1
  993. package/src/skia/types/FontMgr/FontMgrFactory.ts +2 -2
  994. package/src/skia/types/Image/ImageFactory.ts +3 -3
  995. package/src/skia/types/Matrix.ts +79 -14
  996. package/src/skia/types/Path/Path.ts +34 -23
  997. package/src/skia/types/Path/PathFactory.ts +7 -0
  998. package/src/skia/types/Picture/Picture.ts +2 -2
  999. package/src/skia/types/Point.ts +2 -0
  1000. package/src/skia/types/RRect.ts +5 -0
  1001. package/src/skia/types/RuntimeEffect/RuntimeEffect.ts +5 -10
  1002. package/src/skia/types/SVG/SVGFactory.ts +2 -2
  1003. package/src/skia/types/Shader/Shader.ts +61 -0
  1004. package/src/skia/types/Skia.ts +1 -1
  1005. package/src/skia/types/Typeface/TypefaceFactory.ts +2 -2
  1006. package/src/skia/web/{api/Host.ts → Host.ts} +7 -1
  1007. package/src/skia/web/JsiImageFilterFactory.ts +144 -0
  1008. package/src/skia/web/{api/JsiSkCanvas.ts → JsiSkCanvas.ts} +19 -11
  1009. package/src/skia/web/{api/JsiSkColor.ts → JsiSkColor.ts} +152 -6
  1010. package/src/skia/web/{api/JsiSkColorFilter.ts → JsiSkColorFilter.ts} +1 -1
  1011. package/src/skia/web/JsiSkColorFilterFactory.ts +67 -0
  1012. package/src/skia/web/JsiSkContourMeasure.ts +35 -0
  1013. package/src/skia/web/JsiSkContourMeasureIter.ts +23 -0
  1014. package/src/skia/web/JsiSkData.ts +13 -0
  1015. package/src/skia/web/JsiSkDataFactory.ts +35 -0
  1016. package/src/skia/web/JsiSkFont.ts +128 -0
  1017. package/src/skia/web/JsiSkFontMgr.ts +42 -0
  1018. package/src/skia/web/JsiSkFontMgrFactory.ts +18 -0
  1019. package/src/skia/web/{api/JsiSkImage.ts → JsiSkImage.ts} +1 -1
  1020. package/src/skia/web/JsiSkImageFactory.ts +40 -0
  1021. package/src/skia/web/JsiSkImageFilter.ts +14 -0
  1022. package/src/skia/web/JsiSkMaskFilter.ts +14 -0
  1023. package/src/skia/web/JsiSkMaskFilterFactory.ts +20 -0
  1024. package/src/skia/web/JsiSkMatrix.ts +54 -0
  1025. package/src/skia/web/{api/JsiSkPaint.ts → JsiSkPaint.ts} +6 -5
  1026. package/src/skia/web/JsiSkPath.ts +369 -0
  1027. package/src/skia/web/JsiSkPathEffect.ts +14 -0
  1028. package/src/skia/web/JsiSkPathEffectFactory.ts +85 -0
  1029. package/src/skia/web/JsiSkPathFactory.ts +54 -0
  1030. package/src/skia/web/JsiSkPicture.ts +45 -0
  1031. package/src/skia/web/JsiSkPictureFactory.ts +20 -0
  1032. package/src/skia/web/JsiSkPictureRecorder.ts +31 -0
  1033. package/src/skia/web/JsiSkPoint.ts +19 -0
  1034. package/src/skia/web/JsiSkRRect.ts +27 -0
  1035. package/src/skia/web/JsiSkRSXform.ts +16 -0
  1036. package/src/skia/web/{api/JsiSkRect.ts → JsiSkRect.ts} +11 -1
  1037. package/src/skia/web/JsiSkRuntimeEffect.ts +57 -0
  1038. package/src/skia/web/JsiSkRuntimeEffectFactory.ts +23 -0
  1039. package/src/skia/web/JsiSkSVGFactory.ts +20 -0
  1040. package/src/skia/web/JsiSkShader.ts +14 -0
  1041. package/src/skia/web/JsiSkShaderFactory.ts +178 -0
  1042. package/src/skia/web/{api/JsiSkSurface.ts → JsiSkSurface.ts} +1 -1
  1043. package/src/skia/web/{api/JsiSkSurfaceFactory.ts → JsiSkSurfaceFactory.ts} +1 -1
  1044. package/src/skia/web/JsiSkTextBlob.ts +14 -0
  1045. package/src/skia/web/JsiSkTextBlobFactory.ts +49 -0
  1046. package/src/skia/web/JsiSkTypeface.ts +28 -0
  1047. package/src/skia/web/JsiSkTypefaceFactory.tsx +20 -0
  1048. package/src/skia/web/JsiSkVertices.ts +23 -0
  1049. package/src/skia/web/JsiSkVerticesFactory.ts +27 -0
  1050. package/src/skia/web/JsiSkia.ts +98 -0
  1051. package/src/skia/web/index.ts +1 -1
  1052. package/src/values/web/api.ts +2 -2
  1053. package/src/views/SkiaView.web.tsx +192 -0
  1054. package/src/views/types.ts +1 -0
  1055. package/src/views/useTouchHandler.ts +82 -51
  1056. package/src/web/index.ts +13 -0
  1057. package/cpp/skia/include/core/SkCustomMesh.h +0 -202
  1058. package/cpp/skia/include/core/SkStringView.h +0 -185
  1059. package/cpp/skia/include/private/SkPaintParamsKey.h +0 -110
  1060. package/cpp/skia/include/private/SkShaderCodeDictionary.h +0 -63
  1061. package/cpp/skia/include/private/SkTOptional.h +0 -362
  1062. package/lib/commonjs/renderer/processors/math/Matrix3.js +0 -66
  1063. package/lib/commonjs/renderer/processors/math/Matrix3.js.map +0 -1
  1064. package/lib/commonjs/renderer/processors/math/Vector.js +0 -60
  1065. package/lib/commonjs/renderer/processors/math/Vector.js.map +0 -1
  1066. package/lib/commonjs/skia/core/Color.js.map +0 -1
  1067. package/lib/commonjs/skia/core/Shader.js +0 -18
  1068. package/lib/commonjs/skia/core/Shader.js.map +0 -1
  1069. package/lib/commonjs/skia/web/api/Host.js.map +0 -1
  1070. package/lib/commonjs/skia/web/api/JsiSkCanvas.js.map +0 -1
  1071. package/lib/commonjs/skia/web/api/JsiSkColor.js.map +0 -1
  1072. package/lib/commonjs/skia/web/api/JsiSkPaint.js.map +0 -1
  1073. package/lib/commonjs/skia/web/api/JsiSkRect.js.map +0 -1
  1074. package/lib/commonjs/skia/web/api/index.js +0 -26
  1075. package/lib/commonjs/skia/web/api/index.js.map +0 -1
  1076. package/lib/module/renderer/processors/math/Matrix3.js +0 -55
  1077. package/lib/module/renderer/processors/math/Matrix3.js.map +0 -1
  1078. package/lib/module/renderer/processors/math/Vector.js.map +0 -1
  1079. package/lib/module/skia/core/Color.js.map +0 -1
  1080. package/lib/module/skia/core/Shader.js +0 -7
  1081. package/lib/module/skia/core/Shader.js.map +0 -1
  1082. package/lib/module/skia/web/api/Host.js.map +0 -1
  1083. package/lib/module/skia/web/api/JsiSkCanvas.js.map +0 -1
  1084. package/lib/module/skia/web/api/JsiSkColor.js.map +0 -1
  1085. package/lib/module/skia/web/api/JsiSkPaint.js.map +0 -1
  1086. package/lib/module/skia/web/api/JsiSkRect.js.map +0 -1
  1087. package/lib/module/skia/web/api/index.js +0 -13
  1088. package/lib/module/skia/web/api/index.js.map +0 -1
  1089. package/lib/typescript/src/renderer/processors/math/Matrix3.d.ts +0 -10
  1090. package/lib/typescript/src/renderer/processors/math/Vector.d.ts +0 -23
  1091. package/lib/typescript/src/skia/core/Shader.d.ts +0 -1
  1092. package/lib/typescript/src/skia/web/api/JsiSkColor.d.ts +0 -3
  1093. package/lib/typescript/src/skia/web/api/index.d.ts +0 -10
  1094. package/src/animation/timing/functions/__tests__/timing.spec.ts +0 -29
  1095. package/src/renderer/processors/math/Matrix3.ts +0 -73
  1096. package/src/renderer/processors/math/Vector.ts +0 -38
  1097. package/src/skia/__tests__/Rects.spec.ts +0 -40
  1098. package/src/skia/__tests__/snapshots/lightblue-rect.png +0 -0
  1099. package/src/skia/core/Shader.ts +0 -9
  1100. package/src/skia/web/api/index.ts +0 -15
  1101. package/src/values/web/__tests__/RNSkAnimation.spec.ts +0 -21
  1102. package/src/values/web/__tests__/RNSkDerivedValue.spec.ts +0 -15
  1103. package/src/values/web/__tests__/RNSkReadonlyValue.spec.ts +0 -8
  1104. package/src/values/web/__tests__/RNSkValue.spec.ts +0 -11
@@ -1,19 +1,19 @@
1
- import type { Data } from "./Data";
1
+ import type { SkData } from "./Data";
2
2
 
3
3
  export interface DataFactory {
4
4
  /**
5
5
  * Creates a new Data object from an Uri, either locally or remotely.
6
6
  * @param uri Uri to a valid resource
7
7
  */
8
- fromURI(uri: string): Promise<Data>;
8
+ fromURI(uri: string): Promise<SkData>;
9
9
  /**
10
10
  * Creates a new Data object from a byte array.
11
11
  * @param bytes An array of bytes representing the data
12
12
  */
13
- fromBytes(bytes: Uint8Array): Data;
13
+ fromBytes(bytes: Uint8Array): SkData;
14
14
  /**
15
15
  * Creates a new Data object from a base64 encoded string.
16
16
  * @param base64 A Base64 encoded string representing the data
17
17
  */
18
- fromBase64(base64: string): Data;
18
+ fromBase64(base64: string): SkData;
19
19
  }
@@ -12,6 +12,15 @@ export interface FontMetrics {
12
12
  }
13
13
 
14
14
  export interface SkFont extends SkJSIInstance<"Font"> {
15
+ /**
16
+ * Retrieves the advanceX measurements for each glyph.
17
+ * If paint is not null, its stroking, PathEffect, and MaskFilter fields are respected.
18
+ * One width per glyph is returned in the returned array.
19
+ * @param glyphs
20
+ * @param paint
21
+ */
22
+ getGlyphWidths(glyphs: number[], paint?: SkPaint): number[];
23
+
15
24
  /** Returns the advance width of text.
16
25
  The advance is the normal distance to move before drawing additional text.
17
26
  Returns the bounding box of text if bounds is not nullptr. The paint
@@ -39,20 +48,6 @@ export interface SkFont extends SkJSIInstance<"Font"> {
39
48
  */
40
49
  getGlyphIDs(str: string, numCodePoints?: number): number[];
41
50
 
42
- /**
43
- * Retrieves the advanceX measurements for each glyph.
44
- * If paint is not null, its stroking, PathEffect, and MaskFilter fields are respected.
45
- * One width per glyph is returned in the returned array.
46
- * @param glyphs
47
- * @param paint
48
- * @param output - if provided, the results will be copied into this array.
49
- */
50
- getGlyphWidths(
51
- glyphs: number[],
52
- paint?: SkPaint | null,
53
- output?: Float32Array
54
- ): Float32Array;
55
-
56
51
  /**
57
52
  * Computes any intersections of a thick "line" and a run of positionsed glyphs.
58
53
  * The thick line is represented as a top and bottom coordinate (positive for
@@ -2,7 +2,7 @@ import type { SkJSIInstance } from "../JsiInstance";
2
2
  import type { FontStyle } from "../Font/Font";
3
3
  import type { SkTypeface } from "../Typeface";
4
4
 
5
- export interface FontMgr extends SkJSIInstance<"FontMgr"> {
5
+ export interface SkFontMgr extends SkJSIInstance<"FontMgr"> {
6
6
  /**
7
7
  * Return the number of font families loaded in this manager. Useful for debugging.
8
8
  */
@@ -1,9 +1,9 @@
1
- import type { FontMgr } from "./FontMgr";
1
+ import type { SkFontMgr } from "./FontMgr";
2
2
 
3
3
  // Commented code below is the CanvasKit reference
4
4
  export interface FontMgrFactory {
5
5
  // FromData: (...data: Data[]) => FontMgr | null;
6
- RefDefault: () => FontMgr;
6
+ RefDefault: () => SkFontMgr;
7
7
  }
8
8
 
9
9
  //const fontMgrFactory = (data: Data[]) => Skia.FontMgr.FromData(...data);
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable camelcase */
2
- import type { Data } from "../Data";
2
+ import type { SkData } from "../Data";
3
3
 
4
4
  import type { SkImage } from "./Image";
5
5
 
@@ -62,7 +62,7 @@ export interface ImageFactory {
62
62
  * @returns If the encoded format is not supported, or subset is outside of the bounds of the decoded
63
63
  * image, nullptr is returned.
64
64
  */
65
- MakeImageFromEncoded: (encoded: Data) => SkImage | null;
65
+ MakeImageFromEncoded: (encoded: SkData) => SkImage | null;
66
66
 
67
67
  /**
68
68
  * Returns an image with the given pixel data and format.
@@ -74,5 +74,5 @@ export interface ImageFactory {
74
74
  * @param data - bytes representing the pixel data.
75
75
  * @param bytesPerRow
76
76
  */
77
- MakeImage(info: ImageInfo, data: Data, bytesPerRow: number): SkImage | null;
77
+ MakeImage(info: ImageInfo, data: SkData, bytesPerRow: number): SkImage | null;
78
78
  }
@@ -12,19 +12,84 @@ export enum MatrixIndex {
12
12
  }
13
13
 
14
14
  export interface SkMatrix extends SkJSIInstance<"Matrix"> {
15
- 0: number;
16
- 1: number;
17
- 2: number;
18
- 3: number;
19
- 4: number;
20
- 5: number;
21
- 6: number;
22
- 7: number;
23
- 8: number;
15
+ concat: (matrix: SkMatrix) => void;
16
+ translate: (x: number, y: number) => void;
17
+ scale: (x: number, y?: number) => void;
18
+ skew: (x: number, y: number) => void;
19
+ rotate: (theta: number) => void;
20
+ }
21
+
22
+ type Transform2dName =
23
+ | "translateX"
24
+ | "translateY"
25
+ | "scale"
26
+ | "skewX"
27
+ | "skewY"
28
+ | "scaleX"
29
+ | "scaleY"
30
+ | "rotateZ"
31
+ | "rotate";
32
+
33
+ type Transformations = {
34
+ readonly [Name in Transform2dName]: number;
35
+ };
24
36
 
25
- preConcat: (matrix: SkMatrix) => void;
26
- preTranslate: (x: number, y: number) => void;
27
- preScale: (x: number, y: number) => void;
28
- preSkew: (x: number, y: number) => void;
29
- preRotate: (theta: number) => void;
37
+ export type Transforms2d = readonly (
38
+ | Pick<Transformations, "translateX">
39
+ | Pick<Transformations, "translateY">
40
+ | Pick<Transformations, "scale">
41
+ | Pick<Transformations, "scaleX">
42
+ | Pick<Transformations, "scaleY">
43
+ | Pick<Transformations, "skewX">
44
+ | Pick<Transformations, "skewY">
45
+ | Pick<Transformations, "rotate">
46
+ )[];
47
+
48
+ export interface TransformProp {
49
+ transform?: Transforms2d;
30
50
  }
51
+
52
+ export const processTransform = (m: SkMatrix, transforms: Transforms2d) => {
53
+ for (const transform of transforms) {
54
+ const key = Object.keys(transform)[0] as Transform2dName;
55
+ const value = (transform as Pick<Transformations, typeof key>)[key];
56
+ if (key === "translateX") {
57
+ m.translate(value, 0);
58
+ continue;
59
+ }
60
+ if (key === "translateY") {
61
+ m.translate(0, value);
62
+ continue;
63
+ }
64
+ if (key === "scale") {
65
+ m.scale(value, value);
66
+ continue;
67
+ }
68
+ if (key === "scaleX") {
69
+ m.scale(value, 1);
70
+ continue;
71
+ }
72
+ if (key === "scaleY") {
73
+ m.scale(1, value);
74
+ continue;
75
+ }
76
+ if (key === "skewX") {
77
+ m.skew(value, 0);
78
+ continue;
79
+ }
80
+ if (key === "skewY") {
81
+ m.skew(0, value);
82
+ continue;
83
+ }
84
+ if (key === "rotate" || key === "rotateZ") {
85
+ m.rotate(value);
86
+ continue;
87
+ }
88
+ exhaustiveCheck(key);
89
+ }
90
+ return m;
91
+ };
92
+
93
+ const exhaustiveCheck = (a: never): never => {
94
+ throw new Error(`Unknown transformation: ${a}`);
95
+ };
@@ -1,4 +1,3 @@
1
- import type { SkFont } from "../Font";
2
1
  import type { SkRect } from "../Rect";
3
2
  import type { SkPoint } from "../Point";
4
3
  import type { SkRRect } from "../RRect";
@@ -45,6 +44,7 @@ export enum PathVerb {
45
44
  Conic,
46
45
  Cubic,
47
46
  Close,
47
+ Done,
48
48
  }
49
49
 
50
50
  export type PathCommand = number[];
@@ -78,7 +78,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
78
78
  * @param isCCW - if the path should be drawn counter-clockwise or not
79
79
  * @param startIndex - index of initial point of ellipse
80
80
  */
81
- addOval(oval: SkRect, isCCW?: boolean, startIndex?: number): void;
81
+ addOval(oval: SkRect, isCCW?: boolean, startIndex?: number): SkPath;
82
82
 
83
83
  /**
84
84
  * Returns the number of points in this path. Initially zero.
@@ -94,7 +94,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
94
94
  * @param points
95
95
  * @param close - if true, will add a line connecting last point to the first point.
96
96
  */
97
- addPoly(points: SkPoint[], close: boolean): void;
97
+ addPoly(points: SkPoint[], close: boolean): SkPath;
98
98
 
99
99
  /** Adds beginning of contour at SkPoint (x, y).
100
100
 
@@ -104,7 +104,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
104
104
 
105
105
  example: https://fiddle.skia.org/c/@Path_moveTo
106
106
  */
107
- moveTo(x: number, y: number): void;
107
+ moveTo(x: number, y: number): SkPath;
108
108
  /** Adds line from last point to (x, y). If SkPath is empty, or last SkPath::Verb is
109
109
  kClose_Verb, last point is set to (0, 0) before adding line.
110
110
 
@@ -117,7 +117,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
117
117
 
118
118
  example: https://fiddle.skia.org/c/@Path_lineTo
119
119
  */
120
- lineTo(x: number, y: number): void;
120
+ lineTo(x: number, y: number): SkPath;
121
121
 
122
122
  /**
123
123
  * Returns a new path that covers the same area as the original path, but with the
@@ -132,7 +132,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
132
132
  * @param dx
133
133
  * @param dy
134
134
  */
135
- offset(dx: number, dy: number): void;
135
+ offset(dx: number, dy: number): SkPath;
136
136
 
137
137
  /**
138
138
  * Relative version of arcToRotated.
@@ -152,7 +152,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
152
152
  isCCW: boolean,
153
153
  dx: number,
154
154
  dy: number
155
- ): void;
155
+ ): SkPath;
156
156
 
157
157
  /**
158
158
  * Relative version of conicTo.
@@ -162,7 +162,13 @@ export interface SkPath extends SkJSIInstance<"Path"> {
162
162
  * @param dy2
163
163
  * @param w
164
164
  */
165
- rConicTo(dx1: number, dy1: number, dx2: number, dy2: number, w: number): void;
165
+ rConicTo(
166
+ dx1: number,
167
+ dy1: number,
168
+ dx2: number,
169
+ dy2: number,
170
+ w: number
171
+ ): SkPath;
166
172
 
167
173
  /**
168
174
  * Relative version of cubicTo.
@@ -180,7 +186,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
180
186
  cpy2: number,
181
187
  x: number,
182
188
  y: number
183
- ): void;
189
+ ): SkPath;
184
190
 
185
191
  /**
186
192
  * Relative version of moveTo.
@@ -225,8 +231,9 @@ export interface SkPath extends SkJSIInstance<"Path"> {
225
231
  * Turns this path into the filled equivalent of the stroked path. Returns false if the operation
226
232
  * fails (e.g. the path is a hairline).
227
233
  * @param opts - describe how stroked path should look.
234
+ * If such a transformation cannot be done, null is returned.
228
235
  */
229
- stroke(opts?: StrokeOpts): boolean;
236
+ stroke(opts?: StrokeOpts): null | SkPath;
230
237
 
231
238
  /**
232
239
  * Appends CLOSE_VERB to Path. A closed contour connects the first and last point
@@ -260,10 +267,8 @@ export interface SkPath extends SkJSIInstance<"Path"> {
260
267
  * only lines. If Path contains curves, computed bounds includes
261
268
  * the maximum extent of the quad, conic, or cubic; is slower than getBounds();
262
269
  * and unlike getBounds(), does not cache the result.
263
- * @param outputArray - if provided, the bounding box will be copied into this array instead of
264
- * allocating a new one.
265
270
  */
266
- computeTightBounds(outputArray?: SkRect): SkRect;
271
+ computeTightBounds(): SkRect;
267
272
 
268
273
  /**
269
274
  * Appends arc to Path. Arc added is part of ellipse
@@ -371,7 +376,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
371
376
  cpy2: number,
372
377
  x: number,
373
378
  y: number
374
- ): void;
379
+ ): SkPath;
375
380
 
376
381
  /**
377
382
  * Changes this path to be the dashed version of itself. This is the same effect as creating
@@ -458,7 +463,18 @@ export interface SkPath extends SkJSIInstance<"Path"> {
458
463
  */
459
464
  isVolatile(): boolean;
460
465
 
461
- addCircle(x: number, y: number, r: number): void;
466
+ /** Adds circle centered at (x, y) of size radius to SkPath, appending kMove_Verb,
467
+ four kConic_Verb, and kClose_Verb. Circle begins at: (x + radius, y), continuing
468
+ clockwise if dir is kCW_Direction, and counterclockwise if dir is kCCW_Direction.
469
+
470
+ Has no effect if radius is zero or negative.
471
+
472
+ @param x center of circle
473
+ @param y center of circle
474
+ @param radius distance from center to edge
475
+ @return reference to SkPath
476
+ */
477
+ addCircle(x: number, y: number, r: number): SkPath;
462
478
 
463
479
  getLastPt(): { x: number; y: number };
464
480
 
@@ -507,18 +523,13 @@ export interface SkPath extends SkJSIInstance<"Path"> {
507
523
  * @param stopT - a value in the range [0.0, 1.0]. 1.0 is the end of the path.
508
524
  * @param isComplement
509
525
  */
510
- trim(startT: number, stopT: number, isComplement: boolean): boolean;
526
+ trim(startT: number, stopT: number, isComplement: boolean): null | SkPath;
511
527
 
512
528
  /**
513
529
  * Transforms the path by the specified matrix.
514
530
  */
515
531
  transform(m3: SkMatrix): void;
516
532
 
517
- /**
518
- * Converts the text to a path with the given font at location x / y.
519
- */
520
- fromText(text: string, x: number, y: number, font: SkFont): void;
521
-
522
533
  /**
523
534
  * Interpolates between Path with point array of equal size.
524
535
  * Copy verb array and weights to result, and set result path to a weighted
@@ -535,10 +546,10 @@ export interface SkPath extends SkJSIInstance<"Path"> {
535
546
  * @param ending path to interpolate with
536
547
  * @param weight contribution of this path, and
537
548
  * one minus contribution of ending path
538
- * @return Path replaced by interpolated averages or undefined if
549
+ * @return Path replaced by interpolated averages or null if
539
550
  * not interpolatable
540
551
  * */
541
- interpolate(end: SkPath, weight: number): SkPath;
552
+ interpolate(end: SkPath, weight: number): SkPath | null;
542
553
 
543
554
  /** Returns true if Path contain equal verbs and equal weights.
544
555
  * @param compare path to compare
@@ -1,3 +1,5 @@
1
+ import type { SkFont } from "../Font";
2
+
1
3
  import type { SkPath, PathOp, PathCommand } from "./Path";
2
4
 
3
5
  export interface PathFactory {
@@ -24,4 +26,9 @@ export interface PathFactory {
24
26
  * @param cmds
25
27
  */
26
28
  MakeFromCmds(cmds: PathCommand[]): SkPath | null;
29
+
30
+ /**
31
+ * Converts the text to a path with the given font at location x / y.
32
+ */
33
+ MakeFromText(text: string, x: number, y: number, font: SkFont): SkPath | null;
27
34
  }
@@ -1,8 +1,8 @@
1
- import type { InputColorMatrix } from "../ColorFilter";
2
1
  import type { FilterMode } from "../Image";
3
2
  import type { TileMode } from "../ImageFilter";
4
3
  import type { SkRect } from "../Rect";
5
4
  import type { SkShader } from "../Shader";
5
+ import type { SkMatrix } from "../Matrix";
6
6
 
7
7
  export interface SkPicture {
8
8
  /**
@@ -22,7 +22,7 @@ export interface SkPicture {
22
22
  tmx: TileMode,
23
23
  tmy: TileMode,
24
24
  mode: FilterMode,
25
- localMatrix?: InputColorMatrix,
25
+ localMatrix?: SkMatrix,
26
26
  tileRect?: SkRect
27
27
  ): SkShader;
28
28
 
@@ -8,3 +8,5 @@ export interface SkPoint {
8
8
  readonly x: number;
9
9
  readonly y: number;
10
10
  }
11
+
12
+ export type Vector = SkPoint;
@@ -5,3 +5,8 @@ export interface SkRRect {
5
5
  readonly rx: number;
6
6
  readonly ry: number;
7
7
  }
8
+
9
+ // We have an issue to check property existence on JSI backed instances
10
+ export const isRRect = (def: SkRect | SkRRect): def is SkRRect =>
11
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
+ (def as any).rect !== undefined;
@@ -7,34 +7,29 @@ export interface SkSLUniform {
7
7
  rows: number;
8
8
  /** The index into the uniforms array that this uniform begins. */
9
9
  slot: number;
10
- isInteger: boolean;
11
10
  }
12
11
 
13
- export type SkRuntimeShaderBuilder = SkJSIInstance<"RuntimeShaderBuilder">;
12
+ export interface SkRuntimeShaderBuilder
13
+ extends SkJSIInstance<"RuntimeShaderBuilder"> {
14
+ setUniform(name: string, value: readonly number[]): void;
15
+ }
14
16
 
15
17
  export interface SkRuntimeEffect extends SkJSIInstance<"RuntimeEffect"> {
16
18
  /**
17
19
  * Returns a shader executed using the given uniform data.
18
20
  * @param uniforms
19
- * @param isOpaque
20
21
  * @param localMatrix
21
22
  */
22
- makeShader(
23
- uniforms: number[],
24
- isOpaque?: boolean,
25
- localMatrix?: SkMatrix
26
- ): SkShader;
23
+ makeShader(uniforms: number[], localMatrix?: SkMatrix): SkShader;
27
24
 
28
25
  /**
29
26
  * Returns a shader executed using the given uniform data and the children as inputs.
30
27
  * @param uniforms
31
- * @param isOpaque
32
28
  * @param children
33
29
  * @param localMatrix
34
30
  */
35
31
  makeShaderWithChildren(
36
32
  uniforms: number[],
37
- isOpaque?: boolean,
38
33
  children?: SkShader[],
39
34
  localMatrix?: SkMatrix
40
35
  ): SkShader;
@@ -1,8 +1,8 @@
1
- import type { Data } from "../Data";
1
+ import type { SkData } from "../Data";
2
2
 
3
3
  import type { SkSVG } from "./SVG";
4
4
 
5
5
  export interface SVGFactory {
6
- MakeFromData(data: Data): SkSVG | null;
6
+ MakeFromData(data: SkData): SkSVG | null;
7
7
  MakeFromString(str: string): SkSVG | null;
8
8
  }
@@ -1,6 +1,67 @@
1
1
  import type { SkJSIInstance } from "../JsiInstance";
2
+ import type { Vector } from "../Point";
3
+ import type { SkRuntimeEffect, SkRuntimeShaderBuilder } from "../RuntimeEffect";
2
4
 
3
5
  export const isShader = (obj: SkJSIInstance<string> | null): obj is SkShader =>
4
6
  obj !== null && obj.__typename__ === "Shader";
5
7
 
6
8
  export type SkShader = SkJSIInstance<"Shader">;
9
+
10
+ export type UniformValue = number | Vector | readonly number[];
11
+
12
+ export type Uniform = UniformValue | readonly UniformValue[];
13
+
14
+ export interface Uniforms {
15
+ [name: string]: Uniform;
16
+ }
17
+
18
+ const isVector = (obj: unknown): obj is Vector =>
19
+ // We have an issue to check property existence on JSI backed instances
20
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
+ (obj as any).x !== undefined && (obj as any).y !== undefined;
22
+
23
+ const processValue = (value: UniformValue): number | readonly number[] => {
24
+ if (isVector(value)) {
25
+ return [value.x, value.y];
26
+ }
27
+ return value;
28
+ };
29
+
30
+ export const processUniforms = (
31
+ source: SkRuntimeEffect,
32
+ uniforms: Uniforms,
33
+ builder?: SkRuntimeShaderBuilder
34
+ ) => {
35
+ const processed = new Array(source.getUniformCount())
36
+ .fill(0)
37
+ .flatMap((_, i) => {
38
+ const name = source.getUniformName(i);
39
+ const value = uniforms[name];
40
+ if (value === undefined) {
41
+ throw new Error(`No value specified for uniform ${name}`);
42
+ }
43
+ let result: number | readonly number[];
44
+ if (Array.isArray(value)) {
45
+ result = value.flatMap(processValue);
46
+ }
47
+ result = processValue(value as UniformValue);
48
+ builder?.setUniform(name, typeof result === "number" ? [result] : result);
49
+ return result;
50
+ });
51
+ const names = Object.keys(uniforms);
52
+ if (names.length > source.getUniformCount()) {
53
+ const usedUniforms = new Array(source.getUniformCount())
54
+ .fill(0)
55
+ .map((_, i) => source.getUniformName(i));
56
+ const unusedUniform = names
57
+ .map((name) => {
58
+ if (usedUniforms.indexOf(name) === -1) {
59
+ return name;
60
+ }
61
+ return null;
62
+ })
63
+ .filter((n) => n !== null);
64
+ console.warn("Unused uniforms were provided: " + unusedUniform.join(", "));
65
+ }
66
+ return processed;
67
+ };
@@ -48,7 +48,7 @@ export interface Skia {
48
48
  PictureRecorder: () => SkPictureRecorder;
49
49
  Picture: PictureFactory;
50
50
  Path: PathFactory;
51
- Matrix: () => SkMatrix;
51
+ Matrix: (matrix?: number[]) => SkMatrix;
52
52
  ColorFilter: ColorFilterFactory;
53
53
  Font: (typeface?: SkTypeface, size?: number) => SkFont;
54
54
  Typeface: TypefaceFactory;
@@ -1,7 +1,7 @@
1
- import type { Data } from "../Data";
1
+ import type { SkData } from "../Data";
2
2
 
3
3
  import type { SkTypeface } from "./Typeface";
4
4
 
5
5
  export interface TypefaceFactory {
6
- MakeFreeTypeFaceFromData(data: Data): SkTypeface | null;
6
+ MakeFreeTypeFaceFromData(data: SkData): SkTypeface | null;
7
7
  }
@@ -1,7 +1,13 @@
1
1
  /* eslint-disable no-nested-ternary */
2
2
  import type { CanvasKit, EmbindEnumEntity } from "canvaskit-wasm";
3
3
 
4
- import type { SkJSIInstance } from "../../types";
4
+ import type { SkJSIInstance } from "../types";
5
+
6
+ export class NotImplementedOnRNWeb extends Error {
7
+ constructor() {
8
+ super("Not implemented on React Native Web");
9
+ }
10
+ }
5
11
 
6
12
  export abstract class Host {
7
13
  readonly CanvasKit: CanvasKit;