@shopify/react-native-skia 0.1.130 → 0.1.133

Sign up to get free protection for your applications and to get access to all the features.
Files changed (963) hide show
  1. package/README.md +8 -0
  2. package/android/cpp/jni/JniSkiaDrawView.cpp +3 -2
  3. package/android/cpp/rnskia-android/RNSkDrawViewImpl.cpp +5 -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/JsiSkImage.h +2 -19
  8. package/cpp/api/JsiSkMatrix.h +40 -27
  9. package/cpp/api/JsiSkPaint.h +8 -33
  10. package/cpp/api/JsiSkPath.h +71 -65
  11. package/cpp/api/JsiSkPathFactory.h +14 -1
  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/rnskia/RNSkInfoParameter.h +2 -0
  16. package/cpp/utils/RNSkLog.h +27 -0
  17. package/ios/RNSkia-iOS/SkiaDrawView.mm +2 -1
  18. package/lib/commonjs/animation/functions/index.js +47 -17
  19. package/lib/commonjs/animation/functions/index.js.map +1 -1
  20. package/lib/commonjs/animation/functions/interpolatePaths.js +45 -0
  21. package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -0
  22. package/lib/commonjs/animation/functions/interpolateVector.js +20 -0
  23. package/lib/commonjs/animation/functions/interpolateVector.js.map +1 -0
  24. package/lib/commonjs/index.js +13 -0
  25. package/lib/commonjs/index.js.map +1 -1
  26. package/lib/commonjs/renderer/Canvas.js +19 -35
  27. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  28. package/lib/commonjs/renderer/HostConfig.js +2 -2
  29. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  30. package/lib/commonjs/renderer/components/Blend.js +10 -7
  31. package/lib/commonjs/renderer/components/Blend.js.map +1 -1
  32. package/lib/commonjs/renderer/components/Compose.js +9 -6
  33. package/lib/commonjs/renderer/components/Compose.js.map +1 -1
  34. package/lib/commonjs/renderer/components/Group.js +7 -6
  35. package/lib/commonjs/renderer/components/Group.js.map +1 -1
  36. package/lib/commonjs/renderer/components/Mask.js +13 -10
  37. package/lib/commonjs/renderer/components/Mask.js.map +1 -1
  38. package/lib/commonjs/renderer/components/Paint.js +7 -4
  39. package/lib/commonjs/renderer/components/Paint.js.map +1 -1
  40. package/lib/commonjs/renderer/components/Picture.js.map +1 -1
  41. package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js +1 -1
  42. package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -1
  43. package/lib/commonjs/renderer/components/colorFilters/BlendColor.js +7 -6
  44. package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -1
  45. package/lib/commonjs/renderer/components/colorFilters/Compose.js +6 -6
  46. package/lib/commonjs/renderer/components/colorFilters/Compose.js.map +1 -1
  47. package/lib/commonjs/renderer/components/colorFilters/Lerp.js +8 -7
  48. package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
  49. package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js +6 -6
  50. package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
  51. package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js +6 -6
  52. package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
  53. package/lib/commonjs/renderer/components/colorFilters/Matrix.js +6 -7
  54. package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -1
  55. package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js +6 -6
  56. package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
  57. package/lib/commonjs/renderer/components/image/BoxFit.js +7 -9
  58. package/lib/commonjs/renderer/components/image/BoxFit.js.map +1 -1
  59. package/lib/commonjs/renderer/components/image/Image.js +3 -2
  60. package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
  61. package/lib/commonjs/renderer/components/image/ImageSVG.js +3 -2
  62. package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -1
  63. package/lib/commonjs/renderer/components/image/ImageShader.js +9 -6
  64. package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
  65. package/lib/commonjs/renderer/components/imageFilters/Blur.js +7 -4
  66. package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
  67. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +10 -7
  68. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  69. package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js +10 -15
  70. package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -1
  71. package/lib/commonjs/renderer/components/imageFilters/Morphology.js +7 -6
  72. package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
  73. package/lib/commonjs/renderer/components/imageFilters/Offset.js +5 -4
  74. package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
  75. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js +13 -6
  76. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  77. package/lib/commonjs/renderer/components/imageFilters/Shadow.js +8 -7
  78. package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
  79. package/lib/commonjs/renderer/components/imageFilters/getInput.js +7 -7
  80. package/lib/commonjs/renderer/components/imageFilters/getInput.js.map +1 -1
  81. package/lib/commonjs/renderer/components/maskFilters/Blur.js +6 -3
  82. package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
  83. package/lib/commonjs/renderer/components/pathEffects/Corner.js +8 -6
  84. package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
  85. package/lib/commonjs/renderer/components/pathEffects/Dash.js +8 -6
  86. package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
  87. package/lib/commonjs/renderer/components/pathEffects/Discrete.js +8 -6
  88. package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
  89. package/lib/commonjs/renderer/components/pathEffects/Line2D.js +8 -6
  90. package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
  91. package/lib/commonjs/renderer/components/pathEffects/Path1D.js +8 -6
  92. package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
  93. package/lib/commonjs/renderer/components/pathEffects/Path2D.js +8 -6
  94. package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
  95. package/lib/commonjs/renderer/components/pathEffects/Sum.js +7 -4
  96. package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
  97. package/lib/commonjs/renderer/components/shaders/Color.js +7 -4
  98. package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -1
  99. package/lib/commonjs/renderer/components/shaders/FractalNoise.js +5 -4
  100. package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
  101. package/lib/commonjs/renderer/components/shaders/Gradient.js +5 -5
  102. package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -1
  103. package/lib/commonjs/renderer/components/shaders/LinearGradient.js +6 -5
  104. package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -1
  105. package/lib/commonjs/renderer/components/shaders/RadialGradient.js +6 -5
  106. package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -1
  107. package/lib/commonjs/renderer/components/shaders/Shader.js +6 -43
  108. package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
  109. package/lib/commonjs/renderer/components/shaders/SweepGradient.js +6 -5
  110. package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -1
  111. package/lib/commonjs/renderer/components/shaders/Turbulence.js +5 -4
  112. package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
  113. package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js +6 -5
  114. package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
  115. package/lib/commonjs/renderer/components/shapes/Box.js +26 -29
  116. package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
  117. package/lib/commonjs/renderer/components/shapes/Circle.js +7 -5
  118. package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
  119. package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
  120. package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
  121. package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -1
  122. package/lib/commonjs/renderer/components/shapes/Oval.js +3 -2
  123. package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
  124. package/lib/commonjs/renderer/components/shapes/Patch.js +8 -5
  125. package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
  126. package/lib/commonjs/renderer/components/shapes/Path.js +5 -4
  127. package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
  128. package/lib/commonjs/renderer/components/shapes/Points.js +2 -2
  129. package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
  130. package/lib/commonjs/renderer/components/shapes/Rect.js +3 -2
  131. package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -1
  132. package/lib/commonjs/renderer/components/shapes/RoundedRect.js +3 -2
  133. package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
  134. package/lib/commonjs/renderer/components/shapes/Vertices.js +9 -8
  135. package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
  136. package/lib/commonjs/renderer/components/text/Glyphs.js +3 -2
  137. package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
  138. package/lib/commonjs/renderer/components/text/Text.js +3 -2
  139. package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
  140. package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
  141. package/lib/commonjs/renderer/components/text/TextPath.js +7 -11
  142. package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
  143. package/lib/commonjs/renderer/index.js +13 -13
  144. package/lib/commonjs/renderer/index.js.map +1 -1
  145. package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -1
  146. package/lib/commonjs/renderer/nodes/Drawing.js +5 -5
  147. package/lib/commonjs/renderer/nodes/Drawing.js.map +1 -1
  148. package/lib/commonjs/renderer/nodes/Node.js.map +1 -1
  149. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  150. package/lib/commonjs/renderer/processors/Circles.js +2 -4
  151. package/lib/commonjs/renderer/processors/Circles.js.map +1 -1
  152. package/lib/commonjs/renderer/processors/Clips.js +5 -5
  153. package/lib/commonjs/renderer/processors/Clips.js.map +1 -1
  154. package/lib/commonjs/{skia/core → renderer/processors}/Color.js +2 -6
  155. package/lib/commonjs/renderer/processors/Color.js.map +1 -0
  156. package/lib/commonjs/renderer/processors/Font.js +4 -4
  157. package/lib/commonjs/renderer/processors/Font.js.map +1 -1
  158. package/lib/commonjs/renderer/processors/Paint.js +18 -14
  159. package/lib/commonjs/renderer/processors/Paint.js.map +1 -1
  160. package/lib/commonjs/renderer/processors/Paths.js +4 -4
  161. package/lib/commonjs/renderer/processors/Paths.js.map +1 -1
  162. package/lib/commonjs/renderer/processors/Radius.js +2 -4
  163. package/lib/commonjs/renderer/processors/Radius.js.map +1 -1
  164. package/lib/commonjs/renderer/processors/Rects.js +8 -59
  165. package/lib/commonjs/renderer/processors/Rects.js.map +1 -1
  166. package/lib/commonjs/renderer/processors/Transform.js +26 -17
  167. package/lib/commonjs/renderer/processors/Transform.js.map +1 -1
  168. package/lib/commonjs/renderer/processors/index.js +26 -13
  169. package/lib/commonjs/renderer/processors/index.js.map +1 -1
  170. package/lib/commonjs/renderer/processors/math/Coordinates.js.map +1 -1
  171. package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -1
  172. package/lib/commonjs/renderer/processors/math/index.js +0 -26
  173. package/lib/commonjs/renderer/processors/math/index.js.map +1 -1
  174. package/lib/commonjs/renderer/useCanvas.js +30 -0
  175. package/lib/commonjs/renderer/useCanvas.js.map +1 -0
  176. package/lib/commonjs/skia/NativeSetup.js +1 -1
  177. package/lib/commonjs/skia/NativeSetup.js.map +1 -1
  178. package/lib/commonjs/skia/Skia.web.js +12 -0
  179. package/lib/commonjs/skia/Skia.web.js.map +1 -0
  180. package/lib/commonjs/skia/core/Data.js +9 -4
  181. package/lib/commonjs/skia/core/Data.js.map +1 -1
  182. package/lib/commonjs/skia/core/Font.js +2 -4
  183. package/lib/commonjs/skia/core/Font.js.map +1 -1
  184. package/lib/commonjs/skia/core/Matrix.js +15 -0
  185. package/lib/commonjs/skia/core/Matrix.js.map +1 -0
  186. package/lib/commonjs/skia/core/Paint.js +4 -12
  187. package/lib/commonjs/skia/core/Paint.js.map +1 -1
  188. package/lib/commonjs/skia/core/Path.js +14 -2
  189. package/lib/commonjs/skia/core/Path.js.map +1 -1
  190. package/lib/commonjs/skia/core/RRect.js +13 -0
  191. package/lib/commonjs/skia/core/RRect.js.map +1 -0
  192. package/lib/commonjs/skia/core/Rect.js +47 -0
  193. package/lib/commonjs/skia/core/Rect.js.map +1 -0
  194. package/lib/commonjs/skia/core/Vector.js +49 -0
  195. package/lib/commonjs/skia/core/Vector.js.map +1 -0
  196. package/lib/commonjs/skia/core/index.js +51 -25
  197. package/lib/commonjs/skia/core/index.js.map +1 -1
  198. package/lib/commonjs/skia/types/Font/Font.js.map +1 -1
  199. package/lib/commonjs/skia/types/Image/Image.js +5 -5
  200. package/lib/commonjs/skia/types/Image/Image.js.map +1 -1
  201. package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -1
  202. package/lib/commonjs/skia/types/Matrix.js +58 -1
  203. package/lib/commonjs/skia/types/Matrix.js.map +1 -1
  204. package/lib/commonjs/skia/types/Paint/Paint.js +3 -3
  205. package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -1
  206. package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
  207. package/lib/commonjs/skia/types/Point.js.map +1 -1
  208. package/lib/commonjs/skia/types/RRect.js +7 -0
  209. package/lib/commonjs/skia/types/RRect.js.map +1 -1
  210. package/lib/commonjs/skia/types/Shader/Shader.js +45 -1
  211. package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
  212. package/lib/commonjs/skia/web/{api/Host.js → Host.js} +10 -1
  213. package/lib/commonjs/skia/web/Host.js.map +1 -0
  214. package/lib/commonjs/skia/web/{api/JsiSkCanvas.js → JsiSkCanvas.js} +21 -7
  215. package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -0
  216. package/lib/commonjs/skia/web/{api/JsiSkColor.js → JsiSkColor.js} +163 -4
  217. package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -0
  218. package/lib/commonjs/skia/web/{api/JsiSkColorFilter.js → JsiSkColorFilter.js} +0 -0
  219. package/lib/commonjs/skia/web/{api/JsiSkColorFilter.js.map → JsiSkColorFilter.js.map} +1 -1
  220. package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js +48 -0
  221. package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -0
  222. package/lib/commonjs/skia/web/JsiSkContourMeasure.js +42 -0
  223. package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -0
  224. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js +30 -0
  225. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -0
  226. package/lib/commonjs/skia/web/JsiSkData.js +18 -0
  227. package/lib/commonjs/skia/web/JsiSkData.js.map +1 -0
  228. package/lib/commonjs/skia/web/JsiSkDataFactory.js +44 -0
  229. package/lib/commonjs/skia/web/JsiSkDataFactory.js.map +1 -0
  230. package/lib/commonjs/skia/web/JsiSkFont.js +113 -0
  231. package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -0
  232. package/lib/commonjs/skia/web/JsiSkFontMgr.js +33 -0
  233. package/lib/commonjs/skia/web/JsiSkFontMgr.js.map +1 -0
  234. package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js +25 -0
  235. package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js.map +1 -0
  236. package/lib/commonjs/skia/web/{api/JsiSkImage.js → JsiSkImage.js} +10 -6
  237. package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -0
  238. package/lib/commonjs/skia/web/JsiSkImageFactory.js +47 -0
  239. package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -0
  240. package/lib/commonjs/skia/web/JsiSkImageFilter.js +18 -0
  241. package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -0
  242. package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js +68 -0
  243. package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js.map +1 -0
  244. package/lib/commonjs/skia/web/JsiSkMaskFilter.js +18 -0
  245. package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -0
  246. package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js +24 -0
  247. package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
  248. package/lib/commonjs/skia/web/JsiSkMatrix.js +38 -0
  249. package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -0
  250. package/lib/commonjs/skia/web/{api/JsiSkPaint.js → JsiSkPaint.js} +4 -9
  251. package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -0
  252. package/lib/commonjs/skia/web/JsiSkPath.js +337 -0
  253. package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -0
  254. package/lib/commonjs/skia/web/JsiSkPathEffect.js +18 -0
  255. package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -0
  256. package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js +78 -0
  257. package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -0
  258. package/lib/commonjs/skia/web/JsiSkPathFactory.js +58 -0
  259. package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -0
  260. package/lib/commonjs/skia/web/JsiSkPicture.js +29 -0
  261. package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -0
  262. package/lib/commonjs/skia/web/JsiSkPictureFactory.js +30 -0
  263. package/lib/commonjs/skia/web/JsiSkPictureFactory.js.map +1 -0
  264. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +30 -0
  265. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -0
  266. package/lib/commonjs/skia/web/JsiSkPoint.js +26 -0
  267. package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -0
  268. package/lib/commonjs/skia/web/JsiSkRRect.js +32 -0
  269. package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -0
  270. package/lib/commonjs/skia/web/JsiSkRSXform.js +18 -0
  271. package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -0
  272. package/lib/commonjs/skia/web/{api/JsiSkRect.js → JsiSkRect.js} +8 -0
  273. package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -0
  274. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +44 -0
  275. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -0
  276. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +30 -0
  277. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
  278. package/lib/commonjs/skia/web/JsiSkSVGFactory.js +26 -0
  279. package/lib/commonjs/skia/web/JsiSkSVGFactory.js.map +1 -0
  280. package/lib/commonjs/skia/web/JsiSkShader.js +18 -0
  281. package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -0
  282. package/lib/commonjs/skia/web/JsiSkShaderFactory.js +52 -0
  283. package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -0
  284. package/lib/commonjs/skia/web/{api/JsiSkSurface.js → JsiSkSurface.js} +0 -0
  285. package/lib/commonjs/skia/web/{api/JsiSkSurface.js.map → JsiSkSurface.js.map} +1 -1
  286. package/lib/commonjs/skia/web/{api/JsiSkSurfaceFactory.js → JsiSkSurfaceFactory.js} +0 -0
  287. package/lib/commonjs/skia/web/{api/JsiSkSurfaceFactory.js.map → JsiSkSurfaceFactory.js.map} +1 -1
  288. package/lib/commonjs/skia/web/JsiSkTextBlob.js +18 -0
  289. package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -0
  290. package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js +36 -0
  291. package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -0
  292. package/lib/commonjs/skia/web/JsiSkTypeface.js +28 -0
  293. package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -0
  294. package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js +30 -0
  295. package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js.map +1 -0
  296. package/lib/commonjs/skia/web/JsiSkVertices.js +28 -0
  297. package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -0
  298. package/lib/commonjs/skia/web/JsiSkVerticesFactory.js +49 -0
  299. package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -0
  300. package/lib/commonjs/skia/web/JsiSkia.js +97 -0
  301. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -0
  302. package/lib/commonjs/skia/web/index.js +4 -4
  303. package/lib/commonjs/skia/web/index.js.map +1 -1
  304. package/lib/commonjs/values/web/api.js +2 -2
  305. package/lib/commonjs/values/web/api.js.map +1 -1
  306. package/lib/commonjs/views/SkiaView.web.js +216 -0
  307. package/lib/commonjs/views/SkiaView.web.js.map +1 -0
  308. package/lib/commonjs/views/types.js.map +1 -1
  309. package/lib/commonjs/views/useTouchHandler.js +70 -46
  310. package/lib/commonjs/views/useTouchHandler.js.map +1 -1
  311. package/lib/commonjs/web/index.js +22 -0
  312. package/lib/commonjs/web/index.js.map +1 -0
  313. package/lib/module/animation/functions/index.js +4 -2
  314. package/lib/module/animation/functions/index.js.map +1 -1
  315. package/lib/module/animation/functions/interpolatePaths.js +36 -0
  316. package/lib/module/animation/functions/interpolatePaths.js.map +1 -0
  317. package/lib/module/animation/functions/interpolateVector.js +7 -0
  318. package/lib/module/animation/functions/interpolateVector.js.map +1 -0
  319. package/lib/module/index.js +1 -0
  320. package/lib/module/index.js.map +1 -1
  321. package/lib/module/renderer/Canvas.js +15 -26
  322. package/lib/module/renderer/Canvas.js.map +1 -1
  323. package/lib/module/renderer/HostConfig.js +2 -2
  324. package/lib/module/renderer/HostConfig.js.map +1 -1
  325. package/lib/module/renderer/components/Blend.js +5 -2
  326. package/lib/module/renderer/components/Blend.js.map +1 -1
  327. package/lib/module/renderer/components/Compose.js +5 -2
  328. package/lib/module/renderer/components/Compose.js.map +1 -1
  329. package/lib/module/renderer/components/Group.js +7 -6
  330. package/lib/module/renderer/components/Group.js.map +1 -1
  331. package/lib/module/renderer/components/Mask.js +7 -3
  332. package/lib/module/renderer/components/Mask.js.map +1 -1
  333. package/lib/module/renderer/components/Paint.js +6 -3
  334. package/lib/module/renderer/components/Paint.js.map +1 -1
  335. package/lib/module/renderer/components/Picture.js.map +1 -1
  336. package/lib/module/renderer/components/backdrop/BackdropFilter.js +1 -1
  337. package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -1
  338. package/lib/module/renderer/components/colorFilters/BlendColor.js +6 -3
  339. package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -1
  340. package/lib/module/renderer/components/colorFilters/Compose.js +2 -2
  341. package/lib/module/renderer/components/colorFilters/Compose.js.map +1 -1
  342. package/lib/module/renderer/components/colorFilters/Lerp.js +6 -3
  343. package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
  344. package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js +5 -3
  345. package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
  346. package/lib/module/renderer/components/colorFilters/LumaColorFilter.js +5 -3
  347. package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
  348. package/lib/module/renderer/components/colorFilters/Matrix.js +5 -3
  349. package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -1
  350. package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js +5 -3
  351. package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
  352. package/lib/module/renderer/components/image/BoxFit.js +7 -8
  353. package/lib/module/renderer/components/image/BoxFit.js.map +1 -1
  354. package/lib/module/renderer/components/image/Image.js +3 -2
  355. package/lib/module/renderer/components/image/Image.js.map +1 -1
  356. package/lib/module/renderer/components/image/ImageSVG.js +3 -2
  357. package/lib/module/renderer/components/image/ImageSVG.js.map +1 -1
  358. package/lib/module/renderer/components/image/ImageShader.js +10 -7
  359. package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
  360. package/lib/module/renderer/components/imageFilters/Blur.js +7 -4
  361. package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
  362. package/lib/module/renderer/components/imageFilters/DisplacementMap.js +7 -4
  363. package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  364. package/lib/module/renderer/components/imageFilters/InnerShadow.js +3 -3
  365. package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -1
  366. package/lib/module/renderer/components/imageFilters/Morphology.js +6 -4
  367. package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
  368. package/lib/module/renderer/components/imageFilters/Offset.js +5 -3
  369. package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
  370. package/lib/module/renderer/components/imageFilters/RuntimeShader.js +13 -4
  371. package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  372. package/lib/module/renderer/components/imageFilters/Shadow.js +6 -5
  373. package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
  374. package/lib/module/renderer/components/imageFilters/getInput.js +2 -2
  375. package/lib/module/renderer/components/imageFilters/getInput.js.map +1 -1
  376. package/lib/module/renderer/components/maskFilters/Blur.js +5 -2
  377. package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
  378. package/lib/module/renderer/components/pathEffects/Corner.js +5 -2
  379. package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
  380. package/lib/module/renderer/components/pathEffects/Dash.js +5 -2
  381. package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
  382. package/lib/module/renderer/components/pathEffects/Discrete.js +5 -2
  383. package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
  384. package/lib/module/renderer/components/pathEffects/Line2D.js +5 -2
  385. package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
  386. package/lib/module/renderer/components/pathEffects/Path1D.js +6 -3
  387. package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
  388. package/lib/module/renderer/components/pathEffects/Path2D.js +6 -3
  389. package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
  390. package/lib/module/renderer/components/pathEffects/Sum.js +5 -2
  391. package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
  392. package/lib/module/renderer/components/shaders/Color.js +6 -3
  393. package/lib/module/renderer/components/shaders/Color.js.map +1 -1
  394. package/lib/module/renderer/components/shaders/FractalNoise.js +4 -2
  395. package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
  396. package/lib/module/renderer/components/shaders/Gradient.js +3 -3
  397. package/lib/module/renderer/components/shaders/Gradient.js.map +1 -1
  398. package/lib/module/renderer/components/shaders/LinearGradient.js +5 -3
  399. package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -1
  400. package/lib/module/renderer/components/shaders/RadialGradient.js +5 -3
  401. package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -1
  402. package/lib/module/renderer/components/shaders/Shader.js +6 -44
  403. package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
  404. package/lib/module/renderer/components/shaders/SweepGradient.js +5 -3
  405. package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -1
  406. package/lib/module/renderer/components/shaders/Turbulence.js +4 -2
  407. package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
  408. package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js +5 -3
  409. package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
  410. package/lib/module/renderer/components/shapes/Box.js +20 -19
  411. package/lib/module/renderer/components/shapes/Box.js.map +1 -1
  412. package/lib/module/renderer/components/shapes/Circle.js +7 -4
  413. package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
  414. package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
  415. package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
  416. package/lib/module/renderer/components/shapes/Line.js.map +1 -1
  417. package/lib/module/renderer/components/shapes/Oval.js +3 -2
  418. package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
  419. package/lib/module/renderer/components/shapes/Patch.js +5 -3
  420. package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
  421. package/lib/module/renderer/components/shapes/Path.js +4 -3
  422. package/lib/module/renderer/components/shapes/Path.js.map +1 -1
  423. package/lib/module/renderer/components/shapes/Points.js +1 -1
  424. package/lib/module/renderer/components/shapes/Points.js.map +1 -1
  425. package/lib/module/renderer/components/shapes/Rect.js +3 -2
  426. package/lib/module/renderer/components/shapes/Rect.js.map +1 -1
  427. package/lib/module/renderer/components/shapes/RoundedRect.js +3 -2
  428. package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
  429. package/lib/module/renderer/components/shapes/Vertices.js +5 -3
  430. package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
  431. package/lib/module/renderer/components/text/Glyphs.js +3 -2
  432. package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
  433. package/lib/module/renderer/components/text/Text.js +3 -2
  434. package/lib/module/renderer/components/text/Text.js.map +1 -1
  435. package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
  436. package/lib/module/renderer/components/text/TextPath.js +3 -3
  437. package/lib/module/renderer/components/text/TextPath.js.map +1 -1
  438. package/lib/module/renderer/index.js +1 -1
  439. package/lib/module/renderer/index.js.map +1 -1
  440. package/lib/module/renderer/nodes/Declaration.js.map +1 -1
  441. package/lib/module/renderer/nodes/Drawing.js +3 -3
  442. package/lib/module/renderer/nodes/Drawing.js.map +1 -1
  443. package/lib/module/renderer/nodes/Node.js.map +1 -1
  444. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  445. package/lib/module/renderer/processors/Circles.js +2 -4
  446. package/lib/module/renderer/processors/Circles.js.map +1 -1
  447. package/lib/module/renderer/processors/Clips.js +3 -3
  448. package/lib/module/renderer/processors/Clips.js.map +1 -1
  449. package/lib/module/{skia/core → renderer/processors}/Color.js +1 -2
  450. package/lib/module/renderer/processors/Color.js.map +1 -0
  451. package/lib/module/renderer/processors/Font.js +3 -2
  452. package/lib/module/renderer/processors/Font.js.map +1 -1
  453. package/lib/module/renderer/processors/Paint.js +8 -5
  454. package/lib/module/renderer/processors/Paint.js.map +1 -1
  455. package/lib/module/renderer/processors/Paths.js +2 -2
  456. package/lib/module/renderer/processors/Paths.js.map +1 -1
  457. package/lib/module/renderer/processors/Radius.js +2 -3
  458. package/lib/module/renderer/processors/Radius.js.map +1 -1
  459. package/lib/module/renderer/processors/Rects.js +7 -26
  460. package/lib/module/renderer/processors/Rects.js.map +1 -1
  461. package/lib/module/renderer/processors/Transform.js +24 -16
  462. package/lib/module/renderer/processors/Transform.js.map +1 -1
  463. package/lib/module/renderer/processors/index.js +2 -1
  464. package/lib/module/renderer/processors/index.js.map +1 -1
  465. package/lib/module/renderer/processors/math/Coordinates.js.map +1 -1
  466. package/lib/module/renderer/processors/math/Transforms.js.map +1 -1
  467. package/lib/module/renderer/processors/math/index.js +0 -2
  468. package/lib/module/renderer/processors/math/index.js.map +1 -1
  469. package/lib/module/renderer/useCanvas.js +13 -0
  470. package/lib/module/renderer/useCanvas.js.map +1 -0
  471. package/lib/module/skia/NativeSetup.js +2 -2
  472. package/lib/module/skia/NativeSetup.js.map +1 -1
  473. package/lib/module/skia/Skia.web.js +3 -0
  474. package/lib/module/skia/Skia.web.js.map +1 -0
  475. package/lib/module/skia/core/Data.js +11 -5
  476. package/lib/module/skia/core/Data.js.map +1 -1
  477. package/lib/module/skia/core/Font.js +2 -4
  478. package/lib/module/skia/core/Font.js.map +1 -1
  479. package/lib/module/skia/core/Matrix.js +4 -0
  480. package/lib/module/skia/core/Matrix.js.map +1 -0
  481. package/lib/module/skia/core/Paint.js +3 -7
  482. package/lib/module/skia/core/Paint.js.map +1 -1
  483. package/lib/module/skia/core/Path.js +11 -2
  484. package/lib/module/skia/core/Path.js.map +1 -1
  485. package/lib/module/skia/core/RRect.js +3 -0
  486. package/lib/module/skia/core/RRect.js.map +1 -0
  487. package/lib/module/skia/core/Rect.js +17 -0
  488. package/lib/module/skia/core/Rect.js.map +1 -0
  489. package/lib/module/{renderer/processors/math → skia/core}/Vector.js +2 -7
  490. package/lib/module/skia/core/Vector.js.map +1 -0
  491. package/lib/module/skia/core/index.js +5 -3
  492. package/lib/module/skia/core/index.js.map +1 -1
  493. package/lib/module/skia/types/Font/Font.js.map +1 -1
  494. package/lib/module/skia/types/Image/Image.js +5 -5
  495. package/lib/module/skia/types/Image/Image.js.map +1 -1
  496. package/lib/module/skia/types/Image/ImageFactory.js.map +1 -1
  497. package/lib/module/skia/types/Matrix.js +55 -0
  498. package/lib/module/skia/types/Matrix.js.map +1 -1
  499. package/lib/module/skia/types/Paint/Paint.js +3 -3
  500. package/lib/module/skia/types/Paint/Paint.js.map +1 -1
  501. package/lib/module/skia/types/Path/Path.js.map +1 -1
  502. package/lib/module/skia/types/Point.js.map +1 -1
  503. package/lib/module/skia/types/RRect.js +3 -1
  504. package/lib/module/skia/types/RRect.js.map +1 -1
  505. package/lib/module/skia/types/Shader/Shader.js +42 -0
  506. package/lib/module/skia/types/Shader/Shader.js.map +1 -1
  507. package/lib/module/skia/web/{api/Host.js → Host.js} +6 -0
  508. package/lib/module/skia/web/Host.js.map +1 -0
  509. package/lib/module/skia/web/{api/JsiSkCanvas.js → JsiSkCanvas.js} +20 -7
  510. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -0
  511. package/lib/module/skia/web/{api/JsiSkColor.js → JsiSkColor.js} +164 -4
  512. package/lib/module/skia/web/JsiSkColor.js.map +1 -0
  513. package/lib/module/skia/web/{api/JsiSkColorFilter.js → JsiSkColorFilter.js} +0 -0
  514. package/lib/module/skia/web/{api/JsiSkColorFilter.js.map → JsiSkColorFilter.js.map} +1 -1
  515. package/lib/module/skia/web/JsiSkColorFilterFactory.js +37 -0
  516. package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -0
  517. package/lib/module/skia/web/JsiSkContourMeasure.js +31 -0
  518. package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -0
  519. package/lib/module/skia/web/JsiSkContourMeasureIter.js +19 -0
  520. package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -0
  521. package/lib/module/skia/web/JsiSkData.js +8 -0
  522. package/lib/module/skia/web/JsiSkData.js.map +1 -0
  523. package/lib/module/skia/web/JsiSkDataFactory.js +33 -0
  524. package/lib/module/skia/web/JsiSkDataFactory.js.map +1 -0
  525. package/lib/module/skia/web/JsiSkFont.js +101 -0
  526. package/lib/module/skia/web/JsiSkFont.js.map +1 -0
  527. package/lib/module/skia/web/JsiSkFontMgr.js +23 -0
  528. package/lib/module/skia/web/JsiSkFontMgr.js.map +1 -0
  529. package/lib/module/skia/web/JsiSkFontMgrFactory.js +14 -0
  530. package/lib/module/skia/web/JsiSkFontMgrFactory.js.map +1 -0
  531. package/lib/module/skia/web/JsiSkImage.js +49 -0
  532. package/lib/module/skia/web/JsiSkImage.js.map +1 -0
  533. package/lib/module/skia/web/JsiSkImageFactory.js +36 -0
  534. package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -0
  535. package/lib/module/skia/web/JsiSkImageFilter.js +8 -0
  536. package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -0
  537. package/lib/module/skia/web/JsiSkImageFilterFactory.js +57 -0
  538. package/lib/module/skia/web/JsiSkImageFilterFactory.js.map +1 -0
  539. package/lib/module/skia/web/JsiSkMaskFilter.js +8 -0
  540. package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -0
  541. package/lib/module/skia/web/JsiSkMaskFilterFactory.js +13 -0
  542. package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
  543. package/lib/module/skia/web/JsiSkMatrix.js +28 -0
  544. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -0
  545. package/lib/module/skia/web/{api/JsiSkPaint.js → JsiSkPaint.js} +5 -10
  546. package/lib/module/skia/web/JsiSkPaint.js.map +1 -0
  547. package/lib/module/skia/web/JsiSkPath.js +324 -0
  548. package/lib/module/skia/web/JsiSkPath.js.map +1 -0
  549. package/lib/module/skia/web/JsiSkPathEffect.js +8 -0
  550. package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -0
  551. package/lib/module/skia/web/JsiSkPathEffectFactory.js +67 -0
  552. package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -0
  553. package/lib/module/skia/web/JsiSkPathFactory.js +47 -0
  554. package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -0
  555. package/lib/module/skia/web/JsiSkPicture.js +18 -0
  556. package/lib/module/skia/web/JsiSkPicture.js.map +1 -0
  557. package/lib/module/skia/web/JsiSkPictureFactory.js +19 -0
  558. package/lib/module/skia/web/JsiSkPictureFactory.js.map +1 -0
  559. package/lib/module/skia/web/JsiSkPictureRecorder.js +18 -0
  560. package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -0
  561. package/lib/module/skia/web/JsiSkPoint.js +16 -0
  562. package/lib/module/skia/web/JsiSkPoint.js.map +1 -0
  563. package/lib/module/skia/web/JsiSkRRect.js +21 -0
  564. package/lib/module/skia/web/JsiSkRRect.js.map +1 -0
  565. package/lib/module/skia/web/JsiSkRSXform.js +8 -0
  566. package/lib/module/skia/web/JsiSkRSXform.js.map +1 -0
  567. package/lib/module/skia/web/{api/JsiSkRect.js → JsiSkRect.js} +8 -0
  568. package/lib/module/skia/web/JsiSkRect.js.map +1 -0
  569. package/lib/module/skia/web/JsiSkRuntimeEffect.js +33 -0
  570. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -0
  571. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +19 -0
  572. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
  573. package/lib/module/skia/web/JsiSkSVGFactory.js +16 -0
  574. package/lib/module/skia/web/JsiSkSVGFactory.js.map +1 -0
  575. package/lib/module/skia/web/JsiSkShader.js +8 -0
  576. package/lib/module/skia/web/JsiSkShader.js.map +1 -0
  577. package/lib/module/skia/web/JsiSkShaderFactory.js +41 -0
  578. package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -0
  579. package/lib/module/skia/web/{api/JsiSkSurface.js → JsiSkSurface.js} +0 -0
  580. package/lib/module/skia/web/{api/JsiSkSurface.js.map → JsiSkSurface.js.map} +1 -1
  581. package/lib/module/skia/web/{api/JsiSkSurfaceFactory.js → JsiSkSurfaceFactory.js} +0 -0
  582. package/lib/module/skia/web/{api/JsiSkSurfaceFactory.js.map → JsiSkSurfaceFactory.js.map} +1 -1
  583. package/lib/module/skia/web/JsiSkTextBlob.js +8 -0
  584. package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -0
  585. package/lib/module/skia/web/JsiSkTextBlobFactory.js +25 -0
  586. package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -0
  587. package/lib/module/skia/web/JsiSkTypeface.js +18 -0
  588. package/lib/module/skia/web/JsiSkTypeface.js.map +1 -0
  589. package/lib/module/skia/web/JsiSkTypefaceFactory.js +19 -0
  590. package/lib/module/skia/web/JsiSkTypefaceFactory.js.map +1 -0
  591. package/lib/module/skia/web/JsiSkVertices.js +17 -0
  592. package/lib/module/skia/web/JsiSkVertices.js.map +1 -0
  593. package/lib/module/skia/web/JsiSkVerticesFactory.js +39 -0
  594. package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -0
  595. package/lib/module/skia/web/JsiSkia.js +61 -0
  596. package/lib/module/skia/web/JsiSkia.js.map +1 -0
  597. package/lib/module/skia/web/index.js +1 -1
  598. package/lib/module/skia/web/index.js.map +1 -1
  599. package/lib/module/values/web/api.js +2 -2
  600. package/lib/module/values/web/api.js.map +1 -1
  601. package/lib/module/views/SkiaView.web.js +202 -0
  602. package/lib/module/views/SkiaView.web.js.map +1 -0
  603. package/lib/module/views/types.js.map +1 -1
  604. package/lib/module/views/useTouchHandler.js +64 -43
  605. package/lib/module/views/useTouchHandler.js.map +1 -1
  606. package/lib/module/web/index.js +10 -0
  607. package/lib/module/web/index.js.map +1 -0
  608. package/lib/typescript/src/animation/functions/index.d.ts +4 -2
  609. package/lib/typescript/src/animation/functions/interpolatePaths.d.ts +17 -0
  610. package/lib/typescript/src/animation/functions/interpolateVector.d.ts +10 -0
  611. package/lib/typescript/src/index.d.ts +1 -0
  612. package/lib/typescript/src/renderer/Canvas.d.ts +3 -14
  613. package/lib/typescript/src/renderer/DrawingContext.d.ts +3 -3
  614. package/lib/typescript/src/renderer/components/Blend.d.ts +1 -1
  615. package/lib/typescript/src/renderer/components/Group.d.ts +1 -1
  616. package/lib/typescript/src/renderer/components/Paint.d.ts +1 -1
  617. package/lib/typescript/src/renderer/components/Picture.d.ts +1 -1
  618. package/lib/typescript/src/renderer/components/colorFilters/BlendColor.d.ts +2 -2
  619. package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +2 -2
  620. package/lib/typescript/src/renderer/components/image/BoxFit.d.ts +13 -3
  621. package/lib/typescript/src/renderer/components/image/Image.d.ts +1 -1
  622. package/lib/typescript/src/renderer/components/image/ImageSVG.d.ts +1 -1
  623. package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +2 -2
  624. package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +1 -1
  625. package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +1 -1
  626. package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +2 -2
  627. package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +2 -1
  628. package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +1 -1
  629. package/lib/typescript/src/renderer/components/imageFilters/getInput.d.ts +2 -1
  630. package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +1 -1
  631. package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +1 -1
  632. package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +1 -1
  633. package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +1 -1
  634. package/lib/typescript/src/renderer/components/shaders/Color.d.ts +1 -1
  635. package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +4 -4
  636. package/lib/typescript/src/renderer/components/shaders/LinearGradient.d.ts +2 -1
  637. package/lib/typescript/src/renderer/components/shaders/RadialGradient.d.ts +2 -1
  638. package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +2 -8
  639. package/lib/typescript/src/renderer/components/shaders/SweepGradient.d.ts +2 -1
  640. package/lib/typescript/src/renderer/components/shaders/TwoPointConicalGradient.d.ts +2 -1
  641. package/lib/typescript/src/renderer/components/shapes/Box.d.ts +1 -1
  642. package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +4 -1
  643. package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +1 -1
  644. package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +1 -1
  645. package/lib/typescript/src/renderer/components/shapes/Line.d.ts +2 -1
  646. package/lib/typescript/src/renderer/components/shapes/Patch.d.ts +3 -3
  647. package/lib/typescript/src/renderer/components/shapes/Path.d.ts +1 -1
  648. package/lib/typescript/src/renderer/components/shapes/Points.d.ts +2 -2
  649. package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +2 -2
  650. package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +1 -1
  651. package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +1 -1
  652. package/lib/typescript/src/renderer/components/text/TextPath.d.ts +1 -1
  653. package/lib/typescript/src/renderer/index.d.ts +1 -1
  654. package/lib/typescript/src/renderer/nodes/Declaration.d.ts +1 -1
  655. package/lib/typescript/src/renderer/nodes/Node.d.ts +1 -1
  656. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +0 -2
  657. package/lib/typescript/src/renderer/processors/Circles.d.ts +2 -2
  658. package/lib/typescript/src/renderer/processors/Clips.d.ts +2 -2
  659. package/lib/typescript/src/{skia/core → renderer/processors}/Color.d.ts +2 -2
  660. package/lib/typescript/src/renderer/processors/Font.d.ts +2 -2
  661. package/lib/typescript/src/renderer/processors/Paint.d.ts +3 -3
  662. package/lib/typescript/src/renderer/processors/Paths.d.ts +2 -2
  663. package/lib/typescript/src/renderer/processors/Radius.d.ts +2 -2
  664. package/lib/typescript/src/renderer/processors/Rects.d.ts +3 -14
  665. package/lib/typescript/src/renderer/processors/Transform.d.ts +3 -4
  666. package/lib/typescript/src/renderer/processors/index.d.ts +2 -1
  667. package/lib/typescript/src/renderer/processors/math/Coordinates.d.ts +1 -1
  668. package/lib/typescript/src/renderer/processors/math/Transforms.d.ts +1 -1
  669. package/lib/typescript/src/renderer/processors/math/index.d.ts +0 -2
  670. package/lib/typescript/src/renderer/useCanvas.d.ts +14 -0
  671. package/lib/typescript/src/skia/Skia.web.d.ts +1 -0
  672. package/lib/typescript/src/skia/core/Data.d.ts +4 -4
  673. package/lib/typescript/src/skia/core/Matrix.d.ts +2 -0
  674. package/lib/typescript/src/skia/core/Paint.d.ts +0 -1
  675. package/lib/typescript/src/skia/core/RRect.d.ts +2 -0
  676. package/lib/typescript/src/skia/core/Rect.d.ts +8 -0
  677. package/lib/typescript/src/skia/core/Vector.d.ts +12 -0
  678. package/lib/typescript/src/skia/core/index.d.ts +5 -3
  679. package/lib/typescript/src/skia/types/ContourMeasure.d.ts +2 -4
  680. package/lib/typescript/src/skia/types/Data/Data.d.ts +1 -1
  681. package/lib/typescript/src/skia/types/Data/DataFactory.d.ts +4 -4
  682. package/lib/typescript/src/skia/types/Font/Font.d.ts +8 -9
  683. package/lib/typescript/src/skia/types/FontMgr/FontMgr.d.ts +1 -1
  684. package/lib/typescript/src/skia/types/FontMgr/FontMgrFactory.d.ts +2 -2
  685. package/lib/typescript/src/skia/types/Image/Image.d.ts +5 -5
  686. package/lib/typescript/src/skia/types/Image/ImageFactory.d.ts +3 -3
  687. package/lib/typescript/src/skia/types/Matrix.d.ts +15 -14
  688. package/lib/typescript/src/skia/types/Paint/Paint.d.ts +3 -3
  689. package/lib/typescript/src/skia/types/Path/Path.d.ts +27 -22
  690. package/lib/typescript/src/skia/types/Path/PathFactory.d.ts +5 -0
  691. package/lib/typescript/src/skia/types/Picture/Picture.d.ts +2 -2
  692. package/lib/typescript/src/skia/types/Point.d.ts +1 -0
  693. package/lib/typescript/src/skia/types/RRect.d.ts +1 -0
  694. package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffect.d.ts +3 -1
  695. package/lib/typescript/src/skia/types/SVG/SVGFactory.d.ts +2 -2
  696. package/lib/typescript/src/skia/types/Shader/Shader.d.ts +8 -0
  697. package/lib/typescript/src/skia/types/Skia.d.ts +1 -1
  698. package/lib/typescript/src/skia/types/Typeface/TypefaceFactory.d.ts +2 -2
  699. package/lib/typescript/src/skia/web/{api/Host.d.ts → Host.d.ts} +4 -1
  700. package/lib/typescript/src/skia/web/{api/JsiSkCanvas.d.ts → JsiSkCanvas.d.ts} +1 -1
  701. package/lib/typescript/src/skia/web/JsiSkColor.d.ts +2 -0
  702. package/lib/typescript/src/skia/web/{api/JsiSkColorFilter.d.ts → JsiSkColorFilter.d.ts} +1 -1
  703. package/lib/typescript/src/skia/web/JsiSkColorFilterFactory.d.ts +14 -0
  704. package/lib/typescript/src/skia/web/JsiSkContourMeasure.d.ts +16 -0
  705. package/lib/typescript/src/skia/web/JsiSkContourMeasureIter.d.ts +8 -0
  706. package/lib/typescript/src/skia/web/JsiSkData.d.ts +8 -0
  707. package/lib/typescript/src/skia/web/JsiSkDataFactory.d.ts +19 -0
  708. package/lib/typescript/src/skia/web/JsiSkFont.d.ts +33 -0
  709. package/lib/typescript/src/skia/web/JsiSkFontMgr.d.ts +9 -0
  710. package/lib/typescript/src/skia/web/JsiSkFontMgrFactory.d.ts +8 -0
  711. package/lib/typescript/src/skia/web/{api/JsiSkImage.d.ts → JsiSkImage.d.ts} +4 -4
  712. package/lib/typescript/src/skia/web/JsiSkImageFactory.d.ts +10 -0
  713. package/lib/typescript/src/skia/web/JsiSkImageFilter.d.ts +6 -0
  714. package/lib/typescript/src/skia/web/JsiSkImageFilterFactory.d.ts +19 -0
  715. package/lib/typescript/src/skia/web/JsiSkMaskFilter.d.ts +6 -0
  716. package/lib/typescript/src/skia/web/JsiSkMaskFilterFactory.d.ts +9 -0
  717. package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +11 -0
  718. package/lib/typescript/src/skia/web/{api/JsiSkPaint.d.ts → JsiSkPaint.d.ts} +1 -1
  719. package/lib/typescript/src/skia/web/JsiSkPath.d.ts +56 -0
  720. package/lib/typescript/src/skia/web/JsiSkPathEffect.d.ts +6 -0
  721. package/lib/typescript/src/skia/web/JsiSkPathEffectFactory.d.ts +15 -0
  722. package/lib/typescript/src/skia/web/JsiSkPathFactory.d.ts +13 -0
  723. package/lib/typescript/src/skia/web/JsiSkPicture.d.ts +9 -0
  724. package/lib/typescript/src/skia/web/JsiSkPictureFactory.d.ts +8 -0
  725. package/lib/typescript/src/skia/web/JsiSkPictureRecorder.d.ts +11 -0
  726. package/lib/typescript/src/skia/web/JsiSkPoint.d.ts +8 -0
  727. package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +10 -0
  728. package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +8 -0
  729. package/lib/typescript/src/skia/web/{api/JsiSkRect.d.ts → JsiSkRect.d.ts} +2 -1
  730. package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +14 -0
  731. package/lib/typescript/src/skia/web/JsiSkRuntimeEffectFactory.d.ts +8 -0
  732. package/lib/typescript/src/skia/web/JsiSkSVGFactory.d.ts +9 -0
  733. package/lib/typescript/src/skia/web/JsiSkShader.d.ts +6 -0
  734. package/lib/typescript/src/skia/web/JsiSkShaderFactory.d.ts +16 -0
  735. package/lib/typescript/src/skia/web/{api/JsiSkSurface.d.ts → JsiSkSurface.d.ts} +1 -1
  736. package/lib/typescript/src/skia/web/{api/JsiSkSurfaceFactory.d.ts → JsiSkSurfaceFactory.d.ts} +1 -1
  737. package/lib/typescript/src/skia/web/JsiSkTextBlob.d.ts +6 -0
  738. package/lib/typescript/src/skia/web/JsiSkTextBlobFactory.d.ts +12 -0
  739. package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +8 -0
  740. package/lib/typescript/src/skia/web/JsiSkTypefaceFactory.d.ts +8 -0
  741. package/lib/typescript/src/skia/web/JsiSkVertices.d.ts +9 -0
  742. package/lib/typescript/src/skia/web/JsiSkVerticesFactory.d.ts +4 -0
  743. package/lib/typescript/src/skia/web/JsiSkia.d.ts +3 -0
  744. package/lib/typescript/src/skia/web/index.d.ts +1 -1
  745. package/lib/typescript/src/views/SkiaView.web.d.ts +56 -0
  746. package/lib/typescript/src/views/types.d.ts +1 -0
  747. package/lib/typescript/src/views/useTouchHandler.d.ts +11 -1
  748. package/lib/typescript/src/web/index.d.ts +5 -0
  749. package/package.json +4 -5
  750. package/src/animation/functions/index.ts +4 -2
  751. package/src/animation/functions/interpolatePaths.ts +38 -0
  752. package/src/animation/functions/interpolateVector.ts +26 -0
  753. package/src/index.ts +1 -0
  754. package/src/renderer/Canvas.tsx +13 -35
  755. package/src/renderer/DrawingContext.ts +3 -4
  756. package/src/renderer/HostConfig.ts +2 -2
  757. package/src/renderer/components/Blend.tsx +12 -10
  758. package/src/renderer/components/Compose.tsx +2 -2
  759. package/src/renderer/components/Group.tsx +11 -6
  760. package/src/renderer/components/Mask.tsx +5 -3
  761. package/src/renderer/components/Paint.tsx +5 -4
  762. package/src/renderer/components/Picture.tsx +1 -1
  763. package/src/renderer/components/backdrop/BackdropFilter.tsx +1 -1
  764. package/src/renderer/components/colorFilters/BlendColor.tsx +4 -4
  765. package/src/renderer/components/colorFilters/Compose.ts +3 -2
  766. package/src/renderer/components/colorFilters/Lerp.tsx +3 -2
  767. package/src/renderer/components/colorFilters/LinearToSRGBGamma.tsx +2 -3
  768. package/src/renderer/components/colorFilters/LumaColorFilter.tsx +2 -3
  769. package/src/renderer/components/colorFilters/Matrix.tsx +2 -3
  770. package/src/renderer/components/colorFilters/SRGBToLinearGamma.tsx +2 -3
  771. package/src/renderer/components/image/BoxFit.ts +7 -13
  772. package/src/renderer/components/image/Image.tsx +3 -3
  773. package/src/renderer/components/image/ImageSVG.tsx +3 -3
  774. package/src/renderer/components/image/ImageShader.tsx +8 -7
  775. package/src/renderer/components/imageFilters/Blur.tsx +12 -10
  776. package/src/renderer/components/imageFilters/DisplacementMap.tsx +4 -4
  777. package/src/renderer/components/imageFilters/InnerShadow.tsx +4 -3
  778. package/src/renderer/components/imageFilters/Morphology.tsx +3 -4
  779. package/src/renderer/components/imageFilters/Offset.tsx +5 -4
  780. package/src/renderer/components/imageFilters/RuntimeShader.tsx +12 -4
  781. package/src/renderer/components/imageFilters/Shadow.tsx +10 -6
  782. package/src/renderer/components/imageFilters/getInput.ts +3 -2
  783. package/src/renderer/components/maskFilters/Blur.tsx +2 -2
  784. package/src/renderer/components/pathEffects/Corner.tsx +2 -2
  785. package/src/renderer/components/pathEffects/Dash.tsx +2 -2
  786. package/src/renderer/components/pathEffects/Discrete.tsx +2 -2
  787. package/src/renderer/components/pathEffects/Line2D.tsx +3 -3
  788. package/src/renderer/components/pathEffects/Path1D.tsx +3 -3
  789. package/src/renderer/components/pathEffects/Path2D.tsx +4 -4
  790. package/src/renderer/components/pathEffects/Sum.tsx +7 -5
  791. package/src/renderer/components/shaders/Color.tsx +7 -5
  792. package/src/renderer/components/shaders/FractalNoise.tsx +1 -2
  793. package/src/renderer/components/shaders/Gradient.ts +7 -10
  794. package/src/renderer/components/shaders/LinearGradient.tsx +4 -4
  795. package/src/renderer/components/shaders/RadialGradient.tsx +4 -4
  796. package/src/renderer/components/shaders/Shader.tsx +6 -56
  797. package/src/renderer/components/shaders/SweepGradient.tsx +4 -4
  798. package/src/renderer/components/shaders/Turbulence.tsx +1 -2
  799. package/src/renderer/components/shaders/TwoPointConicalGradient.tsx +4 -4
  800. package/src/renderer/components/shapes/Box.tsx +36 -17
  801. package/src/renderer/components/shapes/Circle.tsx +3 -4
  802. package/src/renderer/components/shapes/DiffRect.tsx +1 -1
  803. package/src/renderer/components/shapes/FitBox.tsx +1 -1
  804. package/src/renderer/components/shapes/Line.tsx +2 -1
  805. package/src/renderer/components/shapes/Oval.tsx +6 -4
  806. package/src/renderer/components/shapes/Patch.tsx +6 -10
  807. package/src/renderer/components/shapes/Path.tsx +3 -3
  808. package/src/renderer/components/shapes/Points.tsx +2 -2
  809. package/src/renderer/components/shapes/Rect.tsx +6 -4
  810. package/src/renderer/components/shapes/RoundedRect.tsx +2 -2
  811. package/src/renderer/components/shapes/Vertices.tsx +5 -4
  812. package/src/renderer/components/text/Glyphs.tsx +6 -3
  813. package/src/renderer/components/text/Text.tsx +2 -2
  814. package/src/renderer/components/text/TextBlob.tsx +1 -1
  815. package/src/renderer/components/text/TextPath.tsx +3 -4
  816. package/src/renderer/index.ts +1 -1
  817. package/src/renderer/nodes/Declaration.tsx +1 -1
  818. package/src/renderer/nodes/Drawing.tsx +3 -2
  819. package/src/renderer/nodes/Node.ts +1 -1
  820. package/src/renderer/processors/Animations/Animations.ts +0 -3
  821. package/src/renderer/processors/Circles.ts +4 -4
  822. package/src/renderer/processors/Clips.ts +9 -4
  823. package/src/{skia/core → renderer/processors}/Color.ts +2 -3
  824. package/src/renderer/processors/Font.ts +10 -3
  825. package/src/renderer/processors/Paint.ts +12 -7
  826. package/src/renderer/processors/Paths.ts +3 -3
  827. package/src/renderer/processors/Radius.ts +3 -4
  828. package/src/renderer/processors/Rects.ts +10 -45
  829. package/src/renderer/processors/Transform.ts +28 -19
  830. package/src/renderer/processors/index.ts +2 -1
  831. package/src/renderer/processors/math/Coordinates.ts +1 -1
  832. package/src/renderer/processors/math/Transforms.ts +2 -1
  833. package/src/renderer/processors/math/index.ts +0 -2
  834. package/src/renderer/useCanvas.ts +21 -0
  835. package/src/skia/NativeSetup.ts +2 -2
  836. package/src/skia/Skia.web.ts +3 -0
  837. package/src/skia/core/Data.ts +17 -14
  838. package/src/skia/core/Font.ts +2 -4
  839. package/src/skia/core/Matrix.ts +6 -0
  840. package/src/skia/core/Paint.ts +2 -6
  841. package/src/skia/core/Path.ts +14 -6
  842. package/src/skia/core/RRect.tsx +5 -0
  843. package/src/skia/core/Rect.ts +33 -0
  844. package/src/skia/core/Vector.ts +11 -0
  845. package/src/skia/core/index.ts +5 -3
  846. package/src/skia/types/ContourMeasure.tsx +2 -4
  847. package/src/skia/types/Data/Data.ts +1 -1
  848. package/src/skia/types/Data/DataFactory.ts +4 -4
  849. package/src/skia/types/Font/Font.ts +9 -14
  850. package/src/skia/types/FontMgr/FontMgr.ts +1 -1
  851. package/src/skia/types/FontMgr/FontMgrFactory.ts +2 -2
  852. package/src/skia/types/Image/Image.ts +4 -4
  853. package/src/skia/types/Image/ImageFactory.ts +3 -3
  854. package/src/skia/types/Matrix.ts +79 -14
  855. package/src/skia/types/Paint/Paint.ts +1 -1
  856. package/src/skia/types/Path/Path.ts +33 -23
  857. package/src/skia/types/Path/PathFactory.ts +7 -0
  858. package/src/skia/types/Picture/Picture.ts +2 -2
  859. package/src/skia/types/Point.ts +2 -0
  860. package/src/skia/types/RRect.ts +5 -0
  861. package/src/skia/types/RuntimeEffect/RuntimeEffect.ts +4 -1
  862. package/src/skia/types/SVG/SVGFactory.ts +2 -2
  863. package/src/skia/types/Shader/Shader.ts +59 -0
  864. package/src/skia/types/Skia.ts +1 -1
  865. package/src/skia/types/Typeface/TypefaceFactory.ts +2 -2
  866. package/src/skia/web/{api/Host.ts → Host.ts} +7 -1
  867. package/src/skia/web/{api/JsiSkCanvas.ts → JsiSkCanvas.ts} +20 -12
  868. package/src/skia/web/{api/JsiSkColor.ts → JsiSkColor.ts} +152 -6
  869. package/src/skia/web/{api/JsiSkColorFilter.ts → JsiSkColorFilter.ts} +1 -1
  870. package/src/skia/web/JsiSkColorFilterFactory.ts +67 -0
  871. package/src/skia/web/JsiSkContourMeasure.ts +35 -0
  872. package/src/skia/web/JsiSkContourMeasureIter.ts +23 -0
  873. package/src/skia/web/JsiSkData.ts +13 -0
  874. package/src/skia/web/JsiSkDataFactory.ts +35 -0
  875. package/src/skia/web/JsiSkFont.ts +128 -0
  876. package/src/skia/web/JsiSkFontMgr.ts +38 -0
  877. package/src/skia/web/JsiSkFontMgrFactory.ts +18 -0
  878. package/src/skia/web/JsiSkImage.ts +87 -0
  879. package/src/skia/web/JsiSkImageFactory.ts +40 -0
  880. package/src/skia/web/JsiSkImageFilter.ts +14 -0
  881. package/src/skia/web/JsiSkImageFilterFactory.ts +144 -0
  882. package/src/skia/web/JsiSkMaskFilter.ts +14 -0
  883. package/src/skia/web/JsiSkMaskFilterFactory.ts +20 -0
  884. package/src/skia/web/JsiSkMatrix.ts +54 -0
  885. package/src/skia/web/{api/JsiSkPaint.ts → JsiSkPaint.ts} +7 -6
  886. package/src/skia/web/JsiSkPath.ts +386 -0
  887. package/src/skia/web/JsiSkPathEffect.ts +14 -0
  888. package/src/skia/web/JsiSkPathEffectFactory.ts +85 -0
  889. package/src/skia/web/JsiSkPathFactory.ts +54 -0
  890. package/src/skia/web/JsiSkPicture.ts +45 -0
  891. package/src/skia/web/JsiSkPictureFactory.ts +20 -0
  892. package/src/skia/web/JsiSkPictureRecorder.ts +31 -0
  893. package/src/skia/web/JsiSkPoint.ts +19 -0
  894. package/src/skia/web/JsiSkRRect.ts +27 -0
  895. package/src/skia/web/JsiSkRSXform.ts +16 -0
  896. package/src/skia/web/{api/JsiSkRect.ts → JsiSkRect.ts} +11 -1
  897. package/src/skia/web/JsiSkRuntimeEffect.ts +57 -0
  898. package/src/skia/web/JsiSkRuntimeEffectFactory.ts +23 -0
  899. package/src/skia/web/JsiSkSVGFactory.ts +20 -0
  900. package/src/skia/web/JsiSkShader.ts +14 -0
  901. package/src/skia/web/JsiSkShaderFactory.ts +181 -0
  902. package/src/skia/web/{api/JsiSkSurface.ts → JsiSkSurface.ts} +1 -1
  903. package/src/skia/web/{api/JsiSkSurfaceFactory.ts → JsiSkSurfaceFactory.ts} +1 -1
  904. package/src/skia/web/JsiSkTextBlob.ts +14 -0
  905. package/src/skia/web/JsiSkTextBlobFactory.ts +49 -0
  906. package/src/skia/web/JsiSkTypeface.ts +28 -0
  907. package/src/skia/web/JsiSkTypefaceFactory.tsx +20 -0
  908. package/src/skia/web/JsiSkVertices.ts +23 -0
  909. package/src/skia/web/JsiSkVerticesFactory.ts +41 -0
  910. package/src/skia/web/JsiSkia.ts +98 -0
  911. package/src/skia/web/index.ts +1 -1
  912. package/src/values/web/api.ts +2 -2
  913. package/src/views/SkiaView.web.tsx +190 -0
  914. package/src/views/types.ts +1 -0
  915. package/src/views/useTouchHandler.ts +82 -51
  916. package/src/web/index.ts +15 -0
  917. package/lib/commonjs/renderer/processors/math/Matrix3.js +0 -66
  918. package/lib/commonjs/renderer/processors/math/Matrix3.js.map +0 -1
  919. package/lib/commonjs/renderer/processors/math/Vector.js +0 -60
  920. package/lib/commonjs/renderer/processors/math/Vector.js.map +0 -1
  921. package/lib/commonjs/skia/core/Color.js.map +0 -1
  922. package/lib/commonjs/skia/core/Shader.js +0 -18
  923. package/lib/commonjs/skia/core/Shader.js.map +0 -1
  924. package/lib/commonjs/skia/web/api/Host.js.map +0 -1
  925. package/lib/commonjs/skia/web/api/JsiSkCanvas.js.map +0 -1
  926. package/lib/commonjs/skia/web/api/JsiSkColor.js.map +0 -1
  927. package/lib/commonjs/skia/web/api/JsiSkImage.js.map +0 -1
  928. package/lib/commonjs/skia/web/api/JsiSkPaint.js.map +0 -1
  929. package/lib/commonjs/skia/web/api/JsiSkRect.js.map +0 -1
  930. package/lib/commonjs/skia/web/api/index.js +0 -26
  931. package/lib/commonjs/skia/web/api/index.js.map +0 -1
  932. package/lib/module/renderer/processors/math/Matrix3.js +0 -55
  933. package/lib/module/renderer/processors/math/Matrix3.js.map +0 -1
  934. package/lib/module/renderer/processors/math/Vector.js.map +0 -1
  935. package/lib/module/skia/core/Color.js.map +0 -1
  936. package/lib/module/skia/core/Shader.js +0 -7
  937. package/lib/module/skia/core/Shader.js.map +0 -1
  938. package/lib/module/skia/web/api/Host.js.map +0 -1
  939. package/lib/module/skia/web/api/JsiSkCanvas.js.map +0 -1
  940. package/lib/module/skia/web/api/JsiSkColor.js.map +0 -1
  941. package/lib/module/skia/web/api/JsiSkImage.js +0 -46
  942. package/lib/module/skia/web/api/JsiSkImage.js.map +0 -1
  943. package/lib/module/skia/web/api/JsiSkPaint.js.map +0 -1
  944. package/lib/module/skia/web/api/JsiSkRect.js.map +0 -1
  945. package/lib/module/skia/web/api/index.js +0 -13
  946. package/lib/module/skia/web/api/index.js.map +0 -1
  947. package/lib/typescript/src/renderer/processors/math/Matrix3.d.ts +0 -10
  948. package/lib/typescript/src/renderer/processors/math/Vector.d.ts +0 -23
  949. package/lib/typescript/src/skia/core/Shader.d.ts +0 -1
  950. package/lib/typescript/src/skia/web/api/JsiSkColor.d.ts +0 -3
  951. package/lib/typescript/src/skia/web/api/index.d.ts +0 -10
  952. package/src/animation/timing/functions/__tests__/timing.spec.ts +0 -29
  953. package/src/renderer/processors/math/Matrix3.ts +0 -73
  954. package/src/renderer/processors/math/Vector.ts +0 -38
  955. package/src/skia/__tests__/Rects.spec.ts +0 -40
  956. package/src/skia/__tests__/snapshots/lightblue-rect.png +0 -0
  957. package/src/skia/core/Shader.ts +0 -9
  958. package/src/skia/web/api/JsiSkImage.ts +0 -66
  959. package/src/skia/web/api/index.ts +0 -15
  960. package/src/values/web/__tests__/RNSkAnimation.spec.ts +0 -21
  961. package/src/values/web/__tests__/RNSkDerivedValue.spec.ts +0 -15
  962. package/src/values/web/__tests__/RNSkReadonlyValue.spec.ts +0 -8
  963. package/src/values/web/__tests__/RNSkValue.spec.ts +0 -11
@@ -3,9 +3,53 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.isShader = void 0;
6
+ exports.processUniforms = exports.isShader = void 0;
7
7
 
8
8
  const isShader = obj => obj !== null && obj.__typename__ === "Shader";
9
9
 
10
10
  exports.isShader = isShader;
11
+
12
+ const isVector = obj => // We have an issue to check property existence on JSI backed instances
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+ obj.x !== undefined && obj.y !== undefined;
15
+
16
+ const processValue = value => {
17
+ if (isVector(value)) {
18
+ return [value.x, value.y];
19
+ }
20
+
21
+ return value;
22
+ };
23
+
24
+ const processUniforms = (source, uniforms, builder) => {
25
+ const processed = new Array(source.getUniformCount()).fill(0).flatMap((_, i) => {
26
+ const name = source.getUniformName(i);
27
+ const value = uniforms[name];
28
+
29
+ if (value === undefined) {
30
+ throw new Error(`No value specified for uniform ${name}`);
31
+ }
32
+
33
+ const result = Array.isArray(value) ? value.flatMap(processValue) : processValue(value);
34
+ builder === null || builder === void 0 ? void 0 : builder.setUniform(name, typeof result === "number" ? [result] : result);
35
+ return result;
36
+ });
37
+ const names = Object.keys(uniforms);
38
+
39
+ if (names.length > source.getUniformCount()) {
40
+ const usedUniforms = new Array(source.getUniformCount()).fill(0).map((_, i) => source.getUniformName(i));
41
+ const unusedUniform = names.map(name => {
42
+ if (usedUniforms.indexOf(name) === -1) {
43
+ return name;
44
+ }
45
+
46
+ return null;
47
+ }).filter(n => n !== null);
48
+ console.warn("Unused uniforms were provided: " + unusedUniform.join(", "));
49
+ }
50
+
51
+ return processed;
52
+ };
53
+
54
+ exports.processUniforms = processUniforms;
11
55
  //# sourceMappingURL=Shader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Shader.ts"],"names":["isShader","obj","__typename__"],"mappings":";;;;;;;AAEO,MAAMA,QAAQ,GAAIC,GAAD,IACtBA,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACC,YAAJ,KAAqB,QADhC","sourcesContent":["import type { SkJSIInstance } from \"../JsiInstance\";\n\nexport const isShader = (obj: SkJSIInstance<string> | null): obj is SkShader =>\n obj !== null && obj.__typename__ === \"Shader\";\n\nexport type SkShader = SkJSIInstance<\"Shader\">;\n"]}
1
+ {"version":3,"sources":["Shader.ts"],"names":["isShader","obj","__typename__","isVector","x","undefined","y","processValue","value","processUniforms","source","uniforms","builder","processed","Array","getUniformCount","fill","flatMap","_","i","name","getUniformName","Error","result","isArray","setUniform","names","Object","keys","length","usedUniforms","map","unusedUniform","indexOf","filter","n","console","warn","join"],"mappings":";;;;;;;AAIO,MAAMA,QAAQ,GAAIC,GAAD,IACtBA,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACC,YAAJ,KAAqB,QADhC;;;;AAaP,MAAMC,QAAQ,GAAIF,GAAD,IACf;AACA;AACCA,GAAD,CAAaG,CAAb,KAAmBC,SAAnB,IAAiCJ,GAAD,CAAaK,CAAb,KAAmBD,SAHrD;;AAKA,MAAME,YAAY,GAAIC,KAAD,IAAqD;AACxE,MAAIL,QAAQ,CAACK,KAAD,CAAZ,EAAqB;AACnB,WAAO,CAACA,KAAK,CAACJ,CAAP,EAAUI,KAAK,CAACF,CAAhB,CAAP;AACD;;AACD,SAAOE,KAAP;AACD,CALD;;AAOO,MAAMC,eAAe,GAAG,CAC7BC,MAD6B,EAE7BC,QAF6B,EAG7BC,OAH6B,KAI1B;AACH,QAAMC,SAAS,GAAG,IAAIC,KAAJ,CAAUJ,MAAM,CAACK,eAAP,EAAV,EACfC,IADe,CACV,CADU,EAEfC,OAFe,CAEP,CAACC,CAAD,EAAIC,CAAJ,KAAU;AACjB,UAAMC,IAAI,GAAGV,MAAM,CAACW,cAAP,CAAsBF,CAAtB,CAAb;AACA,UAAMX,KAAK,GAAGG,QAAQ,CAACS,IAAD,CAAtB;;AACA,QAAIZ,KAAK,KAAKH,SAAd,EAAyB;AACvB,YAAM,IAAIiB,KAAJ,CAAW,kCAAiCF,IAAK,EAAjD,CAAN;AACD;;AACD,UAAMG,MAAM,GAAGT,KAAK,CAACU,OAAN,CAAchB,KAAd,IACXA,KAAK,CAACS,OAAN,CAAcV,YAAd,CADW,GAEXA,YAAY,CAACC,KAAD,CAFhB;AAGAI,IAAAA,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAEa,UAAT,CAAoBL,IAApB,EAA0B,OAAOG,MAAP,KAAkB,QAAlB,GAA6B,CAACA,MAAD,CAA7B,GAAwCA,MAAlE;AACA,WAAOA,MAAP;AACD,GAbe,CAAlB;AAcA,QAAMG,KAAK,GAAGC,MAAM,CAACC,IAAP,CAAYjB,QAAZ,CAAd;;AACA,MAAIe,KAAK,CAACG,MAAN,GAAenB,MAAM,CAACK,eAAP,EAAnB,EAA6C;AAC3C,UAAMe,YAAY,GAAG,IAAIhB,KAAJ,CAAUJ,MAAM,CAACK,eAAP,EAAV,EAClBC,IADkB,CACb,CADa,EAElBe,GAFkB,CAEd,CAACb,CAAD,EAAIC,CAAJ,KAAUT,MAAM,CAACW,cAAP,CAAsBF,CAAtB,CAFI,CAArB;AAGA,UAAMa,aAAa,GAAGN,KAAK,CACxBK,GADmB,CACdX,IAAD,IAAU;AACb,UAAIU,YAAY,CAACG,OAAb,CAAqBb,IAArB,MAA+B,CAAC,CAApC,EAAuC;AACrC,eAAOA,IAAP;AACD;;AACD,aAAO,IAAP;AACD,KANmB,EAOnBc,MAPmB,CAOXC,CAAD,IAAOA,CAAC,KAAK,IAPD,CAAtB;AAQAC,IAAAA,OAAO,CAACC,IAAR,CAAa,oCAAoCL,aAAa,CAACM,IAAd,CAAmB,IAAnB,CAAjD;AACD;;AACD,SAAOzB,SAAP;AACD,CAnCM","sourcesContent":["import type { SkJSIInstance } from \"../JsiInstance\";\nimport type { Vector } from \"../Point\";\nimport type { SkRuntimeEffect, SkRuntimeShaderBuilder } from \"../RuntimeEffect\";\n\nexport const isShader = (obj: SkJSIInstance<string> | null): obj is SkShader =>\n obj !== null && obj.__typename__ === \"Shader\";\n\nexport type SkShader = SkJSIInstance<\"Shader\">;\n\nexport type UniformValue = number | Vector | readonly number[];\n\nexport type Uniform = UniformValue | readonly UniformValue[];\n\nexport interface Uniforms {\n [name: string]: Uniform;\n}\n\nconst isVector = (obj: unknown): obj is Vector =>\n // We have an issue to check property existence on JSI backed instances\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (obj as any).x !== undefined && (obj as any).y !== undefined;\n\nconst processValue = (value: UniformValue): number | readonly number[] => {\n if (isVector(value)) {\n return [value.x, value.y];\n }\n return value;\n};\n\nexport const processUniforms = (\n source: SkRuntimeEffect,\n uniforms: Uniforms,\n builder?: SkRuntimeShaderBuilder\n) => {\n const processed = new Array(source.getUniformCount())\n .fill(0)\n .flatMap((_, i) => {\n const name = source.getUniformName(i);\n const value = uniforms[name];\n if (value === undefined) {\n throw new Error(`No value specified for uniform ${name}`);\n }\n const result = Array.isArray(value)\n ? value.flatMap(processValue)\n : processValue(value as UniformValue);\n builder?.setUniform(name, typeof result === \"number\" ? [result] : result);\n return result;\n });\n const names = Object.keys(uniforms);\n if (names.length > source.getUniformCount()) {\n const usedUniforms = new Array(source.getUniformCount())\n .fill(0)\n .map((_, i) => source.getUniformName(i));\n const unusedUniform = names\n .map((name) => {\n if (usedUniforms.indexOf(name) === -1) {\n return name;\n }\n return null;\n })\n .filter((n) => n !== null);\n console.warn(\"Unused uniforms were provided: \" + unusedUniform.join(\", \"));\n }\n return processed;\n};\n"]}
@@ -3,11 +3,20 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.toValue = exports.toUndefinedableValue = exports.toOptionalValue = exports.toNullableValue = exports.optEnum = exports.ckEnum = exports.HostObject = exports.Host = void 0;
6
+ exports.toValue = exports.toUndefinedableValue = exports.toOptionalValue = exports.toNullableValue = exports.optEnum = exports.ckEnum = exports.NotImplementedOnRNWeb = exports.HostObject = exports.Host = void 0;
7
7
 
8
8
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
9
 
10
10
  /* eslint-disable no-nested-ternary */
11
+ class NotImplementedOnRNWeb extends Error {
12
+ constructor() {
13
+ super("Not implemented on React Native Web");
14
+ }
15
+
16
+ }
17
+
18
+ exports.NotImplementedOnRNWeb = NotImplementedOnRNWeb;
19
+
11
20
  class Host {
12
21
  constructor(CanvasKit) {
13
22
  _defineProperty(this, "CanvasKit", void 0);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["Host.ts"],"names":["NotImplementedOnRNWeb","Error","constructor","Host","CanvasKit","HostObject","ref","typename","__typename__","toOptionalValue","value","undefined","toValue","toUndefinedableValue","toNullableValue","ckEnum","optEnum"],"mappings":";;;;;;;;;AAAA;AAKO,MAAMA,qBAAN,SAAoCC,KAApC,CAA0C;AAC/CC,EAAAA,WAAW,GAAG;AACZ,UAAM,qCAAN;AACD;;AAH8C;;;;AAM1C,MAAeC,IAAf,CAAoB;AAGzBD,EAAAA,WAAW,CAACE,SAAD,EAAuB;AAAA;;AAChC,SAAKA,SAAL,GAAiBA,SAAjB;AACD;;AALwB;;;;AAQpB,MAAeC,UAAf,SACGF,IADH,CAGP;AAIED,EAAAA,WAAW,CAACE,SAAD,EAAuBE,GAAvB,EAA+BC,QAA/B,EAA4C;AACrD,UAAMH,SAAN;;AADqD;;AAAA;;AAErD,SAAKE,GAAL,GAAWA,GAAX;AACA,SAAKE,YAAL,GAAoBD,QAApB;AACD;;AARH,C,CAWA;;;;;AAGO,MAAME,eAAe,GAC1BC,KAD6B,IAG7BA,KAAK,KAAKC,SAAV,GAAsBA,SAAtB,GAAkCD,KAAK,KAAK,IAAV,GAAiB,IAAjB,GAAwBE,OAAO,CAACF,KAAD,CAH5D;;;;AAKA,MAAMG,oBAAoB,GAC/BH,KADkC,IAEfA,KAAK,KAAKC,SAAV,GAAsBA,SAAtB,GAAkCC,OAAO,CAACF,KAAD,CAFvD;;;;AAIA,MAAMI,eAAe,GAAOJ,KAAJ,IAC7BA,KAAK,KAAK,IAAV,GAAiB,IAAjB,GAAwBE,OAAO,CAACF,KAAD,CAD1B;;;;AAGA,MAAME,OAAO,GAAOF,KAAJ,IACpBA,KAAD,CAAiCJ,GAD5B;;;;AAGA,MAAMS,MAAM,GAAIL,KAAD,KAAsC;AAAEA,EAAAA;AAAF,CAAtC,CAAf;;;;AACA,MAAMM,OAAO,GAClBN,KADqB,IAGrBA,KAAK,KAAKC,SAAV,GAAsBA,SAAtB,GAAkC;AAAED,EAAAA;AAAF,CAH7B","sourcesContent":["/* eslint-disable no-nested-ternary */\nimport type { CanvasKit, EmbindEnumEntity } from \"canvaskit-wasm\";\n\nimport type { SkJSIInstance } from \"../types\";\n\nexport class NotImplementedOnRNWeb extends Error {\n constructor() {\n super(\"Not implemented on React Native Web\");\n }\n}\n\nexport abstract class Host {\n readonly CanvasKit: CanvasKit;\n\n constructor(CanvasKit: CanvasKit) {\n this.CanvasKit = CanvasKit;\n }\n}\n\nexport abstract class HostObject<T, N extends string>\n extends Host\n implements SkJSIInstance<N>\n{\n readonly __typename__: N;\n readonly ref: T;\n\n constructor(CanvasKit: CanvasKit, ref: T, typename: N) {\n super(CanvasKit);\n this.ref = ref;\n this.__typename__ = typename;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type NonNullish = {};\n\nexport const toOptionalValue = <T>(\n value: NonNullish | undefined | null\n): T | undefined | null =>\n value === undefined ? undefined : value === null ? null : toValue(value);\n\nexport const toUndefinedableValue = <T>(\n value: NonNullish | undefined\n): T | undefined => (value === undefined ? undefined : toValue(value));\n\nexport const toNullableValue = <T>(value: NonNullish | null): T | null =>\n value === null ? null : toValue(value);\n\nexport const toValue = <T>(value: NonNullish): T =>\n (value as HostObject<T, string>).ref;\n\nexport const ckEnum = (value: number): EmbindEnumEntity => ({ value });\nexport const optEnum = (\n value: number | undefined\n): EmbindEnumEntity | undefined =>\n value === undefined ? undefined : { value };\n"]}
@@ -7,13 +7,15 @@ exports.JsiSkCanvas = void 0;
7
7
 
8
8
  var _Host = require("./Host");
9
9
 
10
+ var _JsiSkRect = require("./JsiSkRect");
11
+
10
12
  class JsiSkCanvas extends _Host.HostObject {
11
13
  constructor(CanvasKit, ref) {
12
14
  super(CanvasKit, ref, "Canvas");
13
15
  }
14
16
 
15
17
  drawRect(rect, paint) {
16
- this.ref.drawRect((0, _Host.toValue)(rect), (0, _Host.toValue)(paint));
18
+ this.ref.drawRect(_JsiSkRect.JsiSkRect.fromValue(this.CanvasKit, rect).ref, (0, _Host.toValue)(paint));
17
19
  }
18
20
 
19
21
  drawImage(image, x, y, paint) {
@@ -21,7 +23,7 @@ class JsiSkCanvas extends _Host.HostObject {
21
23
  }
22
24
 
23
25
  drawImageRect(img, src, dest, paint, fastSample) {
24
- this.ref.drawImageRect((0, _Host.toValue)(img), (0, _Host.toValue)(src), (0, _Host.toValue)(dest), (0, _Host.toValue)(paint), fastSample);
26
+ this.ref.drawImageRect((0, _Host.toValue)(img), _JsiSkRect.JsiSkRect.fromValue(this.CanvasKit, src).ref, _JsiSkRect.JsiSkRect.fromValue(this.CanvasKit, dest).ref, (0, _Host.toValue)(paint), fastSample);
25
27
  }
26
28
 
27
29
  drawImageCubic(img, left, top, B, C, paint) {
@@ -37,11 +39,11 @@ class JsiSkCanvas extends _Host.HostObject {
37
39
  }
38
40
 
39
41
  drawImageRectCubic(img, src, dest, B, C, paint) {
40
- this.ref.drawImageRectCubic((0, _Host.toValue)(img), (0, _Host.toValue)(src), (0, _Host.toValue)(dest), B, C, (0, _Host.toOptionalValue)(paint));
42
+ this.ref.drawImageRectCubic((0, _Host.toValue)(img), _JsiSkRect.JsiSkRect.fromValue(this.CanvasKit, src).ref, _JsiSkRect.JsiSkRect.fromValue(this.CanvasKit, dest).ref, B, C, (0, _Host.toOptionalValue)(paint));
41
43
  }
42
44
 
43
45
  drawImageRectOptions(img, src, dest, fm, mm, paint) {
44
- this.ref.drawImageRectOptions((0, _Host.toValue)(img), (0, _Host.toValue)(src), (0, _Host.toValue)(dest), (0, _Host.ckEnum)(fm), (0, _Host.ckEnum)(mm), (0, _Host.toOptionalValue)(paint));
46
+ this.ref.drawImageRectOptions((0, _Host.toValue)(img), _JsiSkRect.JsiSkRect.fromValue(this.CanvasKit, src).ref, _JsiSkRect.JsiSkRect.fromValue(this.CanvasKit, dest).ref, (0, _Host.ckEnum)(fm), (0, _Host.ckEnum)(mm), (0, _Host.toOptionalValue)(paint));
45
47
  }
46
48
 
47
49
  drawPaint(paint) {
@@ -61,7 +63,13 @@ class JsiSkCanvas extends _Host.HostObject {
61
63
  }
62
64
 
63
65
  drawPatch(cubics, colors, texs, mode, paint) {
64
- this.ref.drawPatch((0, _Host.toValue)(cubics), colors, (0, _Host.toOptionalValue)(texs), mode ? (0, _Host.ckEnum)(mode) : null, (0, _Host.toUndefinedableValue)(paint));
66
+ this.ref.drawPatch(cubics.map(_ref => {
67
+ let {
68
+ x,
69
+ y
70
+ } = _ref;
71
+ return [x, y];
72
+ }).flat(), colors, (0, _Host.toOptionalValue)(texs), mode ? (0, _Host.ckEnum)(mode) : null, (0, _Host.toUndefinedableValue)(paint));
65
73
  }
66
74
 
67
75
  restoreToCount(saveCount) {
@@ -69,7 +77,13 @@ class JsiSkCanvas extends _Host.HostObject {
69
77
  }
70
78
 
71
79
  drawPoints(mode, points, paint) {
72
- this.ref.drawPoints((0, _Host.ckEnum)(mode), (0, _Host.toValue)(points), (0, _Host.toValue)(paint));
80
+ this.ref.drawPoints((0, _Host.ckEnum)(mode), points.map(_ref2 => {
81
+ let {
82
+ x,
83
+ y
84
+ } = _ref2;
85
+ return [x, y];
86
+ }).flat(), (0, _Host.toValue)(paint));
73
87
  }
74
88
 
75
89
  drawArc(oval, startAngle, sweepAngle, useCenter, paint) {
@@ -101,7 +115,7 @@ class JsiSkCanvas extends _Host.HostObject {
101
115
  }
102
116
 
103
117
  drawGlyphs(glyphs, positions, x, y, font, paint) {
104
- this.ref.drawGlyphs(glyphs, (0, _Host.toValue)(positions), x, y, (0, _Host.toValue)(font), (0, _Host.toValue)(paint));
118
+ this.ref.drawGlyphs(glyphs, positions.map(p => [p.x, p.y]).flat(), x, y, (0, _Host.toValue)(font), (0, _Host.toValue)(paint));
105
119
  }
106
120
 
107
121
  drawSvg(_svgDom, _width, _height) {
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["JsiSkCanvas.ts"],"names":["JsiSkCanvas","HostObject","constructor","CanvasKit","ref","drawRect","rect","paint","JsiSkRect","fromValue","drawImage","image","x","y","drawImageRect","img","src","dest","fastSample","drawImageCubic","left","top","B","C","drawImageOptions","fm","mm","drawImageNine","center","filter","drawImageRectCubic","drawImageRectOptions","drawPaint","drawLine","x0","y0","x1","y1","drawCircle","cx","cy","radius","drawVertices","verts","mode","drawPatch","cubics","colors","texs","map","flat","restoreToCount","saveCount","drawPoints","points","drawArc","oval","startAngle","sweepAngle","useCenter","drawRRect","rrect","drawDRRect","outer","inner","drawOval","drawPath","path","drawText","str","font","drawTextBlob","blob","drawGlyphs","glyphs","positions","p","drawSvg","_svgDom","_width","_height","Error","save","saveLayer","bounds","backdrop","flags","restore","rotate","rotationInDegrees","rx","ry","scale","sx","sy","skew","translate","dx","dy","drawColor","color","blendMode","undefined","clear","clipPath","op","doAntiAlias","clipRect","clipRRect","concat","m","drawPicture","skp"],"mappings":";;;;;;;AA0BA;;AAOA;;AAEO,MAAMA,WAAN,SACGC,gBADH,CAGP;AACEC,EAAAA,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAoC;AAC7C,UAAMD,SAAN,EAAiBC,GAAjB,EAAsB,QAAtB;AACD;;AAEDC,EAAAA,QAAQ,CAACC,IAAD,EAAeC,KAAf,EAA+B;AACrC,SAAKH,GAAL,CAASC,QAAT,CACEG,qBAAUC,SAAV,CAAoB,KAAKN,SAAzB,EAAoCG,IAApC,EAA0CF,GAD5C,EAEE,mBAAeG,KAAf,CAFF;AAID;;AAEDG,EAAAA,SAAS,CAACC,KAAD,EAAiBC,CAAjB,EAA4BC,CAA5B,EAAuCN,KAAvC,EAAwD;AAC/D,SA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,WAAT,CAAqB,mBAAQC,GAAR,CAArB;AACD;;AAlSH","sourcesContent":["import type { Canvas, Image, CanvasKit, Paint } from \"canvaskit-wasm\";\n\nimport type {\n BlendMode,\n ClipOp,\n FilterMode,\n MipmapMode,\n PointMode,\n SaveLayerFlag,\n SkCanvas,\n SkColor,\n SkFont,\n SkImage,\n SkImageFilter,\n SkMatrix,\n SkPaint,\n SkPath,\n SkPicture,\n SkPoint,\n SkRect,\n SkRRect,\n SkSVG,\n SkTextBlob,\n SkVertices,\n} from \"../types\";\n\nimport {\n ckEnum,\n HostObject,\n toValue,\n toUndefinedableValue,\n toOptionalValue,\n} from \"./Host\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkCanvas\n extends HostObject<Canvas, \"Canvas\">\n implements SkCanvas\n{\n constructor(CanvasKit: CanvasKit, ref: Canvas) {\n super(CanvasKit, ref, \"Canvas\");\n }\n\n drawRect(rect: SkRect, paint: SkPaint) {\n this.ref.drawRect(\n JsiSkRect.fromValue(this.CanvasKit, rect).ref,\n toValue<Paint>(paint)\n );\n }\n\n drawImage(image: SkImage, x: number, y: number, paint?: SkPaint) {\n this.ref.drawImage(toValue<Image>(image), x, y, toOptionalValue(paint));\n }\n\n drawImageRect(\n img: SkImage,\n src: SkRect,\n dest: SkRect,\n paint: SkPaint,\n fastSample?: boolean\n ) {\n this.ref.drawImageRect(\n toValue<Image>(img),\n JsiSkRect.fromValue(this.CanvasKit, src).ref,\n JsiSkRect.fromValue(this.CanvasKit, dest).ref,\n toValue<Paint>(paint),\n fastSample\n );\n }\n\n drawImageCubic(\n img: SkImage,\n left: number,\n top: number,\n B: number,\n C: number,\n paint?: SkPaint | null\n ) {\n this.ref.drawImageCubic(\n toValue(img),\n left,\n top,\n B,\n C,\n toOptionalValue(paint)\n );\n }\n\n drawImageOptions(\n img: SkImage,\n left: number,\n top: number,\n fm: FilterMode,\n mm: MipmapMode,\n paint?: SkPaint | null\n ) {\n this.ref.drawImageOptions(\n toValue(img),\n left,\n top,\n ckEnum(fm),\n ckEnum(mm),\n toOptionalValue(paint)\n );\n }\n\n drawImageNine(\n img: SkImage,\n center: SkRect,\n dest: SkRect,\n filter: FilterMode,\n paint?: SkPaint | null\n ) {\n this.ref.drawImageNine(\n toValue(img),\n toValue(center),\n toValue(dest),\n ckEnum(filter),\n toOptionalValue(paint)\n );\n }\n\n drawImageRectCubic(\n img: SkImage,\n src: SkRect,\n dest: SkRect,\n B: number,\n C: number,\n paint?: SkPaint | null\n ) {\n this.ref.drawImageRectCubic(\n toValue<Image>(img),\n JsiSkRect.fromValue(this.CanvasKit, src).ref,\n JsiSkRect.fromValue(this.CanvasKit, dest).ref,\n B,\n C,\n toOptionalValue(paint)\n );\n }\n\n drawImageRectOptions(\n img: SkImage,\n src: SkRect,\n dest: SkRect,\n fm: FilterMode,\n mm: MipmapMode,\n paint?: SkPaint | null\n ) {\n this.ref.drawImageRectOptions(\n toValue<Image>(img),\n JsiSkRect.fromValue(this.CanvasKit, src).ref,\n JsiSkRect.fromValue(this.CanvasKit, dest).ref,\n ckEnum(fm),\n ckEnum(mm),\n toOptionalValue(paint)\n );\n }\n\n drawPaint(paint: SkPaint) {\n this.ref.drawPaint(toValue(paint));\n }\n\n drawLine(x0: number, y0: number, x1: number, y1: number, paint: SkPaint) {\n this.ref.drawLine(x0, y0, x1, y1, toValue(paint));\n }\n\n drawCircle(cx: number, cy: number, radius: number, paint: SkPaint) {\n this.ref.drawCircle(cx, cy, radius, toValue(paint));\n }\n\n drawVertices(verts: SkVertices, mode: BlendMode, paint: SkPaint) {\n this.ref.drawVertices(toValue(verts), ckEnum(mode), toValue(paint));\n }\n\n drawPatch(\n cubics: SkPoint[],\n colors?: SkColor[] | null,\n texs?: SkPoint[] | null,\n mode?: BlendMode | null,\n paint?: SkPaint\n ) {\n this.ref.drawPatch(\n cubics.map(({ x, y }) => [x, y]).flat(),\n colors,\n toOptionalValue(texs),\n mode ? ckEnum(mode) : null,\n toUndefinedableValue(paint)\n );\n }\n\n restoreToCount(saveCount: number) {\n this.ref.restoreToCount(saveCount);\n }\n\n drawPoints(mode: PointMode, points: SkPoint[], paint: SkPaint) {\n this.ref.drawPoints(\n ckEnum(mode),\n points.map(({ x, y }) => [x, y]).flat(),\n toValue(paint)\n );\n }\n\n drawArc(\n oval: SkRect,\n startAngle: number,\n sweepAngle: number,\n useCenter: boolean,\n paint: SkPaint\n ) {\n this.ref.drawArc(\n toValue(oval),\n startAngle,\n sweepAngle,\n useCenter,\n toValue(paint)\n );\n }\n\n drawRRect(rrect: SkRRect, paint: SkPaint) {\n this.ref.drawRRect(toValue(rrect), toValue(paint));\n }\n\n drawDRRect(outer: SkRRect, inner: SkRRect, paint: SkPaint) {\n this.ref.drawDRRect(toValue(outer), toValue(inner), toValue(paint));\n }\n\n drawOval(oval: SkRect, paint: SkPaint) {\n this.ref.drawOval(toValue(oval), toValue(paint));\n }\n\n drawPath(path: SkPath, paint: SkPaint) {\n this.ref.drawPath(toValue(path), toValue(paint));\n }\n\n drawText(str: string, x: number, y: number, paint: SkPaint, font: SkFont) {\n this.ref.drawText(str, x, y, toValue(paint), toValue(font));\n }\n\n drawTextBlob(blob: SkTextBlob, x: number, y: number, paint: SkPaint) {\n this.ref.drawTextBlob(toValue(blob), x, y, toValue(paint));\n }\n\n drawGlyphs(\n glyphs: number[],\n positions: SkPoint[],\n x: number,\n y: number,\n font: SkFont,\n paint: SkPaint\n ) {\n this.ref.drawGlyphs(\n glyphs,\n positions.map((p) => [p.x, p.y]).flat(),\n x,\n y,\n toValue(font),\n toValue(paint)\n );\n }\n\n drawSvg(_svgDom: SkSVG, _width?: number, _height?: number) {\n throw new Error(\"drawSvg is not implemented on React Native Web\");\n }\n\n save() {\n return this.ref.save();\n }\n\n saveLayer(\n paint?: SkPaint,\n bounds?: SkRect | null,\n backdrop?: SkImageFilter | null,\n flags?: SaveLayerFlag\n ) {\n return this.ref.saveLayer(\n toUndefinedableValue(paint),\n toOptionalValue(bounds),\n toOptionalValue(backdrop),\n flags\n );\n }\n\n restore() {\n this.ref.restore();\n }\n\n rotate(rotationInDegrees: number, rx: number, ry: number) {\n this.ref.rotate(rotationInDegrees, rx, ry);\n }\n\n scale(sx: number, sy: number) {\n this.ref.scale(sx, sy);\n }\n\n skew(sx: number, sy: number) {\n this.ref.skew(sx, sy);\n }\n\n translate(dx: number, dy: number) {\n this.ref.translate(dx, dy);\n }\n\n drawColor(color: SkColor, blendMode?: BlendMode) {\n this.ref.drawColor(color, blendMode ? ckEnum(blendMode) : undefined);\n }\n\n clear(color: SkColor) {\n this.ref.clear(color);\n }\n\n clipPath(path: SkPath, op: ClipOp, doAntiAlias: boolean) {\n this.ref.clipPath(toValue(path), ckEnum(op), doAntiAlias);\n }\n\n clipRect(rect: SkRect, op: ClipOp, doAntiAlias: boolean) {\n this.ref.clipRect(toValue(rect), ckEnum(op), doAntiAlias);\n }\n\n clipRRect(rrect: SkRRect, op: ClipOp, doAntiAlias: boolean) {\n this.ref.clipRRect(toValue(rrect), ckEnum(op), doAntiAlias);\n }\n\n concat(m: SkMatrix) {\n this.ref.concat(toValue(m));\n }\n\n drawPicture(skp: SkPicture) {\n this.ref.drawPicture(toValue(skp));\n }\n}\n"]}
@@ -11,9 +11,10 @@ const red = c => c >> 16 & 255;
11
11
 
12
12
  const green = c => c >> 8 & 255;
13
13
 
14
- const blue = c => c & 255;
14
+ const blue = c => c & 255; // From https://raw.githubusercontent.com/deanm/css-color-parser-js/master/csscolorparser.js
15
15
 
16
- const colorMap = {
16
+
17
+ const CSSColorTable = {
17
18
  transparent: Float32Array.of(0, 0, 0, 0),
18
19
  aliceblue: Float32Array.of(240, 248, 255, 1),
19
20
  antiquewhite: Float32Array.of(250, 235, 215, 1),
@@ -165,11 +166,169 @@ const colorMap = {
165
166
  yellowgreen: Float32Array.of(154, 205, 50, 1)
166
167
  };
167
168
 
168
- const Color = (CanvasKit, color) => {
169
+ const clampCSSByte = j => {
170
+ // Clamp to integer 0 .. 255.
171
+ const i = Math.round(j); // Seems to be what Chrome does (vs truncation).
172
+ // eslint-disable-next-line no-nested-ternary
173
+
174
+ return i < 0 ? 0 : i > 255 ? 255 : i;
175
+ };
176
+
177
+ const clampCSSFloat = f => {
178
+ // eslint-disable-next-line no-nested-ternary
179
+ return f < 0 ? 0 : f > 1 ? 1 : f;
180
+ };
181
+
182
+ const parseCSSInt = str => {
183
+ // int or percentage.
184
+ if (str[str.length - 1] === "%") {
185
+ return clampCSSByte(parseFloat(str) / 100 * 255);
186
+ } // eslint-disable-next-line radix
187
+
188
+
189
+ return clampCSSByte(parseInt(str));
190
+ };
191
+
192
+ const parseCSSFloat = str => {
193
+ if (str === undefined) {
194
+ return 1;
195
+ } // float or percentage.
196
+
197
+
198
+ if (str[str.length - 1] === "%") {
199
+ return clampCSSFloat(parseFloat(str) / 100);
200
+ }
201
+
202
+ return clampCSSFloat(parseFloat(str));
203
+ };
204
+
205
+ const CSSHueToRGB = (m1, m2, h) => {
206
+ if (h < 0) {
207
+ h += 1;
208
+ } else if (h > 1) {
209
+ h -= 1;
210
+ }
211
+
212
+ if (h * 6 < 1) {
213
+ return m1 + (m2 - m1) * h * 6;
214
+ }
215
+
216
+ if (h * 2 < 1) {
217
+ return m2;
218
+ }
219
+
220
+ if (h * 3 < 2) {
221
+ return m1 + (m2 - m1) * (2 / 3 - h) * 6;
222
+ }
223
+
224
+ return m1;
225
+ };
226
+
227
+ const parseCSSColor = cssStr => {
228
+ // Remove all whitespace, not compliant, but should just be more accepting.
229
+ var str = cssStr.replace(/ /g, "").toLowerCase(); // Color keywords (and transparent) lookup.
230
+
231
+ if (str in CSSColorTable) {
232
+ const cl = CSSColorTable[str];
233
+
234
+ if (cl) {
235
+ return Float32Array.of(...cl);
236
+ }
237
+
238
+ return null;
239
+ } // dup.
240
+ // #abc and #abc123 syntax.
241
+
242
+
243
+ if (str[0] === "#") {
244
+ if (str.length === 4) {
245
+ var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.
246
+
247
+ if (!(iv >= 0 && iv <= 0xfff)) {
248
+ return null;
249
+ } // Covers NaN.
250
+
251
+
252
+ return [(iv & 0xf00) >> 4 | (iv & 0xf00) >> 8, iv & 0xf0 | (iv & 0xf0) >> 4, iv & 0xf | (iv & 0xf) << 4, 1];
253
+ } else if (str.length === 7) {
254
+ var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.
255
+
256
+ if (!(iv >= 0 && iv <= 0xffffff)) {
257
+ return null;
258
+ } // Covers NaN.
259
+
260
+
261
+ return [(iv & 0xff0000) >> 16, (iv & 0xff00) >> 8, iv & 0xff, 1];
262
+ }
263
+
264
+ return null;
265
+ }
266
+
267
+ var op = str.indexOf("("),
268
+ ep = str.indexOf(")");
269
+
270
+ if (op !== -1 && ep + 1 === str.length) {
271
+ var fname = str.substr(0, op);
272
+ var params = str.substr(op + 1, ep - (op + 1)).split(",");
273
+ var alpha = 1; // To allow case fallthrough.
274
+
275
+ switch (fname) {
276
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
277
+ //@ts-expect-error
278
+ case "rgba":
279
+ if (params.length !== 4) {
280
+ return null;
281
+ }
282
+
283
+ alpha = parseCSSFloat(params.pop());
284
+ // Fall through.
285
+
286
+ case "rgb":
287
+ if (params.length !== 3) {
288
+ return null;
289
+ }
290
+
291
+ return [parseCSSInt(params[0]), parseCSSInt(params[1]), parseCSSInt(params[2]), alpha];
292
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
293
+ //@ts-expect-error
294
+
295
+ case "hsla":
296
+ if (params.length !== 4) {
297
+ return null;
298
+ }
299
+
300
+ alpha = parseCSSFloat(params.pop());
301
+ // Fall through.
302
+
303
+ case "hsl":
304
+ if (params.length !== 3) {
305
+ return null;
306
+ }
307
+
308
+ var h = (parseFloat(params[0]) % 360 + 360) % 360 / 360; // 0 .. 1
309
+ // NOTE(deanm): According to the CSS spec s/l should only be
310
+ // percentages, but we don't bother and let float or percentage.
311
+
312
+ var s = parseCSSFloat(params[1]);
313
+ var l = parseCSSFloat(params[2]);
314
+ var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;
315
+ var m1 = l * 2 - m2;
316
+ return [clampCSSByte(CSSHueToRGB(m1, m2, h + 1 / 3) * 255), clampCSSByte(CSSHueToRGB(m1, m2, h) * 255), clampCSSByte(CSSHueToRGB(m1, m2, h - 1 / 3) * 255), alpha];
317
+
318
+ default:
319
+ return null;
320
+ }
321
+ }
322
+
323
+ return null;
324
+ };
325
+
326
+ const Color = color => {
169
327
  if (color instanceof Float32Array) {
170
328
  return color;
171
329
  } else if (typeof color === "string") {
172
- const rgba = CanvasKit.parseColorString(color, colorMap);
330
+ const r = parseCSSColor(color);
331
+ const rgba = r === null ? CSSColorTable.black : r;
173
332
  return Float32Array.of(rgba[0] / 255, rgba[1] / 255, rgba[2] / 255, rgba[3]);
174
333
  } else {
175
334
  return Float32Array.of(red(color) / 255, green(color) / 255, blue(color) / 255, alphaf(color));
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["JsiSkColor.ts"],"names":["alphaf","c","red","green","blue","CSSColorTable","transparent","Float32Array","of","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","clampCSSByte","j","i","Math","round","clampCSSFloat","f","parseCSSInt","str","length","parseFloat","parseInt","parseCSSFloat","undefined","CSSHueToRGB","m1","m2","h","parseCSSColor","cssStr","replace","toLowerCase","cl","iv","substr","op","indexOf","ep","fname","params","split","alpha","pop","s","l","Color","color","r","rgba"],"mappings":";;;;;;;AAEA,MAAMA,MAAM,GAAIC,CAAD,IAAe,CAAEA,CAAC,IAAI,EAAN,GAAY,GAAb,IAAoB,GAAlD;;AACA,MAAMC,GAAG,GAAID,CAAD,IAAgBA,CAAC,IAAI,EAAN,GAAY,GAAvC;;AACA,MAAME,KAAK,GAAIF,CAAD,IAAgBA,CAAC,IAAI,CAAN,GAAW,GAAxC;;AACA,MAAMG,IAAI,GAAIH,CAAD,IAAeA,CAAC,GAAG,GAAhC,C,CAEA;;;AACA,MAAMI,aAAa,GAAG;AACpBC,EAAAA,WAAW,EAAEC,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CADO;AAEpBC,EAAAA,SAAS,EAAEF,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,CAA/B,CAFS;AAGpBE,EAAAA,YAAY,EAAEH,YAAY,CAACC,EAAb,CAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,CAA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D,CAAC,KAAK,IAAN,GAAa1L,aAAa,CAACW,KAA3B,GAAmC+K,CAAhD;AACA,WAAOxL,YAAY,CAACC,EAAb,CACLwL,IAAI,CAAC,CAAD,CAAJ,GAAU,GADL,EAELA,IAAI,CAAC,CAAD,CAAJ,GAAU,GAFL,EAGLA,IAAI,CAAC,CAAD,CAAJ,GAAU,GAHL,EAILA,IAAI,CAAC,CAAD,CAJC,CAAP;AAMD,GATM,MASA;AACL,WAAOzL,YAAY,CAACC,EAAb,CACLN,GAAG,CAAC4L,KAAD,CAAH,GAAa,GADR,EAEL3L,KAAK,CAAC2L,KAAD,CAAL,GAAe,GAFV,EAGL1L,IAAI,CAAC0L,KAAD,CAAJ,GAAc,GAHT,EAIL9L,MAAM,CAAC8L,KAAD,CAJD,CAAP;AAMD;AACF,CApBM","sourcesContent":["import type { SkColor, Color as InputColor } from \"../types\";\n\nconst alphaf = (c: number) => ((c >> 24) & 255) / 255;\nconst red = (c: number) => (c >> 16) & 255;\nconst green = (c: number) => (c >> 8) & 255;\nconst blue = (c: number) => c & 255;\n\n// From https://raw.githubusercontent.com/deanm/css-color-parser-js/master/csscolorparser.js\nconst CSSColorTable = {\n transparent: Float32Array.of(0, 0, 0, 0),\n aliceblue: Float32Array.of(240, 248, 255, 1),\n antiquewhite: Float32Array.of(250, 235, 215, 1),\n aqua: Float32Array.of(0, 255, 255, 1),\n aquamarine: Float32Array.of(127, 255, 212, 1),\n azure: Float32Array.of(240, 255, 255, 1),\n beige: Float32Array.of(245, 245, 220, 1),\n bisque: Float32Array.of(255, 228, 196, 1),\n black: Float32Array.of(0, 0, 0, 1),\n blanchedalmond: Float32Array.of(255, 235, 205, 1),\n blue: Float32Array.of(0, 0, 255, 1),\n blueviolet: Float32Array.of(138, 43, 226, 1),\n brown: Float32Array.of(165, 42, 42, 1),\n burlywood: Float32Array.of(222, 184, 135, 1),\n cadetblue: Float32Array.of(95, 158, 160, 1),\n chartreuse: Float32Array.of(127, 255, 0, 1),\n chocolate: Float32Array.of(210, 105, 30, 1),\n coral: Float32Array.of(255, 127, 80, 1),\n cornflowerblue: Float32Array.of(100, 149, 237, 1),\n cornsilk: Float32Array.of(255, 248, 220, 1),\n crimson: Float32Array.of(220, 20, 60, 1),\n cyan: Float32Array.of(0, 255, 255, 1),\n darkblue: Float32Array.of(0, 0, 139, 1),\n darkcyan: Float32Array.of(0, 139, 139, 1),\n darkgoldenrod: Float32Array.of(184, 134, 11, 1),\n darkgray: Float32Array.of(169, 169, 169, 1),\n darkgreen: Float32Array.of(0, 100, 0, 1),\n darkgrey: Float32Array.of(169, 169, 169, 1),\n darkkhaki: Float32Array.of(189, 183, 107, 1),\n darkmagenta: Float32Array.of(139, 0, 139, 1),\n darkolivegreen: Float32Array.of(85, 107, 47, 1),\n darkorange: Float32Array.of(255, 140, 0, 1),\n darkorchid: Float32Array.of(153, 50, 204, 1),\n darkred: Float32Array.of(139, 0, 0, 1),\n darksalmon: Float32Array.of(233, 150, 122, 1),\n darkseagreen: Float32Array.of(143, 188, 143, 1),\n darkslateblue: Float32Array.of(72, 61, 139, 1),\n darkslategray: Float32Array.of(47, 79, 79, 1),\n darkslategrey: Float32Array.of(47, 79, 79, 1),\n darkturquoise: Float32Array.of(0, 206, 209, 1),\n darkviolet: Float32Array.of(148, 0, 211, 1),\n deeppink: Float32Array.of(255, 20, 147, 1),\n deepskyblue: Float32Array.of(0, 191, 255, 1),\n dimgray: Float32Array.of(105, 105, 105, 1),\n dimgrey: Float32Array.of(105, 105, 105, 1),\n dodgerblue: Float32Array.of(30, 144, 255, 1),\n firebrick: Float32Array.of(178, 34, 34, 1),\n floralwhite: Float32Array.of(255, 250, 240, 1),\n forestgreen: Float32Array.of(34, 139, 34, 1),\n fuchsia: Float32Array.of(255, 0, 255, 1),\n gainsboro: Float32Array.of(220, 220, 220, 1),\n ghostwhite: Float32Array.of(248, 248, 255, 1),\n gold: Float32Array.of(255, 215, 0, 1),\n goldenrod: Float32Array.of(218, 165, 32, 1),\n gray: Float32Array.of(128, 128, 128, 1),\n green: Float32Array.of(0, 128, 0, 1),\n greenyellow: Float32Array.of(173, 255, 47, 1),\n grey: Float32Array.of(128, 128, 128, 1),\n honeydew: Float32Array.of(240, 255, 240, 1),\n hotpink: Float32Array.of(255, 105, 180, 1),\n indianred: Float32Array.of(205, 92, 92, 1),\n indigo: Float32Array.of(75, 0, 130, 1),\n ivory: Float32Array.of(255, 255, 240, 1),\n khaki: Float32Array.of(240, 230, 140, 1),\n lavender: Float32Array.of(230, 230, 250, 1),\n lavenderblush: Float32Array.of(255, 240, 245, 1),\n lawngreen: Float32Array.of(124, 252, 0, 1),\n lemonchiffon: Float32Array.of(255, 250, 205, 1),\n lightblue: Float32Array.of(173, 216, 230, 1),\n lightcoral: Float32Array.of(240, 128, 128, 1),\n lightcyan: Float32Array.of(224, 255, 255, 1),\n lightgoldenrodyellow: Float32Array.of(250, 250, 210, 1),\n lightgray: Float32Array.of(211, 211, 211, 1),\n lightgreen: Float32Array.of(144, 238, 144, 1),\n lightgrey: Float32Array.of(211, 211, 211, 1),\n lightpink: Float32Array.of(255, 182, 193, 1),\n lightsalmon: Float32Array.of(255, 160, 122, 1),\n lightseagreen: Float32Array.of(32, 178, 170, 1),\n lightskyblue: Float32Array.of(135, 206, 250, 1),\n lightslategray: Float32Array.of(119, 136, 153, 1),\n lightslategrey: Float32Array.of(119, 136, 153, 1),\n lightsteelblue: Float32Array.of(176, 196, 222, 1),\n lightyellow: Float32Array.of(255, 255, 224, 1),\n lime: Float32Array.of(0, 255, 0, 1),\n limegreen: Float32Array.of(50, 205, 50, 1),\n linen: Float32Array.of(250, 240, 230, 1),\n magenta: Float32Array.of(255, 0, 255, 1),\n maroon: Float32Array.of(128, 0, 0, 1),\n mediumaquamarine: Float32Array.of(102, 205, 170, 1),\n mediumblue: Float32Array.of(0, 0, 205, 1),\n mediumorchid: Float32Array.of(186, 85, 211, 1),\n mediumpurple: Float32Array.of(147, 112, 219, 1),\n mediumseagreen: Float32Array.of(60, 179, 113, 1),\n mediumslateblue: Float32Array.of(123, 104, 238, 1),\n mediumspringgreen: Float32Array.of(0, 250, 154, 1),\n mediumturquoise: Float32Array.of(72, 209, 204, 1),\n mediumvioletred: Float32Array.of(199, 21, 133, 1),\n midnightblue: Float32Array.of(25, 25, 112, 1),\n mintcream: Float32Array.of(245, 255, 250, 1),\n mistyrose: Float32Array.of(255, 228, 225, 1),\n moccasin: Float32Array.of(255, 228, 181, 1),\n navajowhite: Float32Array.of(255, 222, 173, 1),\n navy: Float32Array.of(0, 0, 128, 1),\n oldlace: Float32Array.of(253, 245, 230, 1),\n olive: Float32Array.of(128, 128, 0, 1),\n olivedrab: Float32Array.of(107, 142, 35, 1),\n orange: Float32Array.of(255, 165, 0, 1),\n orangered: Float32Array.of(255, 69, 0, 1),\n orchid: Float32Array.of(218, 112, 214, 1),\n palegoldenrod: Float32Array.of(238, 232, 170, 1),\n palegreen: Float32Array.of(152, 251, 152, 1),\n paleturquoise: Float32Array.of(175, 238, 238, 1),\n palevioletred: Float32Array.of(219, 112, 147, 1),\n papayawhip: Float32Array.of(255, 239, 213, 1),\n peachpuff: Float32Array.of(255, 218, 185, 1),\n peru: Float32Array.of(205, 133, 63, 1),\n pink: Float32Array.of(255, 192, 203, 1),\n plum: Float32Array.of(221, 160, 221, 1),\n powderblue: Float32Array.of(176, 224, 230, 1),\n purple: Float32Array.of(128, 0, 128, 1),\n rebeccapurple: Float32Array.of(102, 51, 153, 1),\n red: Float32Array.of(255, 0, 0, 1),\n rosybrown: Float32Array.of(188, 143, 143, 1),\n royalblue: Float32Array.of(65, 105, 225, 1),\n saddlebrown: Float32Array.of(139, 69, 19, 1),\n salmon: Float32Array.of(250, 128, 114, 1),\n sandybrown: Float32Array.of(244, 164, 96, 1),\n seagreen: Float32Array.of(46, 139, 87, 1),\n seashell: Float32Array.of(255, 245, 238, 1),\n sienna: Float32Array.of(160, 82, 45, 1),\n silver: Float32Array.of(192, 192, 192, 1),\n skyblue: Float32Array.of(135, 206, 235, 1),\n slateblue: Float32Array.of(106, 90, 205, 1),\n slategray: Float32Array.of(112, 128, 144, 1),\n slategrey: Float32Array.of(112, 128, 144, 1),\n snow: Float32Array.of(255, 250, 250, 1),\n springgreen: Float32Array.of(0, 255, 127, 1),\n steelblue: Float32Array.of(70, 130, 180, 1),\n tan: Float32Array.of(210, 180, 140, 1),\n teal: Float32Array.of(0, 128, 128, 1),\n thistle: Float32Array.of(216, 191, 216, 1),\n tomato: Float32Array.of(255, 99, 71, 1),\n turquoise: Float32Array.of(64, 224, 208, 1),\n violet: Float32Array.of(238, 130, 238, 1),\n wheat: Float32Array.of(245, 222, 179, 1),\n white: Float32Array.of(255, 255, 255, 1),\n whitesmoke: Float32Array.of(245, 245, 245, 1),\n yellow: Float32Array.of(255, 255, 0, 1),\n yellowgreen: Float32Array.of(154, 205, 50, 1),\n};\n\nconst clampCSSByte = (j: number) => {\n // Clamp to integer 0 .. 255.\n const i = Math.round(j); // Seems to be what Chrome does (vs truncation).\n // eslint-disable-next-line no-nested-ternary\n return i < 0 ? 0 : i > 255 ? 255 : i;\n};\n\nconst clampCSSFloat = (f: number) => {\n // eslint-disable-next-line no-nested-ternary\n return f < 0 ? 0 : f > 1 ? 1 : f;\n};\n\nconst parseCSSInt = (str: string) => {\n // int or percentage.\n if (str[str.length - 1] === \"%\") {\n return clampCSSByte((parseFloat(str) / 100) * 255);\n }\n // eslint-disable-next-line radix\n return clampCSSByte(parseInt(str));\n};\n\nconst parseCSSFloat = (str: string | undefined) => {\n if (str === undefined) {\n return 1;\n }\n // float or percentage.\n if (str[str.length - 1] === \"%\") {\n return clampCSSFloat(parseFloat(str) / 100);\n }\n return clampCSSFloat(parseFloat(str));\n};\n\nconst CSSHueToRGB = (m1: number, m2: number, h: number) => {\n if (h < 0) {\n h += 1;\n } else if (h > 1) {\n h -= 1;\n }\n\n if (h * 6 < 1) {\n return m1 + (m2 - m1) * h * 6;\n }\n if (h * 2 < 1) {\n return m2;\n }\n if (h * 3 < 2) {\n return m1 + (m2 - m1) * (2 / 3 - h) * 6;\n }\n return m1;\n};\n\nconst parseCSSColor = (cssStr: string) => {\n // Remove all whitespace, not compliant, but should just be more accepting.\n var str = cssStr.replace(/ /g, \"\").toLowerCase();\n\n // Color keywords (and transparent) lookup.\n if (str in CSSColorTable) {\n const cl = CSSColorTable[str as keyof typeof CSSColorTable];\n if (cl) {\n return Float32Array.of(...cl);\n }\n return null;\n } // dup.\n\n // #abc and #abc123 syntax.\n if (str[0] === \"#\") {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xfff)) {\n return null;\n } // Covers NaN.\n return [\n ((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 1,\n ];\n } else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffff)) {\n return null;\n } // Covers NaN.\n return [(iv & 0xff0000) >> 16, (iv & 0xff00) >> 8, iv & 0xff, 1];\n }\n\n return null;\n }\n\n var op = str.indexOf(\"(\"),\n ep = str.indexOf(\")\");\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op + 1, ep - (op + 1)).split(\",\");\n var alpha = 1; // To allow case fallthrough.\n switch (fname) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n case \"rgba\":\n if (params.length !== 4) {\n return null;\n }\n alpha = parseCSSFloat(params.pop());\n // Fall through.\n case \"rgb\":\n if (params.length !== 3) {\n return null;\n }\n return [\n parseCSSInt(params[0]),\n parseCSSInt(params[1]),\n parseCSSInt(params[2]),\n alpha,\n ];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-expect-error\n case \"hsla\":\n if (params.length !== 4) {\n return null;\n }\n alpha = parseCSSFloat(params.pop());\n // Fall through.\n case \"hsl\":\n if (params.length !== 3) {\n return null;\n }\n var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n var s = parseCSSFloat(params[1]);\n var l = parseCSSFloat(params[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n return [\n clampCSSByte(CSSHueToRGB(m1, m2, h + 1 / 3) * 255),\n clampCSSByte(CSSHueToRGB(m1, m2, h) * 255),\n clampCSSByte(CSSHueToRGB(m1, m2, h - 1 / 3) * 255),\n alpha,\n ];\n default:\n return null;\n }\n }\n\n return null;\n};\n\nexport const Color = (color: InputColor): SkColor => {\n if (color instanceof Float32Array) {\n return color;\n } else if (typeof color === \"string\") {\n const r = parseCSSColor(color);\n const rgba = r === null ? CSSColorTable.black : r;\n return Float32Array.of(\n rgba[0] / 255,\n rgba[1] / 255,\n rgba[2] / 255,\n rgba[3]\n );\n } else {\n return Float32Array.of(\n red(color) / 255,\n green(color) / 255,\n blue(color) / 255,\n alphaf(color)\n );\n }\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["JsiSkColorFilter.ts"],"names":["JsiSkColorFilter","HostObject","constructor","CanvasKit","ref"],"mappings":";;;;;;;AAIA;;AAEO,MAAMA,gBAAN,SACGC,gBADH,CAGP;AACEC,EAAAA,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAyC;AAClD,UAAMD,SAAN,EAAiBC,GAAjB,EAAsB,aAAtB;AACD;;AAHH","sourcesContent":["import type { CanvasKit, ColorFilter } from \"canvaskit-wasm\";\n\nimport type { SkColorFilter } from \"../../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkColorFilter\n extends HostObject<ColorFilter, \"ColorFilter\">\n implements SkColorFilter\n{\n constructor(CanvasKit: CanvasKit, ref: ColorFilter) {\n super(CanvasKit, ref, \"ColorFilter\");\n }\n}\n"]}
1
+ {"version":3,"sources":["JsiSkColorFilter.ts"],"names":["JsiSkColorFilter","HostObject","constructor","CanvasKit","ref"],"mappings":";;;;;;;AAIA;;AAEO,MAAMA,gBAAN,SACGC,gBADH,CAGP;AACEC,EAAAA,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAyC;AAClD,UAAMD,SAAN,EAAiBC,GAAjB,EAAsB,aAAtB;AACD;;AAHH","sourcesContent":["import type { CanvasKit, ColorFilter } from \"canvaskit-wasm\";\n\nimport type { SkColorFilter } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkColorFilter\n extends HostObject<ColorFilter, \"ColorFilter\">\n implements SkColorFilter\n{\n constructor(CanvasKit: CanvasKit, ref: ColorFilter) {\n super(CanvasKit, ref, \"ColorFilter\");\n }\n}\n"]}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.JsiSkColorFilterFactory = void 0;
7
+
8
+ var _Host = require("./Host");
9
+
10
+ var _JsiSkColorFilter = require("./JsiSkColorFilter");
11
+
12
+ class JsiSkColorFilterFactory extends _Host.Host {
13
+ constructor(CanvasKit) {
14
+ super(CanvasKit);
15
+ }
16
+
17
+ MakeMatrix(cMatrix) {
18
+ return new _JsiSkColorFilter.JsiSkColorFilter(this.CanvasKit, this.CanvasKit.ColorFilter.MakeMatrix(cMatrix));
19
+ }
20
+
21
+ MakeBlend(color, mode) {
22
+ return new _JsiSkColorFilter.JsiSkColorFilter(this.CanvasKit, this.CanvasKit.ColorFilter.MakeBlend((0, _Host.toValue)(color), (0, _Host.ckEnum)(mode)));
23
+ }
24
+
25
+ MakeCompose(outer, inner) {
26
+ return new _JsiSkColorFilter.JsiSkColorFilter(this.CanvasKit, this.CanvasKit.ColorFilter.MakeCompose((0, _Host.toValue)(outer), (0, _Host.toValue)(inner)));
27
+ }
28
+
29
+ MakeLerp(t, dst, src) {
30
+ return new _JsiSkColorFilter.JsiSkColorFilter(this.CanvasKit, this.CanvasKit.ColorFilter.MakeLerp(t, (0, _Host.toValue)(dst), (0, _Host.toValue)(src)));
31
+ }
32
+
33
+ MakeLinearToSRGBGamma() {
34
+ return new _JsiSkColorFilter.JsiSkColorFilter(this.CanvasKit, this.CanvasKit.ColorFilter.MakeLinearToSRGBGamma());
35
+ }
36
+
37
+ MakeSRGBToLinearGamma() {
38
+ return new _JsiSkColorFilter.JsiSkColorFilter(this.CanvasKit, this.CanvasKit.ColorFilter.MakeSRGBToLinearGamma());
39
+ }
40
+
41
+ MakeLumaColorFilter() {
42
+ throw new _Host.NotImplementedOnRNWeb();
43
+ }
44
+
45
+ }
46
+
47
+ exports.JsiSkColorFilterFactory = JsiSkColorFilterFactory;
48
+ //# sourceMappingURL=JsiSkColorFilterFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["JsiSkColorFilterFactory.ts"],"names":["JsiSkColorFilterFactory","Host","constructor","CanvasKit","MakeMatrix","cMatrix","JsiSkColorFilter","ColorFilter","MakeBlend","color","mode","MakeCompose","outer","inner","MakeLerp","t","dst","src","MakeLinearToSRGBGamma","MakeSRGBToLinearGamma","MakeLumaColorFilter","NotImplementedOnRNWeb"],"mappings":";;;;;;;AAUA;;AACA;;AAEO,MAAMA,uBAAN,SACGC,UADH,CAGP;AACEC,EAAAA,WAAW,CAACC,SAAD,EAAuB;AAChC,UAAMA,SAAN;AACD;;AAEDC,EAAAA,UAAU,CAACC,OAAD,EAA4B;AACpC,WAAO,IAAIC,kCAAJ,CACL,KAAKH,SADA,EAEL,KAAKA,SAAL,CAAeI,WAAf,CAA2BH,UAA3B,CAAsCC,OAAtC,CAFK,CAAP;AAID;;AAEDG,EAAAA,SAAS,CAACC,KAAD,EAAiBC,IAAjB,EAAkC;AACzC,WAAO,IAAIJ,kCAAJ,CACL,KAAKH,SADA,EAEL,KAAKA,SAAL,CAAeI,WAAf,CAA2BC,SAA3B,CAAqC,mBAAQC,KAAR,CAArC,EAAqD,kBAAOC,IAAP,CAArD,CAFK,CAAP;AAID;;AAEDC,EAAAA,WAAW,CAACC,KAAD,EAAuBC,KAAvB,EAA6C;AACtD,WAAO,IAAIP,kCAAJ,CACL,KAAKH,SADA,EAEL,KAAKA,SAAL,CAAeI,WAAf,CAA2BI,WAA3B,CAAuC,mBAAQC,KAAR,CAAvC,EAAuD,mBAAQC,KAAR,CAAvD,CAFK,CAAP;AAID;;AAEDC,EAAAA,QAAQ,CAACC,CAAD,EAAYC,GAAZ,EAAgCC,GAAhC,EAAoD;AAC1D,WAAO,IAAIX,kCAAJ,CACL,KAAKH,SADA,EAEL,KAAKA,SAAL,CAAeI,WAAf,CAA2BO,QAA3B,CAAoCC,CAApC,EAAuC,mBAAQC,GAAR,CAAvC,EAAqD,mBAAQC,GAAR,CAArD,CAFK,CAAP;AAID;;AAEDC,EAAAA,qBAAqB,GAAG;AACtB,WAAO,IAAIZ,kCAAJ,CACL,KAAKH,SADA,EAEL,KAAKA,SAAL,CAAeI,WAAf,CAA2BW,qBAA3B,EAFK,CAAP;AAID;;AAEDC,EAAAA,qBAAqB,GAAG;AACtB,WAAO,IAAIb,kCAAJ,CACL,KAAKH,SADA,EAEL,KAAKA,SAAL,CAAeI,WAAf,CAA2BY,qBAA3B,EAFK,CAAP;AAID;;AAEDC,EAAAA,mBAAmB,GAAkB;AACnC,UAAM,IAAIC,2BAAJ,EAAN;AACD;;AAjDH","sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type {\n ColorFilterFactory,\n SkColorFilter,\n InputColorMatrix,\n SkColor,\n BlendMode,\n} from \"../types\";\n\nimport { ckEnum, Host, toValue, NotImplementedOnRNWeb } from \"./Host\";\nimport { JsiSkColorFilter } from \"./JsiSkColorFilter\";\n\nexport class JsiSkColorFilterFactory\n extends Host\n implements ColorFilterFactory\n{\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n\n MakeMatrix(cMatrix: InputColorMatrix) {\n return new JsiSkColorFilter(\n this.CanvasKit,\n this.CanvasKit.ColorFilter.MakeMatrix(cMatrix)\n );\n }\n\n MakeBlend(color: SkColor, mode: BlendMode) {\n return new JsiSkColorFilter(\n this.CanvasKit,\n this.CanvasKit.ColorFilter.MakeBlend(toValue(color), ckEnum(mode))\n );\n }\n\n MakeCompose(outer: SkColorFilter, inner: SkColorFilter) {\n return new JsiSkColorFilter(\n this.CanvasKit,\n this.CanvasKit.ColorFilter.MakeCompose(toValue(outer), toValue(inner))\n );\n }\n\n MakeLerp(t: number, dst: SkColorFilter, src: SkColorFilter) {\n return new JsiSkColorFilter(\n this.CanvasKit,\n this.CanvasKit.ColorFilter.MakeLerp(t, toValue(dst), toValue(src))\n );\n }\n\n MakeLinearToSRGBGamma() {\n return new JsiSkColorFilter(\n this.CanvasKit,\n this.CanvasKit.ColorFilter.MakeLinearToSRGBGamma()\n );\n }\n\n MakeSRGBToLinearGamma() {\n return new JsiSkColorFilter(\n this.CanvasKit,\n this.CanvasKit.ColorFilter.MakeSRGBToLinearGamma()\n );\n }\n\n MakeLumaColorFilter(): SkColorFilter {\n throw new NotImplementedOnRNWeb();\n }\n}\n"]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.JsiSkContourMeasure = void 0;
7
+
8
+ var _Host = require("./Host");
9
+
10
+ var _JsiSkPath = require("./JsiSkPath");
11
+
12
+ class JsiSkContourMeasure extends _Host.HostObject {
13
+ constructor(CanvasKit, ref) {
14
+ super(CanvasKit, ref, "ContourMeasure");
15
+ }
16
+
17
+ getPosTan(distance) {
18
+ const [px, py, tx, ty] = this.ref.getPosTan(distance);
19
+ return {
20
+ px,
21
+ py,
22
+ tx,
23
+ ty
24
+ };
25
+ }
26
+
27
+ getSegment(startD, stopD, startWithMoveTo) {
28
+ return new _JsiSkPath.JsiSkPath(this.CanvasKit, this.ref.getSegment(startD, stopD, startWithMoveTo));
29
+ }
30
+
31
+ isClosed() {
32
+ return this.ref.isClosed();
33
+ }
34
+
35
+ length() {
36
+ return this.ref.length();
37
+ }
38
+
39
+ }
40
+
41
+ exports.JsiSkContourMeasure = JsiSkContourMeasure;
42
+ //# sourceMappingURL=JsiSkContourMeasure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["JsiSkContourMeasure.ts"],"names":["JsiSkContourMeasure","HostObject","constructor","CanvasKit","ref","getPosTan","distance","px","py","tx","ty","getSegment","startD","stopD","startWithMoveTo","JsiSkPath","isClosed","length"],"mappings":";;;;;;;AAIA;;AACA;;AAEO,MAAMA,mBAAN,SACGC,gBADH,CAGP;AACEC,EAAAA,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAA4C;AACrD,UAAMD,SAAN,EAAiBC,GAAjB,EAAsB,gBAAtB;AACD;;AAEDC,EAAAA,SAAS,CAACC,QAAD,EAAmB;AAC1B,UAAM,CAACC,EAAD,EAAKC,EAAL,EAASC,EAAT,EAAaC,EAAb,IAAmB,KAAKN,GAAL,CAASC,SAAT,CAAmBC,QAAnB,CAAzB;AACA,WAAO;AAAEC,MAAAA,EAAF;AAAMC,MAAAA,EAAN;AAAUC,MAAAA,EAAV;AAAcC,MAAAA;AAAd,KAAP;AACD;;AAEDC,EAAAA,UAAU,CAACC,MAAD,EAAiBC,KAAjB,EAAgCC,eAAhC,EAA0D;AAClE,WAAO,IAAIC,oBAAJ,CACL,KAAKZ,SADA,EAEL,KAAKC,GAAL,CAASO,UAAT,CAAoBC,MAApB,EAA4BC,KAA5B,EAAmCC,eAAnC,CAFK,CAAP;AAID;;AAEDE,EAAAA,QAAQ,GAAG;AACT,WAAO,KAAKZ,GAAL,CAASY,QAAT,EAAP;AACD;;AAEDC,EAAAA,MAAM,GAAG;AACP,WAAO,KAAKb,GAAL,CAASa,MAAT,EAAP;AACD;;AAvBH","sourcesContent":["import type { CanvasKit, ContourMeasure } from \"canvaskit-wasm\";\n\nimport type { SkContourMeasure } from \"../types\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkPath } from \"./JsiSkPath\";\n\nexport class JsiSkContourMeasure\n extends HostObject<ContourMeasure, \"ContourMeasure\">\n implements SkContourMeasure\n{\n constructor(CanvasKit: CanvasKit, ref: ContourMeasure) {\n super(CanvasKit, ref, \"ContourMeasure\");\n }\n\n getPosTan(distance: number) {\n const [px, py, tx, ty] = this.ref.getPosTan(distance);\n return { px, py, tx, ty };\n }\n\n getSegment(startD: number, stopD: number, startWithMoveTo: boolean) {\n return new JsiSkPath(\n this.CanvasKit,\n this.ref.getSegment(startD, stopD, startWithMoveTo)\n );\n }\n\n isClosed() {\n return this.ref.isClosed();\n }\n\n length() {\n return this.ref.length();\n }\n}\n"]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.JsiSkContourMeasureIter = void 0;
7
+
8
+ var _Host = require("./Host");
9
+
10
+ var _JsiSkContourMeasure = require("./JsiSkContourMeasure");
11
+
12
+ class JsiSkContourMeasureIter extends _Host.HostObject {
13
+ constructor(CanvasKit, ref) {
14
+ super(CanvasKit, ref, "ContourMeasureIter");
15
+ }
16
+
17
+ next() {
18
+ const result = this.ref.next();
19
+
20
+ if (result === null) {
21
+ return null;
22
+ }
23
+
24
+ return new _JsiSkContourMeasure.JsiSkContourMeasure(this.CanvasKit, result);
25
+ }
26
+
27
+ }
28
+
29
+ exports.JsiSkContourMeasureIter = JsiSkContourMeasureIter;
30
+ //# sourceMappingURL=JsiSkContourMeasureIter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["JsiSkContourMeasureIter.ts"],"names":["JsiSkContourMeasureIter","HostObject","constructor","CanvasKit","ref","next","result","JsiSkContourMeasure"],"mappings":";;;;;;;AAIA;;AACA;;AAEO,MAAMA,uBAAN,SACGC,gBADH,CAGP;AACEC,EAAAA,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAgD;AACzD,UAAMD,SAAN,EAAiBC,GAAjB,EAAsB,oBAAtB;AACD;;AAEDC,EAAAA,IAAI,GAAG;AACL,UAAMC,MAAM,GAAG,KAAKF,GAAL,CAASC,IAAT,EAAf;;AACA,QAAIC,MAAM,KAAK,IAAf,EAAqB;AACnB,aAAO,IAAP;AACD;;AACD,WAAO,IAAIC,wCAAJ,CAAwB,KAAKJ,SAA7B,EAAwCG,MAAxC,CAAP;AACD;;AAXH","sourcesContent":["import type { CanvasKit, ContourMeasureIter } from \"canvaskit-wasm\";\n\nimport type { SkContourMeasureIter } from \"../types/ContourMeasure\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkContourMeasure } from \"./JsiSkContourMeasure\";\n\nexport class JsiSkContourMeasureIter\n extends HostObject<ContourMeasureIter, \"ContourMeasureIter\">\n implements SkContourMeasureIter\n{\n constructor(CanvasKit: CanvasKit, ref: ContourMeasureIter) {\n super(CanvasKit, ref, \"ContourMeasureIter\");\n }\n\n next() {\n const result = this.ref.next();\n if (result === null) {\n return null;\n }\n return new JsiSkContourMeasure(this.CanvasKit, result);\n }\n}\n"]}